summaryrefslogtreecommitdiffhomepage
path: root/docs/assets/monaco/bundled-types-B0l6HWZX.js
diff options
context:
space:
mode:
Diffstat (limited to 'docs/assets/monaco/bundled-types-B0l6HWZX.js')
-rw-r--r--docs/assets/monaco/bundled-types-B0l6HWZX.js1191
1 files changed, 1191 insertions, 0 deletions
diff --git a/docs/assets/monaco/bundled-types-B0l6HWZX.js b/docs/assets/monaco/bundled-types-B0l6HWZX.js
new file mode 100644
index 0000000..93d6bd8
--- /dev/null
+++ b/docs/assets/monaco/bundled-types-B0l6HWZX.js
@@ -0,0 +1,1191 @@
+const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco/freemarker2-OnI5Gveq.js","assets/modules/file-saver-igGfcqei.js","assets/modules/vue-DPv8DyWv.js","assets/monaco/handlebars-BHvBDF_T.js","assets/monaco/html-DfZYg3qg.js","assets/monaco/javascript-DbX-vxQa.js","assets/monaco/typescript-DSer1JU9.js","assets/monaco/liquid-fLVojwb4.js","assets/monaco/mdx-gI0abYvb.js","assets/monaco/python-D975luWu.js","assets/monaco/razor-BSJ28aAe.js","assets/monaco/xml-Bfx2yygV.js","assets/monaco/yaml-BZGo8wj-.js","assets/monaco/cssMode-8LFZwXV3.js","assets/monaco/htmlMode-c_yfuTN3.js","assets/monaco/jsonMode-BkHO8n_X.js","assets/monaco/tsMode-CSjQzO28.js","assets/slidev/shiki-Bsl5RiOy.js","assets/modules/shiki-BNMsYMPq.js","assets/modules/shiki-Bxv373Z5.css"])))=>i.map(i=>d[i]);
+var Yoi=Object.defineProperty;var eai=(l,e,i)=>e in l?Yoi(l,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):l[e]=i;var fp=(l,e,i)=>eai(l,typeof e!="symbol"?e+"":e,i);import{g as tai,c as Pyt,a as iai}from"../modules/file-saver-igGfcqei.js";import{z as uJ,A as nai,B as rai,C as sai,D as oai,E as aai,G as cai}from"../modules/vue-DPv8DyWv.js";function lai(l,e){for(var i=0;i<e.length;i++){const n=e[i];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in l)){const c=Object.getOwnPropertyDescriptor(n,s);c&&Object.defineProperty(l,s,c.get?c:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}const KB={theme:"default",title:"Really Functional Data Structures",titleTemplate:"%s - Slidev",addons:[],remoteAssets:!1,monaco:!0,monacoTypesSource:"local",monacoTypesAdditionalPackages:[],monacoTypesIgnorePackages:[],monacoRunAdditionalDeps:[],download:!1,export:{},info:!1,highlighter:"shiki",twoslash:!0,lineNumbers:!1,colorSchema:"light",routerMode:"history",aspectRatio:1.7777777777777777,canvasWidth:750,exportFilename:"",selectable:!1,themeConfig:{},fonts:{sans:['"Avenir Next"','"Nunito Sans"',"ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial",'"Noto Sans"',"sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:['"Fira Code"',"ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"],webfonts:["Avenir Next","Nunito Sans","Fira Code"],provider:"google",local:["Avenir Next"],italic:!1,weights:["200","400","600"]},favicon:"https://cdn.jsdelivr.net/gh/slidevjs/slidev/assets/favicon.png",drawings:{enabled:!0,persist:!1,presenterOnly:!1,syncAll:!0},plantUmlServer:"https://www.plantuml.com/plantuml",codeCopy:!0,record:"dev",css:"unocss",presenter:!0,htmlAttrs:{},transition:"instant",editor:!0,contextMenu:null,overviewSnapshots:!1,wakeLock:!0,mdc:!0,author:"Marvin Borner",class:"text-center",slidesTitle:"Really Functional Data Structures - Slidev"};function Q8i(l,e,i){return Math.min(i,Math.max(e,l))}function Z8i(...l){return dai(l).reduce((e,i)=>e+i,0)}function uai(l){return l=l??[],Array.isArray(l)?l:[l]}function dai(l){return uai(l).flat(1)}function Y8i(l){return Array.from(new Set(l))}function e7i(...l){let e,i,n;l.length===1?(e=0,n=1,[i]=l):[e,i,n=1]=l;const s=[];let c=e;for(;c<i;)s.push(c),c+=n||1;return s}function fai(l){return l!=null}function hai(l,e){return Object.fromEntries(Object.entries(l).map(([i,n])=>e(i,n)).filter(fai))}function _ai(l){let e;function i(){return e||(e=l()),e}return i.reset=async()=>{const n=e;e=void 0,n&&await n},i}function pai(l,e,i){var n=i||{},s=n.noTrailing,c=s===void 0?!1:s,d=n.noLeading,f=d===void 0?!1:d,m=n.debounceMode,v=m===void 0?void 0:m,x,w=!1,I=0;function P(){x&&clearTimeout(x)}function O(J){var Y=J||{},ae=Y.upcomingOnly,me=ae===void 0?!1:ae;P(),w=!me}function z(){for(var J=arguments.length,Y=new Array(J),ae=0;ae<J;ae++)Y[ae]=arguments[ae];var me=this,ye=Date.now()-I;if(w)return;function Ce(){I=Date.now(),e.apply(me,Y)}function Fe(){x=void 0}!f&&v&&!x&&Ce(),P(),v===void 0&&ye>l?f?(I=Date.now(),c||(x=setTimeout(v?Fe:Ce,l))):Ce():c!==!0&&(x=setTimeout(v?Fe:Ce,v===void 0?l-ye:l))}return z.cancel=O,z}function t7i(l,e,i){var n={},s=n.atBegin,c=s===void 0?!1:s;return pai(l,e,{debounceMode:c!==!1})}const i7i="build",mai=uJ(()=>KB.aspectRatio),gai=uJ(()=>KB.canvasWidth),n7i=uJ(()=>Math.ceil(gai.value/mai.value)),r7i=uJ(()=>hai(KB.themeConfig||{},(l,e)=>[`--slidev-theme-${l}`,e])),s7i=KB.slidesTitle,o7i="/tuela24",yai="modulepreload",vai=function(l){return"/tuela24/"+l},Ayt={},_o=function(e,i,n){let s=Promise.resolve();if(i&&i.length>0){document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),f=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));s=Promise.allSettled(i.map(m=>{if(m=vai(m),m in Ayt)return;Ayt[m]=!0;const v=m.endsWith(".css"),x=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${x}`))return;const w=document.createElement("link");if(w.rel=v?"stylesheet":yai,v||(w.as="script"),w.crossOrigin="",w.href=m,f&&w.setAttribute("nonce",f),document.head.appendChild(w),v)return new Promise((I,P)=>{w.addEventListener("load",I),w.addEventListener("error",()=>P(new Error(`Unable to preload CSS for ${m}`)))})}))}function c(d){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=d,window.dispatchEvent(f),!f.defaultPrevented)throw d}return s.then(d=>{for(const f of d||[])f.status==="rejected"&&c(f.reason);return e().catch(c)})},Oyt=nai(),K5e=rai("slidev-color-schema","auto"),Myt=uJ(()=>KB.colorSchema!=="auto"),Mqe=uJ({get(){return Myt.value?KB.colorSchema==="dark":K5e.value==="auto"?Oyt.value:K5e.value==="dark"},set(l){Myt.value||(K5e.value=l===Oyt.value?"auto":l?"dark":"light")}}),a7i=sai(Mqe);oai&&aai(Mqe,l=>{const e=document.querySelector("html");e.classList.toggle("dark",l),e.classList.toggle("light",!l)},{immediate:!0});const bai=[];var Cai=Object.defineProperty,Sai=Object.defineProperties,wai=Object.getOwnPropertyDescriptors,Ryt=Object.getOwnPropertySymbols,xai=Object.prototype.hasOwnProperty,kai=Object.prototype.propertyIsEnumerable,Fyt=(l,e,i)=>e in l?Cai(l,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):l[e]=i,pkt=(l,e)=>{for(var i in e||(e={}))xai.call(e,i)&&Fyt(l,i,e[i]);if(Ryt)for(var i of Ryt(e))kai.call(e,i)&&Fyt(l,i,e[i]);return l},mkt=(l,e)=>Sai(l,wai(e)),Tne=(l,e,i)=>new Promise((n,s)=>{var c=m=>{try{f(i.next(m))}catch(v){s(v)}},d=m=>{try{f(i.throw(m))}catch(v){s(v)}},f=m=>m.done?n(m.value):Promise.resolve(m.value).then(c,d);f((i=i.apply(l,e)).next())}),Tai=(l,e)=>{const i=`https://data.jsdelivr.com/v1/package/npm/${e}`;return Rqe(l,i,{cache:"no-store"})},Dai=(l,e,i)=>{const n=`https://data.jsdelivr.com/v1/package/resolve/npm/${e}@${i}`;return Rqe(l,n)},Eai=(l,e,i)=>Tne(void 0,null,function*(){const n=`https://data.jsdelivr.com/v1/package/npm/${e}@${i}/flat`,s=yield Rqe(l,n);return s instanceof Error?s:mkt(pkt({},s),{moduleName:e,version:i})}),Byt=(l,e,i,n)=>Tne(void 0,null,function*(){const s=`https://cdn.jsdelivr.net/npm/${e}@${i}${n}`,d=yield(l.fetcher||fetch)(s);return d.ok?d.text():new Error("OK")});function Rqe(l,e,i){return(l.fetcher||fetch)(e,i).then(s=>s.ok?s.json().then(c=>c):new Error("OK"))}var Iai=l=>{const e=["assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","inspector/promises","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","repl","stream","stream/promises","stream/consumers","stream/web","string_decoder","sys","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib"];if(l.indexOf("node:")===0||e.includes(l))return"node";const[i="",n=""]=l.split("/");return i.startsWith("@")?`${i}/${n}`:i},Nai=l=>{const e=new Map,i=new Map;let n=0,s=0;return d=>(n=0,s=0,c(d,0).then(f=>{var m,v;s>0&&((v=(m=l.delegate).finished)==null||v.call(m,i))}));function c(d,f){return Tne(this,null,function*(){var m,v,x,w,I;const P=Pai(l,e,d);P.forEach(rt=>e.set(rt.module,{state:"loading"}));const z=(yield Promise.all(P.map(rt=>Vyt(l,rt.module,rt.version)))).filter(rt=>!("error"in rt)),J=z.filter(rt=>rt.files.find(ct=>Fqe(ct.name))),Y=J.map(rt=>Wyt(rt,`/node_modules/${rt.moduleName}`)),ae=z.filter(rt=>!J.includes(rt)),ye=(yield Promise.all(ae.map(rt=>Vyt(l,`@types/${X5e(rt.moduleName)}`,"latest")))).filter(rt=>!("error"in rt)),Ce=ye.map(rt=>Wyt(rt,`/node_modules/@types/${X5e(rt.moduleName).replace("types__","")}`)),Fe=Y.concat(Ce).reduce((rt,ct)=>rt.concat(ct),[]);n+=Fe.length,Fe.length&&f===0&&((v=(m=l.delegate).started)==null||v.call(m));for(const rt of z){let ct=`/node_modules/${rt.moduleName}`;ye.includes(rt)&&(ct=`/node_modules/@types/${X5e(rt.moduleName).replace("types__","")}`);const Mt=ct+"/package.json",Yt=yield Byt(l,rt.moduleName,rt.version,"/package.json");typeof Yt=="string"?(i.set(Mt,Yt),(w=(x=l.delegate).receivedFile)==null||w.call(x,Yt,Mt)):(I=l.logger)==null||I.error(`Could not download package.json for ${rt.moduleName}`)}yield Promise.all(Fe.map(rt=>Tne(this,null,function*(){var ct,Mt,Yt;const Bi=yield Byt(l,rt.moduleName,rt.moduleVersion,rt.path);s++,Bi instanceof Error?(ct=l.logger)==null||ct.error(`Had an issue getting ${rt.path} for ${rt.moduleName}`):(i.set(rt.vfsPath,Bi),(Yt=(Mt=l.delegate).receivedFile)==null||Yt.call(Mt,Bi,rt.vfsPath),l.delegate.progress&&s%5===0&&l.delegate.progress(s,n),yield c(Bi,f+1))})))})}};function Wyt(l,e){const i=[];for(const n of l.files)Fqe(n.name)&&i.push({moduleName:l.moduleName,moduleVersion:l.version,vfsPath:`${e}${n.name}`,path:n.name});return i}var Lai=(l,e)=>{const i=l.preProcessFile(e),n=l.libMap||new Map;return i.referencedFiles.concat(i.importedFiles).concat(i.libReferenceDirectives).filter(c=>!Fqe(c.fileName)).filter(c=>!n.has(c.fileName)).map(c=>{let d;if(!c.fileName.startsWith(".")){d="latest";const f=e.slice(c.end).split(`
+`)[0];f.includes("// types:")&&(d=f.split("// types: ")[1].trim())}return{module:c.fileName,version:d}})};function Pai(l,e,i){return Lai(l.typescript,i).map(c=>mkt(pkt({},c),{module:Iai(c.module)})).filter(c=>!c.module.startsWith(".")).filter(c=>!e.has(c.module))}var Vyt=(l,e,i)=>Tne(void 0,null,function*(){let n=i||"latest";if(n.split(".").length<2){const c=yield Dai(l,e,n);if(c instanceof Error)return{error:c,userFacingMessage:`Could not go from a tag to version on npm for ${e} - possible typo?`};const d=c.version;if(!d){const f=yield Tai(l,e);if(f instanceof Error)return{error:c,userFacingMessage:`Could not get versions on npm for ${e} - possible typo?`};const m=Object.entries(f.tags).join(", ");return{error:new Error("Could not find tag for module"),userFacingMessage:`Could not find a tag for ${e} called ${i}. Did find ${m}`}}n=d}const s=yield Eai(l,e,n);return s instanceof Error?{error:s,userFacingMessage:`Could not get the files for ${e}@${n}. Is it possibly a typo?`}:s});function X5e(l){return l.indexOf("@")===0&&l.indexOf("/")!==-1&&(l=l.substr(1).replace("/","__")),l}function Fqe(l){return/\.d\.([^\.]+\.)?[cm]?ts$/i.test(l)}function sk(l,e=0){return l[l.length-(1+e)]}function Aai(l){if(l.length===0)throw new Error("Invalid tail call");return[l.slice(0,l.length-1),l[l.length-1]]}function Lf(l,e,i=(n,s)=>n===s){if(l===e)return!0;if(!l||!e||l.length!==e.length)return!1;for(let n=0,s=l.length;n<s;n++)if(!i(l[n],e[n]))return!1;return!0}function Oai(l,e){const i=l.length-1;e<i&&(l[e]=l[i]),l.pop()}function Dne(l,e,i){return Mai(l.length,n=>i(l[n],e))}function Mai(l,e){let i=0,n=l-1;for(;i<=n;){const s=(i+n)/2|0,c=e(s);if(c<0)i=s+1;else if(c>0)n=s-1;else return s}return-(i+1)}function oBe(l,e,i){if(l=l|0,l>=e.length)throw new TypeError("invalid index");const n=e[Math.floor(e.length*Math.random())],s=[],c=[],d=[];for(const f of e){const m=i(f,n);m<0?s.push(f):m>0?c.push(f):d.push(f)}return l<s.length?oBe(l,s,i):l<s.length+d.length?d[0]:oBe(l-(s.length+d.length),c,i)}function Hyt(l,e){const i=[];let n;for(const s of l.slice(0).sort(e))!n||e(n[0],s)!==0?(n=[s],i.push(n)):n.push(s);return i}function*Bqe(l,e){let i,n;for(const s of l)n!==void 0&&e(n,s)?i.push(s):(i&&(yield i),i=[s]),n=s;i&&(yield i)}function gkt(l,e){for(let i=0;i<=l.length;i++)e(i===0?void 0:l[i-1],i===l.length?void 0:l[i])}function Rai(l,e){for(let i=0;i<l.length;i++)e(i===0?void 0:l[i-1],l[i],i+1===l.length?void 0:l[i+1])}function yT(l){return l.filter(e=>!!e)}function jyt(l){let e=0;for(let i=0;i<l.length;i++)l[i]&&(l[e]=l[i],e+=1);l.length=e}function ykt(l){return!Array.isArray(l)||l.length===0}function ky(l){return Array.isArray(l)&&l.length>0}function r6(l,e=i=>i){const i=new Set;return l.filter(n=>{const s=e(n);return i.has(s)?!1:(i.add(s),!0)})}function Wqe(l,e){return l.length>0?l[0]:e}function Sb(l,e){let i=typeof e=="number"?l:0;typeof e=="number"?i=l:(i=0,e=l);const n=[];if(i<=e)for(let s=i;s<e;s++)n.push(s);else for(let s=i;s>e;s--)n.push(s);return n}function kSe(l,e,i){const n=l.slice(0,e),s=l.slice(e);return n.concat(i,s)}function Q5e(l,e){const i=l.indexOf(e);i>-1&&(l.splice(i,1),l.unshift(e))}function Hge(l,e){const i=l.indexOf(e);i>-1&&(l.splice(i,1),l.push(e))}function aBe(l,e){for(const i of e)l.push(i)}function Vqe(l){return Array.isArray(l)?l:[l]}function Fai(l,e,i){const n=vkt(l,e),s=l.length,c=i.length;l.length=s+c;for(let d=s-1;d>=n;d--)l[d+c]=l[d];for(let d=0;d<c;d++)l[d+n]=i[d]}function zyt(l,e,i,n){const s=vkt(l,e);let c=l.splice(s,i);return c===void 0&&(c=[]),Fai(l,s,n),c}function vkt(l,e){return e<0?Math.max(e+l.length,0):Math.min(e,l.length)}var Ene;(function(l){function e(c){return c<0}l.isLessThan=e;function i(c){return c<=0}l.isLessThanOrEqual=i;function n(c){return c>0}l.isGreaterThan=n;function s(c){return c===0}l.isNeitherLessOrGreaterThan=s,l.greaterThan=1,l.lessThan=-1,l.neitherLessOrGreaterThan=0})(Ene||(Ene={}));function yv(l,e){return(i,n)=>e(l(i),l(n))}function Bai(...l){return(e,i)=>{for(const n of l){const s=n(e,i);if(!Ene.isNeitherLessOrGreaterThan(s))return s}return Ene.neitherLessOrGreaterThan}}const mT=(l,e)=>l-e,Wai=(l,e)=>mT(l?1:0,e?1:0);function bkt(l){return(e,i)=>-l(e,i)}class s6{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let i=this.firstIdx;for(;i<this.items.length&&e(this.items[i]);)i++;const n=i===this.firstIdx?null:this.items.slice(this.firstIdx,i);return this.firstIdx=i,n}takeFromEndWhile(e){let i=this.lastIdx;for(;i>=0&&e(this.items[i]);)i--;const n=i===this.lastIdx?null:this.items.slice(i+1,this.lastIdx+1);return this.lastIdx=i,n}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const i=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,i}}const wq=class wq{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(i=>(e.push(i),!0)),e}filter(e){return new wq(i=>this.iterate(n=>e(n)?i(n):!0))}map(e){return new wq(i=>this.iterate(n=>i(e(n))))}findLast(e){let i;return this.iterate(n=>(e(n)&&(i=n),!0)),i}findLastMaxBy(e){let i,n=!0;return this.iterate(s=>((n||Ene.isGreaterThan(e(s,i)))&&(n=!1,i=s),!0)),i}};wq.empty=new wq(e=>{});let u9=wq;class z1e{constructor(e){this._indexMap=e}static createSortPermutation(e,i){const n=Array.from(e.keys()).sort((s,c)=>i(e[s],e[c]));return new z1e(n)}apply(e){return e.map((i,n)=>e[this._indexMap[n]])}inverse(){const e=this._indexMap.slice();for(let i=0;i<this._indexMap.length;i++)e[this._indexMap[i]]=i;return new z1e(e)}}function Eb(l){return typeof l=="string"}function gg(l){return typeof l=="object"&&l!==null&&!Array.isArray(l)&&!(l instanceof RegExp)&&!(l instanceof Date)}function Vai(l){const e=Object.getPrototypeOf(Uint8Array);return typeof l=="object"&&l instanceof e}function pR(l){return typeof l=="number"&&!isNaN(l)}function Uyt(l){return!!l&&typeof l[Symbol.iterator]=="function"}function Ckt(l){return l===!0||l===!1}function xy(l){return typeof l>"u"}function xL(l){return!pw(l)}function pw(l){return xy(l)||l===null}function Fl(l,e){if(!l)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function NM(l){if(pw(l))throw new Error("Assertion Failed: argument is undefined or null");return l}function Ine(l){return typeof l=="function"}function Hai(l,e){const i=Math.min(l.length,e.length);for(let n=0;n<i;n++)jai(l[n],e[n])}function jai(l,e){if(Eb(e)){if(typeof l!==e)throw new Error(`argument does not match constraint: typeof ${e}`)}else if(Ine(e)){try{if(l instanceof e)return}catch{}if(!pw(l)&&l.constructor===e||e.length===1&&e.call(void 0,l)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function D4(l){if(!l||typeof l!="object"||l instanceof RegExp)return l;const e=Array.isArray(l)?[]:{};return Object.entries(l).forEach(([i,n])=>{e[i]=n&&typeof n=="object"?D4(n):n}),e}function zai(l){if(!l||typeof l!="object")return l;const e=[l];for(;e.length>0;){const i=e.shift();Object.freeze(i);for(const n in i)if(Skt.call(i,n)){const s=i[n];typeof s=="object"&&!Object.isFrozen(s)&&!Vai(s)&&e.push(s)}}return l}const Skt=Object.prototype.hasOwnProperty;function wkt(l,e){return cBe(l,e,new Set)}function cBe(l,e,i){if(pw(l))return l;const n=e(l);if(typeof n<"u")return n;if(Array.isArray(l)){const s=[];for(const c of l)s.push(cBe(c,e,i));return s}if(gg(l)){if(i.has(l))throw new Error("Cannot clone recursive data-structure");i.add(l);const s={};for(const c in l)Skt.call(l,c)&&(s[c]=cBe(l[c],e,i));return i.delete(l),s}return l}function TSe(l,e,i=!0){return gg(l)?(gg(e)&&Object.keys(e).forEach(n=>{n in l?i&&(gg(l[n])&&gg(e[n])?TSe(l[n],e[n],i):l[n]=e[n]):l[n]=e[n]}),l):e}function qC(l,e){if(l===e)return!0;if(l==null||e===null||e===void 0||typeof l!=typeof e||typeof l!="object"||Array.isArray(l)!==Array.isArray(e))return!1;let i,n;if(Array.isArray(l)){if(l.length!==e.length)return!1;for(i=0;i<l.length;i++)if(!qC(l[i],e[i]))return!1}else{const s=[];for(n in l)s.push(n);s.sort();const c=[];for(n in e)c.push(n);if(c.sort(),!qC(s,c))return!1;for(i=0;i<s.length;i++)if(!qC(l[s[i]],e[s[i]]))return!1}return!0}function Uai(l){let e=[];for(;Object.prototype!==l;)e=e.concat(Object.getOwnPropertyNames(l)),l=Object.getPrototypeOf(l);return e}function lBe(l){const e=[];for(const i of Uai(l))typeof l[i]=="function"&&e.push(i);return e}function qai(l,e){const i=s=>function(){const c=Array.prototype.slice.call(arguments,0);return e(s,c)},n={};for(const s of l)n[s]=i(s);return n}function xkt(){return globalThis._VSCODE_NLS_MESSAGES}function Hqe(){return globalThis._VSCODE_NLS_LANGUAGE}const $ai=Hqe()==="pseudo"||typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function U1e(l,e){let i;return e.length===0?i=l:i=l.replace(/\{(\d+)\}/g,(n,s)=>{const c=s[0],d=e[c];let f=n;return typeof d=="string"?f=d:(typeof d=="number"||typeof d=="boolean"||d===void 0||d===null)&&(f=String(d)),f}),$ai&&(i="["+i.replace(/[aouei]/g,"$&$&")+"]"),i}function W(l,e,...i){return U1e(typeof l=="number"?kkt(l,e):e,i)}function kkt(l,e){var n;const i=(n=xkt())==null?void 0:n[l];if(typeof i!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${l} !!!`)}return i}function aa(l,e,...i){let n;typeof l=="number"?n=kkt(l,e):n=e;const s=U1e(n,i);return{value:s,original:e===n?s:U1e(e,i)}}const ZU="en";let q1e=!1,$1e=!1,Y0e=!1,Tkt=!1,jqe=!1,zqe=!1,Dkt=!1,jge,e1e=ZU,qyt=ZU,Jai,lE;const Q4=globalThis;let lv;var dkt;typeof Q4.vscode<"u"&&typeof Q4.vscode.process<"u"?lv=Q4.vscode.process:typeof process<"u"&&typeof((dkt=process==null?void 0:process.versions)==null?void 0:dkt.node)=="string"&&(lv=process);var fkt;const Gai=typeof((fkt=lv==null?void 0:lv.versions)==null?void 0:fkt.electron)=="string",Kai=Gai&&(lv==null?void 0:lv.type)==="renderer";var hkt;if(typeof lv=="object"){q1e=lv.platform==="win32",$1e=lv.platform==="darwin",Y0e=lv.platform==="linux",Y0e&&lv.env.SNAP&&lv.env.SNAP_REVISION,lv.env.CI||lv.env.BUILD_ARTIFACTSTAGINGDIRECTORY,jge=ZU,e1e=ZU;const l=lv.env.VSCODE_NLS_CONFIG;if(l)try{const e=JSON.parse(l);jge=e.userLocale,qyt=e.osLocale,e1e=e.resolvedLanguage||ZU,Jai=(hkt=e.languagePack)==null?void 0:hkt.translationsConfigFile}catch{}Tkt=!0}else typeof navigator=="object"&&!Kai?(lE=navigator.userAgent,q1e=lE.indexOf("Windows")>=0,$1e=lE.indexOf("Macintosh")>=0,zqe=(lE.indexOf("Macintosh")>=0||lE.indexOf("iPad")>=0||lE.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Y0e=lE.indexOf("Linux")>=0,Dkt=(lE==null?void 0:lE.indexOf("Mobi"))>=0,jqe=!0,e1e=Hqe()||ZU,jge=navigator.language.toLowerCase(),qyt=jge):console.error("Unable to resolve platform.");const I0=q1e,Hc=$1e,Cv=Y0e,PE=Tkt,XB=jqe,Xai=jqe&&typeof Q4.importScripts=="function",Qai=Xai?Q4.origin:void 0,VE=zqe,Ekt=Dkt,EL=lE,Zai=e1e,Yai=typeof Q4.postMessage=="function"&&!Q4.importScripts,Ikt=(()=>{if(Yai){const l=[];Q4.addEventListener("message",i=>{if(i.data&&i.data.vscodeScheduleAsyncWork)for(let n=0,s=l.length;n<s;n++){const c=l[n];if(c.id===i.data.vscodeScheduleAsyncWork){l.splice(n,1),c.callback();return}}});let e=0;return i=>{const n=++e;l.push({id:n,callback:i}),Q4.postMessage({vscodeScheduleAsyncWork:n},"*")}}return l=>setTimeout(l)})(),UC=$1e||zqe?2:q1e?1:3;let $yt=!0,Jyt=!1;function Nkt(){if(!Jyt){Jyt=!0;const l=new Uint8Array(2);l[0]=1,l[1]=2,$yt=new Uint16Array(l.buffer)[0]===513}return $yt}const Lkt=!!(EL&&EL.indexOf("Chrome")>=0),eci=!!(EL&&EL.indexOf("Firefox")>=0),tci=!!(!Lkt&&EL&&EL.indexOf("Safari")>=0),ici=!!(EL&&EL.indexOf("Edg/")>=0),nci=!!(EL&&EL.indexOf("Android")>=0),p1={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}};var dl;(function(l){function e(ye){return ye&&typeof ye=="object"&&typeof ye[Symbol.iterator]=="function"}l.is=e;const i=Object.freeze([]);function n(){return i}l.empty=n;function*s(ye){yield ye}l.single=s;function c(ye){return e(ye)?ye:s(ye)}l.wrap=c;function d(ye){return ye||i}l.from=d;function*f(ye){for(let Ce=ye.length-1;Ce>=0;Ce--)yield ye[Ce]}l.reverse=f;function m(ye){return!ye||ye[Symbol.iterator]().next().done===!0}l.isEmpty=m;function v(ye){return ye[Symbol.iterator]().next().value}l.first=v;function x(ye,Ce){let Fe=0;for(const rt of ye)if(Ce(rt,Fe++))return!0;return!1}l.some=x;function w(ye,Ce){for(const Fe of ye)if(Ce(Fe))return Fe}l.find=w;function*I(ye,Ce){for(const Fe of ye)Ce(Fe)&&(yield Fe)}l.filter=I;function*P(ye,Ce){let Fe=0;for(const rt of ye)yield Ce(rt,Fe++)}l.map=P;function*O(ye,Ce){let Fe=0;for(const rt of ye)yield*Ce(rt,Fe++)}l.flatMap=O;function*z(...ye){for(const Ce of ye)yield*Ce}l.concat=z;function J(ye,Ce,Fe){let rt=Fe;for(const ct of ye)rt=Ce(rt,ct);return rt}l.reduce=J;function*Y(ye,Ce,Fe=ye.length){for(Ce<0&&(Ce+=ye.length),Fe<0?Fe+=ye.length:Fe>ye.length&&(Fe=ye.length);Ce<Fe;Ce++)yield ye[Ce]}l.slice=Y;function ae(ye,Ce=Number.POSITIVE_INFINITY){const Fe=[];if(Ce===0)return[Fe,ye];const rt=ye[Symbol.iterator]();for(let ct=0;ct<Ce;ct++){const Mt=rt.next();if(Mt.done)return[Fe,l.empty()];Fe.push(Mt.value)}return[Fe,{[Symbol.iterator](){return rt}}]}l.consume=ae;async function me(ye){const Ce=[];for await(const Fe of ye)Ce.push(Fe);return Promise.resolve(Ce)}l.asyncToArray=me})(dl||(dl={}));var q4;let Nm=(q4=class{constructor(e){this.element=e,this.next=q4.Undefined,this.prev=q4.Undefined}},q4.Undefined=new q4(void 0),q4);class _v{constructor(){this._first=Nm.Undefined,this._last=Nm.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Nm.Undefined}clear(){let e=this._first;for(;e!==Nm.Undefined;){const i=e.next;e.prev=Nm.Undefined,e.next=Nm.Undefined,e=i}this._first=Nm.Undefined,this._last=Nm.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,i){const n=new Nm(e);if(this._first===Nm.Undefined)this._first=n,this._last=n;else if(i){const c=this._last;this._last=n,n.prev=c,c.next=n}else{const c=this._first;this._first=n,n.next=c,c.prev=n}this._size+=1;let s=!1;return()=>{s||(s=!0,this._remove(n))}}shift(){if(this._first!==Nm.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Nm.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Nm.Undefined&&e.next!==Nm.Undefined){const i=e.prev;i.next=e.next,e.next.prev=i}else e.prev===Nm.Undefined&&e.next===Nm.Undefined?(this._first=Nm.Undefined,this._last=Nm.Undefined):e.next===Nm.Undefined?(this._last=this._last.prev,this._last.next=Nm.Undefined):e.prev===Nm.Undefined&&(this._first=this._first.next,this._first.prev=Nm.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Nm.Undefined;)yield e.element,e=e.next}}const J1e="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function rci(l=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const i of J1e)l.indexOf(i)>=0||(e+="\\"+i);return e+="\\s]+)",new RegExp(e,"g")}const Uqe=rci();function qqe(l){let e=Uqe;if(l&&l instanceof RegExp)if(l.global)e=l;else{let i="g";l.ignoreCase&&(i+="i"),l.multiline&&(i+="m"),l.unicode&&(i+="u"),e=new RegExp(l.source,i)}return e.lastIndex=0,e}const Pkt=new _v;Pkt.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function Nne(l,e,i,n,s){if(e=qqe(e),s||(s=dl.first(Pkt)),i.length>s.maxLen){let v=l-s.maxLen/2;return v<0?v=0:n+=v,i=i.substring(v,l+s.maxLen/2),Nne(l,e,i,n,s)}const c=Date.now(),d=l-1-n;let f=-1,m=null;for(let v=1;!(Date.now()-c>=s.timeBudget);v++){const x=d-s.windowSize*v;e.lastIndex=Math.max(0,x);const w=sci(e,i,d,f);if(!w&&m||(m=w,x<=0))break;f=x}if(m){const v={word:m[0],startColumn:n+1+m.index,endColumn:n+1+m.index+m[0].length};return e.lastIndex=0,v}return null}function sci(l,e,i,n){let s;for(;s=l.exec(e);){const c=s.index||0;if(c<=i&&l.lastIndex>=i)return s;if(n>0&&c>n)return null}return null}const QN=8;class Akt{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class Okt{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class bf{constructor(e,i,n,s){this.id=e,this.name=i,this.defaultValue=n,this.schema=s}applyUpdate(e,i){return DSe(e,i)}compute(e,i,n){return n}}class Sie{constructor(e,i){this.newValue=e,this.didChange=i}}function DSe(l,e){if(typeof l!="object"||typeof e!="object"||!l||!e)return new Sie(e,l!==e);if(Array.isArray(l)||Array.isArray(e)){const n=Array.isArray(l)&&Array.isArray(e)&&Lf(l,e);return new Sie(e,!n)}let i=!1;for(const n in e)if(e.hasOwnProperty(n)){const s=DSe(l[n],e[n]);s.didChange&&(l[n]=s.newValue,i=!0)}return new Sie(l,i)}class cse{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,i){return DSe(e,i)}validate(e){return this.defaultValue}}class dJ{constructor(e,i,n,s){this.id=e,this.name=i,this.defaultValue=n,this.schema=s}applyUpdate(e,i){return DSe(e,i)}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,i,n){return n}}function lo(l,e){return typeof l>"u"?e:l==="false"?!1:!!l}class Ml extends dJ{constructor(e,i,n,s=void 0){typeof s<"u"&&(s.type="boolean",s.default=n),super(e,i,n,s)}validate(e){return lo(e,this.defaultValue)}}function kF(l,e,i,n){if(typeof l>"u")return e;let s=parseInt(l,10);return isNaN(s)?e:(s=Math.max(i,s),s=Math.min(n,s),s|0)}class Ed extends dJ{static clampedInt(e,i,n,s){return kF(e,i,n,s)}constructor(e,i,n,s,c,d=void 0){typeof d<"u"&&(d.type="integer",d.default=n,d.minimum=s,d.maximum=c),super(e,i,n,d),this.minimum=s,this.maximum=c}validate(e){return Ed.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function oci(l,e,i,n){if(typeof l>"u")return e;const s=vw.float(l,e);return vw.clamp(s,i,n)}class vw extends dJ{static clamp(e,i,n){return e<i?i:e>n?n:e}static float(e,i){if(typeof e=="number")return e;if(typeof e>"u")return i;const n=parseFloat(e);return isNaN(n)?i:n}constructor(e,i,n,s,c){typeof c<"u"&&(c.type="number",c.default=n),super(e,i,n,c),this.validationFn=s}validate(e){return this.validationFn(vw.float(e,this.defaultValue))}}class Sy extends dJ{static string(e,i){return typeof e!="string"?i:e}constructor(e,i,n,s=void 0){typeof s<"u"&&(s.type="string",s.default=n),super(e,i,n,s)}validate(e){return Sy.string(e,this.defaultValue)}}function Ah(l,e,i,n){return typeof l!="string"?e:n&&l in n?n[l]:i.indexOf(l)===-1?e:l}class Ph extends dJ{constructor(e,i,n,s,c=void 0){typeof c<"u"&&(c.type="string",c.enum=s,c.default=n),super(e,i,n,c),this._allowedValues=s}validate(e){return Ah(e,this.defaultValue,this._allowedValues)}}class zge extends bf{constructor(e,i,n,s,c,d,f=void 0){typeof f<"u"&&(f.type="string",f.enum=c,f.default=s),super(e,i,n,f),this._allowedValues=c,this._convert=d}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function aci(l){switch(l){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class cci extends bf{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[W("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached."),W("accessibilitySupport.on","Optimize for usage with a Screen Reader."),W("accessibilitySupport.off","Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:W("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,i,n){return n===0?e.accessibilitySupport:n}}class lci extends bf{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:W("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:W("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{insertSpace:lo(i.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:lo(i.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function uci(l){switch(l){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var n0;(function(l){l[l.Line=1]="Line",l[l.Block=2]="Block",l[l.Underline=3]="Underline",l[l.LineThin=4]="LineThin",l[l.BlockOutline=5]="BlockOutline",l[l.UnderlineThin=6]="UnderlineThin"})(n0||(n0={}));function dci(l){switch(l){case"line":return n0.Line;case"block":return n0.Block;case"underline":return n0.Underline;case"line-thin":return n0.LineThin;case"block-outline":return n0.BlockOutline;case"underline-thin":return n0.UnderlineThin}}class fci extends cse{constructor(){super(143)}compute(e,i,n){const s=["monaco-editor"];return i.get(39)&&s.push(i.get(39)),e.extraEditorClassName&&s.push(e.extraEditorClassName),i.get(74)==="default"?s.push("mouse-default"):i.get(74)==="copy"&&s.push("mouse-copy"),i.get(112)&&s.push("showUnused"),i.get(141)&&s.push("showDeprecated"),s.join(" ")}}class hci extends Ml{constructor(){super(37,"emptySelectionClipboard",!0,{description:W("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,i,n){return n&&e.emptySelectionClipboard}}class _ci extends bf{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:W("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[W("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),W("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),W("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:W("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[W("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),W("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),W("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:W("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:W("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:Hc},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:W("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:W("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{cursorMoveOnType:lo(i.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":Ah(i.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":Ah(i.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:lo(i.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:lo(i.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:lo(i.loop,this.defaultValue.loop)}}}const S4=class S4 extends bf{constructor(){super(51,"fontLigatures",S4.OFF,{anyOf:[{type:"boolean",description:W("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:W("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:W("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"||e.length===0?S4.OFF:e==="true"?S4.ON:e:e?S4.ON:S4.OFF}};S4.OFF='"liga" off, "calt" off',S4.ON='"liga" on, "calt" on';let mR=S4;const w4=class w4 extends bf{constructor(){super(54,"fontVariations",w4.OFF,{anyOf:[{type:"boolean",description:W("fontVariations","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:W("fontVariationSettings","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:W("fontVariationsGeneral","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?w4.OFF:e==="true"?w4.TRANSLATE:e:e?w4.TRANSLATE:w4.OFF}compute(e,i,n){return e.fontInfo.fontVariationSettings}};w4.OFF="normal",w4.TRANSLATE="translate";let Lne=w4;class pci extends cse{constructor(){super(50)}compute(e,i,n){return e.fontInfo}}class mci extends dJ{constructor(){super(52,"fontSize",vv.fontSize,{type:"number",minimum:6,maximum:100,default:vv.fontSize,description:W("fontSize","Controls the font size in pixels.")})}validate(e){const i=vw.float(e,this.defaultValue);return i===0?vv.fontSize:vw.clamp(i,6,100)}compute(e,i,n){return e.fontInfo.fontSize}}const nL=class nL extends bf{constructor(){super(53,"fontWeight",vv.fontWeight,{anyOf:[{type:"number",minimum:nL.MINIMUM_VALUE,maximum:nL.MAXIMUM_VALUE,errorMessage:W("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:nL.SUGGESTION_VALUES}],default:vv.fontWeight,description:W("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(Ed.clampedInt(e,vv.fontWeight,nL.MINIMUM_VALUE,nL.MAXIMUM_VALUE))}};nL.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],nL.MINIMUM_VALUE=1,nL.MAXIMUM_VALUE=1e3;let uBe=nL;class gci extends bf{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",multipleTests:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:"",alternativeTestsCommand:""},i={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[W("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),W("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),W("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},n=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:W("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:W("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),...i},"editor.gotoLocation.multipleTypeDefinitions":{description:W("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),...i},"editor.gotoLocation.multipleDeclarations":{description:W("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),...i},"editor.gotoLocation.multipleImplementations":{description:W("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),...i},"editor.gotoLocation.multipleReferences":{description:W("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist."),...i},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:n,description:W("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:n,description:W("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:n,description:W("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:n,description:W("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:n,description:W("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{multiple:Ah(i.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:i.multipleDefinitions??Ah(i.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:i.multipleTypeDefinitions??Ah(i.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:i.multipleDeclarations??Ah(i.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:i.multipleImplementations??Ah(i.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:i.multipleReferences??Ah(i.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),multipleTests:i.multipleTests??Ah(i.multipleTests,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:Sy.string(i.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:Sy.string(i.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:Sy.string(i.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:Sy.string(i.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:Sy.string(i.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand),alternativeTestsCommand:Sy.string(i.alternativeTestsCommand,this.defaultValue.alternativeTestsCommand)}}}class yci extends bf{constructor(){const e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:W("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:W("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:W("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:W("hover.hidingDelay","Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:W("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{enabled:lo(i.enabled,this.defaultValue.enabled),delay:Ed.clampedInt(i.delay,this.defaultValue.delay,0,1e4),sticky:lo(i.sticky,this.defaultValue.sticky),hidingDelay:Ed.clampedInt(i.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:lo(i.above,this.defaultValue.above)}}}class Wq extends cse{constructor(){super(146)}compute(e,i,n){return Wq.computeLayout(i,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){const i=e.height/e.lineHeight,n=Math.floor(e.paddingTop/e.lineHeight);let s=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(s=Math.max(s,i-1));const c=(n+e.viewLineCount+s)/(e.pixelRatio*e.height),d=Math.floor(e.viewLineCount/c);return{typicalViewportLineCount:i,extraLinesBeforeFirstLine:n,extraLinesBeyondLastLine:s,desiredRatio:c,minimapLineCount:d}}static _computeMinimapLayout(e,i){const n=e.outerWidth,s=e.outerHeight,c=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(c*s),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:s};const d=i.stableMinimapLayoutInput,f=d&&e.outerHeight===d.outerHeight&&e.lineHeight===d.lineHeight&&e.typicalHalfwidthCharacterWidth===d.typicalHalfwidthCharacterWidth&&e.pixelRatio===d.pixelRatio&&e.scrollBeyondLastLine===d.scrollBeyondLastLine&&e.paddingTop===d.paddingTop&&e.paddingBottom===d.paddingBottom&&e.minimap.enabled===d.minimap.enabled&&e.minimap.side===d.minimap.side&&e.minimap.size===d.minimap.size&&e.minimap.showSlider===d.minimap.showSlider&&e.minimap.renderCharacters===d.minimap.renderCharacters&&e.minimap.maxColumn===d.minimap.maxColumn&&e.minimap.scale===d.minimap.scale&&e.verticalScrollbarWidth===d.verticalScrollbarWidth&&e.isViewportWrapping===d.isViewportWrapping,m=e.lineHeight,v=e.typicalHalfwidthCharacterWidth,x=e.scrollBeyondLastLine,w=e.minimap.renderCharacters;let I=c>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const P=e.minimap.maxColumn,O=e.minimap.size,z=e.minimap.side,J=e.verticalScrollbarWidth,Y=e.viewLineCount,ae=e.remainingWidth,me=e.isViewportWrapping,ye=w?2:3;let Ce=Math.floor(c*s);const Fe=Ce/c;let rt=!1,ct=!1,Mt=ye*I,Yt=I/c,Bi=1;if(O==="fill"||O==="fit"){const{typicalViewportLineCount:Wr,extraLinesBeforeFirstLine:Dr,extraLinesBeyondLastLine:Rr,desiredRatio:na,minimapLineCount:$d}=Wq.computeContainedMinimapLineCount({viewLineCount:Y,scrollBeyondLastLine:x,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:s,lineHeight:m,pixelRatio:c});if(Y/$d>1)rt=!0,ct=!0,I=1,Mt=1,Yt=I/c;else{let jl=!1,es=I+1;if(O==="fit"){const ld=Math.ceil((Dr+Y+Rr)*Mt);me&&f&&ae<=i.stableFitRemainingWidth?(jl=!0,es=i.stableFitMaxMinimapScale):jl=ld>Ce}if(O==="fill"||jl){rt=!0;const ld=I;Mt=Math.min(m*c,Math.max(1,Math.floor(1/na))),me&&f&&ae<=i.stableFitRemainingWidth&&(es=i.stableFitMaxMinimapScale),I=Math.min(es,Math.max(1,Math.floor(Mt/ye))),I>ld&&(Bi=Math.min(2,I/ld)),Yt=I/c/Bi,Ce=Math.ceil(Math.max(Wr,Dr+Y+Rr)*Mt),me?(i.stableMinimapLayoutInput=e,i.stableFitRemainingWidth=ae,i.stableFitMaxMinimapScale=I):(i.stableMinimapLayoutInput=null,i.stableFitRemainingWidth=0)}}}const $i=Math.floor(P*Yt),$t=Math.min($i,Math.max(0,Math.floor((ae-J-2)*Yt/(v+Yt)))+QN);let Hi=Math.floor(c*$t);const An=Hi/c;Hi=Math.floor(Hi*Bi);const qt=w?1:2,ms=z==="left"?0:n-$t-J;return{renderMinimap:qt,minimapLeft:ms,minimapWidth:$t,minimapHeightIsEditorHeight:rt,minimapIsSampling:ct,minimapScale:I,minimapLineHeight:Mt,minimapCanvasInnerWidth:Hi,minimapCanvasInnerHeight:Ce,minimapCanvasOuterWidth:An,minimapCanvasOuterHeight:Fe}}static computeLayout(e,i){const n=i.outerWidth|0,s=i.outerHeight|0,c=i.lineHeight|0,d=i.lineNumbersDigitCount|0,f=i.typicalHalfwidthCharacterWidth,m=i.maxDigitWidth,v=i.pixelRatio,x=i.viewLineCount,w=e.get(138),I=w==="inherit"?e.get(137):w,P=I==="inherit"?e.get(133):I,O=e.get(136),z=i.isDominatedByLongLines,J=e.get(57),Y=e.get(68).renderType!==0,ae=e.get(69),me=e.get(106),ye=e.get(84),Ce=e.get(73),Fe=e.get(104),rt=Fe.verticalScrollbarSize,ct=Fe.verticalHasArrows,Mt=Fe.arrowSize,Yt=Fe.horizontalScrollbarSize,Bi=e.get(43),$i=e.get(111)!=="never";let $t=e.get(66);Bi&&$i&&($t+=16);let Hi=0;if(Y){const of=Math.max(d,ae);Hi=Math.round(of*m)}let An=0;J&&(An=c*i.glyphMarginDecorationLaneCount);let qt=0,ms=qt+An,Wr=ms+Hi,Dr=Wr+$t;const Rr=n-An-Hi-$t;let na=!1,$d=!1,Ca=-1;I==="inherit"&&z?(na=!0,$d=!0):P==="on"||P==="bounded"?$d=!0:P==="wordWrapColumn"&&(Ca=O);const jl=Wq._computeMinimapLayout({outerWidth:n,outerHeight:s,lineHeight:c,typicalHalfwidthCharacterWidth:f,pixelRatio:v,scrollBeyondLastLine:me,paddingTop:ye.top,paddingBottom:ye.bottom,minimap:Ce,verticalScrollbarWidth:rt,viewLineCount:x,remainingWidth:Rr,isViewportWrapping:$d},i.memory||new Okt);jl.renderMinimap!==0&&jl.minimapLeft===0&&(qt+=jl.minimapWidth,ms+=jl.minimapWidth,Wr+=jl.minimapWidth,Dr+=jl.minimapWidth);const es=Rr-jl.minimapWidth,ld=Math.max(1,Math.floor((es-rt-2)/f)),mp=ct?Mt:0;return $d&&(Ca=Math.max(1,ld),P==="bounded"&&(Ca=Math.min(Ca,O))),{width:n,height:s,glyphMarginLeft:qt,glyphMarginWidth:An,glyphMarginDecorationLaneCount:i.glyphMarginDecorationLaneCount,lineNumbersLeft:ms,lineNumbersWidth:Hi,decorationsLeft:Wr,decorationsWidth:$t,contentLeft:Dr,contentWidth:es,minimap:jl,viewportColumn:ld,isWordWrapMinified:na,isViewportWrapping:$d,wrappingColumn:Ca,verticalScrollbarWidth:rt,horizontalScrollbarHeight:Yt,overviewRuler:{top:mp,width:rt,height:s-2*mp,right:0}}}}class vci extends bf{constructor(){super(140,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[W("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),W("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:W("wrappingStrategy","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return Ah(e,"simple",["simple","advanced"])}compute(e,i,n){return i.get(2)===2?"advanced":n}}var cT;(function(l){l.Off="off",l.OnCode="onCode",l.On="on"})(cT||(cT={}));class bci extends bf{constructor(){const e={enabled:cT.OnCode};super(65,"lightbulb",e,{"editor.lightbulb.enabled":{type:"string",tags:["experimental"],enum:[cT.Off,cT.OnCode,cT.On],default:e.enabled,enumDescriptions:[W("editor.lightbulb.enabled.off","Disable the code action menu."),W("editor.lightbulb.enabled.onCode","Show the code action menu when the cursor is on lines with code."),W("editor.lightbulb.enabled.on","Show the code action menu when the cursor is on lines with code or on empty lines.")],description:W("enabled","Enables the Code Action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:Ah(e.enabled,this.defaultValue.enabled,[cT.Off,cT.OnCode,cT.On])}}}class Cci extends bf{constructor(){const e={enabled:!0,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(116,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:W("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor."),tags:["experimental"]},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:20,description:W("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:W("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:W("editor.stickyScroll.scrollWithEditor","Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{enabled:lo(i.enabled,this.defaultValue.enabled),maxLineCount:Ed.clampedInt(i.maxLineCount,this.defaultValue.maxLineCount,1,20),defaultModel:Ah(i.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:lo(i.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}class Sci extends bf{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(142,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:W("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[W("editor.inlayHints.on","Inlay hints are enabled"),W("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",Hc?"Ctrl+Option":"Ctrl+Alt"),W("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",Hc?"Ctrl+Option":"Ctrl+Alt"),W("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:W("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:W("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:W("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return typeof i.enabled=="boolean"&&(i.enabled=i.enabled?"on":"off"),{enabled:Ah(i.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:Ed.clampedInt(i.fontSize,this.defaultValue.fontSize,0,100),fontFamily:Sy.string(i.fontFamily,this.defaultValue.fontFamily),padding:lo(i.padding,this.defaultValue.padding)}}}class wci extends bf{constructor(){super(66,"lineDecorationsWidth",10)}validate(e){return typeof e=="string"&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):Ed.clampedInt(e,this.defaultValue,0,1e3)}compute(e,i,n){return n<0?Ed.clampedInt(-n*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):n}}class xci extends vw{constructor(){super(67,"lineHeight",vv.lineHeight,e=>vw.clamp(e,0,150),{markdownDescription:W("lineHeight",`Controls the line height.
+ - Use 0 to automatically compute the line height from the font size.
+ - Values between 0 and 8 will be used as a multiplier with the font size.
+ - Values greater than or equal to 8 will be used as effective values.`)})}compute(e,i,n){return e.fontInfo.lineHeight}}class kci extends bf{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1,showRegionSectionHeaders:!0,showMarkSectionHeaders:!0,sectionHeaderFontSize:9,sectionHeaderLetterSpacing:1};super(73,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:W("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:W("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[W("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),W("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),W("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:W("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:W("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:W("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:W("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:W("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:W("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")},"editor.minimap.showRegionSectionHeaders":{type:"boolean",default:e.showRegionSectionHeaders,description:W("minimap.showRegionSectionHeaders","Controls whether named regions are shown as section headers in the minimap.")},"editor.minimap.showMarkSectionHeaders":{type:"boolean",default:e.showMarkSectionHeaders,description:W("minimap.showMarkSectionHeaders","Controls whether MARK: comments are shown as section headers in the minimap.")},"editor.minimap.sectionHeaderFontSize":{type:"number",default:e.sectionHeaderFontSize,description:W("minimap.sectionHeaderFontSize","Controls the font size of section headers in the minimap.")},"editor.minimap.sectionHeaderLetterSpacing":{type:"number",default:e.sectionHeaderLetterSpacing,description:W("minimap.sectionHeaderLetterSpacing","Controls the amount of space (in pixels) between characters of section header. This helps the readability of the header in small font sizes.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{enabled:lo(i.enabled,this.defaultValue.enabled),autohide:lo(i.autohide,this.defaultValue.autohide),size:Ah(i.size,this.defaultValue.size,["proportional","fill","fit"]),side:Ah(i.side,this.defaultValue.side,["right","left"]),showSlider:Ah(i.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:lo(i.renderCharacters,this.defaultValue.renderCharacters),scale:Ed.clampedInt(i.scale,1,1,3),maxColumn:Ed.clampedInt(i.maxColumn,this.defaultValue.maxColumn,1,1e4),showRegionSectionHeaders:lo(i.showRegionSectionHeaders,this.defaultValue.showRegionSectionHeaders),showMarkSectionHeaders:lo(i.showMarkSectionHeaders,this.defaultValue.showMarkSectionHeaders),sectionHeaderFontSize:vw.clamp(i.sectionHeaderFontSize??this.defaultValue.sectionHeaderFontSize,4,32),sectionHeaderLetterSpacing:vw.clamp(i.sectionHeaderLetterSpacing??this.defaultValue.sectionHeaderLetterSpacing,0,5)}}}function Tci(l){return l==="ctrlCmd"?Hc?"metaKey":"ctrlKey":"altKey"}class Dci extends bf{constructor(){super(84,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:W("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:W("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{top:Ed.clampedInt(i.top,0,0,1e3),bottom:Ed.clampedInt(i.bottom,0,0,1e3)}}}class Eci extends bf{constructor(){const e={enabled:!0,cycle:!0};super(86,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:W("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:W("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{enabled:lo(i.enabled,this.defaultValue.enabled),cycle:lo(i.cycle,this.defaultValue.cycle)}}}class Ici extends cse{constructor(){super(144)}compute(e,i,n){return e.pixelRatio}}class Nci extends bf{constructor(){super(88,"placeholder",void 0)}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e:this.defaultValue}}class Lci extends bf{constructor(){const e={other:"on",comments:"off",strings:"off"},i=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[W("on","Quick suggestions show inside the suggest widget"),W("inline","Quick suggestions show as ghost text"),W("off","Quick suggestions are disabled")]}];super(90,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:i,default:e.strings,description:W("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:i,default:e.comments,description:W("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:i,default:e.other,description:W("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:W("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the {0}-setting which controls if suggestions are triggered by special characters.","`#editor.suggestOnTriggerCharacters#`")}),this.defaultValue=e}validate(e){if(typeof e=="boolean"){const v=e?"on":"off";return{comments:v,strings:v,other:v}}if(!e||typeof e!="object")return this.defaultValue;const{other:i,comments:n,strings:s}=e,c=["on","inline","off"];let d,f,m;return typeof i=="boolean"?d=i?"on":"off":d=Ah(i,this.defaultValue.other,c),typeof n=="boolean"?f=n?"on":"off":f=Ah(n,this.defaultValue.comments,c),typeof s=="boolean"?m=s?"on":"off":m=Ah(s,this.defaultValue.strings,c),{other:d,comments:f,strings:m}}}class Pci extends bf{constructor(){super(68,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[W("lineNumbers.off","Line numbers are not rendered."),W("lineNumbers.on","Line numbers are rendered as absolute number."),W("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),W("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:W("lineNumbers","Controls the display of line numbers.")})}validate(e){let i=this.defaultValue.renderType,n=this.defaultValue.renderFn;return typeof e<"u"&&(typeof e=="function"?(i=4,n=e):e==="interval"?i=3:e==="relative"?i=2:e==="on"?i=1:i=0),{renderType:i,renderFn:n}}}function G1e(l){const e=l.get(99);return e==="editable"?l.get(92):e!=="on"}class Aci extends bf{constructor(){const e=[],i={type:"number",description:W("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(103,"rulers",e,{type:"array",items:{anyOf:[i,{type:["object"],properties:{column:i,color:{type:"string",description:W("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:W("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){const i=[];for(const n of e)if(typeof n=="number")i.push({column:Ed.clampedInt(n,0,0,1e4),color:null});else if(n&&typeof n=="object"){const s=n;i.push({column:Ed.clampedInt(s.column,0,0,1e4),color:s.color})}return i.sort((n,s)=>n.column-s.column),i}return this.defaultValue}}class Oci extends bf{constructor(){super(93,"readOnlyMessage",void 0)}validate(e){return!e||typeof e!="object"?this.defaultValue:e}}function Gyt(l,e){if(typeof l!="string")return e;switch(l){case"hidden":return 2;case"visible":return 3;default:return 1}}let Mci=class extends bf{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1,ignoreHorizontalScrollbarInContentHeight:!1};super(104,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[W("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),W("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),W("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:W("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[W("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),W("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),W("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:W("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:W("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:W("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:W("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")},"editor.scrollbar.ignoreHorizontalScrollbarInContentHeight":{type:"boolean",default:e.ignoreHorizontalScrollbarInContentHeight,description:W("scrollbar.ignoreHorizontalScrollbarInContentHeight","When set, the horizontal scrollbar will not increase the size of the editor's content.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e,n=Ed.clampedInt(i.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),s=Ed.clampedInt(i.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:Ed.clampedInt(i.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:Gyt(i.vertical,this.defaultValue.vertical),horizontal:Gyt(i.horizontal,this.defaultValue.horizontal),useShadows:lo(i.useShadows,this.defaultValue.useShadows),verticalHasArrows:lo(i.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:lo(i.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:lo(i.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:lo(i.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:n,horizontalSliderSize:Ed.clampedInt(i.horizontalSliderSize,n,0,1e3),verticalScrollbarSize:s,verticalSliderSize:Ed.clampedInt(i.verticalSliderSize,s,0,1e3),scrollByPage:lo(i.scrollByPage,this.defaultValue.scrollByPage),ignoreHorizontalScrollbarInContentHeight:lo(i.ignoreHorizontalScrollbarInContentHeight,this.defaultValue.ignoreHorizontalScrollbarInContentHeight)}}};const cw="inUntrustedWorkspace",wb={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};class Rci extends bf{constructor(){const e={nonBasicASCII:cw,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:cw,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(126,"unicodeHighlight",e,{[wb.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,cw],default:e.nonBasicASCII,description:W("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[wb.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:W("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[wb.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:W("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[wb.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,cw],default:e.includeComments,description:W("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[wb.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,cw],default:e.includeStrings,description:W("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[wb.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:W("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[wb.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:W("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,i){let n=!1;i.allowedCharacters&&e&&(qC(e.allowedCharacters,i.allowedCharacters)||(e={...e,allowedCharacters:i.allowedCharacters},n=!0)),i.allowedLocales&&e&&(qC(e.allowedLocales,i.allowedLocales)||(e={...e,allowedLocales:i.allowedLocales},n=!0));const s=super.applyUpdate(e,i);return n?new Sie(s.newValue,!0):s}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{nonBasicASCII:Vq(i.nonBasicASCII,cw,[!0,!1,cw]),invisibleCharacters:lo(i.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:lo(i.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:Vq(i.includeComments,cw,[!0,!1,cw]),includeStrings:Vq(i.includeStrings,cw,[!0,!1,cw]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,i){if(typeof e!="object"||!e)return i;const n={};for(const[s,c]of Object.entries(e))c===!0&&(n[s]=!0);return n}}class Fci extends bf{constructor(){const e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1,fontFamily:"default"};super(62,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:W("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[W("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),W("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion."),W("inlineSuggest.showToolbar.never","Never show the inline suggestion toolbar.")],description:W("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:W("inlineSuggest.suppressSuggestions","Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")},"editor.inlineSuggest.fontFamily":{type:"string",default:e.fontFamily,description:W("inlineSuggest.fontFamily","Controls the font family of the inline suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{enabled:lo(i.enabled,this.defaultValue.enabled),mode:Ah(i.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:Ah(i.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),suppressSuggestions:lo(i.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:lo(i.keepOnBlur,this.defaultValue.keepOnBlur),fontFamily:Sy.string(i.fontFamily,this.defaultValue.fontFamily)}}}class Bci extends bf{constructor(){const e={enabled:!1,showToolbar:"onHover",fontFamily:"default",keepOnBlur:!1};super(63,"experimentalInlineEdit",e,{"editor.experimentalInlineEdit.enabled":{type:"boolean",default:e.enabled,description:W("inlineEdit.enabled","Controls whether to show inline edits in the editor.")},"editor.experimentalInlineEdit.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[W("inlineEdit.showToolbar.always","Show the inline edit toolbar whenever an inline suggestion is shown."),W("inlineEdit.showToolbar.onHover","Show the inline edit toolbar when hovering over an inline suggestion."),W("inlineEdit.showToolbar.never","Never show the inline edit toolbar.")],description:W("inlineEdit.showToolbar","Controls when to show the inline edit toolbar.")},"editor.experimentalInlineEdit.fontFamily":{type:"string",default:e.fontFamily,description:W("inlineEdit.fontFamily","Controls the font family of the inline edit.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{enabled:lo(i.enabled,this.defaultValue.enabled),showToolbar:Ah(i.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),fontFamily:Sy.string(i.fontFamily,this.defaultValue.fontFamily),keepOnBlur:lo(i.keepOnBlur,this.defaultValue.keepOnBlur)}}}class Wci extends bf{constructor(){const e={enabled:p1.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:p1.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:W("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:W("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{enabled:lo(i.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:lo(i.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class Vci extends bf{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[W("editor.guides.bracketPairs.true","Enables bracket pair guides."),W("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),W("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:W("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[W("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),W("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),W("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:W("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:W("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:W("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[W("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),W("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),W("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:W("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{bracketPairs:Vq(i.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:Vq(i.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:lo(i.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:lo(i.indentation,this.defaultValue.indentation),highlightActiveIndentation:Vq(i.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function Vq(l,e,i){const n=i.indexOf(l);return n===-1?e:i[n]}class Hci extends bf{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(119,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[W("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),W("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:W("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:W("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:W("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:W("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[W("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),W("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),W("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),W("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:W("suggest.selectionMode","Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions ({0} and {1}) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.","`#editor.quickSuggestions#`","`#editor.suggestOnTriggerCharacters#`")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:W("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:W("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:W("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:W("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:W("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:W("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:W("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.matchOnWordStartOnly","When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:W("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{insertMode:Ah(i.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:lo(i.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:lo(i.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:lo(i.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:lo(i.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:Ah(i.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:lo(i.showIcons,this.defaultValue.showIcons),showStatusBar:lo(i.showStatusBar,this.defaultValue.showStatusBar),preview:lo(i.preview,this.defaultValue.preview),previewMode:Ah(i.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:lo(i.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:lo(i.showMethods,this.defaultValue.showMethods),showFunctions:lo(i.showFunctions,this.defaultValue.showFunctions),showConstructors:lo(i.showConstructors,this.defaultValue.showConstructors),showDeprecated:lo(i.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:lo(i.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:lo(i.showFields,this.defaultValue.showFields),showVariables:lo(i.showVariables,this.defaultValue.showVariables),showClasses:lo(i.showClasses,this.defaultValue.showClasses),showStructs:lo(i.showStructs,this.defaultValue.showStructs),showInterfaces:lo(i.showInterfaces,this.defaultValue.showInterfaces),showModules:lo(i.showModules,this.defaultValue.showModules),showProperties:lo(i.showProperties,this.defaultValue.showProperties),showEvents:lo(i.showEvents,this.defaultValue.showEvents),showOperators:lo(i.showOperators,this.defaultValue.showOperators),showUnits:lo(i.showUnits,this.defaultValue.showUnits),showValues:lo(i.showValues,this.defaultValue.showValues),showConstants:lo(i.showConstants,this.defaultValue.showConstants),showEnums:lo(i.showEnums,this.defaultValue.showEnums),showEnumMembers:lo(i.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:lo(i.showKeywords,this.defaultValue.showKeywords),showWords:lo(i.showWords,this.defaultValue.showWords),showColors:lo(i.showColors,this.defaultValue.showColors),showFiles:lo(i.showFiles,this.defaultValue.showFiles),showReferences:lo(i.showReferences,this.defaultValue.showReferences),showFolders:lo(i.showFolders,this.defaultValue.showFolders),showTypeParameters:lo(i.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:lo(i.showSnippets,this.defaultValue.showSnippets),showUsers:lo(i.showUsers,this.defaultValue.showUsers),showIssues:lo(i.showIssues,this.defaultValue.showIssues)}}}class jci extends bf{constructor(){super(114,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:W("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:W("selectSubwords","Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:lo(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:lo(e.selectSubwords,this.defaultValue.selectSubwords)}}}class zci extends bf{constructor(){const e=[];super(131,"wordSegmenterLocales",e,{anyOf:[{description:W("wordSegmenterLocales","Locales to be used for word segmentation when doing word related navigations or operations. Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.)."),type:"string"},{description:W("wordSegmenterLocales","Locales to be used for word segmentation when doing word related navigations or operations. Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.)."),type:"array",items:{type:"string"}}]})}validate(e){if(typeof e=="string"&&(e=[e]),Array.isArray(e)){const i=[];for(const n of e)if(typeof n=="string")try{Intl.Segmenter.supportedLocalesOf(n).length>0&&i.push(n)}catch{}return i}return this.defaultValue}}class Uci extends bf{constructor(){super(139,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[W("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),W("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),W("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),W("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:W("wrappingIndent","Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,i,n){return i.get(2)===2?0:n}}class qci extends cse{constructor(){super(147)}compute(e,i,n){const s=i.get(146);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:s.isWordWrapMinified,isViewportWrapping:s.isViewportWrapping,wrappingColumn:s.wrappingColumn}}}class $ci extends bf{constructor(){const e={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:W("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down the `Shift` key (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:W("dropIntoEditor.showDropSelector","Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[W("dropIntoEditor.showDropSelector.afterDrop","Show the drop selector widget after a file is dropped into the editor."),W("dropIntoEditor.showDropSelector.never","Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{enabled:lo(i.enabled,this.defaultValue.enabled),showDropSelector:Ah(i.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}class Jci extends bf{constructor(){const e={enabled:!0,showPasteSelector:"afterPaste"};super(85,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:W("pasteAs.enabled","Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:W("pasteAs.showPasteSelector","Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[W("pasteAs.showPasteSelector.afterPaste","Show the paste selector widget after content is pasted into the editor."),W("pasteAs.showPasteSelector.never","Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const i=e;return{enabled:lo(i.enabled,this.defaultValue.enabled),showPasteSelector:Ah(i.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}const Gci="Consolas, 'Courier New', monospace",Kci="Menlo, Monaco, 'Courier New', monospace",Xci="'Droid Sans Mono', 'monospace', monospace",vv={fontFamily:Hc?Kci:Cv?Xci:Gci,fontWeight:"normal",fontSize:Hc?12:14,lineHeight:0,letterSpacing:0},YU=[];function kr(l){return YU[l.id]=l,l}const KE={acceptSuggestionOnCommitCharacter:kr(new Ml(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:W("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:kr(new Ph(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",W("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:W("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:kr(new cci),accessibilityPageSize:kr(new Ed(3,"accessibilityPageSize",10,1,1073741824,{description:W("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),tags:["accessibility"]})),ariaLabel:kr(new Sy(4,"ariaLabel",W("editorViewAccessibleLabel","Editor content"))),ariaRequired:kr(new Ml(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:kr(new Ml(8,"screenReaderAnnounceInlineSuggestion",!0,{description:W("screenReaderAnnounceInlineSuggestion","Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:kr(new Ph(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",W("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),W("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:W("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingComments:kr(new Ph(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",W("editor.autoClosingComments.languageDefined","Use language configurations to determine when to autoclose comments."),W("editor.autoClosingComments.beforeWhitespace","Autoclose comments only when the cursor is to the left of whitespace."),""],description:W("autoClosingComments","Controls whether the editor should automatically close comments after the user adds an opening comment.")})),autoClosingDelete:kr(new Ph(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",W("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:W("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:kr(new Ph(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",W("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:W("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:kr(new Ph(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",W("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),W("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:W("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:kr(new zge(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],aci,{enumDescriptions:[W("editor.autoIndent.none","The editor will not insert indentation automatically."),W("editor.autoIndent.keep","The editor will keep the current line's indentation."),W("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),W("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),W("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:W("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:kr(new Ml(13,"automaticLayout",!1)),autoSurround:kr(new Ph(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[W("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),W("editor.autoSurround.quotes","Surround with quotes but not brackets."),W("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:W("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:kr(new Wci),bracketPairGuides:kr(new Vci),stickyTabStops:kr(new Ml(117,"stickyTabStops",!1,{description:W("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:kr(new Ml(17,"codeLens",!0,{description:W("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:kr(new Sy(18,"codeLensFontFamily","",{description:W("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:kr(new Ed(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:W("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:kr(new Ml(20,"colorDecorators",!0,{description:W("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:kr(new Ph(149,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[W("editor.colorDecoratorActivatedOn.clickAndHover","Make the color picker appear both on click and hover of the color decorator"),W("editor.colorDecoratorActivatedOn.hover","Make the color picker appear on hover of the color decorator"),W("editor.colorDecoratorActivatedOn.click","Make the color picker appear on click of the color decorator")],description:W("colorDecoratorActivatedOn","Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:kr(new Ed(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:W("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:kr(new Ml(22,"columnSelection",!1,{description:W("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:kr(new lci),contextmenu:kr(new Ml(24,"contextmenu",!0)),copyWithSyntaxHighlighting:kr(new Ml(25,"copyWithSyntaxHighlighting",!0,{description:W("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:kr(new zge(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],uci,{description:W("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:kr(new Ph(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[W("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),W("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),W("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:W("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:kr(new zge(28,"cursorStyle",n0.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],dci,{description:W("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:kr(new Ed(29,"cursorSurroundingLines",0,0,1073741824,{description:W("cursorSurroundingLines","Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:kr(new Ph(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[W("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),W("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],markdownDescription:W("cursorSurroundingLinesStyle","Controls when `#editor.cursorSurroundingLines#` should be enforced.")})),cursorWidth:kr(new Ed(31,"cursorWidth",0,0,1073741824,{markdownDescription:W("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:kr(new Ml(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:kr(new Ml(33,"disableMonospaceOptimizations",!1)),domReadOnly:kr(new Ml(34,"domReadOnly",!1)),dragAndDrop:kr(new Ml(35,"dragAndDrop",!0,{description:W("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:kr(new hci),dropIntoEditor:kr(new $ci),stickyScroll:kr(new Cci),experimentalWhitespaceRendering:kr(new Ph(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[W("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),W("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),W("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:W("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:kr(new Sy(39,"extraEditorClassName","")),fastScrollSensitivity:kr(new vw(40,"fastScrollSensitivity",5,l=>l<=0?5:l,{markdownDescription:W("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:kr(new _ci),fixedOverflowWidgets:kr(new Ml(42,"fixedOverflowWidgets",!1)),folding:kr(new Ml(43,"folding",!0,{description:W("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:kr(new Ph(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[W("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),W("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:W("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:kr(new Ml(45,"foldingHighlight",!0,{description:W("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:kr(new Ml(46,"foldingImportsByDefault",!1,{description:W("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:kr(new Ed(47,"foldingMaximumRegions",5e3,10,65e3,{description:W("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:kr(new Ml(48,"unfoldOnClickAfterEndOfLine",!1,{description:W("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:kr(new Sy(49,"fontFamily",vv.fontFamily,{description:W("fontFamily","Controls the font family.")})),fontInfo:kr(new pci),fontLigatures2:kr(new mR),fontSize:kr(new mci),fontWeight:kr(new uBe),fontVariations:kr(new Lne),formatOnPaste:kr(new Ml(55,"formatOnPaste",!1,{description:W("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:kr(new Ml(56,"formatOnType",!1,{description:W("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:kr(new Ml(57,"glyphMargin",!0,{description:W("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:kr(new gci),hideCursorInOverviewRuler:kr(new Ml(59,"hideCursorInOverviewRuler",!1,{description:W("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:kr(new yci),inDiffEditor:kr(new Ml(61,"inDiffEditor",!1)),letterSpacing:kr(new vw(64,"letterSpacing",vv.letterSpacing,l=>vw.clamp(l,-5,20),{description:W("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:kr(new bci),lineDecorationsWidth:kr(new wci),lineHeight:kr(new xci),lineNumbers:kr(new Pci),lineNumbersMinChars:kr(new Ed(69,"lineNumbersMinChars",5,1,300)),linkedEditing:kr(new Ml(70,"linkedEditing",!1,{description:W("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:kr(new Ml(71,"links",!0,{description:W("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:kr(new Ph(72,"matchBrackets","always",["always","near","never"],{description:W("matchBrackets","Highlight matching brackets.")})),minimap:kr(new kci),mouseStyle:kr(new Ph(74,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:kr(new vw(75,"mouseWheelScrollSensitivity",1,l=>l===0?1:l,{markdownDescription:W("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:kr(new Ml(76,"mouseWheelZoom",!1,{markdownDescription:Hc?W("mouseWheelZoom.mac","Zoom the font of the editor when using mouse wheel and holding `Cmd`."):W("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:kr(new Ml(77,"multiCursorMergeOverlapping",!0,{description:W("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:kr(new zge(78,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],Tci,{markdownEnumDescriptions:[W("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),W("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:W({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:kr(new Ph(79,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[W("multiCursorPaste.spread","Each cursor pastes a single line of the text."),W("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:W("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:kr(new Ed(80,"multiCursorLimit",1e4,1,1e5,{markdownDescription:W("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:kr(new Ph(81,"occurrencesHighlight","singleFile",["off","singleFile","multiFile"],{markdownEnumDescriptions:[W("occurrencesHighlight.off","Does not highlight occurrences."),W("occurrencesHighlight.singleFile","Highlights occurrences only in the current file."),W("occurrencesHighlight.multiFile","Experimental: Highlights occurrences across all valid open files.")],markdownDescription:W("occurrencesHighlight","Controls whether occurrences should be highlighted across open files.")})),overviewRulerBorder:kr(new Ml(82,"overviewRulerBorder",!0,{description:W("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:kr(new Ed(83,"overviewRulerLanes",3,0,3)),padding:kr(new Dci),pasteAs:kr(new Jci),parameterHints:kr(new Eci),peekWidgetDefaultFocus:kr(new Ph(87,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[W("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),W("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:W("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),placeholder:kr(new Nci),definitionLinkOpensInPeek:kr(new Ml(89,"definitionLinkOpensInPeek",!1,{description:W("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:kr(new Lci),quickSuggestionsDelay:kr(new Ed(91,"quickSuggestionsDelay",10,0,1073741824,{description:W("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:kr(new Ml(92,"readOnly",!1)),readOnlyMessage:kr(new Oci),renameOnType:kr(new Ml(94,"renameOnType",!1,{description:W("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:W("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:kr(new Ml(95,"renderControlCharacters",!0,{description:W("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:kr(new Ph(96,"renderFinalNewline",Cv?"dimmed":"on",["off","on","dimmed"],{description:W("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:kr(new Ph(97,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",W("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:W("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:kr(new Ml(98,"renderLineHighlightOnlyWhenFocus",!1,{description:W("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:kr(new Ph(99,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:kr(new Ph(100,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",W("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),W("renderWhitespace.selection","Render whitespace characters only on selected text."),W("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:W("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:kr(new Ed(101,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:kr(new Ml(102,"roundedSelection",!0,{description:W("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:kr(new Aci),scrollbar:kr(new Mci),scrollBeyondLastColumn:kr(new Ed(105,"scrollBeyondLastColumn",4,0,1073741824,{description:W("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:kr(new Ml(106,"scrollBeyondLastLine",!0,{description:W("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:kr(new Ml(107,"scrollPredominantAxis",!0,{description:W("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:kr(new Ml(108,"selectionClipboard",!0,{description:W("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:Cv})),selectionHighlight:kr(new Ml(109,"selectionHighlight",!0,{description:W("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:kr(new Ml(110,"selectOnLineNumbers",!0)),showFoldingControls:kr(new Ph(111,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[W("showFoldingControls.always","Always show the folding controls."),W("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),W("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:W("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:kr(new Ml(112,"showUnused",!0,{description:W("showUnused","Controls fading out of unused code.")})),showDeprecated:kr(new Ml(141,"showDeprecated",!0,{description:W("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:kr(new Sci),snippetSuggestions:kr(new Ph(113,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[W("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),W("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),W("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),W("snippetSuggestions.none","Do not show snippet suggestions.")],description:W("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:kr(new jci),smoothScrolling:kr(new Ml(115,"smoothScrolling",!1,{description:W("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:kr(new Ed(118,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:kr(new Hci),inlineSuggest:kr(new Fci),inlineEdit:kr(new Bci),inlineCompletionsAccessibilityVerbose:kr(new Ml(150,"inlineCompletionsAccessibilityVerbose",!1,{description:W("inlineCompletionsAccessibilityVerbose","Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:kr(new Ed(120,"suggestFontSize",0,0,1e3,{markdownDescription:W("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:kr(new Ed(121,"suggestLineHeight",0,0,1e3,{markdownDescription:W("suggestLineHeight","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:kr(new Ml(122,"suggestOnTriggerCharacters",!0,{description:W("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:kr(new Ph(123,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[W("suggestSelection.first","Always select the first suggestion."),W("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),W("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:W("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:kr(new Ph(124,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[W("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),W("tabCompletion.off","Disable tab completions."),W("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:W("tabCompletion","Enables tab completions.")})),tabIndex:kr(new Ed(125,"tabIndex",0,-1,1073741824)),unicodeHighlight:kr(new Rci),unusualLineTerminators:kr(new Ph(127,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[W("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),W("unusualLineTerminators.off","Unusual line terminators are ignored."),W("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:W("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:kr(new Ml(128,"useShadowDOM",!0)),useTabStops:kr(new Ml(129,"useTabStops",!0,{description:W("useTabStops","Spaces and tabs are inserted and deleted in alignment with tab stops.")})),wordBreak:kr(new Ph(130,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[W("wordBreak.normal","Use the default line break rule."),W("wordBreak.keepAll","Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:W("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSegmenterLocales:kr(new zci),wordSeparators:kr(new Sy(132,"wordSeparators",J1e,{description:W("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:kr(new Ph(133,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[W("wordWrap.off","Lines will never wrap."),W("wordWrap.on","Lines will wrap at the viewport width."),W({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),W({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:W({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:kr(new Sy(134,"wordWrapBreakAfterCharacters"," })]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:kr(new Sy(135,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:kr(new Ed(136,"wordWrapColumn",80,1,1073741824,{markdownDescription:W({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:kr(new Ph(137,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:kr(new Ph(138,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:kr(new fci),defaultColorDecorators:kr(new Ml(148,"defaultColorDecorators",!1,{markdownDescription:W("defaultColorDecorators","Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:kr(new Ici),tabFocusMode:kr(new Ml(145,"tabFocusMode",!1,{markdownDescription:W("tabFocusMode","Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:kr(new Wq),wrappingInfo:kr(new qci),wrappingIndent:kr(new Uci),wrappingStrategy:kr(new vci)};class Qci{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?w$.isErrorNoTelemetry(e)?new w$(e.message+`
+
+`+e.stack):new Error(e.message+`
+
+`+e.stack):e},0)}}emit(e){this.listeners.forEach(i=>{i(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const Mkt=new Qci;function Pa(l){Tk(l)||Mkt.onUnexpectedError(l)}function t_(l){Tk(l)||Mkt.onUnexpectedExternalError(l)}function Kyt(l){if(l instanceof Error){const{name:e,message:i}=l,n=l.stacktrace||l.stack;return{$isError:!0,name:e,message:i,stack:n,noTelemetry:w$.isErrorNoTelemetry(l)}}return l}const K1e="Canceled";function Tk(l){return l instanceof vT?!0:l instanceof Error&&l.name===K1e&&l.message===K1e}class vT extends Error{constructor(){super(K1e),this.name=this.message}}function Zci(){const l=new Error(K1e);return l.name=l.message,l}function gk(l){return l?new Error(`Illegal argument: ${l}`):new Error("Illegal argument")}function $qe(l){return l?new Error(`Illegal state: ${l}`):new Error("Illegal state")}class Yci extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class w$ extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof w$)return e;const i=new w$;return i.message=e.message,i.stack=e.stack,i}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class tu extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,tu.prototype)}}function gR(l,e){const i=this;let n=!1,s;return function(){return n||(n=!0,s=l.apply(i,arguments)),s}}function ESe(l){return typeof l=="object"&&l!==null&&typeof l.dispose=="function"&&l.dispose.length===0}function vd(l){if(dl.is(l)){const e=[];for(const i of l)if(i)try{i.dispose()}catch(n){e.push(n)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(l)?[]:l}else if(l)return l.dispose(),l}function gT(...l){return fo(()=>vd(l))}function fo(l){return{dispose:gR(()=>{l()})}}const Ube=class Ube{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{vd(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Ube.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&this._toDispose.delete(e)}};Ube.DISABLE_DISPOSED_WARNING=!1;let wn=Ube;const wKe=class wKe{constructor(){this._store=new wn,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};wKe.None=Object.freeze({dispose(){}});let xi=wKe;class Fm{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var i;this._isDisposed||e===this._value||((i=this._value)==null||i.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,(e=this._value)==null||e.dispose(),this._value=void 0}}class eli{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}class tli{constructor(e){this.object=e}dispose(){}}class Jqe{constructor(){this._store=new Map,this._isDisposed=!1}dispose(){this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{vd(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,i,n=!1){var s;this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),n||(s=this._store.get(e))==null||s.dispose(),this._store.set(e,i)}deleteAndDispose(e){var i;(i=this._store.get(e))==null||i.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}const ili=globalThis.performance&&typeof globalThis.performance.now=="function";class bg{static create(e){return new bg(e)}constructor(e){this._now=ili&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}var Tr;(function(l){l.None=()=>xi.None;function e($t,Hi){return I($t,()=>{},0,void 0,!0,void 0,Hi)}l.defer=e;function i($t){return(Hi,An=null,qt)=>{let ms=!1,Wr;return Wr=$t(Dr=>{if(!ms)return Wr?Wr.dispose():ms=!0,Hi.call(An,Dr)},null,qt),ms&&Wr.dispose(),Wr}}l.once=i;function n($t,Hi){return l.once(l.filter($t,Hi))}l.onceIf=n;function s($t,Hi,An){return x((qt,ms=null,Wr)=>$t(Dr=>qt.call(ms,Hi(Dr)),null,Wr),An)}l.map=s;function c($t,Hi,An){return x((qt,ms=null,Wr)=>$t(Dr=>{Hi(Dr),qt.call(ms,Dr)},null,Wr),An)}l.forEach=c;function d($t,Hi,An){return x((qt,ms=null,Wr)=>$t(Dr=>Hi(Dr)&&qt.call(ms,Dr),null,Wr),An)}l.filter=d;function f($t){return $t}l.signal=f;function m(...$t){return(Hi,An=null,qt)=>{const ms=gT(...$t.map(Wr=>Wr(Dr=>Hi.call(An,Dr))));return w(ms,qt)}}l.any=m;function v($t,Hi,An,qt){let ms=An;return s($t,Wr=>(ms=Hi(ms,Wr),ms),qt)}l.reduce=v;function x($t,Hi){let An;const qt={onWillAddFirstListener(){An=$t(ms.fire,ms)},onDidRemoveLastListener(){An==null||An.dispose()}},ms=new gi(qt);return Hi==null||Hi.add(ms),ms.event}function w($t,Hi){return Hi instanceof Array?Hi.push($t):Hi&&Hi.add($t),$t}function I($t,Hi,An=100,qt=!1,ms=!1,Wr,Dr){let Rr,na,$d,Ca=0,jl;const es={leakWarningThreshold:Wr,onWillAddFirstListener(){Rr=$t(mp=>{Ca++,na=Hi(na,mp),qt&&!$d&&(ld.fire(na),na=void 0),jl=()=>{const of=na;na=void 0,$d=void 0,(!qt||Ca>1)&&ld.fire(of),Ca=0},typeof An=="number"?(clearTimeout($d),$d=setTimeout(jl,An)):$d===void 0&&($d=0,queueMicrotask(jl))})},onWillRemoveListener(){ms&&Ca>0&&(jl==null||jl())},onDidRemoveLastListener(){jl=void 0,Rr.dispose()}},ld=new gi(es);return Dr==null||Dr.add(ld),ld.event}l.debounce=I;function P($t,Hi=0,An){return l.debounce($t,(qt,ms)=>qt?(qt.push(ms),qt):[ms],Hi,void 0,!0,void 0,An)}l.accumulate=P;function O($t,Hi=(qt,ms)=>qt===ms,An){let qt=!0,ms;return d($t,Wr=>{const Dr=qt||!Hi(Wr,ms);return qt=!1,ms=Wr,Dr},An)}l.latch=O;function z($t,Hi,An){return[l.filter($t,Hi,An),l.filter($t,qt=>!Hi(qt),An)]}l.split=z;function J($t,Hi=!1,An=[],qt){let ms=An.slice(),Wr=$t(na=>{ms?ms.push(na):Rr.fire(na)});qt&&qt.add(Wr);const Dr=()=>{ms==null||ms.forEach(na=>Rr.fire(na)),ms=null},Rr=new gi({onWillAddFirstListener(){Wr||(Wr=$t(na=>Rr.fire(na)),qt&&qt.add(Wr))},onDidAddFirstListener(){ms&&(Hi?setTimeout(Dr):Dr())},onDidRemoveLastListener(){Wr&&Wr.dispose(),Wr=null}});return qt&&qt.add(Rr),Rr.event}l.buffer=J;function Y($t,Hi){return(qt,ms,Wr)=>{const Dr=Hi(new me);return $t(function(Rr){const na=Dr.evaluate(Rr);na!==ae&&qt.call(ms,na)},void 0,Wr)}}l.chain=Y;const ae=Symbol("HaltChainable");class me{constructor(){this.steps=[]}map(Hi){return this.steps.push(Hi),this}forEach(Hi){return this.steps.push(An=>(Hi(An),An)),this}filter(Hi){return this.steps.push(An=>Hi(An)?An:ae),this}reduce(Hi,An){let qt=An;return this.steps.push(ms=>(qt=Hi(qt,ms),qt)),this}latch(Hi=(An,qt)=>An===qt){let An=!0,qt;return this.steps.push(ms=>{const Wr=An||!Hi(ms,qt);return An=!1,qt=ms,Wr?ms:ae}),this}evaluate(Hi){for(const An of this.steps)if(Hi=An(Hi),Hi===ae)break;return Hi}}function ye($t,Hi,An=qt=>qt){const qt=(...Rr)=>Dr.fire(An(...Rr)),ms=()=>$t.on(Hi,qt),Wr=()=>$t.removeListener(Hi,qt),Dr=new gi({onWillAddFirstListener:ms,onDidRemoveLastListener:Wr});return Dr.event}l.fromNodeEventEmitter=ye;function Ce($t,Hi,An=qt=>qt){const qt=(...Rr)=>Dr.fire(An(...Rr)),ms=()=>$t.addEventListener(Hi,qt),Wr=()=>$t.removeEventListener(Hi,qt),Dr=new gi({onWillAddFirstListener:ms,onDidRemoveLastListener:Wr});return Dr.event}l.fromDOMEventEmitter=Ce;function Fe($t){return new Promise(Hi=>i($t)(Hi))}l.toPromise=Fe;function rt($t){const Hi=new gi;return $t.then(An=>{Hi.fire(An)},()=>{Hi.fire(void 0)}).finally(()=>{Hi.dispose()}),Hi.event}l.fromPromise=rt;function ct($t,Hi){return $t(An=>Hi.fire(An))}l.forward=ct;function Mt($t,Hi,An){return Hi(An),$t(qt=>Hi(qt))}l.runAndSubscribe=Mt;class Yt{constructor(Hi,An){this._observable=Hi,this._counter=0,this._hasChanged=!1;const qt={onWillAddFirstListener:()=>{Hi.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{Hi.removeObserver(this)}};this.emitter=new gi(qt),An&&An.add(this.emitter)}beginUpdate(Hi){this._counter++}handlePossibleChange(Hi){}handleChange(Hi,An){this._hasChanged=!0}endUpdate(Hi){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function Bi($t,Hi){return new Yt($t,Hi).emitter.event}l.fromObservable=Bi;function $i($t){return(Hi,An,qt)=>{let ms=0,Wr=!1;const Dr={beginUpdate(){ms++},endUpdate(){ms--,ms===0&&($t.reportChanges(),Wr&&(Wr=!1,Hi.call(An)))},handlePossibleChange(){},handleChange(){Wr=!0}};$t.addObserver(Dr),$t.reportChanges();const Rr={dispose(){$t.removeObserver(Dr)}};return qt instanceof wn?qt.add(Rr):Array.isArray(qt)&&qt.push(Rr),Rr}}l.fromObservableLight=$i})(Tr||(Tr={}));const xq=class xq{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${xq._idPool++}`,xq.all.add(this)}start(e){this._stopWatch=new bg,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}};xq.all=new Set,xq._idPool=0;let dBe=xq,nli=-1;const qbe=class qbe{constructor(e,i,n=(qbe._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=i,this.name=n,this._warnCountdown=0}dispose(){var e;(e=this._stacks)==null||e.clear()}check(e,i){const n=this.threshold;if(n<=0||i<n)return;this._stacks||(this._stacks=new Map);const s=this._stacks.get(e.value)||0;if(this._stacks.set(e.value,s+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;const[c,d]=this.getMostFrequentStack(),f=`[${this.name}] potential listener LEAK detected, having ${i} listeners already. MOST frequent listener (${d}):`;console.warn(f),console.warn(c);const m=new rli(f,c);this._errorHandler(m)}return()=>{const c=this._stacks.get(e.value)||0;this._stacks.set(e.value,c-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,i=0;for(const[n,s]of this._stacks)(!e||i<s)&&(e=[n,s],i=s);return e}};qbe._idPool=1;let fBe=qbe;class Gqe{static create(){const e=new Error;return new Gqe(e.stack??"")}constructor(e){this.value=e}print(){console.warn(this.value.split(`
+`).slice(2).join(`
+`))}}class rli extends Error{constructor(e,i){super(e),this.name="ListenerLeakError",this.stack=i}}class sli extends Error{constructor(e,i){super(e),this.name="ListenerRefusalError",this.stack=i}}class Z5e{constructor(e){this.value=e}}const oli=2;let gi=class{constructor(e){var i,n,s,c;this._size=0,this._options=e,this._leakageMon=(i=this._options)!=null&&i.leakWarningThreshold?new fBe((e==null?void 0:e.onListenerError)??Pa,((n=this._options)==null?void 0:n.leakWarningThreshold)??nli):void 0,this._perfMon=(s=this._options)!=null&&s._profName?new dBe(this._options._profName):void 0,this._deliveryQueue=(c=this._options)==null?void 0:c.deliveryQueue}dispose(){var e,i,n,s;this._disposed||(this._disposed=!0,((e=this._deliveryQueue)==null?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(n=(i=this._options)==null?void 0:i.onDidRemoveLastListener)==null||n.call(i),(s=this._leakageMon)==null||s.dispose())}get event(){return this._event??(this._event=(e,i,n)=>{var f,m,v,x,w;if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const I=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(I);const P=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],O=new sli(`${I}. HINT: Stack shows most frequent listener (${P[1]}-times)`,P[0]);return(((f=this._options)==null?void 0:f.onListenerError)||Pa)(O),xi.None}if(this._disposed)return xi.None;i&&(e=e.bind(i));const s=new Z5e(e);let c;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(s.stack=Gqe.create(),c=this._leakageMon.check(s.stack,this._size+1)),this._listeners?this._listeners instanceof Z5e?(this._deliveryQueue??(this._deliveryQueue=new Rkt),this._listeners=[this._listeners,s]):this._listeners.push(s):((v=(m=this._options)==null?void 0:m.onWillAddFirstListener)==null||v.call(m,this),this._listeners=s,(w=(x=this._options)==null?void 0:x.onDidAddFirstListener)==null||w.call(x,this)),this._size++;const d=fo(()=>{c==null||c(),this._removeListener(s)});return n instanceof wn?n.add(d):Array.isArray(n)&&n.push(d),d}),this._event}_removeListener(e){var c,d,f,m;if((d=(c=this._options)==null?void 0:c.onWillRemoveListener)==null||d.call(c,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(m=(f=this._options)==null?void 0:f.onDidRemoveLastListener)==null||m.call(f,this),this._size=0;return}const i=this._listeners,n=i.indexOf(e);if(n===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,i[n]=void 0;const s=this._deliveryQueue.current===this;if(this._size*oli<=i.length){let v=0;for(let x=0;x<i.length;x++)i[x]?i[v++]=i[x]:s&&(this._deliveryQueue.end--,v<this._deliveryQueue.i&&this._deliveryQueue.i--);i.length=v}}_deliver(e,i){var s;if(!e)return;const n=((s=this._options)==null?void 0:s.onListenerError)||Pa;if(!n){e.value(i);return}try{e.value(i)}catch(c){n(c)}}_deliverQueue(e){const i=e.current._listeners;for(;e.i<e.end;)this._deliver(i[e.i++],e.value);e.reset()}fire(e){var i,n,s,c;if((i=this._deliveryQueue)!=null&&i.current&&(this._deliverQueue(this._deliveryQueue),(n=this._perfMon)==null||n.stop()),(s=this._perfMon)==null||s.start(this._size),this._listeners)if(this._listeners instanceof Z5e)this._deliver(this._listeners,e);else{const d=this._deliveryQueue;d.enqueue(this,e,this._listeners.length),this._deliverQueue(d)}(c=this._perfMon)==null||c.stop()}hasListeners(){return this._size>0}};const ali=()=>new Rkt;class Rkt{constructor(){this.i=-1,this.end=0}enqueue(e,i,n){this.i=0,this.end=n,this.current=e,this.value=i}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class CB extends gi{constructor(e){super(e),this._isPaused=0,this._eventQueue=new _v,this._mergeFn=e==null?void 0:e.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}}class Fkt extends CB{constructor(e){super(e),this._delay=e.delay??100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}}class cli extends gi{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e==null?void 0:e.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(i=>super.fire(i)),this._queuedEvents=[]}))}}class lli{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new gi({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const i={event:e,listener:null};return this.events.push(i),this.hasListeners&&this.hook(i),fo(gR(()=>{this.hasListeners&&this.unhook(i);const s=this.events.indexOf(i);this.events.splice(s,1)}))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(e=>this.hook(e))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(e=>this.unhook(e))}hook(e){e.listener=e.event(i=>this.emitter.fire(i))}unhook(e){var i;(i=e.listener)==null||i.dispose(),e.listener=null}dispose(){var e;this.emitter.dispose();for(const i of this.events)(e=i.listener)==null||e.dispose();this.events=[]}}class lse{constructor(){this.data=[]}wrapEvent(e,i,n){return(s,c,d)=>e(f=>{const m=this.data[this.data.length-1];if(!i){m?m.buffers.push(()=>s.call(c,f)):s.call(c,f);return}const v=m;if(!v){s.call(c,i(n,f));return}v.items??(v.items=[]),v.items.push(f),v.buffers.length===0&&m.buffers.push(()=>{v.reducedResult??(v.reducedResult=n?v.items.reduce(i,n):v.items.reduce(i)),s.call(c,v.reducedResult)})},void 0,d)}bufferEvents(e){const i={buffers:new Array};this.data.push(i);const n=e();return this.data.pop(),i.buffers.forEach(s=>s()),n}}class Xyt{constructor(){this.listening=!1,this.inputEvent=Tr.None,this.inputEventListener=xi.None,this.emitter=new gi({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}const Bkt=Object.freeze(function(l,e){const i=setTimeout(l.bind(e),0);return{dispose(){clearTimeout(i)}}});var cc;(function(l){function e(i){return i===l.None||i===l.Cancelled||i instanceof t1e?!0:!i||typeof i!="object"?!1:typeof i.isCancellationRequested=="boolean"&&typeof i.onCancellationRequested=="function"}l.isCancellationToken=e,l.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Tr.None}),l.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Bkt})})(cc||(cc={}));class t1e{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Bkt:(this._emitter||(this._emitter=new gi),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}let ih=class{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new t1e),this._token}cancel(){this._token?this._token instanceof t1e&&this._token.cancel():this._token=cc.Cancelled}dispose(e=!1){var i;e&&this.cancel(),(i=this._parentListener)==null||i.dispose(),this._token?this._token instanceof t1e&&this._token.dispose():this._token=cc.None}};function hBe(l){const e=new ih;return l.add({dispose(){e.cancel()}}),e.token}class Kqe{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,i){this._keyCodeToStr[e]=i,this._strToKeyCode[i.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const i1e=new Kqe,_Be=new Kqe,pBe=new Kqe,Wkt=new Array(230),uli=Object.create(null),dli=Object.create(null),Xqe=[];for(let l=0;l<=193;l++)Xqe[l]=-1;(function(){const l="",e=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",l,l],[1,1,"Hyper",0,l,0,l,l,l],[1,2,"Super",0,l,0,l,l,l],[1,3,"Fn",0,l,0,l,l,l],[1,4,"FnLock",0,l,0,l,l,l],[1,5,"Suspend",0,l,0,l,l,l],[1,6,"Resume",0,l,0,l,l,l],[1,7,"Turbo",0,l,0,l,l,l],[1,8,"Sleep",0,l,0,"VK_SLEEP",l,l],[1,9,"WakeUp",0,l,0,l,l,l],[0,10,"KeyA",31,"A",65,"VK_A",l,l],[0,11,"KeyB",32,"B",66,"VK_B",l,l],[0,12,"KeyC",33,"C",67,"VK_C",l,l],[0,13,"KeyD",34,"D",68,"VK_D",l,l],[0,14,"KeyE",35,"E",69,"VK_E",l,l],[0,15,"KeyF",36,"F",70,"VK_F",l,l],[0,16,"KeyG",37,"G",71,"VK_G",l,l],[0,17,"KeyH",38,"H",72,"VK_H",l,l],[0,18,"KeyI",39,"I",73,"VK_I",l,l],[0,19,"KeyJ",40,"J",74,"VK_J",l,l],[0,20,"KeyK",41,"K",75,"VK_K",l,l],[0,21,"KeyL",42,"L",76,"VK_L",l,l],[0,22,"KeyM",43,"M",77,"VK_M",l,l],[0,23,"KeyN",44,"N",78,"VK_N",l,l],[0,24,"KeyO",45,"O",79,"VK_O",l,l],[0,25,"KeyP",46,"P",80,"VK_P",l,l],[0,26,"KeyQ",47,"Q",81,"VK_Q",l,l],[0,27,"KeyR",48,"R",82,"VK_R",l,l],[0,28,"KeyS",49,"S",83,"VK_S",l,l],[0,29,"KeyT",50,"T",84,"VK_T",l,l],[0,30,"KeyU",51,"U",85,"VK_U",l,l],[0,31,"KeyV",52,"V",86,"VK_V",l,l],[0,32,"KeyW",53,"W",87,"VK_W",l,l],[0,33,"KeyX",54,"X",88,"VK_X",l,l],[0,34,"KeyY",55,"Y",89,"VK_Y",l,l],[0,35,"KeyZ",56,"Z",90,"VK_Z",l,l],[0,36,"Digit1",22,"1",49,"VK_1",l,l],[0,37,"Digit2",23,"2",50,"VK_2",l,l],[0,38,"Digit3",24,"3",51,"VK_3",l,l],[0,39,"Digit4",25,"4",52,"VK_4",l,l],[0,40,"Digit5",26,"5",53,"VK_5",l,l],[0,41,"Digit6",27,"6",54,"VK_6",l,l],[0,42,"Digit7",28,"7",55,"VK_7",l,l],[0,43,"Digit8",29,"8",56,"VK_8",l,l],[0,44,"Digit9",30,"9",57,"VK_9",l,l],[0,45,"Digit0",21,"0",48,"VK_0",l,l],[1,46,"Enter",3,"Enter",13,"VK_RETURN",l,l],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",l,l],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",l,l],[1,49,"Tab",2,"Tab",9,"VK_TAB",l,l],[1,50,"Space",10,"Space",32,"VK_SPACE",l,l],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,l,0,l,l,l],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",l,l],[1,64,"F1",59,"F1",112,"VK_F1",l,l],[1,65,"F2",60,"F2",113,"VK_F2",l,l],[1,66,"F3",61,"F3",114,"VK_F3",l,l],[1,67,"F4",62,"F4",115,"VK_F4",l,l],[1,68,"F5",63,"F5",116,"VK_F5",l,l],[1,69,"F6",64,"F6",117,"VK_F6",l,l],[1,70,"F7",65,"F7",118,"VK_F7",l,l],[1,71,"F8",66,"F8",119,"VK_F8",l,l],[1,72,"F9",67,"F9",120,"VK_F9",l,l],[1,73,"F10",68,"F10",121,"VK_F10",l,l],[1,74,"F11",69,"F11",122,"VK_F11",l,l],[1,75,"F12",70,"F12",123,"VK_F12",l,l],[1,76,"PrintScreen",0,l,0,l,l,l],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",l,l],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",l,l],[1,79,"Insert",19,"Insert",45,"VK_INSERT",l,l],[1,80,"Home",14,"Home",36,"VK_HOME",l,l],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",l,l],[1,82,"Delete",20,"Delete",46,"VK_DELETE",l,l],[1,83,"End",13,"End",35,"VK_END",l,l],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",l,l],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",l],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",l],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",l],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",l],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",l,l],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",l,l],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",l,l],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",l,l],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",l,l],[1,94,"NumpadEnter",3,l,0,l,l,l],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",l,l],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",l,l],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",l,l],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",l,l],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",l,l],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",l,l],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",l,l],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",l,l],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",l,l],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",l,l],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",l,l],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",l,l],[1,107,"ContextMenu",58,"ContextMenu",93,l,l,l],[1,108,"Power",0,l,0,l,l,l],[1,109,"NumpadEqual",0,l,0,l,l,l],[1,110,"F13",71,"F13",124,"VK_F13",l,l],[1,111,"F14",72,"F14",125,"VK_F14",l,l],[1,112,"F15",73,"F15",126,"VK_F15",l,l],[1,113,"F16",74,"F16",127,"VK_F16",l,l],[1,114,"F17",75,"F17",128,"VK_F17",l,l],[1,115,"F18",76,"F18",129,"VK_F18",l,l],[1,116,"F19",77,"F19",130,"VK_F19",l,l],[1,117,"F20",78,"F20",131,"VK_F20",l,l],[1,118,"F21",79,"F21",132,"VK_F21",l,l],[1,119,"F22",80,"F22",133,"VK_F22",l,l],[1,120,"F23",81,"F23",134,"VK_F23",l,l],[1,121,"F24",82,"F24",135,"VK_F24",l,l],[1,122,"Open",0,l,0,l,l,l],[1,123,"Help",0,l,0,l,l,l],[1,124,"Select",0,l,0,l,l,l],[1,125,"Again",0,l,0,l,l,l],[1,126,"Undo",0,l,0,l,l,l],[1,127,"Cut",0,l,0,l,l,l],[1,128,"Copy",0,l,0,l,l,l],[1,129,"Paste",0,l,0,l,l,l],[1,130,"Find",0,l,0,l,l,l],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",l,l],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",l,l],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",l,l],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",l,l],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",l,l],[1,136,"KanaMode",0,l,0,l,l,l],[0,137,"IntlYen",0,l,0,l,l,l],[1,138,"Convert",0,l,0,l,l,l],[1,139,"NonConvert",0,l,0,l,l,l],[1,140,"Lang1",0,l,0,l,l,l],[1,141,"Lang2",0,l,0,l,l,l],[1,142,"Lang3",0,l,0,l,l,l],[1,143,"Lang4",0,l,0,l,l,l],[1,144,"Lang5",0,l,0,l,l,l],[1,145,"Abort",0,l,0,l,l,l],[1,146,"Props",0,l,0,l,l,l],[1,147,"NumpadParenLeft",0,l,0,l,l,l],[1,148,"NumpadParenRight",0,l,0,l,l,l],[1,149,"NumpadBackspace",0,l,0,l,l,l],[1,150,"NumpadMemoryStore",0,l,0,l,l,l],[1,151,"NumpadMemoryRecall",0,l,0,l,l,l],[1,152,"NumpadMemoryClear",0,l,0,l,l,l],[1,153,"NumpadMemoryAdd",0,l,0,l,l,l],[1,154,"NumpadMemorySubtract",0,l,0,l,l,l],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",l,l],[1,156,"NumpadClearEntry",0,l,0,l,l,l],[1,0,l,5,"Ctrl",17,"VK_CONTROL",l,l],[1,0,l,4,"Shift",16,"VK_SHIFT",l,l],[1,0,l,6,"Alt",18,"VK_MENU",l,l],[1,0,l,57,"Meta",91,"VK_COMMAND",l,l],[1,157,"ControlLeft",5,l,0,"VK_LCONTROL",l,l],[1,158,"ShiftLeft",4,l,0,"VK_LSHIFT",l,l],[1,159,"AltLeft",6,l,0,"VK_LMENU",l,l],[1,160,"MetaLeft",57,l,0,"VK_LWIN",l,l],[1,161,"ControlRight",5,l,0,"VK_RCONTROL",l,l],[1,162,"ShiftRight",4,l,0,"VK_RSHIFT",l,l],[1,163,"AltRight",6,l,0,"VK_RMENU",l,l],[1,164,"MetaRight",57,l,0,"VK_RWIN",l,l],[1,165,"BrightnessUp",0,l,0,l,l,l],[1,166,"BrightnessDown",0,l,0,l,l,l],[1,167,"MediaPlay",0,l,0,l,l,l],[1,168,"MediaRecord",0,l,0,l,l,l],[1,169,"MediaFastForward",0,l,0,l,l,l],[1,170,"MediaRewind",0,l,0,l,l,l],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",l,l],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",l,l],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",l,l],[1,174,"Eject",0,l,0,l,l,l],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",l,l],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",l,l],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",l,l],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",l,l],[1,179,"LaunchApp1",0,l,0,"VK_MEDIA_LAUNCH_APP1",l,l],[1,180,"SelectTask",0,l,0,l,l,l],[1,181,"LaunchScreenSaver",0,l,0,l,l,l],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",l,l],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",l,l],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",l,l],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",l,l],[1,186,"BrowserStop",0,l,0,"VK_BROWSER_STOP",l,l],[1,187,"BrowserRefresh",0,l,0,"VK_BROWSER_REFRESH",l,l],[1,188,"BrowserFavorites",0,l,0,"VK_BROWSER_FAVORITES",l,l],[1,189,"ZoomToggle",0,l,0,l,l,l],[1,190,"MailReply",0,l,0,l,l,l],[1,191,"MailForward",0,l,0,l,l,l],[1,192,"MailSend",0,l,0,l,l,l],[1,0,l,114,"KeyInComposition",229,l,l,l],[1,0,l,116,"ABNT_C2",194,"VK_ABNT_C2",l,l],[1,0,l,96,"OEM_8",223,"VK_OEM_8",l,l],[1,0,l,0,l,0,"VK_KANA",l,l],[1,0,l,0,l,0,"VK_HANGUL",l,l],[1,0,l,0,l,0,"VK_JUNJA",l,l],[1,0,l,0,l,0,"VK_FINAL",l,l],[1,0,l,0,l,0,"VK_HANJA",l,l],[1,0,l,0,l,0,"VK_KANJI",l,l],[1,0,l,0,l,0,"VK_CONVERT",l,l],[1,0,l,0,l,0,"VK_NONCONVERT",l,l],[1,0,l,0,l,0,"VK_ACCEPT",l,l],[1,0,l,0,l,0,"VK_MODECHANGE",l,l],[1,0,l,0,l,0,"VK_SELECT",l,l],[1,0,l,0,l,0,"VK_PRINT",l,l],[1,0,l,0,l,0,"VK_EXECUTE",l,l],[1,0,l,0,l,0,"VK_SNAPSHOT",l,l],[1,0,l,0,l,0,"VK_HELP",l,l],[1,0,l,0,l,0,"VK_APPS",l,l],[1,0,l,0,l,0,"VK_PROCESSKEY",l,l],[1,0,l,0,l,0,"VK_PACKET",l,l],[1,0,l,0,l,0,"VK_DBE_SBCSCHAR",l,l],[1,0,l,0,l,0,"VK_DBE_DBCSCHAR",l,l],[1,0,l,0,l,0,"VK_ATTN",l,l],[1,0,l,0,l,0,"VK_CRSEL",l,l],[1,0,l,0,l,0,"VK_EXSEL",l,l],[1,0,l,0,l,0,"VK_EREOF",l,l],[1,0,l,0,l,0,"VK_PLAY",l,l],[1,0,l,0,l,0,"VK_ZOOM",l,l],[1,0,l,0,l,0,"VK_NONAME",l,l],[1,0,l,0,l,0,"VK_PA1",l,l],[1,0,l,0,l,0,"VK_OEM_CLEAR",l,l]],i=[],n=[];for(const s of e){const[c,d,f,m,v,x,w,I,P]=s;if(n[d]||(n[d]=!0,uli[f]=d,dli[f.toLowerCase()]=d,c&&(Xqe[d]=m)),!i[m]){if(i[m]=!0,!v)throw new Error(`String representation missing for key code ${m} around scan code ${f}`);i1e.define(m,v),_Be.define(m,I||v),pBe.define(m,P||I||v)}x&&(Wkt[x]=m)}})();var P4;(function(l){function e(f){return i1e.keyCodeToStr(f)}l.toString=e;function i(f){return i1e.strToKeyCode(f)}l.fromString=i;function n(f){return _Be.keyCodeToStr(f)}l.toUserSettingsUS=n;function s(f){return pBe.keyCodeToStr(f)}l.toUserSettingsGeneral=s;function c(f){return _Be.strToKeyCode(f)||pBe.strToKeyCode(f)}l.fromUserSettings=c;function d(f){if(f>=98&&f<=113)return null;switch(f){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return i1e.keyCodeToStr(f)}l.toElectronAccelerator=d})(P4||(P4={}));function pp(l,e){const i=(e&65535)<<16>>>0;return(l|i)>>>0}var Qyt={};let Hq;const Y5e=globalThis.vscode;var _kt;if(typeof Y5e<"u"&&typeof Y5e.process<"u"){const l=Y5e.process;Hq={get platform(){return l.platform},get arch(){return l.arch},get env(){return l.env},cwd(){return l.cwd()}}}else typeof process<"u"&&typeof((_kt=process==null?void 0:process.versions)==null?void 0:_kt.node)=="string"?Hq={get platform(){return process.platform},get arch(){return process.arch},get env(){return Qyt},cwd(){return Qyt.VSCODE_CWD||process.cwd()}}:Hq={get platform(){return I0?"win32":Hc?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const X1e=Hq.cwd,mBe=Hq.env,fli=Hq.platform,hli=65,_li=97,pli=90,mli=122,UM=46,gy=47,ow=92,iM=58,gli=63;class Vkt extends Error{constructor(e,i,n){let s;typeof i=="string"&&i.indexOf("not ")===0?(s="must not be",i=i.replace(/^not /,"")):s="must be";const c=e.indexOf(".")!==-1?"property":"argument";let d=`The "${e}" ${c} ${s} of type ${i}`;d+=`. Received type ${typeof n}`,super(d),this.code="ERR_INVALID_ARG_TYPE"}}function yli(l,e){if(l===null||typeof l!="object")throw new Vkt(e,"Object",l)}function pg(l,e){if(typeof l!="string")throw new Vkt(e,"string",l)}const y6=fli==="win32";function Uu(l){return l===gy||l===ow}function gBe(l){return l===gy}function nM(l){return l>=hli&&l<=pli||l>=_li&&l<=mli}function Q1e(l,e,i,n){let s="",c=0,d=-1,f=0,m=0;for(let v=0;v<=l.length;++v){if(v<l.length)m=l.charCodeAt(v);else{if(n(m))break;m=gy}if(n(m)){if(!(d===v-1||f===1))if(f===2){if(s.length<2||c!==2||s.charCodeAt(s.length-1)!==UM||s.charCodeAt(s.length-2)!==UM){if(s.length>2){const x=s.lastIndexOf(i);x===-1?(s="",c=0):(s=s.slice(0,x),c=s.length-1-s.lastIndexOf(i)),d=v,f=0;continue}else if(s.length!==0){s="",c=0,d=v,f=0;continue}}e&&(s+=s.length>0?`${i}..`:"..",c=2)}else s.length>0?s+=`${i}${l.slice(d+1,v)}`:s=l.slice(d+1,v),c=v-d-1;d=v,f=0}else m===UM&&f!==-1?++f:f=-1}return s}function vli(l){return l?`${l[0]==="."?"":"."}${l}`:""}function Hkt(l,e){yli(e,"pathObject");const i=e.dir||e.root,n=e.base||`${e.name||""}${vli(e.ext)}`;return i?i===e.root?`${i}${n}`:`${i}${l}${n}`:n}const Db={resolve(...l){let e="",i="",n=!1;for(let s=l.length-1;s>=-1;s--){let c;if(s>=0){if(c=l[s],pg(c,`paths[${s}]`),c.length===0)continue}else e.length===0?c=X1e():(c=mBe[`=${e}`]||X1e(),(c===void 0||c.slice(0,2).toLowerCase()!==e.toLowerCase()&&c.charCodeAt(2)===ow)&&(c=`${e}\\`));const d=c.length;let f=0,m="",v=!1;const x=c.charCodeAt(0);if(d===1)Uu(x)&&(f=1,v=!0);else if(Uu(x))if(v=!0,Uu(c.charCodeAt(1))){let w=2,I=w;for(;w<d&&!Uu(c.charCodeAt(w));)w++;if(w<d&&w!==I){const P=c.slice(I,w);for(I=w;w<d&&Uu(c.charCodeAt(w));)w++;if(w<d&&w!==I){for(I=w;w<d&&!Uu(c.charCodeAt(w));)w++;(w===d||w!==I)&&(m=`\\\\${P}\\${c.slice(I,w)}`,f=w)}}}else f=1;else nM(x)&&c.charCodeAt(1)===iM&&(m=c.slice(0,2),f=2,d>2&&Uu(c.charCodeAt(2))&&(v=!0,f=3));if(m.length>0)if(e.length>0){if(m.toLowerCase()!==e.toLowerCase())continue}else e=m;if(n){if(e.length>0)break}else if(i=`${c.slice(f)}\\${i}`,n=v,v&&e.length>0)break}return i=Q1e(i,!n,"\\",Uu),n?`${e}\\${i}`:`${e}${i}`||"."},normalize(l){pg(l,"path");const e=l.length;if(e===0)return".";let i=0,n,s=!1;const c=l.charCodeAt(0);if(e===1)return gBe(c)?"\\":l;if(Uu(c))if(s=!0,Uu(l.charCodeAt(1))){let f=2,m=f;for(;f<e&&!Uu(l.charCodeAt(f));)f++;if(f<e&&f!==m){const v=l.slice(m,f);for(m=f;f<e&&Uu(l.charCodeAt(f));)f++;if(f<e&&f!==m){for(m=f;f<e&&!Uu(l.charCodeAt(f));)f++;if(f===e)return`\\\\${v}\\${l.slice(m)}\\`;f!==m&&(n=`\\\\${v}\\${l.slice(m,f)}`,i=f)}}}else i=1;else nM(c)&&l.charCodeAt(1)===iM&&(n=l.slice(0,2),i=2,e>2&&Uu(l.charCodeAt(2))&&(s=!0,i=3));let d=i<e?Q1e(l.slice(i),!s,"\\",Uu):"";return d.length===0&&!s&&(d="."),d.length>0&&Uu(l.charCodeAt(e-1))&&(d+="\\"),n===void 0?s?`\\${d}`:d:s?`${n}\\${d}`:`${n}${d}`},isAbsolute(l){pg(l,"path");const e=l.length;if(e===0)return!1;const i=l.charCodeAt(0);return Uu(i)||e>2&&nM(i)&&l.charCodeAt(1)===iM&&Uu(l.charCodeAt(2))},join(...l){if(l.length===0)return".";let e,i;for(let c=0;c<l.length;++c){const d=l[c];pg(d,"path"),d.length>0&&(e===void 0?e=i=d:e+=`\\${d}`)}if(e===void 0)return".";let n=!0,s=0;if(typeof i=="string"&&Uu(i.charCodeAt(0))){++s;const c=i.length;c>1&&Uu(i.charCodeAt(1))&&(++s,c>2&&(Uu(i.charCodeAt(2))?++s:n=!1))}if(n){for(;s<e.length&&Uu(e.charCodeAt(s));)s++;s>=2&&(e=`\\${e.slice(s)}`)}return Db.normalize(e)},relative(l,e){if(pg(l,"from"),pg(e,"to"),l===e)return"";const i=Db.resolve(l),n=Db.resolve(e);if(i===n||(l=i.toLowerCase(),e=n.toLowerCase(),l===e))return"";let s=0;for(;s<l.length&&l.charCodeAt(s)===ow;)s++;let c=l.length;for(;c-1>s&&l.charCodeAt(c-1)===ow;)c--;const d=c-s;let f=0;for(;f<e.length&&e.charCodeAt(f)===ow;)f++;let m=e.length;for(;m-1>f&&e.charCodeAt(m-1)===ow;)m--;const v=m-f,x=d<v?d:v;let w=-1,I=0;for(;I<x;I++){const O=l.charCodeAt(s+I);if(O!==e.charCodeAt(f+I))break;O===ow&&(w=I)}if(I!==x){if(w===-1)return n}else{if(v>x){if(e.charCodeAt(f+I)===ow)return n.slice(f+I+1);if(I===2)return n.slice(f+I)}d>x&&(l.charCodeAt(s+I)===ow?w=I:I===2&&(w=3)),w===-1&&(w=0)}let P="";for(I=s+w+1;I<=c;++I)(I===c||l.charCodeAt(I)===ow)&&(P+=P.length===0?"..":"\\..");return f+=w,P.length>0?`${P}${n.slice(f,m)}`:(n.charCodeAt(f)===ow&&++f,n.slice(f,m))},toNamespacedPath(l){if(typeof l!="string"||l.length===0)return l;const e=Db.resolve(l);if(e.length<=2)return l;if(e.charCodeAt(0)===ow){if(e.charCodeAt(1)===ow){const i=e.charCodeAt(2);if(i!==gli&&i!==UM)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(nM(e.charCodeAt(0))&&e.charCodeAt(1)===iM&&e.charCodeAt(2)===ow)return`\\\\?\\${e}`;return l},dirname(l){pg(l,"path");const e=l.length;if(e===0)return".";let i=-1,n=0;const s=l.charCodeAt(0);if(e===1)return Uu(s)?l:".";if(Uu(s)){if(i=n=1,Uu(l.charCodeAt(1))){let f=2,m=f;for(;f<e&&!Uu(l.charCodeAt(f));)f++;if(f<e&&f!==m){for(m=f;f<e&&Uu(l.charCodeAt(f));)f++;if(f<e&&f!==m){for(m=f;f<e&&!Uu(l.charCodeAt(f));)f++;if(f===e)return l;f!==m&&(i=n=f+1)}}}}else nM(s)&&l.charCodeAt(1)===iM&&(i=e>2&&Uu(l.charCodeAt(2))?3:2,n=i);let c=-1,d=!0;for(let f=e-1;f>=n;--f)if(Uu(l.charCodeAt(f))){if(!d){c=f;break}}else d=!1;if(c===-1){if(i===-1)return".";c=i}return l.slice(0,c)},basename(l,e){e!==void 0&&pg(e,"suffix"),pg(l,"path");let i=0,n=-1,s=!0,c;if(l.length>=2&&nM(l.charCodeAt(0))&&l.charCodeAt(1)===iM&&(i=2),e!==void 0&&e.length>0&&e.length<=l.length){if(e===l)return"";let d=e.length-1,f=-1;for(c=l.length-1;c>=i;--c){const m=l.charCodeAt(c);if(Uu(m)){if(!s){i=c+1;break}}else f===-1&&(s=!1,f=c+1),d>=0&&(m===e.charCodeAt(d)?--d===-1&&(n=c):(d=-1,n=f))}return i===n?n=f:n===-1&&(n=l.length),l.slice(i,n)}for(c=l.length-1;c>=i;--c)if(Uu(l.charCodeAt(c))){if(!s){i=c+1;break}}else n===-1&&(s=!1,n=c+1);return n===-1?"":l.slice(i,n)},extname(l){pg(l,"path");let e=0,i=-1,n=0,s=-1,c=!0,d=0;l.length>=2&&l.charCodeAt(1)===iM&&nM(l.charCodeAt(0))&&(e=n=2);for(let f=l.length-1;f>=e;--f){const m=l.charCodeAt(f);if(Uu(m)){if(!c){n=f+1;break}continue}s===-1&&(c=!1,s=f+1),m===UM?i===-1?i=f:d!==1&&(d=1):i!==-1&&(d=-1)}return i===-1||s===-1||d===0||d===1&&i===s-1&&i===n+1?"":l.slice(i,s)},format:Hkt.bind(null,"\\"),parse(l){pg(l,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return e;const i=l.length;let n=0,s=l.charCodeAt(0);if(i===1)return Uu(s)?(e.root=e.dir=l,e):(e.base=e.name=l,e);if(Uu(s)){if(n=1,Uu(l.charCodeAt(1))){let w=2,I=w;for(;w<i&&!Uu(l.charCodeAt(w));)w++;if(w<i&&w!==I){for(I=w;w<i&&Uu(l.charCodeAt(w));)w++;if(w<i&&w!==I){for(I=w;w<i&&!Uu(l.charCodeAt(w));)w++;w===i?n=w:w!==I&&(n=w+1)}}}}else if(nM(s)&&l.charCodeAt(1)===iM){if(i<=2)return e.root=e.dir=l,e;if(n=2,Uu(l.charCodeAt(2))){if(i===3)return e.root=e.dir=l,e;n=3}}n>0&&(e.root=l.slice(0,n));let c=-1,d=n,f=-1,m=!0,v=l.length-1,x=0;for(;v>=n;--v){if(s=l.charCodeAt(v),Uu(s)){if(!m){d=v+1;break}continue}f===-1&&(m=!1,f=v+1),s===UM?c===-1?c=v:x!==1&&(x=1):c!==-1&&(x=-1)}return f!==-1&&(c===-1||x===0||x===1&&c===f-1&&c===d+1?e.base=e.name=l.slice(d,f):(e.name=l.slice(d,c),e.base=l.slice(d,f),e.ext=l.slice(c,f))),d>0&&d!==n?e.dir=l.slice(0,d-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},bli=(()=>{if(y6){const l=/\\/g;return()=>{const e=X1e().replace(l,"/");return e.slice(e.indexOf("/"))}}return()=>X1e()})(),q_={resolve(...l){let e="",i=!1;for(let n=l.length-1;n>=-1&&!i;n--){const s=n>=0?l[n]:bli();pg(s,`paths[${n}]`),s.length!==0&&(e=`${s}/${e}`,i=s.charCodeAt(0)===gy)}return e=Q1e(e,!i,"/",gBe),i?`/${e}`:e.length>0?e:"."},normalize(l){if(pg(l,"path"),l.length===0)return".";const e=l.charCodeAt(0)===gy,i=l.charCodeAt(l.length-1)===gy;return l=Q1e(l,!e,"/",gBe),l.length===0?e?"/":i?"./":".":(i&&(l+="/"),e?`/${l}`:l)},isAbsolute(l){return pg(l,"path"),l.length>0&&l.charCodeAt(0)===gy},join(...l){if(l.length===0)return".";let e;for(let i=0;i<l.length;++i){const n=l[i];pg(n,"path"),n.length>0&&(e===void 0?e=n:e+=`/${n}`)}return e===void 0?".":q_.normalize(e)},relative(l,e){if(pg(l,"from"),pg(e,"to"),l===e||(l=q_.resolve(l),e=q_.resolve(e),l===e))return"";const i=1,n=l.length,s=n-i,c=1,d=e.length-c,f=s<d?s:d;let m=-1,v=0;for(;v<f;v++){const w=l.charCodeAt(i+v);if(w!==e.charCodeAt(c+v))break;w===gy&&(m=v)}if(v===f)if(d>f){if(e.charCodeAt(c+v)===gy)return e.slice(c+v+1);if(v===0)return e.slice(c+v)}else s>f&&(l.charCodeAt(i+v)===gy?m=v:v===0&&(m=0));let x="";for(v=i+m+1;v<=n;++v)(v===n||l.charCodeAt(v)===gy)&&(x+=x.length===0?"..":"/..");return`${x}${e.slice(c+m)}`},toNamespacedPath(l){return l},dirname(l){if(pg(l,"path"),l.length===0)return".";const e=l.charCodeAt(0)===gy;let i=-1,n=!0;for(let s=l.length-1;s>=1;--s)if(l.charCodeAt(s)===gy){if(!n){i=s;break}}else n=!1;return i===-1?e?"/":".":e&&i===1?"//":l.slice(0,i)},basename(l,e){e!==void 0&&pg(e,"ext"),pg(l,"path");let i=0,n=-1,s=!0,c;if(e!==void 0&&e.length>0&&e.length<=l.length){if(e===l)return"";let d=e.length-1,f=-1;for(c=l.length-1;c>=0;--c){const m=l.charCodeAt(c);if(m===gy){if(!s){i=c+1;break}}else f===-1&&(s=!1,f=c+1),d>=0&&(m===e.charCodeAt(d)?--d===-1&&(n=c):(d=-1,n=f))}return i===n?n=f:n===-1&&(n=l.length),l.slice(i,n)}for(c=l.length-1;c>=0;--c)if(l.charCodeAt(c)===gy){if(!s){i=c+1;break}}else n===-1&&(s=!1,n=c+1);return n===-1?"":l.slice(i,n)},extname(l){pg(l,"path");let e=-1,i=0,n=-1,s=!0,c=0;for(let d=l.length-1;d>=0;--d){const f=l.charCodeAt(d);if(f===gy){if(!s){i=d+1;break}continue}n===-1&&(s=!1,n=d+1),f===UM?e===-1?e=d:c!==1&&(c=1):e!==-1&&(c=-1)}return e===-1||n===-1||c===0||c===1&&e===n-1&&e===i+1?"":l.slice(e,n)},format:Hkt.bind(null,"/"),parse(l){pg(l,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return e;const i=l.charCodeAt(0)===gy;let n;i?(e.root="/",n=1):n=0;let s=-1,c=0,d=-1,f=!0,m=l.length-1,v=0;for(;m>=n;--m){const x=l.charCodeAt(m);if(x===gy){if(!f){c=m+1;break}continue}d===-1&&(f=!1,d=m+1),x===UM?s===-1?s=m:v!==1&&(v=1):s!==-1&&(v=-1)}if(d!==-1){const x=c===0&&i?1:c;s===-1||v===0||v===1&&s===d-1&&s===c+1?e.base=e.name=l.slice(x,d):(e.name=l.slice(x,s),e.base=l.slice(x,d),e.ext=l.slice(s,d))}return c>0?e.dir=l.slice(0,c-1):i&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};q_.win32=Db.win32=Db;q_.posix=Db.posix=q_;const jkt=y6?Db.normalize:q_.normalize,Cli=y6?Db.join:q_.join,Sli=y6?Db.resolve:q_.resolve,wli=y6?Db.relative:q_.relative,zkt=y6?Db.dirname:q_.dirname,qM=y6?Db.basename:q_.basename,xli=y6?Db.extname:q_.extname,AE=y6?Db.sep:q_.sep,kli=/^\w[\w\d+.-]*$/,Tli=/^\//,Dli=/^\/\//;function Eli(l,e){if(!l.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${l.authority}", path: "${l.path}", query: "${l.query}", fragment: "${l.fragment}"}`);if(l.scheme&&!kli.test(l.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(l.path){if(l.authority){if(!Tli.test(l.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(Dli.test(l.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Ili(l,e){return!l&&!e?"file":l}function Nli(l,e){switch(l){case"https":case"http":case"file":e?e[0]!==SE&&(e=SE+e):e=SE;break}return e}const z_="",SE="/",Lli=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class yo{static isUri(e){return e instanceof yo?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function":!1}constructor(e,i,n,s,c,d=!1){typeof e=="object"?(this.scheme=e.scheme||z_,this.authority=e.authority||z_,this.path=e.path||z_,this.query=e.query||z_,this.fragment=e.fragment||z_):(this.scheme=Ili(e,d),this.authority=i||z_,this.path=Nli(this.scheme,n||z_),this.query=s||z_,this.fragment=c||z_,Eli(this,d))}get fsPath(){return Z1e(this,!1)}with(e){if(!e)return this;let{scheme:i,authority:n,path:s,query:c,fragment:d}=e;return i===void 0?i=this.scheme:i===null&&(i=z_),n===void 0?n=this.authority:n===null&&(n=z_),s===void 0?s=this.path:s===null&&(s=z_),c===void 0?c=this.query:c===null&&(c=z_),d===void 0?d=this.fragment:d===null&&(d=z_),i===this.scheme&&n===this.authority&&s===this.path&&c===this.query&&d===this.fragment?this:new bU(i,n,s,c,d)}static parse(e,i=!1){const n=Lli.exec(e);return n?new bU(n[2]||z_,Uge(n[4]||z_),Uge(n[5]||z_),Uge(n[7]||z_),Uge(n[9]||z_),i):new bU(z_,z_,z_,z_,z_)}static file(e){let i=z_;if(I0&&(e=e.replace(/\\/g,SE)),e[0]===SE&&e[1]===SE){const n=e.indexOf(SE,2);n===-1?(i=e.substring(2),e=SE):(i=e.substring(2,n),e=e.substring(n)||SE)}return new bU("file",i,e,z_,z_)}static from(e,i){return new bU(e.scheme,e.authority,e.path,e.query,e.fragment,i)}static joinPath(e,...i){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return I0&&e.scheme==="file"?n=yo.file(Db.join(Z1e(e,!0),...i)).path:n=q_.join(e.path,...i),e.with({path:n})}toString(e=!1){return yBe(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof yo)return e;{const i=new bU(e);return i._formatted=e.external??null,i._fsPath=e._sep===Ukt?e.fsPath??null:null,i}}else return e}}const Ukt=I0?1:void 0;let bU=class extends yo{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Z1e(this,!1)),this._fsPath}toString(e=!1){return e?yBe(this,!0):(this._formatted||(this._formatted=yBe(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=Ukt),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}};const qkt={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function Zyt(l,e,i){let n,s=-1;for(let c=0;c<l.length;c++){const d=l.charCodeAt(c);if(d>=97&&d<=122||d>=65&&d<=90||d>=48&&d<=57||d===45||d===46||d===95||d===126||e&&d===47||i&&d===91||i&&d===93||i&&d===58)s!==-1&&(n+=encodeURIComponent(l.substring(s,c)),s=-1),n!==void 0&&(n+=l.charAt(c));else{n===void 0&&(n=l.substr(0,c));const f=qkt[d];f!==void 0?(s!==-1&&(n+=encodeURIComponent(l.substring(s,c)),s=-1),n+=f):s===-1&&(s=c)}}return s!==-1&&(n+=encodeURIComponent(l.substring(s))),n!==void 0?n:l}function Pli(l){let e;for(let i=0;i<l.length;i++){const n=l.charCodeAt(i);n===35||n===63?(e===void 0&&(e=l.substr(0,i)),e+=qkt[n]):e!==void 0&&(e+=l[i])}return e!==void 0?e:l}function Z1e(l,e){let i;return l.authority&&l.path.length>1&&l.scheme==="file"?i=`//${l.authority}${l.path}`:l.path.charCodeAt(0)===47&&(l.path.charCodeAt(1)>=65&&l.path.charCodeAt(1)<=90||l.path.charCodeAt(1)>=97&&l.path.charCodeAt(1)<=122)&&l.path.charCodeAt(2)===58?e?i=l.path.substr(1):i=l.path[1].toLowerCase()+l.path.substr(2):i=l.path,I0&&(i=i.replace(/\//g,"\\")),i}function yBe(l,e){const i=e?Pli:Zyt;let n="",{scheme:s,authority:c,path:d,query:f,fragment:m}=l;if(s&&(n+=s,n+=":"),(c||s==="file")&&(n+=SE,n+=SE),c){let v=c.indexOf("@");if(v!==-1){const x=c.substr(0,v);c=c.substr(v+1),v=x.lastIndexOf(":"),v===-1?n+=i(x,!1,!1):(n+=i(x.substr(0,v),!1,!1),n+=":",n+=i(x.substr(v+1),!1,!0)),n+="@"}c=c.toLowerCase(),v=c.lastIndexOf(":"),v===-1?n+=i(c,!1,!0):(n+=i(c.substr(0,v),!1,!0),n+=c.substr(v))}if(d){if(d.length>=3&&d.charCodeAt(0)===47&&d.charCodeAt(2)===58){const v=d.charCodeAt(1);v>=65&&v<=90&&(d=`/${String.fromCharCode(v+32)}:${d.substr(3)}`)}else if(d.length>=2&&d.charCodeAt(1)===58){const v=d.charCodeAt(0);v>=65&&v<=90&&(d=`${String.fromCharCode(v+32)}:${d.substr(2)}`)}n+=i(d,!0,!1)}return f&&(n+="?",n+=i(f,!1,!1)),m&&(n+="#",n+=e?m:Zyt(m,!1,!1)),n}function $kt(l){try{return decodeURIComponent(l)}catch{return l.length>3?l.substr(0,3)+$kt(l.substr(3)):l}}const Yyt=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Uge(l){return l.match(Yyt)?l.replace(Yyt,e=>$kt(e)):l}let pi=class TF{constructor(e,i){this.lineNumber=e,this.column=i}with(e=this.lineNumber,i=this.column){return e===this.lineNumber&&i===this.column?this:new TF(e,i)}delta(e=0,i=0){return this.with(this.lineNumber+e,this.column+i)}equals(e){return TF.equals(this,e)}static equals(e,i){return!e&&!i?!0:!!e&&!!i&&e.lineNumber===i.lineNumber&&e.column===i.column}isBefore(e){return TF.isBefore(this,e)}static isBefore(e,i){return e.lineNumber<i.lineNumber?!0:i.lineNumber<e.lineNumber?!1:e.column<i.column}isBeforeOrEqual(e){return TF.isBeforeOrEqual(this,e)}static isBeforeOrEqual(e,i){return e.lineNumber<i.lineNumber?!0:i.lineNumber<e.lineNumber?!1:e.column<=i.column}static compare(e,i){const n=e.lineNumber|0,s=i.lineNumber|0;if(n===s){const c=e.column|0,d=i.column|0;return c-d}return n-s}clone(){return new TF(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(e){return new TF(e.lineNumber,e.column)}static isIPosition(e){return e&&typeof e.lineNumber=="number"&&typeof e.column=="number"}toJSON(){return{lineNumber:this.lineNumber,column:this.column}}},nt=class e0{constructor(e,i,n,s){e>n||e===n&&i>s?(this.startLineNumber=n,this.startColumn=s,this.endLineNumber=e,this.endColumn=i):(this.startLineNumber=e,this.startColumn=i,this.endLineNumber=n,this.endColumn=s)}isEmpty(){return e0.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return e0.containsPosition(this,e)}static containsPosition(e,i){return!(i.lineNumber<e.startLineNumber||i.lineNumber>e.endLineNumber||i.lineNumber===e.startLineNumber&&i.column<e.startColumn||i.lineNumber===e.endLineNumber&&i.column>e.endColumn)}static strictContainsPosition(e,i){return!(i.lineNumber<e.startLineNumber||i.lineNumber>e.endLineNumber||i.lineNumber===e.startLineNumber&&i.column<=e.startColumn||i.lineNumber===e.endLineNumber&&i.column>=e.endColumn)}containsRange(e){return e0.containsRange(this,e)}static containsRange(e,i){return!(i.startLineNumber<e.startLineNumber||i.endLineNumber<e.startLineNumber||i.startLineNumber>e.endLineNumber||i.endLineNumber>e.endLineNumber||i.startLineNumber===e.startLineNumber&&i.startColumn<e.startColumn||i.endLineNumber===e.endLineNumber&&i.endColumn>e.endColumn)}strictContainsRange(e){return e0.strictContainsRange(this,e)}static strictContainsRange(e,i){return!(i.startLineNumber<e.startLineNumber||i.endLineNumber<e.startLineNumber||i.startLineNumber>e.endLineNumber||i.endLineNumber>e.endLineNumber||i.startLineNumber===e.startLineNumber&&i.startColumn<=e.startColumn||i.endLineNumber===e.endLineNumber&&i.endColumn>=e.endColumn)}plusRange(e){return e0.plusRange(this,e)}static plusRange(e,i){let n,s,c,d;return i.startLineNumber<e.startLineNumber?(n=i.startLineNumber,s=i.startColumn):i.startLineNumber===e.startLineNumber?(n=i.startLineNumber,s=Math.min(i.startColumn,e.startColumn)):(n=e.startLineNumber,s=e.startColumn),i.endLineNumber>e.endLineNumber?(c=i.endLineNumber,d=i.endColumn):i.endLineNumber===e.endLineNumber?(c=i.endLineNumber,d=Math.max(i.endColumn,e.endColumn)):(c=e.endLineNumber,d=e.endColumn),new e0(n,s,c,d)}intersectRanges(e){return e0.intersectRanges(this,e)}static intersectRanges(e,i){let n=e.startLineNumber,s=e.startColumn,c=e.endLineNumber,d=e.endColumn;const f=i.startLineNumber,m=i.startColumn,v=i.endLineNumber,x=i.endColumn;return n<f?(n=f,s=m):n===f&&(s=Math.max(s,m)),c>v?(c=v,d=x):c===v&&(d=Math.min(d,x)),n>c||n===c&&s>d?null:new e0(n,s,c,d)}equalsRange(e){return e0.equalsRange(this,e)}static equalsRange(e,i){return!e&&!i?!0:!!e&&!!i&&e.startLineNumber===i.startLineNumber&&e.startColumn===i.startColumn&&e.endLineNumber===i.endLineNumber&&e.endColumn===i.endColumn}getEndPosition(){return e0.getEndPosition(this)}static getEndPosition(e){return new pi(e.endLineNumber,e.endColumn)}getStartPosition(){return e0.getStartPosition(this)}static getStartPosition(e){return new pi(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,i){return new e0(this.startLineNumber,this.startColumn,e,i)}setStartPosition(e,i){return new e0(e,i,this.endLineNumber,this.endColumn)}collapseToStart(){return e0.collapseToStart(this)}static collapseToStart(e){return new e0(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return e0.collapseToEnd(this)}static collapseToEnd(e){return new e0(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new e0(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,i=e){return new e0(e.lineNumber,e.column,i.lineNumber,i.column)}static lift(e){return e?new e0(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,i){return!(e.endLineNumber<i.startLineNumber||e.endLineNumber===i.startLineNumber&&e.endColumn<i.startColumn||i.endLineNumber<e.startLineNumber||i.endLineNumber===e.startLineNumber&&i.endColumn<e.startColumn)}static areIntersecting(e,i){return!(e.endLineNumber<i.startLineNumber||e.endLineNumber===i.startLineNumber&&e.endColumn<=i.startColumn||i.endLineNumber<e.startLineNumber||i.endLineNumber===e.startLineNumber&&i.endColumn<=e.startColumn)}static compareRangesUsingStarts(e,i){if(e&&i){const c=e.startLineNumber|0,d=i.startLineNumber|0;if(c===d){const f=e.startColumn|0,m=i.startColumn|0;if(f===m){const v=e.endLineNumber|0,x=i.endLineNumber|0;if(v===x){const w=e.endColumn|0,I=i.endColumn|0;return w-I}return v-x}return f-m}return c-d}return(e?1:0)-(i?1:0)}static compareRangesUsingEnds(e,i){return e.endLineNumber===i.endLineNumber?e.endColumn===i.endColumn?e.startLineNumber===i.startLineNumber?e.startColumn-i.startColumn:e.startLineNumber-i.startLineNumber:e.endColumn-i.endColumn:e.endLineNumber-i.endLineNumber}static spansMultipleLines(e){return e.endLineNumber>e.startLineNumber}toJSON(){return this}},Us=class tT extends nt{constructor(e,i,n,s){super(e,i,n,s),this.selectionStartLineNumber=e,this.selectionStartColumn=i,this.positionLineNumber=n,this.positionColumn=s}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return tT.selectionsEqual(this,e)}static selectionsEqual(e,i){return e.selectionStartLineNumber===i.selectionStartLineNumber&&e.selectionStartColumn===i.selectionStartColumn&&e.positionLineNumber===i.positionLineNumber&&e.positionColumn===i.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,i){return this.getDirection()===0?new tT(this.startLineNumber,this.startColumn,e,i):new tT(e,i,this.startLineNumber,this.startColumn)}getPosition(){return new pi(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new pi(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,i){return this.getDirection()===0?new tT(e,i,this.endLineNumber,this.endColumn):new tT(this.endLineNumber,this.endColumn,e,i)}static fromPositions(e,i=e){return new tT(e.lineNumber,e.column,i.lineNumber,i.column)}static fromRange(e,i){return i===0?new tT(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new tT(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new tT(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,i){if(e&&!i||!e&&i)return!1;if(!e&&!i)return!0;if(e.length!==i.length)return!1;for(let n=0,s=e.length;n<s;n++)if(!this.selectionsEqual(e[n],i[n]))return!1;return!0}static isISelection(e){return e&&typeof e.selectionStartLineNumber=="number"&&typeof e.selectionStartColumn=="number"&&typeof e.positionLineNumber=="number"&&typeof e.positionColumn=="number"}static createWithDirection(e,i,n,s,c){return c===0?new tT(e,i,n,s):new tT(n,s,e,i)}};const vBe=Object.create(null);function Ge(l,e){if(Eb(e)){const i=vBe[e];if(i===void 0)throw new Error(`${l} references an unknown codicon: ${e}`);e=i}return vBe[l]=e,{id:l}}function Jkt(){return vBe}const Ali={add:Ge("add",6e4),plus:Ge("plus",6e4),gistNew:Ge("gist-new",6e4),repoCreate:Ge("repo-create",6e4),lightbulb:Ge("lightbulb",60001),lightBulb:Ge("light-bulb",60001),repo:Ge("repo",60002),repoDelete:Ge("repo-delete",60002),gistFork:Ge("gist-fork",60003),repoForked:Ge("repo-forked",60003),gitPullRequest:Ge("git-pull-request",60004),gitPullRequestAbandoned:Ge("git-pull-request-abandoned",60004),recordKeys:Ge("record-keys",60005),keyboard:Ge("keyboard",60005),tag:Ge("tag",60006),gitPullRequestLabel:Ge("git-pull-request-label",60006),tagAdd:Ge("tag-add",60006),tagRemove:Ge("tag-remove",60006),person:Ge("person",60007),personFollow:Ge("person-follow",60007),personOutline:Ge("person-outline",60007),personFilled:Ge("person-filled",60007),gitBranch:Ge("git-branch",60008),gitBranchCreate:Ge("git-branch-create",60008),gitBranchDelete:Ge("git-branch-delete",60008),sourceControl:Ge("source-control",60008),mirror:Ge("mirror",60009),mirrorPublic:Ge("mirror-public",60009),star:Ge("star",60010),starAdd:Ge("star-add",60010),starDelete:Ge("star-delete",60010),starEmpty:Ge("star-empty",60010),comment:Ge("comment",60011),commentAdd:Ge("comment-add",60011),alert:Ge("alert",60012),warning:Ge("warning",60012),search:Ge("search",60013),searchSave:Ge("search-save",60013),logOut:Ge("log-out",60014),signOut:Ge("sign-out",60014),logIn:Ge("log-in",60015),signIn:Ge("sign-in",60015),eye:Ge("eye",60016),eyeUnwatch:Ge("eye-unwatch",60016),eyeWatch:Ge("eye-watch",60016),circleFilled:Ge("circle-filled",60017),primitiveDot:Ge("primitive-dot",60017),closeDirty:Ge("close-dirty",60017),debugBreakpoint:Ge("debug-breakpoint",60017),debugBreakpointDisabled:Ge("debug-breakpoint-disabled",60017),debugHint:Ge("debug-hint",60017),terminalDecorationSuccess:Ge("terminal-decoration-success",60017),primitiveSquare:Ge("primitive-square",60018),edit:Ge("edit",60019),pencil:Ge("pencil",60019),info:Ge("info",60020),issueOpened:Ge("issue-opened",60020),gistPrivate:Ge("gist-private",60021),gitForkPrivate:Ge("git-fork-private",60021),lock:Ge("lock",60021),mirrorPrivate:Ge("mirror-private",60021),close:Ge("close",60022),removeClose:Ge("remove-close",60022),x:Ge("x",60022),repoSync:Ge("repo-sync",60023),sync:Ge("sync",60023),clone:Ge("clone",60024),desktopDownload:Ge("desktop-download",60024),beaker:Ge("beaker",60025),microscope:Ge("microscope",60025),vm:Ge("vm",60026),deviceDesktop:Ge("device-desktop",60026),file:Ge("file",60027),fileText:Ge("file-text",60027),more:Ge("more",60028),ellipsis:Ge("ellipsis",60028),kebabHorizontal:Ge("kebab-horizontal",60028),mailReply:Ge("mail-reply",60029),reply:Ge("reply",60029),organization:Ge("organization",60030),organizationFilled:Ge("organization-filled",60030),organizationOutline:Ge("organization-outline",60030),newFile:Ge("new-file",60031),fileAdd:Ge("file-add",60031),newFolder:Ge("new-folder",60032),fileDirectoryCreate:Ge("file-directory-create",60032),trash:Ge("trash",60033),trashcan:Ge("trashcan",60033),history:Ge("history",60034),clock:Ge("clock",60034),folder:Ge("folder",60035),fileDirectory:Ge("file-directory",60035),symbolFolder:Ge("symbol-folder",60035),logoGithub:Ge("logo-github",60036),markGithub:Ge("mark-github",60036),github:Ge("github",60036),terminal:Ge("terminal",60037),console:Ge("console",60037),repl:Ge("repl",60037),zap:Ge("zap",60038),symbolEvent:Ge("symbol-event",60038),error:Ge("error",60039),stop:Ge("stop",60039),variable:Ge("variable",60040),symbolVariable:Ge("symbol-variable",60040),array:Ge("array",60042),symbolArray:Ge("symbol-array",60042),symbolModule:Ge("symbol-module",60043),symbolPackage:Ge("symbol-package",60043),symbolNamespace:Ge("symbol-namespace",60043),symbolObject:Ge("symbol-object",60043),symbolMethod:Ge("symbol-method",60044),symbolFunction:Ge("symbol-function",60044),symbolConstructor:Ge("symbol-constructor",60044),symbolBoolean:Ge("symbol-boolean",60047),symbolNull:Ge("symbol-null",60047),symbolNumeric:Ge("symbol-numeric",60048),symbolNumber:Ge("symbol-number",60048),symbolStructure:Ge("symbol-structure",60049),symbolStruct:Ge("symbol-struct",60049),symbolParameter:Ge("symbol-parameter",60050),symbolTypeParameter:Ge("symbol-type-parameter",60050),symbolKey:Ge("symbol-key",60051),symbolText:Ge("symbol-text",60051),symbolReference:Ge("symbol-reference",60052),goToFile:Ge("go-to-file",60052),symbolEnum:Ge("symbol-enum",60053),symbolValue:Ge("symbol-value",60053),symbolRuler:Ge("symbol-ruler",60054),symbolUnit:Ge("symbol-unit",60054),activateBreakpoints:Ge("activate-breakpoints",60055),archive:Ge("archive",60056),arrowBoth:Ge("arrow-both",60057),arrowDown:Ge("arrow-down",60058),arrowLeft:Ge("arrow-left",60059),arrowRight:Ge("arrow-right",60060),arrowSmallDown:Ge("arrow-small-down",60061),arrowSmallLeft:Ge("arrow-small-left",60062),arrowSmallRight:Ge("arrow-small-right",60063),arrowSmallUp:Ge("arrow-small-up",60064),arrowUp:Ge("arrow-up",60065),bell:Ge("bell",60066),bold:Ge("bold",60067),book:Ge("book",60068),bookmark:Ge("bookmark",60069),debugBreakpointConditionalUnverified:Ge("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:Ge("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:Ge("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:Ge("debug-breakpoint-data-unverified",60072),debugBreakpointData:Ge("debug-breakpoint-data",60073),debugBreakpointDataDisabled:Ge("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:Ge("debug-breakpoint-log-unverified",60074),debugBreakpointLog:Ge("debug-breakpoint-log",60075),debugBreakpointLogDisabled:Ge("debug-breakpoint-log-disabled",60075),briefcase:Ge("briefcase",60076),broadcast:Ge("broadcast",60077),browser:Ge("browser",60078),bug:Ge("bug",60079),calendar:Ge("calendar",60080),caseSensitive:Ge("case-sensitive",60081),check:Ge("check",60082),checklist:Ge("checklist",60083),chevronDown:Ge("chevron-down",60084),chevronLeft:Ge("chevron-left",60085),chevronRight:Ge("chevron-right",60086),chevronUp:Ge("chevron-up",60087),chromeClose:Ge("chrome-close",60088),chromeMaximize:Ge("chrome-maximize",60089),chromeMinimize:Ge("chrome-minimize",60090),chromeRestore:Ge("chrome-restore",60091),circleOutline:Ge("circle-outline",60092),circle:Ge("circle",60092),debugBreakpointUnverified:Ge("debug-breakpoint-unverified",60092),terminalDecorationIncomplete:Ge("terminal-decoration-incomplete",60092),circleSlash:Ge("circle-slash",60093),circuitBoard:Ge("circuit-board",60094),clearAll:Ge("clear-all",60095),clippy:Ge("clippy",60096),closeAll:Ge("close-all",60097),cloudDownload:Ge("cloud-download",60098),cloudUpload:Ge("cloud-upload",60099),code:Ge("code",60100),collapseAll:Ge("collapse-all",60101),colorMode:Ge("color-mode",60102),commentDiscussion:Ge("comment-discussion",60103),creditCard:Ge("credit-card",60105),dash:Ge("dash",60108),dashboard:Ge("dashboard",60109),database:Ge("database",60110),debugContinue:Ge("debug-continue",60111),debugDisconnect:Ge("debug-disconnect",60112),debugPause:Ge("debug-pause",60113),debugRestart:Ge("debug-restart",60114),debugStart:Ge("debug-start",60115),debugStepInto:Ge("debug-step-into",60116),debugStepOut:Ge("debug-step-out",60117),debugStepOver:Ge("debug-step-over",60118),debugStop:Ge("debug-stop",60119),debug:Ge("debug",60120),deviceCameraVideo:Ge("device-camera-video",60121),deviceCamera:Ge("device-camera",60122),deviceMobile:Ge("device-mobile",60123),diffAdded:Ge("diff-added",60124),diffIgnored:Ge("diff-ignored",60125),diffModified:Ge("diff-modified",60126),diffRemoved:Ge("diff-removed",60127),diffRenamed:Ge("diff-renamed",60128),diff:Ge("diff",60129),diffSidebyside:Ge("diff-sidebyside",60129),discard:Ge("discard",60130),editorLayout:Ge("editor-layout",60131),emptyWindow:Ge("empty-window",60132),exclude:Ge("exclude",60133),extensions:Ge("extensions",60134),eyeClosed:Ge("eye-closed",60135),fileBinary:Ge("file-binary",60136),fileCode:Ge("file-code",60137),fileMedia:Ge("file-media",60138),filePdf:Ge("file-pdf",60139),fileSubmodule:Ge("file-submodule",60140),fileSymlinkDirectory:Ge("file-symlink-directory",60141),fileSymlinkFile:Ge("file-symlink-file",60142),fileZip:Ge("file-zip",60143),files:Ge("files",60144),filter:Ge("filter",60145),flame:Ge("flame",60146),foldDown:Ge("fold-down",60147),foldUp:Ge("fold-up",60148),fold:Ge("fold",60149),folderActive:Ge("folder-active",60150),folderOpened:Ge("folder-opened",60151),gear:Ge("gear",60152),gift:Ge("gift",60153),gistSecret:Ge("gist-secret",60154),gist:Ge("gist",60155),gitCommit:Ge("git-commit",60156),gitCompare:Ge("git-compare",60157),compareChanges:Ge("compare-changes",60157),gitMerge:Ge("git-merge",60158),githubAction:Ge("github-action",60159),githubAlt:Ge("github-alt",60160),globe:Ge("globe",60161),grabber:Ge("grabber",60162),graph:Ge("graph",60163),gripper:Ge("gripper",60164),heart:Ge("heart",60165),home:Ge("home",60166),horizontalRule:Ge("horizontal-rule",60167),hubot:Ge("hubot",60168),inbox:Ge("inbox",60169),issueReopened:Ge("issue-reopened",60171),issues:Ge("issues",60172),italic:Ge("italic",60173),jersey:Ge("jersey",60174),json:Ge("json",60175),kebabVertical:Ge("kebab-vertical",60176),key:Ge("key",60177),law:Ge("law",60178),lightbulbAutofix:Ge("lightbulb-autofix",60179),linkExternal:Ge("link-external",60180),link:Ge("link",60181),listOrdered:Ge("list-ordered",60182),listUnordered:Ge("list-unordered",60183),liveShare:Ge("live-share",60184),loading:Ge("loading",60185),location:Ge("location",60186),mailRead:Ge("mail-read",60187),mail:Ge("mail",60188),markdown:Ge("markdown",60189),megaphone:Ge("megaphone",60190),mention:Ge("mention",60191),milestone:Ge("milestone",60192),gitPullRequestMilestone:Ge("git-pull-request-milestone",60192),mortarBoard:Ge("mortar-board",60193),move:Ge("move",60194),multipleWindows:Ge("multiple-windows",60195),mute:Ge("mute",60196),noNewline:Ge("no-newline",60197),note:Ge("note",60198),octoface:Ge("octoface",60199),openPreview:Ge("open-preview",60200),package:Ge("package",60201),paintcan:Ge("paintcan",60202),pin:Ge("pin",60203),play:Ge("play",60204),run:Ge("run",60204),plug:Ge("plug",60205),preserveCase:Ge("preserve-case",60206),preview:Ge("preview",60207),project:Ge("project",60208),pulse:Ge("pulse",60209),question:Ge("question",60210),quote:Ge("quote",60211),radioTower:Ge("radio-tower",60212),reactions:Ge("reactions",60213),references:Ge("references",60214),refresh:Ge("refresh",60215),regex:Ge("regex",60216),remoteExplorer:Ge("remote-explorer",60217),remote:Ge("remote",60218),remove:Ge("remove",60219),replaceAll:Ge("replace-all",60220),replace:Ge("replace",60221),repoClone:Ge("repo-clone",60222),repoForcePush:Ge("repo-force-push",60223),repoPull:Ge("repo-pull",60224),repoPush:Ge("repo-push",60225),report:Ge("report",60226),requestChanges:Ge("request-changes",60227),rocket:Ge("rocket",60228),rootFolderOpened:Ge("root-folder-opened",60229),rootFolder:Ge("root-folder",60230),rss:Ge("rss",60231),ruby:Ge("ruby",60232),saveAll:Ge("save-all",60233),saveAs:Ge("save-as",60234),save:Ge("save",60235),screenFull:Ge("screen-full",60236),screenNormal:Ge("screen-normal",60237),searchStop:Ge("search-stop",60238),server:Ge("server",60240),settingsGear:Ge("settings-gear",60241),settings:Ge("settings",60242),shield:Ge("shield",60243),smiley:Ge("smiley",60244),sortPrecedence:Ge("sort-precedence",60245),splitHorizontal:Ge("split-horizontal",60246),splitVertical:Ge("split-vertical",60247),squirrel:Ge("squirrel",60248),starFull:Ge("star-full",60249),starHalf:Ge("star-half",60250),symbolClass:Ge("symbol-class",60251),symbolColor:Ge("symbol-color",60252),symbolConstant:Ge("symbol-constant",60253),symbolEnumMember:Ge("symbol-enum-member",60254),symbolField:Ge("symbol-field",60255),symbolFile:Ge("symbol-file",60256),symbolInterface:Ge("symbol-interface",60257),symbolKeyword:Ge("symbol-keyword",60258),symbolMisc:Ge("symbol-misc",60259),symbolOperator:Ge("symbol-operator",60260),symbolProperty:Ge("symbol-property",60261),wrench:Ge("wrench",60261),wrenchSubaction:Ge("wrench-subaction",60261),symbolSnippet:Ge("symbol-snippet",60262),tasklist:Ge("tasklist",60263),telescope:Ge("telescope",60264),textSize:Ge("text-size",60265),threeBars:Ge("three-bars",60266),thumbsdown:Ge("thumbsdown",60267),thumbsup:Ge("thumbsup",60268),tools:Ge("tools",60269),triangleDown:Ge("triangle-down",60270),triangleLeft:Ge("triangle-left",60271),triangleRight:Ge("triangle-right",60272),triangleUp:Ge("triangle-up",60273),twitter:Ge("twitter",60274),unfold:Ge("unfold",60275),unlock:Ge("unlock",60276),unmute:Ge("unmute",60277),unverified:Ge("unverified",60278),verified:Ge("verified",60279),versions:Ge("versions",60280),vmActive:Ge("vm-active",60281),vmOutline:Ge("vm-outline",60282),vmRunning:Ge("vm-running",60283),watch:Ge("watch",60284),whitespace:Ge("whitespace",60285),wholeWord:Ge("whole-word",60286),window:Ge("window",60287),wordWrap:Ge("word-wrap",60288),zoomIn:Ge("zoom-in",60289),zoomOut:Ge("zoom-out",60290),listFilter:Ge("list-filter",60291),listFlat:Ge("list-flat",60292),listSelection:Ge("list-selection",60293),selection:Ge("selection",60293),listTree:Ge("list-tree",60294),debugBreakpointFunctionUnverified:Ge("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:Ge("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:Ge("debug-breakpoint-function-disabled",60296),debugStackframeActive:Ge("debug-stackframe-active",60297),circleSmallFilled:Ge("circle-small-filled",60298),debugStackframeDot:Ge("debug-stackframe-dot",60298),terminalDecorationMark:Ge("terminal-decoration-mark",60298),debugStackframe:Ge("debug-stackframe",60299),debugStackframeFocused:Ge("debug-stackframe-focused",60299),debugBreakpointUnsupported:Ge("debug-breakpoint-unsupported",60300),symbolString:Ge("symbol-string",60301),debugReverseContinue:Ge("debug-reverse-continue",60302),debugStepBack:Ge("debug-step-back",60303),debugRestartFrame:Ge("debug-restart-frame",60304),debugAlt:Ge("debug-alt",60305),callIncoming:Ge("call-incoming",60306),callOutgoing:Ge("call-outgoing",60307),menu:Ge("menu",60308),expandAll:Ge("expand-all",60309),feedback:Ge("feedback",60310),gitPullRequestReviewer:Ge("git-pull-request-reviewer",60310),groupByRefType:Ge("group-by-ref-type",60311),ungroupByRefType:Ge("ungroup-by-ref-type",60312),account:Ge("account",60313),gitPullRequestAssignee:Ge("git-pull-request-assignee",60313),bellDot:Ge("bell-dot",60314),debugConsole:Ge("debug-console",60315),library:Ge("library",60316),output:Ge("output",60317),runAll:Ge("run-all",60318),syncIgnored:Ge("sync-ignored",60319),pinned:Ge("pinned",60320),githubInverted:Ge("github-inverted",60321),serverProcess:Ge("server-process",60322),serverEnvironment:Ge("server-environment",60323),pass:Ge("pass",60324),issueClosed:Ge("issue-closed",60324),stopCircle:Ge("stop-circle",60325),playCircle:Ge("play-circle",60326),record:Ge("record",60327),debugAltSmall:Ge("debug-alt-small",60328),vmConnect:Ge("vm-connect",60329),cloud:Ge("cloud",60330),merge:Ge("merge",60331),export:Ge("export",60332),graphLeft:Ge("graph-left",60333),magnet:Ge("magnet",60334),notebook:Ge("notebook",60335),redo:Ge("redo",60336),checkAll:Ge("check-all",60337),pinnedDirty:Ge("pinned-dirty",60338),passFilled:Ge("pass-filled",60339),circleLargeFilled:Ge("circle-large-filled",60340),circleLarge:Ge("circle-large",60341),circleLargeOutline:Ge("circle-large-outline",60341),combine:Ge("combine",60342),gather:Ge("gather",60342),table:Ge("table",60343),variableGroup:Ge("variable-group",60344),typeHierarchy:Ge("type-hierarchy",60345),typeHierarchySub:Ge("type-hierarchy-sub",60346),typeHierarchySuper:Ge("type-hierarchy-super",60347),gitPullRequestCreate:Ge("git-pull-request-create",60348),runAbove:Ge("run-above",60349),runBelow:Ge("run-below",60350),notebookTemplate:Ge("notebook-template",60351),debugRerun:Ge("debug-rerun",60352),workspaceTrusted:Ge("workspace-trusted",60353),workspaceUntrusted:Ge("workspace-untrusted",60354),workspaceUnknown:Ge("workspace-unknown",60355),terminalCmd:Ge("terminal-cmd",60356),terminalDebian:Ge("terminal-debian",60357),terminalLinux:Ge("terminal-linux",60358),terminalPowershell:Ge("terminal-powershell",60359),terminalTmux:Ge("terminal-tmux",60360),terminalUbuntu:Ge("terminal-ubuntu",60361),terminalBash:Ge("terminal-bash",60362),arrowSwap:Ge("arrow-swap",60363),copy:Ge("copy",60364),personAdd:Ge("person-add",60365),filterFilled:Ge("filter-filled",60366),wand:Ge("wand",60367),debugLineByLine:Ge("debug-line-by-line",60368),inspect:Ge("inspect",60369),layers:Ge("layers",60370),layersDot:Ge("layers-dot",60371),layersActive:Ge("layers-active",60372),compass:Ge("compass",60373),compassDot:Ge("compass-dot",60374),compassActive:Ge("compass-active",60375),azure:Ge("azure",60376),issueDraft:Ge("issue-draft",60377),gitPullRequestClosed:Ge("git-pull-request-closed",60378),gitPullRequestDraft:Ge("git-pull-request-draft",60379),debugAll:Ge("debug-all",60380),debugCoverage:Ge("debug-coverage",60381),runErrors:Ge("run-errors",60382),folderLibrary:Ge("folder-library",60383),debugContinueSmall:Ge("debug-continue-small",60384),beakerStop:Ge("beaker-stop",60385),graphLine:Ge("graph-line",60386),graphScatter:Ge("graph-scatter",60387),pieChart:Ge("pie-chart",60388),bracket:Ge("bracket",60175),bracketDot:Ge("bracket-dot",60389),bracketError:Ge("bracket-error",60390),lockSmall:Ge("lock-small",60391),azureDevops:Ge("azure-devops",60392),verifiedFilled:Ge("verified-filled",60393),newline:Ge("newline",60394),layout:Ge("layout",60395),layoutActivitybarLeft:Ge("layout-activitybar-left",60396),layoutActivitybarRight:Ge("layout-activitybar-right",60397),layoutPanelLeft:Ge("layout-panel-left",60398),layoutPanelCenter:Ge("layout-panel-center",60399),layoutPanelJustify:Ge("layout-panel-justify",60400),layoutPanelRight:Ge("layout-panel-right",60401),layoutPanel:Ge("layout-panel",60402),layoutSidebarLeft:Ge("layout-sidebar-left",60403),layoutSidebarRight:Ge("layout-sidebar-right",60404),layoutStatusbar:Ge("layout-statusbar",60405),layoutMenubar:Ge("layout-menubar",60406),layoutCentered:Ge("layout-centered",60407),target:Ge("target",60408),indent:Ge("indent",60409),recordSmall:Ge("record-small",60410),errorSmall:Ge("error-small",60411),terminalDecorationError:Ge("terminal-decoration-error",60411),arrowCircleDown:Ge("arrow-circle-down",60412),arrowCircleLeft:Ge("arrow-circle-left",60413),arrowCircleRight:Ge("arrow-circle-right",60414),arrowCircleUp:Ge("arrow-circle-up",60415),layoutSidebarRightOff:Ge("layout-sidebar-right-off",60416),layoutPanelOff:Ge("layout-panel-off",60417),layoutSidebarLeftOff:Ge("layout-sidebar-left-off",60418),blank:Ge("blank",60419),heartFilled:Ge("heart-filled",60420),map:Ge("map",60421),mapHorizontal:Ge("map-horizontal",60421),foldHorizontal:Ge("fold-horizontal",60421),mapFilled:Ge("map-filled",60422),mapHorizontalFilled:Ge("map-horizontal-filled",60422),foldHorizontalFilled:Ge("fold-horizontal-filled",60422),circleSmall:Ge("circle-small",60423),bellSlash:Ge("bell-slash",60424),bellSlashDot:Ge("bell-slash-dot",60425),commentUnresolved:Ge("comment-unresolved",60426),gitPullRequestGoToChanges:Ge("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:Ge("git-pull-request-new-changes",60428),searchFuzzy:Ge("search-fuzzy",60429),commentDraft:Ge("comment-draft",60430),send:Ge("send",60431),sparkle:Ge("sparkle",60432),insert:Ge("insert",60433),mic:Ge("mic",60434),thumbsdownFilled:Ge("thumbsdown-filled",60435),thumbsupFilled:Ge("thumbsup-filled",60436),coffee:Ge("coffee",60437),snake:Ge("snake",60438),game:Ge("game",60439),vr:Ge("vr",60440),chip:Ge("chip",60441),piano:Ge("piano",60442),music:Ge("music",60443),micFilled:Ge("mic-filled",60444),repoFetch:Ge("repo-fetch",60445),copilot:Ge("copilot",60446),lightbulbSparkle:Ge("lightbulb-sparkle",60447),robot:Ge("robot",60448),sparkleFilled:Ge("sparkle-filled",60449),diffSingle:Ge("diff-single",60450),diffMultiple:Ge("diff-multiple",60451),surroundWith:Ge("surround-with",60452),share:Ge("share",60453),gitStash:Ge("git-stash",60454),gitStashApply:Ge("git-stash-apply",60455),gitStashPop:Ge("git-stash-pop",60456),vscode:Ge("vscode",60457),vscodeInsiders:Ge("vscode-insiders",60458),codeOss:Ge("code-oss",60459),runCoverage:Ge("run-coverage",60460),runAllCoverage:Ge("run-all-coverage",60461),coverage:Ge("coverage",60462),githubProject:Ge("github-project",60463),mapVertical:Ge("map-vertical",60464),foldVertical:Ge("fold-vertical",60464),mapVerticalFilled:Ge("map-vertical-filled",60465),foldVerticalFilled:Ge("fold-vertical-filled",60465),goToSearch:Ge("go-to-search",60466),percentage:Ge("percentage",60467),sortPercentage:Ge("sort-percentage",60467),attach:Ge("attach",60468)},Oli={dialogError:Ge("dialog-error","error"),dialogWarning:Ge("dialog-warning","warning"),dialogInfo:Ge("dialog-info","info"),dialogClose:Ge("dialog-close","close"),treeItemExpanded:Ge("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:Ge("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:Ge("tree-filter-on-type-off","list-selection"),treeFilterClear:Ge("tree-filter-clear","close"),treeItemLoading:Ge("tree-item-loading","loading"),menuSelection:Ge("menu-selection","check"),menuSubmenu:Ge("menu-submenu","chevron-right"),menuBarMore:Ge("menubar-more","more"),scrollbarButtonLeft:Ge("scrollbar-button-left","triangle-left"),scrollbarButtonRight:Ge("scrollbar-button-right","triangle-right"),scrollbarButtonUp:Ge("scrollbar-button-up","triangle-up"),scrollbarButtonDown:Ge("scrollbar-button-down","triangle-down"),toolBarMore:Ge("toolbar-more","more"),quickInputBack:Ge("quick-input-back","arrow-left"),dropDownButton:Ge("drop-down-button",60084),symbolCustomColor:Ge("symbol-customcolor",60252),exportIcon:Ge("export",60332),workspaceUnspecified:Ge("workspace-unspecified",60355),newLine:Ge("newline",60394),thumbsDownFilled:Ge("thumbsdown-filled",60435),thumbsUpFilled:Ge("thumbsup-filled",60436),gitFetch:Ge("git-fetch",60445),lightbulbSparkleAutofix:Ge("lightbulb-sparkle-autofix",60447),debugBreakpointPending:Ge("debug-breakpoint-pending",60377)},pr={...Ali,...Oli};let Gkt=class{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new gi,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,i){return this._tokenizationSupports.set(e,i),this.handleChange([e]),fo(()=>{this._tokenizationSupports.get(e)===i&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,i){var s;(s=this._factories.get(e))==null||s.dispose();const n=new Mli(this,e,i);return this._factories.set(e,n),fo(()=>{const c=this._factories.get(e);!c||c!==n||(this._factories.delete(e),c.dispose())})}async getOrCreate(e){const i=this.get(e);if(i)return i;const n=this._factories.get(e);return!n||n.isResolved?null:(await n.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;const n=this._factories.get(e);return!!(!n||n.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}};class Mli extends xi{get isResolved(){return this._isResolved}constructor(e,i,n){super(),this._registry=e,this._languageId=i,this._factory=n,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}let Pne=class{constructor(e,i,n){this.offset=e,this.type=i,this.language=n,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}};class Qqe{constructor(e,i){this.tokens=e,this.endState=i,this._tokenizationResultBrand=void 0}}class ISe{constructor(e,i){this.tokens=e,this.endState=i,this._encodedTokenizationResultBrand=void 0}}var VC;(function(l){l[l.Increase=0]="Increase",l[l.Decrease=1]="Decrease"})(VC||(VC={}));var Ane;(function(l){const e=new Map;e.set(0,pr.symbolMethod),e.set(1,pr.symbolFunction),e.set(2,pr.symbolConstructor),e.set(3,pr.symbolField),e.set(4,pr.symbolVariable),e.set(5,pr.symbolClass),e.set(6,pr.symbolStruct),e.set(7,pr.symbolInterface),e.set(8,pr.symbolModule),e.set(9,pr.symbolProperty),e.set(10,pr.symbolEvent),e.set(11,pr.symbolOperator),e.set(12,pr.symbolUnit),e.set(13,pr.symbolValue),e.set(15,pr.symbolEnum),e.set(14,pr.symbolConstant),e.set(15,pr.symbolEnum),e.set(16,pr.symbolEnumMember),e.set(17,pr.symbolKeyword),e.set(27,pr.symbolSnippet),e.set(18,pr.symbolText),e.set(19,pr.symbolColor),e.set(20,pr.symbolFile),e.set(21,pr.symbolReference),e.set(22,pr.symbolCustomColor),e.set(23,pr.symbolFolder),e.set(24,pr.symbolTypeParameter),e.set(25,pr.account),e.set(26,pr.issues);function i(c){let d=e.get(c);return d||(console.info("No codicon found for CompletionItemKind "+c),d=pr.symbolProperty),d}l.toIcon=i;const n=new Map;n.set("method",0),n.set("function",1),n.set("constructor",2),n.set("field",3),n.set("variable",4),n.set("class",5),n.set("struct",6),n.set("interface",7),n.set("module",8),n.set("property",9),n.set("event",10),n.set("operator",11),n.set("unit",12),n.set("value",13),n.set("constant",14),n.set("enum",15),n.set("enum-member",16),n.set("enumMember",16),n.set("keyword",17),n.set("snippet",27),n.set("text",18),n.set("color",19),n.set("file",20),n.set("reference",21),n.set("customcolor",22),n.set("folder",23),n.set("type-parameter",24),n.set("typeParameter",24),n.set("account",25),n.set("issue",26);function s(c,d){let f=n.get(c);return typeof f>"u"&&!d&&(f=9),f}l.fromString=s})(Ane||(Ane={}));var OE;(function(l){l[l.Automatic=0]="Automatic",l[l.Explicit=1]="Explicit"})(OE||(OE={}));class Kkt{constructor(e,i,n,s){this.range=e,this.text=i,this.completionKind=n,this.isSnippetText=s}equals(e){return nt.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}}var One;(function(l){l[l.Automatic=0]="Automatic",l[l.PasteAs=1]="PasteAs"})(One||(One={}));var kL;(function(l){l[l.Invoke=1]="Invoke",l[l.TriggerCharacter=2]="TriggerCharacter",l[l.ContentChange=3]="ContentChange"})(kL||(kL={}));var x$;(function(l){l[l.Text=0]="Text",l[l.Read=1]="Read",l[l.Write=2]="Write"})(x$||(x$={}));function Rli(l){return l&&yo.isUri(l.uri)&&nt.isIRange(l.range)&&(nt.isIRange(l.originSelectionRange)||nt.isIRange(l.targetSelectionRange))}const Fli={17:W("Array","array"),16:W("Boolean","boolean"),4:W("Class","class"),13:W("Constant","constant"),8:W("Constructor","constructor"),9:W("Enum","enumeration"),21:W("EnumMember","enumeration member"),23:W("Event","event"),7:W("Field","field"),0:W("File","file"),11:W("Function","function"),10:W("Interface","interface"),19:W("Key","key"),5:W("Method","method"),1:W("Module","module"),2:W("Namespace","namespace"),20:W("Null","null"),15:W("Number","number"),18:W("Object","object"),24:W("Operator","operator"),3:W("Package","package"),6:W("Property","property"),14:W("String","string"),22:W("Struct","struct"),25:W("TypeParameter","type parameter"),12:W("Variable","variable")};function Bli(l,e){return W("symbolAriaLabel","{0} ({1})",l,Fli[e])}var Y1e;(function(l){const e=new Map;e.set(0,pr.symbolFile),e.set(1,pr.symbolModule),e.set(2,pr.symbolNamespace),e.set(3,pr.symbolPackage),e.set(4,pr.symbolClass),e.set(5,pr.symbolMethod),e.set(6,pr.symbolProperty),e.set(7,pr.symbolField),e.set(8,pr.symbolConstructor),e.set(9,pr.symbolEnum),e.set(10,pr.symbolInterface),e.set(11,pr.symbolFunction),e.set(12,pr.symbolVariable),e.set(13,pr.symbolConstant),e.set(14,pr.symbolString),e.set(15,pr.symbolNumber),e.set(16,pr.symbolBoolean),e.set(17,pr.symbolArray),e.set(18,pr.symbolObject),e.set(19,pr.symbolKey),e.set(20,pr.symbolNull),e.set(21,pr.symbolEnumMember),e.set(22,pr.symbolStruct),e.set(23,pr.symbolEvent),e.set(24,pr.symbolOperator),e.set(25,pr.symbolTypeParameter);function i(n){let s=e.get(n);return s||(console.info("No codicon found for SymbolKind "+n),s=pr.symbolProperty),s}l.toIcon=i})(Y1e||(Y1e={}));const nT=class nT{static fromValue(e){switch(e){case"comment":return nT.Comment;case"imports":return nT.Imports;case"region":return nT.Region}return new nT(e)}constructor(e){this.value=e}};nT.Comment=new nT("comment"),nT.Imports=new nT("imports"),nT.Region=new nT("region");let yR=nT;var bBe;(function(l){l[l.AIGenerated=1]="AIGenerated"})(bBe||(bBe={}));var Mne;(function(l){l[l.Invoke=0]="Invoke",l[l.Automatic=1]="Automatic"})(Mne||(Mne={}));var CBe;(function(l){function e(i){return!i||typeof i!="object"?!1:typeof i.id=="string"&&typeof i.title=="string"}l.is=e})(CBe||(CBe={}));var eye;(function(l){l[l.Type=1]="Type",l[l.Parameter=2]="Parameter"})(eye||(eye={}));class Wli{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(e=>{e&&e.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}const Oh=new Gkt,SBe=new Gkt;var tye;(function(l){l[l.Invoke=0]="Invoke",l[l.Automatic=1]="Automatic"})(tye||(tye={}));var wBe;(function(l){l[l.Unknown=0]="Unknown",l[l.Disabled=1]="Disabled",l[l.Enabled=2]="Enabled"})(wBe||(wBe={}));var xBe;(function(l){l[l.Invoke=1]="Invoke",l[l.Auto=2]="Auto"})(xBe||(xBe={}));var kBe;(function(l){l[l.None=0]="None",l[l.KeepWhitespace=1]="KeepWhitespace",l[l.InsertAsSnippet=4]="InsertAsSnippet"})(kBe||(kBe={}));var TBe;(function(l){l[l.Method=0]="Method",l[l.Function=1]="Function",l[l.Constructor=2]="Constructor",l[l.Field=3]="Field",l[l.Variable=4]="Variable",l[l.Class=5]="Class",l[l.Struct=6]="Struct",l[l.Interface=7]="Interface",l[l.Module=8]="Module",l[l.Property=9]="Property",l[l.Event=10]="Event",l[l.Operator=11]="Operator",l[l.Unit=12]="Unit",l[l.Value=13]="Value",l[l.Constant=14]="Constant",l[l.Enum=15]="Enum",l[l.EnumMember=16]="EnumMember",l[l.Keyword=17]="Keyword",l[l.Text=18]="Text",l[l.Color=19]="Color",l[l.File=20]="File",l[l.Reference=21]="Reference",l[l.Customcolor=22]="Customcolor",l[l.Folder=23]="Folder",l[l.TypeParameter=24]="TypeParameter",l[l.User=25]="User",l[l.Issue=26]="Issue",l[l.Snippet=27]="Snippet"})(TBe||(TBe={}));var DBe;(function(l){l[l.Deprecated=1]="Deprecated"})(DBe||(DBe={}));var EBe;(function(l){l[l.Invoke=0]="Invoke",l[l.TriggerCharacter=1]="TriggerCharacter",l[l.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(EBe||(EBe={}));var IBe;(function(l){l[l.EXACT=0]="EXACT",l[l.ABOVE=1]="ABOVE",l[l.BELOW=2]="BELOW"})(IBe||(IBe={}));var NBe;(function(l){l[l.NotSet=0]="NotSet",l[l.ContentFlush=1]="ContentFlush",l[l.RecoverFromMarkers=2]="RecoverFromMarkers",l[l.Explicit=3]="Explicit",l[l.Paste=4]="Paste",l[l.Undo=5]="Undo",l[l.Redo=6]="Redo"})(NBe||(NBe={}));var LBe;(function(l){l[l.LF=1]="LF",l[l.CRLF=2]="CRLF"})(LBe||(LBe={}));var PBe;(function(l){l[l.Text=0]="Text",l[l.Read=1]="Read",l[l.Write=2]="Write"})(PBe||(PBe={}));var ABe;(function(l){l[l.None=0]="None",l[l.Keep=1]="Keep",l[l.Brackets=2]="Brackets",l[l.Advanced=3]="Advanced",l[l.Full=4]="Full"})(ABe||(ABe={}));var OBe;(function(l){l[l.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",l[l.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",l[l.accessibilitySupport=2]="accessibilitySupport",l[l.accessibilityPageSize=3]="accessibilityPageSize",l[l.ariaLabel=4]="ariaLabel",l[l.ariaRequired=5]="ariaRequired",l[l.autoClosingBrackets=6]="autoClosingBrackets",l[l.autoClosingComments=7]="autoClosingComments",l[l.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",l[l.autoClosingDelete=9]="autoClosingDelete",l[l.autoClosingOvertype=10]="autoClosingOvertype",l[l.autoClosingQuotes=11]="autoClosingQuotes",l[l.autoIndent=12]="autoIndent",l[l.automaticLayout=13]="automaticLayout",l[l.autoSurround=14]="autoSurround",l[l.bracketPairColorization=15]="bracketPairColorization",l[l.guides=16]="guides",l[l.codeLens=17]="codeLens",l[l.codeLensFontFamily=18]="codeLensFontFamily",l[l.codeLensFontSize=19]="codeLensFontSize",l[l.colorDecorators=20]="colorDecorators",l[l.colorDecoratorsLimit=21]="colorDecoratorsLimit",l[l.columnSelection=22]="columnSelection",l[l.comments=23]="comments",l[l.contextmenu=24]="contextmenu",l[l.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",l[l.cursorBlinking=26]="cursorBlinking",l[l.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",l[l.cursorStyle=28]="cursorStyle",l[l.cursorSurroundingLines=29]="cursorSurroundingLines",l[l.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",l[l.cursorWidth=31]="cursorWidth",l[l.disableLayerHinting=32]="disableLayerHinting",l[l.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",l[l.domReadOnly=34]="domReadOnly",l[l.dragAndDrop=35]="dragAndDrop",l[l.dropIntoEditor=36]="dropIntoEditor",l[l.emptySelectionClipboard=37]="emptySelectionClipboard",l[l.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",l[l.extraEditorClassName=39]="extraEditorClassName",l[l.fastScrollSensitivity=40]="fastScrollSensitivity",l[l.find=41]="find",l[l.fixedOverflowWidgets=42]="fixedOverflowWidgets",l[l.folding=43]="folding",l[l.foldingStrategy=44]="foldingStrategy",l[l.foldingHighlight=45]="foldingHighlight",l[l.foldingImportsByDefault=46]="foldingImportsByDefault",l[l.foldingMaximumRegions=47]="foldingMaximumRegions",l[l.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",l[l.fontFamily=49]="fontFamily",l[l.fontInfo=50]="fontInfo",l[l.fontLigatures=51]="fontLigatures",l[l.fontSize=52]="fontSize",l[l.fontWeight=53]="fontWeight",l[l.fontVariations=54]="fontVariations",l[l.formatOnPaste=55]="formatOnPaste",l[l.formatOnType=56]="formatOnType",l[l.glyphMargin=57]="glyphMargin",l[l.gotoLocation=58]="gotoLocation",l[l.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",l[l.hover=60]="hover",l[l.inDiffEditor=61]="inDiffEditor",l[l.inlineSuggest=62]="inlineSuggest",l[l.inlineEdit=63]="inlineEdit",l[l.letterSpacing=64]="letterSpacing",l[l.lightbulb=65]="lightbulb",l[l.lineDecorationsWidth=66]="lineDecorationsWidth",l[l.lineHeight=67]="lineHeight",l[l.lineNumbers=68]="lineNumbers",l[l.lineNumbersMinChars=69]="lineNumbersMinChars",l[l.linkedEditing=70]="linkedEditing",l[l.links=71]="links",l[l.matchBrackets=72]="matchBrackets",l[l.minimap=73]="minimap",l[l.mouseStyle=74]="mouseStyle",l[l.mouseWheelScrollSensitivity=75]="mouseWheelScrollSensitivity",l[l.mouseWheelZoom=76]="mouseWheelZoom",l[l.multiCursorMergeOverlapping=77]="multiCursorMergeOverlapping",l[l.multiCursorModifier=78]="multiCursorModifier",l[l.multiCursorPaste=79]="multiCursorPaste",l[l.multiCursorLimit=80]="multiCursorLimit",l[l.occurrencesHighlight=81]="occurrencesHighlight",l[l.overviewRulerBorder=82]="overviewRulerBorder",l[l.overviewRulerLanes=83]="overviewRulerLanes",l[l.padding=84]="padding",l[l.pasteAs=85]="pasteAs",l[l.parameterHints=86]="parameterHints",l[l.peekWidgetDefaultFocus=87]="peekWidgetDefaultFocus",l[l.placeholder=88]="placeholder",l[l.definitionLinkOpensInPeek=89]="definitionLinkOpensInPeek",l[l.quickSuggestions=90]="quickSuggestions",l[l.quickSuggestionsDelay=91]="quickSuggestionsDelay",l[l.readOnly=92]="readOnly",l[l.readOnlyMessage=93]="readOnlyMessage",l[l.renameOnType=94]="renameOnType",l[l.renderControlCharacters=95]="renderControlCharacters",l[l.renderFinalNewline=96]="renderFinalNewline",l[l.renderLineHighlight=97]="renderLineHighlight",l[l.renderLineHighlightOnlyWhenFocus=98]="renderLineHighlightOnlyWhenFocus",l[l.renderValidationDecorations=99]="renderValidationDecorations",l[l.renderWhitespace=100]="renderWhitespace",l[l.revealHorizontalRightPadding=101]="revealHorizontalRightPadding",l[l.roundedSelection=102]="roundedSelection",l[l.rulers=103]="rulers",l[l.scrollbar=104]="scrollbar",l[l.scrollBeyondLastColumn=105]="scrollBeyondLastColumn",l[l.scrollBeyondLastLine=106]="scrollBeyondLastLine",l[l.scrollPredominantAxis=107]="scrollPredominantAxis",l[l.selectionClipboard=108]="selectionClipboard",l[l.selectionHighlight=109]="selectionHighlight",l[l.selectOnLineNumbers=110]="selectOnLineNumbers",l[l.showFoldingControls=111]="showFoldingControls",l[l.showUnused=112]="showUnused",l[l.snippetSuggestions=113]="snippetSuggestions",l[l.smartSelect=114]="smartSelect",l[l.smoothScrolling=115]="smoothScrolling",l[l.stickyScroll=116]="stickyScroll",l[l.stickyTabStops=117]="stickyTabStops",l[l.stopRenderingLineAfter=118]="stopRenderingLineAfter",l[l.suggest=119]="suggest",l[l.suggestFontSize=120]="suggestFontSize",l[l.suggestLineHeight=121]="suggestLineHeight",l[l.suggestOnTriggerCharacters=122]="suggestOnTriggerCharacters",l[l.suggestSelection=123]="suggestSelection",l[l.tabCompletion=124]="tabCompletion",l[l.tabIndex=125]="tabIndex",l[l.unicodeHighlighting=126]="unicodeHighlighting",l[l.unusualLineTerminators=127]="unusualLineTerminators",l[l.useShadowDOM=128]="useShadowDOM",l[l.useTabStops=129]="useTabStops",l[l.wordBreak=130]="wordBreak",l[l.wordSegmenterLocales=131]="wordSegmenterLocales",l[l.wordSeparators=132]="wordSeparators",l[l.wordWrap=133]="wordWrap",l[l.wordWrapBreakAfterCharacters=134]="wordWrapBreakAfterCharacters",l[l.wordWrapBreakBeforeCharacters=135]="wordWrapBreakBeforeCharacters",l[l.wordWrapColumn=136]="wordWrapColumn",l[l.wordWrapOverride1=137]="wordWrapOverride1",l[l.wordWrapOverride2=138]="wordWrapOverride2",l[l.wrappingIndent=139]="wrappingIndent",l[l.wrappingStrategy=140]="wrappingStrategy",l[l.showDeprecated=141]="showDeprecated",l[l.inlayHints=142]="inlayHints",l[l.editorClassName=143]="editorClassName",l[l.pixelRatio=144]="pixelRatio",l[l.tabFocusMode=145]="tabFocusMode",l[l.layoutInfo=146]="layoutInfo",l[l.wrappingInfo=147]="wrappingInfo",l[l.defaultColorDecorators=148]="defaultColorDecorators",l[l.colorDecoratorsActivatedOn=149]="colorDecoratorsActivatedOn",l[l.inlineCompletionsAccessibilityVerbose=150]="inlineCompletionsAccessibilityVerbose"})(OBe||(OBe={}));var MBe;(function(l){l[l.TextDefined=0]="TextDefined",l[l.LF=1]="LF",l[l.CRLF=2]="CRLF"})(MBe||(MBe={}));var RBe;(function(l){l[l.LF=0]="LF",l[l.CRLF=1]="CRLF"})(RBe||(RBe={}));var FBe;(function(l){l[l.Left=1]="Left",l[l.Center=2]="Center",l[l.Right=3]="Right"})(FBe||(FBe={}));var BBe;(function(l){l[l.Increase=0]="Increase",l[l.Decrease=1]="Decrease"})(BBe||(BBe={}));var WBe;(function(l){l[l.None=0]="None",l[l.Indent=1]="Indent",l[l.IndentOutdent=2]="IndentOutdent",l[l.Outdent=3]="Outdent"})(WBe||(WBe={}));var VBe;(function(l){l[l.Both=0]="Both",l[l.Right=1]="Right",l[l.Left=2]="Left",l[l.None=3]="None"})(VBe||(VBe={}));var HBe;(function(l){l[l.Type=1]="Type",l[l.Parameter=2]="Parameter"})(HBe||(HBe={}));var jBe;(function(l){l[l.Automatic=0]="Automatic",l[l.Explicit=1]="Explicit"})(jBe||(jBe={}));var zBe;(function(l){l[l.Invoke=0]="Invoke",l[l.Automatic=1]="Automatic"})(zBe||(zBe={}));var UBe;(function(l){l[l.DependsOnKbLayout=-1]="DependsOnKbLayout",l[l.Unknown=0]="Unknown",l[l.Backspace=1]="Backspace",l[l.Tab=2]="Tab",l[l.Enter=3]="Enter",l[l.Shift=4]="Shift",l[l.Ctrl=5]="Ctrl",l[l.Alt=6]="Alt",l[l.PauseBreak=7]="PauseBreak",l[l.CapsLock=8]="CapsLock",l[l.Escape=9]="Escape",l[l.Space=10]="Space",l[l.PageUp=11]="PageUp",l[l.PageDown=12]="PageDown",l[l.End=13]="End",l[l.Home=14]="Home",l[l.LeftArrow=15]="LeftArrow",l[l.UpArrow=16]="UpArrow",l[l.RightArrow=17]="RightArrow",l[l.DownArrow=18]="DownArrow",l[l.Insert=19]="Insert",l[l.Delete=20]="Delete",l[l.Digit0=21]="Digit0",l[l.Digit1=22]="Digit1",l[l.Digit2=23]="Digit2",l[l.Digit3=24]="Digit3",l[l.Digit4=25]="Digit4",l[l.Digit5=26]="Digit5",l[l.Digit6=27]="Digit6",l[l.Digit7=28]="Digit7",l[l.Digit8=29]="Digit8",l[l.Digit9=30]="Digit9",l[l.KeyA=31]="KeyA",l[l.KeyB=32]="KeyB",l[l.KeyC=33]="KeyC",l[l.KeyD=34]="KeyD",l[l.KeyE=35]="KeyE",l[l.KeyF=36]="KeyF",l[l.KeyG=37]="KeyG",l[l.KeyH=38]="KeyH",l[l.KeyI=39]="KeyI",l[l.KeyJ=40]="KeyJ",l[l.KeyK=41]="KeyK",l[l.KeyL=42]="KeyL",l[l.KeyM=43]="KeyM",l[l.KeyN=44]="KeyN",l[l.KeyO=45]="KeyO",l[l.KeyP=46]="KeyP",l[l.KeyQ=47]="KeyQ",l[l.KeyR=48]="KeyR",l[l.KeyS=49]="KeyS",l[l.KeyT=50]="KeyT",l[l.KeyU=51]="KeyU",l[l.KeyV=52]="KeyV",l[l.KeyW=53]="KeyW",l[l.KeyX=54]="KeyX",l[l.KeyY=55]="KeyY",l[l.KeyZ=56]="KeyZ",l[l.Meta=57]="Meta",l[l.ContextMenu=58]="ContextMenu",l[l.F1=59]="F1",l[l.F2=60]="F2",l[l.F3=61]="F3",l[l.F4=62]="F4",l[l.F5=63]="F5",l[l.F6=64]="F6",l[l.F7=65]="F7",l[l.F8=66]="F8",l[l.F9=67]="F9",l[l.F10=68]="F10",l[l.F11=69]="F11",l[l.F12=70]="F12",l[l.F13=71]="F13",l[l.F14=72]="F14",l[l.F15=73]="F15",l[l.F16=74]="F16",l[l.F17=75]="F17",l[l.F18=76]="F18",l[l.F19=77]="F19",l[l.F20=78]="F20",l[l.F21=79]="F21",l[l.F22=80]="F22",l[l.F23=81]="F23",l[l.F24=82]="F24",l[l.NumLock=83]="NumLock",l[l.ScrollLock=84]="ScrollLock",l[l.Semicolon=85]="Semicolon",l[l.Equal=86]="Equal",l[l.Comma=87]="Comma",l[l.Minus=88]="Minus",l[l.Period=89]="Period",l[l.Slash=90]="Slash",l[l.Backquote=91]="Backquote",l[l.BracketLeft=92]="BracketLeft",l[l.Backslash=93]="Backslash",l[l.BracketRight=94]="BracketRight",l[l.Quote=95]="Quote",l[l.OEM_8=96]="OEM_8",l[l.IntlBackslash=97]="IntlBackslash",l[l.Numpad0=98]="Numpad0",l[l.Numpad1=99]="Numpad1",l[l.Numpad2=100]="Numpad2",l[l.Numpad3=101]="Numpad3",l[l.Numpad4=102]="Numpad4",l[l.Numpad5=103]="Numpad5",l[l.Numpad6=104]="Numpad6",l[l.Numpad7=105]="Numpad7",l[l.Numpad8=106]="Numpad8",l[l.Numpad9=107]="Numpad9",l[l.NumpadMultiply=108]="NumpadMultiply",l[l.NumpadAdd=109]="NumpadAdd",l[l.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",l[l.NumpadSubtract=111]="NumpadSubtract",l[l.NumpadDecimal=112]="NumpadDecimal",l[l.NumpadDivide=113]="NumpadDivide",l[l.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",l[l.ABNT_C1=115]="ABNT_C1",l[l.ABNT_C2=116]="ABNT_C2",l[l.AudioVolumeMute=117]="AudioVolumeMute",l[l.AudioVolumeUp=118]="AudioVolumeUp",l[l.AudioVolumeDown=119]="AudioVolumeDown",l[l.BrowserSearch=120]="BrowserSearch",l[l.BrowserHome=121]="BrowserHome",l[l.BrowserBack=122]="BrowserBack",l[l.BrowserForward=123]="BrowserForward",l[l.MediaTrackNext=124]="MediaTrackNext",l[l.MediaTrackPrevious=125]="MediaTrackPrevious",l[l.MediaStop=126]="MediaStop",l[l.MediaPlayPause=127]="MediaPlayPause",l[l.LaunchMediaPlayer=128]="LaunchMediaPlayer",l[l.LaunchMail=129]="LaunchMail",l[l.LaunchApp2=130]="LaunchApp2",l[l.Clear=131]="Clear",l[l.MAX_VALUE=132]="MAX_VALUE"})(UBe||(UBe={}));var qBe;(function(l){l[l.Hint=1]="Hint",l[l.Info=2]="Info",l[l.Warning=4]="Warning",l[l.Error=8]="Error"})(qBe||(qBe={}));var $Be;(function(l){l[l.Unnecessary=1]="Unnecessary",l[l.Deprecated=2]="Deprecated"})($Be||($Be={}));var JBe;(function(l){l[l.Inline=1]="Inline",l[l.Gutter=2]="Gutter"})(JBe||(JBe={}));var GBe;(function(l){l[l.Normal=1]="Normal",l[l.Underlined=2]="Underlined"})(GBe||(GBe={}));var KBe;(function(l){l[l.UNKNOWN=0]="UNKNOWN",l[l.TEXTAREA=1]="TEXTAREA",l[l.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",l[l.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",l[l.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",l[l.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",l[l.CONTENT_TEXT=6]="CONTENT_TEXT",l[l.CONTENT_EMPTY=7]="CONTENT_EMPTY",l[l.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",l[l.CONTENT_WIDGET=9]="CONTENT_WIDGET",l[l.OVERVIEW_RULER=10]="OVERVIEW_RULER",l[l.SCROLLBAR=11]="SCROLLBAR",l[l.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",l[l.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(KBe||(KBe={}));var XBe;(function(l){l[l.AIGenerated=1]="AIGenerated"})(XBe||(XBe={}));var QBe;(function(l){l[l.Invoke=0]="Invoke",l[l.Automatic=1]="Automatic"})(QBe||(QBe={}));var ZBe;(function(l){l[l.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",l[l.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",l[l.TOP_CENTER=2]="TOP_CENTER"})(ZBe||(ZBe={}));var YBe;(function(l){l[l.Left=1]="Left",l[l.Center=2]="Center",l[l.Right=4]="Right",l[l.Full=7]="Full"})(YBe||(YBe={}));var eWe;(function(l){l[l.Word=0]="Word",l[l.Line=1]="Line",l[l.Suggest=2]="Suggest"})(eWe||(eWe={}));var tWe;(function(l){l[l.Left=0]="Left",l[l.Right=1]="Right",l[l.None=2]="None",l[l.LeftOfInjectedText=3]="LeftOfInjectedText",l[l.RightOfInjectedText=4]="RightOfInjectedText"})(tWe||(tWe={}));var iWe;(function(l){l[l.Off=0]="Off",l[l.On=1]="On",l[l.Relative=2]="Relative",l[l.Interval=3]="Interval",l[l.Custom=4]="Custom"})(iWe||(iWe={}));var nWe;(function(l){l[l.None=0]="None",l[l.Text=1]="Text",l[l.Blocks=2]="Blocks"})(nWe||(nWe={}));var rWe;(function(l){l[l.Smooth=0]="Smooth",l[l.Immediate=1]="Immediate"})(rWe||(rWe={}));var sWe;(function(l){l[l.Auto=1]="Auto",l[l.Hidden=2]="Hidden",l[l.Visible=3]="Visible"})(sWe||(sWe={}));var oWe;(function(l){l[l.LTR=0]="LTR",l[l.RTL=1]="RTL"})(oWe||(oWe={}));var aWe;(function(l){l.Off="off",l.OnCode="onCode",l.On="on"})(aWe||(aWe={}));var cWe;(function(l){l[l.Invoke=1]="Invoke",l[l.TriggerCharacter=2]="TriggerCharacter",l[l.ContentChange=3]="ContentChange"})(cWe||(cWe={}));var lWe;(function(l){l[l.File=0]="File",l[l.Module=1]="Module",l[l.Namespace=2]="Namespace",l[l.Package=3]="Package",l[l.Class=4]="Class",l[l.Method=5]="Method",l[l.Property=6]="Property",l[l.Field=7]="Field",l[l.Constructor=8]="Constructor",l[l.Enum=9]="Enum",l[l.Interface=10]="Interface",l[l.Function=11]="Function",l[l.Variable=12]="Variable",l[l.Constant=13]="Constant",l[l.String=14]="String",l[l.Number=15]="Number",l[l.Boolean=16]="Boolean",l[l.Array=17]="Array",l[l.Object=18]="Object",l[l.Key=19]="Key",l[l.Null=20]="Null",l[l.EnumMember=21]="EnumMember",l[l.Struct=22]="Struct",l[l.Event=23]="Event",l[l.Operator=24]="Operator",l[l.TypeParameter=25]="TypeParameter"})(lWe||(lWe={}));var uWe;(function(l){l[l.Deprecated=1]="Deprecated"})(uWe||(uWe={}));var dWe;(function(l){l[l.Hidden=0]="Hidden",l[l.Blink=1]="Blink",l[l.Smooth=2]="Smooth",l[l.Phase=3]="Phase",l[l.Expand=4]="Expand",l[l.Solid=5]="Solid"})(dWe||(dWe={}));var fWe;(function(l){l[l.Line=1]="Line",l[l.Block=2]="Block",l[l.Underline=3]="Underline",l[l.LineThin=4]="LineThin",l[l.BlockOutline=5]="BlockOutline",l[l.UnderlineThin=6]="UnderlineThin"})(fWe||(fWe={}));var hWe;(function(l){l[l.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",l[l.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",l[l.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",l[l.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(hWe||(hWe={}));var _We;(function(l){l[l.None=0]="None",l[l.Same=1]="Same",l[l.Indent=2]="Indent",l[l.DeepIndent=3]="DeepIndent"})(_We||(_We={}));var $4;let Vli=($4=class{static chord(e,i){return pp(e,i)}},$4.CtrlCmd=2048,$4.Shift=1024,$4.Alt=512,$4.WinCtrl=256,$4);function Xkt(){return{editor:void 0,languages:void 0,CancellationTokenSource:ih,Emitter:gi,KeyCode:UBe,KeyMod:Vli,Position:pi,Range:nt,Selection:Us,SelectionDirection:oWe,MarkerSeverity:qBe,MarkerTag:$Be,Uri:yo,Token:Pne}}function Hli(l,e){const i=l;typeof i.vscodeWindowId!="number"&&Object.defineProperty(i,"vscodeWindowId",{get:()=>e})}const cd=window;function Qkt(l){return l}class jli{constructor(e,i){this.lastCache=void 0,this.lastArgKey=void 0,typeof e=="function"?(this._fn=e,this._computeKey=Qkt):(this._fn=i,this._computeKey=e.getCacheKey)}get(e){const i=this._computeKey(e);return this.lastArgKey!==i&&(this.lastArgKey=i,this.lastCache=this._fn(e)),this.lastCache}}class evt{get cachedValues(){return this._map}constructor(e,i){this._map=new Map,this._map2=new Map,typeof e=="function"?(this._fn=e,this._computeKey=Qkt):(this._fn=i,this._computeKey=e.getCacheKey)}get(e){const i=this._computeKey(e);if(this._map2.has(i))return this._map2.get(i);const n=this._fn(e);return this._map.set(e,n),this._map2.set(i,n),n}}class HE{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}function Zkt(l){return!l||typeof l!="string"?!0:l.trim().length===0}const zli=/{(\d+)}/g;function SB(l,...e){return e.length===0?l:l.replace(zli,function(i,n){const s=parseInt(n,10);return isNaN(s)||s<0||s>=e.length?i:e[s]})}function Uli(l){return l.replace(/[<>"'&]/g,e=>{switch(e){case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case"'":return"&apos;";case"&":return"&amp;"}return e})}function wie(l){return l.replace(/[<>&]/g,function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return e}})}function Tw(l){return l.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function qli(l,e=" "){const i=use(l,e);return Ykt(i,e)}function use(l,e){if(!l||!e)return l;const i=e.length;if(i===0||l.length===0)return l;let n=0;for(;l.indexOf(e,n)===n;)n=n+i;return l.substring(n)}function Ykt(l,e){if(!l||!e)return l;const i=e.length,n=l.length;if(i===0||n===0)return l;let s=n,c=-1;for(;c=l.lastIndexOf(e,s-1),!(c===-1||c+i!==s);){if(c===0)return"";s=c}return l.substring(0,s)}function $li(l){return l.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function Jli(l){return l.replace(/\*/g,"")}function e2t(l,e,i={}){if(!l)throw new Error("Cannot create regex from empty string");e||(l=Tw(l)),i.wholeWord&&(/\B/.test(l.charAt(0))||(l="\\b"+l),/\B/.test(l.charAt(l.length-1))||(l=l+"\\b"));let n="";return i.global&&(n+="g"),i.matchCase||(n+="i"),i.multiline&&(n+="m"),i.unicode&&(n+="u"),new RegExp(l,n)}function Gli(l){return l.source==="^"||l.source==="^$"||l.source==="$"||l.source==="^\\s*$"?!1:!!(l.exec("")&&l.lastIndex===0)}function BL(l){return l.split(/\r\n|\r|\n/)}function Kli(l){const e=[],i=l.split(/(\r\n|\r|\n)/);for(let n=0;n<Math.ceil(i.length/2);n++)e.push(i[2*n]+(i[2*n+1]??""));return e}function Ty(l){for(let e=0,i=l.length;e<i;e++){const n=l.charCodeAt(e);if(n!==32&&n!==9)return e}return-1}function yd(l,e=0,i=l.length){for(let n=e;n<i;n++){const s=l.charCodeAt(n);if(s!==32&&s!==9)return l.substring(e,n)}return l.substring(e,i)}function ME(l,e=l.length-1){for(let i=e;i>=0;i--){const n=l.charCodeAt(i);if(n!==32&&n!==9)return i}return-1}function Rne(l,e){return l<e?-1:l>e?1:0}function Zqe(l,e,i=0,n=l.length,s=0,c=e.length){for(;i<n&&s<c;i++,s++){const m=l.charCodeAt(i),v=e.charCodeAt(s);if(m<v)return-1;if(m>v)return 1}const d=n-i,f=c-s;return d<f?-1:d>f?1:0}function pWe(l,e){return dse(l,e,0,l.length,0,e.length)}function dse(l,e,i=0,n=l.length,s=0,c=e.length){for(;i<n&&s<c;i++,s++){let m=l.charCodeAt(i),v=e.charCodeAt(s);if(m===v)continue;if(m>=128||v>=128)return Zqe(l.toLowerCase(),e.toLowerCase(),i,n,s,c);LM(m)&&(m-=32),LM(v)&&(v-=32);const x=m-v;if(x!==0)return x}const d=n-i,f=c-s;return d<f?-1:d>f?1:0}function qge(l){return l>=48&&l<=57}function LM(l){return l>=97&&l<=122}function fL(l){return l>=65&&l<=90}function eq(l,e){return l.length===e.length&&dse(l,e)===0}function Yqe(l,e){const i=e.length;return e.length>l.length?!1:dse(l,e,0,i)===0}function vR(l,e){const i=Math.min(l.length,e.length);let n;for(n=0;n<i;n++)if(l.charCodeAt(n)!==e.charCodeAt(n))return n;return i}function iye(l,e){const i=Math.min(l.length,e.length);let n;const s=l.length-1,c=e.length-1;for(n=0;n<i;n++)if(l.charCodeAt(s-n)!==e.charCodeAt(c-n))return n;return i}function Pm(l){return 55296<=l&&l<=56319}function wB(l){return 56320<=l&&l<=57343}function e$e(l,e){return(l-55296<<10)+(e-56320)+65536}function nye(l,e,i){const n=l.charCodeAt(i);if(Pm(n)&&i+1<e){const s=l.charCodeAt(i+1);if(wB(s))return e$e(n,s)}return n}function Xli(l,e){const i=l.charCodeAt(e-1);if(wB(i)&&e>1){const n=l.charCodeAt(e-2);if(Pm(n))return e$e(n,i)}return i}class t$e{get offset(){return this._offset}constructor(e,i=0){this._str=e,this._len=e.length,this._offset=i}setOffset(e){this._offset=e}prevCodePoint(){const e=Xli(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=nye(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class rye{get offset(){return this._iterator.offset}constructor(e,i=0){this._iterator=new t$e(e,i)}nextGraphemeLength(){const e=sye.getInstance(),i=this._iterator,n=i.offset;let s=e.getGraphemeBreakType(i.nextCodePoint());for(;!i.eol();){const c=i.offset,d=e.getGraphemeBreakType(i.nextCodePoint());if(tvt(s,d)){i.setOffset(c);break}s=d}return i.offset-n}prevGraphemeLength(){const e=sye.getInstance(),i=this._iterator,n=i.offset;let s=e.getGraphemeBreakType(i.prevCodePoint());for(;i.offset>0;){const c=i.offset,d=e.getGraphemeBreakType(i.prevCodePoint());if(tvt(d,s)){i.setOffset(c);break}s=d}return n-i.offset}eol(){return this._iterator.eol()}}function i$e(l,e){return new rye(l,e).nextGraphemeLength()}function t2t(l,e){return new rye(l,e).prevGraphemeLength()}function Qli(l,e){e>0&&wB(l.charCodeAt(e))&&e--;const i=e+i$e(l,e);return[i-t2t(l,i),i]}let eFe;function Zli(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function k$(l){return eFe||(eFe=Zli()),eFe.test(l)}const Yli=/^[\t\n\r\x20-\x7E]*$/;function fse(l){return Yli.test(l)}const i2t=/[\u2028\u2029]/;function n2t(l){return i2t.test(l)}function bR(l){return l>=11904&&l<=55215||l>=63744&&l<=64255||l>=65281&&l<=65374}function n$e(l){return l>=127462&&l<=127487||l===8986||l===8987||l===9200||l===9203||l>=9728&&l<=10175||l===11088||l===11093||l>=127744&&l<=128591||l>=128640&&l<=128764||l>=128992&&l<=129008||l>=129280&&l<=129535||l>=129648&&l<=129782}const eui="\uFEFF";function r$e(l){return!!(l&&l.length>0&&l.charCodeAt(0)===65279)}function tui(l,e=!1){return l?(e&&(l=l.replace(/\\./g,"")),l.toLowerCase()!==l):!1}function r2t(l){return l=l%(2*26),l<26?String.fromCharCode(97+l):String.fromCharCode(65+l-26)}function tvt(l,e){return l===0?e!==5&&e!==7:l===2&&e===3?!1:l===4||l===2||l===3||e===4||e===2||e===3?!0:!(l===8&&(e===8||e===9||e===11||e===12)||(l===11||l===9)&&(e===9||e===10)||(l===12||l===10)&&e===10||e===5||e===13||e===7||l===1||l===13&&e===14||l===6&&e===6)}const KF=class KF{static getInstance(){return KF._INSTANCE||(KF._INSTANCE=new KF),KF._INSTANCE}constructor(){this._data=iui()}getGraphemeBreakType(e){if(e<32)return e===10?3:e===13?2:4;if(e<127)return 0;const i=this._data,n=i.length/3;let s=1;for(;s<=n;)if(e<i[3*s])s=2*s;else if(e>i[3*s+1])s=2*s+1;else return i[3*s+2];return 0}};KF._INSTANCE=null;let sye=KF;function iui(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function nui(l,e){if(l===0)return 0;const i=rui(l,e);if(i!==void 0)return i;const n=new t$e(e,l);return n.prevCodePoint(),n.offset}function rui(l,e){const i=new t$e(e,l);let n=i.prevCodePoint();for(;sui(n)||n===65039||n===8419;){if(i.offset===0)return;n=i.prevCodePoint()}if(!n$e(n))return;let s=i.offset;return s>0&&i.prevCodePoint()===8205&&(s=i.offset),s}function sui(l){return 127995<=l&&l<=127999}const s2t=" ",rL=class rL{static getInstance(e){return rL.cache.get(Array.from(e))}static getLocales(){return rL._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}};rL.ambiguousCharacterData=new HE(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}')),rL.cache=new jli({getCacheKey:JSON.stringify},e=>{function i(x){const w=new Map;for(let I=0;I<x.length;I+=2)w.set(x[I],x[I+1]);return w}function n(x,w){const I=new Map(x);for(const[P,O]of w)I.set(P,O);return I}function s(x,w){if(!x)return w;const I=new Map;for(const[P,O]of x)w.has(P)&&I.set(P,O);return I}const c=rL.ambiguousCharacterData.value;let d=e.filter(x=>!x.startsWith("_")&&x in c);d.length===0&&(d=["_default"]);let f;for(const x of d){const w=i(c[x]);f=s(f,w)}const m=i(c._common),v=n(m,f);return new rL(v)}),rL._locales=new HE(()=>Object.keys(rL.ambiguousCharacterData.value).filter(e=>!e.startsWith("_")));let Fne=rL;const kq=class kq{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(kq.getRawData())),this._data}static isInvisibleCharacter(e){return kq.getData().has(e)}static get codePoints(){return kq.getData()}};kq._data=void 0;let d9=kq;const $be=class $be{constructor(){this.mapWindowIdToZoomFactor=new Map}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}getWindowId(e){return e.vscodeWindowId}};$be.INSTANCE=new $be;let mWe=$be;function o2t(l,e,i){typeof e=="string"&&(e=l.matchMedia(e)),e.addEventListener("change",i)}function oui(l){return mWe.INSTANCE.getZoomFactor(l)}const fJ=navigator.userAgent,bk=fJ.indexOf("Firefox")>=0,f9=fJ.indexOf("AppleWebKit")>=0,hse=fJ.indexOf("Chrome")>=0,o6=!hse&&fJ.indexOf("Safari")>=0,a2t=!hse&&!o6&&f9;fJ.indexOf("Electron/")>=0;const ivt=fJ.indexOf("Android")>=0;let n1e=!1;if(typeof cd.matchMedia=="function"){const l=cd.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=cd.matchMedia("(display-mode: fullscreen)");n1e=l.matches,o2t(cd,l,({matches:i})=>{n1e&&e.matches||(n1e=i)})}function aui(){return n1e}const s$e={clipboard:{writeText:PE||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:PE||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:PE||aui()?0:navigator.keyboard||o6?1:2,touch:"ontouchstart"in cd||navigator.maxTouchPoints>0,pointerEvents:cd.PointerEvent&&("ontouchstart"in cd||navigator.maxTouchPoints>0)};function gWe(l,e){if(typeof l=="number"){if(l===0)return null;const i=(l&65535)>>>0,n=(l&4294901760)>>>16;return n!==0?new tFe([$ge(i,e),$ge(n,e)]):new tFe([$ge(i,e)])}else{const i=[];for(let n=0;n<l.length;n++)i.push($ge(l[n],e));return new tFe(i)}}function $ge(l,e){const i=!!(l&2048),n=!!(l&256),s=e===2?n:i,c=!!(l&1024),d=!!(l&512),f=e===2?i:n,m=l&255;return new a6(s,c,d,f,m)}class a6{constructor(e,i,n,s,c){this.ctrlKey=e,this.shiftKey=i,this.altKey=n,this.metaKey=s,this.keyCode=c}equals(e){return e instanceof a6&&this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}}class tFe{constructor(e){if(e.length===0)throw gk("chords");this.chords=e}}class cui{constructor(e,i,n,s,c,d){this.ctrlKey=e,this.shiftKey=i,this.altKey=n,this.metaKey=s,this.keyLabel=c,this.keyAriaLabel=d}}class lui{}function uui(l){if(l.charCode){const i=String.fromCharCode(l.charCode).toUpperCase();return P4.fromString(i)}const e=l.keyCode;if(e===3)return 7;if(bk)switch(e){case 59:return 85;case 60:if(Cv)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(Hc)return 57;break}else if(f9){if(Hc&&e===93)return 57;if(!Hc&&e===92)return 57}return Wkt[e]||0}const dui=Hc?256:2048,fui=512,hui=1024,_ui=Hc?2048:256;class Id{constructor(e){var n;this._standardKeyboardEventBrand=!0;const i=e;this.browserEvent=i,this.target=i.target,this.ctrlKey=i.ctrlKey,this.shiftKey=i.shiftKey,this.altKey=i.altKey,this.metaKey=i.metaKey,this.altGraphKey=(n=i.getModifierState)==null?void 0:n.call(i,"AltGraph"),this.keyCode=uui(i),this.code=i.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let i=0;return this.ctrlKey&&(i|=dui),this.altKey&&(i|=fui),this.shiftKey&&(i|=hui),this.metaKey&&(i|=_ui),i|=e,i}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new a6(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}const nvt=new WeakMap;function pui(l){if(!l.parent||l.parent===l)return null;try{const e=l.location,i=l.parent.location;if(e.origin!=="null"&&i.origin!=="null"&&e.origin!==i.origin)return null}catch{return null}return l.parent}class mui{static getSameOriginWindowChain(e){let i=nvt.get(e);if(!i){i=[],nvt.set(e,i);let n=e,s;do s=pui(n),s?i.push({window:new WeakRef(n),iframeElement:n.frameElement||null}):i.push({window:new WeakRef(n),iframeElement:null}),n=s;while(n)}return i.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,i){if(!i||e===i)return{top:0,left:0};let n=0,s=0;const c=this.getSameOriginWindowChain(e);for(const d of c){const f=d.window.deref();if(n+=(f==null?void 0:f.scrollY)??0,s+=(f==null?void 0:f.scrollX)??0,f===i||!d.iframeElement)break;const m=d.iframeElement.getBoundingClientRect();n+=m.top,s+=m.left}return{top:n,left:s}}}class hT{constructor(e,i){this.timestamp=Date.now(),this.browserEvent=i,this.leftButton=i.button===0,this.middleButton=i.button===1,this.rightButton=i.button===2,this.buttons=i.buttons,this.target=i.target,this.detail=i.detail||1,i.type==="dblclick"&&(this.detail=2),this.ctrlKey=i.ctrlKey,this.shiftKey=i.shiftKey,this.altKey=i.altKey,this.metaKey=i.metaKey,typeof i.pageX=="number"?(this.posx=i.pageX,this.posy=i.pageY):(this.posx=i.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=i.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);const n=mui.getPositionOfChildWindowRelativeToAncestorWindow(e,i.view);this.posx-=n.left,this.posy-=n.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class xB{constructor(e,i=0,n=0){var c;this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=n,this.deltaX=i;let s=!1;if(hse){const d=navigator.userAgent.match(/Chrome\/(\d+)/);s=(d?parseInt(d[1]):123)<=122}if(e){const d=e,f=e,m=((c=e.view)==null?void 0:c.devicePixelRatio)||1;if(typeof d.wheelDeltaY<"u")s?this.deltaY=d.wheelDeltaY/(120*m):this.deltaY=d.wheelDeltaY/120;else if(typeof f.VERTICAL_AXIS<"u"&&f.axis===f.VERTICAL_AXIS)this.deltaY=-f.detail/3;else if(e.type==="wheel"){const v=e;v.deltaMode===v.DOM_DELTA_LINE?bk&&!Hc?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof d.wheelDeltaX<"u")o6&&I0?this.deltaX=-(d.wheelDeltaX/120):s?this.deltaX=d.wheelDeltaX/(120*m):this.deltaX=d.wheelDeltaX/120;else if(typeof f.HORIZONTAL_AXIS<"u"&&f.axis===f.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){const v=e;v.deltaMode===v.DOM_DELTA_LINE?bk&&!Hc?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(s?this.deltaY=e.wheelDelta/(120*m):this.deltaY=e.wheelDelta/120)}}preventDefault(){var e;(e=this.browserEvent)==null||e.preventDefault()}stopPropagation(){var e;(e=this.browserEvent)==null||e.stopPropagation()}}const c2t=Symbol("MicrotaskDelay");function yWe(l){return!!l&&typeof l.then=="function"}function Om(l){const e=new ih,i=l(e.token),n=new Promise((s,c)=>{const d=e.token.onCancellationRequested(()=>{d.dispose(),c(new vT)});Promise.resolve(i).then(f=>{d.dispose(),e.dispose(),s(f)},f=>{d.dispose(),e.dispose(),c(f)})});return new class{cancel(){e.cancel(),e.dispose()}then(s,c){return n.then(s,c)}catch(s){return this.then(void 0,s)}finally(s){return n.finally(s)}}}function _se(l,e,i){return new Promise((n,s)=>{const c=e.onCancellationRequested(()=>{c.dispose(),n(i)});l.then(n,s).finally(()=>c.dispose())})}class gui{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.isDisposed)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const i=()=>{if(this.queuedPromise=null,this.isDisposed)return;const n=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,n};this.queuedPromise=new Promise(n=>{this.activePromise.then(i,i).then(n)})}return new Promise((i,n)=>{this.queuedPromise.then(i,n)})}return this.activePromise=e(),new Promise((i,n)=>{this.activePromise.then(s=>{this.activePromise=null,i(s)},s=>{this.activePromise=null,n(s)})})}dispose(){this.isDisposed=!0}}const yui=(l,e)=>{let i=!0;const n=setTimeout(()=>{i=!1,e()},l);return{isTriggered:()=>i,dispose:()=>{clearTimeout(n),i=!1}}},vui=l=>{let e=!0;return queueMicrotask(()=>{e&&(e=!1,l())}),{isTriggered:()=>e,dispose:()=>{e=!1}}};class Ck{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,i=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((s,c)=>{this.doResolve=s,this.doReject=c}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const s=this.task;return this.task=null,s()}}));const n=()=>{var s;this.deferred=null,(s=this.doResolve)==null||s.call(this,null)};return this.deferred=i===c2t?vui(n):yui(i,n),this.completionPromise}isTriggered(){var e;return!!((e=this.deferred)!=null&&e.isTriggered())}cancel(){var e;this.cancelTimeout(),this.completionPromise&&((e=this.doReject)==null||e.call(this,new vT),this.completionPromise=null)}cancelTimeout(){var e;(e=this.deferred)==null||e.dispose(),this.deferred=null}dispose(){this.cancel()}}class l2t{constructor(e){this.delayer=new Ck(e),this.throttler=new gui}trigger(e,i){return this.delayer.trigger(()=>this.throttler.queue(e),i)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}function c6(l,e){return e?new Promise((i,n)=>{const s=setTimeout(()=>{c.dispose(),i()},l),c=e.onCancellationRequested(()=>{clearTimeout(s),c.dispose(),n(new vT)})}):Om(i=>c6(l,i))}function CR(l,e=0,i){const n=setTimeout(()=>{l(),i&&s.dispose()},e),s=fo(()=>{clearTimeout(n),i==null||i.deleteAndLeak(s)});return i==null||i.add(s),s}function o$e(l,e=n=>!!n,i=null){let n=0;const s=l.length,c=()=>{if(n>=s)return Promise.resolve(i);const d=l[n++];return Promise.resolve(d()).then(m=>e(m)?Promise.resolve(m):c())};return c()}class TT{constructor(e,i){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof i=="number"&&this.setIfNotSet(e,i)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,i){if(this._isDisposed)throw new tu("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},i)}setIfNotSet(e,i){if(this._isDisposed)throw new tu("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},i))}}class a$e{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){var e;(e=this.disposable)==null||e.dispose(),this.disposable=void 0}cancelAndSet(e,i,n=globalThis){if(this.isDisposed)throw new tu("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();const s=n.setInterval(()=>{e()},i);this.disposable=fo(()=>{n.clearInterval(s),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}}class qu{constructor(e,i){this.timeoutToken=-1,this.runner=e,this.timeout=i,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){var e;(e=this.runner)==null||e.call(this)}}let u2t,xie;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?xie=(l,e)=>{Ikt(()=>{if(i)return;const n=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,n-Date.now())}}))});let i=!1;return{dispose(){i||(i=!0)}}}:xie=(l,e,i)=>{const n=l.requestIdleCallback(e,typeof i=="number"?{timeout:i}:void 0);let s=!1;return{dispose(){s||(s=!0,l.cancelIdleCallback(n))}}},u2t=l=>xie(globalThis,l)})();class d2t{constructor(e,i){this._didRun=!1,this._executor=()=>{try{this._value=i()}catch(n){this._error=n}finally{this._didRun=!0}},this._handle=xie(e,()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}class bui extends d2t{constructor(e){super(globalThis,e)}}class hJ{get isRejected(){var e;return((e=this.outcome)==null?void 0:e.outcome)===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,i)=>{this.completeCallback=e,this.errorCallback=i})}complete(e){return new Promise(i=>{this.completeCallback(e),this.outcome={outcome:0,value:e},i()})}error(e){return new Promise(i=>{this.errorCallback(e),this.outcome={outcome:1,value:e},i()})}cancel(){return this.error(new vT)}}var vWe;(function(l){async function e(n){let s;const c=await Promise.all(n.map(d=>d.then(f=>f,f=>{s||(s=f)})));if(typeof s<"u")throw s;return c}l.settled=e;function i(n){return new Promise(async(s,c)=>{try{await n(s,c)}catch(d){c(d)}})}l.withAsyncBody=i})(vWe||(vWe={}));const MC=class MC{static fromArray(e){return new MC(i=>{i.emitMany(e)})}static fromPromise(e){return new MC(async i=>{i.emitMany(await e)})}static fromPromises(e){return new MC(async i=>{await Promise.all(e.map(async n=>i.emitOne(await n)))})}static merge(e){return new MC(async i=>{await Promise.all(e.map(async n=>{for await(const s of n)i.emitOne(s)}))})}constructor(e,i){this._state=0,this._results=[],this._error=null,this._onReturn=i,this._onStateChanged=new gi,queueMicrotask(async()=>{const n={emitOne:s=>this.emitOne(s),emitMany:s=>this.emitMany(s),reject:s=>this.reject(s)};try{await Promise.resolve(e(n)),this.resolve()}catch(s){this.reject(s)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(this._state===1)return{done:!0,value:void 0};await Tr.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>{var i;return(i=this._onReturn)==null||i.call(this),{done:!0,value:void 0}}}}static map(e,i){return new MC(async n=>{for await(const s of e)n.emitOne(i(s))})}map(e){return MC.map(this,e)}static filter(e,i){return new MC(async n=>{for await(const s of e)i(s)&&n.emitOne(s)})}filter(e){return MC.filter(this,e)}static coalesce(e){return MC.filter(e,i=>!!i)}coalesce(){return MC.coalesce(this)}static async toPromise(e){const i=[];for await(const n of e)i.push(n);return i}toPromise(){return MC.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};MC.EMPTY=MC.fromArray([]);let bw=MC;class Cui extends bw{constructor(e,i){super(i),this._source=e}cancel(){this._source.cancel()}}function Sui(l){const e=new ih,i=l(e.token);return new Cui(e,async n=>{const s=e.token.onCancellationRequested(()=>{s.dispose(),e.dispose(),n.reject(new vT)});try{for await(const c of i){if(e.token.isCancellationRequested)return;n.emitOne(c)}s.dispose(),e.dispose()}catch(c){s.dispose(),e.dispose(),n.reject(c)}})}/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */const{entries:f2t,setPrototypeOf:rvt,isFrozen:wui,getPrototypeOf:xui,getOwnPropertyDescriptor:kui}=Object;let{freeze:QC,seal:jE,create:Tui}=Object,{apply:bWe,construct:CWe}=typeof Reflect<"u"&&Reflect;bWe||(bWe=function(e,i,n){return e.apply(i,n)});QC||(QC=function(e){return e});jE||(jE=function(e){return e});CWe||(CWe=function(e,i){return new e(...i)});const Dui=bT(Array.prototype.forEach),svt=bT(Array.prototype.pop),Tte=bT(Array.prototype.push),r1e=bT(String.prototype.toLowerCase),iFe=bT(String.prototype.toString),Eui=bT(String.prototype.match),aE=bT(String.prototype.replace),Iui=bT(String.prototype.indexOf),Nui=bT(String.prototype.trim),ok=bT(RegExp.prototype.test),Dte=Lui(TypeError);function bT(l){return function(e){for(var i=arguments.length,n=new Array(i>1?i-1:0),s=1;s<i;s++)n[s-1]=arguments[s];return bWe(l,e,n)}}function Lui(l){return function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return CWe(l,i)}}function td(l,e,i){var n;i=(n=i)!==null&&n!==void 0?n:r1e,rvt&&rvt(l,null);let s=e.length;for(;s--;){let c=e[s];if(typeof c=="string"){const d=i(c);d!==c&&(wui(e)||(e[s]=d),c=d)}l[c]=!0}return l}function CU(l){const e=Tui(null);for(const[i,n]of f2t(l))e[i]=n;return e}function Jge(l,e){for(;l!==null;){const n=kui(l,e);if(n){if(n.get)return bT(n.get);if(typeof n.value=="function")return bT(n.value)}l=xui(l)}function i(n){return console.warn("fallback value for",n),null}return i}const ovt=QC(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),nFe=QC(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),rFe=QC(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Pui=QC(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),sFe=QC(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Aui=QC(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),avt=QC(["#text"]),cvt=QC(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),oFe=QC(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),lvt=QC(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Gge=QC(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Oui=jE(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Mui=jE(/<%[\w\W]*|[\w\W]*%>/gm),Rui=jE(/\${[\w\W]*}/gm),Fui=jE(/^data-[\-\w.\u00B7-\uFFFF]/),Bui=jE(/^aria-[\-\w]+$/),h2t=jE(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Wui=jE(/^(?:\w+script|data):/i),Vui=jE(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_2t=jE(/^html$/i);var uvt=Object.freeze({__proto__:null,MUSTACHE_EXPR:Oui,ERB_EXPR:Mui,TMPLIT_EXPR:Rui,DATA_ATTR:Fui,ARIA_ATTR:Bui,IS_ALLOWED_URI:h2t,IS_SCRIPT_OR_DATA:Wui,ATTR_WHITESPACE:Vui,DOCTYPE_NAME:_2t});const Hui=()=>typeof window>"u"?null:window,jui=function(e,i){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const s="data-tt-policy-suffix";i&&i.hasAttribute(s)&&(n=i.getAttribute(s));const c="dompurify"+(n?"#"+n:"");try{return e.createPolicy(c,{createHTML(d){return d},createScriptURL(d){return d}})}catch{return console.warn("TrustedTypes policy "+c+" could not be created."),null}};function p2t(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Hui();const e=Sa=>p2t(Sa);if(e.version="3.0.5",e.removed=[],!l||!l.document||l.document.nodeType!==9)return e.isSupported=!1,e;const i=l.document,n=i.currentScript;let{document:s}=l;const{DocumentFragment:c,HTMLTemplateElement:d,Node:f,Element:m,NodeFilter:v,NamedNodeMap:x=l.NamedNodeMap||l.MozNamedAttrMap,HTMLFormElement:w,DOMParser:I,trustedTypes:P}=l,O=m.prototype,z=Jge(O,"cloneNode"),J=Jge(O,"nextSibling"),Y=Jge(O,"childNodes"),ae=Jge(O,"parentNode");if(typeof d=="function"){const Sa=s.createElement("template");Sa.content&&Sa.content.ownerDocument&&(s=Sa.content.ownerDocument)}let me,ye="";const{implementation:Ce,createNodeIterator:Fe,createDocumentFragment:rt,getElementsByTagName:ct}=s,{importNode:Mt}=i;let Yt={};e.isSupported=typeof f2t=="function"&&typeof ae=="function"&&Ce&&Ce.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Bi,ERB_EXPR:$i,TMPLIT_EXPR:$t,DATA_ATTR:Hi,ARIA_ATTR:An,IS_SCRIPT_OR_DATA:qt,ATTR_WHITESPACE:ms}=uvt;let{IS_ALLOWED_URI:Wr}=uvt,Dr=null;const Rr=td({},[...ovt,...nFe,...rFe,...sFe,...avt]);let na=null;const $d=td({},[...cvt,...oFe,...lvt,...Gge]);let Ca=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),jl=null,es=null,ld=!0,mp=!0,of=!1,Bb=!0,nm=!1,Nv=!1,Ft=!1,Ey=!1,Js=!1,k6=!1,Nk=!1,_W=!0,pW=!1;const Wb="user-content-";let eI=!0,Lk=!1,rm={},Iy=null;const i_=td({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Rw=null;const T6=td({},["audio","video","img","source","image","track"]);let fn=null;const rS=td({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Fw="http://www.w3.org/1998/Math/MathML",Sr="http://www.w3.org/2000/svg",mu="http://www.w3.org/1999/xhtml";let n_=mu,tI=!1,Mu=null;const Bw=td({},[Fw,Sr,mu],iFe);let Vb;const sm=["application/xhtml+xml","text/html"],Ra="text/html";let k_,ya=null;const D6=s.createElement("form"),rl=function(Cn){return Cn instanceof RegExp||Cn instanceof Function},va=function(Cn){if(!(ya&&ya===Cn)){if((!Cn||typeof Cn!="object")&&(Cn={}),Cn=CU(Cn),Vb=sm.indexOf(Cn.PARSER_MEDIA_TYPE)===-1?Vb=Ra:Vb=Cn.PARSER_MEDIA_TYPE,k_=Vb==="application/xhtml+xml"?iFe:r1e,Dr="ALLOWED_TAGS"in Cn?td({},Cn.ALLOWED_TAGS,k_):Rr,na="ALLOWED_ATTR"in Cn?td({},Cn.ALLOWED_ATTR,k_):$d,Mu="ALLOWED_NAMESPACES"in Cn?td({},Cn.ALLOWED_NAMESPACES,iFe):Bw,fn="ADD_URI_SAFE_ATTR"in Cn?td(CU(rS),Cn.ADD_URI_SAFE_ATTR,k_):rS,Rw="ADD_DATA_URI_TAGS"in Cn?td(CU(T6),Cn.ADD_DATA_URI_TAGS,k_):T6,Iy="FORBID_CONTENTS"in Cn?td({},Cn.FORBID_CONTENTS,k_):i_,jl="FORBID_TAGS"in Cn?td({},Cn.FORBID_TAGS,k_):{},es="FORBID_ATTR"in Cn?td({},Cn.FORBID_ATTR,k_):{},rm="USE_PROFILES"in Cn?Cn.USE_PROFILES:!1,ld=Cn.ALLOW_ARIA_ATTR!==!1,mp=Cn.ALLOW_DATA_ATTR!==!1,of=Cn.ALLOW_UNKNOWN_PROTOCOLS||!1,Bb=Cn.ALLOW_SELF_CLOSE_IN_ATTR!==!1,nm=Cn.SAFE_FOR_TEMPLATES||!1,Nv=Cn.WHOLE_DOCUMENT||!1,Js=Cn.RETURN_DOM||!1,k6=Cn.RETURN_DOM_FRAGMENT||!1,Nk=Cn.RETURN_TRUSTED_TYPE||!1,Ey=Cn.FORCE_BODY||!1,_W=Cn.SANITIZE_DOM!==!1,pW=Cn.SANITIZE_NAMED_PROPS||!1,eI=Cn.KEEP_CONTENT!==!1,Lk=Cn.IN_PLACE||!1,Wr=Cn.ALLOWED_URI_REGEXP||h2t,n_=Cn.NAMESPACE||mu,Ca=Cn.CUSTOM_ELEMENT_HANDLING||{},Cn.CUSTOM_ELEMENT_HANDLING&&rl(Cn.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ca.tagNameCheck=Cn.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Cn.CUSTOM_ELEMENT_HANDLING&&rl(Cn.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ca.attributeNameCheck=Cn.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Cn.CUSTOM_ELEMENT_HANDLING&&typeof Cn.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Ca.allowCustomizedBuiltInElements=Cn.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),nm&&(mp=!1),k6&&(Js=!0),rm&&(Dr=td({},[...avt]),na=[],rm.html===!0&&(td(Dr,ovt),td(na,cvt)),rm.svg===!0&&(td(Dr,nFe),td(na,oFe),td(na,Gge)),rm.svgFilters===!0&&(td(Dr,rFe),td(na,oFe),td(na,Gge)),rm.mathMl===!0&&(td(Dr,sFe),td(na,lvt),td(na,Gge))),Cn.ADD_TAGS&&(Dr===Rr&&(Dr=CU(Dr)),td(Dr,Cn.ADD_TAGS,k_)),Cn.ADD_ATTR&&(na===$d&&(na=CU(na)),td(na,Cn.ADD_ATTR,k_)),Cn.ADD_URI_SAFE_ATTR&&td(fn,Cn.ADD_URI_SAFE_ATTR,k_),Cn.FORBID_CONTENTS&&(Iy===i_&&(Iy=CU(Iy)),td(Iy,Cn.FORBID_CONTENTS,k_)),eI&&(Dr["#text"]=!0),Nv&&td(Dr,["html","head","body"]),Dr.table&&(td(Dr,["tbody"]),delete jl.tbody),Cn.TRUSTED_TYPES_POLICY){if(typeof Cn.TRUSTED_TYPES_POLICY.createHTML!="function")throw Dte('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Cn.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Dte('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');me=Cn.TRUSTED_TYPES_POLICY,ye=me.createHTML("")}else me===void 0&&(me=jui(P,n)),me!==null&&typeof ye=="string"&&(ye=me.createHTML(""));QC&&QC(Cn),ya=Cn}},Bm=td({},["mi","mo","mn","ms","mtext"]),$L=td({},["foreignobject","desc","title","annotation-xml"]),Sg=td({},["title","style","font","a","script"]),Fc=td({},nFe);td(Fc,rFe),td(Fc,Pui);const Jt=td({},sFe);td(Jt,Aui);const ti=function(Cn){let qs=ae(Cn);(!qs||!qs.tagName)&&(qs={namespaceURI:n_,tagName:"template"});const ra=r1e(Cn.tagName),Jd=r1e(qs.tagName);return Mu[Cn.namespaceURI]?Cn.namespaceURI===Sr?qs.namespaceURI===mu?ra==="svg":qs.namespaceURI===Fw?ra==="svg"&&(Jd==="annotation-xml"||Bm[Jd]):!!Fc[ra]:Cn.namespaceURI===Fw?qs.namespaceURI===mu?ra==="math":qs.namespaceURI===Sr?ra==="math"&&$L[Jd]:!!Jt[ra]:Cn.namespaceURI===mu?qs.namespaceURI===Sr&&!$L[Jd]||qs.namespaceURI===Fw&&!Bm[Jd]?!1:!Jt[ra]&&(Sg[ra]||!Fc[ra]):!!(Vb==="application/xhtml+xml"&&Mu[Cn.namespaceURI]):!1},oi=function(Cn){Tte(e.removed,{element:Cn});try{Cn.parentNode.removeChild(Cn)}catch{Cn.remove()}},Vi=function(Cn,qs){try{Tte(e.removed,{attribute:qs.getAttributeNode(Cn),from:qs})}catch{Tte(e.removed,{attribute:null,from:qs})}if(qs.removeAttribute(Cn),Cn==="is"&&!na[Cn])if(Js||k6)try{oi(qs)}catch{}else try{qs.setAttribute(Cn,"")}catch{}},Li=function(Cn){let qs,ra;if(Ey)Cn="<remove></remove>"+Cn;else{const wg=Eui(Cn,/^[\r\n\t ]+/);ra=wg&&wg[0]}Vb==="application/xhtml+xml"&&n_===mu&&(Cn='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Cn+"</body></html>");const Jd=me?me.createHTML(Cn):Cn;if(n_===mu)try{qs=new I().parseFromString(Jd,Vb)}catch{}if(!qs||!qs.documentElement){qs=Ce.createDocument(n_,"template",null);try{qs.documentElement.innerHTML=tI?ye:Jd}catch{}}const T_=qs.body||qs.documentElement;return Cn&&ra&&T_.insertBefore(s.createTextNode(ra),T_.childNodes[0]||null),n_===mu?ct.call(qs,Nv?"html":"body")[0]:Nv?qs.documentElement:T_},hr=function(Cn){return Fe.call(Cn.ownerDocument||Cn,Cn,v.SHOW_ELEMENT|v.SHOW_COMMENT|v.SHOW_TEXT,null,!1)},wr=function(Cn){return Cn instanceof w&&(typeof Cn.nodeName!="string"||typeof Cn.textContent!="string"||typeof Cn.removeChild!="function"||!(Cn.attributes instanceof x)||typeof Cn.removeAttribute!="function"||typeof Cn.setAttribute!="function"||typeof Cn.namespaceURI!="string"||typeof Cn.insertBefore!="function"||typeof Cn.hasChildNodes!="function")},vo=function(Cn){return typeof f=="object"?Cn instanceof f:Cn&&typeof Cn=="object"&&typeof Cn.nodeType=="number"&&typeof Cn.nodeName=="string"},So=function(Cn,qs,ra){Yt[Cn]&&Dui(Yt[Cn],Jd=>{Jd.call(e,qs,ra,ya)})},zc=function(Cn){let qs;if(So("beforeSanitizeElements",Cn,null),wr(Cn))return oi(Cn),!0;const ra=k_(Cn.nodeName);if(So("uponSanitizeElement",Cn,{tagName:ra,allowedTags:Dr}),Cn.hasChildNodes()&&!vo(Cn.firstElementChild)&&(!vo(Cn.content)||!vo(Cn.content.firstElementChild))&&ok(/<[/\w]/g,Cn.innerHTML)&&ok(/<[/\w]/g,Cn.textContent))return oi(Cn),!0;if(!Dr[ra]||jl[ra]){if(!jl[ra]&&$u(ra)&&(Ca.tagNameCheck instanceof RegExp&&ok(Ca.tagNameCheck,ra)||Ca.tagNameCheck instanceof Function&&Ca.tagNameCheck(ra)))return!1;if(eI&&!Iy[ra]){const Jd=ae(Cn)||Cn.parentNode,T_=Y(Cn)||Cn.childNodes;if(T_&&Jd){const wg=T_.length;for(let to=wg-1;to>=0;--to)Jd.insertBefore(z(T_[to],!0),J(Cn))}}return oi(Cn),!0}return Cn instanceof m&&!ti(Cn)||(ra==="noscript"||ra==="noembed"||ra==="noframes")&&ok(/<\/no(script|embed|frames)/i,Cn.innerHTML)?(oi(Cn),!0):(nm&&Cn.nodeType===3&&(qs=Cn.textContent,qs=aE(qs,Bi," "),qs=aE(qs,$i," "),qs=aE(qs,$t," "),Cn.textContent!==qs&&(Tte(e.removed,{element:Cn.cloneNode()}),Cn.textContent=qs)),So("afterSanitizeElements",Cn,null),!1)},as=function(Cn,qs,ra){if(_W&&(qs==="id"||qs==="name")&&(ra in s||ra in D6))return!1;if(!(mp&&!es[qs]&&ok(Hi,qs))){if(!(ld&&ok(An,qs))){if(!na[qs]||es[qs]){if(!($u(Cn)&&(Ca.tagNameCheck instanceof RegExp&&ok(Ca.tagNameCheck,Cn)||Ca.tagNameCheck instanceof Function&&Ca.tagNameCheck(Cn))&&(Ca.attributeNameCheck instanceof RegExp&&ok(Ca.attributeNameCheck,qs)||Ca.attributeNameCheck instanceof Function&&Ca.attributeNameCheck(qs))||qs==="is"&&Ca.allowCustomizedBuiltInElements&&(Ca.tagNameCheck instanceof RegExp&&ok(Ca.tagNameCheck,ra)||Ca.tagNameCheck instanceof Function&&Ca.tagNameCheck(ra))))return!1}else if(!fn[qs]){if(!ok(Wr,aE(ra,ms,""))){if(!((qs==="src"||qs==="xlink:href"||qs==="href")&&Cn!=="script"&&Iui(ra,"data:")===0&&Rw[Cn])){if(!(of&&!ok(qt,aE(ra,ms,"")))){if(ra)return!1}}}}}}return!0},$u=function(Cn){return Cn.indexOf("-")>0},Af=function(Cn){let qs,ra,Jd,T_;So("beforeSanitizeAttributes",Cn,null);const{attributes:wg}=Cn;if(!wg)return;const to={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:na};for(T_=wg.length;T_--;){qs=wg[T_];const{name:Of,namespaceURI:WJ}=qs;if(ra=Of==="value"?qs.value:Nui(qs.value),Jd=k_(Of),to.attrName=Jd,to.attrValue=ra,to.keepAttr=!0,to.forceKeepAttr=void 0,So("uponSanitizeAttribute",Cn,to),ra=to.attrValue,to.forceKeepAttr||(Vi(Of,Cn),!to.keepAttr))continue;if(!Bb&&ok(/\/>/i,ra)){Vi(Of,Cn);continue}nm&&(ra=aE(ra,Bi," "),ra=aE(ra,$i," "),ra=aE(ra,$t," "));const Kse=k_(Cn.nodeName);if(as(Kse,Jd,ra)){if(pW&&(Jd==="id"||Jd==="name")&&(Vi(Of,Cn),ra=Wb+ra),me&&typeof P=="object"&&typeof P.getAttributeType=="function"&&!WJ)switch(P.getAttributeType(Kse,Jd)){case"TrustedHTML":{ra=me.createHTML(ra);break}case"TrustedScriptURL":{ra=me.createScriptURL(ra);break}}try{WJ?Cn.setAttributeNS(WJ,Of,ra):Cn.setAttribute(Of,ra),svt(e.removed)}catch{}}}So("afterSanitizeAttributes",Cn,null)},Ld=function Sa(Cn){let qs;const ra=hr(Cn);for(So("beforeSanitizeShadowDOM",Cn,null);qs=ra.nextNode();)So("uponSanitizeShadowNode",qs,null),!zc(qs)&&(qs.content instanceof c&&Sa(qs.content),Af(qs));So("afterSanitizeShadowDOM",Cn,null)};return e.sanitize=function(Sa){let Cn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},qs,ra,Jd,T_;if(tI=!Sa,tI&&(Sa="<!-->"),typeof Sa!="string"&&!vo(Sa))if(typeof Sa.toString=="function"){if(Sa=Sa.toString(),typeof Sa!="string")throw Dte("dirty is not a string, aborting")}else throw Dte("toString is not a function");if(!e.isSupported)return Sa;if(Ft||va(Cn),e.removed=[],typeof Sa=="string"&&(Lk=!1),Lk){if(Sa.nodeName){const Of=k_(Sa.nodeName);if(!Dr[Of]||jl[Of])throw Dte("root node is forbidden and cannot be sanitized in-place")}}else if(Sa instanceof f)qs=Li("<!---->"),ra=qs.ownerDocument.importNode(Sa,!0),ra.nodeType===1&&ra.nodeName==="BODY"||ra.nodeName==="HTML"?qs=ra:qs.appendChild(ra);else{if(!Js&&!nm&&!Nv&&Sa.indexOf("<")===-1)return me&&Nk?me.createHTML(Sa):Sa;if(qs=Li(Sa),!qs)return Js?null:Nk?ye:""}qs&&Ey&&oi(qs.firstChild);const wg=hr(Lk?Sa:qs);for(;Jd=wg.nextNode();)zc(Jd)||(Jd.content instanceof c&&Ld(Jd.content),Af(Jd));if(Lk)return Sa;if(Js){if(k6)for(T_=rt.call(qs.ownerDocument);qs.firstChild;)T_.appendChild(qs.firstChild);else T_=qs;return(na.shadowroot||na.shadowrootmode)&&(T_=Mt.call(i,T_,!0)),T_}let to=Nv?qs.outerHTML:qs.innerHTML;return Nv&&Dr["!doctype"]&&qs.ownerDocument&&qs.ownerDocument.doctype&&qs.ownerDocument.doctype.name&&ok(_2t,qs.ownerDocument.doctype.name)&&(to="<!DOCTYPE "+qs.ownerDocument.doctype.name+`>
+`+to),nm&&(to=aE(to,Bi," "),to=aE(to,$i," "),to=aE(to,$t," ")),me&&Nk?me.createHTML(to):to},e.setConfig=function(Sa){va(Sa),Ft=!0},e.clearConfig=function(){ya=null,Ft=!1},e.isValidAttribute=function(Sa,Cn,qs){ya||va({});const ra=k_(Sa),Jd=k_(Cn);return as(ra,Jd,qs)},e.addHook=function(Sa,Cn){typeof Cn=="function"&&(Yt[Sa]=Yt[Sa]||[],Tte(Yt[Sa],Cn))},e.removeHook=function(Sa){if(Yt[Sa])return svt(Yt[Sa])},e.removeHooks=function(Sa){Yt[Sa]&&(Yt[Sa]=[])},e.removeAllHooks=function(){Yt={}},e}var WL=p2t();WL.version;WL.isSupported;const m2t=WL.sanitize;WL.setConfig;WL.clearConfig;WL.isValidAttribute;const g2t=WL.addHook,y2t=WL.removeHook;WL.removeHooks;WL.removeAllHooks;var Ma;(function(l){l.inMemory="inmemory",l.vscode="vscode",l.internal="private",l.walkThrough="walkThrough",l.walkThroughSnippet="walkThroughSnippet",l.http="http",l.https="https",l.file="file",l.mailto="mailto",l.untitled="untitled",l.data="data",l.command="command",l.vscodeRemote="vscode-remote",l.vscodeRemoteResource="vscode-remote-resource",l.vscodeManagedRemoteResource="vscode-managed-remote-resource",l.vscodeUserData="vscode-userdata",l.vscodeCustomEditor="vscode-custom-editor",l.vscodeNotebookCell="vscode-notebook-cell",l.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",l.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",l.vscodeNotebookCellOutput="vscode-notebook-cell-output",l.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",l.vscodeNotebookMetadata="vscode-notebook-metadata",l.vscodeInteractiveInput="vscode-interactive-input",l.vscodeSettings="vscode-settings",l.vscodeWorkspaceTrust="vscode-workspace-trust",l.vscodeTerminal="vscode-terminal",l.vscodeChatCodeBlock="vscode-chat-code-block",l.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",l.vscodeChatSesssion="vscode-chat-editor",l.webviewPanel="webview-panel",l.vscodeWebview="vscode-webview",l.extension="extension",l.vscodeFileResource="vscode-file",l.tmp="tmp",l.vsls="vsls",l.vscodeSourceControl="vscode-scm",l.commentsInput="comment",l.codeSetting="code-setting",l.outputChannel="output"})(Ma||(Ma={}));function NSe(l,e){return yo.isUri(l)?eq(l.scheme,e):Yqe(l,e+":")}function SWe(l,...e){return e.some(i=>NSe(l,i))}const zui="tkn";class Uui{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return q_.join(this._serverRootPath,Ma.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(f){return Pa(f),e}const i=e.authority;let n=this._hosts[i];n&&n.indexOf(":")!==-1&&n.indexOf("[")===-1&&(n=`[${n}]`);const s=this._ports[i],c=this._connectionTokens[i];let d=`path=${encodeURIComponent(e.path)}`;return typeof c=="string"&&(d+=`&${zui}=${encodeURIComponent(c)}`),yo.from({scheme:XB?this._preferredWebSchema:Ma.vscodeRemoteResource,authority:`${n}:${s}`,path:this._remoteResourcesPath,query:d})}}const v2t=new Uui,qui="vscode-app",cne=class cne{asBrowserUri(e){const i=this.toUri(e);return this.uriToBrowserUri(i)}uriToBrowserUri(e){return e.scheme===Ma.vscodeRemote?v2t.rewrite(e):e.scheme===Ma.file&&(PE||Qai===`${Ma.vscodeFileResource}://${cne.FALLBACK_AUTHORITY}`)?e.with({scheme:Ma.vscodeFileResource,authority:e.authority||cne.FALLBACK_AUTHORITY,query:null,fragment:null}):e}toUri(e,i){if(yo.isUri(e))return e;if(globalThis._VSCODE_FILE_ROOT){const n=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(n))return yo.joinPath(yo.parse(n,!0),e);const s=Cli(n,e);return yo.file(s)}return yo.parse(i.toUrl(e))}};cne.FALLBACK_AUTHORITY=qui;let wWe=cne;const LSe=new wWe;var xWe;(function(l){const e=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);l.CoopAndCoep=Object.freeze(e.get("3"));const i="vscode-coi";function n(c){let d;typeof c=="string"?d=new URL(c).searchParams:c instanceof URL?d=c.searchParams:yo.isUri(c)&&(d=new URL(c.toString(!0)).searchParams);const f=d==null?void 0:d.get(i);if(f)return e.get(f)}l.getHeadersFromQuery=n;function s(c,d,f){if(!globalThis.crossOriginIsolated)return;const m=d&&f?"3":f?"2":"1";c instanceof URLSearchParams?c.set(i,m):c[i]=m}l.addSearchParam=s})(xWe||(xWe={}));function PSe(l){return ASe(l,0)}function ASe(l,e){switch(typeof l){case"object":return l===null?F4(349,e):Array.isArray(l)?Jui(l,e):Gui(l,e);case"string":return c$e(l,e);case"boolean":return $ui(l,e);case"number":return F4(l,e);case"undefined":return F4(937,e);default:return F4(617,e)}}function F4(l,e){return(e<<5)-e+l|0}function $ui(l,e){return F4(l?433:863,e)}function c$e(l,e){e=F4(149417,e);for(let i=0,n=l.length;i<n;i++)e=F4(l.charCodeAt(i),e);return e}function Jui(l,e){return e=F4(104579,e),l.reduce((i,n)=>ASe(n,i),e)}function Gui(l,e){return e=F4(181387,e),Object.keys(l).sort().reduce((i,n)=>(i=c$e(n,i),ASe(l[n],i)),e)}function aFe(l,e,i=32){const n=i-e,s=~((1<<n)-1);return(l<<e|(s&l)>>>n)>>>0}function dvt(l,e=0,i=l.byteLength,n=0){for(let s=0;s<i;s++)l[e+s]=n}function Kui(l,e,i="0"){for(;l.length<e;)l=i+l;return l}function Ete(l,e=32){return l instanceof ArrayBuffer?Array.from(new Uint8Array(l)).map(i=>i.toString(16).padStart(2,"0")).join(""):Kui((l>>>0).toString(16),e/4)}const Jbe=class Jbe{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const i=e.length;if(i===0)return;const n=this._buff;let s=this._buffLen,c=this._leftoverHighSurrogate,d,f;for(c!==0?(d=c,f=-1,c=0):(d=e.charCodeAt(0),f=0);;){let m=d;if(Pm(d))if(f+1<i){const v=e.charCodeAt(f+1);wB(v)?(f++,m=e$e(d,v)):m=65533}else{c=d;break}else wB(d)&&(m=65533);if(s=this._push(n,s,m),f++,f<i)d=e.charCodeAt(f);else break}this._buffLen=s,this._leftoverHighSurrogate=c}_push(e,i,n){return n<128?e[i++]=n:n<2048?(e[i++]=192|(n&1984)>>>6,e[i++]=128|(n&63)>>>0):n<65536?(e[i++]=224|(n&61440)>>>12,e[i++]=128|(n&4032)>>>6,e[i++]=128|(n&63)>>>0):(e[i++]=240|(n&1835008)>>>18,e[i++]=128|(n&258048)>>>12,e[i++]=128|(n&4032)>>>6,e[i++]=128|(n&63)>>>0),i>=64&&(this._step(),i-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),i}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),Ete(this._h0)+Ete(this._h1)+Ete(this._h2)+Ete(this._h3)+Ete(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,dvt(this._buff,this._buffLen),this._buffLen>56&&(this._step(),dvt(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=Jbe._bigBlock32,i=this._buffDV;for(let w=0;w<64;w+=4)e.setUint32(w,i.getUint32(w,!1),!1);for(let w=64;w<320;w+=4)e.setUint32(w,aFe(e.getUint32(w-12,!1)^e.getUint32(w-32,!1)^e.getUint32(w-56,!1)^e.getUint32(w-64,!1),1),!1);let n=this._h0,s=this._h1,c=this._h2,d=this._h3,f=this._h4,m,v,x;for(let w=0;w<80;w++)w<20?(m=s&c|~s&d,v=1518500249):w<40?(m=s^c^d,v=1859775393):w<60?(m=s&c|s&d|c&d,v=2400959708):(m=s^c^d,v=3395469782),x=aFe(n,5)+m+f+v+e.getUint32(w*4,!1)&4294967295,f=d,d=c,c=aFe(s,30),s=n,n=x;this._h0=this._h0+n&4294967295,this._h1=this._h1+s&4294967295,this._h2=this._h2+c&4294967295,this._h3=this._h3+d&4294967295,this._h4=this._h4+f&4294967295}};Jbe._bigBlock32=new DataView(new ArrayBuffer(320));let kWe=Jbe;const{registerWindow:_7i,getWindow:Eo,getDocument:p7i,getWindows:b2t,getWindowsCount:Xui,getWindowId:oye,getWindowById:fvt,hasWindow:m7i,onDidRegisterWindow:OSe,onWillUnregisterWindow:Qui,onDidUnregisterWindow:Zui}=function(){const l=new Map;Hli(cd,1);const e={window:cd,disposables:new wn};l.set(cd.vscodeWindowId,e);const i=new gi,n=new gi,s=new gi;function c(d,f){return(typeof d=="number"?l.get(d):void 0)??(f?e:void 0)}return{onDidRegisterWindow:i.event,onWillUnregisterWindow:s.event,onDidUnregisterWindow:n.event,registerWindow(d){if(l.has(d.vscodeWindowId))return xi.None;const f=new wn,m={window:d,disposables:f.add(new wn)};return l.set(d.vscodeWindowId,m),f.add(fo(()=>{l.delete(d.vscodeWindowId),n.fire(d)})),f.add(en(d,br.BEFORE_UNLOAD,()=>{s.fire(d)})),i.fire(m),f},getWindows(){return l.values()},getWindowsCount(){return l.size},getWindowId(d){return d.vscodeWindowId},hasWindow(d){return l.has(d)},getWindowById:c,getWindow(d){var v;const f=d;if((v=f==null?void 0:f.ownerDocument)!=null&&v.defaultView)return f.ownerDocument.defaultView.window;const m=d;return m!=null&&m.view?m.view.window:cd},getDocument(d){return Eo(d).document}}}();function s0(l){for(;l.firstChild;)l.firstChild.remove()}class Yui{constructor(e,i,n,s){this._node=e,this._type=i,this._handler=n,this._options=s||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function en(l,e,i,n){return new Yui(l,e,i,n)}function C2t(l,e){return function(i){return e(new hT(l,i))}}function edi(l){return function(e){return l(new Id(e))}}const ph=function(e,i,n,s){let c=n;return i==="click"||i==="mousedown"||i==="contextmenu"?c=C2t(Eo(e),n):(i==="keydown"||i==="keypress"||i==="keyup")&&(c=edi(n)),en(e,i,c,s)},tdi=function(e,i,n){const s=C2t(Eo(e),i);return idi(e,s,n)};function idi(l,e,i){return en(l,VE&&s$e.pointerEvents?br.POINTER_DOWN:br.MOUSE_DOWN,e,i)}function Yte(l,e,i){return xie(l,e,i)}class cFe extends d2t{constructor(e,i){super(e,i)}}let aye,ZC;class l$e extends a$e{constructor(e){super(),this.defaultTarget=e&&Eo(e)}cancelAndSet(e,i,n){return super.cancelAndSet(e,i,n??this.defaultTarget)}}class lFe{constructor(e,i=0){this._runner=e,this.priority=i,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){Pa(e)}}static sort(e,i){return i.priority-e.priority}}(function(){const l=new Map,e=new Map,i=new Map,n=new Map,s=c=>{i.set(c,!1);const d=l.get(c)??[];for(e.set(c,d),l.set(c,[]),n.set(c,!0);d.length>0;)d.sort(lFe.sort),d.shift().execute();n.set(c,!1)};ZC=(c,d,f=0)=>{const m=oye(c),v=new lFe(d,f);let x=l.get(m);return x||(x=[],l.set(m,x)),x.push(v),i.get(m)||(i.set(m,!0),c.requestAnimationFrame(()=>s(m))),v},aye=(c,d,f)=>{const m=oye(c);if(n.get(m)){const v=new lFe(d,f);let x=e.get(m);return x||(x=[],e.set(m,x)),x.push(v),v}else return ZC(c,d,f)}})();function MSe(l){return Eo(l).getComputedStyle(l,null)}function SR(l,e){const i=Eo(l),n=i.document;if(l!==n.body)return new Du(l.clientWidth,l.clientHeight);if(VE&&(i!=null&&i.visualViewport))return new Du(i.visualViewport.width,i.visualViewport.height);if(i!=null&&i.innerWidth&&i.innerHeight)return new Du(i.innerWidth,i.innerHeight);if(n.body&&n.body.clientWidth&&n.body.clientHeight)return new Du(n.body.clientWidth,n.body.clientHeight);if(n.documentElement&&n.documentElement.clientWidth&&n.documentElement.clientHeight)return new Du(n.documentElement.clientWidth,n.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class C_{static convertToPixels(e,i){return parseFloat(i)||0}static getDimension(e,i,n){const s=MSe(e),c=s?s.getPropertyValue(i):"0";return C_.convertToPixels(e,c)}static getBorderLeftWidth(e){return C_.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return C_.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return C_.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return C_.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return C_.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return C_.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return C_.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return C_.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return C_.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return C_.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return C_.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return C_.getDimension(e,"margin-bottom","marginBottom")}}const XF=class XF{constructor(e,i){this.width=e,this.height=i}with(e=this.width,i=this.height){return e!==this.width||i!==this.height?new XF(e,i):this}static is(e){return typeof e=="object"&&typeof e.height=="number"&&typeof e.width=="number"}static lift(e){return e instanceof XF?e:new XF(e.width,e.height)}static equals(e,i){return e===i?!0:!e||!i?!1:e.width===i.width&&e.height===i.height}};XF.None=new XF(0,0);let Du=XF;function S2t(l){let e=l.offsetParent,i=l.offsetTop,n=l.offsetLeft;for(;(l=l.parentNode)!==null&&l!==l.ownerDocument.body&&l!==l.ownerDocument.documentElement;){i-=l.scrollTop;const s=x2t(l)?null:MSe(l);s&&(n-=s.direction!=="rtl"?l.scrollLeft:-l.scrollLeft),l===e&&(n+=C_.getBorderLeftWidth(l),i+=C_.getBorderTopWidth(l),i+=l.offsetTop,n+=l.offsetLeft,e=l.offsetParent)}return{left:n,top:i}}function ndi(l,e,i){typeof e=="number"&&(l.style.width=`${e}px`),typeof i=="number"&&(l.style.height=`${i}px`)}function e_(l){const e=l.getBoundingClientRect(),i=Eo(l);return{left:e.left+i.scrollX,top:e.top+i.scrollY,width:e.width,height:e.height}}function w2t(l){let e=l,i=1;do{const n=MSe(e).zoom;n!=null&&n!=="1"&&(i*=n),e=e.parentElement}while(e!==null&&e!==e.ownerDocument.documentElement);return i}function FC(l){const e=C_.getMarginLeft(l)+C_.getMarginRight(l);return l.offsetWidth+e}function uFe(l){const e=C_.getBorderLeftWidth(l)+C_.getBorderRightWidth(l),i=C_.getPaddingLeft(l)+C_.getPaddingRight(l);return l.offsetWidth-e-i}function rdi(l){const e=C_.getBorderTopWidth(l)+C_.getBorderBottomWidth(l),i=C_.getPaddingTop(l)+C_.getPaddingBottom(l);return l.offsetHeight-e-i}function B4(l){const e=C_.getMarginTop(l)+C_.getMarginBottom(l);return l.offsetHeight+e}function Am(l,e){return!!(e!=null&&e.contains(l))}function sdi(l,e,i){for(;l&&l.nodeType===l.ELEMENT_NODE;){if(l.classList.contains(e))return l;if(i){if(typeof i=="string"){if(l.classList.contains(i))return null}else if(l===i)return null}l=l.parentNode}return null}function dFe(l,e,i){return!!sdi(l,e,i)}function x2t(l){return l&&!!l.host&&!!l.mode}function cye(l){return!!kB(l)}function kB(l){var e;for(;l.parentNode;){if(l===((e=l.ownerDocument)==null?void 0:e.body))return null;l=l.parentNode}return x2t(l)?l:null}function D0(){let l=_J().activeElement;for(;l!=null&&l.shadowRoot;)l=l.shadowRoot.activeElement;return l}function RSe(l){return D0()===l}function k2t(l){return Am(D0(),l)}function _J(){return Xui()<=1?cd.document:Array.from(b2t()).map(({window:e})=>e.document).find(e=>e.hasFocus())??cd.document}function eie(){var e;return((e=_J().defaultView)==null?void 0:e.window)??cd}const u$e=new Map;function T2t(){return new odi}class odi{constructor(){this._currentCssStyle="",this._styleSheet=void 0}setStyle(e){e!==this._currentCssStyle&&(this._currentCssStyle=e,this._styleSheet?this._styleSheet.innerText=e:this._styleSheet=Dw(cd.document.head,i=>i.innerText=e))}dispose(){this._styleSheet&&(this._styleSheet.remove(),this._styleSheet=void 0)}}function Dw(l=cd.document.head,e,i){const n=document.createElement("style");if(n.type="text/css",n.media="screen",e==null||e(n),l.appendChild(n),i&&i.add(fo(()=>n.remove())),l===cd.document.head){const s=new Set;u$e.set(n,s);for(const{window:c,disposables:d}of b2t()){if(c===cd)continue;const f=d.add(adi(n,s,c));i==null||i.add(f)}}return n}function adi(l,e,i){var c,d;const n=new wn,s=l.cloneNode(!0);i.document.head.appendChild(s),n.add(fo(()=>s.remove()));for(const f of E2t(l))(d=s.sheet)==null||d.insertRule(f.cssText,(c=s.sheet)==null?void 0:c.cssRules.length);return n.add(cdi.observe(l,n,{childList:!0})(()=>{s.textContent=l.textContent})),e.add(s),n.add(fo(()=>e.delete(s))),n}const cdi=new class{constructor(){this.mutationObservers=new Map}observe(l,e,i){let n=this.mutationObservers.get(l);n||(n=new Map,this.mutationObservers.set(l,n));const s=PSe(i);let c=n.get(s);if(c)c.users+=1;else{const d=new gi,f=new MutationObserver(v=>d.fire(v));f.observe(l,i);const m=c={users:1,observer:f,onDidMutate:d.event};e.add(fo(()=>{m.users-=1,m.users===0&&(d.dispose(),f.disconnect(),n==null||n.delete(s),(n==null?void 0:n.size)===0&&this.mutationObservers.delete(l))})),n.set(s,c)}return c.onDidMutate}};let fFe=null;function D2t(){return fFe||(fFe=Dw()),fFe}function E2t(l){var e,i;return(e=l==null?void 0:l.sheet)!=null&&e.rules?l.sheet.rules:(i=l==null?void 0:l.sheet)!=null&&i.cssRules?l.sheet.cssRules:[]}function lye(l,e,i=D2t()){var n;if(!(!i||!e)){(n=i.sheet)==null||n.insertRule(`${l} {${e}}`,0);for(const s of u$e.get(i)??[])lye(l,e,s)}}function TWe(l,e=D2t()){var s;if(!e)return;const i=E2t(e),n=[];for(let c=0;c<i.length;c++){const d=i[c];ldi(d)&&d.selectorText.indexOf(l)!==-1&&n.push(c)}for(let c=n.length-1;c>=0;c--)(s=e.sheet)==null||s.deleteRule(n[c]);for(const c of u$e.get(e)??[])TWe(l,c)}function ldi(l){return typeof l.selectorText=="string"}function Mm(l){return l instanceof HTMLElement||l instanceof Eo(l).HTMLElement}function hvt(l){return l instanceof HTMLAnchorElement||l instanceof Eo(l).HTMLAnchorElement}function udi(l){return l instanceof SVGElement||l instanceof Eo(l).SVGElement}function d$e(l){return l instanceof MouseEvent||l instanceof Eo(l).MouseEvent}function E4(l){return l instanceof KeyboardEvent||l instanceof Eo(l).KeyboardEvent}const br={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:f9?"webkitAnimationStart":"animationstart",ANIMATION_END:f9?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:f9?"webkitAnimationIteration":"animationiteration"};function ddi(l){const e=l;return!!(e&&typeof e.preventDefault=="function"&&typeof e.stopPropagation=="function")}const il={stop:(l,e)=>(l.preventDefault(),e&&l.stopPropagation(),l)};function fdi(l){const e=[];for(let i=0;l&&l.nodeType===l.ELEMENT_NODE;i++)e[i]=l.scrollTop,l=l.parentNode;return e}function hdi(l,e){for(let i=0;l&&l.nodeType===l.ELEMENT_NODE;i++)l.scrollTop!==e[i]&&(l.scrollTop=e[i]),l=l.parentNode}class uye extends xi{static hasFocusWithin(e){if(Mm(e)){const i=kB(e),n=i?i.activeElement:e.ownerDocument.activeElement;return Am(n,e)}else{const i=e;return Am(i.document.activeElement,i.document)}}constructor(e){super(),this._onDidFocus=this._register(new gi),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new gi),this.onDidBlur=this._onDidBlur.event;let i=uye.hasFocusWithin(e),n=!1;const s=()=>{n=!1,i||(i=!0,this._onDidFocus.fire())},c=()=>{i&&(n=!0,(Mm(e)?Eo(e):e).setTimeout(()=>{n&&(n=!1,i=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{uye.hasFocusWithin(e)!==i&&(i?c():s())},this._register(en(e,br.FOCUS,s,!0)),this._register(en(e,br.BLUR,c,!0)),Mm(e)&&(this._register(en(e,br.FOCUS_IN,()=>this._refreshStateHandler())),this._register(en(e,br.FOCUS_OUT,()=>this._refreshStateHandler())))}}function zE(l){return new uye(l)}function _di(l,e){return l.after(e),e}function jn(l,...e){if(l.append(...e),e.length===1&&typeof e[0]!="string")return e[0]}function f$e(l,e){return l.insertBefore(e,l.firstChild),e}function o0(l,...e){l.innerText="",jn(l,...e)}const pdi=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var Bne;(function(l){l.HTML="http://www.w3.org/1999/xhtml",l.SVG="http://www.w3.org/2000/svg"})(Bne||(Bne={}));function I2t(l,e,i,...n){const s=pdi.exec(e);if(!s)throw new Error("Bad use of emmet");const c=s[1]||"div";let d;return l!==Bne.HTML?d=document.createElementNS(l,c):d=document.createElement(c),s[3]&&(d.id=s[3]),s[4]&&(d.className=s[4].replace(/\./g," ").trim()),i&&Object.entries(i).forEach(([f,m])=>{typeof m>"u"||(/^on\w+$/.test(f)?d[f]=m:f==="selected"?m&&d.setAttribute(f,"true"):d.setAttribute(f,m))}),d.append(...n),d}function Cr(l,e,...i){return I2t(Bne.HTML,l,e,...i)}Cr.SVG=function(l,e,...i){return I2t(Bne.SVG,l,e,...i)};function mdi(l,...e){l?HC(...e):dv(...e)}function HC(...l){for(const e of l)e.style.display="",e.removeAttribute("aria-hidden")}function dv(...l){for(const e of l)e.style.display="none",e.setAttribute("aria-hidden","true")}function _vt(l,e){const i=l.devicePixelRatio*e;return Math.max(1,Math.floor(i))/l.devicePixelRatio}function N2t(l){cd.open(l,"_blank","noopener")}function gdi(l,e){const i=()=>{e(),n=ZC(l,i)};let n=ZC(l,i);return fo(()=>n.dispose())}v2t.setPreferredWebSchema(/^https:/.test(cd.location.href)?"https":"http");function l6(l){return l?`url('${LSe.uriToBrowserUri(l).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function hFe(l){return`'${l.replace(/'/g,"%27")}'`}function Z4(l,e){if(l!==void 0){const i=l.match(/^\s*var\((.+)\)$/);if(i){const n=i[1].split(",",2);return n.length===2&&(e=Z4(n[1].trim(),e)),`var(${n[0]}, ${e})`}return l}return e}function ydi(l,e=!1){const i=document.createElement("a");return g2t("afterSanitizeAttributes",n=>{for(const s of["href","src"])if(n.hasAttribute(s)){const c=n.getAttribute(s);if(s==="href"&&c.startsWith("#"))continue;if(i.href=c,!l.includes(i.protocol.replace(/:$/,""))){if(e&&s==="src"&&i.href.startsWith("data:"))continue;n.removeAttribute(s)}}}),fo(()=>{y2t("afterSanitizeAttributes")})}const vdi=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);class W4 extends gi{constructor(){super(),this._subscriptions=new wn,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(Tr.runAndSubscribe(OSe,({window:e,disposables:i})=>this.registerListeners(e,i),{window:cd,disposables:this._subscriptions}))}registerListeners(e,i){i.add(en(e,"keydown",n=>{if(n.defaultPrevented)return;const s=new Id(n);if(!(s.keyCode===6&&n.repeat)){if(n.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(n.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(n.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(n.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(s.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=n.altKey,this._keyStatus.ctrlKey=n.ctrlKey,this._keyStatus.metaKey=n.metaKey,this._keyStatus.shiftKey=n.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=n,this.fire(this._keyStatus))}},!0)),i.add(en(e,"keyup",n=>{n.defaultPrevented||(!n.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!n.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!n.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!n.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=n.altKey,this._keyStatus.ctrlKey=n.ctrlKey,this._keyStatus.metaKey=n.metaKey,this._keyStatus.shiftKey=n.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=n,this.fire(this._keyStatus)))},!0)),i.add(en(e.document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),i.add(en(e.document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),i.add(en(e.document.body,"mousemove",n=>{n.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),i.add(en(e,"blur",()=>{this.resetKeyStatus()}))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return W4.instance||(W4.instance=new W4),W4.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}class bdi extends xi{constructor(e,i){super(),this.element=e,this.callbacks=i,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this.callbacks.onDragStart&&this._register(en(this.element,br.DRAG_START,e=>{var i,n;(n=(i=this.callbacks).onDragStart)==null||n.call(i,e)})),this.callbacks.onDrag&&this._register(en(this.element,br.DRAG,e=>{var i,n;(n=(i=this.callbacks).onDrag)==null||n.call(i,e)})),this._register(en(this.element,br.DRAG_ENTER,e=>{var i,n;this.counter++,this.dragStartTime=e.timeStamp,(n=(i=this.callbacks).onDragEnter)==null||n.call(i,e)})),this._register(en(this.element,br.DRAG_OVER,e=>{var i,n;e.preventDefault(),(n=(i=this.callbacks).onDragOver)==null||n.call(i,e,e.timeStamp-this.dragStartTime)})),this._register(en(this.element,br.DRAG_LEAVE,e=>{var i,n;this.counter--,this.counter===0&&(this.dragStartTime=0,(n=(i=this.callbacks).onDragLeave)==null||n.call(i,e))})),this._register(en(this.element,br.DRAG_END,e=>{var i,n;this.counter=0,this.dragStartTime=0,(n=(i=this.callbacks).onDragEnd)==null||n.call(i,e)})),this._register(en(this.element,br.DROP,e=>{var i,n;this.counter=0,this.dragStartTime=0,(n=(i=this.callbacks).onDrop)==null||n.call(i,e)}))}}const L2t=/(?<tag>[\w\-]+)?(?:#(?<id>[\w\-]+))?(?<class>(?:\.(?:[\w\-]+))*)(?:@(?<name>(?:[\w\_])+))?/;function Rc(l,...e){let i,n;Array.isArray(e[0])?(i={},n=e[0]):(i=e[0]||{},n=e[1]);const s=L2t.exec(l);if(!s||!s.groups)throw new Error("Bad use of h");const c=s.groups.tag||"div",d=document.createElement(c);s.groups.id&&(d.id=s.groups.id);const f=[];if(s.groups.class)for(const v of s.groups.class.split("."))v!==""&&f.push(v);if(i.className!==void 0)for(const v of i.className.split("."))v!==""&&f.push(v);f.length>0&&(d.className=f.join(" "));const m={};if(s.groups.name&&(m[s.groups.name]=d),n)for(const v of n)Mm(v)?d.appendChild(v):typeof v=="string"?d.append(v):"root"in v&&(Object.assign(m,v),d.appendChild(v.root));for(const[v,x]of Object.entries(i))if(v!=="className")if(v==="style")for(const[w,I]of Object.entries(x))d.style.setProperty(dye(w),typeof I=="number"?I+"px":""+I);else v==="tabIndex"?d.tabIndex=x:d.setAttribute(dye(v),x.toString());return m.root=d,m}function SU(l,...e){let i,n;Array.isArray(e[0])?(i={},n=e[0]):(i=e[0]||{},n=e[1]);const s=L2t.exec(l);if(!s||!s.groups)throw new Error("Bad use of h");const c=s.groups.tag||"div",d=document.createElementNS("http://www.w3.org/2000/svg",c);s.groups.id&&(d.id=s.groups.id);const f=[];if(s.groups.class)for(const v of s.groups.class.split("."))v!==""&&f.push(v);if(i.className!==void 0)for(const v of i.className.split("."))v!==""&&f.push(v);f.length>0&&(d.className=f.join(" "));const m={};if(s.groups.name&&(m[s.groups.name]=d),n)for(const v of n)Mm(v)?d.appendChild(v):typeof v=="string"?d.append(v):"root"in v&&(Object.assign(m,v),d.appendChild(v.root));for(const[v,x]of Object.entries(i))if(v!=="className")if(v==="style")for(const[w,I]of Object.entries(x))d.style.setProperty(dye(w),typeof I=="number"?I+"px":""+I);else v==="tabIndex"?d.tabIndex=x:d.setAttribute(dye(v),x.toString());return m.root=d,m}function dye(l){return l.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}class Cdi extends xi{constructor(e){super(),this._onDidChange=this._register(new gi),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(e,!0),this._mediaQueryList=null,this._handleChange(e,!1)}_handleChange(e,i){var n;(n=this._mediaQueryList)==null||n.removeEventListener("change",this._listener),this._mediaQueryList=e.matchMedia(`(resolution: ${e.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),i&&this._onDidChange.fire()}}class Sdi extends xi{get value(){return this._value}constructor(e){super(),this._onDidChange=this._register(new gi),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio(e);const i=this._register(new Cdi(e));this._register(i.onDidChange(()=>{this._value=this._getPixelRatio(e),this._onDidChange.fire(this._value)}))}_getPixelRatio(e){const i=document.createElement("canvas").getContext("2d"),n=e.devicePixelRatio||1,s=i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1;return n/s}}class wdi{constructor(){this.mapWindowIdToPixelRatioMonitor=new Map}_getOrCreatePixelRatioMonitor(e){const i=oye(e);let n=this.mapWindowIdToPixelRatioMonitor.get(i);return n||(n=new Sdi(e),this.mapWindowIdToPixelRatioMonitor.set(i,n),Tr.once(Zui)(({vscodeWindowId:s})=>{s===i&&(n==null||n.dispose(),this.mapWindowIdToPixelRatioMonitor.delete(i))})),n}getInstance(e){return this._getOrCreatePixelRatioMonitor(e)}}const Wne=new wdi;class P2t{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){const i=cE(e);this._maxWidth!==i&&(this._maxWidth=i,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){const i=cE(e);this._width!==i&&(this._width=i,this.domNode.style.width=this._width)}setHeight(e){const i=cE(e);this._height!==i&&(this._height=i,this.domNode.style.height=this._height)}setTop(e){const i=cE(e);this._top!==i&&(this._top=i,this.domNode.style.top=this._top)}setLeft(e){const i=cE(e);this._left!==i&&(this._left=i,this.domNode.style.left=this._left)}setBottom(e){const i=cE(e);this._bottom!==i&&(this._bottom=i,this.domNode.style.bottom=this._bottom)}setRight(e){const i=cE(e);this._right!==i&&(this._right=i,this.domNode.style.right=this._right)}setPaddingLeft(e){const i=cE(e);this._paddingLeft!==i&&(this._paddingLeft=i,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){const i=cE(e);this._fontSize!==i&&(this._fontSize=i,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){const i=cE(e);this._lineHeight!==i&&(this._lineHeight=i,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){const i=cE(e);this._letterSpacing!==i&&(this._letterSpacing=i,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,i){this.domNode.classList.toggle(e,i),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,i){this.domNode.setAttribute(e,i)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function cE(l){return typeof l=="number"?`${l}px`:l}function _u(l){return new P2t(l)}function a0(l,e){l instanceof P2t?(l.setFontFamily(e.getMassagedFontFamily()),l.setFontWeight(e.fontWeight),l.setFontSize(e.fontSize),l.setFontFeatureSettings(e.fontFeatureSettings),l.setFontVariationSettings(e.fontVariationSettings),l.setLineHeight(e.lineHeight),l.setLetterSpacing(e.letterSpacing)):(l.style.fontFamily=e.getMassagedFontFamily(),l.style.fontWeight=e.fontWeight,l.style.fontSize=e.fontSize+"px",l.style.fontFeatureSettings=e.fontFeatureSettings,l.style.fontVariationSettings=e.fontVariationSettings,l.style.lineHeight=e.lineHeight+"px",l.style.letterSpacing=e.letterSpacing+"px")}class xdi{constructor(e,i){this.chr=e,this.type=i,this.width=0}fulfill(e){this.width=e}}class h$e{constructor(e,i){this._bareFontInfo=e,this._requests=i,this._container=null,this._testElements=null}read(e){var i;this._createDomElements(),e.document.body.appendChild(this._container),this._readFromDomElements(),(i=this._container)==null||i.remove(),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const i=document.createElement("div");a0(i,this._bareFontInfo),e.appendChild(i);const n=document.createElement("div");a0(n,this._bareFontInfo),n.style.fontWeight="bold",e.appendChild(n);const s=document.createElement("div");a0(s,this._bareFontInfo),s.style.fontStyle="italic",e.appendChild(s);const c=[];for(const d of this._requests){let f;d.type===0&&(f=i),d.type===2&&(f=n),d.type===1&&(f=s),f.appendChild(document.createElement("br"));const m=document.createElement("span");h$e._render(m,d),f.appendChild(m),c.push(m)}this._container=e,this._testElements=c}static _render(e,i){if(i.chr===" "){let n=" ";for(let s=0;s<8;s++)n+=n;e.innerText=n}else{let n=i.chr;for(let s=0;s<8;s++)n+=n;e.textContent=n}}_readFromDomElements(){for(let e=0,i=this._requests.length;e<i;e++){const n=this._requests[e],s=this._testElements[e];n.fulfill(s.offsetWidth/256)}}}function kdi(l,e,i){new h$e(e,i).read(l)}const fk=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new gi,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(l){l=Math.min(Math.max(-5,l),20),this._zoomLevel!==l&&(this._zoomLevel=l,this._onDidChangeZoomLevel.fire(this._zoomLevel))}},Tdi=Hc?1.5:1.35,_Fe=8;class h9{static createFromValidatedSettings(e,i,n){const s=e.get(49),c=e.get(53),d=e.get(52),f=e.get(51),m=e.get(54),v=e.get(67),x=e.get(64);return h9._create(s,c,d,f,m,v,x,i,n)}static _create(e,i,n,s,c,d,f,m,v){d===0?d=Tdi*n:d<_Fe&&(d=d*n),d=Math.round(d),d<_Fe&&(d=_Fe);const x=1+(v?0:fk.getZoomLevel()*.1);return n*=x,d*=x,c===Lne.TRANSLATE&&(i==="normal"||i==="bold"?c=Lne.OFF:(c=`'wght' ${parseInt(i,10)}`,i="normal")),new h9({pixelRatio:m,fontFamily:e,fontWeight:i,fontSize:n,fontFeatureSettings:s,fontVariationSettings:c,lineHeight:d,letterSpacing:f})}constructor(e){this._bareFontInfoBrand=void 0,this.pixelRatio=e.pixelRatio,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.fontVariationSettings=e.fontVariationSettings,this.lineHeight=e.lineHeight|0,this.letterSpacing=e.letterSpacing}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.fontVariationSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(){const e=vv.fontFamily,i=h9._wrapInQuotes(this.fontFamily);return e&&this.fontFamily!==e?`${i}, ${e}`:i}static _wrapInQuotes(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?`"${e}"`:e}}const Ddi=2;class DWe extends h9{constructor(e,i){super(e),this._editorStylingBrand=void 0,this.version=Ddi,this.isTrusted=i,this.isMonospace=e.isMonospace,this.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,this.spaceWidth=e.spaceWidth,this.middotWidth=e.middotWidth,this.wsmiddotWidth=e.wsmiddotWidth,this.maxDigitWidth=e.maxDigitWidth}equals(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.fontVariationSettings===e.fontVariationSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.maxDigitWidth===e.maxDigitWidth}}class Edi extends xi{constructor(){super(...arguments),this._cache=new Map,this._evictUntrustedReadingsTimeout=-1,this._onDidChange=this._register(new gi),this.onDidChange=this._onDidChange.event}dispose(){this._evictUntrustedReadingsTimeout!==-1&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache.clear(),this._onDidChange.fire()}_ensureCache(e){const i=oye(e);let n=this._cache.get(i);return n||(n=new Idi,this._cache.set(i,n)),n}_writeToCache(e,i,n){this._ensureCache(e).put(i,n),!n.isTrusted&&this._evictUntrustedReadingsTimeout===-1&&(this._evictUntrustedReadingsTimeout=e.setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings(e)},5e3))}_evictUntrustedReadings(e){const i=this._ensureCache(e),n=i.getValues();let s=!1;for(const c of n)c.isTrusted||(s=!0,i.remove(c));s&&this._onDidChange.fire()}readFontInfo(e,i){const n=this._ensureCache(e);if(!n.has(i)){let s=this._actualReadFontInfo(e,i);(s.typicalHalfwidthCharacterWidth<=2||s.typicalFullwidthCharacterWidth<=2||s.spaceWidth<=2||s.maxDigitWidth<=2)&&(s=new DWe({pixelRatio:Wne.getInstance(e).value,fontFamily:s.fontFamily,fontWeight:s.fontWeight,fontSize:s.fontSize,fontFeatureSettings:s.fontFeatureSettings,fontVariationSettings:s.fontVariationSettings,lineHeight:s.lineHeight,letterSpacing:s.letterSpacing,isMonospace:s.isMonospace,typicalHalfwidthCharacterWidth:Math.max(s.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(s.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:s.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(s.spaceWidth,5),middotWidth:Math.max(s.middotWidth,5),wsmiddotWidth:Math.max(s.wsmiddotWidth,5),maxDigitWidth:Math.max(s.maxDigitWidth,5)},!1)),this._writeToCache(e,i,s)}return n.get(i)}_createRequest(e,i,n,s){const c=new xdi(e,i);return n.push(c),s==null||s.push(c),c}_actualReadFontInfo(e,i){const n=[],s=[],c=this._createRequest("n",0,n,s),d=this._createRequest("m",0,n,null),f=this._createRequest(" ",0,n,s),m=this._createRequest("0",0,n,s),v=this._createRequest("1",0,n,s),x=this._createRequest("2",0,n,s),w=this._createRequest("3",0,n,s),I=this._createRequest("4",0,n,s),P=this._createRequest("5",0,n,s),O=this._createRequest("6",0,n,s),z=this._createRequest("7",0,n,s),J=this._createRequest("8",0,n,s),Y=this._createRequest("9",0,n,s),ae=this._createRequest("→",0,n,s),me=this._createRequest("→",0,n,null),ye=this._createRequest("·",0,n,s),Ce=this._createRequest("⸱",0,n,null),Fe="|/-_ilm%";for(let Bi=0,$i=Fe.length;Bi<$i;Bi++)this._createRequest(Fe.charAt(Bi),0,n,s),this._createRequest(Fe.charAt(Bi),1,n,s),this._createRequest(Fe.charAt(Bi),2,n,s);kdi(e,i,n);const rt=Math.max(m.width,v.width,x.width,w.width,I.width,P.width,O.width,z.width,J.width,Y.width);let ct=i.fontFeatureSettings===mR.OFF;const Mt=s[0].width;for(let Bi=1,$i=s.length;ct&&Bi<$i;Bi++){const $t=Mt-s[Bi].width;if($t<-.001||$t>.001){ct=!1;break}}let Yt=!0;return ct&&me.width!==Mt&&(Yt=!1),me.width>ae.width&&(Yt=!1),new DWe({pixelRatio:Wne.getInstance(e).value,fontFamily:i.fontFamily,fontWeight:i.fontWeight,fontSize:i.fontSize,fontFeatureSettings:i.fontFeatureSettings,fontVariationSettings:i.fontVariationSettings,lineHeight:i.lineHeight,letterSpacing:i.letterSpacing,isMonospace:ct,typicalHalfwidthCharacterWidth:c.width,typicalFullwidthCharacterWidth:d.width,canUseHalfwidthRightwardsArrow:Yt,spaceWidth:f.width,middotWidth:ye.width,wsmiddotWidth:Ce.width,maxDigitWidth:rt},!0)}}class Idi{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const i=e.getId();return!!this._values[i]}get(e){const i=e.getId();return this._values[i]}put(e,i){const n=e.getId();this._keys[n]=e,this._values[n]=i}remove(e){const i=e.getId();delete this._keys[i],delete this._values[i]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}}const EWe=new Edi;var IE;(function(l){l.serviceIds=new Map,l.DI_TARGET="$di$target",l.DI_DEPENDENCIES="$di$dependencies";function e(i){return i[l.DI_DEPENDENCIES]||[]}l.getServiceDependencies=e})(IE||(IE={}));const ho=jc("instantiationService");function Ndi(l,e,i){e[IE.DI_TARGET]===e?e[IE.DI_DEPENDENCIES].push({id:l,index:i}):(e[IE.DI_DEPENDENCIES]=[{id:l,index:i}],e[IE.DI_TARGET]=e)}function jc(l){if(IE.serviceIds.has(l))return IE.serviceIds.get(l);const e=function(i,n,s){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Ndi(e,i,s)};return e.toString=()=>l,IE.serviceIds.set(l,e),e}const Bl=jc("codeEditorService"),rf=jc("modelService"),Ob=jc("textModelService");class $C extends xi{constructor(e,i="",n="",s=!0,c){super(),this._onDidChange=this._register(new gi),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=i,this._cssClass=n,this._enabled=s,this._actionCallback=c}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}async run(e,i){this._actionCallback&&await this._actionCallback(e)}}class TB extends xi{constructor(){super(...arguments),this._onWillRun=this._register(new gi),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new gi),this.onDidRun=this._onDidRun.event}async run(e,i){if(!e.enabled)return;this._onWillRun.fire({action:e});let n;try{await this.runAction(e,i)}catch(s){n=s}this._onDidRun.fire({action:e,error:n})}async runAction(e,i){await e.run(i)}}const lne=class lne{constructor(){this.id=lne.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...e){let i=[];for(const n of e)n.length&&(i.length?i=[...i,new lne,...n]:i=n);return i}async run(){}};lne.ID="vs.actions.separator";let Rm=lne;class T${get actions(){return this._actions}constructor(e,i,n,s){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=e,this.label=i,this.class=s,this._actions=n}async run(){}}const Gbe=class Gbe extends $C{constructor(){super(Gbe.ID,W("submenu.empty","(empty)"),void 0,!1)}};Gbe.ID="vs.actions.empty";let IWe=Gbe;function _9(l){return{id:l.id,label:l.label,tooltip:l.tooltip??l.label,class:l.class,enabled:l.enabled??!0,checked:l.checked,run:async(...e)=>l.run(...e)}}var NWe;(function(l){function e(i){return i&&typeof i=="object"&&typeof i.id=="string"}l.isThemeColor=e})(NWe||(NWe={}));var zo;(function(l){l.iconNameSegment="[A-Za-z0-9]+",l.iconNameExpression="[A-Za-z0-9-]+",l.iconModifierExpression="~[A-Za-z]+",l.iconNameCharacter="[A-Za-z0-9~-]";const e=new RegExp(`^(${l.iconNameExpression})(${l.iconModifierExpression})?$`);function i(I){const P=e.exec(I.id);if(!P)return i(pr.error);const[,O,z]=P,J=["codicon","codicon-"+O];return z&&J.push("codicon-modifier-"+z.substring(1)),J}l.asClassNameArray=i;function n(I){return i(I).join(" ")}l.asClassName=n;function s(I){return"."+i(I).join(".")}l.asCSSSelector=s;function c(I){return I&&typeof I=="object"&&typeof I.id=="string"&&(typeof I.color>"u"||NWe.isThemeColor(I.color))}l.isThemeIcon=c;const d=new RegExp(`^\\$\\((${l.iconNameExpression}(?:${l.iconModifierExpression})?)\\)$`);function f(I){const P=d.exec(I);if(!P)return;const[,O]=P;return{id:O}}l.fromString=f;function m(I){return{id:I}}l.fromId=m;function v(I,P){let O=I.id;const z=O.lastIndexOf("~");return z!==-1&&(O=O.substring(0,z)),P&&(O=`${O}~${P}`),{id:O}}l.modify=v;function x(I){const P=I.id.lastIndexOf("~");if(P!==-1)return I.id.substring(P+1)}l.getModifier=x;function w(I,P){var O,z;return I.id===P.id&&((O=I.color)==null?void 0:O.id)===((z=P.color)==null?void 0:z.id)}l.isEqual=w})(zo||(zo={}));const qd=jc("commandService"),fl=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new gi,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(l,e){if(!l)throw new Error("invalid command");if(typeof l=="string"){if(!e)throw new Error("invalid command");return this.registerCommand({id:l,handler:e})}if(l.metadata&&Array.isArray(l.metadata.args)){const d=[];for(const m of l.metadata.args)d.push(m.constraint);const f=l.handler;l.handler=function(m,...v){return Hai(v,d),f(m,...v)}}const{id:i}=l;let n=this._commands.get(i);n||(n=new _v,this._commands.set(i,n));const s=n.unshift(l),c=fo(()=>{s();const d=this._commands.get(i);d!=null&&d.isEmpty()&&this._commands.delete(i)});return this._onDidRegisterCommand.fire(i),c}registerCommandAlias(l,e){return fl.registerCommand(l,(i,...n)=>i.get(qd).executeCommand(e,...n))}getCommand(l){const e=this._commands.get(l);if(!(!e||e.isEmpty()))return dl.first(e)}getCommands(){const l=new Map;for(const e of this._commands.keys()){const i=this.getCommand(e);i&&l.set(e,i)}return l}};fl.registerCommand("noop",()=>{});function pFe(...l){switch(l.length){case 1:return W("contextkey.scanner.hint.didYouMean1","Did you mean {0}?",l[0]);case 2:return W("contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",l[0],l[1]);case 3:return W("contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",l[0],l[1],l[2]);default:return}}const Ldi=W("contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),Pdi=W("contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'.");var J4;let Ite=(J4=class{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return e.lexeme;case 18:return e.lexeme;case 19:return e.lexeme;case 20:return"EOF";default:throw $qe(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const i=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:i})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const i=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:i})}else this._match(126)?this._addToken(9):this._error(pFe("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(pFe("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(pFe("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return this._isAtEnd()||this._input.charCodeAt(this._current)!==e?!1:(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){const i=this._start,n=this._input.substring(this._start,this._current),s={type:19,offset:this._start,lexeme:n};this._errors.push({offset:i,lexeme:n,additionalInfo:e}),this._tokens.push(s)}_string(){this.stringRe.lastIndex=this._start;const e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;const i=this._input.substring(this._start,this._current),n=J4._keywords.get(i);n?this._addToken(n):this._tokens.push({type:17,lexeme:i,offset:this._start})}}_quotedString(){for(;this._peek()!==39&&!this._isAtEnd();)this._advance();if(this._isAtEnd()){this._error(Ldi);return}this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1})}_regex(){let e=this._current,i=!1,n=!1;for(;;){if(e>=this._input.length){this._current=e,this._error(Pdi);return}const c=this._input.charCodeAt(e);if(i)i=!1;else if(c===47&&!n){e++;break}else c===91?n=!0:c===92?i=!0:c===93&&(n=!1);e++}for(;e<this._input.length&&J4._regexFlags.has(this._input.charCodeAt(e));)e++;this._current=e;const s=this._input.substring(this._start,this._current);this._tokens.push({type:10,lexeme:s,offset:this._start})}_isAtEnd(){return this._current>=this._input.length}},J4._regexFlags=new Set(["i","g","s","m","y","u"].map(e=>e.charCodeAt(0))),J4._keywords=new Map([["not",14],["in",13],["false",12],["true",11]]),J4);const g1=new Map;g1.set("false",!1);g1.set("true",!0);g1.set("isMac",Hc);g1.set("isLinux",Cv);g1.set("isWindows",I0);g1.set("isWeb",XB);g1.set("isMacNative",Hc&&!XB);g1.set("isEdge",ici);g1.set("isFirefox",eci);g1.set("isChrome",Lkt);g1.set("isSafari",tci);const Adi=Object.prototype.hasOwnProperty,Odi={regexParsingWithErrorRecovery:!0},Mdi=W("contextkey.parser.error.emptyString","Empty context key expression"),Rdi=W("contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),Fdi=W("contextkey.parser.error.noInAfterNot","'in' after 'not'."),pvt=W("contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),Bdi=W("contextkey.parser.error.unexpectedToken","Unexpected token"),Wdi=W("contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),Vdi=W("contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),Hdi=W("contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?");var vL;let jdi=(vL=class{constructor(e=Odi){this._config=e,this._scanner=new Ite,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(e===""){this._parsingErrors.push({message:Mdi,offset:0,lexeme:"",additionalInfo:Rdi});return}this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{const i=this._expr();if(!this._isAtEnd()){const n=this._peek(),s=n.type===17?Wdi:void 0;throw this._parsingErrors.push({message:Bdi,offset:n.offset,lexeme:Ite.getLexeme(n),additionalInfo:s}),vL._parseError}return i}catch(i){if(i!==vL._parseError)throw i;return}}_expr(){return this._or()}_or(){const e=[this._and()];for(;this._matchOne(16);){const i=this._and();e.push(i)}return e.length===1?e[0]:kn.or(...e)}_and(){const e=[this._term()];for(;this._matchOne(15);){const i=this._term();e.push(i)}return e.length===1?e[0]:kn.and(...e)}_term(){if(this._matchOne(2)){const e=this._peek();switch(e.type){case 11:return this._advance(),Sv.INSTANCE;case 12:return this._advance(),Nb.INSTANCE;case 0:{this._advance();const i=this._expr();return this._consume(1,pvt),i==null?void 0:i.negate()}case 17:return this._advance(),ZB.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){const e=this._peek();switch(e.type){case 11:return this._advance(),kn.true();case 12:return this._advance(),kn.false();case 0:{this._advance();const i=this._expr();return this._consume(1,pvt),i}case 17:{const i=e.lexeme;if(this._advance(),this._matchOne(9)){const s=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),s.type!==10)throw this._errExpectedButGot("REGEX",s);const c=s.lexeme,d=c.lastIndexOf("/"),f=d===c.length-1?void 0:this._removeFlagsGY(c.substring(d+1));let m;try{m=new RegExp(c.substring(1,d),f)}catch{throw this._errExpectedButGot("REGEX",s)}return Vne.create(i,m)}switch(s.type){case 10:case 19:{const c=[s.lexeme];this._advance();let d=this._peek(),f=0;for(let I=0;I<s.lexeme.length;I++)s.lexeme.charCodeAt(I)===40?f++:s.lexeme.charCodeAt(I)===41&&f--;for(;!this._isAtEnd()&&d.type!==15&&d.type!==16;){switch(d.type){case 0:f++;break;case 1:f--;break;case 10:case 18:for(let I=0;I<d.lexeme.length;I++)d.lexeme.charCodeAt(I)===40?f++:s.lexeme.charCodeAt(I)===41&&f--}if(f<0)break;c.push(Ite.getLexeme(d)),this._advance(),d=this._peek()}const m=c.join(""),v=m.lastIndexOf("/"),x=v===m.length-1?void 0:this._removeFlagsGY(m.substring(v+1));let w;try{w=new RegExp(m.substring(1,v),x)}catch{throw this._errExpectedButGot("REGEX",s)}return kn.regex(i,w)}case 18:{const c=s.lexeme;this._advance();let d=null;if(!Zkt(c)){const f=c.indexOf("/"),m=c.lastIndexOf("/");if(f!==m&&f>=0){const v=c.slice(f+1,m),x=c[m+1]==="i"?"i":"";try{d=new RegExp(v,x)}catch{throw this._errExpectedButGot("REGEX",s)}}}if(d===null)throw this._errExpectedButGot("REGEX",s);return Vne.create(i,d)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,Fdi);const s=this._value();return kn.notIn(i,s)}switch(this._peek().type){case 3:{this._advance();const s=this._value();if(this._previous().type===18)return kn.equals(i,s);switch(s){case"true":return kn.has(i);case"false":return kn.not(i);default:return kn.equals(i,s)}}case 4:{this._advance();const s=this._value();if(this._previous().type===18)return kn.notEquals(i,s);switch(s){case"true":return kn.not(i);case"false":return kn.has(i);default:return kn.notEquals(i,s)}}case 5:return this._advance(),zSe.create(i,this._value());case 6:return this._advance(),USe.create(i,this._value());case 7:return this._advance(),HSe.create(i,this._value());case 8:return this._advance(),jSe.create(i,this._value());case 13:return this._advance(),kn.in(i,this._value());default:return kn.has(i)}}case 20:throw this._parsingErrors.push({message:Vdi,offset:e.offset,lexeme:"",additionalInfo:Hdi}),vL._parseError;default:throw this._errExpectedButGot(`true | false | KEY
+ | KEY '=~' REGEX
+ | KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`,this._peek())}}_value(){const e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return this._check(e)?(this._advance(),!0):!1}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,i){if(this._check(e))return this._advance();throw this._errExpectedButGot(i,this._peek())}_errExpectedButGot(e,i,n){const s=W("contextkey.parser.error.expectedButGot",`Expected: {0}
+Received: '{1}'.`,e,Ite.getLexeme(i)),c=i.offset,d=Ite.getLexeme(i);return this._parsingErrors.push({message:s,offset:c,lexeme:d,additionalInfo:n}),vL._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}},vL._parseError=new Error,vL);const xKe=class xKe{static false(){return Sv.INSTANCE}static true(){return Nb.INSTANCE}static has(e){return QB.create(e)}static equals(e,i){return pJ.create(e,i)}static notEquals(e,i){return WSe.create(e,i)}static regex(e,i){return Vne.create(e,i)}static in(e,i){return FSe.create(e,i)}static notIn(e,i){return BSe.create(e,i)}static not(e){return ZB.create(e)}static and(...e){return i9.create(e,null,!0)}static or(...e){return A4.create(e,null,!0)}static deserialize(e){return e==null?void 0:this._parser.parse(e)}};xKe._parser=new jdi({regexParsingWithErrorRecovery:!1});let kn=xKe;function zdi(l,e){const i=l?l.substituteConstants():void 0,n=e?e.substituteConstants():void 0;return!i&&!n?!0:!i||!n?!1:i.equals(n)}function kie(l,e){return l.cmp(e)}const Kbe=class Kbe{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return Nb.INSTANCE}};Kbe.INSTANCE=new Kbe;let Sv=Kbe;const Xbe=class Xbe{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return Sv.INSTANCE}};Xbe.INSTANCE=new Xbe;let Nb=Xbe;class QB{static create(e,i=null){const n=g1.get(e);return typeof n=="boolean"?n?Nb.INSTANCE:Sv.INSTANCE:new QB(e,i)}constructor(e,i){this.key=e,this.negated=i,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:O2t(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=g1.get(this.key);return typeof e=="boolean"?e?Nb.INSTANCE:Sv.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=ZB.create(this.key,this)),this.negated}}class pJ{static create(e,i,n=null){if(typeof i=="boolean")return i?QB.create(e,n):ZB.create(e,n);const s=g1.get(e);return typeof s=="boolean"?i===(s?"true":"false")?Nb.INSTANCE:Sv.INSTANCE:new pJ(e,i,n)}constructor(e,i,n){this.key=e,this.value=i,this.negated=n,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:YB(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=g1.get(this.key);if(typeof e=="boolean"){const i=e?"true":"false";return this.value===i?Nb.INSTANCE:Sv.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=WSe.create(this.key,this.value,this)),this.negated}}class FSe{static create(e,i){return new FSe(e,i)}constructor(e,i){this.key=e,this.valueKey=i,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:YB(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type?this.key===e.key&&this.valueKey===e.valueKey:!1}substituteConstants(){return this}evaluate(e){const i=e.getValue(this.valueKey),n=e.getValue(this.key);return Array.isArray(i)?i.includes(n):typeof n=="string"&&typeof i=="object"&&i!==null?Adi.call(i,n):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=BSe.create(this.key,this.valueKey)),this.negated}}class BSe{static create(e,i){return new BSe(e,i)}constructor(e,i){this.key=e,this.valueKey=i,this.type=11,this._negated=FSe.create(e,i)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type?this._negated.equals(e._negated):!1}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class WSe{static create(e,i,n=null){if(typeof i=="boolean")return i?ZB.create(e,n):QB.create(e,n);const s=g1.get(e);return typeof s=="boolean"?i===(s?"true":"false")?Sv.INSTANCE:Nb.INSTANCE:new WSe(e,i,n)}constructor(e,i,n){this.key=e,this.value=i,this.negated=n,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:YB(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=g1.get(this.key);if(typeof e=="boolean"){const i=e?"true":"false";return this.value===i?Sv.INSTANCE:Nb.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=pJ.create(this.key,this.value,this)),this.negated}}class ZB{static create(e,i=null){const n=g1.get(e);return typeof n=="boolean"?n?Sv.INSTANCE:Nb.INSTANCE:new ZB(e,i)}constructor(e,i){this.key=e,this.negated=i,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:O2t(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=g1.get(this.key);return typeof e=="boolean"?e?Sv.INSTANCE:Nb.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=QB.create(this.key,this)),this.negated}}function VSe(l,e){if(typeof l=="string"){const i=parseFloat(l);isNaN(i)||(l=i)}return typeof l=="string"||typeof l=="number"?e(l):Sv.INSTANCE}class HSe{static create(e,i,n=null){return VSe(i,s=>new HSe(e,s,n))}constructor(e,i,n){this.key=e,this.value=i,this.negated=n,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:YB(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=USe.create(this.key,this.value,this)),this.negated}}class jSe{static create(e,i,n=null){return VSe(i,s=>new jSe(e,s,n))}constructor(e,i,n){this.key=e,this.value=i,this.negated=n,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:YB(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=zSe.create(this.key,this.value,this)),this.negated}}class zSe{static create(e,i,n=null){return VSe(i,s=>new zSe(e,s,n))}constructor(e,i,n){this.key=e,this.value=i,this.negated=n,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:YB(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=jSe.create(this.key,this.value,this)),this.negated}}class USe{static create(e,i,n=null){return VSe(i,s=>new USe(e,s,n))}constructor(e,i,n){this.key=e,this.value=i,this.negated=n,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:YB(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=HSe.create(this.key,this.value,this)),this.negated}}class Vne{static create(e,i){return new Vne(e,i)}constructor(e,i){this.key=e,this.regexp=i,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.key<e.key)return-1;if(this.key>e.key)return 1;const i=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return i<n?-1:i>n?1:0}equals(e){if(e.type===this.type){const i=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return this.key===e.key&&i===n}return!1}substituteConstants(){return this}evaluate(e){const i=e.getValue(this.key);return this.regexp?this.regexp.test(i):!1}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_$e.create(this)),this.negated}}class _$e{static create(e){return new _$e(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type?this._actual.equals(e._actual):!1}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}function A2t(l){let e=null;for(let i=0,n=l.length;i<n;i++){const s=l[i].substituteConstants();if(l[i]!==s&&e===null){e=[];for(let c=0;c<i;c++)e[c]=l[c]}e!==null&&(e[i]=s)}return e===null?l:e}class i9{static create(e,i,n){return i9._normalizeArr(e,i,n)}constructor(e,i){this.expr=e,this.negated=i,this.type=6}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let i=0,n=this.expr.length;i<n;i++){const s=kie(this.expr[i],e.expr[i]);if(s!==0)return s}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let i=0,n=this.expr.length;i<n;i++)if(!this.expr[i].equals(e.expr[i]))return!1;return!0}return!1}substituteConstants(){const e=A2t(this.expr);return e===this.expr?this:i9.create(e,this.negated,!1)}evaluate(e){for(let i=0,n=this.expr.length;i<n;i++)if(!this.expr[i].evaluate(e))return!1;return!0}static _normalizeArr(e,i,n){const s=[];let c=!1;for(const d of e)if(d){if(d.type===1){c=!0;continue}if(d.type===0)return Sv.INSTANCE;if(d.type===6){s.push(...d.expr);continue}s.push(d)}if(s.length===0&&c)return Nb.INSTANCE;if(s.length!==0){if(s.length===1)return s[0];s.sort(kie);for(let d=1;d<s.length;d++)s[d-1].equals(s[d])&&(s.splice(d,1),d--);if(s.length===1)return s[0];for(;s.length>1;){const d=s[s.length-1];if(d.type!==9)break;s.pop();const f=s.pop(),m=s.length===0,v=A4.create(d.expr.map(x=>i9.create([x,f],null,n)),null,m);v&&(s.push(v),s.sort(kie))}if(s.length===1)return s[0];if(n){for(let d=0;d<s.length;d++)for(let f=d+1;f<s.length;f++)if(s[d].negate().equals(s[f]))return Sv.INSTANCE;if(s.length===1)return s[0]}return new i9(s,i)}}serialize(){return this.expr.map(e=>e.serialize()).join(" && ")}keys(){const e=[];for(const i of this.expr)e.push(...i.keys());return e}negate(){if(!this.negated){const e=[];for(const i of this.expr)e.push(i.negate());this.negated=A4.create(e,this,!0)}return this.negated}}class A4{static create(e,i,n){return A4._normalizeArr(e,i,n)}constructor(e,i){this.expr=e,this.negated=i,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let i=0,n=this.expr.length;i<n;i++){const s=kie(this.expr[i],e.expr[i]);if(s!==0)return s}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let i=0,n=this.expr.length;i<n;i++)if(!this.expr[i].equals(e.expr[i]))return!1;return!0}return!1}substituteConstants(){const e=A2t(this.expr);return e===this.expr?this:A4.create(e,this.negated,!1)}evaluate(e){for(let i=0,n=this.expr.length;i<n;i++)if(this.expr[i].evaluate(e))return!0;return!1}static _normalizeArr(e,i,n){let s=[],c=!1;if(e){for(let d=0,f=e.length;d<f;d++){const m=e[d];if(m){if(m.type===0){c=!0;continue}if(m.type===1)return Nb.INSTANCE;if(m.type===9){s=s.concat(m.expr);continue}s.push(m)}}if(s.length===0&&c)return Sv.INSTANCE;s.sort(kie)}if(s.length!==0){if(s.length===1)return s[0];for(let d=1;d<s.length;d++)s[d-1].equals(s[d])&&(s.splice(d,1),d--);if(s.length===1)return s[0];if(n){for(let d=0;d<s.length;d++)for(let f=d+1;f<s.length;f++)if(s[d].negate().equals(s[f]))return Nb.INSTANCE;if(s.length===1)return s[0]}return new A4(s,i)}}serialize(){return this.expr.map(e=>e.serialize()).join(" || ")}keys(){const e=[];for(const i of this.expr)e.push(...i.keys());return e}negate(){if(!this.negated){const e=[];for(const i of this.expr)e.push(i.negate());for(;e.length>1;){const i=e.shift(),n=e.shift(),s=[];for(const c of gvt(i))for(const d of gvt(n))s.push(i9.create([c,d],null,!1));e.unshift(A4.create(s,null,!1))}this.negated=A4.create(e,this,!0)}return this.negated}}const Tq=class Tq extends QB{static all(){return Tq._info.values()}constructor(e,i,n){super(e,null),this._defaultValue=i,typeof n=="object"?Tq._info.push({...n,key:e}):n!==!0&&Tq._info.push({key:e,description:n,type:i!=null?typeof i:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return pJ.create(this.key,e)}};Tq._info=[];let rs=Tq;const Ko=jc("contextKeyService");function O2t(l,e){return l<e?-1:l>e?1:0}function YB(l,e,i,n){return l<i?-1:l>i?1:e<n?-1:e>n?1:0}function LWe(l,e){if(l.type===0||e.type===1)return!0;if(l.type===9)return e.type===9?mvt(l.expr,e.expr):!1;if(e.type===9){for(const i of e.expr)if(LWe(l,i))return!0;return!1}if(l.type===6){if(e.type===6)return mvt(e.expr,l.expr);for(const i of l.expr)if(LWe(i,e))return!0;return!1}return l.equals(e)}function mvt(l,e){let i=0,n=0;for(;i<l.length&&n<e.length;){const s=l[i].cmp(e[n]);if(s<0)return!1;s===0&&i++,n++}return i===l.length}function gvt(l){return l.type===9?l.expr:[l]}function mFe(l,e){if(!l)throw new Error(e?`Assertion failed (${e})`:"Assertion Failed")}function qSe(l,e="Unreachable"){throw new Error(e)}function yvt(l){l||Pa(new tu("Soft Assertion Failed"))}function DB(l){if(!l()){debugger;l(),Pa(new tu("Assertion Failed"))}}function p$e(l,e){let i=0;for(;i<l.length-1;){const n=l[i],s=l[i+1];if(!e(n,s))return!1;i++}return!0}class Udi{constructor(){this.data=new Map}add(e,i){mFe(Eb(e)),mFe(gg(i)),mFe(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,i)}as(e){return this.data.get(e)||null}}const nh=new Udi;class m$e{constructor(){this._coreKeybindings=new _v,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(UC===1){if(e&&e.win)return e.win}else if(UC===2){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const i=m$e.bindToCurrentPlatform(e),n=new wn;if(i&&i.primary){const s=gWe(i.primary,UC);s&&n.add(this._registerDefaultKeybinding(s,e.id,e.args,e.weight,0,e.when))}if(i&&Array.isArray(i.secondary))for(let s=0,c=i.secondary.length;s<c;s++){const d=i.secondary[s],f=gWe(d,UC);f&&n.add(this._registerDefaultKeybinding(f,e.id,e.args,e.weight,-s-1,e.when))}return n}registerCommandAndKeybindingRule(e){return gT(this.registerKeybindingRule(e),fl.registerCommand(e))}_registerDefaultKeybinding(e,i,n,s,c,d){const f=this._coreKeybindings.push({keybinding:e,command:i,commandArgs:n,when:d,weight1:s,weight2:c,extensionId:null,isBuiltinExtension:!1});return this._cachedMergedKeybindings=null,fo(()=>{f(),this._cachedMergedKeybindings=null})}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort($di)),this._cachedMergedKeybindings.slice(0)}}const wv=new m$e,qdi={EditorModes:"platform.keybindingsRegistry"};nh.add(qdi.EditorModes,wv);function $di(l,e){if(l.weight1!==e.weight1)return l.weight1-e.weight1;if(l.command&&e.command){if(l.command<e.command)return-1;if(l.command>e.command)return 1}return l.weight2-e.weight2}var Jdi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},vvt=function(l,e){return function(i,n){e(i,n,l)}},s1e;function jq(l){return l.command!==void 0}function Gdi(l){return l.submenu!==void 0}const Wt=class Wt{constructor(e){if(Wt._instances.has(e))throw new TypeError(`MenuId with identifier '${e}' already exists. Use MenuId.for(ident) or a unique identifier`);Wt._instances.set(e,this),this.id=e}};Wt._instances=new Map,Wt.CommandPalette=new Wt("CommandPalette"),Wt.DebugBreakpointsContext=new Wt("DebugBreakpointsContext"),Wt.DebugCallStackContext=new Wt("DebugCallStackContext"),Wt.DebugConsoleContext=new Wt("DebugConsoleContext"),Wt.DebugVariablesContext=new Wt("DebugVariablesContext"),Wt.NotebookVariablesContext=new Wt("NotebookVariablesContext"),Wt.DebugHoverContext=new Wt("DebugHoverContext"),Wt.DebugWatchContext=new Wt("DebugWatchContext"),Wt.DebugToolBar=new Wt("DebugToolBar"),Wt.DebugToolBarStop=new Wt("DebugToolBarStop"),Wt.DebugCallStackToolbar=new Wt("DebugCallStackToolbar"),Wt.DebugCreateConfiguration=new Wt("DebugCreateConfiguration"),Wt.EditorContext=new Wt("EditorContext"),Wt.SimpleEditorContext=new Wt("SimpleEditorContext"),Wt.EditorContent=new Wt("EditorContent"),Wt.EditorLineNumberContext=new Wt("EditorLineNumberContext"),Wt.EditorContextCopy=new Wt("EditorContextCopy"),Wt.EditorContextPeek=new Wt("EditorContextPeek"),Wt.EditorContextShare=new Wt("EditorContextShare"),Wt.EditorTitle=new Wt("EditorTitle"),Wt.EditorTitleRun=new Wt("EditorTitleRun"),Wt.EditorTitleContext=new Wt("EditorTitleContext"),Wt.EditorTitleContextShare=new Wt("EditorTitleContextShare"),Wt.EmptyEditorGroup=new Wt("EmptyEditorGroup"),Wt.EmptyEditorGroupContext=new Wt("EmptyEditorGroupContext"),Wt.EditorTabsBarContext=new Wt("EditorTabsBarContext"),Wt.EditorTabsBarShowTabsSubmenu=new Wt("EditorTabsBarShowTabsSubmenu"),Wt.EditorTabsBarShowTabsZenModeSubmenu=new Wt("EditorTabsBarShowTabsZenModeSubmenu"),Wt.EditorActionsPositionSubmenu=new Wt("EditorActionsPositionSubmenu"),Wt.ExplorerContext=new Wt("ExplorerContext"),Wt.ExplorerContextShare=new Wt("ExplorerContextShare"),Wt.ExtensionContext=new Wt("ExtensionContext"),Wt.GlobalActivity=new Wt("GlobalActivity"),Wt.CommandCenter=new Wt("CommandCenter"),Wt.CommandCenterCenter=new Wt("CommandCenterCenter"),Wt.LayoutControlMenuSubmenu=new Wt("LayoutControlMenuSubmenu"),Wt.LayoutControlMenu=new Wt("LayoutControlMenu"),Wt.MenubarMainMenu=new Wt("MenubarMainMenu"),Wt.MenubarAppearanceMenu=new Wt("MenubarAppearanceMenu"),Wt.MenubarDebugMenu=new Wt("MenubarDebugMenu"),Wt.MenubarEditMenu=new Wt("MenubarEditMenu"),Wt.MenubarCopy=new Wt("MenubarCopy"),Wt.MenubarFileMenu=new Wt("MenubarFileMenu"),Wt.MenubarGoMenu=new Wt("MenubarGoMenu"),Wt.MenubarHelpMenu=new Wt("MenubarHelpMenu"),Wt.MenubarLayoutMenu=new Wt("MenubarLayoutMenu"),Wt.MenubarNewBreakpointMenu=new Wt("MenubarNewBreakpointMenu"),Wt.PanelAlignmentMenu=new Wt("PanelAlignmentMenu"),Wt.PanelPositionMenu=new Wt("PanelPositionMenu"),Wt.ActivityBarPositionMenu=new Wt("ActivityBarPositionMenu"),Wt.MenubarPreferencesMenu=new Wt("MenubarPreferencesMenu"),Wt.MenubarRecentMenu=new Wt("MenubarRecentMenu"),Wt.MenubarSelectionMenu=new Wt("MenubarSelectionMenu"),Wt.MenubarShare=new Wt("MenubarShare"),Wt.MenubarSwitchEditorMenu=new Wt("MenubarSwitchEditorMenu"),Wt.MenubarSwitchGroupMenu=new Wt("MenubarSwitchGroupMenu"),Wt.MenubarTerminalMenu=new Wt("MenubarTerminalMenu"),Wt.MenubarViewMenu=new Wt("MenubarViewMenu"),Wt.MenubarHomeMenu=new Wt("MenubarHomeMenu"),Wt.OpenEditorsContext=new Wt("OpenEditorsContext"),Wt.OpenEditorsContextShare=new Wt("OpenEditorsContextShare"),Wt.ProblemsPanelContext=new Wt("ProblemsPanelContext"),Wt.SCMInputBox=new Wt("SCMInputBox"),Wt.SCMChangesSeparator=new Wt("SCMChangesSeparator"),Wt.SCMChangesContext=new Wt("SCMChangesContext"),Wt.SCMIncomingChanges=new Wt("SCMIncomingChanges"),Wt.SCMIncomingChangesContext=new Wt("SCMIncomingChangesContext"),Wt.SCMIncomingChangesSetting=new Wt("SCMIncomingChangesSetting"),Wt.SCMOutgoingChanges=new Wt("SCMOutgoingChanges"),Wt.SCMOutgoingChangesContext=new Wt("SCMOutgoingChangesContext"),Wt.SCMOutgoingChangesSetting=new Wt("SCMOutgoingChangesSetting"),Wt.SCMIncomingChangesAllChangesContext=new Wt("SCMIncomingChangesAllChangesContext"),Wt.SCMIncomingChangesHistoryItemContext=new Wt("SCMIncomingChangesHistoryItemContext"),Wt.SCMOutgoingChangesAllChangesContext=new Wt("SCMOutgoingChangesAllChangesContext"),Wt.SCMOutgoingChangesHistoryItemContext=new Wt("SCMOutgoingChangesHistoryItemContext"),Wt.SCMChangeContext=new Wt("SCMChangeContext"),Wt.SCMResourceContext=new Wt("SCMResourceContext"),Wt.SCMResourceContextShare=new Wt("SCMResourceContextShare"),Wt.SCMResourceFolderContext=new Wt("SCMResourceFolderContext"),Wt.SCMResourceGroupContext=new Wt("SCMResourceGroupContext"),Wt.SCMSourceControl=new Wt("SCMSourceControl"),Wt.SCMSourceControlInline=new Wt("SCMSourceControlInline"),Wt.SCMSourceControlTitle=new Wt("SCMSourceControlTitle"),Wt.SCMHistoryTitle=new Wt("SCMHistoryTitle"),Wt.SCMTitle=new Wt("SCMTitle"),Wt.SearchContext=new Wt("SearchContext"),Wt.SearchActionMenu=new Wt("SearchActionContext"),Wt.StatusBarWindowIndicatorMenu=new Wt("StatusBarWindowIndicatorMenu"),Wt.StatusBarRemoteIndicatorMenu=new Wt("StatusBarRemoteIndicatorMenu"),Wt.StickyScrollContext=new Wt("StickyScrollContext"),Wt.TestItem=new Wt("TestItem"),Wt.TestItemGutter=new Wt("TestItemGutter"),Wt.TestProfilesContext=new Wt("TestProfilesContext"),Wt.TestMessageContext=new Wt("TestMessageContext"),Wt.TestMessageContent=new Wt("TestMessageContent"),Wt.TestPeekElement=new Wt("TestPeekElement"),Wt.TestPeekTitle=new Wt("TestPeekTitle"),Wt.TestCallStack=new Wt("TestCallStack"),Wt.TouchBarContext=new Wt("TouchBarContext"),Wt.TitleBarContext=new Wt("TitleBarContext"),Wt.TitleBarTitleContext=new Wt("TitleBarTitleContext"),Wt.TunnelContext=new Wt("TunnelContext"),Wt.TunnelPrivacy=new Wt("TunnelPrivacy"),Wt.TunnelProtocol=new Wt("TunnelProtocol"),Wt.TunnelPortInline=new Wt("TunnelInline"),Wt.TunnelTitle=new Wt("TunnelTitle"),Wt.TunnelLocalAddressInline=new Wt("TunnelLocalAddressInline"),Wt.TunnelOriginInline=new Wt("TunnelOriginInline"),Wt.ViewItemContext=new Wt("ViewItemContext"),Wt.ViewContainerTitle=new Wt("ViewContainerTitle"),Wt.ViewContainerTitleContext=new Wt("ViewContainerTitleContext"),Wt.ViewTitle=new Wt("ViewTitle"),Wt.ViewTitleContext=new Wt("ViewTitleContext"),Wt.CommentEditorActions=new Wt("CommentEditorActions"),Wt.CommentThreadTitle=new Wt("CommentThreadTitle"),Wt.CommentThreadActions=new Wt("CommentThreadActions"),Wt.CommentThreadAdditionalActions=new Wt("CommentThreadAdditionalActions"),Wt.CommentThreadTitleContext=new Wt("CommentThreadTitleContext"),Wt.CommentThreadCommentContext=new Wt("CommentThreadCommentContext"),Wt.CommentTitle=new Wt("CommentTitle"),Wt.CommentActions=new Wt("CommentActions"),Wt.CommentsViewThreadActions=new Wt("CommentsViewThreadActions"),Wt.InteractiveToolbar=new Wt("InteractiveToolbar"),Wt.InteractiveCellTitle=new Wt("InteractiveCellTitle"),Wt.InteractiveCellDelete=new Wt("InteractiveCellDelete"),Wt.InteractiveCellExecute=new Wt("InteractiveCellExecute"),Wt.InteractiveInputExecute=new Wt("InteractiveInputExecute"),Wt.InteractiveInputConfig=new Wt("InteractiveInputConfig"),Wt.ReplInputExecute=new Wt("ReplInputExecute"),Wt.IssueReporter=new Wt("IssueReporter"),Wt.NotebookToolbar=new Wt("NotebookToolbar"),Wt.NotebookStickyScrollContext=new Wt("NotebookStickyScrollContext"),Wt.NotebookCellTitle=new Wt("NotebookCellTitle"),Wt.NotebookCellDelete=new Wt("NotebookCellDelete"),Wt.NotebookCellInsert=new Wt("NotebookCellInsert"),Wt.NotebookCellBetween=new Wt("NotebookCellBetween"),Wt.NotebookCellListTop=new Wt("NotebookCellTop"),Wt.NotebookCellExecute=new Wt("NotebookCellExecute"),Wt.NotebookCellExecuteGoTo=new Wt("NotebookCellExecuteGoTo"),Wt.NotebookCellExecutePrimary=new Wt("NotebookCellExecutePrimary"),Wt.NotebookDiffCellInputTitle=new Wt("NotebookDiffCellInputTitle"),Wt.NotebookDiffCellMetadataTitle=new Wt("NotebookDiffCellMetadataTitle"),Wt.NotebookDiffCellOutputsTitle=new Wt("NotebookDiffCellOutputsTitle"),Wt.NotebookOutputToolbar=new Wt("NotebookOutputToolbar"),Wt.NotebookOutlineFilter=new Wt("NotebookOutlineFilter"),Wt.NotebookOutlineActionMenu=new Wt("NotebookOutlineActionMenu"),Wt.NotebookEditorLayoutConfigure=new Wt("NotebookEditorLayoutConfigure"),Wt.NotebookKernelSource=new Wt("NotebookKernelSource"),Wt.BulkEditTitle=new Wt("BulkEditTitle"),Wt.BulkEditContext=new Wt("BulkEditContext"),Wt.TimelineItemContext=new Wt("TimelineItemContext"),Wt.TimelineTitle=new Wt("TimelineTitle"),Wt.TimelineTitleContext=new Wt("TimelineTitleContext"),Wt.TimelineFilterSubMenu=new Wt("TimelineFilterSubMenu"),Wt.AccountsContext=new Wt("AccountsContext"),Wt.SidebarTitle=new Wt("SidebarTitle"),Wt.PanelTitle=new Wt("PanelTitle"),Wt.AuxiliaryBarTitle=new Wt("AuxiliaryBarTitle"),Wt.AuxiliaryBarHeader=new Wt("AuxiliaryBarHeader"),Wt.TerminalInstanceContext=new Wt("TerminalInstanceContext"),Wt.TerminalEditorInstanceContext=new Wt("TerminalEditorInstanceContext"),Wt.TerminalNewDropdownContext=new Wt("TerminalNewDropdownContext"),Wt.TerminalTabContext=new Wt("TerminalTabContext"),Wt.TerminalTabEmptyAreaContext=new Wt("TerminalTabEmptyAreaContext"),Wt.TerminalStickyScrollContext=new Wt("TerminalStickyScrollContext"),Wt.WebviewContext=new Wt("WebviewContext"),Wt.InlineCompletionsActions=new Wt("InlineCompletionsActions"),Wt.InlineEditsActions=new Wt("InlineEditsActions"),Wt.InlineEditActions=new Wt("InlineEditActions"),Wt.NewFile=new Wt("NewFile"),Wt.MergeInput1Toolbar=new Wt("MergeToolbar1Toolbar"),Wt.MergeInput2Toolbar=new Wt("MergeToolbar2Toolbar"),Wt.MergeBaseToolbar=new Wt("MergeBaseToolbar"),Wt.MergeInputResultToolbar=new Wt("MergeToolbarResultToolbar"),Wt.InlineSuggestionToolbar=new Wt("InlineSuggestionToolbar"),Wt.InlineEditToolbar=new Wt("InlineEditToolbar"),Wt.ChatContext=new Wt("ChatContext"),Wt.ChatCodeBlock=new Wt("ChatCodeblock"),Wt.ChatCompareBlock=new Wt("ChatCompareBlock"),Wt.ChatMessageTitle=new Wt("ChatMessageTitle"),Wt.ChatExecute=new Wt("ChatExecute"),Wt.ChatExecuteSecondary=new Wt("ChatExecuteSecondary"),Wt.ChatInputSide=new Wt("ChatInputSide"),Wt.AccessibleView=new Wt("AccessibleView"),Wt.MultiDiffEditorFileToolbar=new Wt("MultiDiffEditorFileToolbar"),Wt.DiffEditorHunkToolbar=new Wt("DiffEditorHunkToolbar"),Wt.DiffEditorSelectionToolbar=new Wt("DiffEditorSelectionToolbar");let As=Wt;const Lw=jc("menuService"),une=class une{static for(e){let i=this._all.get(e);return i||(i=new une(e),this._all.set(e,i)),i}static merge(e){const i=new Set;for(const n of e)n instanceof une&&i.add(n.id);return i}constructor(e){this.id=e,this.has=i=>i===e}};une._all=new Map;let RF=une;const yg=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new cli({merge:RF.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(l){return this._commands.set(l.id,l),this._onDidChangeMenu.fire(RF.for(As.CommandPalette)),fo(()=>{this._commands.delete(l.id)&&this._onDidChangeMenu.fire(RF.for(As.CommandPalette))})}getCommand(l){return this._commands.get(l)}getCommands(){const l=new Map;return this._commands.forEach((e,i)=>l.set(i,e)),l}appendMenuItem(l,e){let i=this._menuItems.get(l);i||(i=new _v,this._menuItems.set(l,i));const n=i.push(e);return this._onDidChangeMenu.fire(RF.for(l)),fo(()=>{n(),this._onDidChangeMenu.fire(RF.for(l))})}appendMenuItems(l){const e=new wn;for(const{id:i,item:n}of l)e.add(this.appendMenuItem(i,n));return e}getMenuItems(l){let e;return this._menuItems.has(l)?e=[...this._menuItems.get(l)]:e=[],l===As.CommandPalette&&this._appendImplicitItems(e),e}_appendImplicitItems(l){const e=new Set;for(const i of l)jq(i)&&(e.add(i.command.id),i.alt&&e.add(i.alt.id));this._commands.forEach((i,n)=>{e.has(n)||l.push({command:i})})}};class zq extends T${constructor(e,i,n){super(`submenuitem.${e.submenu.id}`,typeof e.title=="string"?e.title:e.title.value,n,"submenu"),this.item=e,this.hideActions=i}}let JC=s1e=class{static label(e,i){return i!=null&&i.renderShortTitle&&e.shortTitle?typeof e.shortTitle=="string"?e.shortTitle:e.shortTitle.value:typeof e.title=="string"?e.title:e.title.value}constructor(e,i,n,s,c,d,f){var v;this.hideActions=s,this.menuKeybinding=c,this._commandService=f,this.id=e.id,this.label=s1e.label(e,n),this.tooltip=(typeof e.tooltip=="string"?e.tooltip:(v=e.tooltip)==null?void 0:v.value)??"",this.enabled=!e.precondition||d.contextMatchesRules(e.precondition),this.checked=void 0;let m;if(e.toggled){const x=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=d.contextMatchesRules(x.condition),this.checked&&x.tooltip&&(this.tooltip=typeof x.tooltip=="string"?x.tooltip:x.tooltip.value),this.checked&&zo.isThemeIcon(x.icon)&&(m=x.icon),this.checked&&x.title&&(this.label=typeof x.title=="string"?x.title:x.title.value)}m||(m=zo.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=i?new s1e(i,void 0,n,s,void 0,d,f):void 0,this._options=n,this.class=m&&zo.asClassName(m)}run(...e){var n,s;let i=[];return(n=this._options)!=null&&n.arg&&(i=[...i,this._options.arg]),(s=this._options)!=null&&s.shouldForwardArgs&&(i=[...i,...e]),this._commandService.executeCommand(this.id,...i)}};JC=s1e=Jdi([vvt(5,Ko),vvt(6,qd)],JC);class Tv{constructor(e){this.desc=e}}function Nd(l){const e=[],i=new l,{f1:n,menu:s,keybinding:c,...d}=i.desc;if(fl.getCommand(d.id))throw new Error(`Cannot register two commands with the same id: ${d.id}`);if(e.push(fl.registerCommand({id:d.id,handler:(f,...m)=>i.run(f,...m),metadata:d.metadata})),Array.isArray(s))for(const f of s)e.push(yg.appendMenuItem(f.id,{command:{...d,precondition:f.precondition===null?void 0:d.precondition},...f}));else s&&e.push(yg.appendMenuItem(s.id,{command:{...d,precondition:s.precondition===null?void 0:d.precondition},...s}));if(n&&(e.push(yg.appendMenuItem(As.CommandPalette,{command:d,when:d.precondition})),e.push(yg.addCommand(d))),Array.isArray(c))for(const f of c)e.push(wv.registerKeybindingRule({...f,id:d.id,when:d.precondition?kn.and(d.precondition,f.when):f.when}));else c&&e.push(wv.registerKeybindingRule({...c,id:d.id,when:d.precondition?kn.and(d.precondition,c.when):c.when}));return{dispose(){vd(e)}}}const b1=jc("telemetryService"),N0=jc("logService");var xb;(function(l){l[l.Off=0]="Off",l[l.Trace=1]="Trace",l[l.Debug=2]="Debug",l[l.Info=3]="Info",l[l.Warning=4]="Warning",l[l.Error=5]="Error"})(xb||(xb={}));const M2t=xb.Info;class R2t extends xi{constructor(){super(...arguments),this.level=M2t,this._onDidChangeLogLevel=this._register(new gi),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(e){return this.level!==xb.Off&&this.level<=e}}class Kdi extends R2t{constructor(e=M2t,i=!0){super(),this.useColors=i,this.setLevel(e)}trace(e,...i){this.checkLogLevel(xb.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",e,...i):console.log(e,...i))}debug(e,...i){this.checkLogLevel(xb.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",e,...i):console.log(e,...i))}info(e,...i){this.checkLogLevel(xb.Info)&&(this.useColors?console.log("%c INFO","color: #33f",e,...i):console.log(e,...i))}warn(e,...i){this.checkLogLevel(xb.Warning)&&(this.useColors?console.log("%c WARN","color: #993",e,...i):console.log(e,...i))}error(e,...i){this.checkLogLevel(xb.Error)&&(this.useColors?console.log("%c ERR","color: #f33",e,...i):console.error(e,...i))}}class Xdi extends R2t{constructor(e){super(),this.loggers=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(const i of this.loggers)i.setLevel(e);super.setLevel(e)}trace(e,...i){for(const n of this.loggers)n.trace(e,...i)}debug(e,...i){for(const n of this.loggers)n.debug(e,...i)}info(e,...i){for(const n of this.loggers)n.info(e,...i)}warn(e,...i){for(const n of this.loggers)n.warn(e,...i)}error(e,...i){for(const n of this.loggers)n.error(e,...i)}dispose(){for(const e of this.loggers)e.dispose();super.dispose()}}function Qdi(l){switch(l){case xb.Trace:return"trace";case xb.Debug:return"debug";case xb.Info:return"info";case xb.Warning:return"warn";case xb.Error:return"error";case xb.Off:return"off"}}new rs("logLevel",Qdi(xb.Info));class $Se{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this.metadata=e.metadata}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const i of e){let n=i.kbExpr;this.precondition&&(n?n=kn.and(n,this.precondition):n=this.precondition);const s={id:this.id,weight:i.weight,args:i.args,when:n,primary:i.primary,secondary:i.secondary,win:i.win,linux:i.linux,mac:i.mac};wv.registerKeybindingRule(s)}}fl.registerCommand({id:this.id,handler:(e,i)=>this.runCommand(e,i),metadata:this.metadata})}_registerMenuItem(e){yg.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class mJ extends $Se{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,i,n,s){return this._implementations.push({priority:e,name:i,implementation:n,when:s}),this._implementations.sort((c,d)=>d.priority-c.priority),{dispose:()=>{for(let c=0;c<this._implementations.length;c++)if(this._implementations[c].implementation===n){this._implementations.splice(c,1);return}}}}runCommand(e,i){const n=e.get(N0),s=e.get(Ko);n.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);for(const c of this._implementations){if(c.when){const f=s.getContext(D0());if(!c.when.evaluate(f))continue}const d=c.implementation(e,i);if(d)return n.trace(`Command '${this.id}' was handled by '${c.name}'.`),typeof d=="boolean"?void 0:d}n.trace(`The Command '${this.id}' was not handled by any implementation.`)}}class F2t extends $Se{constructor(e,i){super(i),this.command=e}runCommand(e,i){return this.command.runCommand(e,i)}}class tm extends $Se{static bindToContribution(e){return class extends tm{constructor(n){super(n),this._callback=n.handler}runEditorCommand(n,s,c){const d=e(s);d&&this._callback(d,c)}}}static runEditorCommand(e,i,n,s){const c=e.get(Bl),d=c.getFocusedCodeEditor()||c.getActiveCodeEditor();if(d)return d.invokeWithinContext(f=>{if(f.get(Ko).contextMatchesRules(n??void 0))return s(f,d,i)})}runCommand(e,i){return tm.runEditorCommand(e,i,this.precondition,(n,s,c)=>this.runEditorCommand(n,s,c))}}class hs extends tm{static convertOptions(e){let i;Array.isArray(e.menuOpts)?i=e.menuOpts:e.menuOpts?i=[e.menuOpts]:i=[];function n(s){return s.menuId||(s.menuId=As.EditorContext),s.title||(s.title=e.label),s.when=kn.and(e.precondition,s.when),s}return Array.isArray(e.contextMenuOpts)?i.push(...e.contextMenuOpts.map(n)):e.contextMenuOpts&&i.push(n(e.contextMenuOpts)),e.menuOpts=i,e}constructor(e){super(hs.convertOptions(e)),this.label=e.label,this.alias=e.alias}runEditorCommand(e,i,n){return this.reportTelemetry(e,i),this.run(e,i,n||{})}reportTelemetry(e,i){e.get(b1).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class B2t extends hs{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,i){return this._implementations.push([e,i]),this._implementations.sort((n,s)=>s[0]-n[0]),{dispose:()=>{for(let n=0;n<this._implementations.length;n++)if(this._implementations[n][1]===i){this._implementations.splice(n,1);return}}}}run(e,i,n){for(const s of this._implementations){const c=s[1](e,i,n);if(c)return typeof c=="boolean"?void 0:c}}}class XE extends Tv{run(e,...i){const n=e.get(Bl),s=n.getFocusedCodeEditor()||n.getActiveCodeEditor();if(s)return s.invokeWithinContext(c=>{var v;const d=c.get(Ko),f=c.get(N0);if(!d.contextMatchesRules(this.desc.precondition??void 0)){f.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,(v=this.desc.precondition)==null?void 0:v.serialize());return}return this.runEditorCommand(c,s,...i)})}}function Mb(l,e){fl.registerCommand(l,function(i,...n){const s=i.get(ho),[c,d]=n;Fl(yo.isUri(c)),Fl(pi.isIPosition(d));const f=i.get(rf).getModel(c);if(f){const m=pi.lift(d);return s.invokeFunction(e,f,m,...n.slice(2))}return i.get(Ob).createModelReference(c).then(m=>new Promise((v,x)=>{try{const w=s.invokeFunction(e,m.object.textEditorModel,pi.lift(d),n.slice(2));v(w)}catch(w){x(w)}}).finally(()=>{m.dispose()}))})}function $r(l){return hk.INSTANCE.registerEditorCommand(l),l}function sr(l){const e=new l;return hk.INSTANCE.registerEditorAction(e),e}function W2t(l){return hk.INSTANCE.registerEditorAction(l),l}function Zdi(l){hk.INSTANCE.registerEditorAction(l)}function Cl(l,e,i){hk.INSTANCE.registerEditorContribution(l,e,i)}var p9;(function(l){function e(d){return hk.INSTANCE.getEditorCommand(d)}l.getEditorCommand=e;function i(){return hk.INSTANCE.getEditorActions()}l.getEditorActions=i;function n(){return hk.INSTANCE.getEditorContributions()}l.getEditorContributions=n;function s(d){return hk.INSTANCE.getEditorContributions().filter(f=>d.indexOf(f.id)>=0)}l.getSomeEditorContributions=s;function c(){return hk.INSTANCE.getDiffEditorContributions()}l.getDiffEditorContributions=c})(p9||(p9={}));const Ydi={EditorCommonContributions:"editor.contributions"},Qbe=class Qbe{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,i,n){this.editorContributions.push({id:e,ctor:i,instantiation:n})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}};Qbe.INSTANCE=new Qbe;let hk=Qbe;nh.add(Ydi.EditorCommonContributions,hk.INSTANCE);function pse(l){return l.register(),l}const V2t=pse(new mJ({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:As.MenubarEditMenu,group:"1_do",title:W({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:As.CommandPalette,group:"",title:W("undo","Undo"),order:1}]}));pse(new F2t(V2t,{id:"default:undo",precondition:void 0}));const H2t=pse(new mJ({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:As.MenubarEditMenu,group:"1_do",title:W({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:As.CommandPalette,group:"",title:W("redo","Redo"),order:1}]}));pse(new F2t(H2t,{id:"default:redo",precondition:void 0}));const efi=pse(new mJ({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:As.MenubarSelectionMenu,group:"1_basic",title:W({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:As.CommandPalette,group:"",title:W("selectAll","Select All"),order:1}]})),bvt="default",tfi="$initialize";let Cvt=!1;function PWe(l){XB&&(Cvt||(Cvt=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(l.message))}class ifi{constructor(e,i,n,s,c){this.vsWorker=e,this.req=i,this.channel=n,this.method=s,this.args=c,this.type=0}}class Svt{constructor(e,i,n,s){this.vsWorker=e,this.seq=i,this.res=n,this.err=s,this.type=1}}class nfi{constructor(e,i,n,s,c){this.vsWorker=e,this.req=i,this.channel=n,this.eventName=s,this.arg=c,this.type=2}}class rfi{constructor(e,i,n){this.vsWorker=e,this.req=i,this.event=n,this.type=3}}class sfi{constructor(e,i){this.vsWorker=e,this.req=i,this.type=4}}class ofi{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,i,n){const s=String(++this._lastSentReq);return new Promise((c,d)=>{this._pendingReplies[s]={resolve:c,reject:d},this._send(new ifi(this._workerId,s,e,i,n))})}listen(e,i,n){let s=null;const c=new gi({onWillAddFirstListener:()=>{s=String(++this._lastSentReq),this._pendingEmitters.set(s,c),this._send(new nfi(this._workerId,s,e,i,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(s),this._send(new sfi(this._workerId,s)),s=null}});return c.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}createProxyToRemoteChannel(e,i){const n={get:(s,c)=>(typeof c=="string"&&!s[c]&&(z2t(c)?s[c]=d=>this.listen(e,c,d):j2t(c)?s[c]=this.listen(e,c,void 0):c.charCodeAt(0)===36&&(s[c]=async(...d)=>(await(i==null?void 0:i()),this.sendMessage(e,c,d)))),s[c])};return new Proxy(Object.create(null),n)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}const i=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;e.err.$isError&&(n=new Error,n.name=e.err.name,n.message=e.err.message,n.stack=e.err.stack),i.reject(n);return}i.resolve(e.res)}_handleRequestMessage(e){const i=e.req;this._handler.handleMessage(e.channel,e.method,e.args).then(s=>{this._send(new Svt(this._workerId,i,s,void 0))},s=>{s.detail instanceof Error&&(s.detail=Kyt(s.detail)),this._send(new Svt(this._workerId,i,void 0,Kyt(s)))})}_handleSubscribeEventMessage(e){const i=e.req,n=this._handler.handleEvent(e.channel,e.eventName,e.arg)(s=>{this._send(new rfi(this._workerId,i,s))});this._pendingEvents.set(i,n)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){const i=[];if(e.type===0)for(let n=0;n<e.args.length;n++)e.args[n]instanceof ArrayBuffer&&i.push(e.args[n]);else e.type===1&&e.res instanceof ArrayBuffer&&i.push(e.res);this._handler.sendMessage(e,i)}}class afi extends xi{constructor(e,i){super(),this._localChannels=new Map,this._worker=this._register(e.create({amdModuleId:"vs/base/common/worker/simpleWorker",esmModuleLocation:i.esmModuleLocation,label:i.label},c=>{this._protocol.handleMessage(c)},c=>{Pa(c)})),this._protocol=new ofi({sendMessage:(c,d)=>{this._worker.postMessage(c,d)},handleMessage:(c,d,f)=>this._handleMessage(c,d,f),handleEvent:(c,d,f)=>this._handleEvent(c,d,f)}),this._protocol.setWorkerId(this._worker.getId());let n=null;const s=globalThis.require;typeof s<"u"&&typeof s.getConfig=="function"?n=s.getConfig():typeof globalThis.requirejs<"u"&&(n=globalThis.requirejs.s.contexts._.config),this._onModuleLoaded=this._protocol.sendMessage(bvt,tfi,[this._worker.getId(),JSON.parse(JSON.stringify(n)),i.amdModuleId]),this.proxy=this._protocol.createProxyToRemoteChannel(bvt,async()=>{await this._onModuleLoaded}),this._onModuleLoaded.catch(c=>{this._onError("Worker failed to load "+i.amdModuleId,c)})}_handleMessage(e,i,n){const s=this._localChannels.get(e);if(!s)return Promise.reject(new Error(`Missing channel ${e} on main thread`));if(typeof s[i]!="function")return Promise.reject(new Error(`Missing method ${i} on main thread channel ${e}`));try{return Promise.resolve(s[i].apply(s,n))}catch(c){return Promise.reject(c)}}_handleEvent(e,i,n){const s=this._localChannels.get(e);if(!s)throw new Error(`Missing channel ${e} on main thread`);if(z2t(i)){const c=s[i].call(s,n);if(typeof c!="function")throw new Error(`Missing dynamic event ${i} on main thread channel ${e}.`);return c}if(j2t(i)){const c=s[i];if(typeof c!="function")throw new Error(`Missing event ${i} on main thread channel ${e}.`);return c}throw new Error(`Malformed event name ${i}`)}setChannel(e,i){this._localChannels.set(e,i)}_onError(e,i){console.error(e),console.info(i)}}function j2t(l){return l[0]==="o"&&l[1]==="n"&&fL(l.charCodeAt(2))}function z2t(l){return/^onDynamic/.test(l)&&fL(l.charCodeAt(9))}function v6(l,e){var n;const i=globalThis.MonacoEnvironment;if(i!=null&&i.createTrustedTypesPolicy)try{return i.createTrustedTypesPolicy(l,e)}catch(s){Pa(s);return}try{return(n=globalThis.trustedTypes)==null?void 0:n.createPolicy(l,e)}catch(s){Pa(s);return}}let tq;typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope"&&globalThis.workerttPolicy!==void 0?tq=globalThis.workerttPolicy:tq=v6("defaultWorkerFactory",{createScriptURL:l=>l});function cfi(l,e){const i=globalThis.MonacoEnvironment;if(i){if(typeof i.getWorker=="function")return i.getWorker("workerMain.js",e);if(typeof i.getWorkerUrl=="function"){const n=i.getWorkerUrl("workerMain.js",e);return new Worker(tq?tq.createScriptURL(n):n,{name:e,type:"module"})}}if(l){const n=lfi(e,l.toString(!0)),s=new Worker(tq?tq.createScriptURL(n):n,{name:e,type:"module"});return ufi(s)}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function lfi(l,e,i){if(!(/^((http:)|(https:)|(file:)|(vscode-file:))/.test(e)&&e.substring(0,globalThis.origin.length)!==globalThis.origin)){const c=e.lastIndexOf("?"),d=e.lastIndexOf("#",c),f=c>0?new URLSearchParams(e.substring(c+1,~d?d:void 0)):new URLSearchParams;xWe.addSearchParam(f,!0,!0),f.toString()?e=`${e}?${f.toString()}#${l}`:e=`${e}#${l}`}const s=new Blob([yT([`/*${l}*/`,void 0,`globalThis._VSCODE_NLS_MESSAGES = ${JSON.stringify(xkt())};`,`globalThis._VSCODE_NLS_LANGUAGE = ${JSON.stringify(Hqe())};`,`globalThis._VSCODE_FILE_ROOT = '${globalThis._VSCODE_FILE_ROOT}';`,"const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });","globalThis.workerttPolicy = ttPolicy;",`await import(ttPolicy?.createScriptURL('${e}') ?? '${e}');`,"globalThis.postMessage({ type: 'vscode-worker-ready' });",`/*${l}*/`]).join("")],{type:"application/javascript"});return URL.createObjectURL(s)}function ufi(l){return new Promise((e,i)=>{l.onmessage=function(n){n.data.type==="vscode-worker-ready"&&(l.onmessage=null,e(l))},l.onerror=i})}function dfi(l){return typeof l.then=="function"}class ffi extends xi{constructor(e,i,n,s,c,d){super(),this.id=n,this.label=s;const f=cfi(e,s);dfi(f)?this.worker=f:this.worker=Promise.resolve(f),this.postMessage(i,[]),this.worker.then(m=>{m.onmessage=function(v){c(v.data)},m.onmessageerror=d,typeof m.addEventListener=="function"&&m.addEventListener("error",d)}),this._register(fo(()=>{var m;(m=this.worker)==null||m.then(v=>{v.onmessage=null,v.onmessageerror=null,v.removeEventListener("error",d),v.terminate()}),this.worker=null}))}getId(){return this.id}postMessage(e,i){var n;(n=this.worker)==null||n.then(s=>{try{s.postMessage(e,i)}catch(c){Pa(c),Pa(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:c}))}})}}class hfi{constructor(e,i){this.amdModuleId=e,this.label=i,this.esmModuleLocation=LSe.asBrowserUri(`${e}.esm.js`)}}const Zbe=class Zbe{constructor(){this._webWorkerFailedBeforeError=!1}create(e,i,n){const s=++Zbe.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new ffi(e.esmModuleLocation,e.amdModuleId,s,e.label||"anonymous"+s,i,c=>{PWe(c),this._webWorkerFailedBeforeError=c,n(c)})}};Zbe.LAST_WORKER_ID=0;let AWe=Zbe;function _fi(l,e){const i=typeof l=="string"?new hfi(l,e):l;return new afi(new AWe,i)}var _p;(function(l){l[l.None=0]="None",l[l.Indent=1]="Indent",l[l.IndentOutdent=2]="IndentOutdent",l[l.Outdent=3]="Outdent"})(_p||(_p={}));class gFe{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let i=0,n=e.notIn.length;i<n;i++)switch(e.notIn[i]){case"string":this._inString=!1;break;case"comment":this._inComment=!1;break;case"regex":this._inRegEx=!1;break}}isOK(e){switch(e){case 0:return!0;case 1:return this._inComment;case 2:return this._inString;case 3:return this._inRegEx}}shouldAutoClose(e,i){if(e.getTokenCount()===0)return!0;const n=e.findTokenIndexAtOffset(i-2),s=e.getStandardTokenType(n);return this.isOK(s)}_findNeutralCharacterInRange(e,i){for(let n=e;n<=i;n++){const s=String.fromCharCode(n);if(!this.open.includes(s)&&!this.close.includes(s))return s}return null}findNeutralCharacter(){return this._neutralCharacterSearched||(this._neutralCharacterSearched=!0,this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(48,57)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(97,122)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(65,90))),this._neutralCharacter}}class pfi{constructor(e){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const i of e)Nte(this.autoClosingPairsOpenByStart,i.open.charAt(0),i),Nte(this.autoClosingPairsOpenByEnd,i.open.charAt(i.open.length-1),i),Nte(this.autoClosingPairsCloseByStart,i.close.charAt(0),i),Nte(this.autoClosingPairsCloseByEnd,i.close.charAt(i.close.length-1),i),i.close.length===1&&i.open.length===1&&Nte(this.autoClosingPairsCloseSingleChar,i.close,i)}}function Nte(l,e,i){l.has(e)?l.get(e).push(i):l.set(e,[i])}const Dq=class Dq{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(i=>new gFe(i)):e.brackets?this._autoClosingPairs=e.brackets.map(i=>new gFe({open:i[0],close:i[1]})):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const i=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new gFe({open:i.open,close:i.close||""}))}this._autoCloseBeforeForQuotes=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:Dq.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:Dq.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}};Dq.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=`;:.,=}])>
+ `,Dq.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS=`'"\`;:.,=}])>
+ `;let OWe=Dq;function n9(l,e){const i=l.getCount(),n=l.findTokenIndexAtOffset(e),s=l.getLanguageId(n);let c=n;for(;c+1<i&&l.getLanguageId(c+1)===s;)c++;let d=n;for(;d>0&&l.getLanguageId(d-1)===s;)d--;return new mfi(l,s,d,c+1,l.getStartOffset(d),l.getEndOffset(c))}class mfi{constructor(e,i,n,s,c,d){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=i,this._firstTokenIndex=n,this._lastTokenIndex=s,this.firstCharOffset=c,this._lastCharOffset=d,this.languageIdCodec=e.languageIdCodec}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getLineLength(){return this._lastCharOffset-this.firstCharOffset}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}toIViewLineTokens(){return this._actual.sliceAndInflate(this.firstCharOffset,this._lastCharOffset,0)}}function ZN(l){return(l&3)!==0}const wvt=typeof Buffer<"u";let yFe;class JSe{static wrap(e){return wvt&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new JSe(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return wvt?this.buffer.toString():(yFe||(yFe=new TextDecoder),yFe.decode(this.buffer))}}function gfi(l,e){return l[e+0]<<0>>>0|l[e+1]<<8>>>0}function yfi(l,e,i){l[i+0]=e&255,e=e>>>8,l[i+1]=e&255}function gE(l,e){return l[e]*2**24+l[e+1]*2**16+l[e+2]*2**8+l[e+3]}function yE(l,e,i){l[i+3]=e,e=e>>>8,l[i+2]=e,e=e>>>8,l[i+1]=e,e=e>>>8,l[i]=e}function xvt(l,e){return l[e]}function kvt(l,e,i){l[i]=e}let vFe;function U2t(){return vFe||(vFe=new TextDecoder("UTF-16LE")),vFe}let bFe;function vfi(){return bFe||(bFe=new TextDecoder("UTF-16BE")),bFe}let CFe;function q2t(){return CFe||(CFe=Nkt()?U2t():vfi()),CFe}function bfi(l,e,i){const n=new Uint16Array(l.buffer,e,i);return i>0&&(n[0]===65279||n[0]===65534)?Cfi(l,e,i):U2t().decode(n)}function Cfi(l,e,i){const n=[];let s=0;for(let c=0;c<i;c++){const d=gfi(l,e);e+=2,n[s++]=String.fromCharCode(d)}return n.join("")}class gJ{constructor(e){this._capacity=e|0,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return this._completedStrings!==null?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(this._bufferLength===0)return"";const e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return q2t().decode(e)}_flushBuffer(){const e=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}appendCharCode(e){const i=this._capacity-this._bufferLength;i<=1&&(i===0||Pm(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIICharCode(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendString(e){const i=e.length;if(this._bufferLength+i>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=e;return}for(let n=0;n<i;n++)this._buffer[this._bufferLength++]=e.charCodeAt(n)}}class fye{constructor(e,i,n,s,c,d){this._richEditBracketBrand=void 0,this.languageId=e,this.index=i,this.open=n,this.close=s,this.forwardRegex=c,this.reversedRegex=d,this._openSet=fye._toSet(this.open),this._closeSet=fye._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const i=new Set;for(const n of e)i.add(n);return i}}function Sfi(l){const e=l.length;l=l.map(d=>[d[0].toLowerCase(),d[1].toLowerCase()]);const i=[];for(let d=0;d<e;d++)i[d]=d;const n=(d,f)=>{const[m,v]=d,[x,w]=f;return m===x||m===w||v===x||v===w},s=(d,f)=>{const m=Math.min(d,f),v=Math.max(d,f);for(let x=0;x<e;x++)i[x]===v&&(i[x]=m)};for(let d=0;d<e;d++){const f=l[d];for(let m=d+1;m<e;m++){const v=l[m];n(f,v)&&s(i[d],i[m])}}const c=[];for(let d=0;d<e;d++){const f=[],m=[];for(let v=0;v<e;v++)if(i[v]===d){const[x,w]=l[v];f.push(x),m.push(w)}f.length>0&&c.push({open:f,close:m})}return c}class wfi{constructor(e,i){this._richEditBracketsBrand=void 0;const n=Sfi(i);this.brackets=n.map((s,c)=>new fye(e,c,s.open,s.close,xfi(s.open,s.close,n,c),kfi(s.open,s.close,n,c))),this.forwardRegex=Tfi(this.brackets),this.reversedRegex=Dfi(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const s of this.brackets){for(const c of s.open)this.textIsBracket[c]=s,this.textIsOpenBracket[c]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,c.length);for(const c of s.close)this.textIsBracket[c]=s,this.textIsOpenBracket[c]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,c.length)}}}function $2t(l,e,i,n){for(let s=0,c=e.length;s<c;s++){if(s===i)continue;const d=e[s];for(const f of d.open)f.indexOf(l)>=0&&n.push(f);for(const f of d.close)f.indexOf(l)>=0&&n.push(f)}}function J2t(l,e){return l.length-e.length}function GSe(l){if(l.length<=1)return l;const e=[],i=new Set;for(const n of l)i.has(n)||(e.push(n),i.add(n));return e}function xfi(l,e,i,n){let s=[];s=s.concat(l),s=s.concat(e);for(let c=0,d=s.length;c<d;c++)$2t(s[c],i,n,s);return s=GSe(s),s.sort(J2t),s.reverse(),mse(s)}function kfi(l,e,i,n){let s=[];s=s.concat(l),s=s.concat(e);for(let c=0,d=s.length;c<d;c++)$2t(s[c],i,n,s);return s=GSe(s),s.sort(J2t),s.reverse(),mse(s.map(g$e))}function Tfi(l){let e=[];for(const i of l){for(const n of i.open)e.push(n);for(const n of i.close)e.push(n)}return e=GSe(e),mse(e)}function Dfi(l){let e=[];for(const i of l){for(const n of i.open)e.push(n);for(const n of i.close)e.push(n)}return e=GSe(e),mse(e.map(g$e))}function Efi(l){const e=/^[\w ]+$/.test(l);return l=Tw(l),e?`\\b${l}\\b`:l}function mse(l,e){const i=`(${l.map(Efi).join(")|(")})`;return e2t(i,!0,e)}const g$e=function(){function l(n){const s=new Uint16Array(n.length);let c=0;for(let d=n.length-1;d>=0;d--)s[c++]=n.charCodeAt(d);return q2t().decode(s)}let e=null,i=null;return function(s){return e!==s&&(e=s,i=l(e)),i}}();class iT{static _findPrevBracketInText(e,i,n,s){const c=n.match(e);if(!c)return null;const d=n.length-(c.index||0),f=c[0].length,m=s+d;return new nt(i,m-f+1,i,m+1)}static findPrevBracketInRange(e,i,n,s,c){const f=g$e(n).substring(n.length-c,n.length-s);return this._findPrevBracketInText(e,i,f,s)}static findNextBracketInText(e,i,n,s){const c=n.match(e);if(!c)return null;const d=c.index||0,f=c[0].length;if(f===0)return null;const m=s+d;return new nt(i,m+1,i,m+1+f)}static findNextBracketInRange(e,i,n,s,c){const d=n.substring(s,c);return this.findNextBracketInText(e,i,d,s)}}class Ifi{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const i of this._richEditBrackets.brackets)for(const n of i.close){const s=n.charAt(n.length-1);e.push(s)}return r6(e)}onElectricCharacter(e,i,n){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const s=i.findTokenIndexAtOffset(n-1);if(ZN(i.getStandardTokenType(s)))return null;const c=this._richEditBrackets.reversedRegex,d=i.getLineContent().substring(0,n-1)+e,f=iT.findPrevBracketInRange(c,1,d,0,d.length);if(!f)return null;const m=d.substring(f.startColumn-1,f.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[m])return null;const x=i.getActualLineContentBefore(f.startColumn-1);return/^\s*$/.test(x)?{matchOpenBracket:m}:null}}function Kge(l){return l.global&&(l.lastIndex=0),!0}class Nfi{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&Kge(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&Kge(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&Kge(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&Kge(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let i=0;return this.shouldIncrease(e)&&(i+=1),this.shouldDecrease(e)&&(i+=2),this.shouldIndentNextLine(e)&&(i+=4),this.shouldIgnore(e)&&(i+=8),i}}class iq{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(i=>{const n=iq._createOpenBracketRegExp(i[0]),s=iq._createCloseBracketRegExp(i[1]);n&&s&&this._brackets.push({open:i[0],openRegExp:n,close:i[1],closeRegExp:s})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,i,n,s){if(e>=3)for(let c=0,d=this._regExpRules.length;c<d;c++){const f=this._regExpRules[c];if([{reg:f.beforeText,text:n},{reg:f.afterText,text:s},{reg:f.previousLineText,text:i}].every(v=>v.reg?(v.reg.lastIndex=0,v.reg.test(v.text)):!0))return f.action}if(e>=2&&n.length>0&&s.length>0)for(let c=0,d=this._brackets.length;c<d;c++){const f=this._brackets[c];if(f.openRegExp.test(n)&&f.closeRegExp.test(s))return{indentAction:_p.IndentOutdent}}if(e>=2&&n.length>0){for(let c=0,d=this._brackets.length;c<d;c++)if(this._brackets[c].openRegExp.test(n))return{indentAction:_p.Indent}}return null}static _createOpenBracketRegExp(e){let i=Tw(e);return/\B/.test(i.charAt(0))||(i="\\b"+i),i+="\\s*$",iq._safeRegExp(i)}static _createCloseBracketRegExp(e){let i=Tw(e);return/\B/.test(i.charAt(i.length-1))||(i=i+"\\b"),i="^\\s*"+i,iq._safeRegExp(i)}static _safeRegExp(e){try{return new RegExp(e)}catch(i){return Pa(i),null}}}const Cc=jc("configurationService");function MWe(l,e){const i=Object.create(null);for(const n in l)G2t(i,n,l[n],e);return i}function G2t(l,e,i,n){const s=e.split("."),c=s.pop();let d=l;for(let f=0;f<s.length;f++){const m=s[f];let v=d[m];switch(typeof v){case"undefined":v=d[m]=Object.create(null);break;case"object":if(v===null){n(`Ignoring ${e} as ${s.slice(0,f+1).join(".")} is null`);return}break;default:n(`Ignoring ${e} as ${s.slice(0,f+1).join(".")} is ${JSON.stringify(v)}`);return}d=v}if(typeof d=="object"&&d!==null)try{d[c]=i}catch{n(`Ignoring ${e} as ${s.join(".")} is ${JSON.stringify(d)}`)}else n(`Ignoring ${e} as ${s.join(".")} is ${JSON.stringify(d)}`)}function Lfi(l,e){const i=e.split(".");K2t(l,i)}function K2t(l,e){const i=e.shift();if(e.length===0){delete l[i];return}if(Object.keys(l).indexOf(i)!==-1){const n=l[i];typeof n=="object"&&!Array.isArray(n)&&(K2t(n,e),Object.keys(n).length===0&&delete l[i])}}function Tvt(l,e,i){function n(d,f){let m=d;for(const v of f){if(typeof m!="object"||m===null)return;m=m[v]}return m}const s=e.split("."),c=n(l,s);return typeof c>"u"?i:c}function Pfi(l){return l.replace(/[\[\]]/g,"")}const Pf=jc("languageService");class wE{constructor(e,i=[],n=!1){this.ctor=e,this.staticArguments=i,this.supportsDelayedInstantiation=n}}const X2t=[];function nl(l,e,i){e instanceof wE||(e=new wE(e,[],!!i)),X2t.push([l,e])}function Dvt(){return X2t}const Yh=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"}),KSe={JSONContribution:"base.contributions.json"};function Afi(l){return l.length>0&&l.charAt(l.length-1)==="#"?l.substring(0,l.length-1):l}class Ofi{constructor(){this._onDidChangeSchema=new gi,this.schemasById={}}registerSchema(e,i){this.schemasById[Afi(e)]=i,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}}const Mfi=new Ofi;nh.add(KSe.JSONContribution,Mfi);const DT={Configuration:"base.contributions.configuration"},Lte="vscode://schemas/settings/resourceLanguage",Evt=nh.as(KSe.JSONContribution);class Rfi{constructor(){this.registeredConfigurationDefaults=[],this.overrideIdentifiers=new Set,this._onDidSchemaChange=new gi,this._onDidUpdateConfiguration=new gi,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:W("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},Evt.registerSchema(Lte,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,i=!0){this.registerConfigurations([e],i)}registerConfigurations(e,i=!0){const n=new Set;this.doRegisterConfigurations(e,i,n),Evt.registerSchema(Lte,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n})}registerDefaultConfigurations(e){const i=new Set;this.doRegisterDefaultConfigurations(e,i),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,i){this.registeredConfigurationDefaults.push(...e);const n=[];for(const{overrides:s,source:c}of e)for(const d in s){i.add(d);const f=this.configurationDefaultsOverrides.get(d)??this.configurationDefaultsOverrides.set(d,{configurationDefaultOverrides:[]}).get(d),m=s[d];if(f.configurationDefaultOverrides.push({value:m,source:c}),wR.test(d)){const v=this.mergeDefaultConfigurationsForOverrideIdentifier(d,m,c,f.configurationDefaultOverrideValue);if(!v)continue;f.configurationDefaultOverrideValue=v,this.updateDefaultOverrideProperty(d,v,c),n.push(...hye(d))}else{const v=this.mergeDefaultConfigurationsForConfigurationProperty(d,m,c,f.configurationDefaultOverrideValue);if(!v)continue;f.configurationDefaultOverrideValue=v;const x=this.configurationProperties[d];x&&(this.updatePropertyDefaultValue(d,x),this.updateSchema(d,x))}}this.doRegisterOverrideIdentifiers(n)}updateDefaultOverrideProperty(e,i,n){const s={type:"object",default:i.value,description:W("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",Pfi(e)),$ref:Lte,defaultDefaultValue:i.value,source:n,defaultValueSource:n};this.configurationProperties[e]=s,this.defaultLanguageConfigurationOverridesNode.properties[e]=s}mergeDefaultConfigurationsForOverrideIdentifier(e,i,n,s){const c=(s==null?void 0:s.value)||{},d=(s==null?void 0:s.source)??new Map;if(!(d instanceof Map)){console.error("objectConfigurationSources is not a Map");return}for(const f of Object.keys(i)){const m=i[f];if(gg(m)&&(xy(c[f])||gg(c[f]))){if(c[f]={...c[f]??{},...m},n)for(const x in m)d.set(`${f}.${x}`,n)}else c[f]=m,n?d.set(f,n):d.delete(f)}return{value:c,source:d}}mergeDefaultConfigurationsForConfigurationProperty(e,i,n,s){const c=this.configurationProperties[e],d=(s==null?void 0:s.value)??(c==null?void 0:c.defaultDefaultValue);let f=n;if(gg(i)&&(c!==void 0&&c.type==="object"||c===void 0&&(xy(d)||gg(d)))){if(f=(s==null?void 0:s.source)??new Map,!(f instanceof Map)){console.error("defaultValueSource is not a Map");return}for(const v in i)n&&f.set(`${e}.${v}`,n);i={...gg(d)?d:{},...i}}return{value:i,source:f}}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const i of e)this.overrideIdentifiers.add(i);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,i,n){e.forEach(s=>{this.validateAndRegisterProperties(s,i,s.extensionInfo,s.restrictedProperties,void 0,n),this.configurationContributors.push(s),this.registerJSONConfiguration(s)})}validateAndRegisterProperties(e,i=!0,n,s,c=3,d){var v;c=pw(e.scope)?c:e.scope;const f=e.properties;if(f)for(const x in f){const w=f[x];if(i&&Wfi(x,w)){delete f[x];continue}if(w.source=n,w.defaultDefaultValue=f[x].default,this.updatePropertyDefaultValue(x,w),wR.test(x)?w.scope=void 0:(w.scope=pw(w.scope)?c:w.scope,w.restricted=pw(w.restricted)?!!(s!=null&&s.includes(x)):w.restricted),f[x].hasOwnProperty("included")&&!f[x].included){this.excludedConfigurationProperties[x]=f[x],delete f[x];continue}else this.configurationProperties[x]=f[x],(v=f[x].policy)!=null&&v.name&&this.policyConfigurations.set(f[x].policy.name,x);!f[x].deprecationMessage&&f[x].markdownDeprecationMessage&&(f[x].deprecationMessage=f[x].markdownDeprecationMessage),d.add(x)}const m=e.allOf;if(m)for(const x of m)this.validateAndRegisterProperties(x,i,n,s,c,d)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const i=n=>{const s=n.properties;if(s)for(const d in s)this.updateSchema(d,s[d]);const c=n.allOf;c==null||c.forEach(i)};i(e)}updateSchema(e,i){switch(i.scope){case 1:break;case 2:break;case 6:break;case 3:break;case 4:break;case 5:this.resourceLanguageSettingsSchema.properties[e]=i;break}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const i=`[${e}]`,n={type:"object",description:W("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:W("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:Lte};this.updatePropertyDefaultValue(i,n)}}registerOverridePropertyPatternKey(){W("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),W("overrideSettings.errorMessage","This setting does not support per-language configuration."),this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,i){var d;const n=(d=this.configurationDefaultsOverrides.get(e))==null?void 0:d.configurationDefaultOverrideValue;let s,c;n&&(!i.disallowConfigurationDefault||!n.source)&&(s=n.value,c=n.source),xy(s)&&(s=i.defaultDefaultValue,c=void 0),xy(s)&&(s=Bfi(i.type)),i.default=s,i.defaultValueSource=c}}const Q2t="\\[([^\\]]+)\\]",Ivt=new RegExp(Q2t,"g"),Ffi=`^(${Q2t})+$`,wR=new RegExp(Ffi);function hye(l){const e=[];if(wR.test(l)){let i=Ivt.exec(l);for(;i!=null&&i.length;){const n=i[1].trim();n&&e.push(n),i=Ivt.exec(l)}}return r6(e)}function Bfi(l){switch(Array.isArray(l)?l[0]:l){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const o1e=new Rfi;nh.add(DT.Configuration,o1e);function Wfi(l,e){var i,n,s,c;return l.trim()?wR.test(l)?W("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",l):o1e.getConfigurationProperties()[l]!==void 0?W("config.property.duplicate","Cannot register '{0}'. This property is already registered.",l):(i=e.policy)!=null&&i.name&&o1e.getPolicyConfigurations().get((n=e.policy)==null?void 0:n.name)!==void 0?W("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",l,(s=e.policy)==null?void 0:s.name,o1e.getPolicyConfigurations().get((c=e.policy)==null?void 0:c.name)):null:W("config.property.empty","Cannot register an empty property")}const Vfi={ModesRegistry:"editor.modesRegistry"};class Hfi{constructor(){this._onDidChangeLanguages=new gi,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let i=0,n=this._languages.length;i<n;i++)if(this._languages[i]===e){this._languages.splice(i,1);return}}}}getLanguages(){return this._languages}}const D$=new Hfi;nh.add(Vfi.ModesRegistry,D$);const bv="plaintext",jfi=".txt";D$.registerLanguage({id:bv,extensions:[jfi],aliases:[W("plainText.alias","Plain Text"),"text"],mimetypes:[Yh.text]});nh.as(DT.Configuration).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}]);class zfi{constructor(e,i){this.languageId=e;const n=i.brackets?Nvt(i.brackets):[],s=new evt(f=>{const m=new Set;return{info:new Ufi(this,f,m),closing:m}}),c=new evt(f=>{const m=new Set,v=new Set;return{info:new qfi(this,f,m,v),opening:m,openingColorized:v}});for(const[f,m]of n){const v=s.get(f),x=c.get(m);v.closing.add(x.info),x.opening.add(v.info)}const d=i.colorizedBracketPairs?Nvt(i.colorizedBracketPairs):n.filter(f=>!(f[0]==="<"&&f[1]===">"));for(const[f,m]of d){const v=s.get(f),x=c.get(m);v.closing.add(x.info),x.openingColorized.add(v.info),x.opening.add(v.info)}this._openingBrackets=new Map([...s.cachedValues].map(([f,m])=>[f,m.info])),this._closingBrackets=new Map([...c.cachedValues].map(([f,m])=>[f,m.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}getBracketRegExp(e){const i=Array.from([...this._openingBrackets.keys(),...this._closingBrackets.keys()]);return mse(i,e)}}function Nvt(l){return l.filter(([e,i])=>e!==""&&i!=="")}class Z2t{constructor(e,i){this.config=e,this.bracketText=i}get languageId(){return this.config.languageId}}class Ufi extends Z2t{constructor(e,i,n){super(e,i),this.openedBrackets=n,this.isOpeningBracket=!0}}class qfi extends Z2t{constructor(e,i,n,s){super(e,i),this.openingBrackets=n,this.openingColorizedBrackets=s,this.isOpeningBracket=!1}closes(e){return e.config!==this.config?!1:this.openingBrackets.has(e)}closesColorized(e){return e.config!==this.config?!1:this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var $fi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Lvt=function(l,e){return function(i,n){e(i,n,l)}};class SFe{constructor(e){this.languageId=e}affects(e){return this.languageId?this.languageId===e:!0}}const rh=jc("languageConfigurationService");let RWe=class extends xi{constructor(e,i){super(),this.configurationService=e,this.languageService=i,this._registry=this._register(new Xfi),this.onDidChangeEmitter=this._register(new gi),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const n=new Set(Object.values(FWe));this._register(this.configurationService.onDidChangeConfiguration(s=>{const c=s.change.keys.some(f=>n.has(f)),d=s.change.overrides.filter(([f,m])=>m.some(v=>n.has(v))).map(([f])=>f);if(c)this.configurations.clear(),this.onDidChangeEmitter.fire(new SFe(void 0));else for(const f of d)this.languageService.isRegisteredLanguageId(f)&&(this.configurations.delete(f),this.onDidChangeEmitter.fire(new SFe(f)))})),this._register(this._registry.onDidChange(s=>{this.configurations.delete(s.languageId),this.onDidChangeEmitter.fire(new SFe(s.languageId))}))}register(e,i,n){return this._registry.register(e,i,n)}getLanguageConfiguration(e){let i=this.configurations.get(e);return i||(i=Jfi(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,i)),i}};RWe=$fi([Lvt(0,Cc),Lvt(1,Pf)],RWe);function Jfi(l,e,i,n){let s=e.getLanguageConfiguration(l);if(!s){if(!n.isRegisteredLanguageId(l))return new Uq(l,{});s=new Uq(l,{})}const c=Gfi(s.languageId,i),d=eTt([s.underlyingConfig,c]);return new Uq(s.languageId,d)}const FWe={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function Gfi(l,e){const i=e.getValue(FWe.brackets,{overrideIdentifier:l}),n=e.getValue(FWe.colorizedBracketPairs,{overrideIdentifier:l});return{brackets:Pvt(i),colorizedBracketPairs:Pvt(n)}}function Pvt(l){if(Array.isArray(l))return l.map(e=>{if(!(!Array.isArray(e)||e.length!==2))return[e[0],e[1]]}).filter(e=>!!e)}function Y2t(l,e,i){const n=l.getLineContent(e);let s=yd(n);return s.length>i-1&&(s=s.substring(0,i-1)),s}class Kfi{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,i){const n=new Avt(e,i,++this._order);return this._entries.push(n),this._resolved=null,fo(()=>{for(let s=0;s<this._entries.length;s++)if(this._entries[s]===n){this._entries.splice(s,1),this._resolved=null;break}})}getResolvedConfiguration(){if(!this._resolved){const e=this._resolve();e&&(this._resolved=new Uq(this.languageId,e))}return this._resolved}_resolve(){return this._entries.length===0?null:(this._entries.sort(Avt.cmp),eTt(this._entries.map(e=>e.configuration)))}}function eTt(l){let e={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const i of l)e={comments:i.comments||e.comments,brackets:i.brackets||e.brackets,wordPattern:i.wordPattern||e.wordPattern,indentationRules:i.indentationRules||e.indentationRules,onEnterRules:i.onEnterRules||e.onEnterRules,autoClosingPairs:i.autoClosingPairs||e.autoClosingPairs,surroundingPairs:i.surroundingPairs||e.surroundingPairs,autoCloseBefore:i.autoCloseBefore||e.autoCloseBefore,folding:i.folding||e.folding,colorizedBracketPairs:i.colorizedBracketPairs||e.colorizedBracketPairs,__electricCharacterSupport:i.__electricCharacterSupport||e.__electricCharacterSupport};return e}class Avt{constructor(e,i,n){this.configuration=e,this.priority=i,this.order=n}static cmp(e,i){return e.priority===i.priority?e.order-i.order:e.priority-i.priority}}class Ovt{constructor(e){this.languageId=e}}class Xfi extends xi{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new gi),this.onDidChange=this._onDidChange.event,this._register(this.register(bv,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,i,n=0){let s=this._entries.get(e);s||(s=new Kfi(e),this._entries.set(e,s));const c=s.register(i,n);return this._onDidChange.fire(new Ovt(e)),fo(()=>{c.dispose(),this._onDidChange.fire(new Ovt(e))})}getLanguageConfiguration(e){const i=this._entries.get(e);return(i==null?void 0:i.getResolvedConfiguration())||null}}class Uq{constructor(e,i){this.languageId=e,this.underlyingConfig=i,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new iq(this.underlyingConfig):null,this.comments=Uq._handleComments(this.underlyingConfig),this.characterPair=new OWe(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||Uqe,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new Nfi(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new zfi(e,this.underlyingConfig)}getWordDefinition(){return qqe(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new wfi(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new Ifi(this.brackets)),this._electricCharacter}onEnter(e,i,n,s){return this._onEnterSupport?this._onEnterSupport.onEnter(e,i,n,s):null}getAutoClosingPairs(){return new pfi(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const i=e.comments;if(!i)return null;const n={};if(i.lineComment&&(n.lineCommentToken=i.lineComment),i.blockComment){const[s,c]=i.blockComment;n.blockCommentStartToken=s,n.blockCommentEndToken=c}return n}}nl(rh,RWe,1);class lM{constructor(e,i,n,s){this.originalStart=e,this.originalLength=i,this.modifiedStart=n,this.modifiedLength=s}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}class Mvt{constructor(e){this.source=e}getElements(){const e=this.source,i=new Int32Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=e.charCodeAt(n);return i}}function Qfi(l,e,i){return new mL(new Mvt(l),new Mvt(e)).ComputeDiff(i).changes}class wU{static Assert(e,i){if(!e)throw new Error(i)}}class xU{static Copy(e,i,n,s,c){for(let d=0;d<c;d++)n[s+d]=e[i+d]}static Copy2(e,i,n,s,c){for(let d=0;d<c;d++)n[s+d]=e[i+d]}}class Rvt{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new lM(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,i){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,i),this.m_originalCount++}AddModifiedElement(e,i){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,i),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class mL{constructor(e,i,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=i;const[s,c,d]=mL._getElements(e),[f,m,v]=mL._getElements(i);this._hasStrings=d&&v,this._originalStringElements=s,this._originalElementsOrHash=c,this._modifiedStringElements=f,this._modifiedElementsOrHash=m,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){const i=e.getElements();if(mL._isStringArray(i)){const n=new Int32Array(i.length);for(let s=0,c=i.length;s<c;s++)n[s]=c$e(i[s],0);return[i,n,!0]}return i instanceof Int32Array?[[],i,!1]:[[],new Int32Array(i),!1]}ElementsAreEqual(e,i){return this._originalElementsOrHash[e]!==this._modifiedElementsOrHash[i]?!1:this._hasStrings?this._originalStringElements[e]===this._modifiedStringElements[i]:!0}ElementsAreStrictEqual(e,i){if(!this.ElementsAreEqual(e,i))return!1;const n=mL._getStrictElement(this._originalSequence,e),s=mL._getStrictElement(this._modifiedSequence,i);return n===s}static _getStrictElement(e,i){return typeof e.getStrictElement=="function"?e.getStrictElement(i):null}OriginalElementsAreEqual(e,i){return this._originalElementsOrHash[e]!==this._originalElementsOrHash[i]?!1:this._hasStrings?this._originalStringElements[e]===this._originalStringElements[i]:!0}ModifiedElementsAreEqual(e,i){return this._modifiedElementsOrHash[e]!==this._modifiedElementsOrHash[i]?!1:this._hasStrings?this._modifiedStringElements[e]===this._modifiedStringElements[i]:!0}ComputeDiff(e){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,e)}_ComputeDiff(e,i,n,s,c){const d=[!1];let f=this.ComputeDiffRecursive(e,i,n,s,d);return c&&(f=this.PrettifyChanges(f)),{quitEarly:d[0],changes:f}}ComputeDiffRecursive(e,i,n,s,c){for(c[0]=!1;e<=i&&n<=s&&this.ElementsAreEqual(e,n);)e++,n++;for(;i>=e&&s>=n&&this.ElementsAreEqual(i,s);)i--,s--;if(e>i||n>s){let w;return n<=s?(wU.Assert(e===i+1,"originalStart should only be one more than originalEnd"),w=[new lM(e,0,n,s-n+1)]):e<=i?(wU.Assert(n===s+1,"modifiedStart should only be one more than modifiedEnd"),w=[new lM(e,i-e+1,n,0)]):(wU.Assert(e===i+1,"originalStart should only be one more than originalEnd"),wU.Assert(n===s+1,"modifiedStart should only be one more than modifiedEnd"),w=[]),w}const d=[0],f=[0],m=this.ComputeRecursionPoint(e,i,n,s,d,f,c),v=d[0],x=f[0];if(m!==null)return m;if(!c[0]){const w=this.ComputeDiffRecursive(e,v,n,x,c);let I=[];return c[0]?I=[new lM(v+1,i-(v+1)+1,x+1,s-(x+1)+1)]:I=this.ComputeDiffRecursive(v+1,i,x+1,s,c),this.ConcatenateChanges(w,I)}return[new lM(e,i-e+1,n,s-n+1)]}WALKTRACE(e,i,n,s,c,d,f,m,v,x,w,I,P,O,z,J,Y,ae){let me=null,ye=null,Ce=new Rvt,Fe=i,rt=n,ct=P[0]-J[0]-s,Mt=-1073741824,Yt=this.m_forwardHistory.length-1;do{const Bi=ct+e;Bi===Fe||Bi<rt&&v[Bi-1]<v[Bi+1]?(w=v[Bi+1],O=w-ct-s,w<Mt&&Ce.MarkNextChange(),Mt=w,Ce.AddModifiedElement(w+1,O),ct=Bi+1-e):(w=v[Bi-1]+1,O=w-ct-s,w<Mt&&Ce.MarkNextChange(),Mt=w-1,Ce.AddOriginalElement(w,O+1),ct=Bi-1-e),Yt>=0&&(v=this.m_forwardHistory[Yt],e=v[0],Fe=1,rt=v.length-1)}while(--Yt>=-1);if(me=Ce.getReverseChanges(),ae[0]){let Bi=P[0]+1,$i=J[0]+1;if(me!==null&&me.length>0){const $t=me[me.length-1];Bi=Math.max(Bi,$t.getOriginalEnd()),$i=Math.max($i,$t.getModifiedEnd())}ye=[new lM(Bi,I-Bi+1,$i,z-$i+1)]}else{Ce=new Rvt,Fe=d,rt=f,ct=P[0]-J[0]-m,Mt=1073741824,Yt=Y?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const Bi=ct+c;Bi===Fe||Bi<rt&&x[Bi-1]>=x[Bi+1]?(w=x[Bi+1]-1,O=w-ct-m,w>Mt&&Ce.MarkNextChange(),Mt=w+1,Ce.AddOriginalElement(w+1,O+1),ct=Bi+1-c):(w=x[Bi-1],O=w-ct-m,w>Mt&&Ce.MarkNextChange(),Mt=w,Ce.AddModifiedElement(w+1,O+1),ct=Bi-1-c),Yt>=0&&(x=this.m_reverseHistory[Yt],c=x[0],Fe=1,rt=x.length-1)}while(--Yt>=-1);ye=Ce.getChanges()}return this.ConcatenateChanges(me,ye)}ComputeRecursionPoint(e,i,n,s,c,d,f){let m=0,v=0,x=0,w=0,I=0,P=0;e--,n--,c[0]=0,d[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const O=i-e+(s-n),z=O+1,J=new Int32Array(z),Y=new Int32Array(z),ae=s-n,me=i-e,ye=e-n,Ce=i-s,rt=(me-ae)%2===0;J[ae]=e,Y[me]=i,f[0]=!1;for(let ct=1;ct<=O/2+1;ct++){let Mt=0,Yt=0;x=this.ClipDiagonalBound(ae-ct,ct,ae,z),w=this.ClipDiagonalBound(ae+ct,ct,ae,z);for(let $i=x;$i<=w;$i+=2){$i===x||$i<w&&J[$i-1]<J[$i+1]?m=J[$i+1]:m=J[$i-1]+1,v=m-($i-ae)-ye;const $t=m;for(;m<i&&v<s&&this.ElementsAreEqual(m+1,v+1);)m++,v++;if(J[$i]=m,m+v>Mt+Yt&&(Mt=m,Yt=v),!rt&&Math.abs($i-me)<=ct-1&&m>=Y[$i])return c[0]=m,d[0]=v,$t<=Y[$i]&&ct<=1448?this.WALKTRACE(ae,x,w,ye,me,I,P,Ce,J,Y,m,i,c,v,s,d,rt,f):null}const Bi=(Mt-e+(Yt-n)-ct)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(Mt,Bi))return f[0]=!0,c[0]=Mt,d[0]=Yt,Bi>0&&ct<=1448?this.WALKTRACE(ae,x,w,ye,me,I,P,Ce,J,Y,m,i,c,v,s,d,rt,f):(e++,n++,[new lM(e,i-e+1,n,s-n+1)]);I=this.ClipDiagonalBound(me-ct,ct,me,z),P=this.ClipDiagonalBound(me+ct,ct,me,z);for(let $i=I;$i<=P;$i+=2){$i===I||$i<P&&Y[$i-1]>=Y[$i+1]?m=Y[$i+1]-1:m=Y[$i-1],v=m-($i-me)-Ce;const $t=m;for(;m>e&&v>n&&this.ElementsAreEqual(m,v);)m--,v--;if(Y[$i]=m,rt&&Math.abs($i-ae)<=ct&&m<=J[$i])return c[0]=m,d[0]=v,$t>=J[$i]&&ct<=1448?this.WALKTRACE(ae,x,w,ye,me,I,P,Ce,J,Y,m,i,c,v,s,d,rt,f):null}if(ct<=1447){let $i=new Int32Array(w-x+2);$i[0]=ae-x+1,xU.Copy2(J,x,$i,1,w-x+1),this.m_forwardHistory.push($i),$i=new Int32Array(P-I+2),$i[0]=me-I+1,xU.Copy2(Y,I,$i,1,P-I+1),this.m_reverseHistory.push($i)}}return this.WALKTRACE(ae,x,w,ye,me,I,P,Ce,J,Y,m,i,c,v,s,d,rt,f)}PrettifyChanges(e){for(let i=0;i<e.length;i++){const n=e[i],s=i<e.length-1?e[i+1].originalStart:this._originalElementsOrHash.length,c=i<e.length-1?e[i+1].modifiedStart:this._modifiedElementsOrHash.length,d=n.originalLength>0,f=n.modifiedLength>0;for(;n.originalStart+n.originalLength<s&&n.modifiedStart+n.modifiedLength<c&&(!d||this.OriginalElementsAreEqual(n.originalStart,n.originalStart+n.originalLength))&&(!f||this.ModifiedElementsAreEqual(n.modifiedStart,n.modifiedStart+n.modifiedLength));){const v=this.ElementsAreStrictEqual(n.originalStart,n.modifiedStart);if(this.ElementsAreStrictEqual(n.originalStart+n.originalLength,n.modifiedStart+n.modifiedLength)&&!v)break;n.originalStart++,n.modifiedStart++}const m=[null];if(i<e.length-1&&this.ChangesOverlap(e[i],e[i+1],m)){e[i]=m[0],e.splice(i+1,1),i--;continue}}for(let i=e.length-1;i>=0;i--){const n=e[i];let s=0,c=0;if(i>0){const w=e[i-1];s=w.originalStart+w.originalLength,c=w.modifiedStart+w.modifiedLength}const d=n.originalLength>0,f=n.modifiedLength>0;let m=0,v=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let w=1;;w++){const I=n.originalStart-w,P=n.modifiedStart-w;if(I<s||P<c||d&&!this.OriginalElementsAreEqual(I,I+n.originalLength)||f&&!this.ModifiedElementsAreEqual(P,P+n.modifiedLength))break;const z=(I===s&&P===c?5:0)+this._boundaryScore(I,n.originalLength,P,n.modifiedLength);z>v&&(v=z,m=w)}n.originalStart-=m,n.modifiedStart-=m;const x=[null];if(i>0&&this.ChangesOverlap(e[i-1],e[i],x)){e[i-1]=x[0],e.splice(i,1),i++;continue}}if(this._hasStrings)for(let i=1,n=e.length;i<n;i++){const s=e[i-1],c=e[i],d=c.originalStart-s.originalStart-s.originalLength,f=s.originalStart,m=c.originalStart+c.originalLength,v=m-f,x=s.modifiedStart,w=c.modifiedStart+c.modifiedLength,I=w-x;if(d<5&&v<20&&I<20){const P=this._findBetterContiguousSequence(f,v,x,I,d);if(P){const[O,z]=P;(O!==s.originalStart+s.originalLength||z!==s.modifiedStart+s.modifiedLength)&&(s.originalLength=O-s.originalStart,s.modifiedLength=z-s.modifiedStart,c.originalStart=O+d,c.modifiedStart=z+d,c.originalLength=m-c.originalStart,c.modifiedLength=w-c.modifiedStart)}}}return e}_findBetterContiguousSequence(e,i,n,s,c){if(i<c||s<c)return null;const d=e+i-c+1,f=n+s-c+1;let m=0,v=0,x=0;for(let w=e;w<d;w++)for(let I=n;I<f;I++){const P=this._contiguousSequenceScore(w,I,c);P>0&&P>m&&(m=P,v=w,x=I)}return m>0?[v,x]:null}_contiguousSequenceScore(e,i,n){let s=0;for(let c=0;c<n;c++){if(!this.ElementsAreEqual(e+c,i+c))return 0;s+=this._originalStringElements[e+c].length}return s}_OriginalIsBoundary(e){return e<=0||e>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,i){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(i>0){const n=e+i;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,i){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(i>0){const n=e+i;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,i,n,s){const c=this._OriginalRegionIsBoundary(e,i)?1:0,d=this._ModifiedRegionIsBoundary(n,s)?1:0;return c+d}ConcatenateChanges(e,i){const n=[];if(e.length===0||i.length===0)return i.length>0?i:e;if(this.ChangesOverlap(e[e.length-1],i[0],n)){const s=new Array(e.length+i.length-1);return xU.Copy(e,0,s,0,e.length-1),s[e.length-1]=n[0],xU.Copy(i,1,s,e.length,i.length-1),s}else{const s=new Array(e.length+i.length);return xU.Copy(e,0,s,0,e.length),xU.Copy(i,0,s,e.length,i.length),s}}ChangesOverlap(e,i,n){if(wU.Assert(e.originalStart<=i.originalStart,"Left change is not less than or equal to right change"),wU.Assert(e.modifiedStart<=i.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=i.originalStart||e.modifiedStart+e.modifiedLength>=i.modifiedStart){const s=e.originalStart;let c=e.originalLength;const d=e.modifiedStart;let f=e.modifiedLength;return e.originalStart+e.originalLength>=i.originalStart&&(c=i.originalStart+i.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=i.modifiedStart&&(f=i.modifiedStart+i.modifiedLength-e.modifiedStart),n[0]=new lM(s,c,d,f),!0}else return n[0]=null,!1}ClipDiagonalBound(e,i,n,s){if(e>=0&&e<s)return e;const c=n,d=s-n-1,f=i%2===0;if(e<0){const m=c%2===0;return f===m?0:1}else{const m=d%2===0;return f===m?s-1:s-2}}}function _ye(l){return l<0?0:l>255?255:l|0}function kU(l){return l<0?0:l>4294967295?4294967295:l|0}class yJ{constructor(e){const i=_ye(e);this._defaultValue=i,this._asciiMap=yJ._createAsciiMap(i),this._map=new Map}static _createAsciiMap(e){const i=new Uint8Array(256);return i.fill(e),i}set(e,i){const n=_ye(i);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class pye{constructor(){this._actual=new yJ(0)}add(e){this._actual.set(e,1)}has(e){return this._actual.get(e)===1}clear(){return this._actual.clear()}}class Zfi{constructor(e,i,n){const s=new Uint8Array(e*i);for(let c=0,d=e*i;c<d;c++)s[c]=n;this._data=s,this.rows=e,this.cols=i}get(e,i){return this._data[e*this.cols+i]}set(e,i,n){this._data[e*this.cols+i]=n}}class Yfi{constructor(e){let i=0,n=0;for(let c=0,d=e.length;c<d;c++){const[f,m,v]=e[c];m>i&&(i=m),f>n&&(n=f),v>n&&(n=v)}i++,n++;const s=new Zfi(n,i,0);for(let c=0,d=e.length;c<d;c++){const[f,m,v]=e[c];s.set(f,m,v)}this._states=s,this._maxCharCode=i}nextState(e,i){return i<0||i>=this._maxCharCode?0:this._states.get(e,i)}}let wFe=null;function ehi(){return wFe===null&&(wFe=new Yfi([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),wFe}let Pte=null;function thi(){if(Pte===null){Pte=new yJ(0);const l=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…`;for(let i=0;i<l.length;i++)Pte.set(l.charCodeAt(i),1);const e=".,;:";for(let i=0;i<e.length;i++)Pte.set(e.charCodeAt(i),2)}return Pte}class mye{static _createLink(e,i,n,s,c){let d=c-1;do{const f=i.charCodeAt(d);if(e.get(f)!==2)break;d--}while(d>s);if(s>0){const f=i.charCodeAt(s-1),m=i.charCodeAt(d);(f===40&&m===41||f===91&&m===93||f===123&&m===125)&&d--}return{range:{startLineNumber:n,startColumn:s+1,endLineNumber:n,endColumn:d+2},url:i.substring(s,d+1)}}static computeLinks(e,i=ehi()){const n=thi(),s=[];for(let c=1,d=e.getLineCount();c<=d;c++){const f=e.getLineContent(c),m=f.length;let v=0,x=0,w=0,I=1,P=!1,O=!1,z=!1,J=!1;for(;v<m;){let Y=!1;const ae=f.charCodeAt(v);if(I===13){let me;switch(ae){case 40:P=!0,me=0;break;case 41:me=P?0:1;break;case 91:z=!0,O=!0,me=0;break;case 93:z=!1,me=O?0:1;break;case 123:J=!0,me=0;break;case 125:me=J?0:1;break;case 39:case 34:case 96:w===ae?me=1:w===39||w===34||w===96?me=0:me=1;break;case 42:me=w===42?1:0;break;case 124:me=w===124?1:0;break;case 32:me=z?0:1;break;default:me=n.get(ae)}me===1&&(s.push(mye._createLink(n,f,c,x,v)),Y=!0)}else if(I===12){let me;ae===91?(O=!0,me=0):me=n.get(ae),me===1?Y=!0:I=13}else I=i.nextState(I,ae),I===0&&(Y=!0);Y&&(I=1,P=!1,O=!1,J=!1,x=v+1,w=ae),v++}I===13&&s.push(mye._createLink(n,f,c,x,m))}return s}}function ihi(l){return!l||typeof l.getLineCount!="function"||typeof l.getLineContent!="function"?[]:mye.computeLinks(l)}const Ybe=class Ybe{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(e,i,n,s,c){if(e&&i){const d=this.doNavigateValueSet(i,c);if(d)return{range:e,value:d}}if(n&&s){const d=this.doNavigateValueSet(s,c);if(d)return{range:n,value:d}}return null}doNavigateValueSet(e,i){const n=this.numberReplace(e,i);return n!==null?n:this.textReplace(e,i)}numberReplace(e,i){const n=Math.pow(10,e.length-(e.lastIndexOf(".")+1));let s=Number(e);const c=parseFloat(e);return!isNaN(s)&&!isNaN(c)&&s===c?s===0&&!i?null:(s=Math.floor(s*n),s+=i?n:-n,String(s/n)):null}textReplace(e,i){return this.valueSetsReplace(this._defaultValueSet,e,i)}valueSetsReplace(e,i,n){let s=null;for(let c=0,d=e.length;s===null&&c<d;c++)s=this.valueSetReplace(e[c],i,n);return s}valueSetReplace(e,i,n){let s=e.indexOf(i);return s>=0?(s+=n?1:-1,s<0?s=e.length-1:s%=e.length,e[s]):null}};Ybe.INSTANCE=new Ybe;let BWe=Ybe;const dne=class dne{static getChannel(e){return e.getChannel(dne.CHANNEL_NAME)}static setChannel(e,i){e.setChannel(dne.CHANNEL_NAME,i)}};dne.CHANNEL_NAME="editorWorkerHost";let WWe=dne;var Fvt,Bvt;class nhi{constructor(e,i){this.uri=e,this.value=i}}function rhi(l){return Array.isArray(l)}const QF=class QF{constructor(e,i){if(this[Fvt]="ResourceMap",e instanceof QF)this.map=new Map(e.map),this.toKey=i??QF.defaultToKey;else if(rhi(e)){this.map=new Map,this.toKey=i??QF.defaultToKey;for(const[n,s]of e)this.set(n,s)}else this.map=new Map,this.toKey=e??QF.defaultToKey}set(e,i){return this.map.set(this.toKey(e),new nhi(e,i)),this}get(e){var i;return(i=this.map.get(this.toKey(e)))==null?void 0:i.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,i){typeof i<"u"&&(e=e.bind(i));for(const[n,s]of this.map)e(s.value,s.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(Fvt=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}};QF.defaultToKey=e=>e.toString();let vg=QF;class shi{constructor(){this[Bvt]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return(e=this._head)==null?void 0:e.value}get last(){var e;return(e=this._tail)==null?void 0:e.value}has(e){return this._map.has(e)}get(e,i=0){const n=this._map.get(e);if(n)return i!==0&&this.touch(n,i),n.value}set(e,i,n=0){let s=this._map.get(e);if(s)s.value=i,n!==0&&this.touch(s,n);else{switch(s={key:e,value:i,next:void 0,previous:void 0},n){case 0:this.addItemLast(s);break;case 1:this.addItemFirst(s);break;case 2:this.addItemLast(s);break;default:this.addItemLast(s);break}this._map.set(e,s),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const i=this._map.get(e);if(i)return this._map.delete(e),this.removeItem(i),this._size--,i.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,i){const n=this._state;let s=this._head;for(;s;){if(i?e.bind(i)(s.value,s.key,this):e(s.value,s.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");s=s.next}}keys(){const e=this,i=this._state;let n=this._head;const s={[Symbol.iterator](){return s},next(){if(e._state!==i)throw new Error("LinkedMap got modified during iteration.");if(n){const c={value:n.key,done:!1};return n=n.next,c}else return{value:void 0,done:!0}}};return s}values(){const e=this,i=this._state;let n=this._head;const s={[Symbol.iterator](){return s},next(){if(e._state!==i)throw new Error("LinkedMap got modified during iteration.");if(n){const c={value:n.value,done:!1};return n=n.next,c}else return{value:void 0,done:!0}}};return s}entries(){const e=this,i=this._state;let n=this._head;const s={[Symbol.iterator](){return s},next(){if(e._state!==i)throw new Error("LinkedMap got modified during iteration.");if(n){const c={value:[n.key,n.value],done:!1};return n=n.next,c}else return{value:void 0,done:!0}}};return s}[(Bvt=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let i=this._head,n=this.size;for(;i&&n>e;)this._map.delete(i.key),i=i.next,n--;this._head=i,this._size=n,i&&(i.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(e===0){this.clear();return}let i=this._tail,n=this.size;for(;i&&n>e;)this._map.delete(i.key),i=i.previous,n--;this._tail=i,this._size=n,i&&(i.next=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const i=e.next,n=e.previous;if(!i||!n)throw new Error("Invalid list");i.previous=n,n.next=i}e.next=void 0,e.previous=void 0,this._state++}touch(e,i){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(i!==1&&i!==2)){if(i===1){if(e===this._head)return;const n=e.next,s=e.previous;e===this._tail?(s.next=void 0,this._tail=s):(n.previous=s,s.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(i===2){if(e===this._tail)return;const n=e.next,s=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=s,s.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){const e=[];return this.forEach((i,n)=>{e.push([n,i])}),e}fromJSON(e){this.clear();for(const[i,n]of e)this.set(i,n)}}class ohi extends shi{constructor(e,i=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,i),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,i=2){return super.get(e,i)}peek(e){return super.get(e,0)}set(e,i){return super.set(e,i,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class VL extends ohi{constructor(e,i=1){super(e,i)}trim(e){this.trimOld(e)}set(e,i){return super.set(e,i),this.checkTrim(),this}}class ahi{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(const[i,n]of e)this.set(i,n)}clear(){this._m1.clear(),this._m2.clear()}set(e,i){this._m1.set(e,i),this._m2.set(i,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){const i=this._m1.get(e);return i===void 0?!1:(this._m1.delete(e),this._m2.delete(i),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class y$e{constructor(){this.map=new Map}add(e,i){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(i)}delete(e,i){const n=this.map.get(e);n&&(n.delete(i),n.size===0&&this.map.delete(e))}forEach(e,i){const n=this.map.get(e);n&&n.forEach(i)}get(e){const i=this.map.get(e);return i||new Set}}class chi extends yJ{constructor(e,i){super(0),this._segmenter=null,this._cachedLine=null,this._cachedSegments=[],this.intlSegmenterLocales=i,this.intlSegmenterLocales.length>0?this._segmenter=new Intl.Segmenter(this.intlSegmenterLocales,{granularity:"word"}):this._segmenter=null;for(let n=0,s=e.length;n<s;n++)this.set(e.charCodeAt(n),2);this.set(32,1),this.set(9,1)}findPrevIntlWordBeforeOrAtOffset(e,i){let n=null;for(const s of this._getIntlSegmenterWordsOnLine(e)){if(s.index>i)break;n=s}return n}findNextIntlWordAtOrAfterOffset(e,i){for(const n of this._getIntlSegmenterWordsOnLine(e))if(!(n.index<i))return n;return null}_getIntlSegmenterWordsOnLine(e){return this._segmenter?this._cachedLine===e?this._cachedSegments:(this._cachedLine=e,this._cachedSegments=this._filterWordSegments(this._segmenter.segment(e)),this._cachedSegments):[]}_filterWordSegments(e){const i=[];for(const n of e)this._isWordLike(n)&&i.push(n);return i}_isWordLike(e){return!!e.isWordLike}}const Wvt=new VL(10);function Sk(l,e){const i=`${l}/${e.join(",")}`;let n=Wvt.get(i);return n||(n=new chi(l,e),Wvt.set(i,n)),n}var ww;(function(l){l[l.Left=1]="Left",l[l.Center=2]="Center",l[l.Right=4]="Right",l[l.Full=7]="Full"})(ww||(ww={}));var CT;(function(l){l[l.Left=1]="Left",l[l.Center=2]="Center",l[l.Right=3]="Right"})(CT||(CT={}));var _T;(function(l){l[l.Both=0]="Both",l[l.Right=1]="Right",l[l.Left=2]="Left",l[l.None=3]="None"})(_T||(_T={}));class a1e{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,e.tabSize|0),e.indentSize==="tabSize"?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,e.indentSize|0),this._indentSizeIsTabSize=!1),this.insertSpaces=!!e.insertSpaces,this.defaultEOL=e.defaultEOL|0,this.trimAutoWhitespace=!!e.trimAutoWhitespace,this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&qC(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class Hne{constructor(e,i){this._findMatchBrand=void 0,this.range=e,this.matches=i}}function lhi(l){return l&&typeof l.read=="function"}class xFe{constructor(e,i,n,s,c,d){this.identifier=e,this.range=i,this.text=n,this.forceMoveMarkers=s,this.isAutoWhitespaceEdit=c,this._isTracked=d}}class uhi{constructor(e,i,n){this.regex=e,this.wordSeparators=i,this.simpleSearch=n}}class dhi{constructor(e,i,n){this.reverseEdits=e,this.changes=i,this.trimAutoWhitespaceLineNumbers=n}}function tTt(l){return!l.isTooLargeForSyncing()&&!l.isForSimpleWidget}const fhi=999;class DF{constructor(e,i,n,s){this.searchString=e,this.isRegex=i,this.matchCase=n,this.wordSeparators=s}parseSearchRequest(){if(this.searchString==="")return null;let e;this.isRegex?e=hhi(this.searchString):e=this.searchString.indexOf(`
+`)>=0;let i=null;try{i=e2t(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch{return null}if(!i)return null;let n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new uhi(i,this.wordSeparators?Sk(this.wordSeparators,[]):null,n?this.searchString:null)}}function hhi(l){if(!l||l.length===0)return!1;for(let e=0,i=l.length;e<i;e++){const n=l.charCodeAt(e);if(n===10)return!0;if(n===92){if(e++,e>=i)break;const s=l.charCodeAt(e);if(s===110||s===114||s===87)return!0}}return!1}function FF(l,e,i){if(!i)return new Hne(l,null);const n=[];for(let s=0,c=e.length;s<c;s++)n[s]=e[s];return new Hne(l,n)}class Vvt{constructor(e){const i=[];let n=0;for(let s=0,c=e.length;s<c;s++)e.charCodeAt(s)===10&&(i[n++]=s);this._lineFeedsOffsets=i}findLineFeedCountBeforeOffset(e){const i=this._lineFeedsOffsets;let n=0,s=i.length-1;if(s===-1||e<=i[0])return 0;for(;n<s;){const c=n+((s-n)/2>>0);i[c]>=e?s=c-1:i[c+1]>=e?(n=c,s=c):n=c+1}return n+1}}class Xge{static findMatches(e,i,n,s,c){const d=i.parseSearchRequest();return d?d.regex.multiline?this._doFindMatchesMultiline(e,n,new nq(d.wordSeparators,d.regex),s,c):this._doFindMatchesLineByLine(e,n,d,s,c):[]}static _getMultilineMatchRange(e,i,n,s,c,d){let f,m=0;s?(m=s.findLineFeedCountBeforeOffset(c),f=i+c+m):f=i+c;let v;if(s){const P=s.findLineFeedCountBeforeOffset(c+d.length)-m;v=f+d.length+P}else v=f+d.length;const x=e.getPositionAt(f),w=e.getPositionAt(v);return new nt(x.lineNumber,x.column,w.lineNumber,w.column)}static _doFindMatchesMultiline(e,i,n,s,c){const d=e.getOffsetAt(i.getStartPosition()),f=e.getValueInRange(i,1),m=e.getEOL()===`\r
+`?new Vvt(f):null,v=[];let x=0,w;for(n.reset(0);w=n.next(f);)if(v[x++]=FF(this._getMultilineMatchRange(e,d,f,m,w.index,w[0]),w,s),x>=c)return v;return v}static _doFindMatchesLineByLine(e,i,n,s,c){const d=[];let f=0;if(i.startLineNumber===i.endLineNumber){const v=e.getLineContent(i.startLineNumber).substring(i.startColumn-1,i.endColumn-1);return f=this._findMatchesInLine(n,v,i.startLineNumber,i.startColumn-1,f,d,s,c),d}const m=e.getLineContent(i.startLineNumber).substring(i.startColumn-1);f=this._findMatchesInLine(n,m,i.startLineNumber,i.startColumn-1,f,d,s,c);for(let v=i.startLineNumber+1;v<i.endLineNumber&&f<c;v++)f=this._findMatchesInLine(n,e.getLineContent(v),v,0,f,d,s,c);if(f<c){const v=e.getLineContent(i.endLineNumber).substring(0,i.endColumn-1);f=this._findMatchesInLine(n,v,i.endLineNumber,0,f,d,s,c)}return d}static _findMatchesInLine(e,i,n,s,c,d,f,m){const v=e.wordSeparators;if(!f&&e.simpleSearch){const I=e.simpleSearch,P=I.length,O=i.length;let z=-P;for(;(z=i.indexOf(I,z+P))!==-1;)if((!v||v$e(v,i,O,z,P))&&(d[c++]=new Hne(new nt(n,z+1+s,n,z+1+P+s),null),c>=m))return c;return c}const x=new nq(e.wordSeparators,e.regex);let w;x.reset(0);do if(w=x.next(i),w&&(d[c++]=FF(new nt(n,w.index+1+s,n,w.index+1+w[0].length+s),w,f),c>=m))return c;while(w);return c}static findNextMatch(e,i,n,s){const c=i.parseSearchRequest();if(!c)return null;const d=new nq(c.wordSeparators,c.regex);return c.regex.multiline?this._doFindNextMatchMultiline(e,n,d,s):this._doFindNextMatchLineByLine(e,n,d,s)}static _doFindNextMatchMultiline(e,i,n,s){const c=new pi(i.lineNumber,1),d=e.getOffsetAt(c),f=e.getLineCount(),m=e.getValueInRange(new nt(c.lineNumber,c.column,f,e.getLineMaxColumn(f)),1),v=e.getEOL()===`\r
+`?new Vvt(m):null;n.reset(i.column-1);const x=n.next(m);return x?FF(this._getMultilineMatchRange(e,d,m,v,x.index,x[0]),x,s):i.lineNumber!==1||i.column!==1?this._doFindNextMatchMultiline(e,new pi(1,1),n,s):null}static _doFindNextMatchLineByLine(e,i,n,s){const c=e.getLineCount(),d=i.lineNumber,f=e.getLineContent(d),m=this._findFirstMatchInLine(n,f,d,i.column,s);if(m)return m;for(let v=1;v<=c;v++){const x=(d+v-1)%c,w=e.getLineContent(x+1),I=this._findFirstMatchInLine(n,w,x+1,1,s);if(I)return I}return null}static _findFirstMatchInLine(e,i,n,s,c){e.reset(s-1);const d=e.next(i);return d?FF(new nt(n,d.index+1,n,d.index+1+d[0].length),d,c):null}static findPreviousMatch(e,i,n,s){const c=i.parseSearchRequest();if(!c)return null;const d=new nq(c.wordSeparators,c.regex);return c.regex.multiline?this._doFindPreviousMatchMultiline(e,n,d,s):this._doFindPreviousMatchLineByLine(e,n,d,s)}static _doFindPreviousMatchMultiline(e,i,n,s){const c=this._doFindMatchesMultiline(e,new nt(1,1,i.lineNumber,i.column),n,s,10*fhi);if(c.length>0)return c[c.length-1];const d=e.getLineCount();return i.lineNumber!==d||i.column!==e.getLineMaxColumn(d)?this._doFindPreviousMatchMultiline(e,new pi(d,e.getLineMaxColumn(d)),n,s):null}static _doFindPreviousMatchLineByLine(e,i,n,s){const c=e.getLineCount(),d=i.lineNumber,f=e.getLineContent(d).substring(0,i.column-1),m=this._findLastMatchInLine(n,f,d,s);if(m)return m;for(let v=1;v<=c;v++){const x=(c+d-v-1)%c,w=e.getLineContent(x+1),I=this._findLastMatchInLine(n,w,x+1,s);if(I)return I}return null}static _findLastMatchInLine(e,i,n,s){let c=null,d;for(e.reset(0);d=e.next(i);)c=FF(new nt(n,d.index+1,n,d.index+1+d[0].length),d,s);return c}}function _hi(l,e,i,n,s){if(n===0)return!0;const c=e.charCodeAt(n-1);if(l.get(c)!==0||c===13||c===10)return!0;if(s>0){const d=e.charCodeAt(n);if(l.get(d)!==0)return!0}return!1}function phi(l,e,i,n,s){if(n+s===i)return!0;const c=e.charCodeAt(n+s);if(l.get(c)!==0||c===13||c===10)return!0;if(s>0){const d=e.charCodeAt(n+s-1);if(l.get(d)!==0)return!0}return!1}function v$e(l,e,i,n,s){return _hi(l,e,i,n,s)&&phi(l,e,i,n,s)}class nq{constructor(e,i){this._wordSeparators=e,this._searchRegex=i,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const i=e.length;let n;do{if(this._prevMatchStartIndex+this._prevMatchLength===i||(n=this._searchRegex.exec(e),!n))return null;const s=n.index,c=n[0].length;if(s===this._prevMatchStartIndex&&c===this._prevMatchLength){if(c===0){nye(e,i,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=s,this._prevMatchLength=c,!this._wordSeparators||v$e(this._wordSeparators,e,i,s,c))return n}while(n);return null}}class b$e{static computeUnicodeHighlights(e,i,n){const s=n?n.startLineNumber:1,c=n?n.endLineNumber:e.getLineCount(),d=new Hvt(i),f=d.getCandidateCodePoints();let m;f==="allNonBasicAscii"?m=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):m=new RegExp(`${mhi(Array.from(f))}`,"g");const v=new nq(null,m),x=[];let w=!1,I,P=0,O=0,z=0;e:for(let J=s,Y=c;J<=Y;J++){const ae=e.getLineContent(J),me=ae.length;v.reset(0);do if(I=v.next(ae),I){let ye=I.index,Ce=I.index+I[0].length;if(ye>0){const Mt=ae.charCodeAt(ye-1);Pm(Mt)&&ye--}if(Ce+1<me){const Mt=ae.charCodeAt(Ce-1);Pm(Mt)&&Ce++}const Fe=ae.substring(ye,Ce);let rt=Nne(ye+1,Uqe,ae,0);rt&&rt.endColumn<=ye+1&&(rt=null);const ct=d.shouldHighlightNonBasicASCII(Fe,rt?rt.word:null);if(ct!==0){if(ct===3?P++:ct===2?O++:ct===1?z++:qSe(),x.length>=1e3){w=!0;break e}x.push(new nt(J,ye+1,J,Ce+1))}}while(I)}return{ranges:x,hasMore:w,ambiguousCharacterCount:P,invisibleCharacterCount:O,nonBasicAsciiCharacterCount:z}}static computeUnicodeHighlightReason(e,i){const n=new Hvt(i);switch(n.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const c=e.codePointAt(0),d=n.ambiguousCharacters.getPrimaryConfusable(c),f=Fne.getLocales().filter(m=>!Fne.getInstance(new Set([...i.allowedLocales,m])).isAmbiguous(c));return{kind:0,confusableWith:String.fromCodePoint(d),notAmbiguousInLocales:f}}case 1:return{kind:2}}}}function mhi(l,e){return`[${Tw(l.map(n=>String.fromCodePoint(n)).join(""))}]`}class Hvt{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=Fne.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const i of d9.codePoints)jvt(String.fromCodePoint(i))||e.add(i);if(this.options.ambiguousCharacters)for(const i of this.ambiguousCharacters.getConfusableCodePoints())e.add(i);for(const i of this.allowedCodePoints)e.delete(i);return e}shouldHighlightNonBasicASCII(e,i){const n=e.codePointAt(0);if(this.allowedCodePoints.has(n))return 0;if(this.options.nonBasicASCII)return 1;let s=!1,c=!1;if(i)for(const d of i){const f=d.codePointAt(0),m=fse(d);s=s||m,!m&&!this.ambiguousCharacters.isAmbiguous(f)&&!d9.isInvisibleCharacter(f)&&(c=!0)}return!s&&c?0:this.options.invisibleCharacters&&!jvt(e)&&d9.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}}function jvt(l){return l===" "||l===`
+`||l===" "}class c1e{constructor(e,i,n){this.changes=e,this.moves=i,this.hitTimeout=n}}class iTt{constructor(e,i){this.lineRangeMapping=e,this.changes=i}}class xc{static addRange(e,i){let n=0;for(;n<i.length&&i[n].endExclusive<e.start;)n++;let s=n;for(;s<i.length&&i[s].start<=e.endExclusive;)s++;if(n===s)i.splice(n,0,e);else{const c=Math.min(e.start,i[n].start),d=Math.max(e.endExclusive,i[s-1].endExclusive);i.splice(n,s-n,new xc(c,d))}}static tryCreate(e,i){if(!(e>i))return new xc(e,i)}static ofLength(e){return new xc(0,e)}static ofStartAndLength(e,i){return new xc(e,e+i)}constructor(e,i){if(this.start=e,this.endExclusive=i,e>i)throw new tu(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new xc(this.start+e,this.endExclusive+e)}deltaStart(e){return new xc(this.start+e,this.endExclusive)}deltaEnd(e){return new xc(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(e){return this.start<=e&&e<this.endExclusive}join(e){return new xc(Math.min(this.start,e.start),Math.max(this.endExclusive,e.endExclusive))}intersect(e){const i=Math.max(this.start,e.start),n=Math.min(this.endExclusive,e.endExclusive);if(i<=n)return new xc(i,n)}intersects(e){const i=Math.max(this.start,e.start),n=Math.min(this.endExclusive,e.endExclusive);return i<n}isBefore(e){return this.endExclusive<=e.start}isAfter(e){return this.start>=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new tu(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new tu(`Invalid clipping range: ${this.toString()}`);return e<this.start?this.endExclusive-(this.start-e)%this.length:e>=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let i=this.start;i<this.endExclusive;i++)e(i)}}class C$e{constructor(){this._sortedRanges=[]}addRange(e){let i=0;for(;i<this._sortedRanges.length&&this._sortedRanges[i].endExclusive<e.start;)i++;let n=i;for(;n<this._sortedRanges.length&&this._sortedRanges[n].start<=e.endExclusive;)n++;if(i===n)this._sortedRanges.splice(i,0,e);else{const s=Math.min(e.start,this._sortedRanges[i].start),c=Math.max(e.endExclusive,this._sortedRanges[n-1].endExclusive);this._sortedRanges.splice(i,n-i,new xc(s,c))}}toString(){return this._sortedRanges.map(e=>e.toString()).join(", ")}intersectsStrict(e){let i=0;for(;i<this._sortedRanges.length&&this._sortedRanges[i].endExclusive<=e.start;)i++;return i<this._sortedRanges.length&&this._sortedRanges[i].start<e.endExclusive}intersectWithRange(e){const i=new C$e;for(const n of this._sortedRanges){const s=n.intersect(e);s&&i.addRange(s)}return i}intersectWithRangeLength(e){return this.intersectWithRange(e).length}get length(){return this._sortedRanges.reduce((e,i)=>e+i.length,0)}}function jne(l,e){const i=ghi(l,e);if(i!==-1)return l[i]}function ghi(l,e,i=l.length-1){for(let n=i;n>=0;n--){const s=l[n];if(e(s))return n}return-1}function E$(l,e){const i=zne(l,e);return i===-1?void 0:l[i]}function zne(l,e,i=0,n=l.length){let s=i,c=n;for(;s<c;){const d=Math.floor((s+c)/2);e(l[d])?s=d+1:c=d}return s-1}function yhi(l,e){const i=Une(l,e);return i===l.length?void 0:l[i]}function Une(l,e,i=0,n=l.length){let s=i,c=n;for(;s<c;){const d=Math.floor((s+c)/2);e(l[d])?c=d:s=d+1}return s}const eCe=class eCe{constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(eCe.assertInvariants){if(this._prevFindLastPredicate){for(const n of this._array)if(this._prevFindLastPredicate(n)&&!e(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=e}const i=zne(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=i+1,i===-1?void 0:this._array[i]}};eCe.assertInvariants=!1;let gye=eCe;function S$e(l,e){if(l.length===0)return;let i=l[0];for(let n=1;n<l.length;n++){const s=l[n];e(s,i)>0&&(i=s)}return i}function vhi(l,e){if(l.length===0)return;let i=l[0];for(let n=1;n<l.length;n++){const s=l[n];e(s,i)>=0&&(i=s)}return i}function bhi(l,e){return S$e(l,(i,n)=>-e(i,n))}function Chi(l,e){if(l.length===0)return-1;let i=0;for(let n=1;n<l.length;n++){const s=l[n];e(s,l[i])>0&&(i=n)}return i}function Shi(l,e){for(const i of l){const n=e(i);if(n!==void 0)return n}}let Za=class p4{static fromRangeInclusive(e){return new p4(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(e.length===0)return[];let i=new _k(e[0].slice());for(let n=1;n<e.length;n++)i=i.getUnion(new _k(e[n].slice()));return i.ranges}static join(e){if(e.length===0)throw new tu("lineRanges cannot be empty");let i=e[0].startLineNumber,n=e[0].endLineNumberExclusive;for(let s=1;s<e.length;s++)i=Math.min(i,e[s].startLineNumber),n=Math.max(n,e[s].endLineNumberExclusive);return new p4(i,n)}static ofLength(e,i){return new p4(e,e+i)}static deserialize(e){return new p4(e[0],e[1])}constructor(e,i){if(e>i)throw new tu(`startLineNumber ${e} cannot be after endLineNumberExclusive ${i}`);this.startLineNumber=e,this.endLineNumberExclusive=i}contains(e){return this.startLineNumber<=e&&e<this.endLineNumberExclusive}get isEmpty(){return this.startLineNumber===this.endLineNumberExclusive}delta(e){return new p4(this.startLineNumber+e,this.endLineNumberExclusive+e)}deltaLength(e){return new p4(this.startLineNumber,this.endLineNumberExclusive+e)}get length(){return this.endLineNumberExclusive-this.startLineNumber}join(e){return new p4(Math.min(this.startLineNumber,e.startLineNumber),Math.max(this.endLineNumberExclusive,e.endLineNumberExclusive))}toString(){return`[${this.startLineNumber},${this.endLineNumberExclusive})`}intersect(e){const i=Math.max(this.startLineNumber,e.startLineNumber),n=Math.min(this.endLineNumberExclusive,e.endLineNumberExclusive);if(i<=n)return new p4(i,n)}intersectsStrict(e){return this.startLineNumber<e.endLineNumberExclusive&&e.startLineNumber<this.endLineNumberExclusive}overlapOrTouch(e){return this.startLineNumber<=e.endLineNumberExclusive&&e.startLineNumber<=this.endLineNumberExclusive}equals(e){return this.startLineNumber===e.startLineNumber&&this.endLineNumberExclusive===e.endLineNumberExclusive}toInclusiveRange(){return this.isEmpty?null:new nt(this.startLineNumber,1,this.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER)}toExclusiveRange(){return new nt(this.startLineNumber,1,this.endLineNumberExclusive,1)}mapToLineArray(e){const i=[];for(let n=this.startLineNumber;n<this.endLineNumberExclusive;n++)i.push(e(n));return i}forEach(e){for(let i=this.startLineNumber;i<this.endLineNumberExclusive;i++)e(i)}serialize(){return[this.startLineNumber,this.endLineNumberExclusive]}includes(e){return this.startLineNumber<=e&&e<this.endLineNumberExclusive}toOffsetRange(){return new xc(this.startLineNumber-1,this.endLineNumberExclusive-1)}};class _k{constructor(e=[]){this._normalizedRanges=e}get ranges(){return this._normalizedRanges}addRange(e){if(e.length===0)return;const i=Une(this._normalizedRanges,s=>s.endLineNumberExclusive>=e.startLineNumber),n=zne(this._normalizedRanges,s=>s.startLineNumber<=e.endLineNumberExclusive)+1;if(i===n)this._normalizedRanges.splice(i,0,e);else if(i===n-1){const s=this._normalizedRanges[i];this._normalizedRanges[i]=s.join(e)}else{const s=this._normalizedRanges[i].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(i,n-i,s)}}contains(e){const i=E$(this._normalizedRanges,n=>n.startLineNumber<=e);return!!i&&i.endLineNumberExclusive>e}intersects(e){const i=E$(this._normalizedRanges,n=>n.startLineNumber<e.endLineNumberExclusive);return!!i&&i.endLineNumberExclusive>e.startLineNumber}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;const i=[];let n=0,s=0,c=null;for(;n<this._normalizedRanges.length||s<e._normalizedRanges.length;){let d=null;if(n<this._normalizedRanges.length&&s<e._normalizedRanges.length){const f=this._normalizedRanges[n],m=e._normalizedRanges[s];f.startLineNumber<m.startLineNumber?(d=f,n++):(d=m,s++)}else n<this._normalizedRanges.length?(d=this._normalizedRanges[n],n++):(d=e._normalizedRanges[s],s++);c===null?c=d:c.endLineNumberExclusive>=d.startLineNumber?c=new Za(c.startLineNumber,Math.max(c.endLineNumberExclusive,d.endLineNumberExclusive)):(i.push(c),c=d)}return c!==null&&i.push(c),new _k(i)}subtractFrom(e){const i=Une(this._normalizedRanges,d=>d.endLineNumberExclusive>=e.startLineNumber),n=zne(this._normalizedRanges,d=>d.startLineNumber<=e.endLineNumberExclusive)+1;if(i===n)return new _k([e]);const s=[];let c=e.startLineNumber;for(let d=i;d<n;d++){const f=this._normalizedRanges[d];f.startLineNumber>c&&s.push(new Za(c,f.startLineNumber)),c=f.endLineNumberExclusive}return c<e.endLineNumberExclusive&&s.push(new Za(c,e.endLineNumberExclusive)),new _k(s)}toString(){return this._normalizedRanges.map(e=>e.toString()).join(", ")}getIntersection(e){const i=[];let n=0,s=0;for(;n<this._normalizedRanges.length&&s<e._normalizedRanges.length;){const c=this._normalizedRanges[n],d=e._normalizedRanges[s],f=c.intersect(d);f&&!f.isEmpty&&i.push(f),c.endLineNumberExclusive<d.endLineNumberExclusive?n++:s++}return new _k(i)}getWithDelta(e){return new _k(this._normalizedRanges.map(i=>i.delta(e)))}}const mM=class mM{static betweenPositions(e,i){return e.lineNumber===i.lineNumber?new mM(0,i.column-e.column):new mM(i.lineNumber-e.lineNumber,i.column-1)}static ofRange(e){return mM.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let i=0,n=0;for(const s of e)s===`
+`?(i++,n=0):n++;return new mM(i,n)}constructor(e,i){this.lineCount=e,this.columnCount=i}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}createRange(e){return this.lineCount===0?new nt(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new nt(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(e){return this.lineCount===0?new pi(e.lineNumber,e.column+this.columnCount):new pi(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};mM.zero=new mM(0,0);let ST=mM;class whi{constructor(e){this.text=e,this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let i=0;i<e.length;i++)e.charAt(i)===`
+`&&this.lineStartOffsetByLineIdx.push(i+1)}getOffset(e){return this.lineStartOffsetByLineIdx[e.lineNumber-1]+e.column-1}getOffsetRange(e){return new xc(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}get textLength(){const e=this.lineStartOffsetByLineIdx.length-1;return new ST(e,this.text.length-this.lineStartOffsetByLineIdx[e])}}class w$e{constructor(e){this.edits=e,DB(()=>p$e(e,(i,n)=>i.range.getEndPosition().isBeforeOrEqual(n.range.getStartPosition())))}apply(e){let i="",n=new pi(1,1);for(const c of this.edits){const d=c.range,f=d.getStartPosition(),m=d.getEndPosition(),v=zvt(n,f);v.isEmpty()||(i+=e.getValueOfRange(v)),i+=c.text,n=m}const s=zvt(n,e.endPositionExclusive);return s.isEmpty()||(i+=e.getValueOfRange(s)),i}applyToString(e){const i=new xhi(e);return this.apply(i)}getNewRanges(){const e=[];let i=0,n=0,s=0;for(const c of this.edits){const d=ST.ofText(c.text),f=pi.lift({lineNumber:c.range.startLineNumber+n,column:c.range.startColumn+(c.range.startLineNumber===i?s:0)}),m=d.createRange(f);e.push(m),n=m.endLineNumber-c.range.endLineNumber,s=m.endColumn-c.range.endColumn,i=c.range.endLineNumber}return e}}class IL{constructor(e,i){this.range=e,this.text=i}toSingleEditOperation(){return{range:this.range,text:this.text}}}function zvt(l,e){if(l.lineNumber===e.lineNumber&&l.column===Number.MAX_SAFE_INTEGER)return nt.fromPositions(e,e);if(!l.isBeforeOrEqual(e))throw new tu("start must be before end");return new nt(l.lineNumber,l.column,e.lineNumber,e.column)}class nTt{get endPositionExclusive(){return this.length.addToPosition(new pi(1,1))}}class xhi extends nTt{constructor(e){super(),this.value=e,this._t=new whi(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}}class wy{static inverse(e,i,n){const s=[];let c=1,d=1;for(const m of e){const v=new wy(new Za(c,m.original.startLineNumber),new Za(d,m.modified.startLineNumber));v.modified.isEmpty||s.push(v),c=m.original.endLineNumberExclusive,d=m.modified.endLineNumberExclusive}const f=new wy(new Za(c,i+1),new Za(d,n+1));return f.modified.isEmpty||s.push(f),s}static clip(e,i,n){const s=[];for(const c of e){const d=c.original.intersect(i),f=c.modified.intersect(n);d&&!d.isEmpty&&f&&!f.isEmpty&&s.push(new wy(d,f))}return s}constructor(e,i){this.original=e,this.modified=i}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new wy(this.modified,this.original)}join(e){return new wy(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),i=this.modified.toInclusiveRange();if(e&&i)return new fw(e,i);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new tu("not a valid diff");return new fw(new nt(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new nt(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new fw(new nt(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new nt(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,i){if(Uvt(this.original.endLineNumberExclusive,e)&&Uvt(this.modified.endLineNumberExclusive,i))return new fw(new nt(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new nt(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new fw(nt.fromPositions(new pi(this.original.startLineNumber,1),TU(new pi(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),nt.fromPositions(new pi(this.modified.startLineNumber,1),TU(new pi(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),i)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new fw(nt.fromPositions(TU(new pi(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),TU(new pi(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),nt.fromPositions(TU(new pi(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),i),TU(new pi(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),i)));throw new tu}}function TU(l,e){if(l.lineNumber<1)return new pi(1,1);if(l.lineNumber>e.length)return new pi(e.length,e[e.length-1].length+1);const i=e[l.lineNumber-1];return l.column>i.length+1?new pi(l.lineNumber,i.length+1):l}function Uvt(l,e){return l>=1&&l<=e.length}class xw extends wy{static fromRangeMappings(e){const i=Za.join(e.map(s=>Za.fromRangeInclusive(s.originalRange))),n=Za.join(e.map(s=>Za.fromRangeInclusive(s.modifiedRange)));return new xw(i,n,e)}constructor(e,i,n){super(e,i),this.innerChanges=n}flip(){var e;return new xw(this.modified,this.original,(e=this.innerChanges)==null?void 0:e.map(i=>i.flip()))}withInnerChangesFromLineRanges(){return new xw(this.original,this.modified,[this.toRangeMapping()])}}class fw{static assertSorted(e){for(let i=1;i<e.length;i++){const n=e[i-1],s=e[i];if(!(n.originalRange.getEndPosition().isBeforeOrEqual(s.originalRange.getStartPosition())&&n.modifiedRange.getEndPosition().isBeforeOrEqual(s.modifiedRange.getStartPosition())))throw new tu("Range mappings must be sorted")}}constructor(e,i){this.originalRange=e,this.modifiedRange=i}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new fw(this.modifiedRange,this.originalRange)}toTextEdit(e){const i=e.getValueOfRange(this.modifiedRange);return new IL(this.originalRange,i)}}const khi=3;class Thi{computeDiff(e,i,n){var m;const c=new Ihi(e,i,{maxComputationTime:n.maxComputationTimeMs,shouldIgnoreTrimWhitespace:n.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),d=[];let f=null;for(const v of c.changes){let x;v.originalEndLineNumber===0?x=new Za(v.originalStartLineNumber+1,v.originalStartLineNumber+1):x=new Za(v.originalStartLineNumber,v.originalEndLineNumber+1);let w;v.modifiedEndLineNumber===0?w=new Za(v.modifiedStartLineNumber+1,v.modifiedStartLineNumber+1):w=new Za(v.modifiedStartLineNumber,v.modifiedEndLineNumber+1);let I=new xw(x,w,(m=v.charChanges)==null?void 0:m.map(P=>new fw(new nt(P.originalStartLineNumber,P.originalStartColumn,P.originalEndLineNumber,P.originalEndColumn),new nt(P.modifiedStartLineNumber,P.modifiedStartColumn,P.modifiedEndLineNumber,P.modifiedEndColumn))));f&&(f.modified.endLineNumberExclusive===I.modified.startLineNumber||f.original.endLineNumberExclusive===I.original.startLineNumber)&&(I=new xw(f.original.join(I.original),f.modified.join(I.modified),f.innerChanges&&I.innerChanges?f.innerChanges.concat(I.innerChanges):void 0),d.pop()),d.push(I),f=I}return DB(()=>p$e(d,(v,x)=>x.original.startLineNumber-v.original.endLineNumberExclusive===x.modified.startLineNumber-v.modified.endLineNumberExclusive&&v.original.endLineNumberExclusive<x.original.startLineNumber&&v.modified.endLineNumberExclusive<x.modified.startLineNumber)),new c1e(d,[],c.quitEarly)}}function rTt(l,e,i,n){return new mL(l,e,i).ComputeDiff(n)}let qvt=class{constructor(e){const i=[],n=[];for(let s=0,c=e.length;s<c;s++)i[s]=VWe(e[s],1),n[s]=HWe(e[s],1);this.lines=e,this._startColumns=i,this._endColumns=n}getElements(){const e=[];for(let i=0,n=this.lines.length;i<n;i++)e[i]=this.lines[i].substring(this._startColumns[i]-1,this._endColumns[i]-1);return e}getStrictElement(e){return this.lines[e]}getStartLineNumber(e){return e+1}getEndLineNumber(e){return e+1}createCharSequence(e,i,n){const s=[],c=[],d=[];let f=0;for(let m=i;m<=n;m++){const v=this.lines[m],x=e?this._startColumns[m]:1,w=e?this._endColumns[m]:v.length+1;for(let I=x;I<w;I++)s[f]=v.charCodeAt(I-1),c[f]=m+1,d[f]=I,f++;!e&&m<n&&(s[f]=10,c[f]=m+1,d[f]=v.length+1,f++)}return new Dhi(s,c,d)}};class Dhi{constructor(e,i,n){this._charCodes=e,this._lineNumbers=i,this._columns=n}toString(){return"["+this._charCodes.map((e,i)=>(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[i]},${this._columns[i]})`).join(", ")+"]"}_assertIndex(e,i){if(e<0||e>=i.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}}class qq{constructor(e,i,n,s,c,d,f,m){this.originalStartLineNumber=e,this.originalStartColumn=i,this.originalEndLineNumber=n,this.originalEndColumn=s,this.modifiedStartLineNumber=c,this.modifiedStartColumn=d,this.modifiedEndLineNumber=f,this.modifiedEndColumn=m}static createFromDiffChange(e,i,n){const s=i.getStartLineNumber(e.originalStart),c=i.getStartColumn(e.originalStart),d=i.getEndLineNumber(e.originalStart+e.originalLength-1),f=i.getEndColumn(e.originalStart+e.originalLength-1),m=n.getStartLineNumber(e.modifiedStart),v=n.getStartColumn(e.modifiedStart),x=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),w=n.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new qq(s,c,d,f,m,v,x,w)}}function Ehi(l){if(l.length<=1)return l;const e=[l[0]];let i=e[0];for(let n=1,s=l.length;n<s;n++){const c=l[n],d=c.originalStart-(i.originalStart+i.originalLength),f=c.modifiedStart-(i.modifiedStart+i.modifiedLength);Math.min(d,f)<khi?(i.originalLength=c.originalStart+c.originalLength-i.originalStart,i.modifiedLength=c.modifiedStart+c.modifiedLength-i.modifiedStart):(e.push(c),i=c)}return e}class Tie{constructor(e,i,n,s,c){this.originalStartLineNumber=e,this.originalEndLineNumber=i,this.modifiedStartLineNumber=n,this.modifiedEndLineNumber=s,this.charChanges=c}static createFromDiffResult(e,i,n,s,c,d,f){let m,v,x,w,I;if(i.originalLength===0?(m=n.getStartLineNumber(i.originalStart)-1,v=0):(m=n.getStartLineNumber(i.originalStart),v=n.getEndLineNumber(i.originalStart+i.originalLength-1)),i.modifiedLength===0?(x=s.getStartLineNumber(i.modifiedStart)-1,w=0):(x=s.getStartLineNumber(i.modifiedStart),w=s.getEndLineNumber(i.modifiedStart+i.modifiedLength-1)),d&&i.originalLength>0&&i.originalLength<20&&i.modifiedLength>0&&i.modifiedLength<20&&c()){const P=n.createCharSequence(e,i.originalStart,i.originalStart+i.originalLength-1),O=s.createCharSequence(e,i.modifiedStart,i.modifiedStart+i.modifiedLength-1);if(P.getElements().length>0&&O.getElements().length>0){let z=rTt(P,O,c,!0).changes;f&&(z=Ehi(z)),I=[];for(let J=0,Y=z.length;J<Y;J++)I.push(qq.createFromDiffChange(z[J],P,O))}}return new Tie(m,v,x,w,I)}}class Ihi{constructor(e,i,n){this.shouldComputeCharChanges=n.shouldComputeCharChanges,this.shouldPostProcessCharChanges=n.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=n.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=n.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=i,this.original=new qvt(e),this.modified=new qvt(i),this.continueLineDiff=$vt(n.maxComputationTime),this.continueCharDiff=$vt(n.maxComputationTime===0?0:Math.min(n.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:void 0}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:void 0}]};const e=rTt(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),i=e.changes,n=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){const f=[];for(let m=0,v=i.length;m<v;m++)f.push(Tie.createFromDiffResult(this.shouldIgnoreTrimWhitespace,i[m],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:n,changes:f}}const s=[];let c=0,d=0;for(let f=-1,m=i.length;f<m;f++){const v=f+1<m?i[f+1]:null,x=v?v.originalStart:this.originalLines.length,w=v?v.modifiedStart:this.modifiedLines.length;for(;c<x&&d<w;){const I=this.originalLines[c],P=this.modifiedLines[d];if(I!==P){{let O=VWe(I,1),z=VWe(P,1);for(;O>1&&z>1;){const J=I.charCodeAt(O-2),Y=P.charCodeAt(z-2);if(J!==Y)break;O--,z--}(O>1||z>1)&&this._pushTrimWhitespaceCharChange(s,c+1,1,O,d+1,1,z)}{let O=HWe(I,1),z=HWe(P,1);const J=I.length+1,Y=P.length+1;for(;O<J&&z<Y;){const ae=I.charCodeAt(O-1),me=I.charCodeAt(z-1);if(ae!==me)break;O++,z++}(O<J||z<Y)&&this._pushTrimWhitespaceCharChange(s,c+1,O,J,d+1,z,Y)}}c++,d++}v&&(s.push(Tie.createFromDiffResult(this.shouldIgnoreTrimWhitespace,v,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),c+=v.originalLength,d+=v.modifiedLength)}return{quitEarly:n,changes:s}}_pushTrimWhitespaceCharChange(e,i,n,s,c,d,f){if(this._mergeTrimWhitespaceCharChange(e,i,n,s,c,d,f))return;let m;this.shouldComputeCharChanges&&(m=[new qq(i,n,i,s,c,d,c,f)]),e.push(new Tie(i,i,c,c,m))}_mergeTrimWhitespaceCharChange(e,i,n,s,c,d,f){const m=e.length;if(m===0)return!1;const v=e[m-1];return v.originalEndLineNumber===0||v.modifiedEndLineNumber===0?!1:v.originalEndLineNumber===i&&v.modifiedEndLineNumber===c?(this.shouldComputeCharChanges&&v.charChanges&&v.charChanges.push(new qq(i,n,i,s,c,d,c,f)),!0):v.originalEndLineNumber+1===i&&v.modifiedEndLineNumber+1===c?(v.originalEndLineNumber=i,v.modifiedEndLineNumber=c,this.shouldComputeCharChanges&&v.charChanges&&v.charChanges.push(new qq(i,n,i,s,c,d,c,f)),!0):!1}}function VWe(l,e){const i=Ty(l);return i===-1?e:i+1}function HWe(l,e){const i=ME(l);return i===-1?e:i+2}function $vt(l){if(l===0)return()=>!0;const e=Date.now();return()=>Date.now()-e<l}class Y4{static trivial(e,i){return new Y4([new Lm(xc.ofLength(e.length),xc.ofLength(i.length))],!1)}static trivialTimedOut(e,i){return new Y4([new Lm(xc.ofLength(e.length),xc.ofLength(i.length))],!0)}constructor(e,i){this.diffs=e,this.hitTimeout=i}}class Lm{static invert(e,i){const n=[];return gkt(e,(s,c)=>{n.push(Lm.fromOffsetPairs(s?s.getEndExclusives():V4.zero,c?c.getStarts():new V4(i,(s?s.seq2Range.endExclusive-s.seq1Range.endExclusive:0)+i)))}),n}static fromOffsetPairs(e,i){return new Lm(new xc(e.offset1,i.offset1),new xc(e.offset2,i.offset2))}static assertSorted(e){let i;for(const n of e){if(i&&!(i.seq1Range.endExclusive<=n.seq1Range.start&&i.seq2Range.endExclusive<=n.seq2Range.start))throw new tu("Sequence diffs must be sorted");i=n}}constructor(e,i){this.seq1Range=e,this.seq2Range=i}swap(){return new Lm(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new Lm(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new Lm(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return e===0?this:new Lm(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return e===0?this:new Lm(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const i=this.seq1Range.intersect(e.seq1Range),n=this.seq2Range.intersect(e.seq2Range);if(!(!i||!n))return new Lm(i,n)}getStarts(){return new V4(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new V4(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}const ZF=class ZF{constructor(e,i){this.offset1=e,this.offset2=i}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return e===0?this:new ZF(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}};ZF.zero=new ZF(0,0),ZF.max=new ZF(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);let V4=ZF;const tCe=class tCe{isValid(){return!0}};tCe.instance=new tCe;let qne=tCe;class Nhi{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new tu("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime<this.timeout)&&this.valid){this.valid=!1;debugger}return this.valid}}class kFe{constructor(e,i){this.width=e,this.height=i,this.array=[],this.array=new Array(e*i)}get(e,i){return this.array[e+i*this.width]}set(e,i,n){this.array[e+i*this.width]=n}}function jWe(l){return l===32||l===9}const fne=class fne{static getKey(e){let i=this.chrKeys.get(e);return i===void 0&&(i=this.chrKeys.size,this.chrKeys.set(e,i)),i}constructor(e,i,n){this.range=e,this.lines=i,this.source=n,this.histogram=[];let s=0;for(let c=e.startLineNumber-1;c<e.endLineNumberExclusive-1;c++){const d=i[c];for(let m=0;m<d.length;m++){s++;const v=d[m],x=fne.getKey(v);this.histogram[x]=(this.histogram[x]||0)+1}s++;const f=fne.getKey(`
+`);this.histogram[f]=(this.histogram[f]||0)+1}this.totalCount=s}computeSimilarity(e){let i=0;const n=Math.max(this.histogram.length,e.histogram.length);for(let s=0;s<n;s++)i+=Math.abs((this.histogram[s]??0)-(e.histogram[s]??0));return 1-i/(this.totalCount+e.totalCount)}};fne.chrKeys=new Map;let yye=fne;class Lhi{compute(e,i,n=qne.instance,s){if(e.length===0||i.length===0)return Y4.trivial(e,i);const c=new kFe(e.length,i.length),d=new kFe(e.length,i.length),f=new kFe(e.length,i.length);for(let O=0;O<e.length;O++)for(let z=0;z<i.length;z++){if(!n.isValid())return Y4.trivialTimedOut(e,i);const J=O===0?0:c.get(O-1,z),Y=z===0?0:c.get(O,z-1);let ae;e.getElement(O)===i.getElement(z)?(O===0||z===0?ae=0:ae=c.get(O-1,z-1),O>0&&z>0&&d.get(O-1,z-1)===3&&(ae+=f.get(O-1,z-1)),ae+=s?s(O,z):1):ae=-1;const me=Math.max(J,Y,ae);if(me===ae){const ye=O>0&&z>0?f.get(O-1,z-1):0;f.set(O,z,ye+1),d.set(O,z,3)}else me===J?(f.set(O,z,0),d.set(O,z,1)):me===Y&&(f.set(O,z,0),d.set(O,z,2));c.set(O,z,me)}const m=[];let v=e.length,x=i.length;function w(O,z){(O+1!==v||z+1!==x)&&m.push(new Lm(new xc(O+1,v),new xc(z+1,x))),v=O,x=z}let I=e.length-1,P=i.length-1;for(;I>=0&&P>=0;)d.get(I,P)===3?(w(I,P),I--,P--):d.get(I,P)===1?I--:P--;return w(-1,-1),m.reverse(),new Y4(m,!1)}}class sTt{compute(e,i,n=qne.instance){if(e.length===0||i.length===0)return Y4.trivial(e,i);const s=e,c=i;function d(z,J){for(;z<s.length&&J<c.length&&s.getElement(z)===c.getElement(J);)z++,J++;return z}let f=0;const m=new Phi;m.set(0,d(0,0));const v=new Ahi;v.set(0,m.get(0)===0?null:new Jvt(null,0,0,m.get(0)));let x=0;e:for(;;){if(f++,!n.isValid())return Y4.trivialTimedOut(s,c);const z=-Math.min(f,c.length+f%2),J=Math.min(f,s.length+f%2);for(x=z;x<=J;x+=2){const Y=x===J?-1:m.get(x+1),ae=x===z?-1:m.get(x-1)+1,me=Math.min(Math.max(Y,ae),s.length),ye=me-x;if(me>s.length||ye>c.length)continue;const Ce=d(me,ye);m.set(x,Ce);const Fe=me===Y?v.get(x+1):v.get(x-1);if(v.set(x,Ce!==me?new Jvt(Fe,me,ye,Ce-me):Fe),m.get(x)===s.length&&m.get(x)-x===c.length)break e}}let w=v.get(x);const I=[];let P=s.length,O=c.length;for(;;){const z=w?w.x+w.length:0,J=w?w.y+w.length:0;if((z!==P||J!==O)&&I.push(new Lm(new xc(z,P),new xc(J,O))),!w)break;P=w.x,O=w.y,w=w.prev}return I.reverse(),new Y4(I,!1)}}class Jvt{constructor(e,i,n,s){this.prev=e,this.x=i,this.y=n,this.length=s}}class Phi{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,i){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const n=this.negativeArr;this.negativeArr=new Int32Array(n.length*2),this.negativeArr.set(n)}this.negativeArr[e]=i}else{if(e>=this.positiveArr.length){const n=this.positiveArr;this.positiveArr=new Int32Array(n.length*2),this.positiveArr.set(n)}this.positiveArr[e]=i}}}class Ahi{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,i){e<0?(e=-e-1,this.negativeArr[e]=i):this.positiveArr[e]=i}}class vye{constructor(e,i,n){this.lines=e,this.range=i,this.considerWhitespaceChanges=n,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let s=this.range.startLineNumber;s<=this.range.endLineNumber;s++){let c=e[s-1],d=0;s===this.range.startLineNumber&&this.range.startColumn>1&&(d=this.range.startColumn-1,c=c.substring(d)),this.lineStartOffsets.push(d);let f=0;if(!n){const v=c.trimStart();f=c.length-v.length,c=v.trimEnd()}this.trimmedWsLengthsByLineIdx.push(f);const m=s===this.range.endLineNumber?Math.min(this.range.endColumn-1-d-f,c.length):c.length;for(let v=0;v<m;v++)this.elements.push(c.charCodeAt(v));s<this.range.endLineNumber&&(this.elements.push(10),this.firstElementOffsetByLineIdx.push(this.elements.length))}}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new xc(0,this.length))}getText(e){return this.elements.slice(e.start,e.endExclusive).map(i=>String.fromCharCode(i)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const i=Kvt(e>0?this.elements[e-1]:-1),n=Kvt(e<this.elements.length?this.elements[e]:-1);if(i===7&&n===8)return 0;if(i===8)return 150;let s=0;return i!==n&&(s+=10,i===0&&n===1&&(s+=1)),s+=Gvt(i),s+=Gvt(n),s}translateOffset(e,i="right"){const n=zne(this.firstElementOffsetByLineIdx,c=>c<=e),s=e-this.firstElementOffsetByLineIdx[n];return new pi(this.range.startLineNumber+n,1+this.lineStartOffsets[n]+s+(s===0&&i==="left"?0:this.trimmedWsLengthsByLineIdx[n]))}translateRange(e){const i=this.translateOffset(e.start,"right"),n=this.translateOffset(e.endExclusive,"left");return n.isBefore(i)?nt.fromPositions(n,n):nt.fromPositions(i,n)}findWordContaining(e){if(e<0||e>=this.elements.length||!TFe(this.elements[e]))return;let i=e;for(;i>0&&TFe(this.elements[i-1]);)i--;let n=e;for(;n<this.elements.length&&TFe(this.elements[n]);)n++;return new xc(i,n)}countLinesIn(e){return this.translateOffset(e.endExclusive).lineNumber-this.translateOffset(e.start).lineNumber}isStronglyEqual(e,i){return this.elements[e]===this.elements[i]}extendToFullLines(e){const i=E$(this.firstElementOffsetByLineIdx,s=>s<=e.start)??0,n=yhi(this.firstElementOffsetByLineIdx,s=>e.endExclusive<=s)??this.elements.length;return new xc(i,n)}}function TFe(l){return l>=97&&l<=122||l>=65&&l<=90||l>=48&&l<=57}const Ohi={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function Gvt(l){return Ohi[l]}function Kvt(l){return l===10?8:l===13?7:jWe(l)?6:l>=97&&l<=122?0:l>=65&&l<=90?1:l>=48&&l<=57?2:l===-1?3:l===44||l===59?5:4}function Mhi(l,e,i,n,s,c){let{moves:d,excludedChanges:f}=Fhi(l,e,i,c);if(!c.isValid())return[];const m=l.filter(x=>!f.has(x)),v=Bhi(m,n,s,e,i,c);return aBe(d,v),d=Whi(d),d=d.filter(x=>{const w=x.original.toOffsetRange().slice(e).map(P=>P.trim());return w.join(`
+`).length>=15&&Rhi(w,P=>P.length>=2)>=2}),d=Vhi(l,d),d}function Rhi(l,e){let i=0;for(const n of l)e(n)&&i++;return i}function Fhi(l,e,i,n){const s=[],c=l.filter(m=>m.modified.isEmpty&&m.original.length>=3).map(m=>new yye(m.original,e,m)),d=new Set(l.filter(m=>m.original.isEmpty&&m.modified.length>=3).map(m=>new yye(m.modified,i,m))),f=new Set;for(const m of c){let v=-1,x;for(const w of d){const I=m.computeSimilarity(w);I>v&&(v=I,x=w)}if(v>.9&&x&&(d.delete(x),s.push(new wy(m.range,x.range)),f.add(m.source),f.add(x.source)),!n.isValid())return{moves:s,excludedChanges:f}}return{moves:s,excludedChanges:f}}function Bhi(l,e,i,n,s,c){const d=[],f=new y$e;for(const I of l)for(let P=I.original.startLineNumber;P<I.original.endLineNumberExclusive-2;P++){const O=`${e[P-1]}:${e[P+1-1]}:${e[P+2-1]}`;f.add(O,{range:new Za(P,P+3)})}const m=[];l.sort(yv(I=>I.modified.startLineNumber,mT));for(const I of l){let P=[];for(let O=I.modified.startLineNumber;O<I.modified.endLineNumberExclusive-2;O++){const z=`${i[O-1]}:${i[O+1-1]}:${i[O+2-1]}`,J=new Za(O,O+3),Y=[];f.forEach(z,({range:ae})=>{for(const ye of P)if(ye.originalLineRange.endLineNumberExclusive+1===ae.endLineNumberExclusive&&ye.modifiedLineRange.endLineNumberExclusive+1===J.endLineNumberExclusive){ye.originalLineRange=new Za(ye.originalLineRange.startLineNumber,ae.endLineNumberExclusive),ye.modifiedLineRange=new Za(ye.modifiedLineRange.startLineNumber,J.endLineNumberExclusive),Y.push(ye);return}const me={modifiedLineRange:J,originalLineRange:ae};m.push(me),Y.push(me)}),P=Y}if(!c.isValid())return[]}m.sort(bkt(yv(I=>I.modifiedLineRange.length,mT)));const v=new _k,x=new _k;for(const I of m){const P=I.modifiedLineRange.startLineNumber-I.originalLineRange.startLineNumber,O=v.subtractFrom(I.modifiedLineRange),z=x.subtractFrom(I.originalLineRange).getWithDelta(P),J=O.getIntersection(z);for(const Y of J.ranges){if(Y.length<3)continue;const ae=Y,me=Y.delta(-P);d.push(new wy(me,ae)),v.addRange(ae),x.addRange(me)}}d.sort(yv(I=>I.original.startLineNumber,mT));const w=new gye(l);for(let I=0;I<d.length;I++){const P=d[I],O=w.findLastMonotonous(Fe=>Fe.original.startLineNumber<=P.original.startLineNumber),z=E$(l,Fe=>Fe.modified.startLineNumber<=P.modified.startLineNumber),J=Math.max(P.original.startLineNumber-O.original.startLineNumber,P.modified.startLineNumber-z.modified.startLineNumber),Y=w.findLastMonotonous(Fe=>Fe.original.startLineNumber<P.original.endLineNumberExclusive),ae=E$(l,Fe=>Fe.modified.startLineNumber<P.modified.endLineNumberExclusive),me=Math.max(Y.original.endLineNumberExclusive-P.original.endLineNumberExclusive,ae.modified.endLineNumberExclusive-P.modified.endLineNumberExclusive);let ye;for(ye=0;ye<J;ye++){const Fe=P.original.startLineNumber-ye-1,rt=P.modified.startLineNumber-ye-1;if(Fe>n.length||rt>s.length||v.contains(rt)||x.contains(Fe)||!Xvt(n[Fe-1],s[rt-1],c))break}ye>0&&(x.addRange(new Za(P.original.startLineNumber-ye,P.original.startLineNumber)),v.addRange(new Za(P.modified.startLineNumber-ye,P.modified.startLineNumber)));let Ce;for(Ce=0;Ce<me;Ce++){const Fe=P.original.endLineNumberExclusive+Ce,rt=P.modified.endLineNumberExclusive+Ce;if(Fe>n.length||rt>s.length||v.contains(rt)||x.contains(Fe)||!Xvt(n[Fe-1],s[rt-1],c))break}Ce>0&&(x.addRange(new Za(P.original.endLineNumberExclusive,P.original.endLineNumberExclusive+Ce)),v.addRange(new Za(P.modified.endLineNumberExclusive,P.modified.endLineNumberExclusive+Ce))),(ye>0||Ce>0)&&(d[I]=new wy(new Za(P.original.startLineNumber-ye,P.original.endLineNumberExclusive+Ce),new Za(P.modified.startLineNumber-ye,P.modified.endLineNumberExclusive+Ce)))}return d}function Xvt(l,e,i){if(l.trim()===e.trim())return!0;if(l.length>300&&e.length>300)return!1;const s=new sTt().compute(new vye([l],new nt(1,1,1,l.length),!1),new vye([e],new nt(1,1,1,e.length),!1),i);let c=0;const d=Lm.invert(s.diffs,l.length);for(const x of d)x.seq1Range.forEach(w=>{jWe(l.charCodeAt(w))||c++});function f(x){let w=0;for(let I=0;I<l.length;I++)jWe(x.charCodeAt(I))||w++;return w}const m=f(l.length>e.length?l:e);return c/m>.6&&m>10}function Whi(l){if(l.length===0)return l;l.sort(yv(i=>i.original.startLineNumber,mT));const e=[l[0]];for(let i=1;i<l.length;i++){const n=e[e.length-1],s=l[i],c=s.original.startLineNumber-n.original.endLineNumberExclusive,d=s.modified.startLineNumber-n.modified.endLineNumberExclusive;if(c>=0&&d>=0&&c+d<=2){e[e.length-1]=n.join(s);continue}e.push(s)}return e}function Vhi(l,e){const i=new gye(l);return e=e.filter(n=>{const s=i.findLastMonotonous(f=>f.original.startLineNumber<n.original.endLineNumberExclusive)||new wy(new Za(1,1),new Za(1,1)),c=E$(l,f=>f.modified.startLineNumber<n.modified.endLineNumberExclusive);return s!==c}),e}function zWe(l,e,i){let n=i;return n=Qvt(l,e,n),n=Qvt(l,e,n),n=Hhi(l,e,n),n}function Qvt(l,e,i){if(i.length===0)return i;const n=[];n.push(i[0]);for(let c=1;c<i.length;c++){const d=n[n.length-1];let f=i[c];if(f.seq1Range.isEmpty||f.seq2Range.isEmpty){const m=f.seq1Range.start-d.seq1Range.endExclusive;let v;for(v=1;v<=m&&!(l.getElement(f.seq1Range.start-v)!==l.getElement(f.seq1Range.endExclusive-v)||e.getElement(f.seq2Range.start-v)!==e.getElement(f.seq2Range.endExclusive-v));v++);if(v--,v===m){n[n.length-1]=new Lm(new xc(d.seq1Range.start,f.seq1Range.endExclusive-m),new xc(d.seq2Range.start,f.seq2Range.endExclusive-m));continue}f=f.delta(-v)}n.push(f)}const s=[];for(let c=0;c<n.length-1;c++){const d=n[c+1];let f=n[c];if(f.seq1Range.isEmpty||f.seq2Range.isEmpty){const m=d.seq1Range.start-f.seq1Range.endExclusive;let v;for(v=0;v<m&&!(!l.isStronglyEqual(f.seq1Range.start+v,f.seq1Range.endExclusive+v)||!e.isStronglyEqual(f.seq2Range.start+v,f.seq2Range.endExclusive+v));v++);if(v===m){n[c+1]=new Lm(new xc(f.seq1Range.start+m,d.seq1Range.endExclusive),new xc(f.seq2Range.start+m,d.seq2Range.endExclusive));continue}v>0&&(f=f.delta(v))}s.push(f)}return n.length>0&&s.push(n[n.length-1]),s}function Hhi(l,e,i){if(!l.getBoundaryScore||!e.getBoundaryScore)return i;for(let n=0;n<i.length;n++){const s=n>0?i[n-1]:void 0,c=i[n],d=n+1<i.length?i[n+1]:void 0,f=new xc(s?s.seq1Range.endExclusive+1:0,d?d.seq1Range.start-1:l.length),m=new xc(s?s.seq2Range.endExclusive+1:0,d?d.seq2Range.start-1:e.length);c.seq1Range.isEmpty?i[n]=Zvt(c,l,e,f,m):c.seq2Range.isEmpty&&(i[n]=Zvt(c.swap(),e,l,m,f).swap())}return i}function Zvt(l,e,i,n,s){let d=1;for(;l.seq1Range.start-d>=n.start&&l.seq2Range.start-d>=s.start&&i.isStronglyEqual(l.seq2Range.start-d,l.seq2Range.endExclusive-d)&&d<100;)d++;d--;let f=0;for(;l.seq1Range.start+f<n.endExclusive&&l.seq2Range.endExclusive+f<s.endExclusive&&i.isStronglyEqual(l.seq2Range.start+f,l.seq2Range.endExclusive+f)&&f<100;)f++;if(d===0&&f===0)return l;let m=0,v=-1;for(let x=-d;x<=f;x++){const w=l.seq2Range.start+x,I=l.seq2Range.endExclusive+x,P=l.seq1Range.start+x,O=e.getBoundaryScore(P)+i.getBoundaryScore(w)+i.getBoundaryScore(I);O>v&&(v=O,m=x)}return l.delta(m)}function jhi(l,e,i){const n=[];for(const s of i){const c=n[n.length-1];if(!c){n.push(s);continue}s.seq1Range.start-c.seq1Range.endExclusive<=2||s.seq2Range.start-c.seq2Range.endExclusive<=2?n[n.length-1]=new Lm(c.seq1Range.join(s.seq1Range),c.seq2Range.join(s.seq2Range)):n.push(s)}return n}function zhi(l,e,i){const n=Lm.invert(i,l.length),s=[];let c=new V4(0,0);function d(m,v){if(m.offset1<c.offset1||m.offset2<c.offset2)return;const x=l.findWordContaining(m.offset1),w=e.findWordContaining(m.offset2);if(!x||!w)return;let I=new Lm(x,w);const P=I.intersect(v);let O=P.seq1Range.length,z=P.seq2Range.length;for(;n.length>0;){const J=n[0];if(!(J.seq1Range.intersects(I.seq1Range)||J.seq2Range.intersects(I.seq2Range)))break;const ae=l.findWordContaining(J.seq1Range.start),me=e.findWordContaining(J.seq2Range.start),ye=new Lm(ae,me),Ce=ye.intersect(J);if(O+=Ce.seq1Range.length,z+=Ce.seq2Range.length,I=I.join(ye),I.seq1Range.endExclusive>=J.seq1Range.endExclusive)n.shift();else break}O+z<(I.seq1Range.length+I.seq2Range.length)*2/3&&s.push(I),c=I.getEndExclusives()}for(;n.length>0;){const m=n.shift();m.seq1Range.isEmpty||(d(m.getStarts(),m),d(m.getEndExclusives().delta(-1),m))}return Uhi(i,s)}function Uhi(l,e){const i=[];for(;l.length>0||e.length>0;){const n=l[0],s=e[0];let c;n&&(!s||n.seq1Range.start<s.seq1Range.start)?c=l.shift():c=e.shift(),i.length>0&&i[i.length-1].seq1Range.endExclusive>=c.seq1Range.start?i[i.length-1]=i[i.length-1].join(c):i.push(c)}return i}function qhi(l,e,i){let n=i;if(n.length===0)return n;let s=0,c;do{c=!1;const d=[n[0]];for(let f=1;f<n.length;f++){let x=function(I,P){const O=new xc(v.seq1Range.endExclusive,m.seq1Range.start);return l.getText(O).replace(/\s/g,"").length<=4&&(I.seq1Range.length+I.seq2Range.length>5||P.seq1Range.length+P.seq2Range.length>5)};const m=n[f],v=d[d.length-1];x(v,m)?(c=!0,d[d.length-1]=d[d.length-1].join(m)):d.push(m)}n=d}while(s++<10&&c);return n}function $hi(l,e,i){let n=i;if(n.length===0)return n;let s=0,c;do{c=!1;const f=[n[0]];for(let m=1;m<n.length;m++){let w=function(P,O){const z=new xc(x.seq1Range.endExclusive,v.seq1Range.start);if(l.countLinesIn(z)>5||z.length>500)return!1;const Y=l.getText(z).trim();if(Y.length>20||Y.split(/\r\n|\r|\n/).length>1)return!1;const ae=l.countLinesIn(P.seq1Range),me=P.seq1Range.length,ye=e.countLinesIn(P.seq2Range),Ce=P.seq2Range.length,Fe=l.countLinesIn(O.seq1Range),rt=O.seq1Range.length,ct=e.countLinesIn(O.seq2Range),Mt=O.seq2Range.length,Yt=2*40+50;function Bi($i){return Math.min($i,Yt)}return Math.pow(Math.pow(Bi(ae*40+me),1.5)+Math.pow(Bi(ye*40+Ce),1.5),1.5)+Math.pow(Math.pow(Bi(Fe*40+rt),1.5)+Math.pow(Bi(ct*40+Mt),1.5),1.5)>(Yt**1.5)**1.5*1.3};const v=n[m],x=f[f.length-1];w(x,v)?(c=!0,f[f.length-1]=f[f.length-1].join(v)):f.push(v)}n=f}while(s++<10&&c);const d=[];return Rai(n,(f,m,v)=>{let x=m;function w(Y){return Y.length>0&&Y.trim().length<=3&&m.seq1Range.length+m.seq2Range.length>100}const I=l.extendToFullLines(m.seq1Range),P=l.getText(new xc(I.start,m.seq1Range.start));w(P)&&(x=x.deltaStart(-P.length));const O=l.getText(new xc(m.seq1Range.endExclusive,I.endExclusive));w(O)&&(x=x.deltaEnd(O.length));const z=Lm.fromOffsetPairs(f?f.getEndExclusives():V4.zero,v?v.getStarts():V4.max),J=x.intersect(z);d.length>0&&J.getStarts().equals(d[d.length-1].getEndExclusives())?d[d.length-1]=d[d.length-1].join(J):d.push(J)}),d}class Yvt{constructor(e,i){this.trimmedHash=e,this.lines=i}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){const i=e===0?0:ebt(this.lines[e-1]),n=e===this.lines.length?0:ebt(this.lines[e]);return 1e3-(i+n)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(`
+`)}isStronglyEqual(e,i){return this.lines[e]===this.lines[i]}}function ebt(l){let e=0;for(;e<l.length&&(l.charCodeAt(e)===32||l.charCodeAt(e)===9);)e++;return e}class oTt{constructor(){this.dynamicProgrammingDiffing=new Lhi,this.myersDiffingAlgorithm=new sTt}computeDiff(e,i,n){if(e.length<=1&&Lf(e,i,(Ce,Fe)=>Ce===Fe))return new c1e([],[],!1);if(e.length===1&&e[0].length===0||i.length===1&&i[0].length===0)return new c1e([new xw(new Za(1,e.length+1),new Za(1,i.length+1),[new fw(new nt(1,1,e.length,e[e.length-1].length+1),new nt(1,1,i.length,i[i.length-1].length+1))])],[],!1);const s=n.maxComputationTimeMs===0?qne.instance:new Nhi(n.maxComputationTimeMs),c=!n.ignoreTrimWhitespace,d=new Map;function f(Ce){let Fe=d.get(Ce);return Fe===void 0&&(Fe=d.size,d.set(Ce,Fe)),Fe}const m=e.map(Ce=>f(Ce.trim())),v=i.map(Ce=>f(Ce.trim())),x=new Yvt(m,e),w=new Yvt(v,i),I=x.length+w.length<1700?this.dynamicProgrammingDiffing.compute(x,w,s,(Ce,Fe)=>e[Ce]===i[Fe]?i[Fe].length===0?.1:1+Math.log(1+i[Fe].length):.99):this.myersDiffingAlgorithm.compute(x,w,s);let P=I.diffs,O=I.hitTimeout;P=zWe(x,w,P),P=qhi(x,w,P);const z=[],J=Ce=>{if(c)for(let Fe=0;Fe<Ce;Fe++){const rt=Y+Fe,ct=ae+Fe;if(e[rt]!==i[ct]){const Mt=this.refineDiff(e,i,new Lm(new xc(rt,rt+1),new xc(ct,ct+1)),s,c);for(const Yt of Mt.mappings)z.push(Yt);Mt.hitTimeout&&(O=!0)}}};let Y=0,ae=0;for(const Ce of P){DB(()=>Ce.seq1Range.start-Y===Ce.seq2Range.start-ae);const Fe=Ce.seq1Range.start-Y;J(Fe),Y=Ce.seq1Range.endExclusive,ae=Ce.seq2Range.endExclusive;const rt=this.refineDiff(e,i,Ce,s,c);rt.hitTimeout&&(O=!0);for(const ct of rt.mappings)z.push(ct)}J(e.length-Y);const me=tbt(z,e,i);let ye=[];return n.computeMoves&&(ye=this.computeMoves(me,e,i,m,v,s,c)),DB(()=>{function Ce(rt,ct){if(rt.lineNumber<1||rt.lineNumber>ct.length)return!1;const Mt=ct[rt.lineNumber-1];return!(rt.column<1||rt.column>Mt.length+1)}function Fe(rt,ct){return!(rt.startLineNumber<1||rt.startLineNumber>ct.length+1||rt.endLineNumberExclusive<1||rt.endLineNumberExclusive>ct.length+1)}for(const rt of me){if(!rt.innerChanges)return!1;for(const ct of rt.innerChanges)if(!(Ce(ct.modifiedRange.getStartPosition(),i)&&Ce(ct.modifiedRange.getEndPosition(),i)&&Ce(ct.originalRange.getStartPosition(),e)&&Ce(ct.originalRange.getEndPosition(),e)))return!1;if(!Fe(rt.modified,i)||!Fe(rt.original,e))return!1}return!0}),new c1e(me,ye,O)}computeMoves(e,i,n,s,c,d,f){return Mhi(e,i,n,s,c,d).map(x=>{const w=this.refineDiff(i,n,new Lm(x.original.toOffsetRange(),x.modified.toOffsetRange()),d,f),I=tbt(w.mappings,i,n,!0);return new iTt(x,I)})}refineDiff(e,i,n,s,c){const f=Ghi(n).toRangeMapping2(e,i),m=new vye(e,f.originalRange,c),v=new vye(i,f.modifiedRange,c),x=m.length+v.length<500?this.dynamicProgrammingDiffing.compute(m,v,s):this.myersDiffingAlgorithm.compute(m,v,s);let w=x.diffs;return w=zWe(m,v,w),w=zhi(m,v,w),w=jhi(m,v,w),w=$hi(m,v,w),{mappings:w.map(P=>new fw(m.translateRange(P.seq1Range),v.translateRange(P.seq2Range))),hitTimeout:x.hitTimeout}}}function tbt(l,e,i,n=!1){const s=[];for(const c of Bqe(l.map(d=>Jhi(d,e,i)),(d,f)=>d.original.overlapOrTouch(f.original)||d.modified.overlapOrTouch(f.modified))){const d=c[0],f=c[c.length-1];s.push(new xw(d.original.join(f.original),d.modified.join(f.modified),c.map(m=>m.innerChanges[0])))}return DB(()=>!n&&s.length>0&&(s[0].modified.startLineNumber!==s[0].original.startLineNumber||i.length-s[s.length-1].modified.endLineNumberExclusive!==e.length-s[s.length-1].original.endLineNumberExclusive)?!1:p$e(s,(c,d)=>d.original.startLineNumber-c.original.endLineNumberExclusive===d.modified.startLineNumber-c.modified.endLineNumberExclusive&&c.original.endLineNumberExclusive<d.original.startLineNumber&&c.modified.endLineNumberExclusive<d.modified.startLineNumber)),s}function Jhi(l,e,i){let n=0,s=0;l.modifiedRange.endColumn===1&&l.originalRange.endColumn===1&&l.originalRange.startLineNumber+n<=l.originalRange.endLineNumber&&l.modifiedRange.startLineNumber+n<=l.modifiedRange.endLineNumber&&(s=-1),l.modifiedRange.startColumn-1>=i[l.modifiedRange.startLineNumber-1].length&&l.originalRange.startColumn-1>=e[l.originalRange.startLineNumber-1].length&&l.originalRange.startLineNumber<=l.originalRange.endLineNumber+s&&l.modifiedRange.startLineNumber<=l.modifiedRange.endLineNumber+s&&(n=1);const c=new Za(l.originalRange.startLineNumber+n,l.originalRange.endLineNumber+1+s),d=new Za(l.modifiedRange.startLineNumber+n,l.modifiedRange.endLineNumber+1+s);return new xw(c,d,[l])}function Ghi(l){return new wy(new Za(l.seq1Range.start+1,l.seq1Range.endExclusive+1),new Za(l.seq2Range.start+1,l.seq2Range.endExclusive+1))}const ibt={getLegacy:()=>new Thi,getDefault:()=>new oTt};function $M(l,e){const i=Math.pow(10,e);return Math.round(l*i)/i}class El{constructor(e,i,n,s=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,i))|0,this.b=Math.min(255,Math.max(0,n))|0,this.a=$M(Math.max(Math.min(1,s),0),3)}static equals(e,i){return e.r===i.r&&e.g===i.g&&e.b===i.b&&e.a===i.a}}class lT{constructor(e,i,n,s){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=$M(Math.max(Math.min(1,i),0),3),this.l=$M(Math.max(Math.min(1,n),0),3),this.a=$M(Math.max(Math.min(1,s),0),3)}static equals(e,i){return e.h===i.h&&e.s===i.s&&e.l===i.l&&e.a===i.a}static fromRGBA(e){const i=e.r/255,n=e.g/255,s=e.b/255,c=e.a,d=Math.max(i,n,s),f=Math.min(i,n,s);let m=0,v=0;const x=(f+d)/2,w=d-f;if(w>0){switch(v=Math.min(x<=.5?w/(2*x):w/(2-2*x),1),d){case i:m=(n-s)/w+(n<s?6:0);break;case n:m=(s-i)/w+2;break;case s:m=(i-n)/w+4;break}m*=60,m=Math.round(m)}return new lT(m,v,x,c)}static _hue2rgb(e,i,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(i-e)*6*n:n<1/2?i:n<2/3?e+(i-e)*(2/3-n)*6:e}static toRGBA(e){const i=e.h/360,{s:n,l:s,a:c}=e;let d,f,m;if(n===0)d=f=m=s;else{const v=s<.5?s*(1+n):s+n-s*n,x=2*s-v;d=lT._hue2rgb(x,v,i+1/3),f=lT._hue2rgb(x,v,i),m=lT._hue2rgb(x,v,i-1/3)}return new El(Math.round(d*255),Math.round(f*255),Math.round(m*255),c)}}class SL{constructor(e,i,n,s){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=$M(Math.max(Math.min(1,i),0),3),this.v=$M(Math.max(Math.min(1,n),0),3),this.a=$M(Math.max(Math.min(1,s),0),3)}static equals(e,i){return e.h===i.h&&e.s===i.s&&e.v===i.v&&e.a===i.a}static fromRGBA(e){const i=e.r/255,n=e.g/255,s=e.b/255,c=Math.max(i,n,s),d=Math.min(i,n,s),f=c-d,m=c===0?0:f/c;let v;return f===0?v=0:c===i?v=((n-s)/f%6+6)%6:c===n?v=(s-i)/f+2:v=(i-n)/f+4,new SL(Math.round(v*60),m,c,e.a)}static toRGBA(e){const{h:i,s:n,v:s,a:c}=e,d=s*n,f=d*(1-Math.abs(i/60%2-1)),m=s-d;let[v,x,w]=[0,0,0];return i<60?(v=d,x=f):i<120?(v=f,x=d):i<180?(x=d,w=f):i<240?(x=f,w=d):i<300?(v=f,w=d):i<=360&&(v=d,w=f),v=Math.round((v+m)*255),x=Math.round((x+m)*255),w=Math.round((w+m)*255),new El(v,x,w,c)}}const Zh=class Zh{static fromHex(e){return Zh.Format.CSS.parseHex(e)||Zh.red}static equals(e,i){return!e&&!i?!0:!e||!i?!1:e.equals(i)}get hsla(){return this._hsla?this._hsla:lT.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:SL.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof El)this.rgba=e;else if(e instanceof lT)this._hsla=e,this.rgba=lT.toRGBA(e);else if(e instanceof SL)this._hsva=e,this.rgba=SL.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&El.equals(this.rgba,e.rgba)&&lT.equals(this.hsla,e.hsla)&&SL.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=Zh._relativeLuminanceForComponent(this.rgba.r),i=Zh._relativeLuminanceForComponent(this.rgba.g),n=Zh._relativeLuminanceForComponent(this.rgba.b),s=.2126*e+.7152*i+.0722*n;return $M(s,4)}static _relativeLuminanceForComponent(e){const i=e/255;return i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){const i=this.getRelativeLuminance(),n=e.getRelativeLuminance();return i>n}isDarkerThan(e){const i=this.getRelativeLuminance(),n=e.getRelativeLuminance();return i<n}lighten(e){return new Zh(new lT(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*e,this.hsla.a))}darken(e){return new Zh(new lT(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*e,this.hsla.a))}transparent(e){const{r:i,g:n,b:s,a:c}=this.rgba;return new Zh(new El(i,n,s,c*e))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new Zh(new El(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}makeOpaque(e){if(this.isOpaque()||e.rgba.a!==1)return this;const{r:i,g:n,b:s,a:c}=this.rgba;return new Zh(new El(e.rgba.r-c*(e.rgba.r-i),e.rgba.g-c*(e.rgba.g-n),e.rgba.b-c*(e.rgba.b-s),1))}toString(){return this._toString||(this._toString=Zh.Format.CSS.format(this)),this._toString}static getLighterColor(e,i,n){if(e.isLighterThan(i))return e;n=n||.5;const s=e.getRelativeLuminance(),c=i.getRelativeLuminance();return n=n*(c-s)/c,e.lighten(n)}static getDarkerColor(e,i,n){if(e.isDarkerThan(i))return e;n=n||.5;const s=e.getRelativeLuminance(),c=i.getRelativeLuminance();return n=n*(s-c)/s,e.darken(n)}};Zh.white=new Zh(new El(255,255,255,1)),Zh.black=new Zh(new El(0,0,0,1)),Zh.red=new Zh(new El(255,0,0,1)),Zh.blue=new Zh(new El(0,0,255,1)),Zh.green=new Zh(new El(0,255,0,1)),Zh.cyan=new Zh(new El(0,255,255,1)),Zh.lightgrey=new Zh(new El(211,211,211,1)),Zh.transparent=new Zh(new El(0,0,0,0));let In=Zh;(function(l){(function(e){(function(i){function n(P){return P.rgba.a===1?`rgb(${P.rgba.r}, ${P.rgba.g}, ${P.rgba.b})`:l.Format.CSS.formatRGBA(P)}i.formatRGB=n;function s(P){return`rgba(${P.rgba.r}, ${P.rgba.g}, ${P.rgba.b}, ${+P.rgba.a.toFixed(2)})`}i.formatRGBA=s;function c(P){return P.hsla.a===1?`hsl(${P.hsla.h}, ${(P.hsla.s*100).toFixed(2)}%, ${(P.hsla.l*100).toFixed(2)}%)`:l.Format.CSS.formatHSLA(P)}i.formatHSL=c;function d(P){return`hsla(${P.hsla.h}, ${(P.hsla.s*100).toFixed(2)}%, ${(P.hsla.l*100).toFixed(2)}%, ${P.hsla.a.toFixed(2)})`}i.formatHSLA=d;function f(P){const O=P.toString(16);return O.length!==2?"0"+O:O}function m(P){return`#${f(P.rgba.r)}${f(P.rgba.g)}${f(P.rgba.b)}`}i.formatHex=m;function v(P,O=!1){return O&&P.rgba.a===1?l.Format.CSS.formatHex(P):`#${f(P.rgba.r)}${f(P.rgba.g)}${f(P.rgba.b)}${f(Math.round(P.rgba.a*255))}`}i.formatHexA=v;function x(P){return P.isOpaque()?l.Format.CSS.formatHex(P):l.Format.CSS.formatRGBA(P)}i.format=x;function w(P){const O=P.length;if(O===0||P.charCodeAt(0)!==35)return null;if(O===7){const z=16*I(P.charCodeAt(1))+I(P.charCodeAt(2)),J=16*I(P.charCodeAt(3))+I(P.charCodeAt(4)),Y=16*I(P.charCodeAt(5))+I(P.charCodeAt(6));return new l(new El(z,J,Y,1))}if(O===9){const z=16*I(P.charCodeAt(1))+I(P.charCodeAt(2)),J=16*I(P.charCodeAt(3))+I(P.charCodeAt(4)),Y=16*I(P.charCodeAt(5))+I(P.charCodeAt(6)),ae=16*I(P.charCodeAt(7))+I(P.charCodeAt(8));return new l(new El(z,J,Y,ae/255))}if(O===4){const z=I(P.charCodeAt(1)),J=I(P.charCodeAt(2)),Y=I(P.charCodeAt(3));return new l(new El(16*z+z,16*J+J,16*Y+Y))}if(O===5){const z=I(P.charCodeAt(1)),J=I(P.charCodeAt(2)),Y=I(P.charCodeAt(3)),ae=I(P.charCodeAt(4));return new l(new El(16*z+z,16*J+J,16*Y+Y,(16*ae+ae)/255))}return null}i.parseHex=w;function I(P){switch(P){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(e.CSS||(e.CSS={}))})(l.Format||(l.Format={}))})(In||(In={}));function aTt(l){const e=[];for(const i of l){const n=Number(i);(n||n===0&&i.replace(/\s/g,"")!=="")&&e.push(n)}return e}function x$e(l,e,i,n){return{red:l/255,blue:i/255,green:e/255,alpha:n}}function Ate(l,e){const i=e.index,n=e[0].length;if(!i)return;const s=l.positionAt(i);return{startLineNumber:s.lineNumber,startColumn:s.column,endLineNumber:s.lineNumber,endColumn:s.column+n}}function Khi(l,e){if(!l)return;const i=In.Format.CSS.parseHex(e);if(i)return{range:l,color:x$e(i.rgba.r,i.rgba.g,i.rgba.b,i.rgba.a)}}function nbt(l,e,i){if(!l||e.length!==1)return;const s=e[0].values(),c=aTt(s);return{range:l,color:x$e(c[0],c[1],c[2],i?c[3]:1)}}function rbt(l,e,i){if(!l||e.length!==1)return;const s=e[0].values(),c=aTt(s),d=new In(new lT(c[0],c[1]/100,c[2]/100,i?c[3]:1));return{range:l,color:x$e(d.rgba.r,d.rgba.g,d.rgba.b,d.rgba.a)}}function Ote(l,e){return typeof l=="string"?[...l.matchAll(e)]:l.findMatches(e)}function Xhi(l){const e=[],n=Ote(l,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm);if(n.length>0)for(const s of n){const c=s.filter(v=>v!==void 0),d=c[1],f=c[2];if(!f)continue;let m;if(d==="rgb"){const v=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;m=nbt(Ate(l,s),Ote(f,v),!1)}else if(d==="rgba"){const v=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;m=nbt(Ate(l,s),Ote(f,v),!0)}else if(d==="hsl"){const v=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;m=rbt(Ate(l,s),Ote(f,v),!1)}else if(d==="hsla"){const v=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;m=rbt(Ate(l,s),Ote(f,v),!0)}else d==="#"&&(m=Khi(Ate(l,s),d+f));m&&e.push(m)}return e}function Qhi(l){return!l||typeof l.getValue!="function"||typeof l.positionAt!="function"?[]:Xhi(l)}const sbt=new RegExp("\\bMARK:\\s*(.*)$","d"),Zhi=/^-+|-+$/g;function Yhi(l,e){var n;let i=[];if(e.findRegionSectionHeaders&&((n=e.foldingRules)!=null&&n.markers)){const s=e_i(l,e);i=i.concat(s)}if(e.findMarkSectionHeaders){const s=t_i(l);i=i.concat(s)}return i}function e_i(l,e){const i=[],n=l.getLineCount();for(let s=1;s<=n;s++){const c=l.getLineContent(s),d=c.match(e.foldingRules.markers.start);if(d){const f={startLineNumber:s,startColumn:d[0].length+1,endLineNumber:s,endColumn:c.length+1};if(f.endColumn>f.startColumn){const m={range:f,...cTt(c.substring(d[0].length)),shouldBeInComments:!1};(m.text||m.hasSeparatorLine)&&i.push(m)}}}return i}function t_i(l){const e=[],i=l.getLineCount();for(let n=1;n<=i;n++){const s=l.getLineContent(n);i_i(s,n,e)}return e}function i_i(l,e,i){sbt.lastIndex=0;const n=sbt.exec(l);if(n){const s=n.indices[1][0]+1,c=n.indices[1][1]+1,d={startLineNumber:e,startColumn:s,endLineNumber:e,endColumn:c};if(d.endColumn>d.startColumn){const f={range:d,...cTt(n[1]),shouldBeInComments:!0};(f.text||f.hasSeparatorLine)&&i.push(f)}}}function cTt(l){l=l.trim();const e=l.startsWith("-");return l=l.replace(Zhi,""),{text:l,hasSeparatorLine:e}}class n_i{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,i){e=kU(e);const n=this.values,s=this.prefixSum,c=i.length;return c===0?!1:(this.values=new Uint32Array(n.length+c),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+c),this.values.set(i,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,i){return e=kU(e),i=kU(i),this.values[e]===i?!1:(this.values[e]=i,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,i){e=kU(e),i=kU(i);const n=this.values,s=this.prefixSum;if(e>=n.length)return!1;const c=n.length-e;return i>=c&&(i=c),i===0?!1:(this.values=new Uint32Array(n.length-i),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+i),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=kU(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let i=this.prefixSumValidIndex[0]+1;i===0&&(this.prefixSum[0]=this.values[0],i++),e>=this.values.length&&(e=this.values.length-1);for(let n=i;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let i=0,n=this.values.length-1,s=0,c=0,d=0;for(;i<=n;)if(s=i+(n-i)/2|0,c=this.prefixSum[s],d=c-this.values[s],e<d)n=s-1;else if(e>=c)i=s+1;else break;return new lTt(s,e-d)}}class r_i{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),e===0?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const i=this._indexBySum[e],n=i>0?this._prefixSum[i-1]:0;return new lTt(i,e-n)}removeValues(e,i){this._values.splice(e,i),this._invalidate(e)}insertValues(e,i){this._values=kSe(this._values,e,i),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,i=this._values.length;e<i;e++){const n=this._values[e],s=e>0?this._prefixSum[e-1]:0;this._prefixSum[e]=s+n;for(let c=0;c<n;c++)this._indexBySum[s+c]=e}this._prefixSum.length=this._values.length,this._indexBySum.length=this._prefixSum[this._prefixSum.length-1],this._isValid=!0,this._validEndIndex=this._values.length-1}}setValue(e,i){this._values[e]!==i&&(this._values[e]=i,this._invalidate(e))}}class lTt{constructor(e,i){this.index=e,this.remainder=i,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=i}}class s_i{constructor(e,i,n,s){this._uri=e,this._lines=i,this._eol=n,this._versionId=s,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const i=e.changes;for(const n of i)this._acceptDeleteRange(n.range),this._acceptInsertText(new pi(n.range.startLineNumber,n.range.startColumn),n.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,i=this._lines.length,n=new Uint32Array(i);for(let s=0;s<i;s++)n[s]=this._lines[s].length+e;this._lineStarts=new n_i(n)}}_setLineText(e,i){this._lines[e]=i,this._lineStarts&&this._lineStarts.setValue(e,this._lines[e].length+this._eol.length)}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1));return}this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,i){if(i.length===0)return;const n=BL(i);if(n.length===1){this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]+this._lines[e.lineNumber-1].substring(e.column-1));return}n[n.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]);const s=new Uint32Array(n.length-1);for(let c=1;c<n.length;c++)this._lines.splice(e.lineNumber+c-1,0,n[c]),s[c-1]=n[c].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,s)}}const obt=60*1e3;class o_i extends xi{constructor(e,i,n=!1){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=i,!n){const s=new a$e;s.cancelAndSet(()=>this._checkStopModelSync(),Math.round(obt/2)),this._register(s)}}dispose(){for(const e in this._syncedModels)vd(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,i=!1){for(const n of e){const s=n.toString();this._syncedModels[s]||this._beginModelSync(n,i),this._syncedModels[s]&&(this._syncedModelsLastUsedTime[s]=new Date().getTime())}}_checkStopModelSync(){const e=new Date().getTime(),i=[];for(const n in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[n]>obt&&i.push(n);for(const n of i)this._stopModelSync(n)}_beginModelSync(e,i){const n=this._modelService.getModel(e);if(!n||!i&&n.isTooLargeForSyncing())return;const s=e.toString();this._proxy.$acceptNewModel({url:n.uri.toString(),lines:n.getLinesContent(),EOL:n.getEOL(),versionId:n.getVersionId()});const c=new wn;c.add(n.onDidChangeContent(d=>{this._proxy.$acceptModelChanged(s.toString(),d)})),c.add(n.onWillDispose(()=>{this._stopModelSync(s)})),c.add(fo(()=>{this._proxy.$acceptRemovedModel(s)})),this._syncedModels[s]=c}_stopModelSync(e){const i=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],vd(i)}}class a_i{constructor(){this._models=Object.create(null)}getModel(e){return this._models[e]}getModels(){const e=[];return Object.keys(this._models).forEach(i=>e.push(this._models[i])),e}$acceptNewModel(e){this._models[e.url]=new c_i(yo.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,i){if(!this._models[e])return;this._models[e].onEvents(i)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}}class c_i extends s_i{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const i=[];for(let n=0;n<this._lines.length;n++){const s=this._lines[n],c=this.offsetAt(new pi(n+1,1)),d=s.matchAll(e);for(const f of d)(f.index||f.index===0)&&(f.index=f.index+c),i.push(f)}return i}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(e){return this._lines[e-1]}getWordAtPosition(e,i){const n=Nne(e.column,qqe(i),this._lines[e.lineNumber-1],0);return n?new nt(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn):null}words(e){const i=this._lines,n=this._wordenize.bind(this);let s=0,c="",d=0,f=[];return{*[Symbol.iterator](){for(;;)if(d<f.length){const m=c.substring(f[d].start,f[d].end);d+=1,yield m}else if(s<i.length)c=i[s],f=n(c,e),d=0,s+=1;else break}}}getLineWords(e,i){const n=this._lines[e-1],s=this._wordenize(n,i),c=[];for(const d of s)c.push({word:n.substring(d.start,d.end),startColumn:d.start+1,endColumn:d.end+1});return c}_wordenize(e,i){const n=[];let s;for(i.lastIndex=0;(s=i.exec(e))&&s[0].length!==0;)n.push({start:s.index,end:s.index+s[0].length});return n}getValueInRange(e){if(e=this._validateRange(e),e.startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);const i=this._eol,n=e.startLineNumber-1,s=e.endLineNumber-1,c=[];c.push(this._lines[n].substring(e.startColumn-1));for(let d=n+1;d<s;d++)c.push(this._lines[d]);return c.push(this._lines[s].substring(0,e.endColumn-1)),c.join(i)}offsetAt(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getPrefixSum(e.lineNumber-2)+(e.column-1)}positionAt(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();const i=this._lineStarts.getIndexOf(e),n=this._lines[i.index].length;return{lineNumber:1+i.index,column:1+Math.min(i.remainder,n)}}_validateRange(e){const i=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),n=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return i.lineNumber!==e.startLineNumber||i.column!==e.startColumn||n.lineNumber!==e.endLineNumber||n.column!==e.endColumn?{startLineNumber:i.lineNumber,startColumn:i.column,endLineNumber:n.lineNumber,endColumn:n.column}:e}_validatePosition(e){if(!pi.isIPosition(e))throw new Error("bad position");let{lineNumber:i,column:n}=e,s=!1;if(i<1)i=1,n=1,s=!0;else if(i>this._lines.length)i=this._lines.length,n=this._lines[i-1].length+1,s=!0;else{const c=this._lines[i-1].length+1;n<1?(n=1,s=!0):n>c&&(n=c,s=!0)}return s?{lineNumber:i,column:n}:e}}const iCe=class iCe{constructor(){this._workerTextModelSyncServer=new a_i}dispose(){}_getModel(e){return this._workerTextModelSyncServer.getModel(e)}_getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(e){this._workerTextModelSyncServer.$acceptNewModel(e)}$acceptModelChanged(e,i){this._workerTextModelSyncServer.$acceptModelChanged(e,i)}$acceptRemovedModel(e){this._workerTextModelSyncServer.$acceptRemovedModel(e)}async $computeUnicodeHighlights(e,i,n){const s=this._getModel(e);return s?b$e.computeUnicodeHighlights(s,i,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(e,i){const n=this._getModel(e);return n?Yhi(n,i):[]}async $computeDiff(e,i,n,s){const c=this._getModel(e),d=this._getModel(i);return!c||!d?null:l1e.computeDiff(c,d,n,s)}static computeDiff(e,i,n,s){const c=s==="advanced"?ibt.getDefault():ibt.getLegacy(),d=e.getLinesContent(),f=i.getLinesContent(),m=c.computeDiff(d,f,n),v=m.changes.length>0?!1:this._modelsAreIdentical(e,i);function x(w){return w.map(I=>{var P;return[I.original.startLineNumber,I.original.endLineNumberExclusive,I.modified.startLineNumber,I.modified.endLineNumberExclusive,(P=I.innerChanges)==null?void 0:P.map(O=>[O.originalRange.startLineNumber,O.originalRange.startColumn,O.originalRange.endLineNumber,O.originalRange.endColumn,O.modifiedRange.startLineNumber,O.modifiedRange.startColumn,O.modifiedRange.endLineNumber,O.modifiedRange.endColumn])]})}return{identical:v,quitEarly:m.hitTimeout,changes:x(m.changes),moves:m.moves.map(w=>[w.lineRangeMapping.original.startLineNumber,w.lineRangeMapping.original.endLineNumberExclusive,w.lineRangeMapping.modified.startLineNumber,w.lineRangeMapping.modified.endLineNumberExclusive,x(w.changes)])}}static _modelsAreIdentical(e,i){const n=e.getLineCount(),s=i.getLineCount();if(n!==s)return!1;for(let c=1;c<=n;c++){const d=e.getLineContent(c),f=i.getLineContent(c);if(d!==f)return!1}return!0}async $computeMoreMinimalEdits(e,i,n){const s=this._getModel(e);if(!s)return i;const c=[];let d;i=i.slice(0).sort((m,v)=>{if(m.range&&v.range)return nt.compareRangesUsingStarts(m.range,v.range);const x=m.range?0:1,w=v.range?0:1;return x-w});let f=0;for(let m=1;m<i.length;m++)nt.getEndPosition(i[f].range).equals(nt.getStartPosition(i[m].range))?(i[f].range=nt.fromPositions(nt.getStartPosition(i[f].range),nt.getEndPosition(i[m].range)),i[f].text+=i[m].text):(f++,i[f]=i[m]);i.length=f+1;for(let{range:m,text:v,eol:x}of i){if(typeof x=="number"&&(d=x),nt.isEmpty(m)&&!v)continue;const w=s.getValueInRange(m);if(v=v.replace(/\r\n|\n|\r/g,s.eol),w===v)continue;if(Math.max(v.length,w.length)>l1e._diffLimit){c.push({range:m,text:v});continue}const I=Qfi(w,v,n),P=s.offsetAt(nt.lift(m).getStartPosition());for(const O of I){const z=s.positionAt(P+O.originalStart),J=s.positionAt(P+O.originalStart+O.originalLength),Y={text:v.substr(O.modifiedStart,O.modifiedLength),range:{startLineNumber:z.lineNumber,startColumn:z.column,endLineNumber:J.lineNumber,endColumn:J.column}};s.getValueInRange(Y.range)!==Y.text&&c.push(Y)}}return typeof d=="number"&&c.push({eol:d,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),c}async $computeLinks(e){const i=this._getModel(e);return i?ihi(i):null}async $computeDefaultDocumentColors(e){const i=this._getModel(e);return i?Qhi(i):null}async $textualSuggest(e,i,n,s){const c=new bg,d=new RegExp(n,s),f=new Set;e:for(const m of e){const v=this._getModel(m);if(v){for(const x of v.words(d))if(!(x===i||!isNaN(Number(x)))&&(f.add(x),f.size>l1e._suggestionsLimit))break e}}return{words:Array.from(f),duration:c.elapsed()}}async $computeWordRanges(e,i,n,s){const c=this._getModel(e);if(!c)return Object.create(null);const d=new RegExp(n,s),f=Object.create(null);for(let m=i.startLineNumber;m<i.endLineNumber;m++){const v=c.getLineWords(m,d);for(const x of v){if(!isNaN(Number(x.word)))continue;let w=f[x.word];w||(w=[],f[x.word]=w),w.push({startLineNumber:m,startColumn:x.startColumn,endLineNumber:m,endColumn:x.endColumn})}}return f}async $navigateValueSet(e,i,n,s,c){const d=this._getModel(e);if(!d)return null;const f=new RegExp(s,c);i.startColumn===i.endColumn&&(i={startLineNumber:i.startLineNumber,startColumn:i.startColumn,endLineNumber:i.endLineNumber,endColumn:i.endColumn+1});const m=d.getValueInRange(i),v=d.getWordAtPosition({lineNumber:i.startLineNumber,column:i.startColumn},f);if(!v)return null;const x=d.getValueInRange(v);return BWe.INSTANCE.navigateValueSet(i,m,v,x,n)}};iCe._diffLimit=1e5,iCe._suggestionsLimit=1e4;let UWe=iCe;class l1e extends UWe{constructor(e,i){super(),this._host=e,this._foreignModuleFactory=i,this._foreignModule=null}async $ping(){return"pong"}$loadForeignModule(e,i,n){const d={host:qai(n,(f,m)=>this._host.$fhr(f,m)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(d,i),Promise.resolve(lBe(this._foreignModule))):new Promise((f,m)=>{const v=x=>{this._foreignModule=x.create(d,i),f(lBe(this._foreignModule))};{const x=LSe.asBrowserUri(`${e}.js`).toString(!0);_o(()=>import(`${x}`),[]).then(v).catch(m)}})}$fmr(e,i){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,i))}catch(n){return Promise.reject(n)}}}typeof importScripts=="function"&&(globalThis.monaco=Xkt());const XSe=jc("textResourceConfigurationService"),uTt=jc("textResourcePropertiesService"),Ts=jc("ILanguageFeaturesService");var k$e=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},BF=function(l,e){return function(i,n){e(i,n,l)}};const abt=5*60*1e3;function WF(l,e){const i=l.getModel(e);return!(!i||i.isTooLargeForSyncing())}let qWe=class extends xi{constructor(e,i,n,s,c,d){super(),this._languageConfigurationService=c,this._modelService=i,this._workerManager=this._register(new $We(e,this._modelService)),this._logService=s,this._register(d.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:async(f,m)=>{if(!WF(this._modelService,f.uri))return Promise.resolve({links:[]});const x=await(await this._workerWithResources([f.uri])).$computeLinks(f.uri.toString());return x&&{links:x}}})),this._register(d.completionProvider.register("*",new l_i(this._workerManager,n,this._modelService,this._languageConfigurationService)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return WF(this._modelService,e)}async computedUnicodeHighlights(e,i,n){return(await this._workerWithResources([e])).$computeUnicodeHighlights(e.toString(),i,n)}async computeDiff(e,i,n,s){const d=await(await this._workerWithResources([e,i],!0)).$computeDiff(e.toString(),i.toString(),n,s);if(!d)return null;return{identical:d.identical,quitEarly:d.quitEarly,changes:m(d.changes),moves:d.moves.map(v=>new iTt(new wy(new Za(v[0],v[1]),new Za(v[2],v[3])),m(v[4])))};function m(v){return v.map(x=>{var w;return new xw(new Za(x[0],x[1]),new Za(x[2],x[3]),(w=x[4])==null?void 0:w.map(I=>new fw(new nt(I[0],I[1],I[2],I[3]),new nt(I[4],I[5],I[6],I[7]))))})}}async computeMoreMinimalEdits(e,i,n=!1){if(ky(i)){if(!WF(this._modelService,e))return Promise.resolve(i);const s=bg.create(),c=this._workerWithResources([e]).then(d=>d.$computeMoreMinimalEdits(e.toString(),i,n));return c.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),s.elapsed())),Promise.race([c,c6(1e3).then(()=>i)])}else return Promise.resolve(void 0)}canNavigateValueSet(e){return WF(this._modelService,e)}async navigateValueSet(e,i,n){const s=this._modelService.getModel(e);if(!s)return null;const c=this._languageConfigurationService.getLanguageConfiguration(s.getLanguageId()).getWordDefinition(),d=c.source,f=c.flags;return(await this._workerWithResources([e])).$navigateValueSet(e.toString(),i,n,d,f)}canComputeWordRanges(e){return WF(this._modelService,e)}async computeWordRanges(e,i){const n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);const s=this._languageConfigurationService.getLanguageConfiguration(n.getLanguageId()).getWordDefinition(),c=s.source,d=s.flags;return(await this._workerWithResources([e])).$computeWordRanges(e.toString(),i,c,d)}async findSectionHeaders(e,i){return(await this._workerWithResources([e])).$findSectionHeaders(e.toString(),i)}async computeDefaultDocumentColors(e){return(await this._workerWithResources([e])).$computeDefaultDocumentColors(e.toString())}async _workerWithResources(e,i=!1){return await(await this._workerManager.withWorker()).workerWithSyncedResources(e,i)}};qWe=k$e([BF(1,rf),BF(2,XSe),BF(3,N0),BF(4,rh),BF(5,Ts)],qWe);class l_i{constructor(e,i,n,s){this.languageConfigurationService=s,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=i,this._modelService=n}async provideCompletionItems(e,i){const n=this._configurationService.getValue(e.uri,i,"editor");if(n.wordBasedSuggestions==="off")return;const s=[];if(n.wordBasedSuggestions==="currentDocument")WF(this._modelService,e.uri)&&s.push(e.uri);else for(const w of this._modelService.getModels())WF(this._modelService,w.uri)&&(w===e?s.unshift(w.uri):(n.wordBasedSuggestions==="allDocuments"||w.getLanguageId()===e.getLanguageId())&&s.push(w.uri));if(s.length===0)return;const c=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),d=e.getWordAtPosition(i),f=d?new nt(i.lineNumber,d.startColumn,i.lineNumber,d.endColumn):nt.fromPositions(i),m=f.setEndPosition(i.lineNumber,i.column),x=await(await this._workerManager.withWorker()).textualSuggest(s,d==null?void 0:d.word,c);if(x)return{duration:x.duration,suggestions:x.words.map(w=>({kind:18,label:w,insertText:w,range:{insert:m,replace:f}}))}}}let $We=class extends xi{constructor(e,i){super(),this._workerDescriptor=e,this._modelService=i,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new l$e).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(abt/2),cd),this._register(this._modelService.onModelRemoved(s=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;new Date().getTime()-this._lastWorkerUsedTime>abt&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new bye(this._workerDescriptor,!1,this._modelService)),Promise.resolve(this._editorWorkerClient)}};$We=k$e([BF(1,rf)],$We);class u_i{constructor(e){this._instance=e,this.proxy=this._instance}dispose(){this._instance.dispose()}setChannel(e,i){throw new Error("Not supported")}}let bye=class extends xi{constructor(e,i,n){super(),this._workerDescriptor=e,this._disposed=!1,this._modelService=n,this._keepIdleModels=i,this._worker=null,this._modelManager=null}fhr(e,i){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(_fi(this._workerDescriptor)),WWe.setChannel(this._worker,this._createEditorWorkerHost())}catch(e){PWe(e),this._worker=this._createFallbackLocalWorker()}return this._worker}async _getProxy(){try{const e=this._getOrCreateWorker().proxy;return await e.$ping(),e}catch(e){return PWe(e),this._worker=this._createFallbackLocalWorker(),this._worker.proxy}}_createFallbackLocalWorker(){return new u_i(new l1e(this._createEditorWorkerHost(),null))}_createEditorWorkerHost(){return{$fhr:(e,i)=>this.fhr(e,i)}}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new o_i(e,this._modelService,this._keepIdleModels))),this._modelManager}async workerWithSyncedResources(e,i=!1){if(this._disposed)return Promise.reject(Zci());const n=await this._getProxy();return this._getOrCreateModelManager(n).ensureSyncedResources(e,i),n}async textualSuggest(e,i,n){const s=await this.workerWithSyncedResources(e),c=n.source,d=n.flags;return s.$textualSuggest(e.map(f=>f.toString()),i,c,d)}dispose(){super.dispose(),this._disposed=!0}};bye=k$e([BF(2,rf)],bye);var pk;(function(l){l.DARK="dark",l.LIGHT="light",l.HIGH_CONTRAST_DARK="hcDark",l.HIGH_CONTRAST_LIGHT="hcLight"})(pk||(pk={}));function RE(l){return l===pk.HIGH_CONTRAST_DARK||l===pk.HIGH_CONTRAST_LIGHT}function I$(l){return l===pk.DARK||l===pk.HIGH_CONTRAST_DARK}const im=jc("themeService");function Mh(l){return{id:l}}function JWe(l){switch(l){case pk.DARK:return"vs-dark";case pk.HIGH_CONTRAST_DARK:return"hc-black";case pk.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}const dTt={ThemingContribution:"base.contributions.theming"};class d_i{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new gi}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),fo(()=>{const i=this.themingParticipants.indexOf(e);this.themingParticipants.splice(i,1)})}getThemingParticipants(){return this.themingParticipants}}const fTt=new d_i;nh.add(dTt.ThemingContribution,fTt);function Dk(l){return fTt.onColorThemeChange(l)}class f_i extends xi{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(i=>this.onThemeChange(i)))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}var h_i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},__i=function(l,e){return function(i,n){e(i,n,l)}};let GWe=class extends xi{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new gi),this._onCodeEditorAdd=this._register(new gi),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new gi),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new gi),this._onDiffEditorAdd=this._register(new gi),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new gi),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new _v,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map(e=>this._codeEditors[e])}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map(e=>this._diffEditors[e])}getFocusedCodeEditor(){let e=null;const i=this.listCodeEditors();for(const n of i){if(n.hasTextFocus())return n;n.hasWidgetFocus()&&(e=n)}return e}removeDecorationType(e){const i=this._decorationOptionProviders.get(e);i&&(i.refCount--,i.refCount<=0&&(this._decorationOptionProviders.delete(e),i.dispose(),this.listCodeEditors().forEach(n=>n.removeDecorationsByType(e))))}setModelProperty(e,i,n){const s=e.toString();let c;this._modelProperties.has(s)?c=this._modelProperties.get(s):(c=new Map,this._modelProperties.set(s,c)),c.set(i,n)}getModelProperty(e,i){const n=e.toString();if(this._modelProperties.has(n))return this._modelProperties.get(n).get(i)}async openCodeEditor(e,i,n){for(const s of this._codeEditorOpenHandlers){const c=await s(e,i,n);if(c!==null)return c}return null}registerCodeEditorOpenHandler(e){const i=this._codeEditorOpenHandlers.unshift(e);return fo(i)}};GWe=h_i([__i(0,im)],GWe);var p_i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},cbt=function(l,e){return function(i,n){e(i,n,l)}};let Cye=class extends GWe{constructor(e,i){super(i),this._register(this.onCodeEditorAdd(()=>this._checkContextKey())),this._register(this.onCodeEditorRemove(()=>this._checkContextKey())),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler(async(n,s,c)=>s?this.doOpenEditor(s,n):null))}_checkContextKey(){let e=!1;for(const i of this.listCodeEditors())if(!i.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,i){if(!this.findModel(e,i.resource)){if(i.resource){const c=i.resource.scheme;if(c===Ma.http||c===Ma.https)return N2t(i.resource.toString()),e}return null}const s=i.options?i.options.selection:null;if(s)if(typeof s.endLineNumber=="number"&&typeof s.endColumn=="number")e.setSelection(s),e.revealRangeInCenter(s,1);else{const c={lineNumber:s.startLineNumber,column:s.startColumn};e.setPosition(c),e.revealPositionInCenter(c,1)}return e}findModel(e,i){const n=e.getModel();return n&&n.uri.toString()!==i.toString()?null:n}};Cye=p_i([cbt(0,Ko),cbt(1,im)],Cye);nl(Bl,Cye,0);const FR=jc("layoutService");var hTt=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},_Tt=function(l,e){return function(i,n){e(i,n,l)}};let Sye=class{get mainContainer(){var e;return((e=Wqe(this._codeEditorService.listCodeEditors()))==null?void 0:e.getContainerDomNode())??cd.document.body}get activeContainer(){const e=this._codeEditorService.getFocusedCodeEditor()??this._codeEditorService.getActiveCodeEditor();return(e==null?void 0:e.getContainerDomNode())??this.mainContainer}get mainContainerDimension(){return SR(this.mainContainer)}get activeContainerDimension(){return SR(this.activeContainer)}get containers(){return yT(this._codeEditorService.listCodeEditors().map(e=>e.getContainerDomNode()))}getContainer(){return this.activeContainer}whenContainerStylesLoaded(){}focus(){var e;(e=this._codeEditorService.getFocusedCodeEditor())==null||e.focus()}constructor(e){this._codeEditorService=e,this.onDidLayoutMainContainer=Tr.None,this.onDidLayoutActiveContainer=Tr.None,this.onDidLayoutContainer=Tr.None,this.onDidChangeActiveContainer=Tr.None,this.onDidAddContainer=Tr.None,this.mainContainerOffset={top:0,quickPickTop:0},this.activeContainerOffset={top:0,quickPickTop:0}}};Sye=hTt([_Tt(0,Bl)],Sye);let KWe=class extends Sye{get mainContainer(){return this._container}constructor(e,i){super(i),this._container=e}};KWe=hTt([_Tt(1,Bl)],KWe);nl(FR,Sye,1);var $ne;(function(l){l[l.Ignore=0]="Ignore",l[l.Info=1]="Info",l[l.Warning=2]="Warning",l[l.Error=3]="Error"})($ne||($ne={}));(function(l){const e="error",i="warning",n="warn",s="info",c="ignore";function d(m){return m?eq(e,m)?l.Error:eq(i,m)||eq(n,m)?l.Warning:eq(s,m)?l.Info:l.Ignore:l.Ignore}l.fromValue=d;function f(m){switch(m){case l.Error:return e;case l.Warning:return i;case l.Info:return s;default:return c}}l.toString=f})($ne||($ne={}));const S_=$ne,gse=jc("dialogService");var QSe=S_;const w_=jc("notificationService");class m_i{}const T$e=jc("undoRedoService");class pTt{constructor(e,i){this.resource=e,this.elements=i}}const Eq=class Eq{constructor(){this.id=Eq._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}};Eq._ID=0,Eq.None=new Eq;let XWe=Eq;const Iq=class Iq{constructor(){this.id=Iq._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}};Iq._ID=0,Iq.None=new Iq;let VF=Iq;var g_i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},lbt=function(l,e){return function(i,n){e(i,n,l)}};function Qge(l){return l.scheme===Ma.file?l.fsPath:l.path}let mTt=0;class Zge{constructor(e,i,n,s,c,d,f){this.id=++mTt,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=i,this.strResource=n,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=s,this.groupOrder=c,this.sourceId=d,this.sourceOrder=f,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class ubt{constructor(e,i){this.resourceLabel=e,this.reason=i}}class dbt{constructor(){this.elements=new Map}createMessage(){const e=[],i=[];for(const[,s]of this.elements)(s.reason===0?e:i).push(s.resourceLabel);const n=[];return e.length>0&&n.push(W({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),i.length>0&&n.push(W({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",i.join(", "))),n.join(`
+`)}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,i){this.elements.set(e,i)}delete(e){return this.elements.delete(e)}}class y_i{constructor(e,i,n,s,c,d,f){this.id=++mTt,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=i,this.strResources=n,this.groupId=s,this.groupOrder=c,this.sourceId=d,this.sourceOrder=f,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,i,n){this.removedResources||(this.removedResources=new dbt),this.removedResources.has(i)||this.removedResources.set(i,new ubt(e,n))}setValid(e,i,n){n?this.invalidatedResources&&(this.invalidatedResources.delete(i),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new dbt),this.invalidatedResources.has(i)||this.invalidatedResources.set(i,new ubt(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class gTt{constructor(e,i){this.resourceLabel=e,this.strResource=i,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const e=[];e.push(`* ${this.strResource}:`);for(let i=0;i<this._past.length;i++)e.push(` * [UNDO] ${this._past[i]}`);for(let i=this._future.length-1;i>=0;i--)e.push(` * [REDO] ${this._future[i]}`);return e.join(`
+`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,i){e.type===1?e.setValid(this.resourceLabel,this.strResource,i):e.setValid(i)}setElementsValidFlag(e,i){for(const n of this._past)i(n.actual)&&this._setElementValidFlag(n,e);for(const n of this._future)i(n.actual)&&this._setElementValidFlag(n,e)}pushElement(e){for(const i of this._future)i.type===1&&i.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const i=[];for(let n=0,s=this._past.length;n<s;n++)i.push(this._past[n].id);for(let n=this._future.length-1;n>=0;n--)i.push(this._future[n].id);return new pTt(e,i)}restoreSnapshot(e){const i=e.elements.length;let n=!0,s=0,c=-1;for(let f=0,m=this._past.length;f<m;f++,s++){const v=this._past[f];n&&(s>=i||v.id!==e.elements[s])&&(n=!1,c=0),!n&&v.type===1&&v.removeResource(this.resourceLabel,this.strResource,0)}let d=-1;for(let f=this._future.length-1;f>=0;f--,s++){const m=this._future[f];n&&(s>=i||m.id!==e.elements[s])&&(n=!1,d=f),!n&&m.type===1&&m.removeResource(this.resourceLabel,this.strResource,0)}c!==-1&&(this._past=this._past.slice(0,c)),d!==-1&&(this._future=this._future.slice(d+1)),this.versionId++}getElements(){const e=[],i=[];for(const n of this._past)e.push(n.actual);for(const n of this._future)i.push(n.actual);return{past:e,future:i}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,i){for(let n=this._past.length-1;n>=0;n--)if(this._past[n]===e){i.has(this.strResource)?this._past[n]=i.get(this.strResource):this._past.splice(n,1);break}this.versionId++}splitFutureWorkspaceElement(e,i){for(let n=this._future.length-1;n>=0;n--)if(this._future[n]===e){i.has(this.strResource)?this._future[n]=i.get(this.strResource):this._future.splice(n,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class DFe{constructor(e){this.editStacks=e,this._versionIds=[];for(let i=0,n=this.editStacks.length;i<n;i++)this._versionIds[i]=this.editStacks[i].versionId}isValid(){for(let e=0,i=this.editStacks.length;e<i;e++)if(this._versionIds[e]!==this.editStacks[e].versionId)return!1;return!0}}const yTt=new gTt("","");yTt.locked=!0;let QWe=class{constructor(e,i){this._dialogService=e,this._notificationService=i,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(e){for(const i of this._uriComparisonKeyComputers)if(i[0]===e.scheme)return i[1].getComparisonKey(e);return e.toString()}_print(e){console.log("------------------------------------"),console.log(`AFTER ${e}: `);const i=[];for(const n of this._editStacks)i.push(n[1].toString());console.log(i.join(`
+`))}pushElement(e,i=XWe.None,n=VF.None){if(e.type===0){const s=Qge(e.resource),c=this.getUriComparisonKey(e.resource);this._pushElement(new Zge(e,s,c,i.id,i.nextOrder(),n.id,n.nextOrder()))}else{const s=new Set,c=[],d=[];for(const f of e.resources){const m=Qge(f),v=this.getUriComparisonKey(f);s.has(v)||(s.add(v),c.push(m),d.push(v))}c.length===1?this._pushElement(new Zge(e,c[0],d[0],i.id,i.nextOrder(),n.id,n.nextOrder())):this._pushElement(new y_i(e,c,d,i.id,i.nextOrder(),n.id,n.nextOrder()))}}_pushElement(e){for(let i=0,n=e.strResources.length;i<n;i++){const s=e.resourceLabels[i],c=e.strResources[i];let d;this._editStacks.has(c)?d=this._editStacks.get(c):(d=new gTt(s,c),this._editStacks.set(c,d)),d.pushElement(e)}}getLastElement(e){const i=this.getUriComparisonKey(e);if(this._editStacks.has(i)){const n=this._editStacks.get(i);if(n.hasFutureElements())return null;const s=n.getClosestPastElement();return s?s.actual:null}return null}_splitPastWorkspaceElement(e,i){const n=e.actual.split(),s=new Map;for(const c of n){const d=Qge(c.resource),f=this.getUriComparisonKey(c.resource),m=new Zge(c,d,f,0,0,0,0);s.set(m.strResource,m)}for(const c of e.strResources){if(i&&i.has(c))continue;this._editStacks.get(c).splitPastWorkspaceElement(e,s)}}_splitFutureWorkspaceElement(e,i){const n=e.actual.split(),s=new Map;for(const c of n){const d=Qge(c.resource),f=this.getUriComparisonKey(c.resource),m=new Zge(c,d,f,0,0,0,0);s.set(m.strResource,m)}for(const c of e.strResources){if(i&&i.has(c))continue;this._editStacks.get(c).splitFutureWorkspaceElement(e,s)}}removeElements(e){const i=typeof e=="string"?e:this.getUriComparisonKey(e);this._editStacks.has(i)&&(this._editStacks.get(i).dispose(),this._editStacks.delete(i))}setElementsValidFlag(e,i,n){const s=this.getUriComparisonKey(e);this._editStacks.has(s)&&this._editStacks.get(s).setElementsValidFlag(i,n)}createSnapshot(e){const i=this.getUriComparisonKey(e);return this._editStacks.has(i)?this._editStacks.get(i).createSnapshot(e):new pTt(e,[])}restoreSnapshot(e){const i=this.getUriComparisonKey(e.resource);if(this._editStacks.has(i)){const n=this._editStacks.get(i);n.restoreSnapshot(e),!n.hasPastElements()&&!n.hasFutureElements()&&(n.dispose(),this._editStacks.delete(i))}}getElements(e){const i=this.getUriComparisonKey(e);return this._editStacks.has(i)?this._editStacks.get(i).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(e){if(!e)return[null,null];let i=null,n=null;for(const[s,c]of this._editStacks){const d=c.getClosestPastElement();d&&d.sourceId===e&&(!i||d.sourceOrder>i.sourceOrder)&&(i=d,n=s)}return[i,n]}canUndo(e){if(e instanceof VF){const[,n]=this._findClosestUndoElementWithSource(e.id);return!!n}const i=this.getUriComparisonKey(e);return this._editStacks.has(i)?this._editStacks.get(i).hasPastElements():!1}_onError(e,i){Pa(e);for(const n of i.strResources)this.removeElements(n);this._notificationService.error(e)}_acquireLocks(e){for(const i of e.editStacks)if(i.locked)throw new Error("Cannot acquire edit stack lock");for(const i of e.editStacks)i.locked=!0;return()=>{for(const i of e.editStacks)i.locked=!1}}_safeInvokeWithLocks(e,i,n,s,c){const d=this._acquireLocks(n);let f;try{f=i()}catch(m){return d(),s.dispose(),this._onError(m,e)}return f?f.then(()=>(d(),s.dispose(),c()),m=>(d(),s.dispose(),this._onError(m,e))):(d(),s.dispose(),c())}async _invokeWorkspacePrepare(e){if(typeof e.actual.prepareUndoRedo>"u")return xi.None;const i=e.actual.prepareUndoRedo();return typeof i>"u"?xi.None:i}_invokeResourcePrepare(e,i){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo>"u")return i(xi.None);const n=e.actual.prepareUndoRedo();return n?ESe(n)?i(n):n.then(s=>i(s)):i(xi.None)}_getAffectedEditStacks(e){const i=[];for(const n of e.strResources)i.push(this._editStacks.get(n)||yTt);return new DFe(i)}_tryToSplitAndUndo(e,i,n,s){if(i.canSplit())return this._splitPastWorkspaceElement(i,n),this._notificationService.warn(s),new Yge(this._undo(e,0,!0));for(const c of i.strResources)this.removeElements(c);return this._notificationService.warn(s),new Yge}_checkWorkspaceUndo(e,i,n,s){if(i.removedResources)return this._tryToSplitAndUndo(e,i,i.removedResources,W({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",i.label,i.removedResources.createMessage()));if(s&&i.invalidatedResources)return this._tryToSplitAndUndo(e,i,i.invalidatedResources,W({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",i.label,i.invalidatedResources.createMessage()));const c=[];for(const f of n.editStacks)f.getClosestPastElement()!==i&&c.push(f.resourceLabel);if(c.length>0)return this._tryToSplitAndUndo(e,i,null,W({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",i.label,c.join(", ")));const d=[];for(const f of n.editStacks)f.locked&&d.push(f.resourceLabel);return d.length>0?this._tryToSplitAndUndo(e,i,null,W({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",i.label,d.join(", "))):n.isValid()?null:this._tryToSplitAndUndo(e,i,null,W({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",i.label))}_workspaceUndo(e,i,n){const s=this._getAffectedEditStacks(i),c=this._checkWorkspaceUndo(e,i,s,!1);return c?c.returnValue:this._confirmAndExecuteWorkspaceUndo(e,i,s,n)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,i]of this._editStacks){const n=i.getClosestPastElement();if(n){if(n===e){const s=i.getSecondClosestPastElement();if(s&&s.groupId===e.groupId)return!0}if(n.groupId===e.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(e,i,n,s){if(i.canSplit()&&!this._isPartOfUndoGroup(i)){let f;(function(x){x[x.All=0]="All",x[x.This=1]="This",x[x.Cancel=2]="Cancel"})(f||(f={}));const{result:m}=await this._dialogService.prompt({type:S_.Info,message:W("confirmWorkspace","Would you like to undo '{0}' across all files?",i.label),buttons:[{label:W({key:"ok",comment:["{0} denotes a number that is > 1, && denotes a mnemonic"]},"&&Undo in {0} Files",n.editStacks.length),run:()=>f.All},{label:W({key:"nok",comment:["&& denotes a mnemonic"]},"Undo this &&File"),run:()=>f.This}],cancelButton:{run:()=>f.Cancel}});if(m===f.Cancel)return;if(m===f.This)return this._splitPastWorkspaceElement(i,null),this._undo(e,0,!0);const v=this._checkWorkspaceUndo(e,i,n,!1);if(v)return v.returnValue;s=!0}let c;try{c=await this._invokeWorkspacePrepare(i)}catch(f){return this._onError(f,i)}const d=this._checkWorkspaceUndo(e,i,n,!0);if(d)return c.dispose(),d.returnValue;for(const f of n.editStacks)f.moveBackward(i);return this._safeInvokeWithLocks(i,()=>i.actual.undo(),n,c,()=>this._continueUndoInGroup(i.groupId,s))}_resourceUndo(e,i,n){if(!i.isValid){e.flushAllElements();return}if(e.locked){const s=W({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",i.label);this._notificationService.warn(s);return}return this._invokeResourcePrepare(i,s=>(e.moveBackward(i),this._safeInvokeWithLocks(i,()=>i.actual.undo(),new DFe([e]),s,()=>this._continueUndoInGroup(i.groupId,n))))}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let i=null,n=null;for(const[s,c]of this._editStacks){const d=c.getClosestPastElement();d&&d.groupId===e&&(!i||d.groupOrder>i.groupOrder)&&(i=d,n=s)}return[i,n]}_continueUndoInGroup(e,i){if(!e)return;const[,n]=this._findClosestUndoElementInGroup(e);if(n)return this._undo(n,0,i)}undo(e){if(e instanceof VF){const[,i]=this._findClosestUndoElementWithSource(e.id);return i?this._undo(i,e.id,!1):void 0}return typeof e=="string"?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,i=0,n){if(!this._editStacks.has(e))return;const s=this._editStacks.get(e),c=s.getClosestPastElement();if(!c)return;if(c.groupId){const[f,m]=this._findClosestUndoElementInGroup(c.groupId);if(c!==f&&m)return this._undo(m,i,n)}if((c.sourceId!==i||c.confirmBeforeUndo)&&!n)return this._confirmAndContinueUndo(e,i,c);try{return c.type===1?this._workspaceUndo(e,c,n):this._resourceUndo(s,c,n)}finally{}}async _confirmAndContinueUndo(e,i,n){if((await this._dialogService.confirm({message:W("confirmDifferentSource","Would you like to undo '{0}'?",n.label),primaryButton:W({key:"confirmDifferentSource.yes",comment:["&& denotes a mnemonic"]},"&&Yes"),cancelButton:W("confirmDifferentSource.no","No")})).confirmed)return this._undo(e,i,!0)}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let i=null,n=null;for(const[s,c]of this._editStacks){const d=c.getClosestFutureElement();d&&d.sourceId===e&&(!i||d.sourceOrder<i.sourceOrder)&&(i=d,n=s)}return[i,n]}canRedo(e){if(e instanceof VF){const[,n]=this._findClosestRedoElementWithSource(e.id);return!!n}const i=this.getUriComparisonKey(e);return this._editStacks.has(i)?this._editStacks.get(i).hasFutureElements():!1}_tryToSplitAndRedo(e,i,n,s){if(i.canSplit())return this._splitFutureWorkspaceElement(i,n),this._notificationService.warn(s),new Yge(this._redo(e));for(const c of i.strResources)this.removeElements(c);return this._notificationService.warn(s),new Yge}_checkWorkspaceRedo(e,i,n,s){if(i.removedResources)return this._tryToSplitAndRedo(e,i,i.removedResources,W({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",i.label,i.removedResources.createMessage()));if(s&&i.invalidatedResources)return this._tryToSplitAndRedo(e,i,i.invalidatedResources,W({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",i.label,i.invalidatedResources.createMessage()));const c=[];for(const f of n.editStacks)f.getClosestFutureElement()!==i&&c.push(f.resourceLabel);if(c.length>0)return this._tryToSplitAndRedo(e,i,null,W({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",i.label,c.join(", ")));const d=[];for(const f of n.editStacks)f.locked&&d.push(f.resourceLabel);return d.length>0?this._tryToSplitAndRedo(e,i,null,W({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",i.label,d.join(", "))):n.isValid()?null:this._tryToSplitAndRedo(e,i,null,W({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",i.label))}_workspaceRedo(e,i){const n=this._getAffectedEditStacks(i),s=this._checkWorkspaceRedo(e,i,n,!1);return s?s.returnValue:this._executeWorkspaceRedo(e,i,n)}async _executeWorkspaceRedo(e,i,n){let s;try{s=await this._invokeWorkspacePrepare(i)}catch(d){return this._onError(d,i)}const c=this._checkWorkspaceRedo(e,i,n,!0);if(c)return s.dispose(),c.returnValue;for(const d of n.editStacks)d.moveForward(i);return this._safeInvokeWithLocks(i,()=>i.actual.redo(),n,s,()=>this._continueRedoInGroup(i.groupId))}_resourceRedo(e,i){if(!i.isValid){e.flushAllElements();return}if(e.locked){const n=W({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",i.label);this._notificationService.warn(n);return}return this._invokeResourcePrepare(i,n=>(e.moveForward(i),this._safeInvokeWithLocks(i,()=>i.actual.redo(),new DFe([e]),n,()=>this._continueRedoInGroup(i.groupId))))}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let i=null,n=null;for(const[s,c]of this._editStacks){const d=c.getClosestFutureElement();d&&d.groupId===e&&(!i||d.groupOrder<i.groupOrder)&&(i=d,n=s)}return[i,n]}_continueRedoInGroup(e){if(!e)return;const[,i]=this._findClosestRedoElementInGroup(e);if(i)return this._redo(i)}redo(e){if(e instanceof VF){const[,i]=this._findClosestRedoElementWithSource(e.id);return i?this._redo(i):void 0}return typeof e=="string"?this._redo(e):this._redo(this.getUriComparisonKey(e))}_redo(e){if(!this._editStacks.has(e))return;const i=this._editStacks.get(e),n=i.getClosestFutureElement();if(n){if(n.groupId){const[s,c]=this._findClosestRedoElementInGroup(n.groupId);if(n!==s&&c)return this._redo(c)}try{return n.type===1?this._workspaceRedo(e,n):this._resourceRedo(i,n)}finally{}}}};QWe=g_i([lbt(0,gse),lbt(1,w_)],QWe);class Yge{constructor(e){this.returnValue=e}}nl(T$e,QWe,1);function uv(l,e,i){return Math.min(Math.max(l,e),i)}class vTt{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class v_i{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){const i=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=i,this._sum+=e,this._n<this._values.length&&(this._n+=1),this._val=this._sum/this._n,this._val}get value(){return this._val}}const D$e=jc("environmentService");var b_i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},fbt=function(l,e){return function(i,n){e(i,n,l)}};const Pw=jc("ILanguageFeatureDebounceService");var wye;(function(l){const e=new WeakMap;let i=0;function n(s){let c=e.get(s);return c===void 0&&(c=++i,e.set(s,c)),c}l.of=n})(wye||(wye={}));class C_i{constructor(e){this._default=e}get(e){return this._default}update(e,i){return this._default}default(){return this._default}}class S_i{constructor(e,i,n,s,c,d){this._logService=e,this._name=i,this._registry=n,this._default=s,this._min=c,this._max=d,this._cache=new VL(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((i,n)=>ASe(wye.of(n),i),0)}get(e){const i=this._key(e),n=this._cache.get(i);return n?uv(n.value,this._min,this._max):this.default()}update(e,i){const n=this._key(e);let s=this._cache.get(n);s||(s=new v_i(6),this._cache.set(n,s));const c=uv(s.update(i),this._min,this._max);return NSe(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${c}ms`),c}_overall(){const e=new vTt;for(const[,i]of this._cache)e.update(i.value);return e.value}default(){const e=this._overall()|0||this._default;return uv(e,this._min,this._max)}}let ZWe=class{constructor(e,i){this._logService=e,this._data=new Map,this._isDev=i.isExtensionDevelopment||!i.isBuilt}for(e,i,n){const s=(n==null?void 0:n.min)??50,c=(n==null?void 0:n.max)??s**2,d=(n==null?void 0:n.key)??void 0,f=`${wye.of(e)},${s}${d?","+d:""}`;let m=this._data.get(f);return m||(this._isDev?(this._logService.debug(`[DEBOUNCE: ${i}] is disabled in developed mode`),m=new C_i(s*1.5)):m=new S_i(this._logService,i,e,this._overallAverage()|0||s*1.5,s,c),this._data.set(f,m)),m}_overallAverage(){const e=new vTt;for(const i of this._data.values())e.update(i.default());return e.value}};ZWe=b_i([fbt(0,N0),fbt(1,D$e)],ZWe);nl(Pw,ZWe,1);class kb{static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static getClassNameFromMetadata(e){let n="mtk"+this.getForeground(e);const s=this.getFontStyle(e);return s&1&&(n+=" mtki"),s&2&&(n+=" mtkb"),s&4&&(n+=" mtku"),s&8&&(n+=" mtks"),n}static getInlineStyleFromMetadata(e,i){const n=this.getForeground(e),s=this.getFontStyle(e);let c=`color: ${i[n]};`;s&1&&(c+="font-style: italic;"),s&2&&(c+="font-weight: bold;");let d="";return s&4&&(d+=" underline"),s&8&&(d+=" line-through"),d&&(c+=`text-decoration:${d};`),c}static getPresentationFromMetadata(e){const i=this.getForeground(e),n=this.getFontStyle(e);return{foreground:i,italic:!!(n&1),bold:!!(n&2),underline:!!(n&4),strikethrough:!!(n&8)}}}function xR(l){let e=0,i=0,n=0,s=0;for(let c=0,d=l.length;c<d;c++){const f=l.charCodeAt(c);f===13?(e===0&&(i=c),e++,c+1<d&&l.charCodeAt(c+1)===10?(s|=2,c++):s|=3,n=c+1):f===10&&(s|=1,e===0&&(i=c),e++,n=c+1)}return e===0&&(i=l.length),[e,i,l.length-n,s]}class Die{static create(e,i){return new Die(e,new xye(i))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,i){this._startLineNumber=e,this._tokens=i,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e&&new nt(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn)}removeTokens(e){const i=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(i,e.startColumn-1,n,e.endColumn-1),this._updateEndLineNumber()}split(e){const i=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber,[s,c,d]=this._tokens.split(i,e.startColumn-1,n,e.endColumn-1);return[new Die(this._startLineNumber,s),new Die(this._startLineNumber+d,c)]}applyEdit(e,i){const[n,s,c]=xR(i);this.acceptEdit(e,n,s,c,i.length>0?i.charCodeAt(0):0)}acceptEdit(e,i,n,s,c){this._acceptDeleteRange(e),this._acceptInsertText(new pi(e.startLineNumber,e.startColumn),i,n,s,c),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const i=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;if(n<0){const c=n-i;this._startLineNumber-=c;return}const s=this._tokens.getMaxDeltaLine();if(!(i>=s+1)){if(i<0&&n>=s+1){this._startLineNumber=0,this._tokens.clear();return}if(i<0){const c=-i;this._startLineNumber-=c,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,n,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,i,e.startColumn-1,n,e.endColumn-1)}}_acceptInsertText(e,i,n,s,c){if(i===0&&n===0)return;const d=e.lineNumber-this._startLineNumber;if(d<0){this._startLineNumber+=i;return}const f=this._tokens.getMaxDeltaLine();d>=f+1||this._tokens.acceptInsertText(d,e.column-1,i,n,s,c)}}class xye{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const i=[];for(let n=0;n<this._tokenCount;n++)i.push(`(${this._getDeltaLine(n)+e},${this._getStartCharacter(n)}-${this._getEndCharacter(n)})`);return`[${i.join(",")}]`}getMaxDeltaLine(){const e=this._getTokenCount();return e===0?-1:this._getDeltaLine(e-1)}getRange(){const e=this._getTokenCount();if(e===0)return null;const i=this._getStartCharacter(0),n=this._getDeltaLine(e-1),s=this._getEndCharacter(e-1);return new nt(0,i+1,n,s+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(e){return this._tokens[4*e]}_getStartCharacter(e){return this._tokens[4*e+1]}_getEndCharacter(e){return this._tokens[4*e+2]}isEmpty(){return this._getTokenCount()===0}getLineTokens(e){let i=0,n=this._getTokenCount()-1;for(;i<n;){const s=i+Math.floor((n-i)/2),c=this._getDeltaLine(s);if(c<e)i=s+1;else if(c>e)n=s-1;else{let d=s;for(;d>i&&this._getDeltaLine(d-1)===e;)d--;let f=s;for(;f<n&&this._getDeltaLine(f+1)===e;)f++;return new hbt(this._tokens.subarray(4*d,4*f+4))}}return this._getDeltaLine(i)===e?new hbt(this._tokens.subarray(4*i,4*i+4)):null}clear(){this._tokenCount=0}removeTokens(e,i,n,s){const c=this._tokens,d=this._tokenCount;let f=0,m=!1,v=0;for(let x=0;x<d;x++){const w=4*x,I=c[w],P=c[w+1],O=c[w+2],z=c[w+3];if((I>e||I===e&&O>=i)&&(I<n||I===n&&P<=s))m=!0;else{if(f===0&&(v=I),m){const J=4*f;c[J]=I-v,c[J+1]=P,c[J+2]=O,c[J+3]=z}f++}}return this._tokenCount=f,v}split(e,i,n,s){const c=this._tokens,d=this._tokenCount,f=[],m=[];let v=f,x=0,w=0;for(let I=0;I<d;I++){const P=4*I,O=c[P],z=c[P+1],J=c[P+2],Y=c[P+3];if(O>e||O===e&&J>=i){if(O<n||O===n&&z<=s)continue;v!==m&&(v=m,x=0,w=O)}v[x++]=O-w,v[x++]=z,v[x++]=J,v[x++]=Y}return[new xye(new Uint32Array(f)),new xye(new Uint32Array(m)),w]}acceptDeleteRange(e,i,n,s,c){const d=this._tokens,f=this._tokenCount,m=s-i;let v=0,x=!1;for(let w=0;w<f;w++){const I=4*w;let P=d[I],O=d[I+1],z=d[I+2];const J=d[I+3];if(P<i||P===i&&z<=n){v++;continue}else if(P===i&&O<n)P===s&&z>c?z-=c-n:z=n;else if(P===i&&O===n)if(P===s&&z>c)z-=c-n;else{x=!0;continue}else if(P<s||P===s&&O<c)if(P===s&&z>c)P=i,O=n,z=O+(z-c);else{x=!0;continue}else if(P>s){if(m===0&&!x){v=f;break}P-=m}else if(P===s&&O>=c)e&&P===0&&(O+=e,z+=e),P-=m,O-=c-n,z-=c-n;else throw new Error("Not possible!");const Y=4*v;d[Y]=P,d[Y+1]=O,d[Y+2]=z,d[Y+3]=J,v++}this._tokenCount=v}acceptInsertText(e,i,n,s,c,d){const f=n===0&&s===1&&(d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122),m=this._tokens,v=this._tokenCount;for(let x=0;x<v;x++){const w=4*x;let I=m[w],P=m[w+1],O=m[w+2];if(!(I<e||I===e&&O<i)){if(I===e&&O===i)if(f)O+=1;else continue;else if(I===e&&P<i&&i<O)n===0?O+=s:O=i;else{if(I===e&&P===i&&f)continue;if(I===e)if(I+=n,n===0)P+=s,O+=s;else{const z=O-P;P=c+(P-i),O=P+z}else I+=n}m[w]=I,m[w+1]=P,m[w+2]=O}}}}class hbt{constructor(e){this._tokens=e}getCount(){return this._tokens.length/4}getStartCharacter(e){return this._tokens[4*e+1]}getEndCharacter(e){return this._tokens[4*e+2]}getMetadata(e){return this._tokens[4*e+3]}}var w_i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},EFe=function(l,e){return function(i,n){e(i,n,l)}};let YWe=class{constructor(e,i,n,s){this._legend=e,this._themeService=i,this._languageService=n,this._logService=s,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new eVe}getMetadata(e,i,n){const s=this._languageService.languageIdCodec.encodeLanguageId(n),c=this._hashTable.get(e,i,s);let d;if(c)d=c.metadata;else{let f=this._legend.tokenTypes[e];const m=[];if(f){let v=i;for(let w=0;v>0&&w<this._legend.tokenModifiers.length;w++)v&1&&m.push(this._legend.tokenModifiers[w]),v=v>>1;const x=this._themeService.getColorTheme().getTokenStyleMetadata(f,m,n);if(typeof x>"u")d=2147483647;else{if(d=0,typeof x.italic<"u"){const w=(x.italic?1:0)<<11;d|=w|1}if(typeof x.bold<"u"){const w=(x.bold?2:0)<<11;d|=w|2}if(typeof x.underline<"u"){const w=(x.underline?4:0)<<11;d|=w|4}if(typeof x.strikethrough<"u"){const w=(x.strikethrough?8:0)<<11;d|=w|8}if(x.foreground){const w=x.foreground<<15;d|=w|16}d===0&&(d=2147483647)}}else d=2147483647,f="not-in-legend";this._hashTable.add(e,i,s,d)}return d}warnOverlappingSemanticTokens(e,i){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${i}`))}warnInvalidLengthSemanticTokens(e,i){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${i}`))}warnInvalidEditStart(e,i,n,s,c){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${i}) at edit #${n}: The provided start offset ${s} is outside the previous data (length ${c}).`))}};YWe=w_i([EFe(1,im),EFe(2,Pf),EFe(3,N0)],YWe);function bTt(l,e,i){const n=l.data,s=l.data.length/5|0,c=Math.max(Math.ceil(s/1024),400),d=[];let f=0,m=1,v=0;for(;f<s;){const x=f;let w=Math.min(x+c,s);if(w<s){let ae=w;for(;ae-1>x&&n[5*ae]===0;)ae--;if(ae-1===x){let me=w;for(;me+1<s&&n[5*me]===0;)me++;w=me}else w=ae}let I=new Uint32Array((w-x)*4),P=0,O=0,z=0,J=0;for(;f<w;){const ae=5*f,me=n[ae],ye=n[ae+1],Ce=m+me|0,Fe=me===0?v+ye|0:ye,rt=n[ae+2],ct=Fe+rt|0,Mt=n[ae+3],Yt=n[ae+4];if(ct<=Fe)e.warnInvalidLengthSemanticTokens(Ce,Fe+1);else if(z===Ce&&J>Fe)e.warnOverlappingSemanticTokens(Ce,Fe+1);else{const Bi=e.getMetadata(Mt,Yt,i);Bi!==2147483647&&(O===0&&(O=Ce),I[P]=Ce-O,I[P+1]=Fe,I[P+2]=ct,I[P+3]=Bi,P+=4,z=Ce,J=ct)}m=Ce,v=Fe,f++}P!==I.length&&(I=I.subarray(0,P));const Y=Die.create(O,I);d.push(Y)}return d}class x_i{constructor(e,i,n,s){this.tokenTypeIndex=e,this.tokenModifierSet=i,this.languageId=n,this.metadata=s,this.next=null}}const x4=class x4{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=x4._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<x4._SIZES.length?2/3*this._currentLength:0),this._elements=[],x4._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(e,i){for(let n=0;n<i;n++)e[n]=null}_hash2(e,i){return(e<<5)-e+i|0}_hashFunc(e,i,n){return this._hash2(this._hash2(e,i),n)%this._currentLength}get(e,i,n){const s=this._hashFunc(e,i,n);let c=this._elements[s];for(;c;){if(c.tokenTypeIndex===e&&c.tokenModifierSet===i&&c.languageId===n)return c;c=c.next}return null}add(e,i,n,s){if(this._elementsCount++,this._growCount!==0&&this._elementsCount>=this._growCount){const c=this._elements;this._currentLengthIndex++,this._currentLength=x4._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<x4._SIZES.length?2/3*this._currentLength:0),this._elements=[],x4._nullOutEntries(this._elements,this._currentLength);for(const d of c){let f=d;for(;f;){const m=f.next;f.next=null,this._add(f),f=m}}}this._add(new x_i(e,i,n,s))}_add(e){const i=this._hashFunc(e.tokenTypeIndex,e.tokenModifierSet,e.languageId);e.next=this._elements[i],this._elements[i]=e}};x4._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143];let eVe=x4;const ZSe=jc("semanticTokensStylingService");var k_i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},IFe=function(l,e){return function(i,n){e(i,n,l)}};let tVe=class extends xi{constructor(e,i,n){super(),this._themeService=e,this._logService=i,this._languageService=n,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new YWe(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};tVe=k_i([IFe(0,im),IFe(1,N0),IFe(2,Pf)],tVe);nl(ZSe,tVe,1);function rM(l){return l===47||l===92}function CTt(l){return l.replace(/[\\/]/g,q_.sep)}function T_i(l){return l.indexOf("/")===-1&&(l=CTt(l)),/^[a-zA-Z]:(\/|$)/.test(l)&&(l="/"+l),l}function _bt(l,e=q_.sep){if(!l)return"";const i=l.length,n=l.charCodeAt(0);if(rM(n)){if(rM(l.charCodeAt(1))&&!rM(l.charCodeAt(2))){let c=3;const d=c;for(;c<i&&!rM(l.charCodeAt(c));c++);if(d!==c&&!rM(l.charCodeAt(c+1))){for(c+=1;c<i;c++)if(rM(l.charCodeAt(c)))return l.slice(0,c+1).replace(/[\\/]/g,e)}}return e}else if(STt(n)&&l.charCodeAt(1)===58)return rM(l.charCodeAt(2))?l.slice(0,2)+e:l.slice(0,2);let s=l.indexOf("://");if(s!==-1){for(s+=3;s<i;s++)if(rM(l.charCodeAt(s)))return l.slice(0,s+1)}return""}function iVe(l,e,i,n=AE){if(l===e)return!0;if(!l||!e||e.length>l.length)return!1;if(i){if(!Yqe(l,e))return!1;if(e.length===l.length)return!0;let c=e.length;return e.charAt(e.length-1)===n&&c--,l.charAt(c)===n}return e.charAt(e.length-1)!==n&&(e+=n),l.indexOf(e)===0}function STt(l){return l>=65&&l<=90||l>=97&&l<=122}function D_i(l,e=I0){return e?STt(l.charCodeAt(0))&&l.charCodeAt(1)===58:!1}const e0e="**",pbt="/",u1e="[/\\\\]",d1e="[^/\\\\]",E_i=/\//g;function mbt(l,e){switch(l){case 0:return"";case 1:return`${d1e}*?`;default:return`(?:${u1e}|${d1e}+${u1e}${e?`|${u1e}${d1e}+`:""})*?`}}function gbt(l,e){if(!l)return[];const i=[];let n=!1,s=!1,c="";for(const d of l){switch(d){case e:if(!n&&!s){i.push(c),c="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":s=!0;break;case"]":s=!1;break}c+=d}return c&&i.push(c),i}function wTt(l){if(!l)return"";let e="";const i=gbt(l,pbt);if(i.every(n=>n===e0e))e=".*";else{let n=!1;i.forEach((s,c)=>{if(s===e0e){if(n)return;e+=mbt(2,c===i.length-1)}else{let d=!1,f="",m=!1,v="";for(const x of s){if(x!=="}"&&d){f+=x;continue}if(m&&(x!=="]"||!v)){let w;x==="-"?w=x:(x==="^"||x==="!")&&!v?w="^":x===pbt?w="":w=Tw(x),v+=w;continue}switch(x){case"{":d=!0;continue;case"[":m=!0;continue;case"}":{const I=`(?:${gbt(f,",").map(P=>wTt(P)).join("|")})`;e+=I,d=!1,f="";break}case"]":{e+="["+v+"]",m=!1,v="";break}case"?":e+=d1e;continue;case"*":e+=mbt(1);continue;default:e+=Tw(x)}}c<i.length-1&&(i[c+1]!==e0e||c+2<i.length)&&(e+=u1e)}n=s===e0e})}return e}const I_i=/^\*\*\/\*\.[\w\.-]+$/,N_i=/^\*\*\/([\w\.-]+)\/?$/,L_i=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,P_i=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,A_i=/^\*\*((\/[\w\.-]+)+)\/?$/,O_i=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,ybt=new VL(1e4),vbt=function(){return!1},TL=function(){return null};function E$e(l,e){if(!l)return TL;let i;typeof l!="string"?i=l.pattern:i=l,i=i.trim();const n=`${i}_${!!e.trimForExclusions}`;let s=ybt.get(n);if(s)return bbt(s,l);let c;return I_i.test(i)?s=M_i(i.substr(4),i):(c=N_i.exec(NFe(i,e)))?s=R_i(c[1],i):(e.trimForExclusions?P_i:L_i).test(i)?s=F_i(i,e):(c=A_i.exec(NFe(i,e)))?s=Cbt(c[1].substr(1),i,!0):(c=O_i.exec(NFe(i,e)))?s=Cbt(c[1],i,!1):s=B_i(i),ybt.set(n,s),bbt(s,l)}function bbt(l,e){if(typeof e=="string")return l;const i=function(n,s){return iVe(n,e.base,!Cv)?l(use(n.substr(e.base.length),AE),s):null};return i.allBasenames=l.allBasenames,i.allPaths=l.allPaths,i.basenames=l.basenames,i.patterns=l.patterns,i}function NFe(l,e){return e.trimForExclusions&&l.endsWith("/**")?l.substr(0,l.length-2):l}function M_i(l,e){return function(i,n){return typeof i=="string"&&i.endsWith(l)?e:null}}function R_i(l,e){const i=`/${l}`,n=`\\${l}`,s=function(d,f){return typeof d!="string"?null:f?f===l?e:null:d===l||d.endsWith(i)||d.endsWith(n)?e:null},c=[l];return s.basenames=c,s.patterns=[e],s.allBasenames=c,s}function F_i(l,e){const i=kTt(l.slice(1,-1).split(",").map(f=>E$e(f,e)).filter(f=>f!==TL),l),n=i.length;if(!n)return TL;if(n===1)return i[0];const s=function(f,m){for(let v=0,x=i.length;v<x;v++)if(i[v](f,m))return l;return null},c=i.find(f=>!!f.allBasenames);c&&(s.allBasenames=c.allBasenames);const d=i.reduce((f,m)=>m.allPaths?f.concat(m.allPaths):f,[]);return d.length&&(s.allPaths=d),s}function Cbt(l,e,i){const n=AE===q_.sep,s=n?l:l.replace(E_i,AE),c=AE+s,d=q_.sep+l;let f;return i?f=function(m,v){return typeof m=="string"&&(m===s||m.endsWith(c)||!n&&(m===l||m.endsWith(d)))?e:null}:f=function(m,v){return typeof m=="string"&&(m===s||!n&&m===l)?e:null},f.allPaths=[(i?"*/":"./")+l],f}function B_i(l){try{const e=new RegExp(`^${wTt(l)}$`);return function(i){return e.lastIndex=0,typeof i=="string"&&e.test(i)?l:null}}catch{return TL}}function W_i(l,e,i){return!l||typeof e!="string"?!1:xTt(l)(e,void 0,i)}function xTt(l,e={}){if(!l)return vbt;if(typeof l=="string"||V_i(l)){const i=E$e(l,e);if(i===TL)return vbt;const n=function(s,c){return!!i(s,c)};return i.allBasenames&&(n.allBasenames=i.allBasenames),i.allPaths&&(n.allPaths=i.allPaths),n}return H_i(l,e)}function V_i(l){const e=l;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}function H_i(l,e){const i=kTt(Object.getOwnPropertyNames(l).map(f=>j_i(f,l[f],e)).filter(f=>f!==TL)),n=i.length;if(!n)return TL;if(!i.some(f=>!!f.requiresSiblings)){if(n===1)return i[0];const f=function(x,w){let I;for(let P=0,O=i.length;P<O;P++){const z=i[P](x,w);if(typeof z=="string")return z;yWe(z)&&(I||(I=[]),I.push(z))}return I?(async()=>{for(const P of I){const O=await P;if(typeof O=="string")return O}return null})():null},m=i.find(x=>!!x.allBasenames);m&&(f.allBasenames=m.allBasenames);const v=i.reduce((x,w)=>w.allPaths?x.concat(w.allPaths):x,[]);return v.length&&(f.allPaths=v),f}const s=function(f,m,v){let x,w;for(let I=0,P=i.length;I<P;I++){const O=i[I];O.requiresSiblings&&v&&(m||(m=qM(f)),x||(x=m.substr(0,m.length-xli(f).length)));const z=O(f,m,x,v);if(typeof z=="string")return z;yWe(z)&&(w||(w=[]),w.push(z))}return w?(async()=>{for(const I of w){const P=await I;if(typeof P=="string")return P}return null})():null},c=i.find(f=>!!f.allBasenames);c&&(s.allBasenames=c.allBasenames);const d=i.reduce((f,m)=>m.allPaths?f.concat(m.allPaths):f,[]);return d.length&&(s.allPaths=d),s}function j_i(l,e,i){if(e===!1)return TL;const n=E$e(l,i);if(n===TL)return TL;if(typeof e=="boolean")return n;if(e){const s=e.when;if(typeof s=="string"){const c=(d,f,m,v)=>{if(!v||!n(d,f))return null;const x=s.replace("$(basename)",()=>m),w=v(x);return yWe(w)?w.then(I=>I?l:null):w?l:null};return c.requiresSiblings=!0,c}}return n}function kTt(l,e){const i=l.filter(f=>!!f.basenames);if(i.length<2)return l;const n=i.reduce((f,m)=>{const v=m.basenames;return v?f.concat(v):f},[]);let s;if(e){s=[];for(let f=0,m=n.length;f<m;f++)s.push(e)}else s=i.reduce((f,m)=>{const v=m.patterns;return v?f.concat(v):f},[]);const c=function(f,m){if(typeof f!="string")return null;if(!m){let x;for(x=f.length;x>0;x--){const w=f.charCodeAt(x-1);if(w===47||w===92)break}m=f.substr(x)}const v=n.indexOf(m);return v!==-1?s[v]:null};c.basenames=n,c.patterns=s,c.allBasenames=n;const d=l.filter(f=>!f.basenames);return d.push(c),d}function I$e(l,e,i,n,s,c){if(Array.isArray(l)){let d=0;for(const f of l){const m=I$e(f,e,i,n,s,c);if(m===10)return m;m>d&&(d=m)}return d}else{if(typeof l=="string")return n?l==="*"?5:l===i?10:0:0;if(l){const{language:d,pattern:f,scheme:m,hasAccessToAllModels:v,notebookType:x}=l;if(!n&&!v)return 0;x&&s&&(e=s);let w=0;if(m)if(m===e.scheme)w=10;else if(m==="*")w=5;else return 0;if(d)if(d===i)w=10;else if(d==="*")w=Math.max(w,5);else return 0;if(x)if(x===c)w=10;else if(x==="*"&&c!==void 0)w=Math.max(w,5);else return 0;if(f){let I;if(typeof f=="string"?I=f:I={...f,base:jkt(f.base)},I===e.fsPath||W_i(I,e.fsPath))w=10;else return 0}return w}else return 0}}function TTt(l){return typeof l=="string"?!1:Array.isArray(l)?l.every(TTt):!!l.exclusive}class Sbt{constructor(e,i,n,s,c){this.uri=e,this.languageId=i,this.notebookUri=n,this.notebookType=s,this.recursive=c}equals(e){var i,n;return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&((i=this.notebookUri)==null?void 0:i.toString())===((n=e.notebookUri)==null?void 0:n.toString())&&this.recursive===e.recursive}}class Yf{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new gi,this.onDidChange=this._onDidChange.event}register(e,i){let n={selector:e,provider:i,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),fo(()=>{if(n){const s=this._entries.indexOf(n);s>=0&&(this._entries.splice(s,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),n=void 0)}})}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e,!1);const i=[];for(const n of this._entries)n._score>0&&i.push(n.provider);return i}ordered(e,i=!1){const n=[];return this._orderedForEach(e,i,s=>n.push(s.provider)),n}orderedGroups(e){const i=[];let n,s;return this._orderedForEach(e,!1,c=>{n&&s===c._score?n.push(c.provider):(s=c._score,n=[c.provider],i.push(n))}),i}_orderedForEach(e,i,n){this._updateScores(e,i);for(const s of this._entries)s._score>0&&n(s)}_updateScores(e,i){var c,d;const n=(c=this._notebookInfoResolver)==null?void 0:c.call(this,e.uri),s=n?new Sbt(e.uri,e.getLanguageId(),n.uri,n.type,i):new Sbt(e.uri,e.getLanguageId(),void 0,void 0,i);if(!((d=this._lastCandidate)!=null&&d.equals(s))){this._lastCandidate=s;for(const f of this._entries)if(f._score=I$e(f.selector,s.uri,s.languageId,tTt(e),s.notebookUri,s.notebookType),TTt(f.selector)&&f._score>0)if(i)f._score=0;else{for(const m of this._entries)m._score=0;f._score=1e3;break}this._entries.sort(Yf._compareByScoreAndTime)}}static _compareByScoreAndTime(e,i){return e._score<i._score?1:e._score>i._score?-1:tie(e.selector)&&!tie(i.selector)?1:!tie(e.selector)&&tie(i.selector)?-1:e._time<i._time?1:e._time>i._time?-1:0}}function tie(l){return typeof l=="string"?!1:Array.isArray(l)?l.some(tie):!!l.isBuiltin}class z_i{constructor(){this.referenceProvider=new Yf(this._score.bind(this)),this.renameProvider=new Yf(this._score.bind(this)),this.newSymbolNamesProvider=new Yf(this._score.bind(this)),this.codeActionProvider=new Yf(this._score.bind(this)),this.definitionProvider=new Yf(this._score.bind(this)),this.typeDefinitionProvider=new Yf(this._score.bind(this)),this.declarationProvider=new Yf(this._score.bind(this)),this.implementationProvider=new Yf(this._score.bind(this)),this.documentSymbolProvider=new Yf(this._score.bind(this)),this.inlayHintsProvider=new Yf(this._score.bind(this)),this.colorProvider=new Yf(this._score.bind(this)),this.codeLensProvider=new Yf(this._score.bind(this)),this.documentFormattingEditProvider=new Yf(this._score.bind(this)),this.documentRangeFormattingEditProvider=new Yf(this._score.bind(this)),this.onTypeFormattingEditProvider=new Yf(this._score.bind(this)),this.signatureHelpProvider=new Yf(this._score.bind(this)),this.hoverProvider=new Yf(this._score.bind(this)),this.documentHighlightProvider=new Yf(this._score.bind(this)),this.multiDocumentHighlightProvider=new Yf(this._score.bind(this)),this.selectionRangeProvider=new Yf(this._score.bind(this)),this.foldingRangeProvider=new Yf(this._score.bind(this)),this.linkProvider=new Yf(this._score.bind(this)),this.inlineCompletionsProvider=new Yf(this._score.bind(this)),this.inlineEditProvider=new Yf(this._score.bind(this)),this.completionProvider=new Yf(this._score.bind(this)),this.linkedEditingRangeProvider=new Yf(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new Yf(this._score.bind(this)),this.documentSemanticTokensProvider=new Yf(this._score.bind(this)),this.documentDropEditProvider=new Yf(this._score.bind(this)),this.documentPasteEditProvider=new Yf(this._score.bind(this))}_score(e){var i;return(i=this._notebookTypeResolver)==null?void 0:i.call(this,e)}}nl(Ts,z_i,1);function N$e(l){return`--vscode-${l.replace(/\./g,"-")}`}function cs(l){return`var(${N$e(l)})`}function U_i(l,e){return`var(${N$e(l)}, ${e})`}function q_i(l){return l!==null&&typeof l=="object"&&"light"in l&&"dark"in l}const DTt={ColorContribution:"base.contributions.colors"},$_i="default";class J_i{constructor(){this._onDidChangeSchema=new gi,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,i,n,s=!1,c){const d={id:e,description:n,defaults:i,needsTransparency:s,deprecationMessage:c};this.colorsById[e]=d;const f={type:"string",format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return c&&(f.deprecationMessage=c),s&&(f.pattern="^#(?:(?<rgba>[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",f.patternErrorMessage=W("transparecyRequired","This color must be transparent or it will obscure content")),this.colorSchema.properties[e]={description:n,oneOf:[f,{type:"string",const:$_i,description:W("useDefault","Use the default color.")}]},this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(n),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map(e=>this.colorsById[e])}resolveDefaultColor(e,i){const n=this.colorsById[e];if(n!=null&&n.defaults){const s=q_i(n.defaults)?n.defaults[i.type]:n.defaults;return uE(s,i)}}getColorSchema(){return this.colorSchema}toString(){const e=(i,n)=>{const s=i.indexOf(".")===-1?0:1,c=n.indexOf(".")===-1?0:1;return s!==c?s-c:i.localeCompare(n)};return Object.keys(this.colorsById).sort(e).map(i=>`- \`${i}\`: ${this.colorsById[i].description}`).join(`
+`)}}const YSe=new J_i;nh.add(DTt.ColorContribution,YSe);function It(l,e,i,n,s){return YSe.registerColor(l,e,i,n,s)}function G_i(l,e){var i,n,s,c;switch(l.op){case 0:return(i=uE(l.value,e))==null?void 0:i.darken(l.factor);case 1:return(n=uE(l.value,e))==null?void 0:n.lighten(l.factor);case 2:return(s=uE(l.value,e))==null?void 0:s.transparent(l.factor);case 3:{const d=uE(l.background,e);return d?(c=uE(l.value,e))==null?void 0:c.makeOpaque(d):uE(l.value,e)}case 4:for(const d of l.values){const f=uE(d,e);if(f)return f}return;case 6:return uE(e.defines(l.if)?l.then:l.else,e);case 5:{const d=uE(l.value,e);if(!d)return;const f=uE(l.background,e);return f?d.isDarkerThan(f)?In.getLighterColor(d,f,l.factor).transparent(l.transparency):In.getDarkerColor(d,f,l.factor).transparent(l.transparency):d.transparent(l.factor*l.transparency)}default:throw qSe()}}function eW(l,e){return{op:0,value:l,factor:e}}function FE(l,e){return{op:1,value:l,factor:e}}function hc(l,e){return{op:2,value:l,factor:e}}function Jne(...l){return{op:4,values:l}}function K_i(l,e,i){return{op:6,if:l,then:e,else:i}}function wbt(l,e,i,n){return{op:5,value:l,background:e,factor:i,transparency:n}}function uE(l,e){if(l!==null){if(typeof l=="string")return l[0]==="#"?In.fromHex(l):e.getColor(l);if(l instanceof In)return l;if(typeof l=="object")return G_i(l,e)}}const ETt="vscode://schemas/workbench-colors",ITt=nh.as(KSe.JSONContribution);ITt.registerSchema(ETt,YSe.getColorSchema());const xbt=new qu(()=>ITt.notifySchemaChanged(ETt),200);YSe.onDidChangeSchema(()=>{xbt.isScheduled()||xbt.schedule()});const kc=It("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},W("foreground","Overall foreground color. This color is only used if not overridden by a component."));It("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},W("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component."));It("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},W("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component."));It("descriptionForeground",{light:"#717171",dark:hc(kc,.7),hcDark:hc(kc,.7),hcLight:hc(kc,.7)},W("descriptionForeground","Foreground color for description text providing additional information, for example for a label."));const kye=It("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},W("iconForeground","The default color for icons in the workbench.")),NL=It("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},W("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),bl=It("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},W("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),yf=It("contrastActiveBorder",{light:null,dark:null,hcDark:NL,hcLight:NL},W("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast."));It("selection.background",null,W("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor."));const X_i=It("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},W("textLinkForeground","Foreground color for links in text."));It("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},W("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover."));It("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:In.black,hcLight:"#292929"},W("textSeparatorForeground","Color for text separators."));It("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},W("textPreformatForeground","Foreground color for preformatted text segments."));It("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},W("textPreformatBackground","Background color for preformatted text segments."));It("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},W("textBlockQuoteBackground","Background color for block quotes in text."));It("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:In.white,hcLight:"#292929"},W("textBlockQuoteBorder","Border color for block quotes in text."));It("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:In.black,hcLight:"#F2F2F2"},W("textCodeBlockBackground","Background color for code blocks in text."));It("sash.hoverBorder",NL,W("sashActiveBorder","Border color of active sashes."));const f1e=It("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:In.black,hcLight:"#0F4A85"},W("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),Q_i=It("badge.foreground",{dark:In.white,light:"#333",hcDark:In.white,hcLight:In.white},W("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),L$e=It("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},W("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),NTt=It("scrollbarSlider.background",{dark:In.fromHex("#797979").transparent(.4),light:In.fromHex("#646464").transparent(.4),hcDark:hc(bl,.6),hcLight:hc(bl,.4)},W("scrollbarSliderBackground","Scrollbar slider background color.")),LTt=It("scrollbarSlider.hoverBackground",{dark:In.fromHex("#646464").transparent(.7),light:In.fromHex("#646464").transparent(.7),hcDark:hc(bl,.8),hcLight:hc(bl,.8)},W("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),PTt=It("scrollbarSlider.activeBackground",{dark:In.fromHex("#BFBFBF").transparent(.4),light:In.fromHex("#000000").transparent(.6),hcDark:bl,hcLight:bl},W("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),Z_i=It("progressBar.background",{dark:In.fromHex("#0E70C0"),light:In.fromHex("#0E70C0"),hcDark:bl,hcLight:bl},W("progressBarBackground","Background color of the progress bar that can show for long running operations.")),wT=It("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:In.black,hcLight:In.white},W("editorBackground","Editor background color.")),HL=It("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:In.white,hcLight:kc},W("editorForeground","Editor default foreground color."));It("editorStickyScroll.background",wT,W("editorStickyScrollBackground","Background color of sticky scroll in the editor"));It("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:In.fromHex("#0F4A85").transparent(.1)},W("editorStickyScrollHoverBackground","Background color of sticky scroll on hover in the editor"));It("editorStickyScroll.border",{dark:null,light:null,hcDark:bl,hcLight:bl},W("editorStickyScrollBorder","Border color of sticky scroll in the editor"));It("editorStickyScroll.shadow",L$e,W("editorStickyScrollShadow"," Shadow color of sticky scroll in the editor"));const Cw=It("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:In.white},W("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),ewe=It("editorWidget.foreground",kc,W("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),P$e=It("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:bl,hcLight:bl},W("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget."));It("editorWidget.resizeBorder",null,W("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget."));It("editorError.background",null,W("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0);const twe=It("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},W("editorError.foreground","Foreground color of error squigglies in the editor.")),Y_i=It("editorError.border",{dark:null,light:null,hcDark:In.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},W("errorBorder","If set, color of double underlines for errors in the editor.")),epi=It("editorWarning.background",null,W("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),u6=It("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},W("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),Gne=It("editorWarning.border",{dark:null,light:null,hcDark:In.fromHex("#FFCC00").transparent(.8),hcLight:In.fromHex("#FFCC00").transparent(.8)},W("warningBorder","If set, color of double underlines for warnings in the editor."));It("editorInfo.background",null,W("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0);const LL=It("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},W("editorInfo.foreground","Foreground color of info squigglies in the editor.")),Kne=It("editorInfo.border",{dark:null,light:null,hcDark:In.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},W("infoBorder","If set, color of double underlines for infos in the editor.")),tpi=It("editorHint.foreground",{dark:In.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},W("editorHint.foreground","Foreground color of hint squigglies in the editor."));It("editorHint.border",{dark:null,light:null,hcDark:In.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},W("hintBorder","If set, color of double underlines for hints in the editor."));const ipi=It("editorLink.activeForeground",{dark:"#4E94CE",light:In.blue,hcDark:In.cyan,hcLight:"#292929"},W("activeLinkForeground","Color of active links.")),PM=It("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},W("editorSelectionBackground","Color of the editor selection.")),npi=It("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:In.white},W("editorSelectionForeground","Color of the selected text for high contrast.")),ATt=It("editor.inactiveSelectionBackground",{light:hc(PM,.5),dark:hc(PM,.5),hcDark:hc(PM,.7),hcLight:hc(PM,.5)},W("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),A$e=It("editor.selectionHighlightBackground",{light:wbt(PM,wT,.3,.6),dark:wbt(PM,wT,.3,.6),hcDark:null,hcLight:null},W("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0);It("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:yf,hcLight:yf},W("editorSelectionHighlightBorder","Border color for regions with the same content as the selection."));It("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},W("editorFindMatch","Color of the current search match."));const rpi=It("editor.findMatchForeground",null,W("editorFindMatchForeground","Text color of the current search match.")),H4=It("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},W("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),spi=It("editor.findMatchHighlightForeground",null,W("findMatchHighlightForeground","Foreground color of the other search matches."),!0);It("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},W("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0);It("editor.findMatchBorder",{light:null,dark:null,hcDark:yf,hcLight:yf},W("editorFindMatchBorder","Border color of the current search match."));const AM=It("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:yf,hcLight:yf},W("findMatchHighlightBorder","Border color of the other search matches.")),opi=It("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:hc(yf,.4),hcLight:hc(yf,.4)},W("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0);It("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},W("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0);const Tye=It("editorHoverWidget.background",Cw,W("hoverBackground","Background color of the editor hover."));It("editorHoverWidget.foreground",ewe,W("hoverForeground","Foreground color of the editor hover."));const OTt=It("editorHoverWidget.border",P$e,W("hoverBorder","Border color of the editor hover."));It("editorHoverWidget.statusBarBackground",{dark:FE(Tye,.2),light:eW(Tye,.05),hcDark:Cw,hcLight:Cw},W("statusBarBackground","Background color of the editor hover status bar."));const O$e=It("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:In.white,hcLight:In.black},W("editorInlayHintForeground","Foreground color of inline hints")),M$e=It("editorInlayHint.background",{dark:hc(f1e,.1),light:hc(f1e,.1),hcDark:hc(In.white,.1),hcLight:hc(f1e,.1)},W("editorInlayHintBackground","Background color of inline hints")),api=It("editorInlayHint.typeForeground",O$e,W("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),cpi=It("editorInlayHint.typeBackground",M$e,W("editorInlayHintBackgroundTypes","Background color of inline hints for types")),lpi=It("editorInlayHint.parameterForeground",O$e,W("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),upi=It("editorInlayHint.parameterBackground",M$e,W("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),dpi=It("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},W("editorLightBulbForeground","The color used for the lightbulb actions icon."));It("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},W("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon."));It("editorLightBulbAi.foreground",dpi,W("editorLightBulbAiForeground","The color used for the lightbulb AI icon."));It("editor.snippetTabstopHighlightBackground",{dark:new In(new El(124,124,124,.3)),light:new In(new El(10,50,100,.2)),hcDark:new In(new El(124,124,124,.3)),hcLight:new In(new El(10,50,100,.2))},W("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop."));It("editor.snippetTabstopHighlightBorder",null,W("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop."));It("editor.snippetFinalTabstopHighlightBackground",null,W("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet."));It("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new In(new El(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},W("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet."));const nVe=new In(new El(155,185,85,.2)),rVe=new In(new El(255,0,0,.2)),fpi=It("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},W("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),hpi=It("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},W("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0);It("diffEditor.insertedLineBackground",{dark:nVe,light:nVe,hcDark:null,hcLight:null},W("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0);It("diffEditor.removedLineBackground",{dark:rVe,light:rVe,hcDark:null,hcLight:null},W("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0);It("diffEditorGutter.insertedLineBackground",null,W("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted."));It("diffEditorGutter.removedLineBackground",null,W("diffEditorRemovedLineGutter","Background color for the margin where lines got removed."));const _pi=It("diffEditorOverview.insertedForeground",null,W("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content.")),ppi=It("diffEditorOverview.removedForeground",null,W("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content."));It("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},W("diffEditorInsertedOutline","Outline color for the text that got inserted."));It("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},W("diffEditorRemovedOutline","Outline color for text that got removed."));It("diffEditor.border",{dark:null,light:null,hcDark:bl,hcLight:bl},W("diffEditorBorder","Border color between the two text editors."));It("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},W("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views."));It("diffEditor.unchangedRegionBackground","sideBar.background",W("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor."));It("diffEditor.unchangedRegionForeground","foreground",W("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor."));It("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},W("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor."));const vJ=It("widget.shadow",{dark:hc(In.black,.36),light:hc(In.black,.16),hcDark:null,hcLight:null},W("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),MTt=It("widget.border",{dark:null,light:null,hcDark:bl,hcLight:bl},W("widgetBorder","Border color of widgets such as find/replace inside the editor.")),kbt=It("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},W("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse"));It("toolbar.hoverOutline",{dark:null,light:null,hcDark:yf,hcLight:yf},W("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse"));It("toolbar.activeBackground",{dark:FE(kbt,.1),light:eW(kbt,.1),hcDark:null,hcLight:null},W("toolbarActiveBackground","Toolbar background when holding the mouse over actions"));const mpi=It("breadcrumb.foreground",hc(kc,.8),W("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),gpi=It("breadcrumb.background",wT,W("breadcrumbsBackground","Background color of breadcrumb items.")),Tbt=It("breadcrumb.focusForeground",{light:eW(kc,.2),dark:FE(kc,.1),hcDark:FE(kc,.1),hcLight:FE(kc,.1)},W("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),ypi=It("breadcrumb.activeSelectionForeground",{light:eW(kc,.2),dark:FE(kc,.1),hcDark:FE(kc,.1),hcLight:FE(kc,.1)},W("breadcrumbsSelectedForeground","Color of selected breadcrumb items."));It("breadcrumbPicker.background",Cw,W("breadcrumbsSelectedBackground","Background color of breadcrumb item picker."));const RTt=.5,Dbt=In.fromHex("#40C8AE").transparent(RTt),Ebt=In.fromHex("#40A6FF").transparent(RTt),Ibt=In.fromHex("#606060").transparent(.4),R$e=.4,N$=1,sVe=It("merge.currentHeaderBackground",{dark:Dbt,light:Dbt,hcDark:null,hcLight:null},W("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);It("merge.currentContentBackground",hc(sVe,R$e),W("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const oVe=It("merge.incomingHeaderBackground",{dark:Ebt,light:Ebt,hcDark:null,hcLight:null},W("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);It("merge.incomingContentBackground",hc(oVe,R$e),W("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const aVe=It("merge.commonHeaderBackground",{dark:Ibt,light:Ibt,hcDark:null,hcLight:null},W("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);It("merge.commonContentBackground",hc(aVe,R$e),W("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const L$=It("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},W("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."));It("editorOverviewRuler.currentContentForeground",{dark:hc(sVe,N$),light:hc(sVe,N$),hcDark:L$,hcLight:L$},W("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts."));It("editorOverviewRuler.incomingContentForeground",{dark:hc(oVe,N$),light:hc(oVe,N$),hcDark:L$,hcLight:L$},W("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts."));It("editorOverviewRuler.commonContentForeground",{dark:hc(aVe,N$),light:hc(aVe,N$),hcDark:L$,hcLight:L$},W("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts."));const LFe=It("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:"#AB5A00"},W("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),FTt=It("editorOverviewRuler.selectionHighlightForeground","#A0A0A0CC",W("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),vpi=It("problemsErrorIcon.foreground",twe,W("problemsErrorIconForeground","The color used for the problems error icon.")),bpi=It("problemsWarningIcon.foreground",u6,W("problemsWarningIconForeground","The color used for the problems warning icon.")),Cpi=It("problemsInfoIcon.foreground",LL,W("problemsInfoIconForeground","The color used for the problems info icon.")),cVe=It("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},W("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),iwe=It("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},W("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),Nbt=It("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},W("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),Spi=It("minimap.infoHighlight",{dark:LL,light:LL,hcDark:Kne,hcLight:Kne},W("minimapInfo","Minimap marker color for infos.")),wpi=It("minimap.warningHighlight",{dark:u6,light:u6,hcDark:Gne,hcLight:Gne},W("overviewRuleWarning","Minimap marker color for warnings.")),xpi=It("minimap.errorHighlight",{dark:new In(new El(255,18,18,.7)),light:new In(new El(255,18,18,.7)),hcDark:new In(new El(255,50,50,1)),hcLight:"#B5200D"},W("minimapError","Minimap marker color for errors.")),kpi=It("minimap.background",null,W("minimapBackground","Minimap background color.")),Tpi=It("minimap.foregroundOpacity",In.fromHex("#000f"),W("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.'));It("minimapSlider.background",hc(NTt,.5),W("minimapSliderBackground","Minimap slider background color."));It("minimapSlider.hoverBackground",hc(LTt,.5),W("minimapSliderHoverBackground","Minimap slider background color when hovering."));It("minimapSlider.activeBackground",hc(PTt,.5),W("minimapSliderActiveBackground","Minimap slider background color when clicked on."));It("charts.foreground",kc,W("chartsForeground","The foreground color used in charts."));It("charts.lines",hc(kc,.5),W("chartsLines","The color used for horizontal lines in charts."));It("charts.red",twe,W("chartsRed","The red color used in chart visualizations."));It("charts.blue",LL,W("chartsBlue","The blue color used in chart visualizations."));It("charts.yellow",u6,W("chartsYellow","The yellow color used in chart visualizations."));It("charts.orange",cVe,W("chartsOrange","The orange color used in chart visualizations."));It("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},W("chartsGreen","The green color used in chart visualizations."));It("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},W("chartsPurple","The purple color used in chart visualizations."));const lVe=It("input.background",{dark:"#3C3C3C",light:In.white,hcDark:In.black,hcLight:In.white},W("inputBoxBackground","Input box background.")),BTt=It("input.foreground",kc,W("inputBoxForeground","Input box foreground.")),WTt=It("input.border",{dark:null,light:null,hcDark:bl,hcLight:bl},W("inputBoxBorder","Input box border.")),nwe=It("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:bl,hcLight:bl},W("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),Dpi=It("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},W("inputOption.hoverBackground","Background color of activated options in input fields.")),yse=It("inputOption.activeBackground",{dark:hc(NL,.4),light:hc(NL,.2),hcDark:In.transparent,hcLight:In.transparent},W("inputOption.activeBackground","Background hover color of options in input fields.")),rwe=It("inputOption.activeForeground",{dark:In.white,light:In.black,hcDark:kc,hcLight:kc},W("inputOption.activeForeground","Foreground color of activated options in input fields."));It("input.placeholderForeground",{light:hc(kc,.5),dark:hc(kc,.5),hcDark:hc(kc,.7),hcLight:hc(kc,.7)},W("inputPlaceholderForeground","Input box foreground color for placeholder text."));const Epi=It("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:In.black,hcLight:In.white},W("inputValidationInfoBackground","Input validation background color for information severity.")),Ipi=It("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:kc},W("inputValidationInfoForeground","Input validation foreground color for information severity.")),Npi=It("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:bl,hcLight:bl},W("inputValidationInfoBorder","Input validation border color for information severity.")),Lpi=It("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:In.black,hcLight:In.white},W("inputValidationWarningBackground","Input validation background color for warning severity.")),Ppi=It("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:kc},W("inputValidationWarningForeground","Input validation foreground color for warning severity.")),Api=It("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:bl,hcLight:bl},W("inputValidationWarningBorder","Input validation border color for warning severity.")),Opi=It("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:In.black,hcLight:In.white},W("inputValidationErrorBackground","Input validation background color for error severity.")),Mpi=It("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:kc},W("inputValidationErrorForeground","Input validation foreground color for error severity.")),Rpi=It("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:bl,hcLight:bl},W("inputValidationErrorBorder","Input validation border color for error severity.")),swe=It("dropdown.background",{dark:"#3C3C3C",light:In.white,hcDark:In.black,hcLight:In.white},W("dropdownBackground","Dropdown background.")),Fpi=It("dropdown.listBackground",{dark:null,light:null,hcDark:In.black,hcLight:In.white},W("dropdownListBackground","Dropdown list background.")),F$e=It("dropdown.foreground",{dark:"#F0F0F0",light:kc,hcDark:In.white,hcLight:kc},W("dropdownForeground","Dropdown foreground.")),B$e=It("dropdown.border",{dark:swe,light:"#CECECE",hcDark:bl,hcLight:bl},W("dropdownBorder","Dropdown border.")),VTt=It("button.foreground",In.white,W("buttonForeground","Button foreground color.")),Bpi=It("button.separator",hc(VTt,.4),W("buttonSeparator","Button separator color.")),iie=It("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},W("buttonBackground","Button background color.")),Wpi=It("button.hoverBackground",{dark:FE(iie,.2),light:eW(iie,.2),hcDark:iie,hcLight:iie},W("buttonHoverBackground","Button background color when hovering.")),Vpi=It("button.border",bl,W("buttonBorder","Button border color.")),Hpi=It("button.secondaryForeground",{dark:In.white,light:In.white,hcDark:In.white,hcLight:kc},W("buttonSecondaryForeground","Secondary button foreground color.")),uVe=It("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:In.white},W("buttonSecondaryBackground","Secondary button background color.")),jpi=It("button.secondaryHoverBackground",{dark:FE(uVe,.2),light:eW(uVe,.2),hcDark:null,hcLight:null},W("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),nie=It("radio.activeForeground",rwe,W("radioActiveForeground","Foreground color of active radio option.")),zpi=It("radio.activeBackground",yse,W("radioBackground","Background color of active radio option.")),Upi=It("radio.activeBorder",nwe,W("radioActiveBorder","Border color of the active radio option.")),qpi=It("radio.inactiveForeground",null,W("radioInactiveForeground","Foreground color of inactive radio option.")),$pi=It("radio.inactiveBackground",null,W("radioInactiveBackground","Background color of inactive radio option.")),Jpi=It("radio.inactiveBorder",{light:hc(nie,.2),dark:hc(nie,.2),hcDark:hc(nie,.4),hcLight:hc(nie,.2)},W("radioInactiveBorder","Border color of the inactive radio option.")),Gpi=It("radio.inactiveHoverBackground",Dpi,W("radioHoverBackground","Background color of inactive active radio option when hovering.")),Kpi=It("checkbox.background",swe,W("checkbox.background","Background color of checkbox widget."));It("checkbox.selectBackground",Cw,W("checkbox.select.background","Background color of checkbox widget when the element it's in is selected."));const Xpi=It("checkbox.foreground",F$e,W("checkbox.foreground","Foreground color of checkbox widget.")),Qpi=It("checkbox.border",B$e,W("checkbox.border","Border color of checkbox widget."));It("checkbox.selectBorder",kye,W("checkbox.select.border","Border color of checkbox widget when the element it's in is selected."));const Zpi=It("keybindingLabel.background",{dark:new In(new El(128,128,128,.17)),light:new In(new El(221,221,221,.4)),hcDark:In.transparent,hcLight:In.transparent},W("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),Ypi=It("keybindingLabel.foreground",{dark:In.fromHex("#CCCCCC"),light:In.fromHex("#555555"),hcDark:In.white,hcLight:kc},W("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),emi=It("keybindingLabel.border",{dark:new In(new El(51,51,51,.6)),light:new In(new El(204,204,204,.4)),hcDark:new In(new El(111,195,223)),hcLight:bl},W("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),tmi=It("keybindingLabel.bottomBorder",{dark:new In(new El(68,68,68,.6)),light:new In(new El(187,187,187,.4)),hcDark:new In(new El(111,195,223)),hcLight:kc},W("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),imi=It("list.focusBackground",null,W("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),nmi=It("list.focusForeground",null,W("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),rmi=It("list.focusOutline",{dark:NL,light:NL,hcDark:yf,hcLight:yf},W("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),smi=It("list.focusAndSelectionOutline",null,W("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),EB=It("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:In.fromHex("#0F4A85").transparent(.1)},W("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Xne=It("list.activeSelectionForeground",{dark:In.white,light:In.white,hcDark:null,hcLight:null},W("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),HTt=It("list.activeSelectionIconForeground",null,W("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),omi=It("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:In.fromHex("#0F4A85").transparent(.1)},W("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),ami=It("list.inactiveSelectionForeground",null,W("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),cmi=It("list.inactiveSelectionIconForeground",null,W("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),lmi=It("list.inactiveFocusBackground",null,W("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),umi=It("list.inactiveFocusOutline",null,W("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),jTt=It("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:In.white.transparent(.1),hcLight:In.fromHex("#0F4A85").transparent(.1)},W("listHoverBackground","List/Tree background when hovering over items using the mouse.")),zTt=It("list.hoverForeground",null,W("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),dmi=It("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},W("listDropBackground","List/Tree drag and drop background when moving items over other items when using the mouse.")),fmi=It("list.dropBetweenBackground",{dark:kye,light:kye,hcDark:null,hcLight:null},W("listDropBetweenBackground","List/Tree drag and drop border color when moving items between items when using the mouse.")),rq=It("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:NL,hcLight:NL},W("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),hmi=It("list.focusHighlightForeground",{dark:rq,light:K_i(EB,rq,"#BBE7FF"),hcDark:rq,hcLight:rq},W("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));It("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},W("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer."));It("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},W("listErrorForeground","Foreground color of list items containing errors."));It("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},W("listWarningForeground","Foreground color of list items containing warnings."));const _mi=It("listFilterWidget.background",{light:eW(Cw,0),dark:FE(Cw,0),hcDark:Cw,hcLight:Cw},W("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),pmi=It("listFilterWidget.outline",{dark:In.transparent,light:In.transparent,hcDark:"#f38518",hcLight:"#007ACC"},W("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),mmi=It("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:bl,hcLight:bl},W("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),gmi=It("listFilterWidget.shadow",vJ,W("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees."));It("list.filterMatchBackground",{dark:H4,light:H4,hcDark:null,hcLight:null},W("listFilterMatchHighlight","Background color of the filtered match."));It("list.filterMatchBorder",{dark:AM,light:AM,hcDark:bl,hcLight:yf},W("listFilterMatchHighlightBorder","Border color of the filtered match."));It("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},W("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized."));const UTt=It("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},W("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),ymi=It("tree.inactiveIndentGuidesStroke",hc(UTt,.4),W("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),vmi=It("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},W("tableColumnsBorder","Table border color between columns.")),bmi=It("tree.tableOddRowsBackground",{dark:hc(kc,.04),light:hc(kc,.04),hcDark:null,hcLight:null},W("tableOddRowsBackgroundColor","Background color for odd table rows."));It("editorActionList.background",Cw,W("editorActionListBackground","Action List background color."));It("editorActionList.foreground",ewe,W("editorActionListForeground","Action List foreground color."));It("editorActionList.focusForeground",Xne,W("editorActionListFocusForeground","Action List foreground color for the focused item."));It("editorActionList.focusBackground",EB,W("editorActionListFocusBackground","Action List background color for the focused item."));const Cmi=It("menu.border",{dark:null,light:null,hcDark:bl,hcLight:bl},W("menuBorder","Border color of menus.")),Smi=It("menu.foreground",F$e,W("menuForeground","Foreground color of menu items.")),wmi=It("menu.background",swe,W("menuBackground","Background color of menu items.")),xmi=It("menu.selectionForeground",Xne,W("menuSelectionForeground","Foreground color of the selected menu item in menus.")),kmi=It("menu.selectionBackground",EB,W("menuSelectionBackground","Background color of the selected menu item in menus.")),Tmi=It("menu.selectionBorder",{dark:null,light:null,hcDark:yf,hcLight:yf},W("menuSelectionBorder","Border color of the selected menu item in menus.")),Dmi=It("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:bl,hcLight:bl},W("menuSeparatorBackground","Color of a separator menu item in menus.")),Lbt=It("quickInput.background",Cw,W("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),Emi=It("quickInput.foreground",ewe,W("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),Imi=It("quickInputTitle.background",{dark:new In(new El(255,255,255,.105)),light:new In(new El(0,0,0,.06)),hcDark:"#000000",hcLight:In.white},W("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),qTt=It("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:In.white,hcLight:"#0F4A85"},W("pickerGroupForeground","Quick picker color for grouping labels.")),Nmi=It("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:In.white,hcLight:"#0F4A85"},W("pickerGroupBorder","Quick picker color for grouping borders.")),Pbt=It("quickInput.list.focusBackground",null,"",void 0,W("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),Qne=It("quickInputList.focusForeground",Xne,W("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),W$e=It("quickInputList.focusIconForeground",HTt,W("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),Zne=It("quickInputList.focusBackground",{dark:Jne(Pbt,EB),light:Jne(Pbt,EB),hcDark:null,hcLight:null},W("quickInput.listFocusBackground","Quick picker background color for the focused item."));It("search.resultsInfoForeground",{light:kc,dark:hc(kc,.65),hcDark:kc,hcLight:kc},W("search.resultsInfoForeground","Color of the text in the search viewlet's completion message."));It("searchEditor.findMatchBackground",{light:hc(H4,.66),dark:hc(H4,.66),hcDark:H4,hcLight:H4},W("searchEditor.queryMatch","Color of the Search Editor query matches."));It("searchEditor.findMatchBorder",{light:hc(AM,.66),dark:hc(AM,.66),hcDark:AM,hcLight:AM},W("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."));var Lmi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Abt=function(l,e){return function(i,n){e(i,n,l)}};const jL=jc("hoverService");let P$=class extends xi{get delay(){return this.isInstantlyHovering()?0:this._delay}constructor(e,i,n={},s,c){super(),this.placement=e,this.instantHover=i,this.overrideOptions=n,this.configurationService=s,this.hoverService=c,this.lastHoverHideTime=0,this.timeLimit=200,this.hoverDisposables=this._register(new wn),this._delay=this.configurationService.getValue("workbench.hover.delay"),this._register(this.configurationService.onDidChangeConfiguration(d=>{d.affectsConfiguration("workbench.hover.delay")&&(this._delay=this.configurationService.getValue("workbench.hover.delay"))}))}showHover(e,i){const n=typeof this.overrideOptions=="function"?this.overrideOptions(e,i):this.overrideOptions;this.hoverDisposables.clear();const s=Mm(e.target)?[e.target]:e.target.targetElements;for(const d of s)this.hoverDisposables.add(ph(d,"keydown",f=>{f.equals(9)&&this.hoverService.hideHover()}));const c=Mm(e.content)?void 0:e.content.toString();return this.hoverService.showHover({...e,...n,persistence:{hideOnKeyDown:!0,...n.persistence},id:c,appearance:{...e.appearance,compact:!0,skipFadeInAnimation:this.isInstantlyHovering(),...n.appearance}},i)}isInstantlyHovering(){return this.instantHover&&Date.now()-this.lastHoverHideTime<this.timeLimit}onDidHideHover(){this.hoverDisposables.clear(),this.instantHover&&(this.lastHoverHideTime=Date.now())}};P$=Lmi([Abt(3,Cc),Abt(4,jL)],P$);const b6=jc("contextViewService"),eS=jc("contextMenuService"),pu=jc("keybindingService");class bJ{constructor(){this._hooks=new wn,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,i){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;const n=this._onStopCallback;this._onStopCallback=null,e&&n&&n(i)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,i,n,s,c){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=s,this._onStopCallback=c;let d=e;try{e.setPointerCapture(i),this._hooks.add(fo(()=>{try{e.releasePointerCapture(i)}catch{}}))}catch{d=Eo(e)}this._hooks.add(en(d,br.POINTER_MOVE,f=>{if(f.buttons!==n){this.stopMonitoring(!0);return}f.preventDefault(),this._pointerMoveCallback(f)})),this._hooks.add(en(d,br.POINTER_UP,f=>this.stopMonitoring(!0)))}}function x_(l,e,i){let n=null,s=null;if(typeof i.value=="function"?(n="value",s=i.value,s.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof i.get=="function"&&(n="get",s=i.get),!s)throw new Error("not supported");const c=`$memoize$${e}`;i[n]=function(...d){return this.hasOwnProperty(c)||Object.defineProperty(this,c,{configurable:!1,enumerable:!1,writable:!1,value:s.apply(this,d)}),this[c]}}var Pmi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Ud;(function(l){l.Tap="-monaco-gesturetap",l.Change="-monaco-gesturechange",l.Start="-monaco-gesturestart",l.End="-monaco-gesturesend",l.Contextmenu="-monaco-gesturecontextmenu"})(Ud||(Ud={}));const w0=class w0 extends xi{constructor(){super(),this.dispatched=!1,this.targets=new _v,this.ignoreTargets=new _v,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(Tr.runAndSubscribe(OSe,({window:e,disposables:i})=>{i.add(en(e.document,"touchstart",n=>this.onTouchStart(n),{passive:!1})),i.add(en(e.document,"touchend",n=>this.onTouchEnd(e,n))),i.add(en(e.document,"touchmove",n=>this.onTouchMove(n),{passive:!1}))},{window:cd,disposables:this._store}))}static addTarget(e){if(!w0.isTouchDevice())return xi.None;w0.INSTANCE||(w0.INSTANCE=new w0);const i=w0.INSTANCE.targets.push(e);return fo(i)}static ignoreTarget(e){if(!w0.isTouchDevice())return xi.None;w0.INSTANCE||(w0.INSTANCE=new w0);const i=w0.INSTANCE.ignoreTargets.push(e);return fo(i)}static isTouchDevice(){return"ontouchstart"in cd||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){const i=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let n=0,s=e.targetTouches.length;n<s;n++){const c=e.targetTouches.item(n);this.activeTouches[c.identifier]={id:c.identifier,initialTarget:c.target,initialTimeStamp:i,initialPageX:c.pageX,initialPageY:c.pageY,rollingTimestamps:[i],rollingPageX:[c.pageX],rollingPageY:[c.pageY]};const d=this.newGestureEvent(Ud.Start,c.target);d.pageX=c.pageX,d.pageY=c.pageY,this.dispatchEvent(d)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}onTouchEnd(e,i){const n=Date.now(),s=Object.keys(this.activeTouches).length;for(let c=0,d=i.changedTouches.length;c<d;c++){const f=i.changedTouches.item(c);if(!this.activeTouches.hasOwnProperty(String(f.identifier))){console.warn("move of an UNKNOWN touch",f);continue}const m=this.activeTouches[f.identifier],v=Date.now()-m.initialTimeStamp;if(v<w0.HOLD_DELAY&&Math.abs(m.initialPageX-sk(m.rollingPageX))<30&&Math.abs(m.initialPageY-sk(m.rollingPageY))<30){const x=this.newGestureEvent(Ud.Tap,m.initialTarget);x.pageX=sk(m.rollingPageX),x.pageY=sk(m.rollingPageY),this.dispatchEvent(x)}else if(v>=w0.HOLD_DELAY&&Math.abs(m.initialPageX-sk(m.rollingPageX))<30&&Math.abs(m.initialPageY-sk(m.rollingPageY))<30){const x=this.newGestureEvent(Ud.Contextmenu,m.initialTarget);x.pageX=sk(m.rollingPageX),x.pageY=sk(m.rollingPageY),this.dispatchEvent(x)}else if(s===1){const x=sk(m.rollingPageX),w=sk(m.rollingPageY),I=sk(m.rollingTimestamps)-m.rollingTimestamps[0],P=x-m.rollingPageX[0],O=w-m.rollingPageY[0],z=[...this.targets].filter(J=>m.initialTarget instanceof Node&&J.contains(m.initialTarget));this.inertia(e,z,n,Math.abs(P)/I,P>0?1:-1,x,Math.abs(O)/I,O>0?1:-1,w)}this.dispatchEvent(this.newGestureEvent(Ud.End,m.initialTarget)),delete this.activeTouches[f.identifier]}this.dispatched&&(i.preventDefault(),i.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,i){const n=document.createEvent("CustomEvent");return n.initEvent(e,!1,!0),n.initialTarget=i,n.tapCount=0,n}dispatchEvent(e){if(e.type===Ud.Tap){const i=new Date().getTime();let n=0;i-this._lastSetTapCountTime>w0.CLEAR_TAP_COUNT_TIME?n=1:n=2,this._lastSetTapCountTime=i,e.tapCount=n}else(e.type===Ud.Change||e.type===Ud.Contextmenu)&&(this._lastSetTapCountTime=0);if(e.initialTarget instanceof Node){for(const n of this.ignoreTargets)if(n.contains(e.initialTarget))return;const i=[];for(const n of this.targets)if(n.contains(e.initialTarget)){let s=0,c=e.initialTarget;for(;c&&c!==n;)s++,c=c.parentElement;i.push([s,n])}i.sort((n,s)=>n[0]-s[0]);for(const[n,s]of i)s.dispatchEvent(e),this.dispatched=!0}}inertia(e,i,n,s,c,d,f,m,v){this.handle=ZC(e,()=>{const x=Date.now(),w=x-n;let I=0,P=0,O=!0;s+=w0.SCROLL_FRICTION*w,f+=w0.SCROLL_FRICTION*w,s>0&&(O=!1,I=c*s*w),f>0&&(O=!1,P=m*f*w);const z=this.newGestureEvent(Ud.Change);z.translationX=I,z.translationY=P,i.forEach(J=>J.dispatchEvent(z)),O||this.inertia(e,i,x,s,c,d+I,f,m,v+P)})}onTouchMove(e){const i=Date.now();for(let n=0,s=e.changedTouches.length;n<s;n++){const c=e.changedTouches.item(n);if(!this.activeTouches.hasOwnProperty(String(c.identifier))){console.warn("end of an UNKNOWN touch",c);continue}const d=this.activeTouches[c.identifier],f=this.newGestureEvent(Ud.Change,d.initialTarget);f.translationX=c.pageX-sk(d.rollingPageX),f.translationY=c.pageY-sk(d.rollingPageY),f.pageX=c.pageX,f.pageY=c.pageY,this.dispatchEvent(f),d.rollingPageX.length>3&&(d.rollingPageX.shift(),d.rollingPageY.shift(),d.rollingTimestamps.shift()),d.rollingPageX.push(c.pageX),d.rollingPageY.push(c.pageY),d.rollingTimestamps.push(i)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}};w0.SCROLL_FRICTION=-.005,w0.HOLD_DELAY=700,w0.CLEAR_TAP_COUNT_TIME=400;let y1=w0;Pmi([x_],y1,"isTouchDevice",null);let Aw=class extends xi{onclick(e,i){this._register(en(e,br.CLICK,n=>i(new hT(Eo(e),n))))}onmousedown(e,i){this._register(en(e,br.MOUSE_DOWN,n=>i(new hT(Eo(e),n))))}onmouseover(e,i){this._register(en(e,br.MOUSE_OVER,n=>i(new hT(Eo(e),n))))}onmouseleave(e,i){this._register(en(e,br.MOUSE_LEAVE,n=>i(new hT(Eo(e),n))))}onkeydown(e,i){this._register(en(e,br.KEY_DOWN,n=>i(new Id(n))))}onkeyup(e,i){this._register(en(e,br.KEY_UP,n=>i(new Id(n))))}oninput(e,i){this._register(en(e,br.INPUT,i))}onblur(e,i){this._register(en(e,br.BLUR,i))}onfocus(e,i){this._register(en(e,br.FOCUS,i))}ignoreGesture(e){return y1.ignoreTarget(e)}};const A$=11;class Ami extends Aw{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...zo.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width=A$+"px",this.domNode.style.height=A$+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new bJ),this._register(ph(this.bgDomNode,br.POINTER_DOWN,i=>this._arrowPointerDown(i))),this._register(ph(this.domNode,br.POINTER_DOWN,i=>this._arrowPointerDown(i))),this._pointerdownRepeatTimer=this._register(new l$e),this._pointerdownScheduleRepeatTimer=this._register(new TT)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const i=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,Eo(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(i,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,n=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}}class Omi extends xi{constructor(e,i,n){super(),this._visibility=e,this._visibleClassName=i,this._invisibleClassName=n,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new TT)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{var e;(e=this._domNode)==null||e.setClassName(this._visibleClassName)},0))}_hide(e){var i;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(i=this._domNode)==null||i.setClassName(this._invisibleClassName+(e?" fade":"")))}}const Mmi=140;class $Tt extends Aw{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new Omi(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new bJ),this._shouldRender=!0,this.domNode=_u(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(en(this.domNode.domNode,br.POINTER_DOWN,i=>this._domNodePointerDown(i)))}_createArrow(e){const i=this._register(new Ami(e));this.domNode.domNode.appendChild(i.bgDomNode),this.domNode.domNode.appendChild(i.domNode)}_createSlider(e,i,n,s){this.slider=_u(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(i),typeof n=="number"&&this.slider.setWidth(n),typeof s=="number"&&this.slider.setHeight(s),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(en(this.slider.domNode,br.POINTER_DOWN,c=>{c.button===0&&(c.preventDefault(),this._sliderPointerDown(c))})),this.onclick(this.slider.domNode,c=>{c.leftButton&&c.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){const i=this.domNode.domNode.getClientRects()[0].top,n=i+this._scrollbarState.getSliderPosition(),s=i+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),c=this._sliderPointerPosition(e);n<=c&&c<=s?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let i,n;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")i=e.offsetX,n=e.offsetY;else{const c=e_(this.domNode.domNode);i=e.pageX-c.left,n=e.pageY-c.top}const s=this._pointerDownRelativePosition(i,n);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(s):this._scrollbarState.getDesiredScrollPositionFromOffset(s)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const i=this._sliderPointerPosition(e),n=this._sliderOrthogonalPointerPosition(e),s=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,c=>{const d=this._sliderOrthogonalPointerPosition(c),f=Math.abs(d-n);if(I0&&f>Mmi){this._setDesiredScrollPositionNow(s.getScrollPosition());return}const v=this._sliderPointerPosition(c)-i;this._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(v))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const i={};this.writeScrollPosition(i,e),this._scrollable.setScrollPositionNow(i)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}const Rmi=20;class O${constructor(e,i,n,s,c,d){this._scrollbarSize=Math.round(i),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=s,this._scrollSize=c,this._scrollPosition=d,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new O$(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const i=Math.round(e);return this._visibleSize!==i?(this._visibleSize=i,this._refreshComputedValues(),!0):!1}setScrollSize(e){const i=Math.round(e);return this._scrollSize!==i?(this._scrollSize=i,this._refreshComputedValues(),!0):!1}setScrollPosition(e){const i=Math.round(e);return this._scrollPosition!==i?(this._scrollPosition=i,this._refreshComputedValues(),!0):!1}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,i,n,s,c){const d=Math.max(0,n-e),f=Math.max(0,d-2*i),m=s>0&&s>n;if(!m)return{computedAvailableSize:Math.round(d),computedIsNeeded:m,computedSliderSize:Math.round(f),computedSliderRatio:0,computedSliderPosition:0};const v=Math.round(Math.max(Rmi,Math.floor(n*f/s))),x=(f-v)/(s-n),w=c*x;return{computedAvailableSize:Math.round(d),computedIsNeeded:m,computedSliderSize:Math.round(v),computedSliderRatio:x,computedSliderPosition:Math.round(w)}}_refreshComputedValues(){const e=O$._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const i=e-this._arrowSize-this._computedSliderSize/2;return Math.round(i/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const i=e-this._arrowSize;let n=this._scrollPosition;return i<this._computedSliderPosition?n-=this._visibleSize:n+=this._visibleSize,n}getDesiredScrollPositionFromDelta(e){if(!this._computedIsNeeded)return 0;const i=this._computedSliderPosition+e;return Math.round(i/this._computedSliderRatio)}}class Fmi extends $Tt{constructor(e,i,n){const s=e.getScrollDimensions(),c=e.getCurrentScrollPosition();if(super({lazyRender:i.lazyRender,host:n,scrollbarState:new O$(i.horizontalHasArrows?i.arrowSize:0,i.horizontal===2?0:i.horizontalScrollbarSize,i.vertical===2?0:i.verticalScrollbarSize,s.width,s.scrollWidth,c.scrollLeft),visibility:i.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:i.scrollByPage}),i.horizontalHasArrows){const d=(i.arrowSize-A$)/2,f=(i.horizontalScrollbarSize-A$)/2;this._createArrow({className:"scra",icon:pr.scrollbarButtonLeft,top:f,left:d,bottom:void 0,right:void 0,bgWidth:i.arrowSize,bgHeight:i.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new xB(null,1,0))}),this._createArrow({className:"scra",icon:pr.scrollbarButtonRight,top:f,left:void 0,bottom:void 0,right:d,bgWidth:i.arrowSize,bgHeight:i.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new xB(null,-1,0))})}this._createSlider(Math.floor((i.horizontalScrollbarSize-i.horizontalSliderSize)/2),0,void 0,i.horizontalSliderSize)}_updateSlider(e,i){this.slider.setWidth(e),this.slider.setLeft(i)}_renderDomNode(e,i){this.domNode.setWidth(e),this.domNode.setHeight(i),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,i){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,i){e.scrollLeft=i}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class Bmi extends $Tt{constructor(e,i,n){const s=e.getScrollDimensions(),c=e.getCurrentScrollPosition();if(super({lazyRender:i.lazyRender,host:n,scrollbarState:new O$(i.verticalHasArrows?i.arrowSize:0,i.vertical===2?0:i.verticalScrollbarSize,0,s.height,s.scrollHeight,c.scrollTop),visibility:i.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:i.scrollByPage}),i.verticalHasArrows){const d=(i.arrowSize-A$)/2,f=(i.verticalScrollbarSize-A$)/2;this._createArrow({className:"scra",icon:pr.scrollbarButtonUp,top:d,left:f,bottom:void 0,right:void 0,bgWidth:i.verticalScrollbarSize,bgHeight:i.arrowSize,onActivate:()=>this._host.onMouseWheel(new xB(null,0,1))}),this._createArrow({className:"scra",icon:pr.scrollbarButtonDown,top:void 0,left:f,bottom:d,right:void 0,bgWidth:i.verticalScrollbarSize,bgHeight:i.arrowSize,onActivate:()=>this._host.onMouseWheel(new xB(null,0,-1))})}this._createSlider(0,Math.floor((i.verticalScrollbarSize-i.verticalSliderSize)/2),i.verticalSliderSize,void 0)}_updateSlider(e,i){this.slider.setHeight(e),this.slider.setTop(i)}_renderDomNode(e,i){this.domNode.setWidth(i),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,i){return i}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,i){e.scrollTop=i}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}class Dye{constructor(e,i,n,s,c,d,f){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(i=i|0,n=n|0,s=s|0,c=c|0,d=d|0,f=f|0),this.rawScrollLeft=s,this.rawScrollTop=f,i<0&&(i=0),s+i>n&&(s=n-i),s<0&&(s=0),c<0&&(c=0),f+c>d&&(f=d-c),f<0&&(f=0),this.width=i,this.scrollWidth=n,this.scrollLeft=s,this.height=c,this.scrollHeight=d,this.scrollTop=f}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,i){return new Dye(this._forceIntegerValues,typeof e.width<"u"?e.width:this.width,typeof e.scrollWidth<"u"?e.scrollWidth:this.scrollWidth,i?this.rawScrollLeft:this.scrollLeft,typeof e.height<"u"?e.height:this.height,typeof e.scrollHeight<"u"?e.scrollHeight:this.scrollHeight,i?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new Dye(this._forceIntegerValues,this.width,this.scrollWidth,typeof e.scrollLeft<"u"?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof e.scrollTop<"u"?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,i){const n=this.width!==e.width,s=this.scrollWidth!==e.scrollWidth,c=this.scrollLeft!==e.scrollLeft,d=this.height!==e.height,f=this.scrollHeight!==e.scrollHeight,m=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:i,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:s,scrollLeftChanged:c,heightChanged:d,scrollHeightChanged:f,scrollTopChanged:m}}}class CJ extends xi{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new gi),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new Dye(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,i){var s;const n=this._state.withScrollDimensions(e,i);this._setState(n,!!this._smoothScrolling),(s=this._smoothScrolling)==null||s.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const i=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(i,!1)}setScrollPositionSmooth(e,i){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};const n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;let s;i?s=new Yne(this._smoothScrolling.from,n,this._smoothScrolling.startTime,this._smoothScrolling.duration):s=this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=s}else{const n=this._state.withScrollPosition(e);this._smoothScrolling=Yne.start(this._state,n,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),i=this._state.withScrollPosition(e);if(this._setState(i,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,i){const n=this._state;n.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(n,i)))}}class Obt{constructor(e,i,n){this.scrollLeft=e,this.scrollTop=i,this.isDone=n}}function PFe(l,e){const i=e-l;return function(n){return l+i*Hmi(n)}}function Wmi(l,e,i){return function(n){return n<i?l(n/i):e((n-i)/(1-i))}}class Yne{constructor(e,i,n,s){this.from=e,this.to=i,this.duration=s,this.startTime=n,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,i,n){if(Math.abs(e-i)>2.5*n){let c,d;return e<i?(c=e+.75*n,d=i-.75*n):(c=e-.75*n,d=i+.75*n),Wmi(PFe(e,c),PFe(d,i),.33)}return PFe(e,i)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(e){this.to=e.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(e){const i=(e-this.startTime)/this.duration;if(i<1){const n=this.scrollLeft(i),s=this.scrollTop(i);return new Obt(n,s,!1)}return new Obt(this.to.scrollLeft,this.to.scrollTop,!0)}combine(e,i,n){return Yne.start(e,i,n)}static start(e,i,n){n=n+10;const s=Date.now()-10;return new Yne(e,i,s,n)}}function Vmi(l){return Math.pow(l,3)}function Hmi(l){return 1-Vmi(1-l)}const jmi=500,Mbt=50;class zmi{constructor(e,i,n){this.timestamp=e,this.deltaX=i,this.deltaY=n,this.score=0}}const nCe=class nCe{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let e=1,i=0,n=1,s=this._rear;do{const c=s===this._front?e:Math.pow(2,-n);if(e-=c,i+=this._memory[s].score*c,s===this._front)break;s=(this._capacity+s-1)%this._capacity,n++}while(!0);return i<=.5}acceptStandardWheelEvent(e){if(hse){const i=Eo(e.browserEvent),n=oui(i);this.accept(Date.now(),e.deltaX*n,e.deltaY*n)}else this.accept(Date.now(),e.deltaX,e.deltaY)}accept(e,i,n){let s=null;const c=new zmi(e,i,n);this._front===-1&&this._rear===-1?(this._memory[0]=c,this._front=0,this._rear=0):(s=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=c),c.score=this._computeScore(c,s)}_computeScore(e,i){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let n=.5;if((!this._isAlmostInt(e.deltaX)||!this._isAlmostInt(e.deltaY))&&(n+=.25),i){const s=Math.abs(e.deltaX),c=Math.abs(e.deltaY),d=Math.abs(i.deltaX),f=Math.abs(i.deltaY),m=Math.max(Math.min(s,d),1),v=Math.max(Math.min(c,f),1),x=Math.max(s,d),w=Math.max(c,f);x%m===0&&w%v===0&&(n-=.5)}return Math.min(Math.max(n,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}};nCe.INSTANCE=new nCe;let Eye=nCe;class V$e extends Aw{get options(){return this._options}constructor(e,i,n){super(),this._onScroll=this._register(new gi),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new gi),e.style.overflow="hidden",this._options=Umi(i),this._scrollable=n,this._register(this._scrollable.onScroll(c=>{this._onWillScroll.fire(c),this._onDidScroll(c),this._onScroll.fire(c)}));const s={onMouseWheel:c=>this._onMouseWheel(c),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new Bmi(this._scrollable,this._options,s)),this._horizontalScrollbar=this._register(new Fmi(this._scrollable,this._options,s)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=_u(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=_u(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=_u(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,c=>this._onMouseOver(c)),this.onmouseleave(this._listenOnDomNode,c=>this._onMouseLeave(c)),this._hideTimeout=this._register(new TT),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=vd(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,Hc&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new xB(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=vd(this._mouseWheelToDispose),e)){const n=s=>{this._onMouseWheel(new xB(s))};this._mouseWheelToDispose.push(en(this._listenOnDomNode,br.MOUSE_WHEEL,n,{passive:!1}))}}_onMouseWheel(e){var c;if((c=e.browserEvent)!=null&&c.defaultPrevented)return;const i=Eye.INSTANCE;i.acceptStandardWheelEvent(e);let n=!1;if(e.deltaY||e.deltaX){let d=e.deltaY*this._options.mouseWheelScrollSensitivity,f=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&f+d===0?f=d=0:Math.abs(d)>=Math.abs(f)?f=0:d=0),this._options.flipAxes&&([d,f]=[f,d]);const m=!Hc&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||m)&&!f&&(f=d,d=0),e.browserEvent&&e.browserEvent.altKey&&(f=f*this._options.fastScrollSensitivity,d=d*this._options.fastScrollSensitivity);const v=this._scrollable.getFutureScrollPosition();let x={};if(d){const w=Mbt*d,I=v.scrollTop-(w<0?Math.floor(w):Math.ceil(w));this._verticalScrollbar.writeScrollPosition(x,I)}if(f){const w=Mbt*f,I=v.scrollLeft-(w<0?Math.floor(w):Math.ceil(w));this._horizontalScrollbar.writeScrollPosition(x,I)}x=this._scrollable.validateScrollPosition(x),(v.scrollLeft!==x.scrollLeft||v.scrollTop!==x.scrollTop)&&(this._options.mouseWheelSmoothScroll&&i.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(x):this._scrollable.setScrollPositionNow(x),n=!0)}let s=n;!s&&this._options.alwaysConsumeMouseWheel&&(s=!0),!s&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(s=!0),s&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),i=e.scrollTop>0,n=e.scrollLeft>0,s=n?" left":"",c=i?" top":"",d=n||i?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${s}`),this._topShadowDomNode.setClassName(`shadow${c}`),this._topLeftShadowDomNode.setClassName(`shadow${d}${c}${s}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),jmi)}}class JTt extends V$e{constructor(e,i){i=i||{},i.mouseWheelSmoothScroll=!1;const n=new CJ({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:s=>ZC(Eo(e),s)});super(e,i,n),this._register(n)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class owe extends V$e{constructor(e,i,n){super(e,i,n)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class vse extends V$e{constructor(e,i){i=i||{},i.mouseWheelSmoothScroll=!1;const n=new CJ({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:s=>ZC(Eo(e),s)});super(e,i,n),this._register(n),this._element=e,this._register(this.onScroll(s=>{s.scrollTopChanged&&(this._element.scrollTop=s.scrollTop),s.scrollLeftChanged&&(this._element.scrollLeft=s.scrollLeft)})),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}function Umi(l){const e={lazyRender:typeof l.lazyRender<"u"?l.lazyRender:!1,className:typeof l.className<"u"?l.className:"",useShadows:typeof l.useShadows<"u"?l.useShadows:!0,handleMouseWheel:typeof l.handleMouseWheel<"u"?l.handleMouseWheel:!0,flipAxes:typeof l.flipAxes<"u"?l.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof l.consumeMouseWheelIfScrollbarIsNeeded<"u"?l.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof l.alwaysConsumeMouseWheel<"u"?l.alwaysConsumeMouseWheel:!1,scrollYToX:typeof l.scrollYToX<"u"?l.scrollYToX:!1,mouseWheelScrollSensitivity:typeof l.mouseWheelScrollSensitivity<"u"?l.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof l.fastScrollSensitivity<"u"?l.fastScrollSensitivity:5,scrollPredominantAxis:typeof l.scrollPredominantAxis<"u"?l.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof l.mouseWheelSmoothScroll<"u"?l.mouseWheelSmoothScroll:!0,arrowSize:typeof l.arrowSize<"u"?l.arrowSize:11,listenOnDomNode:typeof l.listenOnDomNode<"u"?l.listenOnDomNode:null,horizontal:typeof l.horizontal<"u"?l.horizontal:1,horizontalScrollbarSize:typeof l.horizontalScrollbarSize<"u"?l.horizontalScrollbarSize:10,horizontalSliderSize:typeof l.horizontalSliderSize<"u"?l.horizontalSliderSize:0,horizontalHasArrows:typeof l.horizontalHasArrows<"u"?l.horizontalHasArrows:!1,vertical:typeof l.vertical<"u"?l.vertical:1,verticalScrollbarSize:typeof l.verticalScrollbarSize<"u"?l.verticalScrollbarSize:10,verticalHasArrows:typeof l.verticalHasArrows<"u"?l.verticalHasArrows:!1,verticalSliderSize:typeof l.verticalSliderSize<"u"?l.verticalSliderSize:0,scrollByPage:typeof l.scrollByPage<"u"?l.scrollByPage:!1};return e.horizontalSliderSize=typeof l.horizontalSliderSize<"u"?l.horizontalSliderSize:e.horizontalScrollbarSize,e.verticalSliderSize=typeof l.verticalSliderSize<"u"?l.verticalSliderSize:e.verticalScrollbarSize,Hc&&(e.className+=" mac"),e}const t0e=Cr;let H$e=class extends xi{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new vse(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}};class awe extends xi{static render(e,i,n){return new awe(e,i,n)}constructor(e,i,n){super(),this.actionLabel=i.label,this.actionKeybindingLabel=n,this.actionContainer=jn(e,t0e("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=jn(this.actionContainer,t0e("a.action")),this.action.setAttribute("role","button"),i.iconClass&&jn(this.action,t0e(`span.icon.${i.iconClass}`));const s=jn(this.action,t0e("span"));s.textContent=n?`${i.label} (${n})`:i.label,this._store.add(new KTt(this.actionContainer,i.run)),this._store.add(new XTt(this.actionContainer,i.run,[3,10])),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}function GTt(l,e){return l&&e?W("acessibleViewHint","Inspect this in the accessible view with {0}.",e):l?W("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}class KTt extends xi{constructor(e,i){super(),this._register(en(e,br.CLICK,n=>{n.stopPropagation(),n.preventDefault(),i(e)}))}}class XTt extends xi{constructor(e,i,n){super(),this._register(en(e,br.KEY_DOWN,s=>{const c=new Id(s);n.some(d=>c.equals(d))&&(s.stopPropagation(),s.preventDefault(),i(e))}))}}const Rb=jc("openerService");function qmi(l){let e;const i=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(l.fragment);return i&&(e={startLineNumber:parseInt(i[1]),startColumn:i[2]?parseInt(i[2]):1,endLineNumber:i[4]?parseInt(i[4]):void 0,endColumn:i[4]?i[5]?parseInt(i[5]):1:void 0},l=l.with({fragment:""})),{selection:e,uri:l}}class Xc{get event(){return this.emitter.event}constructor(e,i,n){const s=c=>this.emitter.fire(c);this.emitter=new gi({onWillAddFirstListener:()=>e.addEventListener(i,s,n),onDidRemoveLastListener:()=>e.removeEventListener(i,s,n)})}dispose(){this.emitter.dispose()}}function $mi(l,e={}){const i=j$e(e);return i.textContent=l,i}function Jmi(l,e={}){const i=j$e(e);return QTt(i,Kmi(l,!!e.renderCodeSegments),e.actionHandler,e.renderCodeSegments),i}function j$e(l){const e=l.inline?"span":"div",i=document.createElement(e);return l.className&&(i.className=l.className),i}class Gmi{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function QTt(l,e,i,n){let s;if(e.type===2)s=document.createTextNode(e.content||"");else if(e.type===3)s=document.createElement("b");else if(e.type===4)s=document.createElement("i");else if(e.type===7&&n)s=document.createElement("code");else if(e.type===5&&i){const c=document.createElement("a");i.disposables.add(ph(c,"click",d=>{i.callback(String(e.index),d)})),s=c}else e.type===8?s=document.createElement("br"):e.type===1&&(s=l);s&&l!==s&&l.appendChild(s),s&&Array.isArray(e.children)&&e.children.forEach(c=>{QTt(s,c,i,n)})}function Kmi(l,e){const i={type:1,children:[]};let n=0,s=i;const c=[],d=new Gmi(l);for(;!d.eos();){let f=d.next();const m=f==="\\"&&dVe(d.peek(),e)!==0;if(m&&(f=d.next()),!m&&Xmi(f,e)&&f===d.peek()){d.advance(),s.type===2&&(s=c.pop());const v=dVe(f,e);if(s.type===v||s.type===5&&v===6)s=c.pop();else{const x={type:v,children:[]};v===5&&(x.index=n,n++),s.children.push(x),c.push(s),s=x}}else if(f===`
+`)s.type===2&&(s=c.pop()),s.children.push({type:8});else if(s.type!==2){const v={type:2,content:f};s.children.push(v),c.push(s),s=v}else s.content+=f}return s.type===2&&(s=c.pop()),i}function Xmi(l,e){return dVe(l,e)!==0}function dVe(l,e){switch(l){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return e?7:0;default:return 0}}const Qmi=new RegExp(`(\\\\)?\\$\\((${zo.iconNameExpression}(?:${zo.iconModifierExpression})?)\\)`,"g");function JM(l){const e=new Array;let i,n=0,s=0;for(;(i=Qmi.exec(l))!==null;){s=i.index||0,n<s&&e.push(l.substring(n,s)),n=(i.index||0)+i[0].length;const[,c,d]=i;e.push(c?`$(${d})`:IB({id:d}))}return n<l.length&&e.push(l.substring(n)),e}function IB(l){const e=Cr("span");return e.classList.add(...zo.asClassNameArray(l)),e}function Zmi(l){const e=Ymi(l);if(e&&e.length>0)return new Uint32Array(e)}let lw=0;const SM=new Uint32Array(10);function Ymi(l){if(lw=0,UN(l,AFe,4352),lw>0||(UN(l,OFe,4449),lw>0)||(UN(l,MFe,4520),lw>0)||(UN(l,hF,12593),lw))return SM.subarray(0,lw);if(l>=44032&&l<=55203){const e=l-44032,i=e%588,n=Math.floor(e/588),s=Math.floor(i/28),c=i%28-1;if(n<AFe.length?UN(n,AFe,0):4352+n-12593<hF.length&&UN(4352+n,hF,12593),s<OFe.length?UN(s,OFe,0):4449+s-12593<hF.length&&UN(4449+s-12593,hF,12593),c>=0&&(c<MFe.length?UN(c,MFe,0):4520+c-12593<hF.length&&UN(4520+c-12593,hF,12593)),lw>0)return SM.subarray(0,lw)}}function UN(l,e,i){l>=i&&l<i+e.length&&egi(e[l-i])}function egi(l){l!==0&&(SM[lw++]=l&255,l>>8&&(SM[lw++]=l>>8&255),l>>16&&(SM[lw++]=l>>16&255))}const AFe=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),OFe=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),MFe=new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),hF=new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]);function z$e(...l){return function(e,i){for(let n=0,s=l.length;n<s;n++){const c=l[n](e,i);if(c)return c}return null}}ZTt.bind(void 0,!1);const ere=ZTt.bind(void 0,!0);function ZTt(l,e,i){if(!i||i.length<e.length)return null;let n;return l?n=Yqe(i,e):n=i.indexOf(e)===0,n?e.length>0?[{start:0,end:e.length}]:[]:null}function YTt(l,e){const i=e.toLowerCase().indexOf(l.toLowerCase());return i===-1?null:[{start:i,end:i+l.length}]}function eDt(l,e){return fVe(l.toLowerCase(),e.toLowerCase(),0,0)}function fVe(l,e,i,n){if(i===l.length)return[];if(n===e.length)return null;if(l[i]===e[n]){let s=null;return(s=fVe(l,e,i+1,n+1))?$$e({start:n,end:n+1},s):null}return fVe(l,e,i,n+1)}function U$e(l){return 97<=l&&l<=122}function cwe(l){return 65<=l&&l<=90}function q$e(l){return 48<=l&&l<=57}function tDt(l){return l===32||l===9||l===10||l===13}const iDt=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(l=>iDt.add(l.charCodeAt(0)));function Iye(l){return tDt(l)||iDt.has(l)}function Rbt(l,e){return l===e||Iye(l)&&Iye(e)}const RFe=new Map;function Fbt(l){if(RFe.has(l))return RFe.get(l);let e;const i=Zmi(l);return i&&(e=i),RFe.set(l,e),e}function nDt(l){return U$e(l)||cwe(l)||q$e(l)}function $$e(l,e){return e.length===0?e=[l]:l.end===e[0].start?e[0].start=l.start:e.unshift(l),e}function rDt(l,e){for(let i=e;i<l.length;i++){const n=l.charCodeAt(i);if(cwe(n)||q$e(n)||i>0&&!nDt(l.charCodeAt(i-1)))return i}return l.length}function hVe(l,e,i,n){if(i===l.length)return[];if(n===e.length)return null;if(l[i]!==e[n].toLowerCase())return null;{let s=null,c=n+1;for(s=hVe(l,e,i+1,n+1);!s&&(c=rDt(e,c))<e.length;)s=hVe(l,e,i+1,c),c++;return s===null?null:$$e({start:n,end:n+1},s)}}function tgi(l){let e=0,i=0,n=0,s=0,c=0;for(let x=0;x<l.length;x++)c=l.charCodeAt(x),cwe(c)&&e++,U$e(c)&&i++,nDt(c)&&n++,q$e(c)&&s++;const d=e/l.length,f=i/l.length,m=n/l.length,v=s/l.length;return{upperPercent:d,lowerPercent:f,alphaPercent:m,numericPercent:v}}function igi(l){const{upperPercent:e,lowerPercent:i}=l;return i===0&&e>.6}function ngi(l){const{upperPercent:e,lowerPercent:i,alphaPercent:n,numericPercent:s}=l;return i>.2&&e<.8&&n>.6&&s<.2}function rgi(l){let e=0,i=0,n=0,s=0;for(let c=0;c<l.length;c++)n=l.charCodeAt(c),cwe(n)&&e++,U$e(n)&&i++,tDt(n)&&s++;return(e===0||i===0)&&s===0?l.length<=30:e<=5}function sDt(l,e){if(!e||(e=e.trim(),e.length===0)||!rgi(l))return null;e.length>60&&(e=e.substring(0,60));const i=tgi(e);if(!ngi(i)){if(!igi(i))return null;e=e.toLowerCase()}let n=null,s=0;for(l=l.toLowerCase();s<e.length&&(n=hVe(l,e,0,s))===null;)s=rDt(e,s+1);return n}function sgi(l,e,i=!1){if(!e||e.length===0)return null;let n=null,s=0;for(l=l.toLowerCase(),e=e.toLowerCase();s<e.length&&(n=_Ve(l,e,0,s,i),n===null);)s=oDt(e,s+1);return n}function _Ve(l,e,i,n,s){let c=0;if(i===l.length)return[];if(n===e.length)return null;if(!Rbt(l.charCodeAt(i),e.charCodeAt(n))){const m=Fbt(l.charCodeAt(i));if(!m)return null;for(let v=0;v<m.length;v++)if(!Rbt(m[v],e.charCodeAt(n+v)))return null;c+=m.length-1}let d=null,f=n+c+1;if(d=_Ve(l,e,i+1,f,s),!s)for(;!d&&(f=oDt(e,f))<e.length;)d=_Ve(l,e,i+1,f,s),f++;if(!d)return null;if(l.charCodeAt(i)!==e.charCodeAt(n)){const m=Fbt(l.charCodeAt(i));if(!m)return d;for(let v=0;v<m.length;v++)if(m[v]!==e.charCodeAt(n+v))return d}return $$e({start:n,end:n+c+1},d)}function oDt(l,e){for(let i=e;i<l.length;i++)if(Iye(l.charCodeAt(i))||i>0&&Iye(l.charCodeAt(i-1)))return i;return l.length}const ogi=z$e(ere,sDt,YTt),agi=z$e(ere,sDt,eDt),Bbt=new VL(1e4);function Wbt(l,e,i=!1){if(typeof l!="string"||typeof e!="string")return null;let n=Bbt.get(l);n||(n=new RegExp($li(l),"i"),Bbt.set(l,n));const s=n.exec(e);return s?[{start:s.index,end:s.index+s[0].length}]:i?agi(l,e):ogi(l,e)}function cgi(l,e){const i=NB(l,l.toLowerCase(),0,e,e.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return i?bse(i):null}function lgi(l,e,i,n,s,c){const d=Math.min(13,l.length);for(;i<d;i++){const f=NB(l,e,i,n,s,c,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(f)return f}return[0,c]}function bse(l){if(typeof l>"u")return[];const e=[],i=l[1];for(let n=l.length-1;n>1;n--){const s=l[n]+i,c=e[e.length-1];c&&c.end===s?c.end=s+1:e.push({start:s,end:s+1})}return e}const OM=128;function J$e(){const l=[],e=[];for(let i=0;i<=OM;i++)e[i]=0;for(let i=0;i<=OM;i++)l.push(e.slice(0));return l}function aDt(l){const e=[];for(let i=0;i<=l;i++)e[i]=0;return e}const cDt=aDt(2*OM),pVe=aDt(2*OM),u4=J$e(),_F=J$e(),i0e=J$e();function n0e(l,e){if(e<0||e>=l.length)return!1;const i=l.codePointAt(e);switch(i){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!n$e(i)}}function Vbt(l,e){if(e<0||e>=l.length)return!1;switch(l.charCodeAt(e)){case 32:case 9:return!0;default:return!1}}function h1e(l,e,i){return e[l]!==i[l]}function ugi(l,e,i,n,s,c,d=!1){for(;e<i&&s<c;)l[e]===n[s]&&(d&&(cDt[e]=s),e+=1),s+=1;return e===i}var BE;(function(l){l.Default=[-100,0];function e(i){return!i||i.length===2&&i[0]===-100&&i[1]===0}l.isDefault=e})(BE||(BE={}));const kKe=class kKe{constructor(e,i){this.firstMatchCanBeWeak=e,this.boostFullMatch=i}};kKe.default={boostFullMatch:!0,firstMatchCanBeWeak:!1};let tre=kKe;function NB(l,e,i,n,s,c,d=tre.default){const f=l.length>OM?OM:l.length,m=n.length>OM?OM:n.length;if(i>=f||c>=m||f-i>m-c||!ugi(e,i,f,s,c,m,!0))return;dgi(f,m,i,c,e,s);let v=1,x=1,w=i,I=c;const P=[!1];for(v=1,w=i;w<f;v++,w++){const ae=cDt[w],me=pVe[w],ye=w+1<f?pVe[w+1]:m;for(x=ae-c+1,I=ae;I<ye;x++,I++){let Ce=Number.MIN_SAFE_INTEGER,Fe=!1;I<=me&&(Ce=fgi(l,e,w,i,n,s,I,m,c,u4[v-1][x-1]===0,P));let rt=0;Ce!==Number.MAX_SAFE_INTEGER&&(Fe=!0,rt=Ce+_F[v-1][x-1]);const ct=I>ae,Mt=ct?_F[v][x-1]+(u4[v][x-1]>0?-5:0):0,Yt=I>ae+1&&u4[v][x-1]>0,Bi=Yt?_F[v][x-2]+(u4[v][x-2]>0?-5:0):0;if(Yt&&(!ct||Bi>=Mt)&&(!Fe||Bi>=rt))_F[v][x]=Bi,i0e[v][x]=3,u4[v][x]=0;else if(ct&&(!Fe||Mt>=rt))_F[v][x]=Mt,i0e[v][x]=2,u4[v][x]=0;else if(Fe)_F[v][x]=rt,i0e[v][x]=1,u4[v][x]=u4[v-1][x-1]+1;else throw new Error("not possible")}}if(!P[0]&&!d.firstMatchCanBeWeak)return;v--,x--;const O=[_F[v][x],c];let z=0,J=0;for(;v>=1;){let ae=x;do{const me=i0e[v][ae];if(me===3)ae=ae-2;else if(me===2)ae=ae-1;else break}while(ae>=1);z>1&&e[i+v-1]===s[c+x-1]&&!h1e(ae+c-1,n,s)&&z+1>u4[v][ae]&&(ae=x),ae===x?z++:z=1,J||(J=ae),v--,x=ae-1,O.push(x)}m-c===f&&d.boostFullMatch&&(O[0]+=2);const Y=J-f;return O[0]-=Y,O}function dgi(l,e,i,n,s,c){let d=l-1,f=e-1;for(;d>=i&&f>=n;)s[d]===c[f]&&(pVe[d]=f,d--),f--}function fgi(l,e,i,n,s,c,d,f,m,v,x){if(e[i]!==c[d])return Number.MIN_SAFE_INTEGER;let w=1,I=!1;return d===i-n?w=l[i]===s[d]?7:5:h1e(d,s,c)&&(d===0||!h1e(d-1,s,c))?(w=l[i]===s[d]?7:5,I=!0):n0e(c,d)&&(d===0||!n0e(c,d-1))?w=5:(n0e(c,d-1)||Vbt(c,d-1))&&(w=5,I=!0),w>1&&i===n&&(x[0]=!0),I||(I=h1e(d,s,c)||n0e(c,d-1)||Vbt(c,d-1)),i===n?d>m&&(w-=I?3:5):v?w+=I?2:0:w+=I?0:1,d+1===f&&(w-=I?3:5),w}function hgi(l,e,i,n,s,c,d){return _gi(l,e,i,n,s,c,!0,d)}function _gi(l,e,i,n,s,c,d,f){let m=NB(l,e,i,n,s,c,f);if(m&&!d)return m;if(l.length>=3){const v=Math.min(7,l.length-1);for(let x=i+1;x<v;x++){const w=pgi(l,x);if(w){const I=NB(w,w.toLowerCase(),i,n,s,c,f);I&&(I[0]-=3,(!m||I[0]>m[0])&&(m=I))}}}return m}function pgi(l,e){if(e+1>=l.length)return;const i=l[e],n=l[e+1];if(i!==n)return l.slice(0,e)+n+i+l.slice(e+2)}const mgi="$(",G$e=new RegExp(`\\$\\(${zo.iconNameExpression}(?:${zo.iconModifierExpression})?\\)`,"g"),ggi=new RegExp(`(\\\\)?${G$e.source}`,"g");function ygi(l){return l.replace(ggi,(e,i)=>i?e:`\\${e}`)}const vgi=new RegExp(`\\\\${G$e.source}`,"g");function bgi(l){return l.replace(vgi,e=>`\\${e}`)}const Cgi=new RegExp(`(\\s)?(\\\\)?${G$e.source}(\\s)?`,"g");function K$e(l){return l.indexOf(mgi)===-1?l:l.replace(Cgi,(e,i,n,s)=>n?e:i||s||"")}function Sgi(l){return l?l.replace(/\$\((.*?)\)/g,(e,i)=>` ${i} `).trim():""}const FFe=new RegExp(`\\$\\(${zo.iconNameCharacter}+\\)`,"g");function rie(l){FFe.lastIndex=0;let e="";const i=[];let n=0;for(;;){const s=FFe.lastIndex,c=FFe.exec(l),d=l.substring(s,c==null?void 0:c.index);if(d.length>0){e+=d;for(let f=0;f<d.length;f++)i.push(n)}if(!c)break;n+=c[0].length}return{text:e,iconOffsets:i}}function BFe(l,e,i=!1){const{text:n,iconOffsets:s}=e;if(!s||s.length===0)return Wbt(l,n,i);const c=use(n," "),d=n.length-c.length,f=Wbt(l,c,i);if(f)for(const m of f){const v=s[m.start+d]+d;m.start+=v,m.end+=v}return f}function YN(l){return Z1e(l,!0)}class wgi{constructor(e){this._ignorePathCasing=e}compare(e,i,n=!1){return e===i?0:Rne(this.getComparisonKey(e,n),this.getComparisonKey(i,n))}isEqual(e,i,n=!1){return e===i?!0:!e||!i?!1:this.getComparisonKey(e,n)===this.getComparisonKey(i,n)}getComparisonKey(e,i=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:i?null:void 0}).toString()}isEqualOrParent(e,i,n=!1){if(e.scheme===i.scheme){if(e.scheme===Ma.file)return iVe(YN(e),YN(i),this._ignorePathCasing(e))&&e.query===i.query&&(n||e.fragment===i.fragment);if(jbt(e.authority,i.authority))return iVe(e.path,i.path,this._ignorePathCasing(e),"/")&&e.query===i.query&&(n||e.fragment===i.fragment)}return!1}joinPath(e,...i){return yo.joinPath(e,...i)}basenameOrAuthority(e){return wk(e)||e.authority}basename(e){return q_.basename(e.path)}extname(e){return q_.extname(e.path)}dirname(e){if(e.path.length===0)return e;let i;return e.scheme===Ma.file?i=yo.file(zkt(YN(e))).path:(i=q_.dirname(e.path),e.authority&&i.length&&i.charCodeAt(0)!==47&&(console.error(`dirname("${e.toString})) resulted in a relative path`),i="/")),e.with({path:i})}normalizePath(e){if(!e.path.length)return e;let i;return e.scheme===Ma.file?i=yo.file(jkt(YN(e))).path:i=q_.normalize(e.path),e.with({path:i})}relativePath(e,i){if(e.scheme!==i.scheme||!jbt(e.authority,i.authority))return;if(e.scheme===Ma.file){const c=wli(YN(e),YN(i));return I0?CTt(c):c}let n=e.path||"/";const s=i.path||"/";if(this._ignorePathCasing(e)){let c=0;for(const d=Math.min(n.length,s.length);c<d&&!(n.charCodeAt(c)!==s.charCodeAt(c)&&n.charAt(c).toLowerCase()!==s.charAt(c).toLowerCase());c++);n=s.substr(0,c)+n.substr(c)}return q_.relative(n,s)}resolvePath(e,i){if(e.scheme===Ma.file){const n=yo.file(Sli(YN(e),i));return e.with({authority:n.authority,path:n.path})}return i=T_i(i),e.with({path:q_.resolve(e.path,i)})}isAbsolutePath(e){return!!e.path&&e.path[0]==="/"}isEqualAuthority(e,i){return e===i||e!==void 0&&i!==void 0&&eq(e,i)}hasTrailingPathSeparator(e,i=AE){if(e.scheme===Ma.file){const n=YN(e);return n.length>_bt(n).length&&n[n.length-1]===i}else{const n=e.path;return n.length>1&&n.charCodeAt(n.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,i=AE){return zbt(e,i)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,i=AE){let n=!1;if(e.scheme===Ma.file){const s=YN(e);n=s!==void 0&&s.length===_bt(s).length&&s[s.length-1]===i}else{i="/";const s=e.path;n=s.length===1&&s.charCodeAt(s.length-1)===47}return!n&&!zbt(e,i)?e.with({path:e.path+"/"}):e}}const vf=new wgi(()=>!1),ire=vf.isEqual.bind(vf);vf.isEqualOrParent.bind(vf);vf.getComparisonKey.bind(vf);const xgi=vf.basenameOrAuthority.bind(vf),wk=vf.basename.bind(vf),kgi=vf.extname.bind(vf),lwe=vf.dirname.bind(vf),Tgi=vf.joinPath.bind(vf),Dgi=vf.normalizePath.bind(vf),Egi=vf.relativePath.bind(vf),Hbt=vf.resolvePath.bind(vf);vf.isAbsolutePath.bind(vf);const jbt=vf.isEqualAuthority.bind(vf),zbt=vf.hasTrailingPathSeparator.bind(vf);vf.removeTrailingPathSeparator.bind(vf);vf.addTrailingPathSeparator.bind(vf);var kR;(function(l){l.META_DATA_LABEL="label",l.META_DATA_DESCRIPTION="description",l.META_DATA_SIZE="size",l.META_DATA_MIME="mime";function e(i){const n=new Map;i.path.substring(i.path.indexOf(";")+1,i.path.lastIndexOf(";")).split(";").forEach(d=>{const[f,m]=d.split(":");f&&m&&n.set(f,m)});const c=i.path.substring(0,i.path.indexOf(";"));return c&&n.set(l.META_DATA_MIME,c),n}l.parseMetaData=e})(kR||(kR={}));class m1{constructor(e="",i=!1){if(this.value=e,typeof this.value!="string")throw gk("value");typeof i=="boolean"?(this.isTrusted=i,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=i.isTrusted??void 0,this.supportThemeIcons=i.supportThemeIcons??!1,this.supportHtml=i.supportHtml??!1)}appendText(e,i=0){return this.value+=Ngi(this.supportThemeIcons?ygi(e):e).replace(/([ \t]+)/g,(n,s)=>"&nbsp;".repeat(s.length)).replace(/\>/gm,"\\>").replace(/\n/g,i===1?`\\
+`:`
+
+`),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,i){return this.value+=`
+${Lgi(i,e)}
+`,this}appendLink(e,i,n){return this.value+="[",this.value+=this._escape(i,"]"),this.value+="](",this.value+=this._escape(String(e),")"),n&&(this.value+=` "${this._escape(this._escape(n,'"'),")")}"`),this.value+=")",this}_escape(e,i){const n=new RegExp(Tw(i),"g");return e.replace(n,(s,c)=>e.charAt(c-1)!=="\\"?`\\${s}`:s)}}function M$(l){return WE(l)?!l.value:Array.isArray(l)?l.every(M$):!0}function WE(l){return l instanceof m1?!0:l&&typeof l=="object"?typeof l.value=="string"&&(typeof l.isTrusted=="boolean"||typeof l.isTrusted=="object"||l.isTrusted===void 0)&&(typeof l.supportThemeIcons=="boolean"||l.supportThemeIcons===void 0):!1}function Igi(l,e){return l===e?!0:!l||!e?!1:l.value===e.value&&l.isTrusted===e.isTrusted&&l.supportThemeIcons===e.supportThemeIcons&&l.supportHtml===e.supportHtml&&(l.baseUri===e.baseUri||!!l.baseUri&&!!e.baseUri&&ire(yo.from(l.baseUri),yo.from(e.baseUri)))}function Ngi(l){return l.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}function Lgi(l,e){var s;const i=((s=l.match(/^`+/gm))==null?void 0:s.reduce((c,d)=>c.length>d.length?c:d).length)??0,n=i>=3?i+1:3;return[`${"`".repeat(n)}${e}`,l,`${"`".repeat(n)}`].join(`
+`)}function r0e(l){return l.replace(/"/g,"&quot;")}function WFe(l){return l&&l.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}function Pgi(l){const e=[],i=l.split("|").map(s=>s.trim());l=i[0];const n=i[1];if(n){const s=/height=(\d+)/.exec(n),c=/width=(\d+)/.exec(n),d=s?s[1]:"",f=c?c[1]:"",m=isFinite(parseInt(f)),v=isFinite(parseInt(d));m&&e.push(`width="${f}"`),v&&e.push(`height="${d}"`)}return{href:l,dimensions:e}}class X$e{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const mVe=new X$e("id#");let C1={};(function(){function l(e,i){i(C1)}l.amd=!0,function(e,i){typeof l=="function"&&l.amd?l(["exports"],i):typeof exports=="object"&&typeof module<"u"?i(exports):(e=typeof globalThis<"u"?globalThis:e||self,i(e.marked={}))}(this,function(e){function i(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}e.defaults=i();function n(Fc){e.defaults=Fc}const s=/[&<>"']/,c=new RegExp(s.source,"g"),d=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,f=new RegExp(d.source,"g"),m={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},v=Fc=>m[Fc];function x(Fc,Jt){if(Jt){if(s.test(Fc))return Fc.replace(c,v)}else if(d.test(Fc))return Fc.replace(f,v);return Fc}const w=/(^|[^\[])\^/g;function I(Fc,Jt){let ti=typeof Fc=="string"?Fc:Fc.source;Jt=Jt||"";const oi={replace:(Vi,Li)=>{let hr=typeof Li=="string"?Li:Li.source;return hr=hr.replace(w,"$1"),ti=ti.replace(Vi,hr),oi},getRegex:()=>new RegExp(ti,Jt)};return oi}function P(Fc){try{Fc=encodeURI(Fc).replace(/%25/g,"%")}catch{return null}return Fc}const O={exec:()=>null};function z(Fc,Jt){const ti=Fc.replace(/\|/g,(Li,hr,wr)=>{let vo=!1,So=hr;for(;--So>=0&&wr[So]==="\\";)vo=!vo;return vo?"|":" |"}),oi=ti.split(/ \|/);let Vi=0;if(oi[0].trim()||oi.shift(),oi.length>0&&!oi[oi.length-1].trim()&&oi.pop(),Jt)if(oi.length>Jt)oi.splice(Jt);else for(;oi.length<Jt;)oi.push("");for(;Vi<oi.length;Vi++)oi[Vi]=oi[Vi].trim().replace(/\\\|/g,"|");return oi}function J(Fc,Jt,ti){const oi=Fc.length;if(oi===0)return"";let Vi=0;for(;Vi<oi;){const Li=Fc.charAt(oi-Vi-1);if(Li===Jt&&!ti)Vi++;else if(Li!==Jt&&ti)Vi++;else break}return Fc.slice(0,oi-Vi)}function Y(Fc,Jt){if(Fc.indexOf(Jt[1])===-1)return-1;let ti=0;for(let oi=0;oi<Fc.length;oi++)if(Fc[oi]==="\\")oi++;else if(Fc[oi]===Jt[0])ti++;else if(Fc[oi]===Jt[1]&&(ti--,ti<0))return oi;return-1}function ae(Fc,Jt,ti,oi){const Vi=Jt.href,Li=Jt.title?x(Jt.title):null,hr=Fc[1].replace(/\\([\[\]])/g,"$1");if(Fc[0].charAt(0)!=="!"){oi.state.inLink=!0;const wr={type:"link",raw:ti,href:Vi,title:Li,text:hr,tokens:oi.inlineTokens(hr)};return oi.state.inLink=!1,wr}return{type:"image",raw:ti,href:Vi,title:Li,text:x(hr)}}function me(Fc,Jt){const ti=Fc.match(/^(\s+)(?:```)/);if(ti===null)return Jt;const oi=ti[1];return Jt.split(`
+`).map(Vi=>{const Li=Vi.match(/^\s+/);if(Li===null)return Vi;const[hr]=Li;return hr.length>=oi.length?Vi.slice(oi.length):Vi}).join(`
+`)}class ye{constructor(Jt){fp(this,"options");fp(this,"rules");fp(this,"lexer");this.options=Jt||e.defaults}space(Jt){const ti=this.rules.block.newline.exec(Jt);if(ti&&ti[0].length>0)return{type:"space",raw:ti[0]}}code(Jt){const ti=this.rules.block.code.exec(Jt);if(ti){const oi=ti[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:ti[0],codeBlockStyle:"indented",text:this.options.pedantic?oi:J(oi,`
+`)}}}fences(Jt){const ti=this.rules.block.fences.exec(Jt);if(ti){const oi=ti[0],Vi=me(oi,ti[3]||"");return{type:"code",raw:oi,lang:ti[2]?ti[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):ti[2],text:Vi}}}heading(Jt){const ti=this.rules.block.heading.exec(Jt);if(ti){let oi=ti[2].trim();if(/#$/.test(oi)){const Vi=J(oi,"#");(this.options.pedantic||!Vi||/ $/.test(Vi))&&(oi=Vi.trim())}return{type:"heading",raw:ti[0],depth:ti[1].length,text:oi,tokens:this.lexer.inline(oi)}}}hr(Jt){const ti=this.rules.block.hr.exec(Jt);if(ti)return{type:"hr",raw:J(ti[0],`
+`)}}blockquote(Jt){const ti=this.rules.block.blockquote.exec(Jt);if(ti){let oi=J(ti[0],`
+`).split(`
+`),Vi="",Li="";const hr=[];for(;oi.length>0;){let wr=!1;const vo=[];let So;for(So=0;So<oi.length;So++)if(/^ {0,3}>/.test(oi[So]))vo.push(oi[So]),wr=!0;else if(!wr)vo.push(oi[So]);else break;oi=oi.slice(So);const zc=vo.join(`
+`),as=zc.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
+ $1`).replace(/^ {0,3}>[ \t]?/gm,"");Vi=Vi?`${Vi}
+${zc}`:zc,Li=Li?`${Li}
+${as}`:as;const $u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(as,hr,!0),this.lexer.state.top=$u,oi.length===0)break;const Af=hr[hr.length-1];if((Af==null?void 0:Af.type)==="code")break;if((Af==null?void 0:Af.type)==="blockquote"){const Ld=Af,Sa=Ld.raw+`
+`+oi.join(`
+`),Cn=this.blockquote(Sa);hr[hr.length-1]=Cn,Vi=Vi.substring(0,Vi.length-Ld.raw.length)+Cn.raw,Li=Li.substring(0,Li.length-Ld.text.length)+Cn.text;break}else if((Af==null?void 0:Af.type)==="list"){const Ld=Af,Sa=Ld.raw+`
+`+oi.join(`
+`),Cn=this.list(Sa);hr[hr.length-1]=Cn,Vi=Vi.substring(0,Vi.length-Af.raw.length)+Cn.raw,Li=Li.substring(0,Li.length-Ld.raw.length)+Cn.raw,oi=Sa.substring(hr[hr.length-1].raw.length).split(`
+`);continue}}return{type:"blockquote",raw:Vi,tokens:hr,text:Li}}}list(Jt){let ti=this.rules.block.list.exec(Jt);if(ti){let oi=ti[1].trim();const Vi=oi.length>1,Li={type:"list",raw:"",ordered:Vi,start:Vi?+oi.slice(0,-1):"",loose:!1,items:[]};oi=Vi?`\\d{1,9}\\${oi.slice(-1)}`:`\\${oi}`,this.options.pedantic&&(oi=Vi?oi:"[*+-]");const hr=new RegExp(`^( {0,3}${oi})((?:[ ][^\\n]*)?(?:\\n|$))`);let wr=!1;for(;Jt;){let vo=!1,So="",zc="";if(!(ti=hr.exec(Jt))||this.rules.block.hr.test(Jt))break;So=ti[0],Jt=Jt.substring(So.length);let as=ti[2].split(`
+`,1)[0].replace(/^\t+/,qs=>" ".repeat(3*qs.length)),$u=Jt.split(`
+`,1)[0],Af=!as.trim(),Ld=0;if(this.options.pedantic?(Ld=2,zc=as.trimStart()):Af?Ld=ti[1].length+1:(Ld=ti[2].search(/[^ ]/),Ld=Ld>4?1:Ld,zc=as.slice(Ld),Ld+=ti[1].length),Af&&/^ *$/.test($u)&&(So+=$u+`
+`,Jt=Jt.substring($u.length+1),vo=!0),!vo){const qs=new RegExp(`^ {0,${Math.min(3,Ld-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),ra=new RegExp(`^ {0,${Math.min(3,Ld-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),Jd=new RegExp(`^ {0,${Math.min(3,Ld-1)}}(?:\`\`\`|~~~)`),T_=new RegExp(`^ {0,${Math.min(3,Ld-1)}}#`);for(;Jt;){const wg=Jt.split(`
+`,1)[0];if($u=wg,this.options.pedantic&&($u=$u.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),Jd.test($u)||T_.test($u)||qs.test($u)||ra.test(Jt))break;if($u.search(/[^ ]/)>=Ld||!$u.trim())zc+=`
+`+$u.slice(Ld);else{if(Af||as.search(/[^ ]/)>=4||Jd.test(as)||T_.test(as)||ra.test(as))break;zc+=`
+`+$u}!Af&&!$u.trim()&&(Af=!0),So+=wg+`
+`,Jt=Jt.substring(wg.length+1),as=$u.slice(Ld)}}Li.loose||(wr?Li.loose=!0:/\n *\n *$/.test(So)&&(wr=!0));let Sa=null,Cn;this.options.gfm&&(Sa=/^\[[ xX]\] /.exec(zc),Sa&&(Cn=Sa[0]!=="[ ] ",zc=zc.replace(/^\[[ xX]\] +/,""))),Li.items.push({type:"list_item",raw:So,task:!!Sa,checked:Cn,loose:!1,text:zc,tokens:[]}),Li.raw+=So}Li.items[Li.items.length-1].raw=Li.items[Li.items.length-1].raw.trimEnd(),Li.items[Li.items.length-1].text=Li.items[Li.items.length-1].text.trimEnd(),Li.raw=Li.raw.trimEnd();for(let vo=0;vo<Li.items.length;vo++)if(this.lexer.state.top=!1,Li.items[vo].tokens=this.lexer.blockTokens(Li.items[vo].text,[]),!Li.loose){const So=Li.items[vo].tokens.filter(as=>as.type==="space"),zc=So.length>0&&So.some(as=>/\n.*\n/.test(as.raw));Li.loose=zc}if(Li.loose)for(let vo=0;vo<Li.items.length;vo++)Li.items[vo].loose=!0;return Li}}html(Jt){const ti=this.rules.block.html.exec(Jt);if(ti)return{type:"html",block:!0,raw:ti[0],pre:ti[1]==="pre"||ti[1]==="script"||ti[1]==="style",text:ti[0]}}def(Jt){const ti=this.rules.block.def.exec(Jt);if(ti){const oi=ti[1].toLowerCase().replace(/\s+/g," "),Vi=ti[2]?ti[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",Li=ti[3]?ti[3].substring(1,ti[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):ti[3];return{type:"def",tag:oi,raw:ti[0],href:Vi,title:Li}}}table(Jt){const ti=this.rules.block.table.exec(Jt);if(!ti||!/[:|]/.test(ti[2]))return;const oi=z(ti[1]),Vi=ti[2].replace(/^\||\| *$/g,"").split("|"),Li=ti[3]&&ti[3].trim()?ti[3].replace(/\n[ \t]*$/,"").split(`
+`):[],hr={type:"table",raw:ti[0],header:[],align:[],rows:[]};if(oi.length===Vi.length){for(const wr of Vi)/^ *-+: *$/.test(wr)?hr.align.push("right"):/^ *:-+: *$/.test(wr)?hr.align.push("center"):/^ *:-+ *$/.test(wr)?hr.align.push("left"):hr.align.push(null);for(let wr=0;wr<oi.length;wr++)hr.header.push({text:oi[wr],tokens:this.lexer.inline(oi[wr]),header:!0,align:hr.align[wr]});for(const wr of Li)hr.rows.push(z(wr,hr.header.length).map((vo,So)=>({text:vo,tokens:this.lexer.inline(vo),header:!1,align:hr.align[So]})));return hr}}lheading(Jt){const ti=this.rules.block.lheading.exec(Jt);if(ti)return{type:"heading",raw:ti[0],depth:ti[2].charAt(0)==="="?1:2,text:ti[1],tokens:this.lexer.inline(ti[1])}}paragraph(Jt){const ti=this.rules.block.paragraph.exec(Jt);if(ti){const oi=ti[1].charAt(ti[1].length-1)===`
+`?ti[1].slice(0,-1):ti[1];return{type:"paragraph",raw:ti[0],text:oi,tokens:this.lexer.inline(oi)}}}text(Jt){const ti=this.rules.block.text.exec(Jt);if(ti)return{type:"text",raw:ti[0],text:ti[0],tokens:this.lexer.inline(ti[0])}}escape(Jt){const ti=this.rules.inline.escape.exec(Jt);if(ti)return{type:"escape",raw:ti[0],text:x(ti[1])}}tag(Jt){const ti=this.rules.inline.tag.exec(Jt);if(ti)return!this.lexer.state.inLink&&/^<a /i.test(ti[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(ti[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(ti[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ti[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:ti[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:ti[0]}}link(Jt){const ti=this.rules.inline.link.exec(Jt);if(ti){const oi=ti[2].trim();if(!this.options.pedantic&&/^</.test(oi)){if(!/>$/.test(oi))return;const hr=J(oi.slice(0,-1),"\\");if((oi.length-hr.length)%2===0)return}else{const hr=Y(ti[2],"()");if(hr>-1){const vo=(ti[0].indexOf("!")===0?5:4)+ti[1].length+hr;ti[2]=ti[2].substring(0,hr),ti[0]=ti[0].substring(0,vo).trim(),ti[3]=""}}let Vi=ti[2],Li="";if(this.options.pedantic){const hr=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Vi);hr&&(Vi=hr[1],Li=hr[3])}else Li=ti[3]?ti[3].slice(1,-1):"";return Vi=Vi.trim(),/^</.test(Vi)&&(this.options.pedantic&&!/>$/.test(oi)?Vi=Vi.slice(1):Vi=Vi.slice(1,-1)),ae(ti,{href:Vi&&Vi.replace(this.rules.inline.anyPunctuation,"$1"),title:Li&&Li.replace(this.rules.inline.anyPunctuation,"$1")},ti[0],this.lexer)}}reflink(Jt,ti){let oi;if((oi=this.rules.inline.reflink.exec(Jt))||(oi=this.rules.inline.nolink.exec(Jt))){const Vi=(oi[2]||oi[1]).replace(/\s+/g," "),Li=ti[Vi.toLowerCase()];if(!Li){const hr=oi[0].charAt(0);return{type:"text",raw:hr,text:hr}}return ae(oi,Li,oi[0],this.lexer)}}emStrong(Jt,ti,oi=""){let Vi=this.rules.inline.emStrongLDelim.exec(Jt);if(!Vi||Vi[3]&&oi.match(/[\p{L}\p{N}]/u))return;if(!(Vi[1]||Vi[2]||"")||!oi||this.rules.inline.punctuation.exec(oi)){const hr=[...Vi[0]].length-1;let wr,vo,So=hr,zc=0;const as=Vi[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(as.lastIndex=0,ti=ti.slice(-1*Jt.length+hr);(Vi=as.exec(ti))!=null;){if(wr=Vi[1]||Vi[2]||Vi[3]||Vi[4]||Vi[5]||Vi[6],!wr)continue;if(vo=[...wr].length,Vi[3]||Vi[4]){So+=vo;continue}else if((Vi[5]||Vi[6])&&hr%3&&!((hr+vo)%3)){zc+=vo;continue}if(So-=vo,So>0)continue;vo=Math.min(vo,vo+So+zc);const $u=[...Vi[0]][0].length,Af=Jt.slice(0,hr+Vi.index+$u+vo);if(Math.min(hr,vo)%2){const Sa=Af.slice(1,-1);return{type:"em",raw:Af,text:Sa,tokens:this.lexer.inlineTokens(Sa)}}const Ld=Af.slice(2,-2);return{type:"strong",raw:Af,text:Ld,tokens:this.lexer.inlineTokens(Ld)}}}}codespan(Jt){const ti=this.rules.inline.code.exec(Jt);if(ti){let oi=ti[2].replace(/\n/g," ");const Vi=/[^ ]/.test(oi),Li=/^ /.test(oi)&&/ $/.test(oi);return Vi&&Li&&(oi=oi.substring(1,oi.length-1)),oi=x(oi,!0),{type:"codespan",raw:ti[0],text:oi}}}br(Jt){const ti=this.rules.inline.br.exec(Jt);if(ti)return{type:"br",raw:ti[0]}}del(Jt){const ti=this.rules.inline.del.exec(Jt);if(ti)return{type:"del",raw:ti[0],text:ti[2],tokens:this.lexer.inlineTokens(ti[2])}}autolink(Jt){const ti=this.rules.inline.autolink.exec(Jt);if(ti){let oi,Vi;return ti[2]==="@"?(oi=x(ti[1]),Vi="mailto:"+oi):(oi=x(ti[1]),Vi=oi),{type:"link",raw:ti[0],text:oi,href:Vi,tokens:[{type:"text",raw:oi,text:oi}]}}}url(Jt){var oi;let ti;if(ti=this.rules.inline.url.exec(Jt)){let Vi,Li;if(ti[2]==="@")Vi=x(ti[0]),Li="mailto:"+Vi;else{let hr;do hr=ti[0],ti[0]=((oi=this.rules.inline._backpedal.exec(ti[0]))==null?void 0:oi[0])??"";while(hr!==ti[0]);Vi=x(ti[0]),ti[1]==="www."?Li="http://"+ti[0]:Li=ti[0]}return{type:"link",raw:ti[0],text:Vi,href:Li,tokens:[{type:"text",raw:Vi,text:Vi}]}}}inlineText(Jt){const ti=this.rules.inline.text.exec(Jt);if(ti){let oi;return this.lexer.state.inRawBlock?oi=ti[0]:oi=x(ti[0]),{type:"text",raw:ti[0],text:oi}}}}const Ce=/^(?: *(?:\n|$))+/,Fe=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,rt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ct=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Mt=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Yt=/(?:[*+-]|\d{1,9}[.)])/,Bi=I(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Yt).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),$i=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,$t=/^[^\n]+/,Hi=/(?!\s*\])(?:\\.|[^\[\]\\])+/,An=I(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Hi).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),qt=I(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Yt).getRegex(),ms="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Wr=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Dr=I("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",Wr).replace("tag",ms).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Rr=I($i).replace("hr",ct).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ms).getRegex(),$d={blockquote:I(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Rr).getRegex(),code:Fe,def:An,fences:rt,heading:Mt,hr:ct,html:Dr,lheading:Bi,list:qt,newline:Ce,paragraph:Rr,table:O,text:$t},Ca=I("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ct).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ms).getRegex(),jl={...$d,table:Ca,paragraph:I($i).replace("hr",ct).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ca).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ms).getRegex()},es={...$d,html:I(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Wr).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:O,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:I($i).replace("hr",ct).replace("heading",` *#{1,6} *[^
+]`).replace("lheading",Bi).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ld=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,mp=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,of=/^( {2,}|\\)\n(?!\s*$)/,Bb=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,nm="\\p{P}\\p{S}",Nv=I(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,nm).getRegex(),Ft=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,Ey=I(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,nm).getRegex(),Js=I("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,nm).getRegex(),k6=I("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,nm).getRegex(),Nk=I(/\\([punct])/,"gu").replace(/punct/g,nm).getRegex(),_W=I(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),pW=I(Wr).replace("(?:-->|$)","-->").getRegex(),Wb=I("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",pW).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),eI=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Lk=I(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",eI).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),rm=I(/^!?\[(label)\]\[(ref)\]/).replace("label",eI).replace("ref",Hi).getRegex(),Iy=I(/^!?\[(ref)\](?:\[\])?/).replace("ref",Hi).getRegex(),i_=I("reflink|nolink(?!\\()","g").replace("reflink",rm).replace("nolink",Iy).getRegex(),Rw={_backpedal:O,anyPunctuation:Nk,autolink:_W,blockSkip:Ft,br:of,code:mp,del:O,emStrongLDelim:Ey,emStrongRDelimAst:Js,emStrongRDelimUnd:k6,escape:ld,link:Lk,nolink:Iy,punctuation:Nv,reflink:rm,reflinkSearch:i_,tag:Wb,text:Bb,url:O},T6={...Rw,link:I(/^!?\[(label)\]\((.*?)\)/).replace("label",eI).getRegex(),reflink:I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",eI).getRegex()},fn={...Rw,escape:I(ld).replace("])","~|])").getRegex(),url:I(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},rS={...fn,br:I(of).replace("{2,}","*").getRegex(),text:I(fn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Fw={normal:$d,gfm:jl,pedantic:es},Sr={normal:Rw,gfm:fn,breaks:rS,pedantic:T6};class mu{constructor(Jt){fp(this,"tokens");fp(this,"options");fp(this,"state");fp(this,"tokenizer");fp(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=Jt||e.defaults,this.options.tokenizer=this.options.tokenizer||new ye,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const ti={block:Fw.normal,inline:Sr.normal};this.options.pedantic?(ti.block=Fw.pedantic,ti.inline=Sr.pedantic):this.options.gfm&&(ti.block=Fw.gfm,this.options.breaks?ti.inline=Sr.breaks:ti.inline=Sr.gfm),this.tokenizer.rules=ti}static get rules(){return{block:Fw,inline:Sr}}static lex(Jt,ti){return new mu(ti).lex(Jt)}static lexInline(Jt,ti){return new mu(ti).inlineTokens(Jt)}lex(Jt){Jt=Jt.replace(/\r\n|\r/g,`
+`),this.blockTokens(Jt,this.tokens);for(let ti=0;ti<this.inlineQueue.length;ti++){const oi=this.inlineQueue[ti];this.inlineTokens(oi.src,oi.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(Jt,ti=[],oi=!1){this.options.pedantic?Jt=Jt.replace(/\t/g," ").replace(/^ +$/gm,""):Jt=Jt.replace(/^( *)(\t+)/gm,(wr,vo,So)=>vo+" ".repeat(So.length));let Vi,Li,hr;for(;Jt;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(wr=>(Vi=wr.call({lexer:this},Jt,ti))?(Jt=Jt.substring(Vi.raw.length),ti.push(Vi),!0):!1))){if(Vi=this.tokenizer.space(Jt)){Jt=Jt.substring(Vi.raw.length),Vi.raw.length===1&&ti.length>0?ti[ti.length-1].raw+=`
+`:ti.push(Vi);continue}if(Vi=this.tokenizer.code(Jt)){Jt=Jt.substring(Vi.raw.length),Li=ti[ti.length-1],Li&&(Li.type==="paragraph"||Li.type==="text")?(Li.raw+=`
+`+Vi.raw,Li.text+=`
+`+Vi.text,this.inlineQueue[this.inlineQueue.length-1].src=Li.text):ti.push(Vi);continue}if(Vi=this.tokenizer.fences(Jt)){Jt=Jt.substring(Vi.raw.length),ti.push(Vi);continue}if(Vi=this.tokenizer.heading(Jt)){Jt=Jt.substring(Vi.raw.length),ti.push(Vi);continue}if(Vi=this.tokenizer.hr(Jt)){Jt=Jt.substring(Vi.raw.length),ti.push(Vi);continue}if(Vi=this.tokenizer.blockquote(Jt)){Jt=Jt.substring(Vi.raw.length),ti.push(Vi);continue}if(Vi=this.tokenizer.list(Jt)){Jt=Jt.substring(Vi.raw.length),ti.push(Vi);continue}if(Vi=this.tokenizer.html(Jt)){Jt=Jt.substring(Vi.raw.length),ti.push(Vi);continue}if(Vi=this.tokenizer.def(Jt)){Jt=Jt.substring(Vi.raw.length),Li=ti[ti.length-1],Li&&(Li.type==="paragraph"||Li.type==="text")?(Li.raw+=`
+`+Vi.raw,Li.text+=`
+`+Vi.raw,this.inlineQueue[this.inlineQueue.length-1].src=Li.text):this.tokens.links[Vi.tag]||(this.tokens.links[Vi.tag]={href:Vi.href,title:Vi.title});continue}if(Vi=this.tokenizer.table(Jt)){Jt=Jt.substring(Vi.raw.length),ti.push(Vi);continue}if(Vi=this.tokenizer.lheading(Jt)){Jt=Jt.substring(Vi.raw.length),ti.push(Vi);continue}if(hr=Jt,this.options.extensions&&this.options.extensions.startBlock){let wr=1/0;const vo=Jt.slice(1);let So;this.options.extensions.startBlock.forEach(zc=>{So=zc.call({lexer:this},vo),typeof So=="number"&&So>=0&&(wr=Math.min(wr,So))}),wr<1/0&&wr>=0&&(hr=Jt.substring(0,wr+1))}if(this.state.top&&(Vi=this.tokenizer.paragraph(hr))){Li=ti[ti.length-1],oi&&(Li==null?void 0:Li.type)==="paragraph"?(Li.raw+=`
+`+Vi.raw,Li.text+=`
+`+Vi.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=Li.text):ti.push(Vi),oi=hr.length!==Jt.length,Jt=Jt.substring(Vi.raw.length);continue}if(Vi=this.tokenizer.text(Jt)){Jt=Jt.substring(Vi.raw.length),Li=ti[ti.length-1],Li&&Li.type==="text"?(Li.raw+=`
+`+Vi.raw,Li.text+=`
+`+Vi.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=Li.text):ti.push(Vi);continue}if(Jt){const wr="Infinite loop on byte: "+Jt.charCodeAt(0);if(this.options.silent){console.error(wr);break}else throw new Error(wr)}}return this.state.top=!0,ti}inline(Jt,ti=[]){return this.inlineQueue.push({src:Jt,tokens:ti}),ti}inlineTokens(Jt,ti=[]){let oi,Vi,Li,hr=Jt,wr,vo,So;if(this.tokens.links){const zc=Object.keys(this.tokens.links);if(zc.length>0)for(;(wr=this.tokenizer.rules.inline.reflinkSearch.exec(hr))!=null;)zc.includes(wr[0].slice(wr[0].lastIndexOf("[")+1,-1))&&(hr=hr.slice(0,wr.index)+"["+"a".repeat(wr[0].length-2)+"]"+hr.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(wr=this.tokenizer.rules.inline.blockSkip.exec(hr))!=null;)hr=hr.slice(0,wr.index)+"["+"a".repeat(wr[0].length-2)+"]"+hr.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(wr=this.tokenizer.rules.inline.anyPunctuation.exec(hr))!=null;)hr=hr.slice(0,wr.index)+"++"+hr.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;Jt;)if(vo||(So=""),vo=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(zc=>(oi=zc.call({lexer:this},Jt,ti))?(Jt=Jt.substring(oi.raw.length),ti.push(oi),!0):!1))){if(oi=this.tokenizer.escape(Jt)){Jt=Jt.substring(oi.raw.length),ti.push(oi);continue}if(oi=this.tokenizer.tag(Jt)){Jt=Jt.substring(oi.raw.length),Vi=ti[ti.length-1],Vi&&oi.type==="text"&&Vi.type==="text"?(Vi.raw+=oi.raw,Vi.text+=oi.text):ti.push(oi);continue}if(oi=this.tokenizer.link(Jt)){Jt=Jt.substring(oi.raw.length),ti.push(oi);continue}if(oi=this.tokenizer.reflink(Jt,this.tokens.links)){Jt=Jt.substring(oi.raw.length),Vi=ti[ti.length-1],Vi&&oi.type==="text"&&Vi.type==="text"?(Vi.raw+=oi.raw,Vi.text+=oi.text):ti.push(oi);continue}if(oi=this.tokenizer.emStrong(Jt,hr,So)){Jt=Jt.substring(oi.raw.length),ti.push(oi);continue}if(oi=this.tokenizer.codespan(Jt)){Jt=Jt.substring(oi.raw.length),ti.push(oi);continue}if(oi=this.tokenizer.br(Jt)){Jt=Jt.substring(oi.raw.length),ti.push(oi);continue}if(oi=this.tokenizer.del(Jt)){Jt=Jt.substring(oi.raw.length),ti.push(oi);continue}if(oi=this.tokenizer.autolink(Jt)){Jt=Jt.substring(oi.raw.length),ti.push(oi);continue}if(!this.state.inLink&&(oi=this.tokenizer.url(Jt))){Jt=Jt.substring(oi.raw.length),ti.push(oi);continue}if(Li=Jt,this.options.extensions&&this.options.extensions.startInline){let zc=1/0;const as=Jt.slice(1);let $u;this.options.extensions.startInline.forEach(Af=>{$u=Af.call({lexer:this},as),typeof $u=="number"&&$u>=0&&(zc=Math.min(zc,$u))}),zc<1/0&&zc>=0&&(Li=Jt.substring(0,zc+1))}if(oi=this.tokenizer.inlineText(Li)){Jt=Jt.substring(oi.raw.length),oi.raw.slice(-1)!=="_"&&(So=oi.raw.slice(-1)),vo=!0,Vi=ti[ti.length-1],Vi&&Vi.type==="text"?(Vi.raw+=oi.raw,Vi.text+=oi.text):ti.push(oi);continue}if(Jt){const zc="Infinite loop on byte: "+Jt.charCodeAt(0);if(this.options.silent){console.error(zc);break}else throw new Error(zc)}}return ti}}class n_{constructor(Jt){fp(this,"options");fp(this,"parser");this.options=Jt||e.defaults}space(Jt){return""}code({text:Jt,lang:ti,escaped:oi}){var hr;const Vi=(hr=(ti||"").match(/^\S*/))==null?void 0:hr[0],Li=Jt.replace(/\n$/,"")+`
+`;return Vi?'<pre><code class="language-'+x(Vi)+'">'+(oi?Li:x(Li,!0))+`</code></pre>
+`:"<pre><code>"+(oi?Li:x(Li,!0))+`</code></pre>
+`}blockquote({tokens:Jt}){return`<blockquote>
+${this.parser.parse(Jt)}</blockquote>
+`}html({text:Jt}){return Jt}heading({tokens:Jt,depth:ti}){return`<h${ti}>${this.parser.parseInline(Jt)}</h${ti}>
+`}hr(Jt){return`<hr>
+`}list(Jt){const ti=Jt.ordered,oi=Jt.start;let Vi="";for(let wr=0;wr<Jt.items.length;wr++){const vo=Jt.items[wr];Vi+=this.listitem(vo)}const Li=ti?"ol":"ul",hr=ti&&oi!==1?' start="'+oi+'"':"";return"<"+Li+hr+`>
+`+Vi+"</"+Li+`>
+`}listitem(Jt){let ti="";if(Jt.task){const oi=this.checkbox({checked:!!Jt.checked});Jt.loose?Jt.tokens.length>0&&Jt.tokens[0].type==="paragraph"?(Jt.tokens[0].text=oi+" "+Jt.tokens[0].text,Jt.tokens[0].tokens&&Jt.tokens[0].tokens.length>0&&Jt.tokens[0].tokens[0].type==="text"&&(Jt.tokens[0].tokens[0].text=oi+" "+Jt.tokens[0].tokens[0].text)):Jt.tokens.unshift({type:"text",raw:oi+" ",text:oi+" "}):ti+=oi+" "}return ti+=this.parser.parse(Jt.tokens,!!Jt.loose),`<li>${ti}</li>
+`}checkbox({checked:Jt}){return"<input "+(Jt?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:Jt}){return`<p>${this.parser.parseInline(Jt)}</p>
+`}table(Jt){let ti="",oi="";for(let Li=0;Li<Jt.header.length;Li++)oi+=this.tablecell(Jt.header[Li]);ti+=this.tablerow({text:oi});let Vi="";for(let Li=0;Li<Jt.rows.length;Li++){const hr=Jt.rows[Li];oi="";for(let wr=0;wr<hr.length;wr++)oi+=this.tablecell(hr[wr]);Vi+=this.tablerow({text:oi})}return Vi&&(Vi=`<tbody>${Vi}</tbody>`),`<table>
+<thead>
+`+ti+`</thead>
+`+Vi+`</table>
+`}tablerow({text:Jt}){return`<tr>
+${Jt}</tr>
+`}tablecell(Jt){const ti=this.parser.parseInline(Jt.tokens),oi=Jt.header?"th":"td";return(Jt.align?`<${oi} align="${Jt.align}">`:`<${oi}>`)+ti+`</${oi}>
+`}strong({tokens:Jt}){return`<strong>${this.parser.parseInline(Jt)}</strong>`}em({tokens:Jt}){return`<em>${this.parser.parseInline(Jt)}</em>`}codespan({text:Jt}){return`<code>${Jt}</code>`}br(Jt){return"<br>"}del({tokens:Jt}){return`<del>${this.parser.parseInline(Jt)}</del>`}link({href:Jt,title:ti,tokens:oi}){const Vi=this.parser.parseInline(oi),Li=P(Jt);if(Li===null)return Vi;Jt=Li;let hr='<a href="'+Jt+'"';return ti&&(hr+=' title="'+ti+'"'),hr+=">"+Vi+"</a>",hr}image({href:Jt,title:ti,text:oi}){const Vi=P(Jt);if(Vi===null)return oi;Jt=Vi;let Li=`<img src="${Jt}" alt="${oi}"`;return ti&&(Li+=` title="${ti}"`),Li+=">",Li}text(Jt){return"tokens"in Jt&&Jt.tokens?this.parser.parseInline(Jt.tokens):Jt.text}}class tI{strong({text:Jt}){return Jt}em({text:Jt}){return Jt}codespan({text:Jt}){return Jt}del({text:Jt}){return Jt}html({text:Jt}){return Jt}text({text:Jt}){return Jt}link({text:Jt}){return""+Jt}image({text:Jt}){return""+Jt}br(){return""}}class Mu{constructor(Jt){fp(this,"options");fp(this,"renderer");fp(this,"textRenderer");this.options=Jt||e.defaults,this.options.renderer=this.options.renderer||new n_,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new tI}static parse(Jt,ti){return new Mu(ti).parse(Jt)}static parseInline(Jt,ti){return new Mu(ti).parseInline(Jt)}parse(Jt,ti=!0){let oi="";for(let Vi=0;Vi<Jt.length;Vi++){const Li=Jt[Vi];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[Li.type]){const wr=Li,vo=this.options.extensions.renderers[wr.type].call({parser:this},wr);if(vo!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(wr.type)){oi+=vo||"";continue}}const hr=Li;switch(hr.type){case"space":{oi+=this.renderer.space(hr);continue}case"hr":{oi+=this.renderer.hr(hr);continue}case"heading":{oi+=this.renderer.heading(hr);continue}case"code":{oi+=this.renderer.code(hr);continue}case"table":{oi+=this.renderer.table(hr);continue}case"blockquote":{oi+=this.renderer.blockquote(hr);continue}case"list":{oi+=this.renderer.list(hr);continue}case"html":{oi+=this.renderer.html(hr);continue}case"paragraph":{oi+=this.renderer.paragraph(hr);continue}case"text":{let wr=hr,vo=this.renderer.text(wr);for(;Vi+1<Jt.length&&Jt[Vi+1].type==="text";)wr=Jt[++Vi],vo+=`
+`+this.renderer.text(wr);ti?oi+=this.renderer.paragraph({type:"paragraph",raw:vo,text:vo,tokens:[{type:"text",raw:vo,text:vo}]}):oi+=vo;continue}default:{const wr='Token with "'+hr.type+'" type was not found.';if(this.options.silent)return console.error(wr),"";throw new Error(wr)}}}return oi}parseInline(Jt,ti){ti=ti||this.renderer;let oi="";for(let Vi=0;Vi<Jt.length;Vi++){const Li=Jt[Vi];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[Li.type]){const wr=this.options.extensions.renderers[Li.type].call({parser:this},Li);if(wr!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(Li.type)){oi+=wr||"";continue}}const hr=Li;switch(hr.type){case"escape":{oi+=ti.text(hr);break}case"html":{oi+=ti.html(hr);break}case"link":{oi+=ti.link(hr);break}case"image":{oi+=ti.image(hr);break}case"strong":{oi+=ti.strong(hr);break}case"em":{oi+=ti.em(hr);break}case"codespan":{oi+=ti.codespan(hr);break}case"br":{oi+=ti.br(hr);break}case"del":{oi+=ti.del(hr);break}case"text":{oi+=ti.text(hr);break}default:{const wr='Token with "'+hr.type+'" type was not found.';if(this.options.silent)return console.error(wr),"";throw new Error(wr)}}}return oi}}class Bw{constructor(Jt){fp(this,"options");this.options=Jt||e.defaults}preprocess(Jt){return Jt}postprocess(Jt){return Jt}processAllTokens(Jt){return Jt}}fp(Bw,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class Vb{constructor(...Jt){fp(this,"defaults",i());fp(this,"options",this.setOptions);fp(this,"parse",this.parseMarkdown(mu.lex,Mu.parse));fp(this,"parseInline",this.parseMarkdown(mu.lexInline,Mu.parseInline));fp(this,"Parser",Mu);fp(this,"Renderer",n_);fp(this,"TextRenderer",tI);fp(this,"Lexer",mu);fp(this,"Tokenizer",ye);fp(this,"Hooks",Bw);this.use(...Jt)}walkTokens(Jt,ti){var Vi,Li;let oi=[];for(const hr of Jt)switch(oi=oi.concat(ti.call(this,hr)),hr.type){case"table":{const wr=hr;for(const vo of wr.header)oi=oi.concat(this.walkTokens(vo.tokens,ti));for(const vo of wr.rows)for(const So of vo)oi=oi.concat(this.walkTokens(So.tokens,ti));break}case"list":{const wr=hr;oi=oi.concat(this.walkTokens(wr.items,ti));break}default:{const wr=hr;(Li=(Vi=this.defaults.extensions)==null?void 0:Vi.childTokens)!=null&&Li[wr.type]?this.defaults.extensions.childTokens[wr.type].forEach(vo=>{const So=wr[vo].flat(1/0);oi=oi.concat(this.walkTokens(So,ti))}):wr.tokens&&(oi=oi.concat(this.walkTokens(wr.tokens,ti)))}}return oi}use(...Jt){const ti=this.defaults.extensions||{renderers:{},childTokens:{}};return Jt.forEach(oi=>{const Vi={...oi};if(Vi.async=this.defaults.async||Vi.async||!1,oi.extensions&&(oi.extensions.forEach(Li=>{if(!Li.name)throw new Error("extension name required");if("renderer"in Li){const hr=ti.renderers[Li.name];hr?ti.renderers[Li.name]=function(...wr){let vo=Li.renderer.apply(this,wr);return vo===!1&&(vo=hr.apply(this,wr)),vo}:ti.renderers[Li.name]=Li.renderer}if("tokenizer"in Li){if(!Li.level||Li.level!=="block"&&Li.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const hr=ti[Li.level];hr?hr.unshift(Li.tokenizer):ti[Li.level]=[Li.tokenizer],Li.start&&(Li.level==="block"?ti.startBlock?ti.startBlock.push(Li.start):ti.startBlock=[Li.start]:Li.level==="inline"&&(ti.startInline?ti.startInline.push(Li.start):ti.startInline=[Li.start]))}"childTokens"in Li&&Li.childTokens&&(ti.childTokens[Li.name]=Li.childTokens)}),Vi.extensions=ti),oi.renderer){const Li=this.defaults.renderer||new n_(this.defaults);for(const hr in oi.renderer){if(!(hr in Li))throw new Error(`renderer '${hr}' does not exist`);if(["options","parser"].includes(hr))continue;const wr=hr,vo=oi.renderer[wr],So=Li[wr];Li[wr]=(...zc)=>{let as=vo.apply(Li,zc);return as===!1&&(as=So.apply(Li,zc)),as||""}}Vi.renderer=Li}if(oi.tokenizer){const Li=this.defaults.tokenizer||new ye(this.defaults);for(const hr in oi.tokenizer){if(!(hr in Li))throw new Error(`tokenizer '${hr}' does not exist`);if(["options","rules","lexer"].includes(hr))continue;const wr=hr,vo=oi.tokenizer[wr],So=Li[wr];Li[wr]=(...zc)=>{let as=vo.apply(Li,zc);return as===!1&&(as=So.apply(Li,zc)),as}}Vi.tokenizer=Li}if(oi.hooks){const Li=this.defaults.hooks||new Bw;for(const hr in oi.hooks){if(!(hr in Li))throw new Error(`hook '${hr}' does not exist`);if(hr==="options")continue;const wr=hr,vo=oi.hooks[wr],So=Li[wr];Bw.passThroughHooks.has(hr)?Li[wr]=zc=>{if(this.defaults.async)return Promise.resolve(vo.call(Li,zc)).then($u=>So.call(Li,$u));const as=vo.call(Li,zc);return So.call(Li,as)}:Li[wr]=(...zc)=>{let as=vo.apply(Li,zc);return as===!1&&(as=So.apply(Li,zc)),as}}Vi.hooks=Li}if(oi.walkTokens){const Li=this.defaults.walkTokens,hr=oi.walkTokens;Vi.walkTokens=function(wr){let vo=[];return vo.push(hr.call(this,wr)),Li&&(vo=vo.concat(Li.call(this,wr))),vo}}this.defaults={...this.defaults,...Vi}}),this}setOptions(Jt){return this.defaults={...this.defaults,...Jt},this}lexer(Jt,ti){return mu.lex(Jt,ti??this.defaults)}parser(Jt,ti){return Mu.parse(Jt,ti??this.defaults)}parseMarkdown(Jt,ti){return(Vi,Li)=>{const hr={...Li},wr={...this.defaults,...hr},vo=this.onError(!!wr.silent,!!wr.async);if(this.defaults.async===!0&&hr.async===!1)return vo(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof Vi>"u"||Vi===null)return vo(new Error("marked(): input parameter is undefined or null"));if(typeof Vi!="string")return vo(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Vi)+", string expected"));if(wr.hooks&&(wr.hooks.options=wr),wr.async)return Promise.resolve(wr.hooks?wr.hooks.preprocess(Vi):Vi).then(So=>Jt(So,wr)).then(So=>wr.hooks?wr.hooks.processAllTokens(So):So).then(So=>wr.walkTokens?Promise.all(this.walkTokens(So,wr.walkTokens)).then(()=>So):So).then(So=>ti(So,wr)).then(So=>wr.hooks?wr.hooks.postprocess(So):So).catch(vo);try{wr.hooks&&(Vi=wr.hooks.preprocess(Vi));let So=Jt(Vi,wr);wr.hooks&&(So=wr.hooks.processAllTokens(So)),wr.walkTokens&&this.walkTokens(So,wr.walkTokens);let zc=ti(So,wr);return wr.hooks&&(zc=wr.hooks.postprocess(zc)),zc}catch(So){return vo(So)}}}onError(Jt,ti){return oi=>{if(oi.message+=`
+Please report this to https://github.com/markedjs/marked.`,Jt){const Vi="<p>An error occurred:</p><pre>"+x(oi.message+"",!0)+"</pre>";return ti?Promise.resolve(Vi):Vi}if(ti)return Promise.reject(oi);throw oi}}}const sm=new Vb;function Ra(Fc,Jt){return sm.parse(Fc,Jt)}Ra.options=Ra.setOptions=function(Fc){return sm.setOptions(Fc),Ra.defaults=sm.defaults,n(Ra.defaults),Ra},Ra.getDefaults=i,Ra.defaults=e.defaults,Ra.use=function(...Fc){return sm.use(...Fc),Ra.defaults=sm.defaults,n(Ra.defaults),Ra},Ra.walkTokens=function(Fc,Jt){return sm.walkTokens(Fc,Jt)},Ra.parseInline=sm.parseInline,Ra.Parser=Mu,Ra.parser=Mu.parse,Ra.Renderer=n_,Ra.TextRenderer=tI,Ra.Lexer=mu,Ra.lexer=mu.lex,Ra.Tokenizer=ye,Ra.Hooks=Bw,Ra.parse=Ra;const k_=Ra.options,ya=Ra.setOptions,D6=Ra.use,rl=Ra.walkTokens,va=Ra.parseInline,Bm=Ra,$L=Mu.parse,Sg=mu.lex;e.Hooks=Bw,e.Lexer=mu,e.Marked=Vb,e.Parser=Mu,e.Renderer=n_,e.TextRenderer=tI,e.Tokenizer=ye,e.getDefaults=i,e.lexer=Sg,e.marked=Ra,e.options=k_,e.parse=Bm,e.parseInline=va,e.parser=$L,e.setOptions=ya,e.use=D6,e.walkTokens=rl})})();C1.Hooks||exports.Hooks;C1.Lexer||exports.Lexer;C1.Marked||exports.Marked;C1.Parser||exports.Parser;var lDt=C1.Renderer||exports.Renderer;C1.TextRenderer||exports.TextRenderer;C1.Tokenizer||exports.Tokenizer;var Agi=C1.defaults||exports.defaults;C1.getDefaults||exports.getDefaults;var uwe=C1.lexer||exports.lexer;C1.marked||exports.marked;C1.options||exports.options;var uDt=C1.parse||exports.parse;C1.parseInline||exports.parseInline;var Ogi=C1.parser||exports.parser;C1.setOptions||exports.setOptions;C1.use||exports.use;C1.walkTokens||exports.walkTokens;function Mgi(l){return JSON.stringify(l,Rgi)}function gVe(l){let e=JSON.parse(l);return e=yVe(e),e}function Rgi(l,e){return e instanceof RegExp?{$mid:2,source:e.source,flags:e.flags}:e}function yVe(l,e=0){if(!l||e>200)return l;if(typeof l=="object"){switch(l.$mid){case 1:return yo.revive(l);case 2:return new RegExp(l.source,l.flags);case 17:return new Date(l.source)}if(l instanceof JSe||l instanceof Uint8Array)return l;if(Array.isArray(l))for(let i=0;i<l.length;++i)l[i]=yVe(l[i],e+1);else for(const i in l)Object.hasOwnProperty.call(l,i)&&(l[i]=yVe(l[i],e+1))}return l}const VFe=Object.freeze({image:({href:l,title:e,text:i})=>{let n=[],s=[];return l&&({href:l,dimensions:n}=Pgi(l),s.push(`src="${r0e(l)}"`)),i&&s.push(`alt="${r0e(i)}"`),e&&s.push(`title="${r0e(e)}"`),n.length&&(s=s.concat(n)),"<img "+s.join(" ")+">"},paragraph({tokens:l}){return`<p>${this.parser.parseInline(l)}</p>`},link({href:l,title:e,tokens:i}){let n=this.parser.parseInline(i);return typeof l!="string"?"":(l===n&&(n=WFe(n)),e=typeof e=="string"?r0e(WFe(e)):"",l=WFe(l),l=l.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),`<a href="${l}" title="${e||l}" draggable="false">${n}</a>`)}});function dwe(l,e={},i={}){const n=new wn;let s=!1;const c=j$e(e),d=function(z){let J;try{J=gVe(decodeURIComponent(z))}catch{}return J?(J=wkt(J,Y=>{if(l.uris&&l.uris[Y])return yo.revive(l.uris[Y])}),encodeURIComponent(JSON.stringify(J))):z},f=function(z,J){const Y=l.uris&&l.uris[z];let ae=yo.revive(Y);return J?z.startsWith(Ma.data+":")?z:(ae||(ae=yo.parse(z)),LSe.uriToBrowserUri(ae).toString(!0)):!ae||yo.parse(z).toString()===ae.toString()?z:(ae.query&&(ae=ae.with({query:d(ae.query)})),ae.toString())},m=new lDt;m.image=VFe.image,m.link=VFe.link,m.paragraph=VFe.paragraph;const v=[],x=[];if(e.codeBlockRendererSync?m.code=({text:z,lang:J})=>{const Y=mVe.nextId(),ae=e.codeBlockRendererSync(Ubt(J),z);return x.push([Y,ae]),`<div class="code" data-code="${Y}">${wie(z)}</div>`}:e.codeBlockRenderer&&(m.code=({text:z,lang:J})=>{const Y=mVe.nextId(),ae=e.codeBlockRenderer(Ubt(J),z);return v.push(ae.then(me=>[Y,me])),`<div class="code" data-code="${Y}">${wie(z)}</div>`}),e.actionHandler){const z=function(ae){let me=ae.target;if(!(me.tagName!=="A"&&(me=me.parentElement,!me||me.tagName!=="A")))try{let ye=me.dataset.href;ye&&(l.baseUri&&(ye=HFe(yo.from(l.baseUri),ye)),e.actionHandler.callback(ye,ae))}catch(ye){Pa(ye)}finally{ae.preventDefault()}},J=e.actionHandler.disposables.add(new Xc(c,"click")),Y=e.actionHandler.disposables.add(new Xc(c,"auxclick"));e.actionHandler.disposables.add(Tr.any(J.event,Y.event)(ae=>{const me=new hT(Eo(c),ae);!me.leftButton&&!me.middleButton||z(me)})),e.actionHandler.disposables.add(en(c,"keydown",ae=>{const me=new Id(ae);!me.equals(10)&&!me.equals(3)||z(me)}))}l.supportHtml||(m.html=({text:z})=>{var Y;return(Y=e.sanitizerOptions)!=null&&Y.replaceWithPlaintext?wie(z):(l.isTrusted?z.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0)?z:""}),i.renderer=m;let w=l.value??"";w.length>1e5&&(w=`${w.substr(0,1e5)}…`),l.supportThemeIcons&&(w=bgi(w));let I;if(e.fillInIncompleteTokens){const z={...Agi,...i},J=uwe(w,z),Y=Kgi(J);I=Ogi(Y,z)}else I=uDt(w,{...i,async:!1});l.supportThemeIcons&&(I=JM(I).map(J=>typeof J=="string"?J:J.outerHTML).join(""));const O=new DOMParser().parseFromString(vVe({isTrusted:l.isTrusted,...e.sanitizerOptions},I),"text/html");if(O.body.querySelectorAll("img, audio, video, source").forEach(z=>{const J=z.getAttribute("src");if(J){let Y=J;try{l.baseUri&&(Y=HFe(yo.from(l.baseUri),Y))}catch{}if(z.setAttribute("src",f(Y,!0)),e.remoteImageIsAllowed){const ae=yo.parse(Y);ae.scheme!==Ma.file&&ae.scheme!==Ma.data&&!e.remoteImageIsAllowed(ae)&&z.replaceWith(Cr("",void 0,z.outerHTML))}}}),O.body.querySelectorAll("a").forEach(z=>{const J=z.getAttribute("href");if(z.setAttribute("href",""),!J||/^data:|javascript:/i.test(J)||/^command:/i.test(J)&&!l.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(J))z.replaceWith(...z.childNodes);else{let Y=f(J,!1);l.baseUri&&(Y=HFe(yo.from(l.baseUri),J)),z.dataset.href=Y}}),c.innerHTML=vVe({isTrusted:l.isTrusted,...e.sanitizerOptions},O.body.innerHTML),v.length>0)Promise.all(v).then(z=>{var ae;if(s)return;const J=new Map(z),Y=c.querySelectorAll("div[data-code]");for(const me of Y){const ye=J.get(me.dataset.code??"");ye&&o0(me,ye)}(ae=e.asyncRenderCallback)==null||ae.call(e)});else if(x.length>0){const z=new Map(x),J=c.querySelectorAll("div[data-code]");for(const Y of J){const ae=z.get(Y.dataset.code??"");ae&&o0(Y,ae)}}if(e.asyncRenderCallback)for(const z of c.getElementsByTagName("img")){const J=n.add(en(z,"load",()=>{J.dispose(),e.asyncRenderCallback()}))}return{element:c,dispose:()=>{s=!0,n.dispose()}}}function Ubt(l){if(!l)return"";const e=l.split(/[\s+|:|,|\{|\?]/,1);return e.length?e[0]:l}function HFe(l,e){return/^\w[\w\d+.-]*:/.test(e)?e:l.path.endsWith("/")?Hbt(l,e).toString():Hbt(lwe(l),e).toString()}const Fgi=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function vVe(l,e){const{config:i,allowedSchemes:n}=Wgi(l),s=new wn;s.add(qbt("uponSanitizeAttribute",(c,d)=>{var f;if(d.attrName==="style"||d.attrName==="class"){if(c.tagName==="SPAN"){if(d.attrName==="style"){d.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(border-radius:[0-9]+px;)?$/.test(d.attrValue);return}else if(d.attrName==="class"){d.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(d.attrValue);return}}d.keepAttr=!1;return}else if(c.tagName==="INPUT"&&((f=c.attributes.getNamedItem("type"))==null?void 0:f.value)==="checkbox"){if(d.attrName==="type"&&d.attrValue==="checkbox"||d.attrName==="disabled"||d.attrName==="checked"){d.keepAttr=!0;return}d.keepAttr=!1}})),s.add(qbt("uponSanitizeElement",(c,d)=>{var f;if(d.tagName==="input"&&(((f=c.attributes.getNamedItem("type"))==null?void 0:f.value)==="checkbox"?c.setAttribute("disabled",""):l.replaceWithPlaintext||c.remove()),l.replaceWithPlaintext&&!d.allowedTags[d.tagName]&&d.tagName!=="body"&&c.parentElement){let m,v;if(d.tagName==="#comment")m=`<!--${c.textContent}-->`;else{const P=Fgi.includes(d.tagName),O=c.attributes.length?" "+Array.from(c.attributes).map(z=>`${z.name}="${z.value}"`).join(" "):"";m=`<${d.tagName}${O}>`,P||(v=`</${d.tagName}>`)}const x=document.createDocumentFragment(),w=c.parentElement.ownerDocument.createTextNode(m);x.appendChild(w);const I=v?c.parentElement.ownerDocument.createTextNode(v):void 0;for(;c.firstChild;)x.appendChild(c.firstChild);I&&x.appendChild(I),c.parentElement.replaceChild(x,c)}})),s.add(ydi(n));try{return m2t(e,{...i,RETURN_TRUSTED_TYPE:!0})}finally{s.dispose()}}const Bgi=["align","autoplay","alt","checked","class","colspan","controls","data-code","data-href","disabled","draggable","height","href","loop","muted","playsinline","poster","rowspan","src","style","target","title","type","width","start"];function Wgi(l){const e=[Ma.http,Ma.https,Ma.mailto,Ma.data,Ma.file,Ma.vscodeFileResource,Ma.vscodeRemote,Ma.vscodeRemoteResource];return l.isTrusted&&e.push(Ma.command),{config:{ALLOWED_TAGS:l.allowedTags??[...vdi],ALLOWED_ATTR:Bgi,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:e}}function Vgi(l){return typeof l=="string"?l:Hgi(l)}function Hgi(l,e){let i=l.value??"";i.length>1e5&&(i=`${i.substr(0,1e5)}…`);const n=uDt(i,{async:!1,renderer:Ugi.value}).replace(/&(#\d+|[a-zA-Z]+);/g,s=>jgi.get(s)??s);return vVe({isTrusted:!1},n).toString()}const jgi=new Map([["&quot;",'"'],["&nbsp;"," "],["&amp;","&"],["&#39;","'"],["&lt;","<"],["&gt;",">"]]);function zgi(){const l=new lDt;return l.code=({text:e})=>e,l.blockquote=({text:e})=>e+`
+`,l.html=e=>"",l.heading=function({tokens:e}){return this.parser.parseInline(e)+`
+`},l.hr=()=>"",l.list=function({items:e}){return e.map(i=>this.listitem(i)).join(`
+`)+`
+`},l.listitem=({text:e})=>e+`
+`,l.paragraph=function({tokens:e}){return this.parser.parseInline(e)+`
+`},l.table=function({header:e,rows:i}){return e.map(n=>this.tablecell(n)).join(" ")+`
+`+i.map(n=>n.map(s=>this.tablecell(s)).join(" ")).join(`
+`)+`
+`},l.tablerow=({text:e})=>e,l.tablecell=function({tokens:e}){return this.parser.parseInline(e)},l.strong=({text:e})=>e,l.em=({text:e})=>e,l.codespan=({text:e})=>e,l.br=e=>`
+`,l.del=({text:e})=>e,l.image=e=>"",l.text=({text:e})=>e,l.link=({text:e})=>e,l}const Ugi=new HE(l=>zgi());function Nye(l){let e="";return l.forEach(i=>{e+=i.raw}),e}function dDt(l){var e,i;if(l.tokens)for(let n=l.tokens.length-1;n>=0;n--){const s=l.tokens[n];if(s.type==="text"){const c=s.raw.split(`
+`),d=c[c.length-1];if(d.includes("`"))return Qgi(l);if(d.includes("**"))return n0i(l);if(d.match(/\*\w/))return Zgi(l);if(d.match(/(^|\s)__\w/))return r0i(l);if(d.match(/(^|\s)_\w/))return Ygi(l);if(qgi(d)||$gi(d)&&l.tokens.slice(0,n).some(f=>f.type==="text"&&f.raw.match(/\[[^\]]*$/))){const f=l.tokens.slice(n+1);return((e=f[0])==null?void 0:e.type)==="link"&&((i=f[1])==null?void 0:i.type)==="text"&&f[1].raw.match(/^ *"[^"]*$/)||d.match(/^[^"]* +"[^"]*$/)?t0i(l):e0i(l)}else if(d.match(/(^|\s)\[\w*/))return i0i(l)}}}function qgi(l){return!!l.match(/(^|\s)\[.*\]\(\w*/)}function $gi(l){return!!l.match(/^[^\[]*\]\([^\)]*$/)}function Jgi(l){var m;const e=l.items[l.items.length-1],i=e.tokens?e.tokens[e.tokens.length-1]:void 0;let n;if((i==null?void 0:i.type)==="text"&&!("inRawBlock"in e)&&(n=dDt(i)),!n||n.type!=="paragraph")return;const s=Nye(l.items.slice(0,-1)),c=(m=e.raw.match(/^(\s*(-|\d+\.|\*) +)/))==null?void 0:m[0];if(!c)return;const d=c+Nye(e.tokens.slice(0,-1))+n.raw,f=uwe(s+d)[0];if(f.type==="list")return f}const Ggi=3;function Kgi(l){for(let e=0;e<Ggi;e++){const i=Xgi(l);if(i)l=i;else break}return l}function Xgi(l){let e,i;for(e=0;e<l.length;e++){const n=l[e];if(n.type==="paragraph"&&n.raw.match(/(\n|^)\|/)){i=s0i(l.slice(e));break}if(e===l.length-1&&n.type==="list"){const s=Jgi(n);if(s){i=[s];break}}if(e===l.length-1&&n.type==="paragraph"){const s=dDt(n);if(s){i=[s];break}}}if(i){const n=[...l.slice(0,e),...i];return n.links=l.links,n}return null}function Qgi(l){return BR(l,"`")}function Zgi(l){return BR(l,"*")}function Ygi(l){return BR(l,"_")}function e0i(l){return BR(l,")")}function t0i(l){return BR(l,'")')}function i0i(l){return BR(l,"](https://microsoft.com)")}function n0i(l){return BR(l,"**")}function r0i(l){return BR(l,"__")}function BR(l,e){const i=Nye(Array.isArray(l)?l:[l]);return uwe(i+e)[0]}function s0i(l){const e=Nye(l),i=e.split(`
+`);let n,s=!1;for(let c=0;c<i.length;c++){const d=i[c].trim();if(typeof n>"u"&&d.match(/^\s*\|/)){const f=d.match(/(\|[^\|]+)(?=\||$)/g);f&&(n=f.length)}else if(typeof n=="number")if(d.match(/^\s*\|/)){if(c!==i.length-1)return;s=!0}else return}if(typeof n=="number"&&n>0){const c=s?i.slice(0,-1).join(`
+`):e,d=!!c.match(/\|\s*$/),f=c+(d?"":"|")+`
+|${" --- |".repeat(n)}`;return uwe(f)}}function qbt(l,e){return g2t(l,e),fo(()=>y2t(l))}const k4=class k4{static createEmpty(e,i){const n=k4.defaultTokenMetadata,s=new Uint32Array(2);return s[0]=e.length,s[1]=n,new k4(s,e,i)}static createFromTextAndMetadata(e,i){let n=0,s="";const c=new Array;for(const{text:d,metadata:f}of e)c.push(n+d.length,f),n+=d.length,s+=d;return new k4(new Uint32Array(c),s,i)}constructor(e,i,n){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=i,this.languageIdCodec=n}equals(e){return e instanceof k4?this.slicedEquals(e,0,this._tokensCount):!1}slicedEquals(e,i,n){if(this._text!==e._text||this._tokensCount!==e._tokensCount)return!1;const s=i<<1,c=s+(n<<1);for(let d=s;d<c;d++)if(this._tokens[d]!==e._tokens[d])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(e){return e>0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[(e<<1)+1]}getLanguageId(e){const i=this._tokens[(e<<1)+1],n=kb.getLanguageId(i);return this.languageIdCodec.decodeLanguageId(n)}getStandardTokenType(e){const i=this._tokens[(e<<1)+1];return kb.getTokenType(i)}getForeground(e){const i=this._tokens[(e<<1)+1];return kb.getForeground(i)}getClassName(e){const i=this._tokens[(e<<1)+1];return kb.getClassNameFromMetadata(i)}getInlineStyle(e,i){const n=this._tokens[(e<<1)+1];return kb.getInlineStyleFromMetadata(n,i)}getPresentation(e){const i=this._tokens[(e<<1)+1];return kb.getPresentationFromMetadata(i)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return k4.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,i,n){return new Q$e(this,e,i,n)}static convertToEndOffset(e,i){const s=(e.length>>>1)-1;for(let c=0;c<s;c++)e[c<<1]=e[c+1<<1];e[s<<1]=i}static findIndexInTokensArray(e,i){if(e.length<=2)return 0;let n=0,s=(e.length>>>1)-1;for(;n<s;){const c=n+Math.floor((s-n)/2),d=e[c<<1];if(d===i)return c+1;d<i?n=c+1:d>i&&(s=c)}return n}withInserted(e){if(e.length===0)return this;let i=0,n=0,s="";const c=new Array;let d=0;for(;;){const f=i<this._tokensCount?this._tokens[i<<1]:-1,m=n<e.length?e[n]:null;if(f!==-1&&(m===null||f<=m.offset)){s+=this._text.substring(d,f);const v=this._tokens[(i<<1)+1];c.push(s.length,v),i++,d=f}else if(m){if(m.offset>d){s+=this._text.substring(d,m.offset);const v=this._tokens[(i<<1)+1];c.push(s.length,v),d=m.offset}s+=m.text,c.push(s.length,m.tokenMetadata),n++}else break}return new k4(new Uint32Array(c),s,this.languageIdCodec)}getTokenText(e){const i=this.getStartOffset(e),n=this.getEndOffset(e);return this._text.substring(i,n)}forEach(e){const i=this.getCount();for(let n=0;n<i;n++)e(n)}};k4.defaultTokenMetadata=(32768|2<<24)>>>0;let Cg=k4;class Q$e{constructor(e,i,n,s){this._source=e,this._startOffset=i,this._endOffset=n,this._deltaOffset=s,this._firstTokenIndex=e.findTokenIndexAtOffset(i),this.languageIdCodec=e.languageIdCodec,this._tokensCount=0;for(let c=this._firstTokenIndex,d=e.getCount();c<d&&!(e.getStartOffset(c)>=n);c++)this._tokensCount++}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof Q$e?this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getStandardTokenType(e){return this._source.getStandardTokenType(this._firstTokenIndex+e)}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const i=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,i)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,i){return this._source.getInlineStyle(this._firstTokenIndex+e,i)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}getTokenText(e){const i=this._firstTokenIndex+e,n=this._source.getStartOffset(i),s=this._source.getEndOffset(i);let c=this._source.getTokenText(i);return n<this._startOffset&&(c=c.substring(this._startOffset-n)),s>this._endOffset&&(c=c.substring(0,c.length-(s-this._endOffset))),c}forEach(e){for(let i=0;i<this.getCount();i++)e(i)}}function o0i(l,e){const i=e.lineNumber;if(!l.tokenization.isCheapToTokenize(i))return;l.tokenization.forceTokenization(i);const n=l.tokenization.getLineTokens(i),s=n.findTokenIndexAtOffset(e.column-1);return n.getStandardTokenType(s)}const R$=new class{clone(){return this}equals(l){return this===l}};function Z$e(l,e){return new Qqe([new Pne(0,"",l)],e)}function fwe(l,e){const i=new Uint32Array(2);return i[0]=0,i[1]=(l<<0|0|0|32768|2<<24)>>>0,new ISe(i,e===null?R$:e)}const $bt={getInitialState:()=>R$,tokenizeEncoded:(l,e,i)=>fwe(0,i)};async function a0i(l,e,i){if(!i)return Jbt(e,l.languageIdCodec,$bt);const n=await Oh.getOrCreate(i);return Jbt(e,l.languageIdCodec,n||$bt)}function c0i(l,e,i,n,s,c,d){let f="<div>",m=n,v=0,x=!0;for(let w=0,I=e.getCount();w<I;w++){const P=e.getEndOffset(w);if(P<=n)continue;let O="";for(;m<P&&m<s;m++){const z=l.charCodeAt(m);switch(z){case 9:{let J=c-(m+v)%c;for(v+=J-1;J>0;)d&&x?(O+="&#160;",x=!1):(O+=" ",x=!0),J--;break}case 60:O+="&lt;",x=!1;break;case 62:O+="&gt;",x=!1;break;case 38:O+="&amp;",x=!1;break;case 0:O+="&#00;",x=!1;break;case 65279:case 8232:case 8233:case 133:O+="�",x=!1;break;case 13:O+="&#8203",x=!1;break;case 32:d&&x?(O+="&#160;",x=!1):(O+=" ",x=!0);break;default:O+=String.fromCharCode(z),x=!1}}if(f+=`<span style="${e.getInlineStyle(w,i)}">${O}</span>`,P>s||m>=s)break}return f+="</div>",f}function Jbt(l,e,i){let n='<div class="monaco-tokenized-source">';const s=BL(l);let c=i.getInitialState();for(let d=0,f=s.length;d<f;d++){const m=s[d];d>0&&(n+="<br/>");const v=i.tokenizeEncoded(m,!0,c);Cg.convertToEndOffset(v.tokens,m.length);const w=new Cg(v.tokens,m,e).inflate();let I=0;for(let P=0,O=w.getCount();P<O;P++){const z=w.getClassName(P),J=w.getEndOffset(P);n+=`<span class="${z}">${wie(m.substring(I,J))}</span>`,I=J}c=v.endState}return n+="</div>",n}var l0i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Gbt=function(l,e){return function(i,n){e(i,n,l)}},bVe,k9;let d6=(k9=class{constructor(e,i,n){this._options=e,this._languageService=i,this._openerService=n,this._onDidRenderAsync=new gi,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,i,n){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const s=new wn,c=s.add(dwe(e,{...this._getRenderOptions(e,s),...i},n));return c.element.classList.add("rendered-markdown"),{element:c.element,dispose:()=>s.dispose()}}_getRenderOptions(e,i){return{codeBlockRenderer:async(n,s)=>{var m,v;let c;n?c=this._languageService.getLanguageIdByLanguageName(n):this._options.editor&&(c=(m=this._options.editor.getModel())==null?void 0:m.getLanguageId()),c||(c=bv);const d=await a0i(this._languageService,s,c),f=document.createElement("span");if(f.innerHTML=((v=bVe._ttpTokenizer)==null?void 0:v.createHTML(d))??d,this._options.editor){const x=this._options.editor.getOption(50);a0(f,x)}else this._options.codeBlockFontFamily&&(f.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(f.style.fontSize=this._options.codeBlockFontSize),f},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:n=>Y$e(this._openerService,n,e.isTrusted),disposables:i}}}},bVe=k9,k9._ttpTokenizer=v6("tokenizeToString",{createHTML(e){return e}}),k9);d6=bVe=l0i([Gbt(1,Pf),Gbt(2,Rb)],d6);async function Y$e(l,e,i){try{return await l.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:u0i(i)})}catch(n){return Pa(n),!1}}function u0i(l){return l===!0?!0:l&&Array.isArray(l.enabledCommands)?l.enabledCommands:!1}const tS=jc("accessibilityService"),Cse=new rs("accessibilityModeEnabled",!1),Kbt=2e4;let HF,_1e,CVe,p1e,SVe;function d0i(l){HF=document.createElement("div"),HF.className="monaco-aria-container";const e=()=>{const n=document.createElement("div");return n.className="monaco-alert",n.setAttribute("role","alert"),n.setAttribute("aria-atomic","true"),HF.appendChild(n),n};_1e=e(),CVe=e();const i=()=>{const n=document.createElement("div");return n.className="monaco-status",n.setAttribute("aria-live","polite"),n.setAttribute("aria-atomic","true"),HF.appendChild(n),n};p1e=i(),SVe=i(),l.appendChild(HF)}function xv(l){HF&&(_1e.textContent!==l?(s0(CVe),Lye(_1e,l)):(s0(_1e),Lye(CVe,l)))}function PL(l){HF&&(p1e.textContent!==l?(s0(SVe),Lye(p1e,l)):(s0(p1e),Lye(SVe,l)))}function Lye(l,e){s0(l),e.length>Kbt&&(e=e.substr(0,Kbt)),l.textContent=e,l.style.visibility="hidden",l.style.visibility="visible"}var f0i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Mte=function(l,e){return function(i,n){e(i,n,l)}};const qN=Cr;let wVe=class extends Aw{get _targetWindow(){return Eo(this._target.targetElements[0])}get _targetDocumentElement(){return Eo(this._target.targetElements[0]).document.documentElement}get isDisposed(){return this._isDisposed}get isMouseIn(){return this._lockMouseTracker.isMouseIn}get domNode(){return this._hover.containerDomNode}get onDispose(){return this._onDispose.event}get onRequestLayout(){return this._onRequestLayout.event}get anchor(){return this._hoverPosition===2?0:1}get x(){return this._x}get y(){return this._y}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this._hoverContainer.classList.toggle("locked",this._isLocked))}constructor(e,i,n,s,c,d){var I,P,O,z,J,Y,ae;super(),this._keybindingService=i,this._configurationService=n,this._openerService=s,this._instantiationService=c,this._accessibilityService=d,this._messageListeners=new wn,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._isLocked=!1,this._enableFocusTraps=!1,this._addedFocusTrap=!1,this._onDispose=this._register(new gi),this._onRequestLayout=this._register(new gi),this._linkHandler=e.linkHandler||(me=>Y$e(this._openerService,me,WE(e.content)?e.content.isTrusted:void 0)),this._target="targetElements"in e.target?e.target:new h0i(e.target),this._hoverPointer=(I=e.appearance)!=null&&I.showPointer?qN("div.workbench-hover-pointer"):void 0,this._hover=this._register(new H$e),this._hover.containerDomNode.classList.add("workbench-hover","fadeIn"),(P=e.appearance)!=null&&P.compact&&this._hover.containerDomNode.classList.add("workbench-hover","compact"),(O=e.appearance)!=null&&O.skipFadeInAnimation&&this._hover.containerDomNode.classList.add("skip-fade-in"),e.additionalClasses&&this._hover.containerDomNode.classList.add(...e.additionalClasses),(z=e.position)!=null&&z.forcePosition&&(this._forcePosition=!0),e.trapFocus&&(this._enableFocusTraps=!0),this._hoverPosition=((J=e.position)==null?void 0:J.hoverPosition)??3,this.onmousedown(this._hover.containerDomNode,me=>me.stopPropagation()),this.onkeydown(this._hover.containerDomNode,me=>{me.equals(9)&&this.dispose()}),this._register(en(this._targetWindow,"blur",()=>this.dispose()));const f=qN("div.hover-row.markdown-hover"),m=qN("div.hover-contents");if(typeof e.content=="string")m.textContent=e.content,m.style.whiteSpace="pre-wrap";else if(Mm(e.content))m.appendChild(e.content),m.classList.add("html-hover-contents");else{const me=e.content,ye=this._instantiationService.createInstance(d6,{codeBlockFontFamily:this._configurationService.getValue("editor").fontFamily||vv.fontFamily}),{element:Ce}=ye.render(me,{actionHandler:{callback:Fe=>this._linkHandler(Fe),disposables:this._messageListeners},asyncRenderCallback:()=>{m.classList.add("code-hover-contents"),this.layout(),this._onRequestLayout.fire()}});m.appendChild(Ce)}if(f.appendChild(m),this._hover.contentsDomNode.appendChild(f),e.actions&&e.actions.length>0){const me=qN("div.hover-row.status-bar"),ye=qN("div.actions");e.actions.forEach(Ce=>{const Fe=this._keybindingService.lookupKeybinding(Ce.commandId),rt=Fe?Fe.getLabel():null;awe.render(ye,{label:Ce.label,commandId:Ce.commandId,run:ct=>{Ce.run(ct),this.dispose()},iconClass:Ce.iconClass},rt)}),me.appendChild(ye),this._hover.containerDomNode.appendChild(me)}this._hoverContainer=qN("div.workbench-hover-container"),this._hoverPointer&&this._hoverContainer.appendChild(this._hoverPointer),this._hoverContainer.appendChild(this._hover.containerDomNode);let v;if(e.actions&&e.actions.length>0?v=!1:((Y=e.persistence)==null?void 0:Y.hideOnHover)===void 0?v=typeof e.content=="string"||WE(e.content)&&!e.content.value.includes("](")&&!e.content.value.includes("</a>"):v=e.persistence.hideOnHover,(ae=e.appearance)!=null&&ae.showHoverHint){const me=qN("div.hover-row.status-bar"),ye=qN("div.info");ye.textContent=W("hoverhint","Hold {0} key to mouse over",Hc?"Option":"Alt"),me.appendChild(ye),this._hover.containerDomNode.appendChild(me)}const x=[...this._target.targetElements];v||x.push(this._hoverContainer);const w=this._register(new Xbt(x));if(this._register(w.onMouseOut(()=>{this._isLocked||this.dispose()})),v){const me=[...this._target.targetElements,this._hoverContainer];this._lockMouseTracker=this._register(new Xbt(me)),this._register(this._lockMouseTracker.onMouseOut(()=>{this._isLocked||this.dispose()}))}else this._lockMouseTracker=w}addFocusTrap(){if(!this._enableFocusTraps||this._addedFocusTrap)return;this._addedFocusTrap=!0;const e=this._hover.containerDomNode,i=this.findLastFocusableChild(this._hover.containerDomNode);if(i){const n=f$e(this._hoverContainer,qN("div")),s=jn(this._hoverContainer,qN("div"));n.tabIndex=0,s.tabIndex=0,this._register(en(s,"focus",c=>{e.focus(),c.preventDefault()})),this._register(en(n,"focus",c=>{i.focus(),c.preventDefault()}))}}findLastFocusableChild(e){if(e.hasChildNodes())for(let i=0;i<e.childNodes.length;i++){const n=e.childNodes.item(e.childNodes.length-i-1);if(n.nodeType===n.ELEMENT_NODE){const c=n;if(typeof c.tabIndex=="number"&&c.tabIndex>=0)return c}const s=this.findLastFocusableChild(n);if(s)return s}}render(e){var s;e.appendChild(this._hoverContainer);const n=this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement)&&GTt(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(s=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))==null?void 0:s.getAriaLabel());n&&PL(n),this.layout(),this.addFocusTrap()}layout(){this._hover.containerDomNode.classList.remove("right-aligned"),this._hover.contentsDomNode.style.maxHeight="";const e=x=>{const w=w2t(x),I=x.getBoundingClientRect();return{top:I.top*w,bottom:I.bottom*w,right:I.right*w,left:I.left*w}},i=this._target.targetElements.map(x=>e(x)),{top:n,right:s,bottom:c,left:d}=i[0],f=s-d,m=c-n,v={top:n,right:s,bottom:c,left:d,width:f,height:m,center:{x:d+f/2,y:n+m/2}};if(this.adjustHorizontalHoverPosition(v),this.adjustVerticalHoverPosition(v),this.adjustHoverMaxHeight(v),this._hoverContainer.style.padding="",this._hoverContainer.style.margin="",this._hoverPointer){switch(this._hoverPosition){case 1:v.left+=3,v.right+=3,this._hoverContainer.style.paddingLeft="3px",this._hoverContainer.style.marginLeft="-3px";break;case 0:v.left-=3,v.right-=3,this._hoverContainer.style.paddingRight="3px",this._hoverContainer.style.marginRight="-3px";break;case 2:v.top+=3,v.bottom+=3,this._hoverContainer.style.paddingTop="3px",this._hoverContainer.style.marginTop="-3px";break;case 3:v.top-=3,v.bottom-=3,this._hoverContainer.style.paddingBottom="3px",this._hoverContainer.style.marginBottom="-3px";break}v.center.x=v.left+f/2,v.center.y=v.top+m/2}this.computeXCordinate(v),this.computeYCordinate(v),this._hoverPointer&&(this._hoverPointer.classList.remove("top"),this._hoverPointer.classList.remove("left"),this._hoverPointer.classList.remove("right"),this._hoverPointer.classList.remove("bottom"),this.setHoverPointerPosition(v)),this._hover.onContentsChanged()}computeXCordinate(e){const i=this._hover.containerDomNode.clientWidth+2;this._target.x!==void 0?this._x=this._target.x:this._hoverPosition===1?this._x=e.right:this._hoverPosition===0?this._x=e.left-i:(this._hoverPointer?this._x=e.center.x-this._hover.containerDomNode.clientWidth/2:this._x=e.left,this._x+i>=this._targetDocumentElement.clientWidth&&(this._hover.containerDomNode.classList.add("right-aligned"),this._x=Math.max(this._targetDocumentElement.clientWidth-i-2,this._targetDocumentElement.clientLeft))),this._x<this._targetDocumentElement.clientLeft&&(this._x=e.left+2)}computeYCordinate(e){this._target.y!==void 0?this._y=this._target.y:this._hoverPosition===3?this._y=e.top:this._hoverPosition===2?this._y=e.bottom-2:this._hoverPointer?this._y=e.center.y+this._hover.containerDomNode.clientHeight/2:this._y=e.bottom,this._y>this._targetWindow.innerHeight&&(this._y=e.bottom)}adjustHorizontalHoverPosition(e){if(this._target.x!==void 0)return;const i=this._hoverPointer?3:0;if(this._forcePosition){const n=i+2;this._hoverPosition===1?this._hover.containerDomNode.style.maxWidth=`${this._targetDocumentElement.clientWidth-e.right-n}px`:this._hoverPosition===0&&(this._hover.containerDomNode.style.maxWidth=`${e.left-n}px`);return}this._hoverPosition===1?this._targetDocumentElement.clientWidth-e.right<this._hover.containerDomNode.clientWidth+i&&(e.left>=this._hover.containerDomNode.clientWidth+i?this._hoverPosition=0:this._hoverPosition=2):this._hoverPosition===0&&(e.left<this._hover.containerDomNode.clientWidth+i&&(this._targetDocumentElement.clientWidth-e.right>=this._hover.containerDomNode.clientWidth+i?this._hoverPosition=1:this._hoverPosition=2),e.left-this._hover.containerDomNode.clientWidth-i<=this._targetDocumentElement.clientLeft&&(this._hoverPosition=1))}adjustVerticalHoverPosition(e){if(this._target.y!==void 0||this._forcePosition)return;const i=this._hoverPointer?3:0;this._hoverPosition===3?e.top-this._hover.containerDomNode.clientHeight-i<0&&(this._hoverPosition=2):this._hoverPosition===2&&e.bottom+this._hover.containerDomNode.clientHeight+i>this._targetWindow.innerHeight&&(this._hoverPosition=3)}adjustHoverMaxHeight(e){let i=this._targetWindow.innerHeight/2;if(this._forcePosition){const n=(this._hoverPointer?3:0)+2;this._hoverPosition===3?i=Math.min(i,e.top-n):this._hoverPosition===2&&(i=Math.min(i,this._targetWindow.innerHeight-e.bottom-n))}if(this._hover.containerDomNode.style.maxHeight=`${i}px`,this._hover.contentsDomNode.clientHeight<this._hover.contentsDomNode.scrollHeight){const n=`${this._hover.scrollbar.options.verticalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingRight!==n&&(this._hover.contentsDomNode.style.paddingRight=n)}}setHoverPointerPosition(e){if(this._hoverPointer)switch(this._hoverPosition){case 0:case 1:{this._hoverPointer.classList.add(this._hoverPosition===0?"right":"left");const i=this._hover.containerDomNode.clientHeight;i>e.height?this._hoverPointer.style.top=`${e.center.y-(this._y-i)-3}px`:this._hoverPointer.style.top=`${Math.round(i/2)-3}px`;break}case 3:case 2:{this._hoverPointer.classList.add(this._hoverPosition===3?"bottom":"top");const i=this._hover.containerDomNode.clientWidth;let n=Math.round(i/2)-3;const s=this._x+n;(s<e.left||s>e.right)&&(n=e.center.x-this._x-3),this._hoverPointer.style.left=`${n}px`;break}}}focus(){this._hover.containerDomNode.focus()}dispose(){this._isDisposed||(this._onDispose.fire(),this._hoverContainer.remove(),this._messageListeners.dispose(),this._target.dispose(),super.dispose()),this._isDisposed=!0}};wVe=f0i([Mte(1,pu),Mte(2,Cc),Mte(3,Rb),Mte(4,ho),Mte(5,tS)],wVe);class Xbt extends Aw{get onMouseOut(){return this._onMouseOut.event}get isMouseIn(){return this._isMouseIn}constructor(e){super(),this._elements=e,this._isMouseIn=!0,this._onMouseOut=this._register(new gi),this._elements.forEach(i=>this.onmouseover(i,()=>this._onTargetMouseOver(i))),this._elements.forEach(i=>this.onmouseleave(i,()=>this._onTargetMouseLeave(i)))}_onTargetMouseOver(e){this._isMouseIn=!0,this._clearEvaluateMouseStateTimeout(e)}_onTargetMouseLeave(e){this._isMouseIn=!1,this._evaluateMouseState(e)}_evaluateMouseState(e){this._clearEvaluateMouseStateTimeout(e),this._mouseTimeout=Eo(e).setTimeout(()=>this._fireIfMouseOutside(),0)}_clearEvaluateMouseStateTimeout(e){this._mouseTimeout&&(Eo(e).clearTimeout(this._mouseTimeout),this._mouseTimeout=void 0)}_fireIfMouseOutside(){this._isMouseIn||this._onMouseOut.fire()}}class h0i{constructor(e){this._element=e,this.targetElements=[this._element]}dispose(){}}var h1;(function(l){function e(c,d){if(c.start>=d.end||d.start>=c.end)return{start:0,end:0};const f=Math.max(c.start,d.start),m=Math.min(c.end,d.end);return m-f<=0?{start:0,end:0}:{start:f,end:m}}l.intersect=e;function i(c){return c.end-c.start<=0}l.isEmpty=i;function n(c,d){return!i(e(c,d))}l.intersects=n;function s(c,d){const f=[],m={start:c.start,end:Math.min(d.start,c.end)},v={start:Math.max(d.end,c.start),end:c.end};return i(m)||f.push(m),i(v)||f.push(v),f}l.relativeComplement=s})(h1||(h1={}));function _0i(l){const e=l;return!!e&&typeof e.x=="number"&&typeof e.y=="number"}var MM;(function(l){l[l.AVOID=0]="AVOID",l[l.ALIGN=1]="ALIGN"})(MM||(MM={}));function sq(l,e,i){const n=i.mode===MM.ALIGN?i.offset:i.offset+i.size,s=i.mode===MM.ALIGN?i.offset+i.size:i.offset;return i.position===0?e<=l-n?n:e<=s?s-e:Math.max(l-e,0):e<=s?s-e:e<=l-n?n:0}const Nq=class Nq extends xi{constructor(e,i){super(),this.container=null,this.useFixedPosition=!1,this.useShadowDOM=!1,this.delegate=null,this.toDisposeOnClean=xi.None,this.toDisposeOnSetContainer=xi.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=Cr(".context-view"),dv(this.view),this.setContainer(e,i),this._register(fo(()=>this.setContainer(null,1)))}setContainer(e,i){var s;this.useFixedPosition=i!==1;const n=this.useShadowDOM;if(this.useShadowDOM=i===3,!(e===this.container&&n===this.useShadowDOM)&&(this.container&&(this.toDisposeOnSetContainer.dispose(),this.view.remove(),this.shadowRoot&&(this.shadowRoot=null,(s=this.shadowRootHostElement)==null||s.remove(),this.shadowRootHostElement=null),this.container=null),e)){if(this.container=e,this.useShadowDOM){this.shadowRootHostElement=Cr(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const d=document.createElement("style");d.textContent=p0i,this.shadowRoot.appendChild(d),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(Cr("slot"))}else this.container.appendChild(this.view);const c=new wn;Nq.BUBBLE_UP_EVENTS.forEach(d=>{c.add(ph(this.container,d,f=>{this.onDOMEvent(f,!1)}))}),Nq.BUBBLE_DOWN_EVENTS.forEach(d=>{c.add(ph(this.container,d,f=>{this.onDOMEvent(f,!0)},!0))}),this.toDisposeOnSetContainer=c}}show(e){var i,n;this.isVisible()&&this.hide(),s0(this.view),this.view.className="context-view monaco-component",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex=`${2575+(e.layer??0)}`,this.view.style.position=this.useFixedPosition?"fixed":"absolute",HC(this.view),this.toDisposeOnClean=e.render(this.view)||xi.None,this.delegate=e,this.doLayout(),(n=(i=this.delegate).focus)==null||n.call(i)}getViewElement(){return this.view}layout(){var e,i;if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(VE&&s$e.pointerEvents)){this.hide();return}(i=(e=this.delegate)==null?void 0:e.layout)==null||i.call(e),this.doLayout()}}doLayout(){if(!this.isVisible())return;const e=this.delegate.getAnchor();let i;if(Mm(e)){const I=e_(e),P=w2t(e);i={top:I.top*P,left:I.left*P,width:I.width*P,height:I.height*P}}else _0i(e)?i={top:e.y,left:e.x,width:e.width||1,height:e.height||2}:i={top:e.posy,left:e.posx,width:2,height:2};const n=FC(this.view),s=B4(this.view),c=this.delegate.anchorPosition||0,d=this.delegate.anchorAlignment||0,f=this.delegate.anchorAxisAlignment||0;let m,v;const x=eie();if(f===0){const I={offset:i.top-x.pageYOffset,size:i.height,position:c===0?0:1},P={offset:i.left,size:i.width,position:d===0?0:1,mode:MM.ALIGN};m=sq(x.innerHeight,s,I)+x.pageYOffset,h1.intersects({start:m,end:m+s},{start:I.offset,end:I.offset+I.size})&&(P.mode=MM.AVOID),v=sq(x.innerWidth,n,P)}else{const I={offset:i.left,size:i.width,position:d===0?0:1},P={offset:i.top,size:i.height,position:c===0?0:1,mode:MM.ALIGN};v=sq(x.innerWidth,n,I),h1.intersects({start:v,end:v+n},{start:I.offset,end:I.offset+I.size})&&(P.mode=MM.AVOID),m=sq(x.innerHeight,s,P)+x.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(c===0?"bottom":"top"),this.view.classList.add(d===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const w=e_(this.container);this.view.style.top=`${m-(this.useFixedPosition?e_(this.view).top:w.top)}px`,this.view.style.left=`${v-(this.useFixedPosition?e_(this.view).left:w.left)}px`,this.view.style.width="initial"}hide(e){const i=this.delegate;this.delegate=null,i!=null&&i.onHide&&i.onHide(e),this.toDisposeOnClean.dispose(),dv(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,i){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,Eo(e).document.activeElement):i&&!Am(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}};Nq.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],Nq.BUBBLE_DOWN_EVENTS=["click"];let xVe=Nq;const p0i=`
+ :host {
+ all: initial; /* 1st rule so subsequent properties are reset. */
+ }
+
+ .codicon[class*='codicon-'] {
+ font: normal normal normal 16px/1 codicon;
+ display: inline-block;
+ text-decoration: none;
+ text-rendering: auto;
+ text-align: center;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ user-select: none;
+ -webkit-user-select: none;
+ -ms-user-select: none;
+ }
+
+ :host {
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;
+ }
+
+ :host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
+ :host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }
+ :host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }
+ :host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }
+ :host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }
+
+ :host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }
+ :host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }
+ :host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }
+ :host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }
+ :host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }
+
+ :host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }
+ :host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }
+ :host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }
+ :host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }
+ :host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }
+`;var m0i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},g0i=function(l,e){return function(i,n){e(i,n,l)}};let Pye=class extends xi{constructor(e){super(),this.layoutService=e,this.contextView=this._register(new xVe(this.layoutService.mainContainer,1)),this.layout(),this._register(e.onDidLayoutContainer(()=>this.layout()))}showContextView(e,i,n){let s;i?i===this.layoutService.getContainer(Eo(i))?s=1:n?s=3:s=2:s=1,this.contextView.setContainer(i??this.layoutService.activeContainer,s),this.contextView.show(e);const c={close:()=>{this.openContextView===c&&this.hideContextView()}};return this.openContextView=c,c}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e),this.openContextView=void 0}};Pye=m0i([g0i(0,FR)],Pye);class fDt extends Pye{getContextViewElement(){return this.contextView.getViewElement()}}class y0i{constructor(e,i,n){this.hoverDelegate=e,this.target=i,this.fadeInAnimation=n}async update(e,i,n){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let s;if(e===void 0||Eb(e)||Mm(e))s=e;else if(!Ine(e.markdown))s=e.markdown??e.markdownNotSupportedFallback;else{this._hoverWidget||this.show(W("iconLabel.loading","Loading..."),i,n),this._cancellationTokenSource=new ih;const c=this._cancellationTokenSource.token;if(s=await e.markdown(c),s===void 0&&(s=e.markdownNotSupportedFallback),this.isDisposed||c.isCancellationRequested)return}this.show(s,i,n)}show(e,i,n){var c;const s=this._hoverWidget;if(this.hasContent(e)){const d={content:e,target:this.target,actions:n==null?void 0:n.actions,linkHandler:n==null?void 0:n.linkHandler,trapFocus:n==null?void 0:n.trapFocus,appearance:{showPointer:this.hoverDelegate.placement==="element",skipFadeInAnimation:!this.fadeInAnimation||!!s,showHoverHint:(c=n==null?void 0:n.appearance)==null?void 0:c.showHoverHint},position:{hoverPosition:2}};this._hoverWidget=this.hoverDelegate.showHover(d,i)}s==null||s.dispose()}hasContent(e){return e?WE(e)?!!e.value:!0:!1}get isDisposed(){var e;return(e=this._hoverWidget)==null?void 0:e.isDisposed}dispose(){var e,i;(e=this._hoverWidget)==null||e.dispose(),(i=this._cancellationTokenSource)==null||i.dispose(!0),this._cancellationTokenSource=void 0}}var v0i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Rte=function(l,e){return function(i,n){e(i,n,l)}};let kVe=class extends xi{constructor(e,i,n,s,c){super(),this._instantiationService=e,this._keybindingService=n,this._layoutService=s,this._accessibilityService=c,this._managedHovers=new Map,i.onDidShowContextMenu(()=>this.hideHover()),this._contextViewHandler=this._register(new Pye(this._layoutService))}showHover(e,i,n){var m,v,x,w;if(Qbt(this._currentHoverOptions)===Qbt(e)||this._currentHover&&((v=(m=this._currentHoverOptions)==null?void 0:m.persistence)!=null&&v.sticky))return;this._currentHoverOptions=e,this._lastHoverOptions=e;const s=e.trapFocus||this._accessibilityService.isScreenReaderOptimized(),c=D0();n||(s&&c?c.classList.contains("monaco-hover")||(this._lastFocusedElementBeforeOpen=c):this._lastFocusedElementBeforeOpen=void 0);const d=new wn,f=this._instantiationService.createInstance(wVe,e);if((x=e.persistence)!=null&&x.sticky&&(f.isLocked=!0),f.onDispose(()=>{var P,O;((P=this._currentHover)==null?void 0:P.domNode)&&k2t(this._currentHover.domNode)&&((O=this._lastFocusedElementBeforeOpen)==null||O.focus()),this._currentHoverOptions===e&&(this._currentHoverOptions=void 0),d.dispose()},void 0,d),!e.container){const I=Mm(e.target)?e.target:e.target.targetElements[0];e.container=this._layoutService.getContainer(Eo(I))}if(this._contextViewHandler.showContextView(new b0i(f,i),e.container),f.onRequestLayout(()=>this._contextViewHandler.layout(),void 0,d),(w=e.persistence)!=null&&w.sticky)d.add(en(Eo(e.container).document,br.MOUSE_DOWN,I=>{Am(I.target,f.domNode)||this.doHideHover()}));else{if("targetElements"in e.target)for(const P of e.target.targetElements)d.add(en(P,br.CLICK,()=>this.hideHover()));else d.add(en(e.target,br.CLICK,()=>this.hideHover()));const I=D0();if(I){const P=Eo(I).document;d.add(en(I,br.KEY_DOWN,O=>{var z;return this._keyDown(O,f,!!((z=e.persistence)!=null&&z.hideOnKeyDown))})),d.add(en(P,br.KEY_DOWN,O=>{var z;return this._keyDown(O,f,!!((z=e.persistence)!=null&&z.hideOnKeyDown))})),d.add(en(I,br.KEY_UP,O=>this._keyUp(O,f))),d.add(en(P,br.KEY_UP,O=>this._keyUp(O,f)))}}if("IntersectionObserver"in cd){const I=new IntersectionObserver(O=>this._intersectionChange(O,f),{threshold:0}),P="targetElements"in e.target?e.target.targetElements[0]:e.target;I.observe(P),d.add(fo(()=>I.disconnect()))}return this._currentHover=f,f}hideHover(){var e;(e=this._currentHover)!=null&&e.isLocked||!this._currentHoverOptions||this.doHideHover()}doHideHover(){this._currentHover=void 0,this._currentHoverOptions=void 0,this._contextViewHandler.hideContextView()}_intersectionChange(e,i){e[e.length-1].isIntersecting||i.dispose()}showAndFocusLastHover(){this._lastHoverOptions&&this.showHover(this._lastHoverOptions,!0,!0)}_keyDown(e,i,n){var d,f;if(e.key==="Alt"){i.isLocked=!0;return}const s=new Id(e);this._keybindingService.resolveKeyboardEvent(s).getSingleModifierDispatchChords().some(m=>!!m)||this._keybindingService.softDispatch(s,s.target).kind!==0||n&&(!((d=this._currentHoverOptions)!=null&&d.trapFocus)||e.key!=="Tab")&&(this.hideHover(),(f=this._lastFocusedElementBeforeOpen)==null||f.focus())}_keyUp(e,i){var n;e.key==="Alt"&&(i.isLocked=!1,i.isMouseIn||(this.hideHover(),(n=this._lastFocusedElementBeforeOpen)==null||n.focus()))}setupManagedHover(e,i,n,s){i.setAttribute("custom-hover","true"),i.title!==""&&(console.warn("HTML element already has a title attribute, which will conflict with the custom hover. Please remove the title attribute."),console.trace("Stack trace:",i.title),i.title="");let c,d;const f=(me,ye)=>{var Fe;const Ce=d!==void 0;me&&(d==null||d.dispose(),d=void 0),ye&&(c==null||c.dispose(),c=void 0),Ce&&((Fe=e.onDidHideHover)==null||Fe.call(e),d=void 0)},m=(me,ye,Ce,Fe)=>new TT(async()=>{(!d||d.isDisposed)&&(d=new y0i(e,Ce||i,me>0),await d.update(typeof n=="function"?n():n,ye,{...s,trapFocus:Fe}))},me);let v=!1;const x=en(i,br.MOUSE_DOWN,()=>{v=!0,f(!0,!0)},!0),w=en(i,br.MOUSE_UP,()=>{v=!1},!0),I=en(i,br.MOUSE_LEAVE,me=>{v=!1,f(!1,me.fromElement===i)},!0),P=me=>{if(c)return;const ye=new wn,Ce={targetElements:[i],dispose:()=>{}};if(e.placement===void 0||e.placement==="mouse"){const Fe=rt=>{Ce.x=rt.x+10,Mm(rt.target)&&Zbt(rt.target,i)!==i&&f(!0,!0)};ye.add(en(i,br.MOUSE_MOVE,Fe,!0))}c=ye,!(Mm(me.target)&&Zbt(me.target,i)!==i)&&ye.add(m(e.delay,!1,Ce))},O=en(i,br.MOUSE_OVER,P,!0),z=()=>{if(v||c)return;const me={targetElements:[i],dispose:()=>{}},ye=new wn,Ce=()=>f(!0,!0);ye.add(en(i,br.BLUR,Ce,!0)),ye.add(m(e.delay,!1,me)),c=ye};let J;const Y=i.tagName.toLowerCase();Y!=="input"&&Y!=="textarea"&&(J=en(i,br.FOCUS,z,!0));const ae={show:me=>{f(!1,!0),m(0,me,void 0,me)},hide:()=>{f(!0,!0)},update:async(me,ye)=>{n=me,await(d==null?void 0:d.update(n,void 0,ye))},dispose:()=>{this._managedHovers.delete(i),O.dispose(),I.dispose(),x.dispose(),w.dispose(),J==null||J.dispose(),f(!0,!0)}};return this._managedHovers.set(i,ae),ae}showManagedHover(e){const i=this._managedHovers.get(e);i&&i.show(!0)}dispose(){this._managedHovers.forEach(e=>e.dispose()),super.dispose()}};kVe=v0i([Rte(0,ho),Rte(1,eS),Rte(2,pu),Rte(3,FR),Rte(4,tS)],kVe);function Qbt(l){if(l!==void 0)return(l==null?void 0:l.id)??l}class b0i{get anchorPosition(){return this._hover.anchor}constructor(e,i=!1){this._hover=e,this._focus=i,this.layer=1}render(e){return this._hover.render(e),this._focus&&this._hover.focus(),this._hover}getAnchor(){return{x:this._hover.x,y:this._hover.y}}layout(){this._hover.layout()}}function Zbt(l,e){for(e=e??Eo(l).document.body;!l.hasAttribute("custom-hover")&&l!==e;)l=l.parentElement;return l}nl(jL,kVe,1);Dk((l,e)=>{const i=l.getColor(OTt);i&&(e.addRule(`.monaco-workbench .workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),e.addRule(`.monaco-workbench .workbench-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`))});const Sse=jc("IWorkspaceEditService");class eJe{constructor(e){this.metadata=e}static convert(e){return e.edits.map(i=>{if(GM.is(i))return GM.lift(i);if($q.is(i))return $q.lift(i);throw new Error("Unsupported edit")})}}class GM extends eJe{static is(e){return e instanceof GM?!0:gg(e)&&yo.isUri(e.resource)&&gg(e.textEdit)}static lift(e){return e instanceof GM?e:new GM(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,i,n=void 0,s){super(s),this.resource=e,this.textEdit=i,this.versionId=n}}class $q extends eJe{static is(e){return e instanceof $q?!0:gg(e)&&(!!e.newResource||!!e.oldResource)}static lift(e){return e instanceof $q?e:new $q(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,i,n={},s){super(s),this.oldResource=e,this.newResource=i,this.options=n}}const b0={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,renderGutterMenu:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0,useTrueInlineView:!1},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0,compactMode:!1},wse=Object.freeze({id:"editor",order:5,type:"object",title:W("editorConfigurationTitle","Editor"),scope:5}),Aye={...wse,properties:{"editor.tabSize":{type:"number",default:p1.tabSize,minimum:1,markdownDescription:W("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:W("indentSize",'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:p1.insertSpaces,markdownDescription:W("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:p1.detectIndentation,markdownDescription:W("detectIndentation","Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:p1.trimAutoWhitespace,description:W("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:p1.largeFileOptimizations,description:W("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{enum:["off","currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[W("wordBasedSuggestions.off","Turn off Word Based Suggestions."),W("wordBasedSuggestions.currentDocument","Only suggest words from the active document."),W("wordBasedSuggestions.matchingDocuments","Suggest words from all open documents of the same language."),W("wordBasedSuggestions.allDocuments","Suggest words from all open documents.")],description:W("wordBasedSuggestions","Controls whether completions should be computed based on words in the document and from which documents they are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[W("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),W("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),W("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:W("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:W("stablePeek","Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:W("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!0,description:W("editor.experimental.asyncTokenization","Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:W("editor.experimental.asyncTokenizationLogging","Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:W("editor.experimental.asyncTokenizationVerification","Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.experimental.treeSitterTelemetry":{type:"boolean",default:!1,markdownDescription:W("editor.experimental.treeSitterTelemetry","Controls whether tree sitter parsing should be turned on and telemetry collected. Setting `editor.experimental.preferTreeSitter` for specific languages will take precedence."),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:W("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:W("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:W("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:W("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:W("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:W("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:b0.maxComputationTime,description:W("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:b0.maxFileSize,description:W("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:b0.renderSideBySide,description:W("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:b0.renderSideBySideInlineBreakpoint,description:W("renderSideBySideInlineBreakpoint","If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:b0.useInlineViewWhenSpaceIsLimited,description:W("useInlineViewWhenSpaceIsLimited","If enabled and the editor width is too small, the inline view is used.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:b0.renderMarginRevertIcon,description:W("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.renderGutterMenu":{type:"boolean",default:b0.renderGutterMenu,description:W("renderGutterMenu","When enabled, the diff editor shows a special gutter for revert and stage actions.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:b0.ignoreTrimWhitespace,description:W("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:b0.renderIndicators,description:W("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:b0.diffCodeLens,description:W("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:b0.diffWordWrap,markdownEnumDescriptions:[W("wordWrap.off","Lines will never wrap."),W("wordWrap.on","Lines will wrap at the viewport width."),W("wordWrap.inherit","Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:b0.diffAlgorithm,markdownEnumDescriptions:[W("diffAlgorithm.legacy","Uses the legacy diffing algorithm."),W("diffAlgorithm.advanced","Uses the advanced diffing algorithm.")],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:b0.hideUnchangedRegions.enabled,markdownDescription:W("hideUnchangedRegions.enabled","Controls whether the diff editor shows unchanged regions.")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:b0.hideUnchangedRegions.revealLineCount,markdownDescription:W("hideUnchangedRegions.revealLineCount","Controls how many lines are used for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:b0.hideUnchangedRegions.minimumLineCount,markdownDescription:W("hideUnchangedRegions.minimumLineCount","Controls how many lines are used as a minimum for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:b0.hideUnchangedRegions.contextLineCount,markdownDescription:W("hideUnchangedRegions.contextLineCount","Controls how many lines are used as context when comparing unchanged regions."),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:b0.experimental.showMoves,markdownDescription:W("showMoves","Controls whether the diff editor should show detected code moves.")},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:b0.experimental.showEmptyDecorations,description:W("showEmptyDecorations","Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")},"diffEditor.experimental.useTrueInlineView":{type:"boolean",default:b0.experimental.useTrueInlineView,description:W("useTrueInlineView","If enabled and the editor uses the inline view, word changes are rendered inline.")}}};function C0i(l){return typeof l.type<"u"||typeof l.anyOf<"u"}for(const l of YU){const e=l.schema;if(typeof e<"u")if(C0i(e))Aye.properties[`editor.${l.name}`]=e;else for(const i in e)Object.hasOwnProperty.call(e,i)&&(Aye.properties[i]=e[i])}let s0e=null;function hDt(){return s0e===null&&(s0e=Object.create(null),Object.keys(Aye.properties).forEach(l=>{s0e[l]=!0})),s0e}function S0i(l){return hDt()[`editor.${l}`]||!1}function w0i(l){return hDt()[`diffEditor.${l}`]||!1}const x0i=nh.as(DT.Configuration);x0i.registerConfiguration(Aye);class eh{static insert(e,i){return{range:new nt(e.lineNumber,e.column,e.lineNumber,e.column),text:i,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,i){return{range:e,text:i}}static replaceMove(e,i){return{range:e,text:i,forceMoveMarkers:!0}}}function o0e(l){return Object.isFrozen(l)?l:zai(l)}class r0{static createEmptyModel(e){return new r0({},[],[],void 0,e)}constructor(e,i,n,s,c){this._contents=e,this._keys=i,this._overrides=n,this.raw=s,this.logService=c,this.overrideConfigurations=new Map}get rawConfiguration(){var e;if(!this._rawConfiguration)if((e=this.raw)!=null&&e.length){const i=this.raw.map(n=>{if(n instanceof r0)return n;const s=new k0i("",this.logService);return s.parseRaw(n),s.configurationModel});this._rawConfiguration=i.reduce((n,s)=>s===n?s:n.merge(s),i[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(e){return e?Tvt(this.contents,e):this.contents}inspect(e,i){const n=this;return{get value(){return o0e(n.rawConfiguration.getValue(e))},get override(){return i?o0e(n.rawConfiguration.getOverrideValue(e,i)):void 0},get merged(){return o0e(i?n.rawConfiguration.override(i).getValue(e):n.rawConfiguration.getValue(e))},get overrides(){const s=[];for(const{contents:c,identifiers:d,keys:f}of n.rawConfiguration.overrides){const m=new r0(c,f,[],void 0,n.logService).getValue(e);m!==void 0&&s.push({identifiers:d,value:m})}return s.length?o0e(s):void 0}}}getOverrideValue(e,i){const n=this.getContentsForOverrideIdentifer(i);return n?e?Tvt(n,e):n:void 0}override(e){let i=this.overrideConfigurations.get(e);return i||(i=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,i)),i}merge(...e){var d,f;const i=D4(this.contents),n=D4(this.overrides),s=[...this.keys],c=(d=this.raw)!=null&&d.length?[...this.raw]:[this];for(const m of e)if(c.push(...(f=m.raw)!=null&&f.length?m.raw:[m]),!m.isEmpty()){this.mergeContents(i,m.contents);for(const v of m.overrides){const[x]=n.filter(w=>Lf(w.identifiers,v.identifiers));x?(this.mergeContents(x.contents,v.contents),x.keys.push(...v.keys),x.keys=r6(x.keys)):n.push(D4(v))}for(const v of m.keys)s.indexOf(v)===-1&&s.push(v)}return new r0(i,s,n,c.every(m=>m instanceof r0)?void 0:c,this.logService)}createOverrideConfigurationModel(e){const i=this.getContentsForOverrideIdentifer(e);if(!i||typeof i!="object"||!Object.keys(i).length)return this;const n={};for(const s of r6([...Object.keys(this.contents),...Object.keys(i)])){let c=this.contents[s];const d=i[s];d&&(typeof c=="object"&&typeof d=="object"?(c=D4(c),this.mergeContents(c,d)):c=d),n[s]=c}return new r0(n,this.keys,this.overrides,void 0,this.logService)}mergeContents(e,i){for(const n of Object.keys(i)){if(n in e&&gg(e[n])&&gg(i[n])){this.mergeContents(e[n],i[n]);continue}e[n]=D4(i[n])}}getContentsForOverrideIdentifer(e){let i=null,n=null;const s=c=>{c&&(n?this.mergeContents(n,c):n=D4(c))};for(const c of this.overrides)c.identifiers.length===1&&c.identifiers[0]===e?i=c.contents:c.identifiers.includes(e)&&s(c.contents);return s(i),n}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,i){this.updateValue(e,i,!1)}removeValue(e){const i=this.keys.indexOf(e);i!==-1&&(this.keys.splice(i,1),Lfi(this.contents,e),wR.test(e)&&this.overrides.splice(this.overrides.findIndex(n=>Lf(n.identifiers,hye(e))),1))}updateValue(e,i,n){if(G2t(this.contents,e,i,s=>this.logService.error(s)),n=n||this.keys.indexOf(e)===-1,n&&this.keys.push(e),wR.test(e)){const s=hye(e),c={identifiers:s,keys:Object.keys(this.contents[e]),contents:MWe(this.contents[e],f=>this.logService.error(f))},d=this.overrides.findIndex(f=>Lf(f.identifiers,s));d!==-1?this.overrides[d]=c:this.overrides.push(c)}}}class k0i{constructor(e,i){this._name=e,this.logService=i,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||r0.createEmptyModel(this.logService)}parseRaw(e,i){this._raw=e;const{contents:n,keys:s,overrides:c,restricted:d,hasExcludedProperties:f}=this.doParseRaw(e,i);this._configurationModel=new r0(n,s,c,f?[e]:void 0,this.logService),this._restrictedConfigurations=d||[]}doParseRaw(e,i){const n=nh.as(DT.Configuration).getConfigurationProperties(),s=this.filter(e,n,!0,i);e=s.raw;const c=MWe(e,m=>this.logService.error(`Conflict in settings file ${this._name}: ${m}`)),d=Object.keys(e),f=this.toOverrides(e,m=>this.logService.error(`Conflict in settings file ${this._name}: ${m}`));return{contents:c,keys:d,overrides:f,restricted:s.restricted,hasExcludedProperties:s.hasExcludedProperties}}filter(e,i,n,s){var m,v,x;let c=!1;if(!(s!=null&&s.scopes)&&!(s!=null&&s.skipRestricted)&&!((m=s==null?void 0:s.exclude)!=null&&m.length))return{raw:e,restricted:[],hasExcludedProperties:c};const d={},f=[];for(const w in e)if(wR.test(w)&&n){const I=this.filter(e[w],i,!1,s);d[w]=I.raw,c=c||I.hasExcludedProperties,f.push(...I.restricted)}else{const I=i[w],P=I?typeof I.scope<"u"?I.scope:3:void 0;I!=null&&I.restricted&&f.push(w),!((v=s.exclude)!=null&&v.includes(w))&&((x=s.include)!=null&&x.includes(w)||(P===void 0||s.scopes===void 0||s.scopes.includes(P))&&!(s.skipRestricted&&(I!=null&&I.restricted)))?d[w]=e[w]:c=!0}return{raw:d,restricted:f,hasExcludedProperties:c}}toOverrides(e,i){const n=[];for(const s of Object.keys(e))if(wR.test(s)){const c={};for(const d in e[s])c[d]=e[s][d];n.push({identifiers:hye(s),keys:Object.keys(c),contents:MWe(c,i)})}return n}}class T0i{constructor(e,i,n,s,c,d,f,m,v,x,w,I,P){this.key=e,this.overrides=i,this._value=n,this.overrideIdentifiers=s,this.defaultConfiguration=c,this.policyConfiguration=d,this.applicationConfiguration=f,this.userConfiguration=m,this.localUserConfiguration=v,this.remoteUserConfiguration=x,this.workspaceConfiguration=w,this.folderConfigurationModel=I,this.memoryConfigurationModel=P}toInspectValue(e){return(e==null?void 0:e.value)!==void 0||(e==null?void 0:e.override)!==void 0||(e==null?void 0:e.overrides)!==void 0?e:void 0}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.userConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.toInspectValue(this.userInspectValue)}}class hwe{constructor(e,i,n,s,c,d,f,m,v,x){this._defaultConfiguration=e,this._policyConfiguration=i,this._applicationConfiguration=n,this._localUserConfiguration=s,this._remoteUserConfiguration=c,this._workspaceConfiguration=d,this._folderConfigurations=f,this._memoryConfiguration=m,this._memoryConfigurationByResource=v,this.logService=x,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new vg,this._userConfiguration=null}getValue(e,i,n){return this.getConsolidatedConfigurationModel(e,i,n).getValue(e)}updateValue(e,i,n={}){let s;n.resource?(s=this._memoryConfigurationByResource.get(n.resource),s||(s=r0.createEmptyModel(this.logService),this._memoryConfigurationByResource.set(n.resource,s))):s=this._memoryConfiguration,i===void 0?s.removeValue(e):s.setValue(e,i),n.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,i,n){const s=this.getConsolidatedConfigurationModel(e,i,n),c=this.getFolderConfigurationModelForResource(i.resource,n),d=i.resource?this._memoryConfigurationByResource.get(i.resource)||this._memoryConfiguration:this._memoryConfiguration,f=new Set;for(const m of s.overrides)for(const v of m.identifiers)s.getOverrideValue(e,v)!==void 0&&f.add(v);return new T0i(e,i,s.getValue(e),f.size?[...f]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,n?this._workspaceConfiguration:void 0,c||void 0,d)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,i,n){let s=this.getConsolidatedConfigurationModelForResource(i,n);return i.overrideIdentifier&&(s=s.override(i.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(e)!==void 0&&(s=s.merge(this._policyConfiguration)),s}getConsolidatedConfigurationModelForResource({resource:e},i){let n=this.getWorkspaceConsolidatedConfiguration();if(i&&e){const s=i.getFolder(e);s&&(n=this.getFolderConsolidatedConfiguration(s.uri)||n);const c=this._memoryConfigurationByResource.get(e);c&&(n=n.merge(c))}return n}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let i=this._foldersConsolidatedConfigurations.get(e);if(!i){const n=this.getWorkspaceConsolidatedConfiguration(),s=this._folderConfigurations.get(e);s?(i=n.merge(s),this._foldersConsolidatedConfigurations.set(e,i)):i=n}return i}getFolderConfigurationModelForResource(e,i){if(i&&e){const n=i.getFolder(e);if(n)return this._folderConfigurations.get(n.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((e,i)=>{const{contents:n,overrides:s,keys:c}=this._folderConfigurations.get(i);return e.push([i,{contents:n,overrides:s,keys:c}]),e},[])}}static parse(e,i){const n=this.parseConfigurationModel(e.defaults,i),s=this.parseConfigurationModel(e.policy,i),c=this.parseConfigurationModel(e.application,i),d=this.parseConfigurationModel(e.user,i),f=this.parseConfigurationModel(e.workspace,i),m=e.folders.reduce((v,x)=>(v.set(yo.revive(x[0]),this.parseConfigurationModel(x[1],i)),v),new vg);return new hwe(n,s,c,d,r0.createEmptyModel(i),f,m,r0.createEmptyModel(i),new vg,i)}static parseConfigurationModel(e,i){return new r0(e.contents,e.keys,e.overrides,void 0,i)}}class D0i{constructor(e,i,n,s,c){this.change=e,this.previous=i,this.currentConfiguraiton=n,this.currentWorkspace=s,this.logService=c,this._marker=`
+`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=46,this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const d of e.keys)this.affectedKeys.add(d);for(const[,d]of e.overrides)for(const f of d)this.affectedKeys.add(f);this._affectsConfigStr=this._marker;for(const d of this.affectedKeys)this._affectsConfigStr+=d+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=hwe.parse(this.previous.data,this.logService)),this._previousConfiguration}affectsConfiguration(e,i){var f;const n=this._marker+e,s=this._affectsConfigStr.indexOf(n);if(s<0)return!1;const c=s+n.length;if(c>=this._affectsConfigStr.length)return!1;const d=this._affectsConfigStr.charCodeAt(c);if(d!==this._markerCode1&&d!==this._markerCode2)return!1;if(i){const m=this.previousConfiguration?this.previousConfiguration.getValue(e,i,(f=this.previous)==null?void 0:f.workspace):void 0,v=this.currentConfiguraiton.getValue(e,i,this.currentWorkspace);return!qC(m,v)}return!0}}class E0i{constructor(){this._onDidChange=new gi,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}}const Eie=new E0i,Oye={kind:0},I0i={kind:1};function N0i(l,e,i){return{kind:2,commandId:l,commandArgs:e,isBubble:i}}class Iie{constructor(e,i,n){var s;this._log=n,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const c of e){const d=c.command;d&&d.charAt(0)!=="-"&&this._defaultBoundCommands.set(d,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=Iie.handleRemovals([].concat(e).concat(i));for(let c=0,d=this._keybindings.length;c<d;c++){const f=this._keybindings[c];if(f.chords.length===0)continue;const m=(s=f.when)==null?void 0:s.substituteConstants();m&&m.type===0||this._addKeyPress(f.chords[0],f)}}static _isTargetedForRemoval(e,i,n){if(i){for(let s=0;s<i.length;s++)if(i[s]!==e.chords[s])return!1}return!(n&&n.type!==1&&(!e.when||!zdi(n,e.when)))}static handleRemovals(e){const i=new Map;for(let s=0,c=e.length;s<c;s++){const d=e[s];if(d.command&&d.command.charAt(0)==="-"){const f=d.command.substring(1);i.has(f)?i.get(f).push(d):i.set(f,[d])}}if(i.size===0)return e;const n=[];for(let s=0,c=e.length;s<c;s++){const d=e[s];if(!d.command||d.command.length===0){n.push(d);continue}if(d.command.charAt(0)==="-")continue;const f=i.get(d.command);if(!f||!d.isDefault){n.push(d);continue}let m=!1;for(const v of f){const x=v.when;if(this._isTargetedForRemoval(d,v.chords,x)){m=!0;break}}if(!m){n.push(d);continue}}return n}_addKeyPress(e,i){const n=this._map.get(e);if(typeof n>"u"){this._map.set(e,[i]),this._addToLookupMap(i);return}for(let s=n.length-1;s>=0;s--){const c=n[s];if(c.command===i.command)continue;let d=!0;for(let f=1;f<c.chords.length&&f<i.chords.length;f++)if(c.chords[f]!==i.chords[f]){d=!1;break}d&&Iie.whenIsEntirelyIncluded(c.when,i.when)&&this._removeFromLookupMap(c)}n.push(i),this._addToLookupMap(i)}_addToLookupMap(e){if(!e.command)return;let i=this._lookupMap.get(e.command);typeof i>"u"?(i=[e],this._lookupMap.set(e.command,i)):i.push(e)}_removeFromLookupMap(e){if(!e.command)return;const i=this._lookupMap.get(e.command);if(!(typeof i>"u")){for(let n=0,s=i.length;n<s;n++)if(i[n]===e){i.splice(n,1);return}}}static whenIsEntirelyIncluded(e,i){return!i||i.type===1?!0:!e||e.type===1?!1:LWe(e,i)}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(e,i){const n=this._lookupMap.get(e);if(typeof n>"u"||n.length===0)return null;if(n.length===1)return n[0];for(let s=n.length-1;s>=0;s--){const c=n[s];if(i.contextMatchesRules(c.when))return c}return n[n.length-1]}resolve(e,i,n){const s=[...i,n];this._log(`| Resolving ${s}`);const c=this._map.get(s[0]);if(c===void 0)return this._log("\\ No keybinding entries."),Oye;let d=null;if(s.length<2)d=c;else{d=[];for(let m=0,v=c.length;m<v;m++){const x=c[m];if(s.length>x.chords.length)continue;let w=!0;for(let I=1;I<s.length;I++)if(x.chords[I]!==s[I]){w=!1;break}w&&d.push(x)}}const f=this._findCommand(e,d);return f?s.length<f.chords.length?(this._log(`\\ From ${d.length} keybinding entries, awaiting ${f.chords.length-s.length} more chord(s), when: ${Ybt(f.when)}, source: ${eCt(f)}.`),I0i):(this._log(`\\ From ${d.length} keybinding entries, matched ${f.command}, when: ${Ybt(f.when)}, source: ${eCt(f)}.`),N0i(f.command,f.commandArgs,f.bubble)):(this._log(`\\ From ${d.length} keybinding entries, no when clauses matched the context.`),Oye)}_findCommand(e,i){for(let n=i.length-1;n>=0;n--){const s=i[n];if(Iie._contextMatchesRules(e,s.when))return s}return null}static _contextMatchesRules(e,i){return i?i.evaluate(e):!0}}function Ybt(l){return l?`${l.serialize()}`:"no when condition"}function eCt(l){return l.extensionId?l.isBuiltinExtension?`built-in extension ${l.extensionId}`:`user extension ${l.extensionId}`:l.isDefault?"built-in":"user"}const L0i=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class P0i extends xi{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:Tr.None}get inChordMode(){return this._currentChords.length>0}constructor(e,i,n,s,c){super(),this._contextKeyService=e,this._commandService=i,this._telemetryService=n,this._notificationService=s,this._logService=c,this._onDidUpdateKeybindings=this._register(new gi),this._currentChords=[],this._currentChordChecker=new a$e,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=oq.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new TT,this._currentlyDispatchingCommandId=null,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,i){const n=this._getResolver().lookupPrimaryKeybinding(e,i||this._contextKeyService);if(n)return n.resolvedKeybinding}dispatchEvent(e,i){return this._dispatch(e,i)}softDispatch(e,i){this._log("/ Soft dispatching keyboard event");const n=this.resolveKeyboardEvent(e);if(n.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),Oye;const[s]=n.getDispatchChords();if(s===null)return this._log("\\ Keyboard event cannot be dispatched"),Oye;const c=this._contextKeyService.getContext(i),d=this._currentChords.map(({keypress:f})=>f);return this._getResolver().resolve(c,d,s)}_scheduleLeaveChordMode(){const e=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-e>5e3&&this._leaveChordMode()},500)}_expectAnotherChord(e,i){switch(this._currentChords.push({keypress:e,label:i}),this._currentChords.length){case 0:throw $qe("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(W("first.chord","({0}) was pressed. Waiting for second key of chord...",i));break;default:{const n=this._currentChords.map(({label:s})=>s).join(", ");this._currentChordStatusMessage=this._notificationService.status(W("next.chord","({0}) was pressed. Waiting for next key of chord...",n))}}this._scheduleLeaveChordMode(),Eie.enabled&&Eie.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],Eie.enable()}_dispatch(e,i){return this._doDispatch(this.resolveKeyboardEvent(e),i,!1)}_singleModifierDispatch(e,i){const n=this.resolveKeyboardEvent(e),[s]=n.getSingleModifierDispatchChords();if(s)return this._ignoreSingleModifiers.has(s)?(this._log(`+ Ignoring single modifier ${s} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=oq.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=oq.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${s}.`),this._currentSingleModifier=s,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):s===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${s} ${s}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(n,i,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${s}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[c]=n.getChords();return this._ignoreSingleModifiers=new oq(c),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,i,n=!1){let s=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let c=null,d=null;if(n){const[x]=e.getSingleModifierDispatchChords();c=x,d=x?[x]:[]}else[c]=e.getDispatchChords(),d=this._currentChords.map(({keypress:x})=>x);if(c===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),s;const f=this._contextKeyService.getContext(i),m=e.getLabel(),v=this._getResolver().resolve(f,d,c);switch(v.kind){case 0:{if(this._logService.trace("KeybindingService#dispatch",m,"[ No matching keybinding ]"),this.inChordMode){const x=this._currentChords.map(({label:w})=>w).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${x}, ${m}".`),this._notificationService.status(W("missing.chord","The key combination ({0}, {1}) is not a command.",x,m),{hideAfter:10*1e3}),this._leaveChordMode(),s=!0}return s}case 1:return this._logService.trace("KeybindingService#dispatch",m,"[ Several keybindings match - more chords needed ]"),s=!0,this._expectAnotherChord(c,m),this._log(this._currentChords.length===1?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),s;case 2:{if(this._logService.trace("KeybindingService#dispatch",m,`[ Will dispatch command ${v.commandId} ]`),v.commandId===null||v.commandId===""){if(this.inChordMode){const x=this._currentChords.map(({label:w})=>w).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${x}, ${m}".`),this._notificationService.status(W("missing.chord","The key combination ({0}, {1}) is not a command.",x,m),{hideAfter:10*1e3}),this._leaveChordMode(),s=!0}}else{this.inChordMode&&this._leaveChordMode(),v.isBubble||(s=!0),this._log(`+ Invoking command ${v.commandId}.`),this._currentlyDispatchingCommandId=v.commandId;try{typeof v.commandArgs>"u"?this._commandService.executeCommand(v.commandId).then(void 0,x=>this._notificationService.warn(x)):this._commandService.executeCommand(v.commandId,v.commandArgs).then(void 0,x=>this._notificationService.warn(x))}finally{this._currentlyDispatchingCommandId=null}L0i.test(v.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:v.commandId,from:"keybinding",detail:e.getUserSettingsLabel()??void 0})}return s}}}mightProducePrintableCharacter(e){return e.ctrlKey||e.metaKey?!1:e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30}}const rCe=class rCe{constructor(e){this._ctrlKey=e?e.ctrlKey:!1,this._shiftKey=e?e.shiftKey:!1,this._altKey=e?e.altKey:!1,this._metaKey=e?e.metaKey:!1}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}};rCe.EMPTY=new rCe(null);let oq=rCe;class tCt{constructor(e,i,n,s,c,d,f){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?TVe(e.getDispatchChords()):[],e&&this.chords.length===0&&(this.chords=TVe(e.getSingleModifierDispatchChords())),this.bubble=i?i.charCodeAt(0)===94:!1,this.command=this.bubble?i.substr(1):i,this.commandArgs=n,this.when=s,this.isDefault=c,this.extensionId=d,this.isBuiltinExtension=f}}function TVe(l){const e=[];for(let i=0,n=l.length;i<n;i++){const s=l[i];if(!s)return[];e.push(s)}return e}class _we{constructor(e,i,n=i){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=i,this.modifierLabels[3]=n}toLabel(e,i,n){if(i.length===0)return null;const s=[];for(let c=0,d=i.length;c<d;c++){const f=i[c],m=n(f);if(m===null)return null;s[c]=R0i(f,m,this.modifierLabels[e])}return s.join(" ")}}const tJe=new _we({ctrlKey:"⌃",shiftKey:"⇧",altKey:"⌥",metaKey:"⌘",separator:""},{ctrlKey:W({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:W({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:W({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:W({key:"windowsKey",comment:["This is the short form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:W({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:W({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:W({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:W({key:"superKey",comment:["This is the short form for the Super key on the keyboard"]},"Super"),separator:"+"}),A0i=new _we({ctrlKey:W({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:W({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:W({key:"optKey.long",comment:["This is the long form for the Alt/Option key on the keyboard"]},"Option"),metaKey:W({key:"cmdKey.long",comment:["This is the long form for the Command key on the keyboard"]},"Command"),separator:"+"},{ctrlKey:W({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:W({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:W({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:W({key:"windowsKey.long",comment:["This is the long form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:W({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:W({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:W({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:W({key:"superKey.long",comment:["This is the long form for the Super key on the keyboard"]},"Super"),separator:"+"}),O0i=new _we({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"}),M0i=new _we({ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"cmd",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"win",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"meta",separator:"+"});function R0i(l,e,i){if(e===null)return"";const n=[];return l.ctrlKey&&n.push(i.ctrlKey),l.shiftKey&&n.push(i.shiftKey),l.altKey&&n.push(i.altKey),l.metaKey&&n.push(i.metaKey),e!==""&&n.push(e),n.join(i.separator)}class F0i extends lui{constructor(e,i){if(super(),i.length===0)throw gk("chords");this._os=e,this._chords=i}getLabel(){return tJe.toLabel(this._os,this._chords,e=>this._getLabel(e))}getAriaLabel(){return A0i.toLabel(this._os,this._chords,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:O0i.toLabel(this._os,this._chords,e=>this._getElectronAccelerator(e))}getUserSettingsLabel(){return M0i.toLabel(this._os,this._chords,e=>this._getUserSettingsLabel(e))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map(e=>this._getChord(e))}_getChord(e){return new cui(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map(e=>this._getChordDispatch(e))}getSingleModifierDispatchChords(){return this._chords.map(e=>this._getSingleModifierChordDispatch(e))}}class nre extends F0i{constructor(e,i){super(i,e)}_keyCodeToUILabel(e){if(this._os===2)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return P4.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":P4.toString(e.keyCode)}_getElectronAccelerator(e){return P4.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";const i=P4.toUserSettingsUS(e.keyCode);return i&&i.toLowerCase()}_getChordDispatch(e){return nre.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let i="";return e.ctrlKey&&(i+="ctrl+"),e.shiftKey&&(i+="shift+"),e.altKey&&(i+="alt+"),e.metaKey&&(i+="meta+"),i+=P4.toString(e.keyCode),i}_getSingleModifierChordDispatch(e){return e.keyCode===5&&!e.shiftKey&&!e.altKey&&!e.metaKey?"ctrl":e.keyCode===4&&!e.ctrlKey&&!e.altKey&&!e.metaKey?"shift":e.keyCode===6&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey?"alt":e.keyCode===57&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?"meta":null}static _scanCodeToKeyCode(e){const i=Xqe[e];if(i!==-1)return i;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof a6)return e;const i=this._scanCodeToKeyCode(e.scanCode);return i===0?null:new a6(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,i)}static resolveKeybinding(e,i){const n=TVe(e.chords.map(s=>this._toKeyCodeChord(s)));return n.length>0?[new nre(n,i)]:[]}}const F$=jc("labelService"),_Dt=jc("progressService"),TKe=class TKe{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}};TKe.None=Object.freeze({report(){}});let NE=TKe;const WR=jc("editorProgressService");class B0i{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(e){const i=e.charCodeAt(0),n=this._value.charCodeAt(this._pos);return i-n}value(){return this._value[this._pos]}}class W0i{constructor(e=!0){this._caseSensitive=e}reset(e){return this._value=e,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let e=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(e)this._from++;else break;else e=!1;return this}cmp(e){return this._caseSensitive?Zqe(e,this._value,0,e.length,this._from,this._to):dse(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class V0i{constructor(e=!0,i=!0){this._splitOnBackslash=e,this._caseSensitive=i}reset(e){this._from=0,this._to=0,this._value=e,this._valueLen=e.length;for(let i=e.length-1;i>=0;i--,this._valueLen--){const n=this._value.charCodeAt(i);if(!(n===47||this._splitOnBackslash&&n===92))break}return this.next()}hasNext(){return this._to<this._valueLen}next(){this._from=this._to;let e=!0;for(;this._to<this._valueLen;this._to++){const i=this._value.charCodeAt(this._to);if(i===47||this._splitOnBackslash&&i===92)if(e)this._from++;else break;else e=!1}return this}cmp(e){return this._caseSensitive?Zqe(e,this._value,0,e.length,this._from,this._to):dse(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class H0i{constructor(e,i){this._ignorePathCasing=e,this._ignoreQueryAndFragment=i,this._states=[],this._stateIdx=0}reset(e){return this._value=e,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new V0i(!1,!this._ignorePathCasing(e)),this._pathIterator.reset(e.path),this._pathIterator.value()&&this._states.push(3)),this._ignoreQueryAndFragment(e)||(this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5)),this._stateIdx=0,this}next(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(e){if(this._states[this._stateIdx]===1)return pWe(e,this._value.scheme);if(this._states[this._stateIdx]===2)return pWe(e,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(e);if(this._states[this._stateIdx]===4)return Rne(e,this._value.query);if(this._states[this._stateIdx]===5)return Rne(e,this._value.fragment);throw new Error}value(){if(this._states[this._stateIdx]===1)return this._value.scheme;if(this._states[this._stateIdx]===2)return this._value.authority;if(this._states[this._stateIdx]===3)return this._pathIterator.value();if(this._states[this._stateIdx]===4)return this._value.query;if(this._states[this._stateIdx]===5)return this._value.fragment;throw new Error}}class a0e{constructor(){this.height=1}rotateLeft(){const e=this.right;return this.right=e.left,e.left=this,this.updateHeight(),e.updateHeight(),e}rotateRight(){const e=this.left;return this.left=e.right,e.right=this,this.updateHeight(),e.updateHeight(),e}updateHeight(){this.height=1+Math.max(this.heightLeft,this.heightRight)}balanceFactor(){return this.heightRight-this.heightLeft}get heightLeft(){var e;return((e=this.left)==null?void 0:e.height)??0}get heightRight(){var e;return((e=this.right)==null?void 0:e.height)??0}}class Jq{static forUris(e=()=>!1,i=()=>!1){return new Jq(new H0i(e,i))}static forStrings(){return new Jq(new B0i)}static forConfigKeys(){return new Jq(new W0i)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,i){const n=this._iter.reset(e);let s;this._root||(this._root=new a0e,this._root.segment=n.value());const c=[];for(s=this._root;;){const f=n.cmp(s.segment);if(f>0)s.left||(s.left=new a0e,s.left.segment=n.value()),c.push([-1,s]),s=s.left;else if(f<0)s.right||(s.right=new a0e,s.right.segment=n.value()),c.push([1,s]),s=s.right;else if(n.hasNext())n.next(),s.mid||(s.mid=new a0e,s.mid.segment=n.value()),c.push([0,s]),s=s.mid;else break}const d=s.value;s.value=i,s.key=e;for(let f=c.length-1;f>=0;f--){const m=c[f][1];m.updateHeight();const v=m.balanceFactor();if(v<-1||v>1){const x=c[f][0],w=c[f+1][0];if(x===1&&w===1)c[f][1]=m.rotateLeft();else if(x===-1&&w===-1)c[f][1]=m.rotateRight();else if(x===1&&w===-1)m.right=c[f+1][1]=c[f+1][1].rotateRight(),c[f][1]=m.rotateLeft();else if(x===-1&&w===1)m.left=c[f+1][1]=c[f+1][1].rotateLeft(),c[f][1]=m.rotateRight();else throw new Error;if(f>0)switch(c[f-1][0]){case-1:c[f-1][1].left=c[f][1];break;case 1:c[f-1][1].right=c[f][1];break;case 0:c[f-1][1].mid=c[f][1];break}else this._root=c[0][1]}}return d}get(e){var i;return(i=this._getNode(e))==null?void 0:i.value}_getNode(e){const i=this._iter.reset(e);let n=this._root;for(;n;){const s=i.cmp(n.segment);if(s>0)n=n.left;else if(s<0)n=n.right;else if(i.hasNext())i.next(),n=n.mid;else break}return n}has(e){const i=this._getNode(e);return!((i==null?void 0:i.value)===void 0&&(i==null?void 0:i.mid)===void 0)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,i){const n=this._iter.reset(e),s=[];let c=this._root;for(;c;){const d=n.cmp(c.segment);if(d>0)s.push([-1,c]),c=c.left;else if(d<0)s.push([1,c]),c=c.right;else if(n.hasNext())n.next(),s.push([0,c]),c=c.mid;else break}if(c){if(i?(c.left=void 0,c.mid=void 0,c.right=void 0,c.height=1):(c.key=void 0,c.value=void 0),!c.mid&&!c.value)if(c.left&&c.right){const d=this._min(c.right);if(d.key){const{key:f,value:m,segment:v}=d;this._delete(d.key,!1),c.key=f,c.value=m,c.segment=v}}else{const d=c.left??c.right;if(s.length>0){const[f,m]=s[s.length-1];switch(f){case-1:m.left=d;break;case 0:m.mid=d;break;case 1:m.right=d;break}}else this._root=d}for(let d=s.length-1;d>=0;d--){const f=s[d][1];f.updateHeight();const m=f.balanceFactor();if(m>1?(f.right.balanceFactor()>=0||(f.right=f.right.rotateRight()),s[d][1]=f.rotateLeft()):m<-1&&(f.left.balanceFactor()<=0||(f.left=f.left.rotateLeft()),s[d][1]=f.rotateRight()),d>0)switch(s[d-1][0]){case-1:s[d-1][1].left=s[d][1];break;case 1:s[d-1][1].right=s[d][1];break;case 0:s[d-1][1].mid=s[d][1];break}else this._root=s[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const i=this._iter.reset(e);let n=this._root,s;for(;n;){const c=i.cmp(n.segment);if(c>0)n=n.left;else if(c<0)n=n.right;else if(i.hasNext())i.next(),s=n.value||s,n=n.mid;else break}return n&&n.value||s}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,i){const n=this._iter.reset(e);let s=this._root;for(;s;){const c=n.cmp(s.segment);if(c>0)s=s.left;else if(c<0)s=s.right;else if(n.hasNext())n.next(),s=s.mid;else return s.mid?this._entries(s.mid):i?s.value:void 0}}forEach(e){for(const[i,n]of this)e(n,i)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){const i=[];return this._dfsEntries(e,i),i[Symbol.iterator]()}_dfsEntries(e,i){e&&(e.left&&this._dfsEntries(e.left,i),e.value&&i.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,i),e.right&&this._dfsEntries(e.right,i))}}const LB=jc("contextService");function DVe(l){const e=l;return typeof(e==null?void 0:e.id)=="string"&&yo.isUri(e.uri)}function j0i(l){const e=l;return typeof(e==null?void 0:e.id)=="string"&&!DVe(l)&&!q0i(l)}const z0i={id:"empty-window"};function U0i(l,e){if(typeof l=="string"||typeof l>"u")return typeof l=="string"?{id:qM(l)}:z0i;const i=l;return i.configuration?{id:i.id,configPath:i.configuration}:i.folders.length===1?{id:i.id,uri:i.folders[0].uri}:{id:i.id}}function q0i(l){const e=l;return typeof(e==null?void 0:e.id)=="string"&&yo.isUri(e.configPath)}class $0i{constructor(e,i){this.raw=i,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}const EVe="code-workspace";W("codeWorkspace","Code Workspace");const pDt="4064f6ec-cb38-4ad0-af64-ee6467e63c82";function J0i(l){return l.id===pDt}var IVe;(function(l){l.inspectTokensAction=W("inspectTokens","Developer: Inspect Tokens")})(IVe||(IVe={}));var Mye;(function(l){l.gotoLineActionLabel=W("gotoLineActionLabel","Go to Line/Column...")})(Mye||(Mye={}));var NVe;(function(l){l.helpQuickAccessActionLabel=W("helpQuickAccess","Show all Quick Access Providers")})(NVe||(NVe={}));var Rye;(function(l){l.quickCommandActionLabel=W("quickCommandActionLabel","Command Palette"),l.quickCommandHelp=W("quickCommandActionHelp","Show And Run Commands")})(Rye||(Rye={}));var rre;(function(l){l.quickOutlineActionLabel=W("quickOutlineActionLabel","Go to Symbol..."),l.quickOutlineByCategoryActionLabel=W("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")})(rre||(rre={}));var LVe;(function(l){l.editorViewAccessibleLabel=W("editorViewAccessibleLabel","Editor content")})(LVe||(LVe={}));var PVe;(function(l){l.toggleHighContrast=W("toggleHighContrast","Toggle High Contrast Theme")})(PVe||(PVe={}));var AVe;(function(l){l.bulkEditServiceSummary=W("bulkEditServiceSummary","Made {0} edits in {1} files")})(AVe||(AVe={}));const mDt=jc("workspaceTrustManagementService");let B$=[],iJe=[],gDt=[];function c0e(l,e=!1){G0i(l,!1,e)}function G0i(l,e,i){const n=K0i(l,e);B$.push(n),n.userConfigured?gDt.push(n):iJe.push(n),i&&!n.userConfigured&&B$.forEach(s=>{s.mime===n.mime||s.userConfigured||(n.extension&&s.extension===n.extension&&console.warn(`Overwriting extension <<${n.extension}>> to now point to mime <<${n.mime}>>`),n.filename&&s.filename===n.filename&&console.warn(`Overwriting filename <<${n.filename}>> to now point to mime <<${n.mime}>>`),n.filepattern&&s.filepattern===n.filepattern&&console.warn(`Overwriting filepattern <<${n.filepattern}>> to now point to mime <<${n.mime}>>`),n.firstline&&s.firstline===n.firstline&&console.warn(`Overwriting firstline <<${n.firstline}>> to now point to mime <<${n.mime}>>`))})}function K0i(l,e){return{id:l.id,mime:l.mime,filename:l.filename,extension:l.extension,filepattern:l.filepattern,firstline:l.firstline,userConfigured:e,filenameLowercase:l.filename?l.filename.toLowerCase():void 0,extensionLowercase:l.extension?l.extension.toLowerCase():void 0,filepatternLowercase:l.filepattern?xTt(l.filepattern.toLowerCase()):void 0,filepatternOnPath:l.filepattern?l.filepattern.indexOf(q_.sep)>=0:!1}}function X0i(){B$=B$.filter(l=>l.userConfigured),iJe=[]}function Q0i(l,e){return Z0i(l,e).map(i=>i.id)}function Z0i(l,e){let i;if(l)switch(l.scheme){case Ma.file:i=l.fsPath;break;case Ma.data:{i=kR.parseMetaData(l).get(kR.META_DATA_LABEL);break}case Ma.vscodeNotebookCell:i=void 0;break;default:i=l.path}if(!i)return[{id:"unknown",mime:Yh.unknown}];i=i.toLowerCase();const n=qM(i),s=iCt(i,n,gDt);if(s)return[s,{id:bv,mime:Yh.text}];const c=iCt(i,n,iJe);if(c)return[c,{id:bv,mime:Yh.text}];if(e){const d=Y0i(e);if(d)return[d,{id:bv,mime:Yh.text}]}return[{id:"unknown",mime:Yh.unknown}]}function iCt(l,e,i){var d;let n,s,c;for(let f=i.length-1;f>=0;f--){const m=i[f];if(e===m.filenameLowercase){n=m;break}if(m.filepattern&&(!s||m.filepattern.length>s.filepattern.length)){const v=m.filepatternOnPath?l:e;(d=m.filepatternLowercase)!=null&&d.call(m,v)&&(s=m)}m.extension&&(!c||m.extension.length>c.extension.length)&&e.endsWith(m.extensionLowercase)&&(c=m)}if(n)return n;if(s)return s;if(c)return c}function Y0i(l){if(r$e(l)&&(l=l.substr(1)),l.length>0)for(let e=B$.length-1;e>=0;e--){const i=B$[e];if(!i.firstline)continue;const n=l.match(i.firstline);if(n&&n.length>0)return i}}const l0e=Object.prototype.hasOwnProperty,nCt="vs.editor.nullLanguage";class e1i{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(nCt,0),this._register(bv,1),this._nextLanguageId=2}_register(e,i){this._languageIdToLanguage[i]=e,this._languageToLanguageId.set(e,i)}register(e){if(this._languageToLanguageId.has(e))return;const i=this._nextLanguageId++;this._register(e,i)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||nCt}}const hne=class hne extends xi{constructor(e=!0,i=!1){super(),this._onDidChange=this._register(new gi),this.onDidChange=this._onDidChange.event,hne.instanceCount++,this._warnOnOverwrite=i,this.languageIdCodec=new e1i,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(D$.onDidChangeLanguages(n=>{this._initializeFromRegistry()})))}dispose(){hne.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},X0i();const e=[].concat(D$.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const i of e)this._registerLanguage(i);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(i=>{const n=this._languages[i];n.name&&(this._nameMap[n.name]=n.identifier),n.aliases.forEach(s=>{this._lowercaseNameMap[s.toLowerCase()]=n.identifier}),n.mimetypes.forEach(s=>{this._mimeTypesMap[s]=n.identifier})}),nh.as(DT.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const i=e.id;let n;l0e.call(this._languages,i)?n=this._languages[i]:(this.languageIdCodec.register(i),n={identifier:i,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[i]=n),this._mergeLanguage(n,e)}_mergeLanguage(e,i){const n=i.id;let s=null;if(Array.isArray(i.mimetypes)&&i.mimetypes.length>0&&(e.mimetypes.push(...i.mimetypes),s=i.mimetypes[0]),s||(s=`text/x-${n}`,e.mimetypes.push(s)),Array.isArray(i.extensions)){i.configuration?e.extensions=i.extensions.concat(e.extensions):e.extensions=e.extensions.concat(i.extensions);for(const f of i.extensions)c0e({id:n,mime:s,extension:f},this._warnOnOverwrite)}if(Array.isArray(i.filenames))for(const f of i.filenames)c0e({id:n,mime:s,filename:f},this._warnOnOverwrite),e.filenames.push(f);if(Array.isArray(i.filenamePatterns))for(const f of i.filenamePatterns)c0e({id:n,mime:s,filepattern:f},this._warnOnOverwrite);if(typeof i.firstLine=="string"&&i.firstLine.length>0){let f=i.firstLine;f.charAt(0)!=="^"&&(f="^"+f);try{const m=new RegExp(f);Gli(m)||c0e({id:n,mime:s,firstline:m},this._warnOnOverwrite)}catch(m){console.warn(`[${i.id}]: Invalid regular expression \`${f}\`: `,m)}}e.aliases.push(n);let c=null;if(typeof i.aliases<"u"&&Array.isArray(i.aliases)&&(i.aliases.length===0?c=[null]:c=i.aliases),c!==null)for(const f of c)!f||f.length===0||e.aliases.push(f);const d=c!==null&&c.length>0;if(!(d&&c[0]===null)){const f=(d?c[0]:null)||n;(d||!e.name)&&(e.name=f)}i.configuration&&e.configurationFiles.push(i.configuration),i.icon&&e.icons.push(i.icon)}isRegisteredLanguageId(e){return e?l0e.call(this._languages,e):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const i=e.toLowerCase();return l0e.call(this._lowercaseNameMap,i)?this._lowercaseNameMap[i]:null}getLanguageIdByMimeType(e){return e&&l0e.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,i){return!e&&!i?[]:Q0i(e,i)}};hne.instanceCount=0;let OVe=hne;const Ew=(l,e)=>l===e;function Fye(l=Ew){return(e,i)=>Lf(e,i,l)}function t1i(){return(l,e)=>l.equals(e)}function MVe(l,e,i){if(i!==void 0){const n=l;return n==null||e===void 0||e===null?e===n:i(n,e)}else{const n=l;return(s,c)=>s==null||c===void 0||c===null?c===s:n(s,c)}}function Bye(l,e){if(l===e)return!0;if(Array.isArray(l)&&Array.isArray(e)){if(l.length!==e.length)return!1;for(let i=0;i<l.length;i++)if(!Bye(l[i],e[i]))return!1;return!0}if(l&&typeof l=="object"&&e&&typeof e=="object"&&Object.getPrototypeOf(l)===Object.prototype&&Object.getPrototypeOf(e)===Object.prototype){const i=l,n=e,s=Object.keys(i),c=Object.keys(n),d=new Set(c);if(s.length!==c.length)return!1;for(const f of s)if(!d.has(f)||!Bye(i[f],n[f]))return!1;return!0}return!1}class v1{constructor(e,i,n){this.owner=e,this.debugNameSource=i,this.referenceFn=n}getDebugName(e){return i1i(e,this)}}const rCt=new Map,RVe=new WeakMap;function i1i(l,e){const i=RVe.get(l);if(i)return i;const n=n1i(l,e);if(n){let s=rCt.get(n)??0;s++,rCt.set(n,s);const c=s===1?n:`${n}#${s}`;return RVe.set(l,c),c}}function n1i(l,e){const i=RVe.get(l);if(i)return i;const n=e.owner?s1i(e.owner)+".":"";let s;const c=e.debugNameSource;if(c!==void 0)if(typeof c=="function"){if(s=c(),s!==void 0)return n+s}else return n+c;const d=e.referenceFn;if(d!==void 0&&(s=nJe(d),s!==void 0))return n+s;if(e.owner!==void 0){const f=r1i(e.owner,l);if(f!==void 0)return n+f}}function r1i(l,e){for(const i in l)if(l[i]===e)return i}const sCt=new Map,oCt=new WeakMap;function s1i(l){const e=oCt.get(l);if(e)return e;const i=o1i(l);let n=sCt.get(i)??0;n++,sCt.set(i,n);const s=n===1?i:`${i}#${n}`;return oCt.set(l,s),s}function o1i(l){const e=l.constructor;return e?e.name:"Object"}function nJe(l){const e=l.toString(),n=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(e),s=n?n[1]:void 0;return s==null?void 0:s.trim()}let a1i;function yDt(){return a1i}let vDt;function c1i(l){vDt=l}let bDt;function l1i(l){bDt=l}let FVe;function u1i(l){FVe=l}class CDt{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,i){const n=i===void 0?void 0:e,s=i===void 0?e:i;return FVe({owner:n,debugName:()=>{const c=nJe(s);if(c!==void 0)return c;const f=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(s.toString());if(f)return`${this.debugName}.${f[2]}`;if(!n)return`${this.debugName} (mapped)`},debugReferenceFn:s},c=>s(this.read(c),c))}flatten(){return FVe({owner:void 0,debugName:()=>`${this.debugName} (flattened)`},e=>this.read(e).read(e))}recomputeInitiallyAndOnChange(e,i){return e.add(vDt(this,i)),this}keepObserved(e){return e.add(bDt(this)),this}}class SJ extends CDt{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const i=this.observers.size;this.observers.add(e),i===0&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}function th(l,e){const i=new wJ(l,e);try{l(i)}finally{i.finish()}}let u0e;function sie(l){if(u0e)l(u0e);else{const e=new wJ(l,void 0);u0e=e;try{l(e)}finally{e.finish(),u0e=void 0}}}async function SDt(l,e){const i=new wJ(l,e);try{await l(i)}finally{i.finish()}}function PB(l,e,i){l?e(l):th(e,i)}class wJ{constructor(e,i){this._fn=e,this._getDebugName=i,this.updatingObservers=[]}getDebugName(){return this._getDebugName?this._getDebugName():nJe(this._fn)}updateObserver(e,i){this.updatingObservers.push({observer:e,observable:i}),e.beginUpdate(i)}finish(){const e=this.updatingObservers;for(let i=0;i<e.length;i++){const{observer:n,observable:s}=e[i];n.endUpdate(s)}this.updatingObservers=null}}function bc(l,e){let i;return typeof l=="string"?i=new v1(void 0,l,void 0):i=new v1(l,void 0,void 0),new rJe(i,e,Ew)}class rJe extends SJ{get debugName(){return this._debugNameData.getDebugName(this)??"ObservableValue"}constructor(e,i,n){super(),this._debugNameData=e,this._equalityComparator=n,this._value=i}get(){return this._value}set(e,i,n){var c;if(n===void 0&&this._equalityComparator(this._value,e))return;let s;i||(i=s=new wJ(()=>{},()=>`Setting ${this.debugName}`));try{const d=this._value;this._setValue(e),(c=yDt())==null||c.handleObservableChanged(this,{oldValue:d,newValue:e,change:n,didChange:!0,hadValue:!0});for(const f of this.observers)i.updateObserver(f,this),f.handleChange(this,n)}finally{s&&s.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function sre(l,e){let i;return typeof l=="string"?i=new v1(void 0,l,void 0):i=new v1(l,void 0,void 0),new d1i(i,e,Ew)}class d1i extends rJe{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){var e;(e=this._value)==null||e.dispose()}}function ro(l,e){return e!==void 0?new AB(new v1(l,void 0,e),e,void 0,void 0,void 0,Ew):new AB(new v1(void 0,void 0,l),l,void 0,void 0,void 0,Ew)}function xse(l,e,i){return new f1i(new v1(l,void 0,e),e,void 0,void 0,void 0,Ew,i)}function mw(l,e){return new AB(new v1(l.owner,l.debugName,l.debugReferenceFn),e,void 0,void 0,l.onLastObserverRemoved,l.equalsFn??Ew)}u1i(mw);function wDt(l,e){return new AB(new v1(l.owner,l.debugName,void 0),e,l.createEmptyChangeSummary,l.handleChange,void 0,l.equalityComparer??Ew)}function VR(l,e){let i,n;e===void 0?(i=l,n=void 0):(n=l,i=e);const s=new wn;return new AB(new v1(n,void 0,i),c=>(s.clear(),i(c,s)),void 0,void 0,()=>s.dispose(),Ew)}function Cy(l,e){let i,n;e===void 0?(i=l,n=void 0):(n=l,i=e);let s;return new AB(new v1(n,void 0,i),c=>{s?s.clear():s=new wn;const d=i(c);return d&&s.add(d),d},void 0,void 0,()=>{s&&(s.dispose(),s=void 0)},Ew)}class AB extends SJ{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,i,n,s,c=void 0,d){var f;super(),this._debugNameData=e,this._computeFn=i,this.createChangeSummary=n,this._handleChange=s,this._handleLastObserverRemoved=c,this._equalityComparator=d,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=(f=this.createChangeSummary)==null?void 0:f.call(this)}onLastObserverRemoved(){var e;this.state=0,this.value=void 0;for(const i of this.dependencies)i.removeObserver(this);this.dependencies.clear(),(e=this._handleLastObserverRemoved)==null||e.call(this)}get(){var e;if(this.observers.size===0){const i=this._computeFn(this,(e=this.createChangeSummary)==null?void 0:e.call(this));return this.onLastObserverRemoved(),i}else{do{if(this.state===1){for(const i of this.dependencies)if(i.reportChanges(),this.state===2)break}this.state===1&&(this.state=3),this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){var d;if(this.state===3)return;const e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e;const i=this.state!==0,n=this.value;this.state=3;const s=this.changeSummary;this.changeSummary=(d=this.createChangeSummary)==null?void 0:d.call(this);try{this.value=this._computeFn(this,s)}finally{for(const f of this.dependenciesToBeRemoved)f.removeObserver(this);this.dependenciesToBeRemoved.clear()}if(i&&!this._equalityComparator(n,this.value))for(const f of this.observers)f.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;const i=this.updateCount===1;if(this.state===3&&(this.state=1,!i))for(const n of this.observers)n.handlePossibleChange(this);if(i)for(const n of this.observers)n.beginUpdate(this)}endUpdate(e){if(this.updateCount--,this.updateCount===0){const i=[...this.observers];for(const n of i)n.endUpdate(this)}DB(()=>this.updateCount>=0)}handlePossibleChange(e){if(this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const i of this.observers)i.handlePossibleChange(this)}}handleChange(e,i){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const n=this._handleChange?this._handleChange({changedObservable:e,change:i,didChange:c=>c===e},this.changeSummary):!0,s=this.state===3;if(n&&(this.state===1||s)&&(this.state=2,s))for(const c of this.observers)c.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const i=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),i}addObserver(e){const i=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),i&&e.beginUpdate(this)}removeObserver(e){const i=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),i&&e.endUpdate(this)}}class f1i extends AB{constructor(e,i,n,s,c=void 0,d,f){super(e,i,n,s,c,d),this.set=f}}function ba(l){return new pwe(new v1(void 0,void 0,l),l,void 0,void 0)}function kse(l,e){return new pwe(new v1(l.owner,l.debugName,l.debugReferenceFn??e),e,void 0,void 0)}function Tse(l,e){return new pwe(new v1(l.owner,l.debugName,l.debugReferenceFn??e),e,l.createEmptyChangeSummary,l.handleChange)}function h1i(l,e){const i=new wn,n=Tse({owner:l.owner,debugName:l.debugName,debugReferenceFn:l.debugReferenceFn??e,createEmptyChangeSummary:l.createEmptyChangeSummary,handleChange:l.handleChange},(s,c)=>{i.clear(),e(s,c,i)});return fo(()=>{n.dispose(),i.dispose()})}function Ib(l){const e=new wn,i=kse({owner:void 0,debugName:void 0,debugReferenceFn:l},n=>{e.clear(),l(n,e)});return fo(()=>{i.dispose(),e.dispose()})}class pwe{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,i,n,s){var c;this._debugNameData=e,this._runFn=i,this.createChangeSummary=n,this._handleChange=s,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=(c=this.createChangeSummary)==null?void 0:c.call(this),this._runIfNeeded()}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear()}_runIfNeeded(){var n,s;if(this.state===3)return;const e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e,this.state=3;const i=this.disposed;try{if(!i){(n=yDt())==null||n.handleAutorunTriggered(this);const c=this.changeSummary;this.changeSummary=(s=this.createChangeSummary)==null?void 0:s.call(this),this._runFn(this,c)}}finally{for(const c of this.dependenciesToBeRemoved)c.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){this.state===3&&(this.state=1),this.updateCount++}endUpdate(){if(this.updateCount===1)do{if(this.state===1){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),this.state===2)break}this._runIfNeeded()}while(this.state!==3);this.updateCount--,DB(()=>this.updateCount>=0)}handlePossibleChange(e){this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,i){this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(!this._handleChange||this._handleChange({changedObservable:e,change:i,didChange:s=>s===e},this.changeSummary))&&(this.state=2)}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const i=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),i}}(function(l){l.Observer=pwe})(ba||(ba={}));function mk(l){return new _1i(l)}class _1i extends CDt{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}function Tu(...l){let e,i,n;return l.length===3?[e,i,n]=l:[i,n]=l,new RM(new v1(e,void 0,n),i,n,()=>RM.globalTransaction,Ew)}function p1i(l,e,i){return new RM(new v1(l.owner,l.debugName,l.debugReferenceFn??i),e,i,()=>RM.globalTransaction,l.equalsFn??Ew)}class RM extends SJ{constructor(e,i,n,s,c){super(),this._debugNameData=e,this.event=i,this._getValue=n,this._getTransaction=s,this._equalityComparator=c,this.hasValue=!1,this.handleEvent=d=>{const f=this._getValue(d),m=this.value;(!this.hasValue||!this._equalityComparator(m,f))&&(this.value=f,this.hasValue&&PB(this._getTransaction(),x=>{for(const w of this.observers)x.updateObserver(w,this),w.handleChange(this,void 0)},()=>{const x=this.getDebugName();return"Event fired"+(x?`: ${x}`:"")}),this.hasValue=!0)}}getDebugName(){return this._debugNameData.getDebugName(this)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this._getValue(void 0)}}(function(l){l.Observer=RM;function e(i,n){let s=!1;RM.globalTransaction===void 0&&(RM.globalTransaction=i,s=!0);try{n()}finally{s&&(RM.globalTransaction=void 0)}}l.batchEventsGlobally=e})(Tu||(Tu={}));function k0(l,e){return new m1i(l,e)}class m1i extends SJ{constructor(e,i){super(),this.debugName=e,this.event=i,this.handleEvent=()=>{th(n=>{for(const s of this.observers)n.updateObserver(s,this),s.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function xJ(l){return typeof l=="string"?new aCt(l):new aCt(void 0,l)}class aCt extends SJ{get debugName(){return new v1(this._owner,this._debugName,void 0).getDebugName(this)??"Observable Signal"}toString(){return this.debugName}constructor(e,i){super(),this._debugName=e,this._owner=i}trigger(e,i){if(!e){th(n=>{this.trigger(n,i)},()=>`Trigger signal ${this.debugName}`);return}for(const n of this.observers)e.updateObserver(n,this),n.handleChange(this,i)}get(){}}function g1i(l){const e=new xDt(!1,void 0);return l.addObserver(e),fo(()=>{l.removeObserver(e)})}l1i(g1i);function kJ(l,e){const i=new xDt(!0,e);return l.addObserver(i),e?e(l.get()):l.reportChanges(),fo(()=>{l.removeObserver(i)})}c1i(kJ);class xDt{constructor(e,i){this._forceRecompute=e,this._handleValue=i,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter--,this._counter===0&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges())}handlePossibleChange(e){}handleChange(e,i){}}function Dse(l,e){let i;return mw({owner:l,debugReferenceFn:e},s=>(i=e(s,i),i))}function y1i(l,e,i,n){let s=new cCt(i,n);return mw({debugReferenceFn:i,owner:l,onLastObserverRemoved:()=>{s.dispose(),s=new cCt(i)}},d=>(s.setItems(e.read(d)),s.getItems()))}class cCt{constructor(e,i){this._map=e,this._keySelector=i,this._cache=new Map,this._items=[]}dispose(){this._cache.forEach(e=>e.store.dispose()),this._cache.clear()}setItems(e){const i=[],n=new Set(this._cache.keys());for(const s of e){const c=this._keySelector?this._keySelector(s):s;let d=this._cache.get(c);if(d)n.delete(c);else{const f=new wn;d={out:this._map(s,f),store:f},this._cache.set(c,d)}i.push(d.out)}for(const s of n)this._cache.get(s).store.dispose(),this._cache.delete(s);this._items=i}getItems(){return this._items}}function v1i(l,e){return Dse(l,(i,n)=>n??e(i))}class mwe{static fromFn(e){return new mwe(e())}constructor(e){this._value=bc(this,void 0),this.promiseResult=this._value,this.promise=e.then(i=>(th(n=>{this._value.set(new lCt(i,void 0),n)}),i),i=>{throw th(n=>{this._value.set(new lCt(void 0,i),n)}),i})}}class lCt{constructor(e,i){this.data=e,this.error=i}}function kDt(l,e,i,n){return e||(e=s=>s!=null),new Promise((s,c)=>{let d=!0,f=!1;const m=l.map(x=>({isFinished:e(x),error:i?i(x):!1,state:x})),v=ba(x=>{const{isFinished:w,error:I,state:P}=m.read(x);(w||I)&&(d?f=!0:v.dispose(),I?c(I===!0?P:I):s(P))});if(n){const x=n.onCancellationRequested(()=>{v.dispose(),x.dispose(),c(new vT)});if(n.isCancellationRequested){v.dispose(),x.dispose(),c(new vT);return}}d=!1,f&&v.dispose()})}class b1i extends SJ{get debugName(){return this._debugNameData.getDebugName(this)??"LazyObservableValue"}constructor(e,i,n){super(),this._debugNameData=e,this._equalityComparator=n,this._isUpToDate=!0,this._deltas=[],this._updateCounter=0,this._value=i}get(){return this._update(),this._value}_update(){if(!this._isUpToDate)if(this._isUpToDate=!0,this._deltas.length>0){for(const e of this.observers)for(const i of this._deltas)e.handleChange(this,i);this._deltas.length=0}else for(const e of this.observers)e.handleChange(this,void 0)}_beginUpdate(){if(this._updateCounter++,this._updateCounter===1)for(const e of this.observers)e.beginUpdate(this)}_endUpdate(){if(this._updateCounter--,this._updateCounter===0){this._update();const e=[...this.observers];for(const i of e)i.endUpdate(this)}}addObserver(e){const i=!this.observers.has(e)&&this._updateCounter>0;super.addObserver(e),i&&e.beginUpdate(this)}removeObserver(e){const i=this.observers.has(e)&&this._updateCounter>0;super.removeObserver(e),i&&e.endUpdate(this)}set(e,i,n){if(n===void 0&&this._equalityComparator(this._value,e))return;let s;i||(i=s=new wJ(()=>{},()=>`Setting ${this.debugName}`));try{if(this._isUpToDate=!1,this._setValue(e),n!==void 0&&this._deltas.push(n),i.updateObserver({beginUpdate:()=>this._beginUpdate(),endUpdate:()=>this._endUpdate(),handleChange:(c,d)=>{},handlePossibleChange:c=>{}},this),this._updateCounter>1)for(const c of this.observers)c.handlePossibleChange(this)}finally{s&&s.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function BVe(l,e){return l.lazy?new b1i(new v1(l.owner,l.debugName,void 0),e,l.equalsFn??Ew):new rJe(new v1(l.owner,l.debugName,void 0),e,l.equalsFn??Ew)}const _ne=class _ne extends xi{constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new gi),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new gi),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new gi({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,_ne.instanceCount++,this._registry=this._register(new OVe(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){_ne.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,i){const n=this._registry.guessLanguageIdByFilepathOrFirstLine(e,i);return Wqe(n,null)}createById(e){return new uCt(this.onDidChange,()=>this._createAndGetLanguageIdentifier(e))}createByFilepathOrFirstLine(e,i){return new uCt(this.onDidChange,()=>{const n=this.guessLanguageIdByFilepathOrFirstLine(e,i);return this._createAndGetLanguageIdentifier(n)})}_createAndGetLanguageIdentifier(e){return(!e||!this.isRegisteredLanguageId(e))&&(e=bv),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),Oh.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}};_ne.instanceCount=0;let WVe=_ne;class uCt{constructor(e,i){this._value=Tu(this,e,()=>i()),this.onDidChange=Tr.fromObservable(this._value)}get languageId(){return this._value.get()}}const ore={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:Yh.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"},C1i=()=>({get delay(){return-1},dispose:()=>{},showHover:()=>{}});let gwe=C1i;const S1i=new HE(()=>gwe("mouse",!1)),w1i=new HE(()=>gwe("element",!1));function x1i(l){gwe=l}function Dv(l){return l==="element"?w1i.value:S1i.value}function W$(){return gwe("element",!0)}let TDt={showHover:()=>{},hideHover:()=>{},showAndFocusLastHover:()=>{},setupManagedHover:()=>null,showManagedHover:()=>{}};function k1i(l){TDt=l}function QE(){return TDt}class T1i{constructor(e){this.spliceables=e}splice(e,i,n){this.spliceables.forEach(s=>s.splice(e,i,n))}}class pF extends Error{constructor(e,i){super(`ListError [${e}] ${i}`)}}function dCt(l,e){const i=[];for(const n of e){if(l.start>=n.range.end)continue;if(l.end<n.range.start)break;const s=h1.intersect(l,n.range);h1.isEmpty(s)||i.push({range:s,size:n.size})}return i}function VVe({start:l,end:e},i){return{start:l+i,end:e+i}}function D1i(l){const e=[];let i=null;for(const n of l){const s=n.range.start,c=n.range.end,d=n.size;if(i&&d===i.size){i.range.end=c;continue}i={range:{start:s,end:c},size:d},e.push(i)}return e}function E1i(...l){return D1i(l.reduce((e,i)=>e.concat(i),[]))}class I1i{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=e??0,this._size=this._paddingTop}splice(e,i,n=[]){const s=n.length-i,c=dCt({start:0,end:e},this.groups),d=dCt({start:e+i,end:Number.POSITIVE_INFINITY},this.groups).map(m=>({range:VVe(m.range,s),size:m.size})),f=n.map((m,v)=>({range:{start:e+v,end:e+v+1},size:m.size}));this.groups=E1i(c,f,d),this._size=this._paddingTop+this.groups.reduce((m,v)=>m+v.size*(v.range.end-v.range.start),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e<this._paddingTop)return 0;let i=0,n=this._paddingTop;for(const s of this.groups){const c=s.range.end-s.range.start,d=n+c*s.size;if(e<d)return i+Math.floor((e-n)/s.size);i+=c,n=d}return i}indexAfter(e){return Math.min(this.indexAt(e)+1,this.count)}positionAt(e){if(e<0)return-1;let i=0,n=0;for(const s of this.groups){const c=s.range.end-s.range.start,d=n+c;if(e<d)return this._paddingTop+i+(e-n)*s.size;i+=c*s.size,n=d}return-1}}class N1i{constructor(e){this.renderers=e,this.cache=new Map,this.transactionNodesPendingRemoval=new Set,this.inTransaction=!1}alloc(e){let i=this.getTemplateCache(e).pop(),n=!1;if(i)n=this.transactionNodesPendingRemoval.has(i.domNode),n&&this.transactionNodesPendingRemoval.delete(i.domNode);else{const s=Cr(".monaco-list-row"),d=this.getRenderer(e).renderTemplate(s);i={domNode:s,templateId:e,templateData:d}}return{row:i,isReusingConnectedDomNode:n}}release(e){e&&this.releaseRow(e)}transact(e){if(this.inTransaction)throw new Error("Already in transaction");this.inTransaction=!0;try{e()}finally{for(const i of this.transactionNodesPendingRemoval)this.doRemoveNode(i);this.transactionNodesPendingRemoval.clear(),this.inTransaction=!1}}releaseRow(e){const{domNode:i,templateId:n}=e;i&&(this.inTransaction?this.transactionNodesPendingRemoval.add(i):this.doRemoveNode(i)),this.getTemplateCache(n).push(e)}doRemoveNode(e){e.classList.remove("scrolling"),e.remove()}getTemplateCache(e){let i=this.cache.get(e);return i||(i=[],this.cache.set(e,i)),i}dispose(){this.cache.forEach((e,i)=>{for(const n of e)this.getRenderer(i).disposeTemplate(n.templateData),n.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){const i=this.renderers.get(e);if(!i)throw new Error(`No renderer found for ${e}`);return i}}var C6=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c};const mF={CurrentDragAndDropData:void 0},$N={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(l){return[l]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class Ese{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class L1i{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class P1i{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let i=0;i<e.files.length;i++){const n=e.files.item(i);n&&(n.size||n.type)&&this.files.push(n)}}}getData(){return{types:this.types,files:this.files}}}function A1i(l,e){return Array.isArray(l)&&Array.isArray(e)?Lf(l,e):l===e}class O1i{constructor(e){e!=null&&e.getSetSize?this.getSetSize=e.getSetSize.bind(e):this.getSetSize=(i,n,s)=>s,e!=null&&e.getPosInSet?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(i,n)=>n+1,e!=null&&e.getRole?this.getRole=e.getRole.bind(e):this.getRole=i=>"listitem",e!=null&&e.isChecked?this.isChecked=e.isChecked.bind(e):this.isChecked=i=>{}}}const sCe=class sCe{get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get scrollableElementDomNode(){return this.scrollableElement.getDomNode()}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const i of this.items)this.measureItemWidth(i);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:uFe(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,i,n,s=$N){var d,f;if(this.virtualDelegate=i,this.domId=`list_id_${++sCe.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new Ck(50),this.splicing=!1,this.dragOverAnimationStopDisposable=xi.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=xi.None,this.onDragLeaveTimeout=xi.None,this.disposables=new wn,this._onDidChangeContentHeight=new gi,this._onDidChangeContentWidth=new gi,this.onDidChangeContentHeight=Tr.latch(this._onDidChangeContentHeight.event,void 0,this.disposables),this._horizontalScrolling=!1,s.horizontalScrolling&&s.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=this.createRangeMap(s.paddingTop??0);for(const m of n)this.renderers.set(m.templateId,m);this.cache=this.disposables.add(new N1i(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof s.mouseSupport=="boolean"?s.mouseSupport:!0),this._horizontalScrolling=s.horizontalScrolling??$N.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=typeof s.paddingBottom>"u"?0:s.paddingBottom,this.accessibilityProvider=new O1i(s.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(s.transformOptimization??$N.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(y1.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new CJ({forceIntegerValues:!0,smoothScrollDuration:s.smoothScrolling??!1?125:0,scheduleAtNextAnimationFrame:m=>ZC(Eo(this.domNode),m)})),this.scrollableElement=this.disposables.add(new owe(this.rowsContainer,{alwaysConsumeMouseWheel:s.alwaysConsumeMouseWheel??$N.alwaysConsumeMouseWheel,horizontal:1,vertical:s.verticalScrollMode??$N.verticalScrollMode,useShadows:s.useShadows??$N.useShadows,mouseWheelScrollSensitivity:s.mouseWheelScrollSensitivity,fastScrollSensitivity:s.fastScrollSensitivity,scrollByPage:s.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(en(this.rowsContainer,Ud.Change,m=>this.onTouchChange(m))),this.disposables.add(en(this.scrollableElement.getDomNode(),"scroll",m=>m.target.scrollTop=0)),this.disposables.add(en(this.domNode,"dragover",m=>this.onDragOver(this.toDragEvent(m)))),this.disposables.add(en(this.domNode,"drop",m=>this.onDrop(this.toDragEvent(m)))),this.disposables.add(en(this.domNode,"dragleave",m=>this.onDragLeave(this.toDragEvent(m)))),this.disposables.add(en(this.domNode,"dragend",m=>this.onDragEnd(m))),this.setRowLineHeight=s.setRowLineHeight??$N.setRowLineHeight,this.setRowHeight=s.setRowHeight??$N.setRowHeight,this.supportDynamicHeights=s.supportDynamicHeights??$N.supportDynamicHeights,this.dnd=s.dnd??this.disposables.add($N.dnd),this.layout((d=s.initialSize)==null?void 0:d.height,(f=s.initialSize)==null?void 0:f.width)}updateOptions(e){e.paddingBottom!==void 0&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),e.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),e.horizontalScrolling!==void 0&&(this.horizontalScrolling=e.horizontalScrolling);let i;if(e.scrollByPage!==void 0&&(i={...i??{},scrollByPage:e.scrollByPage}),e.mouseWheelScrollSensitivity!==void 0&&(i={...i??{},mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),e.fastScrollSensitivity!==void 0&&(i={...i??{},fastScrollSensitivity:e.fastScrollSensitivity}),i&&this.scrollableElement.updateOptions(i),e.paddingTop!==void 0&&e.paddingTop!==this.rangeMap.paddingTop){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),s=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(n,Math.max(0,this.lastRenderTop+s),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}createRangeMap(e){return new I1i(e)}splice(e,i,n=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,i,n)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,i,n=[]){const s=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),c={start:e,end:e+i},d=h1.intersect(s,c),f=new Map;for(let Ce=d.end-1;Ce>=d.start;Ce--){const Fe=this.items[Ce];if(Fe.dragStartDisposable.dispose(),Fe.checkedDisposable.dispose(),Fe.row){let rt=f.get(Fe.templateId);rt||(rt=[],f.set(Fe.templateId,rt));const ct=this.renderers.get(Fe.templateId);ct&&ct.disposeElement&&ct.disposeElement(Fe.element,Ce,Fe.row.templateData,Fe.size),rt.unshift(Fe.row)}Fe.row=null,Fe.stale=!0}const m={start:e+i,end:this.items.length},v=h1.intersect(m,s),x=h1.relativeComplement(m,s),w=n.map(Ce=>({id:String(this.itemId++),element:Ce,templateId:this.virtualDelegate.getTemplateId(Ce),size:this.virtualDelegate.getHeight(Ce),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(Ce),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:xi.None,checkedDisposable:xi.None,stale:!1}));let I;e===0&&i>=this.items.length?(this.rangeMap=this.createRangeMap(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,w),I=this.items,this.items=w):(this.rangeMap.splice(e,i,w),I=this.items.splice(e,i,...w));const P=n.length-i,O=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),z=VVe(v,P),J=h1.intersect(O,z);for(let Ce=J.start;Ce<J.end;Ce++)this.updateItemInDOM(this.items[Ce],Ce);const Y=h1.relativeComplement(z,O);for(const Ce of Y)for(let Fe=Ce.start;Fe<Ce.end;Fe++)this.removeItemFromDOM(Fe);const ae=x.map(Ce=>VVe(Ce,P)),ye=[{start:e,end:e+n.length},...ae].map(Ce=>h1.intersect(O,Ce)).reverse();for(const Ce of ye)for(let Fe=Ce.end-1;Fe>=Ce.start;Fe--){const rt=this.items[Fe],ct=f.get(rt.templateId),Mt=ct==null?void 0:ct.pop();this.insertItemInDOM(Fe,Mt)}for(const Ce of f.values())for(const Fe of Ce)this.cache.release(Fe);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),I.map(Ce=>Ce.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=ZC(Eo(this.domNode),()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const i of this.items)typeof i.width<"u"&&(e=Math.max(e,i.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:e===0?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){return this.getRenderRange(this.lastRenderTop,this.lastRenderHeight).start}element(e){return this.items[e].element}indexOf(e){return this.items.findIndex(i=>i.element===e)}domElement(e){const i=this.items[e].row;return i&&i.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,i){const n={height:typeof e=="number"?e:rdi(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,n.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(n),typeof i<"u"&&(this.renderWidth=i,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof i=="number"?i:uFe(this.domNode)})}render(e,i,n,s,c,d=!1){const f=this.getRenderRange(i,n),m=h1.relativeComplement(f,e).reverse(),v=h1.relativeComplement(e,f);if(d){const x=h1.intersect(e,f);for(let w=x.start;w<x.end;w++)this.updateItemInDOM(this.items[w],w)}this.cache.transact(()=>{for(const x of v)for(let w=x.start;w<x.end;w++)this.removeItemFromDOM(w);for(const x of m)for(let w=x.end-1;w>=x.start;w--)this.insertItemInDOM(w)}),s!==void 0&&(this.rowsContainer.style.left=`-${s}px`),this.rowsContainer.style.top=`-${i}px`,this.horizontalScrolling&&c!==void 0&&(this.rowsContainer.style.width=`${Math.max(c,this.renderWidth)}px`),this.lastRenderTop=i,this.lastRenderHeight=n}insertItemInDOM(e,i){var m,v;const n=this.items[e];if(!n.row)if(i)n.row=i,n.stale=!0;else{const x=this.cache.alloc(n.templateId);n.row=x.row,n.stale||(n.stale=x.isReusingConnectedDomNode)}const s=this.accessibilityProvider.getRole(n.element)||"listitem";n.row.domNode.setAttribute("role",s);const c=this.accessibilityProvider.isChecked(n.element);if(typeof c=="boolean")n.row.domNode.setAttribute("aria-checked",String(!!c));else if(c){const x=w=>n.row.domNode.setAttribute("aria-checked",String(!!w));x(c.value),n.checkedDisposable=c.onDidChange(()=>x(c.value))}if(n.stale||!n.row.domNode.parentElement){const x=((v=(m=this.items.at(e+1))==null?void 0:m.row)==null?void 0:v.domNode)??null;(n.row.domNode.parentElement!==this.rowsContainer||n.row.domNode.nextElementSibling!==x)&&this.rowsContainer.insertBefore(n.row.domNode,x),n.stale=!1}this.updateItemInDOM(n,e);const d=this.renderers.get(n.templateId);if(!d)throw new Error(`No renderer found for template id ${n.templateId}`);d==null||d.renderElement(n.element,e,n.row.templateData,n.size);const f=this.dnd.getDragURI(n.element);n.dragStartDisposable.dispose(),n.row.domNode.draggable=!!f,f&&(n.dragStartDisposable=en(n.row.domNode,"dragstart",x=>this.onDragStart(n.element,f,x))),this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=uFe(e.row.domNode);const i=Eo(e.row.domNode).getComputedStyle(e.row.domNode);i.paddingLeft&&(e.width+=parseFloat(i.paddingLeft)),i.paddingRight&&(e.width+=parseFloat(i.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,i){e.row.domNode.style.top=`${this.elementTop(i)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${i}`),e.row.domNode.setAttribute("data-last-element",i===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",i%2===0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,i,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,i))),e.row.domNode.setAttribute("id",this.getElementDomId(i)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const i=this.items[e];if(i.dragStartDisposable.dispose(),i.checkedDisposable.dispose(),i.row){const n=this.renderers.get(i.templateId);n&&n.disposeElement&&n.disposeElement(i.element,e,i.row.templateData,i.size),this.cache.release(i.row),i.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,i){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:i})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return Tr.map(this.disposables.add(new Xc(this.domNode,"click")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseDblClick(){return Tr.map(this.disposables.add(new Xc(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseMiddleClick(){return Tr.filter(Tr.map(this.disposables.add(new Xc(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e),this.disposables),e=>e.browserEvent.button===1,this.disposables)}get onMouseDown(){return Tr.map(this.disposables.add(new Xc(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOver(){return Tr.map(this.disposables.add(new Xc(this.domNode,"mouseover")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOut(){return Tr.map(this.disposables.add(new Xc(this.domNode,"mouseout")).event,e=>this.toMouseEvent(e),this.disposables)}get onContextMenu(){return Tr.any(Tr.map(this.disposables.add(new Xc(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e),this.disposables),Tr.map(this.disposables.add(new Xc(this.domNode,Ud.Contextmenu)).event,e=>this.toGestureEvent(e),this.disposables))}get onTouchStart(){return Tr.map(this.disposables.add(new Xc(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e),this.disposables)}get onTap(){return Tr.map(this.disposables.add(new Xc(this.rowsContainer,Ud.Tap)).event,e=>this.toGestureEvent(e),this.disposables)}toMouseEvent(e){const i=this.getItemIndexFromEventTarget(e.target||null),n=typeof i>"u"?void 0:this.items[i],s=n&&n.element;return{browserEvent:e,index:i,element:s}}toTouchEvent(e){const i=this.getItemIndexFromEventTarget(e.target||null),n=typeof i>"u"?void 0:this.items[i],s=n&&n.element;return{browserEvent:e,index:i,element:s}}toGestureEvent(e){const i=this.getItemIndexFromEventTarget(e.initialTarget||null),n=typeof i>"u"?void 0:this.items[i],s=n&&n.element;return{browserEvent:e,index:i,element:s}}toDragEvent(e){const i=this.getItemIndexFromEventTarget(e.target||null),n=typeof i>"u"?void 0:this.items[i],s=n&&n.element,c=this.getTargetSector(e,i);return{browserEvent:e,index:i,element:s,sector:c}}onScroll(e){try{const i=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(i,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(i){throw console.error("Got bad scroll event:",e),i}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,i,n){var c,d;if(!n.dataTransfer)return;const s=this.dnd.getDragElements(e);if(n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setData(ore.TEXT,i),n.dataTransfer.setDragImage){let f;this.dnd.getDragLabel&&(f=this.dnd.getDragLabel(s,n)),typeof f>"u"&&(f=String(s.length));const m=Cr(".monaco-drag-image");m.textContent=f,(w=>{for(;w&&!w.classList.contains("monaco-workbench");)w=w.parentElement;return w||this.domNode.ownerDocument})(this.domNode).appendChild(m),n.dataTransfer.setDragImage(m,-10,-10),setTimeout(()=>m.remove(),0)}this.domNode.classList.add("dragging"),this.currentDragData=new Ese(s),mF.CurrentDragAndDropData=new L1i(s),(d=(c=this.dnd).onDragStart)==null||d.call(c,this.currentDragData,n)}onDragOver(e){var c,d;if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),mF.CurrentDragAndDropData&&mF.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(mF.CurrentDragAndDropData)this.currentDragData=mF.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new P1i}const i=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.sector,e.browserEvent);if(this.canDrop=typeof i=="boolean"?i:i.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;e.browserEvent.dataTransfer.dropEffect=typeof i!="boolean"&&((c=i.effect)==null?void 0:c.type)===0?"copy":"move";let n;typeof i!="boolean"&&i.feedback?n=i.feedback:typeof e.index>"u"?n=[-1]:n=[e.index],n=r6(n).filter(f=>f>=-1&&f<this.length).sort((f,m)=>f-m),n=n[0]===-1?[-1]:n;let s=typeof i!="boolean"&&i.effect&&i.effect.position?i.effect.position:"drop-target";if(A1i(this.currentDragFeedback,n)&&this.currentDragFeedbackPosition===s)return!0;if(this.currentDragFeedback=n,this.currentDragFeedbackPosition=s,this.currentDragFeedbackDisposable.dispose(),n[0]===-1)this.domNode.classList.add(s),this.rowsContainer.classList.add(s),this.currentDragFeedbackDisposable=fo(()=>{this.domNode.classList.remove(s),this.rowsContainer.classList.remove(s)});else{if(n.length>1&&s!=="drop-target")throw new Error("Can't use multiple feedbacks with position different than 'over'");s==="drop-target-after"&&n[0]<this.length-1&&(n[0]+=1,s="drop-target-before");for(const f of n){const m=this.items[f];m.dropTarget=!0,(d=m.row)==null||d.domNode.classList.add(s)}this.currentDragFeedbackDisposable=fo(()=>{var f;for(const m of n){const v=this.items[m];v.dropTarget=!1,(f=v.row)==null||f.domNode.classList.remove(s)}})}return!0}onDragLeave(e){var i,n;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=CR(()=>this.clearDragOverFeedback(),100,this.disposables),this.currentDragData&&((n=(i=this.dnd).onDragLeave)==null||n.call(i,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;const i=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,mF.CurrentDragAndDropData=void 0,!(!i||!e.browserEvent.dataTransfer)&&(e.browserEvent.preventDefault(),i.update(e.browserEvent.dataTransfer),this.dnd.drop(i,e.element,e.index,e.sector,e.browserEvent))}onDragEnd(e){var i,n;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,mF.CurrentDragAndDropData=void 0,(n=(i=this.dnd).onDragEnd)==null||n.call(i,e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackPosition=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=xi.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const i=S2t(this.domNode).top;this.dragOverAnimationDisposable=gdi(Eo(this.domNode),this.animateDragAndDropScrollTop.bind(this,i))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=CR(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(this.dragOverMouseY===void 0)return;const i=this.dragOverMouseY-e,n=this.renderHeight-35;i<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(i-35))):i>n&&(this.scrollTop+=Math.min(14,Math.floor(.3*(i-n))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getTargetSector(e,i){if(i===void 0)return;const n=e.offsetY/this.items[i].size,s=Math.floor(n/.25);return uv(s,0,3)}getItemIndexFromEventTarget(e){const i=this.scrollableElement.getDomNode();let n=e;for(;(Mm(n)||udi(n))&&n!==this.rowsContainer&&i.contains(n);){const s=n.getAttribute("data-index");if(s){const c=Number(s);if(!isNaN(c))return c}n=n.parentElement}}getRenderRange(e,i){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+i-1)}}_rerender(e,i,n){const s=this.getRenderRange(e,i);let c,d;e===this.elementTop(s.start)?(c=s.start,d=0):s.end-s.start>1&&(c=s.start+1,d=this.elementTop(c)-e);let f=0;for(;;){const m=this.getRenderRange(e,i);let v=!1;for(let x=m.start;x<m.end;x++){const w=this.probeDynamicHeight(x);w!==0&&this.rangeMap.splice(x,1,[this.items[x]]),f+=w,v=v||w!==0}if(!v){f!==0&&this.eventuallyUpdateScrollDimensions();const x=h1.relativeComplement(s,m);for(const I of x)for(let P=I.start;P<I.end;P++)this.items[P].row&&this.removeItemFromDOM(P);const w=h1.relativeComplement(m,s).reverse();for(const I of w)for(let P=I.end-1;P>=I.start;P--)this.insertItemInDOM(P);for(let I=m.start;I<m.end;I++)this.items[I].row&&this.updateItemInDOM(this.items[I],I);if(typeof c=="number"){const I=this.scrollable.getFutureScrollPosition().scrollTop-e,P=this.elementTop(c)-d+I;this.setScrollTop(P,n)}this._onDidChangeContentHeight.fire(this.contentHeight);return}}}probeDynamicHeight(e){var d,f,m;const i=this.items[e];if(this.virtualDelegate.getDynamicHeight){const v=this.virtualDelegate.getDynamicHeight(i.element);if(v!==null){const x=i.size;return i.size=v,i.lastDynamicHeightWidth=this.renderWidth,v-x}}if(!i.hasDynamicHeight||i.lastDynamicHeightWidth===this.renderWidth||this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(i.element))return 0;const n=i.size;if(i.row)return i.row.domNode.style.height="",i.size=i.row.domNode.offsetHeight,i.size===0&&!Am(i.row.domNode,Eo(i.row.domNode).document.body)&&console.warn("Measuring item node that is not in DOM! Add ListView to the DOM before measuring row height!",new Error().stack),i.lastDynamicHeightWidth=this.renderWidth,i.size-n;const{row:s}=this.cache.alloc(i.templateId);s.domNode.style.height="",this.rowsContainer.appendChild(s.domNode);const c=this.renderers.get(i.templateId);if(!c)throw new tu("Missing renderer for templateId: "+i.templateId);return c.renderElement(i.element,e,s.templateData,void 0),i.size=s.domNode.offsetHeight,(d=c.disposeElement)==null||d.call(c,i.element,e,s.templateData,void 0),(m=(f=this.virtualDelegate).setDynamicHeight)==null||m.call(f,i.element,i.size),i.lastDynamicHeightWidth=this.renderWidth,s.domNode.remove(),this.cache.release(s),i.size-n}getElementDomId(e){return`${this.domId}_${e}`}dispose(){var e,i,n;for(const s of this.items)if(s.dragStartDisposable.dispose(),s.checkedDisposable.dispose(),s.row){const c=this.renderers.get(s.row.templateId);c&&((e=c.disposeElement)==null||e.call(c,s.element,-1,s.row.templateData,void 0),c.disposeTemplate(s.row.templateData))}this.items=[],(i=this.domNode)==null||i.remove(),(n=this.dragOverAnimationDisposable)==null||n.dispose(),this.disposables.dispose()}};sCe.InstanceCount=0;let xT=sCe;C6([x_],xT.prototype,"onMouseClick",null);C6([x_],xT.prototype,"onMouseDblClick",null);C6([x_],xT.prototype,"onMouseMiddleClick",null);C6([x_],xT.prototype,"onMouseDown",null);C6([x_],xT.prototype,"onMouseOver",null);C6([x_],xT.prototype,"onMouseOut",null);C6([x_],xT.prototype,"onContextMenu",null);C6([x_],xT.prototype,"onTouchStart",null);C6([x_],xT.prototype,"onTap",null);var HR=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c};class M1i{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,i,n){const s=this.renderedElements.findIndex(c=>c.templateData===n);if(s>=0){const c=this.renderedElements[s];this.trait.unrender(n),c.index=i}else{const c={index:i,templateData:n};this.renderedElements.push(c)}this.trait.renderIndex(i,n)}splice(e,i,n){const s=[];for(const c of this.renderedElements)c.index<e?s.push(c):c.index>=e+i&&s.push({index:c.index+n-i,templateData:c.templateData});this.renderedElements=s}renderIndexes(e){for(const{index:i,templateData:n}of this.renderedElements)e.indexOf(i)>-1&&this.trait.renderIndex(i,n)}disposeTemplate(e){const i=this.renderedElements.findIndex(n=>n.templateData===e);i<0||this.renderedElements.splice(i,1)}}let Wye=class{get name(){return this._trait}get renderer(){return new M1i(this)}constructor(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new gi,this.onChange=this._onChange.event}splice(e,i,n){const s=n.length-i,c=e+i,d=[];let f=0;for(;f<this.sortedIndexes.length&&this.sortedIndexes[f]<e;)d.push(this.sortedIndexes[f++]);for(let m=0;m<n.length;m++)n[m]&&d.push(m+e);for(;f<this.sortedIndexes.length&&this.sortedIndexes[f]>=c;)d.push(this.sortedIndexes[f++]+s);this.renderer.splice(e,i,n.length),this._set(d,d)}renderIndex(e,i){i.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,i){return this._set(e,[...e].sort(hCt),i)}_set(e,i,n){const s=this.indexes,c=this.sortedIndexes;this.indexes=e,this.sortedIndexes=i;const d=HVe(c,e);return this.renderer.renderIndexes(d),this._onChange.fire({indexes:e,browserEvent:n}),s}get(){return this.indexes}contains(e){return Dne(this.sortedIndexes,e,hCt)>=0}dispose(){vd(this._onChange)}};HR([x_],Wye.prototype,"renderer",null);class R1i extends Wye{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,i){super.renderIndex(e,i),this.setAriaSelected&&(this.contains(e)?i.setAttribute("aria-selected","true"):i.setAttribute("aria-selected","false"))}}class jFe{constructor(e,i,n){this.trait=e,this.view=i,this.identityProvider=n}splice(e,i,n){if(!this.identityProvider)return this.trait.splice(e,i,new Array(n.length).fill(!1));const s=this.trait.get().map(f=>this.identityProvider.getId(this.view.element(f)).toString());if(s.length===0)return this.trait.splice(e,i,new Array(n.length).fill(!1));const c=new Set(s),d=n.map(f=>c.has(this.identityProvider.getId(f).toString()));this.trait.splice(e,i,d)}}function KM(l){return l.tagName==="INPUT"||l.tagName==="TEXTAREA"}function Ise(l,e){return l.classList.contains(e)?!0:l.classList.contains("monaco-list")||!l.parentElement?!1:Ise(l.parentElement,e)}function oie(l){return Ise(l,"monaco-editor")}function F1i(l){return Ise(l,"monaco-custom-toggle")}function B1i(l){return Ise(l,"action-item")}function Nie(l){return Ise(l,"monaco-tree-sticky-row")}function are(l){return l.classList.contains("monaco-tree-sticky-container")}function DDt(l){return l.tagName==="A"&&l.classList.contains("monaco-button")||l.tagName==="DIV"&&l.classList.contains("monaco-button-dropdown")?!0:l.classList.contains("monaco-list")||!l.parentElement?!1:DDt(l.parentElement)}class EDt{get onKeyDown(){return Tr.chain(this.disposables.add(new Xc(this.view.domNode,"keydown")).event,e=>e.filter(i=>!KM(i.target)).map(i=>new Id(i)))}constructor(e,i,n){this.list=e,this.view=i,this.disposables=new wn,this.multipleSelectionDisposables=new wn,this.multipleSelectionSupport=n.multipleSelectionSupport,this.disposables.add(this.onKeyDown(s=>{switch(s.keyCode){case 3:return this.onEnter(s);case 16:return this.onUpArrow(s);case 18:return this.onDownArrow(s);case 11:return this.onPageUpArrow(s);case 12:return this.onPageDownArrow(s);case 9:return this.onEscape(s);case 31:this.multipleSelectionSupport&&(Hc?s.metaKey:s.ctrlKey)&&this.onCtrlA(s)}}))}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionSupport=e.multipleSelectionSupport)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const i=this.list.getFocus()[0];this.list.setAnchor(i),this.list.reveal(i),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const i=this.list.getFocus()[0];this.list.setAnchor(i),this.list.reveal(i),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const i=this.list.getFocus()[0];this.list.setAnchor(i),this.list.reveal(i),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const i=this.list.getFocus()[0];this.list.setAnchor(i),this.list.reveal(i),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(Sb(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}HR([x_],EDt.prototype,"onKeyDown",null);var gL;(function(l){l[l.Automatic=0]="Automatic",l[l.Trigger=1]="Trigger"})(gL||(gL={}));var aq;(function(l){l[l.Idle=0]="Idle",l[l.Typing=1]="Typing"})(aq||(aq={}));const W1i=new class{mightProducePrintableCharacter(l){return l.ctrlKey||l.metaKey||l.altKey?!1:l.keyCode>=31&&l.keyCode<=56||l.keyCode>=21&&l.keyCode<=30||l.keyCode>=98&&l.keyCode<=107||l.keyCode>=85&&l.keyCode<=95}};class V1i{constructor(e,i,n,s,c){this.list=e,this.view=i,this.keyboardNavigationLabelProvider=n,this.keyboardNavigationEventFilter=s,this.delegate=c,this.enabled=!1,this.state=aq.Idle,this.mode=gL.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new wn,this.disposables=new wn,this.updateOptions(e.options)}updateOptions(e){e.typeNavigationEnabled??!0?this.enable():this.disable(),this.mode=e.typeNavigationMode??gL.Automatic}enable(){if(this.enabled)return;let e=!1;const i=Tr.chain(this.enabledDisposables.add(new Xc(this.view.domNode,"keydown")).event,c=>c.filter(d=>!KM(d.target)).filter(()=>this.mode===gL.Automatic||this.triggered).map(d=>new Id(d)).filter(d=>e||this.keyboardNavigationEventFilter(d)).filter(d=>this.delegate.mightProducePrintableCharacter(d)).forEach(d=>il.stop(d,!0)).map(d=>d.browserEvent.key)),n=Tr.debounce(i,()=>null,800,void 0,void 0,void 0,this.enabledDisposables);Tr.reduce(Tr.any(i,n),(c,d)=>d===null?null:(c||"")+d,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),n(this.onClear,this,this.enabledDisposables),i(()=>e=!0,void 0,this.enabledDisposables),n(()=>e=!1,void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var i;const e=this.list.getFocus();if(e.length>0&&e[0]===this.previouslyFocused){const n=(i=this.list.options.accessibilityProvider)==null?void 0:i.getAriaLabel(this.list.element(e[0]));typeof n=="string"?xv(n):n&&xv(n.get())}this.previouslyFocused=-1}onInput(e){if(!e){this.state=aq.Idle,this.triggered=!1;return}const i=this.list.getFocus(),n=i.length>0?i[0]:0,s=this.state===aq.Idle?1:0;this.state=aq.Typing;for(let c=0;c<this.list.length;c++){const d=(n+c+s)%this.list.length,f=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(d)),m=f&&f.toString();if(this.list.options.typeNavigationEnabled){if(typeof m<"u"){if(ere(e,m)){this.previouslyFocused=n,this.list.setFocus([d]),this.list.reveal(d);return}const v=cgi(e,m);if(v&&v[0].end-v[0].start>1&&v.length===1){this.previouslyFocused=n,this.list.setFocus([d]),this.list.reveal(d);return}}}else if(typeof m>"u"||ere(e,m)){this.previouslyFocused=n,this.list.setFocus([d]),this.list.reveal(d);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class H1i{constructor(e,i){this.list=e,this.view=i,this.disposables=new wn;const n=Tr.chain(this.disposables.add(new Xc(i.domNode,"keydown")).event,c=>c.filter(d=>!KM(d.target)).map(d=>new Id(d)));Tr.chain(n,c=>c.filter(d=>d.keyCode===2&&!d.ctrlKey&&!d.metaKey&&!d.shiftKey&&!d.altKey))(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const i=this.list.getFocus();if(i.length===0)return;const n=this.view.domElement(i[0]);if(!n)return;const s=n.querySelector("[tabIndex]");if(!s||!Mm(s)||s.tabIndex===-1)return;const c=Eo(s).getComputedStyle(s);c.visibility==="hidden"||c.display==="none"||(e.preventDefault(),e.stopPropagation(),s.focus())}dispose(){this.disposables.dispose()}}function IDt(l){return Hc?l.browserEvent.metaKey:l.browserEvent.ctrlKey}function NDt(l){return l.browserEvent.shiftKey}function j1i(l){return d$e(l)&&l.button===2}const fCt={isSelectionSingleChangeEvent:IDt,isSelectionRangeChangeEvent:NDt};class LDt{constructor(e){this.list=e,this.disposables=new wn,this._onPointer=new gi,this.onPointer=this._onPointer.event,e.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||fCt),this.mouseSupport=typeof e.options.mouseSupport>"u"||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(y1.addTarget(e.getHTMLElement()))),Tr.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||fCt))}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):!1}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):!1}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){oie(e.browserEvent.target)||D0()!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(KM(e.browserEvent.target)||oie(e.browserEvent.target))return;const i=typeof e.index>"u"?[]:[e.index];this.list.setFocus(i,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport||KM(e.browserEvent.target)||oie(e.browserEvent.target)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const i=e.index;if(typeof i>"u"){this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionChangeEvent(e))return this.changeSelection(e);this.list.setFocus([i],e.browserEvent),this.list.setAnchor(i),j1i(e.browserEvent)||this.list.setSelection([i],e.browserEvent),this._onPointer.fire(e)}onDoubleClick(e){if(KM(e.browserEvent.target)||oie(e.browserEvent.target)||this.isSelectionChangeEvent(e)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const i=this.list.getFocus();this.list.setSelection(i,e.browserEvent)}changeSelection(e){const i=e.index;let n=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){typeof n>"u"&&(n=this.list.getFocus()[0]??i,this.list.setAnchor(n));const s=Math.min(n,i),c=Math.max(n,i),d=Sb(s,c+1),f=this.list.getSelection(),m=q1i(HVe(f,[n]),n);if(m.length===0)return;const v=HVe(d,$1i(f,m));this.list.setSelection(v,e.browserEvent),this.list.setFocus([i],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const s=this.list.getSelection(),c=s.filter(d=>d!==i);this.list.setFocus([i]),this.list.setAnchor(i),s.length===c.length?this.list.setSelection([...c,i],e.browserEvent):this.list.setSelection(c,e.browserEvent)}}dispose(){this.disposables.dispose()}}class PDt{constructor(e,i){this.styleElement=e,this.selectorSuffix=i}style(e){const i=this.selectorSuffix&&`.${this.selectorSuffix}`,n=[];e.listBackground&&n.push(`.monaco-list${i} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(n.push(`.monaco-list${i}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),n.push(`.monaco-list${i}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&n.push(`.monaco-list${i}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(n.push(`.monaco-list${i}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),n.push(`.monaco-list${i}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&n.push(`.monaco-list${i}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&n.push(`.monaco-list${i}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&n.push(`
+ .monaco-drag-image,
+ .monaco-list${i}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }
+ `),e.listFocusAndSelectionForeground&&n.push(`
+ .monaco-drag-image,
+ .monaco-list${i}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }
+ `),e.listInactiveFocusForeground&&(n.push(`.monaco-list${i} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),n.push(`.monaco-list${i} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&n.push(`.monaco-list${i} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(n.push(`.monaco-list${i} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),n.push(`.monaco-list${i} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(n.push(`.monaco-list${i} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),n.push(`.monaco-list${i} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&n.push(`.monaco-list${i} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&n.push(`.monaco-list${i}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&n.push(`.monaco-list${i}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`);const s=Z4(e.listFocusAndSelectionOutline,Z4(e.listSelectionOutline,e.listFocusOutline??""));s&&n.push(`.monaco-list${i}:focus .monaco-list-row.focused.selected { outline: 1px solid ${s}; outline-offset: -1px;}`),e.listFocusOutline&&n.push(`
+ .monaco-drag-image,
+ .monaco-list${i}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }
+ .monaco-workbench.context-menu-visible .monaco-list${i}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }
+ `);const c=Z4(e.listSelectionOutline,e.listInactiveFocusOutline??"");c&&n.push(`.monaco-list${i} .monaco-list-row.focused.selected { outline: 1px dotted ${c}; outline-offset: -1px; }`),e.listSelectionOutline&&n.push(`.monaco-list${i} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listInactiveFocusOutline&&n.push(`.monaco-list${i} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&n.push(`.monaco-list${i} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropOverBackground&&n.push(`
+ .monaco-list${i}.drop-target,
+ .monaco-list${i} .monaco-list-rows.drop-target,
+ .monaco-list${i} .monaco-list-row.drop-target { background-color: ${e.listDropOverBackground} !important; color: inherit !important; }
+ `),e.listDropBetweenBackground&&(n.push(`
+ .monaco-list${i} .monaco-list-rows.drop-target-before .monaco-list-row:first-child::before,
+ .monaco-list${i} .monaco-list-row.drop-target-before::before {
+ content: ""; position: absolute; top: 0px; left: 0px; width: 100%; height: 1px;
+ background-color: ${e.listDropBetweenBackground};
+ }`),n.push(`
+ .monaco-list${i} .monaco-list-rows.drop-target-after .monaco-list-row:last-child::after,
+ .monaco-list${i} .monaco-list-row.drop-target-after::after {
+ content: ""; position: absolute; bottom: 0px; left: 0px; width: 100%; height: 1px;
+ background-color: ${e.listDropBetweenBackground};
+ }`)),e.tableColumnsBorder&&n.push(`
+ .monaco-table > .monaco-split-view2,
+ .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before,
+ .monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2,
+ .monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {
+ border-color: ${e.tableColumnsBorder};
+ }
+
+ .monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2,
+ .monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {
+ border-color: transparent;
+ }
+ `),e.tableOddRowsBackgroundColor&&n.push(`
+ .monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,
+ .monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,
+ .monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {
+ background-color: ${e.tableOddRowsBackgroundColor};
+ }
+ `),this.styleElement.textContent=n.join(`
+`)}}const z1i={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropOverBackground:"#383B3D",listDropBetweenBackground:"#EEEEEE",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:In.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:In.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:In.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},U1i={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};function q1i(l,e){const i=l.indexOf(e);if(i===-1)return[];const n=[];let s=i-1;for(;s>=0&&l[s]===e-(i-s);)n.push(l[s--]);for(n.reverse(),s=i;s<l.length&&l[s]===e+(s-i);)n.push(l[s++]);return n}function HVe(l,e){const i=[];let n=0,s=0;for(;n<l.length||s<e.length;)if(n>=l.length)i.push(e[s++]);else if(s>=e.length)i.push(l[n++]);else if(l[n]===e[s]){i.push(l[n]),n++,s++;continue}else l[n]<e[s]?i.push(l[n++]):i.push(e[s++]);return i}function $1i(l,e){const i=[];let n=0,s=0;for(;n<l.length||s<e.length;)if(n>=l.length)i.push(e[s++]);else if(s>=e.length)i.push(l[n++]);else if(l[n]===e[s]){n++,s++;continue}else l[n]<e[s]?i.push(l[n++]):s++;return i}const hCt=(l,e)=>l-e;class J1i{constructor(e,i){this._templateId=e,this.renderers=i}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(i=>i.renderTemplate(e))}renderElement(e,i,n,s){let c=0;for(const d of this.renderers)d.renderElement(e,i,n[c++],s)}disposeElement(e,i,n,s){var d;let c=0;for(const f of this.renderers)(d=f.disposeElement)==null||d.call(f,e,i,n[c],s),c+=1}disposeTemplate(e){let i=0;for(const n of this.renderers)n.disposeTemplate(e[i++])}}class G1i{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return{container:e,disposables:new wn}}renderElement(e,i,n){const s=this.accessibilityProvider.getAriaLabel(e),c=s&&typeof s!="string"?s:mk(s);n.disposables.add(ba(f=>{this.setAriaLabel(f.readObservable(c),n.container)}));const d=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);typeof d=="number"?n.container.setAttribute("aria-level",`${d}`):n.container.removeAttribute("aria-level")}setAriaLabel(e,i){e?i.setAttribute("aria-label",e):i.removeAttribute("aria-label")}disposeElement(e,i,n,s){n.disposables.clear()}disposeTemplate(e){e.disposables.dispose()}}class K1i{constructor(e,i){this.list=e,this.dnd=i}getDragElements(e){const i=this.list.getSelectedElements();return i.indexOf(e)>-1?i:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,i){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,i)}onDragStart(e,i){var n,s;(s=(n=this.dnd).onDragStart)==null||s.call(n,e,i)}onDragOver(e,i,n,s,c){return this.dnd.onDragOver(e,i,n,s,c)}onDragLeave(e,i,n,s){var c,d;(d=(c=this.dnd).onDragLeave)==null||d.call(c,e,i,n,s)}onDragEnd(e){var i,n;(n=(i=this.dnd).onDragEnd)==null||n.call(i,e)}drop(e,i,n,s,c){this.dnd.drop(e,i,n,s,c)}dispose(){this.dnd.dispose()}}class Ow{get onDidChangeFocus(){return Tr.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e),this.disposables)}get onDidChangeSelection(){return Tr.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const i=Tr.chain(this.disposables.add(new Xc(this.view.domNode,"keydown")).event,c=>c.map(d=>new Id(d)).filter(d=>e=d.keyCode===58||d.shiftKey&&d.keyCode===68).map(d=>il.stop(d,!0)).filter(()=>!1)),n=Tr.chain(this.disposables.add(new Xc(this.view.domNode,"keyup")).event,c=>c.forEach(()=>e=!1).map(d=>new Id(d)).filter(d=>d.keyCode===58||d.shiftKey&&d.keyCode===68).map(d=>il.stop(d,!0)).map(({browserEvent:d})=>{const f=this.getFocus(),m=f.length?f[0]:void 0,v=typeof m<"u"?this.view.element(m):void 0,x=typeof m<"u"?this.view.domElement(m):this.view.domNode;return{index:m,element:v,anchor:x,browserEvent:d}})),s=Tr.chain(this.view.onContextMenu,c=>c.filter(d=>!e).map(({element:d,index:f,browserEvent:m})=>({element:d,index:f,anchor:new hT(Eo(this.view.domNode),m),browserEvent:m})));return Tr.any(i,n,s)}get onKeyDown(){return this.disposables.add(new Xc(this.view.domNode,"keydown")).event}get onDidFocus(){return Tr.signal(this.disposables.add(new Xc(this.view.domNode,"focus",!0)).event)}get onDidBlur(){return Tr.signal(this.disposables.add(new Xc(this.view.domNode,"blur",!0)).event)}constructor(e,i,n,s,c=U1i){var v,x,w;this.user=e,this._options=c,this.focus=new Wye("focused"),this.anchor=new Wye("anchor"),this.eventBufferer=new lse,this._ariaLabel="",this.disposables=new wn,this._onDidDispose=new gi,this.onDidDispose=this._onDidDispose.event;const d=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(v=this._options.accessibilityProvider)==null?void 0:v.getWidgetRole():"list";this.selection=new R1i(d!=="listbox");const f=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=c.accessibilityProvider,this.accessibilityProvider&&(f.push(new G1i(this.accessibilityProvider)),(w=(x=this.accessibilityProvider).onDidChangeActiveDescendant)==null||w.call(x,this.onDidChangeActiveDescendant,this,this.disposables)),s=s.map(I=>new J1i(I.templateId,[...f,I]));const m={...c,dnd:c.dnd&&new K1i(this,c.dnd)};if(this.view=this.createListView(i,n,s,m),this.view.domNode.setAttribute("role",d),c.styleController)this.styleController=c.styleController(this.view.domId);else{const I=Dw(this.view.domNode);this.styleController=new PDt(I,this.view.domId)}if(this.spliceable=new T1i([new jFe(this.focus,this.view,c.identityProvider),new jFe(this.selection,this.view,c.identityProvider),new jFe(this.anchor,this.view,c.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new H1i(this,this.view)),(typeof c.keyboardSupport!="boolean"||c.keyboardSupport)&&(this.keyboardController=new EDt(this,this.view,c),this.disposables.add(this.keyboardController)),c.keyboardNavigationLabelProvider){const I=c.keyboardNavigationDelegate||W1i;this.typeNavigationController=new V1i(this,this.view,c.keyboardNavigationLabelProvider,c.keyboardNavigationEventFilter??(()=>!0),I),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(c),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,i,n,s){return new xT(e,i,n,s)}createMouseController(e){return new LDt(this)}updateOptions(e={}){var i,n;this._options={...this._options,...e},(i=this.typeNavigationController)==null||i.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),(n=this.keyboardController)==null||n.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,i,n=[]){if(e<0||e>this.view.length)throw new pF(this.user,`Invalid start index: ${e}`);if(i<0)throw new pF(this.user,`Invalid delete count: ${i}`);i===0&&n.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,i,n))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}indexOf(e){return this.view.indexOf(e)}indexAt(e){return this.view.indexAt(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,i){this.view.layout(e,i)}setSelection(e,i){for(const n of e)if(n<0||n>=this.length)throw new pF(this.user,`Invalid index ${n}`);this.selection.set(e,i)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setAnchor(e){if(typeof e>"u"){this.anchor.set([]);return}if(e<0||e>=this.length)throw new pF(this.user,`Invalid index ${e}`);this.anchor.set([e])}getAnchor(){return Wqe(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return typeof e>"u"?void 0:this.element(e)}setFocus(e,i){for(const n of e)if(n<0||n>=this.length)throw new pF(this.user,`Invalid index ${n}`);this.focus.set(e,i)}focusNext(e=1,i=!1,n,s){if(this.length===0)return;const c=this.focus.get(),d=this.findNextIndex(c.length>0?c[0]+e:0,i,s);d>-1&&this.setFocus([d],n)}focusPrevious(e=1,i=!1,n,s){if(this.length===0)return;const c=this.focus.get(),d=this.findPreviousIndex(c.length>0?c[0]-e:0,i,s);d>-1&&this.setFocus([d],n)}async focusNextPage(e,i){let n=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);n=n===0?0:n-1;const s=this.getFocus()[0];if(s!==n&&(s===void 0||n>s)){const c=this.findPreviousIndex(n,!1,i);c>-1&&s!==c?this.setFocus([c],e):this.setFocus([n],e)}else{const c=this.view.getScrollTop();let d=c+this.view.renderHeight;n>s&&(d-=this.view.elementHeight(n)),this.view.setScrollTop(d),this.view.getScrollTop()!==c&&(this.setFocus([]),await c6(0),await this.focusNextPage(e,i))}}async focusPreviousPage(e,i,n=()=>0){let s;const c=n(),d=this.view.getScrollTop()+c;d===0?s=this.view.indexAt(d):s=this.view.indexAfter(d-1);const f=this.getFocus()[0];if(f!==s&&(f===void 0||f>=s)){const m=this.findNextIndex(s,!1,i);m>-1&&f!==m?this.setFocus([m],e):this.setFocus([s],e)}else{const m=d;this.view.setScrollTop(d-this.view.renderHeight-c),this.view.getScrollTop()+n()!==m&&(this.setFocus([]),await c6(0),await this.focusPreviousPage(e,i,n))}}focusLast(e,i){if(this.length===0)return;const n=this.findPreviousIndex(this.length-1,!1,i);n>-1&&this.setFocus([n],e)}focusFirst(e,i){this.focusNth(0,e,i)}focusNth(e,i,n){if(this.length===0)return;const s=this.findNextIndex(e,!1,n);s>-1&&this.setFocus([s],i)}findNextIndex(e,i=!1,n){for(let s=0;s<this.length;s++){if(e>=this.length&&!i)return-1;if(e=e%this.length,!n||n(this.element(e)))return e;e++}return-1}findPreviousIndex(e,i=!1,n){for(let s=0;s<this.length;s++){if(e<0&&!i)return-1;if(e=(this.length+e%this.length)%this.length,!n||n(this.element(e)))return e;e--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(e=>this.view.element(e))}reveal(e,i,n=0){if(e<0||e>=this.length)throw new pF(this.user,`Invalid index ${e}`);const s=this.view.getScrollTop(),c=this.view.elementTop(e),d=this.view.elementHeight(e);if(pR(i)){const f=d-this.view.renderHeight+n;this.view.setScrollTop(f*uv(i,0,1)+c-n)}else{const f=c+d,m=s+this.view.renderHeight;c<s+n&&f>=m||(c<s+n||f>=m&&d>=this.view.renderHeight?this.view.setScrollTop(c-n):f>=m&&this.view.setScrollTop(f-this.view.renderHeight))}}getRelativeTop(e,i=0){if(e<0||e>=this.length)throw new pF(this.user,`Invalid index ${e}`);const n=this.view.getScrollTop(),s=this.view.elementTop(e),c=this.view.elementHeight(e);if(s<n+i||s+c>n+this.view.renderHeight)return null;const d=c-this.view.renderHeight+i;return Math.abs((n+i-s)/d)}getHTMLElement(){return this.view.domNode}getScrollableElement(){return this.view.scrollableElementDomNode}getElementID(e){return this.view.getElementDomId(e)}getElementTop(e){return this.view.elementTop(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:i}){return{indexes:e,elements:e.map(n=>this.view.element(n)),browserEvent:i}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var i;const e=this.focus.get();if(e.length>0){let n;(i=this.accessibilityProvider)!=null&&i.getActiveDescendantId&&(n=this.accessibilityProvider.getActiveDescendantId(this.view.element(e[0]))),this.view.domNode.setAttribute("aria-activedescendant",n||this.view.getElementDomId(e[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",e.length===0),this.view.domNode.classList.toggle("selection-single",e.length===1),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}HR([x_],Ow.prototype,"onDidChangeFocus",null);HR([x_],Ow.prototype,"onDidChangeSelection",null);HR([x_],Ow.prototype,"onContextMenu",null);HR([x_],Ow.prototype,"onKeyDown",null);HR([x_],Ow.prototype,"onDidFocus",null);HR([x_],Ow.prototype,"onDidBlur",null);const r9=Cr,ADt="selectOption.entry.template";class X1i{get templateId(){return ADt}renderTemplate(e){const i=Object.create(null);return i.root=e,i.text=jn(e,r9(".option-text")),i.detail=jn(e,r9(".option-detail")),i.decoratorRight=jn(e,r9(".option-decorator-right")),i}renderElement(e,i,n){const s=n,c=e.text,d=e.detail,f=e.decoratorRight,m=e.isDisabled;s.text.textContent=c,s.detail.textContent=d||"",s.decoratorRight.innerText=f||"",m?s.root.classList.add("option-disabled"):s.root.classList.remove("option-disabled")}disposeTemplate(e){}}const sL=class sL extends xi{constructor(e,i,n,s,c){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=s,this.selectBoxOptions=c||Object.create(null),typeof this.selectBoxOptions.minBottomMargin!="number"?this.selectBoxOptions.minBottomMargin=sL.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new gi,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(n),this.selected=i||0,e&&this.setOptions(e,i),this.initStyleSheet()}setTitle(e){!this._hover&&e?this._hover=this._register(QE().setupManagedHover(Dv("mouse"),this.selectElement,e)):this._hover&&this._hover.update(e)}getHeight(){return 22}getTemplateId(){return ADt}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=Cr(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=jn(this.selectDropDownContainer,r9(".select-box-details-pane"));const i=jn(this.selectDropDownContainer,r9(".select-box-dropdown-container-width-control")),n=jn(i,r9(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",jn(n,this.widthControlElement),this._dropDownPosition=0,this.styleElement=Dw(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(en(this.selectDropDownContainer,br.DRAG_START,s=>{il.stop(s,!0)}))}registerListeners(){this._register(ph(this.selectElement,"change",i=>{this.selected=i.target.selectedIndex,this._onDidSelect.fire({index:i.target.selectedIndex,selected:i.target.value}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)})),this._register(en(this.selectElement,br.CLICK,i=>{il.stop(i),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(en(this.selectElement,br.MOUSE_DOWN,i=>{il.stop(i)}));let e;this._register(en(this.selectElement,"touchstart",i=>{e=this._isVisible})),this._register(en(this.selectElement,"touchend",i=>{il.stop(i),e?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(en(this.selectElement,br.KEY_DOWN,i=>{const n=new Id(i);let s=!1;Hc?(n.keyCode===18||n.keyCode===16||n.keyCode===10||n.keyCode===3)&&(s=!0):(n.keyCode===18&&n.altKey||n.keyCode===16&&n.altKey||n.keyCode===10||n.keyCode===3)&&(s=!0),s&&(this.showSelectDropDown(),il.stop(i,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,i){Lf(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach((n,s)=>{this.selectElement.add(this.createOption(n.text,s,n.isDisabled)),typeof n.description=="string"&&(this._hasDetails=!0)})),i!==void 0&&(this.select(i),this._currentSelection=this.selected)}setOptionsList(){var e;(e=this.selectList)==null||e.splice(0,this.selectList.length,this.options)}select(e){e>=0&&e<this.options.length?this.selected=e:e>this.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){const e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join(`
+`)}styleSelectElement(){const e=this.styles.selectBackground??"",i=this.styles.selectForeground??"",n=this.styles.selectBorder??"";this.selectElement.style.backgroundColor=e,this.selectElement.style.color=i,this.selectElement.style.borderColor=n}styleList(){const e=this.styles.selectBackground??"",i=Z4(this.styles.selectListBackground,e);this.selectDropDownListContainer.style.backgroundColor=i,this.selectionDetailsPane.style.backgroundColor=i;const n=this.styles.focusBorder??"";this.selectDropDownContainer.style.outlineColor=n,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,i,n){const s=document.createElement("option");return s.value=e,s.text=e,s.disabled=!!n,s}showSelectDropDown(){this.selectionDetailsPane.innerText="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,i){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(i),{dispose:()=>{this.selectDropDownContainer.remove()}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach((i,n)=>{this.updateDetail(n),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)}),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const i=Eo(this.selectElement),n=e_(this.selectElement),s=Eo(this.selectElement).getComputedStyle(this.selectElement),c=parseFloat(s.getPropertyValue("--dropdown-padding-top"))+parseFloat(s.getPropertyValue("--dropdown-padding-bottom")),d=i.innerHeight-n.top-n.height-(this.selectBoxOptions.minBottomMargin||0),f=n.top-sL.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,m=this.selectElement.offsetWidth,v=this.setWidthControlElement(this.widthControlElement),x=Math.max(v,Math.round(m)).toString()+"px";this.selectDropDownContainer.style.width=x,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let w=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const I=this._hasDetails?this._cachedMaxDetailsHeight:0,P=w+c+I,O=Math.floor((d-c-I)/this.getHeight()),z=Math.floor((f-c-I)/this.getHeight());if(e)return n.top+n.height>i.innerHeight-22||n.top<sL.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||O<1&&z<1?!1:(O<sL.DEFAULT_MINIMUM_VISIBLE_OPTIONS&&z>O&&this.options.length>O?(this._dropDownPosition=1,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(n.top+n.height>i.innerHeight-22||n.top<sL.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||this._dropDownPosition===0&&O<1||this._dropDownPosition===1&&z<1)return this.hideSelectDropDown(!0),!1;if(this._dropDownPosition===0){if(this._isVisible&&O+z<1)return this.hideSelectDropDown(!0),!1;P>d&&(w=O*this.getHeight())}else P>f&&(w=z*this.getHeight());return this.selectList.layout(w),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=w+c+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=w+c+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=x,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}else return!1}setWidthControlElement(e){let i=0;if(e){let n=0,s=0;this.options.forEach((c,d)=>{const f=c.detail?c.detail.length:0,m=c.decoratorRight?c.decoratorRight.length:0,v=c.text.length+f+m;v>s&&(n=d,s=v)}),e.textContent=this.options[n].text+(this.options[n].decoratorRight?this.options[n].decoratorRight+" ":""),i=FC(e)}return i}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=jn(e,r9(".select-box-dropdown-list-container")),this.listRenderer=new X1i,this.selectList=this._register(new Ow("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:s=>{let c=s.text;return s.detail&&(c+=`. ${s.detail}`),s.decoratorRight&&(c+=`. ${s.decoratorRight}`),s.description&&(c+=`. ${s.description}`),c},getWidgetAriaLabel:()=>W({key:"selectBox",comment:["Behave like native select dropdown element."]},"Select Box"),getRole:()=>Hc?"":"option",getWidgetRole:()=>"listbox"}})),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const i=this._register(new Xc(this.selectDropDownListContainer,"keydown")),n=Tr.chain(i.event,s=>s.filter(()=>this.selectList.length>0).map(c=>new Id(c)));this._register(Tr.chain(n,s=>s.filter(c=>c.keyCode===3))(this.onEnter,this)),this._register(Tr.chain(n,s=>s.filter(c=>c.keyCode===2))(this.onEnter,this)),this._register(Tr.chain(n,s=>s.filter(c=>c.keyCode===9))(this.onEscape,this)),this._register(Tr.chain(n,s=>s.filter(c=>c.keyCode===16))(this.onUpArrow,this)),this._register(Tr.chain(n,s=>s.filter(c=>c.keyCode===18))(this.onDownArrow,this)),this._register(Tr.chain(n,s=>s.filter(c=>c.keyCode===12))(this.onPageDown,this)),this._register(Tr.chain(n,s=>s.filter(c=>c.keyCode===11))(this.onPageUp,this)),this._register(Tr.chain(n,s=>s.filter(c=>c.keyCode===14))(this.onHome,this)),this._register(Tr.chain(n,s=>s.filter(c=>c.keyCode===13))(this.onEnd,this)),this._register(Tr.chain(n,s=>s.filter(c=>c.keyCode>=21&&c.keyCode<=56||c.keyCode>=85&&c.keyCode<=113))(this.onCharacter,this)),this._register(en(this.selectList.getHTMLElement(),br.POINTER_UP,s=>this.onPointerUp(s))),this._register(this.selectList.onMouseOver(s=>typeof s.index<"u"&&this.selectList.setFocus([s.index]))),this._register(this.selectList.onDidChangeFocus(s=>this.onListFocus(s))),this._register(en(this.selectDropDownContainer,br.FOCUS_OUT,s=>{!this._isVisible||Am(s.relatedTarget,this.selectDropDownContainer)||this.onListBlur()})),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;il.stop(e);const i=e.target;if(!i||i.classList.contains("slider"))return;const n=i.closest(".monaco-list-row");if(!n)return;const s=Number(n.getAttribute("data-index")),c=n.classList.contains("option-disabled");s>=0&&s<this.options.length&&!c&&(this.selected=s,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]),this.selected!==this._currentSelection&&(this._currentSelection=this.selected,this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.options[this.selected].text}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)),this.hideSelectDropDown(!0))}onListBlur(){this._sticky||(this.selected!==this._currentSelection&&this.select(this._currentSelection),this.hideSelectDropDown(!1))}renderDescriptionMarkdown(e,i){const n=c=>{for(let d=0;d<c.childNodes.length;d++){const f=c.childNodes.item(d);(f.tagName&&f.tagName.toLowerCase())==="img"?f.remove():n(f)}},s=dwe({value:e,supportThemeIcons:!0},{actionHandler:i});return s.element.classList.add("select-box-description-markdown"),n(s.element),s.element}onListFocus(e){!this._isVisible||!this._hasDetails||this.updateDetail(e.indexes[0])}updateDetail(e){this.selectionDetailsPane.innerText="";const i=this.options[e],n=(i==null?void 0:i.description)??"",s=(i==null?void 0:i.descriptionIsMarkdown)??!1;if(n){if(s){const c=i.descriptionMarkdownActionHandler;this.selectionDetailsPane.appendChild(this.renderDescriptionMarkdown(n,c))}else this.selectionDetailsPane.innerText=n;this.selectionDetailsPane.style.display="block"}else this.selectionDetailsPane.style.display="none";this._skipLayout=!0,this.contextViewProvider.layout(),this._skipLayout=!1}onEscape(e){il.stop(e),this.select(this._currentSelection),this.hideSelectDropDown(!0)}onEnter(e){il.stop(e),this.selected!==this._currentSelection&&(this._currentSelection=this.selected,this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.options[this.selected].text}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)),this.hideSelectDropDown(!0)}onDownArrow(e){if(this.selected<this.options.length-1){il.stop(e,!0);const i=this.options[this.selected+1].isDisabled;if(i&&this.options.length>this.selected+2)this.selected+=2;else{if(i)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){this.selected>0&&(il.stop(e,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(e){il.stop(e),this.selectList.focusPreviousPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected<this.options.length-1&&(this.selected++,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onPageDown(e){il.stop(e),this.selectList.focusNextPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onHome(e){il.stop(e),!(this.options.length<2)&&(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){il.stop(e),!(this.options.length<2)&&(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){const i=P4.toString(e.keyCode);let n=-1;for(let s=0;s<this.options.length-1;s++)if(n=(s+this.selected+1)%this.options.length,this.options[n].text.charAt(0).toUpperCase()===i&&!this.options[n].isDisabled){this.select(n),this.selectList.setFocus([n]),this.selectList.reveal(this.selectList.getFocus()[0]),il.stop(e);break}}dispose(){this.hideSelectDropDown(!1),super.dispose()}};sL.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN=32,sL.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN=2,sL.DEFAULT_MINIMUM_VISIBLE_OPTIONS=3;let jVe=sL;class Q1i extends xi{constructor(e,i,n,s){super(),this.selected=0,this.selectBoxOptions=s||Object.create(null),this.options=[],this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=this._register(new gi),this.styles=n,this.registerListeners(),this.setOptions(e,i)}registerListeners(){this._register(y1.addTarget(this.selectElement)),[Ud.Tap].forEach(e=>{this._register(en(this.selectElement,e,i=>{this.selectElement.focus()}))}),this._register(ph(this.selectElement,"click",e=>{il.stop(e,!0)})),this._register(ph(this.selectElement,"change",e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})})),this._register(ph(this.selectElement,"keydown",e=>{let i=!1;Hc?(e.keyCode===18||e.keyCode===16||e.keyCode===10)&&(i=!0):(e.keyCode===18&&e.altKey||e.keyCode===10||e.keyCode===3)&&(i=!0),i&&e.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,i){(!this.options||!Lf(this.options,e))&&(this.options=e,this.selectElement.options.length=0,this.options.forEach((n,s)=>{this.selectElement.add(this.createOption(n.text,s,n.isDisabled))})),i!==void 0&&this.select(i)}select(e){this.options.length===0?this.selected=0:e>=0&&e<this.options.length?this.selected=e:e>this.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected<this.options.length&&typeof this.options[this.selected].text=="string"?this.selectElement.title=this.options[this.selected].text:this.selectElement.title=""}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){e.classList.add("select-container"),e.appendChild(this.selectElement),this.setOptions(this.options,this.selected),this.applyStyles()}applyStyles(){this.selectElement&&(this.selectElement.style.backgroundColor=this.styles.selectBackground??"",this.selectElement.style.color=this.styles.selectForeground??"",this.selectElement.style.borderColor=this.styles.selectBorder??"")}createOption(e,i,n){const s=document.createElement("option");return s.value=e,s.text=e,s.disabled=!!n,s}}class Z1i extends Aw{constructor(e,i,n,s,c){super(),Hc&&!(c!=null&&c.useCustomDrawn)?this.selectBoxDelegate=new Q1i(e,i,s,c):this.selectBoxDelegate=new jVe(e,i,n,s,c),this._register(this.selectBoxDelegate)}get onDidSelect(){return this.selectBoxDelegate.onDidSelect}setOptions(e,i){this.selectBoxDelegate.setOptions(e,i)}select(e){this.selectBoxDelegate.select(e)}focus(){this.selectBoxDelegate.focus()}blur(){this.selectBoxDelegate.blur()}setFocusable(e){this.selectBoxDelegate.setFocusable(e)}render(e){this.selectBoxDelegate.render(e)}}class xE extends xi{get action(){return this._action}constructor(e,i,n={}){super(),this.options=n,this._context=e||this,this._action=i,i instanceof $C&&this._register(i.onDidChange(s=>{this.element&&this.handleActionChangeEvent(s)}))}handleActionChangeEvent(e){e.enabled!==void 0&&this.updateEnabled(),e.checked!==void 0&&this.updateChecked(),e.class!==void 0&&this.updateClass(),e.label!==void 0&&(this.updateLabel(),this.updateTooltip()),e.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new TB)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const i=this.element=e;this._register(y1.addTarget(e));const n=this.options&&this.options.draggable;n&&(e.draggable=!0,bk&&this._register(en(e,br.DRAG_START,s=>{var c;return(c=s.dataTransfer)==null?void 0:c.setData(ore.TEXT,this._action.label)}))),this._register(en(i,Ud.Tap,s=>this.onClick(s,!0))),this._register(en(i,br.MOUSE_DOWN,s=>{n||il.stop(s,!0),this._action.enabled&&s.button===0&&i.classList.add("active")})),Hc&&this._register(en(i,br.CONTEXT_MENU,s=>{s.button===0&&s.ctrlKey===!0&&this.onClick(s)})),this._register(en(i,br.CLICK,s=>{il.stop(s,!0),this.options&&this.options.isMenu||this.onClick(s)})),this._register(en(i,br.DBLCLICK,s=>{il.stop(s,!0)})),[br.MOUSE_UP,br.MOUSE_OUT].forEach(s=>{this._register(en(i,s,c=>{il.stop(c),i.classList.remove("active")}))})}onClick(e,i=!1){var s;il.stop(e,!0);const n=pw(this._context)?(s=this.options)!=null&&s.useEventAsContext?e:{preserveFocus:i}:this._context;this.actionRunner.run(this._action,n)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getClass(){return this.action.class}getTooltip(){return this.action.tooltip}updateTooltip(){var i;if(!this.element)return;const e=this.getTooltip()??"";if(this.updateAriaLabel(),(i=this.options.hoverDelegate)!=null&&i.showNativeHover)this.element.title=e;else if(!this.customHover&&e!==""){const n=this.options.hoverDelegate??Dv("element");this.customHover=this._store.add(QE().setupManagedHover(n,this.element,e))}else this.customHover&&this.customHover.update(e)}updateAriaLabel(){if(this.element){const e=this.getTooltip()??"";this.element.setAttribute("aria-label",e)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}class V$ extends xE{constructor(e,i,n){super(e,i,n),this.options=n,this.options.icon=n.icon!==void 0?n.icon:!1,this.options.label=n.label!==void 0?n.label:!0,this.cssClass=""}render(e){super.render(e),Fl(this.element);const i=document.createElement("a");if(i.classList.add("action-label"),i.setAttribute("role",this.getDefaultAriaRole()),this.label=i,this.element.appendChild(i),this.options.label&&this.options.keybinding){const n=document.createElement("span");n.classList.add("keybinding"),n.textContent=this.options.keybinding,this.element.appendChild(n)}this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===Rm.ID?"presentation":this.options.isMenu?"menuitem":this.options.isTabList?"tab":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(e=this.action.label,this.options.keybinding&&(e=W({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e??void 0}updateClass(){var e;this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getClass(),this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):(e=this.label)==null||e.classList.remove("codicon")}updateEnabled(){var e,i;this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),(e=this.element)==null||e.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),(i=this.element)==null||i.classList.add("disabled"))}updateAriaLabel(){if(this.label){const e=this.getTooltip()??"";this.label.setAttribute("aria-label",e)}}updateChecked(){this.label&&(this.action.checked!==void 0?(this.label.classList.toggle("checked",this.action.checked),this.options.isTabList?this.label.setAttribute("aria-selected",this.action.checked?"true":"false"):(this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox"))):(this.label.classList.remove("checked"),this.label.removeAttribute(this.options.isTabList?"aria-selected":"aria-checked"),this.label.setAttribute("role",this.getDefaultAriaRole())))}}class Y1i extends xE{constructor(e,i,n,s,c,d,f){super(e,i),this.selectBox=new Z1i(n,s,c,d,f),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect(e=>this.runAction(e.selected,e.index)))}runAction(e,i){this.actionRunner.run(this._action,this.getActionContext(e,i))}getActionContext(e,i){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){var e;(e=this.selectBox)==null||e.focus()}blur(){var e;(e=this.selectBox)==null||e.blur()}render(e){this.selectBox.render(e)}}class eyi extends TB{constructor(e,i){super(),this._onDidChangeVisibility=this._register(new gi),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=jn(e,Cr(".monaco-dropdown")),this._label=jn(this._element,Cr(".dropdown-label"));let n=i.labelRenderer;n||(n=c=>(c.textContent=i.label||"",null));for(const c of[br.CLICK,br.MOUSE_DOWN,Ud.Tap])this._register(en(this.element,c,d=>il.stop(d,!0)));for(const c of[br.MOUSE_DOWN,Ud.Tap])this._register(en(this._label,c,d=>{d$e(d)&&(d.detail>1||d.button!==0)||(this.visible?this.hide():this.show())}));this._register(en(this._label,br.KEY_UP,c=>{const d=new Id(c);(d.equals(3)||d.equals(10))&&(il.stop(c,!0),this.visible?this.hide():this.show())}));const s=n(this._label);s&&this._register(s),this._register(y1.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class tyi extends eyi{constructor(e,i){super(e,i),this._options=i,this._actions=[],this.actions=i.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,i)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,i):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class Vye extends xE{constructor(e,i,n,s=Object.create(null)){super(null,e,s),this.actionItem=null,this._onDidChangeVisibility=this._register(new gi),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=i,this.contextMenuProvider=n,this.options=s,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const i=c=>{this.element=jn(c,Cr("a.action-label"));let d=[];return typeof this.options.classNames=="string"?d=this.options.classNames.split(/\s+/g).filter(f=>!!f):this.options.classNames&&(d=this.options.classNames),d.find(f=>f==="icon")||d.push("codicon"),this.element.classList.add(...d),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this._action.label&&this._register(QE().setupManagedHover(this.options.hoverDelegate??Dv("mouse"),this.element,this._action.label)),this.element.ariaLabel=this._action.label||"",null},n=Array.isArray(this.menuActionsOrProvider),s={contextMenuProvider:this.contextMenuProvider,labelRenderer:i,menuAsChild:this.options.menuAsChild,actions:n?this.menuActionsOrProvider:void 0,actionProvider:n?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new tyi(e,s)),this._register(this.dropdownMenu.onDidChangeVisibility(c=>{var d;(d=this.element)==null||d.setAttribute("aria-expanded",`${c}`),this._onDidChangeVisibility.fire(c)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const c=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return c.options.anchorAlignmentProvider()}}}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),e??void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){var e;(e=this.dropdownMenu)==null||e.show()}updateEnabled(){var i,n;const e=!this.action.enabled;(i=this.actionItem)==null||i.classList.toggle("disabled",e),(n=this.element)==null||n.classList.toggle("disabled",e)}}function iyi(l){return l&&typeof l=="object"&&typeof l.original=="string"&&typeof l.value=="string"}function nyi(l){return l?l.condition!==void 0:!1}var Gq;(function(l){l[l.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",l[l.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(Gq||(Gq={}));var cq;(function(l){l[l.None=0]="None",l[l.Initialized=1]="Initialized",l[l.Closed=2]="Closed"})(cq||(cq={}));const oCe=class oCe extends xi{constructor(e,i=Object.create(null)){super(),this.database=e,this.options=i,this._onDidChangeStorage=this._register(new CB),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=cq.None,this.cache=new Map,this.flushDelayer=this._register(new l2t(oCe.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(e=>this.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){var i,n;this._onDidChangeStorage.pause();try{(i=e.changed)==null||i.forEach((s,c)=>this.acceptExternal(c,s)),(n=e.deleted)==null||n.forEach(s=>this.acceptExternal(s,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,i){if(this.state===cq.Closed)return;let n=!1;pw(i)?n=this.cache.delete(e):this.cache.get(e)!==i&&(this.cache.set(e,i),n=!0),n&&this._onDidChangeStorage.fire({key:e,external:!0})}get(e,i){const n=this.cache.get(e);return pw(n)?i:n}getBoolean(e,i){const n=this.get(e);return pw(n)?i:n==="true"}getNumber(e,i){const n=this.get(e);return pw(n)?i:parseInt(n,10)}async set(e,i,n=!1){if(this.state===cq.Closed)return;if(pw(i))return this.delete(e,n);const s=gg(i)||Array.isArray(i)?Mgi(i):String(i);if(this.cache.get(e)!==s)return this.cache.set(e,s),this.pendingInserts.set(e,s),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:n}),this.doFlush()}async delete(e,i=!1){if(!(this.state===cq.Closed||!this.cache.delete(e)))return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:i}),this.doFlush()}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally(()=>{var i;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(i=this.whenFlushedCallbacks.pop())==null||i()})}async doFlush(e){return this.options.hint===Gq.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger(()=>this.flushPending(),e)}};oCe.DEFAULT_FLUSH_DELAY=100;let Lie=oCe;class zFe{constructor(){this.onDidChangeItemsExternal=Tr.None,this.items=new Map}async updateItems(e){var i,n;(i=e.insert)==null||i.forEach((s,c)=>this.items.set(c,s)),(n=e.delete)==null||n.forEach(s=>this.items.delete(s))}}const m1e="__$__targetStorageMarker",ET=jc("storageService");var cre;(function(l){l[l.NONE=0]="NONE",l[l.SHUTDOWN=1]="SHUTDOWN"})(cre||(cre={}));function ryi(l){const e=l.get(m1e);if(e)try{return JSON.parse(e)}catch{}return Object.create(null)}const aCe=class aCe extends xi{constructor(e={flushInterval:aCe.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new CB),this._onDidChangeTarget=this._register(new CB),this._onWillSaveState=this._register(new gi),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(e,i,n){return Tr.filter(this._onDidChangeValue.event,s=>s.scope===e&&(i===void 0||s.key===i),n)}emitDidChangeValue(e,i){const{key:n,external:s}=i;if(n===m1e){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:n,target:this.getKeyTargets(e)[n],external:s})}get(e,i,n){var s;return(s=this.getStorage(i))==null?void 0:s.get(e,n)}getBoolean(e,i,n){var s;return(s=this.getStorage(i))==null?void 0:s.getBoolean(e,n)}getNumber(e,i,n){var s;return(s=this.getStorage(i))==null?void 0:s.getNumber(e,n)}store(e,i,n,s,c=!1){if(pw(i)){this.remove(e,n,c);return}this.withPausedEmitters(()=>{var d;this.updateKeyTarget(e,n,s),(d=this.getStorage(n))==null||d.set(e,i,c)})}remove(e,i,n=!1){this.withPausedEmitters(()=>{var s;this.updateKeyTarget(e,i,void 0),(s=this.getStorage(i))==null||s.delete(e,n)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,i,n,s=!1){var d,f;const c=this.getKeyTargets(i);typeof n=="number"?c[e]!==n&&(c[e]=n,(d=this.getStorage(i))==null||d.set(m1e,JSON.stringify(c),s)):typeof c[e]=="number"&&(delete c[e],(f=this.getStorage(i))==null||f.set(m1e,JSON.stringify(c),s))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){const i=this.getStorage(e);return i?ryi(i):Object.create(null)}};aCe.DEFAULT_FLUSH_INTERVAL=60*1e3;let zVe=aCe;class syi extends zVe{constructor(){super(),this.applicationStorage=this._register(new Lie(new zFe,{hint:Gq.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new Lie(new zFe,{hint:Gq.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new Lie(new zFe,{hint:Gq.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.profileStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e))),this._register(this.applicationStorage.onDidChangeStorage(e=>this.emitDidChangeValue(-1,e)))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}function oyi(l,e){const i={...e};for(const n in l){const s=l[n];i[n]=s!==void 0?cs(s):void 0}return i}const ayi={keybindingLabelBackground:cs(Zpi),keybindingLabelForeground:cs(Ypi),keybindingLabelBorder:cs(emi),keybindingLabelBottomBorder:cs(tmi),keybindingLabelShadow:cs(vJ)},cyi={buttonForeground:cs(VTt),buttonSeparator:cs(Bpi),buttonBackground:cs(iie),buttonHoverBackground:cs(Wpi),buttonSecondaryForeground:cs(Hpi),buttonSecondaryBackground:cs(uVe),buttonSecondaryHoverBackground:cs(jpi),buttonBorder:cs(Vpi)},lyi={progressBarBackground:cs(Z_i)},Hye={inputActiveOptionBorder:cs(nwe),inputActiveOptionForeground:cs(rwe),inputActiveOptionBackground:cs(yse)};cs(nie),cs(zpi),cs(Upi),cs(qpi),cs($pi),cs(Jpi),cs(Gpi);cs(Kpi),cs(Qpi),cs(Xpi);cs(Cw),cs(ewe),cs(vJ),cs(bl),cs(vpi),cs(bpi),cs(Cpi),cs(X_i);const jye={inputBackground:cs(lVe),inputForeground:cs(BTt),inputBorder:cs(WTt),inputValidationInfoBorder:cs(Npi),inputValidationInfoBackground:cs(Epi),inputValidationInfoForeground:cs(Ipi),inputValidationWarningBorder:cs(Api),inputValidationWarningBackground:cs(Lpi),inputValidationWarningForeground:cs(Ppi),inputValidationErrorBorder:cs(Rpi),inputValidationErrorBackground:cs(Opi),inputValidationErrorForeground:cs(Mpi)},uyi={listFilterWidgetBackground:cs(_mi),listFilterWidgetOutline:cs(pmi),listFilterWidgetNoMatchesOutline:cs(mmi),listFilterWidgetShadow:cs(gmi),inputBoxStyles:jye,toggleStyles:Hye},ODt={badgeBackground:cs(f1e),badgeForeground:cs(Q_i),badgeBorder:cs(bl)};cs(gpi),cs(mpi),cs(Tbt),cs(Tbt),cs(ypi);const tW={listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:cs(imi),listFocusForeground:cs(nmi),listFocusOutline:cs(rmi),listActiveSelectionBackground:cs(EB),listActiveSelectionForeground:cs(Xne),listActiveSelectionIconForeground:cs(HTt),listFocusAndSelectionOutline:cs(smi),listFocusAndSelectionBackground:cs(EB),listFocusAndSelectionForeground:cs(Xne),listInactiveSelectionBackground:cs(omi),listInactiveSelectionIconForeground:cs(cmi),listInactiveSelectionForeground:cs(ami),listInactiveFocusBackground:cs(lmi),listInactiveFocusOutline:cs(umi),listHoverBackground:cs(jTt),listHoverForeground:cs(zTt),listDropOverBackground:cs(dmi),listDropBetweenBackground:cs(fmi),listSelectionOutline:cs(yf),listHoverOutline:cs(yf),treeIndentGuidesStroke:cs(UTt),treeInactiveIndentGuidesStroke:cs(ymi),treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:cs(L$e),tableColumnsBorder:cs(vmi),tableOddRowsBackgroundColor:cs(bmi)};function iW(l){return oyi(l,tW)}const dyi={selectBackground:cs(swe),selectListBackground:cs(Fpi),selectForeground:cs(F$e),decoratorRightForeground:cs(qTt),selectBorder:cs(B$e),focusBorder:cs(NL),listFocusBackground:cs(Zne),listInactiveSelectionIconForeground:cs(W$e),listFocusForeground:cs(Qne),listFocusOutline:U_i(yf,In.transparent.toString()),listHoverBackground:cs(jTt),listHoverForeground:cs(zTt),listHoverOutline:cs(yf),selectListBorder:cs(P$e),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropOverBackground:void 0,listDropBetweenBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},fyi={shadowColor:cs(vJ),borderColor:cs(Cmi),foregroundColor:cs(Smi),backgroundColor:cs(wmi),selectionForegroundColor:cs(xmi),selectionBackgroundColor:cs(kmi),selectionBorderColor:cs(Tmi),separatorColor:cs(Dmi),scrollbarShadow:cs(L$e),scrollbarSliderBackground:cs(NTt),scrollbarSliderHoverBackground:cs(LTt),scrollbarSliderActiveBackground:cs(PTt)};var ywe=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Tb=function(l,e){return function(i,n){e(i,n,l)}};function hyi(l,e,i,n){let s,c,d;if(Array.isArray(l))d=l,s=e,c=i;else{const v=e;d=l.getActions(v),s=i,c=n}const f=W4.getInstance(),m=f.keyStatus.altKey||(I0||Cv)&&f.keyStatus.shiftKey;MDt(d,s,m,c?v=>v===c:v=>v==="navigation")}function vwe(l,e,i,n,s,c){let d,f,m,v,x;if(Array.isArray(l))x=l,d=e,f=i,m=n,v=s;else{const I=e;x=l.getActions(I),d=i,f=n,m=s,v=c}MDt(x,d,!1,typeof f=="string"?I=>I===f:f,m,v)}function MDt(l,e,i,n=d=>d==="navigation",s=()=>!1,c=!1){let d,f;Array.isArray(e)?(d=e,f=e):(d=e.primary,f=e.secondary);const m=new Set;for(const[v,x]of l){let w;n(v)?(w=d,w.length>0&&c&&w.push(new Rm)):(w=f,w.length>0&&w.push(new Rm));for(let I of x){i&&(I=I instanceof JC&&I.alt?I.alt:I);const P=w.push(I);I instanceof T$&&m.add({group:v,action:I,index:P-1})}}for(const{group:v,action:x,index:w}of m){const I=n(v)?d:f,P=x.actions;s(x,v,I.length)&&I.splice(w,1,...P)}}let TR=class extends V${constructor(e,i,n,s,c,d,f,m){super(void 0,e,{icon:!!(e.class||e.item.icon),label:!e.class&&!e.item.icon,draggable:i==null?void 0:i.draggable,keybinding:i==null?void 0:i.keybinding,hoverDelegate:i==null?void 0:i.hoverDelegate}),this._options=i,this._keybindingService=n,this._notificationService=s,this._contextKeyService=c,this._themeService=d,this._contextMenuService=f,this._accessibilityService=m,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new Fm),this._altKey=W4.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(e){e.preventDefault(),e.stopPropagation();try{await this.actionRunner.run(this._commandAction,this._context)}catch(i){this._notificationService.error(i)}}render(e){if(super.render(e),e.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let i=!1;const n=()=>{var c;const s=!!((c=this._menuItemAction.alt)!=null&&c.enabled)&&(!this._accessibilityService.isMotionReduced()||i)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&i);s!==this._wantsAltCommand&&(this._wantsAltCommand=s,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(n)),this._register(en(e,"mouseleave",s=>{i=!1,n()})),this._register(en(e,"mouseenter",s=>{i=!0,n()})),n()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var c;const e=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),i=e&&e.getLabel(),n=this._commandAction.tooltip||this._commandAction.label;let s=i?W("titleAndKb","{0} ({1})",n,i):n;if(!this._wantsAltCommand&&((c=this._menuItemAction.alt)!=null&&c.enabled)){const d=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,f=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),m=f&&f.getLabel(),v=m?W("titleAndKb","{0} ({1})",d,m):d;s=W("titleAndKbAndAlt",`{0}
+[{1}] {2}`,s,tJe.modifierLabels[UC].altKey,v)}return s}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;const{element:i,label:n}=this;if(!i||!n)return;const s=this._commandAction.checked&&nyi(e.toggled)&&e.toggled.icon?e.toggled.icon:e.icon;if(s)if(zo.isThemeIcon(s)){const c=zo.asClassNameArray(s);n.classList.add(...c),this._itemClassDispose.value=fo(()=>{n.classList.remove(...c)})}else n.style.backgroundImage=I$(this._themeService.getColorTheme().type)?l6(s.dark):l6(s.light),n.classList.add("icon"),this._itemClassDispose.value=gT(fo(()=>{n.style.backgroundImage="",n.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};TR=ywe([Tb(2,pu),Tb(3,w_),Tb(4,Ko),Tb(5,im),Tb(6,eS),Tb(7,tS)],TR);class sJe extends TR{render(e){var i;this.options.label=!0,this.options.icon=!1,super.render(e),e.classList.add("text-only"),e.classList.toggle("use-comma",((i=this._options)==null?void 0:i.useComma)??!1)}updateLabel(){var i;const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const n=sJe._symbolPrintEnter(e);(i=this._options)!=null&&i.conversational?this.label.textContent=W({key:"content2",comment:['A label with keybindg like "ESC to dismiss"']},"{1} to {0}",this._action.label,n):this.label.textContent=W({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",this._action.label,n)}}static _symbolPrintEnter(e){var i;return(i=e.getLabel())==null?void 0:i.replace(/\benter\b/gi,"⏎").replace(/\bEscape\b/gi,"Esc")}}let UVe=class extends Vye{constructor(e,i,n,s,c){const d={...i,menuAsChild:(i==null?void 0:i.menuAsChild)??!1,classNames:(i==null?void 0:i.classNames)??(zo.isThemeIcon(e.item.icon)?zo.asClassName(e.item.icon):void 0),keybindingProvider:(i==null?void 0:i.keybindingProvider)??(f=>n.lookupKeybinding(f.id))};super(e,{getActions:()=>e.actions},s,d),this._keybindingService=n,this._contextMenuService=s,this._themeService=c}render(e){super.render(e),Fl(this.element),e.classList.add("menu-entry");const i=this._action,{icon:n}=i.item;if(n&&!zo.isThemeIcon(n)){this.element.classList.add("icon");const s=()=>{this.element&&(this.element.style.backgroundImage=I$(this._themeService.getColorTheme().type)?l6(n.dark):l6(n.light))};s(),this._register(this._themeService.onDidColorThemeChange(()=>{s()}))}}};UVe=ywe([Tb(2,pu),Tb(3,eS),Tb(4,im)],UVe);let qVe=class extends xE{constructor(e,i,n,s,c,d,f,m){super(null,e),this._keybindingService=n,this._notificationService=s,this._contextMenuService=c,this._menuService=d,this._instaService=f,this._storageService=m,this._container=null,this._options=i,this._storageKey=`${e.item.submenu.id}_lastActionId`;let v;const x=i!=null&&i.persistLastActionId?m.get(this._storageKey,1):void 0;x&&(v=e.actions.find(I=>x===I.id)),v||(v=e.actions[0]),this._defaultAction=this._instaService.createInstance(TR,v,{keybinding:this._getDefaultActionKeybindingLabel(v)});const w={keybindingProvider:I=>this._keybindingService.lookupKeybinding(I.id),...i,menuAsChild:(i==null?void 0:i.menuAsChild)??!0,classNames:(i==null?void 0:i.classNames)??["codicon","codicon-chevron-down"],actionRunner:(i==null?void 0:i.actionRunner)??new TB};this._dropdown=new Vye(e,e.actions,this._contextMenuService,w),this._register(this._dropdown.actionRunner.onDidRun(I=>{I.action instanceof JC&&this.update(I.action)}))}update(e){var i;(i=this._options)!=null&&i.persistLastActionId&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(TR,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends TB{async runAction(n,s){await n.run(void 0)}},this._container&&this._defaultAction.render(f$e(this._container,Cr(".action-container")))}_getDefaultActionKeybindingLabel(e){var n;let i;if((n=this._options)!=null&&n.renderKeybindingWithDefaultActionLabel){const s=this._keybindingService.lookupKeybinding(e.id);s&&(i=`(${s.getLabel()})`)}return i}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const i=Cr(".action-container");this._defaultAction.render(jn(this._container,i)),this._register(en(i,br.KEY_DOWN,s=>{const c=new Id(s);c.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),c.stopPropagation())}));const n=Cr(".dropdown-action-container");this._dropdown.render(jn(this._container,n)),this._register(en(n,br.KEY_DOWN,s=>{var d;const c=new Id(s);c.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(d=this._defaultAction.element)==null||d.focus(),c.stopPropagation())}))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};qVe=ywe([Tb(2,pu),Tb(3,w_),Tb(4,eS),Tb(5,Lw),Tb(6,ho),Tb(7,ET)],qVe);let $Ve=class extends Y1i{constructor(e,i){super(null,e,e.actions.map(n=>({text:n.id===Rm.ID?"─────────":n.label,isDisabled:!n.enabled})),0,i,dyi,{ariaLabel:e.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,e.actions.findIndex(n=>n.checked)))}render(e){super.render(e),e.style.borderColor=cs(B$e)}runAction(e,i){const n=this.action.actions[i];n&&this.actionRunner.run(n)}};$Ve=ywe([Tb(1,b6)],$Ve);function RDt(l,e,i){return e instanceof JC?l.createInstance(TR,e,i):e instanceof zq?e.item.isSelection?l.createInstance($Ve,e):e.item.rememberDefaultAction?l.createInstance(qVe,e,{...i,persistLastActionId:!0}):l.createInstance(UVe,e,i):void 0}class kw extends xi{constructor(e,i={}){var c,d;super(),this._actionRunnerDisposables=this._register(new wn),this.viewItemDisposables=this._register(new Jqe),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new gi),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new gi({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new gi),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new gi),this.onWillRun=this._onWillRun.event,this.options=i,this._context=i.context??null,this._orientation=this.options.orientation??0,this._triggerKeys={keyDown:((c=this.options.triggerKeys)==null?void 0:c.keyDown)??!1,keys:((d=this.options.triggerKeys)==null?void 0:d.keys)??[3,10]},this._hoverDelegate=i.hoverDelegate??this._register(W$()),this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new TB,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(f=>this._onDidRun.fire(f))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(f=>this._onWillRun.fire(f))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar";let n,s;switch(this._orientation){case 0:n=[15],s=[17];break;case 1:n=[16],s=[18],this.domNode.className+=" vertical";break}this._register(en(this.domNode,br.KEY_DOWN,f=>{const m=new Id(f);let v=!0;const x=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;n&&(m.equals(n[0])||m.equals(n[1]))?v=this.focusPrevious():s&&(m.equals(s[0])||m.equals(s[1]))?v=this.focusNext():m.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():m.equals(14)?v=this.focusFirst():m.equals(13)?v=this.focusLast():m.equals(2)&&x instanceof xE&&x.trapsArrowNavigation?v=this.focusNext(void 0,!0):this.isTriggerKeyEvent(m)?this._triggerKeys.keyDown?this.doTrigger(m):this.triggerKeyDown=!0:v=!1,v&&(m.preventDefault(),m.stopPropagation())})),this._register(en(this.domNode,br.KEY_UP,f=>{const m=new Id(f);this.isTriggerKeyEvent(m)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(m)),m.preventDefault(),m.stopPropagation()):(m.equals(2)||m.equals(1026)||m.equals(16)||m.equals(18)||m.equals(15)||m.equals(17))&&this.updateFocusedItem()})),this.focusTracker=this._register(zE(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(D0()===this.domNode||!Am(D0(),this.domNode))&&(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=1?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const i=this.viewItems.find(n=>n instanceof xE&&n.isEnabled());i instanceof xE&&i.setFocusable(!0)}else this.viewItems.forEach(i=>{i instanceof xE&&i.setFocusable(!1)})}isTriggerKeyEvent(e){let i=!1;return this._triggerKeys.keys.forEach(n=>{i=i||e.equals(n)}),i}updateFocusedItem(){var e,i;for(let n=0;n<this.actionsList.children.length;n++){const s=this.actionsList.children[n];if(Am(D0(),s)){this.focusedItem=n,(i=(e=this.viewItems[this.focusedItem])==null?void 0:e.showHover)==null||i.call(e);break}}}get context(){return this._context}set context(e){this._context=e,this.viewItems.forEach(i=>i.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(i=>this._onDidRun.fire(i))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(i=>this._onWillRun.fire(i))),this.viewItems.forEach(i=>i.actionRunner=e)}getContainer(){return this.domNode}getAction(e){var i;if(typeof e=="number")return(i=this.viewItems[e])==null?void 0:i.action;if(Mm(e)){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let n=0;n<this.actionsList.childNodes.length;n++)if(this.actionsList.childNodes[n]===e)return this.viewItems[n].action}}push(e,i={}){const n=Array.isArray(e)?e:[e];let s=pR(i.index)?i.index:null;n.forEach(c=>{const d=document.createElement("li");d.className="action-item",d.setAttribute("role","presentation");let f;const m={hoverDelegate:this._hoverDelegate,...i,isTabList:this.options.ariaRole==="tablist"};this.options.actionViewItemProvider&&(f=this.options.actionViewItemProvider(c,m)),f||(f=new V$(this.context,c,m)),this.options.allowContextMenu||this.viewItemDisposables.set(f,en(d,br.CONTEXT_MENU,v=>{il.stop(v,!0)})),f.actionRunner=this._actionRunner,f.setActionContext(this.context),f.render(d),this.focusable&&f instanceof xE&&this.viewItems.length===0&&f.setFocusable(!0),s===null||s<0||s>=this.actionsList.children.length?(this.actionsList.appendChild(d),this.viewItems.push(f)):(this.actionsList.insertBefore(d,this.actionsList.children[s]),this.viewItems.splice(s,0,f),s++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=vd(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),s0(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return this.viewItems.length===0}focus(e){let i=!1,n;if(e===void 0?i=!0:typeof e=="number"?n=e:typeof e=="boolean"&&(i=e),i&&typeof this.focusedItem>"u"){const s=this.viewItems.findIndex(c=>c.isEnabled());this.focusedItem=s===-1?void 0:s,this.updateFocus(void 0,void 0,!0)}else n!==void 0&&(this.focusedItem=n),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e,i){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const n=this.focusedItem;let s;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=n,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,s=this.viewItems[this.focusedItem]}while(this.focusedItem!==n&&(this.options.focusOnlyEnabledItems&&!s.isEnabled()||s.action.id===Rm.ID));return this.updateFocus(void 0,void 0,i),!0}focusPrevious(e){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const i=this.focusedItem;let n;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=i,!1;this.focusedItem=this.viewItems.length-1}n=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===Rm.ID));return this.updateFocus(!0),!0}updateFocus(e,i,n=!1){var c,d;typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:i}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&((c=this.viewItems[this.previouslyFocusedItem])==null||c.blur());const s=this.focusedItem!==void 0?this.viewItems[this.focusedItem]:void 0;if(s){let f=!0;Ine(s.focus)||(f=!1),this.options.focusOnlyEnabledItems&&Ine(s.isEnabled)&&!s.isEnabled()&&(f=!1),s.action.id===Rm.ID&&(f=!1),f?(n||this.previouslyFocusedItem!==this.focusedItem)&&(s.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:i}),this.previouslyFocusedItem=void 0),f&&((d=s.showHover)==null||d.call(s))}}doTrigger(e){if(typeof this.focusedItem>"u")return;const i=this.viewItems[this.focusedItem];if(i instanceof xE){const n=i._context===null||i._context===void 0?e:i._context;this.run(i._action,n)}}async run(e,i){await this._actionRunner.run(e,i)}dispose(){this._context=void 0,this.viewItems=vd(this.viewItems),this.getContainer().remove(),super.dispose()}}const JVe=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,UFe=/(&amp;)?(&amp;)([^\s&])/g;var zye;(function(l){l[l.Right=0]="Right",l[l.Left=1]="Left"})(zye||(zye={}));var GVe;(function(l){l[l.Above=0]="Above",l[l.Below=1]="Below"})(GVe||(GVe={}));class Kq extends kw{constructor(e,i,n,s){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const c=document.createElement("div");c.classList.add("monaco-menu"),c.setAttribute("role","presentation"),super(c,{orientation:1,actionViewItemProvider:v=>this.doGetActionViewItem(v,n,d),context:n.context,actionRunner:n.actionRunner,ariaLabel:n.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...Hc||Cv?[10]:[]],keyDown:!0}}),this.menuStyles=s,this.menuElement=c,this.actionsList.tabIndex=0,this.initializeOrUpdateStyleSheet(e,s),this._register(y1.addTarget(c)),this._register(en(c,br.KEY_DOWN,v=>{new Id(v).equals(2)&&v.preventDefault()})),n.enableMnemonics&&this._register(en(c,br.KEY_DOWN,v=>{const x=v.key.toLocaleLowerCase();if(this.mnemonics.has(x)){il.stop(v,!0);const w=this.mnemonics.get(x);if(w.length===1&&(w[0]instanceof _Ct&&w[0].container&&this.focusItemByElement(w[0].container),w[0].onClick(v)),w.length>1){const I=w.shift();I&&I.container&&(this.focusItemByElement(I.container),w.push(I)),this.mnemonics.set(x,w)}}})),Cv&&this._register(en(c,br.KEY_DOWN,v=>{const x=new Id(v);x.equals(14)||x.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),il.stop(v,!0)):(x.equals(13)||x.equals(12))&&(this.focusedItem=0,this.focusPrevious(),il.stop(v,!0))})),this._register(en(this.domNode,br.MOUSE_OUT,v=>{const x=v.relatedTarget;Am(x,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),v.stopPropagation())})),this._register(en(this.actionsList,br.MOUSE_OVER,v=>{let x=v.target;if(!(!x||!Am(x,this.actionsList)||x===this.actionsList)){for(;x.parentElement!==this.actionsList&&x.parentElement!==null;)x=x.parentElement;if(x.classList.contains("action-item")){const w=this.focusedItem;this.setFocusedItem(x),w!==this.focusedItem&&this.updateFocus()}}})),this._register(y1.addTarget(this.actionsList)),this._register(en(this.actionsList,Ud.Tap,v=>{let x=v.initialTarget;if(!(!x||!Am(x,this.actionsList)||x===this.actionsList)){for(;x.parentElement!==this.actionsList&&x.parentElement!==null;)x=x.parentElement;if(x.classList.contains("action-item")){const w=this.focusedItem;this.setFocusedItem(x),w!==this.focusedItem&&this.updateFocus()}}}));const d={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new vse(c,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const f=this.scrollableElement.getDomNode();f.style.position="",this.styleScrollElement(f,s),this._register(en(c,Ud.Change,v=>{il.stop(v,!0);const x=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:x-v.translationY})})),this._register(en(f,br.MOUSE_UP,v=>{v.preventDefault()}));const m=Eo(e);c.style.maxHeight=`${Math.max(10,m.innerHeight-e.getBoundingClientRect().top-35)}px`,i=i.filter((v,x)=>{var w;return(w=n.submenuIds)!=null&&w.has(v.id)?(console.warn(`Found submenu cycle: ${v.id}`),!1):!(v instanceof Rm&&(x===i.length-1||x===0||i[x-1]instanceof Rm))}),this.push(i,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(v=>!(v instanceof pCt)).forEach((v,x,w)=>{v.updatePositionInSet(x+1,w.length)})}initializeOrUpdateStyleSheet(e,i){this.styleSheet||(cye(e)?this.styleSheet=Dw(e):(Kq.globalStyleSheet||(Kq.globalStyleSheet=Dw()),this.styleSheet=Kq.globalStyleSheet)),this.styleSheet.textContent=pyi(i,cye(e))}styleScrollElement(e,i){const n=i.foregroundColor??"",s=i.backgroundColor??"",c=i.borderColor?`1px solid ${i.borderColor}`:"",d="5px",f=i.shadowColor?`0 2px 8px ${i.shadowColor}`:"";e.style.outline=c,e.style.borderRadius=d,e.style.color=n,e.style.backgroundColor=s,e.style.boxShadow=f}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const i=this.focusedItem;this.setFocusedItem(e),i!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let i=0;i<this.actionsList.children.length;i++){const n=this.actionsList.children[i];if(e===n){this.focusedItem=i;break}}}updateFocus(e){super.updateFocus(e,!0,!0),typeof this.focusedItem<"u"&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(e,i,n){if(e instanceof Rm)return new pCt(i.context,e,{icon:!0},this.menuStyles);if(e instanceof T$){const s=new _Ct(e,e.actions,n,{...i,submenuIds:new Set([...i.submenuIds||[],e.id])},this.menuStyles);if(i.enableMnemonics){const c=s.getMnemonic();if(c&&s.isEnabled()){let d=[];this.mnemonics.has(c)&&(d=this.mnemonics.get(c)),d.push(s),this.mnemonics.set(c,d)}}return s}else{const s={enableMnemonics:i.enableMnemonics,useEventAsContext:i.useEventAsContext};if(i.getKeyBinding){const d=i.getKeyBinding(e);if(d){const f=d.getLabel();f&&(s.keybinding=f)}}const c=new FDt(i.context,e,s,this.menuStyles);if(i.enableMnemonics){const d=c.getMnemonic();if(d&&c.isEnabled()){let f=[];this.mnemonics.has(d)&&(f=this.mnemonics.get(d)),f.push(c),this.mnemonics.set(d,f)}}return c}}}class FDt extends xE{constructor(e,i,n,s){if(n.isMenu=!0,super(i,i,n),this.menuStyle=s,this.options=n,this.options.icon=n.icon!==void 0?n.icon:!1,this.options.label=n.label!==void 0?n.label:!0,this.cssClass="",this.options.label&&n.enableMnemonics){const c=this.action.label;if(c){const d=JVe.exec(c);d&&(this.mnemonic=(d[1]?d[1]:d[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new qu(()=>{this.element&&(this._register(en(this.element,br.MOUSE_UP,c=>{if(il.stop(c,!0),bk){if(new hT(Eo(this.element),c).rightButton)return;this.onClick(c)}else setTimeout(()=>{this.onClick(c)},0)})),this._register(en(this.element,br.CONTEXT_MENU,c=>{il.stop(c,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=jn(this.element,Cr("a.action-menu-item")),this._action.id===Rm.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=jn(this.item,Cr("span.menu-item-check"+zo.asCSSSelector(pr.menuSelection))),this.check.setAttribute("role","none"),this.label=jn(this.item,Cr("span.action-label")),this.options.label&&this.options.keybinding&&(jn(this.item,Cr("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){var e;super.focus(),(e=this.item)==null||e.focus(),this.applyStyle()}updatePositionInSet(e,i){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${i}`))}updateLabel(){var e;if(this.label&&this.options.label){s0(this.label);let i=K$e(this.action.label);if(i){const n=_yi(i);this.options.enableMnemonics||(i=n),this.label.setAttribute("aria-label",n.replace(/&&/g,"&"));const s=JVe.exec(i);if(s){i=wie(i),UFe.lastIndex=0;let c=UFe.exec(i);for(;c&&c[1];)c=UFe.exec(i);const d=f=>f.replace(/&amp;&amp;/g,"&amp;");c?this.label.append(use(d(i.substr(0,c.index))," "),Cr("u",{"aria-hidden":"true"},c[3]),Ykt(d(i.substr(c.index+c[0].length))," ")):this.label.innerText=d(i).trim(),(e=this.item)==null||e.setAttribute("aria-keyshortcuts",(s[1]?s[1]:s[3]).toLocaleLowerCase())}else this.label.innerText=i.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.action.checked;this.item.classList.toggle("checked",!!e),e!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const e=this.element&&this.element.classList.contains("focused"),i=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,n=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,s=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",c=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=i??"",this.item.style.backgroundColor=n??"",this.item.style.outline=s,this.item.style.outlineOffset=c),this.check&&(this.check.style.color=i??"")}}class _Ct extends FDt{constructor(e,i,n,s,c){super(e,e,s,c),this.submenuActions=i,this.parentData=n,this.submenuOptions=s,this.mysubmenu=null,this.submenuDisposables=this._register(new wn),this.mouseOver=!1,this.expandDirection=s&&s.expandDirection!==void 0?s.expandDirection:{horizontal:zye.Right,vertical:GVe.Below},this.showScheduler=new qu(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new qu(()=>{this.element&&!Am(D0(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=jn(this.item,Cr("span.submenu-indicator"+zo.asCSSSelector(pr.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(en(this.element,br.KEY_UP,i=>{const n=new Id(i);(n.equals(17)||n.equals(3))&&(il.stop(i,!0),this.createSubmenu(!0))})),this._register(en(this.element,br.KEY_DOWN,i=>{const n=new Id(i);D0()===this.item&&(n.equals(17)||n.equals(3))&&il.stop(i,!0)})),this._register(en(this.element,br.MOUSE_OVER,i=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(en(this.element,br.MOUSE_LEAVE,i=>{this.mouseOver=!1})),this._register(en(this.element,br.FOCUS_OUT,i=>{this.element&&!Am(D0(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))})))}updateEnabled(){}onClick(e){il.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,i,n,s){const c={top:0,left:0};return c.left=sq(e.width,i.width,{position:s.horizontal===zye.Right?0:1,offset:n.left,size:n.width}),c.left>=n.left&&c.left<n.left+n.width&&(n.left+10+i.width<=e.width&&(c.left=n.left+10),n.top+=10,n.height=0),c.top=sq(e.height,i.height,{position:0,offset:n.top,size:0}),c.top+i.height===n.top&&c.top+n.height+i.height<=e.height&&(c.top+=n.height),c}createSubmenu(e=!0){if(this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=jn(this.element,Cr("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const i=Eo(this.parentData.parent.domNode).getComputedStyle(this.parentData.parent.domNode),n=parseFloat(i.paddingTop||"0")||0;this.submenuContainer.style.zIndex="1",this.submenuContainer.style.position="fixed",this.submenuContainer.style.top="0",this.submenuContainer.style.left="0",this.parentData.submenu=new Kq(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new IWe],this.submenuOptions,this.menuStyle);const s=this.element.getBoundingClientRect(),c={top:s.top-n,left:s.left,height:s.height+2*n,width:s.width},d=this.submenuContainer.getBoundingClientRect(),f=Eo(this.element),{top:m,left:v}=this.calculateSubmenuMenuLayout(new Du(f.innerWidth,f.innerHeight),Du.lift(d),c,this.expandDirection);this.submenuContainer.style.left=`${v-d.left}px`,this.submenuContainer.style.top=`${m-d.top}px`,this.submenuDisposables.add(en(this.submenuContainer,br.KEY_UP,x=>{new Id(x).equals(15)&&(il.stop(x,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(en(this.submenuContainer,br.KEY_DOWN,x=>{new Id(x).equals(15)&&il.stop(x,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var i;this.item&&((i=this.item)==null||i.setAttribute("aria-expanded",e))}applyStyle(){super.applyStyle();const i=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=i??"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class pCt extends V${constructor(e,i,n,s){super(e,i,n),this.menuStyles=s}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function _yi(l){const e=JVe,i=e.exec(l);if(!i)return l;const n=!i[1];return l.replace(e,n?"$2$3":"").trim()}function mCt(l){const e=Jkt()[l.id];return`.codicon-${l.id}:before { content: '\\${e.toString(16)}'; }`}function pyi(l,e){let i=`
+.monaco-menu {
+ font-size: 13px;
+ border-radius: 5px;
+ min-width: 160px;
+}
+
+${mCt(pr.menuSelection)}
+${mCt(pr.menuSubmenu)}
+
+.monaco-menu .monaco-action-bar {
+ text-align: right;
+ overflow: hidden;
+ white-space: nowrap;
+}
+
+.monaco-menu .monaco-action-bar .actions-container {
+ display: flex;
+ margin: 0 auto;
+ padding: 0;
+ width: 100%;
+ justify-content: flex-end;
+}
+
+.monaco-menu .monaco-action-bar.vertical .actions-container {
+ display: inline-block;
+}
+
+.monaco-menu .monaco-action-bar.reverse .actions-container {
+ flex-direction: row-reverse;
+}
+
+.monaco-menu .monaco-action-bar .action-item {
+ cursor: pointer;
+ display: inline-block;
+ transition: transform 50ms ease;
+ position: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */
+}
+
+.monaco-menu .monaco-action-bar .action-item.disabled {
+ cursor: default;
+}
+
+.monaco-menu .monaco-action-bar .action-item .icon,
+.monaco-menu .monaco-action-bar .action-item .codicon {
+ display: inline-block;
+}
+
+.monaco-menu .monaco-action-bar .action-item .codicon {
+ display: flex;
+ align-items: center;
+}
+
+.monaco-menu .monaco-action-bar .action-label {
+ font-size: 11px;
+ margin-right: 4px;
+}
+
+.monaco-menu .monaco-action-bar .action-item.disabled .action-label,
+.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {
+ color: var(--vscode-disabledForeground);
+}
+
+/* Vertical actions */
+
+.monaco-menu .monaco-action-bar.vertical {
+ text-align: left;
+}
+
+.monaco-menu .monaco-action-bar.vertical .action-item {
+ display: block;
+}
+
+.monaco-menu .monaco-action-bar.vertical .action-label.separator {
+ display: block;
+ border-bottom: 1px solid var(--vscode-menu-separatorBackground);
+ padding-top: 1px;
+ padding: 30px;
+}
+
+.monaco-menu .secondary-actions .monaco-action-bar .action-label {
+ margin-left: 6px;
+}
+
+/* Action Items */
+.monaco-menu .monaco-action-bar .action-item.select-container {
+ overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */
+ flex: 1;
+ max-width: 170px;
+ min-width: 60px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-right: 10px;
+}
+
+.monaco-menu .monaco-action-bar.vertical {
+ margin-left: 0;
+ overflow: visible;
+}
+
+.monaco-menu .monaco-action-bar.vertical .actions-container {
+ display: block;
+}
+
+.monaco-menu .monaco-action-bar.vertical .action-item {
+ padding: 0;
+ transform: none;
+ display: flex;
+}
+
+.monaco-menu .monaco-action-bar.vertical .action-item.active {
+ transform: none;
+}
+
+.monaco-menu .monaco-action-bar.vertical .action-menu-item {
+ flex: 1 1 auto;
+ display: flex;
+ height: 2em;
+ align-items: center;
+ position: relative;
+ margin: 0 4px;
+ border-radius: 4px;
+}
+
+.monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding,
+.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding {
+ opacity: unset;
+}
+
+.monaco-menu .monaco-action-bar.vertical .action-label {
+ flex: 1 1 auto;
+ text-decoration: none;
+ padding: 0 1em;
+ background: none;
+ font-size: 12px;
+ line-height: 1;
+}
+
+.monaco-menu .monaco-action-bar.vertical .keybinding,
+.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
+ display: inline-block;
+ flex: 2 1 auto;
+ padding: 0 1em;
+ text-align: right;
+ font-size: 12px;
+ line-height: 1;
+}
+
+.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
+ height: 100%;
+}
+
+.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {
+ font-size: 16px !important;
+ display: flex;
+ align-items: center;
+}
+
+.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {
+ margin-left: auto;
+ margin-right: -20px;
+}
+
+.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,
+.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {
+ opacity: 0.4;
+}
+
+.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {
+ display: inline-block;
+ box-sizing: border-box;
+ margin: 0;
+}
+
+.monaco-menu .monaco-action-bar.vertical .action-item {
+ position: static;
+ overflow: visible;
+}
+
+.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {
+ position: absolute;
+}
+
+.monaco-menu .monaco-action-bar.vertical .action-label.separator {
+ width: 100%;
+ height: 0px !important;
+ opacity: 1;
+}
+
+.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {
+ padding: 0.7em 1em 0.1em 1em;
+ font-weight: bold;
+ opacity: 1;
+}
+
+.monaco-menu .monaco-action-bar.vertical .action-label:hover {
+ color: inherit;
+}
+
+.monaco-menu .monaco-action-bar.vertical .menu-item-check {
+ position: absolute;
+ visibility: hidden;
+ width: 1em;
+ height: 100%;
+}
+
+.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {
+ visibility: visible;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+/* Context Menu */
+
+.context-view.monaco-menu-container {
+ outline: 0;
+ border: none;
+ animation: fadeIn 0.083s linear;
+ -webkit-app-region: no-drag;
+}
+
+.context-view.monaco-menu-container :focus,
+.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,
+.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {
+ outline: 0;
+}
+
+.hc-black .context-view.monaco-menu-container,
+.hc-light .context-view.monaco-menu-container,
+:host-context(.hc-black) .context-view.monaco-menu-container,
+:host-context(.hc-light) .context-view.monaco-menu-container {
+ box-shadow: none;
+}
+
+.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused,
+.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused,
+:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused,
+:host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused {
+ background: none;
+}
+
+/* Vertical Action Bar Styles */
+
+.monaco-menu .monaco-action-bar.vertical {
+ padding: 4px 0;
+}
+
+.monaco-menu .monaco-action-bar.vertical .action-menu-item {
+ height: 2em;
+}
+
+.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),
+.monaco-menu .monaco-action-bar.vertical .keybinding {
+ font-size: inherit;
+ padding: 0 2em;
+ max-height: 100%;
+}
+
+.monaco-menu .monaco-action-bar.vertical .menu-item-check {
+ font-size: inherit;
+ width: 2em;
+}
+
+.monaco-menu .monaco-action-bar.vertical .action-label.separator {
+ font-size: inherit;
+ margin: 5px 0 !important;
+ padding: 0;
+ border-radius: 0;
+}
+
+.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator,
+:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {
+ margin-left: 0;
+ margin-right: 0;
+}
+
+.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
+ font-size: 60%;
+ padding: 0 1.8em;
+}
+
+.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator,
+:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {
+ height: 100%;
+ mask-size: 10px 10px;
+ -webkit-mask-size: 10px 10px;
+}
+
+.monaco-menu .action-item {
+ cursor: default;
+}`;if(e){i+=`
+ /* Arrows */
+ .monaco-scrollable-element > .scrollbar > .scra {
+ cursor: pointer;
+ font-size: 11px !important;
+ }
+
+ .monaco-scrollable-element > .visible {
+ opacity: 1;
+
+ /* Background rule added for IE9 - to allow clicks on dom node */
+ background:rgba(0,0,0,0);
+
+ transition: opacity 100ms linear;
+ }
+ .monaco-scrollable-element > .invisible {
+ opacity: 0;
+ pointer-events: none;
+ }
+ .monaco-scrollable-element > .invisible.fade {
+ transition: opacity 800ms linear;
+ }
+
+ /* Scrollable Content Inset Shadow */
+ .monaco-scrollable-element > .shadow {
+ position: absolute;
+ display: none;
+ }
+ .monaco-scrollable-element > .shadow.top {
+ display: block;
+ top: 0;
+ left: 3px;
+ height: 3px;
+ width: 100%;
+ }
+ .monaco-scrollable-element > .shadow.left {
+ display: block;
+ top: 3px;
+ left: 0;
+ height: 100%;
+ width: 3px;
+ }
+ .monaco-scrollable-element > .shadow.top-left-corner {
+ display: block;
+ top: 0;
+ left: 0;
+ height: 3px;
+ width: 3px;
+ }
+ `;const n=l.scrollbarShadow;n&&(i+=`
+ .monaco-scrollable-element > .shadow.top {
+ box-shadow: ${n} 0 6px 6px -6px inset;
+ }
+
+ .monaco-scrollable-element > .shadow.left {
+ box-shadow: ${n} 6px 0 6px -6px inset;
+ }
+
+ .monaco-scrollable-element > .shadow.top.left {
+ box-shadow: ${n} 6px 6px 6px -6px inset;
+ }
+ `);const s=l.scrollbarSliderBackground;s&&(i+=`
+ .monaco-scrollable-element > .scrollbar > .slider {
+ background: ${s};
+ }
+ `);const c=l.scrollbarSliderHoverBackground;c&&(i+=`
+ .monaco-scrollable-element > .scrollbar > .slider:hover {
+ background: ${c};
+ }
+ `);const d=l.scrollbarSliderActiveBackground;d&&(i+=`
+ .monaco-scrollable-element > .scrollbar > .slider.active {
+ background: ${d};
+ }
+ `)}return i}class myi{constructor(e,i,n,s){this.contextViewService=e,this.telemetryService=i,this.notificationService=n,this.keybindingService=s,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const i=e.getActions();if(!i.length)return;this.focusToReturn=D0();let n;const s=Mm(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:c=>{var x;this.lastContainer=c;const d=e.getMenuClassName?e.getMenuClassName():"";d&&(c.className+=" "+d),this.options.blockMouse&&(this.block=c.appendChild(Cr(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",(x=this.blockDisposable)==null||x.dispose(),this.blockDisposable=en(this.block,br.MOUSE_DOWN,w=>w.stopPropagation()));const f=new wn,m=e.actionRunner||new TB;m.onWillRun(w=>this.onActionRun(w,!e.skipTelemetry),this,f),m.onDidRun(this.onDidActionRun,this,f),n=new Kq(c,i,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:m,getKeyBinding:e.getKeyBinding?e.getKeyBinding:w=>this.keybindingService.lookupKeybinding(w.id)},fyi),n.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,f),n.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,f);const v=Eo(c);return f.add(en(v,br.BLUR,()=>this.contextViewService.hideContextView(!0))),f.add(en(v,br.MOUSE_DOWN,w=>{if(w.defaultPrevented)return;const I=new hT(v,w);let P=I.target;if(!I.rightButton){for(;P;){if(P===c)return;P=P.parentElement}this.contextViewService.hideContextView(!0)}})),gT(f,n)},focus:()=>{n==null||n.focus(!!e.autoSelectFirstItem)},onHide:c=>{var d,f,m;(d=e.onHide)==null||d.call(e,!!c),this.block&&(this.block.remove(),this.block=null),(f=this.blockDisposable)==null||f.dispose(),this.blockDisposable=null,this.lastContainer&&(D0()===this.lastContainer||Am(D0(),this.lastContainer))&&((m=this.focusToReturn)==null||m.focus()),this.lastContainer=null}},s,!!s)}onActionRun(e,i){i&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!Tk(e.error)&&this.notificationService.error(e.error)}}var gyi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},DU=function(l,e){return function(i,n){e(i,n,l)}};let KVe=class extends xi{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new myi(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,i,n,s,c,d){super(),this.telemetryService=e,this.notificationService=i,this.contextViewService=n,this.keybindingService=s,this.menuService=c,this.contextKeyService=d,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new gi),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new gi)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=XVe.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...e,onHide:i=>{var n;(n=e.onHide)==null||n.call(e,i),this._onDidHideContextMenu.fire()}}),W4.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};KVe=gyi([DU(0,b1),DU(1,w_),DU(2,b6),DU(3,pu),DU(4,Lw),DU(5,Ko)],KVe);var XVe;(function(l){function e(n){return n&&n.menuId instanceof As}function i(n,s,c){if(!e(n))return n;const{menuId:d,menuActionOptions:f,contextKeyService:m}=n;return{...n,getActions:()=>{const v=[];if(d){const x=s.getMenuActions(d,m??c,f);hyi(x,v)}return n.getActions?Rm.join(n.getActions(),v):v}}}l.transform=i})(XVe||(XVe={}));var Uye;(function(l){l[l.API=0]="API",l[l.USER=1]="USER"})(Uye||(Uye={}));var oJe=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},qye=function(l,e){return function(i,n){e(i,n,l)}};let QVe=class{constructor(e){this._commandService=e}async open(e,i){if(!NSe(e,Ma.command))return!1;if(!(i!=null&&i.allowCommands)||(typeof e=="string"&&(e=yo.parse(e)),Array.isArray(i.allowCommands)&&!i.allowCommands.includes(e.path)))return!0;let n=[];try{n=gVe(decodeURIComponent(e.query))}catch{try{n=gVe(e.query)}catch{}}return Array.isArray(n)||(n=[n]),await this._commandService.executeCommand(e.path,...n),!0}};QVe=oJe([qye(0,qd)],QVe);let ZVe=class{constructor(e){this._editorService=e}async open(e,i){typeof e=="string"&&(e=yo.parse(e));const{selection:n,uri:s}=qmi(e);return e=s,e.scheme===Ma.file&&(e=Dgi(e)),await this._editorService.openCodeEditor({resource:e,options:{selection:n,source:i!=null&&i.fromUserGesture?Uye.USER:Uye.API,...i==null?void 0:i.editorOptions}},this._editorService.getFocusedCodeEditor(),i==null?void 0:i.openToSide),!0}};ZVe=oJe([qye(0,Bl)],ZVe);let YVe=class{constructor(e,i){this._openers=new _v,this._validators=new _v,this._resolvers=new _v,this._resolvedUriTargets=new vg(n=>n.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new _v,this._defaultExternalOpener={openExternal:async n=>(SWe(n,Ma.http,Ma.https)?N2t(n):cd.location.href=n,!0)},this._openers.push({open:async(n,s)=>s!=null&&s.openExternal||SWe(n,Ma.mailto,Ma.http,Ma.https,Ma.vsls)?(await this._doOpenExternal(n,s),!0):!1}),this._openers.push(new QVe(i)),this._openers.push(new ZVe(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}async open(e,i){const n=typeof e=="string"?yo.parse(e):e,s=this._resolvedUriTargets.get(n)??e;for(const c of this._validators)if(!await c.shouldOpen(s,i))return!1;for(const c of this._openers)if(await c.open(e,i))return!0;return!1}async resolveExternalUri(e,i){for(const n of this._resolvers)try{const s=await n.resolveExternalUri(e,i);if(s)return this._resolvedUriTargets.has(s.resolved)||this._resolvedUriTargets.set(s.resolved,e),s}catch{}throw new Error("Could not resolve external URI: "+e.toString())}async _doOpenExternal(e,i){const n=typeof e=="string"?yo.parse(e):e;let s;try{s=(await this.resolveExternalUri(n,i)).resolved}catch{s=n}let c;if(typeof e=="string"&&n.toString()===s.toString()?c=e:c=encodeURI(s.toString(!0)),i!=null&&i.allowContributedOpeners){const d=typeof(i==null?void 0:i.allowContributedOpeners)=="string"?i==null?void 0:i.allowContributedOpeners:void 0;for(const f of this._externalOpeners)if(await f.openExternal(c,{sourceUri:n,preferredOpenerId:d},cc.None))return!0}return this._defaultExternalOpener.openExternal(c,{sourceUri:n},cc.None)}dispose(){this._validators.clear()}};YVe=oJe([qye(0,Bl),qye(1,qd)],YVe);const Fb=jc("editorWorkerService");var Rh;(function(l){l[l.Hint=1]="Hint",l[l.Info=2]="Info",l[l.Warning=4]="Warning",l[l.Error=8]="Error"})(Rh||(Rh={}));(function(l){function e(d,f){return f-d}l.compare=e;const i=Object.create(null);i[l.Error]=W("sev.error","Error"),i[l.Warning]=W("sev.warning","Warning"),i[l.Info]=W("sev.info","Info");function n(d){return i[d]||""}l.toString=n;function s(d){switch(d){case S_.Error:return l.Error;case S_.Warning:return l.Warning;case S_.Info:return l.Info;case S_.Ignore:return l.Hint}}l.fromSeverity=s;function c(d){switch(d){case l.Error:return S_.Error;case l.Warning:return S_.Warning;case l.Info:return S_.Info;case l.Hint:return S_.Ignore}}l.toSeverity=c})(Rh||(Rh={}));var $ye;(function(l){const e="";function i(s){return n(s,!0)}l.makeKey=i;function n(s,c){const d=[e];return s.source?d.push(s.source.replace("¦","\\¦")):d.push(e),s.code?typeof s.code=="string"?d.push(s.code.replace("¦","\\¦")):d.push(s.code.value.replace("¦","\\¦")):d.push(e),s.severity!==void 0&&s.severity!==null?d.push(Rh.toString(s.severity)):d.push(e),s.message&&c?d.push(s.message.replace("¦","\\¦")):d.push(e),s.startLineNumber!==void 0&&s.startLineNumber!==null?d.push(s.startLineNumber.toString()):d.push(e),s.startColumn!==void 0&&s.startColumn!==null?d.push(s.startColumn.toString()):d.push(e),s.endLineNumber!==void 0&&s.endLineNumber!==null?d.push(s.endLineNumber.toString()):d.push(e),s.endColumn!==void 0&&s.endColumn!==null?d.push(s.endColumn.toString()):d.push(e),d.push(e),d.join("¦")}l.makeKeyOptionalMessage=n})($ye||($ye={}));const zL=jc("markerService"),BDt=It("editor.lineHighlightBackground",null,W("lineHighlight","Background color for the highlight of line at the cursor position.")),gCt=It("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:bl},W("lineHighlightBorderBox","Background color for the border around the line at the cursor position."));It("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},W("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0);It("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:yf,hcLight:yf},W("rangeHighlightBorder","Background color of the border around highlighted ranges."));It("editor.symbolHighlightBackground",{dark:H4,light:H4,hcDark:null,hcLight:null},W("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0);It("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:yf,hcLight:yf},W("symbolHighlightBorder","Background color of the border around highlighted symbols."));const bwe=It("editorCursor.foreground",{dark:"#AEAFAD",light:In.black,hcDark:In.white,hcLight:"#0F4A85"},W("caret","Color of the editor cursor.")),aJe=It("editorCursor.background",null,W("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),WDt=It("editorMultiCursor.primary.foreground",bwe,W("editorMultiCursorPrimaryForeground","Color of the primary editor cursor when multiple cursors are present.")),yyi=It("editorMultiCursor.primary.background",aJe,W("editorMultiCursorPrimaryBackground","The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),VDt=It("editorMultiCursor.secondary.foreground",bwe,W("editorMultiCursorSecondaryForeground","Color of secondary editor cursors when multiple cursors are present.")),vyi=It("editorMultiCursor.secondary.background",aJe,W("editorMultiCursorSecondaryBackground","The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),cJe=It("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},W("editorWhitespaces","Color of whitespace characters in the editor.")),byi=It("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:In.white,hcLight:"#292929"},W("editorLineNumbers","Color of editor line numbers.")),Cyi=It("editorIndentGuide.background",cJe,W("editorIndentGuides","Color of the editor indentation guides."),!1,W("deprecatedEditorIndentGuides","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),Syi=It("editorIndentGuide.activeBackground",cJe,W("editorActiveIndentGuide","Color of the active editor indentation guides."),!1,W("deprecatedEditorActiveIndentGuide","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),Nse=It("editorIndentGuide.background1",Cyi,W("editorIndentGuides1","Color of the editor indentation guides (1).")),wyi=It("editorIndentGuide.background2","#00000000",W("editorIndentGuides2","Color of the editor indentation guides (2).")),xyi=It("editorIndentGuide.background3","#00000000",W("editorIndentGuides3","Color of the editor indentation guides (3).")),kyi=It("editorIndentGuide.background4","#00000000",W("editorIndentGuides4","Color of the editor indentation guides (4).")),Tyi=It("editorIndentGuide.background5","#00000000",W("editorIndentGuides5","Color of the editor indentation guides (5).")),Dyi=It("editorIndentGuide.background6","#00000000",W("editorIndentGuides6","Color of the editor indentation guides (6).")),Lse=It("editorIndentGuide.activeBackground1",Syi,W("editorActiveIndentGuide1","Color of the active editor indentation guides (1).")),Eyi=It("editorIndentGuide.activeBackground2","#00000000",W("editorActiveIndentGuide2","Color of the active editor indentation guides (2).")),Iyi=It("editorIndentGuide.activeBackground3","#00000000",W("editorActiveIndentGuide3","Color of the active editor indentation guides (3).")),Nyi=It("editorIndentGuide.activeBackground4","#00000000",W("editorActiveIndentGuide4","Color of the active editor indentation guides (4).")),Lyi=It("editorIndentGuide.activeBackground5","#00000000",W("editorActiveIndentGuide5","Color of the active editor indentation guides (5).")),Pyi=It("editorIndentGuide.activeBackground6","#00000000",W("editorActiveIndentGuide6","Color of the active editor indentation guides (6).")),Ayi=It("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:yf,hcLight:yf},W("editorActiveLineNumber","Color of editor active line number"),!1,W("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead."));It("editorLineNumber.activeForeground",Ayi,W("editorActiveLineNumber","Color of editor active line number"));const Oyi=It("editorLineNumber.dimmedForeground",null,W("editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed."));It("editorRuler.foreground",{dark:"#5A5A5A",light:In.lightgrey,hcDark:In.white,hcLight:"#292929"},W("editorRuler","Color of the editor rulers."));It("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},W("editorCodeLensForeground","Foreground color of editor CodeLens"));It("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},W("editorBracketMatchBackground","Background color behind matching brackets"));It("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:bl,hcLight:bl},W("editorBracketMatchBorder","Color for matching brackets boxes"));const Myi=It("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},W("editorOverviewRulerBorder","Color of the overview ruler border.")),Ryi=It("editorOverviewRuler.background",null,W("editorOverviewRulerBackground","Background color of the editor overview ruler."));It("editorGutter.background",wT,W("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers."));It("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:In.fromHex("#fff").transparent(.8),hcLight:bl},W("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor."));const Fyi=It("editorUnnecessaryCode.opacity",{dark:In.fromHex("#000a"),light:In.fromHex("#0007"),hcDark:null,hcLight:null},W("unnecessaryCodeOpacity",`Opacity of unnecessary (unused) source code in the editor. For example, "#000000c0" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.`));It("editorGhostText.border",{dark:null,light:null,hcDark:In.fromHex("#fff").transparent(.8),hcLight:In.fromHex("#292929").transparent(.8)},W("editorGhostTextBorder","Border color of ghost text in the editor."));const Byi=It("editorGhostText.foreground",{dark:In.fromHex("#ffffff56"),light:In.fromHex("#0007"),hcDark:null,hcLight:null},W("editorGhostTextForeground","Foreground color of the ghost text in the editor."));It("editorGhostText.background",null,W("editorGhostTextBackground","Background color of the ghost text in the editor."));const Wyi=new In(new El(0,122,204,.6)),HDt=It("editorOverviewRuler.rangeHighlightForeground",Wyi,W("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Vyi=It("editorOverviewRuler.errorForeground",{dark:new In(new El(255,18,18,.7)),light:new In(new El(255,18,18,.7)),hcDark:new In(new El(255,50,50,1)),hcLight:"#B5200D"},W("overviewRuleError","Overview ruler marker color for errors.")),Hyi=It("editorOverviewRuler.warningForeground",{dark:u6,light:u6,hcDark:Gne,hcLight:Gne},W("overviewRuleWarning","Overview ruler marker color for warnings.")),jyi=It("editorOverviewRuler.infoForeground",{dark:LL,light:LL,hcDark:Kne,hcLight:Kne},W("overviewRuleInfo","Overview ruler marker color for infos.")),jDt=It("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},W("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),zDt=It("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},W("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),UDt=It("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},W("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),qDt=It("editorBracketHighlight.foreground4","#00000000",W("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),$Dt=It("editorBracketHighlight.foreground5","#00000000",W("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),JDt=It("editorBracketHighlight.foreground6","#00000000",W("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),zyi=It("editorBracketHighlight.unexpectedBracket.foreground",{dark:new In(new El(255,18,18,.8)),light:new In(new El(255,18,18,.8)),hcDark:"new Color(new RGBA(255, 50, 50, 1))",hcLight:"#B5200D"},W("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),Uyi=It("editorBracketPairGuide.background1","#00000000",W("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),qyi=It("editorBracketPairGuide.background2","#00000000",W("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),$yi=It("editorBracketPairGuide.background3","#00000000",W("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),Jyi=It("editorBracketPairGuide.background4","#00000000",W("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),Gyi=It("editorBracketPairGuide.background5","#00000000",W("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),Kyi=It("editorBracketPairGuide.background6","#00000000",W("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),Xyi=It("editorBracketPairGuide.activeBackground1","#00000000",W("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),Qyi=It("editorBracketPairGuide.activeBackground2","#00000000",W("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),Zyi=It("editorBracketPairGuide.activeBackground3","#00000000",W("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),Yyi=It("editorBracketPairGuide.activeBackground4","#00000000",W("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),evi=It("editorBracketPairGuide.activeBackground5","#00000000",W("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),tvi=It("editorBracketPairGuide.activeBackground6","#00000000",W("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));It("editorUnicodeHighlight.border",u6,W("editorUnicodeHighlight.border","Border color used to highlight unicode characters."));It("editorUnicodeHighlight.background",epi,W("editorUnicodeHighlight.background","Background color used to highlight unicode characters."));Dk((l,e)=>{const i=l.getColor(wT),n=l.getColor(BDt),s=n&&!n.isTransparent()?n:i;s&&e.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${s}; }`)});function ivi(l,e){const i=[],n=[];for(const s of l)e.has(s)||i.push(s);for(const s of e)l.has(s)||n.push(s);return{removed:i,added:n}}function nvi(l,e){const i=new Set;for(const n of e)l.has(n)&&i.add(n);return i}var rvi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},yCt=function(l,e){return function(i,n){e(i,n,l)}};let eHe=class extends xi{constructor(e,i){super(),this._markerService=i,this._onDidChangeMarker=this._register(new gi),this._markerDecorations=new vg,e.getModels().forEach(n=>this._onModelAdded(n)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,i){const n=this._markerDecorations.get(e);return n&&n.getMarker(i)||null}_handleMarkerChange(e){e.forEach(i=>{const n=this._markerDecorations.get(i);n&&this._updateDecorations(n)})}_onModelAdded(e){const i=new svi(e);this._markerDecorations.set(e.uri,i),this._updateDecorations(i)}_onModelRemoved(e){var n;const i=this._markerDecorations.get(e.uri);i&&(i.dispose(),this._markerDecorations.delete(e.uri)),(e.uri.scheme===Ma.inMemory||e.uri.scheme===Ma.internal||e.uri.scheme===Ma.vscode)&&((n=this._markerService)==null||n.read({resource:e.uri}).map(s=>s.owner).forEach(s=>this._markerService.remove(s,[e.uri])))}_updateDecorations(e){const i=this._markerService.read({resource:e.model.uri,take:500});e.update(i)&&this._onDidChangeMarker.fire(e.model)}};eHe=rvi([yCt(0,rf),yCt(1,zL)],eHe);class svi extends xi{constructor(e){super(),this.model=e,this._map=new ahi,this._register(fo(()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()}))}update(e){const{added:i,removed:n}=ivi(new Set(this._map.keys()),new Set(e));if(i.length===0&&n.length===0)return!1;const s=n.map(f=>this._map.get(f)),c=i.map(f=>({range:this._createDecorationRange(this.model,f),options:this._createDecorationOption(f)})),d=this.model.deltaDecorations(s,c);for(const f of n)this._map.delete(f);for(let f=0;f<d.length;f++)this._map.set(i[f],d[f]);return!0}getMarker(e){return this._map.getKey(e.id)}_createDecorationRange(e,i){let n=nt.lift(i);if(i.severity===Rh.Hint&&!this._hasMarkerTag(i,1)&&!this._hasMarkerTag(i,2)&&(n=n.setEndPosition(n.startLineNumber,n.startColumn+2)),n=e.validateRange(n),n.isEmpty()){const s=e.getLineLastNonWhitespaceColumn(n.startLineNumber)||e.getLineMaxColumn(n.startLineNumber);if(s===1||n.endColumn>=s)return n;const c=e.getWordAtPosition(n.getStartPosition());c&&(n=new nt(n.startLineNumber,c.startColumn,n.endLineNumber,c.endColumn))}else if(i.endColumn===Number.MAX_VALUE&&i.startColumn===1&&n.startLineNumber===n.endLineNumber){const s=e.getLineFirstNonWhitespaceColumn(i.startLineNumber);s<n.endColumn&&(n=new nt(n.startLineNumber,s,n.endLineNumber,n.endColumn),i.startColumn=s)}return n}_createDecorationOption(e){let i,n,s,c,d;switch(e.severity){case Rh.Hint:this._hasMarkerTag(e,2)?i=void 0:this._hasMarkerTag(e,1)?i="squiggly-unnecessary":i="squiggly-hint",s=0;break;case Rh.Info:i="squiggly-info",n=Mh(jyi),s=10,d={color:Mh(Spi),position:1};break;case Rh.Warning:i="squiggly-warning",n=Mh(Hyi),s=20,d={color:Mh(wpi),position:1};break;case Rh.Error:default:i="squiggly-error",n=Mh(Vyi),s=30,d={color:Mh(xpi),position:1};break}return e.tags&&(e.tags.indexOf(1)!==-1&&(c="squiggly-inline-unnecessary"),e.tags.indexOf(2)!==-1&&(c="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:i,showIfCollapsed:!0,overviewRuler:{color:n,position:ww.Right},minimap:d,zIndex:s,inlineClassName:c}}_hasMarkerTag(e,i){return e.tags?e.tags.indexOf(i)>=0:!1}}const lJe=jc("markerDecorationsService");class em{static _nextVisibleColumn(e,i,n){return e===9?em.nextRenderTabStop(i,n):bR(e)||n$e(e)?i+2:i+1}static visibleColumnFromColumn(e,i,n){const s=Math.min(i-1,e.length),c=e.substring(0,s),d=new rye(c);let f=0;for(;!d.eol();){const m=nye(c,s,d.offset);d.nextGraphemeLength(),f=this._nextVisibleColumn(m,f,n)}return f}static columnFromVisibleColumn(e,i,n){if(i<=0)return 1;const s=e.length,c=new rye(e);let d=0,f=1;for(;!c.eol();){const m=nye(e,s,c.offset);c.nextGraphemeLength();const v=this._nextVisibleColumn(m,d,n),x=c.offset+1;if(v>=i){const w=i-d;return v-i<w?x:f}d=v,f=x}return s+1}static nextRenderTabStop(e,i){return e+i-e%i}static nextIndentTabStop(e,i){return e+i-e%i}static prevRenderTabStop(e,i){return Math.max(0,e-1-(e-1)%i)}static prevIndentTabStop(e,i){return Math.max(0,e-1-(e-1)%i)}}function ovi(l,e,i){let n=0;for(let c=0;c<l.length;c++)l.charAt(c)===" "?n=em.nextIndentTabStop(n,e):n++;let s="";if(!i){const c=Math.floor(n/e);n=n%e;for(let d=0;d<c;d++)s+=" "}for(let c=0;c<n;c++)s+=" ";return s}function uJe(l,e,i){let n=Ty(l);return n===-1&&(n=l.length),ovi(l.substring(0,n),e,i)+l.substring(n)}class vCt{constructor(e,i,n,s){this.range=e,this.nestingLevel=i,this.nestingLevelOfEqualBracketType=n,this.isInvalid=s}}class avi{constructor(e,i,n,s,c,d){this.range=e,this.openingBracketRange=i,this.closingBracketRange=n,this.nestingLevel=s,this.nestingLevelOfEqualBracketType=c,this.bracketPairNode=d}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}class cvi extends avi{constructor(e,i,n,s,c,d,f){super(e,i,n,s,c,d),this.minVisibleColumnIndentation=f}}function lvi(l,e,i,n){return l!==i?U_(i-l,n):U_(0,n-e)}const pv=0;function Jye(l){return l===0}const Sw=2**26;function U_(l,e){return l*Sw+e}function yk(l){const e=l,i=Math.floor(e/Sw),n=e-i*Sw;return new ST(i,n)}function uvi(l){return Math.floor(l/Sw)}function Fh(l,e){let i=l+e;return e>=Sw&&(i=i-l%Sw),i}function dvi(l,e){return l.reduce((i,n)=>Fh(i,e(n)),pv)}function GDt(l,e){return l===e}function lre(l,e){const i=l,n=e;if(n-i<=0)return pv;const c=Math.floor(i/Sw),d=Math.floor(n/Sw),f=n-d*Sw;if(c===d){const m=i-c*Sw;return U_(0,f-m)}else return U_(d-c,f)}function Xq(l,e){return l<e}function Qq(l,e){return l<=e}function aie(l,e){return l>=e}function lq(l){return U_(l.lineNumber-1,l.column-1)}function m9(l,e){const i=l,n=Math.floor(i/Sw),s=i-n*Sw,c=e,d=Math.floor(c/Sw),f=c-d*Sw;return new nt(n+1,s+1,d+1,f+1)}function fvi(l){const e=BL(l);return U_(e.length-1,e[e.length-1].length)}class j4{static fromModelContentChanges(e){return e.map(n=>{const s=nt.lift(n.range);return new j4(lq(s.getStartPosition()),lq(s.getEndPosition()),fvi(n.text))}).reverse()}constructor(e,i,n){this.startOffset=e,this.endOffset=i,this.newLength=n}toString(){return`[${yk(this.startOffset)}...${yk(this.endOffset)}) -> ${yk(this.newLength)}`}}class hvi{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map(i=>dJe.from(i))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const i=this.edits[this.nextEditIdx],n=i?this.translateOldToCur(i.offsetObj):null;return n===null?null:lre(e,n)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?U_(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):U_(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const i=yk(e);return i.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?U_(i.lineCount-this.deltaOldToNewLineCount,i.columnCount-this.deltaOldToNewColumnCount):U_(i.lineCount-this.deltaOldToNewLineCount,i.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx<this.edits.length;){const i=this.edits[this.nextEditIdx],n=this.translateOldToCur(i.endOffsetAfterObj);if(Qq(n,e)){this.nextEditIdx++;const s=yk(n),c=yk(this.translateOldToCur(i.endOffsetBeforeObj)),d=s.lineCount-c.lineCount;this.deltaOldToNewLineCount+=d;const f=this.deltaLineIdxInOld===i.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,m=s.columnCount-c.columnCount;this.deltaOldToNewColumnCount=f+m,this.deltaLineIdxInOld=i.endOffsetBeforeObj.lineCount}else break}}}class dJe{static from(e){return new dJe(e.startOffset,e.endOffset,e.newLength)}constructor(e,i,n){this.endOffsetBeforeObj=yk(i),this.endOffsetAfterObj=yk(Fh(e,n)),this.offsetObj=yk(e)}}const d0e=[],ak=class ak{static create(e,i){if(e<=128&&i.length===0){let n=ak.cache[e];return n||(n=new ak(e,i),ak.cache[e]=n),n}return new ak(e,i)}static getEmpty(){return this.empty}constructor(e,i){this.items=e,this.additionalItems=i}add(e,i){const n=i.getKey(e);let s=n>>5;if(s===0){const d=1<<n|this.items;return d===this.items?this:ak.create(d,this.additionalItems)}s--;const c=this.additionalItems.slice(0);for(;c.length<s;)c.push(0);return c[s]|=1<<(n&31),ak.create(this.items,c)}merge(e){const i=this.items|e.items;if(this.additionalItems===d0e&&e.additionalItems===d0e)return i===this.items?this:i===e.items?e:ak.create(i,d0e);const n=[];for(let s=0;s<Math.max(this.additionalItems.length,e.additionalItems.length);s++){const c=this.additionalItems[s]||0,d=e.additionalItems[s]||0;n.push(c|d)}return ak.create(i,n)}intersects(e){if(this.items&e.items)return!0;for(let i=0;i<Math.min(this.additionalItems.length,e.additionalItems.length);i++)if(this.additionalItems[i]&e.additionalItems[i])return!0;return!1}};ak.cache=new Array(129),ak.empty=ak.create(0,d0e);let jC=ak;const bCt={getKey(l){return l}};class KDt{constructor(){this.items=new Map}getKey(e){let i=this.items.get(e);return i===void 0&&(i=this.items.size,this.items.set(e,i)),i}}class fJe{get length(){return this._length}constructor(e){this._length=e}}class ure extends fJe{static create(e,i,n){let s=e.length;return i&&(s=Fh(s,i.length)),n&&(s=Fh(s,n.length)),new ure(s,e,i,n,i?i.missingOpeningBracketIds:jC.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const e=[];return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}constructor(e,i,n,s,c){super(e),this.openingBracket=i,this.child=n,this.closingBracket=s,this.missingOpeningBracketIds=c}canBeReused(e){return!(this.closingBracket===null||e.intersects(this.missingOpeningBracketIds))}deepClone(){return new ure(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,i){return this.child?this.child.computeMinIndentation(Fh(e,this.openingBracket.length),i):Number.MAX_SAFE_INTEGER}}class AL extends fJe{static create23(e,i,n,s=!1){let c=e.length,d=e.missingOpeningBracketIds;if(e.listHeight!==i.listHeight)throw new Error("Invalid list heights");if(c=Fh(c,i.length),d=d.merge(i.missingOpeningBracketIds),n){if(e.listHeight!==n.listHeight)throw new Error("Invalid list heights");c=Fh(c,n.length),d=d.merge(n.missingOpeningBracketIds)}return s?new _vi(c,e.listHeight+1,e,i,n,d):new dre(c,e.listHeight+1,e,i,n,d)}static getEmpty(){return new pvi(pv,0,[],jC.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(e,i,n){super(e),this.listHeight=i,this._missingOpeningBracketIds=n,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const e=this.childrenLength;if(e===0)return;const i=this.getChild(e-1),n=i.kind===4?i.toMutable():i;return i!==n&&this.setChild(e-1,n),n}makeFirstElementMutable(){if(this.throwIfImmutable(),this.childrenLength===0)return;const i=this.getChild(0),n=i.kind===4?i.toMutable():i;return i!==n&&this.setChild(0,n),n}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds)||this.childrenLength===0)return!1;let i=this;for(;i.kind===4;){const n=i.childrenLength;if(n===0)throw new tu;i=i.getChild(n-1)}return i.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let i=this.getChild(0).length,n=this.getChild(0).missingOpeningBracketIds;for(let s=1;s<e;s++){const c=this.getChild(s);i=Fh(i,c.length),n=n.merge(c.missingOpeningBracketIds)}this._length=i,this._missingOpeningBracketIds=n,this.cachedMinIndentation=-1}computeMinIndentation(e,i){if(this.cachedMinIndentation!==-1)return this.cachedMinIndentation;let n=Number.MAX_SAFE_INTEGER,s=e;for(let c=0;c<this.childrenLength;c++){const d=this.getChild(c);d&&(n=Math.min(n,d.computeMinIndentation(s,i)),s=Fh(s,d.length))}return this.cachedMinIndentation=n,n}}class dre extends AL{get childrenLength(){return this._item3!==null?3:2}getChild(e){switch(e){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw new Error("Invalid child index")}setChild(e,i){switch(e){case 0:this._item1=i;return;case 1:this._item2=i;return;case 2:this._item3=i;return}throw new Error("Invalid child index")}get children(){return this._item3?[this._item1,this._item2,this._item3]:[this._item1,this._item2]}get item1(){return this._item1}get item2(){return this._item2}get item3(){return this._item3}constructor(e,i,n,s,c,d){super(e,i,d),this._item1=n,this._item2=s,this._item3=c}deepClone(){return new dre(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){if(this._item3)throw new Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=e,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const e=this._item3;return this._item3=null,this.handleChildrenChanged(),e}prependChildOfSameHeight(e){if(this._item3)throw new Error("Cannot prepend to a full (2,3) tree node");this.throwIfImmutable(),this._item3=this._item2,this._item2=this._item1,this._item1=e,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const e=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),e}toMutable(){return this}}class _vi extends dre{toMutable(){return new dre(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}class Gye extends AL{get childrenLength(){return this._children.length}getChild(e){return this._children[e]}setChild(e,i){this._children[e]=i}get children(){return this._children}constructor(e,i,n,s){super(e,i,s),this._children=n}deepClone(){const e=new Array(this._children.length);for(let i=0;i<this._children.length;i++)e[i]=this._children[i].deepClone();return new Gye(this.length,this.listHeight,e,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){this.throwIfImmutable(),this._children.push(e),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();const e=this._children.pop();return this.handleChildrenChanged(),e}prependChildOfSameHeight(e){this.throwIfImmutable(),this._children.unshift(e),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();const e=this._children.shift();return this.handleChildrenChanged(),e}toMutable(){return this}}class pvi extends Gye{toMutable(){return new Gye(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}const mvi=[];class hJe extends fJe{get listHeight(){return 0}get childrenLength(){return 0}getChild(e){return null}get children(){return mvi}deepClone(){return this}}class jF extends hJe{get kind(){return 0}get missingOpeningBracketIds(){return jC.getEmpty()}canBeReused(e){return!0}computeMinIndentation(e,i){const n=yk(e),s=(n.columnCount===0?n.lineCount:n.lineCount+1)+1,c=uvi(Fh(e,this.length))+1;let d=Number.MAX_SAFE_INTEGER;for(let f=s;f<=c;f++){const m=i.getLineFirstNonWhitespaceColumn(f),v=i.getLineContent(f);if(m===0)continue;const x=em.visibleColumnFromColumn(v,m,i.getOptions().tabSize);d=Math.min(d,x)}return d}}class Kye extends hJe{static create(e,i,n){return new Kye(e,i,n)}get kind(){return 1}get missingOpeningBracketIds(){return jC.getEmpty()}constructor(e,i,n){super(e),this.bracketInfo=i,this.bracketIds=n}get text(){return this.bracketInfo.bracketText}get languageId(){return this.bracketInfo.languageId}canBeReused(e){return!1}computeMinIndentation(e,i){return Number.MAX_SAFE_INTEGER}}class gvi extends hJe{get kind(){return 3}constructor(e,i){super(i),this.missingOpeningBracketIds=e}canBeReused(e){return!e.intersects(this.missingOpeningBracketIds)}computeMinIndentation(e,i){return Number.MAX_SAFE_INTEGER}}let wM=class{constructor(e,i,n,s,c){this.length=e,this.kind=i,this.bracketId=n,this.bracketIds=s,this.astNode=c}};class XDt{constructor(e,i){this.textModel=e,this.bracketTokens=i,this.reader=new yvi(this.textModel,this.bracketTokens),this._offset=pv,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return U_(this.textBufferLineCount-1,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=Fh(this._offset,e);const i=yk(this._offset);this.reader.setPosition(i.lineCount,i.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=Fh(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class yvi{constructor(e,i){this.textModel=e,this.bracketTokens=i,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,i){e===this.lineIdx?(this.lineCharOffset=i,this.line!==null&&(this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset))):(this.lineIdx=e,this.lineCharOffset=i,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const c=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=c.length,c}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,i=this.lineCharOffset;let n=0;for(;;){const c=this.lineTokens,d=c.getCount();let f=null;if(this.lineTokenOffset<d){const m=c.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<d&&m===c.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;const v=kb.getTokenType(m)===0,x=kb.containsBalancedBrackets(m),w=c.getEndOffset(this.lineTokenOffset);if(x&&v&&this.lineCharOffset<w){const I=c.getLanguageId(this.lineTokenOffset),P=this.line.substring(this.lineCharOffset,w),O=this.bracketTokens.getSingleLanguageBracketTokens(I),z=O.regExpGlobal;if(z){z.lastIndex=0;const J=z.exec(P);J&&(f=O.getToken(J[0]),f&&(this.lineCharOffset+=J.index))}}if(n+=w-this.lineCharOffset,f)if(e!==this.lineIdx||i!==this.lineCharOffset){this.peekedToken=f;break}else return this.lineCharOffset+=f.length,f;else this.lineTokenOffset++,this.lineCharOffset=w}else if(this.lineIdx===this.textBufferLineCount-1||(this.lineIdx++,this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,n+=33,n>1e3))break;if(n>1500)break}const s=lvi(e,i,this.lineIdx,this.lineCharOffset);return new wM(s,0,-1,jC.getEmpty(),new jF(s))}}class vvi{constructor(e,i){this.text=e,this._offset=pv,this.idx=0;const n=i.getRegExpStr(),s=n?new RegExp(n+`|
+`,"gi"):null,c=[];let d,f=0,m=0,v=0,x=0;const w=[];for(let O=0;O<60;O++)w.push(new wM(U_(0,O),0,-1,jC.getEmpty(),new jF(U_(0,O))));const I=[];for(let O=0;O<60;O++)I.push(new wM(U_(1,O),0,-1,jC.getEmpty(),new jF(U_(1,O))));if(s)for(s.lastIndex=0;(d=s.exec(e))!==null;){const O=d.index,z=d[0];if(z===`
+`)f++,m=O+1;else{if(v!==O){let J;if(x===f){const Y=O-v;if(Y<w.length)J=w[Y];else{const ae=U_(0,Y);J=new wM(ae,0,-1,jC.getEmpty(),new jF(ae))}}else{const Y=f-x,ae=O-m;if(Y===1&&ae<I.length)J=I[ae];else{const me=U_(Y,ae);J=new wM(me,0,-1,jC.getEmpty(),new jF(me))}}c.push(J)}c.push(i.getToken(z)),v=O+z.length,x=f}}const P=e.length;if(v!==P){const O=x===f?U_(0,P-v):U_(f-x,P-m);c.push(new wM(O,0,-1,jC.getEmpty(),new jF(O)))}this.length=U_(f,P-m),this.tokens=c}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(e){throw new Yci}}class _Je{static createFromLanguage(e,i){function n(c){return i.getKey(`${c.languageId}:::${c.bracketText}`)}const s=new Map;for(const c of e.bracketsNew.openingBrackets){const d=U_(0,c.bracketText.length),f=n(c),m=jC.getEmpty().add(f,bCt);s.set(c.bracketText,new wM(d,1,f,m,Kye.create(d,c,m)))}for(const c of e.bracketsNew.closingBrackets){const d=U_(0,c.bracketText.length);let f=jC.getEmpty();const m=c.getOpeningBrackets();for(const v of m)f=f.add(n(v),bCt);s.set(c.bracketText,new wM(d,2,n(m[0]),f,Kye.create(d,c,f)))}return new _Je(s)}constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{const e=[...this.map.keys()];return e.sort(),e.reverse(),e.map(i=>bvi(i)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[i,n]of this.map)if(n.kind===2&&n.bracketIds.intersects(e))return i}get isEmpty(){return this.map.size===0}}function bvi(l){let e=Tw(l);return/^[\w ]+/.test(l)&&(e=`\\b${e}`),/[\w ]+$/.test(l)&&(e=`${e}\\b`),e}class QDt{constructor(e,i){this.denseKeyProvider=e,this.getLanguageConfiguration=i,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let i=this.languageIdToBracketTokens.get(e);return i||(i=_Je.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,i)),i}}function Cvi(l){if(l.length===0)return null;if(l.length===1)return l[0];let e=0;function i(){if(e>=l.length)return null;const d=e,f=l[d].listHeight;for(e++;e<l.length&&l[e].listHeight===f;)e++;return e-d>=2?ZDt(d===0&&e===l.length?l:l.slice(d,e),!1):l[d]}let n=i(),s=i();if(!s)return n;for(let d=i();d;d=i())CCt(n,s)<=CCt(s,d)?(n=qFe(n,s),s=d):s=qFe(s,d);return qFe(n,s)}function ZDt(l,e=!1){if(l.length===0)return null;if(l.length===1)return l[0];let i=l.length;for(;i>3;){const n=i>>1;for(let s=0;s<n;s++){const c=s<<1;l[s]=AL.create23(l[c],l[c+1],c+3===i?l[c+2]:null,e)}i=n}return AL.create23(l[0],l[1],i>=3?l[2]:null,e)}function CCt(l,e){return Math.abs(l.listHeight-e.listHeight)}function qFe(l,e){return l.listHeight===e.listHeight?AL.create23(l,e,null,!1):l.listHeight>e.listHeight?Svi(l,e):wvi(e,l)}function Svi(l,e){l=l.toMutable();let i=l;const n=[];let s;for(;;){if(e.listHeight===i.listHeight){s=e;break}if(i.kind!==4)throw new Error("unexpected");n.push(i),i=i.makeLastElementMutable()}for(let c=n.length-1;c>=0;c--){const d=n[c];s?d.childrenLength>=3?s=AL.create23(d.unappendChild(),s,null,!1):(d.appendChildOfSameHeight(s),s=void 0):d.handleChildrenChanged()}return s?AL.create23(l,s,null,!1):l}function wvi(l,e){l=l.toMutable();let i=l;const n=[];for(;e.listHeight!==i.listHeight;){if(i.kind!==4)throw new Error("unexpected");n.push(i),i=i.makeFirstElementMutable()}let s=e;for(let c=n.length-1;c>=0;c--){const d=n[c];s?d.childrenLength>=3?s=AL.create23(s,d.unprependChild(),null,!1):(d.prependChildOfSameHeight(s),s=void 0):d.handleChildrenChanged()}return s?AL.create23(s,l,null,!1):l}class xvi{constructor(e){this.lastOffset=pv,this.nextNodes=[e],this.offsets=[pv],this.idxs=[]}readLongestNodeAt(e,i){if(Xq(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const n=Fte(this.nextNodes);if(!n)return;const s=Fte(this.offsets);if(Xq(e,s))return;if(Xq(s,e))if(Fh(s,n.length)<=e)this.nextNodeAfterCurrent();else{const c=$Fe(n);c!==-1?(this.nextNodes.push(n.getChild(c)),this.offsets.push(s),this.idxs.push(c)):this.nextNodeAfterCurrent()}else{if(i(n))return this.nextNodeAfterCurrent(),n;{const c=$Fe(n);if(c===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(n.getChild(c)),this.offsets.push(s),this.idxs.push(c)}}}}nextNodeAfterCurrent(){for(;;){const e=Fte(this.offsets),i=Fte(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const n=Fte(this.nextNodes),s=$Fe(n,this.idxs[this.idxs.length-1]);if(s!==-1){this.nextNodes.push(n.getChild(s)),this.offsets.push(Fh(e,i.length)),this.idxs[this.idxs.length-1]=s;break}else this.idxs.pop()}}}function $Fe(l,e=-1){for(;;){if(e++,e>=l.childrenLength)return-1;if(l.getChild(e))return e}}function Fte(l){return l.length>0?l[l.length-1]:void 0}function tHe(l,e,i,n){return new kvi(l,e,i,n).parseDocument()}class kvi{constructor(e,i,n,s){if(this.tokenizer=e,this.createImmutableLists=s,this._itemsConstructed=0,this._itemsFromCache=0,n&&s)throw new Error("Not supported");this.oldNodeReader=n?new xvi(n):void 0,this.positionMapper=new hvi(i)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(jC.getEmpty(),0);return e||(e=AL.getEmpty()),e}parseList(e,i){const n=[];for(;;){let c=this.tryReadChildFromCache(e);if(!c){const d=this.tokenizer.peek();if(!d||d.kind===2&&d.bracketIds.intersects(e))break;c=this.parseChild(e,i+1)}c.kind===4&&c.childrenLength===0||n.push(c)}return this.oldNodeReader?Cvi(n):ZDt(n,this.createImmutableLists)}tryReadChildFromCache(e){if(this.oldNodeReader){const i=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(i===null||!Jye(i)){const n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),s=>i!==null&&!Xq(s.length,i)?!1:s.canBeReused(e));if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}}parseChild(e,i){this._itemsConstructed++;const n=this.tokenizer.read();switch(n.kind){case 2:return new gvi(n.bracketIds,n.length);case 0:return n.astNode;case 1:{if(i>300)return new jF(n.length);const s=e.merge(n.bracketIds),c=this.parseList(s,i+1),d=this.tokenizer.peek();return d&&d.kind===2&&(d.bracketId===n.bracketId||d.bracketIds.intersects(n.bracketIds))?(this.tokenizer.read(),ure.create(n.astNode,c,d.astNode)):ure.create(n.astNode,c,null)}default:throw new Error("unexpected")}}}function Xye(l,e){if(l.length===0)return e;if(e.length===0)return l;const i=new s6(SCt(l)),n=SCt(e);n.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let s=i.dequeue();function c(v){if(v===void 0){const w=i.takeWhile(I=>!0)||[];return s&&w.unshift(s),w}const x=[];for(;s&&!Jye(v);){const[w,I]=s.splitAt(v);x.push(w),v=lre(w.lengthAfter,v),s=I??i.dequeue()}return Jye(v)||x.push(new FM(!1,v,v)),x}const d=[];function f(v,x,w){if(d.length>0&&GDt(d[d.length-1].endOffset,v)){const I=d[d.length-1];d[d.length-1]=new j4(I.startOffset,x,Fh(I.newLength,w))}else d.push({startOffset:v,endOffset:x,newLength:w})}let m=pv;for(const v of n){const x=c(v.lengthBefore);if(v.modified){const w=dvi(x,P=>P.lengthBefore),I=Fh(m,w);f(m,I,v.lengthAfter),m=I}else for(const w of x){const I=m;m=Fh(m,w.lengthBefore),w.modified&&f(I,m,w.lengthAfter)}}return d}class FM{constructor(e,i,n){this.modified=e,this.lengthBefore=i,this.lengthAfter=n}splitAt(e){const i=lre(e,this.lengthAfter);return GDt(i,pv)?[this,void 0]:this.modified?[new FM(this.modified,this.lengthBefore,e),new FM(this.modified,pv,i)]:[new FM(this.modified,e,e),new FM(this.modified,i,i)]}toString(){return`${this.modified?"M":"U"}:${yk(this.lengthBefore)} -> ${yk(this.lengthAfter)}`}}function SCt(l){const e=[];let i=pv;for(const n of l){const s=lre(i,n.startOffset);Jye(s)||e.push(new FM(!1,s,s));const c=lre(n.startOffset,n.endOffset);e.push(new FM(!0,c,n.newLength)),i=n.endOffset}return e}class Tvi extends xi{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,i){if(super(),this.textModel=e,this.getLanguageConfiguration=i,this.didChangeEmitter=new gi,this.denseKeyProvider=new KDt,this.brackets=new QDt(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)e.tokenization.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const n=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),s=new vvi(this.textModel.getValue(),n);this.initialAstWithoutTokens=tHe(s,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){const e=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const i=e.map(n=>new j4(U_(n.fromLineNumber-1,0),U_(n.toLineNumber,0),U_(n.toLineNumber-n.fromLineNumber+1,0)));this.handleEdits(i,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const i=j4.fromModelContentChanges(e.changes);this.handleEdits(i,!1)}handleEdits(e,i){const n=Xye(this.queuedTextEdits,e);this.queuedTextEdits=n,this.initialAstWithoutTokens&&!i&&(this.queuedTextEditsForInitialAstWithoutTokens=Xye(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,i,n){const s=i,c=new XDt(this.textModel,this.brackets);return tHe(c,e,s,n)}getBracketsInRange(e,i){this.flushQueue();const n=U_(e.startLineNumber-1,e.startColumn-1),s=U_(e.endLineNumber-1,e.endColumn-1);return new u9(c=>{const d=this.initialAstWithoutTokens||this.astWithTokens;iHe(d,pv,d.length,n,s,c,0,0,new Map,i)})}getBracketPairsInRange(e,i){this.flushQueue();const n=lq(e.getStartPosition()),s=lq(e.getEndPosition());return new u9(c=>{const d=this.initialAstWithoutTokens||this.astWithTokens,f=new Dvi(c,i,this.textModel);nHe(d,pv,d.length,n,s,f,0,new Map)})}getFirstBracketAfter(e){this.flushQueue();const i=this.initialAstWithoutTokens||this.astWithTokens;return eEt(i,pv,i.length,lq(e))}getFirstBracketBefore(e){this.flushQueue();const i=this.initialAstWithoutTokens||this.astWithTokens;return YDt(i,pv,i.length,lq(e))}}function YDt(l,e,i,n){if(l.kind===4||l.kind===2){const s=[];for(const c of l.children)i=Fh(e,c.length),s.push({nodeOffsetStart:e,nodeOffsetEnd:i}),e=i;for(let c=s.length-1;c>=0;c--){const{nodeOffsetStart:d,nodeOffsetEnd:f}=s[c];if(Xq(d,n)){const m=YDt(l.children[c],d,f,n);if(m)return m}}return null}else{if(l.kind===3)return null;if(l.kind===1){const s=m9(e,i);return{bracketInfo:l.bracketInfo,range:s}}}return null}function eEt(l,e,i,n){if(l.kind===4||l.kind===2){for(const s of l.children){if(i=Fh(e,s.length),Xq(n,i)){const c=eEt(s,e,i,n);if(c)return c}e=i}return null}else{if(l.kind===3)return null;if(l.kind===1){const s=m9(e,i);return{bracketInfo:l.bracketInfo,range:s}}}return null}function iHe(l,e,i,n,s,c,d,f,m,v,x=!1){if(d>200)return!0;e:for(;;)switch(l.kind){case 4:{const w=l.childrenLength;for(let I=0;I<w;I++){const P=l.getChild(I);if(P){if(i=Fh(e,P.length),Qq(e,s)&&aie(i,n)){if(aie(i,s)){l=P;continue e}if(!iHe(P,e,i,n,s,c,d,0,m,v))return!1}e=i}}return!0}case 2:{const w=!v||!l.closingBracket||l.closingBracket.bracketInfo.closesColorized(l.openingBracket.bracketInfo);let I=0;if(m){let O=m.get(l.openingBracket.text);O===void 0&&(O=0),I=O,w&&(O++,m.set(l.openingBracket.text,O))}const P=l.childrenLength;for(let O=0;O<P;O++){const z=l.getChild(O);if(z){if(i=Fh(e,z.length),Qq(e,s)&&aie(i,n)){if(aie(i,s)&&z.kind!==1){l=z,w?(d++,f=I+1):f=I;continue e}if((w||z.kind!==1||!l.closingBracket)&&!iHe(z,e,i,n,s,c,w?d+1:d,w?I+1:I,m,v,!l.closingBracket))return!1}e=i}}return m==null||m.set(l.openingBracket.text,I),!0}case 3:{const w=m9(e,i);return c(new vCt(w,d-1,0,!0))}case 1:{const w=m9(e,i);return c(new vCt(w,d-1,f-1,x))}case 0:return!0}}class Dvi{constructor(e,i,n){this.push=e,this.includeMinIndentation=i,this.textModel=n}}function nHe(l,e,i,n,s,c,d,f){var v;if(d>200)return!0;let m=!0;if(l.kind===2){let x=0;if(f){let P=f.get(l.openingBracket.text);P===void 0&&(P=0),x=P,P++,f.set(l.openingBracket.text,P)}const w=Fh(e,l.openingBracket.length);let I=-1;if(c.includeMinIndentation&&(I=l.computeMinIndentation(e,c.textModel)),m=c.push(new cvi(m9(e,i),m9(e,w),l.closingBracket?m9(Fh(w,((v=l.child)==null?void 0:v.length)||pv),i):void 0,d,x,l,I)),e=w,m&&l.child){const P=l.child;if(i=Fh(e,P.length),Qq(e,s)&&aie(i,n)&&(m=nHe(P,e,i,n,s,c,d+1,f),!m))return!1}f==null||f.set(l.openingBracket.text,x)}else{let x=e;for(const w of l.children){const I=x;if(x=Fh(x,w.length),Qq(I,s)&&Qq(n,x)&&(m=nHe(w,I,x,n,s,c,d,f),!m))return!1}}return m}class Evi extends xi{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,i){super(),this.textModel=e,this.languageConfigurationService=i,this.bracketPairsTree=this._register(new Fm),this.onDidChangeEmitter=new gi,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1}handleLanguageConfigurationServiceChange(e){var i;(!e.languageId||(i=this.bracketPairsTree.value)!=null&&i.object.didLanguageChange(e.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){var i;(i=this.bracketPairsTree.value)==null||i.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){var e;(e=this.bracketPairsTree.value)==null||e.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var i;(i=this.bracketPairsTree.value)==null||i.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const e=new wn;this.bracketPairsTree.value=Ivi(e.add(new Tvi(this.textModel,i=>this.languageConfigurationService.getLanguageConfiguration(i))),e),e.add(this.bracketPairsTree.value.object.onDidChange(i=>this.onDidChangeEmitter.fire(i))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){var i;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((i=this.bracketPairsTree.value)==null?void 0:i.object.getBracketPairsInRange(e,!1))||u9.empty}getBracketPairsInRangeWithMinIndentation(e){var i;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((i=this.bracketPairsTree.value)==null?void 0:i.object.getBracketPairsInRange(e,!0))||u9.empty}getBracketsInRange(e,i=!1){var n;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((n=this.bracketPairsTree.value)==null?void 0:n.object.getBracketsInRange(e,i))||u9.empty}findMatchingBracketUp(e,i,n){const s=this.textModel.validatePosition(i),c=this.textModel.getLanguageIdAtPosition(s.lineNumber,s.column);if(this.canBuildAST){const d=this.languageConfigurationService.getLanguageConfiguration(c).bracketsNew.getClosingBracketInfo(e);if(!d)return null;const f=this.getBracketPairsInRange(nt.fromPositions(i,i)).findLast(m=>d.closes(m.openingBracketInfo));return f?f.openingBracketRange:null}else{const d=e.toLowerCase(),f=this.languageConfigurationService.getLanguageConfiguration(c).brackets;if(!f)return null;const m=f.textIsBracket[d];return m?f0e(this._findMatchingBracketUp(m,s,JFe(n))):null}}matchBracket(e,i){if(this.canBuildAST){const n=this.getBracketPairsInRange(nt.fromPositions(e,e)).filter(s=>s.closingBracketRange!==void 0&&(s.openingBracketRange.containsPosition(e)||s.closingBracketRange.containsPosition(e))).findLastMaxBy(yv(s=>s.openingBracketRange.containsPosition(e)?s.openingBracketRange:s.closingBracketRange,nt.compareRangesUsingStarts));return n?[n.openingBracketRange,n.closingBracketRange]:null}else{const n=JFe(i);return this._matchBracket(this.textModel.validatePosition(e),n)}}_establishBracketSearchOffsets(e,i,n,s){const c=i.getCount(),d=i.getLanguageId(s);let f=Math.max(0,e.column-1-n.maxBracketLength);for(let v=s-1;v>=0;v--){const x=i.getEndOffset(v);if(x<=f)break;if(ZN(i.getStandardTokenType(v))||i.getLanguageId(v)!==d){f=x;break}}let m=Math.min(i.getLineContent().length,e.column-1+n.maxBracketLength);for(let v=s+1;v<c;v++){const x=i.getStartOffset(v);if(x>=m)break;if(ZN(i.getStandardTokenType(v))||i.getLanguageId(v)!==d){m=x;break}}return{searchStartOffset:f,searchEndOffset:m}}_matchBracket(e,i){const n=e.lineNumber,s=this.textModel.tokenization.getLineTokens(n),c=this.textModel.getLineContent(n),d=s.findTokenIndexAtOffset(e.column-1);if(d<0)return null;const f=this.languageConfigurationService.getLanguageConfiguration(s.getLanguageId(d)).brackets;if(f&&!ZN(s.getStandardTokenType(d))){let{searchStartOffset:m,searchEndOffset:v}=this._establishBracketSearchOffsets(e,s,f,d),x=null;for(;;){const w=iT.findNextBracketInRange(f.forwardRegex,n,c,m,v);if(!w)break;if(w.startColumn<=e.column&&e.column<=w.endColumn){const I=c.substring(w.startColumn-1,w.endColumn-1).toLowerCase(),P=this._matchFoundBracket(w,f.textIsBracket[I],f.textIsOpenBracket[I],i);if(P){if(P instanceof I4)return null;x=P}}m=w.endColumn-1}if(x)return x}if(d>0&&s.getStartOffset(d)===e.column-1){const m=d-1,v=this.languageConfigurationService.getLanguageConfiguration(s.getLanguageId(m)).brackets;if(v&&!ZN(s.getStandardTokenType(m))){const{searchStartOffset:x,searchEndOffset:w}=this._establishBracketSearchOffsets(e,s,v,m),I=iT.findPrevBracketInRange(v.reversedRegex,n,c,x,w);if(I&&I.startColumn<=e.column&&e.column<=I.endColumn){const P=c.substring(I.startColumn-1,I.endColumn-1).toLowerCase(),O=this._matchFoundBracket(I,v.textIsBracket[P],v.textIsOpenBracket[P],i);if(O)return O instanceof I4?null:O}}}return null}_matchFoundBracket(e,i,n,s){if(!i)return null;const c=n?this._findMatchingBracketDown(i,e.getEndPosition(),s):this._findMatchingBracketUp(i,e.getStartPosition(),s);return c?c instanceof I4?c:[e,c]:null}_findMatchingBracketUp(e,i,n){const s=e.languageId,c=e.reversedRegex;let d=-1,f=0;const m=(v,x,w,I)=>{for(;;){if(n&&++f%100===0&&!n())return I4.INSTANCE;const P=iT.findPrevBracketInRange(c,v,x,w,I);if(!P)break;const O=x.substring(P.startColumn-1,P.endColumn-1).toLowerCase();if(e.isOpen(O)?d++:e.isClose(O)&&d--,d===0)return P;I=P.startColumn-1}return null};for(let v=i.lineNumber;v>=1;v--){const x=this.textModel.tokenization.getLineTokens(v),w=x.getCount(),I=this.textModel.getLineContent(v);let P=w-1,O=I.length,z=I.length;v===i.lineNumber&&(P=x.findTokenIndexAtOffset(i.column-1),O=i.column-1,z=i.column-1);let J=!0;for(;P>=0;P--){const Y=x.getLanguageId(P)===s&&!ZN(x.getStandardTokenType(P));if(Y)J?O=x.getStartOffset(P):(O=x.getStartOffset(P),z=x.getEndOffset(P));else if(J&&O!==z){const ae=m(v,I,O,z);if(ae)return ae}J=Y}if(J&&O!==z){const Y=m(v,I,O,z);if(Y)return Y}}return null}_findMatchingBracketDown(e,i,n){const s=e.languageId,c=e.forwardRegex;let d=1,f=0;const m=(x,w,I,P)=>{for(;;){if(n&&++f%100===0&&!n())return I4.INSTANCE;const O=iT.findNextBracketInRange(c,x,w,I,P);if(!O)break;const z=w.substring(O.startColumn-1,O.endColumn-1).toLowerCase();if(e.isOpen(z)?d++:e.isClose(z)&&d--,d===0)return O;I=O.endColumn-1}return null},v=this.textModel.getLineCount();for(let x=i.lineNumber;x<=v;x++){const w=this.textModel.tokenization.getLineTokens(x),I=w.getCount(),P=this.textModel.getLineContent(x);let O=0,z=0,J=0;x===i.lineNumber&&(O=w.findTokenIndexAtOffset(i.column-1),z=i.column-1,J=i.column-1);let Y=!0;for(;O<I;O++){const ae=w.getLanguageId(O)===s&&!ZN(w.getStandardTokenType(O));if(ae)Y||(z=w.getStartOffset(O)),J=w.getEndOffset(O);else if(Y&&z!==J){const me=m(x,P,z,J);if(me)return me}Y=ae}if(Y&&z!==J){const ae=m(x,P,z,J);if(ae)return ae}}return null}findPrevBracket(e){var d;const i=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((d=this.bracketPairsTree.value)==null?void 0:d.object.getFirstBracketBefore(i))||null;let n=null,s=null,c=null;for(let f=i.lineNumber;f>=1;f--){const m=this.textModel.tokenization.getLineTokens(f),v=m.getCount(),x=this.textModel.getLineContent(f);let w=v-1,I=x.length,P=x.length;if(f===i.lineNumber){w=m.findTokenIndexAtOffset(i.column-1),I=i.column-1,P=i.column-1;const z=m.getLanguageId(w);n!==z&&(n=z,s=this.languageConfigurationService.getLanguageConfiguration(n).brackets,c=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let O=!0;for(;w>=0;w--){const z=m.getLanguageId(w);if(n!==z){if(s&&c&&O&&I!==P){const Y=iT.findPrevBracketInRange(s.reversedRegex,f,x,I,P);if(Y)return this._toFoundBracket(c,Y);O=!1}n=z,s=this.languageConfigurationService.getLanguageConfiguration(n).brackets,c=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew}const J=!!s&&!ZN(m.getStandardTokenType(w));if(J)O?I=m.getStartOffset(w):(I=m.getStartOffset(w),P=m.getEndOffset(w));else if(c&&s&&O&&I!==P){const Y=iT.findPrevBracketInRange(s.reversedRegex,f,x,I,P);if(Y)return this._toFoundBracket(c,Y)}O=J}if(c&&s&&O&&I!==P){const z=iT.findPrevBracketInRange(s.reversedRegex,f,x,I,P);if(z)return this._toFoundBracket(c,z)}}return null}findNextBracket(e){var f;const i=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((f=this.bracketPairsTree.value)==null?void 0:f.object.getFirstBracketAfter(i))||null;const n=this.textModel.getLineCount();let s=null,c=null,d=null;for(let m=i.lineNumber;m<=n;m++){const v=this.textModel.tokenization.getLineTokens(m),x=v.getCount(),w=this.textModel.getLineContent(m);let I=0,P=0,O=0;if(m===i.lineNumber){I=v.findTokenIndexAtOffset(i.column-1),P=i.column-1,O=i.column-1;const J=v.getLanguageId(I);s!==J&&(s=J,c=this.languageConfigurationService.getLanguageConfiguration(s).brackets,d=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew)}let z=!0;for(;I<x;I++){const J=v.getLanguageId(I);if(s!==J){if(d&&c&&z&&P!==O){const ae=iT.findNextBracketInRange(c.forwardRegex,m,w,P,O);if(ae)return this._toFoundBracket(d,ae);z=!1}s=J,c=this.languageConfigurationService.getLanguageConfiguration(s).brackets,d=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew}const Y=!!c&&!ZN(v.getStandardTokenType(I));if(Y)z||(P=v.getStartOffset(I)),O=v.getEndOffset(I);else if(d&&c&&z&&P!==O){const ae=iT.findNextBracketInRange(c.forwardRegex,m,w,P,O);if(ae)return this._toFoundBracket(d,ae)}z=Y}if(d&&c&&z&&P!==O){const J=iT.findNextBracketInRange(c.forwardRegex,m,w,P,O);if(J)return this._toFoundBracket(d,J)}}return null}findEnclosingBrackets(e,i){const n=this.textModel.validatePosition(e);if(this.canBuildAST){const P=nt.fromPositions(n),O=this.getBracketPairsInRange(nt.fromPositions(n,n)).findLast(z=>z.closingBracketRange!==void 0&&z.range.strictContainsRange(P));return O?[O.openingBracketRange,O.closingBracketRange]:null}const s=JFe(i),c=this.textModel.getLineCount(),d=new Map;let f=[];const m=(P,O)=>{if(!d.has(P)){const z=[];for(let J=0,Y=O?O.brackets.length:0;J<Y;J++)z[J]=0;d.set(P,z)}f=d.get(P)};let v=0;const x=(P,O,z,J,Y)=>{for(;;){if(s&&++v%100===0&&!s())return I4.INSTANCE;const ae=iT.findNextBracketInRange(P.forwardRegex,O,z,J,Y);if(!ae)break;const me=z.substring(ae.startColumn-1,ae.endColumn-1).toLowerCase(),ye=P.textIsBracket[me];if(ye&&(ye.isOpen(me)?f[ye.index]++:ye.isClose(me)&&f[ye.index]--,f[ye.index]===-1))return this._matchFoundBracket(ae,ye,!1,s);J=ae.endColumn-1}return null};let w=null,I=null;for(let P=n.lineNumber;P<=c;P++){const O=this.textModel.tokenization.getLineTokens(P),z=O.getCount(),J=this.textModel.getLineContent(P);let Y=0,ae=0,me=0;if(P===n.lineNumber){Y=O.findTokenIndexAtOffset(n.column-1),ae=n.column-1,me=n.column-1;const Ce=O.getLanguageId(Y);w!==Ce&&(w=Ce,I=this.languageConfigurationService.getLanguageConfiguration(w).brackets,m(w,I))}let ye=!0;for(;Y<z;Y++){const Ce=O.getLanguageId(Y);if(w!==Ce){if(I&&ye&&ae!==me){const rt=x(I,P,J,ae,me);if(rt)return f0e(rt);ye=!1}w=Ce,I=this.languageConfigurationService.getLanguageConfiguration(w).brackets,m(w,I)}const Fe=!!I&&!ZN(O.getStandardTokenType(Y));if(Fe)ye||(ae=O.getStartOffset(Y)),me=O.getEndOffset(Y);else if(I&&ye&&ae!==me){const rt=x(I,P,J,ae,me);if(rt)return f0e(rt)}ye=Fe}if(I&&ye&&ae!==me){const Ce=x(I,P,J,ae,me);if(Ce)return f0e(Ce)}}return null}_toFoundBracket(e,i){if(!i)return null;let n=this.textModel.getValueInRange(i);n=n.toLowerCase();const s=e.getBracketInfo(n);return s?{range:i,bracketInfo:s}:null}}function Ivi(l,e){return{object:l,dispose:()=>e==null?void 0:e.dispose()}}function JFe(l){if(typeof l>"u")return()=>!0;{const e=Date.now();return()=>Date.now()-e<=l}}const cCe=class cCe{constructor(){this._searchCanceledBrand=void 0}};cCe.INSTANCE=new cCe;let I4=cCe;function f0e(l){return l instanceof I4?null:l}class Nvi extends xi{constructor(e){super(),this.textModel=e,this.colorProvider=new tEt,this.onDidChangeEmitter=new gi,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange(i=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,i,n,s){return s?[]:i===void 0?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(e,!0).map(d=>({id:`bracket${d.range.toString()}-${d.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(d,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:d.range})).toArray():[]}getAllDecorations(e,i){return e===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new nt(1,1,this.textModel.getLineCount(),1),e,i):[]}}class tEt{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,i){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(i?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return`bracket-highlighting-${e%30}`}}Dk((l,e)=>{const i=[jDt,zDt,UDt,qDt,$Dt,JDt],n=new tEt;e.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${l.getColor(zyi)}; }`);const s=i.map(c=>l.getColor(c)).filter(c=>!!c).filter(c=>!c.isTransparent());for(let c=0;c<30;c++){const d=s[c%s.length];e.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(c)} { color: ${d}; }`)}});function h0e(l){return l.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class x0{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,i,n,s){this.oldPosition=e,this.oldText=i,this.newPosition=n,this.newText=s}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${h0e(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${h0e(this.oldText)}")`:`(replace@${this.oldPosition} "${h0e(this.oldText)}" with "${h0e(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,i,n){const s=i.length;yE(e,s,n),n+=4;for(let c=0;c<s;c++)yfi(e,i.charCodeAt(c),n),n+=2;return n}static _readString(e,i){const n=gE(e,i);return i+=4,bfi(e,i,n)}writeSize(){return 8+x0._writeStringSize(this.oldText)+x0._writeStringSize(this.newText)}write(e,i){return yE(e,this.oldPosition,i),i+=4,yE(e,this.newPosition,i),i+=4,i=x0._writeString(e,this.oldText,i),i=x0._writeString(e,this.newText,i),i}static read(e,i,n){const s=gE(e,i);i+=4;const c=gE(e,i);i+=4;const d=x0._readString(e,i);i+=x0._writeStringSize(d);const f=x0._readString(e,i);return i+=x0._writeStringSize(f),n.push(new x0(s,d,c,f)),i}}function Lvi(l,e){return l===null||l.length===0?e:new iL(l,e).compress()}class iL{constructor(e,i){this._prevEdits=e,this._currEdits=i,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let e=0,i=0,n=this._getPrev(e),s=this._getCurr(i);for(;e<this._prevLen||i<this._currLen;){if(n===null){this._acceptCurr(s),s=this._getCurr(++i);continue}if(s===null){this._acceptPrev(n),n=this._getPrev(++e);continue}if(s.oldEnd<=n.newPosition){this._acceptCurr(s),s=this._getCurr(++i);continue}if(n.newEnd<=s.oldPosition){this._acceptPrev(n),n=this._getPrev(++e);continue}if(s.oldPosition<n.newPosition){const[v,x]=iL._splitCurr(s,n.newPosition-s.oldPosition);this._acceptCurr(v),s=x;continue}if(n.newPosition<s.oldPosition){const[v,x]=iL._splitPrev(n,s.oldPosition-n.newPosition);this._acceptPrev(v),n=x;continue}let f,m;if(s.oldEnd===n.newEnd)f=n,m=s,n=this._getPrev(++e),s=this._getCurr(++i);else if(s.oldEnd<n.newEnd){const[v,x]=iL._splitPrev(n,s.oldLength);f=v,m=s,n=x,s=this._getCurr(++i)}else{const[v,x]=iL._splitCurr(s,n.newLength);f=n,m=v,n=this._getPrev(++e),s=x}this._result[this._resultLen++]=new x0(f.oldPosition,f.oldText,m.newPosition,m.newText),this._prevDeltaOffset+=f.newLength-f.oldLength,this._currDeltaOffset+=m.newLength-m.oldLength}const c=iL._merge(this._result);return iL._removeNoOps(c)}_acceptCurr(e){this._result[this._resultLen++]=iL._rebaseCurr(this._prevDeltaOffset,e),this._currDeltaOffset+=e.newLength-e.oldLength}_getCurr(e){return e<this._currLen?this._currEdits[e]:null}_acceptPrev(e){this._result[this._resultLen++]=iL._rebasePrev(this._currDeltaOffset,e),this._prevDeltaOffset+=e.newLength-e.oldLength}_getPrev(e){return e<this._prevLen?this._prevEdits[e]:null}static _rebaseCurr(e,i){return new x0(i.oldPosition-e,i.oldText,i.newPosition,i.newText)}static _rebasePrev(e,i){return new x0(i.oldPosition,i.oldText,i.newPosition+e,i.newText)}static _splitPrev(e,i){const n=e.newText.substr(0,i),s=e.newText.substr(i);return[new x0(e.oldPosition,e.oldText,e.newPosition,n),new x0(e.oldEnd,"",e.newPosition+i,s)]}static _splitCurr(e,i){const n=e.oldText.substr(0,i),s=e.oldText.substr(i);return[new x0(e.oldPosition,n,e.newPosition,e.newText),new x0(e.oldPosition+i,s,e.newEnd,"")]}static _merge(e){if(e.length===0)return e;const i=[];let n=0,s=e[0];for(let c=1;c<e.length;c++){const d=e[c];s.oldEnd===d.oldPosition?s=new x0(s.oldPosition,s.oldText+d.oldText,s.newPosition,s.newText+d.newText):(i[n++]=s,s=d)}return i[n++]=s,i}static _removeNoOps(e){if(e.length===0)return e;const i=[];let n=0;for(let s=0;s<e.length;s++){const c=e[s];c.oldText!==c.newText&&(i[n++]=c)}return i}}function EU(l){return l.toString()}class _g{static create(e,i){const n=e.getAlternativeVersionId(),s=rHe(e);return new _g(n,n,s,s,i,i,[])}constructor(e,i,n,s,c,d,f){this.beforeVersionId=e,this.afterVersionId=i,this.beforeEOL=n,this.afterEOL=s,this.beforeCursorState=c,this.afterCursorState=d,this.changes=f}append(e,i,n,s,c){i.length>0&&(this.changes=Lvi(this.changes,i)),this.afterEOL=n,this.afterVersionId=s,this.afterCursorState=c}static _writeSelectionsSize(e){return 4+4*4*(e?e.length:0)}static _writeSelections(e,i,n){if(yE(e,i?i.length:0,n),n+=4,i)for(const s of i)yE(e,s.selectionStartLineNumber,n),n+=4,yE(e,s.selectionStartColumn,n),n+=4,yE(e,s.positionLineNumber,n),n+=4,yE(e,s.positionColumn,n),n+=4;return n}static _readSelections(e,i,n){const s=gE(e,i);i+=4;for(let c=0;c<s;c++){const d=gE(e,i);i+=4;const f=gE(e,i);i+=4;const m=gE(e,i);i+=4;const v=gE(e,i);i+=4,n.push(new Us(d,f,m,v))}return i}serialize(){let e=10+_g._writeSelectionsSize(this.beforeCursorState)+_g._writeSelectionsSize(this.afterCursorState)+4;for(const s of this.changes)e+=s.writeSize();const i=new Uint8Array(e);let n=0;yE(i,this.beforeVersionId,n),n+=4,yE(i,this.afterVersionId,n),n+=4,kvt(i,this.beforeEOL,n),n+=1,kvt(i,this.afterEOL,n),n+=1,n=_g._writeSelections(i,this.beforeCursorState,n),n=_g._writeSelections(i,this.afterCursorState,n),yE(i,this.changes.length,n),n+=4;for(const s of this.changes)n=s.write(i,n);return i.buffer}static deserialize(e){const i=new Uint8Array(e);let n=0;const s=gE(i,n);n+=4;const c=gE(i,n);n+=4;const d=xvt(i,n);n+=1;const f=xvt(i,n);n+=1;const m=[];n=_g._readSelections(i,n,m);const v=[];n=_g._readSelections(i,n,v);const x=gE(i,n);n+=4;const w=[];for(let I=0;I<x;I++)n=x0.read(i,n,w);return new _g(s,c,d,f,m,v,w)}}class iEt{get type(){return 0}get resource(){return yo.isUri(this.model)?this.model:this.model.uri}constructor(e,i,n,s){this.label=e,this.code=i,this.model=n,this._data=_g.create(n,s)}toString(){return(this._data instanceof _g?this._data:_g.deserialize(this._data)).changes.map(i=>i.toString()).join(", ")}matchesResource(e){return(yo.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof _g}append(e,i,n,s,c){this._data instanceof _g&&this._data.append(e,i,n,s,c)}close(){this._data instanceof _g&&(this._data=this._data.serialize())}open(){this._data instanceof _g||(this._data=_g.deserialize(this._data))}undo(){if(yo.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof _g&&(this._data=this._data.serialize());const e=_g.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(yo.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof _g&&(this._data=this._data.serialize());const e=_g.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof _g&&(this._data=this._data.serialize()),this._data.byteLength+168}}class Pvi{get resources(){return this._editStackElementsArr.map(e=>e.resource)}constructor(e,i,n){this.label=e,this.code=i,this.type=1,this._isOpen=!0,this._editStackElementsArr=n.slice(0),this._editStackElementsMap=new Map;for(const s of this._editStackElementsArr){const c=EU(s.resource);this._editStackElementsMap.set(c,s)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const i=EU(e);return this._editStackElementsMap.has(i)}setModel(e){const i=EU(yo.isUri(e)?e:e.uri);this._editStackElementsMap.has(i)&&this._editStackElementsMap.get(i).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const i=EU(e.uri);return this._editStackElementsMap.has(i)?this._editStackElementsMap.get(i).canAppend(e):!1}append(e,i,n,s,c){const d=EU(e.uri);this._editStackElementsMap.get(d).append(e,i,n,s,c)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const i=EU(e);return this._editStackElementsMap.has(i)?this._editStackElementsMap.get(i).heapSize():0}split(){return this._editStackElementsArr}toString(){const e=[];for(const i of this._editStackElementsArr)e.push(`${wk(i.resource)}: ${i}`);return`{${e.join(", ")}}`}}function rHe(l){return l.getEOL()===`
+`?0:1}function N4(l){return l?l instanceof iEt||l instanceof Pvi:!1}class pJe{constructor(e,i){this._model=e,this._undoRedoService=i}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);N4(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);N4(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,i){const n=this._undoRedoService.getLastElement(this._model.uri);if(N4(n)&&n.canAppend(this._model))return n;const s=new iEt(W("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(s,i),s}pushEOL(e){const i=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),i.append(this._model,[],rHe(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,i,n,s){const c=this._getOrCreateEditStackElement(e,s),d=this._model.applyEdits(i,!0),f=pJe._computeCursorState(n,d),m=d.map((v,x)=>({index:x,textChange:v.textChange}));return m.sort((v,x)=>v.textChange.oldPosition===x.textChange.oldPosition?v.index-x.index:v.textChange.oldPosition-x.textChange.oldPosition),c.append(this._model,m.map(v=>v.textChange),rHe(this._model),this._model.getAlternativeVersionId(),f),f}static _computeCursorState(e,i){try{return e?e(i):null}catch(n){return Pa(n),null}}}class nEt extends xi{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}function Cwe(l,e){let i=0,n=0;const s=l.length;for(;n<s;){const c=l.charCodeAt(n);if(c===32)i++;else if(c===9)i=i-i%e+e;else break;n++}return n===s?-1:i}var g9;(function(l){l[l.Disabled=0]="Disabled",l[l.EnabledForActive=1]="EnabledForActive",l[l.Enabled=2]="Enabled"})(g9||(g9={}));class s9{constructor(e,i,n,s,c,d){if(this.visibleColumn=e,this.column=i,this.className=n,this.horizontalLine=s,this.forWrappedLinesAfterColumn=c,this.forWrappedLinesBeforeOrAtColumn=d,e!==-1==(i!==-1))throw new Error}}class Pie{constructor(e,i){this.top=e,this.endColumn=i}}class Avi extends nEt{constructor(e,i){super(),this.textModel=e,this.languageConfigurationService=i}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return Cwe(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,i,n){this.assertNotDisposed();const s=this.textModel.getLineCount();if(e<1||e>s)throw new tu("Illegal value for lineNumber");const c=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,d=!!(c&&c.offSide);let f=-2,m=-1,v=-2,x=-1;const w=rt=>{if(f!==-1&&(f===-2||f>rt-1)){f=-1,m=-1;for(let ct=rt-2;ct>=0;ct--){const Mt=this._computeIndentLevel(ct);if(Mt>=0){f=ct,m=Mt;break}}}if(v===-2){v=-1,x=-1;for(let ct=rt;ct<s;ct++){const Mt=this._computeIndentLevel(ct);if(Mt>=0){v=ct,x=Mt;break}}}};let I=-2,P=-1,O=-2,z=-1;const J=rt=>{if(I===-2){I=-1,P=-1;for(let ct=rt-2;ct>=0;ct--){const Mt=this._computeIndentLevel(ct);if(Mt>=0){I=ct,P=Mt;break}}}if(O!==-1&&(O===-2||O<rt-1)){O=-1,z=-1;for(let ct=rt;ct<s;ct++){const Mt=this._computeIndentLevel(ct);if(Mt>=0){O=ct,z=Mt;break}}}};let Y=0,ae=!0,me=0,ye=!0,Ce=0,Fe=0;for(let rt=0;ae||ye;rt++){const ct=e-rt,Mt=e+rt;rt>1&&(ct<1||ct<i)&&(ae=!1),rt>1&&(Mt>s||Mt>n)&&(ye=!1),rt>5e4&&(ae=!1,ye=!1);let Yt=-1;if(ae&&ct>=1){const $i=this._computeIndentLevel(ct-1);$i>=0?(v=ct-1,x=$i,Yt=Math.ceil($i/this.textModel.getOptions().indentSize)):(w(ct),Yt=this._getIndentLevelForWhitespaceLine(d,m,x))}let Bi=-1;if(ye&&Mt<=s){const $i=this._computeIndentLevel(Mt-1);$i>=0?(I=Mt-1,P=$i,Bi=Math.ceil($i/this.textModel.getOptions().indentSize)):(J(Mt),Bi=this._getIndentLevelForWhitespaceLine(d,P,z))}if(rt===0){Fe=Yt;continue}if(rt===1){if(Mt<=s&&Bi>=0&&Fe+1===Bi){ae=!1,Y=Mt,me=Mt,Ce=Bi;continue}if(ct>=1&&Yt>=0&&Yt-1===Fe){ye=!1,Y=ct,me=ct,Ce=Yt;continue}if(Y=e,me=e,Ce=Fe,Ce===0)return{startLineNumber:Y,endLineNumber:me,indent:Ce}}ae&&(Yt>=Ce?Y=ct:ae=!1),ye&&(Bi>=Ce?me=Mt:ye=!1)}return{startLineNumber:Y,endLineNumber:me,indent:Ce}}getLinesBracketGuides(e,i,n,s){var w;const c=[];for(let I=e;I<=i;I++)c.push([]);const d=!0,f=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new nt(e,1,i,this.textModel.getLineMaxColumn(i))).toArray();let m;if(n&&f.length>0){const I=(e<=n.lineNumber&&n.lineNumber<=i?f:this.textModel.bracketPairs.getBracketPairsInRange(nt.fromPositions(n)).toArray()).filter(P=>nt.strictContainsPosition(P.range,n));m=(w=jne(I,P=>d))==null?void 0:w.range}const v=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,x=new rEt;for(const I of f){if(!I.closingBracketRange)continue;const P=m&&I.range.equalsRange(m);if(!P&&!s.includeInactive)continue;const O=x.getInlineClassName(I.nestingLevel,I.nestingLevelOfEqualBracketType,v)+(s.highlightActive&&P?" "+x.activeClassName:""),z=I.openingBracketRange.getStartPosition(),J=I.closingBracketRange.getStartPosition(),Y=s.horizontalGuides===g9.Enabled||s.horizontalGuides===g9.EnabledForActive&&P;if(I.range.startLineNumber===I.range.endLineNumber){Y&&c[I.range.startLineNumber-e].push(new s9(-1,I.openingBracketRange.getEndPosition().column,O,new Pie(!1,J.column),-1,-1));continue}const ae=this.getVisibleColumnFromPosition(J),me=this.getVisibleColumnFromPosition(I.openingBracketRange.getStartPosition()),ye=Math.min(me,ae,I.minVisibleColumnIndentation+1);let Ce=!1;Ty(this.textModel.getLineContent(I.closingBracketRange.startLineNumber))<I.closingBracketRange.startColumn-1&&(Ce=!0);const ct=Math.max(z.lineNumber,e),Mt=Math.min(J.lineNumber,i),Yt=Ce?1:0;for(let Bi=ct;Bi<Mt+Yt;Bi++)c[Bi-e].push(new s9(ye,-1,O,null,Bi===z.lineNumber?z.column:-1,Bi===J.lineNumber?J.column:-1));Y&&(z.lineNumber>=e&&me>ye&&c[z.lineNumber-e].push(new s9(ye,-1,O,new Pie(!1,z.column),-1,-1)),J.lineNumber<=i&&ae>ye&&c[J.lineNumber-e].push(new s9(ye,-1,O,new Pie(!Ce,J.column),-1,-1)))}for(const I of c)I.sort((P,O)=>P.visibleColumn-O.visibleColumn);return c}getVisibleColumnFromPosition(e){return em.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,i){this.assertNotDisposed();const n=this.textModel.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(i<1||i>n)throw new Error("Illegal value for endLineNumber");const s=this.textModel.getOptions(),c=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,d=!!(c&&c.offSide),f=new Array(i-e+1);let m=-2,v=-1,x=-2,w=-1;for(let I=e;I<=i;I++){const P=I-e,O=this._computeIndentLevel(I-1);if(O>=0){m=I-1,v=O,f[P]=Math.ceil(O/s.indentSize);continue}if(m===-2){m=-1,v=-1;for(let z=I-2;z>=0;z--){const J=this._computeIndentLevel(z);if(J>=0){m=z,v=J;break}}}if(x!==-1&&(x===-2||x<I-1)){x=-1,w=-1;for(let z=I;z<n;z++){const J=this._computeIndentLevel(z);if(J>=0){x=z,w=J;break}}}f[P]=this._getIndentLevelForWhitespaceLine(d,v,w)}return f}_getIndentLevelForWhitespaceLine(e,i,n){const s=this.textModel.getOptions();return i===-1||n===-1?0:i<n?1+Math.floor(i/s.indentSize):i===n||e?Math.ceil(n/s.indentSize):1+Math.floor(n/s.indentSize)}}class rEt{constructor(){this.activeClassName="indent-active"}getInlineClassName(e,i,n){return this.getInlineClassNameOfLevel(n?i:e)}getInlineClassNameOfLevel(e){return`bracket-indent-guide lvl-${e%30}`}}class Ovi{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function Mvi(l,e,i,n,s){s.spacesDiff=0,s.looksLikeAlignment=!1;let c;for(c=0;c<e&&c<n;c++){const I=l.charCodeAt(c),P=i.charCodeAt(c);if(I!==P)break}let d=0,f=0;for(let I=c;I<e;I++)l.charCodeAt(I)===32?d++:f++;let m=0,v=0;for(let I=c;I<n;I++)i.charCodeAt(I)===32?m++:v++;if(d>0&&f>0||m>0&&v>0)return;const x=Math.abs(f-v),w=Math.abs(d-m);if(x===0){s.spacesDiff=w,w>0&&0<=m-1&&m-1<l.length&&m<i.length&&i.charCodeAt(m)!==32&&l.charCodeAt(m-1)===32&&l.charCodeAt(l.length-1)===44&&(s.looksLikeAlignment=!0);return}if(w%x===0){s.spacesDiff=w/x;return}}function wCt(l,e,i){const n=Math.min(l.getLineCount(),1e4);let s=0,c=0,d="",f=0;const m=[2,4,6,8,3,5,7],v=8,x=[0,0,0,0,0,0,0,0,0],w=new Ovi;for(let O=1;O<=n;O++){const z=l.getLineLength(O),J=l.getLineContent(O),Y=z<=65536;let ae=!1,me=0,ye=0,Ce=0;for(let rt=0,ct=z;rt<ct;rt++){const Mt=Y?J.charCodeAt(rt):l.getLineCharCode(O,rt);if(Mt===9)Ce++;else if(Mt===32)ye++;else{ae=!0,me=rt;break}}if(!ae||(Ce>0?s++:ye>1&&c++,Mvi(d,f,J,me,w),w.looksLikeAlignment&&!(i&&e===w.spacesDiff)))continue;const Fe=w.spacesDiff;Fe<=v&&x[Fe]++,d=J,f=me}let I=i;s!==c&&(I=s<c);let P=e;if(I){let O=I?0:.1*n;m.forEach(z=>{const J=x[z];J>O&&(O=J,P=z)}),P===4&&x[4]>0&&x[2]>0&&x[2]>=x[4]/2&&(P=2)}return{insertSpaces:I,tabSize:P}}function Cb(l){return(l.metadata&1)>>>0}function pf(l,e){l.metadata=l.metadata&254|e<<0}function E0(l){return(l.metadata&2)>>>1===1}function tf(l,e){l.metadata=l.metadata&253|(e?1:0)<<1}function sEt(l){return(l.metadata&4)>>>2===1}function xCt(l,e){l.metadata=l.metadata&251|(e?1:0)<<2}function oEt(l){return(l.metadata&64)>>>6===1}function kCt(l,e){l.metadata=l.metadata&191|(e?1:0)<<6}function Rvi(l){return(l.metadata&24)>>>3}function TCt(l,e){l.metadata=l.metadata&231|e<<3}function Fvi(l){return(l.metadata&32)>>>5===1}function DCt(l,e){l.metadata=l.metadata&223|(e?1:0)<<5}class aEt{constructor(e,i,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,pf(this,1),this.start=i,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,xCt(this,!1),kCt(this,!1),TCt(this,1),DCt(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=i,this.cachedAbsoluteEnd=n,this.range=null,tf(this,!1)}reset(e,i,n,s){this.start=i,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=i,this.cachedAbsoluteEnd=n,this.range=s}setOptions(e){this.options=e;const i=this.options.className;xCt(this,i==="squiggly-error"||i==="squiggly-warning"||i==="squiggly-info"),kCt(this,this.options.glyphMarginClassName!==null),TCt(this,this.options.stickiness),DCt(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,i,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=i}detach(){this.parent=null,this.left=null,this.right=null}}const Vc=new aEt(null,0,0);Vc.parent=Vc;Vc.left=Vc;Vc.right=Vc;pf(Vc,0);class GFe{constructor(){this.root=Vc,this.requestNormalizeDelta=!1}intervalSearch(e,i,n,s,c,d){return this.root===Vc?[]:qvi(this,e,i,n,s,c,d)}search(e,i,n,s){return this.root===Vc?[]:Uvi(this,e,i,n,s)}collectNodesFromOwner(e){return jvi(this,e)}collectNodesPostOrder(){return zvi(this)}insert(e){ECt(this,e),this._normalizeDeltaIfNecessary()}delete(e){ICt(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,i){const n=e;let s=0;for(;e!==this.root;)e===e.parent.right&&(s+=e.parent.delta),e=e.parent;const c=n.start+s,d=n.end+s;n.setCachedOffsets(c,d,i)}acceptReplace(e,i,n,s){const c=Vvi(this,e,e+i);for(let d=0,f=c.length;d<f;d++){const m=c[d];ICt(this,m)}this._normalizeDeltaIfNecessary(),Hvi(this,e,e+i,n),this._normalizeDeltaIfNecessary();for(let d=0,f=c.length;d<f;d++){const m=c[d];m.start=m.cachedAbsoluteStart,m.end=m.cachedAbsoluteEnd,Wvi(m,e,e+i,n,s),m.maxEnd=m.end,ECt(this,m)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){this.requestNormalizeDelta&&(this.requestNormalizeDelta=!1,Bvi(this))}}function Bvi(l){let e=l.root,i=0;for(;e!==Vc;){if(e.left!==Vc&&!E0(e.left)){e=e.left;continue}if(e.right!==Vc&&!E0(e.right)){i+=e.delta,e=e.right;continue}e.start=i+e.start,e.end=i+e.end,e.delta=0,DR(e),tf(e,!0),tf(e.left,!1),tf(e.right,!1),e===e.parent.right&&(i-=e.parent.delta),e=e.parent}tf(l.root,!1)}function IU(l,e,i,n){return l<i?!0:l>i||n===1?!1:n===2?!0:e}function Wvi(l,e,i,n,s){const c=Rvi(l),d=c===0||c===2,f=c===1||c===2,m=i-e,v=n,x=Math.min(m,v),w=l.start;let I=!1;const P=l.end;let O=!1;e<=w&&P<=i&&Fvi(l)&&(l.start=e,I=!0,l.end=e,O=!0);{const J=s?1:m>0?2:0;!I&&IU(w,d,e,J)&&(I=!0),!O&&IU(P,f,e,J)&&(O=!0)}if(x>0&&!s){const J=m>v?2:0;!I&&IU(w,d,e+x,J)&&(I=!0),!O&&IU(P,f,e+x,J)&&(O=!0)}{const J=s?1:0;!I&&IU(w,d,i,J)&&(l.start=e+v,I=!0),!O&&IU(P,f,i,J)&&(l.end=e+v,O=!0)}const z=v-m;I||(l.start=Math.max(0,w+z)),O||(l.end=Math.max(0,P+z)),l.start>l.end&&(l.end=l.start)}function Vvi(l,e,i){let n=l.root,s=0,c=0,d=0,f=0;const m=[];let v=0;for(;n!==Vc;){if(E0(n)){tf(n.left,!1),tf(n.right,!1),n===n.parent.right&&(s-=n.parent.delta),n=n.parent;continue}if(!E0(n.left)){if(c=s+n.maxEnd,c<e){tf(n,!0);continue}if(n.left!==Vc){n=n.left;continue}}if(d=s+n.start,d>i){tf(n,!0);continue}if(f=s+n.end,f>=e&&(n.setCachedOffsets(d,f,0),m[v++]=n),tf(n,!0),n.right!==Vc&&!E0(n.right)){s+=n.delta,n=n.right;continue}}return tf(l.root,!1),m}function Hvi(l,e,i,n){let s=l.root,c=0,d=0,f=0;const m=n-(i-e);for(;s!==Vc;){if(E0(s)){tf(s.left,!1),tf(s.right,!1),s===s.parent.right&&(c-=s.parent.delta),DR(s),s=s.parent;continue}if(!E0(s.left)){if(d=c+s.maxEnd,d<e){tf(s,!0);continue}if(s.left!==Vc){s=s.left;continue}}if(f=c+s.start,f>i){s.start+=m,s.end+=m,s.delta+=m,(s.delta<-1073741824||s.delta>1073741824)&&(l.requestNormalizeDelta=!0),tf(s,!0);continue}if(tf(s,!0),s.right!==Vc&&!E0(s.right)){c+=s.delta,s=s.right;continue}}tf(l.root,!1)}function jvi(l,e){let i=l.root;const n=[];let s=0;for(;i!==Vc;){if(E0(i)){tf(i.left,!1),tf(i.right,!1),i=i.parent;continue}if(i.left!==Vc&&!E0(i.left)){i=i.left;continue}if(i.ownerId===e&&(n[s++]=i),tf(i,!0),i.right!==Vc&&!E0(i.right)){i=i.right;continue}}return tf(l.root,!1),n}function zvi(l){let e=l.root;const i=[];let n=0;for(;e!==Vc;){if(E0(e)){tf(e.left,!1),tf(e.right,!1),e=e.parent;continue}if(e.left!==Vc&&!E0(e.left)){e=e.left;continue}if(e.right!==Vc&&!E0(e.right)){e=e.right;continue}i[n++]=e,tf(e,!0)}return tf(l.root,!1),i}function Uvi(l,e,i,n,s){let c=l.root,d=0,f=0,m=0;const v=[];let x=0;for(;c!==Vc;){if(E0(c)){tf(c.left,!1),tf(c.right,!1),c===c.parent.right&&(d-=c.parent.delta),c=c.parent;continue}if(c.left!==Vc&&!E0(c.left)){c=c.left;continue}f=d+c.start,m=d+c.end,c.setCachedOffsets(f,m,n);let w=!0;if(e&&c.ownerId&&c.ownerId!==e&&(w=!1),i&&sEt(c)&&(w=!1),s&&!oEt(c)&&(w=!1),w&&(v[x++]=c),tf(c,!0),c.right!==Vc&&!E0(c.right)){d+=c.delta,c=c.right;continue}}return tf(l.root,!1),v}function qvi(l,e,i,n,s,c,d){let f=l.root,m=0,v=0,x=0,w=0;const I=[];let P=0;for(;f!==Vc;){if(E0(f)){tf(f.left,!1),tf(f.right,!1),f===f.parent.right&&(m-=f.parent.delta),f=f.parent;continue}if(!E0(f.left)){if(v=m+f.maxEnd,v<e){tf(f,!0);continue}if(f.left!==Vc){f=f.left;continue}}if(x=m+f.start,x>i){tf(f,!0);continue}if(w=m+f.end,w>=e){f.setCachedOffsets(x,w,c);let O=!0;n&&f.ownerId&&f.ownerId!==n&&(O=!1),s&&sEt(f)&&(O=!1),d&&!oEt(f)&&(O=!1),O&&(I[P++]=f)}if(tf(f,!0),f.right!==Vc&&!E0(f.right)){m+=f.delta,f=f.right;continue}}return tf(l.root,!1),I}function ECt(l,e){if(l.root===Vc)return e.parent=Vc,e.left=Vc,e.right=Vc,pf(e,0),l.root=e,l.root;$vi(l,e),uM(e.parent);let i=e;for(;i!==l.root&&Cb(i.parent)===1;)if(i.parent===i.parent.parent.left){const n=i.parent.parent.right;Cb(n)===1?(pf(i.parent,0),pf(n,0),pf(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,Aie(l,i)),pf(i.parent,0),pf(i.parent.parent,1),Oie(l,i.parent.parent))}else{const n=i.parent.parent.left;Cb(n)===1?(pf(i.parent,0),pf(n,0),pf(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,Oie(l,i)),pf(i.parent,0),pf(i.parent.parent,1),Aie(l,i.parent.parent))}return pf(l.root,0),e}function $vi(l,e){let i=0,n=l.root;const s=e.start,c=e.end;for(;;)if(Gvi(s,c,n.start+i,n.end+i)<0)if(n.left===Vc){e.start-=i,e.end-=i,e.maxEnd-=i,n.left=e;break}else n=n.left;else if(n.right===Vc){e.start-=i+n.delta,e.end-=i+n.delta,e.maxEnd-=i+n.delta,n.right=e;break}else i+=n.delta,n=n.right;e.parent=n,e.left=Vc,e.right=Vc,pf(e,1)}function ICt(l,e){let i,n;if(e.left===Vc?(i=e.right,n=e,i.delta+=e.delta,(i.delta<-1073741824||i.delta>1073741824)&&(l.requestNormalizeDelta=!0),i.start+=e.delta,i.end+=e.delta):e.right===Vc?(i=e.left,n=e):(n=Jvi(e.right),i=n.right,i.start+=n.delta,i.end+=n.delta,i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(l.requestNormalizeDelta=!0),n.start+=e.delta,n.end+=e.delta,n.delta=e.delta,(n.delta<-1073741824||n.delta>1073741824)&&(l.requestNormalizeDelta=!0)),n===l.root){l.root=i,pf(i,0),e.detach(),KFe(),DR(i),l.root.parent=Vc;return}const s=Cb(n)===1;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===e?i.parent=n.parent:(n.parent===e?i.parent=n:i.parent=n.parent,n.left=e.left,n.right=e.right,n.parent=e.parent,pf(n,Cb(e)),e===l.root?l.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left!==Vc&&(n.left.parent=n),n.right!==Vc&&(n.right.parent=n)),e.detach(),s){uM(i.parent),n!==e&&(uM(n),uM(n.parent)),KFe();return}uM(i),uM(i.parent),n!==e&&(uM(n),uM(n.parent));let c;for(;i!==l.root&&Cb(i)===0;)i===i.parent.left?(c=i.parent.right,Cb(c)===1&&(pf(c,0),pf(i.parent,1),Aie(l,i.parent),c=i.parent.right),Cb(c.left)===0&&Cb(c.right)===0?(pf(c,1),i=i.parent):(Cb(c.right)===0&&(pf(c.left,0),pf(c,1),Oie(l,c),c=i.parent.right),pf(c,Cb(i.parent)),pf(i.parent,0),pf(c.right,0),Aie(l,i.parent),i=l.root)):(c=i.parent.left,Cb(c)===1&&(pf(c,0),pf(i.parent,1),Oie(l,i.parent),c=i.parent.left),Cb(c.left)===0&&Cb(c.right)===0?(pf(c,1),i=i.parent):(Cb(c.left)===0&&(pf(c.right,0),pf(c,1),Aie(l,c),c=i.parent.left),pf(c,Cb(i.parent)),pf(i.parent,0),pf(c.left,0),Oie(l,i.parent),i=l.root));pf(i,0),KFe()}function Jvi(l){for(;l.left!==Vc;)l=l.left;return l}function KFe(){Vc.parent=Vc,Vc.delta=0,Vc.start=0,Vc.end=0}function Aie(l,e){const i=e.right;i.delta+=e.delta,(i.delta<-1073741824||i.delta>1073741824)&&(l.requestNormalizeDelta=!0),i.start+=e.delta,i.end+=e.delta,e.right=i.left,i.left!==Vc&&(i.left.parent=e),i.parent=e.parent,e.parent===Vc?l.root=i:e===e.parent.left?e.parent.left=i:e.parent.right=i,i.left=e,e.parent=i,DR(e),DR(i)}function Oie(l,e){const i=e.left;e.delta-=i.delta,(e.delta<-1073741824||e.delta>1073741824)&&(l.requestNormalizeDelta=!0),e.start-=i.delta,e.end-=i.delta,e.left=i.right,i.right!==Vc&&(i.right.parent=e),i.parent=e.parent,e.parent===Vc?l.root=i:e===e.parent.right?e.parent.right=i:e.parent.left=i,i.right=e,e.parent=i,DR(e),DR(i)}function cEt(l){let e=l.end;if(l.left!==Vc){const i=l.left.maxEnd;i>e&&(e=i)}if(l.right!==Vc){const i=l.right.maxEnd+l.delta;i>e&&(e=i)}return e}function DR(l){l.maxEnd=cEt(l)}function uM(l){for(;l!==Vc;){const e=cEt(l);if(l.maxEnd===e)return;l.maxEnd=e,l=l.parent}}function Gvi(l,e,i,n){return l===i?e-n:l-i}class sHe{constructor(e,i){this.piece=e,this.color=i,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==rc)return mJe(this.right);let e=this;for(;e.parent!==rc&&e.parent.left!==e;)e=e.parent;return e.parent===rc?rc:e.parent}prev(){if(this.left!==rc)return lEt(this.left);let e=this;for(;e.parent!==rc&&e.parent.right!==e;)e=e.parent;return e.parent===rc?rc:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const rc=new sHe(null,0);rc.parent=rc;rc.left=rc;rc.right=rc;rc.color=0;function mJe(l){for(;l.left!==rc;)l=l.left;return l}function lEt(l){for(;l.right!==rc;)l=l.right;return l}function gJe(l){return l===rc?0:l.size_left+l.piece.length+gJe(l.right)}function yJe(l){return l===rc?0:l.lf_left+l.piece.lineFeedCnt+yJe(l.right)}function XFe(){rc.parent=rc}function Mie(l,e){const i=e.right;i.size_left+=e.size_left+(e.piece?e.piece.length:0),i.lf_left+=e.lf_left+(e.piece?e.piece.lineFeedCnt:0),e.right=i.left,i.left!==rc&&(i.left.parent=e),i.parent=e.parent,e.parent===rc?l.root=i:e.parent.left===e?e.parent.left=i:e.parent.right=i,i.left=e,e.parent=i}function Rie(l,e){const i=e.left;e.left=i.right,i.right!==rc&&(i.right.parent=e),i.parent=e.parent,e.size_left-=i.size_left+(i.piece?i.piece.length:0),e.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),e.parent===rc?l.root=i:e===e.parent.right?e.parent.right=i:e.parent.left=i,i.right=e,e.parent=i}function _0e(l,e){let i,n;if(e.left===rc?(n=e,i=n.right):e.right===rc?(n=e,i=n.left):(n=mJe(e.right),i=n.right),n===l.root){l.root=i,i.color=0,e.detach(),XFe(),l.root.parent=rc;return}const s=n.color===1;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===e?(i.parent=n.parent,cie(l,i)):(n.parent===e?i.parent=n:i.parent=n.parent,cie(l,i),n.left=e.left,n.right=e.right,n.parent=e.parent,n.color=e.color,e===l.root?l.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left!==rc&&(n.left.parent=n),n.right!==rc&&(n.right.parent=n),n.size_left=e.size_left,n.lf_left=e.lf_left,cie(l,n)),e.detach(),i.parent.left===i){const d=gJe(i),f=yJe(i);if(d!==i.parent.size_left||f!==i.parent.lf_left){const m=d-i.parent.size_left,v=f-i.parent.lf_left;i.parent.size_left=d,i.parent.lf_left=f,m4(l,i.parent,m,v)}}if(cie(l,i.parent),s){XFe();return}let c;for(;i!==l.root&&i.color===0;)i===i.parent.left?(c=i.parent.right,c.color===1&&(c.color=0,i.parent.color=1,Mie(l,i.parent),c=i.parent.right),c.left.color===0&&c.right.color===0?(c.color=1,i=i.parent):(c.right.color===0&&(c.left.color=0,c.color=1,Rie(l,c),c=i.parent.right),c.color=i.parent.color,i.parent.color=0,c.right.color=0,Mie(l,i.parent),i=l.root)):(c=i.parent.left,c.color===1&&(c.color=0,i.parent.color=1,Rie(l,i.parent),c=i.parent.left),c.left.color===0&&c.right.color===0?(c.color=1,i=i.parent):(c.left.color===0&&(c.right.color=0,c.color=1,Mie(l,c),c=i.parent.left),c.color=i.parent.color,i.parent.color=0,c.left.color=0,Rie(l,i.parent),i=l.root));i.color=0,XFe()}function NCt(l,e){for(cie(l,e);e!==l.root&&e.parent.color===1;)if(e.parent===e.parent.parent.left){const i=e.parent.parent.right;i.color===1?(e.parent.color=0,i.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.right&&(e=e.parent,Mie(l,e)),e.parent.color=0,e.parent.parent.color=1,Rie(l,e.parent.parent))}else{const i=e.parent.parent.left;i.color===1?(e.parent.color=0,i.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.left&&(e=e.parent,Rie(l,e)),e.parent.color=0,e.parent.parent.color=1,Mie(l,e.parent.parent))}l.root.color=0}function m4(l,e,i,n){for(;e!==l.root&&e!==rc;)e.parent.left===e&&(e.parent.size_left+=i,e.parent.lf_left+=n),e=e.parent}function cie(l,e){let i=0,n=0;if(e!==l.root){for(;e!==l.root&&e===e.parent.right;)e=e.parent;if(e!==l.root)for(e=e.parent,i=gJe(e.left)-e.size_left,n=yJe(e.left)-e.lf_left,e.size_left+=i,e.lf_left+=n;e!==l.root&&(i!==0||n!==0);)e.parent.left===e&&(e.parent.size_left+=i,e.parent.lf_left+=n),e=e.parent}}const d4=65535;function uEt(l){let e;return l[l.length-1]<65536?e=new Uint16Array(l.length):e=new Uint32Array(l.length),e.set(l,0),e}class Kvi{constructor(e,i,n,s,c){this.lineStarts=e,this.cr=i,this.lf=n,this.crlf=s,this.isBasicASCII=c}}function g4(l,e=!0){const i=[0];let n=1;for(let s=0,c=l.length;s<c;s++){const d=l.charCodeAt(s);d===13?s+1<c&&l.charCodeAt(s+1)===10?(i[n++]=s+2,s++):i[n++]=s+1:d===10&&(i[n++]=s+1)}return e?uEt(i):i}function Xvi(l,e){l.length=0,l[0]=0;let i=1,n=0,s=0,c=0,d=!0;for(let m=0,v=e.length;m<v;m++){const x=e.charCodeAt(m);x===13?m+1<v&&e.charCodeAt(m+1)===10?(c++,l[i++]=m+2,m++):(n++,l[i++]=m+1):x===10?(s++,l[i++]=m+1):d&&x!==9&&(x<32||x>126)&&(d=!1)}const f=new Kvi(uEt(l),n,s,c,d);return l.length=0,f}class AC{constructor(e,i,n,s,c){this.bufferIndex=e,this.start=i,this.end=n,this.lineFeedCnt=s,this.length=c}}class zF{constructor(e,i){this.buffer=e,this.lineStarts=i}}class Qvi{constructor(e,i){this._pieces=[],this._tree=e,this._BOM=i,this._index=0,e.root!==rc&&e.iterate(e.root,n=>(n!==rc&&this._pieces.push(n.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class Zvi{constructor(e){this._limit=e,this._cache=[]}get(e){for(let i=this._cache.length-1;i>=0;i--){const n=this._cache[i];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null}get2(e){for(let i=this._cache.length-1;i>=0;i--){const n=this._cache[i];if(n.nodeStartLineNumber&&n.nodeStartLineNumber<e&&n.nodeStartLineNumber+n.node.piece.lineFeedCnt>=e)return n}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let i=!1;const n=this._cache;for(let s=0;s<n.length;s++){const c=n[s];if(c.node.parent===null||c.nodeStartOffset>=e){n[s]=null,i=!0;continue}}if(i){const s=[];for(const c of n)c!==null&&s.push(c);this._cache=s}}}class Yvi{constructor(e,i,n){this.create(e,i,n)}create(e,i,n){this._buffers=[new zF("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=rc,this._lineCnt=1,this._length=0,this._EOL=i,this._EOLLength=i.length,this._EOLNormalized=n;let s=null;for(let c=0,d=e.length;c<d;c++)if(e[c].buffer.length>0){e[c].lineStarts||(e[c].lineStarts=g4(e[c].buffer));const f=new AC(c+1,{line:0,column:0},{line:e[c].lineStarts.length-1,column:e[c].buffer.length-e[c].lineStarts[e[c].lineStarts.length-1]},e[c].lineStarts.length-1,e[c].buffer.length);this._buffers.push(e[c]),s=this.rbInsertRight(s,f)}this._searchCache=new Zvi(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const i=d4,n=i-Math.floor(i/3),s=n*2;let c="",d=0;const f=[];if(this.iterate(this.root,m=>{const v=this.getNodeContent(m),x=v.length;if(d<=n||d+x<s)return c+=v,d+=x,!0;const w=c.replace(/\r\n|\r|\n/g,e);return f.push(new zF(w,g4(w))),c=v,d=x,!0}),d>0){const m=c.replace(/\r\n|\r|\n/g,e);f.push(new zF(m,g4(m)))}this.create(f,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new Qvi(this,e)}getOffsetAt(e,i){let n=0,s=this.root;for(;s!==rc;)if(s.left!==rc&&s.lf_left+1>=e)s=s.left;else if(s.lf_left+s.piece.lineFeedCnt+1>=e){n+=s.size_left;const c=this.getAccumulatedValue(s,e-s.lf_left-2);return n+=c+i-1}else e-=s.lf_left+s.piece.lineFeedCnt,n+=s.size_left+s.piece.length,s=s.right;return n}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let i=this.root,n=0;const s=e;for(;i!==rc;)if(i.size_left!==0&&i.size_left>=e)i=i.left;else if(i.size_left+i.piece.length>=e){const c=this.getIndexOf(i,e-i.size_left);if(n+=i.lf_left+c.index,c.index===0){const d=this.getOffsetAt(n+1,1),f=s-d;return new pi(n+1,f+1)}return new pi(n+1,c.remainder+1)}else if(e-=i.size_left+i.piece.length,n+=i.lf_left+i.piece.lineFeedCnt,i.right===rc){const c=this.getOffsetAt(n+1,1),d=s-e-c;return new pi(n+1,d+1)}else i=i.right;return new pi(1,1)}getValueInRange(e,i){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const n=this.nodeAt2(e.startLineNumber,e.startColumn),s=this.nodeAt2(e.endLineNumber,e.endColumn),c=this.getValueInRange2(n,s);return i?i!==this._EOL||!this._EOLNormalized?c.replace(/\r\n|\r|\n/g,i):i===this.getEOL()&&this._EOLNormalized?c:c.replace(/\r\n|\r|\n/g,i):c}getValueInRange2(e,i){if(e.node===i.node){const f=e.node,m=this._buffers[f.piece.bufferIndex].buffer,v=this.offsetInBuffer(f.piece.bufferIndex,f.piece.start);return m.substring(v+e.remainder,v+i.remainder)}let n=e.node;const s=this._buffers[n.piece.bufferIndex].buffer,c=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);let d=s.substring(c+e.remainder,c+n.piece.length);for(n=n.next();n!==rc;){const f=this._buffers[n.piece.bufferIndex].buffer,m=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(n===i.node){d+=f.substring(m,m+i.remainder);break}else d+=f.substr(m,n.piece.length);n=n.next()}return d}getLinesContent(){const e=[];let i=0,n="",s=!1;return this.iterate(this.root,c=>{if(c===rc)return!0;const d=c.piece;let f=d.length;if(f===0)return!0;const m=this._buffers[d.bufferIndex].buffer,v=this._buffers[d.bufferIndex].lineStarts,x=d.start.line,w=d.end.line;let I=v[x]+d.start.column;if(s&&(m.charCodeAt(I)===10&&(I++,f--),e[i++]=n,n="",s=!1,f===0))return!0;if(x===w)return!this._EOLNormalized&&m.charCodeAt(I+f-1)===13?(s=!0,n+=m.substr(I,f-1)):n+=m.substr(I,f),!0;n+=this._EOLNormalized?m.substring(I,Math.max(I,v[x+1]-this._EOLLength)):m.substring(I,v[x+1]).replace(/(\r\n|\r|\n)$/,""),e[i++]=n;for(let P=x+1;P<w;P++)n=this._EOLNormalized?m.substring(v[P],v[P+1]-this._EOLLength):m.substring(v[P],v[P+1]).replace(/(\r\n|\r|\n)$/,""),e[i++]=n;return!this._EOLNormalized&&m.charCodeAt(v[w]+d.end.column-1)===13?(s=!0,d.end.column===0?i--:n=m.substr(v[w],d.end.column-1)):n=m.substr(v[w],d.end.column),!0}),s&&(e[i++]=n,n=""),e[i++]=n,e}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(e){return this._lastVisitedLine.lineNumber===e?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=e,e===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(e):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(e,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/,""),this._lastVisitedLine.value)}_getCharCode(e){if(e.remainder===e.node.piece.length){const i=e.node.next();if(!i)return 0;const n=this._buffers[i.piece.bufferIndex],s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n.buffer.charCodeAt(s)}else{const i=this._buffers[e.node.piece.bufferIndex],s=this.offsetInBuffer(e.node.piece.bufferIndex,e.node.piece.start)+e.remainder;return i.buffer.charCodeAt(s)}}getLineCharCode(e,i){const n=this.nodeAt2(e,i+1);return this._getCharCode(n)}getLineLength(e){if(e===this.getLineCount()){const i=this.getOffsetAt(e,1);return this.getLength()-i}return this.getOffsetAt(e+1,1)-this.getOffsetAt(e,1)-this._EOLLength}findMatchesInNode(e,i,n,s,c,d,f,m,v,x,w){const I=this._buffers[e.piece.bufferIndex],P=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),O=this.offsetInBuffer(e.piece.bufferIndex,c),z=this.offsetInBuffer(e.piece.bufferIndex,d);let J;const Y={line:0,column:0};let ae,me;i._wordSeparators?(ae=I.buffer.substring(O,z),me=ye=>ye+O,i.reset(0)):(ae=I.buffer,me=ye=>ye,i.reset(O));do if(J=i.next(ae),J){if(me(J.index)>=z)return x;this.positionInBuffer(e,me(J.index)-P,Y);const ye=this.getLineFeedCnt(e.piece.bufferIndex,c,Y),Ce=Y.line===c.line?Y.column-c.column+s:Y.column+1,Fe=Ce+J[0].length;if(w[x++]=FF(new nt(n+ye,Ce,n+ye,Fe),J,m),me(J.index)+J[0].length>=z||x>=v)return x}while(J);return x}findMatchesLineByLine(e,i,n,s){const c=[];let d=0;const f=new nq(i.wordSeparators,i.regex);let m=this.nodeAt2(e.startLineNumber,e.startColumn);if(m===null)return[];const v=this.nodeAt2(e.endLineNumber,e.endColumn);if(v===null)return[];let x=this.positionInBuffer(m.node,m.remainder);const w=this.positionInBuffer(v.node,v.remainder);if(m.node===v.node)return this.findMatchesInNode(m.node,f,e.startLineNumber,e.startColumn,x,w,i,n,s,d,c),c;let I=e.startLineNumber,P=m.node;for(;P!==v.node;){const z=this.getLineFeedCnt(P.piece.bufferIndex,x,P.piece.end);if(z>=1){const Y=this._buffers[P.piece.bufferIndex].lineStarts,ae=this.offsetInBuffer(P.piece.bufferIndex,P.piece.start),me=Y[x.line+z],ye=I===e.startLineNumber?e.startColumn:1;if(d=this.findMatchesInNode(P,f,I,ye,x,this.positionInBuffer(P,me-ae),i,n,s,d,c),d>=s)return c;I+=z}const J=I===e.startLineNumber?e.startColumn-1:0;if(I===e.endLineNumber){const Y=this.getLineContent(I).substring(J,e.endColumn-1);return d=this._findMatchesInLine(i,f,Y,e.endLineNumber,J,d,c,n,s),c}if(d=this._findMatchesInLine(i,f,this.getLineContent(I).substr(J),I,J,d,c,n,s),d>=s)return c;I++,m=this.nodeAt2(I,1),P=m.node,x=this.positionInBuffer(m.node,m.remainder)}if(I===e.endLineNumber){const z=I===e.startLineNumber?e.startColumn-1:0,J=this.getLineContent(I).substring(z,e.endColumn-1);return d=this._findMatchesInLine(i,f,J,e.endLineNumber,z,d,c,n,s),c}const O=I===e.startLineNumber?e.startColumn:1;return d=this.findMatchesInNode(v.node,f,I,O,x,w,i,n,s,d,c),c}_findMatchesInLine(e,i,n,s,c,d,f,m,v){const x=e.wordSeparators;if(!m&&e.simpleSearch){const I=e.simpleSearch,P=I.length,O=n.length;let z=-P;for(;(z=n.indexOf(I,z+P))!==-1;)if((!x||v$e(x,n,O,z,P))&&(f[d++]=new Hne(new nt(s,z+1+c,s,z+1+P+c),null),d>=v))return d;return d}let w;i.reset(0);do if(w=i.next(n),w&&(f[d++]=FF(new nt(s,w.index+1+c,s,w.index+1+w[0].length+c),w,m),d>=v))return d;while(w);return d}insert(e,i,n=!1){if(this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==rc){const{node:s,remainder:c,nodeStartOffset:d}=this.nodeAt(e),f=s.piece,m=f.bufferIndex,v=this.positionInBuffer(s,c);if(s.piece.bufferIndex===0&&f.end.line===this._lastChangeBufferPos.line&&f.end.column===this._lastChangeBufferPos.column&&d+f.length===e&&i.length<d4){this.appendToNode(s,i),this.computeBufferMetadata();return}if(d===e)this.insertContentToNodeLeft(i,s),this._searchCache.validate(e);else if(d+s.piece.length>e){const x=[];let w=new AC(f.bufferIndex,v,f.end,this.getLineFeedCnt(f.bufferIndex,v,f.end),this.offsetInBuffer(m,f.end)-this.offsetInBuffer(m,v));if(this.shouldCheckCRLF()&&this.endWithCR(i)&&this.nodeCharCodeAt(s,c)===10){const z={line:w.start.line+1,column:0};w=new AC(w.bufferIndex,z,w.end,this.getLineFeedCnt(w.bufferIndex,z,w.end),w.length-1),i+=`
+`}if(this.shouldCheckCRLF()&&this.startWithLF(i))if(this.nodeCharCodeAt(s,c-1)===13){const z=this.positionInBuffer(s,c-1);this.deleteNodeTail(s,z),i="\r"+i,s.piece.length===0&&x.push(s)}else this.deleteNodeTail(s,v);else this.deleteNodeTail(s,v);const I=this.createNewPieces(i);w.length>0&&this.rbInsertRight(s,w);let P=s;for(let O=0;O<I.length;O++)P=this.rbInsertRight(P,I[O]);this.deleteNodes(x)}else this.insertContentToNodeRight(i,s)}else{const s=this.createNewPieces(i);let c=this.rbInsertLeft(null,s[0]);for(let d=1;d<s.length;d++)c=this.rbInsertRight(c,s[d])}this.computeBufferMetadata()}delete(e,i){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",i<=0||this.root===rc)return;const n=this.nodeAt(e),s=this.nodeAt(e+i),c=n.node,d=s.node;if(c===d){const I=this.positionInBuffer(c,n.remainder),P=this.positionInBuffer(c,s.remainder);if(n.nodeStartOffset===e){if(i===c.piece.length){const O=c.next();_0e(this,c),this.validateCRLFWithPrevNode(O),this.computeBufferMetadata();return}this.deleteNodeHead(c,P),this._searchCache.validate(e),this.validateCRLFWithPrevNode(c),this.computeBufferMetadata();return}if(n.nodeStartOffset+c.piece.length===e+i){this.deleteNodeTail(c,I),this.validateCRLFWithNextNode(c),this.computeBufferMetadata();return}this.shrinkNode(c,I,P),this.computeBufferMetadata();return}const f=[],m=this.positionInBuffer(c,n.remainder);this.deleteNodeTail(c,m),this._searchCache.validate(e),c.piece.length===0&&f.push(c);const v=this.positionInBuffer(d,s.remainder);this.deleteNodeHead(d,v),d.piece.length===0&&f.push(d);const x=c.next();for(let I=x;I!==rc&&I!==d;I=I.next())f.push(I);const w=c.piece.length===0?c.prev():c;this.deleteNodes(f),this.validateCRLFWithNextNode(w),this.computeBufferMetadata()}insertContentToNodeLeft(e,i){const n=[];if(this.shouldCheckCRLF()&&this.endWithCR(e)&&this.startWithLF(i)){const d=i.piece,f={line:d.start.line+1,column:0},m=new AC(d.bufferIndex,f,d.end,this.getLineFeedCnt(d.bufferIndex,f,d.end),d.length-1);i.piece=m,e+=`
+`,m4(this,i,-1,-1),i.piece.length===0&&n.push(i)}const s=this.createNewPieces(e);let c=this.rbInsertLeft(i,s[s.length-1]);for(let d=s.length-2;d>=0;d--)c=this.rbInsertLeft(c,s[d]);this.validateCRLFWithPrevNode(c),this.deleteNodes(n)}insertContentToNodeRight(e,i){this.adjustCarriageReturnFromNext(e,i)&&(e+=`
+`);const n=this.createNewPieces(e),s=this.rbInsertRight(i,n[0]);let c=s;for(let d=1;d<n.length;d++)c=this.rbInsertRight(c,n[d]);this.validateCRLFWithPrevNode(s)}positionInBuffer(e,i,n){const s=e.piece,c=e.piece.bufferIndex,d=this._buffers[c].lineStarts,m=d[s.start.line]+s.start.column+i;let v=s.start.line,x=s.end.line,w=0,I=0,P=0;for(;v<=x&&(w=v+(x-v)/2|0,P=d[w],w!==x);)if(I=d[w+1],m<P)x=w-1;else if(m>=I)v=w+1;else break;return n?(n.line=w,n.column=m-P,null):{line:w,column:m-P}}getLineFeedCnt(e,i,n){if(n.column===0)return n.line-i.line;const s=this._buffers[e].lineStarts;if(n.line===s.length-1)return n.line-i.line;const c=s[n.line+1],d=s[n.line]+n.column;if(c>d+1)return n.line-i.line;const f=d-1;return this._buffers[e].buffer.charCodeAt(f)===13?n.line-i.line+1:n.line-i.line}offsetInBuffer(e,i){return this._buffers[e].lineStarts[i.line]+i.column}deleteNodes(e){for(let i=0;i<e.length;i++)_0e(this,e[i])}createNewPieces(e){if(e.length>d4){const x=[];for(;e.length>d4;){const I=e.charCodeAt(d4-1);let P;I===13||I>=55296&&I<=56319?(P=e.substring(0,d4-1),e=e.substring(d4-1)):(P=e.substring(0,d4),e=e.substring(d4));const O=g4(P);x.push(new AC(this._buffers.length,{line:0,column:0},{line:O.length-1,column:P.length-O[O.length-1]},O.length-1,P.length)),this._buffers.push(new zF(P,O))}const w=g4(e);return x.push(new AC(this._buffers.length,{line:0,column:0},{line:w.length-1,column:e.length-w[w.length-1]},w.length-1,e.length)),this._buffers.push(new zF(e,w)),x}let i=this._buffers[0].buffer.length;const n=g4(e,!1);let s=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===i&&i!==0&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},s=this._lastChangeBufferPos;for(let x=0;x<n.length;x++)n[x]+=i+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(n.slice(1)),this._buffers[0].buffer+="_"+e,i+=1}else{if(i!==0)for(let x=0;x<n.length;x++)n[x]+=i;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(n.slice(1)),this._buffers[0].buffer+=e}const c=this._buffers[0].buffer.length,d=this._buffers[0].lineStarts.length-1,f=c-this._buffers[0].lineStarts[d],m={line:d,column:f},v=new AC(0,s,m,this.getLineFeedCnt(0,s,m),c-i);return this._lastChangeBufferPos=m,[v]}getLineRawContent(e,i=0){let n=this.root,s="";const c=this._searchCache.get2(e);if(c){n=c.node;const d=this.getAccumulatedValue(n,e-c.nodeStartLineNumber-1),f=this._buffers[n.piece.bufferIndex].buffer,m=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(c.nodeStartLineNumber+n.piece.lineFeedCnt===e)s=f.substring(m+d,m+n.piece.length);else{const v=this.getAccumulatedValue(n,e-c.nodeStartLineNumber);return f.substring(m+d,m+v-i)}}else{let d=0;const f=e;for(;n!==rc;)if(n.left!==rc&&n.lf_left>=e-1)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt>e-1){const m=this.getAccumulatedValue(n,e-n.lf_left-2),v=this.getAccumulatedValue(n,e-n.lf_left-1),x=this._buffers[n.piece.bufferIndex].buffer,w=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return d+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:d,nodeStartLineNumber:f-(e-1-n.lf_left)}),x.substring(w+m,w+v-i)}else if(n.lf_left+n.piece.lineFeedCnt===e-1){const m=this.getAccumulatedValue(n,e-n.lf_left-2),v=this._buffers[n.piece.bufferIndex].buffer,x=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);s=v.substring(x+m,x+n.piece.length);break}else e-=n.lf_left+n.piece.lineFeedCnt,d+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==rc;){const d=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){const f=this.getAccumulatedValue(n,0),m=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return s+=d.substring(m,m+f-i),s}else{const f=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);s+=d.substr(f,n.piece.length)}n=n.next()}return s}computeBufferMetadata(){let e=this.root,i=1,n=0;for(;e!==rc;)i+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=i,this._length=n,this._searchCache.validate(this._length)}getIndexOf(e,i){const n=e.piece,s=this.positionInBuffer(e,i),c=s.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===i){const d=this.getLineFeedCnt(e.piece.bufferIndex,n.start,s);if(d!==c)return{index:d,remainder:0}}return{index:c,remainder:s.column}}getAccumulatedValue(e,i){if(i<0)return 0;const n=e.piece,s=this._buffers[n.bufferIndex].lineStarts,c=n.start.line+i+1;return c>n.end.line?s[n.end.line]+n.end.column-s[n.start.line]-n.start.column:s[c]-s[n.start.line]-n.start.column}deleteNodeTail(e,i){const n=e.piece,s=n.lineFeedCnt,c=this.offsetInBuffer(n.bufferIndex,n.end),d=i,f=this.offsetInBuffer(n.bufferIndex,d),m=this.getLineFeedCnt(n.bufferIndex,n.start,d),v=m-s,x=f-c,w=n.length+x;e.piece=new AC(n.bufferIndex,n.start,d,m,w),m4(this,e,x,v)}deleteNodeHead(e,i){const n=e.piece,s=n.lineFeedCnt,c=this.offsetInBuffer(n.bufferIndex,n.start),d=i,f=this.getLineFeedCnt(n.bufferIndex,d,n.end),m=this.offsetInBuffer(n.bufferIndex,d),v=f-s,x=c-m,w=n.length+x;e.piece=new AC(n.bufferIndex,d,n.end,f,w),m4(this,e,x,v)}shrinkNode(e,i,n){const s=e.piece,c=s.start,d=s.end,f=s.length,m=s.lineFeedCnt,v=i,x=this.getLineFeedCnt(s.bufferIndex,s.start,v),w=this.offsetInBuffer(s.bufferIndex,i)-this.offsetInBuffer(s.bufferIndex,c);e.piece=new AC(s.bufferIndex,s.start,v,x,w),m4(this,e,w-f,x-m);const I=new AC(s.bufferIndex,n,d,this.getLineFeedCnt(s.bufferIndex,n,d),this.offsetInBuffer(s.bufferIndex,d)-this.offsetInBuffer(s.bufferIndex,n)),P=this.rbInsertRight(e,I);this.validateCRLFWithPrevNode(P)}appendToNode(e,i){this.adjustCarriageReturnFromNext(i,e)&&(i+=`
+`);const n=this.shouldCheckCRLF()&&this.startWithLF(i)&&this.endWithCR(e),s=this._buffers[0].buffer.length;this._buffers[0].buffer+=i;const c=g4(i,!1);for(let P=0;P<c.length;P++)c[P]+=s;if(n){const P=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:s-P}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(c.slice(1));const d=this._buffers[0].lineStarts.length-1,f=this._buffers[0].buffer.length-this._buffers[0].lineStarts[d],m={line:d,column:f},v=e.piece.length+i.length,x=e.piece.lineFeedCnt,w=this.getLineFeedCnt(0,e.piece.start,m),I=w-x;e.piece=new AC(e.piece.bufferIndex,e.piece.start,m,w,v),this._lastChangeBufferPos=m,m4(this,e,i.length,I)}nodeAt(e){let i=this.root;const n=this._searchCache.get(e);if(n)return{node:n.node,nodeStartOffset:n.nodeStartOffset,remainder:e-n.nodeStartOffset};let s=0;for(;i!==rc;)if(i.size_left>e)i=i.left;else if(i.size_left+i.piece.length>=e){s+=i.size_left;const c={node:i,remainder:e-i.size_left,nodeStartOffset:s};return this._searchCache.set(c),c}else e-=i.size_left+i.piece.length,s+=i.size_left+i.piece.length,i=i.right;return null}nodeAt2(e,i){let n=this.root,s=0;for(;n!==rc;)if(n.left!==rc&&n.lf_left>=e-1)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt>e-1){const c=this.getAccumulatedValue(n,e-n.lf_left-2),d=this.getAccumulatedValue(n,e-n.lf_left-1);return s+=n.size_left,{node:n,remainder:Math.min(c+i-1,d),nodeStartOffset:s}}else if(n.lf_left+n.piece.lineFeedCnt===e-1){const c=this.getAccumulatedValue(n,e-n.lf_left-2);if(c+i-1<=n.piece.length)return{node:n,remainder:c+i-1,nodeStartOffset:s};i-=n.piece.length-c;break}else e-=n.lf_left+n.piece.lineFeedCnt,s+=n.size_left+n.piece.length,n=n.right;for(n=n.next();n!==rc;){if(n.piece.lineFeedCnt>0){const c=this.getAccumulatedValue(n,0),d=this.offsetOfNode(n);return{node:n,remainder:Math.min(i-1,c),nodeStartOffset:d}}else if(n.piece.length>=i-1){const c=this.offsetOfNode(n);return{node:n,remainder:i-1,nodeStartOffset:c}}else i-=n.piece.length;n=n.next()}return null}nodeCharCodeAt(e,i){if(e.piece.lineFeedCnt<1)return-1;const n=this._buffers[e.piece.bufferIndex],s=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+i;return n.buffer.charCodeAt(s)}offsetOfNode(e){if(!e)return 0;let i=e.size_left;for(;e!==this.root;)e.parent.right===e&&(i+=e.parent.size_left+e.parent.piece.length),e=e.parent;return i}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===`
+`)}startWithLF(e){if(typeof e=="string")return e.charCodeAt(0)===10;if(e===rc||e.piece.lineFeedCnt===0)return!1;const i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,s=i.start.line,c=n[s]+i.start.column;return s===n.length-1||n[s+1]>c+1?!1:this._buffers[i.bufferIndex].buffer.charCodeAt(c)===10}endWithCR(e){return typeof e=="string"?e.charCodeAt(e.length-1)===13:e===rc||e.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(e,e.piece.length-1)===13}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const i=e.prev();this.endWithCR(i)&&this.fixCRLF(i,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const i=e.next();this.startWithLF(i)&&this.fixCRLF(e,i)}}fixCRLF(e,i){const n=[],s=this._buffers[e.piece.bufferIndex].lineStarts;let c;e.piece.end.column===0?c={line:e.piece.end.line-1,column:s[e.piece.end.line]-s[e.piece.end.line-1]-1}:c={line:e.piece.end.line,column:e.piece.end.column-1};const d=e.piece.length-1,f=e.piece.lineFeedCnt-1;e.piece=new AC(e.piece.bufferIndex,e.piece.start,c,f,d),m4(this,e,-1,-1),e.piece.length===0&&n.push(e);const m={line:i.piece.start.line+1,column:0},v=i.piece.length-1,x=this.getLineFeedCnt(i.piece.bufferIndex,m,i.piece.end);i.piece=new AC(i.piece.bufferIndex,m,i.piece.end,x,v),m4(this,i,-1,-1),i.piece.length===0&&n.push(i);const w=this.createNewPieces(`\r
+`);this.rbInsertRight(e,w[0]);for(let I=0;I<n.length;I++)_0e(this,n[I])}adjustCarriageReturnFromNext(e,i){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const n=i.next();if(this.startWithLF(n)){if(e+=`
+`,n.piece.length===1)_0e(this,n);else{const s=n.piece,c={line:s.start.line+1,column:0},d=s.length-1,f=this.getLineFeedCnt(s.bufferIndex,c,s.end);n.piece=new AC(s.bufferIndex,c,s.end,f,d),m4(this,n,-1,-1)}return!0}}return!1}iterate(e,i){if(e===rc)return i(rc);const n=this.iterate(e.left,i);return n&&i(e)&&this.iterate(e.right,i)}getNodeContent(e){if(e===rc)return"";const i=this._buffers[e.piece.bufferIndex],n=e.piece,s=this.offsetInBuffer(n.bufferIndex,n.start),c=this.offsetInBuffer(n.bufferIndex,n.end);return i.buffer.substring(s,c)}getPieceContent(e){const i=this._buffers[e.bufferIndex],n=this.offsetInBuffer(e.bufferIndex,e.start),s=this.offsetInBuffer(e.bufferIndex,e.end);return i.buffer.substring(n,s)}rbInsertRight(e,i){const n=new sHe(i,1);if(n.left=rc,n.right=rc,n.parent=rc,n.size_left=0,n.lf_left=0,this.root===rc)this.root=n,n.color=0;else if(e.right===rc)e.right=n,n.parent=e;else{const c=mJe(e.right);c.left=n,n.parent=c}return NCt(this,n),n}rbInsertLeft(e,i){const n=new sHe(i,1);if(n.left=rc,n.right=rc,n.parent=rc,n.size_left=0,n.lf_left=0,this.root===rc)this.root=n,n.color=0;else if(e.left===rc)e.left=n,n.parent=e;else{const s=lEt(e.left);s.right=n,n.parent=s}return NCt(this,n),n}}class Zq extends xi{constructor(e,i,n,s,c,d,f){super(),this._onDidChangeContent=this._register(new gi),this._BOM=i,this._mightContainNonBasicASCII=!d,this._mightContainRTL=s,this._mightContainUnusualLineTerminators=c,this._pieceTree=new Yvi(e,n,f)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,i){return this._pieceTree.getOffsetAt(e,i)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,i){const n=e+i,s=this.getPositionAt(e),c=this.getPositionAt(n);return new nt(s.lineNumber,s.column,c.lineNumber,c.column)}getValueInRange(e,i=0){if(e.isEmpty())return"";const n=this._getEndOfLine(i);return this._pieceTree.getValueInRange(e,n)}getValueLengthInRange(e,i=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;const n=this.getOffsetAt(e.startLineNumber,e.startColumn),s=this.getOffsetAt(e.endLineNumber,e.endColumn);let c=0;const d=this._getEndOfLine(i),f=this.getEOL();if(d.length!==f.length){const m=d.length-f.length,v=e.endLineNumber-e.startLineNumber;c=m*v}return s-n+c}getCharacterCountInRange(e,i=0){if(this._mightContainNonBasicASCII){let n=0;const s=e.startLineNumber,c=e.endLineNumber;for(let d=s;d<=c;d++){const f=this.getLineContent(d),m=d===s?e.startColumn-1:0,v=d===c?e.endColumn-1:f.length;for(let x=m;x<v;x++)Pm(f.charCodeAt(x))?(n=n+1,x=x+1):n=n+1}return n+=this._getEndOfLine(i).length*(c-s),n}return this.getValueLengthInRange(e,i)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(e){return this._pieceTree.getLineContent(e)}getLineCharCode(e,i){return this._pieceTree.getLineCharCode(e,i)}getLineLength(e){return this._pieceTree.getLineLength(e)}getLineFirstNonWhitespaceColumn(e){const i=Ty(this.getLineContent(e));return i===-1?0:i+1}getLineLastNonWhitespaceColumn(e){const i=ME(this.getLineContent(e));return i===-1?0:i+2}_getEndOfLine(e){switch(e){case 1:return`
+`;case 2:return`\r
+`;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(e){this._pieceTree.setEOL(e)}applyEdits(e,i,n){let s=this._mightContainRTL,c=this._mightContainUnusualLineTerminators,d=this._mightContainNonBasicASCII,f=!0,m=[];for(let z=0;z<e.length;z++){const J=e[z];f&&J._isTracked&&(f=!1);const Y=J.range;if(J.text){let Fe=!0;d||(Fe=!fse(J.text),d=Fe),!s&&Fe&&(s=k$(J.text)),!c&&Fe&&(c=n2t(J.text))}let ae="",me=0,ye=0,Ce=0;if(J.text){let Fe;[me,ye,Ce,Fe]=xR(J.text);const rt=this.getEOL();Fe===0||Fe===(rt===`\r
+`?2:1)?ae=J.text:ae=J.text.replace(/\r\n|\r|\n/g,rt)}m[z]={sortIndex:z,identifier:J.identifier||null,range:Y,rangeOffset:this.getOffsetAt(Y.startLineNumber,Y.startColumn),rangeLength:this.getValueLengthInRange(Y),text:ae,eolCount:me,firstLineLength:ye,lastLineLength:Ce,forceMoveMarkers:!!J.forceMoveMarkers,isAutoWhitespaceEdit:J.isAutoWhitespaceEdit||!1}}m.sort(Zq._sortOpsAscending);let v=!1;for(let z=0,J=m.length-1;z<J;z++){const Y=m[z].range.getEndPosition(),ae=m[z+1].range.getStartPosition();if(ae.isBeforeOrEqual(Y)){if(ae.isBefore(Y))throw new Error("Overlapping ranges are not allowed!");v=!0}}f&&(m=this._reduceOperations(m));const x=n||i?Zq._getInverseEditRanges(m):[],w=[];if(i)for(let z=0;z<m.length;z++){const J=m[z],Y=x[z];if(J.isAutoWhitespaceEdit&&J.range.isEmpty())for(let ae=Y.startLineNumber;ae<=Y.endLineNumber;ae++){let me="";ae===Y.startLineNumber&&(me=this.getLineContent(J.range.startLineNumber),Ty(me)!==-1)||w.push({lineNumber:ae,oldContent:me})}}let I=null;if(n){let z=0;I=[];for(let J=0;J<m.length;J++){const Y=m[J],ae=x[J],me=this.getValueInRange(Y.range),ye=Y.rangeOffset+z;z+=Y.text.length-me.length,I[J]={sortIndex:Y.sortIndex,identifier:Y.identifier,range:ae,text:me,textChange:new x0(Y.rangeOffset,me,ye,Y.text)}}v||I.sort((J,Y)=>J.sortIndex-Y.sortIndex)}this._mightContainRTL=s,this._mightContainUnusualLineTerminators=c,this._mightContainNonBasicASCII=d;const P=this._doApplyEdits(m);let O=null;if(i&&w.length>0){w.sort((z,J)=>J.lineNumber-z.lineNumber),O=[];for(let z=0,J=w.length;z<J;z++){const Y=w[z].lineNumber;if(z>0&&w[z-1].lineNumber===Y)continue;const ae=w[z].oldContent,me=this.getLineContent(Y);me.length===0||me===ae||Ty(me)!==-1||O.push(Y)}}return this._onDidChangeContent.fire(),new dhi(I,P,O)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let i=!1;const n=e[0].range,s=e[e.length-1].range,c=new nt(n.startLineNumber,n.startColumn,s.endLineNumber,s.endColumn);let d=n.startLineNumber,f=n.startColumn;const m=[];for(let P=0,O=e.length;P<O;P++){const z=e[P],J=z.range;i=i||z.forceMoveMarkers,m.push(this.getValueInRange(new nt(d,f,J.startLineNumber,J.startColumn))),z.text.length>0&&m.push(z.text),d=J.endLineNumber,f=J.endColumn}const v=m.join(""),[x,w,I]=xR(v);return{sortIndex:0,identifier:e[0].identifier,range:c,rangeOffset:this.getOffsetAt(c.startLineNumber,c.startColumn),rangeLength:this.getValueLengthInRange(c,0),text:v,eolCount:x,firstLineLength:w,lastLineLength:I,forceMoveMarkers:i,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(Zq._sortOpsDescending);const i=[];for(let n=0;n<e.length;n++){const s=e[n],c=s.range.startLineNumber,d=s.range.startColumn,f=s.range.endLineNumber,m=s.range.endColumn;if(c===f&&d===m&&s.text.length===0)continue;s.text?(this._pieceTree.delete(s.rangeOffset,s.rangeLength),this._pieceTree.insert(s.rangeOffset,s.text,!0)):this._pieceTree.delete(s.rangeOffset,s.rangeLength);const v=new nt(c,d,f,m);i.push({range:v,rangeLength:s.rangeLength,text:s.text,rangeOffset:s.rangeOffset,forceMoveMarkers:s.forceMoveMarkers})}return i}findMatchesLineByLine(e,i,n,s){return this._pieceTree.findMatchesLineByLine(e,i,n,s)}static _getInverseEditRanges(e){const i=[];let n=0,s=0,c=null;for(let d=0,f=e.length;d<f;d++){const m=e[d];let v,x;c?c.range.endLineNumber===m.range.startLineNumber?(v=n,x=s+(m.range.startColumn-c.range.endColumn)):(v=n+(m.range.startLineNumber-c.range.endLineNumber),x=m.range.startColumn):(v=m.range.startLineNumber,x=m.range.startColumn);let w;if(m.text.length>0){const I=m.eolCount+1;I===1?w=new nt(v,x,v,x+m.firstLineLength):w=new nt(v,x,v+I-1,m.lastLineLength+1)}else w=new nt(v,x,v,x);n=w.endLineNumber,s=w.endColumn,i.push(w),c=m}return i}static _sortOpsAscending(e,i){const n=nt.compareRangesUsingEnds(e.range,i.range);return n===0?e.sortIndex-i.sortIndex:n}static _sortOpsDescending(e,i){const n=nt.compareRangesUsingEnds(e.range,i.range);return n===0?i.sortIndex-e.sortIndex:-n}}class ebi{constructor(e,i,n,s,c,d,f,m,v){this._chunks=e,this._bom=i,this._cr=n,this._lf=s,this._crlf=c,this._containsRTL=d,this._containsUnusualLineTerminators=f,this._isBasicASCII=m,this._normalizeEOL=v}_getEOL(e){const i=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return i===0?e===1?`
+`:`\r
+`:n>i/2?`\r
+`:`
+`}create(e){const i=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&(i===`\r
+`&&(this._cr>0||this._lf>0)||i===`
+`&&(this._cr>0||this._crlf>0)))for(let c=0,d=n.length;c<d;c++){const f=n[c].buffer.replace(/\r\n|\r|\n/g,i),m=g4(f);n[c]=new zF(f,m)}const s=new Zq(n,this._bom,i,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:s,disposable:s}}}class dEt{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(e){if(e.length===0)return;this.chunks.length===0&&r$e(e)&&(this.BOM=eui,e=e.substr(1));const i=e.charCodeAt(e.length-1);i===13||i>=55296&&i<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=i):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=i)}_acceptChunk1(e,i){!i&&e.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const i=Xvi(this._tmpLineStarts,e);this.chunks.push(new zF(e,i.lineStarts)),this.cr+=i.cr,this.lf+=i.lf,this.crlf+=i.crlf,i.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=k$(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=n2t(e)))}finish(e=!0){return this._finish(),new ebi(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const i=g4(e.buffer);e.lineStarts=i,this._previousChar===13&&this.cr++}}}class tbi{constructor(e){this._default=e,this._store=[]}get(e){return e<this._store.length?this._store[e]:this._default}set(e,i){for(;e>=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=i}replace(e,i,n){if(e>=this._store.length)return;if(i===0){this.insert(e,n);return}else if(n===0){this.delete(e,i);return}const s=this._store.slice(0,e),c=this._store.slice(e+i),d=ibi(n,this._default);this._store=s.concat(d,c)}delete(e,i){i===0||e>=this._store.length||this._store.splice(e,i)}insert(e,i){if(i===0||e>=this._store.length)return;const n=[];for(let s=0;s<i;s++)n[s]=this._default;this._store=kSe(this._store,e,n)}}function ibi(l,e){const i=[];for(let n=0;n<l;n++)i[n]=e;return i}class nbi{get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}constructor(e,i){this._startLineNumber=e,this._tokens=i}getLineTokens(e){return this._tokens[e-this._startLineNumber]}appendLineTokens(e){this._tokens.push(e)}}class oHe{constructor(){this._tokens=[]}add(e,i){if(this._tokens.length>0){const n=this._tokens[this._tokens.length-1];if(n.endLineNumber+1===e){n.appendLineTokens(i);return}}this._tokens.push(new nbi(e,[i]))}finalize(){return this._tokens}}class rbi{constructor(e,i){this.tokenizationSupport=i,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new aHe(e)}getStartState(e){return this.store.getStartState(e,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}}class sbi extends rbi{constructor(e,i,n,s){super(e,i),this._textModel=n,this._languageIdCodec=s}updateTokensUntilLine(e,i){const n=this._textModel.getLanguageId();for(;;){const s=this.getFirstInvalidLine();if(!s||s.lineNumber>i)break;const c=this._textModel.getLineContent(s.lineNumber),d=Bte(this._languageIdCodec,n,this.tokenizationSupport,c,!0,s.startState);e.add(s.lineNumber,d.tokens),this.store.setEndState(s.lineNumber,d.endState)}}getTokenTypeIfInsertingCharacter(e,i){const n=this.getStartState(e.lineNumber);if(!n)return 0;const s=this._textModel.getLanguageId(),c=this._textModel.getLineContent(e.lineNumber),d=c.substring(0,e.column-1)+i+c.substring(e.column-1),f=Bte(this._languageIdCodec,s,this.tokenizationSupport,d,!0,n),m=new Cg(f.tokens,d,this._languageIdCodec);if(m.getCount()===0)return 0;const v=m.findTokenIndexAtOffset(e.column-1);return m.getStandardTokenType(v)}tokenizeLineWithEdit(e,i,n){const s=e.lineNumber,c=e.column,d=this.getStartState(s);if(!d)return null;const f=this._textModel.getLineContent(s),m=f.substring(0,c-1)+n+f.substring(c-1+i),v=this._textModel.getLanguageIdAtPosition(s,0),x=Bte(this._languageIdCodec,v,this.tokenizationSupport,m,!0,d);return new Cg(x.tokens,m,this._languageIdCodec)}hasAccurateTokensForLine(e){const i=this.store.getFirstInvalidEndStateLineNumberOrMax();return e<i}isCheapToTokenize(e){const i=this.store.getFirstInvalidEndStateLineNumberOrMax();return e<i||e===i&&this._textModel.getLineLength(e)<2048}tokenizeHeuristically(e,i,n){if(n<=this.store.getFirstInvalidEndStateLineNumberOrMax())return{heuristicTokens:!1};if(i<=this.store.getFirstInvalidEndStateLineNumberOrMax())return this.updateTokensUntilLine(e,n),{heuristicTokens:!1};let s=this.guessStartState(i);const c=this._textModel.getLanguageId();for(let d=i;d<=n;d++){const f=this._textModel.getLineContent(d),m=Bte(this._languageIdCodec,c,this.tokenizationSupport,f,!0,s);e.add(d,m.tokens),s=m.endState}return{heuristicTokens:!0}}guessStartState(e){let i=this._textModel.getLineFirstNonWhitespaceColumn(e);const n=[];let s=null;for(let f=e-1;i>1&&f>=1;f--){const m=this._textModel.getLineFirstNonWhitespaceColumn(f);if(m!==0&&m<i&&(n.push(this._textModel.getLineContent(f)),i=m,s=this.getStartState(f),s))break}s||(s=this.tokenizationSupport.getInitialState()),n.reverse();const c=this._textModel.getLanguageId();let d=s;for(const f of n)d=Bte(this._languageIdCodec,c,this.tokenizationSupport,f,!1,d).endState;return d}}class aHe{constructor(e){this.lineCount=e,this._tokenizationStateStore=new obi,this._invalidEndStatesLineNumbers=new abi,this._invalidEndStatesLineNumbers.addRange(new xc(1,e+1))}getEndState(e){return this._tokenizationStateStore.getEndState(e)}setEndState(e,i){if(!i)throw new tu("Cannot set null/undefined state");this._invalidEndStatesLineNumbers.delete(e);const n=this._tokenizationStateStore.setEndState(e,i);return n&&e<this.lineCount&&this._invalidEndStatesLineNumbers.addRange(new xc(e+1,e+2)),n}acceptChange(e,i){this.lineCount+=i-e.length,this._tokenizationStateStore.acceptChange(e,i),this._invalidEndStatesLineNumbers.addRangeAndResize(new xc(e.startLineNumber,e.endLineNumberExclusive),i)}acceptChanges(e){for(const i of e){const[n]=xR(i.text);this.acceptChange(new Za(i.range.startLineNumber,i.range.endLineNumber+1),n+1)}}invalidateEndStateRange(e){this._invalidEndStatesLineNumbers.addRange(new xc(e.startLineNumber,e.endLineNumberExclusive))}getFirstInvalidEndStateLineNumber(){return this._invalidEndStatesLineNumbers.min}getFirstInvalidEndStateLineNumberOrMax(){return this.getFirstInvalidEndStateLineNumber()||Number.MAX_SAFE_INTEGER}allStatesValid(){return this._invalidEndStatesLineNumbers.min===null}getStartState(e,i){return e===1?i:this.getEndState(e-1)}getFirstInvalidLine(e){const i=this.getFirstInvalidEndStateLineNumber();if(i===null)return null;const n=this.getStartState(i,e);if(!n)throw new tu("Start state must be defined");return{lineNumber:i,startState:n}}}class obi{constructor(){this._lineEndStates=new tbi(null)}getEndState(e){return this._lineEndStates.get(e)}setEndState(e,i){const n=this._lineEndStates.get(e);return n&&n.equals(i)?!1:(this._lineEndStates.set(e,i),!0)}acceptChange(e,i){let n=e.length;i>0&&n>0&&(n--,i--),this._lineEndStates.replace(e.startLineNumber,n,i)}}class abi{constructor(){this._ranges=[]}get min(){return this._ranges.length===0?null:this._ranges[0].start}delete(e){const i=this._ranges.findIndex(n=>n.contains(e));if(i!==-1){const n=this._ranges[i];n.start===e?n.endExclusive===e+1?this._ranges.splice(i,1):this._ranges[i]=new xc(e+1,n.endExclusive):n.endExclusive===e+1?this._ranges[i]=new xc(n.start,e):this._ranges.splice(i,1,new xc(n.start,e),new xc(e+1,n.endExclusive))}}addRange(e){xc.addRange(e,this._ranges)}addRangeAndResize(e,i){let n=0;for(;!(n>=this._ranges.length||e.start<=this._ranges[n].endExclusive);)n++;let s=n;for(;!(s>=this._ranges.length||e.endExclusive<this._ranges[s].start);)s++;const c=i-e.length;for(let d=s;d<this._ranges.length;d++)this._ranges[d]=this._ranges[d].delta(c);if(n===s){const d=new xc(e.start,e.start+i);d.isEmpty||this._ranges.splice(n,0,d)}else{const d=Math.min(e.start,this._ranges[n].start),f=Math.max(e.endExclusive,this._ranges[s-1].endExclusive),m=new xc(d,f+c);m.isEmpty?this._ranges.splice(n,s-n):this._ranges.splice(n,s-n,m)}}toString(){return this._ranges.map(e=>e.toString()).join(" + ")}}function Bte(l,e,i,n,s,c){let d=null;if(i)try{d=i.tokenizeEncoded(n,s,c.clone())}catch(f){Pa(f)}return d||(d=fwe(l.encodeLanguageId(e),c)),Cg.convertToEndOffset(d.tokens,n.length),d}class cbi{constructor(e,i){this._tokenizerWithStateStore=e,this._backgroundTokenStore=i,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._isScheduled||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._isScheduled=!0,u2t(e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)}))}_backgroundTokenizeWithDeadline(e){const i=Date.now()+e.timeRemaining(),n=()=>{this._isDisposed||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()<i?Ikt(n):this._beginBackgroundTokenization())};n()}_backgroundTokenizeForAtLeast1ms(){const e=this._tokenizerWithStateStore._textModel.getLineCount(),i=new oHe,n=bg.create(!1);do if(n.elapsed()>1||this._tokenizeOneInvalidLine(i)>=e)break;while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(i.finalize()),this.checkFinished()}_hasLinesToTokenize(){return this._tokenizerWithStateStore?!this._tokenizerWithStateStore.store.allStatesValid():!1}_tokenizeOneInvalidLine(e){var n;const i=(n=this._tokenizerWithStateStore)==null?void 0:n.getFirstInvalidLine();return i?(this._tokenizerWithStateStore.updateTokensUntilLine(e,i.lineNumber),i.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,i){this._tokenizerWithStateStore.store.invalidateEndStateRange(new Za(e,i))}}class lbi{constructor(){this._onDidChangeVisibleRanges=new gi,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const e=new ubi(i=>{this._onDidChangeVisibleRanges.fire({view:e,state:i})});return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}}class ubi{constructor(e){this.handleStateChange=e}setVisibleLines(e,i){const n=e.map(s=>new Za(s.startLineNumber,s.endLineNumber+1));this.handleStateChange({visibleLineRanges:n,stabilized:i})}}class dbi extends xi{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new qu(()=>this.update(),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){Lf(this._computedLineRanges,this._lineRanges,(e,i)=>e.equals(i))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}class fEt extends xi{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(e,i,n){super(),this._languageIdCodec=e,this._textModel=i,this.getLanguageId=n,this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new gi),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event,this._onDidChangeTokens=this._register(new gi),this.onDidChangeTokens=this._onDidChangeTokens.event}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}}class LCt extends fEt{constructor(e,i,n,s){super(i,n,s),this._treeSitterService=e,this._tokenizationSupport=null,this._initialize()}_initialize(){const e=this.getLanguageId();(!this._tokenizationSupport||this._lastLanguageId!==e)&&(this._lastLanguageId=e,this._tokenizationSupport=SBe.get(e))}getLineTokens(e){const i=this._textModel.getLineContent(e);if(this._tokenizationSupport){const n=this._tokenizationSupport.tokenizeEncoded(e,this._textModel);if(n)return new Cg(n,i,this._languageIdCodec)}return Cg.createEmpty(i,this._languageIdCodec)}resetTokenization(e=!0){e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]}),this._initialize()}handleDidChangeAttached(){}handleDidChangeContent(e){e.isFlush&&this.resetTokenization(!1)}forceTokenization(e){}hasAccurateTokensForLine(e){return!0}isCheapToTokenize(e){return!0}getTokenTypeIfInsertingCharacter(e,i,n){return 0}tokenizeLineWithEdit(e,i,n){return null}get hasTokens(){return this._treeSitterService.getParseResult(this._textModel)!==void 0}}const hEt=jc("treeSitterParserService"),y4=new Uint32Array(0).buffer;class uL{static deleteBeginning(e,i){return e===null||e===y4?e:uL.delete(e,0,i)}static deleteEnding(e,i){if(e===null||e===y4)return e;const n=O4(e),s=n[n.length-2];return uL.delete(e,i,s)}static delete(e,i,n){if(e===null||e===y4||i===n)return e;const s=O4(e),c=s.length>>>1;if(i===0&&s[s.length-2]===n)return y4;const d=Cg.findIndexInTokensArray(s,i),f=d>0?s[d-1<<1]:0,m=s[d<<1];if(n<m){const P=n-i;for(let O=d;O<c;O++)s[O<<1]-=P;return e}let v,x;f!==i?(s[d<<1]=i,v=d+1<<1,x=i):(v=d<<1,x=f);const w=n-i;for(let P=d+1;P<c;P++){const O=s[P<<1]-w;O>x&&(s[v++]=O,s[v++]=s[(P<<1)+1],x=O)}if(v===s.length)return e;const I=new Uint32Array(v);return I.set(s.subarray(0,v),0),I.buffer}static append(e,i){if(i===y4)return e;if(e===y4)return i;if(e===null)return e;if(i===null)return null;const n=O4(e),s=O4(i),c=s.length>>>1,d=new Uint32Array(n.length+s.length);d.set(n,0);let f=n.length;const m=n[n.length-2];for(let v=0;v<c;v++)d[f++]=s[v<<1]+m,d[f++]=s[(v<<1)+1];return d.buffer}static insert(e,i,n){if(e===null||e===y4)return e;const s=O4(e),c=s.length>>>1;let d=Cg.findIndexInTokensArray(s,i);d>0&&s[d-1<<1]===i&&d--;for(let f=d;f<c;f++)s[f<<1]+=n;return e}}function O4(l){return l instanceof Uint32Array?l:new Uint32Array(l)}class fre{constructor(e){this._lineTokens=[],this._len=0,this._languageIdCodec=e}flush(){this._lineTokens=[],this._len=0}get hasTokens(){return this._lineTokens.length>0}getTokens(e,i,n){let s=null;if(i<this._len&&(s=this._lineTokens[i]),s!==null&&s!==y4)return new Cg(O4(s),n,this._languageIdCodec);const c=new Uint32Array(2);return c[0]=n.length,c[1]=PCt(this._languageIdCodec.encodeLanguageId(e)),new Cg(c,n,this._languageIdCodec)}static _massageTokens(e,i,n){const s=n?O4(n):null;if(i===0){let c=!1;if(s&&s.length>1&&(c=kb.getLanguageId(s[1])!==e),!c)return y4}if(!s||s.length===0){const c=new Uint32Array(2);return c[0]=i,c[1]=PCt(e),c.buffer}return s[s.length-2]=i,s.byteOffset===0&&s.byteLength===s.buffer.byteLength?s.buffer:s}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,i){i!==0&&(e+i>this._len&&(i=this._len-e),this._lineTokens.splice(e,i),this._len-=i)}_insertLines(e,i){if(i===0)return;const n=[];for(let s=0;s<i;s++)n[s]=null;this._lineTokens=kSe(this._lineTokens,e,n),this._len+=i}setTokens(e,i,n,s,c){const d=fre._massageTokens(this._languageIdCodec.encodeLanguageId(e),n,s);this._ensureLine(i);const f=this._lineTokens[i];return this._lineTokens[i]=d,c?!fre._equals(f,d):!1}static _equals(e,i){if(!e||!i)return!e&&!i;const n=O4(e),s=O4(i);if(n.length!==s.length)return!1;for(let c=0,d=n.length;c<d;c++)if(n[c]!==s[c])return!1;return!0}acceptEdit(e,i,n){this._acceptDeleteRange(e),this._acceptInsertText(new pi(e.startLineNumber,e.startColumn),i,n)}_acceptDeleteRange(e){const i=e.startLineNumber-1;if(i>=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._lineTokens[i]=uL.delete(this._lineTokens[i],e.startColumn-1,e.endColumn-1);return}this._lineTokens[i]=uL.deleteEnding(this._lineTokens[i],e.startColumn-1);const n=e.endLineNumber-1;let s=null;n<this._len&&(s=uL.deleteBeginning(this._lineTokens[n],e.endColumn-1)),this._lineTokens[i]=uL.append(this._lineTokens[i],s),this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,i,n){if(i===0&&n===0)return;const s=e.lineNumber-1;if(!(s>=this._len)){if(i===0){this._lineTokens[s]=uL.insert(this._lineTokens[s],e.column-1,n);return}this._lineTokens[s]=uL.deleteEnding(this._lineTokens[s],e.column-1),this._lineTokens[s]=uL.insert(this._lineTokens[s],e.column-1,n),this._insertLines(e.lineNumber,i)}}setMultilineTokens(e,i){if(e.length===0)return{changes:[]};const n=[];for(let s=0,c=e.length;s<c;s++){const d=e[s];let f=0,m=0,v=!1;for(let x=d.startLineNumber;x<=d.endLineNumber;x++)v?(this.setTokens(i.getLanguageId(),x-1,i.getLineLength(x),d.getLineTokens(x),!1),m=x):this.setTokens(i.getLanguageId(),x-1,i.getLineLength(x),d.getLineTokens(x),!0)&&(v=!0,f=x,m=x);v&&n.push({fromLineNumber:f,toLineNumber:m})}return{changes:n}}}function PCt(l){return(l<<0|0|0|32768|2<<24|1024)>>>0}class vJe{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(e,i){this._pieces=e||[],this._isComplete=i}setPartial(e,i){let n=e;if(i.length>0){const c=i[0].getRange(),d=i[i.length-1].getRange();if(!c||!d)return e;n=e.plusRange(c).plusRange(d)}let s=null;for(let c=0,d=this._pieces.length;c<d;c++){const f=this._pieces[c];if(f.endLineNumber<n.startLineNumber)continue;if(f.startLineNumber>n.endLineNumber){s=s||{index:c};break}if(f.removeTokens(n),f.isEmpty()){this._pieces.splice(c,1),c--,d--;continue}if(f.endLineNumber<n.startLineNumber)continue;if(f.startLineNumber>n.endLineNumber){s=s||{index:c};continue}const[m,v]=f.split(n);if(m.isEmpty()){s=s||{index:c};continue}v.isEmpty()||(this._pieces.splice(c,1,m,v),c++,d++,s=s||{index:c})}return s=s||{index:this._pieces.length},i.length>0&&(this._pieces=kSe(this._pieces,s.index,i)),n}isComplete(){return this._isComplete}addSparseTokens(e,i){if(i.getLineContent().length===0)return i;const n=this._pieces;if(n.length===0)return i;const s=vJe._findFirstPieceWithLine(n,e),c=n[s].getLineTokens(e);if(!c)return i;const d=i.getCount(),f=c.getCount();let m=0;const v=[];let x=0,w=0;const I=(P,O)=>{P!==w&&(w=P,v[x++]=P,v[x++]=O)};for(let P=0;P<f;P++){const O=c.getStartCharacter(P),z=c.getEndCharacter(P),J=c.getMetadata(P),Y=((J&1?2048:0)|(J&2?4096:0)|(J&4?8192:0)|(J&8?16384:0)|(J&16?16744448:0)|(J&32?4278190080:0))>>>0,ae=~Y>>>0;for(;m<d&&i.getEndOffset(m)<=O;)I(i.getEndOffset(m),i.getMetadata(m)),m++;for(m<d&&i.getStartOffset(m)<O&&I(O,i.getMetadata(m));m<d&&i.getEndOffset(m)<z;)I(i.getEndOffset(m),i.getMetadata(m)&ae|J&Y),m++;if(m<d)I(z,i.getMetadata(m)&ae|J&Y),i.getEndOffset(m)===z&&m++;else{const me=Math.min(Math.max(0,m-1),d-1);I(z,i.getMetadata(me)&ae|J&Y)}}for(;m<d;)I(i.getEndOffset(m),i.getMetadata(m)),m++;return new Cg(new Uint32Array(v),i.getLineContent(),this._languageIdCodec)}static _findFirstPieceWithLine(e,i){let n=0,s=e.length-1;for(;n<s;){let c=n+Math.floor((s-n)/2);if(e[c].endLineNumber<i)n=c+1;else if(e[c].startLineNumber>i)s=c-1;else{for(;c>n&&e[c-1].startLineNumber<=i&&i<=e[c-1].endLineNumber;)c--;return c}}return n}acceptEdit(e,i,n,s,c){for(const d of this._pieces)d.acceptEdit(e,i,n,s,c)}}var fbi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},QFe=function(l,e){return function(i,n){e(i,n,l)}},g1e;let cHe=g1e=class extends nEt{constructor(e,i,n,s,c,d,f){super(),this._textModel=e,this._bracketPairsTextModelPart=i,this._languageId=n,this._attachedViews=s,this._languageService=c,this._languageConfigurationService=d,this._treeSitterService=f,this._semanticTokens=new vJe(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new gi),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new gi),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new gi),this.onDidChangeTokens=this._onDidChangeTokens.event,this._tokensDisposables=this._register(new wn),this._register(this._languageConfigurationService.onDidChange(m=>{m.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})),this._register(Tr.filter(SBe.onDidChange,m=>m.changedLanguages.includes(this._languageId))(()=>{this.createPreferredTokenProvider()})),this.createPreferredTokenProvider()}createGrammarTokens(){return this._register(new ACt(this._languageService.languageIdCodec,this._textModel,()=>this._languageId,this._attachedViews))}createTreeSitterTokens(){return this._register(new LCt(this._treeSitterService,this._languageService.languageIdCodec,this._textModel,()=>this._languageId))}createTokens(e){var n;const i=this._tokens!==void 0;(n=this._tokens)==null||n.dispose(),this._tokens=e?this.createTreeSitterTokens():this.createGrammarTokens(),this._tokensDisposables.clear(),this._tokensDisposables.add(this._tokens.onDidChangeTokens(s=>{this._emitModelTokensChangedEvent(s)})),this._tokensDisposables.add(this._tokens.onDidChangeBackgroundTokenizationState(s=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()})),i&&this._tokens.resetTokenization()}createPreferredTokenProvider(){SBe.get(this._languageId)?this._tokens instanceof LCt||this.createTokens(!0):this._tokens instanceof ACt||this.createTokens(!1)}handleLanguageConfigurationServiceChange(e){e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const i of e.changes){const[n,s,c]=xR(i.text);this._semanticTokens.acceptEdit(i.range,n,s,c,i.text.length>0?i.text.charCodeAt(0):0)}this._tokens.handleDidChangeContent(e)}handleDidChangeAttached(){this._tokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const i=this._tokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,i)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new tu("Illegal value for lineNumber")}get hasTokens(){return this._tokens.hasTokens}resetTokenization(){this._tokens.resetTokenization()}get backgroundTokenizationState(){return this._tokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this._tokens.forceTokenization(e)}hasAccurateTokensForLine(e){return this.validateLineNumber(e),this._tokens.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this._tokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this._tokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,i,n){return this._tokens.getTokenTypeIfInsertingCharacter(e,i,n)}tokenizeLineWithEdit(e,i,n){return this._tokens.tokenizeLineWithEdit(e,i,n)}setSemanticTokens(e,i){this._semanticTokens.set(e,i),this._emitModelTokensChangedEvent({semanticTokensApplied:e!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,i){if(this.hasCompleteSemanticTokens())return;const n=this._textModel.validateRange(this._semanticTokens.setPartial(e,i));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:n.startLineNumber,toLineNumber:n.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();const i=this._textModel.validatePosition(e),n=this._textModel.getLineContent(i.lineNumber),s=this.getLineTokens(i.lineNumber),c=s.findTokenIndexAtOffset(i.column-1),[d,f]=g1e._findLanguageBoundaries(s,c),m=Nne(i.column,this.getLanguageConfiguration(s.getLanguageId(c)).getWordDefinition(),n.substring(d,f),d);if(m&&m.startColumn<=e.column&&e.column<=m.endColumn)return m;if(c>0&&d===i.column-1){const[v,x]=g1e._findLanguageBoundaries(s,c-1),w=Nne(i.column,this.getLanguageConfiguration(s.getLanguageId(c-1)).getWordDefinition(),n.substring(v,x),v);if(w&&w.startColumn<=e.column&&e.column<=w.endColumn)return w}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,i){const n=e.getLanguageId(i);let s=0;for(let d=i;d>=0&&e.getLanguageId(d)===n;d--)s=e.getStartOffset(d);let c=e.getLineContent().length;for(let d=i,f=e.getCount();d<f&&e.getLanguageId(d)===n;d++)c=e.getEndOffset(d);return[s,c]}getWordUntilPosition(e){const i=this.getWordAtPosition(e);return i?{word:i.word.substr(0,e.column-i.startColumn),startColumn:i.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}}getLanguageId(){return this._languageId}getLanguageIdAtPosition(e,i){const n=this._textModel.validatePosition(new pi(e,i)),s=this.getLineTokens(n.lineNumber);return s.getLanguageId(s.findTokenIndexAtOffset(n.column-1))}setLanguageId(e,i="api"){if(this._languageId===e)return;const n={oldLanguage:this._languageId,newLanguage:e,source:i};this._languageId=e,this._bracketPairsTextModelPart.handleDidChangeLanguage(n),this._tokens.resetTokenization(),this.createPreferredTokenProvider(),this._onDidChangeLanguage.fire(n),this._onDidChangeLanguageConfiguration.fire({})}};cHe=g1e=fbi([QFe(4,Pf),QFe(5,rh),QFe(6,hEt)],cHe);class ACt extends fEt{constructor(e,i,n,s){super(e,i,n),this._tokenizer=null,this._defaultBackgroundTokenizer=null,this._backgroundTokenizer=this._register(new Fm),this._tokens=new fre(this._languageIdCodec),this._debugBackgroundTokenizer=this._register(new Fm),this._attachedViewStates=this._register(new Jqe),this._register(Oh.onDidChange(c=>{const d=this.getLanguageId();c.changedLanguages.indexOf(d)!==-1&&this.resetTokenization()})),this.resetTokenization(),this._register(s.onDidChangeVisibleRanges(({view:c,state:d})=>{if(d){let f=this._attachedViewStates.get(c);f||(f=new dbi(()=>this.refreshRanges(f.lineRanges)),this._attachedViewStates.set(c,f)),f.handleStateChange(d)}else this._attachedViewStates.deleteAndDispose(c)}))}resetTokenization(e=!0){var c;this._tokens.flush(),(c=this._debugBackgroundTokens)==null||c.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new aHe(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const i=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const d=Oh.get(this.getLanguageId());if(!d)return[null,null];let f;try{f=d.getInitialState()}catch(m){return Pa(m),[null,null]}return[d,f]},[n,s]=i();if(n&&s?this._tokenizer=new sbi(this._textModel.getLineCount(),n,this._textModel,this._languageIdCodec):this._tokenizer=null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const d={setTokens:f=>{this.setTokens(f)},backgroundTokenizationFinished:()=>{if(this._backgroundTokenizationState===2)return;const f=2;this._backgroundTokenizationState=f,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(f,m)=>{var x;if(!this._tokenizer)return;const v=this._tokenizer.store.getFirstInvalidEndStateLineNumber();v!==null&&f>=v&&((x=this._tokenizer)==null||x.store.setEndState(f,m))}};n&&n.createBackgroundTokenizer&&!n.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=n.createBackgroundTokenizer(this._textModel,d)),!this._backgroundTokenizer.value&&!this._textModel.isTooLargeForTokenization()&&(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new cbi(this._tokenizer,d),this._defaultBackgroundTokenizer.handleChanges()),n!=null&&n.backgroundTokenizerShouldOnlyVerifyTokens&&n.createBackgroundTokenizer?(this._debugBackgroundTokens=new fre(this._languageIdCodec),this._debugBackgroundStates=new aHe(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=n.createBackgroundTokenizer(this._textModel,{setTokens:f=>{var m;(m=this._debugBackgroundTokens)==null||m.setMultilineTokens(f,this._textModel)},backgroundTokenizationFinished(){},setEndState:(f,m)=>{var v;(v=this._debugBackgroundStates)==null||v.setEndState(f,m)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){var e;(e=this._defaultBackgroundTokenizer)==null||e.handleChanges()}handleDidChangeContent(e){var i,n,s;if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(const c of e.changes){const[d,f]=xR(c.text);this._tokens.acceptEdit(c.range,d,f),(i=this._debugBackgroundTokens)==null||i.acceptEdit(c.range,d,f)}(n=this._debugBackgroundStates)==null||n.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),(s=this._defaultBackgroundTokenizer)==null||s.handleChanges()}}setTokens(e){const{changes:i}=this._tokens.setMultilineTokens(e,this._textModel);return i.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:i}),{changes:i}}refreshAllVisibleLineTokens(){const e=Za.joinMany([...this._attachedViewStates].map(([i,n])=>n.lineRanges));this.refreshRanges(e)}refreshRanges(e){for(const i of e)this.refreshRange(i.startLineNumber,i.endLineNumberExclusive-1)}refreshRange(e,i){var d,f;if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),i=Math.min(this._textModel.getLineCount(),i);const n=new oHe,{heuristicTokens:s}=this._tokenizer.tokenizeHeuristically(n,e,i),c=this.setTokens(n.finalize());if(s)for(const m of c.changes)(d=this._backgroundTokenizer.value)==null||d.requestTokens(m.fromLineNumber,m.toLineNumber+1);(f=this._defaultBackgroundTokenizer)==null||f.checkFinished()}forceTokenization(e){var n,s;const i=new oHe;(n=this._tokenizer)==null||n.updateTokensUntilLine(i,e),this.setTokens(i.finalize()),(s=this._defaultBackgroundTokenizer)==null||s.checkFinished()}hasAccurateTokensForLine(e){return this._tokenizer?this._tokenizer.hasAccurateTokensForLine(e):!0}isCheapToTokenize(e){return this._tokenizer?this._tokenizer.isCheapToTokenize(e):!0}getLineTokens(e){var s;const i=this._textModel.getLineContent(e),n=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,i);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const c=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,i);!n.equals(c)&&((s=this._debugBackgroundTokenizer.value)!=null&&s.reportMismatchingTokens)&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return n}getTokenTypeIfInsertingCharacter(e,i,n){if(!this._tokenizer)return 0;const s=this._textModel.validatePosition(new pi(e,i));return this.forceTokenization(s.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(s,n)}tokenizeLineWithEdit(e,i,n){if(!this._tokenizer)return null;const s=this._textModel.validatePosition(e);return this.forceTokenization(s.lineNumber),this._tokenizer.tokenizeLineWithEdit(s,i,n)}get hasTokens(){return this._tokens.hasTokens}}class hbi{constructor(){this.changeType=1}}class UE{static applyInjectedText(e,i){if(!i||i.length===0)return e;let n="",s=0;for(const c of i)n+=e.substring(s,c.column-1),s=c.column-1,n+=c.options.content;return n+=e.substring(s),n}static fromDecorations(e){const i=[];for(const n of e)n.options.before&&n.options.before.content.length>0&&i.push(new UE(n.ownerId,n.range.startLineNumber,n.range.startColumn,n.options.before,0)),n.options.after&&n.options.after.content.length>0&&i.push(new UE(n.ownerId,n.range.endLineNumber,n.range.endColumn,n.options.after,1));return i.sort((n,s)=>n.lineNumber===s.lineNumber?n.column===s.column?n.order-s.order:n.column-s.column:n.lineNumber-s.lineNumber),i}constructor(e,i,n,s,c){this.ownerId=e,this.lineNumber=i,this.column=n,this.options=s,this.order=c}}class OCt{constructor(e,i,n){this.changeType=2,this.lineNumber=e,this.detail=i,this.injectedText=n}}class _bi{constructor(e,i){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=i}}class pbi{constructor(e,i,n,s){this.changeType=4,this.injectedTexts=s,this.fromLineNumber=e,this.toLineNumber=i,this.detail=n}}class mbi{constructor(){this.changeType=5}}class Yq{constructor(e,i,n,s){this.changes=e,this.versionId=i,this.isUndoing=n,this.isRedoing=s,this.resultingSelection=null}containsEvent(e){for(let i=0,n=this.changes.length;i<n;i++)if(this.changes[i].changeType===e)return!0;return!1}static merge(e,i){const n=[].concat(e.changes).concat(i.changes),s=i.versionId,c=e.isUndoing||i.isUndoing,d=e.isRedoing||i.isRedoing;return new Yq(n,s,c,d)}}class _Et{constructor(e){this.changes=e}}class y9{constructor(e,i){this.rawContentChangedEvent=e,this.contentChangedEvent=i}merge(e){const i=Yq.merge(this.rawContentChangedEvent,e.rawContentChangedEvent),n=y9._mergeChangeEvents(this.contentChangedEvent,e.contentChangedEvent);return new y9(i,n)}static _mergeChangeEvents(e,i){const n=[].concat(e.changes).concat(i.changes),s=i.eol,c=i.versionId,d=e.isUndoing||i.isUndoing,f=e.isRedoing||i.isRedoing,m=e.isFlush||i.isFlush,v=e.isEolChange&&i.isEolChange;return{changes:n,eol:s,isEolChange:v,versionId:c,isUndoing:d,isRedoing:f,isFlush:m}}}var gbi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},p0e=function(l,e){return function(i,n){e(i,n,l)}},EF;function ybi(l){const e=new dEt;return e.acceptChunk(l),e.finish()}function vbi(l){const e=new dEt;let i;for(;typeof(i=l.read())=="string";)e.acceptChunk(i);return e.finish()}function MCt(l,e){let i;return typeof l=="string"?i=ybi(l):lhi(l)?i=vbi(l):i=l,i.create(e)}let m0e=0;const bbi=999,Cbi=1e4;class Sbi{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let i=0,n=0;do{const s=this._source.read();if(s===null)return this._eos=!0,i===0?null:e.join("");if(s.length>0&&(e[i++]=s,n+=s.length),n>=64*1024)return e.join("")}while(!0)}}const Wte=()=>{throw new Error("Invalid change accessor")};var kE;let LE=(kE=class extends xi{static resolveOptions(e,i){if(i.detectIndentation){const n=wCt(e,i.tabSize,i.insertSpaces);return new a1e({tabSize:n.tabSize,indentSize:"tabSize",insertSpaces:n.insertSpaces,trimAutoWhitespace:i.trimAutoWhitespace,defaultEOL:i.defaultEOL,bracketPairColorizationOptions:i.bracketPairColorizationOptions})}return new a1e(i)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent(i=>e(i.contentChangedEvent))}onDidChangeContentOrInjectedText(e){return gT(this._eventEmitter.fastEvent(i=>e(i)),this._onDidChangeInjectedText.event(i=>e(i)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,i,n,s=null,c,d,f,m){super(),this._undoRedoService=c,this._languageService=d,this._languageConfigurationService=f,this.instantiationService=m,this._onWillDispose=this._register(new gi),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new Ebi(O=>this.handleBeforeFireDecorationsChangedEvent(O))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new gi),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new gi),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new gi),this._eventEmitter=this._register(new Ibi),this._languageSelectionListener=this._register(new Fm),this._deltaDecorationCallCnt=0,this._attachedViews=new lbi,m0e++,this.id="$model"+m0e,this.isForSimpleWidget=n.isForSimpleWidget,typeof s>"u"||s===null?this._associatedResource=yo.parse("inmemory://model/"+m0e):this._associatedResource=s,this._attachedEditorCount=0;const{textBuffer:v,disposable:x}=MCt(e,n.defaultEOL);this._buffer=v,this._bufferDisposable=x,this._options=EF.resolveOptions(this._buffer,n);const w=typeof i=="string"?i:i.languageId;typeof i!="string"&&(this._languageSelectionListener.value=i.onDidChange(()=>this._setLanguage(i.languageId))),this._bracketPairs=this._register(new Evi(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new Avi(this,this._languageConfigurationService)),this._decorationProvider=this._register(new Nvi(this)),this._tokenizationTextModelPart=this.instantiationService.createInstance(cHe,this,this._bracketPairs,w,this._attachedViews);const I=this._buffer.getLineCount(),P=this._buffer.getValueLengthInRange(new nt(1,1,I,this._buffer.getLineLength(I)+1),0);n.largeFileOptimizations?(this._isTooLargeForTokenization=P>EF.LARGE_FILE_SIZE_THRESHOLD||I>EF.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=P>EF.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=P>EF._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=r2t(m0e),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new RCt,this._commandManager=new pJe(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})),this._languageService.requestRichLanguageFeatures(w),this._register(this._languageConfigurationService.onDidChange(O=>{this._bracketPairs.handleLanguageConfigurationServiceChange(O),this._tokenizationTextModelPart.handleLanguageConfigurationServiceChange(O)}))}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new Zq([],"",`
+`,!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=xi.None}_assertNotDisposed(){if(this._isDisposed)throw new tu("Model is disposed!")}_emitContentChangedEvent(e,i){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(i),this._bracketPairs.handleDidChangeContent(i),this._eventEmitter.fire(new y9(e,i)))}setValue(e){if(this._assertNotDisposed(),e==null)throw gk();const{textBuffer:i,disposable:n}=MCt(e,this._options.defaultEOL);this._setValueFromTextBuffer(i,n)}_createContentChanged2(e,i,n,s,c,d,f,m){return{changes:[{range:e,rangeOffset:i,rangeLength:n,text:s}],eol:this._buffer.getEOL(),isEolChange:m,versionId:this.getVersionId(),isUndoing:c,isRedoing:d,isFlush:f}}_setValueFromTextBuffer(e,i){this._assertNotDisposed();const n=this.getFullModelRange(),s=this.getValueLengthInRange(n),c=this.getLineCount(),d=this.getLineMaxColumn(c);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=i,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new RCt,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new Yq([new hbi],this._versionId,!1,!1),this._createContentChanged2(new nt(1,1,c,d),0,s,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();const i=e===1?`\r
+`:`
+`;if(this._buffer.getEOL()===i)return;const n=this.getFullModelRange(),s=this.getValueLengthInRange(n),c=this.getLineCount(),d=this.getLineMaxColumn(c);this._onBeforeEOLChange(),this._buffer.setEOL(i),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new Yq([new mbi],this._versionId,!1,!1),this._createContentChanged2(new nt(1,1,c,d),0,s,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),i=this._decorationsTree.collectNodesPostOrder();for(let n=0,s=i.length;n<s;n++){const c=i[n],d=c.range,f=c.cachedAbsoluteStart-c.start,m=this._buffer.getOffsetAt(d.startLineNumber,d.startColumn),v=this._buffer.getOffsetAt(d.endLineNumber,d.endColumn);c.cachedAbsoluteStart=m,c.cachedAbsoluteEnd=v,c.cachedVersionId=e,c.start=m-f,c.end=v-f,DR(c)}}onBeforeAttached(){return this._attachedEditorCount++,this._attachedEditorCount===1&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0)),this._attachedViews.attachView()}onBeforeDetached(e){this._attachedEditorCount--,this._attachedEditorCount===0&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0)),this._attachedViews.detachView(e)}isAttachedToEditor(){return this._attachedEditorCount>0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,i=0;const n=this._buffer.getLineCount();for(let s=1;s<=n;s++){const c=this._buffer.getLineLength(s);c>=Cbi?i+=c:e+=c}return i>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const i=typeof e.tabSize<"u"?e.tabSize:this._options.tabSize,n=typeof e.indentSize<"u"?e.indentSize:this._options.originalIndentSize,s=typeof e.insertSpaces<"u"?e.insertSpaces:this._options.insertSpaces,c=typeof e.trimAutoWhitespace<"u"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,d=typeof e.bracketColorizationOptions<"u"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,f=new a1e({tabSize:i,indentSize:n,insertSpaces:s,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:c,bracketPairColorizationOptions:d});if(this._options.equals(f))return;const m=this._options.createChangeEvent(f);this._options=f,this._bracketPairs.handleDidChangeOptions(m),this._decorationProvider.handleDidChangeOptions(m),this._onDidChangeOptions.fire(m)}detectIndentation(e,i){this._assertNotDisposed();const n=wCt(this._buffer,i,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),uJe(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const i=this.findMatches(i2t.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,i.map(n=>({range:n.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const i=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(i.lineNumber,i.column)}getPositionAt(e){this._assertNotDisposed();const i=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(i)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,i=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new tu("Operation would exceed heap memory limits");const n=this.getFullModelRange(),s=this.getValueInRange(n,e);return i?this._buffer.getBOM()+s:s}createSnapshot(e=!1){return new Sbi(this._buffer.createSnapshot(e))}getValueLength(e,i=!1){this._assertNotDisposed();const n=this.getFullModelRange(),s=this.getValueLengthInRange(n,e);return i?this._buffer.getBOM().length+s:s}getValueInRange(e,i=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),i)}getValueLengthInRange(e,i=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),i)}getCharacterCountInRange(e,i=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),i)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new tu("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new tu("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new tu("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===`
+`?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new tu("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new tu("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new tu("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const i=this._buffer.getLineCount(),n=e.startLineNumber,s=e.startColumn;let c=Math.floor(typeof n=="number"&&!isNaN(n)?n:1),d=Math.floor(typeof s=="number"&&!isNaN(s)?s:1);if(c<1)c=1,d=1;else if(c>i)c=i,d=this.getLineMaxColumn(c);else if(d<=1)d=1;else{const w=this.getLineMaxColumn(c);d>=w&&(d=w)}const f=e.endLineNumber,m=e.endColumn;let v=Math.floor(typeof f=="number"&&!isNaN(f)?f:1),x=Math.floor(typeof m=="number"&&!isNaN(m)?m:1);if(v<1)v=1,x=1;else if(v>i)v=i,x=this.getLineMaxColumn(v);else if(x<=1)x=1;else{const w=this.getLineMaxColumn(v);x>=w&&(x=w)}return n===c&&s===d&&f===v&&m===x&&e instanceof nt&&!(e instanceof Us)?e:new nt(c,d,v,x)}_isValidPosition(e,i,n){if(typeof e!="number"||typeof i!="number"||isNaN(e)||isNaN(i)||e<1||i<1||(e|0)!==e||(i|0)!==i)return!1;const s=this._buffer.getLineCount();if(e>s)return!1;if(i===1)return!0;const c=this.getLineMaxColumn(e);if(i>c)return!1;if(n===1){const d=this._buffer.getLineCharCode(e,i-2);if(Pm(d))return!1}return!0}_validatePosition(e,i,n){const s=Math.floor(typeof e=="number"&&!isNaN(e)?e:1),c=Math.floor(typeof i=="number"&&!isNaN(i)?i:1),d=this._buffer.getLineCount();if(s<1)return new pi(1,1);if(s>d)return new pi(d,this.getLineMaxColumn(d));if(c<=1)return new pi(s,1);const f=this.getLineMaxColumn(s);if(c>=f)return new pi(s,f);if(n===1){const m=this._buffer.getLineCharCode(s,c-2);if(Pm(m))return new pi(s,c-1)}return new pi(s,c)}validatePosition(e){return this._assertNotDisposed(),e instanceof pi&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,i){const n=e.startLineNumber,s=e.startColumn,c=e.endLineNumber,d=e.endColumn;if(!this._isValidPosition(n,s,0)||!this._isValidPosition(c,d,0))return!1;if(i===1){const f=s>1?this._buffer.getLineCharCode(n,s-2):0,m=d>1&&d<=this._buffer.getLineLength(c)?this._buffer.getLineCharCode(c,d-2):0,v=Pm(f),x=Pm(m);return!v&&!x}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof nt&&!(e instanceof Us)&&this._isValidRange(e,1))return e;const n=this._validatePosition(e.startLineNumber,e.startColumn,0),s=this._validatePosition(e.endLineNumber,e.endColumn,0),c=n.lineNumber,d=n.column,f=s.lineNumber,m=s.column;{const v=d>1?this._buffer.getLineCharCode(c,d-2):0,x=m>1&&m<=this._buffer.getLineLength(f)?this._buffer.getLineCharCode(f,m-2):0,w=Pm(v),I=Pm(x);return!w&&!I?new nt(c,d,f,m):c===f&&d===m?new nt(c,d-1,f,m-1):w&&I?new nt(c,d-1,f,m+1):w?new nt(c,d-1,f,m):new nt(c,d,f,m+1)}}modifyPosition(e,i){this._assertNotDisposed();const n=this.getOffsetAt(e)+i;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new nt(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,i,n,s){return this._buffer.findMatchesLineByLine(e,i,n,s)}findMatches(e,i,n,s,c,d,f=bbi){this._assertNotDisposed();let m=null;i!==null&&(Array.isArray(i)||(i=[i]),i.every(w=>nt.isIRange(w))&&(m=i.map(w=>this.validateRange(w)))),m===null&&(m=[this.getFullModelRange()]),m=m.sort((w,I)=>w.startLineNumber-I.startLineNumber||w.startColumn-I.startColumn);const v=[];v.push(m.reduce((w,I)=>nt.areIntersecting(w,I)?w.plusRange(I):(v.push(w),I)));let x;if(!n&&e.indexOf(`
+`)<0){const I=new DF(e,n,s,c).parseSearchRequest();if(!I)return[];x=P=>this.findMatchesLineByLine(P,I,d,f)}else x=w=>Xge.findMatches(this,new DF(e,n,s,c),w,d,f);return v.map(x).reduce((w,I)=>w.concat(I),[])}findNextMatch(e,i,n,s,c,d){this._assertNotDisposed();const f=this.validatePosition(i);if(!n&&e.indexOf(`
+`)<0){const v=new DF(e,n,s,c).parseSearchRequest();if(!v)return null;const x=this.getLineCount();let w=new nt(f.lineNumber,f.column,x,this.getLineMaxColumn(x)),I=this.findMatchesLineByLine(w,v,d,1);return Xge.findNextMatch(this,new DF(e,n,s,c),f,d),I.length>0||(w=new nt(1,1,f.lineNumber,this.getLineMaxColumn(f.lineNumber)),I=this.findMatchesLineByLine(w,v,d,1),I.length>0)?I[0]:null}return Xge.findNextMatch(this,new DF(e,n,s,c),f,d)}findPreviousMatch(e,i,n,s,c,d){this._assertNotDisposed();const f=this.validatePosition(i);return Xge.findPreviousMatch(this,new DF(e,n,s,c),f,d)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if((this.getEOL()===`
+`?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof xFe?e:new xFe(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const i=[];for(let n=0,s=e.length;n<s;n++)i[n]=this._validateEditOperation(e[n]);return i}pushEditOperations(e,i,n,s){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,this._validateEditOperations(i),n,s)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(e,i,n,s){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){const c=i.map(f=>({range:this.validateRange(f.range),text:f.text}));let d=!0;if(e)for(let f=0,m=e.length;f<m;f++){const v=e[f];let x=!1;for(let w=0,I=c.length;w<I;w++){const P=c[w].range,O=P.startLineNumber>v.endLineNumber,z=v.startLineNumber>P.endLineNumber;if(!O&&!z){x=!0;break}}if(!x){d=!1;break}}if(d)for(let f=0,m=this._trimAutoWhitespaceLines.length;f<m;f++){const v=this._trimAutoWhitespaceLines[f],x=this.getLineMaxColumn(v);let w=!0;for(let I=0,P=c.length;I<P;I++){const O=c[I].range,z=c[I].text;if(!(v<O.startLineNumber||v>O.endLineNumber)&&!(v===O.startLineNumber&&O.startColumn===x&&O.isEmpty()&&z&&z.length>0&&z.charAt(0)===`
+`)&&!(v===O.startLineNumber&&O.startColumn===1&&O.isEmpty()&&z&&z.length>0&&z.charAt(z.length-1)===`
+`)){w=!1;break}}if(w){const I=new nt(v,1,v,x);i.push(new xFe(null,I,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,i,n,s)}_applyUndo(e,i,n,s){const c=e.map(d=>{const f=this.getPositionAt(d.newPosition),m=this.getPositionAt(d.newEnd);return{range:new nt(f.lineNumber,f.column,m.lineNumber,m.column),text:d.oldText}});this._applyUndoRedoEdits(c,i,!0,!1,n,s)}_applyRedo(e,i,n,s){const c=e.map(d=>{const f=this.getPositionAt(d.oldPosition),m=this.getPositionAt(d.oldEnd);return{range:new nt(f.lineNumber,f.column,m.lineNumber,m.column),text:d.newText}});this._applyUndoRedoEdits(c,i,!1,!0,n,s)}_applyUndoRedoEdits(e,i,n,s,c,d){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=n,this._isRedoing=s,this.applyEdits(e,!1),this.setEOL(i),this._overwriteAlternativeVersionId(c)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(d),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,i=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const n=this._validateEditOperations(e);return this._doApplyEdits(n,i)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,i){const n=this._buffer.getLineCount(),s=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,i),c=this._buffer.getLineCount(),d=s.changes;if(this._trimAutoWhitespaceLines=s.trimAutoWhitespaceLineNumbers,d.length!==0){for(let v=0,x=d.length;v<x;v++){const w=d[v];this._decorationsTree.acceptReplace(w.rangeOffset,w.rangeLength,w.text.length,w.forceMoveMarkers)}const f=[];this._increaseVersionId();let m=n;for(let v=0,x=d.length;v<x;v++){const w=d[v],[I]=xR(w.text);this._onDidChangeDecorations.fire();const P=w.range.startLineNumber,O=w.range.endLineNumber,z=O-P,J=I,Y=Math.min(z,J),ae=J-z,me=c-m-ae+P,ye=me,Ce=me+J,Fe=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new pi(ye,1)),this.getOffsetAt(new pi(Ce,this.getLineMaxColumn(Ce))),0),rt=UE.fromDecorations(Fe),ct=new s6(rt);for(let Mt=Y;Mt>=0;Mt--){const Yt=P+Mt,Bi=me+Mt;ct.takeFromEndWhile($t=>$t.lineNumber>Bi);const $i=ct.takeFromEndWhile($t=>$t.lineNumber===Bi);f.push(new OCt(Yt,this.getLineContent(Bi),$i))}if(Y<z){const Mt=P+Y;f.push(new _bi(Mt+1,O))}if(Y<J){const Mt=new s6(rt),Yt=P+Y,Bi=J-Y,$i=c-m-Bi+Yt+1,$t=[],Hi=[];for(let An=0;An<Bi;An++){const qt=$i+An;Hi[An]=this.getLineContent(qt),Mt.takeWhile(ms=>ms.lineNumber<qt),$t[An]=Mt.takeWhile(ms=>ms.lineNumber===qt)}f.push(new pbi(Yt+1,P+J,Hi,$t))}m+=ae}this._emitContentChangedEvent(new Yq(f,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:d,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return s.reverseEdits===null?void 0:s.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(e===null||e.size===0)return;const n=Array.from(e).map(s=>new OCt(s,this.getLineContent(s),this._getInjectedTextInLine(s)));this._onDidChangeInjectedText.fire(new _Et(n))}changeDecorations(e,i=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(i,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,i){const n={addDecoration:(c,d)=>this._deltaDecorationsImpl(e,[],[{range:c,options:d}])[0],changeDecoration:(c,d)=>{this._changeDecorationImpl(c,d)},changeDecorationOptions:(c,d)=>{this._changeDecorationOptionsImpl(c,BCt(d))},removeDecoration:c=>{this._deltaDecorationsImpl(e,[c],[])},deltaDecorations:(c,d)=>c.length===0&&d.length===0?[]:this._deltaDecorationsImpl(e,c,d)};let s=null;try{s=i(n)}catch(c){Pa(c)}return n.addDecoration=Wte,n.changeDecoration=Wte,n.changeDecorationOptions=Wte,n.removeDecoration=Wte,n.deltaDecorations=Wte,s}deltaDecorations(e,i,n=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&i.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),Pa(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(n,e,i)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,i,n){const s=e?this._decorations[e]:null;if(!s)return i?this._deltaDecorationsImpl(0,[],[{range:i,options:FCt[n]}],!0)[0]:null;if(!i)return this._decorationsTree.delete(s),delete this._decorations[s.id],null;const c=this._validateRangeRelaxedNoAllocations(i),d=this._buffer.getOffsetAt(c.startLineNumber,c.startColumn),f=this._buffer.getOffsetAt(c.endLineNumber,c.endColumn);return this._decorationsTree.delete(s),s.reset(this.getVersionId(),d,f,c),s.setOptions(FCt[n]),this._decorationsTree.insert(s),s.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const i=this._decorationsTree.collectNodesFromOwner(e);for(let n=0,s=i.length;n<s;n++){const c=i[n];this._decorationsTree.delete(c),delete this._decorations[c.id]}}getDecorationOptions(e){const i=this._decorations[e];return i?i.options:null}getDecorationRange(e){const i=this._decorations[e];return i?this._decorationsTree.getNodeRange(this,i):null}getLineDecorations(e,i=0,n=!1){return e<1||e>this.getLineCount()?[]:this.getLinesDecorations(e,e,i,n)}getLinesDecorations(e,i,n=0,s=!1,c=!1){const d=this.getLineCount(),f=Math.min(d,Math.max(1,e)),m=Math.min(d,Math.max(1,i)),v=this.getLineMaxColumn(m),x=new nt(f,1,m,v),w=this._getDecorationsInRange(x,n,s,c);return aBe(w,this._decorationProvider.getDecorationsInRange(x,n,s)),w}getDecorationsInRange(e,i=0,n=!1,s=!1,c=!1){const d=this.validateRange(e),f=this._getDecorationsInRange(d,i,n,c);return aBe(f,this._decorationProvider.getDecorationsInRange(d,i,n,s)),f}getOverviewRulerDecorations(e=0,i=!1){return this._decorationsTree.getAll(this,e,i,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const i=this._buffer.getOffsetAt(e,1),n=i+this._buffer.getLineLength(e),s=this._decorationsTree.getInjectedTextInInterval(this,i,n,0);return UE.fromDecorations(s).filter(c=>c.lineNumber===e)}getAllDecorations(e=0,i=!1){let n=this._decorationsTree.getAll(this,e,i,!1,!1);return n=n.concat(this._decorationProvider.getAllDecorations(e,i)),n}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,i,n,s){const c=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),d=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,c,d,i,n,s)}getRangeAt(e,i){return this._buffer.getRangeAt(e,i-e)}_changeDecorationImpl(e,i){const n=this._decorations[e];if(!n)return;if(n.options.after){const f=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(f.endLineNumber)}if(n.options.before){const f=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(f.startLineNumber)}const s=this._validateRangeRelaxedNoAllocations(i),c=this._buffer.getOffsetAt(s.startLineNumber,s.startColumn),d=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);this._decorationsTree.delete(n),n.reset(this.getVersionId(),c,d,s),this._decorationsTree.insert(n),this._onDidChangeDecorations.checkAffectedAndFire(n.options),n.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(s.endLineNumber),n.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(s.startLineNumber)}_changeDecorationOptionsImpl(e,i){const n=this._decorations[e];if(!n)return;const s=!!(n.options.overviewRuler&&n.options.overviewRuler.color),c=!!(i.overviewRuler&&i.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(n.options),this._onDidChangeDecorations.checkAffectedAndFire(i),n.options.after||i.after){const m=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(m.endLineNumber)}if(n.options.before||i.before){const m=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(m.startLineNumber)}const d=s!==c,f=xbi(i)!==y1e(n);d||f?(this._decorationsTree.delete(n),n.setOptions(i),this._decorationsTree.insert(n)):n.setOptions(i)}_deltaDecorationsImpl(e,i,n,s=!1){const c=this.getVersionId(),d=i.length;let f=0;const m=n.length;let v=0;this._onDidChangeDecorations.beginDeferredEmit();try{const x=new Array(m);for(;f<d||v<m;){let w=null;if(f<d){do w=this._decorations[i[f++]];while(!w&&f<d);if(w){if(w.options.after){const I=this._decorationsTree.getNodeRange(this,w);this._onDidChangeDecorations.recordLineAffectedByInjectedText(I.endLineNumber)}if(w.options.before){const I=this._decorationsTree.getNodeRange(this,w);this._onDidChangeDecorations.recordLineAffectedByInjectedText(I.startLineNumber)}this._decorationsTree.delete(w),s||this._onDidChangeDecorations.checkAffectedAndFire(w.options)}}if(v<m){if(!w){const Y=++this._lastDecorationId,ae=`${this._instanceId};${Y}`;w=new aEt(ae,0,0),this._decorations[ae]=w}const I=n[v],P=this._validateRangeRelaxedNoAllocations(I.range),O=BCt(I.options),z=this._buffer.getOffsetAt(P.startLineNumber,P.startColumn),J=this._buffer.getOffsetAt(P.endLineNumber,P.endColumn);w.ownerId=e,w.reset(c,z,J,P),w.setOptions(O),w.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(P.endLineNumber),w.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(P.startLineNumber),s||this._onDidChangeDecorations.checkAffectedAndFire(O),this._decorationsTree.insert(w),x[v]=w.id,v++}else w&&delete this._decorations[w.id]}return x}finally{this._onDidChangeDecorations.endDeferredEmit()}}getLanguageId(){return this.tokenization.getLanguageId()}setLanguage(e,i){typeof e=="string"?(this._languageSelectionListener.clear(),this._setLanguage(e,i)):(this._languageSelectionListener.value=e.onDidChange(()=>this._setLanguage(e.languageId,i)),this._setLanguage(e.languageId,i))}_setLanguage(e,i){this.tokenization.setLanguageId(e,i),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,i){return this.tokenization.getLanguageIdAtPosition(e,i)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,i){return e}getLineIndentColumn(e){return wbi(this.getLineContent(e))+1}},EF=kE,kE._MODEL_SYNC_LIMIT=50*1024*1024,kE.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024,kE.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3,kE.LARGE_FILE_HEAP_OPERATION_THRESHOLD=256*1024*1024,kE.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:p1.tabSize,indentSize:p1.indentSize,insertSpaces:p1.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:p1.trimAutoWhitespace,largeFileOptimizations:p1.largeFileOptimizations,bracketPairColorizationOptions:p1.bracketPairColorizationOptions},kE);LE=EF=gbi([p0e(4,T$e),p0e(5,Pf),p0e(6,rh),p0e(7,ho)],LE);function wbi(l){let e=0;for(const i of l)if(i===" "||i===" ")e++;else break;return e}function ZFe(l){return!!(l.options.overviewRuler&&l.options.overviewRuler.color)}function xbi(l){return!!l.after||!!l.before}function y1e(l){return!!l.options.after||!!l.options.before}class RCt{constructor(){this._decorationsTree0=new GFe,this._decorationsTree1=new GFe,this._injectedTextDecorationsTree=new GFe}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,i){for(const n of i)n.range===null&&(n.range=e.getRangeAt(n.cachedAbsoluteStart,n.cachedAbsoluteEnd));return i}getAllInInterval(e,i,n,s,c,d){const f=e.getVersionId(),m=this._intervalSearch(i,n,s,c,f,d);return this._ensureNodesHaveRanges(e,m)}_intervalSearch(e,i,n,s,c,d){const f=this._decorationsTree0.intervalSearch(e,i,n,s,c,d),m=this._decorationsTree1.intervalSearch(e,i,n,s,c,d),v=this._injectedTextDecorationsTree.intervalSearch(e,i,n,s,c,d);return f.concat(m).concat(v)}getInjectedTextInInterval(e,i,n,s){const c=e.getVersionId(),d=this._injectedTextDecorationsTree.intervalSearch(i,n,s,!1,c,!1);return this._ensureNodesHaveRanges(e,d).filter(f=>f.options.showIfCollapsed||!f.range.isEmpty())}getAllInjectedText(e,i){const n=e.getVersionId(),s=this._injectedTextDecorationsTree.search(i,!1,n,!1);return this._ensureNodesHaveRanges(e,s).filter(c=>c.options.showIfCollapsed||!c.range.isEmpty())}getAll(e,i,n,s,c){const d=e.getVersionId(),f=this._search(i,n,s,d,c);return this._ensureNodesHaveRanges(e,f)}_search(e,i,n,s,c){if(n)return this._decorationsTree1.search(e,i,s,c);{const d=this._decorationsTree0.search(e,i,s,c),f=this._decorationsTree1.search(e,i,s,c),m=this._injectedTextDecorationsTree.search(e,i,s,c);return d.concat(f).concat(m)}}collectNodesFromOwner(e){const i=this._decorationsTree0.collectNodesFromOwner(e),n=this._decorationsTree1.collectNodesFromOwner(e),s=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return i.concat(n).concat(s)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),i=this._decorationsTree1.collectNodesPostOrder(),n=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(i).concat(n)}insert(e){y1e(e)?this._injectedTextDecorationsTree.insert(e):ZFe(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){y1e(e)?this._injectedTextDecorationsTree.delete(e):ZFe(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,i){const n=e.getVersionId();return i.cachedVersionId!==n&&this._resolveNode(i,n),i.range===null&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd)),i.range}_resolveNode(e,i){y1e(e)?this._injectedTextDecorationsTree.resolveNode(e,i):ZFe(e)?this._decorationsTree1.resolveNode(e,i):this._decorationsTree0.resolveNode(e,i)}acceptReplace(e,i,n,s){this._decorationsTree0.acceptReplace(e,i,n,s),this._decorationsTree1.acceptReplace(e,i,n,s),this._injectedTextDecorationsTree.acceptReplace(e,i,n,s)}}function JN(l){return l.replace(/[^a-z0-9\-_]/gi," ")}class pEt{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class kbi extends pEt{constructor(e){super(e),this._resolvedColor=null,this.position=typeof e.position=="number"?e.position:ww.Center}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,i){if(typeof e=="string")return e;const n=e?i.getColor(e.id):null;return n?n.toString():""}}class Tbi{constructor(e){this.position=(e==null?void 0:e.position)??CT.Center,this.persistLane=e==null?void 0:e.persistLane}}class Dbi extends pEt{constructor(e){super(e),this.position=e.position,this.sectionHeaderStyle=e.sectionHeaderStyle??null,this.sectionHeaderText=e.sectionHeaderText??null}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,i){return typeof e=="string"?In.fromHex(e):i.getColor(e.id)}}class ER{static from(e){return e instanceof ER?e:new ER(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class qa{static register(e){return new qa(e)}static createDynamic(e){return new qa(e)}constructor(e){this.description=e.description,this.blockClassName=e.blockClassName?JN(e.blockClassName):null,this.blockDoesNotCollapse=e.blockDoesNotCollapse??null,this.blockIsAfterEnd=e.blockIsAfterEnd??null,this.blockPadding=e.blockPadding??null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?JN(e.className):null,this.shouldFillLineOnLineBreak=e.shouldFillLineOnLineBreak??null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=e.lineNumberHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new kbi(e.overviewRuler):null,this.minimap=e.minimap?new Dbi(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new Tbi(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?JN(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?JN(e.linesDecorationsClassName):null,this.lineNumberClassName=e.lineNumberClassName?JN(e.lineNumberClassName):null,this.linesDecorationsTooltip=e.linesDecorationsTooltip?Uli(e.linesDecorationsTooltip):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?JN(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?JN(e.marginClassName):null,this.inlineClassName=e.inlineClassName?JN(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?JN(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?JN(e.afterContentClassName):null,this.after=e.after?ER.from(e.after):null,this.before=e.before?ER.from(e.before):null,this.hideInCommentTokens=e.hideInCommentTokens??!1,this.hideInStringTokens=e.hideInStringTokens??!1}}qa.EMPTY=qa.register({description:"empty"});const FCt=[qa.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),qa.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),qa.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),qa.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function BCt(l){return l instanceof qa?l:qa.createDynamic(l)}class Ebi extends xi{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new gi),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;this._deferredCnt--,this._deferredCnt===0&&(this._shouldFireDeferred&&this.doFire(),(e=this._affectedInjectedTextLines)==null||e.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){var i,n;this._affectsMinimap||(this._affectsMinimap=!!((i=e.minimap)!=null&&i.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!((n=e.overviewRuler)!=null&&n.color)),this._affectsGlyphMargin||(this._affectsGlyphMargin=!!e.glyphMarginClassName),this._affectsLineNumber||(this._affectsLineNumber=!!e.lineNumberClassName),this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){this._deferredCnt===0?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin,affectsLineNumber:this._affectsLineNumber};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class Ibi extends xi{constructor(){super(),this._fastEmitter=this._register(new gi),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new gi),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const i=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(i),this._slowEmitter.fire(i)}}fire(e){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e;return}this._fastEmitter.fire(e),this._slowEmitter.fire(e)}}var Nbi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},g0e=function(l,e){return function(i,n){e(i,n,l)}},UU;function gF(l){return l.toString()}let Lbi=class{constructor(e,i,n){this.model=e,this._modelEventListeners=new wn,this.model=e,this._modelEventListeners.add(e.onWillDispose(()=>i(e))),this._modelEventListeners.add(e.onDidChangeLanguage(s=>n(e,s)))}dispose(){this._modelEventListeners.dispose()}};const Pbi=Cv||Hc?1:2;class Abi{constructor(e,i,n,s,c,d,f,m){this.uri=e,this.initialUndoRedoSnapshot=i,this.time=n,this.sharesUndoRedoStack=s,this.heapSize=c,this.sha1=d,this.versionId=f,this.alternativeVersionId=m}}var T9;let lHe=(T9=class extends xi{constructor(e,i,n,s){super(),this._configurationService=e,this._resourcePropertiesService=i,this._undoRedoService=n,this._instantiationService=s,this._onModelAdded=this._register(new gi),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new gi),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new gi),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration(c=>this._updateModelOptions(c))),this._updateModelOptions(void 0)}static _readModelOptions(e,i){var I;let n=p1.tabSize;if(e.editor&&typeof e.editor.tabSize<"u"){const P=parseInt(e.editor.tabSize,10);isNaN(P)||(n=P),n<1&&(n=1)}let s="tabSize";if(e.editor&&typeof e.editor.indentSize<"u"&&e.editor.indentSize!=="tabSize"){const P=parseInt(e.editor.indentSize,10);isNaN(P)||(s=Math.max(P,1))}let c=p1.insertSpaces;e.editor&&typeof e.editor.insertSpaces<"u"&&(c=e.editor.insertSpaces==="false"?!1:!!e.editor.insertSpaces);let d=Pbi;const f=e.eol;f===`\r
+`?d=2:f===`
+`&&(d=1);let m=p1.trimAutoWhitespace;e.editor&&typeof e.editor.trimAutoWhitespace<"u"&&(m=e.editor.trimAutoWhitespace==="false"?!1:!!e.editor.trimAutoWhitespace);let v=p1.detectIndentation;e.editor&&typeof e.editor.detectIndentation<"u"&&(v=e.editor.detectIndentation==="false"?!1:!!e.editor.detectIndentation);let x=p1.largeFileOptimizations;e.editor&&typeof e.editor.largeFileOptimizations<"u"&&(x=e.editor.largeFileOptimizations==="false"?!1:!!e.editor.largeFileOptimizations);let w=p1.bracketPairColorizationOptions;return(I=e.editor)!=null&&I.bracketPairColorization&&typeof e.editor.bracketPairColorization=="object"&&(w={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:i,tabSize:n,indentSize:s,insertSpaces:c,detectIndentation:v,defaultEOL:d,trimAutoWhitespace:m,largeFileOptimizations:x,bracketPairColorizationOptions:w}}_getEOL(e,i){if(e)return this._resourcePropertiesService.getEOL(e,i);const n=this._configurationService.getValue("files.eol",{overrideIdentifier:i});return n&&typeof n=="string"&&n!=="auto"?n:UC===3||UC===2?`
+`:`\r
+`}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,i,n){const s=typeof e=="string"?e:e.languageId;let c=this._modelCreationOptionsByLanguageAndResource[s+i];if(!c){const d=this._configurationService.getValue("editor",{overrideIdentifier:s,resource:i}),f=this._getEOL(i,s);c=UU._readModelOptions({editor:d,eol:f},n),this._modelCreationOptionsByLanguageAndResource[s+i]=c}return c}_updateModelOptions(e){const i=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const n=Object.keys(this._models);for(let s=0,c=n.length;s<c;s++){const d=n[s],f=this._models[d],m=f.model.getLanguageId(),v=f.model.uri;if(e&&!e.affectsConfiguration("editor",{overrideIdentifier:m,resource:v})&&!e.affectsConfiguration("files.eol",{overrideIdentifier:m,resource:v}))continue;const x=i[m+v],w=this.getCreationOptions(m,v,f.model.isForSimpleWidget);UU._setModelOptionsForModel(f.model,w,x)}}static _setModelOptionsForModel(e,i,n){n&&n.defaultEOL!==i.defaultEOL&&e.getLineCount()===1&&e.setEOL(i.defaultEOL===1?0:1),!(n&&n.detectIndentation===i.detectIndentation&&n.insertSpaces===i.insertSpaces&&n.tabSize===i.tabSize&&n.indentSize===i.indentSize&&n.trimAutoWhitespace===i.trimAutoWhitespace&&qC(n.bracketPairColorizationOptions,i.bracketPairColorizationOptions))&&(i.detectIndentation?(e.detectIndentation(i.insertSpaces,i.tabSize),e.updateOptions({trimAutoWhitespace:i.trimAutoWhitespace,bracketColorizationOptions:i.bracketPairColorizationOptions})):e.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.indentSize,trimAutoWhitespace:i.trimAutoWhitespace,bracketColorizationOptions:i.bracketPairColorizationOptions}))}_insertDisposedModel(e){this._disposedModels.set(gF(e.uri),e),this._disposedModelsHeapSize+=e.heapSize}_removeDisposedModel(e){const i=this._disposedModels.get(gF(e));return i&&(this._disposedModelsHeapSize-=i.heapSize),this._disposedModels.delete(gF(e)),i}_ensureDisposedModelsHeapSize(e){if(this._disposedModelsHeapSize>e){const i=[];for(this._disposedModels.forEach(n=>{n.sharesUndoRedoStack||i.push(n)}),i.sort((n,s)=>n.time-s.time);i.length>0&&this._disposedModelsHeapSize>e;){const n=i.shift();this._removeDisposedModel(n.uri),n.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(n.initialUndoRedoSnapshot)}}}_createModelData(e,i,n,s){const c=this.getCreationOptions(i,n,s),d=this._instantiationService.createInstance(LE,e,i,c,n);if(n&&this._disposedModels.has(gF(n))){const v=this._removeDisposedModel(n),x=this._undoRedoService.getElements(n),w=this._getSHA1Computer(),I=w.canComputeSHA1(d)?w.computeSHA1(d)===v.sha1:!1;if(I||v.sharesUndoRedoStack){for(const P of x.past)N4(P)&&P.matchesResource(n)&&P.setModel(d);for(const P of x.future)N4(P)&&P.matchesResource(n)&&P.setModel(d);this._undoRedoService.setElementsValidFlag(n,!0,P=>N4(P)&&P.matchesResource(n)),I&&(d._overwriteVersionId(v.versionId),d._overwriteAlternativeVersionId(v.alternativeVersionId),d._overwriteInitialUndoRedoSnapshot(v.initialUndoRedoSnapshot))}else v.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(v.initialUndoRedoSnapshot)}const f=gF(d.uri);if(this._models[f])throw new Error("ModelService: Cannot add model because it already exists!");const m=new Lbi(d,v=>this._onWillDispose(v),(v,x)=>this._onDidChangeLanguage(v,x));return this._models[f]=m,m}createModel(e,i,n,s=!1){let c;return i?c=this._createModelData(e,i,n,s):c=this._createModelData(e,bv,n,s),this._onModelAdded.fire(c.model),c.model}getModels(){const e=[],i=Object.keys(this._models);for(let n=0,s=i.length;n<s;n++){const c=i[n];e.push(this._models[c].model)}return e}getModel(e){const i=gF(e),n=this._models[i];return n?n.model:null}_schemaShouldMaintainUndoRedoElements(e){return e.scheme===Ma.file||e.scheme===Ma.vscodeRemote||e.scheme===Ma.vscodeUserData||e.scheme===Ma.vscodeNotebookCell||e.scheme==="fake-fs"}_onWillDispose(e){const i=gF(e.uri),n=this._models[i],s=this._undoRedoService.getUriComparisonKey(e.uri)!==e.uri.toString();let c=!1,d=0;if(s||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(e.uri)){const v=this._undoRedoService.getElements(e.uri);if(v.past.length>0||v.future.length>0){for(const x of v.past)N4(x)&&x.matchesResource(e.uri)&&(c=!0,d+=x.heapSize(e.uri),x.setModel(e.uri));for(const x of v.future)N4(x)&&x.matchesResource(e.uri)&&(c=!0,d+=x.heapSize(e.uri),x.setModel(e.uri))}}const f=UU.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,m=this._getSHA1Computer();if(c)if(!s&&(d>f||!m.canComputeSHA1(e))){const v=n.model.getInitialUndoRedoSnapshot();v!==null&&this._undoRedoService.restoreSnapshot(v)}else this._ensureDisposedModelsHeapSize(f-d),this._undoRedoService.setElementsValidFlag(e.uri,!1,v=>N4(v)&&v.matchesResource(e.uri)),this._insertDisposedModel(new Abi(e.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),s,d,m.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!s){const v=n.model.getInitialUndoRedoSnapshot();v!==null&&this._undoRedoService.restoreSnapshot(v)}delete this._models[i],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,i){const n=i.oldLanguage,s=e.getLanguageId(),c=this.getCreationOptions(n,e.uri,e.isForSimpleWidget),d=this.getCreationOptions(s,e.uri,e.isForSimpleWidget);UU._setModelOptionsForModel(e,d,c),this._onModelModeChanged.fire({model:e,oldLanguageId:n})}_getSHA1Computer(){return new uHe}},UU=T9,T9.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024,T9);lHe=UU=Nbi([g0e(0,Cc),g0e(1,uTt),g0e(2,T$e),g0e(3,ho)],lHe);const lCe=class lCe{canComputeSHA1(e){return e.getValueLength()<=lCe.MAX_MODEL_SIZE}computeSHA1(e){const i=new kWe,n=e.createSnapshot();let s;for(;s=n.read();)i.update(s);return i.digest()}};lCe.MAX_MODEL_SIZE=10*1024*1024;let uHe=lCe;var dHe;(function(l){l[l.PRESERVE=0]="PRESERVE",l[l.LAST=1]="LAST"})(dHe||(dHe={}));const nW={Quickaccess:"workbench.contributions.quickaccess"};class Obi{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return e.prefix.length===0?this.defaultProvider=e:this.providers.push(e),this.providers.sort((i,n)=>n.prefix.length-i.prefix.length),fo(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return yT([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(n=>e.startsWith(n.prefix))||void 0||this.defaultProvider}}nh.add(nW.Quickaccess,new Obi);const Mbi={ctrlCmd:!1,alt:!1};var H$;(function(l){l[l.Blur=1]="Blur",l[l.Gesture=2]="Gesture",l[l.Other=3]="Other"})(H$||(H$={}));var vE;(function(l){l[l.NONE=0]="NONE",l[l.FIRST=1]="FIRST",l[l.SECOND=2]="SECOND",l[l.LAST=3]="LAST"})(vE||(vE={}));var Yd;(function(l){l[l.First=1]="First",l[l.Second=2]="Second",l[l.Last=3]="Last",l[l.Next=4]="Next",l[l.Previous=5]="Previous",l[l.NextPage=6]="NextPage",l[l.PreviousPage=7]="PreviousPage",l[l.NextSeparator=8]="NextSeparator",l[l.PreviousSeparator=9]="PreviousSeparator"})(Yd||(Yd={}));var Qye;(function(l){l[l.Title=1]="Title",l[l.Inline=2]="Inline"})(Qye||(Qye={}));const Ek=jc("quickInputService");var Rbi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},WCt=function(l,e){return function(i,n){e(i,n,l)}};let fHe=class extends xi{constructor(e,i){super(),this.quickInputService=e,this.instantiationService=i,this.registry=nh.as(nW.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",i){this.doShowOrPick(e,!1,i)}doShowOrPick(e,i,n){var O,z;const[s,c]=this.getOrInstantiateProvider(e,n==null?void 0:n.enabledProviderPrefixes),d=this.visibleQuickAccess,f=d==null?void 0:d.descriptor;if(d&&c&&f===c){e!==c.prefix&&!(n!=null&&n.preserveValue)&&(d.picker.value=e),this.adjustValueSelection(d.picker,c,n);return}if(c&&!(n!=null&&n.preserveValue)){let J;if(d&&f&&f!==c){const Y=d.value.substr(f.prefix.length);Y&&(J=`${c.prefix}${Y}`)}if(!J){const Y=s==null?void 0:s.defaultFilterValue;Y===dHe.LAST?J=this.lastAcceptedPickerValues.get(c):typeof Y=="string"&&(J=`${c.prefix}${Y}`)}typeof J=="string"&&(e=J)}const m=(O=d==null?void 0:d.picker)==null?void 0:O.valueSelection,v=(z=d==null?void 0:d.picker)==null?void 0:z.value,x=new wn,w=x.add(this.quickInputService.createQuickPick({useSeparators:!0}));w.value=e,this.adjustValueSelection(w,c,n),w.placeholder=(n==null?void 0:n.placeholder)??(c==null?void 0:c.placeholder),w.quickNavigate=n==null?void 0:n.quickNavigateConfiguration,w.hideInput=!!w.quickNavigate&&!d,(typeof(n==null?void 0:n.itemActivation)=="number"||n!=null&&n.quickNavigateConfiguration)&&(w.itemActivation=(n==null?void 0:n.itemActivation)??vE.SECOND),w.contextKey=c==null?void 0:c.contextKey,w.filterValue=J=>J.substring(c?c.prefix.length:0);let I;i&&(I=new hJ,x.add(Tr.once(w.onWillAccept)(J=>{J.veto(),w.hide()}))),x.add(this.registerPickerListeners(w,s,c,e,n));const P=x.add(new ih);if(s&&x.add(s.provide(w,P.token,n==null?void 0:n.providerOptions)),Tr.once(w.onDidHide)(()=>{w.selectedItems.length===0&&P.cancel(),x.dispose(),I==null||I.complete(w.selectedItems.slice(0))}),w.show(),m&&v===e&&(w.valueSelection=m),i)return I==null?void 0:I.p}adjustValueSelection(e,i,n){let s;n!=null&&n.preserveValue?s=[e.value.length,e.value.length]:s=[(i==null?void 0:i.prefix.length)??0,e.value.length],e.valueSelection=s}registerPickerListeners(e,i,n,s,c){const d=new wn,f=this.visibleQuickAccess={picker:e,descriptor:n,value:s};return d.add(fo(()=>{f===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),d.add(e.onDidChangeValue(m=>{const[v]=this.getOrInstantiateProvider(m,c==null?void 0:c.enabledProviderPrefixes);v!==i?this.show(m,{enabledProviderPrefixes:c==null?void 0:c.enabledProviderPrefixes,preserveValue:!0,providerOptions:c==null?void 0:c.providerOptions}):f.value=m})),n&&d.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(n,e.value)})),d}getOrInstantiateProvider(e,i){const n=this.registry.getQuickAccessProvider(e);if(!n||i&&!(i!=null&&i.includes(n.prefix)))return[void 0,void 0];let s=this.mapProviderToDescriptor.get(n);return s||(s=this.instantiationService.createInstance(n.ctor),this.mapProviderToDescriptor.set(n,s)),[s,n]}};fHe=Rbi([WCt(0,Ek),WCt(1,ho)],fHe);class TJ extends Aw{constructor(e){super(),this._onChange=this._register(new gi),this.onChange=this._onChange.event,this._onKeyDown=this._register(new gi),this.onKeyDown=this._onKeyDown.event,this._opts=e,this._checked=this._opts.isChecked;const i=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,i.push(...zo.asClassNameArray(this._icon))),this._opts.actionClassName&&i.push(...this._opts.actionClassName.split(" ")),this._checked&&i.push("checked"),this.domNode=document.createElement("div"),this._hover=this._register(QE().setupManagedHover(e.hoverDelegate??Dv("mouse"),this.domNode,this._opts.title)),this.domNode.classList.add(...i),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,n=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),n.preventDefault())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,n=>{if(n.keyCode===10||n.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),n.preventDefault(),n.stopPropagation();return}this._onKeyDown.fire(n)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}var Fbi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c};class mEt{constructor(e){this.nodes=e}toString(){return this.nodes.map(e=>typeof e=="string"?e:e.label).join("")}}Fbi([x_],mEt.prototype,"toString",null);const Bbi=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi;function Wbi(l){const e=[];let i=0,n;for(;n=Bbi.exec(l);){n.index-i>0&&e.push(l.substring(i,n.index));const[,s,c,,d]=n;d?e.push({label:s,href:c,title:d}):e.push({label:s,href:c}),i=n.index+n[0].length}return i<l.length&&e.push(l.substring(i)),new mEt(e)}const YFe={},Vbi=new X$e("quick-input-button-icon-");function Hbi(l){if(!l)return;let e;const i=l.dark.toString();return YFe[i]?e=YFe[i]:(e=Vbi.nextId(),lye(`.${e}, .hc-light .${e}`,`background-image: ${l6(l.light||l.dark)}`),lye(`.vs-dark .${e}, .hc-black .${e}`,`background-image: ${l6(l.dark)}`),YFe[i]=e),e}function Fie(l,e,i){let n=l.iconClass||Hbi(l.iconPath);return l.alwaysVisible&&(n=n?`${n} always-visible`:"always-visible"),{id:e,label:"",tooltip:l.tooltip||"",class:n,enabled:!0,run:i}}function jbi(l,e,i){o0(e);const n=Wbi(l);let s=0;for(const c of n.nodes)if(typeof c=="string")e.append(...JM(c));else{let d=c.title;!d&&c.href.startsWith("command:")?d=W("executeCommand","Click to execute command '{0}'",c.href.substring(8)):d||(d=c.href);const f=Cr("a",{href:c.href,title:d,tabIndex:s++},c.label);f.style.textDecoration="underline";const m=P=>{ddi(P)&&il.stop(P,!0),i.callback(c.href)},v=i.disposables.add(new Xc(f,br.CLICK)).event,x=i.disposables.add(new Xc(f,br.KEY_DOWN)).event,w=Tr.chain(x,P=>P.filter(O=>{const z=new Id(O);return z.equals(10)||z.equals(3)}));i.disposables.add(y1.addTarget(f));const I=i.disposables.add(new Xc(f,Ud.Tap)).event;Tr.any(v,I,w)(m,null,i.disposables),e.appendChild(f)}}var zbi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},VCt=function(l,e){return function(i,n){e(i,n,l)}};const gEt="inQuickInput",Ubi=new rs(gEt,!1,W("inQuickInput","Whether keyboard focus is inside the quick input control")),qbi=kn.has(gEt),yEt="quickInputType",$bi=new rs(yEt,void 0,W("quickInputType","The type of the currently visible quick input")),vEt="cursorAtEndOfQuickInputBox",Jbi=new rs(vEt,!1,W("cursorAtEndOfQuickInputBox","Whether the cursor in the quick input is at the end of the input box")),Gbi=kn.has(vEt),hHe={iconClass:zo.asClassName(pr.quickInputBack),tooltip:W("quickInput.back","Back"),handle:-1},uCe=class uCe extends xi{constructor(e){super(),this.ui=e,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._leftButtons=[],this._rightButtons=[],this._inlineButtons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=uCe.noPromptMessage,this._severity=S_.Ignore,this.onDidTriggerButtonEmitter=this._register(new gi),this.onDidHideEmitter=this._register(new gi),this.onWillHideEmitter=this._register(new gi),this.onDisposeEmitter=this._register(new gi),this.visibleDisposables=this._register(new wn),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const i=this._ignoreFocusOut!==e&&!VE;this._ignoreFocusOut=e&&!VE,i&&this.update()}get titleButtons(){return this._leftButtons.length?[...this._leftButtons,this._rightButtons]:this._rightButtons}get buttons(){return[...this._leftButtons,...this._rightButtons,...this._inlineButtons]}set buttons(e){this._leftButtons=e.filter(i=>i===hHe),this._rightButtons=e.filter(i=>i!==hHe&&i.location!==Qye.Inline),this._inlineButtons=e.filter(i=>i.location===Qye.Inline),this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(e){this._toggles=e??[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{this.buttons.indexOf(e)!==-1&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=H$.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}willHide(e=H$.Other){this.onWillHideEmitter.fire({reason:e})}update(){var s;if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:!e&&this.ui.title.innerHTML!=="&nbsp;"&&(this.ui.title.innerText=" ");const i=this.getDescription();if(this.ui.description1.textContent!==i&&(this.ui.description1.textContent=i),this.ui.description2.textContent!==i&&(this.ui.description2.textContent=i),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?o0(this.ui.widget,this._widget):o0(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new TT,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const c=this._leftButtons.map((m,v)=>Fie(m,`id-${v}`,async()=>this.onDidTriggerButtonEmitter.fire(m)));this.ui.leftActionBar.push(c,{icon:!0,label:!1}),this.ui.rightActionBar.clear();const d=this._rightButtons.map((m,v)=>Fie(m,`id-${v}`,async()=>this.onDidTriggerButtonEmitter.fire(m)));this.ui.rightActionBar.push(d,{icon:!0,label:!1}),this.ui.inlineActionBar.clear();const f=this._inlineButtons.map((m,v)=>Fie(m,`id-${v}`,async()=>this.onDidTriggerButtonEmitter.fire(m)));this.ui.inlineActionBar.push(f,{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const c=((s=this.toggles)==null?void 0:s.filter(d=>d instanceof TJ))??[];this.ui.inputBox.toggles=c}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const n=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==n&&(this._lastValidationMessage=n,o0(this.ui.message),jbi(n,this.ui.message,{callback:c=>{this.ui.linkOpenerDelegate(c)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?W("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==S_.Ignore){const i=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=i.foreground?`${i.foreground}`:"",this.ui.message.style.backgroundColor=i.background?`${i.background}`:"",this.ui.message.style.border=i.border?`1px solid ${i.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}};uCe.noPromptMessage=W("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");let Zye=uCe;const dCe=class dCe extends Zye{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new gi),this.onWillAcceptEmitter=this._register(new gi),this.onDidAcceptEmitter=this._register(new gi),this.onDidCustomEmitter=this._register(new gi),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._keepScrollPosition=!1,this._itemActivation=vE.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new gi),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new gi),this.onDidTriggerItemButtonEmitter=this._register(new gi),this.onDidTriggerSeparatorButtonEmitter=this._register(new gi),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this._focusEventBufferer=new lse,this.type="quickPick",this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,i){this._value!==e&&(this._value=e,i||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?Mbi:this.ui.keyMods}get valueSelection(){const e=this.ui.inputBox.getSelection();if(e)return[e.start,e.end]}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.canSelectMany||this.ui.list.focus(Yd.First)}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{this.doSetValue(e,!0)})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this._focusEventBufferer.wrapEvent(this.ui.list.onDidChangeFocus,(e,i)=>i)(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&Lf(e,this._activeItems,(i,n)=>i===n)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:i})=>{if(this.canSelectMany){e.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&Lf(e,this._selectedItems,(n,s)=>n===s)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(d$e(i)&&i.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{!this.canSelectMany||!this.visible||this.selectedItemsToConfirm!==this._selectedItems&&Lf(e,this._selectedItems,(i,n)=>i===n)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered(e=>this.onDidTriggerSeparatorButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let i=!1;this.onWillAcceptEmitter.fire({veto:()=>i=!0}),i||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return en(this.ui.container,br.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const i=new Id(e),n=i.keyCode;this._quickNavigate.keybindings.some(d=>{const f=d.getChords();return f.length>1?!1:f[0].shiftKey&&n===4?!(i.ctrlKey||i.altKey||i.metaKey):!!(f[0].altKey&&n===6||f[0].ctrlKey&&n===5||f[0].metaKey&&n===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,i=!!this.description,n={title:!!this.title||!!this.step||!!this.titleButtons.length,description:i,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||i,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(n),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let s=this.ariaLabel;!s&&n.inputBox&&(s=this.placeholder||dCe.DEFAULT_ARIA_LABEL,this.title&&(s+=` - ${this.title}`)),this.ui.list.ariaLabel!==s&&(this.ui.list.ariaLabel=s??null),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated&&(this.itemsUpdated=!1,this._focusEventBufferer.bufferEvents(()=>{switch(this.ui.list.setElements(this.items),this.ui.list.shouldLoop=!this.canSelectMany,this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this._itemActivation){case vE.NONE:this._itemActivation=vE.FIRST;break;case vE.SECOND:this.ui.list.focus(Yd.Second),this._itemActivation=vE.FIRST;break;case vE.LAST:this.ui.list.focus(Yd.Last),this._itemActivation=vE.FIRST;break;default:this.trySelectFirst();break}})),this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",n.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(Yd.First)),this.keepScrollPosition&&(this.scrollTop=e)}focus(e){this.ui.list.focus(e),this.canSelectMany&&this.ui.list.domFocus()}accept(e){e&&!this._canAcceptInBackground||this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(e??!1))}};dCe.DEFAULT_ARIA_LABEL=W("quickInputBox.ariaLabel","Type to narrow down results.");let Yye=dCe,Kbi=class extends Zye{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new gi),this.onDidAcceptEmitter=this._register(new gi),this.type="inputBox",this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))})),this.visibleDisposables.add(this.ui.onDidAccept(()=>this.onDidAcceptEmitter.fire())),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const e={title:!!this.title||!!this.step||!!this.titleButtons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}},_He=class extends P${constructor(e,i){super("element",!1,n=>this.getOverrideOptions(n),e,i)}getOverrideOptions(e){const i=(Mm(e.content)?e.content.textContent??"":typeof e.content=="string"?e.content:e.content.value).includes(`
+`);return{persistence:{hideOnKeyDown:!1},appearance:{showHoverHint:i,skipFadeInAnimation:!0}}}};_He=zbi([VCt(0,Cc),VCt(1,jL)],_He);In.white.toString(),In.white.toString();class eve extends xi{get onDidClick(){return this._onDidClick.event}constructor(e,i){super(),this._label="",this._onDidClick=this._register(new gi),this._onDidEscape=this._register(new gi),this.options=i,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!i.secondary);const n=i.secondary?i.buttonSecondaryBackground:i.buttonBackground,s=i.secondary?i.buttonSecondaryForeground:i.buttonForeground;this._element.style.color=s||"",this._element.style.backgroundColor=n||"",i.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),typeof i.title=="string"&&this.setTitle(i.title),typeof i.ariaLabel=="string"&&this._element.setAttribute("aria-label",i.ariaLabel),e.appendChild(this._element),this._register(y1.addTarget(this._element)),[br.CLICK,Ud.Tap].forEach(c=>{this._register(en(this._element,c,d=>{if(!this.enabled){il.stop(d);return}this._onDidClick.fire(d)}))}),this._register(en(this._element,br.KEY_DOWN,c=>{const d=new Id(c);let f=!1;this.enabled&&(d.equals(3)||d.equals(10))?(this._onDidClick.fire(c),f=!0):d.equals(9)&&(this._onDidEscape.fire(c),this._element.blur(),f=!0),f&&il.stop(d,!0)})),this._register(en(this._element,br.MOUSE_OVER,c=>{this._element.classList.contains("disabled")||this.updateBackground(!0)})),this._register(en(this._element,br.MOUSE_OUT,c=>{this.updateBackground(!1)})),this.focusTracker=this._register(zE(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateBackground(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateBackground(!1)}))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){const i=[];for(let n of JM(e))if(typeof n=="string"){if(n=n.trim(),n==="")continue;const s=document.createElement("span");s.textContent=n,i.push(s)}else i.push(n);return i}updateBackground(e){let i;this.options.secondary?i=e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:i=e?this.options.buttonHoverBackground:this.options.buttonBackground,i&&(this._element.style.backgroundColor=i)}get element(){return this._element}set label(e){var s;if(this._label===e||WE(this._label)&&WE(e)&&Igi(this._label,e))return;this._element.classList.add("monaco-text-button");const i=this.options.supportShortLabel?this._labelElement:this._element;if(WE(e)){const c=dwe(e,{inline:!0});c.dispose();const d=(s=c.element.querySelector("p"))==null?void 0:s.innerHTML;if(d){const f=m2t(d,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});i.innerHTML=f}else o0(i)}else this.options.supportIcons?o0(i,...this.getContentElements(e)):i.textContent=e;let n="";typeof this.options.title=="string"?n=this.options.title:this.options.title&&(n=Vgi(e)),this.setTitle(n),typeof this.options.ariaLabel=="string"?this._element.setAttribute("aria-label",this.options.ariaLabel):this.options.ariaLabel&&this._element.setAttribute("aria-label",n),this._label=e}get label(){return this._label}set icon(e){this._element.classList.add(...zo.asClassNameArray(e))}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}setTitle(e){!this._hover&&e!==""?this._hover=this._register(QE().setupManagedHover(this.options.hoverDelegate??Dv("mouse"),this._element,e)):this._hover&&this._hover.update(e)}}class pHe{constructor(e,i,n){this.options=i,this.styles=n,this.count=0,this.element=jn(e,Cr(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){this.element.textContent=SB(this.countFormat,this.count),this.element.title=SB(this.titleFormat,this.count),this.element.style.backgroundColor=this.styles.badgeBackground??"",this.element.style.color=this.styles.badgeForeground??"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}const HCt="done",jCt="active",e9e="infinite",t9e="infinite-long-running",zCt="discrete",fCe=class fCe extends xi{constructor(e,i){super(),this.progressSignal=this._register(new Fm),this.workedVal=0,this.showDelayedScheduler=this._register(new qu(()=>HC(this.element),0)),this.longRunningScheduler=this._register(new qu(()=>this.infiniteLongRunning(),fCe.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,i)}create(e,i){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=(i==null?void 0:i.progressBarBackground)||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(jCt,e9e,t9e,zCt),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel(),this.progressSignal.clear()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(HCt),this.element.classList.contains(e9e)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(zCt,HCt,t9e),this.element.classList.add(jCt,e9e),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(t9e)}getContainer(){return this.element}};fCe.LONG_RUNNING_INFINITE_THRESHOLD=1e4;let mHe=fCe;const Xbi=W("caseDescription","Match Case"),Qbi=W("wordsDescription","Match Whole Word"),Zbi=W("regexDescription","Use Regular Expression");class bEt extends TJ{constructor(e){super({icon:pr.caseSensitive,title:Xbi+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??Dv("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class CEt extends TJ{constructor(e){super({icon:pr.wholeWord,title:Qbi+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??Dv("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class SEt extends TJ{constructor(e){super({icon:pr.regex,title:Zbi+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??Dv("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class Ybi{constructor(e,i=0,n=e.length,s=i-1){this.items=e,this.start=i,this.end=n,this.index=s}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class eCi{constructor(e=[],i=10){this._initialize(e),this._limit=i,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return this._navigator.current()===null}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new Ybi(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const i of e)this._history.add(i)}get _elements(){const e=[];return this._history.forEach(i=>e.push(i)),e}}const Vte=Cr;class tCi extends Aw{constructor(e,i,n){super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new gi),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new gi),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=i,this.options=n,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=this.options.tooltip??(this.placeholder||""),this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=jn(e,Vte(".monaco-inputbox.idle"));const s=this.options.flexibleHeight?"textarea":"input",c=jn(this.element,Vte(".ibwrapper"));if(this.input=jn(c,Vte(s+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=jn(c,Vte("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new JTt(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),jn(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(m=>this.input.scrollTop=m.scrollTop));const d=this._register(new Xc(e.ownerDocument,"selectionchange")),f=Tr.filter(d.event,()=>{const m=e.ownerDocument.getSelection();return(m==null?void 0:m.anchorNode)===c});this._register(f(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this._register(this.ignoreGesture(this.input)),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new kw(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.hover?this.hover.update(e):this.hover=this._register(QE().setupManagedHover(Dv("mouse"),this.input,e))}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:B4(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return RSe(this.input)}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}getSelection(){const e=this.input.selectionStart;if(e===null)return null;const i=this.input.selectionEnd??e;return{start:e,end:i}}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const e=this.cachedContentHeight,i=this.cachedHeight,n=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:i}),this.scrollableElement.setScrollPosition({scrollTop:n})}showMessage(e,i){if(this.state==="open"&&qC(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const n=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${Z4(n.border,"transparent")}`,this.message.content&&(this.hasFocus()||i)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),e==null?void 0:e.type}stylesForType(e){const i=this.options.inputBoxStyles;switch(e){case 1:return{border:i.inputValidationInfoBorder,background:i.inputValidationInfoBackground,foreground:i.inputValidationInfoForeground};case 2:return{border:i.inputValidationWarningBorder,background:i.inputValidationWarningBackground,foreground:i.inputValidationWarningForeground};default:return{border:i.inputValidationErrorBorder,background:i.inputValidationErrorBackground,foreground:i.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e;const i=()=>e.style.width=FC(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:s=>{if(!this.message)return null;e=jn(s,Vte(".monaco-inputbox-container")),i();const c={inline:!0,className:"monaco-inputbox-message"},d=this.message.formatContent?Jmi(this.message.content,c):$mi(this.message.content,c);d.classList.add(this.classForType(this.message.type));const f=this.stylesForType(this.message.type);return d.style.backgroundColor=f.background??"",d.style.color=f.foreground??"",d.style.border=f.border?`1px solid ${f.border}`:"",jn(e,d),null},onHide:()=>{this.state="closed"},layout:i});let n;this.message.type===3?n=W("alertErrorMessage","Error: {0}",this.message.content):this.message.type===2?n=W("alertWarningMessage","Warning: {0}",this.message.content):n=W("alertInfoMessage","Info: {0}",this.message.content),xv(n),this.state="open"}_hideMessage(){this.contextViewProvider&&(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,n=e.charCodeAt(e.length-1)===10?" ":"";(e+n).replace(/\u000c/g,"")?this.mirror.textContent=e+n:this.mirror.innerText=" ",this.layout()}applyStyles(){const e=this.options.inputBoxStyles,i=e.inputBackground??"",n=e.inputForeground??"",s=e.inputBorder??"";this.element.style.backgroundColor=i,this.element.style.color=n,this.input.style.backgroundColor="inherit",this.input.style.color=n,this.element.style.border=`1px solid ${Z4(s,"transparent")}`}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=B4(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const i=this.inputElement,n=i.selectionStart,s=i.selectionEnd,c=i.value;n!==null&&s!==null&&(this.value=c.substr(0,n)+e+c.substr(s),i.setSelectionRange(n+1,n+1),this.layout())}dispose(){var e;this._hideMessage(),this.message=null,(e=this.actionbar)==null||e.dispose(),super.dispose()}}class wEt extends tCi{constructor(e,i,n){const s=W({key:"history.inputbox.hint.suffix.noparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field ends in a closing parenthesis ")", for example "Filter (e.g. text, !exclude)". The character inserted into the final string is ⇅ to represent the up and down arrow keys.']}," or {0} for history","⇅"),c=W({key:"history.inputbox.hint.suffix.inparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field does NOT end in a closing parenthesis (eg. "Find"). The character inserted into the final string is ⇅ to represent the up and down arrow keys.']}," ({0} for history)","⇅");super(e,i,n),this._onDidFocus=this._register(new gi),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new gi),this.onDidBlur=this._onDidBlur.event,this.history=new eCi(n.history,100);const d=()=>{if(n.showHistoryHint&&n.showHistoryHint()&&!this.placeholder.endsWith(s)&&!this.placeholder.endsWith(c)&&this.history.getHistory().length){const f=this.placeholder.endsWith(")")?s:c,m=this.placeholder+f;n.showPlaceholderOnFocus&&!RSe(this.input)?this.placeholder=m:this.setPlaceHolder(m)}};this.observer=new MutationObserver((f,m)=>{f.forEach(v=>{v.target.textContent||d()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>d()),this.onblur(this.input,()=>{const f=m=>{if(this.placeholder.endsWith(m)){const v=this.placeholder.slice(0,this.placeholder.length-m.length);return n.showPlaceholderOnFocus?this.placeholder=v:this.setPlaceHolder(v),!0}else return!1};f(c)||f(s)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=e??"",PL(this.value?this.value:W("clearedInput","Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,PL(this.value))}setPlaceHolder(e){super.setPlaceHolder(e),this.setTooltip(e)}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}const iCi=W("defaultLabel","input");class xEt extends Aw{constructor(e,i,n){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new Fm),this.additionalToggles=[],this._onDidOptionChange=this._register(new gi),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new gi),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new gi),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new gi),this._onKeyUp=this._register(new gi),this._onCaseSensitiveKeyDown=this._register(new gi),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new gi),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||iCi,this.showCommonFindToggles=!!n.showCommonFindToggles;const s=n.appendCaseSensitiveLabel||"",c=n.appendWholeWordsLabel||"",d=n.appendRegexLabel||"",f=n.history||[],m=!!n.flexibleHeight,v=!!n.flexibleWidth,x=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new wEt(this.domNode,i,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:f,showHistoryHint:n.showHistoryHint,flexibleHeight:m,flexibleWidth:v,flexibleMaxHeight:x,inputBoxStyles:n.inputBoxStyles}));const w=this._register(W$());if(this.showCommonFindToggles){this.regex=this._register(new SEt({appendTitle:d,isChecked:!1,hoverDelegate:w,...n.toggleStyles})),this._register(this.regex.onChange(P=>{this._onDidOptionChange.fire(P),!P&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(P=>{this._onRegexKeyDown.fire(P)})),this.wholeWords=this._register(new CEt({appendTitle:c,isChecked:!1,hoverDelegate:w,...n.toggleStyles})),this._register(this.wholeWords.onChange(P=>{this._onDidOptionChange.fire(P),!P&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new bEt({appendTitle:s,isChecked:!1,hoverDelegate:w,...n.toggleStyles})),this._register(this.caseSensitive.onChange(P=>{this._onDidOptionChange.fire(P),!P&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(P=>{this._onCaseSensitiveKeyDown.fire(P)}));const I=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,P=>{if(P.equals(15)||P.equals(17)||P.equals(9)){const O=I.indexOf(this.domNode.ownerDocument.activeElement);if(O>=0){let z=-1;P.equals(17)?z=(O+1)%I.length:P.equals(15)&&(O===0?z=I.length-1:z=O-1),P.equals(9)?(I[O].blur(),this.inputBox.focus()):z>=0&&I[z].focus(),il.stop(P,!0)}}})}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(n==null?void 0:n.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),e==null||e.appendChild(this.domNode),this._register(en(this.inputBox.inputElement,"compositionstart",I=>{this.imeSessionInProgress=!0})),this._register(en(this.inputBox.inputElement,"compositionend",I=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,I=>this._onKeyDown.fire(I)),this.onkeyup(this.inputBox.inputElement,I=>this._onKeyUp.fire(I)),this.oninput(this.inputBox.inputElement,I=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,I=>this._onMouseDown.fire(I))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){var e,i,n;this.domNode.classList.remove("disabled"),this.inputBox.enable(),(e=this.regex)==null||e.enable(),(i=this.wholeWords)==null||i.enable(),(n=this.caseSensitive)==null||n.enable();for(const s of this.additionalToggles)s.enable()}disable(){var e,i,n;this.domNode.classList.add("disabled"),this.inputBox.disable(),(e=this.regex)==null||e.disable(),(i=this.wholeWords)==null||i.disable(),(n=this.caseSensitive)==null||n.disable();for(const s of this.additionalToggles)s.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){for(const i of this.additionalToggles)i.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new wn;for(const i of e??[])this.additionalTogglesDisposables.value.add(i),this.controls.appendChild(i.domNode),this.additionalTogglesDisposables.value.add(i.onChange(n=>{this._onDidOptionChange.fire(n),!n&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(i);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){var i,n,s;e?this.inputBox.paddingRight=0:this.inputBox.paddingRight=(((i=this.caseSensitive)==null?void 0:i.width())??0)+(((n=this.wholeWords)==null?void 0:n.width())??0)+(((s=this.regex)==null?void 0:s.width())??0)+this.additionalToggles.reduce((c,d)=>c+d.width(),0)}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){var e;return((e=this.caseSensitive)==null?void 0:e.checked)??!1}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){var e;return((e=this.wholeWords)==null?void 0:e.checked)??!1}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){var e;return((e=this.regex)==null?void 0:e.checked)??!1}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){var e;(e=this.caseSensitive)==null||e.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}const nCi=Cr;class rCi extends xi{constructor(e,i,n){super(),this.parent=e,this.onKeyDown=c=>ph(this.findInput.inputBox.inputElement,br.KEY_DOWN,c),this.onDidChange=c=>this.findInput.onDidChange(c),this.container=jn(this.parent,nCi(".quick-input-box")),this.findInput=this._register(new xEt(this.container,void 0,{label:"",inputBoxStyles:i,toggleStyles:n}));const s=this.findInput.inputBox.inputElement;s.role="combobox",s.ariaHasPopup="menu",s.ariaAutoComplete="list",s.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}getSelection(){return this.findInput.inputBox.getSelection()}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}setAttribute(e,i){this.findInput.inputBox.inputElement.setAttribute(e,i)}showDecoration(e){e===S_.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===S_.Info?1:e===S_.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===S_.Info?1:e===S_.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}class sCi{get templateId(){return this.renderer.templateId}constructor(e,i){this.renderer=e,this.modelProvider=i}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:xi.None}}renderElement(e,i,n,s){var m;if((m=n.disposable)==null||m.dispose(),!n.data)return;const c=this.modelProvider();if(c.isResolved(e))return this.renderer.renderElement(c.get(e),e,n.data,s);const d=new ih,f=c.resolve(e,d.token);n.disposable={dispose:()=>d.cancel()},this.renderer.renderPlaceholder(e,n.data),f.then(v=>this.renderer.renderElement(v,e,n.data,s))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class oCi{constructor(e,i){this.modelProvider=e,this.accessibilityProvider=i}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const i=this.modelProvider();return i.isResolved(e)?this.accessibilityProvider.getAriaLabel(i.get(e)):null}}function aCi(l,e){return{...e,accessibilityProvider:e.accessibilityProvider&&new oCi(l,e.accessibilityProvider)}}class cCi{constructor(e,i,n,s,c={}){const d=()=>this.model,f=s.map(m=>new sCi(m,d));this.list=new Ow(e,i,n,f,aCi(d,c))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return Tr.map(this.list.onMouseDblClick,({element:e,index:i,browserEvent:n})=>({element:e===void 0?void 0:this._model.get(e),index:i,browserEvent:n}))}get onPointer(){return Tr.map(this.list.onPointer,({element:e,index:i,browserEvent:n})=>({element:e===void 0?void 0:this._model.get(e),index:i,browserEvent:n}))}get onDidChangeSelection(){return Tr.map(this.list.onDidChangeSelection,({elements:e,indexes:i,browserEvent:n})=>({elements:e.map(s=>this._model.get(s)),indexes:i,browserEvent:n}))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,Sb(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(e=>this.model.get(e))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}var DJ=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c};const lCi=!1;var tve;(function(l){l.North="north",l.South="south",l.East="east",l.West="west"})(tve||(tve={}));let uCi=4;const dCi=new gi;let fCi=300;const hCi=new gi;class bJe{constructor(e){this.el=e,this.disposables=new wn}get onPointerMove(){return this.disposables.add(new Xc(Eo(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new Xc(Eo(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}}DJ([x_],bJe.prototype,"onPointerMove",null);DJ([x_],bJe.prototype,"onPointerUp",null);class CJe{get onPointerMove(){return this.disposables.add(new Xc(this.el,Ud.Change)).event}get onPointerUp(){return this.disposables.add(new Xc(this.el,Ud.End)).event}constructor(e){this.el=e,this.disposables=new wn}dispose(){this.disposables.dispose()}}DJ([x_],CJe.prototype,"onPointerMove",null);DJ([x_],CJe.prototype,"onPointerUp",null);class ive{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}}DJ([x_],ive.prototype,"onPointerMove",null);DJ([x_],ive.prototype,"onPointerUp",null);const UCt="pointer-events-disabled";class _1 extends xi{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",e===0),this.el.classList.toggle("minimum",e===1),this.el.classList.toggle("maximum",e===2),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const i=n=>{this.orthogonalStartDragHandleDisposables.clear(),n!==0&&(this._orthogonalStartDragHandle=jn(this.el,Cr(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(fo(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new Xc(this._orthogonalStartDragHandle,"mouseenter")).event(()=>_1.onMouseEnter(e),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new Xc(this._orthogonalStartDragHandle,"mouseleave")).event(()=>_1.onMouseLeave(e),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(i,this)),i(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const i=n=>{this.orthogonalEndDragHandleDisposables.clear(),n!==0&&(this._orthogonalEndDragHandle=jn(this.el,Cr(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(fo(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new Xc(this._orthogonalEndDragHandle,"mouseenter")).event(()=>_1.onMouseEnter(e),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new Xc(this._orthogonalEndDragHandle,"mouseleave")).event(()=>_1.onMouseLeave(e),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(i,this)),i(e.state)}this._orthogonalEndSash=e}}constructor(e,i,n){super(),this.hoverDelay=fCi,this.hoverDelayer=this._register(new Ck(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new gi),this._onDidStart=this._register(new gi),this._onDidChange=this._register(new gi),this._onDidReset=this._register(new gi),this._onDidEnd=this._register(new gi),this.orthogonalStartSashDisposables=this._register(new wn),this.orthogonalStartDragHandleDisposables=this._register(new wn),this.orthogonalEndSashDisposables=this._register(new wn),this.orthogonalEndDragHandleDisposables=this._register(new wn),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=jn(e,Cr(".monaco-sash")),n.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${n.orthogonalEdge}`),Hc&&this.el.classList.add("mac");const s=this._register(new Xc(this.el,"mousedown")).event;this._register(s(w=>this.onPointerStart(w,new bJe(e)),this));const c=this._register(new Xc(this.el,"dblclick")).event;this._register(c(this.onPointerDoublePress,this));const d=this._register(new Xc(this.el,"mouseenter")).event;this._register(d(()=>_1.onMouseEnter(this)));const f=this._register(new Xc(this.el,"mouseleave")).event;this._register(f(()=>_1.onMouseLeave(this))),this._register(y1.addTarget(this.el));const m=this._register(new Xc(this.el,Ud.Start)).event;this._register(m(w=>this.onPointerStart(w,new CJe(this.el)),this));const v=this._register(new Xc(this.el,Ud.Tap)).event;let x;this._register(v(w=>{if(x){clearTimeout(x),x=void 0,this.onPointerDoublePress(w);return}clearTimeout(x),x=setTimeout(()=>x=void 0,250)},this)),typeof n.size=="number"?(this.size=n.size,n.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=uCi,this._register(dCi.event(w=>{this.size=w,this.layout()}))),this._register(hCi.event(w=>this.hoverDelay=w)),this.layoutProvider=i,this.orthogonalStartSash=n.orthogonalStartSash,this.orthogonalEndSash=n.orthogonalEndSash,this.orientation=n.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",lCi),this.layout()}onPointerStart(e,i){il.stop(e);let n=!1;if(!e.__orthogonalSashEvent){const O=this.getOrthogonalSash(e);O&&(n=!0,e.__orthogonalSashEvent=!0,O.onPointerStart(e,new ive(i)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new ive(i))),!this.state)return;const s=this.el.ownerDocument.getElementsByTagName("iframe");for(const O of s)O.classList.add(UCt);const c=e.pageX,d=e.pageY,f=e.altKey,m={startX:c,currentX:c,startY:d,currentY:d,altKey:f};this.el.classList.add("active"),this._onDidStart.fire(m);const v=Dw(this.el),x=()=>{let O="";n?O="all-scroll":this.orientation===1?this.state===1?O="s-resize":this.state===2?O="n-resize":O=Hc?"row-resize":"ns-resize":this.state===1?O="e-resize":this.state===2?O="w-resize":O=Hc?"col-resize":"ew-resize",v.textContent=`* { cursor: ${O} !important; }`},w=new wn;x(),n||this.onDidEnablementChange.event(x,null,w);const I=O=>{il.stop(O,!1);const z={startX:c,currentX:O.pageX,startY:d,currentY:O.pageY,altKey:f};this._onDidChange.fire(z)},P=O=>{il.stop(O,!1),v.remove(),this.el.classList.remove("active"),this._onDidEnd.fire(),w.dispose();for(const z of s)z.classList.remove(UCt)};i.onPointerMove(I,null,w),i.onPointerUp(P,null,w),w.add(i)}onPointerDoublePress(e){const i=this.getOrthogonalSash(e);i&&i._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,i=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger(()=>e.el.classList.add("hover"),e.hoverDelay).then(void 0,()=>{}),!i&&e.linkedSash&&_1.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,i=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!i&&e.linkedSash&&_1.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){_1.onMouseLeave(this)}layout(){if(this.orientation===0){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){const i=e.initialTarget??e.target;if(!(!i||!Mm(i))&&i.classList.contains("orthogonal-drag-handle"))return i.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}const _Ci={separatorBorder:In.transparent};class kEt{set size(e){this._size=e}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(e,i){var n,s;if(e!==this.visible){e?(this.size=uv(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof i=="number"?i:this.size,this.size=0),this.container.classList.toggle("visible",e);try{(s=(n=this.view).setVisible)==null||s.call(n,e)}catch(c){console.error("Splitview: Failed to set visible view"),console.error(c)}}}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){return this.view.proportionalLayout??!0}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}constructor(e,i,n,s){this.container=e,this.view=i,this.disposable=s,this._cachedVisibleSize=void 0,typeof n=="number"?(this._size=n,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=n.cachedVisibleSize)}layout(e,i){this.layoutContainer(e);try{this.view.layout(this.size,e,i)}catch(n){console.error("Splitview: Failed to layout view"),console.error(n)}}dispose(){this.disposable.dispose()}}class pCi extends kEt{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class mCi extends kEt{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var v4;(function(l){l[l.Idle=0]="Idle",l[l.Busy=1]="Busy"})(v4||(v4={}));var nve;(function(l){l.Distribute={type:"distribute"};function e(s){return{type:"split",index:s}}l.Split=e;function i(s){return{type:"auto",index:s}}l.Auto=i;function n(s){return{type:"invisible",cachedVisibleSize:s}}l.Invisible=n})(nve||(nve={}));class TEt extends xi{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(const i of this.sashItems)i.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(const i of this.sashItems)i.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,i={}){super(),this.size=0,this._contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=v4.Idle,this._onDidSashChange=this._register(new gi),this._onDidSashReset=this._register(new gi),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=i.orientation??0,this.inverseAltBehavior=i.inverseAltBehavior??!1,this.proportionalLayout=i.proportionalLayout??!0,this.getSashOrthogonalSize=i.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=jn(this.el,Cr(".sash-container")),this.viewContainer=Cr(".split-view-container"),this.scrollable=this._register(new CJ({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:s=>ZC(Eo(this.el),s)})),this.scrollableElement=this._register(new owe(this.viewContainer,{vertical:this.orientation===0?i.scrollbarVisibility??1:2,horizontal:this.orientation===1?i.scrollbarVisibility??1:2},this.scrollable));const n=this._register(new Xc(this.viewContainer,"scroll")).event;this._register(n(s=>{const c=this.scrollableElement.getScrollPosition(),d=Math.abs(this.viewContainer.scrollLeft-c.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,f=Math.abs(this.viewContainer.scrollTop-c.scrollTop)<=1?void 0:this.viewContainer.scrollTop;(d!==void 0||f!==void 0)&&this.scrollableElement.setScrollPosition({scrollLeft:d,scrollTop:f})})),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(s=>{s.scrollTopChanged&&(this.viewContainer.scrollTop=s.scrollTop),s.scrollLeftChanged&&(this.viewContainer.scrollLeft=s.scrollLeft)})),jn(this.el,this.scrollableElement.getDomNode()),this.style(i.styles||_Ci),i.descriptor&&(this.size=i.descriptor.size,i.descriptor.views.forEach((s,c)=>{const d=xy(s.visible)||s.visible?s.size:{type:"invisible",cachedVisibleSize:s.size},f=s.view;this.doAddView(f,d,c,!0)}),this._contentSize=this.viewItems.reduce((s,c)=>s+c.size,0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,i,n=this.viewItems.length,s){this.doAddView(e,i,n,s)}layout(e,i){const n=Math.max(this.size,this._contentSize);if(this.size=e,this.layoutContext=i,this.proportions){let s=0;for(let c=0;c<this.viewItems.length;c++){const d=this.viewItems[c],f=this.proportions[c];typeof f=="number"?s+=f:e-=d.size}for(let c=0;c<this.viewItems.length;c++){const d=this.viewItems[c],f=this.proportions[c];typeof f=="number"&&s>0&&(d.size=uv(Math.round(f*e/s),d.minimumSize,d.maximumSize))}}else{const s=Sb(this.viewItems.length),c=s.filter(f=>this.viewItems[f].priority===1),d=s.filter(f=>this.viewItems[f].priority===2);this.resize(this.viewItems.length-1,e-n,void 0,c,d)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this._contentSize>0&&(this.proportions=this.viewItems.map(e=>e.proportionalLayout&&e.visible?e.size/this._contentSize:void 0))}onSashStart({sash:e,start:i,alt:n}){for(const f of this.viewItems)f.enabled=!1;const s=this.sashItems.findIndex(f=>f.sash===e),c=gT(en(this.el.ownerDocument.body,"keydown",f=>d(this.sashDragState.current,f.altKey)),en(this.el.ownerDocument.body,"keyup",()=>d(this.sashDragState.current,!1))),d=(f,m)=>{const v=this.viewItems.map(O=>O.size);let x=Number.NEGATIVE_INFINITY,w=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(m=!m),m)if(s===this.sashItems.length-1){const z=this.viewItems[s];x=(z.minimumSize-z.size)/2,w=(z.maximumSize-z.size)/2}else{const z=this.viewItems[s+1];x=(z.size-z.maximumSize)/2,w=(z.size-z.minimumSize)/2}let I,P;if(!m){const O=Sb(s,-1),z=Sb(s+1,this.viewItems.length),J=O.reduce((ct,Mt)=>ct+(this.viewItems[Mt].minimumSize-v[Mt]),0),Y=O.reduce((ct,Mt)=>ct+(this.viewItems[Mt].viewMaximumSize-v[Mt]),0),ae=z.length===0?Number.POSITIVE_INFINITY:z.reduce((ct,Mt)=>ct+(v[Mt]-this.viewItems[Mt].minimumSize),0),me=z.length===0?Number.NEGATIVE_INFINITY:z.reduce((ct,Mt)=>ct+(v[Mt]-this.viewItems[Mt].viewMaximumSize),0),ye=Math.max(J,me),Ce=Math.min(ae,Y),Fe=this.findFirstSnapIndex(O),rt=this.findFirstSnapIndex(z);if(typeof Fe=="number"){const ct=this.viewItems[Fe],Mt=Math.floor(ct.viewMinimumSize/2);I={index:Fe,limitDelta:ct.visible?ye-Mt:ye+Mt,size:ct.size}}if(typeof rt=="number"){const ct=this.viewItems[rt],Mt=Math.floor(ct.viewMinimumSize/2);P={index:rt,limitDelta:ct.visible?Ce+Mt:Ce-Mt,size:ct.size}}}this.sashDragState={start:f,current:f,index:s,sizes:v,minDelta:x,maxDelta:w,alt:m,snapBefore:I,snapAfter:P,disposable:c}};d(i,n)}onSashChange({current:e}){const{index:i,start:n,sizes:s,alt:c,minDelta:d,maxDelta:f,snapBefore:m,snapAfter:v}=this.sashDragState;this.sashDragState.current=e;const x=e-n,w=this.resize(i,x,s,void 0,void 0,d,f,m,v);if(c){const I=i===this.sashItems.length-1,P=this.viewItems.map(me=>me.size),O=I?i:i+1,z=this.viewItems[O],J=z.size-z.maximumSize,Y=z.size-z.minimumSize,ae=I?i-1:i+1;this.resize(ae,-w,P,void 0,void 0,J,Y)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const i of this.viewItems)i.enabled=!0}onViewChange(e,i){const n=this.viewItems.indexOf(e);n<0||n>=this.viewItems.length||(i=typeof i=="number"?i:e.size,i=uv(i,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&n>0?(this.resize(n-1,Math.floor((e.size-i)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=i,this.relayout([n],void 0)))}resizeView(e,i){if(!(e<0||e>=this.viewItems.length)){if(this.state!==v4.Idle)throw new Error("Cant modify splitview");this.state=v4.Busy;try{const n=Sb(this.viewItems.length).filter(f=>f!==e),s=[...n.filter(f=>this.viewItems[f].priority===1),e],c=n.filter(f=>this.viewItems[f].priority===2),d=this.viewItems[e];i=Math.round(i),i=uv(i,d.minimumSize,Math.min(d.maximumSize,this.size)),d.size=i,this.relayout(s,c)}finally{this.state=v4.Idle}}}distributeViewSizes(){const e=[];let i=0;for(const f of this.viewItems)f.maximumSize-f.minimumSize>0&&(e.push(f),i+=f.size);const n=Math.floor(i/e.length);for(const f of e)f.size=uv(n,f.minimumSize,f.maximumSize);const s=Sb(this.viewItems.length),c=s.filter(f=>this.viewItems[f].priority===1),d=s.filter(f=>this.viewItems[f].priority===2);this.relayout(c,d)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,i,n=this.viewItems.length,s){if(this.state!==v4.Idle)throw new Error("Cant modify splitview");this.state=v4.Busy;try{const c=Cr(".split-view-view");n===this.viewItems.length?this.viewContainer.appendChild(c):this.viewContainer.insertBefore(c,this.viewContainer.children.item(n));const d=e.onDidChange(I=>this.onViewChange(x,I)),f=fo(()=>c.remove()),m=gT(d,f);let v;typeof i=="number"?v=i:(i.type==="auto"&&(this.areViewsDistributed()?i={type:"distribute"}:i={type:"split",index:i.index}),i.type==="split"?v=this.getViewSize(i.index)/2:i.type==="invisible"?v={cachedVisibleSize:i.cachedVisibleSize}:v=e.minimumSize);const x=this.orientation===0?new pCi(c,e,v,m):new mCi(c,e,v,m);if(this.viewItems.splice(n,0,x),this.viewItems.length>1){const I={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},P=this.orientation===0?new _1(this.sashContainer,{getHorizontalSashTop:ct=>this.getSashPosition(ct),getHorizontalSashWidth:this.getSashOrthogonalSize},{...I,orientation:1}):new _1(this.sashContainer,{getVerticalSashLeft:ct=>this.getSashPosition(ct),getVerticalSashHeight:this.getSashOrthogonalSize},{...I,orientation:0}),O=this.orientation===0?ct=>({sash:P,start:ct.startY,current:ct.currentY,alt:ct.altKey}):ct=>({sash:P,start:ct.startX,current:ct.currentX,alt:ct.altKey}),J=Tr.map(P.onDidStart,O)(this.onSashStart,this),ae=Tr.map(P.onDidChange,O)(this.onSashChange,this),ye=Tr.map(P.onDidEnd,()=>this.sashItems.findIndex(ct=>ct.sash===P))(this.onSashEnd,this),Ce=P.onDidReset(()=>{const ct=this.sashItems.findIndex($t=>$t.sash===P),Mt=Sb(ct,-1),Yt=Sb(ct+1,this.viewItems.length),Bi=this.findFirstSnapIndex(Mt),$i=this.findFirstSnapIndex(Yt);typeof Bi=="number"&&!this.viewItems[Bi].visible||typeof $i=="number"&&!this.viewItems[$i].visible||this._onDidSashReset.fire(ct)}),Fe=gT(J,ae,ye,Ce,P),rt={sash:P,disposable:Fe};this.sashItems.splice(n-1,0,rt)}c.appendChild(e.element);let w;typeof i!="number"&&i.type==="split"&&(w=[i.index]),s||this.relayout([n],w),!s&&typeof i!="number"&&i.type==="distribute"&&this.distributeViewSizes()}finally{this.state=v4.Idle}}relayout(e,i){const n=this.viewItems.reduce((s,c)=>s+c.size,0);this.resize(this.viewItems.length-1,this.size-n,void 0,e,i),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,i,n=this.viewItems.map(x=>x.size),s,c,d=Number.NEGATIVE_INFINITY,f=Number.POSITIVE_INFINITY,m,v){if(e<0||e>=this.viewItems.length)return 0;const x=Sb(e,-1),w=Sb(e+1,this.viewItems.length);if(c)for(const rt of c)Q5e(x,rt),Q5e(w,rt);if(s)for(const rt of s)Hge(x,rt),Hge(w,rt);const I=x.map(rt=>this.viewItems[rt]),P=x.map(rt=>n[rt]),O=w.map(rt=>this.viewItems[rt]),z=w.map(rt=>n[rt]),J=x.reduce((rt,ct)=>rt+(this.viewItems[ct].minimumSize-n[ct]),0),Y=x.reduce((rt,ct)=>rt+(this.viewItems[ct].maximumSize-n[ct]),0),ae=w.length===0?Number.POSITIVE_INFINITY:w.reduce((rt,ct)=>rt+(n[ct]-this.viewItems[ct].minimumSize),0),me=w.length===0?Number.NEGATIVE_INFINITY:w.reduce((rt,ct)=>rt+(n[ct]-this.viewItems[ct].maximumSize),0),ye=Math.max(J,me,d),Ce=Math.min(ae,Y,f);let Fe=!1;if(m){const rt=this.viewItems[m.index],ct=i>=m.limitDelta;Fe=ct!==rt.visible,rt.setVisible(ct,m.size)}if(!Fe&&v){const rt=this.viewItems[v.index],ct=i<v.limitDelta;Fe=ct!==rt.visible,rt.setVisible(ct,v.size)}if(Fe)return this.resize(e,i,n,s,c,d,f);i=uv(i,ye,Ce);for(let rt=0,ct=i;rt<I.length;rt++){const Mt=I[rt],Yt=uv(P[rt]+ct,Mt.minimumSize,Mt.maximumSize),Bi=Yt-P[rt];ct-=Bi,Mt.size=Yt}for(let rt=0,ct=i;rt<O.length;rt++){const Mt=O[rt],Yt=uv(z[rt]-ct,Mt.minimumSize,Mt.maximumSize),Bi=Yt-z[rt];ct+=Bi,Mt.size=Yt}return i}distributeEmptySpace(e){const i=this.viewItems.reduce((f,m)=>f+m.size,0);let n=this.size-i;const s=Sb(this.viewItems.length-1,-1),c=s.filter(f=>this.viewItems[f].priority===1),d=s.filter(f=>this.viewItems[f].priority===2);for(const f of d)Q5e(s,f);for(const f of c)Hge(s,f);typeof e=="number"&&Hge(s,e);for(let f=0;n!==0&&f<s.length;f++){const m=this.viewItems[s[f]],v=uv(m.size+n,m.minimumSize,m.maximumSize),x=v-m.size;n-=x,m.size=v}}layoutViews(){this._contentSize=this.viewItems.reduce((i,n)=>i+n.size,0);let e=0;for(const i of this.viewItems)i.layout(e,this.layoutContext),e+=i.size;this.sashItems.forEach(i=>i.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this._contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this._contentSize})}updateSashEnablement(){let e=!1;const i=this.viewItems.map(m=>e=m.size-m.minimumSize>0||e);e=!1;const n=this.viewItems.map(m=>e=m.maximumSize-m.size>0||e),s=[...this.viewItems].reverse();e=!1;const c=s.map(m=>e=m.size-m.minimumSize>0||e).reverse();e=!1;const d=s.map(m=>e=m.maximumSize-m.size>0||e).reverse();let f=0;for(let m=0;m<this.sashItems.length;m++){const{sash:v}=this.sashItems[m],x=this.viewItems[m];f+=x.size;const w=!(i[m]&&d[m+1]),I=!(n[m]&&c[m+1]);if(w&&I){const P=Sb(m,-1),O=Sb(m+1,this.viewItems.length),z=this.findFirstSnapIndex(P),J=this.findFirstSnapIndex(O),Y=typeof z=="number"&&!this.viewItems[z].visible,ae=typeof J=="number"&&!this.viewItems[J].visible;Y&&c[m]&&(f>0||this.startSnappingEnabled)?v.state=1:ae&&i[m]&&(f<this._contentSize||this.endSnappingEnabled)?v.state=2:v.state=0}else w&&!I?v.state=1:!w&&I?v.state=2:v.state=3}}getSashPosition(e){let i=0;for(let n=0;n<this.sashItems.length;n++)if(i+=this.viewItems[n].size,this.sashItems[n].sash===e)return i;return 0}findFirstSnapIndex(e){for(const i of e){const n=this.viewItems[i];if(n.visible&&n.snap)return i}for(const i of e){const n=this.viewItems[i];if(n.visible&&n.maximumSize-n.minimumSize>0)return;if(!n.visible&&n.snap)return i}}areViewsDistributed(){let e,i;for(const n of this.viewItems)if(e=e===void 0?n.size:Math.min(e,n.size),i=i===void 0?n.size:Math.max(i,n.size),i-e>2)return!1;return!0}dispose(){var e;(e=this.sashDragState)==null||e.disposable.dispose(),vd(this.viewItems),this.viewItems=[],this.sashItems.forEach(i=>i.disposable.dispose()),this.sashItems=[],super.dispose()}}const hCe=class hCe{constructor(e,i,n){this.columns=e,this.getColumnSize=n,this.templateId=hCe.TemplateId,this.renderedTemplates=new Set;const s=new Map(i.map(c=>[c.templateId,c]));this.renderers=[];for(const c of e){const d=s.get(c.templateId);if(!d)throw new Error(`Table cell renderer for template id ${c.templateId} not found.`);this.renderers.push(d)}}renderTemplate(e){const i=jn(e,Cr(".monaco-table-tr")),n=[],s=[];for(let d=0;d<this.columns.length;d++){const f=this.renderers[d],m=jn(i,Cr(".monaco-table-td",{"data-col-index":d}));m.style.width=`${this.getColumnSize(d)}px`,n.push(m),s.push(f.renderTemplate(m))}const c={container:e,cellContainers:n,cellTemplateData:s};return this.renderedTemplates.add(c),c}renderElement(e,i,n,s){for(let c=0;c<this.columns.length;c++){const f=this.columns[c].project(e);this.renderers[c].renderElement(f,i,n.cellTemplateData[c],s)}}disposeElement(e,i,n,s){for(let c=0;c<this.columns.length;c++){const d=this.renderers[c];if(d.disposeElement){const m=this.columns[c].project(e);d.disposeElement(m,i,n.cellTemplateData[c],s)}}}disposeTemplate(e){for(let i=0;i<this.columns.length;i++)this.renderers[i].disposeTemplate(e.cellTemplateData[i]);s0(e.container),this.renderedTemplates.delete(e)}layoutColumn(e,i){for(const{cellContainers:n}of this.renderedTemplates)n[e].style.width=`${i}px`}};hCe.TemplateId="row";let rve=hCe;function gCi(l){return{getHeight(e){return l.getHeight(e)},getTemplateId(){return rve.TemplateId}}}class yCi extends xi{get minimumSize(){return this.column.minimumWidth??120}get maximumSize(){return this.column.maximumWidth??Number.POSITIVE_INFINITY}get onDidChange(){return this.column.onDidChangeWidthConstraints??Tr.None}constructor(e,i){super(),this.column=e,this.index=i,this._onDidLayout=new gi,this.onDidLayout=this._onDidLayout.event,this.element=Cr(".monaco-table-th",{"data-col-index":i},e.label),e.tooltip&&this._register(QE().setupManagedHover(Dv("mouse"),this.element,e.tooltip))}layout(e){this._onDidLayout.fire([this.index,e])}}const _Ce=class _Ce{get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onDidScroll(){return this.list.onDidScroll}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}get scrollHeight(){return this.list.scrollHeight}get renderHeight(){return this.list.renderHeight}get onDidDispose(){return this.list.onDidDispose}constructor(e,i,n,s,c,d){this.virtualDelegate=n,this.columns=s,this.domId=`table_id_${++_Ce.InstanceCount}`,this.disposables=new wn,this.cachedWidth=0,this.cachedHeight=0,this.domNode=jn(i,Cr(`.monaco-table.${this.domId}`));const f=s.map((x,w)=>this.disposables.add(new yCi(x,w))),m={size:f.reduce((x,w)=>x+w.column.weight,0),views:f.map(x=>({size:x.column.weight,view:x}))};this.splitview=this.disposables.add(new TEt(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:m})),this.splitview.el.style.height=`${n.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${n.headerRowHeight}px`;const v=new rve(s,c,x=>this.splitview.getViewSize(x));this.list=this.disposables.add(new Ow(e,this.domNode,gCi(n),[v],d)),Tr.any(...f.map(x=>x.onDidLayout))(([x,w])=>v.layoutColumn(x,w),null,this.disposables),this.splitview.onDidSashReset(x=>{const w=s.reduce((P,O)=>P+O.weight,0),I=s[x].weight/w*this.cachedWidth;this.splitview.resizeView(x,I)},null,this.disposables),this.styleElement=Dw(this.domNode),this.style(z1i)}updateOptions(e){this.list.updateOptions(e)}splice(e,i,n=[]){this.list.splice(e,i,n)}getHTMLElement(){return this.domNode}style(e){const i=[];i.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {
+ top: ${this.virtualDelegate.headerRowHeight+1}px;
+ height: calc(100% - ${this.virtualDelegate.headerRowHeight}px);
+ }`),this.styleElement.textContent=i.join(`
+`),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}};_Ce.InstanceCount=0;let gHe=_Ce;var uw;(function(l){l[l.Expanded=0]="Expanded",l[l.Collapsed=1]="Collapsed",l[l.PreserveOrExpanded=2]="PreserveOrExpanded",l[l.PreserveOrCollapsed=3]="PreserveOrCollapsed"})(uw||(uw={}));var o9;(function(l){l[l.Unknown=0]="Unknown",l[l.Twistie=1]="Twistie",l[l.Element=2]="Element",l[l.Filter=3]="Filter"})(o9||(o9={}));class gw extends Error{constructor(e,i){super(`TreeError [${e}] ${i}`)}}class SJe{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let i=this._map.get(e);return i||(i=this.fn(e),this._map.set(e,i)),i}}function wJe(l){return typeof l=="object"&&"visibility"in l&&"data"in l}function hre(l){switch(l){case!0:return 1;case!1:return 0;default:return l}}function i9e(l){return typeof l.collapsible=="boolean"}class vCi{constructor(e,i,n,s={}){this.user=e,this.list=i,this.rootRef=[],this.eventBufferer=new lse,this._onDidChangeCollapseState=new gi,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new gi,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new gi,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new Ck(c2t),this.collapseByDefault=typeof s.collapseByDefault>"u"?!1:s.collapseByDefault,this.allowNonCollapsibleParents=s.allowNonCollapsibleParents??!1,this.filter=s.filter,this.autoExpandSingleChildren=typeof s.autoExpandSingleChildren>"u"?!1:s.autoExpandSingleChildren,this.root={parent:void 0,element:n,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,i,n=dl.empty(),s={}){if(e.length===0)throw new gw(this.user,"Invalid tree location");s.diffIdentityProvider?this.spliceSmart(s.diffIdentityProvider,e,i,n,s):this.spliceSimple(e,i,n,s)}spliceSmart(e,i,n,s=dl.empty(),c,d=c.diffDepth??0){const{parentNode:f}=this.getParentNodeWithListIndex(i);if(!f.lastDiffIds)return this.spliceSimple(i,n,s,c);const m=[...s],v=i[i.length-1],x=new mL({getElements:()=>f.lastDiffIds},{getElements:()=>[...f.children.slice(0,v),...m,...f.children.slice(v+n)].map(z=>e.getId(z.element).toString())}).ComputeDiff(!1);if(x.quitEarly)return f.lastDiffIds=void 0,this.spliceSimple(i,n,m,c);const w=i.slice(0,-1),I=(z,J,Y)=>{if(d>0)for(let ae=0;ae<Y;ae++)z--,J--,this.spliceSmart(e,[...w,z,0],Number.MAX_SAFE_INTEGER,m[J].children,c,d-1)};let P=Math.min(f.children.length,v+n),O=m.length;for(const z of x.changes.sort((J,Y)=>Y.originalStart-J.originalStart))I(P,O,P-(z.originalStart+z.originalLength)),P=z.originalStart,O=z.modifiedStart-v,this.spliceSimple([...w,P],z.originalLength,dl.slice(m,O,O+z.modifiedLength),c);I(P,O,P)}spliceSimple(e,i,n=dl.empty(),{onDidCreateNode:s,onDidDeleteNode:c,diffIdentityProvider:d}){const{parentNode:f,listIndex:m,revealed:v,visible:x}=this.getParentNodeWithListIndex(e),w=[],I=dl.map(n,Ce=>this.createTreeNode(Ce,f,f.visible?1:0,v,w,s)),P=e[e.length-1];let O=0;for(let Ce=P;Ce>=0&&Ce<f.children.length;Ce--){const Fe=f.children[Ce];if(Fe.visible){O=Fe.visibleChildIndex;break}}const z=[];let J=0,Y=0;for(const Ce of I)z.push(Ce),Y+=Ce.renderNodeCount,Ce.visible&&(Ce.visibleChildIndex=O+J++);const ae=zyt(f.children,P,i,z);d?f.lastDiffIds?zyt(f.lastDiffIds,P,i,z.map(Ce=>d.getId(Ce.element).toString())):f.lastDiffIds=f.children.map(Ce=>d.getId(Ce.element).toString()):f.lastDiffIds=void 0;let me=0;for(const Ce of ae)Ce.visible&&me++;if(me!==0)for(let Ce=P+z.length;Ce<f.children.length;Ce++){const Fe=f.children[Ce];Fe.visible&&(Fe.visibleChildIndex-=me)}if(f.visibleChildrenCount+=J-me,v&&x){const Ce=ae.reduce((Fe,rt)=>Fe+(rt.visible?rt.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(f,Y-Ce),this.list.splice(m,Ce,w)}if(ae.length>0&&c){const Ce=Fe=>{c(Fe),Fe.children.forEach(Ce)};ae.forEach(Ce)}this._onDidSplice.fire({insertedNodes:z,deletedNodes:ae});let ye=f;for(;ye;){if(ye.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}ye=ye.parent}}rerender(e){if(e.length===0)throw new gw(this.user,"Invalid tree location");const{node:i,listIndex:n,revealed:s}=this.getTreeNodeWithListIndex(e);i.visible&&s&&this.list.splice(n,1,[i])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:i,visible:n,revealed:s}=this.getTreeNodeWithListIndex(e);return n&&s?i:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,i){const n=this.getTreeNode(e);typeof i>"u"&&(i=!n.collapsible);const s={collapsible:i};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,s))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,i,n){const s=this.getTreeNode(e);typeof i>"u"&&(i=!s.collapsed);const c={collapsed:i,recursive:n||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,c))}_setCollapseState(e,i){const{node:n,listIndex:s,revealed:c}=this.getTreeNodeWithListIndex(e),d=this._setListNodeCollapseState(n,s,c,i);if(n!==this.root&&this.autoExpandSingleChildren&&d&&!i9e(i)&&n.collapsible&&!n.collapsed&&!i.recursive){let f=-1;for(let m=0;m<n.children.length;m++)if(n.children[m].visible)if(f>-1){f=-1;break}else f=m;f>-1&&this._setCollapseState([...e,f],i)}return d}_setListNodeCollapseState(e,i,n,s){const c=this._setNodeCollapseState(e,s,!1);if(!n||!e.visible||!c)return c;const d=e.renderNodeCount,f=this.updateNodeAfterCollapseChange(e),m=d-(i===-1?0:1);return this.list.splice(i+1,m,f.slice(1)),c}_setNodeCollapseState(e,i,n){let s;if(e===this.root?s=!1:(i9e(i)?(s=e.collapsible!==i.collapsible,e.collapsible=i.collapsible):e.collapsible?(s=e.collapsed!==i.collapsed,e.collapsed=i.collapsed):s=!1,s&&this._onDidChangeCollapseState.fire({node:e,deep:n})),!i9e(i)&&i.recursive)for(const c of e.children)s=this._setNodeCollapseState(c,i,!0)||s;return s}expandTo(e){this.eventBufferer.bufferEvents(()=>{let i=this.getTreeNode(e);for(;i.parent;)i=i.parent,e=e.slice(0,e.length-1),i.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){const e=this.root.renderNodeCount,i=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,i),this.refilterDelayer.cancel()}createTreeNode(e,i,n,s,c,d){const f={parent:i,element:e.element,children:[],depth:i.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof e.collapsible=="boolean"?e.collapsible:typeof e.collapsed<"u",collapsed:typeof e.collapsed>"u"?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},m=this._filterNode(f,n);f.visibility=m,s&&c.push(f);const v=e.children||dl.empty(),x=s&&m!==0&&!f.collapsed;let w=0,I=1;for(const P of v){const O=this.createTreeNode(P,f,m,x,c,d);f.children.push(O),I+=O.renderNodeCount,O.visible&&(O.visibleChildIndex=w++)}return this.allowNonCollapsibleParents||(f.collapsible=f.collapsible||f.children.length>0),f.visibleChildrenCount=w,f.visible=m===2?w>0:m===1,f.visible?f.collapsed||(f.renderNodeCount=I):(f.renderNodeCount=0,s&&c.pop()),d==null||d(f),f}updateNodeAfterCollapseChange(e){const i=e.renderNodeCount,n=[];return this._updateNodeAfterCollapseChange(e,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-i),n}_updateNodeAfterCollapseChange(e,i){if(e.visible===!1)return 0;if(i.push(e),e.renderNodeCount=1,!e.collapsed)for(const n of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(n,i);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const i=e.renderNodeCount,n=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-i),n}_updateNodeAfterFilterChange(e,i,n,s=!0){let c;if(e!==this.root){if(c=this._filterNode(e,i),c===0)return e.visible=!1,e.renderNodeCount=0,!1;s&&n.push(e)}const d=n.length;e.renderNodeCount=e===this.root?0:1;let f=!1;if(!e.collapsed||c!==0){let m=0;for(const v of e.children)f=this._updateNodeAfterFilterChange(v,c,n,s&&!e.collapsed)||f,v.visible&&(v.visibleChildIndex=m++);e.visibleChildrenCount=m}else e.visibleChildrenCount=0;return e!==this.root&&(e.visible=c===2?f:c===1,e.visibility=c),e.visible?e.collapsed||(e.renderNodeCount+=n.length-d):(e.renderNodeCount=0,s&&n.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,i){if(i!==0)for(;e;)e.renderNodeCount+=i,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,i){const n=this.filter?this.filter.filter(e.element,i):1;return typeof n=="boolean"?(e.filterData=void 0,n?1:0):wJe(n)?(e.filterData=n.data,hre(n.visibility)):(e.filterData=void 0,hre(n))}hasTreeNode(e,i=this.root){if(!e||e.length===0)return!0;const[n,...s]=e;return n<0||n>i.children.length?!1:this.hasTreeNode(s,i.children[n])}getTreeNode(e,i=this.root){if(!e||e.length===0)return i;const[n,...s]=e;if(n<0||n>i.children.length)throw new gw(this.user,"Invalid tree location");return this.getTreeNode(s,i.children[n])}getTreeNodeWithListIndex(e){if(e.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:i,listIndex:n,revealed:s,visible:c}=this.getParentNodeWithListIndex(e),d=e[e.length-1];if(d<0||d>i.children.length)throw new gw(this.user,"Invalid tree location");const f=i.children[d];return{node:f,listIndex:n,revealed:s,visible:c&&f.visible}}getParentNodeWithListIndex(e,i=this.root,n=0,s=!0,c=!0){const[d,...f]=e;if(d<0||d>i.children.length)throw new gw(this.user,"Invalid tree location");for(let m=0;m<d;m++)n+=i.children[m].renderNodeCount;return s=s&&!i.collapsed,c=c&&i.visible,f.length===0?{parentNode:i,listIndex:n,revealed:s,visible:c}:this.getParentNodeWithListIndex(f,i.children[d],n+1,s,c)}getNode(e=[]){return this.getTreeNode(e)}getNodeLocation(e){const i=[];let n=e;for(;n.parent;)i.push(n.parent.children.indexOf(n)),n=n.parent;return i.reverse()}getParentNodeLocation(e){if(e.length!==0)return e.length===1?[]:Aai(e)[0]}getFirstElementChild(e){const i=this.getTreeNode(e);if(i.children.length!==0)return i.children[0].element}}class bCi extends Ese{constructor(e){super(e.elements.map(i=>i.element)),this.data=e}}function n9e(l){return l instanceof Ese?new bCi(l):l}class CCi{constructor(e,i){this.modelProvider=e,this.dnd=i,this.autoExpandDisposable=xi.None,this.disposables=new wn}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,i){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(n=>n.element),i)}onDragStart(e,i){var n,s;(s=(n=this.dnd).onDragStart)==null||s.call(n,n9e(e),i)}onDragOver(e,i,n,s,c,d=!0){const f=this.dnd.onDragOver(n9e(e),i&&i.element,n,s,c),m=this.autoExpandNode!==i;if(m&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=i),typeof i>"u")return f;if(m&&typeof f!="boolean"&&f.autoExpand&&(this.autoExpandDisposable=CR(()=>{const P=this.modelProvider(),O=P.getNodeLocation(i);P.isCollapsed(O)&&P.setCollapsed(O,!1),this.autoExpandNode=void 0},500,this.disposables)),typeof f=="boolean"||!f.accept||typeof f.bubble>"u"||f.feedback){if(!d){const P=typeof f=="boolean"?f:f.accept,O=typeof f=="boolean"?void 0:f.effect;return{accept:P,effect:O,feedback:[n]}}return f}if(f.bubble===1){const P=this.modelProvider(),O=P.getNodeLocation(i),z=P.getParentNodeLocation(O),J=P.getNode(z),Y=z&&P.getListIndex(z);return this.onDragOver(e,J,Y,s,c,!1)}const v=this.modelProvider(),x=v.getNodeLocation(i),w=v.getListIndex(x),I=v.getListRenderCount(x);return{...f,feedback:Sb(w,w+I)}}drop(e,i,n,s,c){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(n9e(e),i&&i.element,n,s,c)}onDragEnd(e){var i,n;(n=(i=this.dnd).onDragEnd)==null||n.call(i,e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}function SCi(l,e){return e&&{...e,identityProvider:e.identityProvider&&{getId(i){return e.identityProvider.getId(i.element)}},dnd:e.dnd&&new CCi(l,e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(i){return e.multipleSelectionController.isSelectionSingleChangeEvent({...i,element:i.element})},isSelectionRangeChangeEvent(i){return e.multipleSelectionController.isSelectionRangeChangeEvent({...i,element:i.element})}},accessibilityProvider:e.accessibilityProvider&&{...e.accessibilityProvider,getSetSize(i){const n=l(),s=n.getNodeLocation(i),c=n.getParentNodeLocation(s);return n.getNode(c).visibleChildrenCount},getPosInSet(i){return i.visibleChildIndex+1},isChecked:e.accessibilityProvider&&e.accessibilityProvider.isChecked?i=>e.accessibilityProvider.isChecked(i.element):void 0,getRole:e.accessibilityProvider&&e.accessibilityProvider.getRole?i=>e.accessibilityProvider.getRole(i.element):()=>"treeitem",getAriaLabel(i){return e.accessibilityProvider.getAriaLabel(i.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider&&e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider&&e.accessibilityProvider.getAriaLevel?i=>e.accessibilityProvider.getAriaLevel(i.element):i=>i.depth,getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(i=>e.accessibilityProvider.getActiveDescendantId(i.element))},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(i){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i.element)}}}}class xJe{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,i){var n,s;(s=(n=this.delegate).setDynamicHeight)==null||s.call(n,e.element,i)}}var j$;(function(l){l.None="none",l.OnHover="onHover",l.Always="always"})(j$||(j$={}));class wCi{get elements(){return this._elements}constructor(e,i=[]){this._elements=i,this.disposables=new wn,this.onDidChange=Tr.forEach(e,n=>this._elements=n,this.disposables)}dispose(){this.disposables.dispose()}}const pne=class pne{constructor(e,i,n,s,c,d={}){var f;this.renderer=e,this.modelProvider=i,this.activeNodes=s,this.renderedIndentGuides=c,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=pne.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=xi.None,this.disposables=new wn,this.templateId=e.templateId,this.updateOptions(d),Tr.map(n,m=>m.node)(this.onDidChangeNodeTwistieState,this,this.disposables),(f=e.onDidChangeTwistieState)==null||f.call(e,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(typeof e.indent<"u"){const i=uv(e.indent,0,40);if(i!==this.indent){this.indent=i;for(const[n,s]of this.renderedNodes)this.renderTreeElement(n,s)}}if(typeof e.renderIndentGuides<"u"){const i=e.renderIndentGuides!==j$.None;if(i!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=i;for(const[n,s]of this.renderedNodes)this._renderIndentGuides(n,s);if(this.indentGuidesDisposable.dispose(),i){const n=new wn;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,n),this.indentGuidesDisposable=n,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}typeof e.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const i=jn(e,Cr(".monaco-tl-row")),n=jn(i,Cr(".monaco-tl-indent")),s=jn(i,Cr(".monaco-tl-twistie")),c=jn(i,Cr(".monaco-tl-contents")),d=this.renderer.renderTemplate(c);return{container:e,indent:n,twistie:s,indentGuidesDisposable:xi.None,templateData:d}}renderElement(e,i,n,s){this.renderedNodes.set(e,n),this.renderedElements.set(e.element,e),this.renderTreeElement(e,n),this.renderer.renderElement(e,i,n.templateData,s)}disposeElement(e,i,n,s){var c,d;n.indentGuidesDisposable.dispose(),(d=(c=this.renderer).disposeElement)==null||d.call(c,e,i,n.templateData,s),typeof s=="number"&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const i=this.renderedElements.get(e);i&&this.onDidChangeNodeTwistieState(i)}onDidChangeNodeTwistieState(e){const i=this.renderedNodes.get(e);i&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,i))}renderTreeElement(e,i){const n=pne.DefaultIndent+(e.depth-1)*this.indent;i.twistie.style.paddingLeft=`${n}px`,i.indent.style.width=`${n+this.indent-16}px`,e.collapsible?i.container.setAttribute("aria-expanded",String(!e.collapsed)):i.container.removeAttribute("aria-expanded"),i.twistie.classList.remove(...zo.asClassNameArray(pr.treeItemExpanded));let s=!1;this.renderer.renderTwistie&&(s=this.renderer.renderTwistie(e.element,i.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(s||i.twistie.classList.add(...zo.asClassNameArray(pr.treeItemExpanded)),i.twistie.classList.add("collapsible"),i.twistie.classList.toggle("collapsed",e.collapsed)):i.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,i)}_renderIndentGuides(e,i){if(s0(i.indent),i.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const n=new wn,s=this.modelProvider();for(;;){const c=s.getNodeLocation(e),d=s.getParentNodeLocation(c);if(!d)break;const f=s.getNode(d),m=Cr(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(f)&&m.classList.add("active"),i.indent.childElementCount===0?i.indent.appendChild(m):i.indent.insertBefore(m,i.indent.firstElementChild),this.renderedIndentGuides.add(f,m),n.add(fo(()=>this.renderedIndentGuides.delete(f,m))),e=f}i.indentGuidesDisposable=n}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const i=new Set,n=this.modelProvider();e.forEach(s=>{const c=n.getNodeLocation(s);try{const d=n.getParentNodeLocation(c);s.collapsible&&s.children.length>0&&!s.collapsed?i.add(s):d&&i.add(n.getNode(d))}catch{}}),this.activeIndentNodes.forEach(s=>{i.has(s)||this.renderedIndentGuides.forEach(s,c=>c.classList.remove("active"))}),i.forEach(s=>{this.activeIndentNodes.has(s)||this.renderedIndentGuides.forEach(s,c=>c.classList.add("active"))}),this.activeIndentNodes=i}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),vd(this.disposables)}};pne.DefaultIndent=8;let yHe=pne;class xCi{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(e,i,n){this.tree=e,this.keyboardNavigationLabelProvider=i,this._filter=n,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new wn,e.onWillRefilter(this.reset,this,this.disposables)}filter(e,i){let n=1;if(this._filter){const d=this._filter.filter(e,i);if(typeof d=="boolean"?n=d?1:0:wJe(d)?n=hre(d.visibility):n=d,n===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:BE.Default,visibility:n};const s=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),c=Array.isArray(s)?s:[s];for(const d of c){const f=d&&d.toString();if(typeof f>"u")return{data:BE.Default,visibility:n};let m;if(this.tree.findMatchType===OB.Contiguous){const v=f.toLowerCase().indexOf(this._lowercasePattern);if(v>-1){m=[Number.MAX_SAFE_INTEGER,0];for(let x=this._lowercasePattern.length;x>0;x--)m.push(v+x-1)}}else m=NB(this._pattern,this._lowercasePattern,0,f,f.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(m)return this._matchCount++,c.length===1?{data:m,visibility:n}:{data:{label:f,score:m},visibility:n}}return this.tree.findMode===z4.Filter?typeof this.tree.options.defaultFindVisibility=="number"?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(e):2:{data:BE.Default,visibility:n}}reset(){this._totalCount=0,this._matchCount=0}dispose(){vd(this.disposables)}}var z4;(function(l){l[l.Highlight=0]="Highlight",l[l.Filter=1]="Filter"})(z4||(z4={}));var OB;(function(l){l[l.Fuzzy=0]="Fuzzy",l[l.Contiguous=1]="Contiguous"})(OB||(OB={}));let kCi=class{get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}get matchType(){return this._matchType}set matchType(e){e!==this._matchType&&(this._matchType=e,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,i,n,s,c,d={}){this.tree=e,this.view=n,this.filter=s,this.contextViewProvider=c,this.options=d,this._pattern="",this.width=0,this._onDidChangeMode=new gi,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new gi,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new gi,this._onDidChangeOpenState=new gi,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new wn,this.disposables=new wn,this._mode=e.options.defaultFindMode??z4.Highlight,this._matchType=e.options.defaultFindMatchType??OB.Fuzzy,i.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(e={}){e.defaultFindMode!==void 0&&(this.mode=e.defaultFindMode),e.defaultFindMatchType!==void 0&&(this.matchType=e.defaultFindMatchType)}onDidSpliceModel(){!this.widget||this.pattern.length===0||(this.tree.refilter(),this.render())}render(){var i,n,s;const e=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&e?(xv(W("replFindNoResults","No results")),this.tree.options.showNotFoundMessage??!0?(i=this.widget)==null||i.showMessage({type:2,content:W("not found","No elements found.")}):(n=this.widget)==null||n.showMessage({type:2})):((s=this.widget)==null||s.clearMessage(),this.pattern&&xv(W("replFindResults","{0} results",this.filter.matchCount)))}shouldAllowFocus(e){return!this.widget||!this.pattern||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!BE.isDefault(e.filterData)}layout(e){var i;this.width=e,(i=this.widget)==null||i.layout(e)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}};function TCi(l,e){return l.position===e.position&&DEt(l,e)}function DEt(l,e){return l.node.element===e.node.element&&l.startIndex===e.startIndex&&l.height===e.height&&l.endIndex===e.endIndex}class DCi{constructor(e=[]){this.stickyNodes=e}get count(){return this.stickyNodes.length}equal(e){return Lf(this.stickyNodes,e.stickyNodes,TCi)}lastNodePartiallyVisible(){if(this.count===0)return!1;const e=this.stickyNodes[this.count-1];if(this.count===1)return e.position!==0;const i=this.stickyNodes[this.count-2];return i.position+i.height!==e.position}animationStateChanged(e){if(!Lf(this.stickyNodes,e.stickyNodes,DEt)||this.count===0)return!1;const i=this.stickyNodes[this.count-1],n=e.stickyNodes[e.count-1];return i.position!==n.position}}class ECi{constrainStickyScrollNodes(e,i,n){for(let s=0;s<e.length;s++){const c=e[s];if(c.position+c.height>n||s>=i)return e.slice(0,s)}return e}}let qCt=class extends xi{constructor(e,i,n,s,c,d={}){super(),this.tree=e,this.model=i,this.view=n,this.treeDelegate=c,this.maxWidgetViewRatio=.4;const f=this.validateStickySettings(d);this.stickyScrollMaxItemCount=f.stickyScrollMaxItemCount,this.stickyScrollDelegate=d.stickyScrollDelegate??new ECi,this._widget=this._register(new ICi(n.getScrollableElement(),n,e,s,c,d.accessibilityProvider)),this.onDidChangeHasFocus=this._widget.onDidChangeHasFocus,this.onContextMenu=this._widget.onContextMenu,this._register(n.onDidScroll(()=>this.update())),this._register(n.onDidChangeContentHeight(()=>this.update())),this._register(e.onDidChangeCollapseState(()=>this.update())),this.update()}get height(){return this._widget.height}getNodeAtHeight(e){let i;if(e===0?i=this.view.firstVisibleIndex:i=this.view.indexAt(e+this.view.scrollTop),!(i<0||i>=this.view.length))return this.view.element(i)}update(){const e=this.getNodeAtHeight(0);if(!e||this.tree.scrollTop===0){this._widget.setState(void 0);return}const i=this.findStickyState(e);this._widget.setState(i)}findStickyState(e){const i=[];let n=e,s=0,c=this.getNextStickyNode(n,void 0,s);for(;c&&(i.push(c),s+=c.height,!(i.length<=this.stickyScrollMaxItemCount&&(n=this.getNextVisibleNode(c),!n)));)c=this.getNextStickyNode(n,c.node,s);const d=this.constrainStickyNodes(i);return d.length?new DCi(d):void 0}getNextVisibleNode(e){return this.getNodeAtHeight(e.position+e.height)}getNextStickyNode(e,i,n){const s=this.getAncestorUnderPrevious(e,i);if(s&&!(s===e&&(!this.nodeIsUncollapsedParent(e)||this.nodeTopAlignsWithStickyNodesBottom(e,n))))return this.createStickyScrollNode(s,n)}nodeTopAlignsWithStickyNodesBottom(e,i){const n=this.getNodeIndex(e),s=this.view.getElementTop(n),c=i;return this.view.scrollTop===s-c}createStickyScrollNode(e,i){const n=this.treeDelegate.getHeight(e),{startIndex:s,endIndex:c}=this.getNodeRange(e),d=this.calculateStickyNodePosition(c,i,n);return{node:e,position:d,height:n,startIndex:s,endIndex:c}}getAncestorUnderPrevious(e,i=void 0){let n=e,s=this.getParentNode(n);for(;s;){if(s===i)return n;n=s,s=this.getParentNode(n)}if(i===void 0)return n}calculateStickyNodePosition(e,i,n){let s=this.view.getRelativeTop(e);if(s===null&&this.view.firstVisibleIndex===e&&e+1<this.view.length){const v=this.treeDelegate.getHeight(this.view.element(e)),x=this.view.getRelativeTop(e+1);s=x?x-v/this.view.renderHeight:null}if(s===null)return i;const c=this.view.element(e),d=this.treeDelegate.getHeight(c),m=s*this.view.renderHeight+d;return i+n>m&&i<=m?m-n:i}constrainStickyNodes(e){if(e.length===0)return[];const i=this.view.renderHeight*this.maxWidgetViewRatio,n=e[e.length-1];if(e.length<=this.stickyScrollMaxItemCount&&n.position+n.height<=i)return e;const s=this.stickyScrollDelegate.constrainStickyScrollNodes(e,this.stickyScrollMaxItemCount,i);if(!s.length)return[];const c=s[s.length-1];if(s.length>this.stickyScrollMaxItemCount||c.position+c.height>i)throw new Error("stickyScrollDelegate violates constraints");return s}getParentNode(e){const i=this.model.getNodeLocation(e),n=this.model.getParentNodeLocation(i);return n?this.model.getNode(n):void 0}nodeIsUncollapsedParent(e){const i=this.model.getNodeLocation(e);return this.model.getListRenderCount(i)>1}getNodeIndex(e){const i=this.model.getNodeLocation(e);return this.model.getListIndex(i)}getNodeRange(e){const i=this.model.getNodeLocation(e),n=this.model.getListIndex(i);if(n<0)throw new Error("Node not found in tree");const s=this.model.getListRenderCount(i),c=n+s-1;return{startIndex:n,endIndex:c}}nodePositionTopBelowWidget(e){const i=[];let n=this.getParentNode(e);for(;n;)i.push(n),n=this.getParentNode(n);let s=0;for(let c=0;c<i.length&&c<this.stickyScrollMaxItemCount;c++)s+=this.treeDelegate.getHeight(i[c]);return s}domFocus(){this._widget.domFocus()}focusedLast(){return this._widget.focusedLast()}updateOptions(e={}){if(!e.stickyScrollMaxItemCount)return;const i=this.validateStickySettings(e);this.stickyScrollMaxItemCount!==i.stickyScrollMaxItemCount&&(this.stickyScrollMaxItemCount=i.stickyScrollMaxItemCount,this.update())}validateStickySettings(e){let i=7;return typeof e.stickyScrollMaxItemCount=="number"&&(i=Math.max(e.stickyScrollMaxItemCount,1)),{stickyScrollMaxItemCount:i}}},ICi=class{constructor(e,i,n,s,c,d){this.view=i,this.tree=n,this.treeRenderers=s,this.treeDelegate=c,this.accessibilityProvider=d,this._previousElements=[],this._previousStateDisposables=new wn,this._rootDomNode=Cr(".monaco-tree-sticky-container.empty"),e.appendChild(this._rootDomNode);const f=Cr(".monaco-tree-sticky-container-shadow");this._rootDomNode.appendChild(f),this.stickyScrollFocus=new NCi(this._rootDomNode,i),this.onDidChangeHasFocus=this.stickyScrollFocus.onDidChangeHasFocus,this.onContextMenu=this.stickyScrollFocus.onContextMenu}get height(){if(!this._previousState)return 0;const e=this._previousState.stickyNodes[this._previousState.count-1];return e.position+e.height}setState(e){const i=!!this._previousState&&this._previousState.count>0,n=!!e&&e.count>0;if(!i&&!n||i&&n&&this._previousState.equal(e))return;if(i!==n&&this.setVisible(n),!n){this._previousState=void 0,this._previousElements=[],this._previousStateDisposables.clear();return}const s=e.stickyNodes[e.count-1];if(this._previousState&&e.animationStateChanged(this._previousState))this._previousElements[this._previousState.count-1].style.top=`${s.position}px`;else{this._previousStateDisposables.clear();const c=Array(e.count);for(let d=e.count-1;d>=0;d--){const f=e.stickyNodes[d],{element:m,disposable:v}=this.createElement(f,d,e.count);c[d]=m,this._rootDomNode.appendChild(m),this._previousStateDisposables.add(v)}this.stickyScrollFocus.updateElements(c,e),this._previousElements=c}this._previousState=e,this._rootDomNode.style.height=`${s.position+s.height}px`}createElement(e,i,n){const s=e.startIndex,c=document.createElement("div");c.style.top=`${e.position}px`,this.tree.options.setRowHeight!==!1&&(c.style.height=`${e.height}px`),this.tree.options.setRowLineHeight!==!1&&(c.style.lineHeight=`${e.height}px`),c.classList.add("monaco-tree-sticky-row"),c.classList.add("monaco-list-row"),c.setAttribute("data-index",`${s}`),c.setAttribute("data-parity",s%2===0?"even":"odd"),c.setAttribute("id",this.view.getElementID(s));const d=this.setAccessibilityAttributes(c,e.node.element,i,n),f=this.treeDelegate.getTemplateId(e.node),m=this.treeRenderers.find(I=>I.templateId===f);if(!m)throw new Error(`No renderer found for template id ${f}`);let v=e.node;v===this.tree.getNode(this.tree.getNodeLocation(e.node))&&(v=new Proxy(e.node,{}));const x=m.renderTemplate(c);m.renderElement(v,e.startIndex,x,e.height);const w=fo(()=>{d.dispose(),m.disposeElement(v,e.startIndex,x,e.height),m.disposeTemplate(x),c.remove()});return{element:c,disposable:w}}setAccessibilityAttributes(e,i,n,s){if(!this.accessibilityProvider)return xi.None;this.accessibilityProvider.getSetSize&&e.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(i,n,s))),this.accessibilityProvider.getPosInSet&&e.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(i,n))),this.accessibilityProvider.getRole&&e.setAttribute("role",this.accessibilityProvider.getRole(i)??"treeitem");const c=this.accessibilityProvider.getAriaLabel(i),d=c&&typeof c!="string"?c:mk(c),f=ba(v=>{const x=v.readObservable(d);x?e.setAttribute("aria-label",x):e.removeAttribute("aria-label")});typeof c=="string"||c&&e.setAttribute("aria-label",c.get());const m=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(i);return typeof m=="number"&&e.setAttribute("aria-level",`${m}`),e.setAttribute("aria-selected",String(!1)),f}setVisible(e){this._rootDomNode.classList.toggle("empty",!e),e||this.stickyScrollFocus.updateElements([],void 0)}domFocus(){this.stickyScrollFocus.domFocus()}focusedLast(){return this.stickyScrollFocus.focusedLast()}dispose(){this.stickyScrollFocus.dispose(),this._previousStateDisposables.dispose(),this._rootDomNode.remove()}};class NCi extends xi{get domHasFocus(){return this._domHasFocus}set domHasFocus(e){e!==this._domHasFocus&&(this._onDidChangeHasFocus.fire(e),this._domHasFocus=e)}constructor(e,i){super(),this.container=e,this.view=i,this.focusedIndex=-1,this.elements=[],this._onDidChangeHasFocus=new gi,this.onDidChangeHasFocus=this._onDidChangeHasFocus.event,this._onContextMenu=new gi,this.onContextMenu=this._onContextMenu.event,this._domHasFocus=!1,this._register(en(this.container,"focus",()=>this.onFocus())),this._register(en(this.container,"blur",()=>this.onBlur())),this._register(this.view.onDidFocus(()=>this.toggleStickyScrollFocused(!1))),this._register(this.view.onKeyDown(n=>this.onKeyDown(n))),this._register(this.view.onMouseDown(n=>this.onMouseDown(n))),this._register(this.view.onContextMenu(n=>this.handleContextMenu(n)))}handleContextMenu(e){const i=e.browserEvent.target;if(!are(i)&&!Nie(i)){this.focusedLast()&&this.view.domFocus();return}if(!E4(e.browserEvent)){if(!this.state)throw new Error("Context menu should not be triggered when state is undefined");const d=this.state.stickyNodes.findIndex(f=>{var m;return f.node.element===((m=e.element)==null?void 0:m.element)});if(d===-1)throw new Error("Context menu should not be triggered when element is not in sticky scroll widget");this.container.focus(),this.setFocus(d);return}if(!this.state||this.focusedIndex<0)throw new Error("Context menu key should not be triggered when focus is not in sticky scroll widget");const s=this.state.stickyNodes[this.focusedIndex].node.element,c=this.elements[this.focusedIndex];this._onContextMenu.fire({element:s,anchor:c,browserEvent:e.browserEvent,isStickyScroll:!0})}onKeyDown(e){if(this.domHasFocus&&this.state){if(e.key==="ArrowUp")this.setFocusedElement(Math.max(0,this.focusedIndex-1)),e.preventDefault(),e.stopPropagation();else if(e.key==="ArrowDown"||e.key==="ArrowRight"){if(this.focusedIndex>=this.state.count-1){const i=this.state.stickyNodes[this.state.count-1].startIndex+1;this.view.domFocus(),this.view.setFocus([i]),this.scrollNodeUnderWidget(i,this.state)}else this.setFocusedElement(this.focusedIndex+1);e.preventDefault(),e.stopPropagation()}}}onMouseDown(e){const i=e.browserEvent.target;!are(i)&&!Nie(i)||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation())}updateElements(e,i){if(i&&i.count===0)throw new Error("Sticky scroll state must be undefined when there are no sticky nodes");if(i&&i.count!==e.length)throw new Error("Sticky scroll focus received illigel state");const n=this.focusedIndex;if(this.removeFocus(),this.elements=e,this.state=i,i){const s=uv(n,0,i.count-1);this.setFocus(s)}else this.domHasFocus&&this.view.domFocus();this.container.tabIndex=i?0:-1}setFocusedElement(e){const i=this.state;if(!i)throw new Error("Cannot set focus when state is undefined");if(this.setFocus(e),!(e<i.count-1)&&i.lastNodePartiallyVisible()){const n=i.stickyNodes[e];this.scrollNodeUnderWidget(n.endIndex+1,i)}}scrollNodeUnderWidget(e,i){const n=i.stickyNodes[i.count-1],s=i.count>1?i.stickyNodes[i.count-2]:void 0,c=this.view.getElementTop(e),d=s?s.position+s.height+n.height:n.height;this.view.scrollTop=c-d}domFocus(){if(!this.state)throw new Error("Cannot focus when state is undefined");this.container.focus()}focusedLast(){return this.state?this.view.getHTMLElement().classList.contains("sticky-scroll-focused"):!1}removeFocus(){this.focusedIndex!==-1&&(this.toggleElementFocus(this.elements[this.focusedIndex],!1),this.focusedIndex=-1)}setFocus(e){if(0>e)throw new Error("addFocus() can not remove focus");if(!this.state&&e>=0)throw new Error("Cannot set focus index when state is undefined");if(this.state&&e>=this.state.count)throw new Error("Cannot set focus index to an index that does not exist");const i=this.focusedIndex;i>=0&&this.toggleElementFocus(this.elements[i],!1),e>=0&&this.toggleElementFocus(this.elements[e],!0),this.focusedIndex=e}toggleElementFocus(e,i){this.toggleElementActiveFocus(e,i&&this.domHasFocus),this.toggleElementPassiveFocus(e,i)}toggleCurrentElementActiveFocus(e){this.focusedIndex!==-1&&this.toggleElementActiveFocus(this.elements[this.focusedIndex],e)}toggleElementActiveFocus(e,i){e.classList.toggle("focused",i)}toggleElementPassiveFocus(e,i){e.classList.toggle("passive-focused",i)}toggleStickyScrollFocused(e){this.view.getHTMLElement().classList.toggle("sticky-scroll-focused",e)}onFocus(){if(!this.state||this.elements.length===0)throw new Error("Cannot focus when state is undefined or elements are empty");this.domHasFocus=!0,this.toggleStickyScrollFocused(!0),this.toggleCurrentElementActiveFocus(!0),this.focusedIndex===-1&&this.setFocus(0)}onBlur(){this.domHasFocus=!1,this.toggleCurrentElementActiveFocus(!1)}dispose(){this.toggleStickyScrollFocused(!1),this._onDidChangeHasFocus.fire(!1),super.dispose()}}function y0e(l){let e=o9.Unknown;return dFe(l.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?e=o9.Twistie:dFe(l.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?e=o9.Element:dFe(l.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(e=o9.Filter),{browserEvent:l.browserEvent,element:l.element?l.element.element:null,target:e}}function LCi(l){const e=are(l.browserEvent.target);return{element:l.element?l.element.element:null,browserEvent:l.browserEvent,anchor:l.anchor,isStickyScroll:e}}function v1e(l,e){e(l),l.children.forEach(i=>v1e(i,e))}class r9e{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,i){this.getFirstViewElementWithTrait=e,this.identityProvider=i,this.nodes=[],this._onDidChange=new gi,this.onDidChange=this._onDidChange.event}set(e,i){!(i!=null&&i.__forceEvent)&&Lf(this.nodes,e)||this._set(e,!1,i)}_set(e,i,n){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!i){const s=this;this._onDidChange.fire({get elements(){return s.get()},browserEvent:n})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:i}){if(!this.identityProvider){const m=this.createNodeSet(),v=x=>m.delete(x);i.forEach(x=>v1e(x,v)),this.set([...m.values()]);return}const n=new Set,s=m=>n.add(this.identityProvider.getId(m.element).toString());i.forEach(m=>v1e(m,s));const c=new Map,d=m=>c.set(this.identityProvider.getId(m.element).toString(),m);e.forEach(m=>v1e(m,d));const f=[];for(const m of this.nodes){const v=this.identityProvider.getId(m.element).toString();if(!n.has(v))f.push(m);else{const w=c.get(v);w&&w.visible&&f.push(w)}}if(this.nodes.length>0&&f.length===0){const m=this.getFirstViewElementWithTrait();m&&f.push(m)}this._set(f,!0)}createNodeSet(){const e=new Set;for(const i of this.nodes)e.add(i);return e}}class PCi extends LDt{constructor(e,i,n){super(e),this.tree=i,this.stickyScrollProvider=n}onViewPointer(e){if(DDt(e.browserEvent.target)||KM(e.browserEvent.target)||oie(e.browserEvent.target)||e.browserEvent.isHandledByList)return;const i=e.element;if(!i)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const n=e.browserEvent.target,s=n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&e.browserEvent.offsetX<16,c=Nie(e.browserEvent.target);let d=!1;if(c?d=!0:typeof this.tree.expandOnlyOnTwistieClick=="function"?d=this.tree.expandOnlyOnTwistieClick(i.element):d=!!this.tree.expandOnlyOnTwistieClick,c)this.handleStickyScrollMouseEvent(e,i);else{if(d&&!s&&e.browserEvent.detail!==2)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&e.browserEvent.detail===2)return super.onViewPointer(e)}if(i.collapsible&&(!c||s)){const f=this.tree.getNodeLocation(i),m=e.browserEvent.altKey;if(this.tree.setFocus([f]),this.tree.toggleCollapsed(f,m),s){e.browserEvent.isHandledByList=!0;return}}c||super.onViewPointer(e)}handleStickyScrollMouseEvent(e,i){if(F1i(e.browserEvent.target)||B1i(e.browserEvent.target))return;const n=this.stickyScrollProvider();if(!n)throw new Error("Sticky scroll controller not found");const s=this.list.indexOf(i),c=this.list.getElementTop(s),d=n.nodePositionTopBelowWidget(i);this.tree.scrollTop=c-d,this.list.domFocus(),this.list.setFocus([s]),this.list.setSelection([s])}onDoubleClick(e){e.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||e.browserEvent.isHandledByList||super.onDoubleClick(e)}onMouseDown(e){const i=e.browserEvent.target;if(!are(i)&&!Nie(i)){super.onMouseDown(e);return}}onContextMenu(e){const i=e.browserEvent.target;if(!are(i)&&!Nie(i)){super.onContextMenu(e);return}}}class ACi extends Ow{constructor(e,i,n,s,c,d,f,m){super(e,i,n,s,m),this.focusTrait=c,this.selectionTrait=d,this.anchorTrait=f}createMouseController(e){return new PCi(this,e.tree,e.stickyScrollProvider)}splice(e,i,n=[]){if(super.splice(e,i,n),n.length===0)return;const s=[],c=[];let d;n.forEach((f,m)=>{this.focusTrait.has(f)&&s.push(e+m),this.selectionTrait.has(f)&&c.push(e+m),this.anchorTrait.has(f)&&(d=e+m)}),s.length>0&&super.setFocus(r6([...super.getFocus(),...s])),c.length>0&&super.setSelection(r6([...super.getSelection(),...c])),typeof d=="number"&&super.setAnchor(d)}setFocus(e,i,n=!1){super.setFocus(e,i),n||this.focusTrait.set(e.map(s=>this.element(s)),i)}setSelection(e,i,n=!1){super.setSelection(e,i),n||this.selectionTrait.set(e.map(s=>this.element(s)),i)}setAnchor(e,i=!1){super.setAnchor(e),i||(typeof e>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class EEt{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return Tr.filter(Tr.map(this.view.onMouseDblClick,y0e),e=>e.target!==o9.Filter)}get onMouseOver(){return Tr.map(this.view.onMouseOver,y0e)}get onMouseOut(){return Tr.map(this.view.onMouseOut,y0e)}get onContextMenu(){var e;return Tr.any(Tr.filter(Tr.map(this.view.onContextMenu,LCi),i=>!i.isStickyScroll),((e=this.stickyScrollController)==null?void 0:e.onContextMenu)??Tr.None)}get onPointer(){return Tr.map(this.view.onPointer,y0e)}get onKeyDown(){return this.view.onKeyDown}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return Tr.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var e;return((e=this.findController)==null?void 0:e.mode)??z4.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get findMatchType(){var e;return((e=this.findController)==null?void 0:e.matchType)??OB.Fuzzy}set findMatchType(e){this.findController&&(this.findController.matchType=e)}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick>"u"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick>"u"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,i,n,s,c={}){this._user=e,this._options=c,this.eventBufferer=new lse,this.onDidChangeFindOpenState=Tr.None,this.onDidChangeStickyScrollFocused=Tr.None,this.disposables=new wn,this._onWillRefilter=new gi,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new gi,this.treeDelegate=new xJe(n);const d=new Xyt,f=new Xyt,m=this.disposables.add(new wCi(f.event)),v=new y$e;this.renderers=s.map(O=>new yHe(O,()=>this.model,d.event,m,v,c));for(const O of this.renderers)this.disposables.add(O);let x;c.keyboardNavigationLabelProvider&&(x=new xCi(this,c.keyboardNavigationLabelProvider,c.filter),c={...c,filter:x},this.disposables.add(x)),this.focus=new r9e(()=>this.view.getFocusedElements()[0],c.identityProvider),this.selection=new r9e(()=>this.view.getSelectedElements()[0],c.identityProvider),this.anchor=new r9e(()=>this.view.getAnchorElement(),c.identityProvider),this.view=new ACi(e,i,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...SCi(()=>this.model,c),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.model=this.createModel(e,this.view,c),d.input=this.model.onDidChangeCollapseState;const w=Tr.forEach(this.model.onDidSplice,O=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(O),this.selection.onDidModelSplice(O)})},this.disposables);w(()=>null,null,this.disposables);const I=this.disposables.add(new gi),P=this.disposables.add(new Ck(0));if(this.disposables.add(Tr.any(w,this.focus.onDidChange,this.selection.onDidChange)(()=>{P.trigger(()=>{const O=new Set;for(const z of this.focus.getNodes())O.add(z);for(const z of this.selection.getNodes())O.add(z);I.fire([...O.values()])})})),f.input=I.event,c.keyboardSupport!==!1){const O=Tr.chain(this.view.onKeyDown,z=>z.filter(J=>!KM(J.target)).map(J=>new Id(J)));Tr.chain(O,z=>z.filter(J=>J.keyCode===15))(this.onLeftArrow,this,this.disposables),Tr.chain(O,z=>z.filter(J=>J.keyCode===17))(this.onRightArrow,this,this.disposables),Tr.chain(O,z=>z.filter(J=>J.keyCode===10))(this.onSpace,this,this.disposables)}if((c.findWidgetEnabled??!0)&&c.keyboardNavigationLabelProvider&&c.contextViewProvider){const O=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new kCi(this,this.model,this.view,x,c.contextViewProvider,O),this.focusNavigationFilter=z=>this.findController.shouldAllowFocus(z),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=Tr.None,this.onDidChangeFindMatchType=Tr.None;c.enableStickyScroll&&(this.stickyScrollController=new qCt(this,this.model,this.view,this.renderers,this.treeDelegate,c),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus),this.styleElement=Dw(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===j$.Always)}updateOptions(e={}){var i;this._options={...this._options,...e};for(const n of this.renderers)n.updateOptions(e);this.view.updateOptions(this._options),(i=this.findController)==null||i.updateOptions(e),this.updateStickyScroll(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===j$.Always)}get options(){return this._options}updateStickyScroll(e){var i;!this.stickyScrollController&&this._options.enableStickyScroll?(this.stickyScrollController=new qCt(this,this.model,this.view,this.renderers,this.treeDelegate,this._options),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.onDidChangeStickyScrollFocused=Tr.None,this.stickyScrollController.dispose(),this.stickyScrollController=void 0),(i=this.stickyScrollController)==null||i.updateOptions(e)}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get ariaLabel(){return this.view.ariaLabel}set ariaLabel(e){this.view.ariaLabel=e}domFocus(){var e;(e=this.stickyScrollController)!=null&&e.focusedLast()?this.stickyScrollController.domFocus():this.view.domFocus()}layout(e,i){var n;this.view.layout(e,i),pR(i)&&((n=this.findController)==null||n.layout(i))}style(e){const i=`.${this.view.domId}`,n=[];e.treeIndentGuidesStroke&&(n.push(`.monaco-list${i}:hover .monaco-tl-indent > .indent-guide, .monaco-list${i}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeInactiveIndentGuidesStroke}; }`),n.push(`.monaco-list${i} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`));const s=e.treeStickyScrollBackground??e.listBackground;s&&(n.push(`.monaco-list${i} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${s}; }`),n.push(`.monaco-list${i} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${s}; }`)),e.treeStickyScrollBorder&&n.push(`.monaco-list${i} .monaco-scrollable-element .monaco-tree-sticky-container { border-bottom: 1px solid ${e.treeStickyScrollBorder}; }`),e.treeStickyScrollShadow&&n.push(`.monaco-list${i} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow { box-shadow: ${e.treeStickyScrollShadow} 0 6px 6px -6px inset; height: 3px; }`),e.listFocusForeground&&(n.push(`.monaco-list${i}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),n.push(`.monaco-list${i}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { color: inherit; }`));const c=Z4(e.listFocusAndSelectionOutline,Z4(e.listSelectionOutline,e.listFocusOutline??""));c&&(n.push(`.monaco-list${i}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused.selected { outline: 1px solid ${c}; outline-offset: -1px;}`),n.push(`.monaco-list${i}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused.selected { outline: inherit;}`)),e.listFocusOutline&&(n.push(`.monaco-list${i}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),n.push(`.monaco-list${i}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { outline: inherit; }`),n.push(`.monaco-workbench.context-menu-visible .monaco-list${i}.last-focused.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.passive-focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),n.push(`.monaco-workbench.context-menu-visible .monaco-list${i}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`),n.push(`.monaco-workbench.context-menu-visible .monaco-list${i}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`)),this.styleElement.textContent=n.join(`
+`),this.view.style(e)}getParentElement(e){const i=this.model.getParentNodeLocation(e);return this.model.getNode(i).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,i=!1){return this.model.setCollapsed(e,!0,i)}expand(e,i=!1){return this.model.setCollapsed(e,!1,i)}toggleCollapsed(e,i=!1){return this.model.setCollapsed(e,void 0,i)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,i){return this.model.setCollapsible(e,i)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,i){this.eventBufferer.bufferEvents(()=>{const n=e.map(c=>this.model.getNode(c));this.selection.set(n,i);const s=e.map(c=>this.model.getListIndex(c)).filter(c=>c>-1);this.view.setSelection(s,i,!0)})}getSelection(){return this.selection.get()}setFocus(e,i){this.eventBufferer.bufferEvents(()=>{const n=e.map(c=>this.model.getNode(c));this.focus.set(n,i);const s=e.map(c=>this.model.getListIndex(c)).filter(c=>c>-1);this.view.setFocus(s,i,!0)})}focusNext(e=1,i=!1,n,s=E4(n)&&n.altKey?void 0:this.focusNavigationFilter){this.view.focusNext(e,i,n,s)}focusPrevious(e=1,i=!1,n,s=E4(n)&&n.altKey?void 0:this.focusNavigationFilter){this.view.focusPrevious(e,i,n,s)}focusNextPage(e,i=E4(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusNextPage(e,i)}focusPreviousPage(e,i=E4(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusPreviousPage(e,i,()=>{var n;return((n=this.stickyScrollController)==null?void 0:n.height)??0})}focusLast(e,i=E4(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusLast(e,i)}focusFirst(e,i=E4(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusFirst(e,i)}getFocus(){return this.focus.get()}reveal(e,i){this.model.expandTo(e);const n=this.model.getListIndex(e);if(n!==-1)if(!this.stickyScrollController)this.view.reveal(n,i);else{const s=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(e));this.view.reveal(n,i,s)}}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const i=this.view.getFocusedElements();if(i.length===0)return;const n=i[0],s=this.model.getNodeLocation(n);if(!this.model.setCollapsed(s,!0)){const d=this.model.getParentNodeLocation(s);if(!d)return;const f=this.model.getListIndex(d);this.view.reveal(f),this.view.setFocus([f])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const i=this.view.getFocusedElements();if(i.length===0)return;const n=i[0],s=this.model.getNodeLocation(n);if(!this.model.setCollapsed(s,!1)){if(!n.children.some(m=>m.visible))return;const[d]=this.view.getFocus(),f=d+1;this.view.reveal(f),this.view.setFocus([f])}}onSpace(e){e.preventDefault(),e.stopPropagation();const i=this.view.getFocusedElements();if(i.length===0)return;const n=i[0],s=this.model.getNodeLocation(n),c=e.browserEvent.altKey;this.model.setCollapsed(s,void 0,c)}dispose(){var e;vd(this.disposables),(e=this.stickyScrollController)==null||e.dispose(),this.view.dispose()}}class kJe{constructor(e,i,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new vCi(e,i,null,n),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,n.sorter&&(this.sorter={compare(s,c){return n.sorter.compare(s.element,c.element)}}),this.identityProvider=n.identityProvider}setChildren(e,i=dl.empty(),n={}){const s=this.getElementLocation(e);this._setChildren(s,this.preserveCollapseState(i),n)}_setChildren(e,i=dl.empty(),n){const s=new Set,c=new Set,d=m=>{var x;if(m.element===null)return;const v=m;if(s.add(v.element),this.nodes.set(v.element,v),this.identityProvider){const w=this.identityProvider.getId(v.element).toString();c.add(w),this.nodesByIdentity.set(w,v)}(x=n.onDidCreateNode)==null||x.call(n,v)},f=m=>{var x;if(m.element===null)return;const v=m;if(s.has(v.element)||this.nodes.delete(v.element),this.identityProvider){const w=this.identityProvider.getId(v.element).toString();c.has(w)||this.nodesByIdentity.delete(w)}(x=n.onDidDeleteNode)==null||x.call(n,v)};this.model.splice([...e,0],Number.MAX_VALUE,i,{...n,onDidCreateNode:d,onDidDeleteNode:f})}preserveCollapseState(e=dl.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),dl.map(e,i=>{let n=this.nodes.get(i.element);if(!n&&this.identityProvider){const d=this.identityProvider.getId(i.element).toString();n=this.nodesByIdentity.get(d)}if(!n){let d;return typeof i.collapsed>"u"?d=void 0:i.collapsed===uw.Collapsed||i.collapsed===uw.PreserveOrCollapsed?d=!0:i.collapsed===uw.Expanded||i.collapsed===uw.PreserveOrExpanded?d=!1:d=!!i.collapsed,{...i,children:this.preserveCollapseState(i.children),collapsed:d}}const s=typeof i.collapsible=="boolean"?i.collapsible:n.collapsible;let c;return typeof i.collapsed>"u"||i.collapsed===uw.PreserveOrCollapsed||i.collapsed===uw.PreserveOrExpanded?c=n.collapsed:i.collapsed===uw.Collapsed?c=!0:i.collapsed===uw.Expanded?c=!1:c=!!i.collapsed,{...i,collapsible:s,collapsed:c,children:this.preserveCollapseState(i.children)}})}rerender(e){const i=this.getElementLocation(e);this.model.rerender(i)}getFirstElementChild(e=null){const i=this.getElementLocation(e);return this.model.getFirstElementChild(i)}has(e){return this.nodes.has(e)}getListIndex(e){const i=this.getElementLocation(e);return this.model.getListIndex(i)}getListRenderCount(e){const i=this.getElementLocation(e);return this.model.getListRenderCount(i)}isCollapsible(e){const i=this.getElementLocation(e);return this.model.isCollapsible(i)}setCollapsible(e,i){const n=this.getElementLocation(e);return this.model.setCollapsible(n,i)}isCollapsed(e){const i=this.getElementLocation(e);return this.model.isCollapsed(i)}setCollapsed(e,i,n){const s=this.getElementLocation(e);return this.model.setCollapsed(s,i,n)}expandTo(e){const i=this.getElementLocation(e);this.model.expandTo(i)}refilter(){this.model.refilter()}getNode(e=null){if(e===null)return this.model.getNode(this.model.rootRef);const i=this.nodes.get(e);if(!i)throw new gw(this.user,`Tree element not found: ${e}`);return i}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(e===null)throw new gw(this.user,"Invalid getParentNodeLocation call");const i=this.nodes.get(e);if(!i)throw new gw(this.user,`Tree element not found: ${e}`);const n=this.model.getNodeLocation(i),s=this.model.getParentNodeLocation(n);return this.model.getNode(s).element}getElementLocation(e){if(e===null)return[];const i=this.nodes.get(e);if(!i)throw new gw(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(i)}}function b1e(l){const e=[l.element],i=l.incompressible||!1;return{element:{elements:e,incompressible:i},children:dl.map(dl.from(l.children),b1e),collapsible:l.collapsible,collapsed:l.collapsed}}function C1e(l){const e=[l.element],i=l.incompressible||!1;let n,s;for(;[s,n]=dl.consume(dl.from(l.children),2),!(s.length!==1||s[0].incompressible);)l=s[0],e.push(l.element);return{element:{elements:e,incompressible:i},children:dl.map(dl.concat(s,n),C1e),collapsible:l.collapsible,collapsed:l.collapsed}}function vHe(l,e=0){let i;return e<l.element.elements.length-1?i=[vHe(l,e+1)]:i=dl.map(dl.from(l.children),n=>vHe(n,0)),e===0&&l.element.incompressible?{element:l.element.elements[e],children:i,incompressible:!0,collapsible:l.collapsible,collapsed:l.collapsed}:{element:l.element.elements[e],children:i,collapsible:l.collapsible,collapsed:l.collapsed}}function $Ct(l){return vHe(l,0)}function IEt(l,e,i){return l.element===e?{...l,children:i}:{...l,children:dl.map(dl.from(l.children),n=>IEt(n,e,i))}}const OCi=l=>({getId(e){return e.elements.map(i=>l.getId(i).toString()).join("\0")}});class MCi{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,i,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new kJe(e,i,n),this.enabled=typeof n.compressionEnabled>"u"?!0:n.compressionEnabled,this.identityProvider=n.identityProvider}setChildren(e,i=dl.empty(),n){const s=n.diffIdentityProvider&&OCi(n.diffIdentityProvider);if(e===null){const O=dl.map(i,this.enabled?C1e:b1e);this._setChildren(null,O,{diffIdentityProvider:s,diffDepth:1/0});return}const c=this.nodes.get(e);if(!c)throw new gw(this.user,"Unknown compressed tree node");const d=this.model.getNode(c),f=this.model.getParentNodeLocation(c),m=this.model.getNode(f),v=$Ct(d),x=IEt(v,e,i),w=(this.enabled?C1e:b1e)(x),I=n.diffIdentityProvider?(O,z)=>n.diffIdentityProvider.getId(O)===n.diffIdentityProvider.getId(z):void 0;if(Lf(w.element.elements,d.element.elements,I)){this._setChildren(c,w.children||dl.empty(),{diffIdentityProvider:s,diffDepth:1});return}const P=m.children.map(O=>O===d?w:O);this._setChildren(m.element,P,{diffIdentityProvider:s,diffDepth:d.depth-m.depth})}isCompressionEnabled(){return this.enabled}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const n=this.model.getNode().children,s=dl.map(n,$Ct),c=dl.map(s,e?C1e:b1e);this._setChildren(null,c,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,i,n){const s=new Set,c=f=>{for(const m of f.element.elements)s.add(m),this.nodes.set(m,f.element)},d=f=>{for(const m of f.element.elements)s.has(m)||this.nodes.delete(m)};this.model.setChildren(e,i,{...n,onDidCreateNode:c,onDidDeleteNode:d})}has(e){return this.nodes.has(e)}getListIndex(e){const i=this.getCompressedNode(e);return this.model.getListIndex(i)}getListRenderCount(e){const i=this.getCompressedNode(e);return this.model.getListRenderCount(i)}getNode(e){if(typeof e>"u")return this.model.getNode();const i=this.getCompressedNode(e);return this.model.getNode(i)}getNodeLocation(e){const i=this.model.getNodeLocation(e);return i===null?null:i.elements[i.elements.length-1]}getParentNodeLocation(e){const i=this.getCompressedNode(e),n=this.model.getParentNodeLocation(i);return n===null?null:n.elements[n.elements.length-1]}getFirstElementChild(e){const i=this.getCompressedNode(e);return this.model.getFirstElementChild(i)}isCollapsible(e){const i=this.getCompressedNode(e);return this.model.isCollapsible(i)}setCollapsible(e,i){const n=this.getCompressedNode(e);return this.model.setCollapsible(n,i)}isCollapsed(e){const i=this.getCompressedNode(e);return this.model.isCollapsed(i)}setCollapsed(e,i,n){const s=this.getCompressedNode(e);return this.model.setCollapsed(s,i,n)}expandTo(e){const i=this.getCompressedNode(e);this.model.expandTo(i)}rerender(e){const i=this.getCompressedNode(e);this.model.rerender(i)}refilter(){this.model.refilter()}getCompressedNode(e){if(e===null)return null;const i=this.nodes.get(e);if(!i)throw new gw(this.user,`Tree element not found: ${e}`);return i}}const RCi=l=>l[l.length-1];class TJe{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new TJe(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,i){this.unwrapper=e,this.node=i}}function FCi(l,e){return{splice(i,n,s){e.splice(i,n,s.map(c=>l.map(c)))},updateElementHeight(i,n){e.updateElementHeight(i,n)}}}function BCi(l,e){return{...e,identityProvider:e.identityProvider&&{getId(i){return e.identityProvider.getId(l(i))}},sorter:e.sorter&&{compare(i,n){return e.sorter.compare(i.elements[0],n.elements[0])}},filter:e.filter&&{filter(i,n){return e.filter.filter(l(i),n)}}}}class WCi{get onDidSplice(){return Tr.map(this.model.onDidSplice,({insertedNodes:e,deletedNodes:i})=>({insertedNodes:e.map(n=>this.nodeMapper.map(n)),deletedNodes:i.map(n=>this.nodeMapper.map(n))}))}get onDidChangeCollapseState(){return Tr.map(this.model.onDidChangeCollapseState,({node:e,deep:i})=>({node:this.nodeMapper.map(e),deep:i}))}get onDidChangeRenderNodeCount(){return Tr.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}constructor(e,i,n={}){this.rootRef=null,this.elementMapper=n.elementMapper||RCi;const s=c=>this.elementMapper(c.elements);this.nodeMapper=new SJe(c=>new TJe(s,c)),this.model=new MCi(e,FCi(this.nodeMapper,i),BCi(s,n))}setChildren(e,i=dl.empty(),n={}){this.model.setChildren(e,i,n)}isCompressionEnabled(){return this.model.isCompressionEnabled()}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){const i=this.model.getFirstElementChild(e);return i===null||typeof i>"u"?i:this.elementMapper(i.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,i){return this.model.setCollapsible(e,i)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,i,n){return this.model.setCollapsed(e,i,n)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var VCi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c};class DJe extends EEt{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,i,n,s,c={}){super(e,i,n,s,c),this.user=e}setChildren(e,i=dl.empty(),n){this.model.setChildren(e,i,n)}rerender(e){if(e===void 0){this.view.rerender();return}this.model.rerender(e)}hasElement(e){return this.model.has(e)}createModel(e,i,n){return new kJe(e,i,n)}}class NEt{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,i,n){this._compressedTreeNodeProvider=e,this.stickyScrollDelegate=i,this.renderer=n,this.templateId=n.templateId,n.onDidChangeTwistieState&&(this.onDidChangeTwistieState=n.onDidChangeTwistieState)}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,i,n,s){let c=this.stickyScrollDelegate.getCompressedNode(e);c||(c=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element)),c.element.elements.length===1?(n.compressedTreeNode=void 0,this.renderer.renderElement(e,i,n.data,s)):(n.compressedTreeNode=c,this.renderer.renderCompressedElements(c,i,n.data,s))}disposeElement(e,i,n,s){var c,d,f,m;n.compressedTreeNode?(d=(c=this.renderer).disposeCompressedElements)==null||d.call(c,n.compressedTreeNode,i,n.data,s):(m=(f=this.renderer).disposeElement)==null||m.call(f,e,i,n.data,s)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,i){return this.renderer.renderTwistie?this.renderer.renderTwistie(e,i):!1}}VCi([x_],NEt.prototype,"compressedTreeNodeProvider",null);class HCi{constructor(e){this.modelProvider=e,this.compressedStickyNodes=new Map}getCompressedNode(e){return this.compressedStickyNodes.get(e)}constrainStickyScrollNodes(e,i,n){if(this.compressedStickyNodes.clear(),e.length===0)return[];for(let s=0;s<e.length;s++){const c=e[s],d=c.position+c.height;if(s+1<e.length&&d+e[s+1].height>n||s>=i-1&&i<e.length){const m=e.slice(0,s),v=e.slice(s),x=this.compressStickyNodes(v);return[...m,x]}}return e}compressStickyNodes(e){if(e.length===0)throw new Error("Can't compress empty sticky nodes");const i=this.modelProvider();if(!i.isCompressionEnabled())return e[0];const n=[];for(let v=0;v<e.length;v++){const x=e[v],w=i.getCompressedTreeNode(x.node.element);if(w.element){if(v!==0&&w.element.incompressible)break;n.push(...w.element.elements)}}if(n.length<2)return e[0];const s=e[e.length-1],c={elements:n,incompressible:!1},d={...s.node,children:[],element:c},f=new Proxy(e[0].node,{}),m={node:f,startIndex:e[0].startIndex,endIndex:s.endIndex,position:e[0].position,height:e[0].height};return this.compressedStickyNodes.set(f,d),m}}function jCi(l,e){return e&&{...e,keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(i){let n;try{n=l().getCompressedTreeNode(i)}catch{return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i)}return n.element.elements.length===1?e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i):e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}}}class LEt extends DJe{constructor(e,i,n,s,c={}){const d=()=>this,f=new HCi(()=>this.model),m=s.map(v=>new NEt(d,f,v));super(e,i,n,m,{...jCi(d,c),stickyScrollDelegate:f})}setChildren(e,i=dl.empty(),n){this.model.setChildren(e,i,n)}createModel(e,i,n){return new WCi(e,i,n)}updateOptions(e={}){super.updateOptions(e),typeof e.compressionEnabled<"u"&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}function s9e(l){return{...l,children:[],refreshPromise:void 0,stale:!0,slow:!1,forceExpanded:!1}}function bHe(l,e){return e.parent?e.parent===l?!0:bHe(l,e.parent):!1}function zCi(l,e){return l===e||bHe(l,e)||bHe(e,l)}class EJe{get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new EJe(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class UCi{constructor(e,i,n){this.renderer=e,this.nodeMapper=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,i,n,s){this.renderer.renderElement(this.nodeMapper.map(e),i,n.templateData,s)}renderTwistie(e,i){return e.slow?(i.classList.add(...zo.asClassNameArray(pr.treeItemLoading)),!0):(i.classList.remove(...zo.asClassNameArray(pr.treeItemLoading)),!1)}disposeElement(e,i,n,s){var c,d;(d=(c=this.renderer).disposeElement)==null||d.call(c,this.nodeMapper.map(e),i,n.templateData,s)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function JCt(l){return{browserEvent:l.browserEvent,elements:l.elements.map(e=>e.element)}}function GCt(l){return{browserEvent:l.browserEvent,element:l.element&&l.element.element,target:l.target}}class qCi extends Ese{constructor(e){super(e.elements.map(i=>i.element)),this.data=e}}function o9e(l){return l instanceof Ese?new qCi(l):l}class $Ci{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,i){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(n=>n.element),i)}onDragStart(e,i){var n,s;(s=(n=this.dnd).onDragStart)==null||s.call(n,o9e(e),i)}onDragOver(e,i,n,s,c,d=!0){return this.dnd.onDragOver(o9e(e),i&&i.element,n,s,c)}drop(e,i,n,s,c){this.dnd.drop(o9e(e),i&&i.element,n,s,c)}onDragEnd(e){var i,n;(n=(i=this.dnd).onDragEnd)==null||n.call(i,e)}dispose(){this.dnd.dispose()}}function PEt(l){return l&&{...l,collapseByDefault:!0,identityProvider:l.identityProvider&&{getId(e){return l.identityProvider.getId(e.element)}},dnd:l.dnd&&new $Ci(l.dnd),multipleSelectionController:l.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return l.multipleSelectionController.isSelectionSingleChangeEvent({...e,element:e.element})},isSelectionRangeChangeEvent(e){return l.multipleSelectionController.isSelectionRangeChangeEvent({...e,element:e.element})}},accessibilityProvider:l.accessibilityProvider&&{...l.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:l.accessibilityProvider.getRole?e=>l.accessibilityProvider.getRole(e.element):()=>"treeitem",isChecked:l.accessibilityProvider.isChecked?e=>{var i;return!!((i=l.accessibilityProvider)!=null&&i.isChecked(e.element))}:void 0,getAriaLabel(e){return l.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return l.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:l.accessibilityProvider.getWidgetRole?()=>l.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:l.accessibilityProvider.getAriaLevel&&(e=>l.accessibilityProvider.getAriaLevel(e.element)),getActiveDescendantId:l.accessibilityProvider.getActiveDescendantId&&(e=>l.accessibilityProvider.getActiveDescendantId(e.element))},filter:l.filter&&{filter(e,i){return l.filter.filter(e.element,i)}},keyboardNavigationLabelProvider:l.keyboardNavigationLabelProvider&&{...l.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(e){return l.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}},sorter:void 0,expandOnlyOnTwistieClick:typeof l.expandOnlyOnTwistieClick>"u"?void 0:typeof l.expandOnlyOnTwistieClick!="function"?l.expandOnlyOnTwistieClick:e=>l.expandOnlyOnTwistieClick(e.element),defaultFindVisibility:e=>e.hasChildren&&e.stale?1:typeof l.defaultFindVisibility=="number"?l.defaultFindVisibility:typeof l.defaultFindVisibility>"u"?2:l.defaultFindVisibility(e.element)}}function CHe(l,e){e(l),l.children.forEach(i=>CHe(i,e))}class AEt{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return Tr.map(this.tree.onDidChangeFocus,JCt)}get onDidChangeSelection(){return Tr.map(this.tree.onDidChangeSelection,JCt)}get onMouseDblClick(){return Tr.map(this.tree.onMouseDblClick,GCt)}get onPointer(){return Tr.map(this.tree.onPointer,GCt)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidChangeStickyScrollFocused(){return this.tree.onDidChangeStickyScrollFocused}get onDidDispose(){return this.tree.onDidDispose}constructor(e,i,n,s,c,d={}){this.user=e,this.dataSource=c,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new gi,this._onDidChangeNodeSlowState=new gi,this.nodeMapper=new SJe(f=>new EJe(f)),this.disposables=new wn,this.identityProvider=d.identityProvider,this.autoExpandSingleChildren=typeof d.autoExpandSingleChildren>"u"?!1:d.autoExpandSingleChildren,this.sorter=d.sorter,this.getDefaultCollapseState=f=>d.collapseByDefault?d.collapseByDefault(f)?uw.PreserveOrCollapsed:uw.PreserveOrExpanded:void 0,this.tree=this.createTree(e,i,n,s,d),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.onDidChangeFindMatchType=this.tree.onDidChangeFindMatchType,this.root=s9e({element:void 0,parent:null,hasChildren:!0,defaultCollapseState:void 0}),this.identityProvider&&(this.root={...this.root,id:null}),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(e,i,n,s,c){const d=new xJe(n),f=s.map(v=>new UCi(v,this.nodeMapper,this._onDidChangeNodeSlowState.event)),m=PEt(c)||{};return new DJe(e,i,d,f,m)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(e,i){this.tree.layout(e,i)}style(e){this.tree.style(e)}getInput(){return this.root.element}async setInput(e,i){this.refreshPromises.forEach(s=>s.cancel()),this.refreshPromises.clear(),this.root.element=e;const n=i&&{viewState:i,focus:[],selection:[]};await this._updateChildren(e,!0,!1,n),n&&(this.tree.setFocus(n.focus),this.tree.setSelection(n.selection)),i&&typeof i.scrollTop=="number"&&(this.scrollTop=i.scrollTop)}async _updateChildren(e=this.root.element,i=!0,n=!1,s,c){if(typeof this.root.element>"u")throw new gw(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await Tr.toPromise(this._onDidRender.event));const d=this.getDataNode(e);if(await this.refreshAndRenderNode(d,i,s,c),n)try{this.tree.rerender(d)}catch{}}rerender(e){if(e===void 0||e===this.root.element){this.tree.rerender();return}const i=this.getDataNode(e);this.tree.rerender(i)}getNode(e=this.root.element){const i=this.getDataNode(e),n=this.tree.getNode(i===this.root?null:i);return this.nodeMapper.map(n)}collapse(e,i=!1){const n=this.getDataNode(e);return this.tree.collapse(n===this.root?null:n,i)}async expand(e,i=!1){if(typeof this.root.element>"u")throw new gw(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await Tr.toPromise(this._onDidRender.event));const n=this.getDataNode(e);if(this.tree.hasElement(n)&&!this.tree.isCollapsible(n)||(n.refreshPromise&&(await this.root.refreshPromise,await Tr.toPromise(this._onDidRender.event)),n!==this.root&&!n.refreshPromise&&!this.tree.isCollapsed(n)))return!1;const s=this.tree.expand(n===this.root?null:n,i);return n.refreshPromise&&(await this.root.refreshPromise,await Tr.toPromise(this._onDidRender.event)),s}setSelection(e,i){const n=e.map(s=>this.getDataNode(s));this.tree.setSelection(n,i)}getSelection(){return this.tree.getSelection().map(i=>i.element)}setFocus(e,i){const n=e.map(s=>this.getDataNode(s));this.tree.setFocus(n,i)}getFocus(){return this.tree.getFocus().map(i=>i.element)}reveal(e,i){this.tree.reveal(this.getDataNode(e),i)}getParentElement(e){const i=this.tree.getParentElement(this.getDataNode(e));return i&&i.element}getFirstElementChild(e=this.root.element){const i=this.getDataNode(e),n=this.tree.getFirstElementChild(i===this.root?null:i);return n&&n.element}getDataNode(e){const i=this.nodes.get(e===this.root.element?null:e);if(!i)throw new gw(this.user,`Data tree node not found: ${e}`);return i}async refreshAndRenderNode(e,i,n,s){await this.refreshNode(e,i,n),!this.disposables.isDisposed&&this.render(e,n,s)}async refreshNode(e,i,n){let s;if(this.subTreeRefreshPromises.forEach((c,d)=>{!s&&zCi(d,e)&&(s=c.then(()=>this.refreshNode(e,i,n)))}),s)return s;if(e!==this.root&&this.tree.getNode(e).collapsed){e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0,this.setChildren(e,[],i,n);return}return this.doRefreshSubTree(e,i,n)}async doRefreshSubTree(e,i,n){let s;e.refreshPromise=new Promise(c=>s=c),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{const c=await this.doRefreshNode(e,i,n);e.stale=!1,await vWe.settled(c.map(d=>this.doRefreshSubTree(d,i,n)))}finally{s()}}async doRefreshNode(e,i,n){e.hasChildren=!!this.dataSource.hasChildren(e.element);let s;if(!e.hasChildren)s=Promise.resolve(dl.empty());else{const c=this.doGetChildren(e);if(Uyt(c))s=Promise.resolve(c);else{const d=c6(800);d.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},f=>null),s=c.finally(()=>d.cancel())}}try{const c=await s;return this.setChildren(e,c,i,n)}catch(c){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),Tk(c))return[];throw c}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}doGetChildren(e){let i=this.refreshPromises.get(e);if(i)return i;const n=this.dataSource.getChildren(e.element);return Uyt(n)?this.processChildren(n):(i=Om(async()=>this.processChildren(await n)),this.refreshPromises.set(e,i),i.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:i}){e.element!==null&&!e.collapsed&&e.element.stale&&(i?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(Pa))}setChildren(e,i,n,s){const c=[...i];if(e.children.length===0&&c.length===0)return[];const d=new Map,f=new Map;for(const x of e.children)d.set(x.element,x),this.identityProvider&&f.set(x.id,{node:x,collapsed:this.tree.hasElement(x)&&this.tree.isCollapsed(x)});const m=[],v=c.map(x=>{const w=!!this.dataSource.hasChildren(x);if(!this.identityProvider){const z=s9e({element:x,parent:e,hasChildren:w,defaultCollapseState:this.getDefaultCollapseState(x)});return w&&z.defaultCollapseState===uw.PreserveOrExpanded&&m.push(z),z}const I=this.identityProvider.getId(x).toString(),P=f.get(I);if(P){const z=P.node;return d.delete(z.element),this.nodes.delete(z.element),this.nodes.set(x,z),z.element=x,z.hasChildren=w,n?P.collapsed?(z.children.forEach(J=>CHe(J,Y=>this.nodes.delete(Y.element))),z.children.splice(0,z.children.length),z.stale=!0):m.push(z):w&&!P.collapsed&&m.push(z),z}const O=s9e({element:x,parent:e,id:I,hasChildren:w,defaultCollapseState:this.getDefaultCollapseState(x)});return s&&s.viewState.focus&&s.viewState.focus.indexOf(I)>-1&&s.focus.push(O),s&&s.viewState.selection&&s.viewState.selection.indexOf(I)>-1&&s.selection.push(O),(s&&s.viewState.expanded&&s.viewState.expanded.indexOf(I)>-1||w&&O.defaultCollapseState===uw.PreserveOrExpanded)&&m.push(O),O});for(const x of d.values())CHe(x,w=>this.nodes.delete(w.element));for(const x of v)this.nodes.set(x.element,x);return e.children.splice(0,e.children.length,...v),e!==this.root&&this.autoExpandSingleChildren&&v.length===1&&m.length===0&&(v[0].forceExpanded=!0,m.push(v[0])),m}render(e,i,n){const s=e.children.map(d=>this.asTreeElement(d,i)),c=n&&{...n,diffIdentityProvider:n.diffIdentityProvider&&{getId(d){return n.diffIdentityProvider.getId(d.element)}}};this.tree.setChildren(e===this.root?null:e,s,c),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,i){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let n;return i&&i.viewState.expanded&&e.id&&i.viewState.expanded.indexOf(e.id)>-1?n=!1:e.forceExpanded?(n=!1,e.forceExpanded=!1):n=e.defaultCollapseState,{element:e,children:e.hasChildren?dl.map(e.children,s=>this.asTreeElement(s,i)):[],collapsible:e.hasChildren,collapsed:n}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose(),this.tree.dispose()}}class IJe{get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new IJe(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class JCi{constructor(e,i,n,s){this.renderer=e,this.nodeMapper=i,this.compressibleNodeMapperProvider=n,this.onDidChangeTwistieState=s,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,i,n,s){this.renderer.renderElement(this.nodeMapper.map(e),i,n.templateData,s)}renderCompressedElements(e,i,n,s){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),i,n.templateData,s)}renderTwistie(e,i){return e.slow?(i.classList.add(...zo.asClassNameArray(pr.treeItemLoading)),!0):(i.classList.remove(...zo.asClassNameArray(pr.treeItemLoading)),!1)}disposeElement(e,i,n,s){var c,d;(d=(c=this.renderer).disposeElement)==null||d.call(c,this.nodeMapper.map(e),i,n.templateData,s)}disposeCompressedElements(e,i,n,s){var c,d;(d=(c=this.renderer).disposeCompressedElements)==null||d.call(c,this.compressibleNodeMapperProvider().map(e),i,n.templateData,s)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=vd(this.disposables)}}function GCi(l){const e=l&&PEt(l);return e&&{...e,keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(i){return l.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(i.map(n=>n.element))}}}}class KCi extends AEt{constructor(e,i,n,s,c,d,f={}){super(e,i,n,c,d,f),this.compressionDelegate=s,this.compressibleNodeMapper=new SJe(m=>new IJe(m)),this.filter=f.filter}createTree(e,i,n,s,c){const d=new xJe(n),f=s.map(v=>new JCi(v,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),m=GCi(c)||{};return new LEt(e,i,d,f,m)}asTreeElement(e,i){return{incompressible:this.compressionDelegate.isIncompressible(e.element),...super.asTreeElement(e,i)}}updateOptions(e={}){this.tree.updateOptions(e)}render(e,i,n){if(!this.identityProvider)return super.render(e,i);const s=P=>this.identityProvider.getId(P).toString(),c=P=>{const O=new Set;for(const z of P){const J=this.tree.getCompressedTreeNode(z===this.root?null:z);if(J.element)for(const Y of J.element.elements)O.add(s(Y.element))}return O},d=c(this.tree.getSelection()),f=c(this.tree.getFocus());super.render(e,i,n);const m=this.getSelection();let v=!1;const x=this.getFocus();let w=!1;const I=P=>{const O=P.element;if(O)for(let z=0;z<O.elements.length;z++){const J=s(O.elements[z].element),Y=O.elements[O.elements.length-1].element;d.has(J)&&m.indexOf(Y)===-1&&(m.push(Y),v=!0),f.has(J)&&x.indexOf(Y)===-1&&(x.push(Y),w=!0)}P.children.forEach(I)};I(this.tree.getCompressedTreeNode(e===this.root?null:e)),v&&this.setSelection(m),w&&this.setFocus(x)}processChildren(e){return this.filter&&(e=dl.filter(e,i=>{const n=this.filter.filter(i,1),s=XCi(n);if(s===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return s===1})),super.processChildren(e)}}function XCi(l){return typeof l=="boolean"?l?1:0:wJe(l)?hre(l.visibility):hre(l)}class QCi extends EEt{constructor(e,i,n,s,c,d={}){super(e,i,n,s,d),this.user=e,this.dataSource=c,this.identityProvider=d.identityProvider}createModel(e,i,n){return new kJe(e,i,n)}}new rs("isMac",Hc,W("isMac","Whether the operating system is macOS"));new rs("isLinux",Cv,W("isLinux","Whether the operating system is Linux"));const Swe=new rs("isWindows",I0,W("isWindows","Whether the operating system is Windows")),OEt=new rs("isWeb",XB,W("isWeb","Whether the platform is a web browser"));new rs("isMacNative",Hc&&!XB,W("isMacNative","Whether the operating system is macOS on a non-browser platform"));new rs("isIOS",VE,W("isIOS","Whether the operating system is iOS"));new rs("isMobile",Ekt,W("isMobile","Whether the platform is a mobile web browser"));new rs("isDevelopment",!1,!0);new rs("productQualityType","",W("productQualityType","Quality type of VS Code"));const MEt="inputFocus",REt=new rs(MEt,!1,W("inputFocus","Whether keyboard focus is inside an input box"));var S6=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},nf=function(l,e){return function(i,n){e(i,n,l)}};const Ik=jc("listService");class ZCi{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new wn,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(e){var i,n;e!==this._lastFocusedWidget&&((i=this._lastFocusedWidget)==null||i.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,(n=this._lastFocusedWidget)==null||n.getHTMLElement().classList.add("last-focused"))}register(e,i){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new PDt(Dw(),"").style(tW)),this.lists.some(s=>s.widget===e))throw new Error("Cannot register the same widget multiple times");const n={widget:e,extraContextKeys:i};return this.lists.push(n),RSe(e.getHTMLElement())&&this.setLastFocusedList(e),gT(e.onDidFocus(()=>this.setLastFocusedList(e)),fo(()=>this.lists.splice(this.lists.indexOf(n),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(s=>s!==n),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}}const _re=new rs("listScrollAtBoundary","none");kn.or(_re.isEqualTo("top"),_re.isEqualTo("both"));kn.or(_re.isEqualTo("bottom"),_re.isEqualTo("both"));const FEt=new rs("listFocus",!0),BEt=new rs("treestickyScrollFocused",!1),wwe=new rs("listSupportsMultiselect",!0),WEt=kn.and(FEt,kn.not(MEt),BEt.negate()),NJe=new rs("listHasSelectionOrFocus",!1),LJe=new rs("listDoubleSelection",!1),PJe=new rs("listMultiSelection",!1),xwe=new rs("listSelectionNavigation",!1),YCi=new rs("listSupportsFind",!0),AJe=new rs("treeElementCanCollapse",!1),eSi=new rs("treeElementHasParent",!1),OJe=new rs("treeElementCanExpand",!1),tSi=new rs("treeElementHasChild",!1),iSi=new rs("treeFindOpen",!1),VEt="listTypeNavigationMode",HEt="listAutomaticKeyboardNavigation";function kwe(l,e){const i=l.createScoped(e.getHTMLElement());return FEt.bindTo(i),i}function Twe(l,e){const i=_re.bindTo(l),n=()=>{const s=e.scrollTop===0,c=e.scrollHeight-e.renderHeight-e.scrollTop<1;s&&c?i.set("both"):s?i.set("top"):c?i.set("bottom"):i.set("none")};return n(),e.onDidScroll(n)}const rW="workbench.list.multiSelectModifier",S1e="workbench.list.openMode",vk="workbench.list.horizontalScrolling",MJe="workbench.list.defaultFindMode",RJe="workbench.list.typeNavigationMode",sve="workbench.list.keyboardNavigation",qE="workbench.list.scrollByPage",FJe="workbench.list.defaultFindMatchType",pre="workbench.tree.indent",ove="workbench.tree.renderIndentGuides",$E="workbench.list.smoothScrolling",OL="workbench.list.mouseWheelScrollSensitivity",ML="workbench.list.fastScrollSensitivity",ave="workbench.tree.expandMode",cve="workbench.tree.enableStickyScroll",lve="workbench.tree.stickyScrollMaxItemCount";function RL(l){return l.getValue(rW)==="alt"}class nSi extends xi{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=RL(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(rW)&&(this.useAltAsMultipleSelectionModifier=RL(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:IDt(e)}isSelectionRangeChangeEvent(e){return NDt(e)}}function Dwe(l,e){const i=l.get(Cc),n=l.get(pu),s=new wn;return[{...e,keyboardNavigationDelegate:{mightProducePrintableCharacter(d){return n.mightProducePrintableCharacter(d)}},smoothScrolling:!!i.getValue($E),mouseWheelScrollSensitivity:i.getValue(OL),fastScrollSensitivity:i.getValue(ML),multipleSelectionController:e.multipleSelectionController??s.add(new nSi(i)),keyboardNavigationEventFilter:oSi(n),scrollByPage:!!i.getValue(qE)},s]}let KCt=class extends Ow{constructor(e,i,n,s,c,d,f,m,v){const x=typeof c.horizontalScrolling<"u"?c.horizontalScrolling:!!m.getValue(vk),[w,I]=v.invokeFunction(Dwe,c);super(e,i,n,s,{keyboardSupport:!1,...w,horizontalScrolling:x}),this.disposables.add(I),this.contextKeyService=kwe(d,this),this.disposables.add(Twe(this.contextKeyService,this)),this.listSupportsMultiSelect=wwe.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(c.multipleSelectionSupport!==!1),xwe.bindTo(this.contextKeyService).set(!!c.selectionNavigation),this.listHasSelectionOrFocus=NJe.bindTo(this.contextKeyService),this.listDoubleSelection=LJe.bindTo(this.contextKeyService),this.listMultiSelection=PJe.bindTo(this.contextKeyService),this.horizontalScrolling=c.horizontalScrolling,this._useAltAsMultipleSelectionModifier=RL(m),this.disposables.add(this.contextKeyService),this.disposables.add(f.register(this)),this.updateStyles(c.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const O=this.getSelection(),z=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(O.length>0||z.length>0),this.listMultiSelection.set(O.length>1),this.listDoubleSelection.set(O.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const O=this.getSelection(),z=this.getFocus();this.listHasSelectionOrFocus.set(O.length>0||z.length>0)})),this.disposables.add(m.onDidChangeConfiguration(O=>{O.affectsConfiguration(rW)&&(this._useAltAsMultipleSelectionModifier=RL(m));let z={};if(O.affectsConfiguration(vk)&&this.horizontalScrolling===void 0){const J=!!m.getValue(vk);z={...z,horizontalScrolling:J}}if(O.affectsConfiguration(qE)){const J=!!m.getValue(qE);z={...z,scrollByPage:J}}if(O.affectsConfiguration($E)){const J=!!m.getValue($E);z={...z,smoothScrolling:J}}if(O.affectsConfiguration(OL)){const J=m.getValue(OL);z={...z,mouseWheelScrollSensitivity:J}}if(O.affectsConfiguration(ML)){const J=m.getValue(ML);z={...z,fastScrollSensitivity:J}}Object.keys(z).length>0&&this.updateOptions(z)})),this.navigator=new jEt(this,{configurationService:m,...c}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?iW(e):tW)}};KCt=S6([nf(5,Ko),nf(6,Ik),nf(7,Cc),nf(8,ho)],KCt);let XCt=class extends cCi{constructor(e,i,n,s,c,d,f,m,v){const x=typeof c.horizontalScrolling<"u"?c.horizontalScrolling:!!m.getValue(vk),[w,I]=v.invokeFunction(Dwe,c);super(e,i,n,s,{keyboardSupport:!1,...w,horizontalScrolling:x}),this.disposables=new wn,this.disposables.add(I),this.contextKeyService=kwe(d,this),this.disposables.add(Twe(this.contextKeyService,this.widget)),this.horizontalScrolling=c.horizontalScrolling,this.listSupportsMultiSelect=wwe.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(c.multipleSelectionSupport!==!1),xwe.bindTo(this.contextKeyService).set(!!c.selectionNavigation),this._useAltAsMultipleSelectionModifier=RL(m),this.disposables.add(this.contextKeyService),this.disposables.add(f.register(this)),this.updateStyles(c.overrideStyles),this.disposables.add(m.onDidChangeConfiguration(O=>{O.affectsConfiguration(rW)&&(this._useAltAsMultipleSelectionModifier=RL(m));let z={};if(O.affectsConfiguration(vk)&&this.horizontalScrolling===void 0){const J=!!m.getValue(vk);z={...z,horizontalScrolling:J}}if(O.affectsConfiguration(qE)){const J=!!m.getValue(qE);z={...z,scrollByPage:J}}if(O.affectsConfiguration($E)){const J=!!m.getValue($E);z={...z,smoothScrolling:J}}if(O.affectsConfiguration(OL)){const J=m.getValue(OL);z={...z,mouseWheelScrollSensitivity:J}}if(O.affectsConfiguration(ML)){const J=m.getValue(ML);z={...z,fastScrollSensitivity:J}}Object.keys(z).length>0&&this.updateOptions(z)})),this.navigator=new jEt(this,{configurationService:m,...c}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?iW(e):tW)}dispose(){this.disposables.dispose(),super.dispose()}};XCt=S6([nf(5,Ko),nf(6,Ik),nf(7,Cc),nf(8,ho)],XCt);let QCt=class extends gHe{constructor(e,i,n,s,c,d,f,m,v,x){const w=typeof d.horizontalScrolling<"u"?d.horizontalScrolling:!!v.getValue(vk),[I,P]=x.invokeFunction(Dwe,d);super(e,i,n,s,c,{keyboardSupport:!1,...I,horizontalScrolling:w}),this.disposables.add(P),this.contextKeyService=kwe(f,this),this.disposables.add(Twe(this.contextKeyService,this)),this.listSupportsMultiSelect=wwe.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(d.multipleSelectionSupport!==!1),xwe.bindTo(this.contextKeyService).set(!!d.selectionNavigation),this.listHasSelectionOrFocus=NJe.bindTo(this.contextKeyService),this.listDoubleSelection=LJe.bindTo(this.contextKeyService),this.listMultiSelection=PJe.bindTo(this.contextKeyService),this.horizontalScrolling=d.horizontalScrolling,this._useAltAsMultipleSelectionModifier=RL(v),this.disposables.add(this.contextKeyService),this.disposables.add(m.register(this)),this.updateStyles(d.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const z=this.getSelection(),J=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(z.length>0||J.length>0),this.listMultiSelection.set(z.length>1),this.listDoubleSelection.set(z.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const z=this.getSelection(),J=this.getFocus();this.listHasSelectionOrFocus.set(z.length>0||J.length>0)})),this.disposables.add(v.onDidChangeConfiguration(z=>{z.affectsConfiguration(rW)&&(this._useAltAsMultipleSelectionModifier=RL(v));let J={};if(z.affectsConfiguration(vk)&&this.horizontalScrolling===void 0){const Y=!!v.getValue(vk);J={...J,horizontalScrolling:Y}}if(z.affectsConfiguration(qE)){const Y=!!v.getValue(qE);J={...J,scrollByPage:Y}}if(z.affectsConfiguration($E)){const Y=!!v.getValue($E);J={...J,smoothScrolling:Y}}if(z.affectsConfiguration(OL)){const Y=v.getValue(OL);J={...J,mouseWheelScrollSensitivity:Y}}if(z.affectsConfiguration(ML)){const Y=v.getValue(ML);J={...J,fastScrollSensitivity:Y}}Object.keys(J).length>0&&this.updateOptions(J)})),this.navigator=new rSi(this,{configurationService:v,...d}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?iW(e):tW)}dispose(){this.disposables.dispose(),super.dispose()}};QCt=S6([nf(6,Ko),nf(7,Ik),nf(8,Cc),nf(9,ho)],QCt);class BJe extends xi{constructor(e,i){super(),this.widget=e,this._onDidOpen=this._register(new gi),this.onDidOpen=this._onDidOpen.event,this._register(Tr.filter(this.widget.onDidChangeSelection,n=>E4(n.browserEvent))(n=>this.onSelectionFromKeyboard(n))),this._register(this.widget.onPointer(n=>this.onPointer(n.element,n.browserEvent))),this._register(this.widget.onMouseDblClick(n=>this.onMouseDblClick(n.element,n.browserEvent))),typeof(i==null?void 0:i.openOnSingleClick)!="boolean"&&(i!=null&&i.configurationService)?(this.openOnSingleClick=(i==null?void 0:i.configurationService.getValue(S1e))!=="doubleClick",this._register(i==null?void 0:i.configurationService.onDidChangeConfiguration(n=>{n.affectsConfiguration(S1e)&&(this.openOnSingleClick=(i==null?void 0:i.configurationService.getValue(S1e))!=="doubleClick")}))):this.openOnSingleClick=(i==null?void 0:i.openOnSingleClick)??!0}onSelectionFromKeyboard(e){if(e.elements.length!==1)return;const i=e.browserEvent,n=typeof i.preserveFocus=="boolean"?i.preserveFocus:!0,s=typeof i.pinned=="boolean"?i.pinned:!n;this._open(this.getSelectedElement(),n,s,!1,e.browserEvent)}onPointer(e,i){if(!this.openOnSingleClick||i.detail===2)return;const s=i.button===1,c=!0,d=s,f=i.ctrlKey||i.metaKey||i.altKey;this._open(e,c,d,f,i)}onMouseDblClick(e,i){if(!i)return;const n=i.target;if(n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&i.offsetX<16)return;const c=!1,d=!0,f=i.ctrlKey||i.metaKey||i.altKey;this._open(e,c,d,f,i)}_open(e,i,n,s,c){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:i,pinned:n,revealIfVisible:!0},sideBySide:s,element:e,browserEvent:c})}}class jEt extends BJe{constructor(e,i){super(e,i),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class rSi extends BJe{constructor(e,i){super(e,i)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class sSi extends BJe{constructor(e,i){super(e,i)}getSelectedElement(){return this.widget.getSelection()[0]??void 0}}function oSi(l){let e=!1;return i=>{if(i.toKeyCodeChord().isModifierKey())return!1;if(e)return e=!1,!1;const n=l.softDispatch(i,i.target);return n.kind===1?(e=!0,!1):(e=!1,n.kind===0)}}let SHe=class extends DJe{constructor(e,i,n,s,c,d,f,m,v){const{options:x,getTypeNavigationMode:w,disposable:I}=d.invokeFunction(Pse,c);super(e,i,n,s,x),this.disposables.add(I),this.internals=new MB(this,c,w,c.overrideStyles,f,m,v),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};SHe=S6([nf(5,ho),nf(6,Ko),nf(7,Ik),nf(8,Cc)],SHe);let ZCt=class extends LEt{constructor(e,i,n,s,c,d,f,m,v){const{options:x,getTypeNavigationMode:w,disposable:I}=d.invokeFunction(Pse,c);super(e,i,n,s,x),this.disposables.add(I),this.internals=new MB(this,c,w,c.overrideStyles,f,m,v),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};ZCt=S6([nf(5,ho),nf(6,Ko),nf(7,Ik),nf(8,Cc)],ZCt);let YCt=class extends QCi{constructor(e,i,n,s,c,d,f,m,v,x){const{options:w,getTypeNavigationMode:I,disposable:P}=f.invokeFunction(Pse,d);super(e,i,n,s,c,w),this.disposables.add(P),this.internals=new MB(this,d,I,d.overrideStyles,m,v,x),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles!==void 0&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};YCt=S6([nf(6,ho),nf(7,Ko),nf(8,Ik),nf(9,Cc)],YCt);let wHe=class extends AEt{get onDidOpen(){return this.internals.onDidOpen}constructor(e,i,n,s,c,d,f,m,v,x){const{options:w,getTypeNavigationMode:I,disposable:P}=f.invokeFunction(Pse,d);super(e,i,n,s,c,w),this.disposables.add(P),this.internals=new MB(this,d,I,d.overrideStyles,m,v,x),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};wHe=S6([nf(6,ho),nf(7,Ko),nf(8,Ik),nf(9,Cc)],wHe);let eSt=class extends KCi{constructor(e,i,n,s,c,d,f,m,v,x,w){const{options:I,getTypeNavigationMode:P,disposable:O}=m.invokeFunction(Pse,f);super(e,i,n,s,c,d,I),this.disposables.add(O),this.internals=new MB(this,f,P,f.overrideStyles,v,x,w),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};eSt=S6([nf(7,ho),nf(8,Ko),nf(9,Ik),nf(10,Cc)],eSt);function zEt(l){const e=l.getValue(MJe);if(e==="highlight")return z4.Highlight;if(e==="filter")return z4.Filter;const i=l.getValue(sve);if(i==="simple"||i==="highlight")return z4.Highlight;if(i==="filter")return z4.Filter}function UEt(l){const e=l.getValue(FJe);if(e==="fuzzy")return OB.Fuzzy;if(e==="contiguous")return OB.Contiguous}function Pse(l,e){const i=l.get(Cc),n=l.get(b6),s=l.get(Ko),c=l.get(ho),d=()=>{const I=s.getContextKeyValue(VEt);if(I==="automatic")return gL.Automatic;if(I==="trigger"||s.getContextKeyValue(HEt)===!1)return gL.Trigger;const O=i.getValue(RJe);if(O==="automatic")return gL.Automatic;if(O==="trigger")return gL.Trigger},f=e.horizontalScrolling!==void 0?e.horizontalScrolling:!!i.getValue(vk),[m,v]=c.invokeFunction(Dwe,e),x=e.paddingBottom,w=e.renderIndentGuides!==void 0?e.renderIndentGuides:i.getValue(ove);return{getTypeNavigationMode:d,disposable:v,options:{keyboardSupport:!1,...m,indent:typeof i.getValue(pre)=="number"?i.getValue(pre):void 0,renderIndentGuides:w,smoothScrolling:!!i.getValue($E),defaultFindMode:zEt(i),defaultFindMatchType:UEt(i),horizontalScrolling:f,scrollByPage:!!i.getValue(qE),paddingBottom:x,hideTwistiesOfChildlessElements:e.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:e.expandOnlyOnTwistieClick??i.getValue(ave)==="doubleClick",contextViewProvider:n,findWidgetStyles:uyi,enableStickyScroll:!!i.getValue(cve),stickyScrollMaxItemCount:Number(i.getValue(lve))}}}let MB=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,i,n,s,c,d,f){this.tree=e,this.disposables=[],this.contextKeyService=kwe(c,e),this.disposables.push(Twe(this.contextKeyService,e)),this.listSupportsMultiSelect=wwe.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(i.multipleSelectionSupport!==!1),xwe.bindTo(this.contextKeyService).set(!!i.selectionNavigation),this.listSupportFindWidget=YCi.bindTo(this.contextKeyService),this.listSupportFindWidget.set(i.findWidgetEnabled??!0),this.hasSelectionOrFocus=NJe.bindTo(this.contextKeyService),this.hasDoubleSelection=LJe.bindTo(this.contextKeyService),this.hasMultiSelection=PJe.bindTo(this.contextKeyService),this.treeElementCanCollapse=AJe.bindTo(this.contextKeyService),this.treeElementHasParent=eSi.bindTo(this.contextKeyService),this.treeElementCanExpand=OJe.bindTo(this.contextKeyService),this.treeElementHasChild=tSi.bindTo(this.contextKeyService),this.treeFindOpen=iSi.bindTo(this.contextKeyService),this.treeStickyScrollFocused=BEt.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=RL(f),this.updateStyleOverrides(s);const v=()=>{const w=e.getFocus()[0];if(!w)return;const I=e.getNode(w);this.treeElementCanCollapse.set(I.collapsible&&!I.collapsed),this.treeElementHasParent.set(!!e.getParentElement(w)),this.treeElementCanExpand.set(I.collapsible&&I.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(w))},x=new Set;x.add(VEt),x.add(HEt),this.disposables.push(this.contextKeyService,d.register(e),e.onDidChangeSelection(()=>{const w=e.getSelection(),I=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(w.length>0||I.length>0),this.hasMultiSelection.set(w.length>1),this.hasDoubleSelection.set(w.length===2)})}),e.onDidChangeFocus(()=>{const w=e.getSelection(),I=e.getFocus();this.hasSelectionOrFocus.set(w.length>0||I.length>0),v()}),e.onDidChangeCollapseState(v),e.onDidChangeModel(v),e.onDidChangeFindOpenState(w=>this.treeFindOpen.set(w)),e.onDidChangeStickyScrollFocused(w=>this.treeStickyScrollFocused.set(w)),f.onDidChangeConfiguration(w=>{let I={};if(w.affectsConfiguration(rW)&&(this._useAltAsMultipleSelectionModifier=RL(f)),w.affectsConfiguration(pre)){const P=f.getValue(pre);I={...I,indent:P}}if(w.affectsConfiguration(ove)&&i.renderIndentGuides===void 0){const P=f.getValue(ove);I={...I,renderIndentGuides:P}}if(w.affectsConfiguration($E)){const P=!!f.getValue($E);I={...I,smoothScrolling:P}}if(w.affectsConfiguration(MJe)||w.affectsConfiguration(sve)){const P=zEt(f);I={...I,defaultFindMode:P}}if(w.affectsConfiguration(RJe)||w.affectsConfiguration(sve)){const P=n();I={...I,typeNavigationMode:P}}if(w.affectsConfiguration(FJe)){const P=UEt(f);I={...I,defaultFindMatchType:P}}if(w.affectsConfiguration(vk)&&i.horizontalScrolling===void 0){const P=!!f.getValue(vk);I={...I,horizontalScrolling:P}}if(w.affectsConfiguration(qE)){const P=!!f.getValue(qE);I={...I,scrollByPage:P}}if(w.affectsConfiguration(ave)&&i.expandOnlyOnTwistieClick===void 0&&(I={...I,expandOnlyOnTwistieClick:f.getValue(ave)==="doubleClick"}),w.affectsConfiguration(cve)){const P=f.getValue(cve);I={...I,enableStickyScroll:P}}if(w.affectsConfiguration(lve)){const P=Math.max(1,f.getValue(lve));I={...I,stickyScrollMaxItemCount:P}}if(w.affectsConfiguration(OL)){const P=f.getValue(OL);I={...I,mouseWheelScrollSensitivity:P}}if(w.affectsConfiguration(ML)){const P=f.getValue(ML);I={...I,fastScrollSensitivity:P}}Object.keys(I).length>0&&e.updateOptions(I)}),this.contextKeyService.onDidChangeContext(w=>{w.affectsSome(x)&&e.updateOptions({typeNavigationMode:n()})})),this.navigator=new sSi(e,{configurationService:f,...i}),this.disposables.push(this.navigator)}updateOptions(e){e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?iW(e):tW)}dispose(){this.disposables=vd(this.disposables)}};MB=S6([nf(4,Ko),nf(5,Ik),nf(6,Cc)],MB);const aSi=nh.as(DT.Configuration);aSi.registerConfiguration({id:"workbench",order:7,title:W("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[rW]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[W("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),W("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:W({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[S1e]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:W({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[vk]:{type:"boolean",default:!1,description:W("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[qE]:{type:"boolean",default:!1,description:W("list.scrollByPage","Controls whether clicks in the scrollbar scroll page by page.")},[pre]:{type:"number",default:8,minimum:4,maximum:40,description:W("tree indent setting","Controls tree indentation in pixels.")},[ove]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:W("render tree indent guides","Controls whether the tree should render indent guides.")},[$E]:{type:"boolean",default:!1,description:W("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[OL]:{type:"number",default:1,markdownDescription:W("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[ML]:{type:"number",default:5,markdownDescription:W("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[MJe]:{type:"string",enum:["highlight","filter"],enumDescriptions:[W("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),W("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:W("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[sve]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[W("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),W("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),W("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:W("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:W("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' and 'workbench.list.typeNavigationMode' instead.")},[FJe]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[W("defaultFindMatchTypeSettingKey.fuzzy","Use fuzzy matching when searching."),W("defaultFindMatchTypeSettingKey.contiguous","Use contiguous matching when searching.")],default:"fuzzy",description:W("defaultFindMatchTypeSettingKey","Controls the type of matching used when searching lists and trees in the workbench.")},[ave]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:W("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[cve]:{type:"boolean",default:!0,description:W("sticky scroll","Controls whether sticky scrolling is enabled in trees.")},[lve]:{type:"number",minimum:1,default:7,markdownDescription:W("sticky scroll maximum items","Controls the number of sticky elements displayed in the tree when {0} is enabled.","`#workbench.tree.enableStickyScroll#`")},[RJe]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:W("typeNavigationMode2","Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run.")}}});class XM extends xi{constructor(e,i){super(),this.options=i,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=(i==null?void 0:i.supportIcons)??!1,this.domNode=jn(e,Cr("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,i=[],n="",s){e||(e=""),s&&(e=XM.escapeNewLines(e,i)),!(this.didEverRender&&this.text===e&&this.title===n&&qC(this.highlights,i))&&(this.text=e,this.title=n,this.highlights=i,this.render())}render(){var n,s,c;const e=[];let i=0;for(const d of this.highlights){if(d.end===d.start)continue;if(i<d.start){const v=this.text.substring(i,d.start);this.supportIcons?e.push(...JM(v)):e.push(v),i=d.start}const f=this.text.substring(i,d.end),m=Cr("span.highlight",void 0,...this.supportIcons?JM(f):[f]);d.extraClasses&&m.classList.add(...d.extraClasses),e.push(m),i=d.end}if(i<this.text.length){const d=this.text.substring(i);this.supportIcons?e.push(...JM(d)):e.push(d)}if(o0(this.domNode,...e),(s=(n=this.options)==null?void 0:n.hoverDelegate)!=null&&s.showNativeHover)this.domNode.title=this.title;else if(!this.customHover&&this.title!==""){const d=((c=this.options)==null?void 0:c.hoverDelegate)??Dv("mouse");this.customHover=this._register(QE().setupManagedHover(d,this.domNode,this.title))}else this.customHover&&this.customHover.update(this.title);this.didEverRender=!0}static escapeNewLines(e,i){let n=0,s=0;return e.replace(/\r\n|\r|\n/g,(c,d)=>{s=c===`\r
+`?-1:0,d+=n;for(const f of i)f.end<=d||(f.start>=d&&(f.start+=s),f.end>=d&&(f.end+=s));return n+=s,"⏎"})}}class Hte{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set classNames(e){this.disposed||qC(e,this._classNames)||(this._classNames=e,this._element.classList.value="",this._element.classList.add(...e))}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class uve extends xi{constructor(e,i){super(),this.customHovers=new Map,this.creationOptions=i,this.domNode=this._register(new Hte(jn(e,Cr(".monaco-icon-label")))),this.labelContainer=jn(this.domNode.element,Cr(".monaco-icon-label-container")),this.nameContainer=jn(this.labelContainer,Cr("span.monaco-icon-name-container")),i!=null&&i.supportHighlights||i!=null&&i.supportIcons?this.nameNode=this._register(new uSi(this.nameContainer,!!i.supportIcons)):this.nameNode=new cSi(this.nameContainer),this.hoverDelegate=(i==null?void 0:i.hoverDelegate)??Dv("mouse")}get element(){return this.domNode.element}setLabel(e,i,n){const s=["monaco-icon-label"],c=["monaco-icon-label-container"];let d="";n&&(n.extraClasses&&s.push(...n.extraClasses),n.italic&&s.push("italic"),n.strikethrough&&s.push("strikethrough"),n.disabledCommand&&c.push("disabled"),n.title&&(typeof n.title=="string"?d+=n.title:d+=e));const f=this.domNode.element.querySelector(".monaco-icon-label-iconpath");if(n!=null&&n.iconPath){let m;!f||!Mm(f)?(m=Cr(".monaco-icon-label-iconpath"),this.domNode.element.prepend(m)):m=f,m.style.backgroundImage=l6(n==null?void 0:n.iconPath)}else f&&f.remove();if(this.domNode.classNames=s,this.domNode.element.setAttribute("aria-label",d),this.labelContainer.classList.value="",this.labelContainer.classList.add(...c),this.setupHover(n!=null&&n.descriptionTitle?this.labelContainer:this.element,n==null?void 0:n.title),this.nameNode.setLabel(e,n),i||this.descriptionNode){const m=this.getOrCreateDescriptionNode();m instanceof XM?(m.set(i||"",n?n.descriptionMatches:void 0,void 0,n==null?void 0:n.labelEscapeNewLines),this.setupHover(m.element,n==null?void 0:n.descriptionTitle)):(m.textContent=i&&(n!=null&&n.labelEscapeNewLines)?XM.escapeNewLines(i,[]):i||"",this.setupHover(m.element,(n==null?void 0:n.descriptionTitle)||""),m.empty=!i)}if(n!=null&&n.suffix||this.suffixNode){const m=this.getOrCreateSuffixNode();m.textContent=(n==null?void 0:n.suffix)??""}}setupHover(e,i){const n=this.customHovers.get(e);if(n&&(n.dispose(),this.customHovers.delete(e)),!i){e.removeAttribute("title");return}if(this.hoverDelegate.showNativeHover)(function(c,d){Eb(d)?c.title=K$e(d):d!=null&&d.markdownNotSupportedFallback?c.title=d.markdownNotSupportedFallback:c.removeAttribute("title")})(e,i);else{const s=QE().setupManagedHover(this.hoverDelegate,e,i);s&&this.customHovers.set(e,s)}}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateSuffixNode(){if(!this.suffixNode){const e=this._register(new Hte(_di(this.nameContainer,Cr("span.monaco-icon-suffix-container"))));this.suffixNode=this._register(new Hte(jn(e.element,Cr("span.label-suffix"))))}return this.suffixNode}getOrCreateDescriptionNode(){var e;if(!this.descriptionNode){const i=this._register(new Hte(jn(this.labelContainer,Cr("span.monaco-icon-description-container"))));(e=this.creationOptions)!=null&&e.supportDescriptionHighlights?this.descriptionNode=this._register(new XM(jn(i.element,Cr("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons})):this.descriptionNode=this._register(new Hte(jn(i.element,Cr("span.label-description"))))}return this.descriptionNode}}class cSi{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,i){if(!(this.label===e&&qC(this.options,i)))if(this.label=e,this.options=i,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=jn(this.container,Cr("a.label-name",{id:i==null?void 0:i.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let n=0;n<e.length;n++){const s=e[n],c=(i==null?void 0:i.domId)&&`${i==null?void 0:i.domId}_${n}`;jn(this.container,Cr("a.label-name",{id:c,"data-icon-label-count":e.length,"data-icon-label-index":n,role:"treeitem"},s)),n<e.length-1&&jn(this.container,Cr("span.label-separator",void 0,(i==null?void 0:i.separator)||"/"))}}}}function lSi(l,e,i){if(!i)return;let n=0;return l.map(s=>{const c={start:n,end:n+s.length},d=i.map(f=>h1.intersect(c,f)).filter(f=>!h1.isEmpty(f)).map(({start:f,end:m})=>({start:f-n,end:m-n}));return n=c.end+e.length,d})}class uSi extends xi{constructor(e,i){super(),this.container=e,this.supportIcons=i,this.label=void 0,this.singleLabel=void 0}setLabel(e,i){if(!(this.label===e&&qC(this.options,i)))if(this.label=e,this.options=i,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=this._register(new XM(jn(this.container,Cr("a.label-name",{id:i==null?void 0:i.domId})),{supportIcons:this.supportIcons}))),this.singleLabel.set(e,i==null?void 0:i.matches,void 0,i==null?void 0:i.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const n=(i==null?void 0:i.separator)||"/",s=lSi(e,n,i==null?void 0:i.matches);for(let c=0;c<e.length;c++){const d=e[c],f=s?s[c]:void 0,m=(i==null?void 0:i.domId)&&`${i==null?void 0:i.domId}_${c}`,v=Cr("a.label-name",{id:m,"data-icon-label-count":e.length,"data-icon-label-index":c,role:"treeitem"});this._register(new XM(jn(this.container,v),{supportIcons:this.supportIcons})).set(d,f,void 0,i==null?void 0:i.labelEscapeNewLines),c<e.length-1&&jn(v,Cr("span.label-separator",void 0,n))}}}}const v0e=Cr,qEt={keybindingLabelBackground:void 0,keybindingLabelForeground:void 0,keybindingLabelBorder:void 0,keybindingLabelBottomBorder:void 0,keybindingLabelShadow:void 0};class EJ extends xi{constructor(e,i,n){super(),this.os=i,this.keyElements=new Set,this.options=n||Object.create(null);const s=this.options.keybindingLabelForeground;this.domNode=jn(e,v0e(".monaco-keybinding")),s&&(this.domNode.style.color=s),this.hover=this._register(QE().setupManagedHover(Dv("mouse"),this.domNode,"")),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,i){this.didEverRender&&this.keybinding===e&&EJ.areSame(this.matches,i)||(this.keybinding=e,this.matches=i,this.render())}render(){if(this.clear(),this.keybinding){const e=this.keybinding.getChords();e[0]&&this.renderChord(this.domNode,e[0],this.matches?this.matches.firstPart:null);for(let n=1;n<e.length;n++)jn(this.domNode,v0e("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderChord(this.domNode,e[n],this.matches?this.matches.chordPart:null);const i=this.options.disableTitle??!1?void 0:this.keybinding.getAriaLabel()||void 0;this.hover.update(i),this.domNode.setAttribute("aria-label",i||"")}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.didEverRender=!0}clear(){s0(this.domNode),this.keyElements.clear()}renderChord(e,i,n){const s=tJe.modifierLabels[this.os];i.ctrlKey&&this.renderKey(e,s.ctrlKey,!!(n!=null&&n.ctrlKey),s.separator),i.shiftKey&&this.renderKey(e,s.shiftKey,!!(n!=null&&n.shiftKey),s.separator),i.altKey&&this.renderKey(e,s.altKey,!!(n!=null&&n.altKey),s.separator),i.metaKey&&this.renderKey(e,s.metaKey,!!(n!=null&&n.metaKey),s.separator);const c=i.keyLabel;c&&this.renderKey(e,c,!!(n!=null&&n.keyCode),"")}renderKey(e,i,n,s){jn(e,this.createKeyElement(i,n?".highlight":"")),s&&jn(e,v0e("span.monaco-keybinding-key-separator",void 0,s))}renderUnbound(e){jn(e,this.createKeyElement(W("unbound","Unbound")))}createKeyElement(e,i=""){const n=v0e("span.monaco-keybinding-key"+i,void 0,e);return this.keyElements.add(n),this.options.keybindingLabelBackground&&(n.style.backgroundColor=this.options.keybindingLabelBackground),this.options.keybindingLabelBorder&&(n.style.borderColor=this.options.keybindingLabelBorder),this.options.keybindingLabelBottomBorder&&(n.style.borderBottomColor=this.options.keybindingLabelBottomBorder),this.options.keybindingLabelShadow&&(n.style.boxShadow=`inset 0 -1px 0 ${this.options.keybindingLabelShadow}`),n}static areSame(e,i){return e===i||!e&&!i?!0:!!e&&!!i&&qC(e.firstPart,i.firstPart)&&qC(e.chordPart,i.chordPart)}}const tSt=new HE(()=>{const l=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:l,collatorIsNumeric:l.resolvedOptions().numeric}});function dSi(l,e,i=!1){const n=l||"",s=e||"",c=tSt.value.collator.compare(n,s);return tSt.value.collatorIsNumeric&&c===0&&n!==s?n<s?-1:1:c}function fSi(l,e,i){const n=l.toLowerCase(),s=e.toLowerCase(),c=hSi(l,e,i);if(c)return c;const d=n.endsWith(i),f=s.endsWith(i);if(d!==f)return d?-1:1;const m=dSi(n,s);return m!==0?m:n.localeCompare(s)}function hSi(l,e,i){const n=l.toLowerCase(),s=e.toLowerCase(),c=n.startsWith(i),d=s.startsWith(i);if(c!==d)return c?-1:1;if(c&&d){if(n.length<s.length)return-1;if(n.length>s.length)return 1}return 0}var Ewe=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},xHe=function(l,e){return function(i,n){e(i,n,l)}},kHe;const dE=Cr;class $Et{constructor(e,i,n){this.index=e,this.hasCheckbox=i,this._hidden=!1,this._init=new HE(()=>{const s=n.label??"",c=rie(s).text.trim(),d=n.ariaLabel||[s,this.saneDescription,this.saneDetail].map(f=>Sgi(f)).filter(f=>!!f).join(", ");return{saneLabel:s,saneSortLabel:c,saneAriaLabel:d}}),this._saneDescription=n.description,this._saneTooltip=n.tooltip}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(e){this._element=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get saneDescription(){return this._saneDescription}set saneDescription(e){this._saneDescription=e}get saneDetail(){return this._saneDetail}set saneDetail(e){this._saneDetail=e}get saneTooltip(){return this._saneTooltip}set saneTooltip(e){this._saneTooltip=e}get labelHighlights(){return this._labelHighlights}set labelHighlights(e){this._labelHighlights=e}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(e){this._descriptionHighlights=e}get detailHighlights(){return this._detailHighlights}set detailHighlights(e){this._detailHighlights=e}}class C0 extends $Et{constructor(e,i,n,s,c,d){var f,m,v;super(e,i,c),this.fireButtonTriggered=n,this._onChecked=s,this.item=c,this._separator=d,this._checked=!1,this.onChecked=i?Tr.map(Tr.filter(this._onChecked.event,x=>x.element===this),x=>x.checked):Tr.None,this._saneDetail=c.detail,this._labelHighlights=(f=c.highlights)==null?void 0:f.label,this._descriptionHighlights=(m=c.highlights)==null?void 0:m.description,this._detailHighlights=(v=c.highlights)==null?void 0:v.detail}get separator(){return this._separator}set separator(e){this._separator=e}get checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({element:this,checked:e}))}get checkboxDisabled(){return!!this.item.disabled}}var dL;(function(l){l[l.NONE=0]="NONE",l[l.MOUSE_HOVER=1]="MOUSE_HOVER",l[l.ACTIVE_ITEM=2]="ACTIVE_ITEM"})(dL||(dL={}));class IF extends $Et{constructor(e,i,n){super(e,!1,n),this.fireSeparatorButtonTriggered=i,this.separator=n,this.children=new Array,this.focusInsideSeparator=dL.NONE}}class _Si{getHeight(e){return e instanceof IF?30:e.saneDetail?44:22}getTemplateId(e){return e instanceof C0?dve.ID:fve.ID}}class pSi{getWidgetAriaLabel(){return W("quickInput","Quick Input")}getAriaLabel(e){var i;return(i=e.separator)!=null&&i.label?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(!(!e.hasCheckbox||!(e instanceof C0)))return{get value(){return e.checked},onDidChange:i=>e.onChecked(()=>i())}}}class JEt{constructor(e){this.hoverDelegate=e}renderTemplate(e){const i=Object.create(null);i.toDisposeElement=new wn,i.toDisposeTemplate=new wn,i.entry=jn(e,dE(".quick-input-list-entry"));const n=jn(i.entry,dE("label.quick-input-list-label"));i.toDisposeTemplate.add(ph(n,br.CLICK,v=>{i.checkbox.offsetParent||v.preventDefault()})),i.checkbox=jn(n,dE("input.quick-input-list-checkbox")),i.checkbox.type="checkbox";const s=jn(n,dE(".quick-input-list-rows")),c=jn(s,dE(".quick-input-list-row")),d=jn(s,dE(".quick-input-list-row"));i.label=new uve(c,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),i.toDisposeTemplate.add(i.label),i.icon=f$e(i.label.element,dE(".quick-input-list-icon"));const f=jn(c,dE(".quick-input-list-entry-keybinding"));i.keybinding=new EJ(f,UC),i.toDisposeTemplate.add(i.keybinding);const m=jn(d,dE(".quick-input-list-label-meta"));return i.detail=new uve(m,{supportHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),i.toDisposeTemplate.add(i.detail),i.separator=jn(i.entry,dE(".quick-input-list-separator")),i.actionBar=new kw(i.entry,this.hoverDelegate?{hoverDelegate:this.hoverDelegate}:void 0),i.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),i.toDisposeTemplate.add(i.actionBar),i}disposeTemplate(e){e.toDisposeElement.dispose(),e.toDisposeTemplate.dispose()}disposeElement(e,i,n){n.toDisposeElement.clear(),n.actionBar.clear()}}var D9;let dve=(D9=class extends JEt{constructor(e,i){super(e),this.themeService=i,this._itemsWithSeparatorsFrequency=new Map}get templateId(){return kHe.ID}renderTemplate(e){const i=super.renderTemplate(e);return i.toDisposeTemplate.add(ph(i.checkbox,br.CHANGE,n=>{i.element.checked=i.checkbox.checked})),i}renderElement(e,i,n){var I;const s=e.element;n.element=s,s.element=n.entry??void 0;const c=s.item;n.checkbox.checked=s.checked,n.toDisposeElement.add(s.onChecked(P=>n.checkbox.checked=P)),n.checkbox.disabled=s.checkboxDisabled;const{labelHighlights:d,descriptionHighlights:f,detailHighlights:m}=s;if(c.iconPath){const P=I$(this.themeService.getColorTheme().type)?c.iconPath.dark:c.iconPath.light??c.iconPath.dark,O=yo.revive(P);n.icon.className="quick-input-list-icon",n.icon.style.backgroundImage=l6(O)}else n.icon.style.backgroundImage="",n.icon.className=c.iconClass?`quick-input-list-icon ${c.iconClass}`:"";let v;!s.saneTooltip&&s.saneDescription&&(v={markdown:{value:s.saneDescription,supportThemeIcons:!0},markdownNotSupportedFallback:s.saneDescription});const x={matches:d||[],descriptionTitle:v,descriptionMatches:f||[],labelEscapeNewLines:!0};if(x.extraClasses=c.iconClasses,x.italic=c.italic,x.strikethrough=c.strikethrough,n.entry.classList.remove("quick-input-list-separator-as-item"),n.label.setLabel(s.saneLabel,s.saneDescription,x),n.keybinding.set(c.keybinding),s.saneDetail){let P;s.saneTooltip||(P={markdown:{value:s.saneDetail,supportThemeIcons:!0},markdownNotSupportedFallback:s.saneDetail}),n.detail.element.style.display="",n.detail.setLabel(s.saneDetail,void 0,{matches:m,title:P,labelEscapeNewLines:!0})}else n.detail.element.style.display="none";(I=s.separator)!=null&&I.label?(n.separator.textContent=s.separator.label,n.separator.style.display="",this.addItemWithSeparator(s)):n.separator.style.display="none",n.entry.classList.toggle("quick-input-list-separator-border",!!s.separator);const w=c.buttons;w&&w.length?(n.actionBar.push(w.map((P,O)=>Fie(P,`id-${O}`,()=>s.fireButtonTriggered({button:P,item:s.item}))),{icon:!0,label:!1}),n.entry.classList.add("has-actions")):n.entry.classList.remove("has-actions")}disposeElement(e,i,n){this.removeItemWithSeparator(e.element),super.disposeElement(e,i,n)}isItemWithSeparatorVisible(e){return this._itemsWithSeparatorsFrequency.has(e)}addItemWithSeparator(e){this._itemsWithSeparatorsFrequency.set(e,(this._itemsWithSeparatorsFrequency.get(e)||0)+1)}removeItemWithSeparator(e){const i=this._itemsWithSeparatorsFrequency.get(e)||0;i>1?this._itemsWithSeparatorsFrequency.set(e,i-1):this._itemsWithSeparatorsFrequency.delete(e)}},kHe=D9,D9.ID="quickpickitem",D9);dve=kHe=Ewe([xHe(1,im)],dve);const pCe=class pCe extends JEt{constructor(){super(...arguments),this._visibleSeparatorsFrequency=new Map}get templateId(){return pCe.ID}get visibleSeparators(){return[...this._visibleSeparatorsFrequency.keys()]}isSeparatorVisible(e){return this._visibleSeparatorsFrequency.has(e)}renderTemplate(e){const i=super.renderTemplate(e);return i.checkbox.style.display="none",i}renderElement(e,i,n){const s=e.element;n.element=s,s.element=n.entry??void 0,s.element.classList.toggle("focus-inside",!!s.focusInsideSeparator);const c=s.separator,{labelHighlights:d,descriptionHighlights:f,detailHighlights:m}=s;n.icon.style.backgroundImage="",n.icon.className="";let v;!s.saneTooltip&&s.saneDescription&&(v={markdown:{value:s.saneDescription,supportThemeIcons:!0},markdownNotSupportedFallback:s.saneDescription});const x={matches:d||[],descriptionTitle:v,descriptionMatches:f||[],labelEscapeNewLines:!0};if(n.entry.classList.add("quick-input-list-separator-as-item"),n.label.setLabel(s.saneLabel,s.saneDescription,x),s.saneDetail){let I;s.saneTooltip||(I={markdown:{value:s.saneDetail,supportThemeIcons:!0},markdownNotSupportedFallback:s.saneDetail}),n.detail.element.style.display="",n.detail.setLabel(s.saneDetail,void 0,{matches:m,title:I,labelEscapeNewLines:!0})}else n.detail.element.style.display="none";n.separator.style.display="none",n.entry.classList.add("quick-input-list-separator-border");const w=c.buttons;w&&w.length?(n.actionBar.push(w.map((I,P)=>Fie(I,`id-${P}`,()=>s.fireSeparatorButtonTriggered({button:I,separator:s.separator}))),{icon:!0,label:!1}),n.entry.classList.add("has-actions")):n.entry.classList.remove("has-actions"),this.addSeparator(s)}disposeElement(e,i,n){var s;this.removeSeparator(e.element),this.isSeparatorVisible(e.element)||(s=e.element.element)==null||s.classList.remove("focus-inside"),super.disposeElement(e,i,n)}addSeparator(e){this._visibleSeparatorsFrequency.set(e,(this._visibleSeparatorsFrequency.get(e)||0)+1)}removeSeparator(e){const i=this._visibleSeparatorsFrequency.get(e)||0;i>1?this._visibleSeparatorsFrequency.set(e,i-1):this._visibleSeparatorsFrequency.delete(e)}};pCe.ID="quickpickseparator";let fve=pCe,mre=class extends xi{constructor(e,i,n,s,c,d){super(),this.parent=e,this.hoverDelegate=i,this.linkOpenerDelegate=n,this.accessibilityService=d,this._onKeyDown=new gi,this._onLeave=new gi,this.onLeave=this._onLeave.event,this._visibleCountObservable=bc("VisibleCount",0),this.onChangedVisibleCount=Tr.fromObservable(this._visibleCountObservable,this._store),this._allVisibleCheckedObservable=bc("AllVisibleChecked",!1),this.onChangedAllVisibleChecked=Tr.fromObservable(this._allVisibleCheckedObservable,this._store),this._checkedCountObservable=bc("CheckedCount",0),this.onChangedCheckedCount=Tr.fromObservable(this._checkedCountObservable,this._store),this._checkedElementsObservable=BVe({equalsFn:Lf},new Array),this.onChangedCheckedElements=Tr.fromObservable(this._checkedElementsObservable,this._store),this._onButtonTriggered=new gi,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new gi,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._elementChecked=new gi,this._elementCheckedEventBufferer=new lse,this._hasCheckboxes=!1,this._inputElements=new Array,this._elementTree=new Array,this._itemElements=new Array,this._elementDisposable=this._register(new wn),this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._shouldLoop=!0,this._container=jn(this.parent,dE(".quick-input-list")),this._separatorRenderer=new fve(i),this._itemRenderer=c.createInstance(dve,i),this._tree=this._register(c.createInstance(SHe,"QuickInput",this._container,new _Si,[this._itemRenderer,this._separatorRenderer],{filter:{filter(f){return f.hidden?0:f instanceof IF?2:1}},sorter:{compare:(f,m)=>{if(!this.sortByLabel||!this._lastQueryString)return 0;const v=this._lastQueryString.toLowerCase();return gSi(f,m,v)}},accessibilityProvider:new pSi,setRowLineHeight:!1,multipleSelectionSupport:!1,hideTwistiesOfChildlessElements:!0,renderIndentGuides:j$.None,findWidgetEnabled:!1,indent:0,horizontalScrolling:!1,allowNonCollapsibleParents:!0,alwaysConsumeMouseWheel:!0})),this._tree.getHTMLElement().id=s,this._registerListeners()}get onDidChangeFocus(){return Tr.map(this._tree.onDidChangeFocus,e=>e.elements.filter(i=>i instanceof C0).map(i=>i.item),this._store)}get onDidChangeSelection(){return Tr.map(this._tree.onDidChangeSelection,e=>({items:e.elements.filter(i=>i instanceof C0).map(i=>i.item),event:e.browserEvent}),this._store)}get displayed(){return this._container.style.display!=="none"}set displayed(e){this._container.style.display=e?"":"none"}get scrollTop(){return this._tree.scrollTop}set scrollTop(e){this._tree.scrollTop=e}get ariaLabel(){return this._tree.ariaLabel}set ariaLabel(e){this._tree.ariaLabel=e??""}set enabled(e){this._tree.getHTMLElement().style.pointerEvents=e?"":"none"}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e}get shouldLoop(){return this._shouldLoop}set shouldLoop(e){this._shouldLoop=e}_registerListeners(){this._registerOnKeyDown(),this._registerOnContainerClick(),this._registerOnMouseMiddleClick(),this._registerOnTreeModelChanged(),this._registerOnElementChecked(),this._registerOnContextMenu(),this._registerHoverListeners(),this._registerSelectionChangeListener(),this._registerSeparatorActionShowingListeners()}_registerOnKeyDown(){this._register(this._tree.onKeyDown(e=>{const i=new Id(e);switch(i.keyCode){case 10:this.toggleCheckbox();break}this._onKeyDown.fire(i)}))}_registerOnContainerClick(){this._register(en(this._container,br.CLICK,e=>{(e.x||e.y)&&this._onLeave.fire()}))}_registerOnMouseMiddleClick(){this._register(en(this._container,br.AUXCLICK,e=>{e.button===1&&this._onLeave.fire()}))}_registerOnTreeModelChanged(){this._register(this._tree.onDidChangeModel(()=>{const e=this._itemElements.filter(i=>!i.hidden).length;this._visibleCountObservable.set(e,void 0),this._hasCheckboxes&&this._updateCheckedObservables()}))}_registerOnElementChecked(){this._register(this._elementCheckedEventBufferer.wrapEvent(this._elementChecked.event,(e,i)=>i)(e=>this._updateCheckedObservables()))}_registerOnContextMenu(){this._register(this._tree.onContextMenu(e=>{e.element&&(e.browserEvent.preventDefault(),this._tree.setSelection([e.element]))}))}_registerHoverListeners(){const e=this._register(new l2t(this.hoverDelegate.delay));this._register(this._tree.onMouseOver(async i=>{var n;if(hvt(i.browserEvent.target)){e.cancel();return}if(!(!hvt(i.browserEvent.relatedTarget)&&Am(i.browserEvent.relatedTarget,(n=i.element)==null?void 0:n.element)))try{await e.trigger(async()=>{i.element instanceof C0&&this.showHover(i.element)})}catch(s){if(!Tk(s))throw s}})),this._register(this._tree.onMouseOut(i=>{var n;Am(i.browserEvent.relatedTarget,(n=i.element)==null?void 0:n.element)||e.cancel()}))}_registerSeparatorActionShowingListeners(){this._register(this._tree.onDidChangeFocus(e=>{const i=e.elements[0]?this._tree.getParentElement(e.elements[0]):null;for(const n of this._separatorRenderer.visibleSeparators){const s=n===i;!!(n.focusInsideSeparator&dL.ACTIVE_ITEM)!==s&&(s?n.focusInsideSeparator|=dL.ACTIVE_ITEM:n.focusInsideSeparator&=~dL.ACTIVE_ITEM,this._tree.rerender(n))}})),this._register(this._tree.onMouseOver(e=>{const i=e.element?this._tree.getParentElement(e.element):null;for(const n of this._separatorRenderer.visibleSeparators){if(n!==i)continue;!!(n.focusInsideSeparator&dL.MOUSE_HOVER)||(n.focusInsideSeparator|=dL.MOUSE_HOVER,this._tree.rerender(n))}})),this._register(this._tree.onMouseOut(e=>{const i=e.element?this._tree.getParentElement(e.element):null;for(const n of this._separatorRenderer.visibleSeparators){if(n!==i)continue;!!(n.focusInsideSeparator&dL.MOUSE_HOVER)&&(n.focusInsideSeparator&=~dL.MOUSE_HOVER,this._tree.rerender(n))}}))}_registerSelectionChangeListener(){this._register(this._tree.onDidChangeSelection(e=>{const i=e.elements.filter(n=>n instanceof C0);i.length!==e.elements.length&&(e.elements.length===1&&e.elements[0]instanceof IF&&(this._tree.setFocus([e.elements[0].children[0]]),this._tree.reveal(e.elements[0],0)),this._tree.setSelection(i))}))}setAllVisibleChecked(e){this._elementCheckedEventBufferer.bufferEvents(()=>{this._itemElements.forEach(i=>{!i.hidden&&!i.checkboxDisabled&&(i.checked=e)})})}setElements(e){this._elementDisposable.clear(),this._lastQueryString=void 0,this._inputElements=e,this._hasCheckboxes=this.parent.classList.contains("show-checkboxes");let i;this._itemElements=new Array,this._elementTree=e.reduce((n,s,c)=>{let d;if(s.type==="separator"){if(!s.buttons)return n;i=new IF(c,f=>this._onSeparatorButtonTriggered.fire(f),s),d=i}else{const f=c>0?e[c-1]:void 0;let m;f&&f.type==="separator"&&!f.buttons&&(i=void 0,m=f);const v=new C0(c,this._hasCheckboxes,x=>this._onButtonTriggered.fire(x),this._elementChecked,s,m);if(this._itemElements.push(v),i)return i.children.push(v),n;d=v}return n.push(d),n},new Array),this._setElementsToTree(this._elementTree),this.accessibilityService.isScreenReaderOptimized()&&setTimeout(()=>{const n=this._tree.getHTMLElement().querySelector(".monaco-list-row.focused"),s=n==null?void 0:n.parentNode;if(n&&s){const c=n.nextSibling;n.remove(),s.insertBefore(n,c)}},0)}setFocusedElements(e){const i=e.map(n=>this._itemElements.find(s=>s.item===n)).filter(n=>!!n).filter(n=>!n.hidden);if(this._tree.setFocus(i),e.length>0){const n=this._tree.getFocus()[0];n&&this._tree.reveal(n)}}getActiveDescendant(){return this._tree.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){const i=e.map(n=>this._itemElements.find(s=>s.item===n)).filter(n=>!!n);this._tree.setSelection(i)}getCheckedElements(){return this._itemElements.filter(e=>e.checked).map(e=>e.item)}setCheckedElements(e){this._elementCheckedEventBufferer.bufferEvents(()=>{const i=new Set;for(const n of e)i.add(n);for(const n of this._itemElements)n.checked=i.has(n.item)})}focus(e){var i;if(this._itemElements.length)switch(e===Yd.Second&&this._itemElements.length<2&&(e=Yd.First),e){case Yd.First:this._tree.scrollTop=0,this._tree.focusFirst(void 0,n=>n.element instanceof C0);break;case Yd.Second:{this._tree.scrollTop=0;let n=!1;this._tree.focusFirst(void 0,s=>s.element instanceof C0?n?!0:(n=!n,!1):!1);break}case Yd.Last:this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast(void 0,n=>n.element instanceof C0);break;case Yd.Next:{const n=this._tree.getFocus();this._tree.focusNext(void 0,this._shouldLoop,void 0,c=>c.element instanceof C0?(this._tree.reveal(c.element),!0):!1);const s=this._tree.getFocus();n.length&&n[0]===s[0]&&n[0]===this._itemElements[this._itemElements.length-1]&&this._onLeave.fire();break}case Yd.Previous:{const n=this._tree.getFocus();this._tree.focusPrevious(void 0,this._shouldLoop,void 0,c=>{if(!(c.element instanceof C0))return!1;const d=this._tree.getParentElement(c.element);return d===null||d.children[0]!==c.element?this._tree.reveal(c.element):this._tree.reveal(d),!0});const s=this._tree.getFocus();n.length&&n[0]===s[0]&&n[0]===this._itemElements[0]&&this._onLeave.fire();break}case Yd.NextPage:this._tree.focusNextPage(void 0,n=>n.element instanceof C0?(this._tree.reveal(n.element),!0):!1);break;case Yd.PreviousPage:this._tree.focusPreviousPage(void 0,n=>{if(!(n.element instanceof C0))return!1;const s=this._tree.getParentElement(n.element);return s===null||s.children[0]!==n.element?this._tree.reveal(n.element):this._tree.reveal(s),!0});break;case Yd.NextSeparator:{let n=!1;const s=this._tree.getFocus()[0];this._tree.focusNext(void 0,!0,void 0,d=>{if(n)return!0;if(d.element instanceof IF)n=!0,this._separatorRenderer.isSeparatorVisible(d.element)?this._tree.reveal(d.element.children[0]):this._tree.reveal(d.element,0);else if(d.element instanceof C0){if(d.element.separator)return this._itemRenderer.isItemWithSeparatorVisible(d.element)?this._tree.reveal(d.element):this._tree.reveal(d.element,0),!0;if(d.element===this._elementTree[0])return this._tree.reveal(d.element,0),!0}return!1});const c=this._tree.getFocus()[0];s===c&&(this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast(void 0,d=>d.element instanceof C0));break}case Yd.PreviousSeparator:{let n,s=!!((i=this._tree.getFocus()[0])!=null&&i.separator);this._tree.focusPrevious(void 0,!0,void 0,c=>{if(c.element instanceof IF)s?n||(this._separatorRenderer.isSeparatorVisible(c.element)?this._tree.reveal(c.element):this._tree.reveal(c.element,0),n=c.element.children[0]):s=!0;else if(c.element instanceof C0&&!n){if(c.element.separator)this._itemRenderer.isItemWithSeparatorVisible(c.element)?this._tree.reveal(c.element):this._tree.reveal(c.element,0),n=c.element;else if(c.element===this._elementTree[0])return this._tree.reveal(c.element,0),!0}return!1}),n&&this._tree.setFocus([n]);break}}}clearFocus(){this._tree.setFocus([])}domFocus(){this._tree.domFocus()}layout(e){this._tree.getHTMLElement().style.maxHeight=e?`${Math.floor(e/44)*44+6}px`:"",this._tree.layout()}filter(e){if(this._lastQueryString=e,!(this._sortByLabel||this._matchOnLabel||this._matchOnDescription||this._matchOnDetail))return this._tree.layout(),!1;const i=e;if(e=e.trim(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this._itemElements.forEach(n=>{n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!1;const s=n.index&&this._inputElements[n.index-1];n.item&&(n.separator=s&&s.type==="separator"&&!s.buttons?s:void 0)});else{let n;this._itemElements.forEach(s=>{let c;this.matchOnLabelMode==="fuzzy"?c=this.matchOnLabel?BFe(e,rie(s.saneLabel))??void 0:void 0:c=this.matchOnLabel?mSi(i,rie(s.saneLabel))??void 0:void 0;const d=this.matchOnDescription?BFe(e,rie(s.saneDescription||""))??void 0:void 0,f=this.matchOnDetail?BFe(e,rie(s.saneDetail||""))??void 0:void 0;if(c||d||f?(s.labelHighlights=c,s.descriptionHighlights=d,s.detailHighlights=f,s.hidden=!1):(s.labelHighlights=void 0,s.descriptionHighlights=void 0,s.detailHighlights=void 0,s.hidden=s.item?!s.item.alwaysShow:!0),s.item?s.separator=void 0:s.separator&&(s.hidden=!0),!this.sortByLabel){const m=s.index&&this._inputElements[s.index-1]||void 0;(m==null?void 0:m.type)==="separator"&&!m.buttons&&(n=m),n&&!s.hidden&&(s.separator=n,n=void 0)}})}return this._setElementsToTree(this._sortByLabel&&e?this._itemElements:this._elementTree),this._tree.layout(),!0}toggleCheckbox(){this._elementCheckedEventBufferer.bufferEvents(()=>{const e=this._tree.getFocus().filter(n=>n instanceof C0),i=this._allVisibleChecked(e);for(const n of e)n.checkboxDisabled||(n.checked=!i)})}style(e){this._tree.style(e)}toggleHover(){const e=this._tree.getFocus()[0];if(!(e!=null&&e.saneTooltip)||!(e instanceof C0))return;if(this._lastHover&&!this._lastHover.isDisposed){this._lastHover.dispose();return}this.showHover(e);const i=new wn;i.add(this._tree.onDidChangeFocus(n=>{n.elements[0]instanceof C0&&this.showHover(n.elements[0])})),this._lastHover&&i.add(this._lastHover),this._elementDisposable.add(i)}_setElementsToTree(e){const i=new Array;for(const n of e)n instanceof IF?i.push({element:n,collapsible:!1,collapsed:!1,children:n.children.map(s=>({element:s,collapsible:!1,collapsed:!1}))}):i.push({element:n,collapsible:!1,collapsed:!1});this._tree.setChildren(null,i)}_allVisibleChecked(e,i=!0){for(let n=0,s=e.length;n<s;n++){const c=e[n];if(!c.hidden)if(c.checked)i=!0;else return!1}return i}_updateCheckedObservables(){th(e=>{this._allVisibleCheckedObservable.set(this._allVisibleChecked(this._itemElements,!1),e);const i=this._itemElements.filter(n=>n.checked).length;this._checkedCountObservable.set(i,e),this._checkedElementsObservable.set(this.getCheckedElements(),e)})}showHover(e){var i,n,s;this._lastHover&&!this._lastHover.isDisposed&&((n=(i=this.hoverDelegate).onDidHideHover)==null||n.call(i),(s=this._lastHover)==null||s.dispose()),!(!e.element||!e.saneTooltip)&&(this._lastHover=this.hoverDelegate.showHover({content:e.saneTooltip,target:e.element,linkHandler:c=>{this.linkOpenerDelegate(c)},appearance:{showPointer:!0},container:this._container,position:{hoverPosition:1}},!1))}};Ewe([x_],mre.prototype,"onDidChangeFocus",null);Ewe([x_],mre.prototype,"onDidChangeSelection",null);mre=Ewe([xHe(4,ho),xHe(5,tS)],mre);function mSi(l,e){const{text:i,iconOffsets:n}=e;if(!n||n.length===0)return iSt(l,i);const s=use(i," "),c=i.length-s.length,d=iSt(l,s);if(d)for(const f of d){const m=n[f.start+c]+c;f.start+=m,f.end+=m}return d}function iSt(l,e){const i=e.toLowerCase().indexOf(l.toLowerCase());return i!==-1?[{start:i,end:i+l.length}]:null}function gSi(l,e,i){const n=l.labelHighlights||[],s=e.labelHighlights||[];return n.length&&!s.length?-1:!n.length&&s.length?1:n.length===0&&s.length===0?0:fSi(l.saneSortLabel,e.saneSortLabel,i)}const GEt={weight:200,when:kn.and(kn.equals(yEt,"quickPick"),qbi),metadata:{description:W("quickPick","Used while in the context of the quick pick. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.")}};function BC(l,e={}){wv.registerCommandAndKeybindingRule({...GEt,...l,secondary:ySi(l.primary,l.secondary??[],e)})}const hve=Hc?256:2048;function ySi(l,e,i={}){return i.withAltMod&&e.push(512+l),i.withCtrlMod&&(e.push(hve+l),i.withAltMod&&e.push(512+hve+l)),i.withCmdMod&&Hc&&(e.push(2048+l),i.withCtrlMod&&e.push(2304+l),i.withAltMod&&(e.push(2560+l),i.withCtrlMod&&e.push(2816+l))),e}function dw(l,e){return i=>{const n=i.get(Ek).currentQuickInput;if(n)return e&&n.quickNavigate?n.focus(e):n.focus(l)}}BC({id:"quickInput.pageNext",primary:12,handler:dw(Yd.NextPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});BC({id:"quickInput.pagePrevious",primary:11,handler:dw(Yd.PreviousPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});BC({id:"quickInput.first",primary:hve+14,handler:dw(Yd.First)},{withAltMod:!0,withCmdMod:!0});BC({id:"quickInput.last",primary:hve+13,handler:dw(Yd.Last)},{withAltMod:!0,withCmdMod:!0});BC({id:"quickInput.next",primary:18,handler:dw(Yd.Next)},{withCtrlMod:!0});BC({id:"quickInput.previous",primary:16,handler:dw(Yd.Previous)},{withCtrlMod:!0});const nSt=W("quickInput.nextSeparatorWithQuickAccessFallback","If we're in quick access mode, this will navigate to the next item. If we are not in quick access mode, this will navigate to the next separator."),rSt=W("quickInput.previousSeparatorWithQuickAccessFallback","If we're in quick access mode, this will navigate to the previous item. If we are not in quick access mode, this will navigate to the previous separator.");Hc?(BC({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:2066,handler:dw(Yd.NextSeparator,Yd.Next),metadata:{description:nSt}}),BC({id:"quickInput.nextSeparator",primary:2578,secondary:[2322],handler:dw(Yd.NextSeparator)},{withCtrlMod:!0}),BC({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:2064,handler:dw(Yd.PreviousSeparator,Yd.Previous),metadata:{description:rSt}}),BC({id:"quickInput.previousSeparator",primary:2576,secondary:[2320],handler:dw(Yd.PreviousSeparator)},{withCtrlMod:!0})):(BC({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:530,handler:dw(Yd.NextSeparator,Yd.Next),metadata:{description:nSt}}),BC({id:"quickInput.nextSeparator",primary:2578,handler:dw(Yd.NextSeparator)}),BC({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:528,handler:dw(Yd.PreviousSeparator,Yd.Previous),metadata:{description:rSt}}),BC({id:"quickInput.previousSeparator",primary:2576,handler:dw(Yd.PreviousSeparator)}));BC({id:"quickInput.acceptInBackground",when:kn.and(GEt.when,kn.or(REt.negate(),Gbi)),primary:17,weight:250,handler:l=>{const e=l.get(Ek).currentQuickInput;e==null||e.accept(!0)}},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});var vSi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},a9e=function(l,e){return function(i,n){e(i,n,l)}},THe;const OC=Cr;var E9;let DHe=(E9=class extends xi{get currentQuickInput(){return this.controller??void 0}get container(){return this._container}constructor(e,i,n,s){super(),this.options=e,this.layoutService=i,this.instantiationService=n,this.contextKeyService=s,this.enabled=!0,this.onDidAcceptEmitter=this._register(new gi),this.onDidCustomEmitter=this._register(new gi),this.onDidTriggerButtonEmitter=this._register(new gi),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new gi),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new gi),this.onHide=this.onHideEmitter.event,this.inQuickInputContext=Ubi.bindTo(this.contextKeyService),this.quickInputTypeContext=$bi.bindTo(this.contextKeyService),this.endOfQuickInputBoxContext=Jbi.bindTo(this.contextKeyService),this.idPrefix=e.idPrefix,this._container=e.container,this.styles=e.styles,this._register(Tr.runAndSubscribe(OSe,({window:c,disposables:d})=>this.registerKeyModsListeners(c,d),{window:cd,disposables:this._store})),this._register(Qui(c=>{this.ui&&Eo(this.ui.container)===c&&(this.reparentUI(this.layoutService.mainContainer),this.layout(this.layoutService.mainContainerDimension,this.layoutService.mainContainerOffset.quickPickTop))}))}registerKeyModsListeners(e,i){const n=s=>{this.keyMods.ctrlCmd=s.ctrlKey||s.metaKey,this.keyMods.alt=s.altKey};for(const s of[br.KEY_DOWN,br.KEY_UP,br.MOUSE_DOWN])i.add(en(e,s,n,!0))}getUI(e){if(this.ui)return e&&Eo(this._container)!==Eo(this.layoutService.activeContainer)&&(this.reparentUI(this.layoutService.activeContainer),this.layout(this.layoutService.activeContainerDimension,this.layoutService.activeContainerOffset.quickPickTop)),this.ui;const i=jn(this._container,OC(".quick-input-widget.show-file-icons"));i.tabIndex=-1,i.style.display="none";const n=Dw(i),s=jn(i,OC(".quick-input-titlebar")),c=this._register(new kw(s,{hoverDelegate:this.options.hoverDelegate}));c.domNode.classList.add("quick-input-left-action-bar");const d=jn(s,OC(".quick-input-title")),f=this._register(new kw(s,{hoverDelegate:this.options.hoverDelegate}));f.domNode.classList.add("quick-input-right-action-bar");const m=jn(i,OC(".quick-input-header")),v=jn(m,OC("input.quick-input-check-all"));v.type="checkbox",v.setAttribute("aria-label",W("quickInput.checkAll","Toggle all checkboxes")),this._register(ph(v,br.CHANGE,Hi=>{const An=v.checked;$i.setAllVisibleChecked(An)})),this._register(en(v,br.CLICK,Hi=>{(Hi.x||Hi.y)&&P.setFocus()}));const x=jn(m,OC(".quick-input-description")),w=jn(m,OC(".quick-input-and-message")),I=jn(w,OC(".quick-input-filter")),P=this._register(new rCi(I,this.styles.inputBox,this.styles.toggle));P.setAttribute("aria-describedby",`${this.idPrefix}message`);const O=jn(I,OC(".quick-input-visible-count"));O.setAttribute("aria-live","polite"),O.setAttribute("aria-atomic","true");const z=new pHe(O,{countFormat:W({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")},this.styles.countBadge),J=jn(I,OC(".quick-input-count"));J.setAttribute("aria-live","polite");const Y=new pHe(J,{countFormat:W({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")},this.styles.countBadge),ae=this._register(new kw(m,{hoverDelegate:this.options.hoverDelegate}));ae.domNode.classList.add("quick-input-inline-action-bar");const me=jn(m,OC(".quick-input-action")),ye=this._register(new eve(me,this.styles.button));ye.label=W("ok","OK"),this._register(ye.onDidClick(Hi=>{this.onDidAcceptEmitter.fire()}));const Ce=jn(m,OC(".quick-input-action")),Fe=this._register(new eve(Ce,{...this.styles.button,supportIcons:!0}));Fe.label=W("custom","Custom"),this._register(Fe.onDidClick(Hi=>{this.onDidCustomEmitter.fire()}));const rt=jn(w,OC(`#${this.idPrefix}message.quick-input-message`)),ct=this._register(new mHe(i,this.styles.progressBar));ct.getContainer().classList.add("quick-input-progress");const Mt=jn(i,OC(".quick-input-html-widget"));Mt.tabIndex=-1;const Yt=jn(i,OC(".quick-input-description")),Bi=this.idPrefix+"list",$i=this._register(this.instantiationService.createInstance(mre,i,this.options.hoverDelegate,this.options.linkOpenerDelegate,Bi));P.setAttribute("aria-controls",Bi),this._register($i.onDidChangeFocus(()=>{P.setAttribute("aria-activedescendant",$i.getActiveDescendant()??"")})),this._register($i.onChangedAllVisibleChecked(Hi=>{v.checked=Hi})),this._register($i.onChangedVisibleCount(Hi=>{z.setCount(Hi)})),this._register($i.onChangedCheckedCount(Hi=>{Y.setCount(Hi)})),this._register($i.onLeave(()=>{setTimeout(()=>{this.controller&&(P.setFocus(),this.controller instanceof Yye&&this.controller.canSelectMany&&$i.clearFocus())},0)}));const $t=zE(i);return this._register($t),this._register(en(i,br.FOCUS,Hi=>{const An=this.getUI();if(Am(Hi.relatedTarget,An.inputContainer)){const qt=An.inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==qt&&this.endOfQuickInputBoxContext.set(qt)}Am(Hi.relatedTarget,An.container)||(this.inQuickInputContext.set(!0),this.previousFocusElement=Mm(Hi.relatedTarget)?Hi.relatedTarget:void 0)},!0)),this._register($t.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(H$.Blur),this.inQuickInputContext.set(!1),this.endOfQuickInputBoxContext.set(!1),this.previousFocusElement=void 0})),this._register(P.onKeyDown(Hi=>{const An=this.getUI().inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==An&&this.endOfQuickInputBoxContext.set(An)})),this._register(en(i,br.FOCUS,Hi=>{P.setFocus()})),this._register(ph(i,br.KEY_DOWN,Hi=>{if(!Am(Hi.target,Mt))switch(Hi.keyCode){case 3:il.stop(Hi,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:il.stop(Hi,!0),this.hide(H$.Gesture);break;case 2:if(!Hi.altKey&&!Hi.ctrlKey&&!Hi.metaKey){const An=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(i.classList.contains("show-checkboxes")?An.push("input"):An.push("input[type=text]"),this.getUI().list.displayed&&An.push(".monaco-list"),this.getUI().message&&An.push(".quick-input-message a"),this.getUI().widget){if(Am(Hi.target,this.getUI().widget))break;An.push(".quick-input-html-widget")}const qt=i.querySelectorAll(An.join(", "));Hi.shiftKey&&Hi.target===qt[0]?(il.stop(Hi,!0),$i.clearFocus()):!Hi.shiftKey&&Am(Hi.target,qt[qt.length-1])&&(il.stop(Hi,!0),qt[0].focus())}break;case 10:Hi.ctrlKey&&(il.stop(Hi,!0),this.getUI().list.toggleHover());break}})),this.ui={container:i,styleSheet:n,leftActionBar:c,titleBar:s,title:d,description1:Yt,description2:x,widget:Mt,rightActionBar:f,inlineActionBar:ae,checkAll:v,inputContainer:w,filterContainer:I,inputBox:P,visibleCountContainer:O,visibleCount:z,countContainer:J,count:Y,okContainer:me,ok:ye,message:rt,customButtonContainer:Ce,customButton:Fe,list:$i,progressBar:ct,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:Hi=>this.show(Hi),hide:()=>this.hide(),setVisibilities:Hi=>this.setVisibilities(Hi),setEnabled:Hi=>this.setEnabled(Hi),setContextKey:Hi=>this.options.setContextKey(Hi),linkOpenerDelegate:Hi=>this.options.linkOpenerDelegate(Hi)},this.updateStyles(),this.ui}reparentUI(e){this.ui&&(this._container=e,jn(this._container,this.ui.container))}pick(e,i={},n=cc.None){return new Promise((s,c)=>{let d=x=>{var w;d=s,(w=i.onKeyMods)==null||w.call(i,f.keyMods),s(x)};if(n.isCancellationRequested){d(void 0);return}const f=this.createQuickPick({useSeparators:!0});let m;const v=[f,f.onDidAccept(()=>{if(f.canSelectMany)d(f.selectedItems.slice()),f.hide();else{const x=f.activeItems[0];x&&(d(x),f.hide())}}),f.onDidChangeActive(x=>{const w=x[0];w&&i.onDidFocus&&i.onDidFocus(w)}),f.onDidChangeSelection(x=>{if(!f.canSelectMany){const w=x[0];w&&(d(w),f.hide())}}),f.onDidTriggerItemButton(x=>i.onDidTriggerItemButton&&i.onDidTriggerItemButton({...x,removeItem:()=>{const w=f.items.indexOf(x.item);if(w!==-1){const I=f.items.slice(),P=I.splice(w,1),O=f.activeItems.filter(J=>J!==P[0]),z=f.keepScrollPosition;f.keepScrollPosition=!0,f.items=I,O&&(f.activeItems=O),f.keepScrollPosition=z}}})),f.onDidTriggerSeparatorButton(x=>{var w;return(w=i.onDidTriggerSeparatorButton)==null?void 0:w.call(i,x)}),f.onDidChangeValue(x=>{m&&!x&&(f.activeItems.length!==1||f.activeItems[0]!==m)&&(f.activeItems=[m])}),n.onCancellationRequested(()=>{f.hide()}),f.onDidHide(()=>{vd(v),d(void 0)})];f.title=i.title,i.value&&(f.value=i.value),f.canSelectMany=!!i.canPickMany,f.placeholder=i.placeHolder,f.ignoreFocusOut=!!i.ignoreFocusLost,f.matchOnDescription=!!i.matchOnDescription,f.matchOnDetail=!!i.matchOnDetail,f.matchOnLabel=i.matchOnLabel===void 0||i.matchOnLabel,f.quickNavigate=i.quickNavigate,f.hideInput=!!i.hideInput,f.contextKey=i.contextKey,f.busy=!0,Promise.all([e,i.activeItem]).then(([x,w])=>{m=w,f.busy=!1,f.items=x,f.canSelectMany&&(f.selectedItems=x.filter(I=>I.type!=="separator"&&I.picked)),m&&(f.activeItems=[m])}),f.show(),Promise.resolve(e).then(void 0,x=>{c(x),f.hide()})})}createQuickPick(e={useSeparators:!1}){const i=this.getUI(!0);return new Yye(i)}createInputBox(){const e=this.getUI(!0);return new Kbi(e)}show(e){const i=this.getUI(!0);this.onShowEmitter.fire();const n=this.controller;this.controller=e,n==null||n.didHide(),this.setEnabled(!0),i.leftActionBar.clear(),i.title.textContent="",i.description1.textContent="",i.description2.textContent="",o0(i.widget),i.rightActionBar.clear(),i.inlineActionBar.clear(),i.checkAll.checked=!1,i.inputBox.placeholder="",i.inputBox.password=!1,i.inputBox.showDecoration(S_.Ignore),i.visibleCount.setCount(0),i.count.setCount(0),o0(i.message),i.progressBar.stop(),i.list.setElements([]),i.list.matchOnDescription=!1,i.list.matchOnDetail=!1,i.list.matchOnLabel=!0,i.list.sortByLabel=!0,i.ignoreFocusOut=!1,i.inputBox.toggles=void 0;const s=this.options.backKeybindingLabel();hHe.tooltip=s?W("quickInput.backWithKeybinding","Back ({0})",s):W("quickInput.back","Back"),i.container.style.display="",this.updateLayout(),i.inputBox.setFocus(),this.quickInputTypeContext.set(e.type)}isVisible(){return!!this.ui&&this.ui.container.style.display!=="none"}setVisibilities(e){const i=this.getUI();i.title.style.display=e.title?"":"none",i.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",i.description2.style.display=e.description&&!(e.inputBox||e.checkAll)?"":"none",i.checkAll.style.display=e.checkAll?"":"none",i.inputContainer.style.display=e.inputBox?"":"none",i.filterContainer.style.display=e.inputBox?"":"none",i.visibleCountContainer.style.display=e.visibleCount?"":"none",i.countContainer.style.display=e.count?"":"none",i.okContainer.style.display=e.ok?"":"none",i.customButtonContainer.style.display=e.customButton?"":"none",i.message.style.display=e.message?"":"none",i.progressBar.getContainer().style.display=e.progressBar?"":"none",i.list.displayed=!!e.list,i.container.classList.toggle("show-checkboxes",!!e.checkBox),i.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const i of this.getUI().leftActionBar.viewItems)i.action.enabled=e;for(const i of this.getUI().rightActionBar.viewItems)i.action.enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().inputBox.enabled=e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var c;const i=this.controller;if(!i)return;i.willHide(e);const n=(c=this.ui)==null?void 0:c.container,s=n&&!k2t(n);if(this.controller=null,this.onHideEmitter.fire(),n&&(n.style.display="none"),!s){let d=this.previousFocusElement;for(;d&&!d.offsetParent;)d=d.parentElement??void 0;d!=null&&d.offsetParent?(d.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}i.didHide(e)}layout(e,i){this.dimension=e,this.titleBarOffset=i,this.updateLayout()}updateLayout(){if(this.ui&&this.isVisible()){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,i=Math.min(this.dimension.width*.62,THe.MAX_WIDTH);e.width=i+"px",e.marginLeft="-"+i/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:i,quickInputForeground:n,widgetBorder:s,widgetShadow:c}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e??"",this.ui.container.style.backgroundColor=i??"",this.ui.container.style.color=n??"",this.ui.container.style.border=s?`1px solid ${s}`:"",this.ui.container.style.boxShadow=c?`0 0 8px 2px ${c}`:"",this.ui.list.style(this.styles.list);const d=[];this.styles.pickerGroup.pickerGroupBorder&&d.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&d.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&d.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(d.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&d.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&d.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&d.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&d.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&d.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),d.push("}"));const f=d.join(`
+`);f!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=f)}}},THe=E9,E9.MAX_WIDTH=600,E9);DHe=THe=vSi([a9e(1,FR),a9e(2,ho),a9e(3,Ko)],DHe);var bSi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},jte=function(l,e){return function(i,n){e(i,n,l)}};let EHe=class extends f_i{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get currentQuickInput(){return this.controller.currentQuickInput}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(fHe))),this._quickAccess}constructor(e,i,n,s,c){super(n),this.instantiationService=e,this.contextKeyService=i,this.layoutService=s,this.configurationService=c,this._onShow=this._register(new gi),this._onHide=this._register(new gi),this.contexts=new Map}createController(e=this.layoutService,i){const n={idPrefix:"quickInput_",container:e.activeContainer,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:c=>this.setContextKey(c),linkOpenerDelegate:c=>{this.instantiationService.invokeFunction(d=>{d.get(Rb).open(c,{allowCommands:!0,fromUserGesture:!0})})},returnFocus:()=>e.focus(),styles:this.computeStyles(),hoverDelegate:this._register(this.instantiationService.createInstance(_He))},s=this._register(this.instantiationService.createInstance(DHe,{...n,...i}));return s.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop),this._register(e.onDidLayoutActiveContainer(c=>{Eo(e.activeContainer)===Eo(s.container)&&s.layout(c,e.activeContainerOffset.quickPickTop)})),this._register(e.onDidChangeActiveContainer(()=>{s.isVisible()||s.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop)})),this._register(s.onShow(()=>{this.resetContextKeys(),this._onShow.fire()})),this._register(s.onHide(()=>{this.resetContextKeys(),this._onHide.fire()})),s}setContextKey(e){let i;e&&(i=this.contexts.get(e),i||(i=new rs(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,i))),!(i&&i.get())&&(this.resetContextKeys(),i==null||i.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,i,n=cc.None){return this.controller.pick(e,i,n)}createQuickPick(e={useSeparators:!1}){return this.controller.createQuickPick(e)}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:cs(Lbt),quickInputForeground:cs(Emi),quickInputTitleBackground:cs(Imi),widgetBorder:cs(MTt),widgetShadow:cs(vJ)},inputBox:jye,toggle:Hye,countBadge:ODt,button:cyi,progressBar:lyi,keybindingLabel:ayi,list:iW({listBackground:Lbt,listFocusBackground:Zne,listFocusForeground:Qne,listInactiveFocusForeground:Qne,listInactiveSelectionIconForeground:W$e,listInactiveFocusBackground:Zne,listFocusOutline:yf,listInactiveFocusOutline:yf}),pickerGroup:{pickerGroupBorder:cs(Nmi),pickerGroupForeground:cs(qTt)}}}};EHe=bSi([jte(0,ho),jte(1,Ko),jte(2,im),jte(3,FR),jte(4,Cc)],EHe);var KEt=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},UF=function(l,e){return function(i,n){e(i,n,l)}};let IHe=class extends EHe{constructor(e,i,n,s,c,d){super(i,n,s,new KWe(e.getContainerDomNode(),c),d),this.host=void 0;const f=gre.get(e);if(f){const m=f.widget;this.host={_serviceBrand:void 0,get mainContainer(){return m.getDomNode()},getContainer(){return m.getDomNode()},whenContainerStylesLoaded(){},get containers(){return[m.getDomNode()]},get activeContainer(){return m.getDomNode()},get mainContainerDimension(){return e.getLayoutInfo()},get activeContainerDimension(){return e.getLayoutInfo()},get onDidLayoutMainContainer(){return e.onDidLayoutChange},get onDidLayoutActiveContainer(){return e.onDidLayoutChange},get onDidLayoutContainer(){return Tr.map(e.onDidLayoutChange,v=>({container:m.getDomNode(),dimension:v}))},get onDidChangeActiveContainer(){return Tr.None},get onDidAddContainer(){return Tr.None},get mainContainerOffset(){return{top:0,quickPickTop:0}},get activeContainerOffset(){return{top:0,quickPickTop:0}},focus:()=>e.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};IHe=KEt([UF(1,ho),UF(2,Ko),UF(3,im),UF(4,Bl),UF(5,Cc)],IHe);let NHe=class{get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let i=this.mapEditorToService.get(e);if(!i){const n=i=this.instantiationService.createInstance(IHe,e);this.mapEditorToService.set(e,i),gR(e.onDidDispose)(()=>{n.dispose(),this.mapEditorToService.delete(e)})}return i}get currentQuickInput(){return this.activeService.currentQuickInput}get quickAccess(){return this.activeService.quickAccess}constructor(e,i){this.instantiationService=e,this.codeEditorService=i,this.mapEditorToService=new Map}pick(e,i,n=cc.None){return this.activeService.pick(e,i,n)}createQuickPick(e={useSeparators:!1}){return this.activeService.createQuickPick(e)}createInputBox(){return this.activeService.createInputBox()}};NHe=KEt([UF(0,ho),UF(1,Bl)],NHe);const mCe=class mCe{static get(e){return e.getContribution(mCe.ID)}constructor(e){this.editor=e,this.widget=new LHe(this.editor)}dispose(){this.widget.dispose()}};mCe.ID="editor.controller.quickInput";let gre=mCe;const gCe=class gCe{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return gCe.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}};gCe.ID="editor.contrib.quickInputWidget";let LHe=gCe;Cl(gre.ID,gre,4);class CSi{constructor(e,i,n,s,c){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=i,this.fontStyle=n,this.foreground=s,this.background=c}}function SSi(l){if(!l||!Array.isArray(l))return[];const e=[];let i=0;for(let n=0,s=l.length;n<s;n++){const c=l[n];let d=-1;if(typeof c.fontStyle=="string"){d=0;const v=c.fontStyle.split(" ");for(let x=0,w=v.length;x<w;x++)switch(v[x]){case"italic":d=d|1;break;case"bold":d=d|2;break;case"underline":d=d|4;break;case"strikethrough":d=d|8;break}}let f=null;typeof c.foreground=="string"&&(f=c.foreground);let m=null;typeof c.background=="string"&&(m=c.background),e[i++]=new CSi(c.token||"",n,d,f,m)}return e}function wSi(l,e){l.sort((x,w)=>{const I=ESi(x.token,w.token);return I!==0?I:x.index-w.index});let i=0,n="000000",s="ffffff";for(;l.length>=1&&l[0].token==="";){const x=l.shift();x.fontStyle!==-1&&(i=x.fontStyle),x.foreground!==null&&(n=x.foreground),x.background!==null&&(s=x.background)}const c=new kSi;for(const x of e)c.getId(x);const d=c.getId(n),f=c.getId(s),m=new WJe(i,d,f),v=new VJe(m);for(let x=0,w=l.length;x<w;x++){const I=l[x];v.insert(I.token,I.fontStyle,c.getId(I.foreground),c.getId(I.background))}return new XEt(c,v)}const xSi=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class kSi{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(e===null)return 0;const i=e.match(xSi);if(!i)throw new Error("Illegal value for token color: "+e);e=i[1].toUpperCase();let n=this._color2id.get(e);return n||(n=++this._lastColorId,this._color2id.set(e,n),this._id2color[n]=In.fromHex("#"+e),n)}getColorMap(){return this._id2color.slice(0)}}class XEt{static createFromRawTokenTheme(e,i){return this.createFromParsedTokenTheme(SSi(e),i)}static createFromParsedTokenTheme(e,i){return wSi(e,i)}constructor(e,i){this._colorMap=e,this._root=i,this._cache=new Map}getColorMap(){return this._colorMap.getColorMap()}_match(e){return this._root.match(e)}match(e,i){let n=this._cache.get(i);if(typeof n>"u"){const s=this._match(i),c=DSi(i);n=(s.metadata|c<<8)>>>0,this._cache.set(i,n)}return(n|e<<0)>>>0}}const TSi=/\b(comment|string|regex|regexp)\b/;function DSi(l){const e=l.match(TSi);if(!e)return 0;switch(e[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"regexp":return 3}throw new Error("Unexpected match for standard token type!")}function ESi(l,e){return l<e?-1:l>e?1:0}class WJe{constructor(e,i,n){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=i,this._background=n,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new WJe(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,i,n){e!==-1&&(this._fontStyle=e),i!==0&&(this._foreground=i),n!==0&&(this._background=n),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class VJe{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(e==="")return this._mainRule;const i=e.indexOf(".");let n,s;i===-1?(n=e,s=""):(n=e.substring(0,i),s=e.substring(i+1));const c=this._children.get(n);return typeof c<"u"?c.match(s):this._mainRule}insert(e,i,n,s){if(e===""){this._mainRule.acceptOverwrite(i,n,s);return}const c=e.indexOf(".");let d,f;c===-1?(d=e,f=""):(d=e.substring(0,c),f=e.substring(c+1));let m=this._children.get(d);typeof m>"u"&&(m=new VJe(this._mainRule.clone()),this._children.set(d,m)),m.insert(f,i,n,s)}}function ISi(l){const e=[];for(let i=1,n=l.length;i<n;i++){const s=l[i];e[i]=`.mtk${i} { color: ${s}; }`}return e.push(".mtki { font-style: italic; }"),e.push(".mtkb { font-weight: bold; }"),e.push(".mtku { text-decoration: underline; text-underline-position: under; }"),e.push(".mtks { text-decoration: line-through; }"),e.push(".mtks.mtku { text-decoration: underline line-through; text-underline-position: under; }"),e.join(`
+`)}const NSi={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[wT]:"#FFFFFE",[HL]:"#000000",[ATt]:"#E5EBF1",[Nse]:"#D3D3D3",[Lse]:"#939393",[A$e]:"#ADD6FF4D"}},LSi={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[wT]:"#1E1E1E",[HL]:"#D4D4D4",[ATt]:"#3A3D41",[Nse]:"#404040",[Lse]:"#707070",[A$e]:"#ADD6FF26"}},PSi={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[wT]:"#000000",[HL]:"#FFFFFF",[Nse]:"#FFFFFF",[Lse]:"#FFFFFF"}},ASi={base:"hc-light",inherit:!1,rules:[{token:"",foreground:"292929",background:"FFFFFF"},{token:"invalid",foreground:"B5200D"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"264F70"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"B5200D"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"264F78"},{token:"attribute.value",foreground:"0451A5"},{token:"string",foreground:"A31515"},{token:"string.sql",foreground:"B5200D"},{token:"keyword",foreground:"0000FF"},{token:"keyword.flow",foreground:"AF00DB"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[wT]:"#FFFFFF",[HL]:"#292929",[Nse]:"#292929",[Lse]:"#292929"}},OSi={IconContribution:"base.contributions.icons"};var sSt;(function(l){function e(i,n){let s=i.defaults;for(;zo.isThemeIcon(s);){const c=sW.getIcon(s.id);if(!c)return;s=c.defaults}return s}l.getDefinition=e})(sSt||(sSt={}));var oSt;(function(l){function e(n){return{weight:n.weight,style:n.style,src:n.src.map(s=>({format:s.format,location:s.location.toString()}))}}l.toJSONObject=e;function i(n){const s=c=>Eb(c)?c:void 0;if(n&&Array.isArray(n.src)&&n.src.every(c=>Eb(c.format)&&Eb(c.location)))return{weight:s(n.weight),style:s(n.style),src:n.src.map(c=>({format:c.format,location:yo.parse(c.location)}))}}l.fromJSONObject=i})(oSt||(oSt={}));class MSi{constructor(){this._onDidChange=new gi,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:W("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:W("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${zo.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,i,n,s){const c=this.iconsById[e];if(c){if(n&&!c.description){c.description=n,this.iconSchema.properties[e].markdownDescription=`${n} $(${e})`;const m=this.iconReferenceSchema.enum.indexOf(e);m!==-1&&(this.iconReferenceSchema.enumDescriptions[m]=n),this._onDidChange.fire()}return c}const d={id:e,description:n,defaults:i,deprecationMessage:s};this.iconsById[e]=d;const f={$ref:"#/definitions/icons"};return s&&(f.deprecationMessage=s),n&&(f.markdownDescription=`${n}: $(${e})`),this.iconSchema.properties[e]=f,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(n||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map(e=>this.iconsById[e])}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){const e=(c,d)=>c.id.localeCompare(d.id),i=c=>{for(;zo.isThemeIcon(c.defaults);)c=this.iconsById[c.defaults.id];return`codicon codicon-${c?c.id:""}`},n=[];n.push("| preview | identifier | default codicon ID | description"),n.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const s=Object.keys(this.iconsById).map(c=>this.iconsById[c]);for(const c of s.filter(d=>!!d.description).sort(e))n.push(`|<i class="${i(c)}"></i>|${c.id}|${zo.isThemeIcon(c.defaults)?c.defaults.id:c.id}|${c.description||""}|`);n.push("| preview | identifier "),n.push("| ----------- | --------------------------------- |");for(const c of s.filter(d=>!zo.isThemeIcon(d.defaults)).sort(e))n.push(`|<i class="${i(c)}"></i>|${c.id}|`);return n.join(`
+`)}}const sW=new MSi;nh.add(OSi.IconContribution,sW);function sf(l,e,i,n){return sW.registerIcon(l,e,i,n)}function QEt(){return sW}function RSi(){const l=Jkt();for(const e in l){const i="\\"+l[e].toString(16);sW.registerIcon(e,{fontCharacter:i})}}RSi();const ZEt="vscode://schemas/icons",YEt=nh.as(KSe.JSONContribution);YEt.registerSchema(ZEt,sW.getIconSchema());const aSt=new qu(()=>YEt.notifySchemaChanged(ZEt),200);sW.onDidChange(()=>{aSt.isScheduled()||aSt.schedule()});const eIt=sf("widget-close",pr.close,W("widgetClose","Icon for the close action in widgets."));sf("goto-previous-location",pr.arrowUp,W("previousChangeIcon","Icon for goto previous editor location."));sf("goto-next-location",pr.arrowDown,W("nextChangeIcon","Icon for goto next editor location."));zo.modify(pr.sync,"spin");zo.modify(pr.loading,"spin");function FSi(l){const e=new wn,i=e.add(new gi),n=QEt();return e.add(n.onDidChange(()=>i.fire())),l&&e.add(l.onDidProductIconThemeChange(()=>i.fire())),{dispose:()=>e.dispose(),onDidChange:i.event,getCSS(){const s=l?l.getProductIconTheme():new tIt,c={},d=[],f=[];for(const m of n.getIcons()){const v=s.getIcon(m);if(!v)continue;const x=v.font,w=`--vscode-icon-${m.id}-font-family`,I=`--vscode-icon-${m.id}-content`;x?(c[x.id]=x.definition,f.push(`${w}: ${hFe(x.id)};`,`${I}: '${v.fontCharacter}';`),d.push(`.codicon-${m.id}:before { content: '${v.fontCharacter}'; font-family: ${hFe(x.id)}; }`)):(f.push(`${I}: '${v.fontCharacter}'; ${w}: 'codicon';`),d.push(`.codicon-${m.id}:before { content: '${v.fontCharacter}'; }`))}for(const m in c){const v=c[m],x=v.weight?`font-weight: ${v.weight};`:"",w=v.style?`font-style: ${v.style};`:"",I=v.src.map(P=>`${l6(P.location)} format('${P.format}')`).join(", ");d.push(`@font-face { src: ${I}; font-family: ${hFe(m)};${x}${w} font-display: block; }`)}return d.push(`:root { ${f.join(" ")} }`),d.join(`
+`)}}}class tIt{getIcon(e){const i=QEt();let n=e.defaults;for(;zo.isThemeIcon(n);){const s=i.getIcon(n.id);if(!s)return;n=s.defaults}return n}}const M4="vs",e$="vs-dark",v9="hc-black",b9="hc-light",iIt=nh.as(DTt.ColorContribution),BSi=nh.as(dTt.ThemingContribution);class nIt{constructor(e,i){this.semanticHighlighting=!1,this.themeData=i;const n=i.base;e.length>0?(w1e(e)?this.id=e:this.id=n+" "+e,this.themeName=e):(this.id=n,this.themeName=n),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const i in this.themeData.colors)e.set(i,In.fromHex(this.themeData.colors[i]));if(this.themeData.inherit){const i=PHe(this.themeData.base);for(const n in i.colors)e.has(n)||e.set(n,In.fromHex(i.colors[n]))}this.colors=e}return this.colors}getColor(e,i){const n=this.getColors().get(e);if(n)return n;if(i!==!1)return this.getDefault(e)}getDefault(e){let i=this.defaultColors[e];return i||(i=iIt.resolveDefaultColor(e,this),this.defaultColors[e]=i,i)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case M4:return pk.LIGHT;case v9:return pk.HIGH_CONTRAST_DARK;case b9:return pk.HIGH_CONTRAST_LIGHT;default:return pk.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],i=[];if(this.themeData.inherit){const c=PHe(this.themeData.base);e=c.rules,c.encodedTokensColors&&(i=c.encodedTokensColors)}const n=this.themeData.colors["editor.foreground"],s=this.themeData.colors["editor.background"];if(n||s){const c={token:""};n&&(c.foreground=n),s&&(c.background=s),e.push(c)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(i=this.themeData.encodedTokensColors),this._tokenTheme=XEt.createFromRawTokenTheme(e,i)}return this._tokenTheme}getTokenStyleMetadata(e,i,n){const c=this.tokenTheme._match([e].concat(i).join(".")).metadata,d=kb.getForeground(c),f=kb.getFontStyle(c);return{foreground:d,italic:!!(f&1),bold:!!(f&2),underline:!!(f&4),strikethrough:!!(f&8)}}}function w1e(l){return l===M4||l===e$||l===v9||l===b9}function PHe(l){switch(l){case M4:return NSi;case e$:return LSi;case v9:return PSi;case b9:return ASi}}function b0e(l){const e=PHe(l);return new nIt(l,e)}class WSi extends xi{constructor(){super(),this._onColorThemeChange=this._register(new gi),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new gi),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new tIt,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(M4,b0e(M4)),this._knownThemes.set(e$,b0e(e$)),this._knownThemes.set(v9,b0e(v9)),this._knownThemes.set(b9,b0e(b9));const e=this._register(FSi(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}
+${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(M4),this._onOSSchemeChanged(),this._register(e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),o2t(cd,"(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return cye(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=Dw(void 0,e=>{e.className="monaco-colors",e.textContent=this._allCSS}),this._styleElements.push(this._globalStyleElement)),xi.None}_registerShadowDomContainer(e){const i=Dw(e,n=>{n.className="monaco-colors",n.textContent=this._allCSS});return this._styleElements.push(i),{dispose:()=>{for(let n=0;n<this._styleElements.length;n++)if(this._styleElements[n]===i){this._styleElements.splice(n,1);return}}}}defineTheme(e,i){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!w1e(i.base)&&!w1e(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new nIt(e,i)),w1e(e)&&this._knownThemes.forEach(n=>{n.base===e&&n.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let i;this._knownThemes.has(e)?i=this._knownThemes.get(e):i=this._knownThemes.get(M4),this._updateActualTheme(i)}_updateActualTheme(e){!e||this._theme===e||(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=cd.matchMedia("(forced-colors: active)").matches;if(e!==RE(this._theme.type)){let i;I$(this._theme.type)?i=e?v9:e$:i=e?b9:M4,this._updateActualTheme(this._knownThemes.get(i))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],i={},n={addRule:d=>{i[d]||(e.push(d),i[d]=!0)}};BSi.getThemingParticipants().forEach(d=>d(this._theme,n,this._environment));const s=[];for(const d of iIt.getColors()){const f=this._theme.getColor(d.id,!0);f&&s.push(`${N$e(d.id)}: ${f.toString()};`)}n.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${s.join(`
+`)} }`);const c=this._colorMapOverride||this._theme.tokenTheme.getColorMap();n.addRule(ISi(c)),this._themeCSS=e.join(`
+`),this._updateCSS(),Oh.setColorMap(c),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}
+${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}const Mw=jc("themeService");var VSi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},c9e=function(l,e){return function(i,n){e(i,n,l)}};let AHe=class extends xi{constructor(e,i,n){super(),this._contextKeyService=e,this._layoutService=i,this._configurationService=n,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new gi,this._onDidChangeReducedMotion=new gi,this._onDidChangeLinkUnderline=new gi,this._accessibilityModeEnabledContext=Cse.bindTo(this._contextKeyService);const s=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(d=>{d.affectsConfiguration("editor.accessibilitySupport")&&(s(),this._onDidChangeScreenReaderOptimized.fire()),d.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),s(),this._register(this.onDidChangeScreenReaderOptimized(()=>s()));const c=cd.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=c.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._linkUnderlinesEnabled=this._configurationService.getValue("accessibility.underlineLinks"),this.initReducedMotionListeners(c),this.initLinkUnderlineListeners()}initReducedMotionListeners(e){this._register(en(e,"change",()=>{this._systemMotionReduced=e.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));const i=()=>{const n=this.isMotionReduced();this._layoutService.mainContainer.classList.toggle("reduce-motion",n),this._layoutService.mainContainer.classList.toggle("enable-motion",!n)};i(),this._register(this.onDidChangeReducedMotion(()=>i()))}initLinkUnderlineListeners(){this._register(this._configurationService.onDidChangeConfiguration(i=>{if(i.affectsConfiguration("accessibility.underlineLinks")){const n=this._configurationService.getValue("accessibility.underlineLinks");this._linkUnderlinesEnabled=n,this._onDidChangeLinkUnderline.fire()}}));const e=()=>{const i=this._linkUnderlinesEnabled;this._layoutService.mainContainer.classList.toggle("underline-links",i)};e(),this._register(this.onDidChangeLinkUnderlines(()=>e()))}onDidChangeLinkUnderlines(e){return this._onDidChangeLinkUnderline.event(e)}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return e==="on"||e==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const e=this._configMotionReduced;return e==="on"||e==="auto"&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};AHe=VSi([c9e(0,Ko),c9e(1,FR),c9e(2,Cc)],AHe);var Iwe=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},DL=function(l,e){return function(i,n){e(i,n,l)}},qU,lie;let OHe=class{constructor(e,i,n){this._commandService=e,this._keybindingService=i,this._hiddenStates=new MHe(n)}createMenu(e,i,n){return new _ve(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...n},this._commandService,this._keybindingService,i)}getMenuActions(e,i,n){const s=new _ve(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...n},this._commandService,this._keybindingService,i),c=s.getActions(n);return s.dispose(),c}resetHiddenStates(e){this._hiddenStates.reset(e)}};OHe=Iwe([DL(0,qd),DL(1,pu),DL(2,ET)],OHe);var I9;let MHe=(I9=class{constructor(e){this._storageService=e,this._disposables=new wn,this._onDidChange=new gi,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const i=e.get(qU._key,0,"{}");this._data=JSON.parse(i)}catch{this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,qU._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{const i=e.get(qU._key,0,"{}");this._data=JSON.parse(i)}catch(i){console.log("FAILED to read storage after UPDATE",i)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,i){return this._hiddenByDefaultCache.get(`${e.id}/${i}`)??!1}setDefaultState(e,i,n){this._hiddenByDefaultCache.set(`${e.id}/${i}`,n)}isHidden(e,i){var c;const n=this._isHiddenByDefault(e,i),s=((c=this._data[e.id])==null?void 0:c.includes(i))??!1;return n?!s:s}updateHidden(e,i,n){this._isHiddenByDefault(e,i)&&(n=!n);const c=this._data[e.id];if(n)c?c.indexOf(i)<0&&c.push(i):this._data[e.id]=[i];else if(c){const d=c.indexOf(i);d>=0&&Oai(c,d),c.length===0&&delete this._data[e.id]}this._persist()}reset(e){if(e===void 0)this._data=Object.create(null),this._persist();else{for(const{id:i}of e)this._data[i]&&delete this._data[i];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const e=JSON.stringify(this._data);this._storageService.store(qU._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}},qU=I9,I9._key="menu.hiddenCommands",I9);MHe=qU=Iwe([DL(0,ET)],MHe);class Bie{constructor(e,i){this._id=e,this._collectContextKeysForSubmenus=i,this._menuGroups=[],this._allMenuIds=new Set,this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get allMenuIds(){return this._allMenuIds}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._allMenuIds.clear(),this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();const e=this._sort(yg.getMenuItems(this._id));let i;for(const n of e){const s=n.group||"";(!i||i[0]!==s)&&(i=[s,[]],this._menuGroups.push(i)),i[1].push(n),this._collectContextKeysAndSubmenuIds(n)}this._allMenuIds.add(this._id)}_sort(e){return e}_collectContextKeysAndSubmenuIds(e){if(Bie._fillInKbExprKeys(e.when,this._structureContextKeys),jq(e)){if(e.command.precondition&&Bie._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){const i=e.command.toggled.condition||e.command.toggled;Bie._fillInKbExprKeys(i,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&(yg.getMenuItems(e.submenu).forEach(this._collectContextKeysAndSubmenuIds,this),this._allMenuIds.add(e.submenu))}static _fillInKbExprKeys(e,i){if(e)for(const n of e.keys())i.add(n)}}let RHe=lie=class extends Bie{constructor(e,i,n,s,c,d){super(e,n),this._hiddenStates=i,this._commandService=s,this._keybindingService=c,this._contextKeyService=d,this.refresh()}createActionGroups(e){const i=[];for(const n of this._menuGroups){const[s,c]=n;let d;for(const f of c)if(this._contextKeyService.contextMatchesRules(f.when)){const m=jq(f);m&&this._hiddenStates.setDefaultState(this._id,f.command.id,!!f.isHiddenByDefault);const v=HSi(this._id,m?f.command:f,this._hiddenStates);if(m){const x=rIt(this._commandService,this._keybindingService,f.command.id,f.when);(d??(d=[])).push(new JC(f.command,f.alt,e,v,x,this._contextKeyService,this._commandService))}else{const x=new lie(f.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._keybindingService,this._contextKeyService).createActionGroups(e),w=Rm.join(...x.map(I=>I[1]));w.length>0&&(d??(d=[])).push(new zq(f,v,w))}}d&&d.length>0&&i.push([s,d])}return i}_sort(e){return e.sort(lie._compareMenuItems)}static _compareMenuItems(e,i){const n=e.group,s=i.group;if(n!==s){if(n){if(!s)return-1}else return 1;if(n==="navigation")return-1;if(s==="navigation")return 1;const f=n.localeCompare(s);if(f!==0)return f}const c=e.order||0,d=i.order||0;return c<d?-1:c>d?1:lie._compareTitles(jq(e)?e.command.title:e.title,jq(i)?i.command.title:i.title)}static _compareTitles(e,i){const n=typeof e=="string"?e:e.original,s=typeof i=="string"?i:i.original;return n.localeCompare(s)}};RHe=lie=Iwe([DL(3,qd),DL(4,pu),DL(5,Ko)],RHe);let _ve=class{constructor(e,i,n,s,c,d){this._disposables=new wn,this._menuInfo=new RHe(e,i,n.emitEventsForSubmenuChanges,s,c,d);const f=new qu(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},n.eventDebounceDelay);this._disposables.add(f),this._disposables.add(yg.onDidChangeMenu(w=>{for(const I of this._menuInfo.allMenuIds)if(w.has(I)){f.schedule();break}}));const m=this._disposables.add(new wn),v=w=>{let I=!1,P=!1,O=!1;for(const z of w)if(I=I||z.isStructuralChange,P=P||z.isEnablementChange,O=O||z.isToggleChange,I&&P&&O)break;return{menu:this,isStructuralChange:I,isEnablementChange:P,isToggleChange:O}},x=()=>{m.add(d.onDidChangeContext(w=>{const I=w.affectsSome(this._menuInfo.structureContextKeys),P=w.affectsSome(this._menuInfo.preconditionContextKeys),O=w.affectsSome(this._menuInfo.toggledContextKeys);(I||P||O)&&this._onDidChange.fire({menu:this,isStructuralChange:I,isEnablementChange:P,isToggleChange:O})})),m.add(i.onDidChange(w=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new Fkt({onWillAddFirstListener:x,onDidRemoveLastListener:m.clear.bind(m),delay:n.eventDebounceDelay,merge:v}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};_ve=Iwe([DL(3,qd),DL(4,pu),DL(5,Ko)],_ve);function HSi(l,e,i){const n=Gdi(e)?e.submenu.id:e.id,s=typeof e.title=="string"?e.title:e.title.value,c=_9({id:`hide/${l.id}/${n}`,label:W("hide.label","Hide '{0}'",s),run(){i.updateHidden(l,n,!0)}}),d=_9({id:`toggle/${l.id}/${n}`,label:s,get checked(){return!i.isHidden(l,n)},run(){i.updateHidden(l,n,!!this.checked)}});return{hide:c,toggle:d,get isHidden(){return!d.checked}}}function rIt(l,e,i,n=void 0,s=!0){return _9({id:`configureKeybinding/${i}`,label:W("configure keybinding","Configure Keybinding"),enabled:s,run(){const d=!!!e.lookupKeybinding(i)&&n?n.serialize():void 0;l.executeCommand("workbench.action.openGlobalKeybindings",`@command:${i}`+(d?` +when:${d}`:""))}})}var jSi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},cSt=function(l,e){return function(i,n){e(i,n,l)}},FHe;const lSt="application/vnd.code.resources";var N9;let BHe=(N9=class extends xi{constructor(e,i){super(),this.layoutService=e,this.logService=i,this.mapTextToType=new Map,this.findText="",this.resources=[],this.resourcesStateHash=void 0,(o6||a2t)&&this.installWebKitWriteTextWorkaround(),this._register(Tr.runAndSubscribe(OSe,({window:n,disposables:s})=>{s.add(en(n.document,"copy",()=>this.clearResourcesState()))},{window:cd,disposables:this._store}))}installWebKitWriteTextWorkaround(){const e=()=>{const i=new hJ;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=i,eie().navigator.clipboard.write([new ClipboardItem({"text/plain":i.p})]).catch(async n=>{(!(n instanceof Error)||n.name!=="NotAllowedError"||!i.isRejected)&&this.logService.error(n)})};this._register(Tr.runAndSubscribe(this.layoutService.onDidAddContainer,({container:i,disposables:n})=>{n.add(en(i,"click",e)),n.add(en(i,"keydown",e))},{container:this.layoutService.mainContainer,disposables:this._store}))}async writeText(e,i){if(this.clearResourcesState(),i){this.mapTextToType.set(i,e);return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return await eie().navigator.clipboard.writeText(e)}catch(n){console.error(n)}this.fallbackWriteText(e)}fallbackWriteText(e){const i=_J(),n=i.activeElement,s=i.body.appendChild(Cr("textarea",{"aria-hidden":!0}));s.style.height="1px",s.style.width="1px",s.style.position="absolute",s.value=e,s.focus(),s.select(),i.execCommand("copy"),Mm(n)&&n.focus(),s.remove()}async readText(e){if(e)return this.mapTextToType.get(e)||"";try{return await eie().navigator.clipboard.readText()}catch(i){console.error(i)}return""}async readFindText(){return this.findText}async writeFindText(e){this.findText=e}async readResources(){try{const i=await eie().navigator.clipboard.read();for(const n of i)if(n.types.includes(`web ${lSt}`)){const s=await n.getType(`web ${lSt}`);return JSON.parse(await s.text()).map(d=>yo.from(d))}}catch{}const e=await this.computeResourcesStateHash();return this.resourcesStateHash!==e&&this.clearResourcesState(),this.resources}async computeResourcesStateHash(){if(this.resources.length===0)return;const e=await this.readText();return PSe(e.substring(0,FHe.MAX_RESOURCE_STATE_SOURCE_LENGTH))}clearInternalState(){this.clearResourcesState()}clearResourcesState(){this.resources=[],this.resourcesStateHash=void 0}},FHe=N9,N9.MAX_RESOURCE_STATE_SOURCE_LENGTH=1e3,N9);BHe=FHe=jSi([cSt(0,FR),cSt(1,N0)],BHe);const w6=jc("clipboardService");var zSi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},USi=function(l,e){return function(i,n){e(i,n,l)}};const Wie="data-keybinding-context";let HJe=class{constructor(e,i){this._id=e,this._parent=i,this._value=Object.create(null),this._value._contextId=e}get value(){return{...this._value}}setValue(e,i){return this._value[e]!==i?(this._value[e]=i,!0):!1}removeValue(e){return e in this._value?(delete this._value[e],!0):!1}getValue(e){const i=this._value[e];return typeof i>"u"&&this._parent?this._parent.getValue(e):i}};const yCe=class yCe extends HJe{constructor(){super(-1,null)}setValue(e,i){return!1}removeValue(e){return!1}getValue(e){}};yCe.INSTANCE=new yCe;let z$=yCe;const mne=class mne extends HJe{constructor(e,i,n){super(e,null),this._configurationService=i,this._values=Jq.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(s=>{if(s.source===7){const c=Array.from(this._values,([d])=>d);this._values.clear(),n.fire(new dSt(c))}else{const c=[];for(const d of s.affectedKeys){const f=`config.${d}`,m=this._values.findSuperstr(f);m!==void 0&&(c.push(...dl.map(m,([v])=>v)),this._values.deleteSuperstr(f)),this._values.has(f)&&(c.push(f),this._values.delete(f))}n.fire(new dSt(c))}})}dispose(){this._listener.dispose()}getValue(e){if(e.indexOf(mne._keyPrefix)!==0)return super.getValue(e);if(this._values.has(e))return this._values.get(e);const i=e.substr(mne._keyPrefix.length),n=this._configurationService.getValue(i);let s;switch(typeof n){case"number":case"boolean":case"string":s=n;break;default:Array.isArray(n)?s=JSON.stringify(n):s=n}return this._values.set(e,s),s}setValue(e,i){return super.setValue(e,i)}removeValue(e){return super.removeValue(e)}};mne._keyPrefix="config.";let WHe=mne;class qSi{constructor(e,i,n){this._service=e,this._key=i,this._defaultValue=n,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){typeof this._defaultValue>"u"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class uSt{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}}class dSt{constructor(e){this.keys=e}affectsSome(e){for(const i of this.keys)if(e.has(i))return!0;return!1}allKeysContainedIn(e){return this.keys.every(i=>e.has(i))}}class $Si{constructor(e){this.events=e}affectsSome(e){for(const i of this.events)if(i.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every(i=>i.allKeysContainedIn(e))}}function JSi(l,e){return l.allKeysContainedIn(new Set(Object.keys(e)))}class sIt extends xi{constructor(e){super(),this._onDidChangeContext=this._register(new CB({merge:i=>new $Si(i)})),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,i){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new qSi(this,e,i)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new GSi(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const i=this.getContextValuesContainer(this._myContextId);return e?e.evaluate(i):!0}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,i){if(this._isDisposed)return;const n=this.getContextValuesContainer(this._myContextId);n&&n.setValue(e,i)&&this._onDidChangeContext.fire(new uSt(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new uSt(e))}getContext(e){return this._isDisposed?z$.INSTANCE:this.getContextValuesContainer(KSi(e))}dispose(){super.dispose(),this._isDisposed=!0}}let VHe=class extends sIt{constructor(e){super(0),this._contexts=new Map,this._lastContextId=0;const i=this._register(new WHe(this._myContextId,e,this._onDidChangeContext));this._contexts.set(this._myContextId,i)}getContextValuesContainer(e){return this._isDisposed?z$.INSTANCE:this._contexts.get(e)||z$.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const i=++this._lastContextId;return this._contexts.set(i,new HJe(i,this.getContextValuesContainer(e))),i}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};VHe=zSi([USi(0,Cc)],VHe);class GSi extends sIt{constructor(e,i){if(super(e.createChildContext()),this._parentChangeListener=this._register(new Fm),this._parent=e,this._updateParentChangeListener(),this._domNode=i,this._domNode.hasAttribute(Wie)){let n="";this._domNode.classList&&(n=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${n?": "+n:""}`)}this._domNode.setAttribute(Wie,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(e=>{const n=this._parent.getContextValuesContainer(this._myContextId).value;JSi(e,n)||this._onDidChangeContext.fire(e)})}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(Wie),super.dispose())}getContextValuesContainer(e){return this._isDisposed?z$.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}function KSi(l){for(;l;){if(l.hasAttribute(Wie)){const e=l.getAttribute(Wie);return e?parseInt(e,10):NaN}l=l.parentElement}return 0}function XSi(l,e,i){l.get(Ko).createKey(String(e),QSi(i))}function QSi(l){return wkt(l,e=>{if(typeof e=="object"&&e.$mid===1)return yo.revive(e).toString();if(e instanceof yo)return e.toString()})}fl.registerCommand("_setContext",XSi);fl.registerCommand({id:"getContextKeyInfo",handler(){return[...rs.all()].sort((l,e)=>l.key.localeCompare(e.key))},metadata:{description:W("getContextKeyInfo","A command that returns information about context keys"),args:[]}});fl.registerCommand("_generateContextKeyInfo",function(){const l=[],e=new Set;for(const i of rs.all())e.has(i.key)||(e.add(i.key),l.push(i));l.sort((i,n)=>i.key.localeCompare(n.key)),console.log(JSON.stringify(l,void 0,2))});let ZSi=class{constructor(e,i){this.key=e,this.data=i,this.incoming=new Map,this.outgoing=new Map}};class fSt{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(const i of this._nodes.values())i.outgoing.size===0&&e.push(i);return e}insertEdge(e,i){const n=this.lookupOrInsertNode(e),s=this.lookupOrInsertNode(i);n.outgoing.set(s.key,s),s.incoming.set(n.key,n)}removeNode(e){const i=this._hashFn(e);this._nodes.delete(i);for(const n of this._nodes.values())n.outgoing.delete(i),n.incoming.delete(i)}lookupOrInsertNode(e){const i=this._hashFn(e);let n=this._nodes.get(i);return n||(n=new ZSi(i,e),this._nodes.set(i,n)),n}isEmpty(){return this._nodes.size===0}toString(){const e=[];for(const[i,n]of this._nodes)e.push(`${i}
+ (-> incoming)[${[...n.incoming.keys()].join(", ")}]
+ (outgoing ->)[${[...n.outgoing.keys()].join(",")}]
+`);return e.join(`
+`)}findCycleSlow(){for(const[e,i]of this._nodes){const n=new Set([e]),s=this._findCycle(i,n);if(s)return s}}_findCycle(e,i){for(const[n,s]of e.outgoing){if(i.has(n))return[...i,n].join(" -> ");i.add(n);const c=this._findCycle(s,i);if(c)return c;i.delete(n)}}}class IJ{constructor(...e){this._entries=new Map;for(const[i,n]of e)this.set(i,n)}set(e,i){const n=this._entries.get(e);return this._entries.set(e,i),n}get(e){return this._entries.get(e)}}const YSi=!1;class hSt extends Error{constructor(e){super("cyclic dependency between services"),this.message=e.findCycleSlow()??`UNABLE to detect cycle, dumping graph:
+${e.toString()}`}}class pve{constructor(e=new IJ,i=!1,n,s=YSi){this._services=e,this._strict=i,this._parent=n,this._enableTracing=s,this._isDisposed=!1,this._servicesToMaybeDispose=new Set,this._children=new Set,this._activeInstantiations=new Set,this._services.set(ho,this),this._globalGraph=s?(n==null?void 0:n._globalGraph)??new fSt(c=>c):void 0}dispose(){if(!this._isDisposed){this._isDisposed=!0,vd(this._children),this._children.clear();for(const e of this._servicesToMaybeDispose)ESe(e)&&e.dispose();this._servicesToMaybeDispose.clear()}}_throwIfDisposed(){if(this._isDisposed)throw new Error("InstantiationService has been disposed")}createChild(e,i){this._throwIfDisposed();const n=this,s=new class extends pve{dispose(){n._children.delete(s),super.dispose()}}(e,this._strict,this,this._enableTracing);return this._children.add(s),i==null||i.add(s),s}invokeFunction(e,...i){this._throwIfDisposed();const n=Vie.traceInvocation(this._enableTracing,e);let s=!1;try{return e({get:d=>{if(s)throw $qe("service accessor is only valid during the invocation of its target method");const f=this._getOrCreateServiceInstance(d,n);if(!f)throw new Error(`[invokeFunction] unknown service '${d}'`);return f}},...i)}finally{s=!0,n.stop()}}createInstance(e,...i){this._throwIfDisposed();let n,s;return e instanceof wE?(n=Vie.traceCreation(this._enableTracing,e.ctor),s=this._createInstance(e.ctor,e.staticArguments.concat(i),n)):(n=Vie.traceCreation(this._enableTracing,e),s=this._createInstance(e,i,n)),n.stop(),s}_createInstance(e,i=[],n){const s=IE.getServiceDependencies(e).sort((f,m)=>f.index-m.index),c=[];for(const f of s){const m=this._getOrCreateServiceInstance(f.id,n);m||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${f.id}.`,!1),c.push(m)}const d=s.length>0?s[0].index:i.length;if(i.length!==d){console.trace(`[createInstance] First service dependency of ${e.name} at position ${d+1} conflicts with ${i.length} static arguments`);const f=d-i.length;f>0?i=i.concat(new Array(f)):i=i.slice(0,d)}return Reflect.construct(e,i.concat(c))}_setCreatedServiceInstance(e,i){if(this._services.get(e)instanceof wE)this._services.set(e,i);else if(this._parent)this._parent._setCreatedServiceInstance(e,i);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){const i=this._services.get(e);return!i&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):i}_getOrCreateServiceInstance(e,i){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));const n=this._getServiceInstanceOrDescriptor(e);return n instanceof wE?this._safeCreateAndCacheServiceInstance(e,n,i.branch(e,!0)):(i.branch(e,!1),n)}_safeCreateAndCacheServiceInstance(e,i,n){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,i,n)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,i,n){var m;const s=new fSt(v=>v.id.toString());let c=0;const d=[{id:e,desc:i,_trace:n}],f=new Set;for(;d.length;){const v=d.pop();if(!f.has(String(v.id))){if(f.add(String(v.id)),s.lookupOrInsertNode(v),c++>1e3)throw new hSt(s);for(const x of IE.getServiceDependencies(v.desc.ctor)){const w=this._getServiceInstanceOrDescriptor(x.id);if(w||this._throwIfStrict(`[createInstance] ${e} depends on ${x.id} which is NOT registered.`,!0),(m=this._globalGraph)==null||m.insertEdge(String(v.id),String(x.id)),w instanceof wE){const I={id:x.id,desc:w,_trace:v._trace.branch(x.id,!0)};s.insertEdge(v,I),d.push(I)}}}}for(;;){const v=s.roots();if(v.length===0){if(!s.isEmpty())throw new hSt(s);break}for(const{data:x}of v){if(this._getServiceInstanceOrDescriptor(x.id)instanceof wE){const I=this._createServiceInstanceWithOwner(x.id,x.desc.ctor,x.desc.staticArguments,x.desc.supportsDelayedInstantiation,x._trace);this._setCreatedServiceInstance(x.id,I)}s.removeNode(x)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,i,n=[],s,c){if(this._services.get(e)instanceof wE)return this._createServiceInstance(e,i,n,s,c,this._servicesToMaybeDispose);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,i,n,s,c);throw new Error(`illegalState - creating UNKNOWN service instance ${i.name}`)}_createServiceInstance(e,i,n=[],s,c,d){if(s){const f=new pve(void 0,this._strict,this,this._enableTracing);f._globalGraphImplicitDependency=String(e);const m=new Map,v=new bui(()=>{const x=f._createInstance(i,n,c);for(const[w,I]of m){const P=x[w];if(typeof P=="function")for(const O of I)O.disposable=P.apply(x,O.listener)}return m.clear(),d.add(x),x});return new Proxy(Object.create(null),{get(x,w){if(!v.isInitialized&&typeof w=="string"&&(w.startsWith("onDid")||w.startsWith("onWill"))){let O=m.get(w);return O||(O=new _v,m.set(w,O)),(J,Y,ae)=>{if(v.isInitialized)return v.value[w](J,Y,ae);{const me={listener:[J,Y,ae],disposable:void 0},ye=O.push(me);return fo(()=>{var Fe;ye(),(Fe=me.disposable)==null||Fe.dispose()})}}}if(w in x)return x[w];const I=v.value;let P=I[w];return typeof P!="function"||(P=P.bind(I),x[w]=P),P},set(x,w,I){return v.value[w]=I,!0},getPrototypeOf(x){return i.prototype}})}else{const f=this._createInstance(i,n,c);return d.add(f),f}}_throwIfStrict(e,i){if(i&&console.warn(e),this._strict)throw new Error(e)}}const aw=class aw{static traceInvocation(e,i){return e?new aw(2,i.name||new Error().stack.split(`
+`).slice(3,4).join(`
+`)):aw._None}static traceCreation(e,i){return e?new aw(1,i.name):aw._None}constructor(e,i){this.type=e,this.name=i,this._start=Date.now(),this._dep=[]}branch(e,i){const n=new aw(3,e.toString());return this._dep.push([e,i,n]),n}stop(){const e=Date.now()-this._start;aw._totals+=e;let i=!1;function n(c,d){const f=[],m=new Array(c+1).join(" ");for(const[v,x,w]of d._dep)if(x&&w){i=!0,f.push(`${m}CREATES -> ${v}`);const I=n(c+1,w);I&&f.push(I)}else f.push(`${m}uses -> ${v}`);return f.join(`
+`)}const s=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${n(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${aw._totals.toFixed(2)}ms)`];(e>2||i)&&aw.all.add(s.join(`
+`))}};aw.all=new Set,aw._None=new class extends aw{constructor(){super(0,null)}stop(){}branch(){return this}},aw._totals=0;let Vie=aw;const ewi=new Set([Ma.inMemory,Ma.vscodeSourceControl,Ma.walkThrough,Ma.walkThroughSnippet,Ma.vscodeChatCodeBlock]);class twi{constructor(){this._byResource=new vg,this._byOwner=new Map}set(e,i,n){let s=this._byResource.get(e);s||(s=new Map,this._byResource.set(e,s)),s.set(i,n);let c=this._byOwner.get(i);c||(c=new vg,this._byOwner.set(i,c)),c.set(e,n)}get(e,i){const n=this._byResource.get(e);return n==null?void 0:n.get(i)}delete(e,i){let n=!1,s=!1;const c=this._byResource.get(e);c&&(n=c.delete(i));const d=this._byOwner.get(i);if(d&&(s=d.delete(e)),n!==s)throw new Error("illegal state");return n&&s}values(e){var i,n;return typeof e=="string"?((i=this._byOwner.get(e))==null?void 0:i.values())??dl.empty():yo.isUri(e)?((n=this._byResource.get(e))==null?void 0:n.values())??dl.empty():dl.map(dl.concat(...this._byOwner.values()),s=>s[1])}}class iwi{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new vg,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const i of e){const n=this._data.get(i);n&&this._substract(n);const s=this._resourceStats(i);this._add(s),this._data.set(i,s)}}_resourceStats(e){const i={errors:0,warnings:0,infos:0,unknowns:0};if(ewi.has(e.scheme))return i;for(const{severity:n}of this._service.read({resource:e}))n===Rh.Error?i.errors+=1:n===Rh.Warning?i.warnings+=1:n===Rh.Info?i.infos+=1:i.unknowns+=1;return i}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class _M{constructor(){this._onMarkerChanged=new Fkt({delay:0,merge:_M._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new twi,this._stats=new iwi(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,i){for(const n of i||[])this.changeOne(e,n,[])}changeOne(e,i,n){if(ykt(n))this._data.delete(i,e)&&this._onMarkerChanged.fire([i]);else{const s=[];for(const c of n){const d=_M._toMarker(e,i,c);d&&s.push(d)}this._data.set(i,e,s),this._onMarkerChanged.fire([i])}}static _toMarker(e,i,n){let{code:s,severity:c,message:d,source:f,startLineNumber:m,startColumn:v,endLineNumber:x,endColumn:w,relatedInformation:I,tags:P}=n;if(d)return m=m>0?m:1,v=v>0?v:1,x=x>=m?x:m,w=w>0?w:v,{resource:i,owner:e,code:s,severity:c,message:d,source:f,startLineNumber:m,startColumn:v,endLineNumber:x,endColumn:w,relatedInformation:I,tags:P}}changeAll(e,i){const n=[],s=this._data.values(e);if(s)for(const c of s){const d=dl.first(c);d&&(n.push(d.resource),this._data.delete(d.resource,e))}if(ky(i)){const c=new vg;for(const{resource:d,marker:f}of i){const m=_M._toMarker(e,d,f);if(!m)continue;const v=c.get(d);v?v.push(m):(c.set(d,[m]),n.push(d))}for(const[d,f]of c)this._data.set(d,e,f)}n.length>0&&this._onMarkerChanged.fire(n)}read(e=Object.create(null)){let{owner:i,resource:n,severities:s,take:c}=e;if((!c||c<0)&&(c=-1),i&&n){const d=this._data.get(n,i);if(d){const f=[];for(const m of d)if(_M._accept(m,s)){const v=f.push(m);if(c>0&&v===c)break}return f}else return[]}else if(!i&&!n){const d=[];for(const f of this._data.values())for(const m of f)if(_M._accept(m,s)){const v=d.push(m);if(c>0&&v===c)return d}return d}else{const d=this._data.values(n??i),f=[];for(const m of d)for(const v of m)if(_M._accept(v,s)){const x=f.push(v);if(c>0&&x===c)return f}return f}}static _accept(e,i){return i===void 0||(i&e.severity)===e.severity}static _merge(e){const i=new vg;for(const n of e)for(const s of n)i.set(s,!0);return Array.from(i.keys())}}class nwi extends xi{get configurationModel(){return this._configurationModel}constructor(e){super(),this.logService=e,this._configurationModel=r0.createEmptyModel(this.logService)}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=r0.createEmptyModel(this.logService);const e=nh.as(DT.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,i){const n=this.getConfigurationDefaultOverrides();for(const s of e){const c=n[s],d=i[s];c!==void 0?this._configurationModel.setValue(s,c):d?this._configurationModel.setValue(s,d.default):this._configurationModel.removeValue(s)}}}const jR=jc("accessibilitySignalService"),Hl=class Hl{static register(e){return new Hl(e.fileName)}constructor(e){this.fileName=e}};Hl.error=Hl.register({fileName:"error.mp3"}),Hl.warning=Hl.register({fileName:"warning.mp3"}),Hl.success=Hl.register({fileName:"success.mp3"}),Hl.foldedArea=Hl.register({fileName:"foldedAreas.mp3"}),Hl.break=Hl.register({fileName:"break.mp3"}),Hl.quickFixes=Hl.register({fileName:"quickFixes.mp3"}),Hl.taskCompleted=Hl.register({fileName:"taskCompleted.mp3"}),Hl.taskFailed=Hl.register({fileName:"taskFailed.mp3"}),Hl.terminalBell=Hl.register({fileName:"terminalBell.mp3"}),Hl.diffLineInserted=Hl.register({fileName:"diffLineInserted.mp3"}),Hl.diffLineDeleted=Hl.register({fileName:"diffLineDeleted.mp3"}),Hl.diffLineModified=Hl.register({fileName:"diffLineModified.mp3"}),Hl.chatRequestSent=Hl.register({fileName:"chatRequestSent.mp3"}),Hl.chatResponseReceived1=Hl.register({fileName:"chatResponseReceived1.mp3"}),Hl.chatResponseReceived2=Hl.register({fileName:"chatResponseReceived2.mp3"}),Hl.chatResponseReceived3=Hl.register({fileName:"chatResponseReceived3.mp3"}),Hl.chatResponseReceived4=Hl.register({fileName:"chatResponseReceived4.mp3"}),Hl.clear=Hl.register({fileName:"clear.mp3"}),Hl.save=Hl.register({fileName:"save.mp3"}),Hl.format=Hl.register({fileName:"format.mp3"}),Hl.voiceRecordingStarted=Hl.register({fileName:"voiceRecordingStarted.mp3"}),Hl.voiceRecordingStopped=Hl.register({fileName:"voiceRecordingStopped.mp3"}),Hl.progress=Hl.register({fileName:"progress.mp3"});let If=Hl;class rwi{constructor(e){this.randomOneOf=e}}const vc=class vc{constructor(e,i,n,s,c,d){this.sound=e,this.name=i,this.legacySoundSettingsKey=n,this.settingsKey=s,this.legacyAnnouncementSettingsKey=c,this.announcementMessage=d}static register(e){const i=new rwi("randomOneOf"in e.sound?e.sound.randomOneOf:[e.sound]),n=new vc(i,e.name,e.legacySoundSettingsKey,e.settingsKey,e.legacyAnnouncementSettingsKey,e.announcementMessage);return vc._signals.add(n),n}};vc._signals=new Set,vc.errorAtPosition=vc.register({name:W("accessibilitySignals.positionHasError.name","Error at Position"),sound:If.error,announcementMessage:W("accessibility.signals.positionHasError","Error"),settingsKey:"accessibility.signals.positionHasError",delaySettingsKey:"accessibility.signalOptions.delays.errorAtPosition"}),vc.warningAtPosition=vc.register({name:W("accessibilitySignals.positionHasWarning.name","Warning at Position"),sound:If.warning,announcementMessage:W("accessibility.signals.positionHasWarning","Warning"),settingsKey:"accessibility.signals.positionHasWarning",delaySettingsKey:"accessibility.signalOptions.delays.warningAtPosition"}),vc.errorOnLine=vc.register({name:W("accessibilitySignals.lineHasError.name","Error on Line"),sound:If.error,legacySoundSettingsKey:"audioCues.lineHasError",legacyAnnouncementSettingsKey:"accessibility.alert.error",announcementMessage:W("accessibility.signals.lineHasError","Error on Line"),settingsKey:"accessibility.signals.lineHasError"}),vc.warningOnLine=vc.register({name:W("accessibilitySignals.lineHasWarning.name","Warning on Line"),sound:If.warning,legacySoundSettingsKey:"audioCues.lineHasWarning",legacyAnnouncementSettingsKey:"accessibility.alert.warning",announcementMessage:W("accessibility.signals.lineHasWarning","Warning on Line"),settingsKey:"accessibility.signals.lineHasWarning"}),vc.foldedArea=vc.register({name:W("accessibilitySignals.lineHasFoldedArea.name","Folded Area on Line"),sound:If.foldedArea,legacySoundSettingsKey:"audioCues.lineHasFoldedArea",legacyAnnouncementSettingsKey:"accessibility.alert.foldedArea",announcementMessage:W("accessibility.signals.lineHasFoldedArea","Folded"),settingsKey:"accessibility.signals.lineHasFoldedArea"}),vc.break=vc.register({name:W("accessibilitySignals.lineHasBreakpoint.name","Breakpoint on Line"),sound:If.break,legacySoundSettingsKey:"audioCues.lineHasBreakpoint",legacyAnnouncementSettingsKey:"accessibility.alert.breakpoint",announcementMessage:W("accessibility.signals.lineHasBreakpoint","Breakpoint"),settingsKey:"accessibility.signals.lineHasBreakpoint"}),vc.inlineSuggestion=vc.register({name:W("accessibilitySignals.lineHasInlineSuggestion.name","Inline Suggestion on Line"),sound:If.quickFixes,legacySoundSettingsKey:"audioCues.lineHasInlineSuggestion",settingsKey:"accessibility.signals.lineHasInlineSuggestion"}),vc.terminalQuickFix=vc.register({name:W("accessibilitySignals.terminalQuickFix.name","Terminal Quick Fix"),sound:If.quickFixes,legacySoundSettingsKey:"audioCues.terminalQuickFix",legacyAnnouncementSettingsKey:"accessibility.alert.terminalQuickFix",announcementMessage:W("accessibility.signals.terminalQuickFix","Quick Fix"),settingsKey:"accessibility.signals.terminalQuickFix"}),vc.onDebugBreak=vc.register({name:W("accessibilitySignals.onDebugBreak.name","Debugger Stopped on Breakpoint"),sound:If.break,legacySoundSettingsKey:"audioCues.onDebugBreak",legacyAnnouncementSettingsKey:"accessibility.alert.onDebugBreak",announcementMessage:W("accessibility.signals.onDebugBreak","Breakpoint"),settingsKey:"accessibility.signals.onDebugBreak"}),vc.noInlayHints=vc.register({name:W("accessibilitySignals.noInlayHints","No Inlay Hints on Line"),sound:If.error,legacySoundSettingsKey:"audioCues.noInlayHints",legacyAnnouncementSettingsKey:"accessibility.alert.noInlayHints",announcementMessage:W("accessibility.signals.noInlayHints","No Inlay Hints"),settingsKey:"accessibility.signals.noInlayHints"}),vc.taskCompleted=vc.register({name:W("accessibilitySignals.taskCompleted","Task Completed"),sound:If.taskCompleted,legacySoundSettingsKey:"audioCues.taskCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.taskCompleted",announcementMessage:W("accessibility.signals.taskCompleted","Task Completed"),settingsKey:"accessibility.signals.taskCompleted"}),vc.taskFailed=vc.register({name:W("accessibilitySignals.taskFailed","Task Failed"),sound:If.taskFailed,legacySoundSettingsKey:"audioCues.taskFailed",legacyAnnouncementSettingsKey:"accessibility.alert.taskFailed",announcementMessage:W("accessibility.signals.taskFailed","Task Failed"),settingsKey:"accessibility.signals.taskFailed"}),vc.terminalCommandFailed=vc.register({name:W("accessibilitySignals.terminalCommandFailed","Terminal Command Failed"),sound:If.error,legacySoundSettingsKey:"audioCues.terminalCommandFailed",legacyAnnouncementSettingsKey:"accessibility.alert.terminalCommandFailed",announcementMessage:W("accessibility.signals.terminalCommandFailed","Command Failed"),settingsKey:"accessibility.signals.terminalCommandFailed"}),vc.terminalCommandSucceeded=vc.register({name:W("accessibilitySignals.terminalCommandSucceeded","Terminal Command Succeeded"),sound:If.success,announcementMessage:W("accessibility.signals.terminalCommandSucceeded","Command Succeeded"),settingsKey:"accessibility.signals.terminalCommandSucceeded"}),vc.terminalBell=vc.register({name:W("accessibilitySignals.terminalBell","Terminal Bell"),sound:If.terminalBell,legacySoundSettingsKey:"audioCues.terminalBell",legacyAnnouncementSettingsKey:"accessibility.alert.terminalBell",announcementMessage:W("accessibility.signals.terminalBell","Terminal Bell"),settingsKey:"accessibility.signals.terminalBell"}),vc.notebookCellCompleted=vc.register({name:W("accessibilitySignals.notebookCellCompleted","Notebook Cell Completed"),sound:If.taskCompleted,legacySoundSettingsKey:"audioCues.notebookCellCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellCompleted",announcementMessage:W("accessibility.signals.notebookCellCompleted","Notebook Cell Completed"),settingsKey:"accessibility.signals.notebookCellCompleted"}),vc.notebookCellFailed=vc.register({name:W("accessibilitySignals.notebookCellFailed","Notebook Cell Failed"),sound:If.taskFailed,legacySoundSettingsKey:"audioCues.notebookCellFailed",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellFailed",announcementMessage:W("accessibility.signals.notebookCellFailed","Notebook Cell Failed"),settingsKey:"accessibility.signals.notebookCellFailed"}),vc.diffLineInserted=vc.register({name:W("accessibilitySignals.diffLineInserted","Diff Line Inserted"),sound:If.diffLineInserted,legacySoundSettingsKey:"audioCues.diffLineInserted",settingsKey:"accessibility.signals.diffLineInserted"}),vc.diffLineDeleted=vc.register({name:W("accessibilitySignals.diffLineDeleted","Diff Line Deleted"),sound:If.diffLineDeleted,legacySoundSettingsKey:"audioCues.diffLineDeleted",settingsKey:"accessibility.signals.diffLineDeleted"}),vc.diffLineModified=vc.register({name:W("accessibilitySignals.diffLineModified","Diff Line Modified"),sound:If.diffLineModified,legacySoundSettingsKey:"audioCues.diffLineModified",settingsKey:"accessibility.signals.diffLineModified"}),vc.chatRequestSent=vc.register({name:W("accessibilitySignals.chatRequestSent","Chat Request Sent"),sound:If.chatRequestSent,legacySoundSettingsKey:"audioCues.chatRequestSent",legacyAnnouncementSettingsKey:"accessibility.alert.chatRequestSent",announcementMessage:W("accessibility.signals.chatRequestSent","Chat Request Sent"),settingsKey:"accessibility.signals.chatRequestSent"}),vc.chatResponseReceived=vc.register({name:W("accessibilitySignals.chatResponseReceived","Chat Response Received"),legacySoundSettingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[If.chatResponseReceived1,If.chatResponseReceived2,If.chatResponseReceived3,If.chatResponseReceived4]},settingsKey:"accessibility.signals.chatResponseReceived"}),vc.progress=vc.register({name:W("accessibilitySignals.progress","Progress"),sound:If.progress,legacySoundSettingsKey:"audioCues.chatResponsePending",legacyAnnouncementSettingsKey:"accessibility.alert.progress",announcementMessage:W("accessibility.signals.progress","Progress"),settingsKey:"accessibility.signals.progress"}),vc.clear=vc.register({name:W("accessibilitySignals.clear","Clear"),sound:If.clear,legacySoundSettingsKey:"audioCues.clear",legacyAnnouncementSettingsKey:"accessibility.alert.clear",announcementMessage:W("accessibility.signals.clear","Clear"),settingsKey:"accessibility.signals.clear"}),vc.save=vc.register({name:W("accessibilitySignals.save","Save"),sound:If.save,legacySoundSettingsKey:"audioCues.save",legacyAnnouncementSettingsKey:"accessibility.alert.save",announcementMessage:W("accessibility.signals.save","Save"),settingsKey:"accessibility.signals.save"}),vc.format=vc.register({name:W("accessibilitySignals.format","Format"),sound:If.format,legacySoundSettingsKey:"audioCues.format",legacyAnnouncementSettingsKey:"accessibility.alert.format",announcementMessage:W("accessibility.signals.format","Format"),settingsKey:"accessibility.signals.format"}),vc.voiceRecordingStarted=vc.register({name:W("accessibilitySignals.voiceRecordingStarted","Voice Recording Started"),sound:If.voiceRecordingStarted,legacySoundSettingsKey:"audioCues.voiceRecordingStarted",settingsKey:"accessibility.signals.voiceRecordingStarted"}),vc.voiceRecordingStopped=vc.register({name:W("accessibilitySignals.voiceRecordingStopped","Voice Recording Stopped"),sound:If.voiceRecordingStopped,legacySoundSettingsKey:"audioCues.voiceRecordingStopped",settingsKey:"accessibility.signals.voiceRecordingStopped"});let hw=vc;class swi extends xi{constructor(e,i=[]){super(),this.logger=new Xdi([e,...i]),this._register(e.onDidChangeLogLevel(n=>this.setLevel(n)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...i){this.logger.trace(e,...i)}debug(e,...i){this.logger.debug(e,...i)}info(e,...i){this.logger.info(e,...i)}warn(e,...i){this.logger.warn(e,...i)}error(e,...i){this.logger.error(e,...i)}}const oIt=[];function NJ(l){oIt.push(l)}function owi(){return oIt.slice(0)}class awi{getParseResult(e){}}var UL=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},$_=function(l,e){return function(i,n){e(i,n,l)}};class cwi{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new gi}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let HHe=class{constructor(e){this.modelService=e}createModelReference(e){const i=this.modelService.getModel(e);return i?Promise.resolve(new tli(new cwi(i))):Promise.reject(new Error("Model not found"))}};HHe=UL([$_(0,rf)],HHe);const vCe=class vCe{show(){return vCe.NULL_PROGRESS_RUNNER}async showWhile(e,i){await e}};vCe.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};let jHe=vCe;class lwi{withProgress(e,i,n){return i({report:()=>{}})}}class uwi{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}}class dwi{async confirm(e){return{confirmed:this.doConfirm(e.message,e.detail),checkboxChecked:!1}}doConfirm(e,i){let n=e;return i&&(n=n+`
+
+`+i),cd.confirm(n)}async prompt(e){var s;let i;if(this.doConfirm(e.message,e.detail)){const c=[...e.buttons??[]];e.cancelButton&&typeof e.cancelButton!="string"&&typeof e.cancelButton!="boolean"&&c.push(e.cancelButton),i=await((s=c[0])==null?void 0:s.run({checkboxChecked:!1}))}return{result:i}}async error(e,i){await this.prompt({type:S_.Error,message:e,detail:i})}}const gne=class gne{info(e){return this.notify({severity:S_.Info,message:e})}warn(e){return this.notify({severity:S_.Warning,message:e})}error(e){return this.notify({severity:S_.Error,message:e})}notify(e){switch(e.severity){case S_.Error:console.error(e.message);break;case S_.Warning:console.warn(e.message);break;default:console.log(e.message);break}return gne.NO_OP}prompt(e,i,n,s){return gne.NO_OP}status(e,i){return xi.None}};gne.NO_OP=new m_i;let zHe=gne,UHe=class{constructor(e){this._onWillExecuteCommand=new gi,this._onDidExecuteCommand=new gi,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...i){const n=fl.getCommand(e);if(!n)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:i});const s=this._instantiationService.invokeFunction.apply(this._instantiationService,[n.handler,...i]);return this._onDidExecuteCommand.fire({commandId:e,args:i}),Promise.resolve(s)}catch(s){return Promise.reject(s)}}};UHe=UL([$_(0,ho)],UHe);let U$=class extends P0i{constructor(e,i,n,s,c,d){super(e,i,n,s,c),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const f=P=>{const O=new wn;O.add(en(P,br.KEY_DOWN,z=>{const J=new Id(z);this._dispatch(J,J.target)&&(J.preventDefault(),J.stopPropagation())})),O.add(en(P,br.KEY_UP,z=>{const J=new Id(z);this._singleModifierDispatch(J,J.target)&&J.preventDefault()})),this._domNodeListeners.push(new fwi(P,O))},m=P=>{for(let O=0;O<this._domNodeListeners.length;O++){const z=this._domNodeListeners[O];z.domNode===P&&(this._domNodeListeners.splice(O,1),z.dispose())}},v=P=>{P.getOption(61)||f(P.getContainerDomNode())},x=P=>{P.getOption(61)||m(P.getContainerDomNode())};this._register(d.onCodeEditorAdd(v)),this._register(d.onCodeEditorRemove(x)),d.listCodeEditors().forEach(v);const w=P=>{f(P.getContainerDomNode())},I=P=>{m(P.getContainerDomNode())};this._register(d.onDiffEditorAdd(w)),this._register(d.onDiffEditorRemove(I)),d.listDiffEditors().forEach(w)}addDynamicKeybinding(e,i,n,s){return gT(fl.registerCommand(e,n),this.addDynamicKeybindings([{keybinding:i,command:e,when:s}]))}addDynamicKeybindings(e){const i=e.map(n=>({keybinding:gWe(n.keybinding,UC),command:n.command??null,commandArgs:n.commandArgs,when:n.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}));return this._dynamicKeybindings=this._dynamicKeybindings.concat(i),this.updateResolver(),fo(()=>{for(let n=0;n<this._dynamicKeybindings.length;n++)if(this._dynamicKeybindings[n]===i[0]){this._dynamicKeybindings.splice(n,i.length),this.updateResolver();return}})}updateResolver(){this._cachedResolver=null,this._onDidUpdateKeybindings.fire()}_getResolver(){if(!this._cachedResolver){const e=this._toNormalizedKeybindingItems(wv.getDefaultKeybindings(),!0),i=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new Iie(e,i,n=>this._log(n))}return this._cachedResolver}_documentHasFocus(){return cd.document.hasFocus()}_toNormalizedKeybindingItems(e,i){const n=[];let s=0;for(const c of e){const d=c.when||void 0,f=c.keybinding;if(!f)n[s++]=new tCt(void 0,c.command,c.commandArgs,d,i,null,!1);else{const m=nre.resolveKeybinding(f,UC);for(const v of m)n[s++]=new tCt(v,c.command,c.commandArgs,d,i,null,!1)}}return n}resolveKeyboardEvent(e){const i=new a6(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new nre([i],UC)}};U$=UL([$_(0,Ko),$_(1,qd),$_(2,b1),$_(3,w_),$_(4,N0),$_(5,Bl)],U$);class fwi extends xi{constructor(e,i){super(),this.domNode=e,this._register(i)}}function _St(l){return l&&typeof l=="object"&&(!l.overrideIdentifier||typeof l.overrideIdentifier=="string")&&(!l.resource||l.resource instanceof yo)}let mve=class{constructor(e){this.logService=e,this._onDidChangeConfiguration=new gi,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const i=new nwi(e);this._configuration=new hwe(i.reload(),r0.createEmptyModel(e),r0.createEmptyModel(e),r0.createEmptyModel(e),r0.createEmptyModel(e),r0.createEmptyModel(e),new vg,r0.createEmptyModel(e),new vg,e),i.dispose()}getValue(e,i){const n=typeof e=="string"?e:void 0,s=_St(e)?e:_St(i)?i:{};return this._configuration.getValue(n,s,void 0)}updateValues(e){const i={data:this._configuration.toData()},n=[];for(const s of e){const[c,d]=s;this.getValue(c)!==d&&(this._configuration.updateValue(c,d),n.push(c))}if(n.length>0){const s=new D0i({keys:n,overrides:[]},i,this._configuration,void 0,this.logService);s.source=8,this._onDidChangeConfiguration.fire(s)}return Promise.resolve()}updateValue(e,i,n,s){return this.updateValues([[e,i]])}inspect(e,i={}){return this._configuration.inspect(e,i,void 0)}};mve=UL([$_(0,N0)],mve);let qHe=class{constructor(e,i,n){this.configurationService=e,this.modelService=i,this.languageService=n,this._onDidChangeConfiguration=new gi,this.configurationService.onDidChangeConfiguration(s=>{this._onDidChangeConfiguration.fire({affectedKeys:s.affectedKeys,affectsConfiguration:(c,d)=>s.affectsConfiguration(d)})})}getValue(e,i,n){const s=pi.isIPosition(i)?i:null,c=s?typeof n=="string"?n:void 0:typeof i=="string"?i:void 0,d=e?this.getLanguage(e,s):void 0;return typeof c>"u"?this.configurationService.getValue({resource:e,overrideIdentifier:d}):this.configurationService.getValue(c,{resource:e,overrideIdentifier:d})}getLanguage(e,i){const n=this.modelService.getModel(e);return n?i?n.getLanguageIdAtPosition(i.lineNumber,i.column):n.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};qHe=UL([$_(0,Cc),$_(1,rf),$_(2,Pf)],qHe);let $He=class{constructor(e){this.configurationService=e}getEOL(e,i){const n=this.configurationService.getValue("files.eol",{overrideIdentifier:i,resource:e});return n&&typeof n=="string"&&n!=="auto"?n:Cv||Hc?`
+`:`\r
+`}};$He=UL([$_(0,Cc)],$He);class hwi{publicLog2(){}}const yne=class yne{constructor(){const e=yo.from({scheme:yne.SCHEME,authority:"model",path:"/"});this.workspace={id:pDt,folders:[new $0i({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===yne.SCHEME?this.workspace.folders[0]:null}};yne.SCHEME="inmemory";let JHe=yne;function gve(l,e,i){if(!e||!(l instanceof mve))return;const n=[];Object.keys(e).forEach(s=>{S0i(s)&&n.push([`editor.${s}`,e[s]]),i&&w0i(s)&&n.push([`diffEditor.${s}`,e[s]])}),n.length>0&&l.updateValues(n)}let GHe=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}async apply(e,i){const n=Array.isArray(e)?e:eJe.convert(e),s=new Map;for(const f of n){if(!(f instanceof GM))throw new Error("bad edit - only text edits are supported");const m=this._modelService.getModel(f.resource);if(!m)throw new Error("bad edit - model not found");if(typeof f.versionId=="number"&&m.getVersionId()!==f.versionId)throw new Error("bad state - model changed in the meantime");let v=s.get(m);v||(v=[],s.set(m,v)),v.push(eh.replaceMove(nt.lift(f.textEdit.range),f.textEdit.text))}let c=0,d=0;for(const[f,m]of s)f.pushStackElement(),f.pushEditOperations([],m,()=>[]),f.pushStackElement(),d+=1,c+=m.length;return{ariaSummary:SB(AVe.bulkEditServiceSummary,c,d),isApplied:c>0}}};GHe=UL([$_(0,rf)],GHe);class _wi{getUriLabel(e,i){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return wk(e)}}let KHe=class extends fDt{constructor(e,i){super(e),this._codeEditorService=i}showContextView(e,i,n){if(!i){const s=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();s&&(i=s.getContainerDomNode())}return super.showContextView(e,i,n)}};KHe=UL([$_(0,FR),$_(1,Bl)],KHe);class pwi{constructor(){this._neverEmitter=new gi,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class mwi extends WVe{constructor(){super()}}class gwi extends swi{constructor(){super(new Kdi)}}let XHe=class extends KVe{constructor(e,i,n,s,c,d){super(e,i,n,s,c,d),this.configure({blockMouse:!1})}};XHe=UL([$_(0,b1),$_(1,w_),$_(2,b6),$_(3,pu),$_(4,Lw),$_(5,Ko)],XHe);const QHe={amdModuleId:"vs/editor/common/services/editorSimpleWorker",esmModuleLocation:void 0,label:"editorWorkerService"};let ZHe=class extends qWe{constructor(e,i,n,s,c){super(QHe,e,i,n,s,c)}};ZHe=UL([$_(0,rf),$_(1,XSe),$_(2,N0),$_(3,rh),$_(4,Ts)],ZHe);class ywi{async playSignal(e,i){}}nl(N0,gwi,0);nl(Cc,mve,0);nl(XSe,qHe,0);nl(uTt,$He,0);nl(LB,JHe,0);nl(F$,_wi,0);nl(b1,hwi,0);nl(gse,dwi,0);nl(D$e,uwi,0);nl(w_,zHe,0);nl(zL,_M,0);nl(Pf,mwi,0);nl(Mw,WSi,0);nl(rf,lHe,0);nl(lJe,eHe,0);nl(Ko,VHe,0);nl(_Dt,lwi,0);nl(WR,jHe,0);nl(ET,syi,0);nl(Fb,ZHe,0);nl(Sse,GHe,0);nl(mDt,pwi,0);nl(Ob,HHe,0);nl(tS,AHe,0);nl(Ik,ZCi,0);nl(qd,UHe,0);nl(pu,U$,0);nl(Ek,NHe,0);nl(b6,KHe,0);nl(Rb,YVe,0);nl(w6,BHe,0);nl(eS,XHe,0);nl(Lw,OHe,0);nl(jR,ywi,0);nl(hEt,awi,0);var oa;(function(l){const e=new IJ;for(const[m,v]of Dvt())e.set(m,v);const i=new pve(e,!0);e.set(ho,i);function n(m){s||d({});const v=e.get(m);if(!v)throw new Error("Missing service "+m);return v instanceof wE?i.invokeFunction(x=>x.get(m)):v}l.get=n;let s=!1;const c=new gi;function d(m){if(s)return i;s=!0;for(const[x,w]of Dvt())e.get(x)||e.set(x,w);for(const x in m)if(m.hasOwnProperty(x)){const w=jc(x);e.get(w)instanceof wE&&e.set(w,m[x])}const v=owi();for(const x of v)try{i.createInstance(x)}catch(w){Pa(w)}return c.fire(),i}l.initialize=d;function f(m){if(s)return m();const v=new wn,x=v.add(c.event(()=>{x.dispose(),v.add(m())}));return v}l.withServices=f})(oa||(oa={}));function vwi(l,e){return new bwi(l,e)}class bwi extends bye{constructor(e,i){const n={amdModuleId:QHe.amdModuleId,esmModuleLocation:QHe.esmModuleLocation,label:i.label};super(n,i.keepIdleModels||!1,e),this._foreignModuleId=i.moduleId,this._foreignModuleCreateData=i.createData||null,this._foreignModuleHost=i.host||null,this._foreignProxy=null}fhr(e,i){if(!this._foreignModuleHost||typeof this._foreignModuleHost[e]!="function")return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,i))}catch(n){return Promise.reject(n)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(e=>{const i=this._foreignModuleHost?lBe(this._foreignModuleHost):[];return e.$loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,i).then(n=>{this._foreignModuleCreateData=null;const s=(f,m)=>e.$fmr(f,m),c=(f,m)=>function(){const v=Array.prototype.slice.call(arguments,0);return m(f,v)},d={};for(const f of n)d[f]=c(f,s);return d})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this.workerWithSyncedResources(e).then(i=>this.getProxy())}}const Ase={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"};class mv{constructor(e,i,n,s){this.startColumn=e,this.endColumn=i,this.className=n,this.type=s,this._lineDecorationBrand=void 0}static _equals(e,i){return e.startColumn===i.startColumn&&e.endColumn===i.endColumn&&e.className===i.className&&e.type===i.type}static equalsArr(e,i){const n=e.length,s=i.length;if(n!==s)return!1;for(let c=0;c<n;c++)if(!mv._equals(e[c],i[c]))return!1;return!0}static extractWrapped(e,i,n){if(e.length===0)return e;const s=i+1,c=n+1,d=n-i,f=[];let m=0;for(const v of e)v.endColumn<=s||v.startColumn>=c||(f[m++]=new mv(Math.max(1,v.startColumn-s+1),Math.min(d+1,v.endColumn-s+1),v.className,v.type));return f}static filter(e,i,n,s){if(e.length===0)return[];const c=[];let d=0;for(let f=0,m=e.length;f<m;f++){const v=e[f],x=v.range;if(x.endLineNumber<i||x.startLineNumber>i||x.isEmpty()&&(v.type===0||v.type===3))continue;const w=x.startLineNumber===i?x.startColumn:n,I=x.endLineNumber===i?x.endColumn:s;c[d++]=new mv(w,I,v.inlineClassName,v.type)}return c}static _typeCompare(e,i){const n=[2,0,1,3];return n[e]-n[i]}static compare(e,i){if(e.startColumn!==i.startColumn)return e.startColumn-i.startColumn;if(e.endColumn!==i.endColumn)return e.endColumn-i.endColumn;const n=mv._typeCompare(e.type,i.type);return n!==0?n:e.className!==i.className?e.className<i.className?-1:1:0}}class pSt{constructor(e,i,n,s){this.startOffset=e,this.endOffset=i,this.className=n,this.metadata=s}}class yve{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(e){let i=0;for(let n=0,s=e.length;n<s;n++)i|=e[n];return i}consumeLowerThan(e,i,n){for(;this.count>0&&this.stopOffsets[0]<e;){let s=0;for(;s+1<this.count&&this.stopOffsets[s]===this.stopOffsets[s+1];)s++;n.push(new pSt(i,this.stopOffsets[s],this.classNames.join(" "),yve._metadata(this.metadata))),i=this.stopOffsets[s]+1,this.stopOffsets.splice(0,s+1),this.classNames.splice(0,s+1),this.metadata.splice(0,s+1),this.count-=s+1}return this.count>0&&i<e&&(n.push(new pSt(i,e-1,this.classNames.join(" "),yve._metadata(this.metadata))),i=e),i}insert(e,i,n){if(this.count===0||this.stopOffsets[this.count-1]<=e)this.stopOffsets.push(e),this.classNames.push(i),this.metadata.push(n);else for(let s=0;s<this.count;s++)if(this.stopOffsets[s]>=e){this.stopOffsets.splice(s,0,e),this.classNames.splice(s,0,i),this.metadata.splice(s,0,n);break}this.count++}}class Cwi{static normalize(e,i){if(i.length===0)return[];const n=[],s=new yve;let c=0;for(let d=0,f=i.length;d<f;d++){const m=i[d];let v=m.startColumn,x=m.endColumn;const w=m.className,I=m.type===1?2:m.type===2?4:0;if(v>1){const z=e.charCodeAt(v-2);Pm(z)&&v--}if(x>1){const z=e.charCodeAt(x-2);Pm(z)&&x--}const P=v-1,O=x-2;c=s.consumeLowerThan(P,c,n),s.count===0&&(c=P),s.insert(O,w,I)}return s.consumeLowerThan(1073741824,c,n),n}}class mg{constructor(e,i,n,s){this.endIndex=e,this.type=i,this.metadata=n,this.containsRTL=s,this._linePartBrand=void 0}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}class aIt{constructor(e,i){this.startOffset=e,this.endOffset=i}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class zR{constructor(e,i,n,s,c,d,f,m,v,x,w,I,P,O,z,J,Y,ae,me){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=i,this.lineContent=n,this.continuesWithWrappedLine=s,this.isBasicASCII=c,this.containsRTL=d,this.fauxIndentLength=f,this.lineTokens=m,this.lineDecorations=v.sort(mv.compare),this.tabSize=x,this.startVisibleColumn=w,this.spaceWidth=I,this.stopRenderingLineAfter=z,this.renderWhitespace=J==="all"?4:J==="boundary"?1:J==="selection"?2:J==="trailing"?3:0,this.renderControlCharacters=Y,this.fontLigatures=ae,this.selectionsOnLine=me&&me.sort((Fe,rt)=>Fe.startOffset<rt.startOffset?-1:1);const ye=Math.abs(O-I),Ce=Math.abs(P-I);ye<Ce?(this.renderSpaceWidth=O,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=P,this.renderSpaceCharCode=183)}sameSelection(e){if(this.selectionsOnLine===null)return e===null;if(e===null||e.length!==this.selectionsOnLine.length)return!1;for(let i=0;i<this.selectionsOnLine.length;i++)if(!this.selectionsOnLine[i].equals(e[i]))return!1;return!0}equals(e){return this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineContent===e.lineContent&&this.continuesWithWrappedLine===e.continuesWithWrappedLine&&this.isBasicASCII===e.isBasicASCII&&this.containsRTL===e.containsRTL&&this.fauxIndentLength===e.fauxIndentLength&&this.tabSize===e.tabSize&&this.startVisibleColumn===e.startVisibleColumn&&this.spaceWidth===e.spaceWidth&&this.renderSpaceWidth===e.renderSpaceWidth&&this.renderSpaceCharCode===e.renderSpaceCharCode&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.fontLigatures===e.fontLigatures&&mv.equalsArr(this.lineDecorations,e.lineDecorations)&&this.lineTokens.equals(e.lineTokens)&&this.sameSelection(e.selectionsOnLine)}}class cIt{constructor(e,i){this.partIndex=e,this.charIndex=i}}class hL{static getPartIndex(e){return(e&4294901760)>>>16}static getCharIndex(e){return(e&65535)>>>0}constructor(e,i){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,i,n,s){const c=(i<<16|n<<0)>>>0;this._data[e-1]=c,this._horizontalOffset[e-1]=s}getHorizontalOffset(e){return this._horizontalOffset.length===0?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return this.length===0?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const i=this.charOffsetToPartData(e-1),n=hL.getPartIndex(i),s=hL.getCharIndex(i);return new cIt(n,s)}getColumn(e,i){return this.partDataToCharOffset(e.partIndex,i,e.charIndex)+1}partDataToCharOffset(e,i,n){if(this.length===0)return 0;const s=(e<<16|n<<0)>>>0;let c=0,d=this.length-1;for(;c+1<d;){const z=c+d>>>1,J=this._data[z];if(J===s)return z;J>s?d=z:c=z}if(c===d)return c;const f=this._data[c],m=this._data[d];if(f===s)return c;if(m===s)return d;const v=hL.getPartIndex(f),x=hL.getCharIndex(f),w=hL.getPartIndex(m);let I;v!==w?I=i:I=hL.getCharIndex(m);const P=n-x,O=I-n;return P<=O?c:d}}class YHe{constructor(e,i,n){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=i,this.containsForeignElements=n}}function Ose(l,e){if(l.lineContent.length===0){if(l.lineDecorations.length>0){e.appendString("<span>");let i=0,n=0,s=0;for(const d of l.lineDecorations)(d.type===1||d.type===2)&&(e.appendString('<span class="'),e.appendString(d.className),e.appendString('"></span>'),d.type===1&&(s|=1,i++),d.type===2&&(s|=2,n++));e.appendString("</span>");const c=new hL(1,i+n);return c.setColumnInfo(1,i,0,0),new YHe(c,!1,s)}return e.appendString("<span><span></span></span>"),new YHe(new hL(0,0),!1,0)}return Nwi(xwi(l),e)}class Swi{constructor(e,i,n,s){this.characterMapping=e,this.html=i,this.containsRTL=n,this.containsForeignElements=s}}function Nwe(l){const e=new gJ(1e4),i=Ose(l,e);return new Swi(i.characterMapping,e.build(),i.containsRTL,i.containsForeignElements)}class wwi{constructor(e,i,n,s,c,d,f,m,v,x,w,I,P,O,z,J){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=i,this.lineContent=n,this.len=s,this.isOverflowing=c,this.overflowingCharCount=d,this.parts=f,this.containsForeignElements=m,this.fauxIndentLength=v,this.tabSize=x,this.startVisibleColumn=w,this.containsRTL=I,this.spaceWidth=P,this.renderSpaceCharCode=O,this.renderWhitespace=z,this.renderControlCharacters=J}}function xwi(l){const e=l.lineContent;let i,n,s;l.stopRenderingLineAfter!==-1&&l.stopRenderingLineAfter<e.length?(i=!0,n=e.length-l.stopRenderingLineAfter,s=l.stopRenderingLineAfter):(i=!1,n=0,s=e.length);let c=kwi(e,l.containsRTL,l.lineTokens,l.fauxIndentLength,s);l.renderControlCharacters&&!l.isBasicASCII&&(c=Dwi(e,c)),(l.renderWhitespace===4||l.renderWhitespace===1||l.renderWhitespace===2&&l.selectionsOnLine||l.renderWhitespace===3&&!l.continuesWithWrappedLine)&&(c=Ewi(l,e,s,c));let d=0;if(l.lineDecorations.length>0){for(let f=0,m=l.lineDecorations.length;f<m;f++){const v=l.lineDecorations[f];v.type===3||v.type===1?d|=1:v.type===2&&(d|=2)}c=Iwi(e,s,c,l.lineDecorations)}return l.containsRTL||(c=Twi(e,c,!l.isBasicASCII||l.fontLigatures)),new wwi(l.useMonospaceOptimizations,l.canUseHalfwidthRightwardsArrow,e,s,i,n,c,d,l.fauxIndentLength,l.tabSize,l.startVisibleColumn,l.containsRTL,l.spaceWidth,l.renderSpaceCharCode,l.renderWhitespace,l.renderControlCharacters)}function kwi(l,e,i,n,s){const c=[];let d=0;n>0&&(c[d++]=new mg(n,"",0,!1));let f=n;for(let m=0,v=i.getCount();m<v;m++){const x=i.getEndOffset(m);if(x<=n)continue;const w=i.getClassName(m);if(x>=s){const P=e?k$(l.substring(f,s)):!1;c[d++]=new mg(s,w,0,P);break}const I=e?k$(l.substring(f,x)):!1;c[d++]=new mg(x,w,0,I),f=x}return c}function Twi(l,e,i){let n=0;const s=[];let c=0;if(i)for(let d=0,f=e.length;d<f;d++){const m=e[d],v=m.endIndex;if(n+50<v){const x=m.type,w=m.metadata,I=m.containsRTL;let P=-1,O=n;for(let z=n;z<v;z++)l.charCodeAt(z)===32&&(P=z),P!==-1&&z-O>=50&&(s[c++]=new mg(P+1,x,w,I),O=P+1,P=-1);O!==v&&(s[c++]=new mg(v,x,w,I))}else s[c++]=m;n=v}else for(let d=0,f=e.length;d<f;d++){const m=e[d],v=m.endIndex,x=v-n;if(x>50){const w=m.type,I=m.metadata,P=m.containsRTL,O=Math.ceil(x/50);for(let z=1;z<O;z++){const J=n+z*50;s[c++]=new mg(J,w,I,P)}s[c++]=new mg(v,w,I,P)}else s[c++]=m;n=v}return s}function lIt(l){return l<32?l!==9:l===127||l>=8234&&l<=8238||l>=8294&&l<=8297||l>=8206&&l<=8207||l===1564}function Dwi(l,e){const i=[];let n=new mg(0,"",0,!1),s=0;for(const c of e){const d=c.endIndex;for(;s<d;s++){const f=l.charCodeAt(s);lIt(f)&&(s>n.endIndex&&(n=new mg(s,c.type,c.metadata,c.containsRTL),i.push(n)),n=new mg(s+1,"mtkcontrol",c.metadata,!1),i.push(n))}s>n.endIndex&&(n=new mg(d,c.type,c.metadata,c.containsRTL),i.push(n))}return i}function Ewi(l,e,i,n){const s=l.continuesWithWrappedLine,c=l.fauxIndentLength,d=l.tabSize,f=l.startVisibleColumn,m=l.useMonospaceOptimizations,v=l.selectionsOnLine,x=l.renderWhitespace===1,w=l.renderWhitespace===3,I=l.renderSpaceWidth!==l.spaceWidth,P=[];let O=0,z=0,J=n[z].type,Y=n[z].containsRTL,ae=n[z].endIndex;const me=n.length;let ye=!1,Ce=Ty(e),Fe;Ce===-1?(ye=!0,Ce=i,Fe=i):Fe=ME(e);let rt=!1,ct=0,Mt=v&&v[ct],Yt=f%d;for(let $i=c;$i<i;$i++){const $t=e.charCodeAt($i);Mt&&$i>=Mt.endOffset&&(ct++,Mt=v&&v[ct]);let Hi;if($i<Ce||$i>Fe)Hi=!0;else if($t===9)Hi=!0;else if($t===32)if(x)if(rt)Hi=!0;else{const An=$i+1<i?e.charCodeAt($i+1):0;Hi=An===32||An===9}else Hi=!0;else Hi=!1;if(Hi&&v&&(Hi=!!Mt&&Mt.startOffset<=$i&&Mt.endOffset>$i),Hi&&w&&(Hi=ye||$i>Fe),Hi&&Y&&$i>=Ce&&$i<=Fe&&(Hi=!1),rt){if(!Hi||!m&&Yt>=d){if(I){const An=O>0?P[O-1].endIndex:c;for(let qt=An+1;qt<=$i;qt++)P[O++]=new mg(qt,"mtkw",1,!1)}else P[O++]=new mg($i,"mtkw",1,!1);Yt=Yt%d}}else($i===ae||Hi&&$i>c)&&(P[O++]=new mg($i,J,0,Y),Yt=Yt%d);for($t===9?Yt=d:bR($t)?Yt+=2:Yt++,rt=Hi;$i===ae&&(z++,z<me);)J=n[z].type,Y=n[z].containsRTL,ae=n[z].endIndex}let Bi=!1;if(rt)if(s&&x){const $i=i>0?e.charCodeAt(i-1):0,$t=i>1?e.charCodeAt(i-2):0;$i===32&&$t!==32&&$t!==9||(Bi=!0)}else Bi=!0;if(Bi)if(I){const $i=O>0?P[O-1].endIndex:c;for(let $t=$i+1;$t<=i;$t++)P[O++]=new mg($t,"mtkw",1,!1)}else P[O++]=new mg(i,"mtkw",1,!1);else P[O++]=new mg(i,J,0,Y);return P}function Iwi(l,e,i,n){n.sort(mv.compare);const s=Cwi.normalize(l,n),c=s.length;let d=0;const f=[];let m=0,v=0;for(let w=0,I=i.length;w<I;w++){const P=i[w],O=P.endIndex,z=P.type,J=P.metadata,Y=P.containsRTL;for(;d<c&&s[d].startOffset<O;){const ae=s[d];if(ae.startOffset>v&&(v=ae.startOffset,f[m++]=new mg(v,z,J,Y)),ae.endOffset+1<=O)v=ae.endOffset+1,f[m++]=new mg(v,z+" "+ae.className,J|ae.metadata,Y),d++;else{v=O,f[m++]=new mg(v,z+" "+ae.className,J|ae.metadata,Y);break}}O>v&&(v=O,f[m++]=new mg(v,z,J,Y))}const x=i[i.length-1].endIndex;if(d<c&&s[d].startOffset===x)for(;d<c&&s[d].startOffset===x;){const w=s[d];f[m++]=new mg(v,w.className,w.metadata,!1),d++}return f}function Nwi(l,e){const i=l.fontIsMonospace,n=l.canUseHalfwidthRightwardsArrow,s=l.containsForeignElements,c=l.lineContent,d=l.len,f=l.isOverflowing,m=l.overflowingCharCount,v=l.parts,x=l.fauxIndentLength,w=l.tabSize,I=l.startVisibleColumn,P=l.containsRTL,O=l.spaceWidth,z=l.renderSpaceCharCode,J=l.renderWhitespace,Y=l.renderControlCharacters,ae=new hL(d+1,v.length);let me=!1,ye=0,Ce=I,Fe=0,rt=0,ct=0;P?e.appendString('<span dir="ltr">'):e.appendString("<span>");for(let Mt=0,Yt=v.length;Mt<Yt;Mt++){const Bi=v[Mt],$i=Bi.endIndex,$t=Bi.type,Hi=Bi.containsRTL,An=J!==0&&Bi.isWhitespace(),qt=An&&!i&&($t==="mtkw"||!s),ms=ye===$i&&Bi.isPseudoAfter();if(Fe=0,e.appendString("<span "),Hi&&e.appendString('style="unicode-bidi:isolate" '),e.appendString('class="'),e.appendString(qt?"mtkz":$t),e.appendASCIICharCode(34),An){let Wr=0;{let Dr=ye,Rr=Ce;for(;Dr<$i;Dr++){const $d=(c.charCodeAt(Dr)===9?w-Rr%w:1)|0;Wr+=$d,Dr>=x&&(Rr+=$d)}}for(qt&&(e.appendString(' style="width:'),e.appendString(String(O*Wr)),e.appendString('px"')),e.appendASCIICharCode(62);ye<$i;ye++){ae.setColumnInfo(ye+1,Mt-ct,Fe,rt),ct=0;const Dr=c.charCodeAt(ye);let Rr,na;if(Dr===9){Rr=w-Ce%w|0,na=Rr,!n||na>1?e.appendCharCode(8594):e.appendCharCode(65515);for(let $d=2;$d<=na;$d++)e.appendCharCode(160)}else Rr=2,na=1,e.appendCharCode(z),e.appendCharCode(8204);Fe+=Rr,rt+=na,ye>=x&&(Ce+=na)}}else for(e.appendASCIICharCode(62);ye<$i;ye++){ae.setColumnInfo(ye+1,Mt-ct,Fe,rt),ct=0;const Wr=c.charCodeAt(ye);let Dr=1,Rr=1;switch(Wr){case 9:Dr=w-Ce%w,Rr=Dr;for(let na=1;na<=Dr;na++)e.appendCharCode(160);break;case 32:e.appendCharCode(160);break;case 60:e.appendString("&lt;");break;case 62:e.appendString("&gt;");break;case 38:e.appendString("&amp;");break;case 0:Y?e.appendCharCode(9216):e.appendString("&#00;");break;case 65279:case 8232:case 8233:case 133:e.appendCharCode(65533);break;default:bR(Wr)&&Rr++,Y&&Wr<32?e.appendCharCode(9216+Wr):Y&&Wr===127?e.appendCharCode(9249):Y&&lIt(Wr)?(e.appendString("[U+"),e.appendString(Lwi(Wr)),e.appendString("]"),Dr=8,Rr=Dr):e.appendCharCode(Wr)}Fe+=Dr,rt+=Rr,ye>=x&&(Ce+=Rr)}ms?ct++:ct=0,ye>=d&&!me&&Bi.isPseudoAfter()&&(me=!0,ae.setColumnInfo(ye+1,Mt,Fe,rt)),e.appendString("</span>")}return me||ae.setColumnInfo(d+1,v.length-1,Fe,rt),f&&(e.appendString('<span class="mtkoverflow">'),e.appendString(W("showMore","Show more ({0})",Pwi(m))),e.appendString("</span>")),e.appendString("</span>"),new YHe(ae,P,s)}function Lwi(l){return l.toString(16).toUpperCase().padStart(4,"0")}function Pwi(l){return l<1024?W("overflow.chars","{0} chars",l):l<1024*1024?`${(l/1024).toFixed(1)} KB`:`${(l/1024/1024).toFixed(1)} MB`}class mSt{constructor(e,i,n,s){this._viewportBrand=void 0,this.top=e|0,this.left=i|0,this.width=n|0,this.height=s|0}}class Awi{constructor(e,i){this.tabSize=e,this.data=i}}class jJe{constructor(e,i,n,s,c,d,f){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=i,this.minColumn=n,this.maxColumn=s,this.startVisibleColumn=c,this.tokens=d,this.inlineDecorations=f}}class Iw{constructor(e,i,n,s,c,d,f,m,v,x){this.minColumn=e,this.maxColumn=i,this.content=n,this.continuesWithWrappedLine=s,this.isBasicASCII=Iw.isBasicASCII(n,d),this.containsRTL=Iw.containsRTL(n,this.isBasicASCII,c),this.tokens=f,this.inlineDecorations=m,this.tabSize=v,this.startVisibleColumn=x}static isBasicASCII(e,i){return i?fse(e):!0}static containsRTL(e,i,n){return!i&&n?k$(e):!1}}class Hie{constructor(e,i,n){this.range=e,this.inlineClassName=i,this.type=n}}class Owi{constructor(e,i,n,s){this.startOffset=e,this.endOffset=i,this.inlineClassName=n,this.inlineClassNameAffectsLetterSpacing=s}toInlineDecoration(e){return new Hie(new nt(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class uIt{constructor(e,i){this._viewModelDecorationBrand=void 0,this.range=e,this.options=i}}class yre{constructor(e,i,n){this.color=e,this.zIndex=i,this.data=n}static compareByRenderingProps(e,i){return e.zIndex===i.zIndex?e.color<i.color?-1:e.color>i.color?1:0:e.zIndex-i.zIndex}static equals(e,i){return e.color===i.color&&e.zIndex===i.zIndex&&Lf(e.data,i.data)}static equalsArr(e,i){return Lf(e,i,yre.equals)}}function Mwi(l){return Array.isArray(l)}function Rwi(l){return!Mwi(l)}function dIt(l){return typeof l=="string"}function gSt(l){return!dIt(l)}function qF(l){return!l}function e6(l,e){return l.ignoreCase&&e?e.toLowerCase():e}function ySt(l){return l.replace(/[&<>'"_]/g,"-")}function Fwi(l,e){console.log(`${l.languageId}: ${e}`)}function mf(l,e){return new Error(`${l.languageId}: ${e}`)}function xM(l,e,i,n,s){const c=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let d=null;return e.replace(c,function(f,m,v,x,w,I,P,O,z){return qF(v)?qF(x)?!qF(w)&&w<n.length?e6(l,n[w]):!qF(P)&&l&&typeof l[P]=="string"?l[P]:(d===null&&(d=s.split("."),d.unshift(s)),!qF(I)&&I<d.length?e6(l,d[I]):""):e6(l,i):"$"})}function Bwi(l,e,i){const n=/\$[sS](\d\d?)/g;let s=null;return e.replace(n,function(c,d){return s===null&&(s=i.split("."),s.unshift(i)),!qF(d)&&d<s.length?e6(l,s[d]):""})}function C0e(l,e){let i=e;for(;i&&i.length>0;){const n=l.tokenizer[i];if(n)return n;const s=i.lastIndexOf(".");s<0?i=null:i=i.substr(0,s)}return null}function Wwi(l,e){let i=e;for(;i&&i.length>0;){if(l.stateNames[i])return!0;const s=i.lastIndexOf(".");s<0?i=null:i=i.substr(0,s)}return!1}var Vwi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Hwi=function(l,e){return function(i,n){e(i,n,l)}},eje;const fIt=5,bCe=class bCe{static create(e,i){return this._INSTANCE.create(e,i)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,i){if(e!==null&&e.depth>=this._maxCacheDepth)return new t$(e,i);let n=t$.getStackElementId(e);n.length>0&&(n+="|"),n+=i;let s=this._entries[n];return s||(s=new t$(e,i),this._entries[n]=s,s)}};bCe._INSTANCE=new bCe(fIt);let vre=bCe;class t${constructor(e,i){this.parent=e,this.state=i,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let i="";for(;e!==null;)i.length>0&&(i+="|"),i+=e.state,e=e.parent;return i}static _equals(e,i){for(;e!==null&&i!==null;){if(e===i)return!0;if(e.state!==i.state)return!1;e=e.parent,i=i.parent}return e===null&&i===null}equals(e){return t$._equals(this,e)}push(e){return vre.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return vre.create(this.parent,e)}}class uq{constructor(e,i){this.languageId=e,this.state=i}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new uq(this.languageId,this.state)}}const CCe=class CCe{static create(e,i){return this._INSTANCE.create(e,i)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,i){if(i!==null)return new jie(e,i);if(e!==null&&e.depth>=this._maxCacheDepth)return new jie(e,i);const n=t$.getStackElementId(e);let s=this._entries[n];return s||(s=new jie(e,null),this._entries[n]=s,s)}};CCe._INSTANCE=new CCe(fIt);let kM=CCe;class jie{constructor(e,i){this.stack=e,this.embeddedLanguageData=i}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:kM.create(this.stack,this.embeddedLanguageData)}equals(e){return!(e instanceof jie)||!this.stack.equals(e.stack)?!1:this.embeddedLanguageData===null&&e.embeddedLanguageData===null?!0:this.embeddedLanguageData===null||e.embeddedLanguageData===null?!1:this.embeddedLanguageData.equals(e.embeddedLanguageData)}}class jwi{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,i){this._lastTokenType===i&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=i,this._lastTokenLanguage=this._languageId,this._tokens.push(new Pne(e,i,this._languageId)))}nestedLanguageTokenize(e,i,n,s){const c=n.languageId,d=n.state,f=Oh.get(c);if(!f)return this.enterLanguage(c),this.emit(s,""),d;const m=f.tokenize(e,i,d);if(s!==0)for(const v of m.tokens)this._tokens.push(new Pne(v.offset+s,v.type,v.language));else this._tokens=this._tokens.concat(m.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,m.endState}finalize(e){return new Qqe(this._tokens,e)}}class vve{constructor(e,i){this._languageService=e,this._theme=i,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,i){const n=this._theme.match(this._currentLanguageId,i)|1024;this._lastTokenMetadata!==n&&(this._lastTokenMetadata=n,this._tokens.push(e),this._tokens.push(n))}static _merge(e,i,n){const s=e!==null?e.length:0,c=i.length,d=n!==null?n.length:0;if(s===0&&c===0&&d===0)return new Uint32Array(0);if(s===0&&c===0)return n;if(c===0&&d===0)return e;const f=new Uint32Array(s+c+d);e!==null&&f.set(e);for(let m=0;m<c;m++)f[s+m]=i[m];return n!==null&&f.set(n,s+c),f}nestedLanguageTokenize(e,i,n,s){const c=n.languageId,d=n.state,f=Oh.get(c);if(!f)return this.enterLanguage(c),this.emit(s,""),d;const m=f.tokenizeEncoded(e,i,d);if(s!==0)for(let v=0,x=m.tokens.length;v<x;v+=2)m.tokens[v]+=s;return this._prependTokens=vve._merge(this._prependTokens,this._tokens,m.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,m.endState}finalize(e){return new ISe(vve._merge(this._prependTokens,this._tokens,null),e)}}let bre=eje=class extends xi{constructor(e,i,n,s,c){super(),this._configurationService=c,this._languageService=e,this._standaloneThemeService=i,this._languageId=n,this._lexer=s,this._embeddedLanguages=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let d=!1;this._register(Oh.onDidChange(f=>{if(d)return;let m=!1;for(let v=0,x=f.changedLanguages.length;v<x;v++){const w=f.changedLanguages[v];if(this._embeddedLanguages[w]){m=!0;break}}m&&(d=!0,Oh.handleChange([this._languageId]),d=!1)})),this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}),this._register(this._configurationService.onDidChangeConfiguration(f=>{f.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))}))}getLoadStatus(){const e=[];for(const i in this._embeddedLanguages){const n=Oh.get(i);if(n){if(n instanceof eje){const s=n.getLoadStatus();s.loaded===!1&&e.push(s.promise)}continue}Oh.isResolved(i)||e.push(Oh.getOrCreate(i))}return e.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(i=>{})}}getInitialState(){const e=vre.create(null,this._lexer.start);return kM.create(e,null)}tokenize(e,i,n){if(e.length>=this._maxTokenizationLineLength)return Z$e(this._languageId,n);const s=new jwi,c=this._tokenize(e,i,n,s);return s.finalize(c)}tokenizeEncoded(e,i,n){if(e.length>=this._maxTokenizationLineLength)return fwe(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),n);const s=new vve(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),c=this._tokenize(e,i,n,s);return s.finalize(c)}_tokenize(e,i,n,s){return n.embeddedLanguageData?this._nestedTokenize(e,i,n,0,s):this._myTokenize(e,i,n,0,s)}_findLeavingNestedLanguageOffset(e,i){let n=this._lexer.tokenizer[i.stack.state];if(!n&&(n=C0e(this._lexer,i.stack.state),!n))throw mf(this._lexer,"tokenizer state is not defined: "+i.stack.state);let s=-1,c=!1;for(const d of n){if(!gSt(d.action)||d.action.nextEmbedded!=="@pop")continue;c=!0;let f=d.resolveRegex(i.stack.state);const m=f.source;if(m.substr(0,4)==="^(?:"&&m.substr(m.length-1,1)===")"){const x=(f.ignoreCase?"i":"")+(f.unicode?"u":"");f=new RegExp(m.substr(4,m.length-5),x)}const v=e.search(f);v===-1||v!==0&&d.matchOnlyAtLineStart||(s===-1||v<s)&&(s=v)}if(!c)throw mf(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+i.stack.state);return s}_nestedTokenize(e,i,n,s,c){const d=this._findLeavingNestedLanguageOffset(e,n);if(d===-1){const v=c.nestedLanguageTokenize(e,i,n.embeddedLanguageData,s);return kM.create(n.stack,new uq(n.embeddedLanguageData.languageId,v))}const f=e.substring(0,d);f.length>0&&c.nestedLanguageTokenize(f,!1,n.embeddedLanguageData,s);const m=e.substring(d);return this._myTokenize(m,i,n,s+d,c)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,i,n,s,c){c.enterLanguage(this._languageId);const d=e.length,f=i&&this._lexer.includeLF?e+`
+`:e,m=f.length;let v=n.embeddedLanguageData,x=n.stack,w=0,I=null,P=!0;for(;P||w<m;){const O=w,z=x.depth,J=I?I.groups.length:0,Y=x.state;let ae=null,me=null,ye=null,Ce=null,Fe=null;if(I){ae=I.matches;const Mt=I.groups.shift();me=Mt.matched,ye=Mt.action,Ce=I.rule,I.groups.length===0&&(I=null)}else{if(!P&&w>=m)break;P=!1;let Mt=this._lexer.tokenizer[Y];if(!Mt&&(Mt=C0e(this._lexer,Y),!Mt))throw mf(this._lexer,"tokenizer state is not defined: "+Y);const Yt=f.substr(w);for(const Bi of Mt)if((w===0||!Bi.matchOnlyAtLineStart)&&(ae=Yt.match(Bi.resolveRegex(Y)),ae)){me=ae[0],ye=Bi.action;break}}if(ae||(ae=[""],me=""),ye||(w<m&&(ae=[f.charAt(w)],me=ae[0]),ye=this._lexer.defaultToken),me===null)break;for(w+=me.length;Rwi(ye)&&gSt(ye)&&ye.test;)ye=ye.test(me,ae,Y,w===m);let rt=null;if(typeof ye=="string"||Array.isArray(ye))rt=ye;else if(ye.group)rt=ye.group;else if(ye.token!==null&&ye.token!==void 0){if(ye.tokenSubst?rt=xM(this._lexer,ye.token,me,ae,Y):rt=ye.token,ye.nextEmbedded)if(ye.nextEmbedded==="@pop"){if(!v)throw mf(this._lexer,"cannot pop embedded language if not inside one");v=null}else{if(v)throw mf(this._lexer,"cannot enter embedded language from within an embedded language");Fe=xM(this._lexer,ye.nextEmbedded,me,ae,Y)}if(ye.goBack&&(w=Math.max(0,w-ye.goBack)),ye.switchTo&&typeof ye.switchTo=="string"){let Mt=xM(this._lexer,ye.switchTo,me,ae,Y);if(Mt[0]==="@"&&(Mt=Mt.substr(1)),C0e(this._lexer,Mt))x=x.switchTo(Mt);else throw mf(this._lexer,"trying to switch to a state '"+Mt+"' that is undefined in rule: "+this._safeRuleName(Ce))}else{if(ye.transform&&typeof ye.transform=="function")throw mf(this._lexer,"action.transform not supported");if(ye.next)if(ye.next==="@push"){if(x.depth>=this._lexer.maxStack)throw mf(this._lexer,"maximum tokenizer stack size reached: ["+x.state+","+x.parent.state+",...]");x=x.push(Y)}else if(ye.next==="@pop"){if(x.depth<=1)throw mf(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(Ce));x=x.pop()}else if(ye.next==="@popall")x=x.popall();else{let Mt=xM(this._lexer,ye.next,me,ae,Y);if(Mt[0]==="@"&&(Mt=Mt.substr(1)),C0e(this._lexer,Mt))x=x.push(Mt);else throw mf(this._lexer,"trying to set a next state '"+Mt+"' that is undefined in rule: "+this._safeRuleName(Ce))}}ye.log&&typeof ye.log=="string"&&Fwi(this._lexer,this._lexer.languageId+": "+xM(this._lexer,ye.log,me,ae,Y))}if(rt===null)throw mf(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(Ce));const ct=Mt=>{const Yt=this._languageService.getLanguageIdByLanguageName(Mt)||this._languageService.getLanguageIdByMimeType(Mt)||Mt,Bi=this._getNestedEmbeddedLanguageData(Yt);if(w<m){const $i=e.substr(w);return this._nestedTokenize($i,i,kM.create(x,Bi),s+w,c)}else return kM.create(x,Bi)};if(Array.isArray(rt)){if(I&&I.groups.length>0)throw mf(this._lexer,"groups cannot be nested: "+this._safeRuleName(Ce));if(ae.length!==rt.length+1)throw mf(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(Ce));let Mt=0;for(let Yt=1;Yt<ae.length;Yt++)Mt+=ae[Yt].length;if(Mt!==me.length)throw mf(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(Ce));I={rule:Ce,matches:ae,groups:[]};for(let Yt=0;Yt<rt.length;Yt++)I.groups[Yt]={action:rt[Yt],matched:ae[Yt+1]};w-=me.length;continue}else{if(rt==="@rematch"&&(w-=me.length,me="",ae=null,rt="",Fe!==null))return ct(Fe);if(me.length===0){if(m===0||z!==x.depth||Y!==x.state||(I?I.groups.length:0)!==J)continue;throw mf(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(Ce))}let Mt=null;if(dIt(rt)&&rt.indexOf("@brackets")===0){const Yt=rt.substr(9),Bi=zwi(this._lexer,me);if(!Bi)throw mf(this._lexer,"@brackets token returned but no bracket defined as: "+me);Mt=ySt(Bi.token+Yt)}else{const Yt=rt===""?"":rt+this._lexer.tokenPostfix;Mt=ySt(Yt)}O<d&&c.emit(O+s,Mt)}if(Fe!==null)return ct(Fe)}return kM.create(x,v)}_getNestedEmbeddedLanguageData(e){if(!this._languageService.isRegisteredLanguageId(e))return new uq(e,R$);e!==this._languageId&&(this._languageService.requestBasicLanguageFeatures(e),Oh.getOrCreate(e),this._embeddedLanguages[e]=!0);const i=Oh.get(e);return i?new uq(e,i.getInitialState()):new uq(e,R$)}};bre=eje=Vwi([Hwi(4,Cc)],bre);function zwi(l,e){if(!e)return null;e=e6(l,e);const i=l.brackets;for(const n of i){if(n.open===e)return{token:n.token,bracketType:1};if(n.close===e)return{token:n.token,bracketType:-1}}return null}const l9e=v6("standaloneColorizer",{createHTML:l=>l});class zJe{static colorizeElement(e,i,n,s){s=s||{};const c=s.theme||"vs",d=s.mimeType||n.getAttribute("lang")||n.getAttribute("data-lang");if(!d)return console.error("Mode not detected"),Promise.resolve();const f=i.getLanguageIdByMimeType(d)||d;e.setTheme(c);const m=n.firstChild?n.firstChild.nodeValue:"";n.className+=" "+c;const v=x=>{const w=(l9e==null?void 0:l9e.createHTML(x))??x;n.innerHTML=w};return this.colorize(i,m||"",f,s).then(v,x=>console.error(x))}static async colorize(e,i,n,s){const c=e.languageIdCodec;let d=4;s&&typeof s.tabSize=="number"&&(d=s.tabSize),r$e(i)&&(i=i.substr(1));const f=BL(i);if(!e.isRegisteredLanguageId(n))return vSt(f,d,c);const m=await Oh.getOrCreate(n);return m?Uwi(f,d,m,c):vSt(f,d,c)}static colorizeLine(e,i,n,s,c=4){const d=Iw.isBasicASCII(e,i),f=Iw.containsRTL(e,d,n);return Nwe(new zR(!1,!0,e,!1,d,f,0,s,[],c,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,i,n=4){const s=e.getLineContent(i);e.tokenization.forceTokenization(i);const d=e.tokenization.getLineTokens(i).inflate();return this.colorizeLine(s,e.mightContainNonBasicASCII(),e.mightContainRTL(),d,n)}}function Uwi(l,e,i,n){return new Promise((s,c)=>{const d=()=>{const f=qwi(l,e,i,n);if(i instanceof bre){const m=i.getLoadStatus();if(m.loaded===!1){m.promise.then(d,c);return}}s(f)};d()})}function vSt(l,e,i){let n=[];const c=new Uint32Array(2);c[0]=0,c[1]=33587200;for(let d=0,f=l.length;d<f;d++){const m=l[d];c[0]=m.length;const v=new Cg(c,m,i),x=Iw.isBasicASCII(m,!0),w=Iw.containsRTL(m,x,!0),I=Nwe(new zR(!1,!0,m,!1,x,w,0,v,[],e,0,0,0,0,-1,"none",!1,!1,null));n=n.concat(I.html),n.push("<br/>")}return n.join("")}function qwi(l,e,i,n){let s=[],c=i.getInitialState();for(let d=0,f=l.length;d<f;d++){const m=l[d],v=i.tokenizeEncoded(m,!0,c);Cg.convertToEndOffset(v.tokens,m.length);const x=new Cg(v.tokens,m,n),w=Iw.isBasicASCII(m,!0),I=Iw.containsRTL(m,w,!0),P=Nwe(new zR(!1,!0,m,!1,w,I,0,x.inflate(),[],e,0,0,0,0,-1,"none",!1,!1,null));s=s.concat(P.html),s.push("<br/>"),c=v.endState}return s.join("")}var $wi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Jwi=function(l,e){return function(i,n){e(i,n,l)}},d$;let bve=(d$=class{constructor(e,i){}dispose(){}},d$.ID="editor.contrib.markerDecorations",d$);bve=$wi([Jwi(1,lJe)],bve);Cl(bve.ID,bve,0);class hIt extends xi{constructor(e,i){super(),this._onDidChange=this._register(new gi),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,i)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let e=null;const i=()=>{e?this.observe({width:e.width,height:e.height}):this.observe()};let n=!1,s=!1;const c=()=>{if(n&&!s)try{n=!1,s=!0,i()}finally{ZC(Eo(this._referenceDomElement),()=>{s=!1,c()})}};this._resizeObserver=new ResizeObserver(d=>{d&&d[0]&&d[0].contentRect?e={width:d[0].contentRect.width,height:d[0].contentRect.height}:e=null,n=!0,c()}),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,i){let n=0,s=0;i?(n=i.width,s=i.height):this._referenceDomElement&&(n=this._referenceDomElement.clientWidth,s=this._referenceDomElement.clientHeight),n=Math.max(5,n),s=Math.max(5,s),(this._width!==n||this._height!==s)&&(this._width=n,this._height=s,e&&this._onDidChange.fire())}}const Lq=class Lq{constructor(e,i){this.key=e,this.migrate=i}apply(e){const i=Lq._read(e,this.key),n=c=>Lq._read(e,c),s=(c,d)=>Lq._write(e,c,d);this.migrate(i,n,s)}static _read(e,i){if(typeof e>"u")return;const n=i.indexOf(".");if(n>=0){const s=i.substring(0,n);return this._read(e[s],i.substring(n+1))}return e[i]}static _write(e,i,n){const s=i.indexOf(".");if(s>=0){const c=i.substring(0,s);e[c]=e[c]||{},this._write(e[c],i.substring(s+1),n);return}e[i]=n}};Lq.items=[];let Cre=Lq;function ZE(l,e){Cre.items.push(new Cre(l,e))}function iS(l,e){ZE(l,(i,n,s)=>{if(typeof i<"u"){for(const[c,d]of e)if(i===c){s(l,d);return}}})}function Gwi(l){Cre.items.forEach(e=>e.apply(l))}iS("wordWrap",[[!0,"on"],[!1,"off"]]);iS("lineNumbers",[[!0,"on"],[!1,"off"]]);iS("cursorBlinking",[["visible","solid"]]);iS("renderWhitespace",[[!0,"boundary"],[!1,"none"]]);iS("renderLineHighlight",[[!0,"line"],[!1,"none"]]);iS("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]);iS("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]);iS("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);iS("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);iS("autoIndent",[[!1,"advanced"],[!0,"full"]]);iS("matchBrackets",[[!0,"always"],[!1,"never"]]);iS("renderFinalNewline",[[!0,"on"],[!1,"off"]]);iS("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]);iS("occurrencesHighlight",[[!0,"singleFile"],[!1,"off"]]);iS("wordBasedSuggestions",[[!0,"matchingDocuments"],[!1,"off"]]);ZE("autoClosingBrackets",(l,e,i)=>{l===!1&&(i("autoClosingBrackets","never"),typeof e("autoClosingQuotes")>"u"&&i("autoClosingQuotes","never"),typeof e("autoSurround")>"u"&&i("autoSurround","never"))});ZE("renderIndentGuides",(l,e,i)=>{typeof l<"u"&&(i("renderIndentGuides",void 0),typeof e("guides.indentation")>"u"&&i("guides.indentation",!!l))});ZE("highlightActiveIndentGuide",(l,e,i)=>{typeof l<"u"&&(i("highlightActiveIndentGuide",void 0),typeof e("guides.highlightActiveIndentation")>"u"&&i("guides.highlightActiveIndentation",!!l))});const Kwi={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};ZE("suggest.filteredTypes",(l,e,i)=>{if(l&&typeof l=="object"){for(const n of Object.entries(Kwi))l[n[0]]===!1&&typeof e(`suggest.${n[1]}`)>"u"&&i(`suggest.${n[1]}`,!1);i("suggest.filteredTypes",void 0)}});ZE("quickSuggestions",(l,e,i)=>{if(typeof l=="boolean"){const n=l?"on":"off";i("quickSuggestions",{comments:n,strings:n,other:n})}});ZE("experimental.stickyScroll.enabled",(l,e,i)=>{typeof l=="boolean"&&(i("experimental.stickyScroll.enabled",void 0),typeof e("stickyScroll.enabled")>"u"&&i("stickyScroll.enabled",l))});ZE("experimental.stickyScroll.maxLineCount",(l,e,i)=>{typeof l=="number"&&(i("experimental.stickyScroll.maxLineCount",void 0),typeof e("stickyScroll.maxLineCount")>"u"&&i("stickyScroll.maxLineCount",l))});ZE("codeActionsOnSave",(l,e,i)=>{if(l&&typeof l=="object"){let n=!1;const s={};for(const c of Object.entries(l))typeof c[1]=="boolean"?(n=!0,s[c[0]]=c[1]?"explicit":"never"):s[c[0]]=c[1];n&&i("codeActionsOnSave",s)}});ZE("codeActionWidget.includeNearbyQuickfixes",(l,e,i)=>{typeof l=="boolean"&&(i("codeActionWidget.includeNearbyQuickfixes",void 0),typeof e("codeActionWidget.includeNearbyQuickFixes")>"u"&&i("codeActionWidget.includeNearbyQuickFixes",l))});ZE("lightbulb.enabled",(l,e,i)=>{typeof l=="boolean"&&i("lightbulb.enabled",l?void 0:"off")});class Xwi{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new gi,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus)}}const q$=new Xwi;var Qwi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Zwi=function(l,e){return function(i,n){e(i,n,l)}};let tje=class extends xi{constructor(e,i,n,s,c){super(),this._accessibilityService=c,this._onDidChange=this._register(new gi),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new gi),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new Okt,this.isSimpleWidget=e,this.contextMenuId=i,this._containerObserver=this._register(new hIt(s,n.dimension)),this._targetWindowId=Eo(s).vscodeWindowId,this._rawOptions=bSt(n),this._validatedOptions=TM.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(13)&&this._containerObserver.startObserving(),this._register(fk.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(q$.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(EWe.onDidChange(()=>this._recomputeOptions())),this._register(Wne.getInstance(Eo(s)).onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){const e=this._computeOptions(),i=TM.checkEquals(this.options,e);i!==null&&(this.options=e,this._onDidChangeFast.fire(i),this._onDidChange.fire(i))}_computeOptions(){const e=this._readEnvConfiguration(),i=h9.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),n=this._readFontInfo(i),s={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:n,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:q$.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return TM.computeOptions(this._validatedOptions,s)}_readEnvConfiguration(){return{extraEditorClassName:exi(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:f9||bk,pixelRatio:Wne.getInstance(fvt(this._targetWindowId,!0).window).value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return EWe.readFontInfo(fvt(this._targetWindowId,!0).window,e)}getRawOptions(){return this._rawOptions}updateOptions(e){const i=bSt(e);TM.applyUpdate(this._rawOptions,i)&&(this._validatedOptions=TM.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){const i=Ywi(e);this._lineNumbersDigitCount!==i&&(this._lineNumbersDigitCount=i,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(e){this._glyphMarginDecorationLaneCount!==e&&(this._glyphMarginDecorationLaneCount=e,this._recomputeOptions())}};tje=Qwi([Zwi(4,tS)],tje);function Ywi(l){let e=0;for(;l;)l=Math.floor(l/10),e++;return e||1}function exi(){let l="";return!o6&&!a2t&&(l+="no-user-select "),o6&&(l+="no-minimap-shadow ",l+="enable-user-select "),Hc&&(l+="mac "),l}class txi{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,i){this._values[e]=i}}class ixi{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,i){this._values[e]=i}}class TM{static validateOptions(e){const i=new txi;for(const n of YU){const s=n.name==="_never_"?void 0:e[n.name];i._write(n.id,n.validate(s))}return i}static computeOptions(e,i){const n=new ixi;for(const s of YU)n._write(s.id,s.compute(i,n,e._read(s.id)));return n}static _deepEquals(e,i){if(typeof e!="object"||typeof i!="object"||!e||!i)return e===i;if(Array.isArray(e)||Array.isArray(i))return Array.isArray(e)&&Array.isArray(i)?Lf(e,i):!1;if(Object.keys(e).length!==Object.keys(i).length)return!1;for(const n in e)if(!TM._deepEquals(e[n],i[n]))return!1;return!0}static checkEquals(e,i){const n=[];let s=!1;for(const c of YU){const d=!TM._deepEquals(e._read(c.id),i._read(c.id));n[c.id]=d,d&&(s=!0)}return s?new Akt(n):null}static applyUpdate(e,i){let n=!1;for(const s of YU)if(i.hasOwnProperty(s.name)){const c=s.applyUpdate(e[s.name],i[s.name]);e[s.name]=c.newValue,n=n||c.didChange}return n}}function bSt(l){const e=D4(l);return Gwi(e),e}var BM;(function(l){const e={total:0,min:Number.MAX_VALUE,max:0},i={...e},n={...e},s={...e};let c=0;const d={keydown:0,input:0,render:0};function f(){Y(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),d.keydown=1,queueMicrotask(m)}l.onKeyDown=f;function m(){d.keydown===1&&(performance.mark("keydown/end"),d.keydown=2)}function v(){performance.mark("input/start"),d.input=1,J()}l.onBeforeInput=v;function x(){d.input===0&&v(),queueMicrotask(w)}l.onInput=x;function w(){d.input===1&&(performance.mark("input/end"),d.input=2)}function I(){Y()}l.onKeyUp=I;function P(){Y()}l.onSelectionChange=P;function O(){d.keydown===2&&d.input===2&&d.render===0&&(performance.mark("render/start"),d.render=1,queueMicrotask(z),J())}l.onRenderStart=O;function z(){d.render===1&&(performance.mark("render/end"),d.render=2)}function J(){setTimeout(Y)}function Y(){d.keydown===2&&d.input===2&&d.render===2&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),ae("keydown",e),ae("input",i),ae("render",n),ae("inputlatency",s),c++,me())}function ae(rt,ct){const Mt=performance.getEntriesByName(rt)[0].duration;ct.total+=Mt,ct.min=Math.min(ct.min,Mt),ct.max=Math.max(ct.max,Mt)}function me(){performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),d.keydown=0,d.input=0,d.render=0}function ye(){if(c===0)return;const rt={keydown:Ce(e),input:Ce(i),render:Ce(n),total:Ce(s),sampleCount:c};return Fe(e),Fe(i),Fe(n),Fe(s),c=0,rt}l.getAndClearMeasurements=ye;function Ce(rt){return{average:rt.total/c,max:rt.max,min:rt.min}}function Fe(rt){rt.total=0,rt.min=Number.MAX_VALUE,rt.max=0}})(BM||(BM={}));class Lwe{constructor(e,i){this.x=e,this.y=i,this._pageCoordinatesBrand=void 0}toClientCoordinates(e){return new _It(this.x-e.scrollX,this.y-e.scrollY)}}class _It{constructor(e,i){this.clientX=e,this.clientY=i,this._clientCoordinatesBrand=void 0}toPageCoordinates(e){return new Lwe(this.clientX+e.scrollX,this.clientY+e.scrollY)}}class nxi{constructor(e,i,n,s){this.x=e,this.y=i,this.width=n,this.height=s,this._editorPagePositionBrand=void 0}}class rxi{constructor(e,i){this.x=e,this.y=i,this._positionRelativeToEditorBrand=void 0}}function UJe(l){const e=e_(l);return new nxi(e.left,e.top,e.width,e.height)}function qJe(l,e,i){const n=e.width/l.offsetWidth,s=e.height/l.offsetHeight,c=(i.x-e.x)/n,d=(i.y-e.y)/s;return new rxi(c,d)}class IR extends hT{constructor(e,i,n){super(Eo(n),e),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=i,this.pos=new Lwe(this.posx,this.posy),this.editorPos=UJe(n),this.relativePos=qJe(n,this.editorPos,this.pos)}}class sxi{constructor(e){this._editorViewDomNode=e}_create(e){return new IR(e,!1,this._editorViewDomNode)}onContextMenu(e,i){return en(e,"contextmenu",n=>{i(this._create(n))})}onMouseUp(e,i){return en(e,"mouseup",n=>{i(this._create(n))})}onMouseDown(e,i){return en(e,br.MOUSE_DOWN,n=>{i(this._create(n))})}onPointerDown(e,i){return en(e,br.POINTER_DOWN,n=>{i(this._create(n),n.pointerId)})}onMouseLeave(e,i){return en(e,br.MOUSE_LEAVE,n=>{i(this._create(n))})}onMouseMove(e,i){return en(e,"mousemove",n=>i(this._create(n)))}}class oxi{constructor(e){this._editorViewDomNode=e}_create(e){return new IR(e,!1,this._editorViewDomNode)}onPointerUp(e,i){return en(e,"pointerup",n=>{i(this._create(n))})}onPointerDown(e,i){return en(e,br.POINTER_DOWN,n=>{i(this._create(n),n.pointerId)})}onPointerLeave(e,i){return en(e,br.POINTER_LEAVE,n=>{i(this._create(n))})}onPointerMove(e,i){return en(e,"pointermove",n=>i(this._create(n)))}}class axi extends xi{constructor(e){super(),this._editorViewDomNode=e,this._globalPointerMoveMonitor=this._register(new bJ),this._keydownListener=null}startMonitoring(e,i,n,s,c){this._keydownListener=ph(e.ownerDocument,"keydown",d=>{d.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,d.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(e,i,n,d=>{s(new IR(d,!0,this._editorViewDomNode))},d=>{this._keydownListener.dispose(),c(d)})}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}const SCe=class SCe{constructor(e){this._editor=e,this._instanceId=++SCe._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new qu(()=>this.garbageCollect(),1e3)}createClassNameRef(e){const i=this.getOrCreateRule(e);return i.increaseRefCount(),{className:i.className,dispose:()=>{i.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){const i=this.computeUniqueKey(e);let n=this._rules.get(i);if(!n){const s=this._counter++;n=new cxi(i,`dyn-rule-${this._instanceId}-${s}`,cye(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(i,n)}return n}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(const e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}};SCe._idPool=0;let Cve=SCe;class cxi{constructor(e,i,n,s){this.key=e,this.className=i,this.properties=s,this._referenceCount=0,this._styleElementDisposables=new wn,this._styleElement=Dw(n,void 0,this._styleElementDisposables),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,i){let n=`.${e} {`;for(const s in i){const c=i[s];let d;typeof c=="object"?d=cs(c.id):d=c;const f=lxi(s);n+=`
+ ${f}: ${d};`}return n+=`
+}`,n}dispose(){this._styleElementDisposables.dispose(),this._styleElement=void 0}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function lxi(l){return l.replace(/(^[A-Z])/,([e])=>e.toLowerCase()).replace(/([A-Z])/g,([e])=>`-${e.toLowerCase()}`)}class Mse extends xi{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let i=!1;for(let n=0,s=e.length;n<s;n++){const c=e[n];switch(c.type){case 0:this.onCompositionStart(c)&&(i=!0);break;case 1:this.onCompositionEnd(c)&&(i=!0);break;case 2:this.onConfigurationChanged(c)&&(i=!0);break;case 3:this.onCursorStateChanged(c)&&(i=!0);break;case 4:this.onDecorationsChanged(c)&&(i=!0);break;case 5:this.onFlushed(c)&&(i=!0);break;case 6:this.onFocusChanged(c)&&(i=!0);break;case 7:this.onLanguageConfigurationChanged(c)&&(i=!0);break;case 8:this.onLineMappingChanged(c)&&(i=!0);break;case 9:this.onLinesChanged(c)&&(i=!0);break;case 10:this.onLinesDeleted(c)&&(i=!0);break;case 11:this.onLinesInserted(c)&&(i=!0);break;case 12:this.onRevealRangeRequest(c)&&(i=!0);break;case 13:this.onScrollChanged(c)&&(i=!0);break;case 15:this.onTokensChanged(c)&&(i=!0);break;case 14:this.onThemeChanged(c)&&(i=!0);break;case 16:this.onTokensColorsChanged(c)&&(i=!0);break;case 17:this.onZonesChanged(c)&&(i=!0);break;default:console.info("View received unknown event: "),console.info(c)}}i&&(this._shouldRender=!0)}}class nS extends Mse{constructor(e){super(),this._context=e,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}class JE{static write(e,i){e.setAttribute("data-mprt",String(i))}static read(e){const i=e.getAttribute("data-mprt");return i===null?0:parseInt(i,10)}static collect(e,i){const n=[];let s=0;for(;e&&e!==e.ownerDocument.body&&e!==i;)e.nodeType===e.ELEMENT_NODE&&(n[s++]=this.read(e)),e=e.parentElement;const c=new Uint8Array(s);for(let d=0;d<s;d++)c[d]=n[s-d-1];return c}}class uxi{constructor(e,i){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=i,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const n=this._viewLayout.getCurrentViewport();this.scrollTop=n.top,this.scrollLeft=n.left,this.viewportWidth=n.width,this.viewportHeight=n.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e,i){return this._viewLayout.getVerticalOffsetForLineNumber(e,i)}getVerticalOffsetAfterLineNumber(e,i){return this._viewLayout.getVerticalOffsetAfterLineNumber(e,i)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class dxi extends uxi{constructor(e,i,n){super(e,i),this._renderingContextBrand=void 0,this._viewLines=n}linesVisibleRangesForRange(e,i){return this._viewLines.linesVisibleRangesForRange(e,i)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}}class fxi{constructor(e,i,n,s){this.outsideRenderedLine=e,this.lineNumber=i,this.ranges=n,this.continuesOnNextLine=s}}class Pwe{static from(e){const i=new Array(e.length);for(let n=0,s=e.length;n<s;n++){const c=e[n];i[n]=new Pwe(c.left,c.width)}return i}constructor(e,i){this._horizontalRangeBrand=void 0,this.left=Math.round(e),this.width=Math.round(i)}toString(){return`[${this.left},${this.width}]`}}class C9{constructor(e,i){this._floatHorizontalRangeBrand=void 0,this.left=e,this.width=i}toString(){return`[${this.left},${this.width}]`}static compare(e,i){return e.left-i.left}}class hxi{constructor(e,i){this.outsideRenderedLine=e,this.originalLeft=i,this.left=Math.round(this.originalLeft)}}class CSt{constructor(e,i){this.outsideRenderedLine=e,this.ranges=i}}class x1e{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,i){e.selectNodeContents(i)}static _readClientRects(e,i,n,s,c){const d=this._createRange();try{return d.setStart(e,i),d.setEnd(n,s),d.getClientRects()}catch{return null}finally{this._detachRange(d,c)}}static _mergeAdjacentRanges(e){if(e.length===1)return e;e.sort(C9.compare);const i=[];let n=0,s=e[0];for(let c=1,d=e.length;c<d;c++){const f=e[c];s.left+s.width+.9>=f.left?s.width=Math.max(s.width,f.left+f.width-s.left):(i[n++]=s,s=f)}return i[n++]=s,i}static _createHorizontalRangesFromClientRects(e,i,n){if(!e||e.length===0)return null;const s=[];for(let c=0,d=e.length;c<d;c++){const f=e[c];s[c]=new C9(Math.max(0,(f.left-i)/n),f.width/n)}return this._mergeAdjacentRanges(s)}static readHorizontalRanges(e,i,n,s,c,d){const m=e.children.length-1;if(0>m)return null;if(i=Math.min(m,Math.max(0,i)),s=Math.min(m,Math.max(0,s)),i===s&&n===c&&n===0&&!e.children[i].firstChild){const I=e.children[i].getClientRects();return d.markDidDomLayout(),this._createHorizontalRangesFromClientRects(I,d.clientRectDeltaLeft,d.clientRectScale)}i!==s&&s>0&&c===0&&(s--,c=1073741824);let v=e.children[i].firstChild,x=e.children[s].firstChild;if((!v||!x)&&(!v&&n===0&&i>0&&(v=e.children[i-1].firstChild,n=1073741824),!x&&c===0&&s>0&&(x=e.children[s-1].firstChild,c=1073741824)),!v||!x)return null;n=Math.min(v.textContent.length,Math.max(0,n)),c=Math.min(x.textContent.length,Math.max(0,c));const w=this._readClientRects(v,n,x,c,d.endNode);return d.markDidDomLayout(),this._createHorizontalRangesFromClientRects(w,d.clientRectDeltaLeft,d.clientRectScale)}}const _xi=function(){return PE?!0:!(Cv||bk||o6)}();let i$=!0;class SSt{constructor(e,i){this.themeType=i;const n=e.options,s=n.get(50);n.get(38)==="off"?this.renderWhitespace=n.get(100):this.renderWhitespace="none",this.renderControlCharacters=n.get(95),this.spaceWidth=s.spaceWidth,this.middotWidth=s.middotWidth,this.wsmiddotWidth=s.wsmiddotWidth,this.useMonospaceOptimizations=s.isMonospace&&!n.get(33),this.canUseHalfwidthRightwardsArrow=s.canUseHalfwidthRightwardsArrow,this.lineHeight=n.get(67),this.stopRenderingLineAfter=n.get(118),this.fontLigatures=n.get(51)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}const wCe=class wCe{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(this._renderedViewLine)this._renderedViewLine.domNode=_u(e);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return RE(this._options.themeType)||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(e,i,n,s,c){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const d=s.getViewLineRenderingData(e),f=this._options,m=mv.filter(d.inlineDecorations,e,d.minColumn,d.maxColumn);let v=null;if(RE(f.themeType)||this._options.renderWhitespace==="selection"){const P=s.selections;for(const O of P){if(O.endLineNumber<e||O.startLineNumber>e)continue;const z=O.startLineNumber===e?O.startColumn:d.minColumn,J=O.endLineNumber===e?O.endColumn:d.maxColumn;z<J&&(RE(f.themeType)&&m.push(new mv(z,J,"inline-selected-text",0)),this._options.renderWhitespace==="selection"&&(v||(v=[]),v.push(new aIt(z-1,J-1))))}}const x=new zR(f.useMonospaceOptimizations,f.canUseHalfwidthRightwardsArrow,d.content,d.continuesWithWrappedLine,d.isBasicASCII,d.containsRTL,d.minColumn-1,d.tokens,m,d.tabSize,d.startVisibleColumn,f.spaceWidth,f.middotWidth,f.wsmiddotWidth,f.stopRenderingLineAfter,f.renderWhitespace,f.renderControlCharacters,f.fontLigatures!==mR.OFF,v);if(this._renderedViewLine&&this._renderedViewLine.input.equals(x))return!1;c.appendString('<div style="top:'),c.appendString(String(i)),c.appendString("px;height:"),c.appendString(String(n)),c.appendString('px;" class="'),c.appendString(wCe.CLASS_NAME),c.appendString('">');const w=Ose(x,c);c.appendString("</div>");let I=null;return i$&&_xi&&d.isBasicASCII&&f.useMonospaceOptimizations&&w.containsForeignElements===0&&(I=new S0e(this._renderedViewLine?this._renderedViewLine.domNode:null,x,w.characterMapping)),I||(I=mIt(this._renderedViewLine?this._renderedViewLine.domNode:null,x,w.characterMapping,w.containsRTL,w.containsForeignElements)),this._renderedViewLine=I,!0}layoutLine(e,i,n){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(i),this._renderedViewLine.domNode.setHeight(n))}getWidth(e){return this._renderedViewLine?this._renderedViewLine.getWidth(e):0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof S0e:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof S0e?this._renderedViewLine.monospaceAssumptionsAreValid():i$}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof S0e&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,i,n,s){if(!this._renderedViewLine)return null;i=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,i)),n=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,n));const c=this._renderedViewLine.input.stopRenderingLineAfter;if(c!==-1&&i>c+1&&n>c+1)return new CSt(!0,[new C9(this.getWidth(s),0)]);c!==-1&&i>c+1&&(i=c+1),c!==-1&&n>c+1&&(n=c+1);const d=this._renderedViewLine.getVisibleRangesForRange(e,i,n,s);return d&&d.length>0?new CSt(!1,d):null}getColumnOfNodeOffset(e,i){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,i):1}};wCe.CLASS_NAME="view-line";let R4=wCe;class S0e{constructor(e,i,n){this._cachedWidth=-1,this.domNode=e,this.input=i;const s=Math.floor(i.lineContent.length/300);if(s>0){this._keyColumnPixelOffsetCache=new Float32Array(s);for(let c=0;c<s;c++)this._keyColumnPixelOffsetCache[c]=-1}else this._keyColumnPixelOffsetCache=null;this._characterMapping=n,this._charWidth=i.spaceWidth}getWidth(e){if(!this.domNode||this.input.lineContent.length<300){const i=this._characterMapping.getHorizontalOffset(this._characterMapping.length);return Math.round(this._charWidth*i)}return this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,e==null||e.markDidDomLayout()),this._cachedWidth}getWidthIsFast(){return this.input.lineContent.length<300||this._cachedWidth!==-1}monospaceAssumptionsAreValid(){if(!this.domNode)return i$;if(this.input.lineContent.length<300){const e=this.getWidth(null),i=this.domNode.domNode.firstChild.offsetWidth;Math.abs(e-i)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),i$=!1)}return i$}toSlowRenderedLine(){return mIt(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,i,n,s){const c=this._getColumnPixelOffset(e,i,s),d=this._getColumnPixelOffset(e,n,s);return[new C9(c,d-c)]}_getColumnPixelOffset(e,i,n){if(i<=300){const v=this._characterMapping.getHorizontalOffset(i);return this._charWidth*v}const s=Math.floor((i-1)/300)-1,c=(s+1)*300+1;let d=-1;if(this._keyColumnPixelOffsetCache&&(d=this._keyColumnPixelOffsetCache[s],d===-1&&(d=this._actualReadPixelOffset(e,c,n),this._keyColumnPixelOffsetCache[s]=d)),d===-1){const v=this._characterMapping.getHorizontalOffset(i);return this._charWidth*v}const f=this._characterMapping.getHorizontalOffset(c),m=this._characterMapping.getHorizontalOffset(i);return d+this._charWidth*(m-f)}_getReadingTarget(e){return e.domNode.firstChild}_actualReadPixelOffset(e,i,n){if(!this.domNode)return-1;const s=this._characterMapping.getDomPosition(i),c=x1e.readHorizontalRanges(this._getReadingTarget(this.domNode),s.partIndex,s.charIndex,s.partIndex,s.charIndex,n);return!c||c.length===0?-1:c[0].left}getColumnOfNodeOffset(e,i){return $Je(this._characterMapping,e,i)}}class pIt{constructor(e,i,n,s,c){if(this.domNode=e,this.input=i,this._characterMapping=n,this._isWhitespaceOnly=/^\s*$/.test(i.lineContent),this._containsForeignElements=c,this._cachedWidth=-1,this._pixelOffsetCache=null,!s||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let d=0,f=this._characterMapping.length;d<=f;d++)this._pixelOffsetCache[d]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(e){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,e==null||e.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(e,i,n,s){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const c=this._readPixelOffset(this.domNode,e,i,s);if(c===-1)return null;const d=this._readPixelOffset(this.domNode,e,n,s);return d===-1?null:[new C9(c,d-c)]}return this._readVisibleRangesForRange(this.domNode,e,i,n,s)}_readVisibleRangesForRange(e,i,n,s,c){if(n===s){const d=this._readPixelOffset(e,i,n,c);return d===-1?null:[new C9(d,0)]}else return this._readRawVisibleRangesForRange(e,n,s,c)}_readPixelOffset(e,i,n,s){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth(s);const c=this._getReadingTarget(e);return c.firstChild?(s.markDidDomLayout(),c.firstChild.offsetWidth):0}if(this._pixelOffsetCache!==null){const c=this._pixelOffsetCache[n];if(c!==-1)return c;const d=this._actualReadPixelOffset(e,i,n,s);return this._pixelOffsetCache[n]=d,d}return this._actualReadPixelOffset(e,i,n,s)}_actualReadPixelOffset(e,i,n,s){if(this._characterMapping.length===0){const m=x1e.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,s);return!m||m.length===0?-1:m[0].left}if(n===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth(s);const c=this._characterMapping.getDomPosition(n),d=x1e.readHorizontalRanges(this._getReadingTarget(e),c.partIndex,c.charIndex,c.partIndex,c.charIndex,s);if(!d||d.length===0)return-1;const f=d[0].left;if(this.input.isBasicASCII){const m=this._characterMapping.getHorizontalOffset(n),v=Math.round(this.input.spaceWidth*m);if(Math.abs(v-f)<=1)return v}return f}_readRawVisibleRangesForRange(e,i,n,s){if(i===1&&n===this._characterMapping.length)return[new C9(0,this.getWidth(s))];const c=this._characterMapping.getDomPosition(i),d=this._characterMapping.getDomPosition(n);return x1e.readHorizontalRanges(this._getReadingTarget(e),c.partIndex,c.charIndex,d.partIndex,d.charIndex,s)}getColumnOfNodeOffset(e,i){return $Je(this._characterMapping,e,i)}}class pxi extends pIt{_readVisibleRangesForRange(e,i,n,s,c){const d=super._readVisibleRangesForRange(e,i,n,s,c);if(!d||d.length===0||n===s||n===1&&s===this._characterMapping.length)return d;if(!this.input.containsRTL){const f=this._readPixelOffset(e,i,s,c);if(f!==-1){const m=d[d.length-1];m.left<f&&(m.width=f-m.left)}}return d}}const mIt=function(){return f9?mxi:gxi}();function mxi(l,e,i,n,s){return new pxi(l,e,i,n,s)}function gxi(l,e,i,n,s){return new pIt(l,e,i,n,s)}function $Je(l,e,i){const n=e.textContent.length;let s=-1;for(;e;)e=e.previousSibling,s++;return l.getColumn(new cIt(s,i),n)}class Sre{static whitespaceVisibleColumn(e,i,n){const s=e.length;let c=0,d=-1,f=-1;for(let m=0;m<s;m++){if(m===i)return[d,f,c];switch(c%n===0&&(d=m,f=c),e.charCodeAt(m)){case 32:c+=1;break;case 9:c=em.nextRenderTabStop(c,n);break;default:return[-1,-1,-1]}}return i===s?[d,f,c]:[-1,-1,-1]}static atomicPosition(e,i,n,s){const c=e.length,[d,f,m]=Sre.whitespaceVisibleColumn(e,i,n);if(m===-1)return-1;let v;switch(s){case 0:v=!0;break;case 1:v=!1;break;case 2:if(m%n===0)return i;v=m%n<=n/2;break}if(v){if(d===-1)return-1;let I=f;for(let P=d;P<c;++P){if(I===f+n)return d;switch(e.charCodeAt(P)){case 32:I+=1;break;case 9:I=em.nextRenderTabStop(I,n);break;default:return-1}}return I===f+n?d:-1}const x=em.nextRenderTabStop(m,n);let w=m;for(let I=i;I<c;I++){if(w===x)return I;switch(e.charCodeAt(I)){case 32:w+=1;break;case 9:w=em.nextRenderTabStop(w,n);break;default:return-1}}return w===x?c:-1}}class dM{constructor(e=null){this.hitTarget=e,this.type=0}}class gIt{get hitTarget(){return this.spanNode}constructor(e,i,n){this.position=e,this.spanNode=i,this.injectedText=n,this.type=1}}var $F;(function(l){function e(i,n,s){const c=i.getPositionFromDOMInfo(n,s);return c?new gIt(c,n,null):new dM(n)}l.createFromDOMInfo=e})($F||($F={}));class yxi{constructor(e,i){this.lastViewCursorsRenderData=e,this.lastTextareaPosition=i}}class vy{static _deduceRage(e,i=null){return!i&&e?new nt(e.lineNumber,e.column,e.lineNumber,e.column):i??null}static createUnknown(e,i,n){return{type:0,element:e,mouseColumn:i,position:n,range:this._deduceRage(n)}}static createTextarea(e,i){return{type:1,element:e,mouseColumn:i,position:null,range:null}}static createMargin(e,i,n,s,c,d){return{type:e,element:i,mouseColumn:n,position:s,range:c,detail:d}}static createViewZone(e,i,n,s,c){return{type:e,element:i,mouseColumn:n,position:s,range:this._deduceRage(s),detail:c}}static createContentText(e,i,n,s,c){return{type:6,element:e,mouseColumn:i,position:n,range:this._deduceRage(n,s),detail:c}}static createContentEmpty(e,i,n,s){return{type:7,element:e,mouseColumn:i,position:n,range:this._deduceRage(n),detail:s}}static createContentWidget(e,i,n){return{type:9,element:e,mouseColumn:i,position:null,range:null,detail:n}}static createScrollbar(e,i,n){return{type:11,element:e,mouseColumn:i,position:n,range:this._deduceRage(n)}}static createOverlayWidget(e,i,n){return{type:12,element:e,mouseColumn:i,position:null,range:null,detail:n}}static createOutsideEditor(e,i,n,s){return{type:13,element:null,mouseColumn:e,position:i,range:this._deduceRage(i),outsidePosition:n,outsideDistance:s}}static _typeToString(e){return e===1?"TEXTAREA":e===2?"GUTTER_GLYPH_MARGIN":e===3?"GUTTER_LINE_NUMBERS":e===4?"GUTTER_LINE_DECORATIONS":e===5?"GUTTER_VIEW_ZONE":e===6?"CONTENT_TEXT":e===7?"CONTENT_EMPTY":e===8?"CONTENT_VIEW_ZONE":e===9?"CONTENT_WIDGET":e===10?"OVERVIEW_RULER":e===11?"SCROLLBAR":e===12?"OVERLAY_WIDGET":"UNKNOWN"}static toString(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+JSON.stringify(e.detail)}}class cv{static isTextArea(e){return e.length===2&&e[0]===3&&e[1]===7}static isChildOfViewLines(e){return e.length>=4&&e[0]===3&&e[3]===8}static isStrictChildOfViewLines(e){return e.length>4&&e[0]===3&&e[3]===8}static isChildOfScrollableElement(e){return e.length>=2&&e[0]===3&&e[1]===6}static isChildOfMinimap(e){return e.length>=2&&e[0]===3&&e[1]===9}static isChildOfContentWidgets(e){return e.length>=4&&e[0]===3&&e[3]===1}static isChildOfOverflowGuard(e){return e.length>=1&&e[0]===3}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&e[0]===2}static isChildOfOverlayWidgets(e){return e.length>=2&&e[0]===3&&e[1]===4}static isChildOfOverflowingOverlayWidgets(e){return e.length>=1&&e[0]===5}}class $${constructor(e,i,n){this.viewModel=e.viewModel;const s=e.configuration.options;this.layoutInfo=s.get(146),this.viewDomNode=i.viewDomNode,this.lineHeight=s.get(67),this.stickyTabStops=s.get(117),this.typicalHalfwidthCharacterWidth=s.get(50).typicalHalfwidthCharacterWidth,this.lastRenderData=n,this._context=e,this._viewHelper=i}getZoneAtCoord(e){return $$.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,i){const n=e.viewLayout.getWhitespaceAtVerticalOffset(i);if(n){const s=n.verticalOffset+n.height/2,c=e.viewModel.getLineCount();let d=null,f,m=null;return n.afterLineNumber!==c&&(m=new pi(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(d=new pi(n.afterLineNumber,e.viewModel.getLineMaxColumn(n.afterLineNumber))),m===null?f=d:d===null?f=m:i<s?f=d:f=m,{viewZoneId:n.id,afterLineNumber:n.afterLineNumber,positionBefore:d,positionAfter:m,position:f}}return null}getFullLineRangeAtCoord(e){if(this._context.viewLayout.isAfterLines(e)){const s=this._context.viewModel.getLineCount(),c=this._context.viewModel.getLineMaxColumn(s);return{range:new nt(s,c,s,c),isAfterLines:!0}}const i=this._context.viewLayout.getLineNumberAtVerticalOffset(e),n=this._context.viewModel.getLineMaxColumn(i);return{range:new nt(i,1,i,n),isAfterLines:!1}}getLineNumberAtVerticalOffset(e){return this._context.viewLayout.getLineNumberAtVerticalOffset(e)}isAfterLines(e){return this._context.viewLayout.isAfterLines(e)}isInTopPadding(e){return this._context.viewLayout.isInTopPadding(e)}isInBottomPadding(e){return this._context.viewLayout.isInBottomPadding(e)}getVerticalOffsetForLineNumber(e){return this._context.viewLayout.getVerticalOffsetForLineNumber(e)}findAttribute(e,i){return $$._findAttribute(e,i,this._viewHelper.viewDomNode)}static _findAttribute(e,i,n){for(;e&&e!==e.ownerDocument.body;){if(e.hasAttribute&&e.hasAttribute(i))return e.getAttribute(i);if(e===n)return null;e=e.parentNode}return null}getLineWidth(e){return this._viewHelper.getLineWidth(e)}visibleRangeForPosition(e,i){return this._viewHelper.visibleRangeForPosition(e,i)}getPositionFromDOMInfo(e,i){return this._viewHelper.getPositionFromDOMInfo(e,i)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}class vxi{constructor(e,i,n,s){this.editorPos=i,this.pos=n,this.relativePos=s,this.mouseVerticalOffset=Math.max(0,e.getCurrentScrollTop()+this.relativePos.y),this.mouseContentHorizontalOffset=e.getCurrentScrollLeft()+this.relativePos.x-e.layoutInfo.contentLeft,this.isInMarginArea=this.relativePos.x<e.layoutInfo.contentLeft&&this.relativePos.x>=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,yy._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class bxi extends vxi{get target(){return this._useHitTestTarget?this.hitTestResult.value.hitTarget:this._eventTarget}get targetPath(){return this._targetPathCacheElement!==this.target&&(this._targetPathCacheElement=this.target,this._targetPathCacheValue=JE.collect(this.target,this._ctx.viewDomNode)),this._targetPathCacheValue}constructor(e,i,n,s,c){super(e,i,n,s),this.hitTestResult=new HE(()=>yy.doHitTest(this._ctx,this)),this._targetPathCacheElement=null,this._targetPathCacheValue=new Uint8Array(0),this._ctx=e,this._eventTarget=c;const d=!!this._eventTarget;this._useHitTestTarget=!d}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}
+ target: ${this.target?this.target.outerHTML:null}`}get wouldBenefitFromHitTestTargetSwitch(){return!this._useHitTestTarget&&this.hitTestResult.value.hitTarget!==null&&this.target!==this.hitTestResult.value.hitTarget}switchToHitTestTarget(){this._useHitTestTarget=!0}_getMouseColumn(e=null){return e&&e.column<this._ctx.viewModel.getLineMaxColumn(e.lineNumber)?em.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(e.lineNumber),e.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(e=null){return vy.createUnknown(this.target,this._getMouseColumn(e),e)}fulfillTextarea(){return vy.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(e,i,n,s){return vy.createMargin(e,this.target,this._getMouseColumn(i),i,n,s)}fulfillViewZone(e,i,n){return vy.createViewZone(e,this.target,this._getMouseColumn(i),i,n)}fulfillContentText(e,i,n){return vy.createContentText(this.target,this._getMouseColumn(e),e,i,n)}fulfillContentEmpty(e,i){return vy.createContentEmpty(this.target,this._getMouseColumn(e),e,i)}fulfillContentWidget(e){return vy.createContentWidget(this.target,this._getMouseColumn(),e)}fulfillScrollbar(e){return vy.createScrollbar(this.target,this._getMouseColumn(e),e)}fulfillOverlayWidget(e){return vy.createOverlayWidget(this.target,this._getMouseColumn(),e)}}const wSt={isAfterLines:!0};function u9e(l){return{isAfterLines:!1,horizontalDistanceToText:l}}class yy{constructor(e,i){this._context=e,this._viewHelper=i}mouseTargetIsWidget(e){const i=e.target,n=JE.collect(i,this._viewHelper.viewDomNode);return!!(cv.isChildOfContentWidgets(n)||cv.isChildOfOverflowingContentWidgets(n)||cv.isChildOfOverlayWidgets(n)||cv.isChildOfOverflowingOverlayWidgets(n))}createMouseTarget(e,i,n,s,c){const d=new $$(this._context,this._viewHelper,e),f=new bxi(d,i,n,s,c);try{const m=yy._createMouseTarget(d,f);if(m.type===6&&d.stickyTabStops&&m.position!==null){const v=yy._snapToSoftTabBoundary(m.position,d.viewModel),x=nt.fromPositions(v,v).plusRange(m.range);return f.fulfillContentText(v,x,m.detail)}return m}catch{return f.fulfillUnknown()}}static _createMouseTarget(e,i){if(i.target===null)return i.fulfillUnknown();const n=i;let s=null;return!cv.isChildOfOverflowGuard(i.targetPath)&&!cv.isChildOfOverflowingContentWidgets(i.targetPath)&&!cv.isChildOfOverflowingOverlayWidgets(i.targetPath)&&(s=s||i.fulfillUnknown()),s=s||yy._hitTestContentWidget(e,n),s=s||yy._hitTestOverlayWidget(e,n),s=s||yy._hitTestMinimap(e,n),s=s||yy._hitTestScrollbarSlider(e,n),s=s||yy._hitTestViewZone(e,n),s=s||yy._hitTestMargin(e,n),s=s||yy._hitTestViewCursor(e,n),s=s||yy._hitTestTextArea(e,n),s=s||yy._hitTestViewLines(e,n),s=s||yy._hitTestScrollbar(e,n),s||i.fulfillUnknown()}static _hitTestContentWidget(e,i){if(cv.isChildOfContentWidgets(i.targetPath)||cv.isChildOfOverflowingContentWidgets(i.targetPath)){const n=e.findAttribute(i.target,"widgetId");return n?i.fulfillContentWidget(n):i.fulfillUnknown()}return null}static _hitTestOverlayWidget(e,i){if(cv.isChildOfOverlayWidgets(i.targetPath)||cv.isChildOfOverflowingOverlayWidgets(i.targetPath)){const n=e.findAttribute(i.target,"widgetId");return n?i.fulfillOverlayWidget(n):i.fulfillUnknown()}return null}static _hitTestViewCursor(e,i){if(i.target){const n=e.lastRenderData.lastViewCursorsRenderData;for(const s of n)if(i.target===s.domNode)return i.fulfillContentText(s.position,null,{mightBeForeignElement:!1,injectedText:null})}if(i.isInContentArea){const n=e.lastRenderData.lastViewCursorsRenderData,s=i.mouseContentHorizontalOffset,c=i.mouseVerticalOffset;for(const d of n){if(s<d.contentLeft||s>d.contentLeft+d.width)continue;const f=e.getVerticalOffsetForLineNumber(d.position.lineNumber);if(f<=c&&c<=f+d.height)return i.fulfillContentText(d.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,i){const n=e.getZoneAtCoord(i.mouseVerticalOffset);if(n){const s=i.isInContentArea?8:5;return i.fulfillViewZone(s,n.position,n)}return null}static _hitTestTextArea(e,i){return cv.isTextArea(i.targetPath)?e.lastRenderData.lastTextareaPosition?i.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):i.fulfillTextarea():null}static _hitTestMargin(e,i){if(i.isInMarginArea){const n=e.getFullLineRangeAtCoord(i.mouseVerticalOffset),s=n.range.getStartPosition();let c=Math.abs(i.relativePos.x);const d={isAfterLines:n.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:c};if(c-=e.layoutInfo.glyphMarginLeft,c<=e.layoutInfo.glyphMarginWidth){const f=e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(n.range.getStartPosition()),m=e.viewModel.glyphLanes.getLanesAtLine(f.lineNumber);return d.glyphMarginLane=m[Math.floor(c/e.lineHeight)],i.fulfillMargin(2,s,n.range,d)}return c-=e.layoutInfo.glyphMarginWidth,c<=e.layoutInfo.lineNumbersWidth?i.fulfillMargin(3,s,n.range,d):(c-=e.layoutInfo.lineNumbersWidth,i.fulfillMargin(4,s,n.range,d))}return null}static _hitTestViewLines(e,i){if(!cv.isChildOfViewLines(i.targetPath))return null;if(e.isInTopPadding(i.mouseVerticalOffset))return i.fulfillContentEmpty(new pi(1,1),wSt);if(e.isAfterLines(i.mouseVerticalOffset)||e.isInBottomPadding(i.mouseVerticalOffset)){const s=e.viewModel.getLineCount(),c=e.viewModel.getLineMaxColumn(s);return i.fulfillContentEmpty(new pi(s,c),wSt)}if(cv.isStrictChildOfViewLines(i.targetPath)){const s=e.getLineNumberAtVerticalOffset(i.mouseVerticalOffset);if(e.viewModel.getLineLength(s)===0){const d=e.getLineWidth(s),f=u9e(i.mouseContentHorizontalOffset-d);return i.fulfillContentEmpty(new pi(s,1),f)}const c=e.getLineWidth(s);if(i.mouseContentHorizontalOffset>=c){const d=u9e(i.mouseContentHorizontalOffset-c),f=new pi(s,e.viewModel.getLineMaxColumn(s));return i.fulfillContentEmpty(f,d)}}const n=i.hitTestResult.value;return n.type===1?yy.createMouseTargetFromHitTestPosition(e,i,n.spanNode,n.position,n.injectedText):i.wouldBenefitFromHitTestTargetSwitch?(i.switchToHitTestTarget(),this._createMouseTarget(e,i)):i.fulfillUnknown()}static _hitTestMinimap(e,i){if(cv.isChildOfMinimap(i.targetPath)){const n=e.getLineNumberAtVerticalOffset(i.mouseVerticalOffset),s=e.viewModel.getLineMaxColumn(n);return i.fulfillScrollbar(new pi(n,s))}return null}static _hitTestScrollbarSlider(e,i){if(cv.isChildOfScrollableElement(i.targetPath)&&i.target&&i.target.nodeType===1){const n=i.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){const s=e.getLineNumberAtVerticalOffset(i.mouseVerticalOffset),c=e.viewModel.getLineMaxColumn(s);return i.fulfillScrollbar(new pi(s,c))}}return null}static _hitTestScrollbar(e,i){if(cv.isChildOfScrollableElement(i.targetPath)){const n=e.getLineNumberAtVerticalOffset(i.mouseVerticalOffset),s=e.viewModel.getLineMaxColumn(n);return i.fulfillScrollbar(new pi(n,s))}return null}getMouseColumn(e){const i=this._context.configuration.options,n=i.get(146),s=this._context.viewLayout.getCurrentScrollLeft()+e.x-n.contentLeft;return yy._getMouseColumn(s,i.get(50).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,i){return e<0?1:Math.round(e/i)+1}static createMouseTargetFromHitTestPosition(e,i,n,s,c){const d=s.lineNumber,f=s.column,m=e.getLineWidth(d);if(i.mouseContentHorizontalOffset>m){const Y=u9e(i.mouseContentHorizontalOffset-m);return i.fulfillContentEmpty(s,Y)}const v=e.visibleRangeForPosition(d,f);if(!v)return i.fulfillUnknown(s);const x=v.left;if(Math.abs(i.mouseContentHorizontalOffset-x)<1)return i.fulfillContentText(s,null,{mightBeForeignElement:!!c,injectedText:c});const w=[];if(w.push({offset:v.left,column:f}),f>1){const Y=e.visibleRangeForPosition(d,f-1);Y&&w.push({offset:Y.left,column:f-1})}const I=e.viewModel.getLineMaxColumn(d);if(f<I){const Y=e.visibleRangeForPosition(d,f+1);Y&&w.push({offset:Y.left,column:f+1})}w.sort((Y,ae)=>Y.offset-ae.offset);const P=i.pos.toClientCoordinates(Eo(e.viewDomNode)),O=n.getBoundingClientRect(),z=O.left<=P.clientX&&P.clientX<=O.right;let J=null;for(let Y=1;Y<w.length;Y++){const ae=w[Y-1],me=w[Y];if(ae.offset<=i.mouseContentHorizontalOffset&&i.mouseContentHorizontalOffset<=me.offset){J=new nt(d,ae.column,d,me.column);const ye=Math.abs(ae.offset-i.mouseContentHorizontalOffset),Ce=Math.abs(me.offset-i.mouseContentHorizontalOffset);s=ye<Ce?new pi(d,ae.column):new pi(d,me.column);break}}return i.fulfillContentText(s,J,{mightBeForeignElement:!z||!!c,injectedText:c})}static _doHitTestWithCaretRangeFromPoint(e,i){const n=e.getLineNumberAtVerticalOffset(i.mouseVerticalOffset),s=e.getVerticalOffsetForLineNumber(n),c=s+e.lineHeight;if(!(n===e.viewModel.getLineCount()&&i.mouseVerticalOffset>c)){const f=Math.floor((s+c)/2);let m=i.pos.y+(f-i.mouseVerticalOffset);m<=i.editorPos.y&&(m=i.editorPos.y+1),m>=i.editorPos.y+i.editorPos.height&&(m=i.editorPos.y+i.editorPos.height-1);const v=new Lwe(i.pos.x,m),x=this._actualDoHitTestWithCaretRangeFromPoint(e,v.toClientCoordinates(Eo(e.viewDomNode)));if(x.type===1)return x}return this._actualDoHitTestWithCaretRangeFromPoint(e,i.pos.toClientCoordinates(Eo(e.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(e,i){const n=kB(e.viewDomNode);let s;if(n?typeof n.caretRangeFromPoint>"u"?s=Cxi(n,i.clientX,i.clientY):s=n.caretRangeFromPoint(i.clientX,i.clientY):s=e.viewDomNode.ownerDocument.caretRangeFromPoint(i.clientX,i.clientY),!s||!s.startContainer)return new dM;const c=s.startContainer;if(c.nodeType===c.TEXT_NODE){const d=c.parentNode,f=d?d.parentNode:null,m=f?f.parentNode:null;return(m&&m.nodeType===m.ELEMENT_NODE?m.className:null)===R4.CLASS_NAME?$F.createFromDOMInfo(e,d,s.startOffset):new dM(c.parentNode)}else if(c.nodeType===c.ELEMENT_NODE){const d=c.parentNode,f=d?d.parentNode:null;return(f&&f.nodeType===f.ELEMENT_NODE?f.className:null)===R4.CLASS_NAME?$F.createFromDOMInfo(e,c,c.textContent.length):new dM(c)}return new dM}static _doHitTestWithCaretPositionFromPoint(e,i){const n=e.viewDomNode.ownerDocument.caretPositionFromPoint(i.clientX,i.clientY);if(n.offsetNode.nodeType===n.offsetNode.TEXT_NODE){const s=n.offsetNode.parentNode,c=s?s.parentNode:null,d=c?c.parentNode:null;return(d&&d.nodeType===d.ELEMENT_NODE?d.className:null)===R4.CLASS_NAME?$F.createFromDOMInfo(e,n.offsetNode.parentNode,n.offset):new dM(n.offsetNode.parentNode)}if(n.offsetNode.nodeType===n.offsetNode.ELEMENT_NODE){const s=n.offsetNode.parentNode,c=s&&s.nodeType===s.ELEMENT_NODE?s.className:null,d=s?s.parentNode:null,f=d&&d.nodeType===d.ELEMENT_NODE?d.className:null;if(c===R4.CLASS_NAME){const m=n.offsetNode.childNodes[Math.min(n.offset,n.offsetNode.childNodes.length-1)];if(m)return $F.createFromDOMInfo(e,m,0)}else if(f===R4.CLASS_NAME)return $F.createFromDOMInfo(e,n.offsetNode,0)}return new dM(n.offsetNode)}static _snapToSoftTabBoundary(e,i){const n=i.getLineContent(e.lineNumber),{tabSize:s}=i.model.getOptions(),c=Sre.atomicPosition(n,e.column-1,s,2);return c!==-1?new pi(e.lineNumber,c+1):e}static doHitTest(e,i){let n=new dM;if(typeof e.viewDomNode.ownerDocument.caretRangeFromPoint=="function"?n=this._doHitTestWithCaretRangeFromPoint(e,i):e.viewDomNode.ownerDocument.caretPositionFromPoint&&(n=this._doHitTestWithCaretPositionFromPoint(e,i.pos.toClientCoordinates(Eo(e.viewDomNode)))),n.type===1){const s=e.viewModel.getInjectedTextAt(n.position),c=e.viewModel.normalizePosition(n.position,2);(s||!c.equals(n.position))&&(n=new gIt(c,n.spanNode,s))}return n}}function Cxi(l,e,i){const n=document.createRange();let s=l.elementFromPoint(e,i);if(s!==null){for(;s&&s.firstChild&&s.firstChild.nodeType!==s.firstChild.TEXT_NODE&&s.lastChild&&s.lastChild.firstChild;)s=s.lastChild;const c=s.getBoundingClientRect(),d=Eo(s),f=d.getComputedStyle(s,null).getPropertyValue("font-style"),m=d.getComputedStyle(s,null).getPropertyValue("font-variant"),v=d.getComputedStyle(s,null).getPropertyValue("font-weight"),x=d.getComputedStyle(s,null).getPropertyValue("font-size"),w=d.getComputedStyle(s,null).getPropertyValue("line-height"),I=d.getComputedStyle(s,null).getPropertyValue("font-family"),P=`${f} ${m} ${v} ${x}/${w} ${I}`,O=s.innerText;let z=c.left,J=0,Y;if(e>c.left+c.width)J=O.length;else{const ae=ije.getInstance();for(let me=0;me<O.length+1;me++){if(Y=ae.getCharWidth(O.charAt(me),P)/2,z+=Y,e<z){J=me;break}z+=Y}}n.setStart(s.firstChild,J),n.setEnd(s.firstChild,J)}return n}const YF=class YF{static getInstance(){return YF._INSTANCE||(YF._INSTANCE=new YF),YF._INSTANCE}constructor(){this._cache={},this._canvas=document.createElement("canvas")}getCharWidth(e,i){const n=e+i;if(this._cache[n])return this._cache[n];const s=this._canvas.getContext("2d");s.font=i;const d=s.measureText(e).width;return this._cache[n]=d,d}};YF._INSTANCE=null;let ije=YF;class JJe extends Mse{constructor(e,i,n){super(),this._mouseLeaveMonitor=null,this._context=e,this.viewController=i,this.viewHelper=n,this.mouseTargetFactory=new yy(this._context,n),this._mouseDownOperation=this._register(new Sxi(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(d,f)=>this._createMouseTarget(d,f),d=>this._getMouseColumn(d))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(146).height;const s=new sxi(this.viewHelper.viewDomNode);this._register(s.onContextMenu(this.viewHelper.viewDomNode,d=>this._onContextMenu(d,!0))),this._register(s.onMouseMove(this.viewHelper.viewDomNode,d=>{this._onMouseMove(d),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=en(this.viewHelper.viewDomNode.ownerDocument,"mousemove",f=>{this.viewHelper.viewDomNode.contains(f.target)||this._onMouseLeave(new IR(f,!1,this.viewHelper.viewDomNode))}))})),this._register(s.onMouseUp(this.viewHelper.viewDomNode,d=>this._onMouseUp(d))),this._register(s.onMouseLeave(this.viewHelper.viewDomNode,d=>this._onMouseLeave(d)));let c=0;this._register(s.onPointerDown(this.viewHelper.viewDomNode,(d,f)=>{c=f})),this._register(en(this.viewHelper.viewDomNode,br.POINTER_UP,d=>{this._mouseDownOperation.onPointerUp()})),this._register(s.onMouseDown(this.viewHelper.viewDomNode,d=>this._onMouseDown(d,c))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const e=Eye.INSTANCE;let i=0,n=fk.getZoomLevel(),s=!1,c=0;const d=m=>{if(this.viewController.emitMouseWheel(m),!this._context.configuration.options.get(76))return;const v=new xB(m);if(e.acceptStandardWheelEvent(v),e.isPhysicalMouseWheel()){if(f(m)){const x=fk.getZoomLevel(),w=v.deltaY>0?1:-1;fk.setZoomLevel(x+w),v.preventDefault(),v.stopPropagation()}}else Date.now()-i>50&&(n=fk.getZoomLevel(),s=f(m),c=0),i=Date.now(),c+=v.deltaY,s&&(fk.setZoomLevel(n+c/5),v.preventDefault(),v.stopPropagation())};this._register(en(this.viewHelper.viewDomNode,br.MOUSE_WHEEL,d,{capture:!0,passive:!1}));function f(m){return Hc?(m.metaKey||m.ctrlKey)&&!m.shiftKey&&!m.altKey:m.ctrlKey&&!m.metaKey&&!m.shiftKey&&!m.altKey}}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(146)){const i=this._context.configuration.options.get(146).height;this._height!==i&&(this._height=i,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,i){const s=new _It(e,i).toPageCoordinates(Eo(this.viewHelper.viewDomNode)),c=UJe(this.viewHelper.viewDomNode);if(s.y<c.y||s.y>c.y+c.height||s.x<c.x||s.x>c.x+c.width)return null;const d=qJe(this.viewHelper.viewDomNode,c,s);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),c,s,d,null)}_createMouseTarget(e,i){let n=e.target;if(!this.viewHelper.viewDomNode.contains(n)){const s=kB(this.viewHelper.viewDomNode);s&&(n=s.elementsFromPoint(e.posx,e.posy).find(c=>this.viewHelper.viewDomNode.contains(c)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,i?n:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,i){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,i)})}_onMouseMove(e){this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),!(this._mouseDownOperation.isActive()||e.timestamp<this.lastMouseLeaveTime)&&this.viewController.emitMouseMove({event:e,target:this._createMouseTarget(e,!0)})}_onMouseLeave(e){this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),this.lastMouseLeaveTime=new Date().getTime(),this.viewController.emitMouseLeave({event:e,target:null})}_onMouseUp(e){this.viewController.emitMouseUp({event:e,target:this._createMouseTarget(e,!0)})}_onMouseDown(e,i){const n=this._createMouseTarget(e,!0),s=n.type===6||n.type===7,c=n.type===2||n.type===3||n.type===4,d=n.type===3,f=this._context.configuration.options.get(110),m=n.type===8||n.type===5,v=n.type===9;let x=e.leftButton||e.middleButton;Hc&&e.leftButton&&e.ctrlKey&&(x=!1);const w=()=>{e.preventDefault(),this.viewHelper.focusTextArea()};if(x&&(s||d&&f))w(),this._mouseDownOperation.start(n.type,e,i);else if(c)e.preventDefault();else if(m){const I=n.detail;x&&this.viewHelper.shouldSuppressMouseDownOnViewZone(I.viewZoneId)&&(w(),this._mouseDownOperation.start(n.type,e,i),e.preventDefault())}else v&&this.viewHelper.shouldSuppressMouseDownOnWidget(n.detail)&&(w(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:n})}}class Sxi extends xi{constructor(e,i,n,s,c,d){super(),this._context=e,this._viewController=i,this._viewHelper=n,this._mouseTargetFactory=s,this._createMouseTarget=c,this._getMouseColumn=d,this._mouseMoveMonitor=this._register(new axi(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new wxi(this._context,this._viewHelper,this._mouseTargetFactory,(f,m,v)=>this._dispatchMouse(f,m,v))),this._mouseState=new nje,this._currentSelection=new Us(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const i=this._findMousePosition(e,!1);i&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:i}):i.type===13&&(i.outsidePosition==="above"||i.outsidePosition==="below")?this._topBottomDragScrolling.start(i,e):(this._topBottomDragScrolling.stop(),this._dispatchMouse(i,!0,1)))}start(e,i,n){this._lastMouseEvent=i,this._mouseState.setStartedOnLineNumbers(e===3),this._mouseState.setStartButtons(i),this._mouseState.setModifiers(i);const s=this._findMousePosition(i,!0);if(!s||!s.position)return;this._mouseState.trySetCount(i.detail,s.position),i.detail=this._mouseState.count;const c=this._context.configuration.options;if(!c.get(92)&&c.get(35)&&!c.get(22)&&!this._mouseState.altKey&&i.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&s.type===6&&s.position&&this._currentSelection.containsPosition(s.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,n,i.buttons,d=>this._onMouseDownThenMove(d),d=>{const f=this._findMousePosition(this._lastMouseEvent,!1);E4(d)?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:f?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(s,i.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,n,i.buttons,d=>this._onMouseDownThenMove(d),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const i=e.editorPos,n=this._context.viewModel,s=this._context.viewLayout,c=this._getMouseColumn(e);if(e.posy<i.y){const f=i.y-e.posy,m=Math.max(s.getCurrentScrollTop()-f,0),v=$$.getZoneAtCoord(this._context,m);if(v){const w=this._helpPositionJumpOverViewZone(v);if(w)return vy.createOutsideEditor(c,w,"above",f)}const x=s.getLineNumberAtVerticalOffset(m);return vy.createOutsideEditor(c,new pi(x,1),"above",f)}if(e.posy>i.y+i.height){const f=e.posy-i.y-i.height,m=s.getCurrentScrollTop()+e.relativePos.y,v=$$.getZoneAtCoord(this._context,m);if(v){const w=this._helpPositionJumpOverViewZone(v);if(w)return vy.createOutsideEditor(c,w,"below",f)}const x=s.getLineNumberAtVerticalOffset(m);return vy.createOutsideEditor(c,new pi(x,n.getLineMaxColumn(x)),"below",f)}const d=s.getLineNumberAtVerticalOffset(s.getCurrentScrollTop()+e.relativePos.y);if(e.posx<i.x){const f=i.x-e.posx;return vy.createOutsideEditor(c,new pi(d,1),"left",f)}if(e.posx>i.x+i.width){const f=e.posx-i.x-i.width;return vy.createOutsideEditor(c,new pi(d,n.getLineMaxColumn(d)),"right",f)}return null}_findMousePosition(e,i){const n=this._getPositionOutsideEditor(e);if(n)return n;const s=this._createMouseTarget(e,i);if(!s.position)return null;if(s.type===8||s.type===5){const d=this._helpPositionJumpOverViewZone(s.detail);if(d)return vy.createViewZone(s.type,s.element,s.mouseColumn,d,s.detail)}return s}_helpPositionJumpOverViewZone(e){const i=new pi(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,s=e.positionAfter;return n&&s?n.isBefore(i)?n:s:null}_dispatchMouse(e,i,n){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:n,inSelectionMode:i,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:e.type===6&&e.detail.injectedText!==null})}}class wxi extends xi{constructor(e,i,n,s){super(),this._context=e,this._viewHelper=i,this._mouseTargetFactory=n,this._dispatchMouse=s,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,i){this._operation?this._operation.setPosition(e,i):this._operation=new xxi(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,i)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class xxi extends xi{constructor(e,i,n,s,c,d){super(),this._context=e,this._viewHelper=i,this._mouseTargetFactory=n,this._dispatchMouse=s,this._position=c,this._mouseEvent=d,this._lastTime=Date.now(),this._animationFrameDisposable=ZC(Eo(d.browserEvent),()=>this._execute())}dispose(){this._animationFrameDisposable.dispose(),super.dispose()}setPosition(e,i){this._position=e,this._mouseEvent=i}_tick(){const e=Date.now(),i=e-this._lastTime;return this._lastTime=e,i}_getScrollSpeed(){const e=this._context.configuration.options.get(67),i=this._context.configuration.options.get(146).height/e,n=this._position.outsideDistance/e;return n<=1.5?Math.max(30,i*(1+n)):n<=3?Math.max(60,i*(2+n)):Math.max(200,i*(7+n))}_execute(){const e=this._context.configuration.options.get(67),i=this._getScrollSpeed(),n=this._tick(),s=i*(n/1e3)*e,c=this._position.outsidePosition==="above"?-s:s;this._context.viewModel.viewLayout.deltaScrollNow(0,c),this._viewHelper.renderNow();const d=this._context.viewLayout.getLinesViewportData(),f=this._position.outsidePosition==="above"?d.startLineNumber:d.endLineNumber;let m;{const v=UJe(this._viewHelper.viewDomNode),x=this._context.configuration.options.get(146).horizontalScrollbarHeight,w=new Lwe(this._mouseEvent.pos.x,v.y+v.height-x-.1),I=qJe(this._viewHelper.viewDomNode,v,w);m=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),v,w,I,null)}(!m.position||m.position.lineNumber!==f)&&(this._position.outsidePosition==="above"?m=vy.createOutsideEditor(this._position.mouseColumn,new pi(f,1),"above",this._position.outsideDistance):m=vy.createOutsideEditor(this._position.mouseColumn,new pi(f,this._context.viewModel.getLineMaxColumn(f)),"below",this._position.outsideDistance)),this._dispatchMouse(m,!0,2),this._animationFrameDisposable=ZC(Eo(m.element),()=>this._execute())}}const xCe=class xCe{get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,i){const n=new Date().getTime();n-this._lastSetMouseDownCountTime>xCe.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=n,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(i)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=i,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}};xCe.CLEAR_MOUSE_DOWN_COUNT_TIME=400;let nje=xCe;const Pq=class Pq{constructor(e,i,n,s,c){this.value=e,this.selectionStart=i,this.selectionEnd=n,this.selection=s,this.newlineCountBeforeSelection=c}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,i){const n=e.getValue(),s=e.getSelectionStart(),c=e.getSelectionEnd();let d;if(i){const f=n.substring(0,s),m=i.value.substring(0,i.selectionStart);f===m&&(d=i.newlineCountBeforeSelection)}return new Pq(n,s,c,null,d)}collapseSelection(){return this.selectionStart===this.value.length?this:new Pq(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(e,i,n){i.setValue(e,this.value),n&&i.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){var s,c,d,f;if(e<=this.selectionStart){const m=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(((s=this.selection)==null?void 0:s.getStartPosition())??null,m,-1)}if(e>=this.selectionEnd){const m=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(((c=this.selection)==null?void 0:c.getEndPosition())??null,m,1)}const i=this.value.substring(this.selectionStart,e);if(i.indexOf("…")===-1)return this._finishDeduceEditorPosition(((d=this.selection)==null?void 0:d.getStartPosition())??null,i,1);const n=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(((f=this.selection)==null?void 0:f.getEndPosition())??null,n,-1)}_finishDeduceEditorPosition(e,i,n){let s=0,c=-1;for(;(c=i.indexOf(`
+`,c+1))!==-1;)s++;return[e,n*i.length,s]}static deduceInput(e,i,n){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const s=Math.min(vR(e.value,i.value),e.selectionStart,i.selectionStart),c=Math.min(iye(e.value,i.value),e.value.length-e.selectionEnd,i.value.length-i.selectionEnd);e.value.substring(s,e.value.length-c);const d=i.value.substring(s,i.value.length-c),f=e.selectionStart-s,m=e.selectionEnd-s,v=i.selectionStart-s,x=i.selectionEnd-s;if(v===x){const I=e.selectionStart-s;return{text:d,replacePrevCharCnt:I,replaceNextCharCnt:0,positionDelta:0}}const w=m-f;return{text:d,replacePrevCharCnt:w,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e.value===i.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:i.selectionEnd-e.selectionEnd};const n=Math.min(vR(e.value,i.value),e.selectionEnd),s=Math.min(iye(e.value,i.value),e.value.length-e.selectionEnd),c=e.value.substring(n,e.value.length-s),d=i.value.substring(n,i.value.length-s);e.selectionStart-n;const f=e.selectionEnd-n;i.selectionStart-n;const m=i.selectionEnd-n;return{text:d,replacePrevCharCnt:f,replaceNextCharCnt:c.length-f,positionDelta:m-d.length}}};Pq.EMPTY=new Pq("",0,0,null,void 0);let by=Pq;class dq{static _getPageOfLine(e,i){return Math.floor((e-1)/i)}static _getRangeForPage(e,i){const n=e*i,s=n+1,c=n+i;return new nt(s,1,c+1,1)}static fromEditorSelection(e,i,n,s){const d=dq._getPageOfLine(i.startLineNumber,n),f=dq._getRangeForPage(d,n),m=dq._getPageOfLine(i.endLineNumber,n),v=dq._getRangeForPage(m,n);let x=f.intersectRanges(new nt(1,1,i.startLineNumber,i.startColumn));if(s&&e.getValueLengthInRange(x,1)>500){const Y=e.modifyPosition(x.getEndPosition(),-500);x=nt.fromPositions(Y,x.getEndPosition())}const w=e.getValueInRange(x,1),I=e.getLineCount(),P=e.getLineMaxColumn(I);let O=v.intersectRanges(new nt(i.endLineNumber,i.endColumn,I,P));if(s&&e.getValueLengthInRange(O,1)>500){const Y=e.modifyPosition(O.getStartPosition(),500);O=nt.fromPositions(O.getStartPosition(),Y)}const z=e.getValueInRange(O,1);let J;if(d===m||d+1===m)J=e.getValueInRange(i,1);else{const Y=f.intersectRanges(i),ae=v.intersectRanges(i);J=e.getValueInRange(Y,1)+"…"+e.getValueInRange(ae,1)}return s&&J.length>2*500&&(J=J.substring(0,500)+"…"+J.substring(J.length-500,J.length)),new by(w+J+z,w.length,w.length+J.length,i,x.endLineNumber-x.startLineNumber)}}var kxi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},xSt=function(l,e){return function(i,n){e(i,n,l)}},Sve;(function(l){l.Tap="-monaco-textarea-synthetic-tap"})(Sve||(Sve={}));const rje={forceCopyWithSyntaxHighlighting:!1},kCe=class kCe{constructor(){this._lastState=null}set(e,i){this._lastState={lastCopiedValue:e,data:i}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}};kCe.INSTANCE=new kCe;let wre=kCe;class Txi{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){e=e||"";const i={text:e,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,i}}let sje=class extends xi{get textAreaState(){return this._textAreaState}constructor(e,i,n,s,c,d){super(),this._host=e,this._textArea=i,this._OS=n,this._browser=s,this._accessibilityService=c,this._logService=d,this._onFocus=this._register(new gi),this.onFocus=this._onFocus.event,this._onBlur=this._register(new gi),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new gi),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new gi),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new gi),this.onCut=this._onCut.event,this._onPaste=this._register(new gi),this.onPaste=this._onPaste.event,this._onType=this._register(new gi),this.onType=this._onType.event,this._onCompositionStart=this._register(new gi),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new gi),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new gi),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new gi),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new Fm),this._asyncTriggerCut=this._register(new qu(()=>this._onCut.fire(),0)),this._textAreaState=by.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(Tr.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=this._register(new qu(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)):this._asyncFocusGainWriteScreenReaderContent.clear()})),this._hasFocus=!1,this._currentComposition=null;let f=null;this._register(this._textArea.onKeyDown(m=>{const v=new Id(m);(v.keyCode===114||this._currentComposition&&v.keyCode===1)&&v.stopPropagation(),v.equals(9)&&v.preventDefault(),f=v,this._onKeyDown.fire(v)})),this._register(this._textArea.onKeyUp(m=>{const v=new Id(m);this._onKeyUp.fire(v)})),this._register(this._textArea.onCompositionStart(m=>{const v=new Txi;if(this._currentComposition){this._currentComposition=v;return}if(this._currentComposition=v,this._OS===2&&f&&f.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===m.data&&(f.code==="ArrowRight"||f.code==="ArrowLeft")){v.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:m.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:m.data});return}this._onCompositionStart.fire({data:m.data})})),this._register(this._textArea.onCompositionUpdate(m=>{const v=this._currentComposition;if(!v)return;if(this._browser.isAndroid){const w=by.readFromTextArea(this._textArea,this._textAreaState),I=by.deduceAndroidCompositionInput(this._textAreaState,w);this._textAreaState=w,this._onType.fire(I),this._onCompositionUpdate.fire(m);return}const x=v.handleCompositionUpdate(m.data);this._textAreaState=by.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(x),this._onCompositionUpdate.fire(m)})),this._register(this._textArea.onCompositionEnd(m=>{const v=this._currentComposition;if(!v)return;if(this._currentComposition=null,this._browser.isAndroid){const w=by.readFromTextArea(this._textArea,this._textAreaState),I=by.deduceAndroidCompositionInput(this._textAreaState,w);this._textAreaState=w,this._onType.fire(I),this._onCompositionEnd.fire();return}const x=v.handleCompositionUpdate(m.data);this._textAreaState=by.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(x),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(m=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const v=by.readFromTextArea(this._textArea,this._textAreaState),x=by.deduceInput(this._textAreaState,v,this._OS===2);x.replacePrevCharCnt===0&&x.text.length===1&&(Pm(x.text.charCodeAt(0))||x.text.charCodeAt(0)===127)||(this._textAreaState=v,(x.text!==""||x.replacePrevCharCnt!==0||x.replaceNextCharCnt!==0||x.positionDelta!==0)&&this._onType.fire(x))})),this._register(this._textArea.onCut(m=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(m),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(m=>{this._ensureClipboardGetsEditorSelection(m)})),this._register(this._textArea.onPaste(m=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),m.preventDefault(),!m.clipboardData)return;let[v,x]=oje.getTextData(m.clipboardData);v&&(x=x||wre.INSTANCE.get(v),this._onPaste.fire({text:v,metadata:x}))})),this._register(this._textArea.onFocus(()=>{const m=this._hasFocus;this._setHasFocus(!0),this._accessibilityService.isScreenReaderOptimized()&&this._browser.isSafari&&!m&&this._hasFocus&&(this._asyncFocusGainWriteScreenReaderContent.value||(this._asyncFocusGainWriteScreenReaderContent.value=new qu(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)),this._asyncFocusGainWriteScreenReaderContent.value.schedule())})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let e=0;return en(this._textArea.ownerDocument,"selectionchange",i=>{if(BM.onSelectionChange(),!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;const n=Date.now(),s=n-e;if(e=n,s<5)return;const c=n-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),c<100||!this._textAreaState.selection)return;const d=this._textArea.getValue();if(this._textAreaState.value!==d)return;const f=this._textArea.getSelectionStart(),m=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===f&&this._textAreaState.selectionEnd===m)return;const v=this._textAreaState.deduceEditorPosition(f),x=this._host.deduceModelPosition(v[0],v[1],v[2]),w=this._textAreaState.deduceEditorPosition(m),I=this._host.deduceModelPosition(w[0],w[1],w[2]),P=new Us(x.lineNumber,x.column,I.lineNumber,I.column);this._onSelectionChangeRequest.fire(P)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeNativeTextAreaContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,i){this._hasFocus||(i=i.collapseSelection()),i.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=i}writeNativeTextAreaContent(e){!this._accessibilityService.isScreenReaderOptimized()&&e==="render"||this._currentComposition||(this._logService.trace(`writeTextAreaState(reason: ${e})`),this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent()))}_ensureClipboardGetsEditorSelection(e){const i=this._host.getDataToCopy(),n={version:1,isFromEmptySelection:i.isFromEmptySelection,multicursorText:i.multicursorText,mode:i.mode};wre.INSTANCE.set(this._browser.isFirefox?i.text.replace(/\r\n/g,`
+`):i.text,n),e.preventDefault(),e.clipboardData&&oje.setTextData(e.clipboardData,i.text,i.html,n)}};sje=kxi([xSt(4,tS),xSt(5,N0)],sje);const oje={getTextData(l){const e=l.getData(Yh.text);let i=null;const n=l.getData("vscode-editor-data");if(typeof n=="string")try{i=JSON.parse(n),i.version!==1&&(i=null)}catch{}return e.length===0&&i===null&&l.files.length>0?[Array.prototype.slice.call(l.files,0).map(c=>c.name).join(`
+`),null]:[e,i]},setTextData(l,e,i,n){l.setData(Yh.text,e),typeof i=="string"&&l.setData("text/html",i),l.setData("vscode-editor-data",JSON.stringify(n))}};class Dxi extends xi{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this.onKeyDown=this._register(new Xc(this._actual,"keydown")).event,this.onKeyUp=this._register(new Xc(this._actual,"keyup")).event,this.onCompositionStart=this._register(new Xc(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new Xc(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new Xc(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new Xc(this._actual,"beforeinput")).event,this.onInput=this._register(new Xc(this._actual,"input")).event,this.onCut=this._register(new Xc(this._actual,"cut")).event,this.onCopy=this._register(new Xc(this._actual,"copy")).event,this.onPaste=this._register(new Xc(this._actual,"paste")).event,this.onFocus=this._register(new Xc(this._actual,"focus")).event,this.onBlur=this._register(new Xc(this._actual,"blur")).event,this._onSyntheticTap=this._register(new gi),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown(()=>BM.onKeyDown())),this._register(this.onBeforeInput(()=>BM.onBeforeInput())),this._register(this.onInput(()=>BM.onInput())),this._register(this.onKeyUp(()=>BM.onKeyUp())),this._register(en(this._actual,Sve.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const e=kB(this._actual);return e?e.activeElement===this._actual:this._actual.isConnected?D0()===this._actual:!1}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,i){const n=this._actual;n.value!==i&&(this.setIgnoreSelectionChangeTime("setValue"),n.value=i)}getSelectionStart(){return this._actual.selectionDirection==="backward"?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return this._actual.selectionDirection==="backward"?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,i,n){const s=this._actual;let c=null;const d=kB(s);d?c=d.activeElement:c=D0();const f=Eo(c),m=c===s,v=s.selectionStart,x=s.selectionEnd;if(m&&v===i&&x===n){bk&&f.parent!==f&&s.focus();return}if(m){this.setIgnoreSelectionChangeTime("setSelectionRange"),s.setSelectionRange(i,n),bk&&f.parent!==f&&s.focus();return}try{const w=fdi(s);this.setIgnoreSelectionChangeTime("setSelectionRange"),s.focus(),s.setSelectionRange(i,n),hdi(s,w)}catch{}}}class Exi extends JJe{constructor(e,i,n){super(e,i,n),this._register(y1.addTarget(this.viewHelper.linesContentDomNode)),this._register(en(this.viewHelper.linesContentDomNode,Ud.Tap,c=>this.onTap(c))),this._register(en(this.viewHelper.linesContentDomNode,Ud.Change,c=>this.onChange(c))),this._register(en(this.viewHelper.linesContentDomNode,Ud.Contextmenu,c=>this._onContextMenu(new IR(c,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(en(this.viewHelper.linesContentDomNode,"pointerdown",c=>{const d=c.pointerType;if(d==="mouse"){this._lastPointerType="mouse";return}else d==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const s=new oxi(this.viewHelper.viewDomNode);this._register(s.onPointerMove(this.viewHelper.viewDomNode,c=>this._onMouseMove(c))),this._register(s.onPointerUp(this.viewHelper.viewDomNode,c=>this._onMouseUp(c))),this._register(s.onPointerLeave(this.viewHelper.viewDomNode,c=>this._onMouseLeave(c))),this._register(s.onPointerDown(this.viewHelper.viewDomNode,(c,d)=>this._onMouseDown(c,d)))}onTap(e){!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget)||(e.preventDefault(),this.viewHelper.focusTextArea(),this._dispatchGesture(e,!1))}onChange(e){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY),this._lastPointerType==="pen"&&this._dispatchGesture(e,!0)}_dispatchGesture(e,i){const n=this._createMouseTarget(new IR(e,!1,this.viewHelper.viewDomNode),!1);n.position&&this.viewController.dispatchMouse({position:n.position,mouseColumn:n.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:i,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:n.type===6&&n.detail.injectedText!==null})}_onMouseDown(e,i){e.browserEvent.pointerType!=="touch"&&super._onMouseDown(e,i)}}class Ixi extends JJe{constructor(e,i,n){super(e,i,n),this._register(y1.addTarget(this.viewHelper.linesContentDomNode)),this._register(en(this.viewHelper.linesContentDomNode,Ud.Tap,s=>this.onTap(s))),this._register(en(this.viewHelper.linesContentDomNode,Ud.Change,s=>this.onChange(s))),this._register(en(this.viewHelper.linesContentDomNode,Ud.Contextmenu,s=>this._onContextMenu(new IR(s,!1,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const i=this._createMouseTarget(new IR(e,!1,this.viewHelper.viewDomNode),!1);if(i.position){const n=document.createEvent("CustomEvent");n.initEvent(Sve.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(n),this.viewController.moveTo(i.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class Nxi extends xi{constructor(e,i,n){super(),(VE||nci&&Ekt)&&s$e.pointerEvents?this.handler=this._register(new Exi(e,i,n)):cd.TouchEvent?this.handler=this._register(new Ixi(e,i,n)):this.handler=this._register(new JJe(e,i,n))}getTargetAtClientPoint(e,i){return this.handler.getTargetAtClientPoint(e,i)}}class oW extends Mse{}const TCe=class TCe extends oW{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new pi(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(67);const i=e.get(68);this._renderLineNumbers=i.renderType,this._renderCustomLineNumbers=i.renderFn,this._renderFinalNewline=e.get(96);const n=e.get(146);this._lineNumbersLeft=n.lineNumbersLeft,this._lineNumbersWidth=n.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const i=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(i);let n=!1;return this._activeLineNumber!==i.lineNumber&&(this._activeLineNumber=i.lineNumber,n=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(n=!0),n}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return e.affectsLineNumber}_getLineRenderLineNumber(e){const i=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new pi(e,1));if(i.column!==1)return"";const n=i.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(this._renderLineNumbers===2){const s=Math.abs(this._lastCursorModelPosition.lineNumber-n);return s===0?'<span class="relative-current-line-number">'+n+"</span>":String(s)}if(this._renderLineNumbers===3){if(this._lastCursorModelPosition.lineNumber===n||n%10===0)return String(n);const s=this._context.viewModel.getLineCount();return n===s?String(n):""}return String(n)}prepareRender(e){if(this._renderLineNumbers===0){this._renderResult=null;return}const i=Cv?this._lineHeight%2===0?" lh-even":" lh-odd":"",n=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,c=this._context.viewModel.getDecorationsInViewport(e.visibleRange).filter(v=>!!v.options.lineNumberClassName);c.sort((v,x)=>nt.compareRangesUsingEnds(v.range,x.range));let d=0;const f=this._context.viewModel.getLineCount(),m=[];for(let v=n;v<=s;v++){const x=v-n;let w=this._getLineRenderLineNumber(v),I="";for(;d<c.length&&c[d].range.endLineNumber<v;)d++;for(let P=d;P<c.length;P++){const{range:O,options:z}=c[P];O.startLineNumber<=v&&(I+=" "+z.lineNumberClassName)}if(!w&&!I){m[x]="";continue}v===f&&this._context.viewModel.getLineLength(v)===0&&(this._renderFinalNewline==="off"&&(w=""),this._renderFinalNewline==="dimmed"&&(I+=" dimmed-line-number")),v===this._activeLineNumber&&(I+=" active-line-number"),m[x]=`<div class="${TCe.CLASS_NAME}${i}${I}" style="left:${this._lineNumbersLeft}px;width:${this._lineNumbersWidth}px;">${w}</div>`}this._renderResult=m}render(e,i){if(!this._renderResult)return"";const n=i-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}};TCe.CLASS_NAME="line-numbers";let wve=TCe;Dk((l,e)=>{const i=l.getColor(byi),n=l.getColor(Oyi);n?e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):i&&e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${i.transparent(.4)}; }`)});const Aq=class Aq extends nS{constructor(e){super(e);const i=this._context.configuration.options,n=i.get(146);this._canUseLayerHinting=!i.get(32),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,this._domNode=_u(document.createElement("div")),this._domNode.setClassName(Aq.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=_u(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(Aq.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const i=this._context.configuration.options,n=i.get(146);return this._canUseLayerHinting=!i.get(32),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const i=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-i);const n=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(n),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(n)}};Aq.CLASS_NAME="glyph-margin",Aq.OUTER_CLASS_NAME="margin";let xve=Aq;const n$="monaco-mouse-cursor-text";var Lxi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},kSt=function(l,e){return function(i,n){e(i,n,l)}};class Pxi{constructor(e,i,n,s,c){this._context=e,this.modelLineNumber=i,this.distanceToModelLineStart=n,this.widthOfHiddenLineTextBefore=s,this.distanceToModelLineEnd=c,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const i=new pi(this.modelLineNumber,this.distanceToModelLineStart+1),n=new pi(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(e?this._previousPresentation=e:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const d9e=bk;let aje=class extends nS{constructor(e,i,n,s,c){super(e),this._keybindingService=s,this._instantiationService=c,this._primaryCursorPosition=new pi(1,1),this._primaryCursorVisibleRange=null,this._viewController=i,this._visibleRangeProvider=n,this._scrollLeft=0,this._scrollTop=0;const d=this._context.configuration.options,f=d.get(146);this._setAccessibilityOptions(d),this._contentLeft=f.contentLeft,this._contentWidth=f.contentWidth,this._contentHeight=f.height,this._fontInfo=d.get(50),this._lineHeight=d.get(67),this._emptySelectionClipboard=d.get(37),this._copyWithSyntaxHighlighting=d.get(25),this._visibleTextArea=null,this._selections=[new Us(1,1,1,1)],this._modelSelections=[new Us(1,1,1,1)],this._lastRenderPosition=null,this.textArea=_u(document.createElement("textarea")),JE.write(this.textArea,7),this.textArea.setClassName(`inputarea ${n$}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:m}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${m*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(d)),this.textArea.setAttribute("aria-required",d.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(d.get(125))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",W("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",d.get(92)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=_u(document.createElement("div")),this.textAreaCover.setPosition("absolute");const v={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:I=>this._context.viewModel.getLineMaxColumn(I),getValueInRange:(I,P)=>this._context.viewModel.getValueInRange(I,P),getValueLengthInRange:(I,P)=>this._context.viewModel.getValueLengthInRange(I,P),modifyPosition:(I,P)=>this._context.viewModel.modifyPosition(I,P)},x={getDataToCopy:()=>{const I=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,I0),P=this._context.viewModel.model.getEOL(),O=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),z=Array.isArray(I)?I:null,J=Array.isArray(I)?I.join(P):I;let Y,ae=null;if(rje.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&J.length<65536){const me=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);me&&(Y=me.html,ae=me.mode)}return{isFromEmptySelection:O,multicursorText:z,text:J,html:Y,mode:ae}},getScreenReaderContent:()=>{if(this._accessibilitySupport===1){const I=this._selections[0];if(Hc&&I.isEmpty()){const O=I.getStartPosition();let z=this._getWordBeforePosition(O);if(z.length===0&&(z=this._getCharacterBeforePosition(O)),z.length>0)return new by(z,z.length,z.length,nt.fromPositions(O),0)}if(Hc&&!I.isEmpty()&&v.getValueLengthInRange(I,0)<500){const O=v.getValueInRange(I,0);return new by(O,0,O.length,I,0)}if(o6&&!I.isEmpty()){const O="vscode-placeholder";return new by(O,0,O.length,null,void 0)}return by.EMPTY}if(ivt){const I=this._selections[0];if(I.isEmpty()){const P=I.getStartPosition(),[O,z]=this._getAndroidWordAtPosition(P);if(O.length>0)return new by(O,z,z,nt.fromPositions(P),0)}return by.EMPTY}return dq.fromEditorSelection(v,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(I,P,O)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(I,P,O)},w=this._register(new Dxi(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(sje,x,w,UC,{isAndroid:ivt,isChrome:hse,isFirefox:bk,isSafari:o6})),this._register(this._textAreaInput.onKeyDown(I=>{this._viewController.emitKeyDown(I)})),this._register(this._textAreaInput.onKeyUp(I=>{this._viewController.emitKeyUp(I)})),this._register(this._textAreaInput.onPaste(I=>{let P=!1,O=null,z=null;I.metadata&&(P=this._emptySelectionClipboard&&!!I.metadata.isFromEmptySelection,O=typeof I.metadata.multicursorText<"u"?I.metadata.multicursorText:null,z=I.metadata.mode),this._viewController.paste(I.text,P,O,z)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(I=>{I.replacePrevCharCnt||I.replaceNextCharCnt||I.positionDelta?this._viewController.compositionType(I.text,I.replacePrevCharCnt,I.replaceNextCharCnt,I.positionDelta):this._viewController.type(I.text)})),this._register(this._textAreaInput.onSelectionChangeRequest(I=>{this._viewController.setSelection(I)})),this._register(this._textAreaInput.onCompositionStart(I=>{const P=this.textArea.domNode,O=this._modelSelections[0],{distanceToModelLineStart:z,widthOfHiddenTextBefore:J}=(()=>{const ae=P.value.substring(0,Math.min(P.selectionStart,P.selectionEnd)),me=ae.lastIndexOf(`
+`),ye=ae.substring(me+1),Ce=ye.lastIndexOf(" "),Fe=ye.length-Ce-1,rt=O.getStartPosition(),ct=Math.min(rt.column-1,Fe),Mt=rt.column-1-ct,Yt=ye.substring(0,ye.length-ct),{tabSize:Bi}=this._context.viewModel.model.getOptions(),$i=Axi(this.textArea.domNode.ownerDocument,Yt,this._fontInfo,Bi);return{distanceToModelLineStart:Mt,widthOfHiddenTextBefore:$i}})(),{distanceToModelLineEnd:Y}=(()=>{const ae=P.value.substring(Math.max(P.selectionStart,P.selectionEnd)),me=ae.indexOf(`
+`),ye=me===-1?ae:ae.substring(0,me),Ce=ye.indexOf(" "),Fe=Ce===-1?ye.length:ye.length-Ce-1,rt=O.getEndPosition(),ct=Math.min(this._context.viewModel.model.getLineMaxColumn(rt.lineNumber)-rt.column,Fe);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(rt.lineNumber)-rt.column-ct}})();this._context.viewModel.revealRange("keyboard",!0,nt.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new Pxi(this._context,O.startLineNumber,z,J,Y),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${n$} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(I=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${n$}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.viewModel.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.viewModel.setHasFocus(!1)})),this._register(Eie.onDidChange(()=>{this._ensureReadOnlyAttribute()}))}writeScreenReaderContent(e){this._textAreaInput.writeNativeTextAreaContent(e)}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const i='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',n=this._context.viewModel.getLineContent(e.lineNumber),s=Sk(i,[]);let c=!0,d=e.column,f=!0,m=e.column,v=0;for(;v<50&&(c||f);){if(c&&d<=1&&(c=!1),c){const x=n.charCodeAt(d-2);s.get(x)!==0?c=!1:d--}if(f&&m>n.length&&(f=!1),f){const x=n.charCodeAt(m-1);s.get(x)!==0?f=!1:m++}v++}return[n.substring(d-1,m-1),e.column-d]}_getWordBeforePosition(e){const i=this._context.viewModel.getLineContent(e.lineNumber),n=Sk(this._context.configuration.options.get(132),[]);let s=e.column,c=0;for(;s>1;){const d=i.charCodeAt(s-2);if(n.get(d)!==0||c>50)return i.substring(s-1,e.column-1);c++,s--}return i.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const n=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!Pm(n.charCodeAt(0)))return n}return""}_getAriaLabel(e){var n,s,c;if(e.get(2)===1){const d=(n=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode"))==null?void 0:n.getAriaLabel(),f=(s=this._keybindingService.lookupKeybinding("workbench.action.showCommands"))==null?void 0:s.getAriaLabel(),m=(c=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings"))==null?void 0:c.getAriaLabel(),v=W("accessibilityModeOff","The editor is not accessible at this time.");return d?W("accessibilityOffAriaLabel","{0} To enable screen reader optimized mode, use {1}",v,d):f?W("accessibilityOffAriaLabelNoKb","{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",v,f):m?W("accessibilityOffAriaLabelNoKbs","{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",v,m):v}return e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const i=e.get(3);this._accessibilitySupport===2&&i===KE.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=i;const s=e.get(146).wrappingColumn;if(s!==-1&&this._accessibilitySupport!==1){const c=e.get(50);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(s*c.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=d9e?0:1}onConfigurationChanged(e){const i=this._context.configuration.options,n=i.get(146);this._setAccessibilityOptions(i),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._contentHeight=n.height,this._fontInfo=i.get(50),this._lineHeight=i.get(67),this._emptySelectionClipboard=i.get(37),this._copyWithSyntaxHighlighting=i.get(25),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:s}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${s*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",this._getAriaLabel(i)),this.textArea.setAttribute("aria-required",i.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(i.get(125))),(e.hasChanged(34)||e.hasChanged(92))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeNativeTextAreaContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeNativeTextAreaContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){const e=this._context.configuration.options;!Eie.enabled||e.get(34)&&e.get(92)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){var i;this._primaryCursorPosition=new pi(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),(i=this._visibleTextArea)==null||i.prepareRender(e)}render(e){this._textAreaInput.writeNativeTextAreaContent("render"),this._render()}_render(){if(this._visibleTextArea){const n=this._visibleTextArea.visibleTextareaStart,s=this._visibleTextArea.visibleTextareaEnd,c=this._visibleTextArea.startPosition,d=this._visibleTextArea.endPosition;if(c&&d&&n&&s&&s.left>=this._scrollLeft&&n.left<=this._scrollLeft+this._contentWidth){const f=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,m=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let v=this._visibleTextArea.widthOfHiddenLineTextBefore,x=this._contentLeft+n.left-this._scrollLeft,w=s.left-n.left+1;if(x<this._contentLeft){const Y=this._contentLeft-x;x+=Y,v+=Y,w-=Y}w>this._contentWidth&&(w=this._contentWidth);const I=this._context.viewModel.getViewLineData(c.lineNumber),P=I.tokens.findTokenIndexAtOffset(c.column-1),O=I.tokens.findTokenIndexAtOffset(d.column-1),z=P===O,J=this._visibleTextArea.definePresentation(z?I.tokens.getPresentation(P):null);this.textArea.domNode.scrollTop=m*this._lineHeight,this.textArea.domNode.scrollLeft=v,this._doRender({lastRenderPosition:null,top:f,left:x,width:w,height:this._lineHeight,useCover:!1,color:(Oh.getColorMap()||[])[J.foreground],italic:J.italic,bold:J.bold,underline:J.underline,strikethrough:J.strikethrough})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(e<this._contentLeft||e>this._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const i=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(i<0||i>this._contentHeight){this._renderAtTopLeft();return}if(Hc||this._accessibilitySupport===2){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:i,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const n=this._textAreaInput.textAreaState.newlineCountBeforeSelection??this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=n*this._lineHeight;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:i,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:d9e?0:1,useCover:!1})}_newlinecount(e){let i=0,n=-1;do{if(n=e.indexOf(`
+`,n+1),n===-1)break;i++}while(!0);return i}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:d9e?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const i=this.textArea,n=this.textAreaCover;a0(i,this._fontInfo),i.setTop(e.top),i.setLeft(e.left),i.setWidth(e.width),i.setHeight(e.height),i.setColor(e.color?In.Format.CSS.formatHex(e.color):""),i.setFontStyle(e.italic?"italic":""),e.bold&&i.setFontWeight("bold"),i.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),n.setTop(e.useCover?e.top:0),n.setLeft(e.useCover?e.left:0),n.setWidth(e.useCover?e.width:0),n.setHeight(e.useCover?e.height:0);const s=this._context.configuration.options;s.get(57)?n.setClassName("monaco-editor-background textAreaCover "+xve.OUTER_CLASS_NAME):s.get(68).renderType!==0?n.setClassName("monaco-editor-background textAreaCover "+wve.CLASS_NAME):n.setClassName("monaco-editor-background textAreaCover")}};aje=Lxi([kSt(3,pu),kSt(4,ho)],aje);function Axi(l,e,i,n){if(e.length===0)return 0;const s=l.createElement("div");s.style.position="absolute",s.style.top="-50000px",s.style.width="50000px";const c=l.createElement("span");a0(c,i),c.style.whiteSpace="pre",c.style.tabSize=`${n*i.spaceWidth}px`,c.append(e),s.appendChild(c),l.body.appendChild(s);const d=c.offsetWidth;return s.remove(),d}const Oxi=()=>!0,Mxi=()=>!1,Rxi=l=>l===" "||l===" ";class NU{static shouldRecreate(e){return e.hasChanged(146)||e.hasChanged(132)||e.hasChanged(37)||e.hasChanged(77)||e.hasChanged(79)||e.hasChanged(80)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(9)||e.hasChanged(10)||e.hasChanged(14)||e.hasChanged(129)||e.hasChanged(50)||e.hasChanged(92)||e.hasChanged(131)}constructor(e,i,n,s){this.languageConfigurationService=s,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const c=n.options,d=c.get(146),f=c.get(50);this.readOnly=c.get(92),this.tabSize=i.tabSize,this.indentSize=i.indentSize,this.insertSpaces=i.insertSpaces,this.stickyTabStops=c.get(117),this.lineHeight=f.lineHeight,this.typicalHalfwidthCharacterWidth=f.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(d.height/this.lineHeight)-2),this.useTabStops=c.get(129),this.wordSeparators=c.get(132),this.emptySelectionClipboard=c.get(37),this.copyWithSyntaxHighlighting=c.get(25),this.multiCursorMergeOverlapping=c.get(77),this.multiCursorPaste=c.get(79),this.multiCursorLimit=c.get(80),this.autoClosingBrackets=c.get(6),this.autoClosingComments=c.get(7),this.autoClosingQuotes=c.get(11),this.autoClosingDelete=c.get(9),this.autoClosingOvertype=c.get(10),this.autoSurround=c.get(14),this.autoIndent=c.get(12),this.wordSegmenterLocales=c.get(131),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(e,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const m=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(m)for(const x of m)this.surroundingPairs[x.open]=x.close;const v=this.languageConfigurationService.getLanguageConfiguration(e).comments;this.blockCommentStartToken=(v==null?void 0:v.blockCommentStartToken)??null}get electricChars(){var e;if(!this._electricChars){this._electricChars={};const i=(e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)==null?void 0:e.getElectricCharacters();if(i)for(const n of i)this._electricChars[n]=!0}return this._electricChars}onElectricCharacter(e,i,n){const s=n9(i,n-1),c=this.languageConfigurationService.getLanguageConfiguration(s.languageId).electricCharacter;return c?c.onElectricCharacter(e,s,n-s.firstCharOffset):null}normalizeIndentation(e){return uJe(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,i,n){switch(i){case"beforeWhitespace":return Rxi;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e,n);case"always":return Oxi;case"never":return Mxi}}_getLanguageDefinedShouldAutoClose(e,i){const n=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet(i);return s=>n.indexOf(s)!==-1}visibleColumnFromColumn(e,i){return em.visibleColumnFromColumn(e.getLineContent(i.lineNumber),i.column,this.tabSize)}columnFromVisibleColumn(e,i,n){const s=em.columnFromVisibleColumn(e.getLineContent(i),n,this.tabSize),c=e.getLineMinColumn(i);if(s<c)return c;const d=e.getLineMaxColumn(i);return s>d?d:s}}let Rl=class yIt{static fromModelState(e){return new Fxi(e)}static fromViewState(e){return new Bxi(e)}static fromModelSelection(e){const i=Us.liftSelection(e),n=new i0(nt.fromPositions(i.getSelectionStart()),0,0,i.getPosition(),0);return yIt.fromModelState(n)}static fromModelSelections(e){const i=[];for(let n=0,s=e.length;n<s;n++)i[n]=this.fromModelSelection(e[n]);return i}constructor(e,i){this._cursorStateBrand=void 0,this.modelState=e,this.viewState=i}equals(e){return this.viewState.equals(e.viewState)&&this.modelState.equals(e.modelState)}};class Fxi{constructor(e){this.modelState=e,this.viewState=null}}class Bxi{constructor(e){this.modelState=null,this.viewState=e}}class i0{constructor(e,i,n,s,c){this.selectionStart=e,this.selectionStartKind=i,this.selectionStartLeftoverVisibleColumns=n,this.position=s,this.leftoverVisibleColumns=c,this._singleCursorStateBrand=void 0,this.selection=i0._computeSelection(this.selectionStart,this.position)}equals(e){return this.selectionStartLeftoverVisibleColumns===e.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===e.leftoverVisibleColumns&&this.selectionStartKind===e.selectionStartKind&&this.position.equals(e.position)&&this.selectionStart.equalsRange(e.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(e,i,n,s){return e?new i0(this.selectionStart,this.selectionStartKind,this.selectionStartLeftoverVisibleColumns,new pi(i,n),s):new i0(new nt(i,n,i,n),0,s,new pi(i,n),s)}static _computeSelection(e,i){return e.isEmpty()||!i.isBeforeOrEqual(e.getStartPosition())?Us.fromPositions(e.getStartPosition(),i):Us.fromPositions(e.getEndPosition(),i)}}class Lb{constructor(e,i,n){this._editOperationResultBrand=void 0,this.type=e,this.commands=i,this.shouldPushStackElementBefore=n.shouldPushStackElementBefore,this.shouldPushStackElementAfter=n.shouldPushStackElementAfter}}function NR(l){return l==="'"||l==='"'||l==="`"}class JF{static columnSelect(e,i,n,s,c,d){const f=Math.abs(c-n)+1,m=n>c,v=s>d,x=s<d,w=[];for(let I=0;I<f;I++){const P=n+(m?-I:I),O=e.columnFromVisibleColumn(i,P,s),z=e.columnFromVisibleColumn(i,P,d),J=e.visibleColumnFromColumn(i,new pi(P,O)),Y=e.visibleColumnFromColumn(i,new pi(P,z));x&&(J>d||Y<s)||v&&(Y>s||J<d)||w.push(new i0(new nt(P,O,P,O),0,0,new pi(P,z),0))}if(w.length===0)for(let I=0;I<f;I++){const P=n+(m?-I:I),O=i.getLineMaxColumn(P);w.push(new i0(new nt(P,O,P,O),0,0,new pi(P,O),0))}return{viewStates:w,reversed:m,fromLineNumber:n,fromVisualColumn:s,toLineNumber:c,toVisualColumn:d}}static columnSelectLeft(e,i,n){let s=n.toViewVisualColumn;return s>0&&s--,JF.columnSelect(e,i,n.fromViewLineNumber,n.fromViewVisualColumn,n.toViewLineNumber,s)}static columnSelectRight(e,i,n){let s=0;const c=Math.min(n.fromViewLineNumber,n.toViewLineNumber),d=Math.max(n.fromViewLineNumber,n.toViewLineNumber);for(let m=c;m<=d;m++){const v=i.getLineMaxColumn(m),x=e.visibleColumnFromColumn(i,new pi(m,v));s=Math.max(s,x)}let f=n.toViewVisualColumn;return f<s&&f++,this.columnSelect(e,i,n.fromViewLineNumber,n.fromViewVisualColumn,n.toViewLineNumber,f)}static columnSelectUp(e,i,n,s){const c=s?e.pageSize:1,d=Math.max(1,n.toViewLineNumber-c);return this.columnSelect(e,i,n.fromViewLineNumber,n.fromViewVisualColumn,d,n.toViewVisualColumn)}static columnSelectDown(e,i,n,s){const c=s?e.pageSize:1,d=Math.min(i.getLineCount(),n.toViewLineNumber+c);return this.columnSelect(e,i,n.fromViewLineNumber,n.fromViewVisualColumn,d,n.toViewVisualColumn)}}class T0{constructor(e,i,n=!1){this._range=e,this._text=i,this.insertsAutoWhitespace=n}getEditOperations(e,i){i.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,i){const s=i.getInverseEditOperations()[0].range;return Us.fromPositions(s.getEndPosition())}}class Wxi{constructor(e,i){this._range=e,this._text=i}getEditOperations(e,i){i.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,i){const s=i.getInverseEditOperations()[0].range;return Us.fromRange(s,0)}}class k1e{constructor(e,i,n=!1){this._range=e,this._text=i,this.insertsAutoWhitespace=n}getEditOperations(e,i){i.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,i){const s=i.getInverseEditOperations()[0].range;return Us.fromPositions(s.getStartPosition())}}class kve{constructor(e,i,n,s,c=!1){this._range=e,this._text=i,this._columnDeltaOffset=s,this._lineNumberDeltaOffset=n,this.insertsAutoWhitespace=c}getEditOperations(e,i){i.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,i){const s=i.getInverseEditOperations()[0].range;return Us.fromPositions(s.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}class GJe{constructor(e,i,n,s=!1){this._range=e,this._text=i,this._initialSelection=n,this._forceMoveMarkers=s,this._selectionId=null}getEditOperations(e,i){i.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=i.trackSelection(this._initialSelection)}computeCursorState(e,i){return i.getTrackedSelection(this._selectionId)}}class f9e{constructor(e,i,n){this._cursorPositionBrand=void 0,this.lineNumber=e,this.column=i,this.leftoverVisibleColumns=n}}class ku{static leftPosition(e,i){if(i.column>e.getLineMinColumn(i.lineNumber))return i.delta(void 0,-t2t(e.getLineContent(i.lineNumber),i.column-1));if(i.lineNumber>1){const n=i.lineNumber-1;return new pi(n,e.getLineMaxColumn(n))}else return i}static leftPositionAtomicSoftTabs(e,i,n){if(i.column<=e.getLineIndentColumn(i.lineNumber)){const s=e.getLineMinColumn(i.lineNumber),c=e.getLineContent(i.lineNumber),d=Sre.atomicPosition(c,i.column-1,n,0);if(d!==-1&&d+1>=s)return new pi(i.lineNumber,d+1)}return this.leftPosition(e,i)}static left(e,i,n){const s=e.stickyTabStops?ku.leftPositionAtomicSoftTabs(i,n,e.tabSize):ku.leftPosition(i,n);return new f9e(s.lineNumber,s.column,0)}static moveLeft(e,i,n,s,c){let d,f;if(n.hasSelection()&&!s)d=n.selection.startLineNumber,f=n.selection.startColumn;else{const m=n.position.delta(void 0,-(c-1)),v=i.normalizePosition(ku.clipPositionColumn(m,i),0),x=ku.left(e,i,v);d=x.lineNumber,f=x.column}return n.move(s,d,f,0)}static clipPositionColumn(e,i){return new pi(e.lineNumber,ku.clipRange(e.column,i.getLineMinColumn(e.lineNumber),i.getLineMaxColumn(e.lineNumber)))}static clipRange(e,i,n){return e<i?i:e>n?n:e}static rightPosition(e,i,n){return n<e.getLineMaxColumn(i)?n=n+i$e(e.getLineContent(i),n-1):i<e.getLineCount()&&(i=i+1,n=e.getLineMinColumn(i)),new pi(i,n)}static rightPositionAtomicSoftTabs(e,i,n,s,c){if(n<e.getLineIndentColumn(i)){const d=e.getLineContent(i),f=Sre.atomicPosition(d,n-1,s,1);if(f!==-1)return new pi(i,f+1)}return this.rightPosition(e,i,n)}static right(e,i,n){const s=e.stickyTabStops?ku.rightPositionAtomicSoftTabs(i,n.lineNumber,n.column,e.tabSize,e.indentSize):ku.rightPosition(i,n.lineNumber,n.column);return new f9e(s.lineNumber,s.column,0)}static moveRight(e,i,n,s,c){let d,f;if(n.hasSelection()&&!s)d=n.selection.endLineNumber,f=n.selection.endColumn;else{const m=n.position.delta(void 0,c-1),v=i.normalizePosition(ku.clipPositionColumn(m,i),1),x=ku.right(e,i,v);d=x.lineNumber,f=x.column}return n.move(s,d,f,0)}static vertical(e,i,n,s,c,d,f,m){const v=em.visibleColumnFromColumn(i.getLineContent(n),s,e.tabSize)+c,x=i.getLineCount(),w=n===1&&s===1,I=n===x&&s===i.getLineMaxColumn(n),P=d<n?w:I;if(n=d,n<1?(n=1,f?s=i.getLineMinColumn(n):s=Math.min(i.getLineMaxColumn(n),s)):n>x?(n=x,f?s=i.getLineMaxColumn(n):s=Math.min(i.getLineMaxColumn(n),s)):s=e.columnFromVisibleColumn(i,n,v),P?c=0:c=v-em.visibleColumnFromColumn(i.getLineContent(n),s,e.tabSize),m!==void 0){const O=new pi(n,s),z=i.normalizePosition(O,m);c=c+(s-z.column),n=z.lineNumber,s=z.column}return new f9e(n,s,c)}static down(e,i,n,s,c,d,f){return this.vertical(e,i,n,s,c,n+d,f,4)}static moveDown(e,i,n,s,c){let d,f;n.hasSelection()&&!s?(d=n.selection.endLineNumber,f=n.selection.endColumn):(d=n.position.lineNumber,f=n.position.column);let m=0,v;do if(v=ku.down(e,i,d+m,f,n.leftoverVisibleColumns,c,!0),i.normalizePosition(new pi(v.lineNumber,v.column),2).lineNumber>d)break;while(m++<10&&d+m<i.getLineCount());return n.move(s,v.lineNumber,v.column,v.leftoverVisibleColumns)}static translateDown(e,i,n){const s=n.selection,c=ku.down(e,i,s.selectionStartLineNumber,s.selectionStartColumn,n.selectionStartLeftoverVisibleColumns,1,!1),d=ku.down(e,i,s.positionLineNumber,s.positionColumn,n.leftoverVisibleColumns,1,!1);return new i0(new nt(c.lineNumber,c.column,c.lineNumber,c.column),0,c.leftoverVisibleColumns,new pi(d.lineNumber,d.column),d.leftoverVisibleColumns)}static up(e,i,n,s,c,d,f){return this.vertical(e,i,n,s,c,n-d,f,3)}static moveUp(e,i,n,s,c){let d,f;n.hasSelection()&&!s?(d=n.selection.startLineNumber,f=n.selection.startColumn):(d=n.position.lineNumber,f=n.position.column);const m=ku.up(e,i,d,f,n.leftoverVisibleColumns,c,!0);return n.move(s,m.lineNumber,m.column,m.leftoverVisibleColumns)}static translateUp(e,i,n){const s=n.selection,c=ku.up(e,i,s.selectionStartLineNumber,s.selectionStartColumn,n.selectionStartLeftoverVisibleColumns,1,!1),d=ku.up(e,i,s.positionLineNumber,s.positionColumn,n.leftoverVisibleColumns,1,!1);return new i0(new nt(c.lineNumber,c.column,c.lineNumber,c.column),0,c.leftoverVisibleColumns,new pi(d.lineNumber,d.column),d.leftoverVisibleColumns)}static _isBlankLine(e,i){return e.getLineFirstNonWhitespaceColumn(i)===0}static moveToPrevBlankLine(e,i,n,s){let c=n.position.lineNumber;for(;c>1&&this._isBlankLine(i,c);)c--;for(;c>1&&!this._isBlankLine(i,c);)c--;return n.move(s,c,i.getLineMinColumn(c),0)}static moveToNextBlankLine(e,i,n,s){const c=i.getLineCount();let d=n.position.lineNumber;for(;d<c&&this._isBlankLine(i,d);)d++;for(;d<c&&!this._isBlankLine(i,d);)d++;return n.move(s,d,i.getLineMinColumn(d),0)}static moveToBeginningOfLine(e,i,n,s){const c=n.position.lineNumber,d=i.getLineMinColumn(c),f=i.getLineFirstNonWhitespaceColumn(c)||d;let m;return n.position.column===f?m=d:m=f,n.move(s,c,m,0)}static moveToEndOfLine(e,i,n,s,c){const d=n.position.lineNumber,f=i.getLineMaxColumn(d);return n.move(s,d,f,c?1073741824-f:0)}static moveToBeginningOfBuffer(e,i,n,s){return n.move(s,1,1,0)}static moveToEndOfBuffer(e,i,n,s){const c=i.getLineCount(),d=i.getLineMaxColumn(c);return n.move(s,c,d,0)}}class RB{static deleteRight(e,i,n,s){const c=[];let d=e!==3;for(let f=0,m=s.length;f<m;f++){const v=s[f];let x=v;if(x.isEmpty()){const w=v.getPosition(),I=ku.right(i,n,w);x=new nt(I.lineNumber,I.column,w.lineNumber,w.column)}if(x.isEmpty()){c[f]=null;continue}x.startLineNumber!==x.endLineNumber&&(d=!0),c[f]=new T0(x,"")}return[d,c]}static isAutoClosingPairDelete(e,i,n,s,c,d,f){if(i==="never"&&n==="never"||e==="never")return!1;for(let m=0,v=d.length;m<v;m++){const x=d[m],w=x.getPosition();if(!x.isEmpty())return!1;const I=c.getLineContent(w.lineNumber);if(w.column<2||w.column>=I.length+1)return!1;const P=I.charAt(w.column-2),O=s.get(P);if(!O)return!1;if(NR(P)){if(n==="never")return!1}else if(i==="never")return!1;const z=I.charAt(w.column-1);let J=!1;for(const Y of O)Y.open===P&&Y.close===z&&(J=!0);if(!J)return!1;if(e==="auto"){let Y=!1;for(let ae=0,me=f.length;ae<me;ae++){const ye=f[ae];if(w.lineNumber===ye.startLineNumber&&w.column===ye.startColumn){Y=!0;break}}if(!Y)return!1}}return!0}static _runAutoClosingPairDelete(e,i,n){const s=[];for(let c=0,d=n.length;c<d;c++){const f=n[c].getPosition(),m=new nt(f.lineNumber,f.column-1,f.lineNumber,f.column+1);s[c]=new T0(m,"")}return[!0,s]}static deleteLeft(e,i,n,s,c){if(this.isAutoClosingPairDelete(i.autoClosingDelete,i.autoClosingBrackets,i.autoClosingQuotes,i.autoClosingPairs.autoClosingPairsOpenByEnd,n,s,c))return this._runAutoClosingPairDelete(i,n,s);const d=[];let f=e!==2;for(let m=0,v=s.length;m<v;m++){const x=RB.getDeleteRange(s[m],n,i);if(x.isEmpty()){d[m]=null;continue}x.startLineNumber!==x.endLineNumber&&(f=!0),d[m]=new T0(x,"")}return[f,d]}static getDeleteRange(e,i,n){if(!e.isEmpty())return e;const s=e.getPosition();if(n.useTabStops&&s.column>1){const c=i.getLineContent(s.lineNumber),d=Ty(c),f=d===-1?c.length+1:d+1;if(s.column<=f){const m=n.visibleColumnFromColumn(i,s),v=em.prevIndentTabStop(m,n.indentSize),x=n.columnFromVisibleColumn(i,s.lineNumber,v);return new nt(s.lineNumber,x,s.lineNumber,s.column)}}return nt.fromPositions(RB.getPositionAfterDeleteLeft(s,i),s)}static getPositionAfterDeleteLeft(e,i){if(e.column>1){const n=nui(e.column-1,i.getLineContent(e.lineNumber));return e.with(void 0,n+1)}else if(e.lineNumber>1){const n=e.lineNumber-1;return new pi(n,i.getLineMaxColumn(n))}else return e}static cut(e,i,n){const s=[];let c=null;n.sort((d,f)=>pi.compare(d.getStartPosition(),f.getEndPosition()));for(let d=0,f=n.length;d<f;d++){const m=n[d];if(m.isEmpty())if(e.emptySelectionClipboard){const v=m.getPosition();let x,w,I,P;v.lineNumber<i.getLineCount()?(x=v.lineNumber,w=1,I=v.lineNumber+1,P=1):v.lineNumber>1&&(c==null?void 0:c.endLineNumber)!==v.lineNumber?(x=v.lineNumber-1,w=i.getLineMaxColumn(v.lineNumber-1),I=v.lineNumber,P=i.getLineMaxColumn(v.lineNumber)):(x=v.lineNumber,w=1,I=v.lineNumber,P=i.getLineMaxColumn(v.lineNumber));const O=new nt(x,w,I,P);c=O,O.isEmpty()?s[d]=null:s[d]=new T0(O,"")}else s[d]=null;else s[d]=new T0(m,"")}return new Lb(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class hu{static _createWord(e,i,n,s,c){return{start:s,end:c,wordType:i,nextCharClass:n}}static _createIntlWord(e,i){return{start:e.index,end:e.index+e.segment.length,wordType:1,nextCharClass:i}}static _findPreviousWordOnLine(e,i,n){const s=i.getLineContent(n.lineNumber);return this._doFindPreviousWordOnLine(s,e,n)}static _doFindPreviousWordOnLine(e,i,n){let s=0;const c=i.findPrevIntlWordBeforeOrAtOffset(e,n.column-2);for(let d=n.column-2;d>=0;d--){const f=e.charCodeAt(d),m=i.get(f);if(c&&d===c.index)return this._createIntlWord(c,m);if(m===0){if(s===2)return this._createWord(e,s,m,d+1,this._findEndOfWord(e,i,s,d+1));s=1}else if(m===2){if(s===1)return this._createWord(e,s,m,d+1,this._findEndOfWord(e,i,s,d+1));s=2}else if(m===1&&s!==0)return this._createWord(e,s,m,d+1,this._findEndOfWord(e,i,s,d+1))}return s!==0?this._createWord(e,s,1,0,this._findEndOfWord(e,i,s,0)):null}static _findEndOfWord(e,i,n,s){const c=i.findNextIntlWordAtOrAfterOffset(e,s),d=e.length;for(let f=s;f<d;f++){const m=e.charCodeAt(f),v=i.get(m);if(c&&f===c.index+c.segment.length||v===1||n===1&&v===2||n===2&&v===0)return f}return d}static _findNextWordOnLine(e,i,n){const s=i.getLineContent(n.lineNumber);return this._doFindNextWordOnLine(s,e,n)}static _doFindNextWordOnLine(e,i,n){let s=0;const c=e.length,d=i.findNextIntlWordAtOrAfterOffset(e,n.column-1);for(let f=n.column-1;f<c;f++){const m=e.charCodeAt(f),v=i.get(m);if(d&&f===d.index)return this._createIntlWord(d,v);if(v===0){if(s===2)return this._createWord(e,s,v,this._findStartOfWord(e,i,s,f-1),f);s=1}else if(v===2){if(s===1)return this._createWord(e,s,v,this._findStartOfWord(e,i,s,f-1),f);s=2}else if(v===1&&s!==0)return this._createWord(e,s,v,this._findStartOfWord(e,i,s,f-1),f)}return s!==0?this._createWord(e,s,1,this._findStartOfWord(e,i,s,c-1),c):null}static _findStartOfWord(e,i,n,s){const c=i.findPrevIntlWordBeforeOrAtOffset(e,s);for(let d=s;d>=0;d--){const f=e.charCodeAt(d),m=i.get(f);if(c&&d===c.index)return d;if(m===1||n===1&&m===2||n===2&&m===0)return d+1}return 0}static moveWordLeft(e,i,n,s,c){let d=n.lineNumber,f=n.column;f===1&&d>1&&(d=d-1,f=i.getLineMaxColumn(d));let m=hu._findPreviousWordOnLine(e,i,new pi(d,f));if(s===0)return new pi(d,m?m.start+1:1);if(s===1)return!c&&m&&m.wordType===2&&m.end-m.start===1&&m.nextCharClass===0&&(m=hu._findPreviousWordOnLine(e,i,new pi(d,m.start+1))),new pi(d,m?m.start+1:1);if(s===3){for(;m&&m.wordType===2;)m=hu._findPreviousWordOnLine(e,i,new pi(d,m.start+1));return new pi(d,m?m.start+1:1)}return m&&f<=m.end+1&&(m=hu._findPreviousWordOnLine(e,i,new pi(d,m.start+1))),new pi(d,m?m.end+1:1)}static _moveWordPartLeft(e,i){const n=i.lineNumber,s=e.getLineMaxColumn(n);if(i.column===1)return n>1?new pi(n-1,e.getLineMaxColumn(n-1)):i;const c=e.getLineContent(n);for(let d=i.column-1;d>1;d--){const f=c.charCodeAt(d-2),m=c.charCodeAt(d-1);if(f===95&&m!==95)return new pi(n,d);if(f===45&&m!==45)return new pi(n,d);if((LM(f)||qge(f))&&fL(m))return new pi(n,d);if(fL(f)&&fL(m)&&d+1<s){const v=c.charCodeAt(d);if(LM(v)||qge(v))return new pi(n,d)}}return new pi(n,1)}static moveWordRight(e,i,n,s){let c=n.lineNumber,d=n.column,f=!1;d===i.getLineMaxColumn(c)&&c<i.getLineCount()&&(f=!0,c=c+1,d=1);let m=hu._findNextWordOnLine(e,i,new pi(c,d));if(s===2)m&&m.wordType===2&&m.end-m.start===1&&m.nextCharClass===0&&(m=hu._findNextWordOnLine(e,i,new pi(c,m.end+1))),m?d=m.end+1:d=i.getLineMaxColumn(c);else if(s===3){for(f&&(d=0);m&&(m.wordType===2||m.start+1<=d);)m=hu._findNextWordOnLine(e,i,new pi(c,m.end+1));m?d=m.start+1:d=i.getLineMaxColumn(c)}else m&&!f&&d>=m.start+1&&(m=hu._findNextWordOnLine(e,i,new pi(c,m.end+1))),m?d=m.start+1:d=i.getLineMaxColumn(c);return new pi(c,d)}static _moveWordPartRight(e,i){const n=i.lineNumber,s=e.getLineMaxColumn(n);if(i.column===s)return n<e.getLineCount()?new pi(n+1,1):i;const c=e.getLineContent(n);for(let d=i.column+1;d<s;d++){const f=c.charCodeAt(d-2),m=c.charCodeAt(d-1);if(f!==95&&m===95)return new pi(n,d);if(f!==45&&m===45)return new pi(n,d);if((LM(f)||qge(f))&&fL(m))return new pi(n,d);if(fL(f)&&fL(m)&&d+1<s){const v=c.charCodeAt(d);if(LM(v)||qge(v))return new pi(n,d)}}return new pi(n,s)}static _deleteWordLeftWhitespace(e,i){const n=e.getLineContent(i.lineNumber),s=i.column-2,c=ME(n,s);return c+1<s?new nt(i.lineNumber,c+2,i.lineNumber,i.column):null}static deleteWordLeft(e,i){const n=e.wordSeparators,s=e.model,c=e.selection,d=e.whitespaceHeuristics;if(!c.isEmpty())return c;if(RB.isAutoClosingPairDelete(e.autoClosingDelete,e.autoClosingBrackets,e.autoClosingQuotes,e.autoClosingPairs.autoClosingPairsOpenByEnd,e.model,[e.selection],e.autoClosedCharacters)){const w=e.selection.getPosition();return new nt(w.lineNumber,w.column-1,w.lineNumber,w.column+1)}const f=new pi(c.positionLineNumber,c.positionColumn);let m=f.lineNumber,v=f.column;if(m===1&&v===1)return null;if(d){const w=this._deleteWordLeftWhitespace(s,f);if(w)return w}let x=hu._findPreviousWordOnLine(n,s,f);return i===0?x?v=x.start+1:v>1?v=1:(m--,v=s.getLineMaxColumn(m)):(x&&v<=x.end+1&&(x=hu._findPreviousWordOnLine(n,s,new pi(m,x.start+1))),x?v=x.end+1:v>1?v=1:(m--,v=s.getLineMaxColumn(m))),new nt(m,v,f.lineNumber,f.column)}static deleteInsideWord(e,i,n){if(!n.isEmpty())return n;const s=new pi(n.positionLineNumber,n.positionColumn),c=this._deleteInsideWordWhitespace(i,s);return c||this._deleteInsideWordDetermineDeleteRange(e,i,s)}static _charAtIsWhitespace(e,i){const n=e.charCodeAt(i);return n===32||n===9}static _deleteInsideWordWhitespace(e,i){const n=e.getLineContent(i.lineNumber),s=n.length;if(s===0)return null;let c=Math.max(i.column-2,0);if(!this._charAtIsWhitespace(n,c))return null;let d=Math.min(i.column-1,s-1);if(!this._charAtIsWhitespace(n,d))return null;for(;c>0&&this._charAtIsWhitespace(n,c-1);)c--;for(;d+1<s&&this._charAtIsWhitespace(n,d+1);)d++;return new nt(i.lineNumber,c+1,i.lineNumber,d+2)}static _deleteInsideWordDetermineDeleteRange(e,i,n){const s=i.getLineContent(n.lineNumber),c=s.length;if(c===0)return n.lineNumber>1?new nt(n.lineNumber-1,i.getLineMaxColumn(n.lineNumber-1),n.lineNumber,1):n.lineNumber<i.getLineCount()?new nt(n.lineNumber,1,n.lineNumber+1,1):new nt(n.lineNumber,1,n.lineNumber,1);const d=w=>w.start+1<=n.column&&n.column<=w.end+1,f=(w,I)=>(w=Math.min(w,n.column),I=Math.max(I,n.column),new nt(n.lineNumber,w,n.lineNumber,I)),m=w=>{let I=w.start+1,P=w.end+1,O=!1;for(;P-1<c&&this._charAtIsWhitespace(s,P-1);)O=!0,P++;if(!O)for(;I>1&&this._charAtIsWhitespace(s,I-2);)I--;return f(I,P)},v=hu._findPreviousWordOnLine(e,i,n);if(v&&d(v))return m(v);const x=hu._findNextWordOnLine(e,i,n);return x&&d(x)?m(x):v&&x?f(v.end+1,x.start+1):v?f(v.start+1,v.end+1):x?f(x.start+1,x.end+1):f(1,c+1)}static _deleteWordPartLeft(e,i){if(!i.isEmpty())return i;const n=i.getPosition(),s=hu._moveWordPartLeft(e,n);return new nt(n.lineNumber,n.column,s.lineNumber,s.column)}static _findFirstNonWhitespaceChar(e,i){const n=e.length;for(let s=i;s<n;s++){const c=e.charAt(s);if(c!==" "&&c!==" ")return s}return n}static _deleteWordRightWhitespace(e,i){const n=e.getLineContent(i.lineNumber),s=i.column-1,c=this._findFirstNonWhitespaceChar(n,s);return s+1<c?new nt(i.lineNumber,i.column,i.lineNumber,c+1):null}static deleteWordRight(e,i){const n=e.wordSeparators,s=e.model,c=e.selection,d=e.whitespaceHeuristics;if(!c.isEmpty())return c;const f=new pi(c.positionLineNumber,c.positionColumn);let m=f.lineNumber,v=f.column;const x=s.getLineCount(),w=s.getLineMaxColumn(m);if(m===x&&v===w)return null;if(d){const P=this._deleteWordRightWhitespace(s,f);if(P)return P}let I=hu._findNextWordOnLine(n,s,f);return i===2?I?v=I.end+1:v<w||m===x?v=w:(m++,I=hu._findNextWordOnLine(n,s,new pi(m,1)),I?v=I.start+1:v=s.getLineMaxColumn(m)):(I&&v>=I.start+1&&(I=hu._findNextWordOnLine(n,s,new pi(m,I.end+1))),I?v=I.start+1:v<w||m===x?v=w:(m++,I=hu._findNextWordOnLine(n,s,new pi(m,1)),I?v=I.start+1:v=s.getLineMaxColumn(m))),new nt(m,v,f.lineNumber,f.column)}static _deleteWordPartRight(e,i){if(!i.isEmpty())return i;const n=i.getPosition(),s=hu._moveWordPartRight(e,n);return new nt(n.lineNumber,n.column,s.lineNumber,s.column)}static _createWordAtPosition(e,i,n){const s=new nt(i,n.start+1,i,n.end+1);return{word:e.getValueInRange(s),startColumn:s.startColumn,endColumn:s.endColumn}}static getWordAtPosition(e,i,n,s){const c=Sk(i,n),d=hu._findPreviousWordOnLine(c,e,s);if(d&&d.wordType===1&&d.start<=s.column-1&&s.column-1<=d.end)return hu._createWordAtPosition(e,s.lineNumber,d);const f=hu._findNextWordOnLine(c,e,s);return f&&f.wordType===1&&f.start<=s.column-1&&s.column-1<=f.end?hu._createWordAtPosition(e,s.lineNumber,f):null}static word(e,i,n,s,c){const d=Sk(e.wordSeparators,e.wordSegmenterLocales),f=hu._findPreviousWordOnLine(d,i,c),m=hu._findNextWordOnLine(d,i,c);if(!s){let P,O;return f&&f.wordType===1&&f.start<=c.column-1&&c.column-1<=f.end?(P=f.start+1,O=f.end+1):m&&m.wordType===1&&m.start<=c.column-1&&c.column-1<=m.end?(P=m.start+1,O=m.end+1):(f?P=f.end+1:P=1,m?O=m.start+1:O=i.getLineMaxColumn(c.lineNumber)),new i0(new nt(c.lineNumber,P,c.lineNumber,O),1,0,new pi(c.lineNumber,O),0)}let v,x;f&&f.wordType===1&&f.start<c.column-1&&c.column-1<f.end?(v=f.start+1,x=f.end+1):m&&m.wordType===1&&m.start<c.column-1&&c.column-1<m.end?(v=m.start+1,x=m.end+1):(v=c.column,x=c.column);const w=c.lineNumber;let I;if(n.selectionStart.containsPosition(c))I=n.selectionStart.endColumn;else if(c.isBeforeOrEqual(n.selectionStart.getStartPosition())){I=v;const P=new pi(w,I);n.selectionStart.containsPosition(P)&&(I=n.selectionStart.endColumn)}else{I=x;const P=new pi(w,I);n.selectionStart.containsPosition(P)&&(I=n.selectionStart.startColumn)}return n.move(!0,w,I,0)}}class Awe extends hu{static deleteWordPartLeft(e){const i=w0e([hu.deleteWordLeft(e,0),hu.deleteWordLeft(e,2),hu._deleteWordPartLeft(e.model,e.selection)]);return i.sort(nt.compareRangesUsingEnds),i[2]}static deleteWordPartRight(e){const i=w0e([hu.deleteWordRight(e,0),hu.deleteWordRight(e,2),hu._deleteWordPartRight(e.model,e.selection)]);return i.sort(nt.compareRangesUsingStarts),i[0]}static moveWordPartLeft(e,i,n,s){const c=w0e([hu.moveWordLeft(e,i,n,0,s),hu.moveWordLeft(e,i,n,2,s),hu._moveWordPartLeft(i,n)]);return c.sort(pi.compare),c[2]}static moveWordPartRight(e,i,n){const s=w0e([hu.moveWordRight(e,i,n,0),hu.moveWordRight(e,i,n,2),hu._moveWordPartRight(i,n)]);return s.sort(pi.compare),s[0]}}function w0e(l){return l.filter(e=>!!e)}class t0{static addCursorDown(e,i,n){const s=[];let c=0;for(let d=0,f=i.length;d<f;d++){const m=i[d];s[c++]=new Rl(m.modelState,m.viewState),n?s[c++]=Rl.fromModelState(ku.translateDown(e.cursorConfig,e.model,m.modelState)):s[c++]=Rl.fromViewState(ku.translateDown(e.cursorConfig,e,m.viewState))}return s}static addCursorUp(e,i,n){const s=[];let c=0;for(let d=0,f=i.length;d<f;d++){const m=i[d];s[c++]=new Rl(m.modelState,m.viewState),n?s[c++]=Rl.fromModelState(ku.translateUp(e.cursorConfig,e.model,m.modelState)):s[c++]=Rl.fromViewState(ku.translateUp(e.cursorConfig,e,m.viewState))}return s}static moveToBeginningOfLine(e,i,n){const s=[];for(let c=0,d=i.length;c<d;c++){const f=i[c];s[c]=this._moveToLineStart(e,f,n)}return s}static _moveToLineStart(e,i,n){const s=i.viewState.position.column,c=i.modelState.position.column,d=s===c,f=i.viewState.position.lineNumber,m=e.getLineFirstNonWhitespaceColumn(f);return!d&&!(s===m)?this._moveToLineStartByView(e,i,n):this._moveToLineStartByModel(e,i,n)}static _moveToLineStartByView(e,i,n){return Rl.fromViewState(ku.moveToBeginningOfLine(e.cursorConfig,e,i.viewState,n))}static _moveToLineStartByModel(e,i,n){return Rl.fromModelState(ku.moveToBeginningOfLine(e.cursorConfig,e.model,i.modelState,n))}static moveToEndOfLine(e,i,n,s){const c=[];for(let d=0,f=i.length;d<f;d++){const m=i[d];c[d]=this._moveToLineEnd(e,m,n,s)}return c}static _moveToLineEnd(e,i,n,s){const c=i.viewState.position,d=e.getLineMaxColumn(c.lineNumber),f=c.column===d,m=i.modelState.position,v=e.model.getLineMaxColumn(m.lineNumber),x=d-c.column===v-m.column;return f||x?this._moveToLineEndByModel(e,i,n,s):this._moveToLineEndByView(e,i,n,s)}static _moveToLineEndByView(e,i,n,s){return Rl.fromViewState(ku.moveToEndOfLine(e.cursorConfig,e,i.viewState,n,s))}static _moveToLineEndByModel(e,i,n,s){return Rl.fromModelState(ku.moveToEndOfLine(e.cursorConfig,e.model,i.modelState,n,s))}static expandLineSelection(e,i){const n=[];for(let s=0,c=i.length;s<c;s++){const d=i[s],f=d.modelState.selection.startLineNumber,m=e.model.getLineCount();let v=d.modelState.selection.endLineNumber,x;v===m?x=e.model.getLineMaxColumn(m):(v++,x=1),n[s]=Rl.fromModelState(new i0(new nt(f,1,f,1),0,0,new pi(v,x),0))}return n}static moveToBeginningOfBuffer(e,i,n){const s=[];for(let c=0,d=i.length;c<d;c++){const f=i[c];s[c]=Rl.fromModelState(ku.moveToBeginningOfBuffer(e.cursorConfig,e.model,f.modelState,n))}return s}static moveToEndOfBuffer(e,i,n){const s=[];for(let c=0,d=i.length;c<d;c++){const f=i[c];s[c]=Rl.fromModelState(ku.moveToEndOfBuffer(e.cursorConfig,e.model,f.modelState,n))}return s}static selectAll(e,i){const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return Rl.fromModelState(new i0(new nt(1,1,1,1),0,0,new pi(n,s),0))}static line(e,i,n,s,c){const d=e.model.validatePosition(s),f=c?e.coordinatesConverter.validateViewPosition(new pi(c.lineNumber,c.column),d):e.coordinatesConverter.convertModelPositionToViewPosition(d);if(!n){const v=e.model.getLineCount();let x=d.lineNumber+1,w=1;return x>v&&(x=v,w=e.model.getLineMaxColumn(x)),Rl.fromModelState(new i0(new nt(d.lineNumber,1,x,w),2,0,new pi(x,w),0))}const m=i.modelState.selectionStart.getStartPosition().lineNumber;if(d.lineNumber<m)return Rl.fromViewState(i.viewState.move(!0,f.lineNumber,1,0));if(d.lineNumber>m){const v=e.getLineCount();let x=f.lineNumber+1,w=1;return x>v&&(x=v,w=e.getLineMaxColumn(x)),Rl.fromViewState(i.viewState.move(!0,x,w,0))}else{const v=i.modelState.selectionStart.getEndPosition();return Rl.fromModelState(i.modelState.move(!0,v.lineNumber,v.column,0))}}static word(e,i,n,s){const c=e.model.validatePosition(s);return Rl.fromModelState(hu.word(e.cursorConfig,e.model,i.modelState,n,c))}static cancelSelection(e,i){if(!i.modelState.hasSelection())return new Rl(i.modelState,i.viewState);const n=i.viewState.position.lineNumber,s=i.viewState.position.column;return Rl.fromViewState(new i0(new nt(n,s,n,s),0,0,new pi(n,s),0))}static moveTo(e,i,n,s,c){if(n){if(i.modelState.selectionStartKind===1)return this.word(e,i,n,s);if(i.modelState.selectionStartKind===2)return this.line(e,i,n,s,c)}const d=e.model.validatePosition(s),f=c?e.coordinatesConverter.validateViewPosition(new pi(c.lineNumber,c.column),d):e.coordinatesConverter.convertModelPositionToViewPosition(d);return Rl.fromViewState(i.viewState.move(n,f.lineNumber,f.column,0))}static simpleMove(e,i,n,s,c,d){switch(n){case 0:return d===4?this._moveHalfLineLeft(e,i,s):this._moveLeft(e,i,s,c);case 1:return d===4?this._moveHalfLineRight(e,i,s):this._moveRight(e,i,s,c);case 2:return d===2?this._moveUpByViewLines(e,i,s,c):this._moveUpByModelLines(e,i,s,c);case 3:return d===2?this._moveDownByViewLines(e,i,s,c):this._moveDownByModelLines(e,i,s,c);case 4:return d===2?i.map(f=>Rl.fromViewState(ku.moveToPrevBlankLine(e.cursorConfig,e,f.viewState,s))):i.map(f=>Rl.fromModelState(ku.moveToPrevBlankLine(e.cursorConfig,e.model,f.modelState,s)));case 5:return d===2?i.map(f=>Rl.fromViewState(ku.moveToNextBlankLine(e.cursorConfig,e,f.viewState,s))):i.map(f=>Rl.fromModelState(ku.moveToNextBlankLine(e.cursorConfig,e.model,f.modelState,s)));case 6:return this._moveToViewMinColumn(e,i,s);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,i,s);case 8:return this._moveToViewCenterColumn(e,i,s);case 9:return this._moveToViewMaxColumn(e,i,s);case 10:return this._moveToViewLastNonWhitespaceColumn(e,i,s);default:return null}}static viewportMove(e,i,n,s,c){const d=e.getCompletelyVisibleViewRange(),f=e.coordinatesConverter.convertViewRangeToModelRange(d);switch(n){case 11:{const m=this._firstLineNumberInRange(e.model,f,c),v=e.model.getLineFirstNonWhitespaceColumn(m);return[this._moveToModelPosition(e,i[0],s,m,v)]}case 13:{const m=this._lastLineNumberInRange(e.model,f,c),v=e.model.getLineFirstNonWhitespaceColumn(m);return[this._moveToModelPosition(e,i[0],s,m,v)]}case 12:{const m=Math.round((f.startLineNumber+f.endLineNumber)/2),v=e.model.getLineFirstNonWhitespaceColumn(m);return[this._moveToModelPosition(e,i[0],s,m,v)]}case 14:{const m=[];for(let v=0,x=i.length;v<x;v++){const w=i[v];m[v]=this.findPositionInViewportIfOutside(e,w,d,s)}return m}default:return null}}static findPositionInViewportIfOutside(e,i,n,s){const c=i.viewState.position.lineNumber;if(n.startLineNumber<=c&&c<=n.endLineNumber-1)return new Rl(i.modelState,i.viewState);{let d;c>n.endLineNumber-1?d=n.endLineNumber-1:c<n.startLineNumber?d=n.startLineNumber:d=c;const f=ku.vertical(e.cursorConfig,e,c,i.viewState.position.column,i.viewState.leftoverVisibleColumns,d,!1);return Rl.fromViewState(i.viewState.move(s,f.lineNumber,f.column,f.leftoverVisibleColumns))}}static _firstLineNumberInRange(e,i,n){let s=i.startLineNumber;return i.startColumn!==e.getLineMinColumn(s)&&s++,Math.min(i.endLineNumber,s+n-1)}static _lastLineNumberInRange(e,i,n){let s=i.startLineNumber;return i.startColumn!==e.getLineMinColumn(s)&&s++,Math.max(s,i.endLineNumber-n+1)}static _moveLeft(e,i,n,s){return i.map(c=>Rl.fromViewState(ku.moveLeft(e.cursorConfig,e,c.viewState,n,s)))}static _moveHalfLineLeft(e,i,n){const s=[];for(let c=0,d=i.length;c<d;c++){const f=i[c],m=f.viewState.position.lineNumber,v=Math.round(e.getLineLength(m)/2);s[c]=Rl.fromViewState(ku.moveLeft(e.cursorConfig,e,f.viewState,n,v))}return s}static _moveRight(e,i,n,s){return i.map(c=>Rl.fromViewState(ku.moveRight(e.cursorConfig,e,c.viewState,n,s)))}static _moveHalfLineRight(e,i,n){const s=[];for(let c=0,d=i.length;c<d;c++){const f=i[c],m=f.viewState.position.lineNumber,v=Math.round(e.getLineLength(m)/2);s[c]=Rl.fromViewState(ku.moveRight(e.cursorConfig,e,f.viewState,n,v))}return s}static _moveDownByViewLines(e,i,n,s){const c=[];for(let d=0,f=i.length;d<f;d++){const m=i[d];c[d]=Rl.fromViewState(ku.moveDown(e.cursorConfig,e,m.viewState,n,s))}return c}static _moveDownByModelLines(e,i,n,s){const c=[];for(let d=0,f=i.length;d<f;d++){const m=i[d];c[d]=Rl.fromModelState(ku.moveDown(e.cursorConfig,e.model,m.modelState,n,s))}return c}static _moveUpByViewLines(e,i,n,s){const c=[];for(let d=0,f=i.length;d<f;d++){const m=i[d];c[d]=Rl.fromViewState(ku.moveUp(e.cursorConfig,e,m.viewState,n,s))}return c}static _moveUpByModelLines(e,i,n,s){const c=[];for(let d=0,f=i.length;d<f;d++){const m=i[d];c[d]=Rl.fromModelState(ku.moveUp(e.cursorConfig,e.model,m.modelState,n,s))}return c}static _moveToViewPosition(e,i,n,s,c){return Rl.fromViewState(i.viewState.move(n,s,c,0))}static _moveToModelPosition(e,i,n,s,c){return Rl.fromModelState(i.modelState.move(n,s,c,0))}static _moveToViewMinColumn(e,i,n){const s=[];for(let c=0,d=i.length;c<d;c++){const f=i[c],m=f.viewState.position.lineNumber,v=e.getLineMinColumn(m);s[c]=this._moveToViewPosition(e,f,n,m,v)}return s}static _moveToViewFirstNonWhitespaceColumn(e,i,n){const s=[];for(let c=0,d=i.length;c<d;c++){const f=i[c],m=f.viewState.position.lineNumber,v=e.getLineFirstNonWhitespaceColumn(m);s[c]=this._moveToViewPosition(e,f,n,m,v)}return s}static _moveToViewCenterColumn(e,i,n){const s=[];for(let c=0,d=i.length;c<d;c++){const f=i[c],m=f.viewState.position.lineNumber,v=Math.round((e.getLineMaxColumn(m)+e.getLineMinColumn(m))/2);s[c]=this._moveToViewPosition(e,f,n,m,v)}return s}static _moveToViewMaxColumn(e,i,n){const s=[];for(let c=0,d=i.length;c<d;c++){const f=i[c],m=f.viewState.position.lineNumber,v=e.getLineMaxColumn(m);s[c]=this._moveToViewPosition(e,f,n,m,v)}return s}static _moveToViewLastNonWhitespaceColumn(e,i,n){const s=[];for(let c=0,d=i.length;c<d;c++){const f=i[c],m=f.viewState.position.lineNumber,v=e.getLineLastNonWhitespaceColumn(m);s[c]=this._moveToViewPosition(e,f,n,m,v)}return s}}var Tve;(function(l){const e=function(n){if(!gg(n))return!1;const s=n;return!(!Eb(s.to)||!xy(s.select)&&!Ckt(s.select)||!xy(s.by)&&!Eb(s.by)||!xy(s.value)&&!pR(s.value))};l.metadata={description:"Move cursor to a logical position in the view",args:[{name:"Cursor move argument object",description:`Property-value pairs that can be passed through this argument:
+ * 'to': A mandatory logical position value providing where to move the cursor.
+ \`\`\`
+ 'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',
+ 'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'
+ 'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'
+ 'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'
+ \`\`\`
+ * 'by': Unit to move. Default is computed based on 'to' value.
+ \`\`\`
+ 'line', 'wrappedLine', 'character', 'halfLine'
+ \`\`\`
+ * 'value': Number of units to move. Default is '1'.
+ * 'select': If 'true' makes the selection. Default is 'false'.
+ `,constraint:e,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},l.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},l.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function i(n){if(!n.to)return null;let s;switch(n.to){case l.RawDirection.Left:s=0;break;case l.RawDirection.Right:s=1;break;case l.RawDirection.Up:s=2;break;case l.RawDirection.Down:s=3;break;case l.RawDirection.PrevBlankLine:s=4;break;case l.RawDirection.NextBlankLine:s=5;break;case l.RawDirection.WrappedLineStart:s=6;break;case l.RawDirection.WrappedLineFirstNonWhitespaceCharacter:s=7;break;case l.RawDirection.WrappedLineColumnCenter:s=8;break;case l.RawDirection.WrappedLineEnd:s=9;break;case l.RawDirection.WrappedLineLastNonWhitespaceCharacter:s=10;break;case l.RawDirection.ViewPortTop:s=11;break;case l.RawDirection.ViewPortBottom:s=13;break;case l.RawDirection.ViewPortCenter:s=12;break;case l.RawDirection.ViewPortIfOutside:s=14;break;default:return null}let c=0;switch(n.by){case l.RawUnit.Line:c=1;break;case l.RawUnit.WrappedLine:c=2;break;case l.RawUnit.Character:c=3;break;case l.RawUnit.HalfLine:c=4;break}return{direction:s,unit:c,select:!!n.select,value:n.value||1}}l.parse=i})(Tve||(Tve={}));class KJe{constructor(e,i,n){this._indentRulesSupport=i,this._indentationLineProcessor=new vIt(e,n)}shouldIncrease(e,i){const n=this._indentationLineProcessor.getProcessedLine(e,i);return this._indentRulesSupport.shouldIncrease(n)}shouldDecrease(e,i){const n=this._indentationLineProcessor.getProcessedLine(e,i);return this._indentRulesSupport.shouldDecrease(n)}shouldIgnore(e,i){const n=this._indentationLineProcessor.getProcessedLine(e,i);return this._indentRulesSupport.shouldIgnore(n)}shouldIndentNextLine(e,i){const n=this._indentationLineProcessor.getProcessedLine(e,i);return this._indentRulesSupport.shouldIndentNextLine(n)}}class XJe{constructor(e,i){this.model=e,this.indentationLineProcessor=new vIt(e,i)}getProcessedTokenContextAroundRange(e){const i=this._getProcessedTokensBeforeRange(e),n=this._getProcessedTokensAfterRange(e),s=this._getProcessedPreviousLineTokens(e);return{beforeRangeProcessedTokens:i,afterRangeProcessedTokens:n,previousLineProcessedTokens:s}}_getProcessedTokensBeforeRange(e){this.model.tokenization.forceTokenization(e.startLineNumber);const i=this.model.tokenization.getLineTokens(e.startLineNumber),n=n9(i,e.startColumn-1);let s;if(QJe(this.model,e.getStartPosition())){const d=e.startColumn-1-n.firstCharOffset,f=n.firstCharOffset,m=f+d;s=i.sliceAndInflate(f,m,0)}else{const d=e.startColumn-1;s=i.sliceAndInflate(0,d,0)}return this.indentationLineProcessor.getProcessedTokens(s)}_getProcessedTokensAfterRange(e){const i=e.isEmpty()?e.getStartPosition():e.getEndPosition();this.model.tokenization.forceTokenization(i.lineNumber);const n=this.model.tokenization.getLineTokens(i.lineNumber),s=n9(n,i.column-1),c=i.column-1-s.firstCharOffset,d=s.firstCharOffset+c,f=s.firstCharOffset+s.getLineLength(),m=n.sliceAndInflate(d,f,0);return this.indentationLineProcessor.getProcessedTokens(m)}_getProcessedPreviousLineTokens(e){const i=P=>{this.model.tokenization.forceTokenization(P);const O=this.model.tokenization.getLineTokens(P),z=this.model.getLineMaxColumn(P)-1;return n9(O,z)};this.model.tokenization.forceTokenization(e.startLineNumber);const n=this.model.tokenization.getLineTokens(e.startLineNumber),s=n9(n,e.startColumn-1),c=Cg.createEmpty("",s.languageIdCodec),d=e.startLineNumber-1;if(d===0||!(s.firstCharOffset===0))return c;const v=i(d);if(!(s.languageId===v.languageId))return c;const w=v.toIViewLineTokens();return this.indentationLineProcessor.getProcessedTokens(w)}}class vIt{constructor(e,i){this.model=e,this.languageConfigurationService=i}getProcessedLine(e,i){var d,f;const n=(m,v)=>{const x=yd(m);return v+m.substring(x.length)};(f=(d=this.model.tokenization).forceTokenization)==null||f.call(d,e);const s=this.model.tokenization.getLineTokens(e);let c=this.getProcessedTokens(s).getLineContent();return i!==void 0&&(c=n(c,i)),c}getProcessedTokens(e){const i=m=>m===2||m===3||m===1,n=e.getLanguageId(0),c=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew.getBracketRegExp({global:!0}),d=[];return e.forEach(m=>{const v=e.getStandardTokenType(m);let x=e.getTokenText(m);i(v)&&(x=x.replace(c,""));const w=e.getMetadata(m);d.push({text:x,metadata:w})}),Cg.createFromTextAndMetadata(d,e.languageIdCodec)}}function QJe(l,e){l.tokenization.forceTokenization(e.lineNumber);const i=l.tokenization.getLineTokens(e.lineNumber),n=n9(i,e.column-1),s=n.firstCharOffset===0,c=i.getLanguageId(0)===n.languageId;return!s&&!c}function r$(l,e,i,n){e.tokenization.forceTokenization(i.startLineNumber);const s=e.getLanguageIdAtPosition(i.startLineNumber,i.startColumn),c=n.getLanguageConfiguration(s);if(!c)return null;const f=new XJe(e,n).getProcessedTokenContextAroundRange(i),m=f.previousLineProcessedTokens.getLineContent(),v=f.beforeRangeProcessedTokens.getLineContent(),x=f.afterRangeProcessedTokens.getLineContent(),w=c.onEnter(l,m,v,x);if(!w)return null;const I=w.indentAction;let P=w.appendText;const O=w.removeText||0;P?I===_p.Indent&&(P=" "+P):I===_p.Indent||I===_p.IndentOutdent?P=" ":P="";let z=Y2t(e,i.startLineNumber,i.startColumn);return O&&(z=z.substring(0,z.length-O)),{indentAction:I,appendText:P,removeText:O,indentation:z}}var Vxi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Hxi=function(l,e){return function(i,n){e(i,n,l)}},T1e;const h9e=Object.create(null);function yF(l,e){if(e<=0)return"";h9e[l]||(h9e[l]=["",l]);const i=h9e[l];for(let n=i.length;n<=e;n++)i[n]=i[n-1]+l;return i[e]}let xk=T1e=class{static unshiftIndent(e,i,n,s,c){const d=em.visibleColumnFromColumn(e,i,n);if(c){const f=yF(" ",s),v=em.prevIndentTabStop(d,s)/s;return yF(f,v)}else{const f=" ",v=em.prevRenderTabStop(d,n)/n;return yF(f,v)}}static shiftIndent(e,i,n,s,c){const d=em.visibleColumnFromColumn(e,i,n);if(c){const f=yF(" ",s),v=em.nextIndentTabStop(d,s)/s;return yF(f,v)}else{const f=" ",v=em.nextRenderTabStop(d,n)/n;return yF(f,v)}}constructor(e,i,n){this._languageConfigurationService=n,this._opts=i,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,i,n){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(i,n):e.addEditOperation(i,n)}getEditOperations(e,i){const n=this._selection.startLineNumber;let s=this._selection.endLineNumber;this._selection.endColumn===1&&n!==s&&(s=s-1);const{tabSize:c,indentSize:d,insertSpaces:f}=this._opts,m=n===s;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(n))&&(this._useLastEditRangeForCursorEndPosition=!0);let v=0,x=0;for(let w=n;w<=s;w++,v=x){x=0;const I=e.getLineContent(w);let P=Ty(I);if(this._opts.isUnshift&&(I.length===0||P===0)||!m&&!this._opts.isUnshift&&I.length===0)continue;if(P===-1&&(P=I.length),w>1&&em.visibleColumnFromColumn(I,P+1,c)%d!==0&&e.tokenization.isCheapToTokenize(w-1)){const J=r$(this._opts.autoIndent,e,new nt(w-1,e.getLineMaxColumn(w-1),w-1,e.getLineMaxColumn(w-1)),this._languageConfigurationService);if(J){if(x=v,J.appendText)for(let Y=0,ae=J.appendText.length;Y<ae&&x<d&&J.appendText.charCodeAt(Y)===32;Y++)x++;J.removeText&&(x=Math.max(0,x-J.removeText));for(let Y=0;Y<x&&!(P===0||I.charCodeAt(P-1)!==32);Y++)P--}}if(this._opts.isUnshift&&P===0)continue;let O;this._opts.isUnshift?O=T1e.unshiftIndent(I,P+1,c,d,f):O=T1e.shiftIndent(I,P+1,c,d,f),this._addEditOperation(i,new nt(w,1,w,P+1),O),w===n&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn<=P+1)}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&e.getLineLength(n)===0&&(this._useLastEditRangeForCursorEndPosition=!0);const v=f?yF(" ",d):" ";for(let x=n;x<=s;x++){const w=e.getLineContent(x);let I=Ty(w);if(!(this._opts.isUnshift&&(w.length===0||I===0))&&!(!m&&!this._opts.isUnshift&&w.length===0)&&(I===-1&&(I=w.length),!(this._opts.isUnshift&&I===0)))if(this._opts.isUnshift){I=Math.min(I,d);for(let P=0;P<I;P++)if(w.charCodeAt(P)===9){I=P+1;break}this._addEditOperation(i,new nt(x,1,x,I+1),"")}else this._addEditOperation(i,new nt(x,1,x,1),v),x===n&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn===1)}}this._selectionId=i.trackSelection(this._selection)}computeCursorState(e,i){if(this._useLastEditRangeForCursorEndPosition){const s=i.getInverseEditOperations()[0];return new Us(s.range.endLineNumber,s.range.endColumn,s.range.endLineNumber,s.range.endColumn)}const n=i.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){const s=this._selection.startColumn;return n.startColumn<=s?n:n.getDirection()===0?new Us(n.startLineNumber,s,n.endLineNumber,n.endColumn):new Us(n.endLineNumber,n.endColumn,n.startLineNumber,s)}return n}};xk=T1e=Vxi([Hxi(2,rh)],xk);class jxi{constructor(e,i,n){this._range=e,this._charBeforeSelection=i,this._charAfterSelection=n}getEditOperations(e,i){i.addTrackedEditOperation(new nt(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),i.addTrackedEditOperation(new nt(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,i){const n=i.getInverseEditOperations(),s=n[0].range,c=n[1].range;return new Us(s.endLineNumber,s.endColumn,c.endLineNumber,c.endColumn-this._charAfterSelection.length)}}class zxi{constructor(e,i,n){this._position=e,this._text=i,this._charAfter=n}getEditOperations(e,i){i.addTrackedEditOperation(new nt(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(e,i){const s=i.getInverseEditOperations()[0].range;return new Us(s.endLineNumber,s.startColumn,s.endLineNumber,s.endColumn-this._charAfter.length)}}function Uxi(l,e,i){const n=l.tokenization.getLanguageIdAtPosition(e,0);if(e>1){let s,c=-1;for(s=e-1;s>=1;s--){if(l.tokenization.getLanguageIdAtPosition(s,0)!==n)return c;const d=l.getLineContent(s);if(i.shouldIgnore(s)||/^\s+$/.test(d)||d===""){c=s;continue}return s}}return-1}function xre(l,e,i,n=!0,s){if(l<4)return null;const c=s.getLanguageConfiguration(e.tokenization.getLanguageId()).indentRulesSupport;if(!c)return null;const d=new KJe(e,c,s);if(i<=1)return{indentation:"",action:null};for(let m=i-1;m>0&&e.getLineContent(m)==="";m--)if(m===1)return{indentation:"",action:null};const f=Uxi(e,i,d);if(f<0)return null;if(f<1)return{indentation:"",action:null};if(d.shouldIncrease(f)||d.shouldIndentNextLine(f)){const m=e.getLineContent(f);return{indentation:yd(m),action:_p.Indent,line:f}}else if(d.shouldDecrease(f)){const m=e.getLineContent(f);return{indentation:yd(m),action:null,line:f}}else{if(f===1)return{indentation:yd(e.getLineContent(f)),action:null,line:f};const m=f-1,v=c.getIndentMetadata(e.getLineContent(m));if(!(v&3)&&v&4){let x=0;for(let w=m-1;w>0;w--)if(!d.shouldIndentNextLine(w)){x=w;break}return{indentation:yd(e.getLineContent(x+1)),action:null,line:x+1}}if(n)return{indentation:yd(e.getLineContent(f)),action:null,line:f};for(let x=f;x>0;x--){if(d.shouldIncrease(x))return{indentation:yd(e.getLineContent(x)),action:_p.Indent,line:x};if(d.shouldIndentNextLine(x)){let w=0;for(let I=x-1;I>0;I--)if(!d.shouldIndentNextLine(x)){w=I;break}return{indentation:yd(e.getLineContent(w+1)),action:null,line:w+1}}else if(d.shouldDecrease(x))return{indentation:yd(e.getLineContent(x)),action:null,line:x}}return{indentation:yd(e.getLineContent(1)),action:null,line:1}}}function zie(l,e,i,n,s,c){if(l<4)return null;const d=c.getLanguageConfiguration(i);if(!d)return null;const f=c.getLanguageConfiguration(i).indentRulesSupport;if(!f)return null;const m=new KJe(e,f,c),v=xre(l,e,n,void 0,c);if(v){const x=v.line;if(x!==void 0){let w=!0;for(let I=x;I<n-1;I++)if(!/^\s*$/.test(e.getLineContent(I))){w=!1;break}if(w){const I=d.onEnter(l,"",e.getLineContent(x),"");if(I){let P=yd(e.getLineContent(x));return I.removeText&&(P=P.substring(0,P.length-I.removeText)),I.indentAction===_p.Indent||I.indentAction===_p.IndentOutdent?P=s.shiftIndent(P):I.indentAction===_p.Outdent&&(P=s.unshiftIndent(P)),m.shouldDecrease(n)&&(P=s.unshiftIndent(P)),I.appendText&&(P+=I.appendText),yd(P)}}}return m.shouldDecrease(n)?v.action===_p.Indent?v.indentation:s.unshiftIndent(v.indentation):v.action===_p.Indent?s.shiftIndent(v.indentation):v.indentation}return null}function qxi(l,e,i,n,s){if(l<4)return null;const c=e.getLanguageIdAtPosition(i.startLineNumber,i.startColumn),d=s.getLanguageConfiguration(c).indentRulesSupport;if(!d)return null;e.tokenization.forceTokenization(i.startLineNumber);const m=new XJe(e,s).getProcessedTokenContextAroundRange(i),v=m.afterRangeProcessedTokens,x=m.beforeRangeProcessedTokens,w=yd(x.getLineContent()),I=Jxi(e,i.startLineNumber,x),P=QJe(e,i.getStartPosition()),O=e.getLineContent(i.startLineNumber),z=yd(O),J=xre(l,I,i.startLineNumber+1,void 0,s);if(!J){const ae=P?z:w;return{beforeEnter:ae,afterEnter:ae}}let Y=P?z:J.indentation;return J.action===_p.Indent&&(Y=n.shiftIndent(Y)),d.shouldDecrease(v.getLineContent())&&(Y=n.unshiftIndent(Y)),{beforeEnter:P?z:w,afterEnter:Y}}function $xi(l,e,i,n,s,c){const d=l.autoIndent;if(d<4||QJe(e,i.getStartPosition()))return null;const m=e.getLanguageIdAtPosition(i.startLineNumber,i.startColumn),v=c.getLanguageConfiguration(m).indentRulesSupport;if(!v)return null;const w=new XJe(e,c).getProcessedTokenContextAroundRange(i),I=w.beforeRangeProcessedTokens.getLineContent(),P=w.afterRangeProcessedTokens.getLineContent(),O=I+P,z=I+n+P;if(!v.shouldDecrease(O)&&v.shouldDecrease(z)){const Y=xre(d,e,i.startLineNumber,!1,c);if(!Y)return null;let ae=Y.indentation;return Y.action!==_p.Indent&&(ae=s.unshiftIndent(ae)),ae}const J=i.startLineNumber-1;if(J>0){const Y=e.getLineContent(J);if(v.shouldIndentNextLine(Y)&&v.shouldIncrease(z)){const ae=xre(d,e,i.startLineNumber,!1,c),me=ae==null?void 0:ae.indentation;if(me!==void 0){const ye=e.getLineContent(i.startLineNumber),Ce=yd(ye),rt=s.shiftIndent(me)===Ce,ct=/^\s*$/.test(O),Mt=l.autoClosingPairs.autoClosingPairsOpenByEnd.get(n),Bi=Mt&&Mt.length>0&&ct;if(rt&&Bi)return me}}}return null}function bIt(l,e,i){const n=i.getLanguageConfiguration(l.getLanguageId()).indentRulesSupport;return!n||e<1||e>l.getLineCount()?null:n.getIndentMetadata(l.getLineContent(e))}function Jxi(l,e,i){return{tokenization:{getLineTokens:s=>s===e?i:l.tokenization.getLineTokens(s),getLanguageId:()=>l.getLanguageId(),getLanguageIdAtPosition:(s,c)=>l.getLanguageIdAtPosition(s,c)},getLineContent:s=>s===e?i.getLineContent():l.getLineContent(s)}}class Gxi{static getEdits(e,i,n,s,c){if(!c&&this._isAutoIndentType(e,i,n)){const d=[];for(const m of n){const v=this._findActualIndentationForSelection(e,i,m,s);if(v===null)return;d.push({selection:m,indentation:v})}const f=cje.getAutoClosingPairClose(e,i,n,s,!1);return this._getIndentationAndAutoClosingPairEdits(e,i,d,s,f)}}static _isAutoIndentType(e,i,n){if(e.autoIndent<4)return!1;for(let s=0,c=n.length;s<c;s++)if(!i.tokenization.isCheapToTokenize(n[s].getEndPosition().lineNumber))return!1;return!0}static _findActualIndentationForSelection(e,i,n,s){const c=$xi(e,i,n,s,{shiftIndent:f=>eGe(e,f),unshiftIndent:f=>Dve(e,f)},e.languageConfigurationService);if(c===null)return null;const d=Y2t(i,n.startLineNumber,n.startColumn);return c===e.normalizeIndentation(d)?null:c}static _getIndentationAndAutoClosingPairEdits(e,i,n,s,c){const d=n.map(({selection:m,indentation:v})=>{if(c!==null){const x=this._getEditFromIndentationAndSelection(e,i,v,m,s,!1);return new ski(x,m,s,c)}else{const x=this._getEditFromIndentationAndSelection(e,i,v,m,s,!0);return NF(x.range,x.text,!1)}}),f={shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1};return new Lb(4,d,f)}static _getEditFromIndentationAndSelection(e,i,n,s,c,d=!0){const f=s.startLineNumber,m=i.getLineFirstNonWhitespaceColumn(f);let v=e.normalizeIndentation(n);if(m!==0){const w=i.getLineContent(f);v+=w.substring(m-1,s.startColumn-1)}return v+=d?c:"",{range:new nt(f,1,s.endLineNumber,s.endColumn),text:v}}}class Kxi{static getEdits(e,i,n,s,c,d){if(CIt(i,n,s,c,d))return this._runAutoClosingOvertype(e,s,d)}static _runAutoClosingOvertype(e,i,n){const s=[];for(let c=0,d=i.length;c<d;c++){const m=i[c].getPosition(),v=new nt(m.lineNumber,m.column,m.lineNumber,m.column+1);s[c]=new T0(v,n)}return new Lb(4,s,{shouldPushStackElementBefore:Mwe(e,4),shouldPushStackElementAfter:!1})}}class Xxi{static getEdits(e,i,n,s,c){if(CIt(e,i,n,s,c)){const d=n.map(f=>new T0(new nt(f.positionLineNumber,f.positionColumn,f.positionLineNumber,f.positionColumn+1),"",!1));return new Lb(4,d,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}}}class cje{static getEdits(e,i,n,s,c,d){if(!d){const f=this.getAutoClosingPairClose(e,i,n,s,c);if(f!==null)return this._runAutoClosingOpenCharType(n,s,c,f)}}static _runAutoClosingOpenCharType(e,i,n,s){const c=[];for(let d=0,f=e.length;d<f;d++){const m=e[d];c[d]=new rki(m,i,!n,s)}return new Lb(4,c,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static getAutoClosingPairClose(e,i,n,s,c){for(const O of n)if(!O.isEmpty())return null;const d=n.map(O=>{const z=O.getPosition();return c?{lineNumber:z.lineNumber,beforeColumn:z.column-s.length,afterColumn:z.column}:{lineNumber:z.lineNumber,beforeColumn:z.column,afterColumn:z.column}}),f=this._findAutoClosingPairOpen(e,i,d.map(O=>new pi(O.lineNumber,O.beforeColumn)),s);if(!f)return null;let m,v;if(NR(s)?(m=e.autoClosingQuotes,v=e.shouldAutoCloseBefore.quote):(e.blockCommentStartToken?f.open.includes(e.blockCommentStartToken):!1)?(m=e.autoClosingComments,v=e.shouldAutoCloseBefore.comment):(m=e.autoClosingBrackets,v=e.shouldAutoCloseBefore.bracket),m==="never")return null;const w=this._findContainedAutoClosingPair(e,f),I=w?w.close:"";let P=!0;for(const O of d){const{lineNumber:z,beforeColumn:J,afterColumn:Y}=O,ae=i.getLineContent(z),me=ae.substring(0,J-1),ye=ae.substring(Y-1);if(ye.startsWith(I)||(P=!1),ye.length>0){const ct=ye.charAt(0);if(!this._isBeforeClosingBrace(e,ye)&&!v(ct))return null}if(f.open.length===1&&(s==="'"||s==='"')&&m!=="always"){const ct=Sk(e.wordSeparators,[]);if(me.length>0){const Mt=me.charCodeAt(me.length-1);if(ct.get(Mt)===0)return null}}if(!i.tokenization.isCheapToTokenize(z))return null;i.tokenization.forceTokenization(z);const Ce=i.tokenization.getLineTokens(z),Fe=n9(Ce,J-1);if(!f.shouldAutoClose(Fe,J-Fe.firstCharOffset))return null;const rt=f.findNeutralCharacter();if(rt){const ct=i.tokenization.getTokenTypeIfInsertingCharacter(z,J,rt);if(!f.isOK(ct))return null}}return P?f.close.substring(0,f.close.length-I.length):f.close}static _findContainedAutoClosingPair(e,i){if(i.open.length<=1)return null;const n=i.close.charAt(i.close.length-1),s=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(n)||[];let c=null;for(const d of s)d.open!==i.open&&i.open.includes(d.open)&&i.close.endsWith(d.close)&&(!c||d.open.length>c.open.length)&&(c=d);return c}static _findAutoClosingPairOpen(e,i,n,s){const c=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(s);if(!c)return null;let d=null;for(const f of c)if(d===null||f.open.length>d.open.length){let m=!0;for(const v of n)if(i.getValueInRange(new nt(v.lineNumber,v.column-f.open.length+1,v.lineNumber,v.column))+s!==f.open){m=!1;break}m&&(d=f)}return d}static _isBeforeClosingBrace(e,i){const n=i.charAt(0),s=e.autoClosingPairs.autoClosingPairsOpenByStart.get(n)||[],c=e.autoClosingPairs.autoClosingPairsCloseByStart.get(n)||[],d=s.some(m=>i.startsWith(m.open)),f=c.some(m=>i.startsWith(m.close));return!d&&f}}class Qxi{static getEdits(e,i,n,s,c){if(!c&&this._isSurroundSelectionType(e,i,n,s))return this._runSurroundSelectionType(e,n,s)}static _runSurroundSelectionType(e,i,n){const s=[];for(let c=0,d=i.length;c<d;c++){const f=i[c],m=e.surroundingPairs[n];s[c]=new jxi(f,n,m)}return new Lb(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isSurroundSelectionType(e,i,n,s){if(!SIt(e,s)||!e.surroundingPairs.hasOwnProperty(s))return!1;const c=NR(s);for(const d of n){if(d.isEmpty())return!1;let f=!0;for(let m=d.startLineNumber;m<=d.endLineNumber;m++){const v=i.getLineContent(m),x=m===d.startLineNumber?d.startColumn-1:0,w=m===d.endLineNumber?d.endColumn-1:v.length,I=v.substring(x,w);if(/[^ \t]/.test(I)){f=!1;break}}if(f)return!1;if(c&&d.startLineNumber===d.endLineNumber&&d.startColumn+1===d.endColumn){const m=i.getValueInRange(d);if(NR(m))return!1}}return!0}}class Zxi{static getEdits(e,i,n,s,c,d){if(!d&&this._isTypeInterceptorElectricChar(i,n,s)){const f=this._typeInterceptorElectricChar(e,i,n,s[0],c);if(f)return f}}static _isTypeInterceptorElectricChar(e,i,n){return!!(n.length===1&&i.tokenization.isCheapToTokenize(n[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(e,i,n,s,c){if(!i.electricChars.hasOwnProperty(c)||!s.isEmpty())return null;const d=s.getPosition();n.tokenization.forceTokenization(d.lineNumber);const f=n.tokenization.getLineTokens(d.lineNumber);let m;try{m=i.onElectricCharacter(c,f,d.column)}catch(v){return Pa(v),null}if(!m)return null;if(m.matchOpenBracket){const v=(f.getLineContent()+c).lastIndexOf(m.matchOpenBracket)+1,x=n.bracketPairs.findMatchingBracketUp(m.matchOpenBracket,{lineNumber:d.lineNumber,column:v},500);if(x){if(x.startLineNumber===d.lineNumber)return null;const w=n.getLineContent(x.startLineNumber),I=yd(w),P=i.normalizeIndentation(I),O=n.getLineContent(d.lineNumber),z=n.getLineFirstNonWhitespaceColumn(d.lineNumber)||d.column,J=O.substring(z-1,d.column-1),Y=P+J+c,ae=new nt(d.lineNumber,1,d.lineNumber,d.column),me=new T0(ae,Y);return new Lb(YJe(Y,e),[me],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}}class Yxi{static getEdits(e,i,n){const s=[];for(let d=0,f=i.length;d<f;d++)s[d]=new T0(i[d],n);const c=YJe(n,e);return new Lb(c,s,{shouldPushStackElementBefore:Mwe(e,c),shouldPushStackElementAfter:!1})}}class Owe{static getEdits(e,i,n,s,c){if(!c&&s===`
+`){const d=[];for(let f=0,m=n.length;f<m;f++)d[f]=this._enter(e,i,!1,n[f]);return new Lb(4,d,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}}static _enter(e,i,n,s){if(e.autoIndent===0)return NF(s,`
+`,n);if(!i.tokenization.isCheapToTokenize(s.getStartPosition().lineNumber)||e.autoIndent===1){const m=i.getLineContent(s.startLineNumber),v=yd(m).substring(0,s.startColumn-1);return NF(s,`
+`+e.normalizeIndentation(v),n)}const c=r$(e.autoIndent,i,s,e.languageConfigurationService);if(c){if(c.indentAction===_p.None)return NF(s,`
+`+e.normalizeIndentation(c.indentation+c.appendText),n);if(c.indentAction===_p.Indent)return NF(s,`
+`+e.normalizeIndentation(c.indentation+c.appendText),n);if(c.indentAction===_p.IndentOutdent){const m=e.normalizeIndentation(c.indentation),v=e.normalizeIndentation(c.indentation+c.appendText),x=`
+`+v+`
+`+m;return n?new k1e(s,x,!0):new kve(s,x,-1,v.length-m.length,!0)}else if(c.indentAction===_p.Outdent){const m=Dve(e,c.indentation);return NF(s,`
+`+e.normalizeIndentation(m+c.appendText),n)}}const d=i.getLineContent(s.startLineNumber),f=yd(d).substring(0,s.startColumn-1);if(e.autoIndent>=4){const m=qxi(e.autoIndent,i,s,{unshiftIndent:v=>Dve(e,v),shiftIndent:v=>eGe(e,v),normalizeIndentation:v=>e.normalizeIndentation(v)},e.languageConfigurationService);if(m){let v=e.visibleColumnFromColumn(i,s.getEndPosition());const x=s.endColumn,w=i.getLineContent(s.endLineNumber),I=Ty(w);if(I>=0?s=s.setEndPosition(s.endLineNumber,Math.max(s.endColumn,I+1)):s=s.setEndPosition(s.endLineNumber,i.getLineMaxColumn(s.endLineNumber)),n)return new k1e(s,`
+`+e.normalizeIndentation(m.afterEnter),!0);{let P=0;return x<=I+1&&(e.insertSpaces||(v=Math.ceil(v/e.indentSize)),P=Math.min(v+1-e.normalizeIndentation(m.afterEnter).length-1,0)),new kve(s,`
+`+e.normalizeIndentation(m.afterEnter),0,P,!0)}}}return NF(s,`
+`+e.normalizeIndentation(f),n)}static lineInsertBefore(e,i,n){if(i===null||n===null)return[];const s=[];for(let c=0,d=n.length;c<d;c++){let f=n[c].positionLineNumber;if(f===1)s[c]=new k1e(new nt(1,1,1,1),`
+`);else{f--;const m=i.getLineMaxColumn(f);s[c]=this._enter(e,i,!1,new nt(f,m,f,m))}}return s}static lineInsertAfter(e,i,n){if(i===null||n===null)return[];const s=[];for(let c=0,d=n.length;c<d;c++){const f=n[c].positionLineNumber,m=i.getLineMaxColumn(f);s[c]=this._enter(e,i,!1,new nt(f,m,f,m))}return s}static lineBreakInsert(e,i,n){const s=[];for(let c=0,d=n.length;c<d;c++)s[c]=this._enter(e,i,!0,n[c]);return s}}class eki{static getEdits(e,i,n,s,c,d){const f=this._distributePasteToCursors(e,n,s,c,d);return f?(n=n.sort(nt.compareRangesUsingStarts),this._distributedPaste(e,i,n,f)):this._simplePaste(e,i,n,s,c)}static _distributePasteToCursors(e,i,n,s,c){if(s||i.length===1)return null;if(c&&c.length===i.length)return c;if(e.multiCursorPaste==="spread"){n.charCodeAt(n.length-1)===10&&(n=n.substring(0,n.length-1)),n.charCodeAt(n.length-1)===13&&(n=n.substring(0,n.length-1));const d=BL(n);if(d.length===i.length)return d}return null}static _distributedPaste(e,i,n,s){const c=[];for(let d=0,f=n.length;d<f;d++)c[d]=new T0(n[d],s[d]);return new Lb(0,c,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(e,i,n,s,c){const d=[];for(let f=0,m=n.length;f<m;f++){const v=n[f],x=v.getPosition();if(c&&!v.isEmpty()&&(c=!1),c&&s.indexOf(`
+`)!==s.length-1&&(c=!1),c){const w=new nt(x.lineNumber,1,x.lineNumber,1);d[f]=new GJe(w,s,v,!0)}else d[f]=new T0(v,s)}return new Lb(0,d,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class tki{static getEdits(e,i,n,s,c,d,f,m){const v=s.map(x=>this._compositionType(n,x,c,d,f,m));return new Lb(4,v,{shouldPushStackElementBefore:Mwe(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,i,n,s,c,d){if(!i.isEmpty())return null;const f=i.getPosition(),m=Math.max(1,f.column-s),v=Math.min(e.getLineMaxColumn(f.lineNumber),f.column+c),x=new nt(f.lineNumber,m,f.lineNumber,v);return e.getValueInRange(x)===n&&d===0?null:new kve(x,n,0,d)}}class iki{static getEdits(e,i,n){const s=[];for(let d=0,f=i.length;d<f;d++)s[d]=new T0(i[d],n);const c=YJe(n,e);return new Lb(c,s,{shouldPushStackElementBefore:Mwe(e,c),shouldPushStackElementAfter:!1})}}class nki{static getCommands(e,i,n){const s=[];for(let c=0,d=n.length;c<d;c++){const f=n[c];if(f.isEmpty()){const m=i.getLineContent(f.startLineNumber);if(/^\s*$/.test(m)&&i.tokenization.isCheapToTokenize(f.startLineNumber)){let v=this._goodIndentForLine(e,i,f.startLineNumber);v=v||" ";const x=e.normalizeIndentation(v);if(!m.startsWith(x)){s[c]=new T0(new nt(f.startLineNumber,1,f.startLineNumber,m.length+1),x,!0);continue}}s[c]=this._replaceJumpToNextIndent(e,i,f,!0)}else{if(f.startLineNumber===f.endLineNumber){const m=i.getLineMaxColumn(f.startLineNumber);if(f.startColumn!==1||f.endColumn!==m){s[c]=this._replaceJumpToNextIndent(e,i,f,!1);continue}}s[c]=new xk(f,{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent},e.languageConfigurationService)}}return s}static _goodIndentForLine(e,i,n){let s=null,c="";const d=xre(e.autoIndent,i,n,!1,e.languageConfigurationService);if(d)s=d.action,c=d.indentation;else if(n>1){let f;for(f=n-1;f>=1;f--){const x=i.getLineContent(f);if(ME(x)>=0)break}if(f<1)return null;const m=i.getLineMaxColumn(f),v=r$(e.autoIndent,i,new nt(f,m,f,m),e.languageConfigurationService);v&&(c=v.indentation+v.appendText)}return s&&(s===_p.Indent&&(c=eGe(e,c)),s===_p.Outdent&&(c=Dve(e,c)),c=e.normalizeIndentation(c)),c||null}static _replaceJumpToNextIndent(e,i,n,s){let c="";const d=n.getStartPosition();if(e.insertSpaces){const f=e.visibleColumnFromColumn(i,d),m=e.indentSize,v=m-f%m;for(let x=0;x<v;x++)c+=" "}else c=" ";return new T0(n,c,s)}}class ZJe extends kve{constructor(e,i,n,s,c,d){super(e,i,n,s),this._openCharacter=c,this._closeCharacter=d,this.closeCharacterRange=null,this.enclosingRange=null}_computeCursorStateWithRange(e,i,n){return this.closeCharacterRange=new nt(i.startLineNumber,i.endColumn-this._closeCharacter.length,i.endLineNumber,i.endColumn),this.enclosingRange=new nt(i.startLineNumber,i.endColumn-this._openCharacter.length-this._closeCharacter.length,i.endLineNumber,i.endColumn),super.computeCursorState(e,n)}}class rki extends ZJe{constructor(e,i,n,s){const c=(n?i:"")+s,d=0,f=-s.length;super(e,c,d,f,i,s)}computeCursorState(e,i){const s=i.getInverseEditOperations()[0].range;return this._computeCursorStateWithRange(e,s,i)}}class ski extends ZJe{constructor(e,i,n,s){const c=n+s,d=0,f=n.length;super(i,c,d,f,n,s),this._autoIndentationEdit=e,this._autoClosingEdit={range:i,text:c}}getEditOperations(e,i){i.addTrackedEditOperation(this._autoIndentationEdit.range,this._autoIndentationEdit.text),i.addTrackedEditOperation(this._autoClosingEdit.range,this._autoClosingEdit.text)}computeCursorState(e,i){const n=i.getInverseEditOperations();if(n.length!==2)throw new Error("There should be two inverse edit operations!");const s=n[0].range,c=n[1].range,d=s.plusRange(c);return this._computeCursorStateWithRange(e,d,i)}}function YJe(l,e){return l===" "?e===5||e===6?6:5:4}function Mwe(l,e){return DSt(l)&&!DSt(e)?!0:l===5?!1:TSt(l)!==TSt(e)}function TSt(l){return l===6||l===5?"space":l}function DSt(l){return l===4||l===5||l===6}function CIt(l,e,i,n,s){if(l.autoClosingOvertype==="never"||!l.autoClosingPairs.autoClosingPairsCloseSingleChar.has(s))return!1;for(let c=0,d=i.length;c<d;c++){const f=i[c];if(!f.isEmpty())return!1;const m=f.getPosition(),v=e.getLineContent(m.lineNumber);if(v.charAt(m.column-1)!==s)return!1;const w=NR(s);if((m.column>2?v.charCodeAt(m.column-2):0)===92&&w)return!1;if(l.autoClosingOvertype==="auto"){let P=!1;for(let O=0,z=n.length;O<z;O++){const J=n[O];if(m.lineNumber===J.startLineNumber&&m.column===J.startColumn){P=!0;break}}if(!P)return!1}}return!0}function NF(l,e,i){return i?new k1e(l,e,!0):new T0(l,e,!0)}function eGe(l,e,i){return i=i||1,xk.shiftIndent(e,e.length+i,l.tabSize,l.indentSize,l.insertSpaces)}function Dve(l,e,i){return i=i||1,xk.unshiftIndent(e,e.length+i,l.tabSize,l.indentSize,l.insertSpaces)}function SIt(l,e){return NR(e)?l.autoSurround==="quotes"||l.autoSurround==="languageDefined":l.autoSurround==="brackets"||l.autoSurround==="languageDefined"}class DM{static indent(e,i,n){if(i===null||n===null)return[];const s=[];for(let c=0,d=n.length;c<d;c++)s[c]=new xk(n[c],{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent},e.languageConfigurationService);return s}static outdent(e,i,n){const s=[];for(let c=0,d=n.length;c<d;c++)s[c]=new xk(n[c],{isUnshift:!0,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent},e.languageConfigurationService);return s}static paste(e,i,n,s,c,d){return eki.getEdits(e,i,n,s,c,d)}static tab(e,i,n){return nki.getCommands(e,i,n)}static compositionType(e,i,n,s,c,d,f,m){return tki.getEdits(e,i,n,s,c,d,f,m)}static compositionEndWithInterceptors(e,i,n,s,c,d){if(!s)return null;let f=null;for(const I of s)if(f===null)f=I.insertedText;else if(f!==I.insertedText)return null;if(!f||f.length!==1)return null;const m=f;let v=!1;for(const I of s)if(I.deletedText.length!==0){v=!0;break}if(v){if(!SIt(i,m)||!i.surroundingPairs.hasOwnProperty(m))return null;const I=NR(m);for(const z of s)if(z.deletedSelectionStart!==0||z.deletedSelectionEnd!==z.deletedText.length||/^[ \t]+$/.test(z.deletedText)||I&&NR(z.deletedText))return null;const P=[];for(const z of c){if(!z.isEmpty())return null;P.push(z.getPosition())}if(P.length!==s.length)return null;const O=[];for(let z=0,J=P.length;z<J;z++)O.push(new zxi(P[z],s[z].deletedText,i.surroundingPairs[m]));return new Lb(4,O,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const x=Xxi.getEdits(i,n,c,d,m);if(x!==void 0)return x;const w=cje.getEdits(i,n,c,m,!0,!1);return w!==void 0?w:null}static typeWithInterceptors(e,i,n,s,c,d,f){const m=Owe.getEdits(n,s,c,f,e);if(m!==void 0)return m;const v=Gxi.getEdits(n,s,c,f,e);if(v!==void 0)return v;const x=Kxi.getEdits(i,n,s,c,d,f);if(x!==void 0)return x;const w=cje.getEdits(n,s,c,f,!1,e);if(w!==void 0)return w;const I=Qxi.getEdits(n,s,c,f,e);if(I!==void 0)return I;const P=Zxi.getEdits(i,n,s,c,f,e);return P!==void 0?P:Yxi.getEdits(i,c,f)}static typeWithoutInterceptors(e,i,n,s,c){return iki.getEdits(e,s,c)}}class oki{constructor(e,i,n,s,c,d){this.deletedText=e,this.deletedSelectionStart=i,this.deletedSelectionEnd=n,this.insertedText=s,this.insertedSelectionStart=c,this.insertedSelectionEnd=d}}var Tt;(function(l){l.editorSimpleInput=new rs("editorSimpleInput",!1,!0),l.editorTextFocus=new rs("editorTextFocus",!1,W("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),l.focus=new rs("editorFocus",!1,W("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),l.textInputFocus=new rs("textInputFocus",!1,W("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),l.readOnly=new rs("editorReadonly",!1,W("editorReadonly","Whether the editor is read-only")),l.inDiffEditor=new rs("inDiffEditor",!1,W("inDiffEditor","Whether the context is a diff editor")),l.isEmbeddedDiffEditor=new rs("isEmbeddedDiffEditor",!1,W("isEmbeddedDiffEditor","Whether the context is an embedded diff editor")),l.inMultiDiffEditor=new rs("inMultiDiffEditor",!1,W("inMultiDiffEditor","Whether the context is a multi diff editor")),l.multiDiffEditorAllCollapsed=new rs("multiDiffEditorAllCollapsed",void 0,W("multiDiffEditorAllCollapsed","Whether all files in multi diff editor are collapsed")),l.hasChanges=new rs("diffEditorHasChanges",!1,W("diffEditorHasChanges","Whether the diff editor has changes")),l.comparingMovedCode=new rs("comparingMovedCode",!1,W("comparingMovedCode","Whether a moved code block is selected for comparison")),l.accessibleDiffViewerVisible=new rs("accessibleDiffViewerVisible",!1,W("accessibleDiffViewerVisible","Whether the accessible diff viewer is visible")),l.diffEditorRenderSideBySideInlineBreakpointReached=new rs("diffEditorRenderSideBySideInlineBreakpointReached",!1,W("diffEditorRenderSideBySideInlineBreakpointReached","Whether the diff editor render side by side inline breakpoint is reached")),l.diffEditorInlineMode=new rs("diffEditorInlineMode",!1,W("diffEditorInlineMode","Whether inline mode is active")),l.diffEditorOriginalWritable=new rs("diffEditorOriginalWritable",!1,W("diffEditorOriginalWritable","Whether modified is writable in the diff editor")),l.diffEditorModifiedWritable=new rs("diffEditorModifiedWritable",!1,W("diffEditorModifiedWritable","Whether modified is writable in the diff editor")),l.diffEditorOriginalUri=new rs("diffEditorOriginalUri","",W("diffEditorOriginalUri","The uri of the original document")),l.diffEditorModifiedUri=new rs("diffEditorModifiedUri","",W("diffEditorModifiedUri","The uri of the modified document")),l.columnSelection=new rs("editorColumnSelection",!1,W("editorColumnSelection","Whether `editor.columnSelection` is enabled")),l.writable=l.readOnly.toNegated(),l.hasNonEmptySelection=new rs("editorHasSelection",!1,W("editorHasSelection","Whether the editor has text selected")),l.hasOnlyEmptySelection=l.hasNonEmptySelection.toNegated(),l.hasMultipleSelections=new rs("editorHasMultipleSelections",!1,W("editorHasMultipleSelections","Whether the editor has multiple selections")),l.hasSingleSelection=l.hasMultipleSelections.toNegated(),l.tabMovesFocus=new rs("editorTabMovesFocus",!1,W("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),l.tabDoesNotMoveFocus=l.tabMovesFocus.toNegated(),l.isInEmbeddedEditor=new rs("isInEmbeddedEditor",!1,!0),l.canUndo=new rs("canUndo",!1,!0),l.canRedo=new rs("canRedo",!1,!0),l.hoverVisible=new rs("editorHoverVisible",!1,W("editorHoverVisible","Whether the editor hover is visible")),l.hoverFocused=new rs("editorHoverFocused",!1,W("editorHoverFocused","Whether the editor hover is focused")),l.stickyScrollFocused=new rs("stickyScrollFocused",!1,W("stickyScrollFocused","Whether the sticky scroll is focused")),l.stickyScrollVisible=new rs("stickyScrollVisible",!1,W("stickyScrollVisible","Whether the sticky scroll is visible")),l.standaloneColorPickerVisible=new rs("standaloneColorPickerVisible",!1,W("standaloneColorPickerVisible","Whether the standalone color picker is visible")),l.standaloneColorPickerFocused=new rs("standaloneColorPickerFocused",!1,W("standaloneColorPickerFocused","Whether the standalone color picker is focused")),l.inCompositeEditor=new rs("inCompositeEditor",void 0,W("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),l.notInCompositeEditor=l.inCompositeEditor.toNegated(),l.languageId=new rs("editorLangId","",W("editorLangId","The language identifier of the editor")),l.hasCompletionItemProvider=new rs("editorHasCompletionItemProvider",!1,W("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),l.hasCodeActionsProvider=new rs("editorHasCodeActionsProvider",!1,W("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),l.hasCodeLensProvider=new rs("editorHasCodeLensProvider",!1,W("editorHasCodeLensProvider","Whether the editor has a code lens provider")),l.hasDefinitionProvider=new rs("editorHasDefinitionProvider",!1,W("editorHasDefinitionProvider","Whether the editor has a definition provider")),l.hasDeclarationProvider=new rs("editorHasDeclarationProvider",!1,W("editorHasDeclarationProvider","Whether the editor has a declaration provider")),l.hasImplementationProvider=new rs("editorHasImplementationProvider",!1,W("editorHasImplementationProvider","Whether the editor has an implementation provider")),l.hasTypeDefinitionProvider=new rs("editorHasTypeDefinitionProvider",!1,W("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),l.hasHoverProvider=new rs("editorHasHoverProvider",!1,W("editorHasHoverProvider","Whether the editor has a hover provider")),l.hasDocumentHighlightProvider=new rs("editorHasDocumentHighlightProvider",!1,W("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),l.hasDocumentSymbolProvider=new rs("editorHasDocumentSymbolProvider",!1,W("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),l.hasReferenceProvider=new rs("editorHasReferenceProvider",!1,W("editorHasReferenceProvider","Whether the editor has a reference provider")),l.hasRenameProvider=new rs("editorHasRenameProvider",!1,W("editorHasRenameProvider","Whether the editor has a rename provider")),l.hasSignatureHelpProvider=new rs("editorHasSignatureHelpProvider",!1,W("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),l.hasInlayHintsProvider=new rs("editorHasInlayHintsProvider",!1,W("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),l.hasDocumentFormattingProvider=new rs("editorHasDocumentFormattingProvider",!1,W("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),l.hasDocumentSelectionFormattingProvider=new rs("editorHasDocumentSelectionFormattingProvider",!1,W("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),l.hasMultipleDocumentFormattingProvider=new rs("editorHasMultipleDocumentFormattingProvider",!1,W("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),l.hasMultipleDocumentSelectionFormattingProvider=new rs("editorHasMultipleDocumentSelectionFormattingProvider",!1,W("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))})(Tt||(Tt={}));const ru=0;class Qh extends tm{runEditorCommand(e,i,n){const s=i._getViewModel();s&&this.runCoreEditorCommand(s,n||{})}}var S0;(function(l){const e=function(n){if(!gg(n))return!1;const s=n;return!(!Eb(s.to)||!xy(s.by)&&!Eb(s.by)||!xy(s.value)&&!pR(s.value)||!xy(s.revealCursor)&&!Ckt(s.revealCursor))};l.metadata={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n * 'to': A mandatory direction value.\n ```\n 'up', 'down'\n ```\n * 'by': Unit to move. Default is computed based on 'to' value.\n ```\n 'line', 'wrappedLine', 'page', 'halfPage', 'editor'\n ```\n * 'value': Number of units to move. Default is '1'.\n * 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n ",constraint:e,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage","editor"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},l.RawDirection={Up:"up",Right:"right",Down:"down",Left:"left"},l.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage",Editor:"editor",Column:"column"};function i(n){let s;switch(n.to){case l.RawDirection.Up:s=1;break;case l.RawDirection.Right:s=2;break;case l.RawDirection.Down:s=3;break;case l.RawDirection.Left:s=4;break;default:return null}let c;switch(n.by){case l.RawUnit.Line:c=1;break;case l.RawUnit.WrappedLine:c=2;break;case l.RawUnit.Page:c=3;break;case l.RawUnit.HalfPage:c=4;break;case l.RawUnit.Editor:c=5;break;case l.RawUnit.Column:c=6;break;default:c=2}const d=Math.floor(n.value||1),f=!!n.revealCursor;return{direction:s,unit:c,value:d,revealCursor:f,select:!!n.select}}l.parse=i})(S0||(S0={}));var fq;(function(l){const e=function(i){if(!gg(i))return!1;const n=i;return!(!pR(n.lineNumber)&&!Eb(n.lineNumber)||!xy(n.at)&&!Eb(n.at))};l.metadata={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n * 'lineNumber': A mandatory line number value.\n * 'at': Logical position at which line has to be revealed.\n ```\n 'top', 'center', 'bottom'\n ```\n ",constraint:e,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},l.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(fq||(fq={}));class lje{constructor(e){e.addImplementation(1e4,"code-editor",(i,n)=>{const s=i.get(Bl).getFocusedCodeEditor();return s&&s.hasTextFocus()?this._runEditorCommand(i,s,n):!1}),e.addImplementation(1e3,"generic-dom-input-textarea",(i,n)=>{const s=D0();return s&&["input","textarea"].indexOf(s.tagName.toLowerCase())>=0?(this.runDOMCommand(s),!0):!1}),e.addImplementation(0,"generic-dom",(i,n)=>{const s=i.get(Bl).getActiveCodeEditor();return s?(s.focus(),this._runEditorCommand(i,s,n)):!1})}_runEditorCommand(e,i,n){const s=this.runEditorCommand(e,i,n);return s||!0}}var hg;(function(l){class e extends Qh{constructor(ae){super(ae),this._inSelectionMode=ae.inSelectionMode}runCoreEditorCommand(ae,me){if(!me.position)return;ae.model.pushStackElement(),ae.setCursorStates(me.source,3,[t0.moveTo(ae,ae.getPrimaryCursorState(),this._inSelectionMode,me.position,me.viewPosition)])&&me.revealType!==2&&ae.revealAllCursors(me.source,!0,!0)}}l.MoveTo=$r(new e({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),l.MoveToSelect=$r(new e({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class i extends Qh{runCoreEditorCommand(ae,me){ae.model.pushStackElement();const ye=this._getColumnSelectResult(ae,ae.getPrimaryCursorState(),ae.getCursorColumnSelectData(),me);ye!==null&&(ae.setCursorStates(me.source,3,ye.viewStates.map(Ce=>Rl.fromViewState(Ce))),ae.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:ye.fromLineNumber,fromViewVisualColumn:ye.fromVisualColumn,toViewLineNumber:ye.toLineNumber,toViewVisualColumn:ye.toVisualColumn}),ye.reversed?ae.revealTopMostCursor(me.source):ae.revealBottomMostCursor(me.source))}}l.ColumnSelect=$r(new class extends i{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(Y,ae,me,ye){if(typeof ye.position>"u"||typeof ye.viewPosition>"u"||typeof ye.mouseColumn>"u")return null;const Ce=Y.model.validatePosition(ye.position),Fe=Y.coordinatesConverter.validateViewPosition(new pi(ye.viewPosition.lineNumber,ye.viewPosition.column),Ce),rt=ye.doColumnSelect?me.fromViewLineNumber:Fe.lineNumber,ct=ye.doColumnSelect?me.fromViewVisualColumn:ye.mouseColumn-1;return JF.columnSelect(Y.cursorConfig,Y,rt,ct,Fe.lineNumber,ye.mouseColumn-1)}}),l.CursorColumnSelectLeft=$r(new class extends i{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(Y,ae,me,ye){return JF.columnSelectLeft(Y.cursorConfig,Y,me)}}),l.CursorColumnSelectRight=$r(new class extends i{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(Y,ae,me,ye){return JF.columnSelectRight(Y.cursorConfig,Y,me)}});class n extends i{constructor(ae){super(ae),this._isPaged=ae.isPaged}_getColumnSelectResult(ae,me,ye,Ce){return JF.columnSelectUp(ae.cursorConfig,ae,ye,this._isPaged)}}l.CursorColumnSelectUp=$r(new n({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:3600,linux:{primary:0}}})),l.CursorColumnSelectPageUp=$r(new n({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:3595,linux:{primary:0}}}));class s extends i{constructor(ae){super(ae),this._isPaged=ae.isPaged}_getColumnSelectResult(ae,me,ye,Ce){return JF.columnSelectDown(ae.cursorConfig,ae,ye,this._isPaged)}}l.CursorColumnSelectDown=$r(new s({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:3602,linux:{primary:0}}})),l.CursorColumnSelectPageDown=$r(new s({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:3596,linux:{primary:0}}}));class c extends Qh{constructor(){super({id:"cursorMove",precondition:void 0,metadata:Tve.metadata})}runCoreEditorCommand(ae,me){const ye=Tve.parse(me);ye&&this._runCursorMove(ae,me.source,ye)}_runCursorMove(ae,me,ye){ae.model.pushStackElement(),ae.setCursorStates(me,3,c._move(ae,ae.getCursorStates(),ye)),ae.revealAllCursors(me,!0)}static _move(ae,me,ye){const Ce=ye.select,Fe=ye.value;switch(ye.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return t0.simpleMove(ae,me,ye.direction,Ce,Fe,ye.unit);case 11:case 13:case 12:case 14:return t0.viewportMove(ae,me,ye.direction,Ce,Fe);default:return null}}}l.CursorMoveImpl=c,l.CursorMove=$r(new c);class d extends Qh{constructor(ae){super(ae),this._staticArgs=ae.args}runCoreEditorCommand(ae,me){let ye=this._staticArgs;this._staticArgs.value===-1&&(ye={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:me.pageSize||ae.cursorConfig.pageSize}),ae.model.pushStackElement(),ae.setCursorStates(me.source,3,t0.simpleMove(ae,ae.getCursorStates(),ye.direction,ye.select,ye.value,ye.unit)),ae.revealAllCursors(me.source,!0)}}l.CursorLeft=$r(new d({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),l.CursorLeftSelect=$r(new d({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:1039}})),l.CursorRight=$r(new d({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),l.CursorRightSelect=$r(new d({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:1041}})),l.CursorUp=$r(new d({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),l.CursorUpSelect=$r(new d({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),l.CursorPageUp=$r(new d({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:11}})),l.CursorPageUpSelect=$r(new d({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:1035}})),l.CursorDown=$r(new d({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),l.CursorDownSelect=$r(new d({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),l.CursorPageDown=$r(new d({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:12}})),l.CursorPageDownSelect=$r(new d({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:1036}})),l.CreateCursor=$r(new class extends Qh{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(Y,ae){if(!ae.position)return;let me;ae.wholeLine?me=t0.line(Y,Y.getPrimaryCursorState(),!1,ae.position,ae.viewPosition):me=t0.moveTo(Y,Y.getPrimaryCursorState(),!1,ae.position,ae.viewPosition);const ye=Y.getCursorStates();if(ye.length>1){const Ce=me.modelState?me.modelState.position:null,Fe=me.viewState?me.viewState.position:null;for(let rt=0,ct=ye.length;rt<ct;rt++){const Mt=ye[rt];if(!(Ce&&!Mt.modelState.selection.containsPosition(Ce))&&!(Fe&&!Mt.viewState.selection.containsPosition(Fe))){ye.splice(rt,1),Y.model.pushStackElement(),Y.setCursorStates(ae.source,3,ye);return}}}ye.push(me),Y.model.pushStackElement(),Y.setCursorStates(ae.source,3,ye)}}),l.LastCursorMoveToSelect=$r(new class extends Qh{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(Y,ae){if(!ae.position)return;const me=Y.getLastAddedCursorIndex(),ye=Y.getCursorStates(),Ce=ye.slice(0);Ce[me]=t0.moveTo(Y,ye[me],!0,ae.position,ae.viewPosition),Y.model.pushStackElement(),Y.setCursorStates(ae.source,3,Ce)}});class f extends Qh{constructor(ae){super(ae),this._inSelectionMode=ae.inSelectionMode}runCoreEditorCommand(ae,me){ae.model.pushStackElement(),ae.setCursorStates(me.source,3,t0.moveToBeginningOfLine(ae,ae.getCursorStates(),this._inSelectionMode)),ae.revealAllCursors(me.source,!0)}}l.CursorHome=$r(new f({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:14,mac:{primary:14,secondary:[2063]}}})),l.CursorHomeSelect=$r(new f({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:1038,mac:{primary:1038,secondary:[3087]}}}));class m extends Qh{constructor(ae){super(ae),this._inSelectionMode=ae.inSelectionMode}runCoreEditorCommand(ae,me){ae.model.pushStackElement(),ae.setCursorStates(me.source,3,this._exec(ae.getCursorStates())),ae.revealAllCursors(me.source,!0)}_exec(ae){const me=[];for(let ye=0,Ce=ae.length;ye<Ce;ye++){const Fe=ae[ye],rt=Fe.modelState.position.lineNumber;me[ye]=Rl.fromModelState(Fe.modelState.move(this._inSelectionMode,rt,1,0))}return me}}l.CursorLineStart=$r(new m({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:0,mac:{primary:287}}})),l.CursorLineStartSelect=$r(new m({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:0,mac:{primary:1311}}}));class v extends Qh{constructor(ae){super(ae),this._inSelectionMode=ae.inSelectionMode}runCoreEditorCommand(ae,me){ae.model.pushStackElement(),ae.setCursorStates(me.source,3,t0.moveToEndOfLine(ae,ae.getCursorStates(),this._inSelectionMode,me.sticky||!1)),ae.revealAllCursors(me.source,!0)}}l.CursorEnd=$r(new v({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:ru,kbExpr:Tt.textInputFocus,primary:13,mac:{primary:13,secondary:[2065]}},metadata:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:W("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}})),l.CursorEndSelect=$r(new v({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:ru,kbExpr:Tt.textInputFocus,primary:1037,mac:{primary:1037,secondary:[3089]}},metadata:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:W("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}}));class x extends Qh{constructor(ae){super(ae),this._inSelectionMode=ae.inSelectionMode}runCoreEditorCommand(ae,me){ae.model.pushStackElement(),ae.setCursorStates(me.source,3,this._exec(ae,ae.getCursorStates())),ae.revealAllCursors(me.source,!0)}_exec(ae,me){const ye=[];for(let Ce=0,Fe=me.length;Ce<Fe;Ce++){const rt=me[Ce],ct=rt.modelState.position.lineNumber,Mt=ae.model.getLineMaxColumn(ct);ye[Ce]=Rl.fromModelState(rt.modelState.move(this._inSelectionMode,ct,Mt,0))}return ye}}l.CursorLineEnd=$r(new x({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:0,mac:{primary:291}}})),l.CursorLineEndSelect=$r(new x({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:0,mac:{primary:1315}}}));class w extends Qh{constructor(ae){super(ae),this._inSelectionMode=ae.inSelectionMode}runCoreEditorCommand(ae,me){ae.model.pushStackElement(),ae.setCursorStates(me.source,3,t0.moveToBeginningOfBuffer(ae,ae.getCursorStates(),this._inSelectionMode)),ae.revealAllCursors(me.source,!0)}}l.CursorTop=$r(new w({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:2062,mac:{primary:2064}}})),l.CursorTopSelect=$r(new w({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:3086,mac:{primary:3088}}}));class I extends Qh{constructor(ae){super(ae),this._inSelectionMode=ae.inSelectionMode}runCoreEditorCommand(ae,me){ae.model.pushStackElement(),ae.setCursorStates(me.source,3,t0.moveToEndOfBuffer(ae,ae.getCursorStates(),this._inSelectionMode)),ae.revealAllCursors(me.source,!0)}}l.CursorBottom=$r(new I({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:2061,mac:{primary:2066}}})),l.CursorBottomSelect=$r(new I({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:3085,mac:{primary:3090}}}));class P extends Qh{constructor(){super({id:"editorScroll",precondition:void 0,metadata:S0.metadata})}determineScrollMethod(ae){const me=[6],ye=[1,2,3,4,5,6],Ce=[4,2],Fe=[1,3];return me.includes(ae.unit)&&Ce.includes(ae.direction)?this._runHorizontalEditorScroll.bind(this):ye.includes(ae.unit)&&Fe.includes(ae.direction)?this._runVerticalEditorScroll.bind(this):null}runCoreEditorCommand(ae,me){const ye=S0.parse(me);if(!ye)return;const Ce=this.determineScrollMethod(ye);Ce&&Ce(ae,me.source,ye)}_runVerticalEditorScroll(ae,me,ye){const Ce=this._computeDesiredScrollTop(ae,ye);if(ye.revealCursor){const Fe=ae.getCompletelyVisibleViewRangeAtScrollTop(Ce);ae.setCursorStates(me,3,[t0.findPositionInViewportIfOutside(ae,ae.getPrimaryCursorState(),Fe,ye.select)])}ae.viewLayout.setScrollPosition({scrollTop:Ce},0)}_computeDesiredScrollTop(ae,me){if(me.unit===1){const Fe=ae.viewLayout.getFutureViewport(),rt=ae.getCompletelyVisibleViewRangeAtScrollTop(Fe.top),ct=ae.coordinatesConverter.convertViewRangeToModelRange(rt);let Mt;me.direction===1?Mt=Math.max(1,ct.startLineNumber-me.value):Mt=Math.min(ae.model.getLineCount(),ct.startLineNumber+me.value);const Yt=ae.coordinatesConverter.convertModelPositionToViewPosition(new pi(Mt,1));return ae.viewLayout.getVerticalOffsetForLineNumber(Yt.lineNumber)}if(me.unit===5){let Fe=0;return me.direction===3&&(Fe=ae.model.getLineCount()-ae.cursorConfig.pageSize),ae.viewLayout.getVerticalOffsetForLineNumber(Fe)}let ye;me.unit===3?ye=ae.cursorConfig.pageSize*me.value:me.unit===4?ye=Math.round(ae.cursorConfig.pageSize/2)*me.value:ye=me.value;const Ce=(me.direction===1?-1:1)*ye;return ae.viewLayout.getCurrentScrollTop()+Ce*ae.cursorConfig.lineHeight}_runHorizontalEditorScroll(ae,me,ye){const Ce=this._computeDesiredScrollLeft(ae,ye);ae.viewLayout.setScrollPosition({scrollLeft:Ce},0)}_computeDesiredScrollLeft(ae,me){const ye=(me.direction===4?-1:1)*me.value;return ae.viewLayout.getCurrentScrollLeft()+ye*ae.cursorConfig.typicalHalfwidthCharacterWidth}}l.EditorScrollImpl=P,l.EditorScroll=$r(new P),l.ScrollLineUp=$r(new class extends Qh{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:2064,mac:{primary:267}}})}runCoreEditorCommand(Y,ae){l.EditorScroll.runCoreEditorCommand(Y,{to:S0.RawDirection.Up,by:S0.RawUnit.WrappedLine,value:1,revealCursor:!1,select:!1,source:ae.source})}}),l.ScrollPageUp=$r(new class extends Qh{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:2059,win:{primary:523},linux:{primary:523}}})}runCoreEditorCommand(Y,ae){l.EditorScroll.runCoreEditorCommand(Y,{to:S0.RawDirection.Up,by:S0.RawUnit.Page,value:1,revealCursor:!1,select:!1,source:ae.source})}}),l.ScrollEditorTop=$r(new class extends Qh{constructor(){super({id:"scrollEditorTop",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus}})}runCoreEditorCommand(Y,ae){l.EditorScroll.runCoreEditorCommand(Y,{to:S0.RawDirection.Up,by:S0.RawUnit.Editor,value:1,revealCursor:!1,select:!1,source:ae.source})}}),l.ScrollLineDown=$r(new class extends Qh{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:2066,mac:{primary:268}}})}runCoreEditorCommand(Y,ae){l.EditorScroll.runCoreEditorCommand(Y,{to:S0.RawDirection.Down,by:S0.RawUnit.WrappedLine,value:1,revealCursor:!1,select:!1,source:ae.source})}}),l.ScrollPageDown=$r(new class extends Qh{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:2060,win:{primary:524},linux:{primary:524}}})}runCoreEditorCommand(Y,ae){l.EditorScroll.runCoreEditorCommand(Y,{to:S0.RawDirection.Down,by:S0.RawUnit.Page,value:1,revealCursor:!1,select:!1,source:ae.source})}}),l.ScrollEditorBottom=$r(new class extends Qh{constructor(){super({id:"scrollEditorBottom",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus}})}runCoreEditorCommand(Y,ae){l.EditorScroll.runCoreEditorCommand(Y,{to:S0.RawDirection.Down,by:S0.RawUnit.Editor,value:1,revealCursor:!1,select:!1,source:ae.source})}}),l.ScrollLeft=$r(new class extends Qh{constructor(){super({id:"scrollLeft",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus}})}runCoreEditorCommand(Y,ae){l.EditorScroll.runCoreEditorCommand(Y,{to:S0.RawDirection.Left,by:S0.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:ae.source})}}),l.ScrollRight=$r(new class extends Qh{constructor(){super({id:"scrollRight",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus}})}runCoreEditorCommand(Y,ae){l.EditorScroll.runCoreEditorCommand(Y,{to:S0.RawDirection.Right,by:S0.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:ae.source})}});class O extends Qh{constructor(ae){super(ae),this._inSelectionMode=ae.inSelectionMode}runCoreEditorCommand(ae,me){me.position&&(ae.model.pushStackElement(),ae.setCursorStates(me.source,3,[t0.word(ae,ae.getPrimaryCursorState(),this._inSelectionMode,me.position)]),me.revealType!==2&&ae.revealAllCursors(me.source,!0,!0))}}l.WordSelect=$r(new O({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),l.WordSelectDrag=$r(new O({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),l.LastCursorWordSelect=$r(new class extends Qh{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(Y,ae){if(!ae.position)return;const me=Y.getLastAddedCursorIndex(),ye=Y.getCursorStates(),Ce=ye.slice(0),Fe=ye[me];Ce[me]=t0.word(Y,Fe,Fe.modelState.hasSelection(),ae.position),Y.model.pushStackElement(),Y.setCursorStates(ae.source,3,Ce)}});class z extends Qh{constructor(ae){super(ae),this._inSelectionMode=ae.inSelectionMode}runCoreEditorCommand(ae,me){me.position&&(ae.model.pushStackElement(),ae.setCursorStates(me.source,3,[t0.line(ae,ae.getPrimaryCursorState(),this._inSelectionMode,me.position,me.viewPosition)]),me.revealType!==2&&ae.revealAllCursors(me.source,!1,!0))}}l.LineSelect=$r(new z({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),l.LineSelectDrag=$r(new z({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class J extends Qh{constructor(ae){super(ae),this._inSelectionMode=ae.inSelectionMode}runCoreEditorCommand(ae,me){if(!me.position)return;const ye=ae.getLastAddedCursorIndex(),Ce=ae.getCursorStates(),Fe=Ce.slice(0);Fe[ye]=t0.line(ae,Ce[ye],this._inSelectionMode,me.position,me.viewPosition),ae.model.pushStackElement(),ae.setCursorStates(me.source,3,Fe)}}l.LastCursorLineSelect=$r(new J({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),l.LastCursorLineSelectDrag=$r(new J({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),l.CancelSelection=$r(new class extends Qh{constructor(){super({id:"cancelSelection",precondition:Tt.hasNonEmptySelection,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(Y,ae){Y.model.pushStackElement(),Y.setCursorStates(ae.source,3,[t0.cancelSelection(Y,Y.getPrimaryCursorState())]),Y.revealAllCursors(ae.source,!0)}}),l.RemoveSecondaryCursors=$r(new class extends Qh{constructor(){super({id:"removeSecondaryCursors",precondition:Tt.hasMultipleSelections,kbOpts:{weight:ru+1,kbExpr:Tt.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(Y,ae){Y.model.pushStackElement(),Y.setCursorStates(ae.source,3,[Y.getPrimaryCursorState()]),Y.revealAllCursors(ae.source,!0),PL(W("removedCursor","Removed secondary cursors"))}}),l.RevealLine=$r(new class extends Qh{constructor(){super({id:"revealLine",precondition:void 0,metadata:fq.metadata})}runCoreEditorCommand(Y,ae){const me=ae,ye=me.lineNumber||0;let Ce=typeof ye=="number"?ye+1:parseInt(ye)+1;Ce<1&&(Ce=1);const Fe=Y.model.getLineCount();Ce>Fe&&(Ce=Fe);const rt=new nt(Ce,1,Ce,Y.model.getLineMaxColumn(Ce));let ct=0;if(me.at)switch(me.at){case fq.RawAtArgument.Top:ct=3;break;case fq.RawAtArgument.Center:ct=1;break;case fq.RawAtArgument.Bottom:ct=4;break}const Mt=Y.coordinatesConverter.convertModelRangeToViewRange(rt);Y.revealRange(ae.source,!1,Mt,ct,0)}}),l.SelectAll=new class extends lje{constructor(){super(efi)}runDOMCommand(Y){bk&&(Y.focus(),Y.select()),Y.ownerDocument.execCommand("selectAll")}runEditorCommand(Y,ae,me){const ye=ae._getViewModel();ye&&this.runCoreEditorCommand(ye,me)}runCoreEditorCommand(Y,ae){Y.model.pushStackElement(),Y.setCursorStates("keyboard",3,[t0.selectAll(Y,Y.getPrimaryCursorState())])}},l.SetSelection=$r(new class extends Qh{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(Y,ae){ae.selection&&(Y.model.pushStackElement(),Y.setCursorStates(ae.source,3,[Rl.fromModelSelection(ae.selection)]))}})})(hg||(hg={}));const aki=kn.and(Tt.textInputFocus,Tt.columnSelection);function LJ(l,e){wv.registerKeybindingRule({id:l,primary:e,when:aki,weight:ru+1})}LJ(hg.CursorColumnSelectLeft.id,1039);LJ(hg.CursorColumnSelectRight.id,1041);LJ(hg.CursorColumnSelectUp.id,1040);LJ(hg.CursorColumnSelectPageUp.id,1035);LJ(hg.CursorColumnSelectDown.id,1042);LJ(hg.CursorColumnSelectPageDown.id,1036);function ESt(l){return l.register(),l}var s$;(function(l){class e extends tm{runEditorCommand(n,s,c){const d=s._getViewModel();d&&this.runCoreEditingCommand(s,d,c||{})}}l.CoreEditingCommand=e,l.LineBreakInsert=$r(new class extends e{constructor(){super({id:"lineBreakInsert",precondition:Tt.writable,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(i,n,s){i.pushUndoStop(),i.executeCommands(this.id,Owe.lineBreakInsert(n.cursorConfig,n.model,n.getCursorStates().map(c=>c.modelState.selection)))}}),l.Outdent=$r(new class extends e{constructor(){super({id:"outdent",precondition:Tt.writable,kbOpts:{weight:ru,kbExpr:kn.and(Tt.editorTextFocus,Tt.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(i,n,s){i.pushUndoStop(),i.executeCommands(this.id,DM.outdent(n.cursorConfig,n.model,n.getCursorStates().map(c=>c.modelState.selection))),i.pushUndoStop()}}),l.Tab=$r(new class extends e{constructor(){super({id:"tab",precondition:Tt.writable,kbOpts:{weight:ru,kbExpr:kn.and(Tt.editorTextFocus,Tt.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(i,n,s){i.pushUndoStop(),i.executeCommands(this.id,DM.tab(n.cursorConfig,n.model,n.getCursorStates().map(c=>c.modelState.selection))),i.pushUndoStop()}}),l.DeleteLeft=$r(new class extends e{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(i,n,s){const[c,d]=RB.deleteLeft(n.getPrevEditOperationType(),n.cursorConfig,n.model,n.getCursorStates().map(f=>f.modelState.selection),n.getCursorAutoClosedCharacters());c&&i.pushUndoStop(),i.executeCommands(this.id,d),n.setPrevEditOperationType(2)}}),l.DeleteRight=$r(new class extends e{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:ru,kbExpr:Tt.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(i,n,s){const[c,d]=RB.deleteRight(n.getPrevEditOperationType(),n.cursorConfig,n.model,n.getCursorStates().map(f=>f.modelState.selection));c&&i.pushUndoStop(),i.executeCommands(this.id,d),n.setPrevEditOperationType(3)}}),l.Undo=new class extends lje{constructor(){super(V2t)}runDOMCommand(i){i.ownerDocument.execCommand("undo")}runEditorCommand(i,n,s){if(!(!n.hasModel()||n.getOption(92)===!0))return n.getModel().undo()}},l.Redo=new class extends lje{constructor(){super(H2t)}runDOMCommand(i){i.ownerDocument.execCommand("redo")}runEditorCommand(i,n,s){if(!(!n.hasModel()||n.getOption(92)===!0))return n.getModel().redo()}}})(s$||(s$={}));class ISt extends $Se{constructor(e,i,n){super({id:e,precondition:void 0,metadata:n}),this._handlerId=i}runCommand(e,i){const n=e.get(Bl).getFocusedCodeEditor();n&&n.trigger("keyboard",this._handlerId,i)}}function aW(l,e){ESt(new ISt("default:"+l,l)),ESt(new ISt(l,l,e))}aW("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]});aW("replacePreviousChar");aW("compositionType");aW("compositionStart");aW("compositionEnd");aW("paste");aW("cut");class cki{constructor(e,i,n,s){this.configuration=e,this.viewModel=i,this.userInputEvents=n,this.commandDelegate=s}paste(e,i,n,s){this.commandDelegate.paste(e,i,n,s)}type(e){this.commandDelegate.type(e)}compositionType(e,i,n,s){this.commandDelegate.compositionType(e,i,n,s)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){hg.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const i=this.viewModel.getLineMinColumn(e.lineNumber);return e.column<i?new pi(e.lineNumber,i):e}_hasMulticursorModifier(e){switch(this.configuration.options.get(78)){case"altKey":return e.altKey;case"ctrlKey":return e.ctrlKey;case"metaKey":return e.metaKey;default:return!1}}_hasNonMulticursorModifier(e){switch(this.configuration.options.get(78)){case"altKey":return e.ctrlKey||e.metaKey;case"ctrlKey":return e.altKey||e.metaKey;case"metaKey":return e.ctrlKey||e.altKey;default:return!1}}dispatchMouse(e){const i=this.configuration.options,n=Cv&&i.get(108),s=i.get(22);e.middleButton&&!n?this._columnSelect(e.position,e.mouseColumn,e.inSelectionMode):e.startedOnLineNumbers?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelect(e.position,e.revealType):this._createCursor(e.position,!0):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):e.mouseDownCount>=4?this._selectAll():e.mouseDownCount===3?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):e.mouseDownCount===2?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):s?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,i){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:i}}moveTo(e,i){hg.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,i))}_moveToSelect(e,i){hg.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,i))}_columnSelect(e,i,n){e=this._validateViewColumn(e),hg.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:i,doColumnSelect:n})}_createCursor(e,i){e=this._validateViewColumn(e),hg.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:i})}_lastCursorMoveToSelect(e,i){hg.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,i))}_wordSelect(e,i){hg.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,i))}_wordSelectDrag(e,i){hg.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,i))}_lastCursorWordSelect(e,i){hg.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,i))}_lineSelect(e,i){hg.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,i))}_lineSelectDrag(e,i){hg.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,i))}_lastCursorLineSelect(e,i){hg.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,i))}_lastCursorLineSelectDrag(e,i){hg.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,i))}_selectAll(){hg.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class wIt{constructor(e){this._lineFactory=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,i){this._lines=i,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const i=e-this._rendLineNumberStart;if(i<0||i>=this._lines.length)throw new tu("Illegal value for lineNumber");return this._lines[i]}onLinesDeleted(e,i){if(this.getCount()===0)return null;const n=this.getStartLineNumber(),s=this.getEndLineNumber();if(i<n){const m=i-e+1;return this._rendLineNumberStart-=m,null}if(e>s)return null;let c=0,d=0;for(let m=n;m<=s;m++){const v=m-this._rendLineNumberStart;e<=m&&m<=i&&(d===0?(c=v,d=1):d++)}if(e<n){let m=0;i<n?m=i-e+1:m=n-e,this._rendLineNumberStart-=m}return this._lines.splice(c,d)}onLinesChanged(e,i){const n=e+i-1;if(this.getCount()===0)return!1;const s=this.getStartLineNumber(),c=this.getEndLineNumber();let d=!1;for(let f=e;f<=n;f++)f>=s&&f<=c&&(this._lines[f-this._rendLineNumberStart].onContentChanged(),d=!0);return d}onLinesInserted(e,i){if(this.getCount()===0)return null;const n=i-e+1,s=this.getStartLineNumber(),c=this.getEndLineNumber();if(e<=s)return this._rendLineNumberStart+=n,null;if(e>c)return null;if(n+e>c)return this._lines.splice(e-this._rendLineNumberStart,c-e+1);const d=[];for(let w=0;w<n;w++)d[w]=this._lineFactory.createLine();const f=e-this._rendLineNumberStart,m=this._lines.slice(0,f),v=this._lines.slice(f,this._lines.length-n),x=this._lines.slice(this._lines.length-n,this._lines.length);return this._lines=m.concat(d).concat(v),x}onTokensChanged(e){if(this.getCount()===0)return!1;const i=this.getStartLineNumber(),n=this.getEndLineNumber();let s=!1;for(let c=0,d=e.length;c<d;c++){const f=e[c];if(f.toLineNumber<i||f.fromLineNumber>n)continue;const m=Math.max(i,f.fromLineNumber),v=Math.min(n,f.toLineNumber);for(let x=m;x<=v;x++){const w=x-this._rendLineNumberStart;this._lines[w].onTokensChanged(),s=!0}}return s}}class xIt{constructor(e){this._lineFactory=e,this.domNode=this._createDomNode(),this._linesCollection=new wIt(this._lineFactory)}_createDomNode(){const e=_u(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(146)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){const i=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(i)for(let n=0,s=i.length;n<s;n++){const c=i[n].getDomNode();c==null||c.remove()}return!0}onLinesInserted(e){const i=this._linesCollection.onLinesInserted(e.fromLineNumber,e.toLineNumber);if(i)for(let n=0,s=i.length;n<s;n++){const c=i[n].getDomNode();c==null||c.remove()}return!0}onScrollChanged(e){return e.scrollTopChanged}onTokensChanged(e){return this._linesCollection.onTokensChanged(e.ranges)}onZonesChanged(e){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(e){return this._linesCollection.getLine(e)}renderLines(e){const i=this._linesCollection._get(),n=new uje(this.domNode.domNode,this._lineFactory,e),s={rendLineNumberStart:i.rendLineNumberStart,lines:i.lines,linesLength:i.lines.length},c=n.render(s,e.startLineNumber,e.endLineNumber,e.relativeVerticalOffset);this._linesCollection._set(c.rendLineNumberStart,c.lines)}}const T4=class T4{constructor(e,i,n){this._domNode=e,this._lineFactory=i,this._viewportData=n}render(e,i,n,s){const c={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(c.rendLineNumberStart+c.linesLength-1<i||n<c.rendLineNumberStart){c.rendLineNumberStart=i,c.linesLength=n-i+1,c.lines=[];for(let d=i;d<=n;d++)c.lines[d-i]=this._lineFactory.createLine();return this._finishRendering(c,!0,s),c}if(this._renderUntouchedLines(c,Math.max(i-c.rendLineNumberStart,0),Math.min(n-c.rendLineNumberStart,c.linesLength-1),s,i),c.rendLineNumberStart>i){const d=i,f=Math.min(n,c.rendLineNumberStart-1);d<=f&&(this._insertLinesBefore(c,d,f,s,i),c.linesLength+=f-d+1)}else if(c.rendLineNumberStart<i){const d=Math.min(c.linesLength,i-c.rendLineNumberStart);d>0&&(this._removeLinesBefore(c,d),c.linesLength-=d)}if(c.rendLineNumberStart=i,c.rendLineNumberStart+c.linesLength-1<n){const d=c.rendLineNumberStart+c.linesLength,f=n;d<=f&&(this._insertLinesAfter(c,d,f,s,i),c.linesLength+=f-d+1)}else if(c.rendLineNumberStart+c.linesLength-1>n){const d=Math.max(0,n-c.rendLineNumberStart+1),m=c.linesLength-1-d+1;m>0&&(this._removeLinesAfter(c,m),c.linesLength-=m)}return this._finishRendering(c,!1,s),c}_renderUntouchedLines(e,i,n,s,c){const d=e.rendLineNumberStart,f=e.lines;for(let m=i;m<=n;m++){const v=d+m;f[m].layoutLine(v,s[v-c],this._viewportData.lineHeight)}}_insertLinesBefore(e,i,n,s,c){const d=[];let f=0;for(let m=i;m<=n;m++)d[f++]=this._lineFactory.createLine();e.lines=d.concat(e.lines)}_removeLinesBefore(e,i){for(let n=0;n<i;n++){const s=e.lines[n].getDomNode();s==null||s.remove()}e.lines.splice(0,i)}_insertLinesAfter(e,i,n,s,c){const d=[];let f=0;for(let m=i;m<=n;m++)d[f++]=this._lineFactory.createLine();e.lines=e.lines.concat(d)}_removeLinesAfter(e,i){const n=e.linesLength-i;for(let s=0;s<i;s++){const c=e.lines[n+s].getDomNode();c==null||c.remove()}e.lines.splice(n,i)}_finishRenderingNewLines(e,i,n,s){T4._ttPolicy&&(n=T4._ttPolicy.createHTML(n));const c=this._domNode.lastChild;i||!c?this._domNode.innerHTML=n:c.insertAdjacentHTML("afterend",n);let d=this._domNode.lastChild;for(let f=e.linesLength-1;f>=0;f--){const m=e.lines[f];s[f]&&(m.setDomNode(d),d=d.previousSibling)}}_finishRenderingInvalidLines(e,i,n){const s=document.createElement("div");T4._ttPolicy&&(i=T4._ttPolicy.createHTML(i)),s.innerHTML=i;for(let c=0;c<e.linesLength;c++){const d=e.lines[c];if(n[c]){const f=s.firstChild,m=d.getDomNode();m.parentNode.replaceChild(f,m),d.setDomNode(f)}}}_finishRendering(e,i,n){const s=T4._sb,c=e.linesLength,d=e.lines,f=e.rendLineNumberStart,m=[];{s.reset();let v=!1;for(let x=0;x<c;x++){const w=d[x];m[x]=!1,!(w.getDomNode()||!w.renderLine(x+f,n[x],this._viewportData.lineHeight,this._viewportData,s))&&(m[x]=!0,v=!0)}v&&this._finishRenderingNewLines(e,i,s.build(),m)}{s.reset();let v=!1;const x=[];for(let w=0;w<c;w++){const I=d[w];x[w]=!1,!(m[w]||!I.renderLine(w+f,n[w],this._viewportData.lineHeight,this._viewportData,s))&&(x[w]=!0,v=!0)}v&&this._finishRenderingInvalidLines(e,s.build(),x)}}};T4._ttPolicy=v6("editorViewLayer",{createHTML:e=>e}),T4._sb=new gJ(1e5);let uje=T4;class kIt extends nS{constructor(e){super(e),this._dynamicOverlays=[],this._isFocused=!1,this._visibleLines=new xIt({createLine:()=>new lki(this._dynamicOverlays)}),this.domNode=this._visibleLines.domNode;const n=this._context.configuration.options.get(50);a0(this.domNode,n),this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,i=this._dynamicOverlays.length;e<i;e++)if(this._dynamicOverlays[e].shouldRender())return!0;return!1}dispose(){super.dispose();for(let e=0,i=this._dynamicOverlays.length;e<i;e++)this._dynamicOverlays[e].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}addDynamicOverlay(e){this._dynamicOverlays.push(e)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e);const n=this._context.configuration.options.get(50);return a0(this.domNode,n),!0}onFlushed(e){return this._visibleLines.onFlushed(e)}onFocusChanged(e){return this._isFocused=e.isFocused,!0}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onScrollChanged(e){return this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._visibleLines.onZonesChanged(e)}prepareRender(e){const i=this._dynamicOverlays.filter(n=>n.shouldRender());for(let n=0,s=i.length;n<s;n++){const c=i[n];c.prepareRender(e),c.onDidRender()}}render(e){this._viewOverlaysRender(e),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(e){this._visibleLines.renderLines(e.viewportData)}}class lki{constructor(e){this._dynamicOverlays=e,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(e){this._domNode=_u(e)}onContentChanged(){}onTokensChanged(){}renderLine(e,i,n,s,c){let d="";for(let f=0,m=this._dynamicOverlays.length;f<m;f++){const v=this._dynamicOverlays[f];d+=v.render(s.startLineNumber,e)}return this._renderedContent===d?!1:(this._renderedContent=d,c.appendString('<div style="top:'),c.appendString(String(i)),c.appendString("px;height:"),c.appendString(String(n)),c.appendString('px;">'),c.appendString(d),c.appendString("</div>"),!0)}layoutLine(e,i,n){this._domNode&&(this._domNode.setTop(i),this._domNode.setHeight(n))}}class uki extends kIt{constructor(e){super(e);const n=this._context.configuration.options.get(146);this._contentWidth=n.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const n=this._context.configuration.options.get(146);return this._contentWidth=n.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class dki extends kIt{constructor(e){super(e);const i=this._context.configuration.options,n=i.get(146);this._contentLeft=n.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),a0(this.domNode,i.get(50))}onConfigurationChanged(e){const i=this._context.configuration.options;a0(this.domNode,i.get(50));const n=i.get(146);return this._contentLeft=n.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const i=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(i),this.domNode.setWidth(this._contentLeft)}}class Rwe{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){var i;(i=this.onKeyDown)==null||i.call(this,e)}emitKeyUp(e){var i;(i=this.onKeyUp)==null||i.call(this,e)}emitContextMenu(e){var i;(i=this.onContextMenu)==null||i.call(this,this._convertViewToModelMouseEvent(e))}emitMouseMove(e){var i;(i=this.onMouseMove)==null||i.call(this,this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){var i;(i=this.onMouseLeave)==null||i.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDown(e){var i;(i=this.onMouseDown)==null||i.call(this,this._convertViewToModelMouseEvent(e))}emitMouseUp(e){var i;(i=this.onMouseUp)==null||i.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){var i;(i=this.onMouseDrag)==null||i.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){var i;(i=this.onMouseDrop)==null||i.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){var e;(e=this.onMouseDropCanceled)==null||e.call(this)}emitMouseWheel(e){var i;(i=this.onMouseWheel)==null||i.call(this,e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return Rwe.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,i){const n={...e};return n.position&&(n.position=i.convertViewPositionToModelPosition(n.position)),n.range&&(n.range=i.convertViewRangeToModelRange(n.range)),(n.type===5||n.type===8)&&(n.detail=this.convertViewToModelViewZoneData(n.detail,i)),n}static convertViewToModelViewZoneData(e,i){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?i.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?i.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:i.convertViewPositionToModelPosition(e.position),afterLineNumber:i.convertViewPositionToModelPosition(new pi(e.afterLineNumber,1)).lineNumber}}}class fki extends nS{constructor(e){super(e),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=_u(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let e=!1;const n=this._context.configuration.options.get(146),s=n.contentWidth-n.verticalScrollbarWidth;this.contentWidth!==s&&(this.contentWidth=s,e=!0);const c=n.contentLeft;return this.contentLeft!==c&&(this.contentLeft=c,e=!0),e}dispose(){super.dispose()}onConfigurationChanged(e){return this.update()}onScrollChanged(e){return e.scrollTopChanged||e.scrollLeftChanged}onDecorationsChanged(e){return!0}onZonesChanged(e){return!0}prepareRender(e){}render(e){let i=0;const n=e.getDecorationsInViewport();for(const s of n){if(!s.options.blockClassName)continue;let c=this.blocks[i];c||(c=this.blocks[i]=_u(document.createElement("div")),this.domNode.appendChild(c));let d,f;s.options.blockIsAfterEnd?(d=e.getVerticalOffsetAfterLineNumber(s.range.endLineNumber,!1),f=e.getVerticalOffsetAfterLineNumber(s.range.endLineNumber,!0)):(d=e.getVerticalOffsetForLineNumber(s.range.startLineNumber,!0),f=s.range.isEmpty()&&!s.options.blockDoesNotCollapse?e.getVerticalOffsetForLineNumber(s.range.startLineNumber,!1):e.getVerticalOffsetAfterLineNumber(s.range.endLineNumber,!0));const[m,v,x,w]=s.options.blockPadding??[0,0,0,0];c.setClassName("blockDecorations-block "+s.options.blockClassName),c.setLeft(this.contentLeft-w),c.setWidth(this.contentWidth+w+v),c.setTop(d-e.scrollTop-m),c.setHeight(f-d+m+x),i++}for(let s=i;s<this.blocks.length;s++)this.blocks[s].domNode.remove();this.blocks.length=i}}class hki extends nS{constructor(e,i){super(e),this._viewDomNode=i,this._widgets={},this.domNode=_u(document.createElement("div")),JE.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=_u(document.createElement("div")),JE.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const i=Object.keys(this._widgets);for(const n of i)this._widgets[n].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(e){return this._updateAnchorsViewPositions(),!0}onLinesInserted(e){return this._updateAnchorsViewPositions(),!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}_updateAnchorsViewPositions(){const e=Object.keys(this._widgets);for(const i of e)this._widgets[i].updateAnchorViewPosition()}addWidget(e){const i=new _ki(this._context,this._viewDomNode,e);this._widgets[i.id]=i,i.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(i.domNode):this.domNode.appendChild(i.domNode),this.setShouldRender()}setWidgetPosition(e,i,n,s,c){this._widgets[e.getId()].setPosition(i,n,s,c),this.setShouldRender()}removeWidget(e){const i=e.getId();if(this._widgets.hasOwnProperty(i)){const n=this._widgets[i];delete this._widgets[i];const s=n.domNode.domNode;s.remove(),s.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return this._widgets.hasOwnProperty(e)?this._widgets[e].suppressMouseDown:!1}onBeforeRender(e){const i=Object.keys(this._widgets);for(const n of i)this._widgets[n].onBeforeRender(e)}prepareRender(e){const i=Object.keys(this._widgets);for(const n of i)this._widgets[n].prepareRender(e)}render(e){const i=Object.keys(this._widgets);for(const n of i)this._widgets[n].render(e)}}class _ki{constructor(e,i,n){this._primaryAnchor=new zte(null,null),this._secondaryAnchor=new zte(null,null),this._context=e,this._viewDomNode=i,this._actual=n,this.domNode=_u(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const s=this._context.configuration.options,c=s.get(146);this._fixedOverflowWidgets=s.get(42),this._contentWidth=c.contentWidth,this._contentLeft=c.contentLeft,this._lineHeight=s.get(67),this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const i=this._context.configuration.options;if(this._lineHeight=i.get(67),e.hasChanged(146)){const n=i.get(146);this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(e,i,n){this._affinity=e,this._primaryAnchor=s(i,this._context.viewModel,this._affinity),this._secondaryAnchor=s(n,this._context.viewModel,this._affinity);function s(c,d,f){if(!c)return new zte(null,null);const m=d.model.validatePosition(c);if(d.coordinatesConverter.modelPositionIsVisible(m)){const v=d.coordinatesConverter.convertModelPositionToViewPosition(m,f??void 0);return new zte(c,v)}return new zte(c,null)}}_getMaxWidth(){const e=this.domNode.domNode.ownerDocument,i=e.defaultView;return this.allowEditorOverflow?(i==null?void 0:i.innerWidth)||e.documentElement.offsetWidth||e.body.offsetWidth:this._contentWidth}setPosition(e,i,n,s){this._setPosition(s,e,i),this._preference=n,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,i,n,s){const c=e.top,d=c,f=e.top+e.height,m=s.viewportHeight-f,v=c-n,x=d>=n,w=f,I=m>=n;let P=e.left;return P+i>s.scrollLeft+s.viewportWidth&&(P=s.scrollLeft+s.viewportWidth-i),P<s.scrollLeft&&(P=s.scrollLeft),{fitsAbove:x,aboveTop:v,fitsBelow:I,belowTop:w,left:P}}_layoutHorizontalSegmentInPage(e,i,n,s){const f=Math.max(15,i.left-s),m=Math.min(i.left+i.width+s,e.width-15),x=this._viewDomNode.domNode.ownerDocument.defaultView;let w=i.left+n-((x==null?void 0:x.scrollX)??0);if(w+s>m){const I=w-(m-s);w-=I,n-=I}if(w<f){const I=w-f;w-=I,n-=I}return[n,w]}_layoutBoxInPage(e,i,n,s){const c=e.top-n,d=e.top+e.height,f=e_(this._viewDomNode.domNode),m=this._viewDomNode.domNode.ownerDocument,v=m.defaultView,x=f.top+c-((v==null?void 0:v.scrollY)??0),w=f.top+d-((v==null?void 0:v.scrollY)??0),I=SR(m.body),[P,O]=this._layoutHorizontalSegmentInPage(I,f,e.left-s.scrollLeft+this._contentLeft,i),z=22,J=22,Y=x>=z,ae=w+n<=I.height-J;return this._fixedOverflowWidgets?{fitsAbove:Y,aboveTop:Math.max(x,z),fitsBelow:ae,belowTop:w,left:O}:{fitsAbove:Y,aboveTop:c,fitsBelow:ae,belowTop:d,left:P}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new Ute(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){var d,f;const i=c(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),n=((d=this._secondaryAnchor.viewPosition)==null?void 0:d.lineNumber)===((f=this._primaryAnchor.viewPosition)==null?void 0:f.lineNumber)?this._secondaryAnchor.viewPosition:null,s=c(n,this._affinity,this._lineHeight);return{primary:i,secondary:s};function c(m,v,x){if(!m)return null;const w=e.visibleRangeForPosition(m);if(!w)return null;const I=m.column===1&&v===3?0:w.left,P=e.getVerticalOffsetForLineNumber(m.lineNumber)-e.scrollTop;return new NSt(P,I,x)}}_reduceAnchorCoordinates(e,i,n){if(!i)return e;const s=this._context.configuration.options.get(50);let c=i.left;return c<e.left?c=Math.max(c,e.left-n+s.typicalFullwidthCharacterWidth):c=Math.min(c,e.left+n-s.typicalFullwidthCharacterWidth),new NSt(e.top,c,e.height)}_prepareRenderWidget(e){if(!this._preference||this._preference.length===0)return null;const{primary:i,secondary:n}=this._getAnchorsCoordinates(e);if(!i)return{kind:"offViewport",preserveFocus:this.domNode.domNode.contains(this.domNode.domNode.ownerDocument.activeElement)};if(this._cachedDomNodeOffsetWidth===-1||this._cachedDomNodeOffsetHeight===-1){let d=null;if(typeof this._actual.beforeRender=="function"&&(d=_9e(this._actual.beforeRender,this._actual)),d)this._cachedDomNodeOffsetWidth=d.width,this._cachedDomNodeOffsetHeight=d.height;else{const m=this.domNode.domNode.getBoundingClientRect();this._cachedDomNodeOffsetWidth=Math.round(m.width),this._cachedDomNodeOffsetHeight=Math.round(m.height)}}const s=this._reduceAnchorCoordinates(i,n,this._cachedDomNodeOffsetWidth);let c;this.allowEditorOverflow?c=this._layoutBoxInPage(s,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,e):c=this._layoutBoxInViewport(s,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,e);for(let d=1;d<=2;d++)for(const f of this._preference)if(f===1){if(!c)return null;if(d===2||c.fitsAbove)return{kind:"inViewport",coordinate:new Ute(c.aboveTop,c.left),position:1}}else if(f===2){if(!c)return null;if(d===2||c.fitsBelow)return{kind:"inViewport",coordinate:new Ute(c.belowTop,c.left),position:2}}else return this.allowEditorOverflow?{kind:"inViewport",coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(new Ute(s.top,s.left)),position:0}:{kind:"inViewport",coordinate:new Ute(s.top,s.left),position:0};return null}onBeforeRender(e){!this._primaryAnchor.viewPosition||!this._preference||this._primaryAnchor.viewPosition.lineNumber<e.startLineNumber||this._primaryAnchor.viewPosition.lineNumber>e.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){var i;if(!this._renderData||this._renderData.kind==="offViewport"){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,((i=this._renderData)==null?void 0:i.kind)==="offViewport"&&this._renderData.preserveFocus?this.domNode.setTop(-1e3):this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&_9e(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&_9e(this._actual.afterRender,this._actual,this._renderData.position)}}class zte{constructor(e,i){this.modelPosition=e,this.viewPosition=i}}class Ute{constructor(e,i){this.top=e,this.left=i,this._coordinateBrand=void 0}}class NSt{constructor(e,i,n){this.top=e,this.left=i,this.height=n,this._anchorCoordinateBrand=void 0}}function _9e(l,e,...i){try{return l.call(e,...i)}catch{return null}}class TIt extends oW{constructor(e){super(),this._context=e;const i=this._context.configuration.options,n=i.get(146);this._renderLineHighlight=i.get(97),this._renderLineHighlightOnlyWhenFocus=i.get(98),this._wordWrap=n.isViewportWrapping,this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new Us(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const i=new Set;for(const c of this._selections)i.add(c.positionLineNumber);const n=Array.from(i);n.sort((c,d)=>c-d),Lf(this._cursorLineNumbers,n)||(this._cursorLineNumbers=n,e=!0);const s=this._selections.every(c=>c.isEmpty());return this._selectionIsEmpty!==s&&(this._selectionIsEmpty=s,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const i=this._context.configuration.options,n=i.get(146);return this._renderLineHighlight=i.get(97),this._renderLineHighlightOnlyWhenFocus=i.get(98),this._wordWrap=n.isViewportWrapping,this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return this._renderLineHighlightOnlyWhenFocus?(this._focused=e.isFocused,!0):!1}prepareRender(e){if(!this._shouldRenderThis()){this._renderData=null;return}const i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=[];for(let d=i;d<=n;d++){const f=d-i;s[f]=""}if(this._wordWrap){const d=this._renderOne(e,!1);for(const f of this._cursorLineNumbers){const m=this._context.viewModel.coordinatesConverter,v=m.convertViewPositionToModelPosition(new pi(f,1)).lineNumber,x=m.convertModelPositionToViewPosition(new pi(v,1)).lineNumber,w=m.convertModelPositionToViewPosition(new pi(v,this._context.viewModel.model.getLineMaxColumn(v))).lineNumber,I=Math.max(x,i),P=Math.min(w,n);for(let O=I;O<=P;O++){const z=O-i;s[z]=d}}}const c=this._renderOne(e,!0);for(const d of this._cursorLineNumbers){if(d<i||d>n)continue;const f=d-i;s[f]=c}this._renderData=s}render(e,i){if(!this._renderData)return"";const n=i-e;return n>=this._renderData.length?"":this._renderData[n]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class pki extends TIt{_renderOne(e,i){return`<div class="${"current-line"+(this._shouldRenderInMargin()?" current-line-both":"")+(i?" current-line-exact":"")}" style="width:${Math.max(e.scrollWidth,this._contentWidth)}px;"></div>`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class mki extends TIt{_renderOne(e,i){return`<div class="${"current-line"+(this._shouldRenderInMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")+(this._shouldRenderInMargin()&&i?" current-line-exact-margin":"")}" style="width:${this._contentLeft}px"></div>`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}Dk((l,e)=>{const i=l.getColor(BDt);if(i&&(e.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||l.defines(gCt)){const n=l.getColor(gCt);n&&(e.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${n}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${n}; }`),RE(l.type)&&(e.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"),e.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")))}});class gki extends oW{constructor(e){super(),this._context=e;const i=this._context.configuration.options;this._typicalHalfwidthCharacterWidth=i.get(50).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const i=this._context.configuration.options;return this._typicalHalfwidthCharacterWidth=i.get(50).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const i=e.getDecorationsInViewport();let n=[],s=0;for(let m=0,v=i.length;m<v;m++){const x=i[m];x.options.className&&(n[s++]=x)}n=n.sort((m,v)=>{if(m.options.zIndex<v.options.zIndex)return-1;if(m.options.zIndex>v.options.zIndex)return 1;const x=m.options.className,w=v.options.className;return x<w?-1:x>w?1:nt.compareRangesUsingStarts(m.range,v.range)});const c=e.visibleRange.startLineNumber,d=e.visibleRange.endLineNumber,f=[];for(let m=c;m<=d;m++){const v=m-c;f[v]=""}this._renderWholeLineDecorations(e,n,f),this._renderNormalDecorations(e,n,f),this._renderResult=f}_renderWholeLineDecorations(e,i,n){const s=e.visibleRange.startLineNumber,c=e.visibleRange.endLineNumber;for(let d=0,f=i.length;d<f;d++){const m=i[d];if(!m.options.isWholeLine)continue;const v='<div class="cdr '+m.options.className+'" style="left:0;width:100%;"></div>',x=Math.max(m.range.startLineNumber,s),w=Math.min(m.range.endLineNumber,c);for(let I=x;I<=w;I++){const P=I-s;n[P]+=v}}}_renderNormalDecorations(e,i,n){const s=e.visibleRange.startLineNumber;let c=null,d=!1,f=null,m=!1;for(let v=0,x=i.length;v<x;v++){const w=i[v];if(w.options.isWholeLine)continue;const I=w.options.className,P=!!w.options.showIfCollapsed;let O=w.range;if(P&&O.endColumn===1&&O.endLineNumber!==O.startLineNumber&&(O=new nt(O.startLineNumber,O.startColumn,O.endLineNumber-1,this._context.viewModel.getLineMaxColumn(O.endLineNumber-1))),c===I&&d===P&&nt.areIntersectingOrTouching(f,O)){f=nt.plusRange(f,O);continue}c!==null&&this._renderNormalDecoration(e,f,c,m,d,s,n),c=I,d=P,f=O,m=w.options.shouldFillLineOnLineBreak??!1}c!==null&&this._renderNormalDecoration(e,f,c,m,d,s,n)}_renderNormalDecoration(e,i,n,s,c,d,f){const m=e.linesVisibleRangesForRange(i,n==="findMatch");if(m)for(let v=0,x=m.length;v<x;v++){const w=m[v];if(w.outsideRenderedLine)continue;const I=w.lineNumber-d;if(c&&w.ranges.length===1){const P=w.ranges[0];if(P.width<this._typicalHalfwidthCharacterWidth){const O=Math.round(P.left+P.width/2),z=Math.max(0,Math.round(O-this._typicalHalfwidthCharacterWidth/2));w.ranges[0]=new Pwe(z,this._typicalHalfwidthCharacterWidth)}}for(let P=0,O=w.ranges.length;P<O;P++){const z=s&&w.continuesOnNextLine&&O===1,J=w.ranges[P],Y='<div class="cdr '+n+'" style="left:'+String(J.left)+"px;width:"+(z?"100%;":String(J.width)+"px;")+'"></div>';f[I]+=Y}}}render(e,i){if(!this._renderResult)return"";const n=i-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}class yki extends nS{constructor(e,i,n,s){super(e);const c=this._context.configuration.options,d=c.get(104),f=c.get(75),m=c.get(40),v=c.get(107),x={listenOnDomNode:n.domNode,className:"editor-scrollable "+JWe(e.theme.type),useShadows:!1,lazyRender:!0,vertical:d.vertical,horizontal:d.horizontal,verticalHasArrows:d.verticalHasArrows,horizontalHasArrows:d.horizontalHasArrows,verticalScrollbarSize:d.verticalScrollbarSize,verticalSliderSize:d.verticalSliderSize,horizontalScrollbarSize:d.horizontalScrollbarSize,horizontalSliderSize:d.horizontalSliderSize,handleMouseWheel:d.handleMouseWheel,alwaysConsumeMouseWheel:d.alwaysConsumeMouseWheel,arrowSize:d.arrowSize,mouseWheelScrollSensitivity:f,fastScrollSensitivity:m,scrollPredominantAxis:v,scrollByPage:d.scrollByPage};this.scrollbar=this._register(new owe(i.domNode,x,this._context.viewLayout.getScrollable())),JE.write(this.scrollbar.getDomNode(),6),this.scrollbarDomNode=_u(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const w=(I,P,O)=>{const z={};{const J=I.scrollTop;J&&(z.scrollTop=this._context.viewLayout.getCurrentScrollTop()+J,I.scrollTop=0)}if(O){const J=I.scrollLeft;J&&(z.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+J,I.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(z,1)};this._register(en(n.domNode,"scroll",I=>w(n.domNode,!0,!0))),this._register(en(i.domNode,"scroll",I=>w(i.domNode,!0,!1))),this._register(en(s.domNode,"scroll",I=>w(s.domNode,!0,!1))),this._register(en(this.scrollbarDomNode.domNode,"scroll",I=>w(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,i=e.get(146);this.scrollbarDomNode.setLeft(i.contentLeft),e.get(73).side==="right"?this.scrollbarDomNode.setWidth(i.contentWidth+i.minimap.minimapWidth):this.scrollbarDomNode.setWidth(i.contentWidth),this.scrollbarDomNode.setHeight(i.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(104)||e.hasChanged(75)||e.hasChanged(40)){const i=this._context.configuration.options,n=i.get(104),s=i.get(75),c=i.get(40),d=i.get(107),f={vertical:n.vertical,horizontal:n.horizontal,verticalScrollbarSize:n.verticalScrollbarSize,horizontalScrollbarSize:n.horizontalScrollbarSize,scrollByPage:n.scrollByPage,handleMouseWheel:n.handleMouseWheel,mouseWheelScrollSensitivity:s,fastScrollSensitivity:c,scrollPredominantAxis:d};this.scrollbar.updateOptions(f)}return e.hasChanged(146)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+JWe(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}class dje{constructor(e,i,n,s,c){this.startLineNumber=e,this.endLineNumber=i,this.className=n,this.tooltip=s,this._decorationToRenderBrand=void 0,this.zIndex=c??0}}class vki{constructor(e,i,n){this.className=e,this.zIndex=i,this.tooltip=n}}class bki{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}}class DIt extends oW{_render(e,i,n){const s=[];for(let f=e;f<=i;f++){const m=f-e;s[m]=new bki}if(n.length===0)return s;n.sort((f,m)=>f.className===m.className?f.startLineNumber===m.startLineNumber?f.endLineNumber-m.endLineNumber:f.startLineNumber-m.startLineNumber:f.className<m.className?-1:1);let c=null,d=0;for(let f=0,m=n.length;f<m;f++){const v=n[f],x=v.className,w=v.zIndex;let I=Math.max(v.startLineNumber,e)-e;const P=Math.min(v.endLineNumber,i)-e;c===x?(I=Math.max(d+1,I),d=Math.max(d,P)):(c=x,d=P);for(let O=I;O<=d;O++)s[O].add(new vki(x,w,v.tooltip))}return s}}class Cki extends nS{constructor(e){super(e),this._widgets={},this._context=e;const i=this._context.configuration.options,n=i.get(146);this.domNode=_u(document.createElement("div")),this.domNode.setClassName("glyph-margin-widgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this._lineHeight=i.get(67),this._glyphMargin=i.get(57),this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,this._glyphMarginDecorationLaneCount=n.glyphMarginDecorationLaneCount,this._managedDomNodes=[],this._decorationGlyphsToRender=[]}dispose(){this._managedDomNodes=[],this._decorationGlyphsToRender=[],this._widgets={},super.dispose()}getWidgets(){return Object.values(this._widgets)}onConfigurationChanged(e){const i=this._context.configuration.options,n=i.get(146);return this._lineHeight=i.get(67),this._glyphMargin=i.get(57),this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,this._glyphMarginDecorationLaneCount=n.glyphMarginDecorationLaneCount,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}addWidget(e){const i=_u(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:e.getPosition(),domNode:i,renderInfo:null},i.setPosition("absolute"),i.setDisplay("none"),i.setAttribute("widgetId",e.getId()),this.domNode.appendChild(i),this.setShouldRender()}setWidgetPosition(e,i){const n=this._widgets[e.getId()];return n.preference.lane===i.lane&&n.preference.zIndex===i.zIndex&&nt.equalsRange(n.preference.range,i.range)?!1:(n.preference=i,this.setShouldRender(),!0)}removeWidget(e){const i=e.getId();if(this._widgets[i]){const s=this._widgets[i].domNode.domNode;delete this._widgets[i],s.remove(),this.setShouldRender()}}_collectDecorationBasedGlyphRenderRequest(e,i){var d;const n=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,c=e.getDecorationsInViewport();for(const f of c){const m=f.options.glyphMarginClassName;if(!m)continue;const v=Math.max(f.range.startLineNumber,n),x=Math.min(f.range.endLineNumber,s),w=((d=f.options.glyphMargin)==null?void 0:d.position)??CT.Center,I=f.options.zIndex??0;for(let P=v;P<=x;P++){const O=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new pi(P,0)),z=this._context.viewModel.glyphLanes.getLanesAtLine(O.lineNumber).indexOf(w);i.push(new Ski(P,z,I,m))}}}_collectWidgetBasedGlyphRenderRequest(e,i){const n=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber;for(const c of Object.values(this._widgets)){const d=c.preference.range,{startLineNumber:f,endLineNumber:m}=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(nt.lift(d));if(!f||!m||m<n||f>s)continue;const v=Math.max(f,n),x=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new pi(v,0)),w=this._context.viewModel.glyphLanes.getLanesAtLine(x.lineNumber).indexOf(c.preference.lane);i.push(new wki(v,w,c.preference.zIndex,c))}}_collectSortedGlyphRenderRequests(e){const i=[];return this._collectDecorationBasedGlyphRenderRequest(e,i),this._collectWidgetBasedGlyphRenderRequest(e,i),i.sort((n,s)=>n.lineNumber===s.lineNumber?n.laneIndex===s.laneIndex?n.zIndex===s.zIndex?s.type===n.type?n.type===0&&s.type===0?n.className<s.className?-1:1:0:s.type-n.type:s.zIndex-n.zIndex:n.laneIndex-s.laneIndex:n.lineNumber-s.lineNumber),i}prepareRender(e){if(!this._glyphMargin){this._decorationGlyphsToRender=[];return}for(const s of Object.values(this._widgets))s.renderInfo=null;const i=new s6(this._collectSortedGlyphRenderRequests(e)),n=[];for(;i.length>0;){const s=i.peek();if(!s)break;const c=i.takeWhile(f=>f.lineNumber===s.lineNumber&&f.laneIndex===s.laneIndex);if(!c||c.length===0)break;const d=c[0];if(d.type===0){const f=[];for(const m of c){if(m.zIndex!==d.zIndex||m.type!==d.type)break;(f.length===0||f[f.length-1]!==m.className)&&f.push(m.className)}n.push(d.accept(f.join(" ")))}else d.widget.renderInfo={lineNumber:d.lineNumber,laneIndex:d.laneIndex}}this._decorationGlyphsToRender=n}render(e){if(!this._glyphMargin){for(const n of Object.values(this._widgets))n.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){const n=this._managedDomNodes.pop();n==null||n.domNode.remove()}return}const i=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const n of Object.values(this._widgets))if(!n.renderInfo)n.domNode.setDisplay("none");else{const s=e.viewportData.relativeVerticalOffset[n.renderInfo.lineNumber-e.viewportData.startLineNumber],c=this._glyphMarginLeft+n.renderInfo.laneIndex*this._lineHeight;n.domNode.setDisplay("block"),n.domNode.setTop(s),n.domNode.setLeft(c),n.domNode.setWidth(i),n.domNode.setHeight(this._lineHeight)}for(let n=0;n<this._decorationGlyphsToRender.length;n++){const s=this._decorationGlyphsToRender[n],c=e.viewportData.relativeVerticalOffset[s.lineNumber-e.viewportData.startLineNumber],d=this._glyphMarginLeft+s.laneIndex*this._lineHeight;let f;n<this._managedDomNodes.length?f=this._managedDomNodes[n]:(f=_u(document.createElement("div")),this._managedDomNodes.push(f),this.domNode.appendChild(f)),f.setClassName("cgmr codicon "+s.combinedClassName),f.setPosition("absolute"),f.setTop(c),f.setLeft(d),f.setWidth(i),f.setHeight(this._lineHeight)}for(;this._managedDomNodes.length>this._decorationGlyphsToRender.length;){const n=this._managedDomNodes.pop();n==null||n.domNode.remove()}}}class Ski{constructor(e,i,n,s){this.lineNumber=e,this.laneIndex=i,this.zIndex=n,this.className=s,this.type=0}accept(e){return new xki(this.lineNumber,this.laneIndex,e)}}class wki{constructor(e,i,n,s){this.lineNumber=e,this.laneIndex=i,this.zIndex=n,this.widget=s,this.type=1}}class xki{constructor(e,i,n){this.lineNumber=e,this.laneIndex=i,this.combinedClassName=n}}class kki extends oW{constructor(e){super(),this._context=e,this._primaryPosition=null;const i=this._context.configuration.options,n=i.get(147),s=i.get(50);this._spaceWidth=s.spaceWidth,this._maxIndentLeft=n.wrappingColumn===-1?-1:n.wrappingColumn*s.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=i.get(16),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const i=this._context.configuration.options,n=i.get(147),s=i.get(50);return this._spaceWidth=s.spaceWidth,this._maxIndentLeft=n.wrappingColumn===-1?-1:n.wrappingColumn*s.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=i.get(16),!0}onCursorStateChanged(e){var s;const n=e.selections[0].getPosition();return(s=this._primaryPosition)!=null&&s.equals(n)?!1:(this._primaryPosition=n,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){var m,v;if(!this._bracketPairGuideOptions.indentation&&this._bracketPairGuideOptions.bracketPairs===!1){this._renderResult=null;return}const i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=e.scrollWidth,c=this._primaryPosition,d=this.getGuidesByLine(i,Math.min(n+1,this._context.viewModel.getLineCount()),c),f=[];for(let x=i;x<=n;x++){const w=x-i,I=d[w];let P="";const O=((m=e.visibleRangeForPosition(new pi(x,1)))==null?void 0:m.left)??0;for(const z of I){const J=z.column===-1?O+(z.visibleColumn-1)*this._spaceWidth:e.visibleRangeForPosition(new pi(x,z.column)).left;if(J>s||this._maxIndentLeft>0&&J>this._maxIndentLeft)break;const Y=z.horizontalLine?z.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",ae=z.horizontalLine?(((v=e.visibleRangeForPosition(new pi(x,z.horizontalLine.endColumn)))==null?void 0:v.left)??J+this._spaceWidth)-J:this._spaceWidth;P+=`<div class="core-guide ${z.className} ${Y}" style="left:${J}px;width:${ae}px"></div>`}f[w]=P}this._renderResult=f}getGuidesByLine(e,i,n){const s=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(e,i,n,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?g9.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?g9.EnabledForActive:g9.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,c=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,i):null;let d=0,f=0,m=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&n){const w=this._context.viewModel.getActiveIndentGuide(n.lineNumber,e,i);d=w.startLineNumber,f=w.endLineNumber,m=w.indent}const{indentSize:v}=this._context.viewModel.model.getOptions(),x=[];for(let w=e;w<=i;w++){const I=new Array;x.push(I);const P=s?s[w-e]:[],O=new s6(P),z=c?c[w-e]:0;for(let J=1;J<=z;J++){const Y=(J-1)*v+1,ae=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||P.length===0)&&d<=w&&w<=f&&J===m;I.push(...O.takeWhile(ye=>ye.visibleColumn<Y)||[]);const me=O.peek();(!me||me.visibleColumn!==Y||me.horizontalLine)&&I.push(new s9(Y,-1,`core-guide-indent lvl-${(J-1)%30}`+(ae?" indent-active":""),null,-1,-1))}I.push(...O.takeWhile(J=>!0)||[])}return x}render(e,i){if(!this._renderResult)return"";const n=i-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}function LU(l){if(!(l&&l.isTransparent()))return l}Dk((l,e)=>{const i=[{bracketColor:jDt,guideColor:Uyi,guideColorActive:Xyi},{bracketColor:zDt,guideColor:qyi,guideColorActive:Qyi},{bracketColor:UDt,guideColor:$yi,guideColorActive:Zyi},{bracketColor:qDt,guideColor:Jyi,guideColorActive:Yyi},{bracketColor:$Dt,guideColor:Gyi,guideColorActive:evi},{bracketColor:JDt,guideColor:Kyi,guideColorActive:tvi}],n=new rEt,s=[{indentColor:Nse,indentColorActive:Lse},{indentColor:wyi,indentColorActive:Eyi},{indentColor:xyi,indentColorActive:Iyi},{indentColor:kyi,indentColorActive:Nyi},{indentColor:Tyi,indentColorActive:Lyi},{indentColor:Dyi,indentColorActive:Pyi}],c=i.map(f=>{const m=l.getColor(f.bracketColor),v=l.getColor(f.guideColor),x=l.getColor(f.guideColorActive),w=LU(LU(v)??(m==null?void 0:m.transparent(.3))),I=LU(LU(x)??m);if(!(!w||!I))return{guideColor:w,guideColorActive:I}}).filter(xL),d=s.map(f=>{const m=l.getColor(f.indentColor),v=l.getColor(f.indentColorActive),x=LU(m),w=LU(v);if(!(!x||!w))return{indentColor:x,indentColorActive:w}}).filter(xL);if(c.length>0){for(let f=0;f<30;f++){const m=c[f%c.length];e.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(f).replace(/ /g,".")} { --guide-color: ${m.guideColor}; --guide-color-active: ${m.guideColorActive}; }`)}e.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),e.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),e.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),e.addRule(`.monaco-editor .vertical.${n.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),e.addRule(`.monaco-editor .horizontal-top.${n.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),e.addRule(`.monaco-editor .horizontal-bottom.${n.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(d.length>0){for(let f=0;f<30;f++){const m=d[f%d.length];e.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${f} { --indent-color: ${m.indentColor}; --indent-color-active: ${m.indentColorActive}; }`)}e.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),e.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}});class p9e{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,i){this._domNode=e,this.endNode=i,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}class Tki{constructor(){this._currentVisibleRange=new nt(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class Dki{constructor(e,i,n,s,c,d,f){this.minimalReveal=e,this.lineNumber=i,this.startColumn=n,this.endColumn=s,this.startScrollTop=c,this.stopScrollTop=d,this.scrollType=f,this.type="range",this.minLineNumber=i,this.maxLineNumber=i}}class Eki{constructor(e,i,n,s,c){this.minimalReveal=e,this.selections=i,this.startScrollTop=n,this.stopScrollTop=s,this.scrollType=c,this.type="selections";let d=i[0].startLineNumber,f=i[0].endLineNumber;for(let m=1,v=i.length;m<v;m++){const x=i[m];d=Math.min(d,x.startLineNumber),f=Math.max(f,x.endLineNumber)}this.minLineNumber=d,this.maxLineNumber=f}}const DCe=class DCe extends nS{constructor(e,i){super(e);const n=this._context.configuration,s=this._context.configuration.options,c=s.get(50),d=s.get(147);this._lineHeight=s.get(67),this._typicalHalfwidthCharacterWidth=c.typicalHalfwidthCharacterWidth,this._isViewportWrapping=d.isViewportWrapping,this._revealHorizontalRightPadding=s.get(101),this._cursorSurroundingLines=s.get(29),this._cursorSurroundingLinesStyle=s.get(30),this._canUseLayerHinting=!s.get(32),this._viewLineOptions=new SSt(n,this._context.theme.type),this._linesContent=i,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new xIt({createLine:()=>new R4(this._viewLineOptions)}),this.domNode=this._visibleLines.domNode,JE.write(this.domNode,8),this.domNode.setClassName(`view-lines ${n$}`),a0(this.domNode,c),this._maxLineWidth=0,this._asyncUpdateLineWidths=new qu(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new qu(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new Tki,this._horizontalRevealRequest=null,this._stickyScrollEnabled=s.get(116).enabled,this._maxNumberStickyLines=s.get(116).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(147)&&(this._maxLineWidth=0);const i=this._context.configuration.options,n=i.get(50),s=i.get(147);return this._lineHeight=i.get(67),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._isViewportWrapping=s.isViewportWrapping,this._revealHorizontalRightPadding=i.get(101),this._cursorSurroundingLines=i.get(29),this._cursorSurroundingLinesStyle=i.get(30),this._canUseLayerHinting=!i.get(32),this._stickyScrollEnabled=i.get(116).enabled,this._maxNumberStickyLines=i.get(116).maxLineCount,a0(this.domNode,n),this._onOptionsMaybeChanged(),e.hasChanged(146)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,i=new SSt(e,this._context.theme.type);if(!this._viewLineOptions.equals(i)){this._viewLineOptions=i;const n=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();for(let c=n;c<=s;c++)this._visibleLines.getVisibleLine(c).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();let s=!1;for(let c=i;c<=n;c++)s=this._visibleLines.getVisibleLine(c).onSelectionChanged()||s;return s}onDecorationsChanged(e){{const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++)this._visibleLines.getVisibleLine(s).onDecorationsChanged()}return!0}onFlushed(e){const i=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,i}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const i=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(i===-1)return!1;let n=this._context.viewLayout.validateScrollPosition({scrollTop:i});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new Dki(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new Eki(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const c=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(n,c),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const i=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTop<i||e.scrollTop>n)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,i){const n=this._getViewLineDomNode(e);if(n===null)return null;const s=this._getLineNumberFor(n);if(s===-1||s<1||s>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(s)===1)return new pi(s,1);const c=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();if(s<c||s>d)return null;let f=this._visibleLines.getVisibleLine(s).getColumnOfNodeOffset(e,i);const m=this._context.viewModel.getLineMinColumn(s);return f<m&&(f=m),new pi(s,f)}_getViewLineDomNode(e){for(;e&&e.nodeType===1;){if(e.className===R4.CLASS_NAME)return e;e=e.parentElement}return null}_getLineNumberFor(e){const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++){const c=this._visibleLines.getVisibleLine(s);if(e===c.getDomNode())return s}return-1}getLineWidth(e){const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();if(e<i||e>n)return-1;const s=new p9e(this.domNode.domNode,this._textRangeRestingSpot),c=this._visibleLines.getVisibleLine(e).getWidth(s);return this._updateLineWidthsSlowIfDomDidLayout(s),c}linesVisibleRangesForRange(e,i){if(this.shouldRender())return null;const n=e.endLineNumber,s=nt.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!s)return null;const c=[];let d=0;const f=new p9e(this.domNode.domNode,this._textRangeRestingSpot);let m=0;i&&(m=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new pi(s.startLineNumber,1)).lineNumber);const v=this._visibleLines.getStartLineNumber(),x=this._visibleLines.getEndLineNumber();for(let w=s.startLineNumber;w<=s.endLineNumber;w++){if(w<v||w>x)continue;const I=w===s.startLineNumber?s.startColumn:1,P=w!==s.endLineNumber,O=P?this._context.viewModel.getLineMaxColumn(w):s.endColumn,z=this._visibleLines.getVisibleLine(w).getVisibleRangesForRange(w,I,O,f);if(z){if(i&&w<n){const J=m;m=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new pi(w+1,1)).lineNumber,J!==m&&(z.ranges[z.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}c[d++]=new fxi(z.outsideRenderedLine,w,Pwe.from(z.ranges),P)}}return this._updateLineWidthsSlowIfDomDidLayout(f),d===0?null:c}_visibleRangesForLineRange(e,i,n){if(this.shouldRender()||e<this._visibleLines.getStartLineNumber()||e>this._visibleLines.getEndLineNumber())return null;const s=new p9e(this.domNode.domNode,this._textRangeRestingSpot),c=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,i,n,s);return this._updateLineWidthsSlowIfDomDidLayout(s),c}visibleRangeForPosition(e){const i=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return i?new hxi(i.outsideRenderedLine,i.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(e){const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();let s=1,c=!0;for(let d=i;d<=n;d++){const f=this._visibleLines.getVisibleLine(d);if(e&&!f.getWidthIsFast()){c=!1;continue}s=Math.max(s,f.getWidth(null))}return c&&i===1&&n===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(s),c}_checkMonospaceFontAssumptions(){let e=-1,i=-1;const n=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();for(let c=n;c<=s;c++){const d=this._visibleLines.getVisibleLine(c);if(d.needsMonospaceFontCheck()){const f=d.getWidth(null);f>i&&(i=f,e=c)}}if(e!==-1&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let c=n;c<=s;c++)this._visibleLines.getVisibleLine(c).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const n=this._horizontalRevealRequest;if(e.startLineNumber<=n.minLineNumber&&n.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const s=this._computeScrollLeftToReveal(n);s&&(this._isViewportWrapping||this._ensureMaxLineWidth(s.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:s.scrollLeft},n.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),Cv&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const n=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();for(let c=n;c<=s;c++)if(this._visibleLines.getVisibleLine(c).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const i=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-i),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const i=Math.ceil(e);this._maxLineWidth<i&&(this._maxLineWidth=i,this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(e,i,n,s,c,d){const f=e.top,m=e.height,v=f+m;let x,w,I;if(c&&c.length>0){let Y=c[0].startLineNumber,ae=c[0].endLineNumber;for(let me=1,ye=c.length;me<ye;me++){const Ce=c[me];Y=Math.min(Y,Ce.startLineNumber),ae=Math.max(ae,Ce.endLineNumber)}x=!1,w=this._context.viewLayout.getVerticalOffsetForLineNumber(Y),I=this._context.viewLayout.getVerticalOffsetForLineNumber(ae)+this._lineHeight}else if(s)x=!0,w=this._context.viewLayout.getVerticalOffsetForLineNumber(s.startLineNumber),I=this._context.viewLayout.getVerticalOffsetForLineNumber(s.endLineNumber)+this._lineHeight;else return-1;const P=(i==="mouse"||n)&&this._cursorSurroundingLinesStyle==="default";let O=0,z=0;if(P)n||(O=this._lineHeight);else{const Y=m/this._lineHeight,ae=Math.max(this._cursorSurroundingLines,this._stickyScrollEnabled?this._maxNumberStickyLines:0),me=Math.min(Y/2,ae);O=me*this._lineHeight,z=Math.max(0,me-1)*this._lineHeight}n||(d===0||d===4)&&(z+=this._lineHeight),w-=O,I+=z;let J;if(I-w>m){if(!x)return-1;J=w}else if(d===5||d===6)if(d===6&&f<=w&&I<=v)J=f;else{const Y=Math.max(5*this._lineHeight,m*.2),ae=w-Y,me=I-m;J=Math.max(me,ae)}else if(d===1||d===2)if(d===2&&f<=w&&I<=v)J=f;else{const Y=(w+I)/2;J=Math.max(0,Y-m/2)}else J=this._computeMinimumScrolling(f,v,w,I,d===3,d===4);return J}_computeScrollLeftToReveal(e){const i=this._context.viewLayout.getCurrentViewport(),n=this._context.configuration.options.get(146),s=i.left,c=s+i.width-n.verticalScrollbarWidth;let d=1073741824,f=0;if(e.type==="range"){const v=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!v)return null;for(const x of v.ranges)d=Math.min(d,Math.round(x.left)),f=Math.max(f,Math.round(x.left+x.width))}else for(const v of e.selections){if(v.startLineNumber!==v.endLineNumber)return null;const x=this._visibleRangesForLineRange(v.startLineNumber,v.startColumn,v.endColumn);if(!x)return null;for(const w of x.ranges)d=Math.min(d,Math.round(w.left)),f=Math.max(f,Math.round(w.left+w.width))}return e.minimalReveal||(d=Math.max(0,d-DCe.HORIZONTAL_EXTRA_PX),f+=this._revealHorizontalRightPadding),e.type==="selections"&&f-d>i.width?null:{scrollLeft:this._computeMinimumScrolling(s,c,d,f),maxHorizontalOffset:f}}_computeMinimumScrolling(e,i,n,s,c,d){e=e|0,i=i|0,n=n|0,s=s|0,c=!!c,d=!!d;const f=i-e;if(s-n<f){if(c)return n;if(d)return Math.max(0,s-f);if(n<e)return n;if(s>i)return Math.max(0,s-f)}else return n;return e}};DCe.HORIZONTAL_EXTRA_PX=30;let fje=DCe;class Iki extends DIt{constructor(e){super(),this._context=e;const n=this._context.configuration.options.get(146);this._decorationsLeft=n.decorationsLeft,this._decorationsWidth=n.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const n=this._context.configuration.options.get(146);return this._decorationsLeft=n.decorationsLeft,this._decorationsWidth=n.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const i=e.getDecorationsInViewport(),n=[];let s=0;for(let c=0,d=i.length;c<d;c++){const f=i[c],m=f.options.linesDecorationsClassName,v=f.options.zIndex;m&&(n[s++]=new dje(f.range.startLineNumber,f.range.endLineNumber,m,f.options.linesDecorationsTooltip??null,v));const x=f.options.firstLineDecorationClassName;x&&(n[s++]=new dje(f.range.startLineNumber,f.range.startLineNumber,x,f.options.linesDecorationsTooltip??null,v))}return n}prepareRender(e){const i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._render(i,n,this._getDecorations(e)),c=this._decorationsLeft.toString(),d=this._decorationsWidth.toString(),f='" style="left:'+c+"px;width:"+d+'px;"></div>',m=[];for(let v=i;v<=n;v++){const x=v-i,w=s[x].getDecorations();let I="";for(const P of w){let O='<div class="cldr '+P.className;P.tooltip!==null&&(O+='" title="'+P.tooltip),O+=f,I+=O}m[x]=I}this._renderResult=m}render(e,i){return this._renderResult?this._renderResult[i-e]:""}}class Nki extends DIt{constructor(e){super(),this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const i=e.getDecorationsInViewport(),n=[];let s=0;for(let c=0,d=i.length;c<d;c++){const f=i[c],m=f.options.marginClassName,v=f.options.zIndex;m&&(n[s++]=new dje(f.range.startLineNumber,f.range.endLineNumber,m,null,v))}return n}prepareRender(e){const i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._render(i,n,this._getDecorations(e)),c=[];for(let d=i;d<=n;d++){const f=d-i,m=s[f].getDecorations();let v="";for(const x of m)v+='<div class="cmdr '+x.className+'" style=""></div>';c[f]=v}this._renderResult=c}render(e,i){return this._renderResult?this._renderResult[i-e]:""}}const gM=class gM{constructor(e,i,n,s){this._rgba8Brand=void 0,this.r=gM._clamp(e),this.g=gM._clamp(i),this.b=gM._clamp(n),this.a=gM._clamp(s)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:e|0}};gM.Empty=new gM(0,0,0,0);let t6=gM;const ECe=class ECe extends xi{static getInstance(){return this._INSTANCE||(this._INSTANCE=new ECe),this._INSTANCE}constructor(){super(),this._onDidChange=new gi,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Oh.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){const e=Oh.getColorMap();if(!e){this._colors=[t6.Empty],this._backgroundIsLight=!0;return}this._colors=[t6.Empty];for(let n=1;n<e.length;n++){const s=e[n].rgba;this._colors[n]=new t6(s.r,s.g,s.b,Math.round(s.a*255))}const i=e[2].getRelativeLuminance();this._backgroundIsLight=i>=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}};ECe._INSTANCE=null;let Eve=ECe;const Lki=(()=>{const l=[];for(let e=32;e<=126;e++)l.push(e);return l.push(65533),l})(),Pki=(l,e)=>(l-=32,l<0||l>96?e<=2?(l+96)%96:95:l);class kre{constructor(e,i){this.scale=i,this._minimapCharRendererBrand=void 0,this.charDataNormal=kre.soften(e,12/15),this.charDataLight=kre.soften(e,50/60)}static soften(e,i){const n=new Uint8ClampedArray(e.length);for(let s=0,c=e.length;s<c;s++)n[s]=_ye(e[s]*i);return n}renderChar(e,i,n,s,c,d,f,m,v,x,w){const I=1*this.scale,P=2*this.scale,O=w?1:P;if(i+I>e.width||n+O>e.height){console.warn("bad render request outside image data");return}const z=x?this.charDataLight:this.charDataNormal,J=Pki(s,v),Y=e.width*4,ae=f.r,me=f.g,ye=f.b,Ce=c.r-ae,Fe=c.g-me,rt=c.b-ye,ct=Math.max(d,m),Mt=e.data;let Yt=J*I*P,Bi=n*Y+i*4;for(let $i=0;$i<O;$i++){let $t=Bi;for(let Hi=0;Hi<I;Hi++){const An=z[Yt++]/255*(d/255);Mt[$t++]=ae+Ce*An,Mt[$t++]=me+Fe*An,Mt[$t++]=ye+rt*An,Mt[$t++]=ct}Bi+=Y}}blockRenderChar(e,i,n,s,c,d,f,m){const v=1*this.scale,x=2*this.scale,w=m?1:x;if(i+v>e.width||n+w>e.height){console.warn("bad render request outside image data");return}const I=e.width*4,P=.5*(c/255),O=d.r,z=d.g,J=d.b,Y=s.r-O,ae=s.g-z,me=s.b-J,ye=O+Y*P,Ce=z+ae*P,Fe=J+me*P,rt=Math.max(c,f),ct=e.data;let Mt=n*I+i*4;for(let Yt=0;Yt<w;Yt++){let Bi=Mt;for(let $i=0;$i<v;$i++)ct[Bi++]=ye,ct[Bi++]=Ce,ct[Bi++]=Fe,ct[Bi++]=rt;Mt+=I}}}const LSt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15},PSt=l=>{const e=new Uint8ClampedArray(l.length/2);for(let i=0;i<l.length;i+=2)e[i>>1]=LSt[l[i]]<<4|LSt[l[i+1]]&15;return e},ASt={1:gR(()=>PSt("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:gR(()=>PSt("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class Uie{static create(e,i){if(this.lastCreated&&e===this.lastCreated.scale&&i===this.lastFontFamily)return this.lastCreated;let n;return ASt[e]?n=new kre(ASt[e](),e):n=Uie.createFromSampleData(Uie.createSampleData(i).data,e),this.lastFontFamily=i,this.lastCreated=n,n}static createSampleData(e){const i=document.createElement("canvas"),n=i.getContext("2d");i.style.height="16px",i.height=16,i.width=96*10,i.style.width=96*10+"px",n.fillStyle="#ffffff",n.font=`bold 16px ${e}`,n.textBaseline="middle";let s=0;for(const c of Lki)n.fillText(String.fromCharCode(c),s,16/2),s+=10;return n.getImageData(0,0,96*10,16)}static createFromSampleData(e,i){if(e.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");const s=Uie._downsample(e,i);return new kre(s,i)}static _downsampleChar(e,i,n,s,c){const d=1*c,f=2*c;let m=s,v=0;for(let x=0;x<f;x++){const w=x/f*16,I=(x+1)/f*16;for(let P=0;P<d;P++){const O=P/d*10,z=(P+1)/d*10;let J=0,Y=0;for(let me=w;me<I;me++){const ye=i+Math.floor(me)*3840,Ce=1-(me-Math.floor(me));for(let Fe=O;Fe<z;Fe++){const rt=1-(Fe-Math.floor(Fe)),ct=ye+Math.floor(Fe)*4,Mt=rt*Ce;Y+=Mt,J+=e[ct]*e[ct+3]/255*Mt}}const ae=J/Y;v=Math.max(v,ae),n[m++]=_ye(ae)}}return v}static _downsample(e,i){const n=2*i*1*i,s=n*96,c=new Uint8ClampedArray(s);let d=0,f=0,m=0;for(let v=0;v<96;v++)m=Math.max(m,this._downsampleChar(e,f,c,d,i)),d+=n,f+=10*4;if(m>0){const v=255/m;for(let x=0;x<s;x++)c[x]*=v}return c}}const EIt=I0?'"Segoe WPC", "Segoe UI", sans-serif':Hc?"-apple-system, BlinkMacSystemFont, sans-serif":'system-ui, "Ubuntu", "Droid Sans", sans-serif',Aki=140,Oki=2;class o${constructor(e,i,n){const s=e.options,c=s.get(144),d=s.get(146),f=d.minimap,m=s.get(50),v=s.get(73);this.renderMinimap=f.renderMinimap,this.size=v.size,this.minimapHeightIsEditorHeight=f.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=s.get(106),this.paddingTop=s.get(84).top,this.paddingBottom=s.get(84).bottom,this.showSlider=v.showSlider,this.autohide=v.autohide,this.pixelRatio=c,this.typicalHalfwidthCharacterWidth=m.typicalHalfwidthCharacterWidth,this.lineHeight=s.get(67),this.minimapLeft=f.minimapLeft,this.minimapWidth=f.minimapWidth,this.minimapHeight=d.height,this.canvasInnerWidth=f.minimapCanvasInnerWidth,this.canvasInnerHeight=f.minimapCanvasInnerHeight,this.canvasOuterWidth=f.minimapCanvasOuterWidth,this.canvasOuterHeight=f.minimapCanvasOuterHeight,this.isSampling=f.minimapIsSampling,this.editorHeight=d.height,this.fontScale=f.minimapScale,this.minimapLineHeight=f.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.sectionHeaderFontFamily=EIt,this.sectionHeaderFontSize=v.sectionHeaderFontSize*c,this.sectionHeaderLetterSpacing=v.sectionHeaderLetterSpacing,this.sectionHeaderFontColor=o$._getSectionHeaderColor(i,n.getColor(1)),this.charRenderer=gR(()=>Uie.create(this.fontScale,m.fontFamily)),this.defaultBackgroundColor=n.getColor(2),this.backgroundColor=o$._getMinimapBackground(i,this.defaultBackgroundColor),this.foregroundAlpha=o$._getMinimapForegroundOpacity(i)}static _getMinimapBackground(e,i){const n=e.getColor(kpi);return n?new t6(n.rgba.r,n.rgba.g,n.rgba.b,Math.round(255*n.rgba.a)):i}static _getMinimapForegroundOpacity(e){const i=e.getColor(Tpi);return i?t6._clamp(Math.round(255*i.rgba.a)):255}static _getSectionHeaderColor(e,i){const n=e.getColor(HL);return n?new t6(n.rgba.r,n.rgba.g,n.rgba.b,Math.round(255*n.rgba.a)):i}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.sectionHeaderFontSize===e.sectionHeaderFontSize&&this.sectionHeaderLetterSpacing===e.sectionHeaderLetterSpacing&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class qie{constructor(e,i,n,s,c,d,f,m,v){this.scrollTop=e,this.scrollHeight=i,this.sliderNeeded=n,this._computedSliderRatio=s,this.sliderTop=c,this.sliderHeight=d,this.topPaddingLineCount=f,this.startLineNumber=m,this.endLineNumber=v}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){const i=Math.max(this.startLineNumber,e.startLineNumber),n=Math.min(this.endLineNumber,e.endLineNumber);return i>n?null:[i,n]}getYForLineNumber(e,i){return+(e-this.startLineNumber+this.topPaddingLineCount)*i}static create(e,i,n,s,c,d,f,m,v,x,w){const I=e.pixelRatio,P=e.minimapLineHeight,O=Math.floor(e.canvasInnerHeight/P),z=e.lineHeight;if(e.minimapHeightIsEditorHeight){let Fe=m*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(Fe+=Math.max(0,c-e.lineHeight-e.paddingBottom));const rt=Math.max(1,Math.floor(c*c/Fe)),ct=Math.max(0,e.minimapHeight-rt),Mt=ct/(x-c),Yt=v*Mt,Bi=ct>0,$i=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),$t=Math.floor(e.paddingTop/e.lineHeight);return new qie(v,x,Bi,Mt,Yt,rt,$t,1,Math.min(f,$i))}let J;if(d&&n!==f){const Fe=n-i+1;J=Math.floor(Fe*P/I)}else{const Fe=c/z;J=Math.floor(Fe*P/I)}const Y=Math.floor(e.paddingTop/z);let ae=Math.floor(e.paddingBottom/z);if(e.scrollBeyondLastLine){const Fe=c/z;ae=Math.max(ae,Fe-1)}let me;if(ae>0){const Fe=c/z;me=(Y+f+ae-Fe-1)*P/I}else me=Math.max(0,(Y+f)*P/I-J);me=Math.min(e.minimapHeight-J,me);const ye=me/(x-c),Ce=v*ye;if(O>=Y+f+ae){const Fe=me>0;return new qie(v,x,Fe,ye,Ce,J,Y,1,f)}else{let Fe;i>1?Fe=i+Y:Fe=Math.max(1,v/z);let rt,ct=Math.max(1,Math.floor(Fe-Ce*I/P));ct<Y?(rt=Y-ct+1,ct=1):(rt=0,ct=Math.max(1,ct-Y)),w&&w.scrollHeight===x&&(w.scrollTop>v&&(ct=Math.min(ct,w.startLineNumber),rt=Math.max(rt,w.topPaddingLineCount)),w.scrollTop<v&&(ct=Math.max(ct,w.startLineNumber),rt=Math.min(rt,w.topPaddingLineCount)));const Mt=Math.min(f,ct-rt+O-1),Yt=(v-s)/z;let Bi;return v>=e.paddingTop?Bi=(i-ct+rt+Yt)*P/I:Bi=v/e.paddingTop*(rt+Yt)*P/I,new qie(v,x,!0,ye,Bi,J,rt,ct,Mt)}}}const ICe=class ICe{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}};ICe.INVALID=new ICe(-1);let Ive=ICe;class OSt{constructor(e,i,n){this.renderedLayout=e,this._imageData=i,this._renderedLines=new wIt({createLine:()=>Ive.INVALID}),this._renderedLines._set(e.startLineNumber,n)}linesEquals(e){if(!this.scrollEquals(e))return!1;const n=this._renderedLines._get().lines;for(let s=0,c=n.length;s<c;s++)if(n[s].dy===-1)return!1;return!0}scrollEquals(e){return this.renderedLayout.startLineNumber===e.startLineNumber&&this.renderedLayout.endLineNumber===e.endLineNumber}_get(){const e=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:e.rendLineNumberStart,lines:e.lines}}onLinesChanged(e,i){return this._renderedLines.onLinesChanged(e,i)}onLinesDeleted(e,i){this._renderedLines.onLinesDeleted(e,i)}onLinesInserted(e,i){this._renderedLines.onLinesInserted(e,i)}onTokensChanged(e){return this._renderedLines.onTokensChanged(e)}}class tGe{constructor(e,i,n,s){this._backgroundFillData=tGe._createBackgroundFillData(i,n,s),this._buffers=[e.createImageData(i,n),e.createImageData(i,n)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const e=this._buffers[this._lastUsedBuffer];return e.data.set(this._backgroundFillData),e}static _createBackgroundFillData(e,i,n){const s=n.r,c=n.g,d=n.b,f=n.a,m=new Uint8ClampedArray(e*i*4);let v=0;for(let x=0;x<i;x++)for(let w=0;w<e;w++)m[v]=s,m[v+1]=c,m[v+2]=d,m[v+3]=f,v+=4;return m}}class Tre{static compute(e,i,n){if(e.renderMinimap===0||!e.isSampling)return[null,[]];const{minimapLineCount:s}=Wq.computeContainedMinimapLineCount({viewLineCount:i,scrollBeyondLastLine:e.scrollBeyondLastLine,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:e.editorHeight,lineHeight:e.lineHeight,pixelRatio:e.pixelRatio}),c=i/s,d=c/2;if(!n||n.minimapLines.length===0){const J=[];if(J[0]=1,s>1){for(let Y=0,ae=s-1;Y<ae;Y++)J[Y]=Math.round(Y*c+d);J[s-1]=i}return[new Tre(c,J),[]]}const f=n.minimapLines,m=f.length,v=[];let x=0,w=0,I=1;const P=10;let O=[],z=null;for(let J=0;J<s;J++){const Y=Math.max(I,Math.round(J*c)),ae=Math.max(Y,Math.round((J+1)*c));for(;x<m&&f[x]<Y;){if(O.length<P){const ye=x+1+w;z&&z.type==="deleted"&&z._oldIndex===x-1?z.deleteToLineNumber++:(z={type:"deleted",_oldIndex:x,deleteFromLineNumber:ye,deleteToLineNumber:ye},O.push(z)),w--}x++}let me;if(x<m&&f[x]<=ae)me=f[x],x++;else if(J===0?me=1:J+1===s?me=i:me=Math.round(J*c+d),O.length<P){const ye=x+1+w;z&&z.type==="inserted"&&z._i===J-1?z.insertToLineNumber++:(z={type:"inserted",_i:J,insertFromLineNumber:ye,insertToLineNumber:ye},O.push(z)),w++}v[J]=me,I=me}if(O.length<P)for(;x<m;){const J=x+1+w;z&&z.type==="deleted"&&z._oldIndex===x-1?z.deleteToLineNumber++:(z={type:"deleted",_oldIndex:x,deleteFromLineNumber:J,deleteToLineNumber:J},O.push(z)),w--,x++}else O=[{type:"flush"}];return[new Tre(c,v),O]}constructor(e,i){this.samplingRatio=e,this.minimapLines=i}modelLineToMinimapLine(e){return Math.min(this.minimapLines.length,Math.max(1,Math.round(e/this.samplingRatio)))}modelLineRangeToMinimapLineRange(e,i){let n=this.modelLineToMinimapLine(e)-1;for(;n>0&&this.minimapLines[n-1]>=e;)n--;let s=this.modelLineToMinimapLine(i)-1;for(;s+1<this.minimapLines.length&&this.minimapLines[s+1]<=i;)s++;if(n===s){const c=this.minimapLines[n];if(c<e||c>i)return null}return[n+1,s+1]}decorationLineRangeToMinimapLineRange(e,i){let n=this.modelLineToMinimapLine(e),s=this.modelLineToMinimapLine(i);return e!==i&&s===n&&(s===this.minimapLines.length?n>1&&n--:s++),[n,s]}onLinesDeleted(e){const i=e.toLineNumber-e.fromLineNumber+1;let n=this.minimapLines.length,s=0;for(let c=this.minimapLines.length-1;c>=0&&!(this.minimapLines[c]<e.fromLineNumber);c--)this.minimapLines[c]<=e.toLineNumber?(this.minimapLines[c]=Math.max(1,e.fromLineNumber-1),n=Math.min(n,c),s=Math.max(s,c)):this.minimapLines[c]-=i;return[n,s]}onLinesInserted(e){const i=e.toLineNumber-e.fromLineNumber+1;for(let n=this.minimapLines.length-1;n>=0&&!(this.minimapLines[n]<e.fromLineNumber);n--)this.minimapLines[n]+=i}}class Mki extends nS{constructor(e){super(e),this._sectionHeaderCache=new VL(10,1.5),this.tokensColorTracker=Eve.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new o$(this._context.configuration,this._context.theme,this.tokensColorTracker);const[i]=Tre.compute(this.options,this._context.viewModel.getLineCount(),null);this._samplingState=i,this._shouldCheckSampling=!1,this._actual=new hq(e.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const e=new o$(this._context.configuration,this._context.theme,this.tokensColorTracker);return this.options.equals(e)?!1:(this.options=e,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(e){return this._onOptionsMaybeChanged()}onCursorStateChanged(e){return this._selections=e.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(e){return e.affectsMinimap?this._actual.onDecorationsChanged():!1}onFlushed(e){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(e){if(this._samplingState){const i=this._samplingState.modelLineRangeToMinimapLineRange(e.fromLineNumber,e.fromLineNumber+e.count-1);return i?this._actual.onLinesChanged(i[0],i[1]-i[0]+1):!1}else return this._actual.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){if(this._samplingState){const[i,n]=this._samplingState.onLinesDeleted(e);return i<=n&&this._actual.onLinesChanged(i+1,n-i+1),this._shouldCheckSampling=!0,!0}else return this._actual.onLinesDeleted(e.fromLineNumber,e.toLineNumber)}onLinesInserted(e){return this._samplingState?(this._samplingState.onLinesInserted(e),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(e.fromLineNumber,e.toLineNumber)}onScrollChanged(e){return this._actual.onScrollChanged()}onThemeChanged(e){return this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(e){if(this._samplingState){const i=[];for(const n of e.ranges){const s=this._samplingState.modelLineRangeToMinimapLineRange(n.fromLineNumber,n.toLineNumber);s&&i.push({fromLineNumber:s[0],toLineNumber:s[1]})}return i.length?this._actual.onTokensChanged(i):!1}else return this._actual.onTokensChanged(e.ranges)}onTokensColorsChanged(e){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(e){return this._actual.onZonesChanged()}prepareRender(e){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(e){let i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber;this._samplingState&&(i=this._samplingState.modelLineToMinimapLine(i),n=this._samplingState.modelLineToMinimapLine(n));const s={viewportContainsWhitespaceGaps:e.viewportData.whitespaceViewportData.length>0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:i,viewportEndLineNumber:n,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(i),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(s)}_recreateLineSampling(){this._minimapSelections=null;const e=!!this._samplingState,[i,n]=Tre.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=i,e&&this._samplingState)for(const s of n)switch(s.type){case"deleted":this._actual.onLinesDeleted(s.deleteFromLineNumber,s.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(s.insertFromLineNumber,s.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,i,n){if(this._samplingState){const s=[];for(let c=0,d=i-e+1;c<d;c++)n[c]?s[c]=this._context.viewModel.getViewLineData(this._samplingState.minimapLines[e+c-1]):s[c]=null;return s}return this._context.viewModel.getMinimapLinesRenderingData(e,i,n).data}getSelections(){if(this._minimapSelections===null)if(this._samplingState){this._minimapSelections=[];for(const e of this._selections){const[i,n]=this._samplingState.decorationLineRangeToMinimapLineRange(e.startLineNumber,e.endLineNumber);this._minimapSelections.push(new Us(i,e.startColumn,n,e.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(e,i){const n=this._getMinimapDecorationsInViewport(e,i).filter(s=>{var c;return!((c=s.options.minimap)!=null&&c.sectionHeaderStyle)});if(this._samplingState){const s=[];for(const c of n){if(!c.options.minimap)continue;const d=c.range,f=this._samplingState.modelLineToMinimapLine(d.startLineNumber),m=this._samplingState.modelLineToMinimapLine(d.endLineNumber);s.push(new uIt(new nt(f,d.startColumn,m,d.endColumn),c.options))}return s}return n}getSectionHeaderDecorationsInViewport(e,i){const n=this.options.minimapLineHeight,c=this.options.sectionHeaderFontSize/n;return e=Math.floor(Math.max(1,e-c)),this._getMinimapDecorationsInViewport(e,i).filter(d=>{var f;return!!((f=d.options.minimap)!=null&&f.sectionHeaderStyle)})}_getMinimapDecorationsInViewport(e,i){let n;if(this._samplingState){const s=this._samplingState.minimapLines[e-1],c=this._samplingState.minimapLines[i-1];n=new nt(s,1,c,this._context.viewModel.getLineMaxColumn(c))}else n=new nt(e,1,i,this._context.viewModel.getLineMaxColumn(i));return this._context.viewModel.getMinimapDecorationsInRange(n)}getSectionHeaderText(e,i){var d;const n=(d=e.options.minimap)==null?void 0:d.sectionHeaderText;if(!n)return null;const s=this._sectionHeaderCache.get(n);if(s)return s;const c=i(n);return this._sectionHeaderCache.set(n,c),c}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.viewModel.revealRange("mouse",!1,new nt(e,1,e,1),1,0)}setScrollTop(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e},1)}}class hq extends xi{constructor(e,i){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=e,this._model=i,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(Nbt),this._domNode=_u(document.createElement("div")),JE.write(this._domNode,9),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=_u(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=_u(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=_u(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=_u(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=_u(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._pointerDownListener=ph(this._domNode.domNode,br.POINTER_DOWN,n=>{if(n.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(n.button===0&&this._lastRenderData){const v=e_(this._slider.domNode),x=v.top+v.height/2;this._startSliderDragging(n,x,this._lastRenderData.renderedLayout)}return}const c=this._model.options.minimapLineHeight,d=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*n.offsetY;let m=Math.floor(d/c)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;m=Math.min(m,this._model.getLineCount()),this._model.revealLineNumber(m)}),this._sliderPointerMoveMonitor=new bJ,this._sliderPointerDownListener=ph(this._slider.domNode,br.POINTER_DOWN,n=>{n.preventDefault(),n.stopPropagation(),n.button===0&&this._lastRenderData&&this._startSliderDragging(n,n.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=y1.addTarget(this._domNode.domNode),this._sliderTouchStartListener=en(this._domNode.domNode,Ud.Start,n=>{n.preventDefault(),n.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(n))},{passive:!1}),this._sliderTouchMoveListener=en(this._domNode.domNode,Ud.Change,n=>{n.preventDefault(),n.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(n)},{passive:!1}),this._sliderTouchEndListener=ph(this._domNode.domNode,Ud.End,n=>{n.preventDefault(),n.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(e,i,n){if(!e.target||!(e.target instanceof Element))return;const s=e.pageX;this._slider.toggleClassName("active",!0);const c=(d,f)=>{const m=e_(this._domNode.domNode),v=Math.min(Math.abs(f-s),Math.abs(f-m.left),Math.abs(f-m.left-m.width));if(I0&&v>Aki){this._model.setScrollTop(n.scrollTop);return}const x=d-i;this._model.setScrollTop(n.getDesiredScrollTopFromDelta(x))};e.pageY!==i&&c(e.pageY,s),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,d=>c(d.pageY,d.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){const i=this._domNode.domNode.getBoundingClientRect().top,n=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-i);this._model.setScrollTop(n)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const e=["minimap"];return this._model.options.showSlider==="always"?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new tGe(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,i){return this._lastRenderData?this._lastRenderData.onLinesChanged(e,i):!1}onLinesDeleted(e,i){var n;return(n=this._lastRenderData)==null||n.onLinesDeleted(e,i),!0}onLinesInserted(e,i){var n;return(n=this._lastRenderData)==null||n.onLinesInserted(e,i),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(Nbt),this._renderDecorations=!0,!0}onTokensChanged(e){return this._lastRenderData?this._lastRenderData.onTokensChanged(e):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const n=qie.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(n.sliderNeeded?"block":"none"),this._slider.setTop(n.sliderTop),this._slider.setHeight(n.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(n.sliderHeight),this.renderDecorations(n),this._lastRenderData=this.renderLines(n)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const i=this._model.getSelections();i.sort(nt.compareRangesUsingStarts);const n=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);n.sort((I,P)=>(I.options.zIndex||0)-(P.options.zIndex||0));const{canvasInnerWidth:s,canvasInnerHeight:c}=this._model.options,d=this._model.options.minimapLineHeight,f=this._model.options.minimapCharWidth,m=this._model.getOptions().tabSize,v=this._decorationsCanvas.domNode.getContext("2d");v.clearRect(0,0,s,c);const x=new MSt(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(v,i,x,e,d),this._renderDecorationsLineHighlights(v,n,x,e,d);const w=new MSt(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(v,i,w,e,d,m,f,s),this._renderDecorationsHighlights(v,n,w,e,d,m,f,s),this._renderSectionHeaders(e)}}_renderSelectionLineHighlights(e,i,n,s,c){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let d=0,f=0;for(const m of i){const v=s.intersectWithViewport(m);if(!v)continue;const[x,w]=v;for(let O=x;O<=w;O++)n.set(O,!0);const I=s.getYForLineNumber(x,c),P=s.getYForLineNumber(w,c);f>=I||(f>d&&e.fillRect(QN,d,e.canvas.width,f-d),d=I),f=P}f>d&&e.fillRect(QN,d,e.canvas.width,f-d)}_renderDecorationsLineHighlights(e,i,n,s,c){const d=new Map;for(let f=i.length-1;f>=0;f--){const m=i[f],v=m.options.minimap;if(!v||v.position!==1)continue;const x=s.intersectWithViewport(m.range);if(!x)continue;const[w,I]=x,P=v.getColor(this._theme.value);if(!P||P.isTransparent())continue;let O=d.get(P.toString());O||(O=P.transparent(.5).toString(),d.set(P.toString(),O)),e.fillStyle=O;for(let z=w;z<=I;z++){if(n.has(z))continue;n.set(z,!0);const J=s.getYForLineNumber(w,c);e.fillRect(QN,J,e.canvas.width,c)}}}_renderSelectionsHighlights(e,i,n,s,c,d,f,m){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const v of i){const x=s.intersectWithViewport(v);if(!x)continue;const[w,I]=x;for(let P=w;P<=I;P++)this.renderDecorationOnLine(e,n,v,this._selectionColor,s,P,c,c,d,f,m)}}_renderDecorationsHighlights(e,i,n,s,c,d,f,m){for(const v of i){const x=v.options.minimap;if(!x)continue;const w=s.intersectWithViewport(v.range);if(!w)continue;const[I,P]=w,O=x.getColor(this._theme.value);if(!(!O||O.isTransparent()))for(let z=I;z<=P;z++)switch(x.position){case 1:this.renderDecorationOnLine(e,n,v.range,O,s,z,c,c,d,f,m);continue;case 2:{const J=s.getYForLineNumber(z,c);this.renderDecoration(e,O,2,J,Oki,c);continue}}}}renderDecorationOnLine(e,i,n,s,c,d,f,m,v,x,w){const I=c.getYForLineNumber(d,m);if(I+f<0||I>this._model.options.canvasInnerHeight)return;const{startLineNumber:P,endLineNumber:O}=n,z=P===d?n.startColumn:1,J=O===d?n.endColumn:this._model.getLineMaxColumn(d),Y=this.getXOffsetForPosition(i,d,z,v,x,w),ae=this.getXOffsetForPosition(i,d,J,v,x,w);this.renderDecoration(e,s,Y,I,ae-Y,f)}getXOffsetForPosition(e,i,n,s,c,d){if(n===1)return QN;if((n-1)*c>=d)return d;let m=e.get(i);if(!m){const v=this._model.getLineContent(i);m=[QN];let x=QN;for(let w=1;w<v.length+1;w++){const I=v.charCodeAt(w-1),P=I===9?s*c:bR(I)?2*c:c,O=x+P;if(O>=d){m[w]=d;break}m[w]=O,x=O}e.set(i,m)}return n-1<m.length?m[n-1]:d}renderDecoration(e,i,n,s,c,d){e.fillStyle=i&&i.toString()||"",e.fillRect(n,s,c,d)}_renderSectionHeaders(e){var z;const i=this._model.options.minimapLineHeight,n=this._model.options.sectionHeaderFontSize,s=this._model.options.sectionHeaderLetterSpacing,c=n*1.5,{canvasInnerWidth:d}=this._model.options,f=this._model.options.backgroundColor,m=`rgb(${f.r} ${f.g} ${f.b} / .7)`,v=this._model.options.sectionHeaderFontColor,x=`rgb(${v.r} ${v.g} ${v.b})`,w=x,I=this._decorationsCanvas.domNode.getContext("2d");I.letterSpacing=s+"px",I.font="500 "+n+"px "+this._model.options.sectionHeaderFontFamily,I.strokeStyle=w,I.lineWidth=.2;const P=this._model.getSectionHeaderDecorationsInViewport(e.startLineNumber,e.endLineNumber);P.sort((J,Y)=>J.range.startLineNumber-Y.range.startLineNumber);const O=hq._fitSectionHeader.bind(null,I,d-QN);for(const J of P){const Y=e.getYForLineNumber(J.range.startLineNumber,i)+n,ae=Y-n,me=ae+2,ye=this._model.getSectionHeaderText(J,O);hq._renderSectionLabel(I,ye,((z=J.options.minimap)==null?void 0:z.sectionHeaderStyle)===2,m,x,d,ae,c,Y,me)}}static _fitSectionHeader(e,i,n){if(!n)return n;const s="…",c=e.measureText(n).width,d=e.measureText(s).width;if(c<=i||c<=d)return n;const f=n.length,m=c/n.length,v=Math.floor((i-d)/m)-1;let x=Math.ceil(v/2);for(;x>0&&/\s/.test(n[x-1]);)--x;return n.substring(0,x)+s+n.substring(f-(v-x))}static _renderSectionLabel(e,i,n,s,c,d,f,m,v,x){i&&(e.fillStyle=s,e.fillRect(0,f,d,m),e.fillStyle=c,e.fillText(i,QN,v)),n&&(e.beginPath(),e.moveTo(0,x),e.lineTo(d,x),e.closePath(),e.stroke())}renderLines(e){const i=e.startLineNumber,n=e.endLineNumber,s=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const An=this._lastRenderData._get();return new OSt(e,An.imageData,An.lines)}const c=this._getBuffer();if(!c)return null;const[d,f,m]=hq._renderUntouchedLines(c,e.topPaddingLineCount,i,n,s,this._lastRenderData),v=this._model.getMinimapLinesRenderingData(i,n,m),x=this._model.getOptions().tabSize,w=this._model.options.defaultBackgroundColor,I=this._model.options.backgroundColor,P=this._model.options.foregroundAlpha,O=this._model.tokensColorTracker,z=O.backgroundIsLight(),J=this._model.options.renderMinimap,Y=this._model.options.charRenderer(),ae=this._model.options.fontScale,me=this._model.options.minimapCharWidth,Ce=(J===1?2:3)*ae,Fe=s>Ce?Math.floor((s-Ce)/2):0,rt=I.a/255,ct=new t6(Math.round((I.r-w.r)*rt+w.r),Math.round((I.g-w.g)*rt+w.g),Math.round((I.b-w.b)*rt+w.b),255);let Mt=e.topPaddingLineCount*s;const Yt=[];for(let An=0,qt=n-i+1;An<qt;An++)m[An]&&hq._renderLine(c,ct,I.a,z,J,me,O,P,Y,Mt,Fe,x,v[An],ae,s),Yt[An]=new Ive(Mt),Mt+=s;const Bi=d===-1?0:d,$t=(f===-1?c.height:f)-Bi;return this._canvas.domNode.getContext("2d").putImageData(c,0,0,0,Bi,c.width,$t),new OSt(e,c,Yt)}static _renderUntouchedLines(e,i,n,s,c,d){const f=[];if(!d){for(let Mt=0,Yt=s-n+1;Mt<Yt;Mt++)f[Mt]=!0;return[-1,-1,f]}const m=d._get(),v=m.imageData.data,x=m.rendLineNumberStart,w=m.lines,I=w.length,P=e.width,O=e.data,z=(s-n+1)*c*P*4;let J=-1,Y=-1,ae=-1,me=-1,ye=-1,Ce=-1,Fe=i*c;for(let Mt=n;Mt<=s;Mt++){const Yt=Mt-n,Bi=Mt-x,$i=Bi>=0&&Bi<I?w[Bi].dy:-1;if($i===-1){f[Yt]=!0,Fe+=c;continue}const $t=$i*P*4,Hi=($i+c)*P*4,An=Fe*P*4,qt=(Fe+c)*P*4;me===$t&&Ce===An?(me=Hi,Ce=qt):(ae!==-1&&(O.set(v.subarray(ae,me),ye),J===-1&&ae===0&&ae===ye&&(J=me),Y===-1&&me===z&&ae===ye&&(Y=ae)),ae=$t,me=Hi,ye=An,Ce=qt),f[Yt]=!1,Fe+=c}ae!==-1&&(O.set(v.subarray(ae,me),ye),J===-1&&ae===0&&ae===ye&&(J=me),Y===-1&&me===z&&ae===ye&&(Y=ae));const rt=J===-1?-1:J/(P*4),ct=Y===-1?-1:Y/(P*4);return[rt,ct,f]}static _renderLine(e,i,n,s,c,d,f,m,v,x,w,I,P,O,z){const J=P.content,Y=P.tokens,ae=e.width-d,me=z===1;let ye=QN,Ce=0,Fe=0;for(let rt=0,ct=Y.getCount();rt<ct;rt++){const Mt=Y.getEndOffset(rt),Yt=Y.getForeground(rt),Bi=f.getColor(Yt);for(;Ce<Mt;Ce++){if(ye>ae)return;const $i=J.charCodeAt(Ce);if($i===9){const $t=I-(Ce+Fe)%I;Fe+=$t-1,ye+=$t*d}else if($i===32)ye+=d;else{const $t=bR($i)?2:1;for(let Hi=0;Hi<$t;Hi++)if(c===2?v.blockRenderChar(e,ye,x+w,Bi,m,i,n,me):v.renderChar(e,ye,x+w,$i,Bi,m,i,n,O,s,me),ye+=d,ye>ae)return}}}}}class MSt{constructor(e,i,n){this._startLineNumber=e,this._endLineNumber=i,this._defaultValue=n,this._values=[];for(let s=0,c=this._endLineNumber-this._startLineNumber+1;s<c;s++)this._values[s]=n}has(e){return this.get(e)!==this._defaultValue}set(e,i){e<this._startLineNumber||e>this._endLineNumber||(this._values[e-this._startLineNumber]=i)}get(e){return e<this._startLineNumber||e>this._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}class Rki extends nS{constructor(e,i){super(e),this._viewDomNode=i;const s=this._context.configuration.options.get(146);this._widgets={},this._verticalScrollbarWidth=s.verticalScrollbarWidth,this._minimapWidth=s.minimap.minimapWidth,this._horizontalScrollbarHeight=s.horizontalScrollbarHeight,this._editorHeight=s.height,this._editorWidth=s.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=_u(document.createElement("div")),JE.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=_u(document.createElement("div")),JE.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const n=this._context.configuration.options.get(146);return this._verticalScrollbarWidth=n.verticalScrollbarWidth,this._minimapWidth=n.minimap.minimapWidth,this._horizontalScrollbarHeight=n.horizontalScrollbarHeight,this._editorHeight=n.height,this._editorWidth=n.width,!0}addWidget(e){const i=_u(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:i},i.setPosition("absolute"),i.setAttribute("widgetId",e.getId()),e.allowEditorOverflow?this.overflowingOverlayWidgetsDomNode.appendChild(i):this._domNode.appendChild(i),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,i){const n=this._widgets[e.getId()],s=i?i.preference:null,c=i==null?void 0:i.stackOridinal;return n.preference===s&&n.stack===c?(this._updateMaxMinWidth(),!1):(n.preference=s,n.stack=c,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){const i=e.getId();if(this._widgets.hasOwnProperty(i)){const s=this._widgets[i].domNode.domNode;delete this._widgets[i],s.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){var n,s;let e=0;const i=Object.keys(this._widgets);for(let c=0,d=i.length;c<d;c++){const f=i[c],v=(s=(n=this._widgets[f].widget).getMinContentWidthInPx)==null?void 0:s.call(n);typeof v<"u"&&(e=Math.max(e,v))}this._context.viewLayout.setOverlayWidgetsMinWidth(e)}_renderWidget(e,i){const n=e.domNode;if(e.preference===null){n.setTop("");return}const s=2*this._verticalScrollbarWidth+this._minimapWidth;if(e.preference===0||e.preference===1){if(e.preference===1){const c=n.domNode.clientHeight;n.setTop(this._editorHeight-c-2*this._horizontalScrollbarHeight)}else n.setTop(0);e.stack!==void 0?(n.setTop(i[e.preference]),i[e.preference]+=n.domNode.clientWidth):n.setRight(s)}else if(e.preference===2)n.domNode.style.right="50%",e.stack!==void 0?(n.setTop(i[2]),i[2]+=n.domNode.clientHeight):n.setTop(0);else{const{top:c,left:d}=e.preference;if(this._context.configuration.options.get(42)&&e.widget.allowEditorOverflow){const m=this._viewDomNodeRect;n.setTop(c+m.top),n.setLeft(d+m.left),n.setPosition("fixed")}else n.setTop(c),n.setLeft(d),n.setPosition("absolute")}}prepareRender(e){this._viewDomNodeRect=e_(this._viewDomNode.domNode)}render(e){this._domNode.setWidth(this._editorWidth);const i=Object.keys(this._widgets),n=Array.from({length:3},()=>0);i.sort((s,c)=>(this._widgets[s].stack||0)-(this._widgets[c].stack||0));for(let s=0,c=i.length;s<c;s++){const d=i[s];this._renderWidget(this._widgets[d],n)}}}class Fki{constructor(e,i){const n=e.options;this.lineHeight=n.get(67),this.pixelRatio=n.get(144),this.overviewRulerLanes=n.get(83),this.renderBorder=n.get(82);const s=i.getColor(Myi);this.borderColor=s?s.toString():null,this.hideCursor=n.get(59);const c=i.getColor(bwe);this.cursorColorSingle=c?c.transparent(.7).toString():null;const d=i.getColor(WDt);this.cursorColorPrimary=d?d.transparent(.7).toString():null;const f=i.getColor(VDt);this.cursorColorSecondary=f?f.transparent(.7).toString():null,this.themeType=i.type;const m=n.get(73),v=m.enabled,x=m.side,w=i.getColor(Ryi),I=Oh.getDefaultBackground();w?this.backgroundColor=w:v&&x==="right"?this.backgroundColor=I:this.backgroundColor=null;const O=n.get(146).overviewRuler;this.top=O.top,this.right=O.right,this.domWidth=O.width,this.domHeight=O.height,this.overviewRulerLanes===0?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[z,J]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=z,this.w=J}_initLanes(e,i,n){const s=i-e;if(n>=3){const c=Math.floor(s/3),d=Math.floor(s/3),f=s-c-d,m=e,v=m+c,x=m+c+f;return[[0,m,v,m,x,m,v,m],[0,c,f,c+f,d,c+f+d,f+d,c+f+d]]}else if(n===2){const c=Math.floor(s/2),d=s-c,f=e,m=f+c;return[[0,f,f,f,m,f,f,f],[0,c,c,c,d,c+d,c+d,c+d]]}else{const c=e,d=s;return[[0,c,c,c,c,c,c,c],[0,d,d,d,d,d,d,d]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColorSingle===e.cursorColorSingle&&this.cursorColorPrimary===e.cursorColorPrimary&&this.cursorColorSecondary===e.cursorColorSecondary&&this.themeType===e.themeType&&In.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class Bki extends nS{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=_u(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=Oh.onDidChange(i=>{i.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[{position:new pi(1,1),color:this._settings.cursorColorSingle}]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const i=new Fki(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(i)?!1:(this._settings=i,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}onCursorStateChanged(e){this._cursorPositions=[];for(let i=0,n=e.selections.length;i<n;i++){let s=this._settings.cursorColorSingle;n>1&&(s=i===0?this._settings.cursorColorPrimary:this._settings.cursorColorSecondary),this._cursorPositions.push({position:e.selections[i].getPosition(),color:s})}return this._cursorPositions.sort((i,n)=>pi.compare(i.position,n.position)),this._markRenderingIsMaybeNeeded()}onDecorationsChanged(e){return e.affectsOverviewRuler?this._markRenderingIsMaybeNeeded():!1}onFlushed(e){return this._markRenderingIsNeeded()}onScrollChanged(e){return e.scrollHeightChanged?this._markRenderingIsNeeded():!1}onZonesChanged(e){return this._markRenderingIsNeeded()}onThemeChanged(e){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render(),this._actualShouldRender=0}_render(){const e=this._settings.backgroundColor;if(this._settings.overviewRulerLanes===0){this._domNode.setBackgroundColor(e?In.Format.CSS.formatHexA(e):""),this._domNode.setDisplay("none");return}const i=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme);if(i.sort(yre.compareByRenderingProps),this._actualShouldRender===1&&!yre.equalsArr(this._renderedDecorations,i)&&(this._actualShouldRender=2),this._actualShouldRender===1&&!Lf(this._renderedCursorPositions,this._cursorPositions,(O,z)=>O.position.lineNumber===z.position.lineNumber&&O.color===z.color)&&(this._actualShouldRender=2),this._actualShouldRender===1)return;this._renderedDecorations=i,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");const n=this._settings.canvasWidth,s=this._settings.canvasHeight,c=this._settings.lineHeight,d=this._context.viewLayout,f=this._context.viewLayout.getScrollHeight(),m=s/f,v=6*this._settings.pixelRatio|0,x=v/2|0,w=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(w.fillStyle=In.Format.CSS.formatHexA(e),w.fillRect(0,0,n,s)):(w.clearRect(0,0,n,s),w.fillStyle=In.Format.CSS.formatHexA(e),w.fillRect(0,0,n,s)):w.clearRect(0,0,n,s);const I=this._settings.x,P=this._settings.w;for(const O of i){const z=O.color,J=O.data;w.fillStyle=z;let Y=0,ae=0,me=0;for(let ye=0,Ce=J.length/3;ye<Ce;ye++){const Fe=J[3*ye],rt=J[3*ye+1],ct=J[3*ye+2];let Mt=d.getVerticalOffsetForLineNumber(rt)*m|0,Yt=(d.getVerticalOffsetForLineNumber(ct)+c)*m|0;if(Yt-Mt<v){let $i=(Mt+Yt)/2|0;$i<x?$i=x:$i+x>s&&($i=s-x),Mt=$i-x,Yt=$i+x}Mt>me+1||Fe!==Y?(ye!==0&&w.fillRect(I[Y],ae,P[Y],me-ae),Y=Fe,ae=Mt,me=Yt):Yt>me&&(me=Yt)}w.fillRect(I[Y],ae,P[Y],me-ae)}if(!this._settings.hideCursor){const O=2*this._settings.pixelRatio|0,z=O/2|0,J=this._settings.x[7],Y=this._settings.w[7];let ae=-100,me=-100,ye=null;for(let Ce=0,Fe=this._cursorPositions.length;Ce<Fe;Ce++){const rt=this._cursorPositions[Ce].color;if(!rt)continue;const ct=this._cursorPositions[Ce].position;let Mt=d.getVerticalOffsetForLineNumber(ct.lineNumber)*m|0;Mt<z?Mt=z:Mt+z>s&&(Mt=s-z);const Yt=Mt-z,Bi=Yt+O;Yt>me+1||rt!==ye?(Ce!==0&&ye&&w.fillRect(J,ae,Y,me-ae),ae=Yt,me=Bi):Bi>me&&(me=Bi),ye=rt,w.fillStyle=rt}ye&&w.fillRect(J,ae,Y,me-ae)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(w.beginPath(),w.lineWidth=1,w.strokeStyle=this._settings.borderColor,w.moveTo(0,0),w.lineTo(0,s),w.moveTo(1,0),w.lineTo(n,0),w.stroke())}}class RSt{constructor(e,i,n){this._colorZoneBrand=void 0,this.from=e|0,this.to=i|0,this.colorId=n|0}static compare(e,i){return e.colorId===i.colorId?e.from===i.from?e.to-i.to:e.from-i.from:e.colorId-i.colorId}}class IIt{constructor(e,i,n,s){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=i,this.heightInLines=n,this.color=s,this._colorZone=null}static compare(e,i){return e.color===i.color?e.startLineNumber===i.startLineNumber?e.heightInLines===i.heightInLines?e.endLineNumber-i.endLineNumber:e.heightInLines-i.heightInLines:e.startLineNumber-i.startLineNumber:e.color<i.color?-1:1}setColorZone(e){this._colorZone=e}getColorZones(){return this._colorZone}}class Wki{constructor(e){this._getVerticalOffsetForLine=e,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._domHeight=0,this._outerHeight=0,this._pixelRatio=1,this._lastAssignedId=0,this._color2Id=Object.create(null),this._id2Color=[]}getId2Color(){return this._id2Color}setZones(e){this._zones=e,this._zones.sort(IIt.compare)}setLineHeight(e){return this._lineHeight===e?!1:(this._lineHeight=e,this._colorZonesInvalid=!0,!0)}setPixelRatio(e){this._pixelRatio=e,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(e){return this._domWidth===e?!1:(this._domWidth=e,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(e){return this._domHeight===e?!1:(this._domHeight=e,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(e){return this._outerHeight===e?!1:(this._outerHeight=e,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const e=this._colorZonesInvalid,i=Math.floor(this._lineHeight),n=Math.floor(this.getCanvasHeight()),s=Math.floor(this._outerHeight),c=n/s,d=Math.floor(4*this._pixelRatio/2),f=[];for(let m=0,v=this._zones.length;m<v;m++){const x=this._zones[m];if(!e){const ye=x.getColorZones();if(ye){f.push(ye);continue}}const w=this._getVerticalOffsetForLine(x.startLineNumber),I=x.heightInLines===0?this._getVerticalOffsetForLine(x.endLineNumber)+i:w+x.heightInLines*i,P=Math.floor(c*w),O=Math.floor(c*I);let z=Math.floor((P+O)/2),J=O-z;J<d&&(J=d),z-J<0&&(z=J),z+J>n&&(z=n-J);const Y=x.color;let ae=this._color2Id[Y];ae||(ae=++this._lastAssignedId,this._color2Id[Y]=ae,this._id2Color[ae]=Y);const me=new RSt(z-J,z+J,ae);x.setColorZone(me),f.push(me)}return this._colorZonesInvalid=!1,f.sort(RSt.compare),f}}class Vki extends Mse{constructor(e,i){super(),this._context=e;const n=this._context.configuration.options;this._domNode=_u(document.createElement("canvas")),this._domNode.setClassName(i),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new Wki(s=>this._context.viewLayout.getVerticalOffsetForLineNumber(s)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(n.get(67)),this._zoneManager.setPixelRatio(n.get(144)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const i=this._context.configuration.options;return e.hasChanged(67)&&(this._zoneManager.setLineHeight(i.get(67)),this._render()),e.hasChanged(144)&&(this._zoneManager.setPixelRatio(i.get(144)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let i=!1;i=this._zoneManager.setDOMWidth(e.width)||i,i=this._zoneManager.setDOMHeight(e.height)||i,i&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const e=this._zoneManager.getCanvasWidth(),i=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),s=this._zoneManager.getId2Color(),c=this._domNode.domNode.getContext("2d");return c.clearRect(0,0,e,i),n.length>0&&this._renderOneLane(c,n,s,e),!0}_renderOneLane(e,i,n,s){let c=0,d=0,f=0;for(const m of i){const v=m.colorId,x=m.from,w=m.to;v!==c?(e.fillRect(0,d,s,f-d),c=v,e.fillStyle=n[c],d=x,f=w):f>=x?f=Math.max(f,w):(e.fillRect(0,d,s,f-d),d=x,f=w)}e.fillRect(0,d,s,f-d)}}class Hki extends nS{constructor(e){super(e),this.domNode=_u(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const i=this._context.configuration.options;this._rulers=i.get(103),this._typicalHalfwidthCharacterWidth=i.get(50).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const i=this._context.configuration.options;return this._rulers=i.get(103),this._typicalHalfwidthCharacterWidth=i.get(50).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,i=this._rulers.length;if(e===i)return;if(e<i){const{tabSize:s}=this._context.viewModel.model.getOptions(),c=s;let d=i-e;for(;d>0;){const f=_u(document.createElement("div"));f.setClassName("view-ruler"),f.setWidth(c),this.domNode.appendChild(f),this._renderedRulers.push(f),d--}return}let n=e-i;for(;n>0;){const s=this._renderedRulers.pop();this.domNode.removeChild(s),n--}}render(e){this._ensureRulersCount();for(let i=0,n=this._rulers.length;i<n;i++){const s=this._renderedRulers[i],c=this._rulers[i];s.setBoxShadow(c.color?`1px 0 0 0 ${c.color} inset`:""),s.setHeight(Math.min(e.scrollHeight,1e6)),s.setLeft(c.column*this._typicalHalfwidthCharacterWidth)}}}class jki extends nS{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const n=this._context.configuration.options.get(104);this._useShadows=n.useShadows,this._domNode=_u(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e?(this._shouldShow=e,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const i=this._context.configuration.options.get(146);i.minimap.renderMinimap===0||i.minimap.minimapWidth>0&&i.minimap.minimapLeft===0?this._width=i.width:this._width=i.width-i.verticalScrollbarWidth}onConfigurationChanged(e){const n=this._context.configuration.options.get(104);return this._useShadows=n.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}class zki{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class Uki{constructor(e,i){this.lineNumber=e,this.ranges=i}}function qki(l){return new zki(l)}function $ki(l){return new Uki(l.lineNumber,l.ranges.map(qki))}const b_=class b_ extends oW{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const i=this._context.configuration.options;this._roundedSelection=i.get(102),this._typicalHalfwidthCharacterWidth=i.get(50).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const i=this._context.configuration.options;return this._roundedSelection=i.get(102),this._typicalHalfwidthCharacterWidth=i.get(50).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let i=0,n=e.length;i<n;i++)if(e[i].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(e,i,n){const s=this._typicalHalfwidthCharacterWidth/4;let c=null,d=null;if(n&&n.length>0&&i.length>0){const f=i[0].lineNumber;if(f===e.startLineNumber)for(let v=0;!c&&v<n.length;v++)n[v].lineNumber===f&&(c=n[v].ranges[0]);const m=i[i.length-1].lineNumber;if(m===e.endLineNumber)for(let v=n.length-1;!d&&v>=0;v--)n[v].lineNumber===m&&(d=n[v].ranges[0]);c&&!c.startStyle&&(c=null),d&&!d.startStyle&&(d=null)}for(let f=0,m=i.length;f<m;f++){const v=i[f].ranges[0],x=v.left,w=v.left+v.width,I={top:0,bottom:0},P={top:0,bottom:0};if(f>0){const O=i[f-1].ranges[0].left,z=i[f-1].ranges[0].left+i[f-1].ranges[0].width;x0e(x-O)<s?I.top=2:x>O&&(I.top=1),x0e(w-z)<s?P.top=2:O<w&&w<z&&(P.top=1)}else c&&(I.top=c.startStyle.top,P.top=c.endStyle.top);if(f+1<m){const O=i[f+1].ranges[0].left,z=i[f+1].ranges[0].left+i[f+1].ranges[0].width;x0e(x-O)<s?I.bottom=2:O<x&&x<z&&(I.bottom=1),x0e(w-z)<s?P.bottom=2:w<z&&(P.bottom=1)}else d&&(I.bottom=d.startStyle.bottom,P.bottom=d.endStyle.bottom);v.startStyle=I,v.endStyle=P}}_getVisibleRangesWithStyle(e,i,n){const c=(i.linesVisibleRangesForRange(e,!0)||[]).map($ki);return!this._visibleRangesHaveGaps(c)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(i.visibleRange,c,n),c}_createSelectionPiece(e,i,n,s,c){return'<div class="cslr '+n+'" style="top:'+e.toString()+"px;bottom:"+i.toString()+"px;left:"+s.toString()+"px;width:"+c.toString()+'px;"></div>'}_actualRenderOneSelection(e,i,n,s){if(s.length===0)return;const c=!!s[0].ranges[0].startStyle,d=s[0].lineNumber,f=s[s.length-1].lineNumber;for(let m=0,v=s.length;m<v;m++){const x=s[m],w=x.lineNumber,I=w-i,P=n&&w===d?1:0,O=n&&w!==d&&w===f?1:0;let z="",J="";for(let Y=0,ae=x.ranges.length;Y<ae;Y++){const me=x.ranges[Y];if(c){const Ce=me.startStyle,Fe=me.endStyle;if(Ce.top===1||Ce.bottom===1){z+=this._createSelectionPiece(P,O,b_.SELECTION_CLASS_NAME,me.left-b_.ROUNDED_PIECE_WIDTH,b_.ROUNDED_PIECE_WIDTH);let rt=b_.EDITOR_BACKGROUND_CLASS_NAME;Ce.top===1&&(rt+=" "+b_.SELECTION_TOP_RIGHT),Ce.bottom===1&&(rt+=" "+b_.SELECTION_BOTTOM_RIGHT),z+=this._createSelectionPiece(P,O,rt,me.left-b_.ROUNDED_PIECE_WIDTH,b_.ROUNDED_PIECE_WIDTH)}if(Fe.top===1||Fe.bottom===1){z+=this._createSelectionPiece(P,O,b_.SELECTION_CLASS_NAME,me.left+me.width,b_.ROUNDED_PIECE_WIDTH);let rt=b_.EDITOR_BACKGROUND_CLASS_NAME;Fe.top===1&&(rt+=" "+b_.SELECTION_TOP_LEFT),Fe.bottom===1&&(rt+=" "+b_.SELECTION_BOTTOM_LEFT),z+=this._createSelectionPiece(P,O,rt,me.left+me.width,b_.ROUNDED_PIECE_WIDTH)}}let ye=b_.SELECTION_CLASS_NAME;if(c){const Ce=me.startStyle,Fe=me.endStyle;Ce.top===0&&(ye+=" "+b_.SELECTION_TOP_LEFT),Ce.bottom===0&&(ye+=" "+b_.SELECTION_BOTTOM_LEFT),Fe.top===0&&(ye+=" "+b_.SELECTION_TOP_RIGHT),Fe.bottom===0&&(ye+=" "+b_.SELECTION_BOTTOM_RIGHT)}J+=this._createSelectionPiece(P,O,ye,me.left,me.width)}e[I][0]+=z,e[I][1]+=J}}prepareRender(e){const i=[],n=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber;for(let d=n;d<=s;d++){const f=d-n;i[f]=["",""]}const c=[];for(let d=0,f=this._selections.length;d<f;d++){const m=this._selections[d];if(m.isEmpty()){c[d]=null;continue}const v=this._getVisibleRangesWithStyle(m,e,this._previousFrameVisibleRangesWithStyle[d]);c[d]=v,this._actualRenderOneSelection(i,n,this._selections.length>1,v)}this._previousFrameVisibleRangesWithStyle=c,this._renderResult=i.map(([d,f])=>d+f)}render(e,i){if(!this._renderResult)return"";const n=i-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}};b_.SELECTION_CLASS_NAME="selected-text",b_.SELECTION_TOP_LEFT="top-left-radius",b_.SELECTION_BOTTOM_LEFT="bottom-left-radius",b_.SELECTION_TOP_RIGHT="top-right-radius",b_.SELECTION_BOTTOM_RIGHT="bottom-right-radius",b_.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",b_.ROUNDED_PIECE_WIDTH=10;let hje=b_;Dk((l,e)=>{const i=l.getColor(npi);i&&!i.isTransparent()&&e.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${i}; }`)});function x0e(l){return l<0?-l:l}class FSt{constructor(e,i,n,s,c,d,f){this.top=e,this.left=i,this.paddingLeft=n,this.width=s,this.height=c,this.textContent=d,this.textContentClassName=f}}var U4;(function(l){l[l.Single=0]="Single",l[l.MultiPrimary=1]="MultiPrimary",l[l.MultiSecondary=2]="MultiSecondary"})(U4||(U4={}));class BSt{constructor(e,i){this._context=e;const n=this._context.configuration.options,s=n.get(50);this._cursorStyle=n.get(28),this._lineHeight=n.get(67),this._typicalHalfwidthCharacterWidth=s.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(n.get(31),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=_u(document.createElement("div")),this._domNode.setClassName(`cursor ${n$}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),a0(this._domNode,s),this._domNode.setDisplay("none"),this._position=new pi(1,1),this._pluralityClass="",this.setPlurality(i),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}setPlurality(e){switch(e){default:case U4.Single:this._pluralityClass="";break;case U4.MultiPrimary:this._pluralityClass="cursor-primary";break;case U4.MultiSecondary:this._pluralityClass="cursor-secondary";break}}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const i=this._context.configuration.options,n=i.get(50);return this._cursorStyle=i.get(28),this._lineHeight=i.get(67),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(i.get(31),this._typicalHalfwidthCharacterWidth),a0(this._domNode,n),!0}onCursorPositionChanged(e,i){return i?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:i}=this._position,n=this._context.viewModel.getLineContent(e),[s,c]=Qli(n,i-1);return[new pi(e,s+1),n.substring(s,c)]}_prepareRender(e){let i="",n="";const[s,c]=this._getGraphemeAwarePosition();if(this._cursorStyle===n0.Line||this._cursorStyle===n0.LineThin){const I=e.visibleRangeForPosition(s);if(!I||I.outsideRenderedLine)return null;const P=Eo(this._domNode.domNode);let O;this._cursorStyle===n0.Line?(O=_vt(P,this._lineCursorWidth>0?this._lineCursorWidth:2),O>2&&(i=c,n=this._getTokenClassName(s))):O=_vt(P,1);let z=I.left,J=0;O>=2&&z>=1&&(J=1,z-=J);const Y=e.getVerticalOffsetForLineNumber(s.lineNumber)-e.bigNumbersDelta;return new FSt(Y,z,J,O,this._lineHeight,i,n)}const d=e.linesVisibleRangesForRange(new nt(s.lineNumber,s.column,s.lineNumber,s.column+c.length),!1);if(!d||d.length===0)return null;const f=d[0];if(f.outsideRenderedLine||f.ranges.length===0)return null;const m=f.ranges[0],v=c===" "?this._typicalHalfwidthCharacterWidth:m.width<1?this._typicalHalfwidthCharacterWidth:m.width;this._cursorStyle===n0.Block&&(i=c,n=this._getTokenClassName(s));let x=e.getVerticalOffsetForLineNumber(s.lineNumber)-e.bigNumbersDelta,w=this._lineHeight;return(this._cursorStyle===n0.Underline||this._cursorStyle===n0.UnderlineThin)&&(x+=this._lineHeight-2,w=2),new FSt(x,m.left,0,v,w,i,n)}_getTokenClassName(e){const i=this._context.viewModel.getViewLineData(e.lineNumber),n=i.tokens.findTokenIndexAtOffset(e.column-1);return i.tokens.getClassName(n)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${this._pluralityClass} ${n$} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}const vne=class vne extends nS{constructor(e){super(e);const i=this._context.configuration.options;this._readOnly=i.get(92),this._cursorBlinking=i.get(26),this._cursorStyle=i.get(28),this._cursorSmoothCaretAnimation=i.get(27),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new BSt(this._context,U4.Single),this._secondaryCursors=[],this._renderData=[],this._domNode=_u(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new TT,this._cursorFlatBlinkInterval=new l$e,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const i=this._context.configuration.options;this._readOnly=i.get(92),this._cursorBlinking=i.get(26),this._cursorStyle=i.get(28),this._cursorSmoothCaretAnimation=i.get(27),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let n=0,s=this._secondaryCursors.length;n<s;n++)this._secondaryCursors[n].onConfigurationChanged(e);return!0}_onCursorPositionChanged(e,i,n){const s=this._secondaryCursors.length!==i.length||this._cursorSmoothCaretAnimation==="explicit"&&n!==3;if(this._primaryCursor.setPlurality(i.length?U4.MultiPrimary:U4.Single),this._primaryCursor.onCursorPositionChanged(e,s),this._updateBlinking(),this._secondaryCursors.length<i.length){const c=i.length-this._secondaryCursors.length;for(let d=0;d<c;d++){const f=new BSt(this._context,U4.MultiSecondary);this._domNode.domNode.insertBefore(f.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(f)}}else if(this._secondaryCursors.length>i.length){const c=this._secondaryCursors.length-i.length;for(let d=0;d<c;d++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let c=0;c<i.length;c++)this._secondaryCursors[c].onCursorPositionChanged(i[c],s)}onCursorStateChanged(e){const i=[];for(let s=0,c=e.selections.length;s<c;s++)i[s]=e.selections[s].getPosition();this._onCursorPositionChanged(i[0],i.slice(1),e.reason);const n=e.selections[0].isEmpty();return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,this._updateDomClassName()),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onFocusChanged(e){return this._editorHasFocus=e.isFocused,this._updateBlinking(),!1}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onTokensChanged(e){const i=n=>{for(let s=0,c=e.ranges.length;s<c;s++)if(e.ranges[s].fromLineNumber<=n.lineNumber&&n.lineNumber<=e.ranges[s].toLineNumber)return!0;return!1};if(i(this._primaryCursor.getPosition()))return!0;for(const n of this._secondaryCursors)if(i(n.getPosition()))return!0;return!1}onZonesChanged(e){return!0}_getCursorBlinking(){return this._isComposingInput||!this._editorHasFocus?0:this._readOnly?5:this._cursorBlinking}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const e=this._getCursorBlinking(),i=e===0,n=e===5;i?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),!i&&!n&&(e===1?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},vne.BLINK_INTERVAL,Eo(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},vne.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case n0.Line:e+=" cursor-line-style";break;case n0.Block:e+=" cursor-block-style";break;case n0.Underline:e+=" cursor-underline-style";break;case n0.LineThin:e+=" cursor-line-thin-style";break;case n0.BlockOutline:e+=" cursor-block-outline-style";break;case n0.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return(this._cursorSmoothCaretAnimation==="on"||this._cursorSmoothCaretAnimation==="explicit")&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,i=this._secondaryCursors.length;e<i;e++)this._secondaryCursors[e].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let e=0,i=this._secondaryCursors.length;e<i;e++)this._secondaryCursors[e].hide();this._isVisible=!1}prepareRender(e){this._primaryCursor.prepareRender(e);for(let i=0,n=this._secondaryCursors.length;i<n;i++)this._secondaryCursors[i].prepareRender(e)}render(e){const i=[];let n=0;const s=this._primaryCursor.render(e);s&&(i[n++]=s);for(let c=0,d=this._secondaryCursors.length;c<d;c++){const f=this._secondaryCursors[c].render(e);f&&(i[n++]=f)}this._renderData=i}getLastRenderData(){return this._renderData}};vne.BLINK_INTERVAL=500;let _je=vne;Dk((l,e)=>{const i=[{class:".cursor",foreground:bwe,background:aJe},{class:".cursor-primary",foreground:WDt,background:yyi},{class:".cursor-secondary",foreground:VDt,background:vyi}];for(const n of i){const s=l.getColor(n.foreground);if(s){let c=l.getColor(n.background);c||(c=s.opposite()),e.addRule(`.monaco-editor .cursors-layer ${n.class} { background-color: ${s}; border-color: ${s}; color: ${c}; }`),RE(l.type)&&e.addRule(`.monaco-editor .cursors-layer.has-selection ${n.class} { border-left: 1px solid ${c}; border-right: 1px solid ${c}; }`)}}});const m9e=()=>{throw new Error("Invalid change accessor")};class Jki extends nS{constructor(e){super(e);const i=this._context.configuration.options,n=i.get(146);this._lineHeight=i.get(67),this._contentWidth=n.contentWidth,this._contentLeft=n.contentLeft,this.domNode=_u(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=_u(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),i=new Map;for(const s of e)i.set(s.id,s);let n=!1;return this._context.viewModel.changeWhitespace(s=>{const c=Object.keys(this._zones);for(let d=0,f=c.length;d<f;d++){const m=c[d],v=this._zones[m],x=this._computeWhitespaceProps(v.delegate);v.isInHiddenArea=x.isInHiddenArea;const w=i.get(m);w&&(w.afterLineNumber!==x.afterViewLineNumber||w.height!==x.heightInPx)&&(s.changeOneWhitespace(m,x.afterViewLineNumber,x.heightInPx),this._safeCallOnComputedHeight(v.delegate,x.heightInPx),n=!0)}}),n}onConfigurationChanged(e){const i=this._context.configuration.options,n=i.get(146);return this._lineHeight=i.get(67),this._contentWidth=n.contentWidth,this._contentLeft=n.contentLeft,e.hasChanged(67)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(e){return this._recomputeWhitespacesProps()}onLinesDeleted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}onLinesInserted(e){return!0}_getZoneOrdinal(e){return e.ordinal??e.afterColumn??1e4}_computeWhitespaceProps(e){if(e.afterLineNumber===0)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(e),minWidthInPx:this._minWidthInPixels(e)};let i;if(typeof e.afterColumn<"u")i=this._context.viewModel.model.validatePosition({lineNumber:e.afterLineNumber,column:e.afterColumn});else{const d=this._context.viewModel.model.validatePosition({lineNumber:e.afterLineNumber,column:1}).lineNumber;i=new pi(d,this._context.viewModel.model.getLineMaxColumn(d))}let n;i.column===this._context.viewModel.model.getLineMaxColumn(i.lineNumber)?n=this._context.viewModel.model.validatePosition({lineNumber:i.lineNumber+1,column:1}):n=this._context.viewModel.model.validatePosition({lineNumber:i.lineNumber,column:i.column+1});const s=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i,e.afterColumnAffinity,!0),c=e.showInHiddenAreas||this._context.viewModel.coordinatesConverter.modelPositionIsVisible(n);return{isInHiddenArea:!c,afterViewLineNumber:s.lineNumber,heightInPx:c?this._heightInPixels(e):0,minWidthInPx:this._minWidthInPixels(e)}}changeViewZones(e){let i=!1;return this._context.viewModel.changeWhitespace(n=>{const s={addZone:c=>(i=!0,this._addZone(n,c)),removeZone:c=>{c&&(i=this._removeZone(n,c)||i)},layoutZone:c=>{c&&(i=this._layoutZone(n,c)||i)}};Gki(e,s),s.addZone=m9e,s.removeZone=m9e,s.layoutZone=m9e}),i}_addZone(e,i){const n=this._computeWhitespaceProps(i),c={whitespaceId:e.insertWhitespace(n.afterViewLineNumber,this._getZoneOrdinal(i),n.heightInPx,n.minWidthInPx),delegate:i,isInHiddenArea:n.isInHiddenArea,isVisible:!1,domNode:_u(i.domNode),marginDomNode:i.marginDomNode?_u(i.marginDomNode):null};return this._safeCallOnComputedHeight(c.delegate,n.heightInPx),c.domNode.setPosition("absolute"),c.domNode.domNode.style.width="100%",c.domNode.setDisplay("none"),c.domNode.setAttribute("monaco-view-zone",c.whitespaceId),this.domNode.appendChild(c.domNode),c.marginDomNode&&(c.marginDomNode.setPosition("absolute"),c.marginDomNode.domNode.style.width="100%",c.marginDomNode.setDisplay("none"),c.marginDomNode.setAttribute("monaco-view-zone",c.whitespaceId),this.marginDomNode.appendChild(c.marginDomNode)),this._zones[c.whitespaceId]=c,this.setShouldRender(),c.whitespaceId}_removeZone(e,i){if(this._zones.hasOwnProperty(i)){const n=this._zones[i];return delete this._zones[i],e.removeWhitespace(n.whitespaceId),n.domNode.removeAttribute("monaco-visible-view-zone"),n.domNode.removeAttribute("monaco-view-zone"),n.domNode.domNode.remove(),n.marginDomNode&&(n.marginDomNode.removeAttribute("monaco-visible-view-zone"),n.marginDomNode.removeAttribute("monaco-view-zone"),n.marginDomNode.domNode.remove()),this.setShouldRender(),!0}return!1}_layoutZone(e,i){if(this._zones.hasOwnProperty(i)){const n=this._zones[i],s=this._computeWhitespaceProps(n.delegate);return n.isInHiddenArea=s.isInHiddenArea,e.changeOneWhitespace(n.whitespaceId,s.afterViewLineNumber,s.heightInPx),this._safeCallOnComputedHeight(n.delegate,s.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){return this._zones.hasOwnProperty(e)?!!this._zones[e].delegate.suppressMouseDown:!1}_heightInPixels(e){return typeof e.heightInPx=="number"?e.heightInPx:typeof e.heightInLines=="number"?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return typeof e.minWidthInPx=="number"?e.minWidthInPx:0}_safeCallOnComputedHeight(e,i){if(typeof e.onComputedHeight=="function")try{e.onComputedHeight(i)}catch(n){Pa(n)}}_safeCallOnDomNodeTop(e,i){if(typeof e.onDomNodeTop=="function")try{e.onDomNodeTop(i)}catch(n){Pa(n)}}prepareRender(e){}render(e){const i=e.viewportData.whitespaceViewportData,n={};let s=!1;for(const d of i)this._zones[d.id].isInHiddenArea||(n[d.id]=d,s=!0);const c=Object.keys(this._zones);for(let d=0,f=c.length;d<f;d++){const m=c[d],v=this._zones[m];let x=0,w=0,I="none";n.hasOwnProperty(m)?(x=n[m].verticalOffset-e.bigNumbersDelta,w=n[m].height,I="block",v.isVisible||(v.domNode.setAttribute("monaco-visible-view-zone","true"),v.isVisible=!0),this._safeCallOnDomNodeTop(v.delegate,e.getScrolledTopFromAbsoluteTop(n[m].verticalOffset))):(v.isVisible&&(v.domNode.removeAttribute("monaco-visible-view-zone"),v.isVisible=!1),this._safeCallOnDomNodeTop(v.delegate,e.getScrolledTopFromAbsoluteTop(-1e6))),v.domNode.setTop(x),v.domNode.setHeight(w),v.domNode.setDisplay(I),v.marginDomNode&&(v.marginDomNode.setTop(x),v.marginDomNode.setHeight(w),v.marginDomNode.setDisplay(I))}s&&(this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}function Gki(l,e){try{return l(e)}catch(i){Pa(i)}}class Kki extends oW{constructor(e){super(),this._context=e,this._options=new WSt(this._context.configuration),this._selection=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const i=new WSt(this._context.configuration);return this._options.equals(i)?e.hasChanged(146):(this._options=i,!0)}onCursorStateChanged(e){return this._selection=e.selections,this._options.renderWhitespace==="selection"}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}prepareRender(e){if(this._options.renderWhitespace==="none"){this._renderResult=null;return}const i=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber-i+1,c=new Array(s);for(let f=0;f<s;f++)c[f]=!0;const d=this._context.viewModel.getMinimapLinesRenderingData(e.viewportData.startLineNumber,e.viewportData.endLineNumber,c);this._renderResult=[];for(let f=e.viewportData.startLineNumber;f<=e.viewportData.endLineNumber;f++){const m=f-e.viewportData.startLineNumber,v=d.data[m];let x=null;if(this._options.renderWhitespace==="selection"){const w=this._selection;for(const I of w){if(I.endLineNumber<f||I.startLineNumber>f)continue;const P=I.startLineNumber===f?I.startColumn:v.minColumn,O=I.endLineNumber===f?I.endColumn:v.maxColumn;P<O&&(x||(x=[]),x.push(new aIt(P-1,O-1)))}}this._renderResult[m]=this._applyRenderWhitespace(e,f,x,v)}}_applyRenderWhitespace(e,i,n,s){if(this._options.renderWhitespace==="selection"&&!n||this._options.renderWhitespace==="trailing"&&s.continuesWithWrappedLine)return"";const c=this._context.theme.getColor(cJe),d=this._options.renderWithSVG,f=s.content,m=this._options.stopRenderingLineAfter===-1?f.length:Math.min(this._options.stopRenderingLineAfter,f.length),v=s.continuesWithWrappedLine,x=s.minColumn-1,w=this._options.renderWhitespace==="boundary",I=this._options.renderWhitespace==="trailing",P=this._options.lineHeight,O=this._options.middotWidth,z=this._options.wsmiddotWidth,J=this._options.spaceWidth,Y=Math.abs(z-J),ae=Math.abs(O-J),me=Y<ae?11825:183,ye=this._options.canUseHalfwidthRightwardsArrow;let Ce="",Fe=!1,rt=Ty(f),ct;rt===-1?(Fe=!0,rt=m,ct=m):ct=ME(f);let Mt=0,Yt=n&&n[Mt],Bi=0;for(let $i=x;$i<m;$i++){const $t=f.charCodeAt($i);if(Yt&&$i>=Yt.endOffset&&(Mt++,Yt=n&&n[Mt]),$t!==9&&$t!==32||I&&!Fe&&$i<=ct)continue;if(w&&$i>=rt&&$i<=ct&&$t===32){const An=$i-1>=0?f.charCodeAt($i-1):0,qt=$i+1<m?f.charCodeAt($i+1):0;if(An!==32&&qt!==32)continue}if(w&&v&&$i===m-1){const An=$i-1>=0?f.charCodeAt($i-1):0;if($t===32&&An!==32&&An!==9)continue}if(n&&(!Yt||Yt.startOffset>$i||Yt.endOffset<=$i))continue;const Hi=e.visibleRangeForPosition(new pi(i,$i+1));Hi&&(d?(Bi=Math.max(Bi,Hi.left),$t===9?Ce+=this._renderArrow(P,J,Hi.left):Ce+=`<circle cx="${(Hi.left+J/2).toFixed(2)}" cy="${(P/2).toFixed(2)}" r="${(J/7).toFixed(2)}" />`):$t===9?Ce+=`<div class="mwh" style="left:${Hi.left}px;height:${P}px;">${ye?"→":"→"}</div>`:Ce+=`<div class="mwh" style="left:${Hi.left}px;height:${P}px;">${String.fromCharCode(me)}</div>`)}return d?(Bi=Math.round(Bi+J),`<svg style="bottom:0;position:absolute;width:${Bi}px;height:${P}px" viewBox="0 0 ${Bi} ${P}" xmlns="http://www.w3.org/2000/svg" fill="${c}">`+Ce+"</svg>"):Ce}_renderArrow(e,i,n){const s=i/7,c=i,d=e/2,f=n,m={x:0,y:s/2},v={x:100/125*c,y:m.y},x={x:v.x-.2*v.x,y:v.y+.2*v.x},w={x:x.x+.1*v.x,y:x.y+.1*v.x},I={x:w.x+.35*v.x,y:w.y-.35*v.x},P={x:I.x,y:-I.y},O={x:w.x,y:-w.y},z={x:x.x,y:-x.y},J={x:v.x,y:-v.y},Y={x:m.x,y:-m.y};return`<path d="M ${[m,v,x,w,I,P,O,z,J,Y].map(ye=>`${(f+ye.x).toFixed(2)} ${(d+ye.y).toFixed(2)}`).join(" L ")}" />`}render(e,i){if(!this._renderResult)return"";const n=i-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}class WSt{constructor(e){const i=e.options,n=i.get(50),s=i.get(38);s==="off"?(this.renderWhitespace="none",this.renderWithSVG=!1):s==="svg"?(this.renderWhitespace=i.get(100),this.renderWithSVG=!0):(this.renderWhitespace=i.get(100),this.renderWithSVG=!1),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(67),this.stopRenderingLineAfter=i.get(118)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}class Xki{constructor(e,i,n,s){this.selections=e,this.startLineNumber=i.startLineNumber|0,this.endLineNumber=i.endLineNumber|0,this.relativeVerticalOffset=i.relativeVerticalOffset,this.bigNumbersDelta=i.bigNumbersDelta|0,this.lineHeight=i.lineHeight|0,this.whitespaceViewportData=n,this._model=s,this.visibleRange=new nt(i.startLineNumber,this._model.getLineMinColumn(i.startLineNumber),i.endLineNumber,this._model.getLineMaxColumn(i.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewportViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class Qki{get type(){return this._theme.type}get value(){return this._theme}constructor(e){this._theme=e}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}class Zki{constructor(e,i,n){this.configuration=e,this.theme=new Qki(i),this.viewModel=n,this.viewLayout=n.viewLayout}addEventHandler(e){this.viewModel.addViewEventHandler(e)}removeEventHandler(e){this.viewModel.removeViewEventHandler(e)}}var Yki=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},e2i=function(l,e){return function(i,n){e(i,n,l)}};let pje=class extends Mse{constructor(e,i,n,s,c,d,f){super(),this._instantiationService=f,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new Us(1,1,1,1)],this._renderAnimationFrame=null;const m=new cki(i,s,c,e);this._context=new Zki(i,n,s),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(aje,this._context,m,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=_u(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=_u(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=_u(document.createElement("div")),JE.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new yki(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new fje(this._context,this._linesContent),this._viewZones=new Jki(this._context),this._viewParts.push(this._viewZones);const v=new Bki(this._context);this._viewParts.push(v);const x=new jki(this._context);this._viewParts.push(x);const w=new uki(this._context);this._viewParts.push(w),w.addDynamicOverlay(new pki(this._context)),w.addDynamicOverlay(new hje(this._context)),w.addDynamicOverlay(new kki(this._context)),w.addDynamicOverlay(new gki(this._context)),w.addDynamicOverlay(new Kki(this._context));const I=new dki(this._context);this._viewParts.push(I),I.addDynamicOverlay(new mki(this._context)),I.addDynamicOverlay(new Nki(this._context)),I.addDynamicOverlay(new Iki(this._context)),I.addDynamicOverlay(new wve(this._context)),this._glyphMarginWidgets=new Cki(this._context),this._viewParts.push(this._glyphMarginWidgets);const P=new xve(this._context);P.getDomNode().appendChild(this._viewZones.marginDomNode),P.getDomNode().appendChild(I.getDomNode()),P.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(P),this._contentWidgets=new hki(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new _je(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new Rki(this._context,this.domNode),this._viewParts.push(this._overlayWidgets);const O=new Hki(this._context);this._viewParts.push(O);const z=new fki(this._context);this._viewParts.push(z);const J=new Mki(this._context);if(this._viewParts.push(J),v){const Y=this._scrollbar.getOverviewRulerLayoutInfo();Y.parent.insertBefore(v.getDomNode(),Y.insertBefore)}this._linesContent.appendChild(w.getDomNode()),this._linesContent.appendChild(O.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(P.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(x.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(J.getDomNode()),this._overflowGuardContainer.appendChild(z.domNode),this.domNode.appendChild(this._overflowGuardContainer),d?(d.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode),d.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode)):(this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this.domNode.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode)),this._applyLayout(),this._pointerHandler=this._register(new Nxi(this._context,m,this._createPointerHandlerHelper()))}_computeGlyphMarginLanes(){const e=this._context.viewModel.model,i=this._context.viewModel.glyphLanes;let n=[],s=0;n=n.concat(e.getAllMarginDecorations().map(c=>{var f,m;const d=((f=c.options.glyphMargin)==null?void 0:f.position)??CT.Center;return s=Math.max(s,c.range.endLineNumber),{range:c.range,lane:d,persist:(m=c.options.glyphMargin)==null?void 0:m.persistLane}})),n=n.concat(this._glyphMarginWidgets.getWidgets().map(c=>{const d=e.validateRange(c.preference.range);return s=Math.max(s,d.endLineNumber),{range:d,lane:c.preference.lane}})),n.sort((c,d)=>nt.compareRangesUsingStarts(c.range,d.range)),i.reset(s);for(const c of n)i.push(c.lane,c.range,c.persist);return i}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],i=this._textAreaHandler.getLastRenderData();return new yxi(e,i)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,i)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,i)),visibleRangeForPosition:(e,i)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new pi(e,i))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){const i=this._context.configuration.options.get(146);this.domNode.setWidth(i.width),this.domNode.setHeight(i.height),this._overflowGuardContainer.setWidth(i.width),this._overflowGuardContainer.setHeight(i.height),this._linesContent.setWidth(16777216),this._linesContent.setHeight(16777216)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(143)+" "+JWe(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){var e;if(this._store.isDisposed)throw new tu;if(this._renderAnimationFrame===null){const i=this._createCoordinatedRendering();this._renderAnimationFrame=mje.INSTANCE.scheduleCoordinatedRendering({window:Eo((e=this.domNode)==null?void 0:e.domNode),prepareRenderText:()=>{if(this._store.isDisposed)throw new tu;try{return i.prepareRenderText()}finally{this._renderAnimationFrame=null}},renderText:()=>{if(this._store.isDisposed)throw new tu;return i.renderText()},prepareRender:(n,s)=>{if(this._store.isDisposed)throw new tu;return i.prepareRender(n,s)},render:(n,s)=>{if(this._store.isDisposed)throw new tu;return i.render(n,s)}})}}_flushAccumulatedAndRenderNow(){const e=this._createCoordinatedRendering();WM(()=>e.prepareRenderText());const i=WM(()=>e.renderText());if(i){const[n,s]=i;WM(()=>e.prepareRender(n,s)),WM(()=>e.render(n,s))}}_getViewPartsToRender(){const e=[];let i=0;for(const n of this._viewParts)n.shouldRender()&&(e[i++]=n);return e}_createCoordinatedRendering(){return{prepareRenderText:()=>{if(this._shouldRecomputeGlyphMarginLanes){this._shouldRecomputeGlyphMarginLanes=!1;const e=this._computeGlyphMarginLanes();this._context.configuration.setGlyphMarginDecorationLaneCount(e.requiredLanes)}BM.onRenderStart()},renderText:()=>{if(!this.domNode.domNode.isConnected)return null;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&e.length===0)return null;const i=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(i.startLineNumber,i.endLineNumber,i.centeredLineNumber);const n=new Xki(this._selections,i,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);return this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(n),this._viewLines.shouldRender()&&(this._viewLines.renderText(n),this._viewLines.onDidRender(),e=this._getViewPartsToRender()),[e,new dxi(this._context.viewLayout,n,this._viewLines)]},prepareRender:(e,i)=>{for(const n of e)n.prepareRender(i)},render:(e,i)=>{for(const n of e)n.render(i),n.onDidRender()}}}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,i){const n=this._context.viewModel.model.validatePosition({lineNumber:e,column:i}),s=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n);this._flushAccumulatedAndRenderNow();const c=this._viewLines.visibleRangeForPosition(new pi(s.lineNumber,s.column));return c?c.left:-1}getTargetAtClientPoint(e,i){const n=this._pointerHandler.getTargetAtClientPoint(e,i);return n?Rwe.convertViewToModelMouseTarget(n,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new Vki(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,i){if(i){this._viewLines.forceShouldRender();for(const n of this._viewParts)n.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._textAreaHandler.writeScreenReaderContent(e)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){var i,n,s,c;this._contentWidgets.setWidgetPosition(e.widget,((i=e.position)==null?void 0:i.position)??null,((n=e.position)==null?void 0:n.secondaryPosition)??null,((s=e.position)==null?void 0:s.preference)??null,((c=e.position)==null?void 0:c.positionAffinity)??null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){this._overlayWidgets.setWidgetPosition(e.widget,e.position)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){const i=e.position;this._glyphMarginWidgets.setWidgetPosition(e.widget,i)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};pje=Yki([e2i(6,ho)],pje);function WM(l){try{return l()}catch(e){return Pa(e),null}}const NCe=class NCe{constructor(){this._coordinatedRenderings=[],this._animationFrameRunners=new Map}scheduleCoordinatedRendering(e){return this._coordinatedRenderings.push(e),this._scheduleRender(e.window),{dispose:()=>{const i=this._coordinatedRenderings.indexOf(e);if(i!==-1&&(this._coordinatedRenderings.splice(i,1),this._coordinatedRenderings.length===0)){for(const[n,s]of this._animationFrameRunners)s.dispose();this._animationFrameRunners.clear()}}}}_scheduleRender(e){if(!this._animationFrameRunners.has(e)){const i=()=>{this._animationFrameRunners.delete(e),this._onRenderScheduled()};this._animationFrameRunners.set(e,aye(e,i,100))}}_onRenderScheduled(){const e=this._coordinatedRenderings.slice(0);this._coordinatedRenderings=[];for(const n of e)WM(()=>n.prepareRenderText());const i=[];for(let n=0,s=e.length;n<s;n++){const c=e[n];i[n]=WM(()=>c.renderText())}for(let n=0,s=e.length;n<s;n++){const c=e[n],d=i[n];if(!d)continue;const[f,m]=d;WM(()=>c.prepareRender(f,m))}for(let n=0,s=e.length;n<s;n++){const c=e[n],d=i[n];if(!d)continue;const[f,m]=d;WM(()=>c.render(f,m))}}};NCe.INSTANCE=new NCe;let mje=NCe;class $ie{constructor(e,i,n,s,c){this.injectionOffsets=e,this.injectionOptions=i,this.breakOffsets=n,this.breakOffsetsVisibleColumn=s,this.wrappedTextIndentLength=c}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){const i=e>0?this.breakOffsets[e-1]:0;let s=this.breakOffsets[e]-i;return e>0&&(s+=this.wrappedTextIndentLength),s}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,i){e>0&&(i=Math.max(0,i-this.wrappedTextIndentLength));let s=e===0?i:this.breakOffsets[e-1]+i;if(this.injectionOffsets!==null)for(let c=0;c<this.injectionOffsets.length&&s>this.injectionOffsets[c];c++)s<this.injectionOffsets[c]+this.injectionOptions[c].content.length?s=this.injectionOffsets[c]:s-=this.injectionOptions[c].content.length;return s}translateToOutputPosition(e,i=2){let n=e;if(this.injectionOffsets!==null)for(let s=0;s<this.injectionOffsets.length&&!(e<this.injectionOffsets[s]||i!==1&&e===this.injectionOffsets[s]);s++)n+=this.injectionOptions[s].content.length;return this.offsetInInputWithInjectionsToOutputPosition(n,i)}offsetInInputWithInjectionsToOutputPosition(e,i=2){let n=0,s=this.breakOffsets.length-1,c=0,d=0;for(;n<=s;){c=n+(s-n)/2|0;const m=this.breakOffsets[c];if(d=c>0?this.breakOffsets[c-1]:0,i===0)if(e<=d)s=c-1;else if(e>m)n=c+1;else break;else if(e<d)s=c-1;else if(e>=m)n=c+1;else break}let f=e-d;return c>0&&(f+=this.wrappedTextIndentLength),new k0e(c,f)}normalizeOutputPosition(e,i,n){if(this.injectionOffsets!==null){const s=this.outputPositionToOffsetInInputWithInjections(e,i),c=this.normalizeOffsetInInputWithInjectionsAroundInjections(s,n);if(c!==s)return this.offsetInInputWithInjectionsToOutputPosition(c,n)}if(n===0){if(e>0&&i===this.getMinOutputOffset(e))return new k0e(e-1,this.getMaxOutputOffset(e-1))}else if(n===1){const s=this.getOutputLineCount()-1;if(e<s&&i===this.getMaxOutputOffset(e))return new k0e(e+1,this.getMinOutputOffset(e+1))}return new k0e(e,i)}outputPositionToOffsetInInputWithInjections(e,i){return e>0&&(i=Math.max(0,i-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+i}normalizeOffsetInInputWithInjectionsAroundInjections(e,i){const n=this.getInjectedTextAtOffset(e);if(!n)return e;if(i===2){if(e===n.offsetInInputWithInjections+n.length&&VSt(this.injectionOptions[n.injectedTextIndex].cursorStops))return n.offsetInInputWithInjections+n.length;{let s=n.offsetInInputWithInjections;if(HSt(this.injectionOptions[n.injectedTextIndex].cursorStops))return s;let c=n.injectedTextIndex-1;for(;c>=0&&this.injectionOffsets[c]===this.injectionOffsets[n.injectedTextIndex]&&!(VSt(this.injectionOptions[c].cursorStops)||(s-=this.injectionOptions[c].content.length,HSt(this.injectionOptions[c].cursorStops)));)c--;return s}}else if(i===1||i===4){let s=n.offsetInInputWithInjections+n.length,c=n.injectedTextIndex;for(;c+1<this.injectionOffsets.length&&this.injectionOffsets[c+1]===this.injectionOffsets[c];)s+=this.injectionOptions[c+1].content.length,c++;return s}else if(i===0||i===3){let s=n.offsetInInputWithInjections,c=n.injectedTextIndex;for(;c-1>=0&&this.injectionOffsets[c-1]===this.injectionOffsets[c];)s-=this.injectionOptions[c-1].content.length,c--;return s}qSe()}getInjectedText(e,i){const n=this.outputPositionToOffsetInInputWithInjections(e,i),s=this.getInjectedTextAtOffset(n);return s?{options:this.injectionOptions[s.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const i=this.injectionOffsets,n=this.injectionOptions;if(i!==null){let s=0;for(let c=0;c<i.length;c++){const d=n[c].content.length,f=i[c]+s,m=i[c]+s+d;if(f>e)break;if(e<=m)return{injectedTextIndex:c,offsetInInputWithInjections:f,length:d};s+=d}}}}function VSt(l){return l==null?!0:l===_T.Right||l===_T.Both}function HSt(l){return l==null?!0:l===_T.Left||l===_T.Both}class k0e{constructor(e,i){this.outputLineIndex=e,this.outputOffset=i}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new pi(e+this.outputLineIndex,this.outputOffset+1)}}const g9e=v6("domLineBreaksComputer",{createHTML:l=>l});class iGe{static create(e){return new iGe(new WeakRef(e))}constructor(e){this.targetWindow=e}createLineBreaksComputer(e,i,n,s,c){const d=[],f=[];return{addRequest:(m,v,x)=>{d.push(m),f.push(v)},finalize:()=>t2i(NM(this.targetWindow.deref()),d,e,i,n,s,c,f)}}}function t2i(l,e,i,n,s,c,d,f){function m(Mt){const Yt=f[Mt];if(Yt){const Bi=UE.applyInjectedText(e[Mt],Yt),$i=Yt.map(Hi=>Hi.options),$t=Yt.map(Hi=>Hi.column-1);return new $ie($t,$i,[Bi.length],[],0)}else return null}if(s===-1){const Mt=[];for(let Yt=0,Bi=e.length;Yt<Bi;Yt++)Mt[Yt]=m(Yt);return Mt}const v=Math.round(s*i.typicalHalfwidthCharacterWidth),w=Math.round(n*(c===3?2:c===2?1:0)),I=Math.ceil(i.spaceWidth*w),P=document.createElement("div");a0(P,i);const O=new gJ(1e4),z=[],J=[],Y=[],ae=[],me=[];for(let Mt=0;Mt<e.length;Mt++){const Yt=UE.applyInjectedText(e[Mt],f[Mt]);let Bi=0,$i=0,$t=v;if(c!==0)if(Bi=Ty(Yt),Bi===-1)Bi=0;else{for(let ms=0;ms<Bi;ms++){const Wr=Yt.charCodeAt(ms)===9?n-$i%n:1;$i+=Wr}const qt=Math.ceil(i.spaceWidth*$i);qt+i.typicalFullwidthCharacterWidth>v?(Bi=0,$i=0):$t=v-qt}const Hi=Yt.substr(Bi),An=i2i(Hi,$i,n,$t,O,I);z[Mt]=Bi,J[Mt]=$i,Y[Mt]=Hi,ae[Mt]=An[0],me[Mt]=An[1]}const ye=O.build(),Ce=(g9e==null?void 0:g9e.createHTML(ye))??ye;P.innerHTML=Ce,P.style.position="absolute",P.style.top="10000",d==="keepAll"?(P.style.wordBreak="keep-all",P.style.overflowWrap="anywhere"):(P.style.wordBreak="inherit",P.style.overflowWrap="break-word"),l.document.body.appendChild(P);const Fe=document.createRange(),rt=Array.prototype.slice.call(P.children,0),ct=[];for(let Mt=0;Mt<e.length;Mt++){const Yt=rt[Mt],Bi=n2i(Fe,Yt,Y[Mt],ae[Mt]);if(Bi===null){ct[Mt]=m(Mt);continue}const $i=z[Mt],$t=J[Mt]+w,Hi=me[Mt],An=[];for(let Dr=0,Rr=Bi.length;Dr<Rr;Dr++)An[Dr]=Hi[Bi[Dr]];if($i!==0)for(let Dr=0,Rr=Bi.length;Dr<Rr;Dr++)Bi[Dr]+=$i;let qt,ms;const Wr=f[Mt];Wr?(qt=Wr.map(Dr=>Dr.options),ms=Wr.map(Dr=>Dr.column-1)):(qt=null,ms=null),ct[Mt]=new $ie(ms,qt,Bi,An,$t)}return P.remove(),ct}function i2i(l,e,i,n,s,c){if(c!==0){const I=String(c);s.appendString('<div style="text-indent: -'),s.appendString(I),s.appendString("px; padding-left: "),s.appendString(I),s.appendString("px; box-sizing: border-box; width:")}else s.appendString('<div style="width:');s.appendString(String(n)),s.appendString('px;">');const d=l.length;let f=e,m=0;const v=[],x=[];let w=0<d?l.charCodeAt(0):0;s.appendString("<span>");for(let I=0;I<d;I++){I!==0&&I%16384===0&&s.appendString("</span><span>"),v[I]=m,x[I]=f;const P=w;w=I+1<d?l.charCodeAt(I+1):0;let O=1,z=1;switch(P){case 9:O=i-f%i,z=O;for(let J=1;J<=O;J++)J<O?s.appendCharCode(160):s.appendASCIICharCode(32);break;case 32:w===32?s.appendCharCode(160):s.appendASCIICharCode(32);break;case 60:s.appendString("&lt;");break;case 62:s.appendString("&gt;");break;case 38:s.appendString("&amp;");break;case 0:s.appendString("&#00;");break;case 65279:case 8232:case 8233:case 133:s.appendCharCode(65533);break;default:bR(P)&&z++,P<32?s.appendCharCode(9216+P):s.appendCharCode(P)}m+=O,f+=z}return s.appendString("</span>"),v[l.length]=m,x[l.length]=f,s.appendString("</div>"),[v,x]}function n2i(l,e,i,n){if(i.length<=1)return null;const s=Array.prototype.slice.call(e.children,0),c=[];try{gje(l,s,n,0,null,i.length-1,null,c)}catch(d){return console.log(d),null}return c.length===0?null:(c.push(i.length),c)}function gje(l,e,i,n,s,c,d,f){if(n===c||(s=s||y9e(l,e,i[n],i[n+1]),d=d||y9e(l,e,i[c],i[c+1]),Math.abs(s[0].top-d[0].top)<=.1))return;if(n+1===c){f.push(c);return}const m=n+(c-n)/2|0,v=y9e(l,e,i[m],i[m+1]);gje(l,e,i,n,s,m,v,f),gje(l,e,i,m,v,c,d,f)}function y9e(l,e,i,n){return l.setStart(e[i/16384|0].firstChild,i%16384),l.setEnd(e[n/16384|0].firstChild,n%16384),l.getClientRects()}class r2i extends xi{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new Jqe),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,i,n){this._editor=e,this._instantiationService=n;for(const s of i){if(this._pending.has(s.id)){Pa(new Error(`Cannot have two contributions with the same id ${s.id}`));continue}this._pending.set(s.id,s)}this._instantiateSome(0),this._register(Yte(Eo(this._editor.getDomNode()),()=>{this._instantiateSome(1)})),this._register(Yte(Eo(this._editor.getDomNode()),()=>{this._instantiateSome(2)})),this._register(Yte(Eo(this._editor.getDomNode()),()=>{this._instantiateSome(3)},5e3))}saveViewState(){const e={};for(const[i,n]of this._instances)typeof n.saveViewState=="function"&&(e[i]=n.saveViewState());return e}restoreViewState(e){for(const[i,n]of this._instances)typeof n.restoreViewState=="function"&&n.restoreViewState(e[i])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){var e;return Yte(Eo((e=this._editor)==null?void 0:e.getDomNode()),()=>{this._instantiateSome(1)},50)}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;const i=this._findPendingContributionsByInstantiation(e);for(const n of i)this._instantiateById(n.id)}_findPendingContributionsByInstantiation(e){const i=[];for(const[,n]of this._pending)n.instantiation===e&&i.push(n);return i}_instantiateById(e){const i=this._pending.get(e);if(i){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const n=this._instantiationService.createInstance(i.ctor,this._editor);this._instances.set(i.id,n),typeof n.restoreViewState=="function"&&i.instantiation!==0&&console.warn(`Editor contribution '${i.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(n){Pa(n)}}}}class NIt{constructor(e,i,n,s,c,d,f){this.id=e,this.label=i,this.alias=n,this.metadata=s,this._precondition=c,this._run=d,this._contextKeyService=f}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}class nGe{static create(e){return new nGe(e.get(135),e.get(134))}constructor(e,i){this.classifier=new s2i(e,i)}createLineBreaksComputer(e,i,n,s,c){const d=[],f=[],m=[];return{addRequest:(v,x,w)=>{d.push(v),f.push(x),m.push(w)},finalize:()=>{const v=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,x=[];for(let w=0,I=d.length;w<I;w++){const P=f[w],O=m[w];O&&!O.injectionOptions&&!P?x[w]=o2i(this.classifier,O,d[w],i,n,v,s,c):x[w]=a2i(this.classifier,d[w],P,i,n,v,s,c)}return yje.length=0,vje.length=0,x}}}}class s2i extends yJ{constructor(e,i){super(0);for(let n=0;n<e.length;n++)this.set(e.charCodeAt(n),1);for(let n=0;n<i.length;n++)this.set(i.charCodeAt(n),2)}get(e){return e>=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let yje=[],vje=[];function o2i(l,e,i,n,s,c,d,f){if(s===-1)return null;const m=i.length;if(m<=1)return null;const v=f==="keepAll",x=e.breakOffsets,w=e.breakOffsetsVisibleColumn,I=LIt(i,n,s,c,d),P=s-I,O=yje,z=vje;let J=0,Y=0,ae=0,me=s;const ye=x.length;let Ce=0;if(Ce>=0){let Fe=Math.abs(w[Ce]-me);for(;Ce+1<ye;){const rt=Math.abs(w[Ce+1]-me);if(rt>=Fe)break;Fe=rt,Ce++}}for(;Ce<ye;){let Fe=Ce<0?0:x[Ce],rt=Ce<0?0:w[Ce];Y>Fe&&(Fe=Y,rt=ae);let ct=0,Mt=0,Yt=0,Bi=0;if(rt<=me){let $t=rt,Hi=Fe===0?0:i.charCodeAt(Fe-1),An=Fe===0?0:l.get(Hi),qt=!0;for(let ms=Fe;ms<m;ms++){const Wr=ms,Dr=i.charCodeAt(ms);let Rr,na;if(Pm(Dr)?(ms++,Rr=0,na=2):(Rr=l.get(Dr),na=Jie(Dr,$t,n,c)),Wr>Y&&bje(Hi,An,Dr,Rr,v)&&(ct=Wr,Mt=$t),$t+=na,$t>me){Wr>Y?(Yt=Wr,Bi=$t-na):(Yt=ms+1,Bi=$t),$t-Mt>P&&(ct=0),qt=!1;break}Hi=Dr,An=Rr}if(qt){J>0&&(O[J]=x[x.length-1],z[J]=w[x.length-1],J++);break}}if(ct===0){let $t=rt,Hi=i.charCodeAt(Fe),An=l.get(Hi),qt=!1;for(let ms=Fe-1;ms>=Y;ms--){const Wr=ms+1,Dr=i.charCodeAt(ms);if(Dr===9){qt=!0;break}let Rr,na;if(wB(Dr)?(ms--,Rr=0,na=2):(Rr=l.get(Dr),na=bR(Dr)?c:1),$t<=me){if(Yt===0&&(Yt=Wr,Bi=$t),$t<=me-P)break;if(bje(Dr,Rr,Hi,An,v)){ct=Wr,Mt=$t;break}}$t-=na,Hi=Dr,An=Rr}if(ct!==0){const ms=P-(Bi-Mt);if(ms<=n){const Wr=i.charCodeAt(Yt);let Dr;Pm(Wr)?Dr=2:Dr=Jie(Wr,Bi,n,c),ms-Dr<0&&(ct=0)}}if(qt){Ce--;continue}}if(ct===0&&(ct=Yt,Mt=Bi),ct<=Y){const $t=i.charCodeAt(Y);Pm($t)?(ct=Y+2,Mt=ae+2):(ct=Y+1,Mt=ae+Jie($t,ae,n,c))}for(Y=ct,O[J]=ct,ae=Mt,z[J]=Mt,J++,me=Mt+P;Ce<0||Ce<ye&&w[Ce]<Mt;)Ce++;let $i=Math.abs(w[Ce]-me);for(;Ce+1<ye;){const $t=Math.abs(w[Ce+1]-me);if($t>=$i)break;$i=$t,Ce++}}return J===0?null:(O.length=J,z.length=J,yje=e.breakOffsets,vje=e.breakOffsetsVisibleColumn,e.breakOffsets=O,e.breakOffsetsVisibleColumn=z,e.wrappedTextIndentLength=I,e)}function a2i(l,e,i,n,s,c,d,f){const m=UE.applyInjectedText(e,i);let v,x;if(i&&i.length>0?(v=i.map(Mt=>Mt.options),x=i.map(Mt=>Mt.column-1)):(v=null,x=null),s===-1)return v?new $ie(x,v,[m.length],[],0):null;const w=m.length;if(w<=1)return v?new $ie(x,v,[m.length],[],0):null;const I=f==="keepAll",P=LIt(m,n,s,c,d),O=s-P,z=[],J=[];let Y=0,ae=0,me=0,ye=s,Ce=m.charCodeAt(0),Fe=l.get(Ce),rt=Jie(Ce,0,n,c),ct=1;Pm(Ce)&&(rt+=1,Ce=m.charCodeAt(1),Fe=l.get(Ce),ct++);for(let Mt=ct;Mt<w;Mt++){const Yt=Mt,Bi=m.charCodeAt(Mt);let $i,$t;Pm(Bi)?(Mt++,$i=0,$t=2):($i=l.get(Bi),$t=Jie(Bi,rt,n,c)),bje(Ce,Fe,Bi,$i,I)&&(ae=Yt,me=rt),rt+=$t,rt>ye&&((ae===0||rt-me>O)&&(ae=Yt,me=rt-$t),z[Y]=ae,J[Y]=me,Y++,ye=me+O,ae=0),Ce=Bi,Fe=$i}return Y===0&&(!i||i.length===0)?null:(z[Y]=w,J[Y]=rt,new $ie(x,v,z,J,P))}function Jie(l,e,i,n){return l===9?i-e%i:bR(l)||l<32?n:1}function jSt(l,e){return e-l%e}function bje(l,e,i,n,s){return i!==32&&(e===2&&n!==2||e!==1&&n===1||!s&&e===3&&n!==2||!s&&n===3&&e!==1)}function LIt(l,e,i,n,s){let c=0;if(s!==0){const d=Ty(l);if(d!==-1){for(let m=0;m<d;m++){const v=l.charCodeAt(m)===9?jSt(c,e):1;c+=v}const f=s===3?2:s===2?1:0;for(let m=0;m<f;m++){const v=jSt(c,e);c+=v}c+n>i&&(c=0)}}return c}class Nve{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new i0(new nt(1,1,1,1),0,0,new pi(1,1),0),new i0(new nt(1,1,1,1),0,0,new pi(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new Rl(this.modelState,this.viewState)}readSelectionFromMarkers(e){const i=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!i.isEmpty()?Us.fromRange(i.collapseToEnd(),this.modelState.selection.getDirection()):Us.fromRange(i,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,i,n){this._setState(e,i,n)}static _validatePositionWithCache(e,i,n,s){return i.equals(n)?s:e.normalizePosition(i,2)}static _validateViewState(e,i){const n=i.position,s=i.selectionStart.getStartPosition(),c=i.selectionStart.getEndPosition(),d=e.normalizePosition(n,2),f=this._validatePositionWithCache(e,s,n,d),m=this._validatePositionWithCache(e,c,s,f);return n.equals(d)&&s.equals(f)&&c.equals(m)?i:new i0(nt.fromPositions(f,m),i.selectionStartKind,i.selectionStartLeftoverVisibleColumns+s.column-f.column,d,i.leftoverVisibleColumns+n.column-d.column)}_setState(e,i,n){if(n&&(n=Nve._validateViewState(e.viewModel,n)),i){const s=e.model.validateRange(i.selectionStart),c=i.selectionStart.equalsRange(s)?i.selectionStartLeftoverVisibleColumns:0,d=e.model.validatePosition(i.position),f=i.position.equals(d)?i.leftoverVisibleColumns:0;i=new i0(s,i.selectionStartKind,c,d,f)}else{if(!n)return;const s=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(n.selectionStart)),c=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(n.position));i=new i0(s,n.selectionStartKind,n.selectionStartLeftoverVisibleColumns,c,n.leftoverVisibleColumns)}if(n){const s=e.coordinatesConverter.validateViewRange(n.selectionStart,i.selectionStart),c=e.coordinatesConverter.validateViewPosition(n.position,i.position);n=new i0(s,i.selectionStartKind,i.selectionStartLeftoverVisibleColumns,c,i.leftoverVisibleColumns)}else{const s=e.coordinatesConverter.convertModelPositionToViewPosition(new pi(i.selectionStart.startLineNumber,i.selectionStart.startColumn)),c=e.coordinatesConverter.convertModelPositionToViewPosition(new pi(i.selectionStart.endLineNumber,i.selectionStart.endColumn)),d=new nt(s.lineNumber,s.column,c.lineNumber,c.column),f=e.coordinatesConverter.convertModelPositionToViewPosition(i.position);n=new i0(d,i.selectionStartKind,i.selectionStartLeftoverVisibleColumns,f,i.leftoverVisibleColumns)}this.modelState=i,this.viewState=n,this._updateTrackedRange(e)}}class zSt{constructor(e){this.context=e,this.cursors=[new Nve(e)],this.lastAddedCursorIndex=0}dispose(){for(const e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(const e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(const e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(const e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(e=>e.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(e=>e.asCursorState())}getViewPositions(){return this.cursors.map(e=>e.viewState.position)}getTopMostViewPosition(){return bhi(this.cursors,yv(e=>e.viewState.position,pi.compare)).viewState.position}getBottomMostViewPosition(){return vhi(this.cursors,yv(e=>e.viewState.position,pi.compare)).viewState.position}getSelections(){return this.cursors.map(e=>e.modelState.selection)}getViewSelections(){return this.cursors.map(e=>e.viewState.selection)}setSelections(e){this.setStates(Rl.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){e!==null&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const i=this.cursors.length-1,n=e.length;if(i<n){const s=n-i;for(let c=0;c<s;c++)this._addSecondaryCursor()}else if(i>n){const s=i-n;for(let c=0;c<s;c++)this._removeSecondaryCursor(this.cursors.length-2)}for(let s=0;s<n;s++)this.cursors[s+1].setState(this.context,e[s].modelState,e[s].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.cursors.push(new Nve(this.context)),this.lastAddedCursorIndex=this.cursors.length-1}getLastAddedCursorIndex(){return this.cursors.length===1||this.lastAddedCursorIndex===0?0:this.lastAddedCursorIndex}_removeSecondaryCursor(e){this.lastAddedCursorIndex>=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(this.cursors.length===1)return;const e=this.cursors.slice(0),i=[];for(let n=0,s=e.length;n<s;n++)i.push({index:n,selection:e[n].modelState.selection});i.sort(yv(n=>n.selection,nt.compareRangesUsingStarts));for(let n=0;n<i.length-1;n++){const s=i[n],c=i[n+1],d=s.selection,f=c.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let m;if(f.isEmpty()||d.isEmpty()?m=f.getStartPosition().isBeforeOrEqual(d.getEndPosition()):m=f.getStartPosition().isBefore(d.getEndPosition()),m){const v=s.index<c.index?n:n+1,x=s.index<c.index?n+1:n,w=i[x].index,I=i[v].index,P=i[x].selection,O=i[v].selection;if(!P.equalsSelection(O)){const z=P.plusRange(O),J=P.selectionStartLineNumber===P.startLineNumber&&P.selectionStartColumn===P.startColumn,Y=O.selectionStartLineNumber===O.startLineNumber&&O.selectionStartColumn===O.startColumn;let ae;w===this.lastAddedCursorIndex?(ae=J,this.lastAddedCursorIndex=I):ae=Y;let me;ae?me=new Us(z.startLineNumber,z.startColumn,z.endLineNumber,z.endColumn):me=new Us(z.endLineNumber,z.endColumn,z.startLineNumber,z.startColumn),i[v].selection=me;const ye=Rl.fromModelSelection(me);e[I].setState(this.context,ye.modelState,ye.viewState)}for(const z of i)z.index>w&&z.index--;e.splice(w,1),i.splice(x,1),this._removeSecondaryCursor(w-1),n--}}}}class USt{constructor(e,i,n,s){this._cursorContextBrand=void 0,this.model=e,this.viewModel=i,this.coordinatesConverter=n,this.cursorConfig=s}}class c2i{constructor(){this.type=0}}class l2i{constructor(){this.type=1}}class u2i{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class d2i{constructor(e,i,n){this.selections=e,this.modelSelections=i,this.reason=n,this.type=3}}class vF{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin,this.affectsLineNumber=e.affectsLineNumber):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0,this.affectsLineNumber=!0)}}class T0e{constructor(){this.type=5}}class f2i{constructor(e){this.type=6,this.isFocused=e}}class h2i{constructor(){this.type=7}}class D0e{constructor(){this.type=8}}class PIt{constructor(e,i){this.fromLineNumber=e,this.count=i,this.type=9}}class Cje{constructor(e,i){this.type=10,this.fromLineNumber=e,this.toLineNumber=i}}class Sje{constructor(e,i){this.type=11,this.fromLineNumber=e,this.toLineNumber=i}}class Gie{constructor(e,i,n,s,c,d,f){this.source=e,this.minimalReveal=i,this.range=n,this.selections=s,this.verticalType=c,this.revealHorizontal=d,this.scrollType=f,this.type=12}}class _2i{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class p2i{constructor(e){this.theme=e,this.type=14}}class m2i{constructor(e){this.type=15,this.ranges=e}}class g2i{constructor(){this.type=16}}let y2i=class{constructor(){this.type=17}};class v2i extends xi{constructor(){super(),this._onEvent=this._register(new gi),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let i=0,n=this._outgoingEvents.length;i<n;i++){const s=this._outgoingEvents[i].kind===e.kind?this._outgoingEvents[i].attemptToMerge(e):null;if(s){this._outgoingEvents[i]=s;return}}this._outgoingEvents.push(e)}_emitOutgoingEvents(){for(;this._outgoingEvents.length>0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let i=0,n=this._eventHandlers.length;i<n;i++)this._eventHandlers[i]===e&&console.warn("Detected duplicate listener in ViewEventDispatcher",e);this._eventHandlers.push(e)}removeViewEventHandler(e){for(let i=0;i<this._eventHandlers.length;i++)if(this._eventHandlers[i]===e){this._eventHandlers.splice(i,1);break}}beginEmitViewEvents(){return this._collectorCnt++,this._collectorCnt===1&&(this._collector=new b2i),this._collector}endEmitViewEvents(){if(this._collectorCnt--,this._collectorCnt===0){const e=this._collector.outgoingEvents,i=this._collector.viewEvents;this._collector=null;for(const n of e)this._addOutgoingEvent(n);i.length>0&&this._emitMany(i)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const i=this._eventHandlers.slice(0);for(const n of i)n.handleEvents(e)}}}class b2i{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class rGe{constructor(e,i,n,s){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=i,this.contentWidth=n,this.contentHeight=s,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new rGe(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class sGe{constructor(e,i){this.kind=1,this.oldHasFocus=e,this.hasFocus=i}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new sGe(this.oldHasFocus,e.hasFocus)}}class oGe{constructor(e,i,n,s,c,d,f,m){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=i,this._oldScrollHeight=n,this._oldScrollTop=s,this.scrollWidth=c,this.scrollLeft=d,this.scrollHeight=f,this.scrollTop=m,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(e){return e.kind!==this.kind?null:new oGe(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class C2i{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class S2i{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class Lve{constructor(e,i,n,s,c,d,f){this.kind=6,this.oldSelections=e,this.selections=i,this.oldModelVersionId=n,this.modelVersionId=s,this.source=c,this.reason=d,this.reachedMaxCursorCount=f}static _selectionsAreEqual(e,i){if(!e&&!i)return!0;if(!e||!i)return!1;const n=e.length,s=i.length;if(n!==s)return!1;for(let c=0;c<n;c++)if(!e[c].equalsSelection(i[c]))return!1;return!0}isNoOp(){return Lve._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}attemptToMerge(e){return e.kind!==this.kind?null:new Lve(this.oldSelections,e.selections,this.oldModelVersionId,e.modelVersionId,e.source,e.reason,this.reachedMaxCursorCount||e.reachedMaxCursorCount)}}class w2i{constructor(){this.kind=5}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class x2i{constructor(e){this.event=e,this.kind=7}isNoOp(){return!1}attemptToMerge(e){return null}}class k2i{constructor(e){this.event=e,this.kind=8}isNoOp(){return!1}attemptToMerge(e){return null}}class T2i{constructor(e){this.event=e,this.kind=9}isNoOp(){return!1}attemptToMerge(e){return null}}class D2i{constructor(e){this.event=e,this.kind=10}isNoOp(){return!1}attemptToMerge(e){return null}}class E2i{constructor(e){this.event=e,this.kind=11}isNoOp(){return!1}attemptToMerge(e){return null}}class I2i{constructor(e){this.event=e,this.kind=12}isNoOp(){return!1}attemptToMerge(e){return null}}class N2i extends xi{constructor(e,i,n,s){super(),this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=i,this._coordinatesConverter=n,this.context=new USt(this._model,this._viewModel,this._coordinatesConverter,s),this._cursors=new zSt(this.context),this._hasFocus=!1,this._isHandling=!1,this._compositionState=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=vd(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new USt(this._model,this._viewModel,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){const e=this._cursors.getSelections();for(let i=0;i<this._autoClosedActions.length;i++){const n=this._autoClosedActions[i];n.isValid(e)||(n.dispose(),this._autoClosedActions.splice(i,1),i--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(e,i,n,s){let c=!1;const d=this.context.cursorConfig.multiCursorLimit;s!==null&&s.length>d&&(s=s.slice(0,d),c=!0);const f=Kie.from(this._model,this);return this._cursors.setStates(s),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,i,n,f,c)}setCursorColumnSelectData(e){this._columnSelectData=e}revealAll(e,i,n,s,c,d){const f=this._cursors.getViewPositions();let m=null,v=null;f.length>1?v=this._cursors.getViewSelections():m=nt.fromPositions(f[0],f[0]),e.emitViewEvent(new Gie(i,n,m,v,s,c,d))}revealPrimary(e,i,n,s,c,d){const m=[this._cursors.getPrimaryCursor().viewState.selection];e.emitViewEvent(new Gie(i,n,null,m,s,c,d))}saveState(){const e=[],i=this._cursors.getSelections();for(let n=0,s=i.length;n<s;n++){const c=i[n];e.push({inSelectionMode:!c.isEmpty(),selectionStart:{lineNumber:c.selectionStartLineNumber,column:c.selectionStartColumn},position:{lineNumber:c.positionLineNumber,column:c.positionColumn}})}return e}restoreState(e,i){const n=[];for(let s=0,c=i.length;s<c;s++){const d=i[s];let f=1,m=1;d.position&&d.position.lineNumber&&(f=d.position.lineNumber),d.position&&d.position.column&&(m=d.position.column);let v=f,x=m;d.selectionStart&&d.selectionStart.lineNumber&&(v=d.selectionStart.lineNumber),d.selectionStart&&d.selectionStart.column&&(x=d.selectionStart.column),n.push({selectionStartLineNumber:v,selectionStartColumn:x,positionLineNumber:f,positionColumn:m})}this.setStates(e,"restoreState",0,Rl.fromModelSelections(n)),this.revealAll(e,"restoreState",!1,0,!0,1)}onModelContentChanged(e,i){if(i instanceof _Et){if(this._isHandling)return;this._isHandling=!0;try{this.setStates(e,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}else{const n=i.rawContentChangedEvent;if(this._knownModelVersionId=n.versionId,this._isHandling)return;const s=n.containsEvent(1);if(this._prevEditOperationType=0,s)this._cursors.dispose(),this._cursors=new zSt(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,"model",1,null,!1);else if(this._hasFocus&&n.resultingSelection&&n.resultingSelection.length>0){const c=Rl.fromModelSelections(n.resultingSelection);this.setStates(e,"modelChange",n.isUndoing?5:n.isRedoing?6:2,c)&&this.revealAll(e,"modelChange",!1,0,!0,0)}else{const c=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,Rl.fromModelSelections(c))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),i=e.viewState.selectionStart.getStartPosition(),n=e.viewState.position;return{isReal:!1,fromViewLineNumber:i.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,i),toViewLineNumber:n.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,n)}}getSelections(){return this._cursors.getSelections()}setSelections(e,i,n,s){this.setStates(e,i,s,Rl.fromModelSelections(n))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,i){const n=[],s=[];for(let f=0,m=e.length;f<m;f++)n.push({range:e[f],options:{description:"auto-closed-character",inlineClassName:"auto-closed-character",stickiness:1}}),s.push({range:i[f],options:{description:"auto-closed-enclosing",stickiness:1}});const c=this._model.deltaDecorations([],n),d=this._model.deltaDecorations([],s);this._autoClosedActions.push(new qSt(this._model,c,d))}_executeEditOperation(e){if(!e)return;e.shouldPushStackElementBefore&&this._model.pushStackElement();const i=L2i.executeCommands(this._model,this._cursors.getSelections(),e.commands);if(i){this._interpretCommandResult(i);const n=[],s=[];for(let c=0;c<e.commands.length;c++){const d=e.commands[c];d instanceof ZJe&&d.enclosingRange&&d.closeCharacterRange&&(n.push(d.closeCharacterRange),s.push(d.enclosingRange))}n.length>0&&this._pushAutoClosedAction(n,s),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){(!e||e.length===0)&&(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,i,n,s,c){const d=Kie.from(this._model,this);if(d.equals(s))return!1;const f=this._cursors.getSelections(),m=this._cursors.getViewSelections();if(e.emitViewEvent(new d2i(m,f,n)),!s||s.cursorState.length!==d.cursorState.length||d.cursorState.some((v,x)=>!v.modelState.equals(s.cursorState[x].modelState))){const v=s?s.cursorState.map(w=>w.modelState.selection):null,x=s?s.modelVersionId:0;e.emitOutgoingEvent(new Lve(v,f,x,d.modelVersionId,i||"keyboard",n,c))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const i=[];for(let n=0,s=e.length;n<s;n++){const c=e[n];if(!c.text||c.text.indexOf(`
+`)>=0)return null;const d=c.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!d)return null;const f=d[1],m=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(f);if(!m||m.length!==1)return null;const v=m[0].open,x=c.text.length-d[2].length-1,w=c.text.lastIndexOf(v,x-1);if(w===-1)return null;i.push([w,x])}return i}executeEdits(e,i,n,s){let c=null;i==="snippet"&&(c=this._findAutoClosingPairs(n)),c&&(n[0]._isTracked=!0);const d=[],f=[],m=this._model.pushEditOperations(this.getSelections(),n,v=>{if(c)for(let w=0,I=c.length;w<I;w++){const[P,O]=c[w],z=v[w],J=z.range.startLineNumber,Y=z.range.startColumn-1+P,ae=z.range.startColumn-1+O;d.push(new nt(J,ae+1,J,ae+2)),f.push(new nt(J,Y+1,J,ae+2))}const x=s(v);return x&&(this._isHandling=!0),x});m&&(this._isHandling=!1,this.setSelections(e,i,m,0)),d.length>0&&this._pushAutoClosedAction(d,f)}_executeEdit(e,i,n,s=0){if(this.context.cursorConfig.readOnly)return;const c=Kie.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(d){Pa(d)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(i,n,s,c,!1)&&this.revealAll(i,n,!1,0,!0,0)}getAutoClosedCharacters(){return qSt.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new Xie(this._model,this.getSelections())}endComposition(e,i){const n=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{i==="keyboard"&&this._executeEditOperation(DM.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,n,this.getSelections(),this.getAutoClosedCharacters()))},e,i)}type(e,i,n){this._executeEdit(()=>{if(n==="keyboard"){const s=i.length;let c=0;for(;c<s;){const d=i$e(i,c),f=i.substr(c,d);this._executeEditOperation(DM.typeWithInterceptors(!!this._compositionState,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),f)),c+=d}}else this._executeEditOperation(DM.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),i))},e,n)}compositionType(e,i,n,s,c,d){if(i.length===0&&n===0&&s===0){if(c!==0){const f=this.getSelections().map(m=>{const v=m.getPosition();return new Us(v.lineNumber,v.column+c,v.lineNumber,v.column+c)});this.setSelections(e,d,f,0)}return}this._executeEdit(()=>{this._executeEditOperation(DM.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),i,n,s,c))},e,d)}paste(e,i,n,s,c){this._executeEdit(()=>{this._executeEditOperation(DM.paste(this.context.cursorConfig,this._model,this.getSelections(),i,n,s||[]))},e,c,4)}cut(e,i){this._executeEdit(()=>{this._executeEditOperation(RB.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,i)}executeCommand(e,i,n){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new Lb(0,[i],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}executeCommands(e,i,n){this._executeEdit(()=>{this._executeEditOperation(new Lb(0,i,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}}class Kie{static from(e,i){return new Kie(e.getVersionId(),i.getCursorStates())}constructor(e,i){this.modelVersionId=e,this.cursorState=i}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let i=0,n=this.cursorState.length;i<n;i++)if(!this.cursorState[i].equals(e.cursorState[i]))return!1;return!0}}class qSt{static getAllAutoClosedCharacters(e){let i=[];for(const n of e)i=i.concat(n.getAutoClosedCharactersRanges());return i}constructor(e,i,n){this._model=e,this._autoClosedCharactersDecorations=i,this._autoClosedEnclosingDecorations=n}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){const e=[];for(let i=0;i<this._autoClosedCharactersDecorations.length;i++){const n=this._model.getDecorationRange(this._autoClosedCharactersDecorations[i]);n&&e.push(n)}return e}isValid(e){const i=[];for(let n=0;n<this._autoClosedEnclosingDecorations.length;n++){const s=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[n]);if(s&&(i.push(s),s.startLineNumber!==s.endLineNumber))return!1}i.sort(nt.compareRangesUsingStarts),e.sort(nt.compareRangesUsingStarts);for(let n=0;n<e.length;n++)if(n>=i.length||!i[n].strictContainsRange(e[n]))return!1;return!0}}class L2i{static executeCommands(e,i,n){const s={model:e,selectionsBefore:i,trackedRanges:[],trackedRangesDirection:[]},c=this._innerExecuteCommands(s,n);for(let d=0,f=s.trackedRanges.length;d<f;d++)s.model._setTrackedRange(s.trackedRanges[d],null,0);return c}static _innerExecuteCommands(e,i){if(this._arrayIsEmpty(i))return null;const n=this._getEditOperations(e,i);if(n.operations.length===0)return null;const s=n.operations,c=this._getLoserCursorMap(s);if(c.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;const d=[];for(let v=0,x=s.length;v<x;v++)c.hasOwnProperty(s[v].identifier.major.toString())||d.push(s[v]);n.hadTrackedEditOperation&&d.length>0&&(d[0]._isTracked=!0);let f=e.model.pushEditOperations(e.selectionsBefore,d,v=>{const x=[];for(let P=0;P<e.selectionsBefore.length;P++)x[P]=[];for(const P of v)P.identifier&&x[P.identifier.major].push(P);const w=(P,O)=>P.identifier.minor-O.identifier.minor,I=[];for(let P=0;P<e.selectionsBefore.length;P++)x[P].length>0?(x[P].sort(w),I[P]=i[P].computeCursorState(e.model,{getInverseEditOperations:()=>x[P],getTrackedSelection:O=>{const z=parseInt(O,10),J=e.model._getTrackedRange(e.trackedRanges[z]);return e.trackedRangesDirection[z]===0?new Us(J.startLineNumber,J.startColumn,J.endLineNumber,J.endColumn):new Us(J.endLineNumber,J.endColumn,J.startLineNumber,J.startColumn)}})):I[P]=e.selectionsBefore[P];return I});f||(f=e.selectionsBefore);const m=[];for(const v in c)c.hasOwnProperty(v)&&m.push(parseInt(v,10));m.sort((v,x)=>x-v);for(const v of m)f.splice(v,1);return f}static _arrayIsEmpty(e){for(let i=0,n=e.length;i<n;i++)if(e[i])return!1;return!0}static _getEditOperations(e,i){let n=[],s=!1;for(let c=0,d=i.length;c<d;c++){const f=i[c];if(f){const m=this._getEditOperationsFromCommand(e,c,f);n=n.concat(m.operations),s=s||m.hadTrackedEditOperation}}return{operations:n,hadTrackedEditOperation:s}}static _getEditOperationsFromCommand(e,i,n){const s=[];let c=0;const d=(w,I,P=!1)=>{nt.isEmpty(w)&&I===""||s.push({identifier:{major:i,minor:c++},range:w,text:I,forceMoveMarkers:P,isAutoWhitespaceEdit:n.insertsAutoWhitespace})};let f=!1;const x={addEditOperation:d,addTrackedEditOperation:(w,I,P)=>{f=!0,d(w,I,P)},trackSelection:(w,I)=>{const P=Us.liftSelection(w);let O;if(P.isEmpty())if(typeof I=="boolean")I?O=2:O=3;else{const Y=e.model.getLineMaxColumn(P.startLineNumber);P.startColumn===Y?O=2:O=3}else O=1;const z=e.trackedRanges.length,J=e.model._setTrackedRange(null,P,O);return e.trackedRanges[z]=J,e.trackedRangesDirection[z]=P.getDirection(),z.toString()}};try{n.getEditOperations(e.model,x)}catch(w){return Pa(w),{operations:[],hadTrackedEditOperation:!1}}return{operations:s,hadTrackedEditOperation:f}}static _getLoserCursorMap(e){e=e.slice(0),e.sort((n,s)=>-nt.compareRangesUsingEnds(n.range,s.range));const i={};for(let n=1;n<e.length;n++){const s=e[n-1],c=e[n];if(nt.getStartPosition(s.range).isBefore(nt.getEndPosition(c.range))){let d;s.identifier.major>c.identifier.major?d=s.identifier.major:d=c.identifier.major,i[d.toString()]=!0;for(let f=0;f<e.length;f++)e[f].identifier.major===d&&(e.splice(f,1),f<n&&n--,f--);n>0&&n--}}return i}}class P2i{constructor(e,i,n){this.text=e,this.startSelection=i,this.endSelection=n}}class Xie{static _capture(e,i){const n=[];for(const s of i){if(s.startLineNumber!==s.endLineNumber)return null;n.push(new P2i(e.getLineContent(s.startLineNumber),s.startColumn-1,s.endColumn-1))}return n}constructor(e,i){this._original=Xie._capture(e,i)}deduceOutcome(e,i){if(!this._original)return null;const n=Xie._capture(e,i);if(!n||this._original.length!==n.length)return null;const s=[];for(let c=0,d=this._original.length;c<d;c++)s.push(Xie._deduceOutcome(this._original[c],n[c]));return s}static _deduceOutcome(e,i){const n=Math.min(e.startSelection,i.startSelection,vR(e.text,i.text)),s=Math.min(e.text.length-e.endSelection,i.text.length-i.endSelection,iye(e.text,i.text)),c=e.text.substring(n,e.text.length-s),d=i.text.substring(n,i.text.length-s);return new oki(c,e.startSelection-n,e.endSelection-n,d,i.startSelection-n,i.endSelection-n)}}class A2i{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const i=this._inserts,n=this._changes,s=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(i,n,s)}}class O2i{constructor(e,i,n,s,c){this.id=e,this.afterLineNumber=i,this.ordinal=n,this.height=s,this.minWidth=c,this.prefixSum=0}}var ZM;let M2i=(ZM=class{constructor(e,i,n,s){this._instanceId=r2t(++ZM.INSTANCE_COUNT),this._pendingChanges=new A2i,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=i,this._paddingTop=n,this._paddingBottom=s}static findInsertionIndex(e,i,n){let s=0,c=e.length;for(;s<c;){const d=s+c>>>1;i===e[d].afterLineNumber?n<e[d].ordinal?c=d:s=d+1:i<e[d].afterLineNumber?c=d:s=d+1}return s}setLineHeight(e){this._checkPendingChanges(),this._lineHeight=e}setPadding(e,i){this._paddingTop=e,this._paddingBottom=i}onFlushed(e){this._checkPendingChanges(),this._lineCount=e}changeWhitespace(e){let i=!1;try{e({insertWhitespace:(s,c,d,f)=>{i=!0,s=s|0,c=c|0,d=d|0,f=f|0;const m=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new O2i(m,s,c,d,f)),m},changeOneWhitespace:(s,c,d)=>{i=!0,c=c|0,d=d|0,this._pendingChanges.change({id:s,newAfterLineNumber:c,newHeight:d})},removeWhitespace:s=>{i=!0,this._pendingChanges.remove({id:s})}})}finally{this._pendingChanges.commit(this)}return i}_commitPendingChanges(e,i,n){if((e.length>0||n.length>0)&&(this._minWidth=-1),e.length+i.length+n.length<=1){for(const m of e)this._insertWhitespace(m);for(const m of i)this._changeOneWhitespace(m.id,m.newAfterLineNumber,m.newHeight);for(const m of n){const v=this._findWhitespaceIndex(m.id);v!==-1&&this._removeWhitespace(v)}return}const s=new Set;for(const m of n)s.add(m.id);const c=new Map;for(const m of i)c.set(m.id,m);const d=m=>{const v=[];for(const x of m)if(!s.has(x.id)){if(c.has(x.id)){const w=c.get(x.id);x.afterLineNumber=w.newAfterLineNumber,x.height=w.newHeight}v.push(x)}return v},f=d(this._arr).concat(d(e));f.sort((m,v)=>m.afterLineNumber===v.afterLineNumber?m.ordinal-v.ordinal:m.afterLineNumber-v.afterLineNumber),this._arr=f,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const i=ZM.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(i,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,i-1)}_findWhitespaceIndex(e){const i=this._arr;for(let n=0,s=i.length;n<s;n++)if(i[n].id===e)return n;return-1}_changeOneWhitespace(e,i,n){const s=this._findWhitespaceIndex(e);if(s!==-1&&(this._arr[s].height!==n&&(this._arr[s].height=n,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,s-1)),this._arr[s].afterLineNumber!==i)){const c=this._arr[s];this._removeWhitespace(s),c.afterLineNumber=i,this._insertWhitespace(c)}}_removeWhitespace(e){this._arr.splice(e,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,e-1)}onLinesDeleted(e,i){this._checkPendingChanges(),e=e|0,i=i|0,this._lineCount-=i-e+1;for(let n=0,s=this._arr.length;n<s;n++){const c=this._arr[n].afterLineNumber;e<=c&&c<=i?this._arr[n].afterLineNumber=e-1:c>i&&(this._arr[n].afterLineNumber-=i-e+1)}}onLinesInserted(e,i){this._checkPendingChanges(),e=e|0,i=i|0,this._lineCount+=i-e+1;for(let n=0,s=this._arr.length;n<s;n++){const c=this._arr[n].afterLineNumber;e<=c&&(this._arr[n].afterLineNumber+=i-e+1)}}getWhitespacesTotalHeight(){return this._checkPendingChanges(),this._arr.length===0?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(e){this._checkPendingChanges(),e=e|0;let i=Math.max(0,this._prefixSumValidIndex+1);i===0&&(this._arr[0].prefixSum=this._arr[0].height,i++);for(let n=i;n<=e;n++)this._arr[n].prefixSum=this._arr[n-1].prefixSum+this._arr[n].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,e),this._arr[e].prefixSum}getLinesTotalHeight(){this._checkPendingChanges();const e=this._lineHeight*this._lineCount,i=this.getWhitespacesTotalHeight();return e+i+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(e){this._checkPendingChanges(),e=e|0;const i=this._findLastWhitespaceBeforeLineNumber(e);return i===-1?0:this.getWhitespacesAccumulatedHeight(i)}_findLastWhitespaceBeforeLineNumber(e){e=e|0;const i=this._arr;let n=0,s=i.length-1;for(;n<=s;){const d=(s-n|0)/2|0,f=n+d|0;if(i[f].afterLineNumber<e){if(f+1>=i.length||i[f+1].afterLineNumber>=e)return f;n=f+1|0}else s=f-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e=e|0;const n=this._findLastWhitespaceBeforeLineNumber(e)+1;return n<this._arr.length?n:-1}getFirstWhitespaceIndexAfterLineNumber(e){return this._checkPendingChanges(),e=e|0,this._findFirstWhitespaceAfterLineNumber(e)}getVerticalOffsetForLineNumber(e,i=!1){this._checkPendingChanges(),e=e|0;let n;e>1?n=this._lineHeight*(e-1):n=0;const s=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(i?1:0));return n+s+this._paddingTop}getVerticalOffsetAfterLineNumber(e,i=!1){this._checkPendingChanges(),e=e|0;const n=this._lineHeight*e,s=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(i?1:0));return n+s+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let e=0;for(let i=0,n=this._arr.length;i<n;i++)e=Math.max(e,this._arr[i].minWidth);this._minWidth=e}return this._minWidth}isAfterLines(e){this._checkPendingChanges();const i=this.getLinesTotalHeight();return e>i}isInTopPadding(e){return this._paddingTop===0?!1:(this._checkPendingChanges(),e<this._paddingTop)}isInBottomPadding(e){if(this._paddingBottom===0)return!1;this._checkPendingChanges();const i=this.getLinesTotalHeight();return e>=i-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),e=e|0,e<0)return 1;const i=this._lineCount|0,n=this._lineHeight;let s=1,c=i;for(;s<c;){const d=(s+c)/2|0,f=this.getVerticalOffsetForLineNumber(d)|0;if(e>=f+n)s=d+1;else{if(e>=f)return d;c=d}}return s>i?i:s}getLinesViewportData(e,i){this._checkPendingChanges(),e=e|0,i=i|0;const n=this._lineHeight,s=this.getLineNumberAtOrAfterVerticalOffset(e)|0,c=this.getVerticalOffsetForLineNumber(s)|0;let d=this._lineCount|0,f=this.getFirstWhitespaceIndexAfterLineNumber(s)|0;const m=this.getWhitespacesCount()|0;let v,x;f===-1?(f=m,x=d+1,v=0):(x=this.getAfterLineNumberForWhitespaceIndex(f)|0,v=this.getHeightForWhitespaceIndex(f)|0);let w=c,I=w;const P=5e5;let O=0;c>=P&&(O=Math.floor(c/P)*P,O=Math.floor(O/n)*n,I-=O);const z=[],J=e+(i-e)/2;let Y=-1;for(let Ce=s;Ce<=d;Ce++){if(Y===-1){const Fe=w,rt=w+n;(Fe<=J&&J<rt||Fe>J)&&(Y=Ce)}for(w+=n,z[Ce-s]=I,I+=n;x===Ce;)I+=v,w+=v,f++,f>=m?x=d+1:(x=this.getAfterLineNumberForWhitespaceIndex(f)|0,v=this.getHeightForWhitespaceIndex(f)|0);if(w>=i){d=Ce;break}}Y===-1&&(Y=d);const ae=this.getVerticalOffsetForLineNumber(d)|0;let me=s,ye=d;return me<ye&&c<e&&me++,me<ye&&ae+n>i&&ye--,{bigNumbersDelta:O,startLineNumber:s,endLineNumber:d,relativeVerticalOffset:z,centeredLineNumber:Y,completelyVisibleStartLineNumber:me,completelyVisibleEndLineNumber:ye,lineHeight:this._lineHeight}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e=e|0;const i=this.getAfterLineNumberForWhitespaceIndex(e);let n;i>=1?n=this._lineHeight*i:n=0;let s;return e>0?s=this.getWhitespacesAccumulatedHeight(e-1):s=0,n+s+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e=e|0;let i=0,n=this.getWhitespacesCount()-1;if(n<0)return-1;const s=this.getVerticalOffsetForWhitespaceIndex(n),c=this.getHeightForWhitespaceIndex(n);if(e>=s+c)return-1;for(;i<n;){const d=Math.floor((i+n)/2),f=this.getVerticalOffsetForWhitespaceIndex(d),m=this.getHeightForWhitespaceIndex(d);if(e>=f+m)i=d+1;else{if(e>=f)return d;n=d}}return i}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e=e|0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(i<0||i>=this.getWhitespacesCount())return null;const n=this.getVerticalOffsetForWhitespaceIndex(i);if(n>e)return null;const s=this.getHeightForWhitespaceIndex(i),c=this.getIdForWhitespaceIndex(i),d=this.getAfterLineNumberForWhitespaceIndex(i);return{id:c,afterLineNumber:d,verticalOffset:n,height:s}}getWhitespaceViewportData(e,i){this._checkPendingChanges(),e=e|0,i=i|0;const n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),s=this.getWhitespacesCount()-1;if(n<0)return[];const c=[];for(let d=n;d<=s;d++){const f=this.getVerticalOffsetForWhitespaceIndex(d),m=this.getHeightForWhitespaceIndex(d);if(f>=i)break;c.push({id:this.getIdForWhitespaceIndex(d),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(d),verticalOffset:f,height:m})}return c}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].height}},ZM.INSTANCE_COUNT=0,ZM);const R2i=125;class uie{constructor(e,i,n,s){e=e|0,i=i|0,n=n|0,s=s|0,e<0&&(e=0),i<0&&(i=0),n<0&&(n=0),s<0&&(s=0),this.width=e,this.contentWidth=i,this.scrollWidth=Math.max(e,i),this.height=n,this.contentHeight=s,this.scrollHeight=Math.max(n,s)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class F2i extends xi{constructor(e,i){super(),this._onDidContentSizeChange=this._register(new gi),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new uie(0,0,0,0),this._scrollable=this._register(new CJ({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:i})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const i=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const n=i.contentWidth!==e.contentWidth,s=i.contentHeight!==e.contentHeight;(n||s)&&this._onDidContentSizeChange.fire(new rGe(i.contentWidth,i.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}}class B2i extends xi{constructor(e,i,n){super(),this._configuration=e;const s=this._configuration.options,c=s.get(146),d=s.get(84);this._linesLayout=new M2i(i,s.get(67),d.top,d.bottom),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new F2i(0,n)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new uie(c.contentWidth,0,c.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(115)?R2i:0)}onConfigurationChanged(e){const i=this._configuration.options;if(e.hasChanged(67)&&this._linesLayout.setLineHeight(i.get(67)),e.hasChanged(84)){const n=i.get(84);this._linesLayout.setPadding(n.top,n.bottom)}if(e.hasChanged(146)){const n=i.get(146),s=n.contentWidth,c=n.height,d=this._scrollable.getScrollDimensions(),f=d.contentWidth;this._scrollable.setScrollDimensions(new uie(s,d.contentWidth,c,this._getContentHeight(s,c,f)))}else this._updateHeight();e.hasChanged(115)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,i){this._linesLayout.onLinesDeleted(e,i)}onLinesInserted(e,i){this._linesLayout.onLinesInserted(e,i)}_getHorizontalScrollbarHeight(e,i){const s=this._configuration.options.get(104);return s.horizontal===2||e>=i?0:s.horizontalScrollbarSize}_getContentHeight(e,i,n){const s=this._configuration.options;let c=this._linesLayout.getLinesTotalHeight();return s.get(106)?c+=Math.max(0,i-s.get(67)-s.get(84).bottom):s.get(104).ignoreHorizontalScrollbarInContentHeight||(c+=this._getHorizontalScrollbarHeight(e,n)),c}_updateHeight(){const e=this._scrollable.getScrollDimensions(),i=e.width,n=e.height,s=e.contentWidth;this._scrollable.setScrollDimensions(new uie(i,e.contentWidth,n,this._getContentHeight(i,n,s)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),i=this._scrollable.getCurrentScrollPosition();return new mSt(i.scrollTop,i.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),i=this._scrollable.getFutureScrollPosition();return new mSt(i.scrollTop,i.scrollLeft,e.width,e.height)}_computeContentWidth(){const e=this._configuration.options,i=this._maxLineWidth,n=e.get(147),s=e.get(50),c=e.get(146);if(n.isViewportWrapping){const d=e.get(73);return i>c.contentWidth+s.typicalHalfwidthCharacterWidth&&d.enabled&&d.side==="right"?i+c.verticalScrollbarWidth:i}else{const d=e.get(105)*s.typicalHalfwidthCharacterWidth,f=this._linesLayout.getWhitespaceMinWidth();return Math.max(i+d+c.verticalScrollbarWidth,f,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){const e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new uie(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),i=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(i),s=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n);return{scrollTop:i,scrollTopWithoutViewZones:i-s,scrollLeft:e.scrollLeft}}changeWhitespace(e){const i=this._linesLayout.changeWhitespace(e);return i&&this.onHeightMaybeChanged(),i}getVerticalOffsetForLineNumber(e,i=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,i)}getVerticalOffsetAfterLineNumber(e,i=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,i)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const i=this._scrollable.getScrollDimensions();return e+i.height>i.scrollHeight&&(e=i.scrollHeight-i.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+i.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,i){i===1?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,i){const n=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+i})}}class W2i{constructor(e,i,n,s,c){this.editorId=e,this.model=i,this.configuration=n,this._linesCollection=s,this._coordinatesConverter=c,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const i=e.id;let n=this._decorationsCache[i];if(!n){const s=e.range,c=e.options;let d;if(c.isWholeLine){const f=this._coordinatesConverter.convertModelPositionToViewPosition(new pi(s.startLineNumber,1),0,!1,!0),m=this._coordinatesConverter.convertModelPositionToViewPosition(new pi(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber)),1);d=new nt(f.lineNumber,f.column,m.lineNumber,m.column)}else d=this._coordinatesConverter.convertModelRangeToViewRange(s,1);n=new uIt(d,c),this._decorationsCache[i]=n}return n}getMinimapDecorationsInRange(e){return this._getDecorationsInRange(e,!0,!1).decorations}getDecorationsViewportData(e){let i=this._cachedModelDecorationsResolver!==null;return i=i&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),i||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e,i=!1,n=!1){const s=new nt(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(s,i,n).inlineDecorations[0]}_getDecorationsInRange(e,i,n){const s=this._linesCollection.getDecorationsInRange(e,this.editorId,G1e(this.configuration.options),i,n),c=e.startLineNumber,d=e.endLineNumber,f=[];let m=0;const v=[];for(let x=c;x<=d;x++)v[x-c]=[];for(let x=0,w=s.length;x<w;x++){const I=s[x],P=I.options;if(!aGe(this.model,I))continue;const O=this._getOrCreateViewModelDecoration(I),z=O.range;if(f[m++]=O,P.inlineClassName){const J=new Hie(z,P.inlineClassName,P.inlineClassNameAffectsLetterSpacing?3:0),Y=Math.max(c,z.startLineNumber),ae=Math.min(d,z.endLineNumber);for(let me=Y;me<=ae;me++)v[me-c].push(J)}if(P.beforeContentClassName&&c<=z.startLineNumber&&z.startLineNumber<=d){const J=new Hie(new nt(z.startLineNumber,z.startColumn,z.startLineNumber,z.startColumn),P.beforeContentClassName,1);v[z.startLineNumber-c].push(J)}if(P.afterContentClassName&&c<=z.endLineNumber&&z.endLineNumber<=d){const J=new Hie(new nt(z.endLineNumber,z.endColumn,z.endLineNumber,z.endColumn),P.afterContentClassName,2);v[z.endLineNumber-c].push(J)}}return{decorations:f,inlineDecorations:v}}}function aGe(l,e){return!(e.options.hideInCommentTokens&&cGe(l,e)||e.options.hideInStringTokens&&lGe(l,e))}function cGe(l,e){return AIt(l,e.range,i=>i===1)}function lGe(l,e){return AIt(l,e.range,i=>i===2)}function AIt(l,e,i){for(let n=e.startLineNumber;n<=e.endLineNumber;n++){const s=l.tokenization.getLineTokens(n),c=n===e.startLineNumber,d=n===e.endLineNumber;let f=c?s.findTokenIndexAtOffset(e.startColumn-1):0;for(;f<s.getCount()&&!(d&&s.getStartOffset(f)>e.endColumn-1);){if(!i(s.getStandardTokenType(f)))return!1;f++}}return!0}function v9e(l,e){return l===null?e?Pve.INSTANCE:Ave.INSTANCE:new V2i(l,e)}class V2i{constructor(e,i){this._projectionData=e,this._isVisible=i}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,i,n){this._assertVisible();const s=n>0?this._projectionData.breakOffsets[n-1]:0,c=this._projectionData.breakOffsets[n];let d;if(this._projectionData.injectionOffsets!==null){const f=this._projectionData.injectionOffsets.map((v,x)=>new UE(0,0,v+1,this._projectionData.injectionOptions[x],0));d=UE.applyInjectedText(e.getLineContent(i),f).substring(s,c)}else d=e.getValueInRange({startLineNumber:i,startColumn:s+1,endLineNumber:i,endColumn:c+1});return n>0&&(d=$St(this._projectionData.wrappedTextIndentLength)+d),d}getViewLineLength(e,i,n){return this._assertVisible(),this._projectionData.getLineLength(n)}getViewLineMinColumn(e,i,n){return this._assertVisible(),this._projectionData.getMinOutputOffset(n)+1}getViewLineMaxColumn(e,i,n){return this._assertVisible(),this._projectionData.getMaxOutputOffset(n)+1}getViewLineData(e,i,n){const s=new Array;return this.getViewLinesData(e,i,n,1,0,[!0],s),s[0]}getViewLinesData(e,i,n,s,c,d,f){this._assertVisible();const m=this._projectionData,v=m.injectionOffsets,x=m.injectionOptions;let w=null;if(v){w=[];let P=0,O=0;for(let z=0;z<m.getOutputLineCount();z++){const J=new Array;w[z]=J;const Y=z>0?m.breakOffsets[z-1]:0,ae=m.breakOffsets[z];for(;O<v.length;){const me=x[O].content.length,ye=v[O]+P,Ce=ye+me;if(ye>ae)break;if(Y<Ce){const Fe=x[O];if(Fe.inlineClassName){const rt=z>0?m.wrappedTextIndentLength:0,ct=rt+Math.max(ye-Y,0),Mt=rt+Math.min(Ce-Y,ae-Y);ct!==Mt&&J.push(new Owi(ct,Mt,Fe.inlineClassName,Fe.inlineClassNameAffectsLetterSpacing))}}if(Ce<=ae)P+=me,O++;else break}}}let I;v?I=e.tokenization.getLineTokens(i).withInserted(v.map((P,O)=>({offset:P,text:x[O].content,tokenMetadata:Cg.defaultTokenMetadata}))):I=e.tokenization.getLineTokens(i);for(let P=n;P<n+s;P++){const O=c+P-n;if(!d[O]){f[O]=null;continue}f[O]=this._getViewLineData(I,w?w[P]:null,P)}}_getViewLineData(e,i,n){this._assertVisible();const s=this._projectionData,c=n>0?s.wrappedTextIndentLength:0,d=n>0?s.breakOffsets[n-1]:0,f=s.breakOffsets[n],m=e.sliceAndInflate(d,f,c);let v=m.getLineContent();n>0&&(v=$St(s.wrappedTextIndentLength)+v);const x=this._projectionData.getMinOutputOffset(n)+1,w=v.length+1,I=n+1<this.getViewLineCount(),P=n===0?0:s.breakOffsetsVisibleColumn[n-1];return new jJe(v,I,x,w,P,m,i)}getModelColumnOfViewPosition(e,i){return this._assertVisible(),this._projectionData.translateToInputOffset(e,i-1)+1}getViewPositionOfModelPosition(e,i,n=2){return this._assertVisible(),this._projectionData.translateToOutputPosition(i-1,n).toPosition(e)}getViewLineNumberOfModelPosition(e,i){this._assertVisible();const n=this._projectionData.translateToOutputPosition(i-1);return e+n.outputLineIndex}normalizePosition(e,i,n){const s=i.lineNumber-e;return this._projectionData.normalizeOutputPosition(e,i.column-1,n).toPosition(s)}getInjectedTextAt(e,i){return this._projectionData.getInjectedText(e,i-1)}_assertVisible(){if(!this._isVisible)throw new Error("Not supported")}}const LCe=class LCe{constructor(){}isVisible(){return!0}setVisible(e){return e?this:Ave.INSTANCE}getProjectionData(){return null}getViewLineCount(){return 1}getViewLineContent(e,i,n){return e.getLineContent(i)}getViewLineLength(e,i,n){return e.getLineLength(i)}getViewLineMinColumn(e,i,n){return e.getLineMinColumn(i)}getViewLineMaxColumn(e,i,n){return e.getLineMaxColumn(i)}getViewLineData(e,i,n){const s=e.tokenization.getLineTokens(i),c=s.getLineContent();return new jJe(c,!1,1,c.length+1,0,s.inflate(),null)}getViewLinesData(e,i,n,s,c,d,f){if(!d[c]){f[c]=null;return}f[c]=this.getViewLineData(e,i,0)}getModelColumnOfViewPosition(e,i){return i}getViewPositionOfModelPosition(e,i){return new pi(e,i)}getViewLineNumberOfModelPosition(e,i){return e}normalizePosition(e,i,n){return i}getInjectedTextAt(e,i){return null}};LCe.INSTANCE=new LCe;let Pve=LCe;const PCe=class PCe{constructor(){}isVisible(){return!1}setVisible(e){return e?Pve.INSTANCE:this}getProjectionData(){return null}getViewLineCount(){return 0}getViewLineContent(e,i,n){throw new Error("Not supported")}getViewLineLength(e,i,n){throw new Error("Not supported")}getViewLineMinColumn(e,i,n){throw new Error("Not supported")}getViewLineMaxColumn(e,i,n){throw new Error("Not supported")}getViewLineData(e,i,n){throw new Error("Not supported")}getViewLinesData(e,i,n,s,c,d,f){throw new Error("Not supported")}getModelColumnOfViewPosition(e,i){throw new Error("Not supported")}getViewPositionOfModelPosition(e,i){throw new Error("Not supported")}getViewLineNumberOfModelPosition(e,i){throw new Error("Not supported")}normalizePosition(e,i,n){throw new Error("Not supported")}getInjectedTextAt(e,i){throw new Error("Not supported")}};PCe.INSTANCE=new PCe;let Ave=PCe;const b9e=[""];function $St(l){if(l>=b9e.length)for(let e=1;e<=l;e++)b9e[e]=H2i(e);return b9e[l]}function H2i(l){return new Array(l+1).join(" ")}class j2i{constructor(e,i,n,s,c,d,f,m,v,x){this._editorId=e,this.model=i,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=n,this._monospaceLineBreaksComputerFactory=s,this.fontInfo=c,this.tabSize=d,this.wrappingStrategy=f,this.wrappingColumn=m,this.wrappingIndent=v,this.wordBreak=x,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new U2i(this)}_constructLines(e,i){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const n=this.model.getLinesContent(),s=this.model.getInjectedTextDecorations(this._editorId),c=n.length,d=this.createLineBreaksComputer(),f=new s6(UE.fromDecorations(s));for(let z=0;z<c;z++){const J=f.takeWhile(Y=>Y.lineNumber===z+1);d.addRequest(n[z],J,i?i[z]:null)}const m=d.finalize(),v=[],x=this.hiddenAreasDecorationIds.map(z=>this.model.getDecorationRange(z)).sort(nt.compareRangesUsingStarts);let w=1,I=0,P=-1,O=P+1<x.length?I+1:c+2;for(let z=0;z<c;z++){const J=z+1;J===O&&(P++,w=x[P].startLineNumber,I=x[P].endLineNumber,O=P+1<x.length?I+1:c+2);const Y=J>=w&&J<=I,ae=v9e(m[z],!Y);v[z]=ae.getViewLineCount(),this.modelLineProjections[z]=ae}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new r_i(v)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(e=>this.model.getDecorationRange(e))}setHiddenAreas(e){const i=e.map(I=>this.model.validateRange(I)),n=z2i(i),s=this.hiddenAreasDecorationIds.map(I=>this.model.getDecorationRange(I)).sort(nt.compareRangesUsingStarts);if(n.length===s.length){let I=!1;for(let P=0;P<n.length;P++)if(!n[P].equalsRange(s[P])){I=!0;break}if(!I)return!1}const c=n.map(I=>({range:I,options:qa.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,c);const d=n;let f=1,m=0,v=-1,x=v+1<d.length?m+1:this.modelLineProjections.length+2,w=!1;for(let I=0;I<this.modelLineProjections.length;I++){const P=I+1;P===x&&(v++,f=d[v].startLineNumber,m=d[v].endLineNumber,x=v+1<d.length?m+1:this.modelLineProjections.length+2);let O=!1;if(P>=f&&P<=m?this.modelLineProjections[I].isVisible()&&(this.modelLineProjections[I]=this.modelLineProjections[I].setVisible(!1),O=!0):(w=!0,this.modelLineProjections[I].isVisible()||(this.modelLineProjections[I]=this.modelLineProjections[I].setVisible(!0),O=!0)),O){const z=this.modelLineProjections[I].getViewLineCount();this.projectedModelLineLineCounts.setValue(I,z)}}return w||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,i){return e<1||e>this.modelLineProjections.length?!1:this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize===e?!1:(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,i,n,s,c){const d=this.fontInfo.equals(e),f=this.wrappingStrategy===i,m=this.wrappingColumn===n,v=this.wrappingIndent===s,x=this.wordBreak===c;if(d&&f&&m&&v&&x)return!1;const w=d&&f&&!m&&v&&x;this.fontInfo=e,this.wrappingStrategy=i,this.wrappingColumn=n,this.wrappingIndent=s,this.wordBreak=c;let I=null;if(w){I=[];for(let P=0,O=this.modelLineProjections.length;P<O;P++)I[P]=this.modelLineProjections[P].getProjectionData()}return this._constructLines(!1,I),!0}createLineBreaksComputer(){return(this.wrappingStrategy==="advanced"?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory).createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent,this.wordBreak)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(e,i,n){if(!e||e<=this._validModelVersionId)return null;const s=i===1?1:this.projectedModelLineLineCounts.getPrefixSum(i-1)+1,c=this.projectedModelLineLineCounts.getPrefixSum(n);return this.modelLineProjections.splice(i-1,n-i+1),this.projectedModelLineLineCounts.removeValues(i-1,n-i+1),new Cje(s,c)}onModelLinesInserted(e,i,n,s){if(!e||e<=this._validModelVersionId)return null;const c=i>2&&!this.modelLineProjections[i-2].isVisible(),d=i===1?1:this.projectedModelLineLineCounts.getPrefixSum(i-1)+1;let f=0;const m=[],v=[];for(let x=0,w=s.length;x<w;x++){const I=v9e(s[x],!c);m.push(I);const P=I.getViewLineCount();f+=P,v[x]=P}return this.modelLineProjections=this.modelLineProjections.slice(0,i-1).concat(m).concat(this.modelLineProjections.slice(i-1)),this.projectedModelLineLineCounts.insertValues(i-1,v),new Sje(d,d+f-1)}onModelLineChanged(e,i,n){if(e!==null&&e<=this._validModelVersionId)return[!1,null,null,null];const s=i-1,c=this.modelLineProjections[s].getViewLineCount(),d=this.modelLineProjections[s].isVisible(),f=v9e(n,d);this.modelLineProjections[s]=f;const m=this.modelLineProjections[s].getViewLineCount();let v=!1,x=0,w=-1,I=0,P=-1,O=0,z=-1;c>m?(x=this.projectedModelLineLineCounts.getPrefixSum(i-1)+1,w=x+m-1,O=w+1,z=O+(c-m)-1,v=!0):c<m?(x=this.projectedModelLineLineCounts.getPrefixSum(i-1)+1,w=x+c-1,I=w+1,P=I+(m-c)-1,v=!0):(x=this.projectedModelLineLineCounts.getPrefixSum(i-1)+1,w=x+m-1),this.projectedModelLineLineCounts.setValue(s,m);const J=x<=w?new PIt(x,w-x+1):null,Y=I<=P?new Sje(I,P):null,ae=O<=z?new Cje(O,z):null;return[v,J,Y,ae]}acceptVersionId(e){this._validModelVersionId=e,this.modelLineProjections.length===1&&!this.modelLineProjections[0].isVisible()&&this.setHiddenAreas([])}getViewLineCount(){return this.projectedModelLineLineCounts.getTotalSum()}_toValidViewLineNumber(e){if(e<1)return 1;const i=this.getViewLineCount();return e>i?i:e|0}getActiveIndentGuide(e,i,n){e=this._toValidViewLineNumber(e),i=this._toValidViewLineNumber(i),n=this._toValidViewLineNumber(n);const s=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),c=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),d=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),f=this.model.guides.getActiveIndentGuide(s.lineNumber,c.lineNumber,d.lineNumber),m=this.convertModelPositionToViewPosition(f.startLineNumber,1),v=this.convertModelPositionToViewPosition(f.endLineNumber,this.model.getLineMaxColumn(f.endLineNumber));return{startLineNumber:m.lineNumber,endLineNumber:v.lineNumber,indent:f.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const i=this.projectedModelLineLineCounts.getIndexOf(e-1),n=i.index,s=i.remainder;return new JSt(n+1,s)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const i=this.modelLineProjections[e.modelLineNumber-1],n=i.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),s=i.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,n);return new pi(e.modelLineNumber,s)}getModelEndPositionOfViewLine(e){const i=this.modelLineProjections[e.modelLineNumber-1],n=i.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),s=i.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,n);return new pi(e.modelLineNumber,s)}getViewLineInfosGroupedByModelRanges(e,i){const n=this.getViewLineInfo(e),s=this.getViewLineInfo(i),c=new Array;let d=this.getModelStartPositionOfViewLine(n),f=new Array;for(let m=n.modelLineNumber;m<=s.modelLineNumber;m++){const v=this.modelLineProjections[m-1];if(v.isVisible()){const x=m===n.modelLineNumber?n.modelLineWrappedLineIdx:0,w=m===s.modelLineNumber?s.modelLineWrappedLineIdx+1:v.getViewLineCount();for(let I=x;I<w;I++)f.push(new JSt(m,I))}if(!v.isVisible()&&d){const x=new pi(m-1,this.model.getLineMaxColumn(m-1)+1),w=nt.fromPositions(d,x);c.push(new GSt(w,f)),f=[],d=null}else v.isVisible()&&!d&&(d=new pi(m,1))}if(d){const m=nt.fromPositions(d,this.getModelEndPositionOfViewLine(s));c.push(new GSt(m,f))}return c}getViewLinesBracketGuides(e,i,n,s){const c=n?this.convertViewPositionToModelPosition(n.lineNumber,n.column):null,d=[];for(const f of this.getViewLineInfosGroupedByModelRanges(e,i)){const m=f.modelRange.startLineNumber,v=this.model.guides.getLinesBracketGuides(m,f.modelRange.endLineNumber,c,s);for(const x of f.viewLines){const I=v[x.modelLineNumber-m].map(P=>{if(P.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[x.modelLineNumber-1].getViewPositionOfModelPosition(0,P.forWrappedLinesAfterColumn).lineNumber>=x.modelLineWrappedLineIdx||P.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[x.modelLineNumber-1].getViewPositionOfModelPosition(0,P.forWrappedLinesBeforeOrAtColumn).lineNumber<x.modelLineWrappedLineIdx)return;if(!P.horizontalLine)return P;let O=-1;if(P.column!==-1){const Y=this.modelLineProjections[x.modelLineNumber-1].getViewPositionOfModelPosition(0,P.column);if(Y.lineNumber===x.modelLineWrappedLineIdx)O=Y.column;else if(Y.lineNumber<x.modelLineWrappedLineIdx)O=this.getMinColumnOfViewLine(x);else if(Y.lineNumber>x.modelLineWrappedLineIdx)return}const z=this.convertModelPositionToViewPosition(x.modelLineNumber,P.horizontalLine.endColumn),J=this.modelLineProjections[x.modelLineNumber-1].getViewPositionOfModelPosition(0,P.horizontalLine.endColumn);return J.lineNumber===x.modelLineWrappedLineIdx?new s9(P.visibleColumn,O,P.className,new Pie(P.horizontalLine.top,z.column),-1,-1):J.lineNumber<x.modelLineWrappedLineIdx||P.visibleColumn!==-1?void 0:new s9(P.visibleColumn,O,P.className,new Pie(P.horizontalLine.top,this.getMaxColumnOfViewLine(x)),-1,-1)});d.push(I.filter(P=>!!P))}}return d}getViewLinesIndentGuides(e,i){e=this._toValidViewLineNumber(e),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),s=this.convertViewPositionToModelPosition(i,this.getViewLineMaxColumn(i));let c=[];const d=[],f=[],m=n.lineNumber-1,v=s.lineNumber-1;let x=null;for(let O=m;O<=v;O++){const z=this.modelLineProjections[O];if(z.isVisible()){const J=z.getViewLineNumberOfModelPosition(0,O===m?n.column:1),Y=z.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(O+1)),ae=Y-J+1;let me=0;ae>1&&z.getViewLineMinColumn(this.model,O+1,Y)===1&&(me=J===0?1:2),d.push(ae),f.push(me),x===null&&(x=new pi(O+1,0))}else x!==null&&(c=c.concat(this.model.guides.getLinesIndentGuides(x.lineNumber,O)),x=null)}x!==null&&(c=c.concat(this.model.guides.getLinesIndentGuides(x.lineNumber,s.lineNumber)),x=null);const w=i-e+1,I=new Array(w);let P=0;for(let O=0,z=c.length;O<z;O++){let J=c[O];const Y=Math.min(w-P,d[O]),ae=f[O];let me;ae===2?me=0:ae===1?me=1:me=Y;for(let ye=0;ye<Y;ye++)ye===me&&(J=0),I[P++]=J}return I}getViewLineContent(e){const i=this.getViewLineInfo(e);return this.modelLineProjections[i.modelLineNumber-1].getViewLineContent(this.model,i.modelLineNumber,i.modelLineWrappedLineIdx)}getViewLineLength(e){const i=this.getViewLineInfo(e);return this.modelLineProjections[i.modelLineNumber-1].getViewLineLength(this.model,i.modelLineNumber,i.modelLineWrappedLineIdx)}getViewLineMinColumn(e){const i=this.getViewLineInfo(e);return this.modelLineProjections[i.modelLineNumber-1].getViewLineMinColumn(this.model,i.modelLineNumber,i.modelLineWrappedLineIdx)}getViewLineMaxColumn(e){const i=this.getViewLineInfo(e);return this.modelLineProjections[i.modelLineNumber-1].getViewLineMaxColumn(this.model,i.modelLineNumber,i.modelLineWrappedLineIdx)}getViewLineData(e){const i=this.getViewLineInfo(e);return this.modelLineProjections[i.modelLineNumber-1].getViewLineData(this.model,i.modelLineNumber,i.modelLineWrappedLineIdx)}getViewLinesData(e,i,n){e=this._toValidViewLineNumber(e),i=this._toValidViewLineNumber(i);const s=this.projectedModelLineLineCounts.getIndexOf(e-1);let c=e;const d=s.index,f=s.remainder,m=[];for(let v=d,x=this.model.getLineCount();v<x;v++){const w=this.modelLineProjections[v];if(!w.isVisible())continue;const I=v===d?f:0;let P=w.getViewLineCount()-I,O=!1;if(c+P>i&&(O=!0,P=i-c+1),w.getViewLinesData(this.model,v+1,I,P,c-e,n,m),c+=P,O)break}return m}validateViewPosition(e,i,n){e=this._toValidViewLineNumber(e);const s=this.projectedModelLineLineCounts.getIndexOf(e-1),c=s.index,d=s.remainder,f=this.modelLineProjections[c],m=f.getViewLineMinColumn(this.model,c+1,d),v=f.getViewLineMaxColumn(this.model,c+1,d);i<m&&(i=m),i>v&&(i=v);const x=f.getModelColumnOfViewPosition(d,i);return this.model.validatePosition(new pi(c+1,x)).equals(n)?new pi(e,i):this.convertModelPositionToViewPosition(n.lineNumber,n.column)}validateViewRange(e,i){const n=this.validateViewPosition(e.startLineNumber,e.startColumn,i.getStartPosition()),s=this.validateViewPosition(e.endLineNumber,e.endColumn,i.getEndPosition());return new nt(n.lineNumber,n.column,s.lineNumber,s.column)}convertViewPositionToModelPosition(e,i){const n=this.getViewLineInfo(e),s=this.modelLineProjections[n.modelLineNumber-1].getModelColumnOfViewPosition(n.modelLineWrappedLineIdx,i);return this.model.validatePosition(new pi(n.modelLineNumber,s))}convertViewRangeToModelRange(e){const i=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new nt(i.lineNumber,i.column,n.lineNumber,n.column)}convertModelPositionToViewPosition(e,i,n=2,s=!1,c=!1){const d=this.model.validatePosition(new pi(e,i)),f=d.lineNumber,m=d.column;let v=f-1,x=!1;if(c)for(;v<this.modelLineProjections.length&&!this.modelLineProjections[v].isVisible();)v++,x=!0;else for(;v>0&&!this.modelLineProjections[v].isVisible();)v--,x=!0;if(v===0&&!this.modelLineProjections[v].isVisible())return new pi(s?0:1,1);const w=1+this.projectedModelLineLineCounts.getPrefixSum(v);let I;return x?c?I=this.modelLineProjections[v].getViewPositionOfModelPosition(w,1,n):I=this.modelLineProjections[v].getViewPositionOfModelPosition(w,this.model.getLineMaxColumn(v+1),n):I=this.modelLineProjections[f-1].getViewPositionOfModelPosition(w,m,n),I}convertModelRangeToViewRange(e,i=0){if(e.isEmpty()){const n=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,i);return nt.fromPositions(n)}else{const n=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),s=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new nt(n.lineNumber,n.column,s.lineNumber,s.column)}}getViewLineNumberOfModelPosition(e,i){let n=e-1;if(this.modelLineProjections[n].isVisible()){const c=1+this.projectedModelLineLineCounts.getPrefixSum(n);return this.modelLineProjections[n].getViewLineNumberOfModelPosition(c,i)}for(;n>0&&!this.modelLineProjections[n].isVisible();)n--;if(n===0&&!this.modelLineProjections[n].isVisible())return 1;const s=1+this.projectedModelLineLineCounts.getPrefixSum(n);return this.modelLineProjections[n].getViewLineNumberOfModelPosition(s,this.model.getLineMaxColumn(n+1))}getDecorationsInRange(e,i,n,s,c){const d=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),f=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(f.lineNumber-d.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new nt(d.lineNumber,1,f.lineNumber,f.column),i,n,s,c);let m=[];const v=d.lineNumber-1,x=f.lineNumber-1;let w=null;for(let z=v;z<=x;z++)if(this.modelLineProjections[z].isVisible())w===null&&(w=new pi(z+1,z===v?d.column:1));else if(w!==null){const Y=this.model.getLineMaxColumn(z);m=m.concat(this.model.getDecorationsInRange(new nt(w.lineNumber,w.column,z,Y),i,n,s)),w=null}w!==null&&(m=m.concat(this.model.getDecorationsInRange(new nt(w.lineNumber,w.column,f.lineNumber,f.column),i,n,s)),w=null),m.sort((z,J)=>{const Y=nt.compareRangesUsingStarts(z.range,J.range);return Y===0?z.id<J.id?-1:z.id>J.id?1:0:Y});const I=[];let P=0,O=null;for(const z of m){const J=z.id;O!==J&&(O=J,I[P++]=z)}return I}getInjectedTextAt(e){const i=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[i.modelLineNumber-1].getInjectedTextAt(i.modelLineWrappedLineIdx,e.column)}normalizePosition(e,i){const n=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[n.modelLineNumber-1].normalizePosition(n.modelLineWrappedLineIdx,e,i)}getLineIndentColumn(e){const i=this.getViewLineInfo(e);return i.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(i.modelLineNumber):0}}function z2i(l){if(l.length===0)return[];const e=l.slice();e.sort(nt.compareRangesUsingStarts);const i=[];let n=e[0].startLineNumber,s=e[0].endLineNumber;for(let c=1,d=e.length;c<d;c++){const f=e[c];f.startLineNumber>s+1?(i.push(new nt(n,1,s,1)),n=f.startLineNumber,s=f.endLineNumber):f.endLineNumber>s&&(s=f.endLineNumber)}return i.push(new nt(n,1,s,1)),i}class JSt{constructor(e,i){this.modelLineNumber=e,this.modelLineWrappedLineIdx=i}}class GSt{constructor(e,i){this.modelRange=e,this.viewLines=i}}class U2i{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,i){return this._lines.validateViewPosition(e.lineNumber,e.column,i)}validateViewRange(e,i){return this._lines.validateViewRange(e,i)}convertModelPositionToViewPosition(e,i,n,s){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,i,n,s)}convertModelRangeToViewRange(e,i){return this._lines.convertModelRangeToViewRange(e,i)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,i){return this._lines.getViewLineNumberOfModelPosition(e,i)}}class q2i{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new $2i(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,i,n,s){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(i,n,s)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,i,n){return new Cje(i,n)}onModelLinesInserted(e,i,n,s){return new Sje(i,n)}onModelLineChanged(e,i,n){return[!1,new PIt(i,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,i,n){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,i,n){return new Array(i-e+1).fill([])}getViewLinesIndentGuides(e,i){const n=i-e+1,s=new Array(n);for(let c=0;c<n;c++)s[c]=0;return s}getViewLineContent(e){return this.model.getLineContent(e)}getViewLineLength(e){return this.model.getLineLength(e)}getViewLineMinColumn(e){return this.model.getLineMinColumn(e)}getViewLineMaxColumn(e){return this.model.getLineMaxColumn(e)}getViewLineData(e){const i=this.model.tokenization.getLineTokens(e),n=i.getLineContent();return new jJe(n,!1,1,n.length+1,0,i.inflate(),null)}getViewLinesData(e,i,n){const s=this.model.getLineCount();e=Math.min(Math.max(1,e),s),i=Math.min(Math.max(1,i),s);const c=[];for(let d=e;d<=i;d++){const f=d-e;c[f]=n[f]?this.getViewLineData(d):null}return c}getDecorationsInRange(e,i,n,s,c){return this.model.getDecorationsInRange(e,i,n,s,c)}normalizePosition(e,i){return this.model.normalizePosition(e,i)}getLineIndentColumn(e){return this.model.getLineIndentColumn(e)}getInjectedTextAt(e){return null}}class $2i{constructor(e){this._lines=e}_validPosition(e){return this._lines.model.validatePosition(e)}_validRange(e){return this._lines.model.validateRange(e)}convertViewPositionToModelPosition(e){return this._validPosition(e)}convertViewRangeToModelRange(e){return this._validRange(e)}validateViewPosition(e,i){return this._validPosition(i)}validateViewRange(e,i){return this._validRange(i)}convertModelPositionToViewPosition(e){return this._validPosition(e)}convertModelRangeToViewRange(e){return this._validRange(e)}modelPositionIsVisible(e){const i=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>i)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,i){return e}}const bF=CT.Right;class J2i{constructor(e){this.persist=0,this._requiredLanes=1,this.lanes=new Uint8Array(Math.ceil((e+1)*bF/8))}reset(e){const i=Math.ceil((e+1)*bF/8);this.lanes.length<i?this.lanes=new Uint8Array(i):this.lanes.fill(0),this._requiredLanes=1}get requiredLanes(){return this._requiredLanes}push(e,i,n){n&&(this.persist|=1<<e-1);for(let s=i.startLineNumber;s<=i.endLineNumber;s++){const c=bF*s+(e-1);this.lanes[c>>>3]|=1<<c%8,this._requiredLanes=Math.max(this._requiredLanes,this.countAtLine(s))}}getLanesAtLine(e){const i=[];let n=bF*e;for(let s=0;s<bF;s++)(this.persist&1<<s||this.lanes[n>>>3]&1<<n%8)&&i.push(s+1),n++;return i.length?i:[CT.Center]}countAtLine(e){let i=bF*e,n=0;for(let s=0;s<bF;s++)(this.persist&1<<s||this.lanes[i>>>3]&1<<i%8)&&n++,i++;return n}}let G2i=class extends xi{constructor(e,i,n,s,c,d,f,m,v,x){if(super(),this.languageConfigurationService=f,this._themeService=m,this._attachedView=v,this._transactionalTarget=x,this.hiddenAreasModel=new X2i,this.previousHiddenAreas=[],this._editorId=e,this._configuration=i,this.model=n,this._eventDispatcher=new v2i,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new NU(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._updateConfigurationViewLineCount=this._register(new qu(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=uGe.create(this.model),this.glyphLanes=new J2i(0),this.model.isTooLargeForTokenization())this._lines=new q2i(this.model);else{const w=this._configuration.options,I=w.get(50),P=w.get(140),O=w.get(147),z=w.get(139),J=w.get(130);this._lines=new j2i(this._editorId,this.model,s,c,I,this.model.getOptions().tabSize,P,O.wrappingColumn,z,J)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new N2i(n,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new B2i(this._configuration,this.getLineCount(),d)),this._register(this.viewLayout.onDidScroll(w=>{w.scrollTopChanged&&this._handleVisibleLinesChanged(),w.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new _2i(w)),this._eventDispatcher.emitOutgoingEvent(new oGe(w.oldScrollWidth,w.oldScrollLeft,w.oldScrollHeight,w.oldScrollTop,w.scrollWidth,w.scrollLeft,w.scrollHeight,w.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(w=>{this._eventDispatcher.emitOutgoingEvent(w)})),this._decorations=new W2i(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(w=>{try{const I=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(I,w)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(Eve.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new g2i)})),this._register(this._themeService.onDidColorThemeChange(w=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new p2i(w))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const e=this.viewLayout.getLinesViewportData(),i=new nt(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber));return this._toModelVisibleRanges(i)}visibleLinesStabilized(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new f2i(e)),this._eventDispatcher.emitOutgoingEvent(new sGe(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new c2i)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new l2i)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const e=new pi(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),i=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new XSt(i,this._viewportStart.startLineDelta)}return new XSt(null,0)}_onConfigurationChanged(e,i){const n=this._captureStableViewport(),s=this._configuration.options,c=s.get(50),d=s.get(140),f=s.get(147),m=s.get(139),v=s.get(130);this._lines.setWrappingSettings(c,d,f.wrappingColumn,m,v)&&(e.emitViewEvent(new T0e),e.emitViewEvent(new D0e),e.emitViewEvent(new vF(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),i.hasChanged(92)&&(this._decorations.reset(),e.emitViewEvent(new vF(null))),i.hasChanged(99)&&(this._decorations.reset(),e.emitViewEvent(new vF(null))),e.emitViewEvent(new u2i(i)),this.viewLayout.onConfigurationChanged(i),n.recoverViewportStart(this.coordinatesConverter,this.viewLayout),NU.shouldRecreate(i)&&(this.cursorConfig=new NU(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(e=>{try{const n=this._eventDispatcher.beginEmitViewEvents();let s=!1,c=!1;const d=e instanceof y9?e.rawContentChangedEvent.changes:e.changes,f=e instanceof y9?e.rawContentChangedEvent.versionId:null,m=this._lines.createLineBreaksComputer();for(const w of d)switch(w.changeType){case 4:{for(let I=0;I<w.detail.length;I++){const P=w.detail[I];let O=w.injectedTexts[I];O&&(O=O.filter(z=>!z.ownerId||z.ownerId===this._editorId)),m.addRequest(P,O,null)}break}case 2:{let I=null;w.injectedText&&(I=w.injectedText.filter(P=>!P.ownerId||P.ownerId===this._editorId)),m.addRequest(w.detail,I,null);break}}const v=m.finalize(),x=new s6(v);for(const w of d)switch(w.changeType){case 1:{this._lines.onModelFlushed(),n.emitViewEvent(new T0e),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),s=!0;break}case 3:{const I=this._lines.onModelLinesDeleted(f,w.fromLineNumber,w.toLineNumber);I!==null&&(n.emitViewEvent(I),this.viewLayout.onLinesDeleted(I.fromLineNumber,I.toLineNumber)),s=!0;break}case 4:{const I=x.takeCount(w.detail.length),P=this._lines.onModelLinesInserted(f,w.fromLineNumber,w.toLineNumber,I);P!==null&&(n.emitViewEvent(P),this.viewLayout.onLinesInserted(P.fromLineNumber,P.toLineNumber)),s=!0;break}case 2:{const I=x.dequeue(),[P,O,z,J]=this._lines.onModelLineChanged(f,w.lineNumber,I);c=P,O&&n.emitViewEvent(O),z&&(n.emitViewEvent(z),this.viewLayout.onLinesInserted(z.fromLineNumber,z.toLineNumber)),J&&(n.emitViewEvent(J),this.viewLayout.onLinesDeleted(J.fromLineNumber,J.toLineNumber));break}case 5:break}f!==null&&this._lines.acceptVersionId(f),this.viewLayout.onHeightMaybeChanged(),!s&&c&&(n.emitViewEvent(new D0e),n.emitViewEvent(new vF(null)),this._cursor.onLineMappingChanged(n),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const i=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&i){const n=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(n){const s=this.coordinatesConverter.convertModelPositionToViewPosition(n.getStartPosition()),c=this.viewLayout.getVerticalOffsetForLineNumber(s.lineNumber);this.viewLayout.setScrollPosition({scrollTop:c+this._viewportStart.startLineDelta},1)}}try{const n=this._eventDispatcher.beginEmitViewEvents();e instanceof y9&&n.emitOutgoingEvent(new D2i(e.contentChangedEvent)),this._cursor.onModelContentChanged(n,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()})),this._register(this.model.onDidChangeTokens(e=>{const i=[];for(let n=0,s=e.ranges.length;n<s;n++){const c=e.ranges[n],d=this.coordinatesConverter.convertModelPositionToViewPosition(new pi(c.fromLineNumber,1)).lineNumber,f=this.coordinatesConverter.convertModelPositionToViewPosition(new pi(c.toLineNumber,this.model.getLineMaxColumn(c.toLineNumber))).lineNumber;i[n]={fromLineNumber:d,toLineNumber:f}}this._eventDispatcher.emitSingleViewEvent(new m2i(i)),this._eventDispatcher.emitOutgoingEvent(new I2i(e))})),this._register(this.model.onDidChangeLanguageConfiguration(e=>{this._eventDispatcher.emitSingleViewEvent(new h2i),this.cursorConfig=new NU(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new T2i(e))})),this._register(this.model.onDidChangeLanguage(e=>{this.cursorConfig=new NU(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new k2i(e))})),this._register(this.model.onDidChangeOptions(e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const i=this._eventDispatcher.beginEmitViewEvents();i.emitViewEvent(new T0e),i.emitViewEvent(new D0e),i.emitViewEvent(new vF(null)),this._cursor.onLineMappingChanged(i),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new NU(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new E2i(e))})),this._register(this.model.onDidChangeDecorations(e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new vF(e)),this._eventDispatcher.emitOutgoingEvent(new x2i(e))}))}setHiddenAreas(e,i){var d;this.hiddenAreasModel.setHiddenAreas(i,e);const n=this.hiddenAreasModel.getMergedRanges();if(n===this.previousHiddenAreas)return;this.previousHiddenAreas=n;const s=this._captureStableViewport();let c=!1;try{const f=this._eventDispatcher.beginEmitViewEvents();c=this._lines.setHiddenAreas(n),c&&(f.emitViewEvent(new T0e),f.emitViewEvent(new D0e),f.emitViewEvent(new vF(null)),this._cursor.onLineMappingChanged(f),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged());const m=(d=s.viewportStartModelPosition)==null?void 0:d.lineNumber;m&&n.some(x=>x.startLineNumber<=m&&m<=x.endLineNumber)||s.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),c&&this._eventDispatcher.emitOutgoingEvent(new S2i)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(146),i=this._configuration.options.get(67),n=Math.max(20,Math.round(e.height/i)),s=this.viewLayout.getLinesViewportData(),c=Math.max(1,s.completelyVisibleStartLineNumber-n),d=Math.min(this.getLineCount(),s.completelyVisibleEndLineNumber+n);return this._toModelVisibleRanges(new nt(c,this.getLineMinColumn(c),d,this.getLineMaxColumn(d)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){const i=this.coordinatesConverter.convertViewRangeToModelRange(e),n=this._lines.getHiddenAreas();if(n.length===0)return[i];const s=[];let c=0,d=i.startLineNumber,f=i.startColumn;const m=i.endLineNumber,v=i.endColumn;for(let x=0,w=n.length;x<w;x++){const I=n[x].startLineNumber,P=n[x].endLineNumber;P<d||I>m||(d<I&&(s[c++]=new nt(d,f,I-1,this.model.getLineMaxColumn(I-1))),d=P+1,f=1)}return(d<m||d===m&&f<v)&&(s[c++]=new nt(d,f,m,v)),s}getCompletelyVisibleViewRange(){const e=this.viewLayout.getLinesViewportData(),i=e.completelyVisibleStartLineNumber,n=e.completelyVisibleEndLineNumber;return new nt(i,this.getLineMinColumn(i),n,this.getLineMaxColumn(n))}getCompletelyVisibleViewRangeAtScrollTop(e){const i=this.viewLayout.getLinesViewportDataAtScrollTop(e),n=i.completelyVisibleStartLineNumber,s=i.completelyVisibleEndLineNumber;return new nt(n,this.getLineMinColumn(n),s,this.getLineMaxColumn(s))}saveState(){const e=this.viewLayout.saveState(),i=e.scrollTop,n=this.viewLayout.getLineNumberAtVerticalOffset(i),s=this.coordinatesConverter.convertViewPositionToModelPosition(new pi(n,this.getLineMinColumn(n))),c=this.viewLayout.getVerticalOffsetForLineNumber(n)-i;return{scrollLeft:e.scrollLeft,firstPosition:s,firstPositionDeltaTop:c}}reduceRestoreState(e){if(typeof e.firstPosition>"u")return this._reduceRestoreStateCompatibility(e);const i=this.model.validatePosition(e.firstPosition),n=this.coordinatesConverter.convertModelPositionToViewPosition(i),s=this.viewLayout.getVerticalOffsetForLineNumber(n.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:s}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,i,n){this._viewportStart.update(this,e)}getActiveIndentGuide(e,i,n){return this._lines.getActiveIndentGuide(e,i,n)}getLinesIndentGuides(e,i){return this._lines.getViewLinesIndentGuides(e,i)}getBracketGuidesInRangeByLine(e,i,n,s){return this._lines.getViewLinesBracketGuides(e,i,n,s)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){const i=Ty(this.getLineContent(e));return i===-1?0:i+1}getLineLastNonWhitespaceColumn(e){const i=ME(this.getLineContent(e));return i===-1?0:i+2}getMinimapDecorationsInRange(e){return this._decorations.getMinimapDecorationsInRange(e)}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}getViewportViewLineRenderingData(e,i){const s=this._decorations.getDecorationsViewportData(e).inlineDecorations[i-e.startLineNumber];return this._getViewLineRenderingData(i,s)}getViewLineRenderingData(e){const i=this._decorations.getInlineDecorationsOnLine(e);return this._getViewLineRenderingData(e,i)}_getViewLineRenderingData(e,i){const n=this.model.mightContainRTL(),s=this.model.mightContainNonBasicASCII(),c=this.getTabSize(),d=this._lines.getViewLineData(e);return d.inlineDecorations&&(i=[...i,...d.inlineDecorations.map(f=>f.toInlineDecoration(e))]),new Iw(d.minColumn,d.maxColumn,d.content,d.continuesWithWrappedLine,n,s,d.tokens,i,c,d.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,i,n){const s=this._lines.getViewLinesData(e,i,n);return new Awi(this.getTabSize(),s)}getAllOverviewRulerDecorations(e){const i=this.model.getOverviewRulerDecorations(this._editorId,G1e(this._configuration.options)),n=new K2i;for(const s of i){const c=s.options,d=c.overviewRuler;if(!d)continue;const f=d.position;if(f===0)continue;const m=d.getColor(e.value),v=this.coordinatesConverter.getViewLineNumberOfModelPosition(s.range.startLineNumber,s.range.startColumn),x=this.coordinatesConverter.getViewLineNumberOfModelPosition(s.range.endLineNumber,s.range.endColumn);n.accept(m,c.zIndex,v,x,f)}return n.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const i of e){const n=i.options.overviewRuler;n==null||n.invalidateCachedColor();const s=i.options.minimap;s==null||s.invalidateCachedColor()}}getValueInRange(e,i){const n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(n,i)}getValueLengthInRange(e,i){const n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(n,i)}modifyPosition(e,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e),s=this.model.modifyPosition(n,i);return this.coordinatesConverter.convertModelPositionToViewPosition(s)}deduceModelPositionRelativeToViewPosition(e,i,n){const s=this.coordinatesConverter.convertViewPositionToModelPosition(e);this.model.getEOL().length===2&&(i<0?i-=n:i+=n);const d=this.model.getOffsetAt(s)+i;return this.model.getPositionAt(d)}getPlainTextToCopy(e,i,n){const s=n?`\r
+`:this.model.getEOL();e=e.slice(0),e.sort(nt.compareRangesUsingStarts);let c=!1,d=!1;for(const m of e)m.isEmpty()?c=!0:d=!0;if(!d){if(!i)return"";const m=e.map(x=>x.startLineNumber);let v="";for(let x=0;x<m.length;x++)x>0&&m[x-1]===m[x]||(v+=this.model.getLineContent(m[x])+s);return v}if(c&&i){const m=[];let v=0;for(const x of e){const w=x.startLineNumber;x.isEmpty()?w!==v&&m.push(this.model.getLineContent(w)):m.push(this.model.getValueInRange(x,n?2:0)),v=w}return m.length===1?m[0]:m}const f=[];for(const m of e)m.isEmpty()||f.push(this.model.getValueInRange(m,n?2:0));return f.length===1?f[0]:f}getRichTextToCopy(e,i){const n=this.model.getLanguageId();if(n===bv||e.length!==1)return null;let s=e[0];if(s.isEmpty()){if(!i)return null;const x=s.startLineNumber;s=new nt(x,this.model.getLineMinColumn(x),x,this.model.getLineMaxColumn(x))}const c=this._configuration.options.get(50),d=this._getColorMap(),m=/[:;\\\/<>]/.test(c.fontFamily)||c.fontFamily===vv.fontFamily;let v;return m?v=vv.fontFamily:(v=c.fontFamily,v=v.replace(/"/g,"'"),/[,']/.test(v)||/[+ ]/.test(v)&&(v=`'${v}'`),v=`${v}, ${vv.fontFamily}`),{mode:n,html:`<div style="color: ${d[1]};background-color: ${d[2]};font-family: ${v};font-weight: ${c.fontWeight};font-size: ${c.fontSize}px;line-height: ${c.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(s,d)+"</div>"}}_getHTMLToCopy(e,i){const n=e.startLineNumber,s=e.startColumn,c=e.endLineNumber,d=e.endColumn,f=this.getTabSize();let m="";for(let v=n;v<=c;v++){const x=this.model.tokenization.getLineTokens(v),w=x.getLineContent(),I=v===n?s-1:0,P=v===c?d-1:w.length;w===""?m+="<br>":m+=c0i(w,x.inflate(),i,I,P,f,I0)}return m}_getColorMap(){const e=Oh.getColorMap(),i=["#000000"];if(e)for(let n=1,s=e.length;n<s;n++)i[n]=In.Format.CSS.formatHex(e[n]);return i}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(e,i,n){return this._withViewEventsCollector(s=>this._cursor.setStates(s,e,i,n))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,i,n=0){this._withViewEventsCollector(s=>this._cursor.setSelections(s,e,i,n))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(i=>this._cursor.restoreState(i,e))}_executeCursorEdit(e){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new w2i);return}this._withViewEventsCollector(e)}executeEdits(e,i,n){this._executeCursorEdit(s=>this._cursor.executeEdits(s,e,i,n))}startComposition(){this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._executeCursorEdit(i=>this._cursor.endComposition(i,e))}type(e,i){this._executeCursorEdit(n=>this._cursor.type(n,e,i))}compositionType(e,i,n,s,c){this._executeCursorEdit(d=>this._cursor.compositionType(d,e,i,n,s,c))}paste(e,i,n,s){this._executeCursorEdit(c=>this._cursor.paste(c,e,i,n,s))}cut(e){this._executeCursorEdit(i=>this._cursor.cut(i,e))}executeCommand(e,i){this._executeCursorEdit(n=>this._cursor.executeCommand(n,e,i))}executeCommands(e,i){this._executeCursorEdit(n=>this._cursor.executeCommands(n,e,i))}revealAllCursors(e,i,n=!1){this._withViewEventsCollector(s=>this._cursor.revealAll(s,e,n,0,i,0))}revealPrimaryCursor(e,i,n=!1){this._withViewEventsCollector(s=>this._cursor.revealPrimary(s,e,n,0,i,0))}revealTopMostCursor(e){const i=this._cursor.getTopMostViewPosition(),n=new nt(i.lineNumber,i.column,i.lineNumber,i.column);this._withViewEventsCollector(s=>s.emitViewEvent(new Gie(e,!1,n,null,0,!0,0)))}revealBottomMostCursor(e){const i=this._cursor.getBottomMostViewPosition(),n=new nt(i.lineNumber,i.column,i.lineNumber,i.column);this._withViewEventsCollector(s=>s.emitViewEvent(new Gie(e,!1,n,null,0,!0,0)))}revealRange(e,i,n,s,c){this._withViewEventsCollector(d=>d.emitViewEvent(new Gie(e,!1,n,null,s,i,c)))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new y2i),this._eventDispatcher.emitOutgoingEvent(new C2i))}_withViewEventsCollector(e){return this._transactionalTarget.batchChanges(()=>{try{const i=this._eventDispatcher.beginEmitViewEvents();return e(i)}finally{this._eventDispatcher.endEmitViewEvents()}})}batchEvents(e){this._withViewEventsCollector(()=>{e()})}normalizePosition(e,i){return this._lines.normalizePosition(e,i)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}};class uGe{static create(e){const i=e._setTrackedRange(null,new nt(1,1,1,1),1);return new uGe(e,1,!1,i,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,i,n,s,c){this._model=e,this._viewLineNumber=i,this._isValid=n,this._modelTrackedRange=s,this._startLineDelta=c}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,i){const n=e.coordinatesConverter.convertViewPositionToModelPosition(new pi(i,e.getLineMinColumn(i))),s=e.model._setTrackedRange(this._modelTrackedRange,new nt(n.lineNumber,n.column,n.lineNumber,n.column),1),c=e.viewLayout.getVerticalOffsetForLineNumber(i),d=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=i,this._isValid=!0,this._modelTrackedRange=s,this._startLineDelta=d-c}invalidate(){this._isValid=!1}}class K2i{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,i,n,s,c){const d=this._asMap[e];if(d){const f=d.data,m=f[f.length-3],v=f[f.length-1];if(m===c&&v+1>=n){s>v&&(f[f.length-1]=s);return}f.push(c,n,s)}else{const f=new yre(e,i,[c,n,s]);this._asMap[e]=f,this.asArray.push(f)}}}class X2i{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,i){const n=this.hiddenAreas.get(e);n&&KSt(n,i)||(this.hiddenAreas.set(e,i),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const e=Array.from(this.hiddenAreas.values()).reduce((i,n)=>Q2i(i,n),[]);return KSt(this.ranges,e)?this.ranges:(this.ranges=e,this.ranges)}}function Q2i(l,e){const i=[];let n=0,s=0;for(;n<l.length&&s<e.length;){const c=l[n],d=e[s];if(c.endLineNumber<d.startLineNumber-1)i.push(l[n++]);else if(d.endLineNumber<c.startLineNumber-1)i.push(e[s++]);else{const f=Math.min(c.startLineNumber,d.startLineNumber),m=Math.max(c.endLineNumber,d.endLineNumber);i.push(new nt(f,1,m,1)),n++,s++}}for(;n<l.length;)i.push(l[n++]);for(;s<e.length;)i.push(e[s++]);return i}function KSt(l,e){if(l.length!==e.length)return!1;for(let i=0;i<l.length;i++)if(!l[i].equalsRange(e[i]))return!1;return!0}class XSt{constructor(e,i){this.viewportStartModelPosition=e,this.startLineDelta=i}recoverViewportStart(e,i){if(!this.viewportStartModelPosition)return;const n=e.convertModelPositionToViewPosition(this.viewportStartModelPosition),s=i.getVerticalOffsetForLineNumber(n.lineNumber);i.setScrollPosition({scrollTop:s+this.startLineDelta},1)}}var Z2i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},f4=function(l,e){return function(i,n){e(i,n,l)}},LF,L9;let Dre=(L9=class extends xi{get isSimpleWidget(){return this._configuration.isSimpleWidget}get contextMenuId(){return this._configuration.contextMenuId}constructor(e,i,n,s,c,d,f,m,v,x,w,I){super(),this.languageConfigurationService=w,this._deliveryQueue=ali(),this._contributions=this._register(new r2i),this._onDidDispose=this._register(new gi),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new gi({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new gi({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new gi({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new gi({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new gi({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new gi({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new gi({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onWillChangeModel=this._register(new gi({deliveryQueue:this._deliveryQueue})),this.onWillChangeModel=this._onWillChangeModel.event,this._onDidChangeModel=this._register(new gi({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new gi({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new gi({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new py(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new gi({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new QSt({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new QSt({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new py(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new py(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new py(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new py(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new py(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new py(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new py(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new py(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new py(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new py(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new py(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new py(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new py(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new py(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new py(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new py(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new py(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new gi({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new gi({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new gi({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new gi({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._updateCounter=0,this._onBeginUpdate=this._register(new gi),this.onBeginUpdate=this._onBeginUpdate.event,this._onEndUpdate=this._register(new gi),this.onEndUpdate=this._onEndUpdate.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),c.willCreateCodeEditor();const P={...i};this._domElement=e,this._overflowWidgetsDomNode=P.overflowWidgetsDomNode,delete P.overflowWidgetsDomNode,this._id=++Y2i,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=n.telemetryData,this._configuration=this._register(this._createConfiguration(n.isSimpleWidget||!1,n.contextMenuId??(n.isSimpleWidget?As.SimpleEditorContext:As.EditorContext),P,x)),this._register(this._configuration.onDidChange(J=>{this._onDidChangeConfiguration.fire(J);const Y=this._configuration.options;if(J.hasChanged(146)){const ae=Y.get(146);this._onDidLayoutChange.fire(ae)}})),this._contextKeyService=this._register(f.createScoped(this._domElement)),this._notificationService=v,this._codeEditorService=c,this._commandService=d,this._themeService=m,this._register(new tTi(this,this._contextKeyService)),this._register(new iTi(this,this._contextKeyService,I)),this._instantiationService=this._register(s.createChild(new IJ([Ko,this._contextKeyService]))),this._modelData=null,this._focusTracker=new nTi(e,this._overflowWidgetsDomNode),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={};let O;Array.isArray(n.contributions)?O=n.contributions:O=p9.getEditorContributions(),this._contributions.initialize(this,O,this._instantiationService);for(const J of p9.getEditorActions()){if(this._actions.has(J.id)){Pa(new Error(`Cannot have two actions with the same id ${J.id}`));continue}const Y=new NIt(J.id,J.label,J.alias,J.metadata,J.precondition??void 0,ae=>this._instantiationService.invokeFunction(me=>Promise.resolve(J.runEditorCommand(me,this,ae))),this._contextKeyService);this._actions.set(Y.id,Y)}const z=()=>!this._configuration.options.get(92)&&this._configuration.options.get(36).enabled;this._register(new bdi(this._domElement,{onDragOver:J=>{if(!z())return;const Y=this.getTargetAtClientPoint(J.clientX,J.clientY);Y!=null&&Y.position&&this.showDropIndicatorAt(Y.position)},onDrop:async J=>{if(!z()||(this.removeDropIndicator(),!J.dataTransfer))return;const Y=this.getTargetAtClientPoint(J.clientX,J.clientY);Y!=null&&Y.position&&this._onDropIntoEditor.fire({position:Y.position,event:J})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){var i;(i=this._modelData)==null||i.view.writeScreenReaderContent(e)}_createConfiguration(e,i,n,s){return new tje(e,i,n,this._domElement,s)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return Ase.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?hu.getWordAtPosition(this._modelData.model,this._configuration.options.get(132),this._configuration.options.get(131),e):null}getValue(e=null){if(!this._modelData)return"";const i=!!(e&&e.preserveBOM);let n=0;return e&&e.lineEnding&&e.lineEnding===`
+`?n=1:e&&e.lineEnding&&e.lineEnding===`\r
+`&&(n=2),this._modelData.model.getValue(n,i)}setValue(e){try{if(this._beginUpdate(),!this._modelData)return;this._modelData.model.setValue(e)}finally{this._endUpdate()}}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){var i;try{this._beginUpdate();const n=e;if(this._modelData===null&&n===null||this._modelData&&this._modelData.model===n)return;const s={oldModelUrl:((i=this._modelData)==null?void 0:i.model.uri)||null,newModelUrl:(n==null?void 0:n.uri)||null};this._onWillChangeModel.fire(s);const c=this.hasTextFocus(),d=this._detachModel();this._attachModel(n),c&&this.hasModel()&&this.focus(),this._removeDecorationTypes(),this._onDidChangeModel.fire(s),this._postDetachModelCleanup(d),this._contributionsDisposable=this._contributions.onAfterModelAttached()}finally{this._endUpdate()}}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const i=this._decorationTypeSubtypes[e];for(const n in i)this._removeDecorationType(e+"-"+n)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,i,n,s){const c=e.model.validatePosition({lineNumber:i,column:n}),d=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(c);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(d.lineNumber,s)}getTopForLineNumber(e,i=!1){return this._modelData?LF._getVerticalOffsetForPosition(this._modelData,e,1,i):-1}getTopForPosition(e,i){return this._modelData?LF._getVerticalOffsetForPosition(this._modelData,e,i,!1):-1}static _getVerticalOffsetForPosition(e,i,n,s=!1){const c=e.model.validatePosition({lineNumber:i,column:n}),d=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(c);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(d.lineNumber,s)}getBottomForLineNumber(e,i=!1){if(!this._modelData)return-1;const n=this._modelData.model.getLineMaxColumn(e);return LF._getVerticalOffsetAfterPosition(this._modelData,e,n,i)}setHiddenAreas(e,i){var n;(n=this._modelData)==null||n.viewModel.setHiddenAreas(e.map(s=>nt.lift(s)),i)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const i=this._modelData.model.validatePosition(e),n=this._modelData.model.getOptions().tabSize;return em.visibleColumnFromColumn(this._modelData.model.getLineContent(i.lineNumber),i.column,n)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,i="api"){if(this._modelData){if(!pi.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(i,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,i,n,s){if(!this._modelData)return;if(!nt.isIRange(e))throw new Error("Invalid arguments");const c=this._modelData.model.validateRange(e),d=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(c);this._modelData.viewModel.revealRange("api",n,d,i,s)}revealLine(e,i=0){this._revealLine(e,0,i)}revealLineInCenter(e,i=0){this._revealLine(e,1,i)}revealLineInCenterIfOutsideViewport(e,i=0){this._revealLine(e,2,i)}revealLineNearTop(e,i=0){this._revealLine(e,5,i)}_revealLine(e,i,n){if(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new nt(e,1,e,1),i,!1,n)}revealPosition(e,i=0){this._revealPosition(e,0,!0,i)}revealPositionInCenter(e,i=0){this._revealPosition(e,1,!0,i)}revealPositionInCenterIfOutsideViewport(e,i=0){this._revealPosition(e,2,!0,i)}revealPositionNearTop(e,i=0){this._revealPosition(e,5,!0,i)}_revealPosition(e,i,n,s){if(!pi.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new nt(e.lineNumber,e.column,e.lineNumber,e.column),i,n,s)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,i="api"){const n=Us.isISelection(e),s=nt.isIRange(e);if(!n&&!s)throw new Error("Invalid arguments");if(n)this._setSelectionImpl(e,i);else if(s){const c={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(c,i)}}_setSelectionImpl(e,i){if(!this._modelData)return;const n=new Us(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(i,[n])}revealLines(e,i,n=0){this._revealLines(e,i,0,n)}revealLinesInCenter(e,i,n=0){this._revealLines(e,i,1,n)}revealLinesInCenterIfOutsideViewport(e,i,n=0){this._revealLines(e,i,2,n)}revealLinesNearTop(e,i,n=0){this._revealLines(e,i,5,n)}_revealLines(e,i,n,s){if(typeof e!="number"||typeof i!="number")throw new Error("Invalid arguments");this._sendRevealRange(new nt(e,1,i,1),n,!1,s)}revealRange(e,i=0,n=!1,s=!0){this._revealRange(e,n?1:0,s,i)}revealRangeInCenter(e,i=0){this._revealRange(e,1,!0,i)}revealRangeInCenterIfOutsideViewport(e,i=0){this._revealRange(e,2,!0,i)}revealRangeNearTop(e,i=0){this._revealRange(e,5,!0,i)}revealRangeNearTopIfOutsideViewport(e,i=0){this._revealRange(e,6,!0,i)}revealRangeAtTop(e,i=0){this._revealRange(e,3,!0,i)}_revealRange(e,i,n,s){if(!nt.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(nt.lift(e),i,n,s)}setSelections(e,i="api",n=0){if(this._modelData){if(!e||e.length===0)throw new Error("Invalid arguments");for(let s=0,c=e.length;s<c;s++)if(!Us.isISelection(e[s]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(i,e,n)}}getContentWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1}getScrollWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1}getScrollLeft(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1}getContentHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1}getScrollHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1}getScrollTop(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1}setScrollLeft(e,i=1){if(this._modelData){if(typeof e!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollLeft:e},i)}}setScrollTop(e,i=1){if(this._modelData){if(typeof e!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollTop:e},i)}}setScrollPosition(e,i=1){this._modelData&&this._modelData.viewModel.viewLayout.setScrollPosition(e,i)}hasPendingScrollAnimation(){return this._modelData?this._modelData.viewModel.viewLayout.hasPendingScrollAnimation():!1}saveViewState(){if(!this._modelData)return null;const e=this._contributions.saveViewState(),i=this._modelData.viewModel.saveCursorState(),n=this._modelData.viewModel.saveState();return{cursorState:i,viewState:n,contributionsState:e}}restoreViewState(e){if(!this._modelData||!this._modelData.hasRealView)return;const i=e;if(i&&i.cursorState&&i.viewState){const n=i.cursorState;Array.isArray(n)?n.length>0&&this._modelData.viewModel.restoreCursorState(n):this._modelData.viewModel.restoreCursorState([n]),this._contributions.restoreViewState(i.contributionsState||{});const s=this._modelData.viewModel.reduceRestoreState(i.viewState);this._modelData.view.restoreState(s)}}handleInitialized(){var e;(e=this._getViewModel())==null||e.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter(i=>i.isSupported()),e}getAction(e){return this._actions.get(e)||null}trigger(e,i,n){n=n||{};try{switch(this._beginUpdate(),i){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(e);return;case"type":{const c=n;this._type(e,c.text||"");return}case"replacePreviousChar":{const c=n;this._compositionType(e,c.text||"",c.replaceCharCnt||0,0,0);return}case"compositionType":{const c=n;this._compositionType(e,c.text||"",c.replacePrevCharCnt||0,c.replaceNextCharCnt||0,c.positionDelta||0);return}case"paste":{const c=n;this._paste(e,c.text||"",c.pasteOnNewLine||!1,c.multicursorText||null,c.mode||null,c.clipboardEvent);return}case"cut":this._cut(e);return}const s=this.getAction(i);if(s){Promise.resolve(s.run(n)).then(void 0,Pa);return}if(!this._modelData||this._triggerEditorCommand(e,i,n))return;this._triggerCommand(i,n)}finally{this._endUpdate()}}_triggerCommand(e,i){this._commandService.executeCommand(e,i)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,i){!this._modelData||i.length===0||(e==="keyboard"&&this._onWillType.fire(i),this._modelData.viewModel.type(i,e),e==="keyboard"&&this._onDidType.fire(i))}_compositionType(e,i,n,s,c){this._modelData&&this._modelData.viewModel.compositionType(i,n,s,c,e)}_paste(e,i,n,s,c,d){if(!this._modelData)return;const f=this._modelData.viewModel,m=f.getSelection().getStartPosition();f.paste(i,n,s,e);const v=f.getSelection().getStartPosition();e==="keyboard"&&this._onDidPaste.fire({clipboardEvent:d,range:new nt(m.lineNumber,m.column,v.lineNumber,v.column),languageId:c})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,i,n){const s=p9.getEditorCommand(i);return s?(n=n||{},n.source=e,this._instantiationService.invokeFunction(c=>{Promise.resolve(s.runEditorCommand(c,this,n)).then(void 0,Pa)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(92)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(92)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(e,i,n){if(!this._modelData||this._configuration.options.get(92))return!1;let s;return n?Array.isArray(n)?s=()=>n:s=n:s=()=>null,this._modelData.viewModel.executeEdits(e,i,s),!0}executeCommand(e,i){this._modelData&&this._modelData.viewModel.executeCommand(i,e)}executeCommands(e,i){this._modelData&&this._modelData.viewModel.executeCommands(i,e)}createDecorationsCollection(e){return new rTi(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,G1e(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,G1e(this._configuration.options)):null}deltaDecorations(e,i){return this._modelData?e.length===0&&i.length===0?e:this._modelData.model.deltaDecorations(e,i,this._id):[]}removeDecorations(e){!this._modelData||e.length===0||this._modelData.model.changeDecorations(i=>{i.deltaDecorations(e,[])})}removeDecorationsByType(e){const i=this._decorationTypeKeysToIds[e];i&&this.changeDecorations(n=>n.deltaDecorations(i,[])),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(146)}createOverviewRuler(e){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(e)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e,i=!1){this._configuration.observeContainer(e),i||this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const i={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id:"+e.getId()),this._contentWidgets[e.getId()]=i,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(i)}layoutContentWidget(e){const i=e.getId();if(this._contentWidgets.hasOwnProperty(i)){const n=this._contentWidgets[i];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(n)}}removeContentWidget(e){const i=e.getId();if(this._contentWidgets.hasOwnProperty(i)){const n=this._contentWidgets[i];delete this._contentWidgets[i],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(n)}}addOverlayWidget(e){const i={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=i,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(i)}layoutOverlayWidget(e){const i=e.getId();if(this._overlayWidgets.hasOwnProperty(i)){const n=this._overlayWidgets[i];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(n)}}removeOverlayWidget(e){const i=e.getId();if(this._overlayWidgets.hasOwnProperty(i)){const n=this._overlayWidgets[i];delete this._overlayWidgets[i],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(n)}}addGlyphMarginWidget(e){const i={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=i,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(i)}layoutGlyphMarginWidget(e){const i=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(i)){const n=this._glyphMarginWidgets[i];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(n)}}removeGlyphMarginWidget(e){const i=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(i)){const n=this._glyphMarginWidgets[i];delete this._glyphMarginWidgets[i],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(n)}}changeViewZones(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(e)}getTargetAtClientPoint(e,i){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(e,i)}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const i=this._modelData.model.validatePosition(e),n=this._configuration.options,s=n.get(146),c=LF._getVerticalOffsetForPosition(this._modelData,i.lineNumber,i.column)-this.getScrollTop(),d=this._modelData.view.getOffsetForColumn(i.lineNumber,i.column)+s.glyphMarginWidth+s.lineNumbersWidth+s.decorationsWidth-this.getScrollLeft();return{top:c,left:d,height:n.get(67)}}getOffsetForColumn(e,i){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(e,i)}render(e=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.viewModel.batchEvents(()=>{this._modelData.view.render(!0,e)})}setAriaOptions(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(e)}applyFontInfo(e){a0(e,this._configuration.options.get(50))}setBanner(e,i){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),this._bannerDomNode=e,this._configuration.setReservedHeight(e?i:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e){this._modelData=null;return}const i=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());const n=e.onBeforeAttached(),s=new G2i(this._id,this._configuration,e,iGe.create(Eo(this._domElement)),nGe.create(this._configuration.options),f=>ZC(Eo(this._domElement),f),this.languageConfigurationService,this._themeService,n,{batchChanges:f=>{try{return this._beginUpdate(),f()}finally{this._endUpdate()}}});i.push(e.onWillDispose(()=>this.setModel(null))),i.push(s.onEvent(f=>{switch(f.kind){case 0:this._onDidContentSizeChange.fire(f);break;case 1:this._editorTextFocus.setValue(f.hasFocus);break;case 2:this._onDidScrollChange.fire(f);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(f.reachedMaxCursorCount){const w=this.getOption(80),I=W("cursors.maximum","The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",w);this._notificationService.prompt(QSe.Warning,I,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:W("goToSetting","Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const m=[];for(let w=0,I=f.selections.length;w<I;w++)m[w]=f.selections[w].getPosition();const v={position:m[0],secondaryPositions:m.slice(1),reason:f.reason,source:f.source};this._onDidChangeCursorPosition.fire(v);const x={selection:f.selections[0],secondarySelections:f.selections.slice(1),modelVersionId:f.modelVersionId,oldSelections:f.oldSelections,oldModelVersionId:f.oldModelVersionId,source:f.source,reason:f.reason};this._onDidChangeCursorSelection.fire(x);break}case 7:this._onDidChangeModelDecorations.fire(f.event);break;case 8:this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._onDidChangeModelLanguage.fire(f.event);break;case 9:this._onDidChangeModelLanguageConfiguration.fire(f.event);break;case 10:this._onDidChangeModelContent.fire(f.event);break;case 11:this._onDidChangeModelOptions.fire(f.event);break;case 12:this._onDidChangeModelTokens.fire(f.event);break}}));const[c,d]=this._createView(s);if(d){this._domElement.appendChild(c.domNode.domNode);let f=Object.keys(this._contentWidgets);for(let m=0,v=f.length;m<v;m++){const x=f[m];c.addContentWidget(this._contentWidgets[x])}f=Object.keys(this._overlayWidgets);for(let m=0,v=f.length;m<v;m++){const x=f[m];c.addOverlayWidget(this._overlayWidgets[x])}f=Object.keys(this._glyphMarginWidgets);for(let m=0,v=f.length;m<v;m++){const x=f[m];c.addGlyphMarginWidget(this._glyphMarginWidgets[x])}c.render(!1,!0),c.domNode.domNode.setAttribute("data-uri",e.uri.toString())}this._modelData=new eTi(e,s,c,d,i,n)}_createView(e){let i;this.isSimpleWidget?i={paste:(c,d,f,m)=>{this._paste("keyboard",c,d,f,m)},type:c=>{this._type("keyboard",c)},compositionType:(c,d,f,m)=>{this._compositionType("keyboard",c,d,f,m)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:i={paste:(c,d,f,m)=>{const v={text:c,pasteOnNewLine:d,multicursorText:f,mode:m};this._commandService.executeCommand("paste",v)},type:c=>{const d={text:c};this._commandService.executeCommand("type",d)},compositionType:(c,d,f,m)=>{if(f||m){const v={text:c,replacePrevCharCnt:d,replaceNextCharCnt:f,positionDelta:m};this._commandService.executeCommand("compositionType",v)}else{const v={text:c,replaceCharCnt:d};this._commandService.executeCommand("replacePreviousChar",v)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const n=new Rwe(e.coordinatesConverter);return n.onKeyDown=c=>this._onKeyDown.fire(c),n.onKeyUp=c=>this._onKeyUp.fire(c),n.onContextMenu=c=>this._onContextMenu.fire(c),n.onMouseMove=c=>this._onMouseMove.fire(c),n.onMouseLeave=c=>this._onMouseLeave.fire(c),n.onMouseDown=c=>this._onMouseDown.fire(c),n.onMouseUp=c=>this._onMouseUp.fire(c),n.onMouseDrag=c=>this._onMouseDrag.fire(c),n.onMouseDrop=c=>this._onMouseDrop.fire(c),n.onMouseDropCanceled=c=>this._onMouseDropCanceled.fire(c),n.onMouseWheel=c=>this._onMouseWheel.fire(c),[new pje(i,this._configuration,this._themeService.getColorTheme(),e,n,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(e){e==null||e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){var n;if((n=this._contributionsDisposable)==null||n.dispose(),this._contributionsDisposable=void 0,!this._modelData)return null;const e=this._modelData.model,i=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),i&&this._domElement.contains(i)&&i.remove(),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return this._modelData!==null}showDropIndicatorAt(e){const i=[{range:new nt(e.lineNumber,e.column,e.lineNumber,e.column),options:LF.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(i),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(e,i){this._contextKeyService.createKey(e,i)}_beginUpdate(){this._updateCounter++,this._updateCounter===1&&this._onBeginUpdate.fire()}_endUpdate(){this._updateCounter--,this._updateCounter===0&&this._onEndUpdate.fire()}},LF=L9,L9.dropIntoEditorDecorationOptions=qa.register({description:"workbench-dnd-target",className:"dnd-target"}),L9);Dre=LF=Z2i([f4(3,ho),f4(4,Bl),f4(5,qd),f4(6,Ko),f4(7,im),f4(8,w_),f4(9,tS),f4(10,rh),f4(11,Ts)],Dre);let Y2i=0;class eTi{constructor(e,i,n,s,c,d){this.model=e,this.viewModel=i,this.view=n,this.hasRealView=s,this.listenersToRemove=c,this.attachedView=d}dispose(){vd(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}class QSt extends xi{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new gi(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new gi(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const i=e?2:1;this._value!==i&&(this._value=i,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}class py extends gi{constructor(e,i){super({deliveryQueue:i}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}}class tTi extends xi{constructor(e,i){super(),this._editor=e,i.createKey("editorId",e.getId()),this._editorSimpleInput=Tt.editorSimpleInput.bindTo(i),this._editorFocus=Tt.focus.bindTo(i),this._textInputFocus=Tt.textInputFocus.bindTo(i),this._editorTextFocus=Tt.editorTextFocus.bindTo(i),this._tabMovesFocus=Tt.tabMovesFocus.bindTo(i),this._editorReadonly=Tt.readOnly.bindTo(i),this._inDiffEditor=Tt.inDiffEditor.bindTo(i),this._editorColumnSelection=Tt.columnSelection.bindTo(i),this._hasMultipleSelections=Tt.hasMultipleSelections.bindTo(i),this._hasNonEmptySelection=Tt.hasNonEmptySelection.bindTo(i),this._canUndo=Tt.canUndo.bindTo(i),this._canRedo=Tt.canRedo.bindTo(i),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._register(q$.onDidChangeTabFocus(n=>this._tabMovesFocus.set(n))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._tabMovesFocus.set(q$.getTabFocusMode()),this._editorReadonly.set(e.get(92)),this._inDiffEditor.set(e.get(61)),this._editorColumnSelection.set(e.get(22))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(i=>!i.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(!!(e&&e.canUndo())),this._canRedo.set(!!(e&&e.canRedo()))}}class iTi extends xi{constructor(e,i,n){super(),this._editor=e,this._contextKeyService=i,this._languageFeaturesService=n,this._langId=Tt.languageId.bindTo(i),this._hasCompletionItemProvider=Tt.hasCompletionItemProvider.bindTo(i),this._hasCodeActionsProvider=Tt.hasCodeActionsProvider.bindTo(i),this._hasCodeLensProvider=Tt.hasCodeLensProvider.bindTo(i),this._hasDefinitionProvider=Tt.hasDefinitionProvider.bindTo(i),this._hasDeclarationProvider=Tt.hasDeclarationProvider.bindTo(i),this._hasImplementationProvider=Tt.hasImplementationProvider.bindTo(i),this._hasTypeDefinitionProvider=Tt.hasTypeDefinitionProvider.bindTo(i),this._hasHoverProvider=Tt.hasHoverProvider.bindTo(i),this._hasDocumentHighlightProvider=Tt.hasDocumentHighlightProvider.bindTo(i),this._hasDocumentSymbolProvider=Tt.hasDocumentSymbolProvider.bindTo(i),this._hasReferenceProvider=Tt.hasReferenceProvider.bindTo(i),this._hasRenameProvider=Tt.hasRenameProvider.bindTo(i),this._hasSignatureHelpProvider=Tt.hasSignatureHelpProvider.bindTo(i),this._hasInlayHintsProvider=Tt.hasInlayHintsProvider.bindTo(i),this._hasDocumentFormattingProvider=Tt.hasDocumentFormattingProvider.bindTo(i),this._hasDocumentSelectionFormattingProvider=Tt.hasDocumentSelectionFormattingProvider.bindTo(i),this._hasMultipleDocumentFormattingProvider=Tt.hasMultipleDocumentFormattingProvider.bindTo(i),this._hasMultipleDocumentSelectionFormattingProvider=Tt.hasMultipleDocumentSelectionFormattingProvider.bindTo(i),this._isInEmbeddedEditor=Tt.isInEmbeddedEditor.bindTo(i);const s=()=>this._update();this._register(e.onDidChangeModel(s)),this._register(e.onDidChangeModelLanguage(s)),this._register(n.completionProvider.onDidChange(s)),this._register(n.codeActionProvider.onDidChange(s)),this._register(n.codeLensProvider.onDidChange(s)),this._register(n.definitionProvider.onDidChange(s)),this._register(n.declarationProvider.onDidChange(s)),this._register(n.implementationProvider.onDidChange(s)),this._register(n.typeDefinitionProvider.onDidChange(s)),this._register(n.hoverProvider.onDidChange(s)),this._register(n.documentHighlightProvider.onDidChange(s)),this._register(n.documentSymbolProvider.onDidChange(s)),this._register(n.referenceProvider.onDidChange(s)),this._register(n.renameProvider.onDidChange(s)),this._register(n.documentFormattingEditProvider.onDidChange(s)),this._register(n.documentRangeFormattingEditProvider.onDidChange(s)),this._register(n.signatureHelpProvider.onDidChange(s)),this._register(n.inlayHintsProvider.onDidChange(s)),s()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInEmbeddedEditor.reset()})}_update(){const e=this._editor.getModel();if(!e){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInEmbeddedEditor.set(e.uri.scheme===Ma.walkThroughSnippet||e.uri.scheme===Ma.vscodeChatCodeBlock)})}}class nTi extends xi{constructor(e,i){super(),this._onChange=this._register(new gi),this.onChange=this._onChange.event,this._hadFocus=void 0,this._hasDomElementFocus=!1,this._domFocusTracker=this._register(zE(e)),this._overflowWidgetsDomNodeHasFocus=!1,this._register(this._domFocusTracker.onDidFocus(()=>{this._hasDomElementFocus=!0,this._update()})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasDomElementFocus=!1,this._update()})),i&&(this._overflowWidgetsDomNode=this._register(zE(i)),this._register(this._overflowWidgetsDomNode.onDidFocus(()=>{this._overflowWidgetsDomNodeHasFocus=!0,this._update()})),this._register(this._overflowWidgetsDomNode.onDidBlur(()=>{this._overflowWidgetsDomNodeHasFocus=!1,this._update()})))}_update(){const e=this._hasDomElementFocus||this._overflowWidgetsDomNodeHasFocus;this._hadFocus!==e&&(this._hadFocus=e,this._onChange.fire(void 0))}hasFocus(){return this._hadFocus??!1}}class rTi{get length(){return this._decorationIds.length}constructor(e,i){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(i)&&i.length>0&&this.set(i)}onDidChange(e,i,n){return this._editor.onDidChangeModelDecorations(s=>{this._isChangingDecorations||e.call(i,s)},n)}getRange(e){return!this._editor.hasModel()||e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e])}getRanges(){if(!this._editor.hasModel())return[];const e=this._editor.getModel(),i=[];for(const n of this._decorationIds){const s=e.getDecorationRange(n);s&&i.push(s)}return i}has(e){return this._decorationIds.includes(e.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations(i=>{this._decorationIds=i.deltaDecorations(this._decorationIds,e)})}finally{this._isChangingDecorations=!1}return this._decorationIds}append(e){let i=[];try{this._isChangingDecorations=!0,this._editor.changeDecorations(n=>{i=n.deltaDecorations([],e),this._decorationIds=this._decorationIds.concat(i)})}finally{this._isChangingDecorations=!1}return i}}const sTi=encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),oTi=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function C9e(l){return sTi+encodeURIComponent(l.toString())+oTi}const aTi=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),cTi=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');function lTi(l){return aTi+encodeURIComponent(l.toString())+cTi}Dk((l,e)=>{const i=l.getColor(twe);i&&e.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${C9e(i)}") repeat-x bottom left; }`);const n=l.getColor(u6);n&&e.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${C9e(n)}") repeat-x bottom left; }`);const s=l.getColor(LL);s&&e.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${C9e(s)}") repeat-x bottom left; }`);const c=l.getColor(tpi);c&&e.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${lTi(c)}") no-repeat bottom left; }`);const d=l.getColor(Fyi);d&&e.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${d.rgba.a}; }`)});class GE{static capture(e){if(e.getScrollTop()===0||e.hasPendingScrollAnimation())return new GE(e.getScrollTop(),e.getContentHeight(),null,0,null);let i=null,n=0;const s=e.getVisibleRanges();if(s.length>0){i=s[0].getStartPosition();const c=e.getTopForPosition(i.lineNumber,i.column);n=e.getScrollTop()-c}return new GE(e.getScrollTop(),e.getContentHeight(),i,n,e.getPosition())}constructor(e,i,n,s,c){this._initialScrollTop=e,this._initialContentHeight=i,this._visiblePosition=n,this._visiblePositionScrollDelta=s,this._cursorPosition=c}restore(e){if(!(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())&&this._visiblePosition){const i=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(i+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;const i=e.getPosition();if(!this._cursorPosition||!i)return;const n=e.getTopForLineNumber(i.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+n,1)}}function uTi(l,e,i,n){if(l.length===0)return e;if(e.length===0)return l;const s=[];let c=0,d=0;for(;c<l.length&&d<e.length;){const f=l[c],m=e[d],v=i(f),x=i(m);v<x?(s.push(f),c++):v>x?(s.push(m),d++):(s.push(n(f,m)),c++,d++)}for(;c<l.length;)s.push(l[c]),c++;for(;d<e.length;)s.push(e[d]),d++;return s}function Ove(l,e){const i=new wn,n=l.createDecorationsCollection();return i.add(kse({debugName:()=>`Apply decorations from ${e.debugName}`},s=>{const c=e.read(s);n.set(c)})),i.add({dispose:()=>{n.clear()}}),i}function _q(l,e){return l.appendChild(e),fo(()=>{e.remove()})}function dTi(l,e){return l.prepend(e),fo(()=>{e.remove()})}class OIt extends xi{get width(){return this._width}get height(){return this._height}get automaticLayout(){return this._automaticLayout}constructor(e,i){super(),this._automaticLayout=!1,this.elementSizeObserver=this._register(new hIt(e,i)),this._width=bc(this,this.elementSizeObserver.getWidth()),this._height=bc(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange(n=>th(s=>{this._width.set(this.elementSizeObserver.getWidth(),s),this._height.set(this.elementSizeObserver.getHeight(),s)})))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){this._automaticLayout=e,e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}function ZSt(l,e,i){let n=e.get(),s=n,c=n;const d=bc("animatedValue",n);let f=-1;const m=300;let v;i.add(Tse({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(w,I)=>(w.didChange(e)&&(I.animate=I.animate||w.change),!0)},(w,I)=>{v!==void 0&&(l.cancelAnimationFrame(v),v=void 0),s=c,n=e.read(w),f=Date.now()-(I.animate?0:m),x()}));function x(){const w=Date.now()-f;c=Math.floor(fTi(w,s,n-s,m)),w<m?v=l.requestAnimationFrame(x):c=n,d.set(c,void 0)}return d}function fTi(l,e,i,n){return l===n?e+i:i*(-Math.pow(2,-10*l/n)+1)+e}class dGe extends xi{constructor(e,i,n){super(),this._register(new wje(e,n)),this._register(f6(n,{height:i.actualHeight,top:i.actualTop}))}}class pq{get afterLineNumber(){return this._afterLineNumber.get()}constructor(e,i){this._afterLineNumber=e,this.heightInPx=i,this.domNode=document.createElement("div"),this._actualTop=bc(this,void 0),this._actualHeight=bc(this,void 0),this.actualTop=this._actualTop,this.actualHeight=this._actualHeight,this.showInHiddenAreas=!0,this.onChange=this._afterLineNumber,this.onDomNodeTop=n=>{this._actualTop.set(n,void 0)},this.onComputedHeight=n=>{this._actualHeight.set(n,void 0)}}}const ACe=class ACe{constructor(e,i){this._editor=e,this._domElement=i,this._overlayWidgetId=`managedOverlayWidget-${ACe._counter++}`,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}};ACe._counter=0;let wje=ACe;function f6(l,e){return ba(i=>{for(let[n,s]of Object.entries(e))s&&typeof s=="object"&&"read"in s&&(s=s.read(i)),typeof s=="number"&&(s=`${s}px`),n=n.replace(/[A-Z]/g,c=>"-"+c.toLowerCase()),l.style[n]=s})}function Mve(l,e,i,n){const s=new wn,c=[];return s.add(Ib((d,f)=>{const m=e.read(d),v=new Map,x=new Map;i&&i(!0),l.changeViewZones(w=>{for(const I of c)w.removeZone(I),n==null||n.delete(I);c.length=0;for(const I of m){const P=w.addZone(I);I.setZoneId&&I.setZoneId(P),c.push(P),n==null||n.add(P),v.set(I,P)}}),i&&i(!1),f.add(Tse({createEmptyChangeSummary(){return{zoneIds:[]}},handleChange(w,I){const P=x.get(w.changedObservable);return P!==void 0&&I.zoneIds.push(P),!0}},(w,I)=>{for(const P of m)P.onChange&&(x.set(P.onChange,v.get(P)),P.onChange.read(w));i&&i(!0),l.changeViewZones(P=>{for(const O of I.zoneIds)P.layoutZone(O)}),i&&i(!1)}))})),s.add({dispose(){i&&i(!0),l.changeViewZones(d=>{for(const f of c)d.removeZone(f)}),n==null||n.clear(),i&&i(!1)}}),s}class hTi extends ih{dispose(){super.dispose(!0)}}function YSt(l,e){const i=jne(e,s=>s.original.startLineNumber<=l.lineNumber);if(!i)return nt.fromPositions(l);if(i.original.endLineNumberExclusive<=l.lineNumber){const s=l.lineNumber-i.original.endLineNumberExclusive+i.modified.endLineNumberExclusive;return nt.fromPositions(new pi(s,l.column))}if(!i.innerChanges)return nt.fromPositions(new pi(i.modified.startLineNumber,1));const n=jne(i.innerChanges,s=>s.originalRange.getStartPosition().isBeforeOrEqual(l));if(!n){const s=l.lineNumber-i.original.startLineNumber+i.modified.startLineNumber;return nt.fromPositions(new pi(s,l.column))}if(n.originalRange.containsPosition(l))return n.modifiedRange;{const s=_Ti(n.originalRange.getEndPosition(),l);return nt.fromPositions(s.addToPosition(n.modifiedRange.getEndPosition()))}}function _Ti(l,e){return l.lineNumber===e.lineNumber?new ST(0,e.column-l.column):new ST(e.lineNumber-l.lineNumber,e.column-1)}function pTi(l,e){let i;return l.filter(n=>{const s=e(n,i);return i=n,s})}class Rve{static create(e,i=void 0){return new ewt(e,e,i)}static createWithDisposable(e,i,n=void 0){const s=new wn;return s.add(i),s.add(e),new ewt(e,s,n)}}class ewt extends Rve{constructor(e,i,n){super(),this.object=e,this._disposable=i,this._debugOwner=n,this._refCount=1,this._isDisposed=!1,this._owners=[],n&&this._addOwner(n)}_addOwner(e){e&&this._owners.push(e)}createNewRef(e){return this._refCount++,e&&this._addOwner(e),new mTi(this,e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._decreaseRefCount(this._debugOwner))}_decreaseRefCount(e){if(this._refCount--,this._refCount===0&&this._disposable.dispose(),e){const i=this._owners.indexOf(e);i!==-1&&this._owners.splice(i,1)}}}class mTi extends Rve{constructor(e,i){super(),this._base=e,this._debugOwner=i,this._isDisposed=!1}get object(){return this._base.object}createNewRef(e){return this._base.createNewRef(e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._base._decreaseRefCount(this._debugOwner))}}var fGe=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},hGe=function(l,e){return function(i,n){e(i,n,l)}};const gTi=sf("diff-review-insert",pr.add,W("accessibleDiffViewerInsertIcon","Icon for 'Insert' in accessible diff viewer.")),yTi=sf("diff-review-remove",pr.remove,W("accessibleDiffViewerRemoveIcon","Icon for 'Remove' in accessible diff viewer.")),vTi=sf("diff-review-close",pr.close,W("accessibleDiffViewerCloseIcon","Icon for 'Close' in accessible diff viewer."));var f$;let a9=(f$=class extends xi{constructor(e,i,n,s,c,d,f,m,v){super(),this._parentNode=e,this._visible=i,this._setVisible=n,this._canClose=s,this._width=c,this._height=d,this._diffs=f,this._models=m,this._instantiationService=v,this._state=VR(this,(x,w)=>{const I=this._visible.read(x);if(this._parentNode.style.visibility=I?"visible":"hidden",!I)return null;const P=w.add(this._instantiationService.createInstance(xje,this._diffs,this._models,this._setVisible,this._canClose)),O=w.add(this._instantiationService.createInstance(kje,this._parentNode,P,this._width,this._height,this._models));return{model:P,view:O}}).recomputeInitiallyAndOnChange(this._store)}next(){th(e=>{const i=this._visible.get();this._setVisible(!0,e),i&&this._state.get().model.nextGroup(e)})}prev(){th(e=>{this._setVisible(!0,e),this._state.get().model.previousGroup(e)})}close(){th(e=>{this._setVisible(!1,e)})}},f$._ttPolicy=v6("diffReview",{createHTML:e=>e}),f$);a9=fGe([hGe(8,ho)],a9);let xje=class extends xi{constructor(e,i,n,s,c){super(),this._diffs=e,this._models=i,this._setVisible=n,this.canClose=s,this._accessibilitySignalService=c,this._groups=bc(this,[]),this._currentGroupIdx=bc(this,0),this._currentElementIdx=bc(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map((d,f)=>this._groups.read(f)[d]),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map((d,f)=>{var m;return(m=this.currentGroup.read(f))==null?void 0:m.lines[d]}),this._register(ba(d=>{const f=this._diffs.read(d);if(!f){this._groups.set([],void 0);return}const m=bTi(f,this._models.getOriginalModel().getLineCount(),this._models.getModifiedModel().getLineCount());th(v=>{const x=this._models.getModifiedPosition();if(x){const w=m.findIndex(I=>(x==null?void 0:x.lineNumber)<I.range.modified.endLineNumberExclusive);w!==-1&&this._currentGroupIdx.set(w,v)}this._groups.set(m,v)})})),this._register(ba(d=>{const f=this.currentElement.read(d);(f==null?void 0:f.type)===fv.Deleted?this._accessibilitySignalService.playSignal(hw.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):(f==null?void 0:f.type)===fv.Added&&this._accessibilitySignalService.playSignal(hw.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})})),this._register(ba(d=>{const f=this.currentElement.read(d);if(f&&f.type!==fv.Header){const m=f.modifiedLineNumber??f.diff.modified.startLineNumber;this._models.modifiedSetSelection(nt.fromPositions(new pi(m,1)))}}))}_goToGroupDelta(e,i){const n=this.groups.get();!n||n.length<=1||PB(i,s=>{this._currentGroupIdx.set(xc.ofLength(n.length).clipCyclic(this._currentGroupIdx.get()+e),s),this._currentElementIdx.set(0,s)})}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){const i=this.currentGroup.get();!i||i.lines.length<=1||th(n=>{this._currentElementIdx.set(xc.ofLength(i.lines.length).clip(this._currentElementIdx.get()+e),n)})}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){const i=this.currentGroup.get();if(!i)return;const n=i.lines.indexOf(e);n!==-1&&th(s=>{this._currentElementIdx.set(n,s)})}revealCurrentElementInEditor(){if(!this.canClose.get())return;this._setVisible(!1,void 0);const e=this.currentElement.get();e&&(e.type===fv.Deleted?this._models.originalReveal(nt.fromPositions(new pi(e.originalLineNumber,1))):this._models.modifiedReveal(e.type!==fv.Header?nt.fromPositions(new pi(e.modifiedLineNumber,1)):void 0))}close(){this.canClose.get()&&(this._setVisible(!1,void 0),this._models.modifiedFocus())}};xje=fGe([hGe(4,jR)],xje);const qte=3;function bTi(l,e,i){const n=[];for(const s of Bqe(l,(c,d)=>d.modified.startLineNumber-c.modified.endLineNumberExclusive<2*qte)){const c=[];c.push(new STi);const d=new Za(Math.max(1,s[0].original.startLineNumber-qte),Math.min(s[s.length-1].original.endLineNumberExclusive+qte,e+1)),f=new Za(Math.max(1,s[0].modified.startLineNumber-qte),Math.min(s[s.length-1].modified.endLineNumberExclusive+qte,i+1));gkt(s,(x,w)=>{const I=new Za(x?x.original.endLineNumberExclusive:d.startLineNumber,w?w.original.startLineNumber:d.endLineNumberExclusive),P=new Za(x?x.modified.endLineNumberExclusive:f.startLineNumber,w?w.modified.startLineNumber:f.endLineNumberExclusive);I.forEach(O=>{c.push(new kTi(O,P.startLineNumber+(O-I.startLineNumber)))}),w&&(w.original.forEach(O=>{c.push(new wTi(w,O))}),w.modified.forEach(O=>{c.push(new xTi(w,O))}))});const m=s[0].modified.join(s[s.length-1].modified),v=s[0].original.join(s[s.length-1].original);n.push(new CTi(new wy(m,v),c))}return n}var fv;(function(l){l[l.Header=0]="Header",l[l.Unchanged=1]="Unchanged",l[l.Deleted=2]="Deleted",l[l.Added=3]="Added"})(fv||(fv={}));class CTi{constructor(e,i){this.range=e,this.lines=i}}class STi{constructor(){this.type=fv.Header}}class wTi{constructor(e,i){this.diff=e,this.originalLineNumber=i,this.type=fv.Deleted,this.modifiedLineNumber=void 0}}class xTi{constructor(e,i){this.diff=e,this.modifiedLineNumber=i,this.type=fv.Added,this.originalLineNumber=void 0}}class kTi{constructor(e,i){this.originalLineNumber=e,this.modifiedLineNumber=i,this.type=fv.Unchanged}}let kje=class extends xi{constructor(e,i,n,s,c,d){super(),this._element=e,this._model=i,this._width=n,this._height=s,this._models=c,this._languageService=d,this.domNode=this._element,this.domNode.className="monaco-component diff-review monaco-editor-background";const f=document.createElement("div");f.className="diff-review-actions",this._actionBar=this._register(new kw(f)),this._register(ba(m=>{this._actionBar.clear(),this._model.canClose.read(m)&&this._actionBar.push(new $C("diffreview.close",W("label.close","Close"),"close-diff-review "+zo.asClassName(vTi),!0,async()=>i.close()),{label:!1,icon:!0})})),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new vse(this._content,{})),o0(this.domNode,this._scrollbar.getDomNode(),f),this._register(ba(m=>{this._height.read(m),this._width.read(m),this._scrollbar.scanDomNode()})),this._register(fo(()=>{o0(this.domNode)})),this._register(f6(this.domNode,{width:this._width,height:this._height})),this._register(f6(this._content,{width:this._width,height:this._height})),this._register(Ib((m,v)=>{this._model.currentGroup.read(m),this._render(v)})),this._register(ph(this.domNode,"keydown",m=>{(m.equals(18)||m.equals(2066)||m.equals(530))&&(m.preventDefault(),this._model.goToNextLine()),(m.equals(16)||m.equals(2064)||m.equals(528))&&(m.preventDefault(),this._model.goToPreviousLine()),(m.equals(9)||m.equals(2057)||m.equals(521)||m.equals(1033))&&(m.preventDefault(),this._model.close()),(m.equals(10)||m.equals(3))&&(m.preventDefault(),this._model.revealCurrentElementInEditor())}))}_render(e){const i=this._models.getOriginalOptions(),n=this._models.getModifiedOptions(),s=document.createElement("div");s.className="diff-review-table",s.setAttribute("role","list"),s.setAttribute("aria-label",W("ariaLabel","Accessible Diff Viewer. Use arrow up and down to navigate.")),a0(s,n.get(50)),o0(this._content,s);const c=this._models.getOriginalModel(),d=this._models.getModifiedModel();if(!c||!d)return;const f=c.getOptions(),m=d.getOptions(),v=n.get(67),x=this._model.currentGroup.get();for(const w of(x==null?void 0:x.lines)||[]){if(!x)break;let I;if(w.type===fv.Header){const O=document.createElement("div");O.className="diff-review-row",O.setAttribute("role","listitem");const z=x.range,J=this._model.currentGroupIndex.get(),Y=this._model.groups.get().length,ae=Fe=>Fe===0?W("no_lines_changed","no lines changed"):Fe===1?W("one_line_changed","1 line changed"):W("more_lines_changed","{0} lines changed",Fe),me=ae(z.original.length),ye=ae(z.modified.length);O.setAttribute("aria-label",W({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",J+1,Y,z.original.startLineNumber,me,z.modified.startLineNumber,ye));const Ce=document.createElement("div");Ce.className="diff-review-cell diff-review-summary",Ce.appendChild(document.createTextNode(`${J+1}/${Y}: @@ -${z.original.startLineNumber},${z.original.length} +${z.modified.startLineNumber},${z.modified.length} @@`)),O.appendChild(Ce),I=O}else I=this._createRow(w,v,this._width.get(),i,c,f,n,d,m);s.appendChild(I);const P=ro(O=>this._model.currentElement.read(O)===w);e.add(ba(O=>{const z=P.read(O);I.tabIndex=z?0:-1,z&&I.focus()})),e.add(en(I,"focus",()=>{this._model.goToLine(w)}))}this._scrollbar.scanDomNode()}_createRow(e,i,n,s,c,d,f,m,v){const x=s.get(146),w=x.glyphMarginWidth+x.lineNumbersWidth,I=f.get(146),P=10+I.glyphMarginWidth+I.lineNumbersWidth;let O="diff-review-row",z="";const J="diff-review-spacer";let Y=null;switch(e.type){case fv.Added:O="diff-review-row line-insert",z=" char-insert",Y=gTi;break;case fv.Deleted:O="diff-review-row line-delete",z=" char-delete",Y=yTi;break}const ae=document.createElement("div");ae.style.minWidth=n+"px",ae.className=O,ae.setAttribute("role","listitem"),ae.ariaLevel="";const me=document.createElement("div");me.className="diff-review-cell",me.style.height=`${i}px`,ae.appendChild(me);const ye=document.createElement("span");ye.style.width=w+"px",ye.style.minWidth=w+"px",ye.className="diff-review-line-number"+z,e.originalLineNumber!==void 0?ye.appendChild(document.createTextNode(String(e.originalLineNumber))):ye.innerText=" ",me.appendChild(ye);const Ce=document.createElement("span");Ce.style.width=P+"px",Ce.style.minWidth=P+"px",Ce.style.paddingRight="10px",Ce.className="diff-review-line-number"+z,e.modifiedLineNumber!==void 0?Ce.appendChild(document.createTextNode(String(e.modifiedLineNumber))):Ce.innerText=" ",me.appendChild(Ce);const Fe=document.createElement("span");if(Fe.className=J,Y){const Mt=document.createElement("span");Mt.className=zo.asClassName(Y),Mt.innerText="  ",Fe.appendChild(Mt)}else Fe.innerText="  ";me.appendChild(Fe);let rt;if(e.modifiedLineNumber!==void 0){let Mt=this._getLineHtml(m,f,v.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);a9._ttPolicy&&(Mt=a9._ttPolicy.createHTML(Mt)),me.insertAdjacentHTML("beforeend",Mt),rt=m.getLineContent(e.modifiedLineNumber)}else{let Mt=this._getLineHtml(c,s,d.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);a9._ttPolicy&&(Mt=a9._ttPolicy.createHTML(Mt)),me.insertAdjacentHTML("beforeend",Mt),rt=c.getLineContent(e.originalLineNumber)}rt.length===0&&(rt=W("blankLine","blank"));let ct="";switch(e.type){case fv.Unchanged:e.originalLineNumber===e.modifiedLineNumber?ct=W({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",rt,e.originalLineNumber):ct=W("equalLine","{0} original line {1} modified line {2}",rt,e.originalLineNumber,e.modifiedLineNumber);break;case fv.Added:ct=W("insertLine","+ {0} modified line {1}",rt,e.modifiedLineNumber);break;case fv.Deleted:ct=W("deleteLine","- {0} original line {1}",rt,e.originalLineNumber);break}return ae.setAttribute("aria-label",ct),ae}_getLineHtml(e,i,n,s,c){const d=e.getLineContent(s),f=i.get(50),m=Cg.createEmpty(d,c),v=Iw.isBasicASCII(d,e.mightContainNonBasicASCII()),x=Iw.containsRTL(d,v,e.mightContainRTL());return Nwe(new zR(f.isMonospace&&!i.get(33),f.canUseHalfwidthRightwardsArrow,d,!1,v,x,0,m,[],n,0,f.spaceWidth,f.middotWidth,f.wsmiddotWidth,i.get(118),i.get(100),i.get(95),i.get(51)!==mR.OFF,null)).html}};kje=fGe([hGe(5,Pf)],kje);class TTi{constructor(e){this.editors=e}getOriginalModel(){return this.editors.original.getModel()}getOriginalOptions(){return this.editors.original.getOptions()}originalReveal(e){this.editors.original.revealRange(e),this.editors.original.setSelection(e),this.editors.original.focus()}getModifiedModel(){return this.editors.modified.getModel()}getModifiedOptions(){return this.editors.modified.getOptions()}modifiedReveal(e){e&&(this.editors.modified.revealRange(e),this.editors.modified.setSelection(e)),this.editors.modified.focus()}modifiedSetSelection(e){this.editors.modified.setSelection(e)}modifiedFocus(){this.editors.modified.focus()}getModifiedPosition(){return this.editors.modified.getPosition()??void 0}}It("diffEditor.move.border","#8b8b8b9c",W("diffEditor.move.border","The border color for text that got moved in the diff editor."));It("diffEditor.moveActive.border","#FFA500",W("diffEditor.moveActive.border","The active border color for text that got moved in the diff editor."));It("diffEditor.unchangedRegionShadow",{dark:"#000000",light:"#737373BF",hcDark:"#000000",hcLight:"#737373BF"},W("diffEditor.unchangedRegionShadow","The color of the shadow around unchanged region widgets."));const DTi=sf("diff-insert",pr.add,W("diffInsertIcon","Line decoration for inserts in the diff editor.")),MIt=sf("diff-remove",pr.remove,W("diffRemoveIcon","Line decoration for removals in the diff editor.")),Fve=qa.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+zo.asClassName(DTi),marginClassName:"gutter-insert"}),Ere=qa.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+zo.asClassName(MIt),marginClassName:"gutter-delete"}),twt=qa.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),iwt=qa.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),Bve=qa.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),_Ge=qa.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),pGe=qa.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),J$=qa.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),mGe=qa.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),gGe=qa.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"});var RIt=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Tje=function(l,e){return function(i,n){e(i,n,l)}},PF;const Rse=jc("diffProviderFactoryService");let Dje=class{constructor(e){this.instantiationService=e}createDiffProvider(e){return this.instantiationService.createInstance(Eje,e)}};Dje=RIt([Tje(0,ho)],Dje);nl(Rse,Dje,1);var P9;let Eje=(P9=class{constructor(e,i,n){this.editorWorkerService=i,this.telemetryService=n,this.onDidChangeEventEmitter=new gi,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){var e;(e=this.diffAlgorithmOnDidChangeSubscription)==null||e.dispose()}async computeDiff(e,i,n,s){if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(e,i,n,s);if(e.isDisposed()||i.isDisposed())return{changes:[],identical:!0,quitEarly:!1,moves:[]};if(e.getLineCount()===1&&e.getLineMaxColumn(1)===1)return i.getLineCount()===1&&i.getLineMaxColumn(1)===1?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new xw(new Za(1,2),new Za(1,i.getLineCount()+1),[new fw(e.getFullModelRange(),i.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const c=JSON.stringify([e.uri.toString(),i.uri.toString()]),d=JSON.stringify([e.id,i.id,e.getAlternativeVersionId(),i.getAlternativeVersionId(),JSON.stringify(n)]),f=PF.diffCache.get(c);if(f&&f.context===d)return f.result;const m=bg.create(),v=await this.editorWorkerService.computeDiff(e.uri,i.uri,n,this.diffAlgorithm),x=m.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:x,timedOut:(v==null?void 0:v.quitEarly)??!0,detectedMoves:n.computeMoves?(v==null?void 0:v.moves.length)??0:-1}),s.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!v)throw new Error("no diff result available");return PF.diffCache.size>10&&PF.diffCache.delete(PF.diffCache.keys().next().value),PF.diffCache.set(c,{result:v,context:d}),v}setOptions(e){var n;let i=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&((n=this.diffAlgorithmOnDidChangeSubscription)==null||n.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,typeof e.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),i=!0),i&&this.onDidChangeEventEmitter.fire()}},PF=P9,P9.diffCache=new Map,P9);Eje=PF=RIt([Tje(1,Fb),Tje(2,b1)],Eje);function Fwe(){return mBe&&!!mBe.VSCODE_DEV}function FIt(l){if(Fwe()){const e=ETi();return e.add(l),{dispose(){e.delete(l)}}}else return{dispose(){}}}function ETi(){E0e||(E0e=new Set);const l=globalThis;return l.$hotReload_applyNewExports||(l.$hotReload_applyNewExports=e=>{const i={config:{mode:void 0},...e},n=[];for(const s of E0e){const c=s(i);c&&n.push(c)}if(n.length>0)return s=>{let c=!1;for(const d of n)d(s)&&(c=!0);return c}}),E0e}let E0e;Fwe()&&FIt(({oldExports:l,newSrc:e,config:i})=>{if(i.mode==="patch-prototype")return n=>{var s,c;for(const d in n){const f=n[d];if(console.log(`[hot-reload] Patching prototype methods of '${d}'`,{exportedItem:f}),typeof f=="function"&&f.prototype){const m=l[d];if(m){for(const v of Object.getOwnPropertyNames(f.prototype)){const x=Object.getOwnPropertyDescriptor(f.prototype,v),w=Object.getOwnPropertyDescriptor(m.prototype,v);((s=x==null?void 0:x.value)==null?void 0:s.toString())!==((c=w==null?void 0:w.value)==null?void 0:c.toString())&&console.log(`[hot-reload] Patching prototype method '${d}.${v}'`),Object.defineProperty(m.prototype,v,x)}n[d]=m}}}return!0}});function WC(l,e){return ITi([l],e),l}function ITi(l,e){Fwe()&&k0("reload",n=>FIt(({oldExports:s})=>{if([...Object.values(s)].some(c=>l.includes(c)))return c=>(n(void 0),!0)})).read(e)}var NTi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},LTi=function(l,e){return function(i,n){e(i,n,l)}};let Ije=class extends xi{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,i,n){super(),this.model=e,this._options=i,this._diffProviderFactoryService=n,this._isDiffUpToDate=bc(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=bc(this,void 0),this.diff=this._diff,this._unchangedRegions=bc(this,void 0),this.unchangedRegions=ro(this,f=>{var m;return this._options.hideUnchangedRegions.read(f)?((m=this._unchangedRegions.read(f))==null?void 0:m.regions)??[]:(th(v=>{var x;for(const w of((x=this._unchangedRegions.get())==null?void 0:x.regions)||[])w.collapseAll(v)}),[])}),this.movedTextToCompare=bc(this,void 0),this._activeMovedText=bc(this,void 0),this._hoveredMovedText=bc(this,void 0),this.activeMovedText=ro(this,f=>this.movedTextToCompare.read(f)??this._hoveredMovedText.read(f)??this._activeMovedText.read(f)),this._cancellationTokenSource=new ih,this._diffProvider=ro(this,f=>{const m=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(f)}),v=k0("onDidChange",m.onDidChange);return{diffProvider:m,onChangeSignal:v}}),this._register(fo(()=>this._cancellationTokenSource.cancel()));const s=xJ("contentChangedSignal"),c=this._register(new qu(()=>s.trigger(void 0),200));this._register(ba(f=>{const m=this._unchangedRegions.read(f);if(!m||m.regions.some(O=>O.isDragged.read(f)))return;const v=m.originalDecorationIds.map(O=>e.original.getDecorationRange(O)).map(O=>O?Za.fromRangeInclusive(O):void 0),x=m.modifiedDecorationIds.map(O=>e.modified.getDecorationRange(O)).map(O=>O?Za.fromRangeInclusive(O):void 0),w=m.regions.map((O,z)=>!v[z]||!x[z]?void 0:new VM(v[z].startLineNumber,x[z].startLineNumber,v[z].length,O.visibleLineCountTop.read(f),O.visibleLineCountBottom.read(f))).filter(xL),I=[];let P=!1;for(const O of Bqe(w,(z,J)=>z.getHiddenModifiedRange(f).endLineNumberExclusive===J.getHiddenModifiedRange(f).startLineNumber))if(O.length>1){P=!0;const z=O.reduce((Y,ae)=>Y+ae.lineCount,0),J=new VM(O[0].originalLineNumber,O[0].modifiedLineNumber,z,O[0].visibleLineCountTop.get(),O[O.length-1].visibleLineCountBottom.get());I.push(J)}else I.push(O[0]);if(P){const O=e.original.deltaDecorations(m.originalDecorationIds,I.map(J=>({range:J.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),z=e.modified.deltaDecorations(m.modifiedDecorationIds,I.map(J=>({range:J.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));th(J=>{this._unchangedRegions.set({regions:I,originalDecorationIds:O,modifiedDecorationIds:z},J)})}}));const d=(f,m,v)=>{const x=VM.fromDiffs(f.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(v),this._options.hideUnchangedRegionsContextLineCount.read(v));let w;const I=this._unchangedRegions.get();if(I){const J=I.originalDecorationIds.map(ye=>e.original.getDecorationRange(ye)).map(ye=>ye?Za.fromRangeInclusive(ye):void 0),Y=I.modifiedDecorationIds.map(ye=>e.modified.getDecorationRange(ye)).map(ye=>ye?Za.fromRangeInclusive(ye):void 0);let me=pTi(I.regions.map((ye,Ce)=>{if(!J[Ce]||!Y[Ce])return;const Fe=J[Ce].length;return new VM(J[Ce].startLineNumber,Y[Ce].startLineNumber,Fe,Math.min(ye.visibleLineCountTop.get(),Fe),Math.min(ye.visibleLineCountBottom.get(),Fe-ye.visibleLineCountTop.get()))}).filter(xL),(ye,Ce)=>!Ce||ye.modifiedLineNumber>=Ce.modifiedLineNumber+Ce.lineCount&&ye.originalLineNumber>=Ce.originalLineNumber+Ce.lineCount).map(ye=>new wy(ye.getHiddenOriginalRange(v),ye.getHiddenModifiedRange(v)));me=wy.clip(me,Za.ofLength(1,e.original.getLineCount()),Za.ofLength(1,e.modified.getLineCount())),w=wy.inverse(me,e.original.getLineCount(),e.modified.getLineCount())}const P=[];if(w)for(const J of x){const Y=w.filter(ae=>ae.original.intersectsStrict(J.originalUnchangedRange)&&ae.modified.intersectsStrict(J.modifiedUnchangedRange));P.push(...J.setVisibleRanges(Y,m))}else P.push(...x);const O=e.original.deltaDecorations((I==null?void 0:I.originalDecorationIds)||[],P.map(J=>({range:J.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),z=e.modified.deltaDecorations((I==null?void 0:I.modifiedDecorationIds)||[],P.map(J=>({range:J.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));this._unchangedRegions.set({regions:P,originalDecorationIds:O,modifiedDecorationIds:z},m)};this._register(e.modified.onDidChangeContent(f=>{if(this._diff.get()){const v=j4.fromModelContentChanges(f.changes);this._lastDiff,e.original,e.modified}this._isDiffUpToDate.set(!1,void 0),c.schedule()})),this._register(e.original.onDidChangeContent(f=>{if(this._diff.get()){const v=j4.fromModelContentChanges(f.changes);this._lastDiff,e.original,e.modified}this._isDiffUpToDate.set(!1,void 0),c.schedule()})),this._register(Ib(async(f,m)=>{this._options.hideUnchangedRegionsMinimumLineCount.read(f),this._options.hideUnchangedRegionsContextLineCount.read(f),c.cancel(),s.read(f);const v=this._diffProvider.read(f);v.onChangeSignal.read(f),WC(oTt,f),WC(zWe,f),this._isDiffUpToDate.set(!1,void 0);let x=[];m.add(e.original.onDidChangeContent(P=>{const O=j4.fromModelContentChanges(P.changes);x=Xye(x,O)}));let w=[];m.add(e.modified.onDidChangeContent(P=>{const O=j4.fromModelContentChanges(P.changes);w=Xye(w,O)}));let I=await v.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(f),maxComputationTimeMs:this._options.maxComputationTimeMs.read(f),computeMoves:this._options.showMoves.read(f)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||e.original.isDisposed()||e.modified.isDisposed()||(I=PTi(I,e.original,e.modified),I=(e.original,e.modified,void 0)??I,I=(e.original,e.modified,void 0)??I,th(P=>{d(I,P),this._lastDiff=I;const O=yGe.fromDiffResult(I);this._diff.set(O,P),this._isDiffUpToDate.set(!0,P);const z=this.movedTextToCompare.get();this.movedTextToCompare.set(z?this._lastDiff.moves.find(J=>J.lineRangeMapping.modified.intersect(z.lineRangeMapping.modified)):void 0,P)}))}))}ensureModifiedLineIsVisible(e,i,n){var c,d;if(((c=this.diff.get())==null?void 0:c.mappings.length)===0)return;const s=((d=this._unchangedRegions.get())==null?void 0:d.regions)||[];for(const f of s)if(f.getHiddenModifiedRange(void 0).contains(e)){f.showModifiedLine(e,i,n);return}}ensureOriginalLineIsVisible(e,i,n){var c,d;if(((c=this.diff.get())==null?void 0:c.mappings.length)===0)return;const s=((d=this._unchangedRegions.get())==null?void 0:d.regions)||[];for(const f of s)if(f.getHiddenOriginalRange(void 0).contains(e)){f.showOriginalLine(e,i,n);return}}async waitForDiff(){await kDt(this.isDiffUpToDate,e=>e)}serializeState(){const e=this._unchangedRegions.get();return{collapsedRegions:e==null?void 0:e.regions.map(i=>({range:i.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(e){var s;const i=(s=e.collapsedRegions)==null?void 0:s.map(c=>Za.deserialize(c.range)),n=this._unchangedRegions.get();!n||!i||th(c=>{for(const d of n.regions)for(const f of i)if(d.modifiedUnchangedRange.intersect(f)){d.setHiddenModifiedRange(f,c);break}})}};Ije=NTi([LTi(2,Rse)],Ije);function PTi(l,e,i){return{changes:l.changes.map(n=>new xw(n.original,n.modified,n.innerChanges?n.innerChanges.map(s=>ATi(s,e,i)):void 0)),moves:l.moves,identical:l.identical,quitEarly:l.quitEarly}}function ATi(l,e,i){let n=l.originalRange,s=l.modifiedRange;return n.startColumn===1&&s.startColumn===1&&(n.endColumn!==1||s.endColumn!==1)&&n.endColumn===e.getLineMaxColumn(n.endLineNumber)&&s.endColumn===i.getLineMaxColumn(s.endLineNumber)&&n.endLineNumber<e.getLineCount()&&s.endLineNumber<i.getLineCount()&&(n=n.setEndPosition(n.endLineNumber+1,1),s=s.setEndPosition(s.endLineNumber+1,1)),new fw(n,s)}class yGe{static fromDiffResult(e){return new yGe(e.changes.map(i=>new BIt(i)),e.moves||[],e.identical,e.quitEarly)}constructor(e,i,n,s){this.mappings=e,this.movedTexts=i,this.identical=n,this.quitEarly=s}}class BIt{constructor(e){this.lineRangeMapping=e}}class VM{static fromDiffs(e,i,n,s,c){const d=xw.inverse(e,i,n),f=[];for(const m of d){let v=m.original.startLineNumber,x=m.modified.startLineNumber,w=m.original.length;const I=v===1&&x===1,P=v+w===i+1&&x+w===n+1;(I||P)&&w>=c+s?(I&&!P&&(w-=c),P&&!I&&(v+=c,x+=c,w-=c),f.push(new VM(v,x,w,0,0))):w>=c*2+s&&(v+=c,x+=c,w-=c*2,f.push(new VM(v,x,w,0,0)))}return f}get originalUnchangedRange(){return Za.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return Za.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,i,n,s,c){this.originalLineNumber=e,this.modifiedLineNumber=i,this.lineCount=n,this._visibleLineCountTop=bc(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=bc(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=ro(this,m=>this.visibleLineCountTop.read(m)+this.visibleLineCountBottom.read(m)===this.lineCount&&!this.isDragged.read(m)),this.isDragged=bc(this,void 0);const d=Math.max(Math.min(s,this.lineCount),0),f=Math.max(Math.min(c,this.lineCount-s),0);yvt(s===d),yvt(c===f),this._visibleLineCountTop.set(d,void 0),this._visibleLineCountBottom.set(f,void 0)}setVisibleRanges(e,i){const n=[],s=new _k(e.map(m=>m.modified)).subtractFrom(this.modifiedUnchangedRange);let c=this.originalLineNumber,d=this.modifiedLineNumber;const f=this.modifiedLineNumber+this.lineCount;if(s.ranges.length===0)this.showAll(i),n.push(this);else{let m=0;for(const v of s.ranges){const x=m===s.ranges.length-1;m++;const w=(x?f:v.endLineNumberExclusive)-d,I=new VM(c,d,w,0,0);I.setHiddenModifiedRange(v,i),n.push(I),c=I.originalUnchangedRange.endLineNumberExclusive,d=I.modifiedUnchangedRange.endLineNumberExclusive}}return n}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return Za.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return Za.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,i){const n=e.startLineNumber-this.modifiedLineNumber,s=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(n,s,i)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,i){const n=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,n),i)}showMoreBelow(e=10,i){const n=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,n),i)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,i,n){const s=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),c=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;i===0&&s<c||i===1?this._visibleLineCountTop.set(this._visibleLineCountTop.get()+s,n):this._visibleLineCountBottom.set(this._visibleLineCountBottom.get()+c,n)}showOriginalLine(e,i,n){const s=e-this.originalLineNumber,c=this.originalLineNumber+this.lineCount-e;i===0&&s<c||i===1?this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+c-s,this.getMaxVisibleLineCountTop()),n):this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+s-c,this.getMaxVisibleLineCountBottom()),n)}collapseAll(e){this._visibleLineCountTop.set(0,e),this._visibleLineCountBottom.set(0,e)}setState(e,i,n){e=Math.max(Math.min(e,this.lineCount),0),i=Math.max(Math.min(i,this.lineCount-e),0),this._visibleLineCountTop.set(e,n),this._visibleLineCountBottom.set(i,n)}}class OTi extends xi{get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}constructor(e,i,n,s,c,d,f,m,v){super(),this._getViewZoneId=e,this._marginDomNode=i,this._modifiedEditor=n,this._diff=s,this._editor=c,this._viewLineCounts=d,this._originalTextModel=f,this._contextMenuService=m,this._clipboardService=v,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=zo.asClassName(pr.lightBulb)+" lightbulb-glyph",this._diffActions.style.position="absolute";const x=this._modifiedEditor.getOption(67);this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${x}px`,this._diffActions.style.lineHeight=`${x}px`,this._marginDomNode.appendChild(this._diffActions);let w=0;const I=n.getOption(128)&&!VE,P=(O,z)=>{this._contextMenuService.showContextMenu({domForShadowRoot:I?n.getDomNode()??void 0:void 0,getAnchor:()=>({x:O,y:z}),getActions:()=>{const J=[],Y=s.modified.isEmpty;return J.push(new $C("diff.clipboard.copyDeletedContent",Y?s.original.length>1?W("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):W("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):s.original.length>1?W("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):W("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,async()=>{const me=this._originalTextModel.getValueInRange(s.original.toExclusiveRange());await this._clipboardService.writeText(me)})),s.original.length>1&&J.push(new $C("diff.clipboard.copyDeletedLineContent",Y?W("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",s.original.startLineNumber+w):W("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",s.original.startLineNumber+w),void 0,!0,async()=>{let me=this._originalTextModel.getLineContent(s.original.startLineNumber+w);me===""&&(me=this._originalTextModel.getEndOfLineSequence()===0?`
+`:`\r
+`),await this._clipboardService.writeText(me)})),n.getOption(92)||J.push(new $C("diff.inline.revertChange",W("diff.inline.revertChange.label","Revert this change"),void 0,!0,async()=>{this._editor.revert(this._diff)})),J},autoSelectFirstItem:!0})};this._register(ph(this._diffActions,"mousedown",O=>{if(!O.leftButton)return;const{top:z,height:J}=e_(this._diffActions),Y=Math.floor(x/3);O.preventDefault(),P(O.posx,z+J+Y)})),this._register(n.onMouseMove(O=>{(O.target.type===8||O.target.type===5)&&O.target.detail.viewZoneId===this._getViewZoneId()?(w=this._updateLightBulbPosition(this._marginDomNode,O.event.browserEvent.y,x),this.visibility=!0):this.visibility=!1})),this._register(n.onMouseDown(O=>{O.event.leftButton&&(O.target.type===8||O.target.type===5)&&O.target.detail.viewZoneId===this._getViewZoneId()&&(O.event.preventDefault(),w=this._updateLightBulbPosition(this._marginDomNode,O.event.browserEvent.y,x),P(O.event.posx,O.event.posy+x))}))}_updateLightBulbPosition(e,i,n){const{top:s}=e_(e),c=i-s,d=Math.floor(c/n),f=d*n;if(this._diffActions.style.top=`${f}px`,this._viewLineCounts){let m=0;for(let v=0;v<this._viewLineCounts.length;v++)if(m+=this._viewLineCounts[v],d<m)return v}return d}}const nwt=v6("diffEditorWidget",{createHTML:l=>l});function MTi(l,e,i,n){a0(n,e.fontInfo);const s=i.length>0,c=new gJ(1e4);let d=0,f=0;const m=[];for(let I=0;I<l.lineTokens.length;I++){const P=I+1,O=l.lineTokens[I],z=l.lineBreakData[I],J=mv.filter(i,P,1,Number.MAX_SAFE_INTEGER);if(z){let Y=0;for(const ae of z.breakOffsets){const me=O.sliceAndInflate(Y,ae,0);d=Math.max(d,rwt(f,me,mv.extractWrapped(J,Y,ae),s,l.mightContainNonBasicASCII,l.mightContainRTL,e,c)),f++,Y=ae}m.push(z.breakOffsets.length)}else m.push(1),d=Math.max(d,rwt(f,O,J,s,l.mightContainNonBasicASCII,l.mightContainRTL,e,c)),f++}d+=e.scrollBeyondLastColumn;const v=c.build(),x=nwt?nwt.createHTML(v):v;n.innerHTML=x;const w=d*e.typicalHalfwidthCharacterWidth;return{heightInLines:f,minWidthInPx:w,viewLineCounts:m}}class RTi{constructor(e,i,n,s){this.lineTokens=e,this.lineBreakData=i,this.mightContainNonBasicASCII=n,this.mightContainRTL=s}}class vGe{static fromEditor(e){var c;const i=e.getOptions(),n=i.get(50),s=i.get(146);return new vGe(((c=e.getModel())==null?void 0:c.getOptions().tabSize)||0,n,i.get(33),n.typicalHalfwidthCharacterWidth,i.get(105),i.get(67),s.decorationsWidth,i.get(118),i.get(100),i.get(95),i.get(51))}constructor(e,i,n,s,c,d,f,m,v,x,w){this.tabSize=e,this.fontInfo=i,this.disableMonospaceOptimizations=n,this.typicalHalfwidthCharacterWidth=s,this.scrollBeyondLastColumn=c,this.lineHeight=d,this.lineDecorationsWidth=f,this.stopRenderingLineAfter=m,this.renderWhitespace=v,this.renderControlCharacters=x,this.fontLigatures=w}}function rwt(l,e,i,n,s,c,d,f){f.appendString('<div class="view-line'),n||f.appendString(" char-delete"),f.appendString('" style="top:'),f.appendString(String(l*d.lineHeight)),f.appendString('px;width:1000000px;">');const m=e.getLineContent(),v=Iw.isBasicASCII(m,s),x=Iw.containsRTL(m,v,c),w=Ose(new zR(d.fontInfo.isMonospace&&!d.disableMonospaceOptimizations,d.fontInfo.canUseHalfwidthRightwardsArrow,m,!1,v,x,0,e,i,d.tabSize,0,d.fontInfo.spaceWidth,d.fontInfo.middotWidth,d.fontInfo.wsmiddotWidth,d.stopRenderingLineAfter,d.renderWhitespace,d.renderControlCharacters,d.fontLigatures!==mR.OFF,null),f);return f.appendString("</div>"),w.characterMapping.getHorizontalOffset(w.characterMapping.length)}var FTi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},swt=function(l,e){return function(i,n){e(i,n,l)}};let Nje=class extends xi{constructor(e,i,n,s,c,d,f,m,v,x){super(),this._targetWindow=e,this._editors=i,this._diffModel=n,this._options=s,this._diffEditorWidget=c,this._canIgnoreViewZoneUpdateEvent=d,this._origViewZonesToIgnore=f,this._modViewZonesToIgnore=m,this._clipboardService=v,this._contextMenuService=x,this._originalTopPadding=bc(this,0),this._originalScrollOffset=bc(this,0),this._originalScrollOffsetAnimated=ZSt(this._targetWindow,this._originalScrollOffset,this._store),this._modifiedTopPadding=bc(this,0),this._modifiedScrollOffset=bc(this,0),this._modifiedScrollOffsetAnimated=ZSt(this._targetWindow,this._modifiedScrollOffset,this._store);const w=bc("invalidateAlignmentsState",0),I=this._register(new qu(()=>{w.set(w.get()+1,void 0)},0));this._register(this._editors.original.onDidChangeViewZones(me=>{this._canIgnoreViewZoneUpdateEvent()||I.schedule()})),this._register(this._editors.modified.onDidChangeViewZones(me=>{this._canIgnoreViewZoneUpdateEvent()||I.schedule()})),this._register(this._editors.original.onDidChangeConfiguration(me=>{(me.hasChanged(147)||me.hasChanged(67))&&I.schedule()})),this._register(this._editors.modified.onDidChangeConfiguration(me=>{(me.hasChanged(147)||me.hasChanged(67))&&I.schedule()}));const P=this._diffModel.map(me=>me?Tu(this,me.model.original.onDidChangeTokens,()=>me.model.original.tokenization.backgroundTokenizationState===2):void 0).map((me,ye)=>me==null?void 0:me.read(ye)),O=ro(me=>{const ye=this._diffModel.read(me),Ce=ye==null?void 0:ye.diff.read(me);if(!ye||!Ce)return null;w.read(me);const rt=this._options.renderSideBySide.read(me);return owt(this._editors.original,this._editors.modified,Ce.mappings,this._origViewZonesToIgnore,this._modViewZonesToIgnore,rt)}),z=ro(me=>{var Fe;const ye=(Fe=this._diffModel.read(me))==null?void 0:Fe.movedTextToCompare.read(me);if(!ye)return null;w.read(me);const Ce=ye.changes.map(rt=>new BIt(rt));return owt(this._editors.original,this._editors.modified,Ce,this._origViewZonesToIgnore,this._modViewZonesToIgnore,!0)});function J(){const me=document.createElement("div");return me.className="diagonal-fill",me}const Y=this._register(new wn);this.viewZones=VR(this,(me,ye)=>{var Dr,Rr,na,$d;Y.clear();const Ce=O.read(me)||[],Fe=[],rt=[],ct=this._modifiedTopPadding.read(me);ct>0&&rt.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:ct,showInHiddenAreas:!0,suppressMouseDown:!0});const Mt=this._originalTopPadding.read(me);Mt>0&&Fe.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:Mt,showInHiddenAreas:!0,suppressMouseDown:!0});const Yt=this._options.renderSideBySide.read(me),Bi=Yt||(Dr=this._editors.modified._getViewModel())==null?void 0:Dr.createLineBreaksComputer();if(Bi){const Ca=this._editors.original.getModel();for(const jl of Ce)if(jl.diff)for(let es=jl.originalRange.startLineNumber;es<jl.originalRange.endLineNumberExclusive;es++){if(es>Ca.getLineCount())return{orig:Fe,mod:rt};Bi==null||Bi.addRequest(Ca.getLineContent(es),null,null)}}const $i=(Bi==null?void 0:Bi.finalize())??[];let $t=0;const Hi=this._editors.modified.getOption(67),An=(Rr=this._diffModel.read(me))==null?void 0:Rr.movedTextToCompare.read(me),qt=((na=this._editors.original.getModel())==null?void 0:na.mightContainNonBasicASCII())??!1,ms=(($d=this._editors.original.getModel())==null?void 0:$d.mightContainRTL())??!1,Wr=vGe.fromEditor(this._editors.modified);for(const Ca of Ce)if(Ca.diff&&!Yt&&(!this._options.useTrueInlineDiffRendering.read(me)||!bGe(Ca.diff))){if(!Ca.originalRange.isEmpty){P.read(me);const es=document.createElement("div");es.classList.add("view-lines","line-delete","monaco-mouse-cursor-text");const ld=this._editors.original.getModel();if(Ca.originalRange.endLineNumberExclusive-1>ld.getLineCount())return{orig:Fe,mod:rt};const mp=new RTi(Ca.originalRange.mapToLineArray(Ft=>ld.tokenization.getLineTokens(Ft)),Ca.originalRange.mapToLineArray(Ft=>$i[$t++]),qt,ms),of=[];for(const Ft of Ca.diff.innerChanges||[])of.push(new Hie(Ft.originalRange.delta(-(Ca.diff.original.startLineNumber-1)),J$.className,0));const Bb=MTi(mp,Wr,of,es),nm=document.createElement("div");if(nm.className="inline-deleted-margin-view-zone",a0(nm,Wr.fontInfo),this._options.renderIndicators.read(me))for(let Ft=0;Ft<Bb.heightInLines;Ft++){const Ey=document.createElement("div");Ey.className=`delete-sign ${zo.asClassName(MIt)}`,Ey.setAttribute("style",`position:absolute;top:${Ft*Hi}px;width:${Wr.lineDecorationsWidth}px;height:${Hi}px;right:0;`),nm.appendChild(Ey)}let Nv;Y.add(new OTi(()=>NM(Nv),nm,this._editors.modified,Ca.diff,this._diffEditorWidget,Bb.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let Ft=0;Ft<Bb.viewLineCounts.length;Ft++){const Ey=Bb.viewLineCounts[Ft];Ey>1&&Fe.push({afterLineNumber:Ca.originalRange.startLineNumber+Ft,domNode:J(),heightInPx:(Ey-1)*Hi,showInHiddenAreas:!0,suppressMouseDown:!0})}rt.push({afterLineNumber:Ca.modifiedRange.startLineNumber-1,domNode:es,heightInPx:Bb.heightInLines*Hi,minWidthInPx:Bb.minWidthInPx,marginDomNode:nm,setZoneId(Ft){Nv=Ft},showInHiddenAreas:!0,suppressMouseDown:!0})}const jl=document.createElement("div");jl.className="gutter-delete",Fe.push({afterLineNumber:Ca.originalRange.endLineNumberExclusive-1,domNode:J(),heightInPx:Ca.modifiedHeightInPx,marginDomNode:jl,showInHiddenAreas:!0,suppressMouseDown:!0})}else{const jl=Ca.modifiedHeightInPx-Ca.originalHeightInPx;if(jl>0){if(An!=null&&An.lineRangeMapping.original.delta(-1).deltaLength(2).contains(Ca.originalRange.endLineNumberExclusive-1))continue;Fe.push({afterLineNumber:Ca.originalRange.endLineNumberExclusive-1,domNode:J(),heightInPx:jl,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let es=function(){const mp=document.createElement("div");return mp.className="arrow-revert-change "+zo.asClassName(pr.arrowRight),ye.add(en(mp,"mousedown",of=>of.stopPropagation())),ye.add(en(mp,"click",of=>{of.stopPropagation(),c.revert(Ca.diff)})),Cr("div",{},mp)};if(An!=null&&An.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(Ca.modifiedRange.endLineNumberExclusive-1))continue;let ld;Ca.diff&&Ca.diff.modified.isEmpty&&this._options.shouldRenderOldRevertArrows.read(me)&&(ld=es()),rt.push({afterLineNumber:Ca.modifiedRange.endLineNumberExclusive-1,domNode:J(),heightInPx:-jl,marginDomNode:ld,showInHiddenAreas:!0,suppressMouseDown:!0})}}for(const Ca of z.read(me)??[]){if(!(An!=null&&An.lineRangeMapping.original.intersect(Ca.originalRange))||!(An!=null&&An.lineRangeMapping.modified.intersect(Ca.modifiedRange)))continue;const jl=Ca.modifiedHeightInPx-Ca.originalHeightInPx;jl>0?Fe.push({afterLineNumber:Ca.originalRange.endLineNumberExclusive-1,domNode:J(),heightInPx:jl,showInHiddenAreas:!0,suppressMouseDown:!0}):rt.push({afterLineNumber:Ca.modifiedRange.endLineNumberExclusive-1,domNode:J(),heightInPx:-jl,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:Fe,mod:rt}});let ae=!1;this._register(this._editors.original.onDidScrollChange(me=>{me.scrollLeftChanged&&!ae&&(ae=!0,this._editors.modified.setScrollLeft(me.scrollLeft),ae=!1)})),this._register(this._editors.modified.onDidScrollChange(me=>{me.scrollLeftChanged&&!ae&&(ae=!0,this._editors.original.setScrollLeft(me.scrollLeft),ae=!1)})),this._originalScrollTop=Tu(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=Tu(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._register(ba(me=>{const ye=this._originalScrollTop.read(me)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(me))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(me));ye!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(ye,1)})),this._register(ba(me=>{const ye=this._modifiedScrollTop.read(me)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(me))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(me));ye!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(ye,1)})),this._register(ba(me=>{var Fe;const ye=(Fe=this._diffModel.read(me))==null?void 0:Fe.movedTextToCompare.read(me);let Ce=0;if(ye){const rt=this._editors.original.getTopForLineNumber(ye.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();Ce=this._editors.modified.getTopForLineNumber(ye.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-rt}Ce>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(Ce,void 0)):Ce<0?(this._modifiedTopPadding.set(-Ce,void 0),this._originalTopPadding.set(0,void 0)):setTimeout(()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)},400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.get()-Ce,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+Ce,void 0,!0)}))}};Nje=FTi([swt(8,w6),swt(9,eS)],Nje);function owt(l,e,i,n,s,c){const d=new s6(awt(l,n)),f=new s6(awt(e,s)),m=l.getOption(67),v=e.getOption(67),x=[];let w=0,I=0;function P(O,z){for(;;){let J=d.peek(),Y=f.peek();if(J&&J.lineNumber>=O&&(J=void 0),Y&&Y.lineNumber>=z&&(Y=void 0),!J&&!Y)break;const ae=J?J.lineNumber-w:Number.MAX_VALUE,me=Y?Y.lineNumber-I:Number.MAX_VALUE;ae<me?(d.dequeue(),Y={lineNumber:J.lineNumber-w+I,heightInPx:0}):ae>me?(f.dequeue(),J={lineNumber:Y.lineNumber-I+w,heightInPx:0}):(d.dequeue(),f.dequeue()),x.push({originalRange:Za.ofLength(J.lineNumber,1),modifiedRange:Za.ofLength(Y.lineNumber,1),originalHeightInPx:m+J.heightInPx,modifiedHeightInPx:v+Y.heightInPx,diff:void 0})}}for(const O of i){let me=function(ye,Ce,Fe=!1){var Bi,$i;if(ye<ae||Ce<Y)return;if(J)J=!1;else if(!Fe&&(ye===ae||Ce===Y))return;const rt=new Za(ae,ye),ct=new Za(Y,Ce);if(rt.isEmpty&&ct.isEmpty)return;const Mt=((Bi=d.takeWhile($t=>$t.lineNumber<ye))==null?void 0:Bi.reduce(($t,Hi)=>$t+Hi.heightInPx,0))??0,Yt=(($i=f.takeWhile($t=>$t.lineNumber<Ce))==null?void 0:$i.reduce(($t,Hi)=>$t+Hi.heightInPx,0))??0;x.push({originalRange:rt,modifiedRange:ct,originalHeightInPx:rt.length*m+Mt,modifiedHeightInPx:ct.length*v+Yt,diff:O.lineRangeMapping}),ae=ye,Y=Ce};const z=O.lineRangeMapping;P(z.original.startLineNumber,z.modified.startLineNumber);let J=!0,Y=z.modified.startLineNumber,ae=z.original.startLineNumber;if(c)for(const ye of z.innerChanges||[]){ye.originalRange.startColumn>1&&ye.modifiedRange.startColumn>1&&me(ye.originalRange.startLineNumber,ye.modifiedRange.startLineNumber);const Ce=l.getModel(),Fe=ye.originalRange.endLineNumber<=Ce.getLineCount()?Ce.getLineMaxColumn(ye.originalRange.endLineNumber):Number.MAX_SAFE_INTEGER;ye.originalRange.endColumn<Fe&&me(ye.originalRange.endLineNumber,ye.modifiedRange.endLineNumber)}me(z.original.endLineNumberExclusive,z.modified.endLineNumberExclusive,!0),w=z.original.endLineNumberExclusive,I=z.modified.endLineNumberExclusive}return P(Number.MAX_VALUE,Number.MAX_VALUE),x}function awt(l,e){const i=[],n=[],s=l.getOption(147).wrappingColumn!==-1,c=l._getViewModel().coordinatesConverter,d=l.getOption(67);if(s)for(let m=1;m<=l.getModel().getLineCount();m++){const v=c.getModelLineViewLineCount(m);v>1&&n.push({lineNumber:m,heightInPx:d*(v-1)})}for(const m of l.getWhitespaces()){if(e.has(m.id))continue;const v=m.afterLineNumber===0?0:c.convertViewPositionToModelPosition(new pi(m.afterLineNumber,1)).lineNumber;i.push({lineNumber:v,heightInPx:m.height})}return uTi(i,n,m=>m.lineNumber,(m,v)=>({lineNumber:m.lineNumber,heightInPx:m.heightInPx+v.heightInPx}))}function bGe(l){return l.innerChanges?l.innerChanges.every(e=>cwt(e.modifiedRange)&&cwt(e.originalRange)||e.originalRange.equalsRange(new nt(1,1,1,1))):!1}function cwt(l){return l.startLineNumber===l.endLineNumber}const bne=class bne extends xi{constructor(e,i,n,s,c){super(),this._rootElement=e,this._diffModel=i,this._originalEditorLayoutInfo=n,this._modifiedEditorLayoutInfo=s,this._editors=c,this._originalScrollTop=Tu(this,this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=Tu(this,this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._viewZonesChanged=k0("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=bc(this,0),this._modifiedViewZonesChangedSignal=k0("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=k0("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=VR(this,(x,w)=>{var rt;this._element.replaceChildren();const I=this._diffModel.read(x),P=(rt=I==null?void 0:I.diff.read(x))==null?void 0:rt.movedTexts;if(!P||P.length===0){this.width.set(0,void 0);return}this._viewZonesChanged.read(x);const O=this._originalEditorLayoutInfo.read(x),z=this._modifiedEditorLayoutInfo.read(x);if(!O||!z){this.width.set(0,void 0);return}this._modifiedViewZonesChangedSignal.read(x),this._originalViewZonesChangedSignal.read(x);const J=P.map(ct=>{function Mt(Wr,Dr){const Rr=Dr.getTopForLineNumber(Wr.startLineNumber,!0),na=Dr.getTopForLineNumber(Wr.endLineNumberExclusive,!0);return(Rr+na)/2}const Yt=Mt(ct.lineRangeMapping.original,this._editors.original),Bi=this._originalScrollTop.read(x),$i=Mt(ct.lineRangeMapping.modified,this._editors.modified),$t=this._modifiedScrollTop.read(x),Hi=Yt-Bi,An=$i-$t,qt=Math.min(Yt,$i),ms=Math.max(Yt,$i);return{range:new xc(qt,ms),from:Hi,to:An,fromWithoutScroll:Yt,toWithoutScroll:$i,move:ct}});J.sort(Bai(yv(ct=>ct.fromWithoutScroll>ct.toWithoutScroll,Wai),yv(ct=>ct.fromWithoutScroll>ct.toWithoutScroll?ct.fromWithoutScroll:-ct.toWithoutScroll,mT)));const Y=CGe.compute(J.map(ct=>ct.range)),ae=10,me=O.verticalScrollbarWidth,ye=(Y.getTrackCount()-1)*10+ae*2,Ce=me+ye+(z.contentLeft-bne.movedCodeBlockPadding);let Fe=0;for(const ct of J){const Mt=Y.getTrack(Fe),Yt=me+ae+Mt*10,Bi=15,$i=15,$t=Ce,Hi=z.glyphMarginWidth+z.lineNumbersWidth,An=18,qt=document.createElementNS("http://www.w3.org/2000/svg","rect");qt.classList.add("arrow-rectangle"),qt.setAttribute("x",`${$t-Hi}`),qt.setAttribute("y",`${ct.to-An/2}`),qt.setAttribute("width",`${Hi}`),qt.setAttribute("height",`${An}`),this._element.appendChild(qt);const ms=document.createElementNS("http://www.w3.org/2000/svg","g"),Wr=document.createElementNS("http://www.w3.org/2000/svg","path");Wr.setAttribute("d",`M 0 ${ct.from} L ${Yt} ${ct.from} L ${Yt} ${ct.to} L ${$t-$i} ${ct.to}`),Wr.setAttribute("fill","none"),ms.appendChild(Wr);const Dr=document.createElementNS("http://www.w3.org/2000/svg","polygon");Dr.classList.add("arrow"),w.add(ba(Rr=>{Wr.classList.toggle("currentMove",ct.move===I.activeMovedText.read(Rr)),Dr.classList.toggle("currentMove",ct.move===I.activeMovedText.read(Rr))})),Dr.setAttribute("points",`${$t-$i},${ct.to-Bi/2} ${$t},${ct.to} ${$t-$i},${ct.to+Bi/2}`),ms.appendChild(Dr),this._element.appendChild(ms),Fe++}this.width.set(ye,void 0)}),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register(fo(()=>this._element.remove())),this._register(ba(x=>{const w=this._originalEditorLayoutInfo.read(x),I=this._modifiedEditorLayoutInfo.read(x);!w||!I||(this._element.style.left=`${w.width-w.verticalScrollbarWidth}px`,this._element.style.height=`${w.height}px`,this._element.style.width=`${w.verticalScrollbarWidth+w.contentLeft-bne.movedCodeBlockPadding+this.width.read(x)}px`)})),this._register(kJ(this._state));const d=ro(x=>{const w=this._diffModel.read(x),I=w==null?void 0:w.diff.read(x);return I?I.movedTexts.map(P=>({move:P,original:new pq(mk(P.lineRangeMapping.original.startLineNumber-1),18),modified:new pq(mk(P.lineRangeMapping.modified.startLineNumber-1),18)})):[]});this._register(Mve(this._editors.original,d.map(x=>x.map(w=>w.original)))),this._register(Mve(this._editors.modified,d.map(x=>x.map(w=>w.modified)))),this._register(Ib((x,w)=>{const I=d.read(x);for(const P of I)w.add(new lwt(this._editors.original,P.original,P.move,"original",this._diffModel.get())),w.add(new lwt(this._editors.modified,P.modified,P.move,"modified",this._diffModel.get()))}));const f=k0("original.onDidFocusEditorWidget",x=>this._editors.original.onDidFocusEditorWidget(()=>setTimeout(()=>x(void 0),0))),m=k0("modified.onDidFocusEditorWidget",x=>this._editors.modified.onDidFocusEditorWidget(()=>setTimeout(()=>x(void 0),0)));let v="modified";this._register(Tse({createEmptyChangeSummary:()=>{},handleChange:(x,w)=>(x.didChange(f)&&(v="original"),x.didChange(m)&&(v="modified"),!0)},x=>{f.read(x),m.read(x);const w=this._diffModel.read(x);if(!w)return;const I=w.diff.read(x);let P;if(I&&v==="original"){const O=this._editors.originalCursor.read(x);O&&(P=I.movedTexts.find(z=>z.lineRangeMapping.original.contains(O.lineNumber)))}if(I&&v==="modified"){const O=this._editors.modifiedCursor.read(x);O&&(P=I.movedTexts.find(z=>z.lineRangeMapping.modified.contains(O.lineNumber)))}P!==w.movedTextToCompare.get()&&w.movedTextToCompare.set(void 0,void 0),w.setActiveMovedText(P)}))}};bne.movedCodeBlockPadding=4;let a$=bne;class CGe{static compute(e){const i=[],n=[];for(const s of e){let c=i.findIndex(d=>!d.intersectsStrict(s));c===-1&&(i.length>=6?c=Chi(i,yv(f=>f.intersectWithRangeLength(s),mT)):(c=i.length,i.push(new C$e))),i[c].addRange(s),n.push(c)}return new CGe(i.length,n)}constructor(e,i){this._trackCount=e,this.trackPerLineIdx=i}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}}class lwt extends dGe{constructor(e,i,n,s,c){const d=Rc("div.diff-hidden-lines-widget");super(e,i,d.root),this._editor=e,this._move=n,this._kind=s,this._diffModel=c,this._nodes=Rc("div.diff-moved-code-block",{style:{marginRight:"4px"}},[Rc("div.text-content@textContent"),Rc("div.action-bar@actionBar")]),d.root.appendChild(this._nodes.root);const f=Tu(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._register(f6(this._nodes.root,{paddingRight:f.map(I=>I.verticalScrollbarWidth)}));let m;n.changes.length>0?m=this._kind==="original"?W("codeMovedToWithChanges","Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):W("codeMovedFromWithChanges","Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):m=this._kind==="original"?W("codeMovedTo","Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):W("codeMovedFrom","Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);const v=this._register(new kw(this._nodes.actionBar,{highlightToggledItems:!0})),x=new $C("",m,"",!1);v.push(x,{icon:!1,label:!0});const w=new $C("","Compare",zo.asClassName(pr.compareChanges),!0,()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===n?void 0:this._move,void 0)});this._register(ba(I=>{const P=this._diffModel.movedTextToCompare.read(I)===n;w.checked=P})),v.push(w,{icon:!1,label:!0})}}class BTi extends xi{constructor(e,i,n,s){super(),this._editors=e,this._diffModel=i,this._options=n,this._decorations=ro(this,c=>{const d=this._diffModel.read(c),f=d==null?void 0:d.diff.read(c);if(!f)return null;const m=this._diffModel.read(c).movedTextToCompare.read(c),v=this._options.renderIndicators.read(c),x=this._options.showEmptyDecorations.read(c),w=[],I=[];if(!m)for(const O of f.mappings)if(O.lineRangeMapping.original.isEmpty||w.push({range:O.lineRangeMapping.original.toInclusiveRange(),options:v?Ere:iwt}),O.lineRangeMapping.modified.isEmpty||I.push({range:O.lineRangeMapping.modified.toInclusiveRange(),options:v?Fve:twt}),O.lineRangeMapping.modified.isEmpty||O.lineRangeMapping.original.isEmpty)O.lineRangeMapping.original.isEmpty||w.push({range:O.lineRangeMapping.original.toInclusiveRange(),options:mGe}),O.lineRangeMapping.modified.isEmpty||I.push({range:O.lineRangeMapping.modified.toInclusiveRange(),options:_Ge});else{const z=this._options.useTrueInlineDiffRendering.read(c)&&bGe(O.lineRangeMapping);for(const J of O.lineRangeMapping.innerChanges||[])if(O.lineRangeMapping.original.contains(J.originalRange.startLineNumber)&&w.push({range:J.originalRange,options:J.originalRange.isEmpty()&&x?gGe:J$}),O.lineRangeMapping.modified.contains(J.modifiedRange.startLineNumber)&&I.push({range:J.modifiedRange,options:J.modifiedRange.isEmpty()&&x&&!z?pGe:Bve}),z){const Y=d.model.original.getValueInRange(J.originalRange);I.push({range:J.modifiedRange,options:{description:"deleted-text",before:{content:Y,inlineClassName:"inline-deleted-text"},zIndex:1e5,showIfCollapsed:!0}})}}if(m)for(const O of m.changes){const z=O.original.toInclusiveRange();z&&w.push({range:z,options:v?Ere:iwt});const J=O.modified.toInclusiveRange();J&&I.push({range:J,options:v?Fve:twt});for(const Y of O.innerChanges||[])w.push({range:Y.originalRange,options:J$}),I.push({range:Y.modifiedRange,options:Bve})}const P=this._diffModel.read(c).activeMovedText.read(c);for(const O of f.movedTexts)w.push({range:O.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(O===P?" currentMove":""),blockPadding:[a$.movedCodeBlockPadding,0,a$.movedCodeBlockPadding,a$.movedCodeBlockPadding]}}),I.push({range:O.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(O===P?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:w,modifiedDecorations:I}}),this._register(Ove(this._editors.original,this._decorations.map(c=>(c==null?void 0:c.originalDecorations)||[]))),this._register(Ove(this._editors.modified,this._decorations.map(c=>(c==null?void 0:c.modifiedDecorations)||[])))}}class WTi{resetSash(){this._sashRatio.set(void 0,void 0)}constructor(e,i){this._options=e,this.dimensions=i,this.sashLeft=xse(this,n=>{const s=this._sashRatio.read(n)??this._options.splitViewDefaultRatio.read(n);return this._computeSashLeft(s,n)},(n,s)=>{const c=this.dimensions.width.get();this._sashRatio.set(n/c,s)}),this._sashRatio=bc(this,void 0)}_computeSashLeft(e,i){const n=this.dimensions.width.read(i),s=Math.floor(this._options.splitViewDefaultRatio.read(i)*n),c=this._options.enableSplitViewResizing.read(i)?Math.floor(e*n):s,d=100;return n<=d*2?s:c<d?d:c>n-d?n-d:c}}class WIt extends xi{constructor(e,i,n,s,c,d){super(),this._domNode=e,this._dimensions=i,this._enabled=n,this._boundarySashes=s,this.sashLeft=c,this._resetSash=d,this._sash=this._register(new _1(this._domNode,{getVerticalSashTop:f=>0,getVerticalSashLeft:f=>this.sashLeft.get(),getVerticalSashHeight:f=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart(()=>{this._startSashPosition=this.sashLeft.get()})),this._register(this._sash.onDidChange(f=>{this.sashLeft.set(this._startSashPosition+(f.currentX-f.startX),void 0)})),this._register(this._sash.onDidEnd(()=>this._sash.layout())),this._register(this._sash.onDidReset(()=>this._resetSash())),this._register(ba(f=>{const m=this._boundarySashes.read(f);m&&(this._sash.orthogonalEndSash=m.bottom)})),this._register(ba(f=>{const m=this._enabled.read(f);this._sash.state=m?3:0,this.sashLeft.read(f),this._dimensions.height.read(f),this._sash.layout()}))}}class VTi extends xi{constructor(e,i,n){super(),this._editor=e,this._domNode=i,this.itemProvider=n,this.scrollTop=Tu(this,this._editor.onDidScrollChange,d=>this._editor.getScrollTop()),this.isScrollTopZero=this.scrollTop.map(d=>d===0),this.modelAttached=Tu(this,this._editor.onDidChangeModel,d=>this._editor.hasModel()),this.editorOnDidChangeViewZones=k0("onDidChangeViewZones",this._editor.onDidChangeViewZones),this.editorOnDidContentSizeChange=k0("onDidContentSizeChange",this._editor.onDidContentSizeChange),this.domNodeSizeChanged=xJ("domNodeSizeChanged"),this.views=new Map,this._domNode.className="gutter monaco-editor";const s=this._domNode.appendChild(Rc("div.scroll-decoration",{role:"presentation",ariaHidden:"true",style:{width:"100%"}}).root),c=new ResizeObserver(()=>{th(d=>{this.domNodeSizeChanged.trigger(d)})});c.observe(this._domNode),this._register(fo(()=>c.disconnect())),this._register(ba(d=>{s.className=this.isScrollTopZero.read(d)?"":"scroll-decoration"})),this._register(ba(d=>this.render(d)))}dispose(){super.dispose(),o0(this._domNode)}render(e){if(!this.modelAttached.read(e))return;this.domNodeSizeChanged.read(e),this.editorOnDidChangeViewZones.read(e),this.editorOnDidContentSizeChange.read(e);const i=this.scrollTop.read(e),n=this._editor.getVisibleRanges(),s=new Set(this.views.keys()),c=xc.ofStartAndLength(0,this._domNode.clientHeight);if(!c.isEmpty)for(const d of n){const f=new Za(d.startLineNumber,d.endLineNumber+1),m=this.itemProvider.getIntersectingGutterItems(f,e);th(v=>{for(const x of m){if(!x.range.intersect(f))continue;s.delete(x.id);let w=this.views.get(x.id);if(w)w.item.set(x,v);else{const z=document.createElement("div");this._domNode.appendChild(z);const J=bc("item",x),Y=this.itemProvider.createView(J,z);w=new HTi(J,Y,z),this.views.set(x.id,w)}const I=x.range.startLineNumber<=this._editor.getModel().getLineCount()?this._editor.getTopForLineNumber(x.range.startLineNumber,!0)-i:this._editor.getBottomForLineNumber(x.range.startLineNumber-1,!1)-i,O=(x.range.endLineNumberExclusive===1?Math.max(I,this._editor.getTopForLineNumber(x.range.startLineNumber,!1)-i):Math.max(I,this._editor.getBottomForLineNumber(x.range.endLineNumberExclusive-1,!0)-i))-I;w.domNode.style.top=`${I}px`,w.domNode.style.height=`${O}px`,w.gutterItemView.layout(xc.ofStartAndLength(I,O),c)}})}for(const d of s){const f=this.views.get(d);f.gutterItemView.dispose(),f.domNode.remove(),this.views.delete(d)}}}class HTi{constructor(e,i,n){this.item=e,this.gutterItemView=i,this.domNode=n}}class VIt extends TB{constructor(e){super(),this._getContext=e}runAction(e,i){const n=this._getContext();return super.runAction(e,n)}}class uwt extends nTt{constructor(e){super(),this._textModel=e}getValueOfRange(e){return this._textModel.getValueInRange(e)}get length(){const e=this._textModel.getLineCount(),i=this._textModel.getLineLength(e);return new ST(e-1,i)}}class jTi extends xi{constructor(e,i,n={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new lli),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new wn),n.hoverDelegate=n.hoverDelegate??this._register(W$()),this.options=n,this.toggleMenuAction=this._register(new Ire(()=>{var s;return(s=this.toggleMenuActionViewItem)==null?void 0:s.show()},n.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new kw(this.element,{orientation:n.orientation,ariaLabel:n.ariaLabel,actionRunner:n.actionRunner,allowContextMenu:n.allowContextMenu,highlightToggledItems:n.highlightToggledItems,hoverDelegate:n.hoverDelegate,actionViewItemProvider:(s,c)=>{if(s.id===Ire.ID)return this.toggleMenuActionViewItem=new Vye(s,s.menuActions,i,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:zo.asClassNameArray(n.moreIcon??pr.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,isMenu:!0,hoverDelegate:this.options.hoverDelegate}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(n.actionViewItemProvider){const d=n.actionViewItemProvider(s,c);if(d)return d}if(s instanceof T$){const d=new Vye(s,s.actions,i,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:s.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,hoverDelegate:this.options.hoverDelegate});return d.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(d),this.disposables.add(this._onDidChangeDropdownVisibility.add(d.onDidChangeVisibility)),d}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,i){this.clear();const n=e?e.slice(0):[];this.hasSecondaryActions=!!(i&&i.length>0),this.hasSecondaryActions&&i&&(this.toggleMenuAction.menuActions=i.slice(0),n.push(this.toggleMenuAction)),n.forEach(s=>{this.actionBar.push(s,{icon:this.options.icon??!0,label:this.options.label??!1,keybinding:this.getKeybindingLabel(s)})})}getKeybindingLabel(e){var n,s;const i=(s=(n=this.options).getKeyBinding)==null?void 0:s.call(n,e);return(i==null?void 0:i.getLabel())??void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}const OCe=class OCe extends $C{constructor(e,i){i=i||W("moreActions","More Actions..."),super(OCe.ID,i,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}};OCe.ID="toolbar.toggle.more";let Ire=OCe;var HIt=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},uT=function(l,e){return function(i,n){e(i,n,l)}};let Nre=class extends jTi{constructor(e,i,n,s,c,d,f,m){super(e,c,{getKeyBinding:x=>d.lookupKeybinding(x.id)??void 0,...i,allowContextMenu:!0,skipTelemetry:typeof(i==null?void 0:i.telemetrySource)=="string"}),this._options=i,this._menuService=n,this._contextKeyService=s,this._contextMenuService=c,this._keybindingService=d,this._commandService=f,this._sessionDisposables=this._store.add(new wn);const v=i==null?void 0:i.telemetrySource;v&&this._store.add(this.actionBar.onDidRun(x=>m.publicLog2("workbenchActionExecuted",{id:x.action.id,from:v})))}setActions(e,i=[],n){var x,w,I;this._sessionDisposables.clear();const s=e.slice(),c=i.slice(),d=[];let f=0;const m=[];let v=!1;if(((x=this._options)==null?void 0:x.hiddenItemStrategy)!==-1)for(let P=0;P<s.length;P++){const O=s[P];!(O instanceof JC)&&!(O instanceof zq)||O.hideActions&&(d.push(O.hideActions.toggle),O.hideActions.toggle.checked&&f++,O.hideActions.isHidden&&(v=!0,s[P]=void 0,((w=this._options)==null?void 0:w.hiddenItemStrategy)!==0&&(m[P]=O)))}if(((I=this._options)==null?void 0:I.overflowBehavior)!==void 0){const P=nvi(new Set(this._options.overflowBehavior.exempted),dl.map(s,J=>J==null?void 0:J.id)),O=this._options.overflowBehavior.maxItems-P.size;let z=0;for(let J=0;J<s.length;J++){const Y=s[J];Y&&(z++,!P.has(Y.id)&&z>=O&&(s[J]=void 0,m[J]=Y))}}jyt(s),jyt(m),super.setActions(s,Rm.join(m,c)),(d.length>0||s.length>0)&&this._sessionDisposables.add(en(this.getElement(),"contextmenu",P=>{var ae,me,ye,Ce,Fe;const O=new hT(Eo(this.getElement()),P),z=this.getItemAction(O.target);if(!z)return;O.preventDefault(),O.stopPropagation();const J=[];if(z instanceof JC&&z.menuKeybinding)J.push(z.menuKeybinding);else if(!(z instanceof zq||z instanceof Ire)){const rt=!!this._keybindingService.lookupKeybinding(z.id);J.push(rIt(this._commandService,this._keybindingService,z.id,void 0,rt))}if(d.length>0){let rt=!1;if(f===1&&((ae=this._options)==null?void 0:ae.hiddenItemStrategy)===0){rt=!0;for(let ct=0;ct<d.length;ct++)if(d[ct].checked){d[ct]=_9({id:z.id,label:z.label,checked:!0,enabled:!1,run(){}});break}}if(!rt&&(z instanceof JC||z instanceof zq)){if(!z.hideActions)return;J.push(z.hideActions.hide)}else J.push(_9({id:"label",label:W("hide","Hide"),enabled:!1,run(){}}))}const Y=Rm.join(J,d);(me=this._options)!=null&&me.resetMenu&&!n&&(n=[this._options.resetMenu]),v&&n&&(Y.push(new Rm),Y.push(_9({id:"resetThisMenu",label:W("resetThisMenu","Reset Menu"),run:()=>this._menuService.resetHiddenStates(n)}))),Y.length!==0&&this._contextMenuService.showContextMenu({getAnchor:()=>O,getActions:()=>Y,menuId:(ye=this._options)==null?void 0:ye.contextMenu,menuActionOptions:{renderShortTitle:!0,...(Ce=this._options)==null?void 0:Ce.menuOptions},skipTelemetry:typeof((Fe=this._options)==null?void 0:Fe.telemetrySource)=="string",contextKeyService:this._contextKeyService})}))}};Nre=HIt([uT(2,Lw),uT(3,Ko),uT(4,eS),uT(5,pu),uT(6,qd),uT(7,b1)],Nre);let Wve=class extends Nre{constructor(e,i,n,s,c,d,f,m,v){super(e,{resetMenu:i,...n},s,c,d,f,m,v),this._onDidChangeMenuItems=this._store.add(new gi),this.onDidChangeMenuItems=this._onDidChangeMenuItems.event;const x=this._store.add(s.createMenu(i,c,{emitEventsForSubmenuChanges:!0})),w=()=>{var O,z,J;const I=[],P=[];vwe(x,n==null?void 0:n.menuOptions,{primary:I,secondary:P},(O=n==null?void 0:n.toolbarOptions)==null?void 0:O.primaryGroup,(z=n==null?void 0:n.toolbarOptions)==null?void 0:z.shouldInlineSubmenu,(J=n==null?void 0:n.toolbarOptions)==null?void 0:J.useSeparatorsInPrimaryActions),e.classList.toggle("has-no-actions",I.length===0&&P.length===0),super.setActions(I,P)};this._store.add(x.onDidChange(()=>{w(),this._onDidChangeMenuItems.fire(this)})),w()}setActions(){throw new tu("This toolbar is populated from a menu.")}};Wve=HIt([uT(3,Lw),uT(4,Ko),uT(5,eS),uT(6,pu),uT(7,qd),uT(8,b1)],Wve);var jIt=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},D1e=function(l,e){return function(i,n){e(i,n,l)}};const S9e=[],I0e=35;let Lje=class extends xi{constructor(e,i,n,s,c,d,f,m,v){super(),this._diffModel=i,this._editors=n,this._options=s,this._sashLayout=c,this._boundarySashes=d,this._instantiationService=f,this._contextKeyService=m,this._menuService=v,this._menu=this._register(this._menuService.createMenu(As.DiffEditorHunkToolbar,this._contextKeyService)),this._actions=Tu(this,this._menu.onDidChange,()=>this._menu.getActions()),this._hasActions=this._actions.map(x=>x.length>0),this._showSash=ro(this,x=>this._options.renderSideBySide.read(x)&&this._hasActions.read(x)),this.width=ro(this,x=>this._hasActions.read(x)?I0e:0),this.elements=Rc("div.gutter@gutter",{style:{position:"absolute",height:"100%",width:I0e+"px"}},[]),this._currentDiff=ro(this,x=>{var O;const w=this._diffModel.read(x);if(!w)return;const I=(O=w.diff.read(x))==null?void 0:O.mappings,P=this._editors.modifiedCursor.read(x);if(P)return I==null?void 0:I.find(z=>z.lineRangeMapping.modified.contains(P.lineNumber))}),this._selectedDiffs=ro(this,x=>{const w=this._diffModel.read(x),I=w==null?void 0:w.diff.read(x);if(!I)return S9e;const P=this._editors.modifiedSelections.read(x);if(P.every(Y=>Y.isEmpty()))return S9e;const O=new _k(P.map(Y=>Za.fromRangeInclusive(Y))),J=I.mappings.filter(Y=>Y.lineRangeMapping.innerChanges&&O.intersects(Y.lineRangeMapping.modified)).map(Y=>({mapping:Y,rangeMappings:Y.lineRangeMapping.innerChanges.filter(ae=>P.some(me=>nt.areIntersecting(ae.modifiedRange,me)))}));return J.length===0||J.every(Y=>Y.rangeMappings.length===0)?S9e:J}),this._register(dTi(e,this.elements.root)),this._register(en(this.elements.root,"click",()=>{this._editors.modified.focus()})),this._register(f6(this.elements.root,{display:this._hasActions.map(x=>x?"block":"none")})),Cy(this,x=>this._showSash.read(x)?new WIt(e,this._sashLayout.dimensions,this._options.enableSplitViewResizing,this._boundarySashes,xse(this,I=>this._sashLayout.sashLeft.read(I)-I0e,(I,P)=>this._sashLayout.sashLeft.set(I+I0e,P)),()=>this._sashLayout.resetSash()):void 0).recomputeInitiallyAndOnChange(this._store),this._register(new VTi(this._editors.modified,this.elements.root,{getIntersectingGutterItems:(x,w)=>{const I=this._diffModel.read(w);if(!I)return[];const P=I.diff.read(w);if(!P)return[];const O=this._selectedDiffs.read(w);if(O.length>0){const J=xw.fromRangeMappings(O.flatMap(Y=>Y.rangeMappings));return[new dwt(J,!0,As.DiffEditorSelectionToolbar,void 0,I.model.original.uri,I.model.modified.uri)]}const z=this._currentDiff.read(w);return P.mappings.map(J=>new dwt(J.lineRangeMapping.withInnerChangesFromLineRanges(),J.lineRangeMapping===(z==null?void 0:z.lineRangeMapping),As.DiffEditorHunkToolbar,void 0,I.model.original.uri,I.model.modified.uri))},createView:(x,w)=>this._instantiationService.createInstance(Pje,x,w,this)})),this._register(en(this.elements.gutter,br.MOUSE_WHEEL,x=>{this._editors.modified.getOption(104).handleMouseWheel&&this._editors.modified.delegateScrollFromMouseWheelEvent(x)},{passive:!1}))}computeStagedValue(e){const i=e.innerChanges??[],n=new uwt(this._editors.modifiedModel.get()),s=new uwt(this._editors.original.getModel());return new w$e(i.map(f=>f.toTextEdit(n))).apply(s)}layout(e){this.elements.gutter.style.left=e+"px"}};Lje=jIt([D1e(6,ho),D1e(7,Ko),D1e(8,Lw)],Lje);class dwt{constructor(e,i,n,s,c,d){this.mapping=e,this.showAlways=i,this.menuId=n,this.rangeOverride=s,this.originalUri=c,this.modifiedUri=d}get id(){return this.mapping.modified.toString()}get range(){return this.rangeOverride??this.mapping.modified}}let Pje=class extends xi{constructor(e,i,n,s){super(),this._item=e,this._elements=Rc("div.gutterItem",{style:{height:"20px",width:"34px"}},[Rc("div.background@background",{},[]),Rc("div.buttons@buttons",{},[])]),this._showAlways=this._item.map(this,d=>d.showAlways),this._menuId=this._item.map(this,d=>d.menuId),this._isSmall=bc(this,!1),this._lastItemRange=void 0,this._lastViewRange=void 0;const c=this._register(s.createInstance(P$,"element",!0,{position:{hoverPosition:1}}));this._register(_q(i,this._elements.root)),this._register(ba(d=>{const f=this._showAlways.read(d);this._elements.root.classList.toggle("noTransition",!0),this._elements.root.classList.toggle("showAlways",f),setTimeout(()=>{this._elements.root.classList.toggle("noTransition",!1)},0)})),this._register(Ib((d,f)=>{this._elements.buttons.replaceChildren();const m=f.add(s.createInstance(Wve,this._elements.buttons,this._menuId.read(d),{orientation:1,hoverDelegate:c,toolbarOptions:{primaryGroup:v=>v.startsWith("primary")},overflowBehavior:{maxItems:this._isSmall.read(d)?1:3},hiddenItemStrategy:0,actionRunner:new VIt(()=>{const v=this._item.get(),x=v.mapping;return{mapping:x,originalWithModifiedChanges:n.computeStagedValue(x),originalUri:v.originalUri,modifiedUri:v.modifiedUri}}),menuOptions:{shouldForwardArgs:!0}}));f.add(m.onDidChangeMenuItems(()=>{this._lastItemRange&&this.layout(this._lastItemRange,this._lastViewRange)}))}))}layout(e,i){this._lastItemRange=e,this._lastViewRange=i;let n=this._elements.buttons.clientHeight;this._isSmall.set(this._item.get().mapping.original.startLineNumber===1&&e.length<30,void 0),n=this._elements.buttons.clientHeight;const s=e.length/2-n/2,c=n;let d=e.start+s;const f=xc.tryCreate(c,i.endExclusive-c-n),m=xc.tryCreate(e.start+c,e.endExclusive-n-c);m&&f&&m.start<m.endExclusive&&(d=f.clip(d),d=m.clip(d)),this._elements.buttons.style.top=`${d-e.start}px`}};Pje=jIt([D1e(3,ho)],Pje);function zC(l){return Aje.get(l)}const yM=class yM extends xi{static get(e){let i=yM._map.get(e);if(!i){i=new yM(e),yM._map.set(e,i);const n=e.onDidDispose(()=>{const s=yM._map.get(e);s&&(yM._map.delete(e),s.dispose(),n.dispose())})}return i}_beginUpdate(){this._updateCounter++,this._updateCounter===1&&(this._currentTransaction=new wJ(()=>{}))}_endUpdate(){if(this._updateCounter--,this._updateCounter===0){const e=this._currentTransaction;this._currentTransaction=void 0,e.finish()}}constructor(e){var i;super(),this.editor=e,this._updateCounter=0,this._currentTransaction=void 0,this._model=bc(this,this.editor.getModel()),this.model=this._model,this.isReadonly=Tu(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(92)),this._versionId=BVe({owner:this,lazy:!0},((i=this.editor.getModel())==null?void 0:i.getVersionId())??null),this.versionId=this._versionId,this._selections=BVe({owner:this,equalsFn:MVe(Fye(Us.selectionsEqual)),lazy:!0},this.editor.getSelections()??null),this.selections=this._selections,this.isFocused=Tu(this,n=>{const s=this.editor.onDidFocusEditorWidget(n),c=this.editor.onDidBlurEditorWidget(n);return{dispose(){s.dispose(),c.dispose()}}},()=>this.editor.hasWidgetFocus()),this.value=xse(this,n=>{var s;return this.versionId.read(n),((s=this.model.read(n))==null?void 0:s.getValue())??""},(n,s)=>{const c=this.model.get();c!==null&&n!==c.getValue()&&c.setValue(n)}),this.valueIsEmpty=ro(this,n=>{var s;return this.versionId.read(n),((s=this.editor.getModel())==null?void 0:s.getValueLength())===0}),this.cursorSelection=mw({owner:this,equalsFn:MVe(Us.selectionsEqual)},n=>{var s;return((s=this.selections.read(n))==null?void 0:s[0])??null}),this.onDidType=xJ(this),this.scrollTop=Tu(this.editor.onDidScrollChange,()=>this.editor.getScrollTop()),this.scrollLeft=Tu(this.editor.onDidScrollChange,()=>this.editor.getScrollLeft()),this.layoutInfo=Tu(this.editor.onDidLayoutChange,()=>this.editor.getLayoutInfo()),this.layoutInfoContentLeft=this.layoutInfo.map(n=>n.contentLeft),this.layoutInfoDecorationsLeft=this.layoutInfo.map(n=>n.decorationsLeft),this.contentWidth=Tu(this.editor.onDidContentSizeChange,()=>this.editor.getContentWidth()),this._overlayWidgetCounter=0,this._register(this.editor.onBeginUpdate(()=>this._beginUpdate())),this._register(this.editor.onEndUpdate(()=>this._endUpdate())),this._register(this.editor.onDidChangeModel(()=>{this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._forceUpdate()}finally{this._endUpdate()}})),this._register(this.editor.onDidType(n=>{this._beginUpdate();try{this._forceUpdate(),this.onDidType.trigger(this._currentTransaction,n)}finally{this._endUpdate()}})),this._register(this.editor.onDidChangeModelContent(n=>{var s;this._beginUpdate();try{this._versionId.set(((s=this.editor.getModel())==null?void 0:s.getVersionId())??null,this._currentTransaction,n),this._forceUpdate()}finally{this._endUpdate()}})),this._register(this.editor.onDidChangeCursorSelection(n=>{this._beginUpdate();try{this._selections.set(this.editor.getSelections(),this._currentTransaction,n),this._forceUpdate()}finally{this._endUpdate()}}))}forceUpdate(e){this._beginUpdate();try{return this._forceUpdate(),e?e(this._currentTransaction):void 0}finally{this._endUpdate()}}_forceUpdate(){var e;this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._versionId.set(((e=this.editor.getModel())==null?void 0:e.getVersionId())??null,this._currentTransaction,void 0),this._selections.set(this.editor.getSelections(),this._currentTransaction,void 0)}finally{this._endUpdate()}}getOption(e){return Tu(this,i=>this.editor.onDidChangeConfiguration(n=>{n.hasChanged(e)&&i(void 0)}),()=>this.editor.getOption(e))}setDecorations(e){const i=new wn,n=this.editor.createDecorationsCollection();return i.add(kse({owner:this,debugName:()=>`Apply decorations from ${e.debugName}`},s=>{const c=e.read(s);n.set(c)})),i.add({dispose:()=>{n.clear()}}),i}createOverlayWidget(e){const i="observableOverlayWidget"+this._overlayWidgetCounter++,n={getDomNode:()=>e.domNode,getPosition:()=>e.position.get(),getId:()=>i,allowEditorOverflow:e.allowEditorOverflow,getMinContentWidthInPx:()=>e.minContentWidthInPx.get()};this.editor.addOverlayWidget(n);const s=ba(c=>{e.position.read(c),e.minContentWidthInPx.read(c),this.editor.layoutOverlayWidget(n)});return fo(()=>{s.dispose(),this.editor.removeOverlayWidget(n)})}};yM._map=new Map;let Aje=yM;function Oje(l,e){return h1i({createEmptyChangeSummary:()=>({deltas:[],didChange:!1}),handleChange:(i,n)=>{if(i.didChange(l)){const s=i.change;s!==void 0&&n.deltas.push(s),n.didChange=!0}return!0}},(i,n)=>{const s=l.read(i);n.didChange&&e(s,n.deltas)})}function zTi(l,e){const i=new wn,n=Oje(l,(s,c)=>{i.clear(),e(s,c,i)});return{dispose(){n.dispose(),i.dispose()}}}var UTi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},qTi=function(l,e){return function(i,n){e(i,n,l)}},E1e,A9;let Vve=(A9=class extends xi{static setBreadcrumbsSourceFactory(e){this._breadcrumbsSourceFactory.set(e,void 0)}get isUpdatingHiddenAreas(){return this._isUpdatingHiddenAreas}constructor(e,i,n,s){super(),this._editors=e,this._diffModel=i,this._options=n,this._instantiationService=s,this._modifiedOutlineSource=Cy(this,m=>{const v=this._editors.modifiedModel.read(m),x=E1e._breadcrumbsSourceFactory.read(m);return!v||!x?void 0:x(v,this._instantiationService)}),this._isUpdatingHiddenAreas=!1,this._register(this._editors.original.onDidChangeCursorPosition(m=>{if(m.reason===1)return;const v=this._diffModel.get();th(x=>{for(const w of this._editors.original.getSelections()||[])v==null||v.ensureOriginalLineIsVisible(w.getStartPosition().lineNumber,0,x),v==null||v.ensureOriginalLineIsVisible(w.getEndPosition().lineNumber,0,x)})})),this._register(this._editors.modified.onDidChangeCursorPosition(m=>{if(m.reason===1)return;const v=this._diffModel.get();th(x=>{for(const w of this._editors.modified.getSelections()||[])v==null||v.ensureModifiedLineIsVisible(w.getStartPosition().lineNumber,0,x),v==null||v.ensureModifiedLineIsVisible(w.getEndPosition().lineNumber,0,x)})}));const c=this._diffModel.map((m,v)=>{var w;const x=(m==null?void 0:m.unchangedRegions.read(v))??[];return x.length===1&&x[0].modifiedLineNumber===1&&x[0].lineCount===((w=this._editors.modifiedModel.read(v))==null?void 0:w.getLineCount())?[]:x});this.viewZones=VR(this,(m,v)=>{const x=this._modifiedOutlineSource.read(m);if(!x)return{origViewZones:[],modViewZones:[]};const w=[],I=[],P=this._options.renderSideBySide.read(m),O=this._options.compactMode.read(m),z=c.read(m);for(let J=0;J<z.length;J++){const Y=z[J];if(!Y.shouldHideControls(m)&&!(O&&(J===0||J===z.length-1)))if(O){{const ae=ro(this,ye=>Y.getHiddenOriginalRange(ye).startLineNumber-1),me=new pq(ae,12);w.push(me),v.add(new fwt(this._editors.original,me,Y,!P))}{const ae=ro(this,ye=>Y.getHiddenModifiedRange(ye).startLineNumber-1),me=new pq(ae,12);I.push(me),v.add(new fwt(this._editors.modified,me,Y))}}else{{const ae=ro(this,ye=>Y.getHiddenOriginalRange(ye).startLineNumber-1),me=new pq(ae,24);w.push(me),v.add(new hwt(this._editors.original,me,Y,Y.originalUnchangedRange,!P,x,ye=>this._diffModel.get().ensureModifiedLineIsVisible(ye,2,void 0),this._options))}{const ae=ro(this,ye=>Y.getHiddenModifiedRange(ye).startLineNumber-1),me=new pq(ae,24);I.push(me),v.add(new hwt(this._editors.modified,me,Y,Y.modifiedUnchangedRange,!1,x,ye=>this._diffModel.get().ensureModifiedLineIsVisible(ye,2,void 0),this._options))}}}return{origViewZones:w,modViewZones:I}});const d={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},f={description:"Fold Unchanged",glyphMarginHoverMessage:new m1(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(W("foldUnchanged","Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+zo.asClassName(pr.fold),zIndex:10001};this._register(Ove(this._editors.original,ro(this,m=>{const v=c.read(m),x=v.map(w=>({range:w.originalUnchangedRange.toInclusiveRange(),options:d}));for(const w of v)w.shouldHideControls(m)&&x.push({range:nt.fromPositions(new pi(w.originalLineNumber,1)),options:f});return x}))),this._register(Ove(this._editors.modified,ro(this,m=>{const v=c.read(m),x=v.map(w=>({range:w.modifiedUnchangedRange.toInclusiveRange(),options:d}));for(const w of v)w.shouldHideControls(m)&&x.push({range:Za.ofLength(w.modifiedLineNumber,1).toInclusiveRange(),options:f});return x}))),this._register(ba(m=>{const v=c.read(m);this._isUpdatingHiddenAreas=!0;try{this._editors.original.setHiddenAreas(v.map(x=>x.getHiddenOriginalRange(m).toInclusiveRange()).filter(xL)),this._editors.modified.setHiddenAreas(v.map(x=>x.getHiddenModifiedRange(m).toInclusiveRange()).filter(xL))}finally{this._isUpdatingHiddenAreas=!1}})),this._register(this._editors.modified.onMouseUp(m=>{var v;if(!m.event.rightButton&&m.target.position&&((v=m.target.element)!=null&&v.className.includes("fold-unchanged"))){const x=m.target.position.lineNumber,w=this._diffModel.get();if(!w)return;const I=w.unchangedRegions.get().find(P=>P.modifiedUnchangedRange.includes(x));if(!I)return;I.collapseAll(void 0),m.event.stopPropagation(),m.event.preventDefault()}})),this._register(this._editors.original.onMouseUp(m=>{var v;if(!m.event.rightButton&&m.target.position&&((v=m.target.element)!=null&&v.className.includes("fold-unchanged"))){const x=m.target.position.lineNumber,w=this._diffModel.get();if(!w)return;const I=w.unchangedRegions.get().find(P=>P.originalUnchangedRange.includes(x));if(!I)return;I.collapseAll(void 0),m.event.stopPropagation(),m.event.preventDefault()}}))}},E1e=A9,A9._breadcrumbsSourceFactory=bc(E1e,()=>({dispose(){},getBreadcrumbItems(e,i){return[]}})),A9);Vve=E1e=UTi([qTi(3,ho)],Vve);class fwt extends dGe{constructor(e,i,n,s=!1){const c=Rc("div.diff-hidden-lines-widget");super(e,i,c.root),this._unchangedRegion=n,this._hide=s,this._nodes=Rc("div.diff-hidden-lines-compact",[Rc("div.line-left",[]),Rc("div.text@text",[]),Rc("div.line-right",[])]),c.root.appendChild(this._nodes.root),this._hide&&this._nodes.root.replaceChildren(),this._register(ba(d=>{if(!this._hide){const f=this._unchangedRegion.getHiddenModifiedRange(d).length,m=W("hiddenLines","{0} hidden lines",f);this._nodes.text.innerText=m}}))}}class hwt extends dGe{constructor(e,i,n,s,c,d,f,m){const v=Rc("div.diff-hidden-lines-widget");super(e,i,v.root),this._editor=e,this._unchangedRegion=n,this._unchangedRegionRange=s,this._hide=c,this._modifiedOutlineSource=d,this._revealModifiedHiddenLine=f,this._options=m,this._nodes=Rc("div.diff-hidden-lines",[Rc("div.top@top",{title:W("diff.hiddenLines.top","Click or drag to show more above")}),Rc("div.center@content",{style:{display:"flex"}},[Rc("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[Cr("a",{title:W("showUnchangedRegion","Show Unchanged Region"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...JM("$(unfold)"))]),Rc("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),Rc("div.bottom@bottom",{title:W("diff.bottom","Click or drag to show more below"),role:"button"})]),v.root.appendChild(this._nodes.root),this._hide?o0(this._nodes.first):this._register(f6(this._nodes.first,{width:zC(this._editor).layoutInfoContentLeft})),this._register(ba(w=>{const I=this._unchangedRegion.visibleLineCountTop.read(w)+this._unchangedRegion.visibleLineCountBottom.read(w)===this._unchangedRegion.lineCount;this._nodes.bottom.classList.toggle("canMoveTop",!I),this._nodes.bottom.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(w)>0),this._nodes.top.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(w)>0),this._nodes.top.classList.toggle("canMoveBottom",!I);const P=this._unchangedRegion.isDragged.read(w),O=this._editor.getDomNode();O&&(O.classList.toggle("draggingUnchangedRegion",!!P),P==="top"?(O.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(w)>0),O.classList.toggle("canMoveBottom",!I)):P==="bottom"?(O.classList.toggle("canMoveTop",!I),O.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(w)>0)):(O.classList.toggle("canMoveTop",!1),O.classList.toggle("canMoveBottom",!1)))}));const x=this._editor;this._register(en(this._nodes.top,"mousedown",w=>{if(w.button!==0)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),w.preventDefault();const I=w.clientY;let P=!1;const O=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set("top",void 0);const z=Eo(this._nodes.top),J=en(z,"mousemove",ae=>{const ye=ae.clientY-I;P=P||Math.abs(ye)>2;const Ce=Math.round(ye/x.getOption(67)),Fe=Math.max(0,Math.min(O+Ce,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(Fe,void 0)}),Y=en(z,"mouseup",ae=>{P||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(void 0,void 0),J.dispose(),Y.dispose()})})),this._register(en(this._nodes.bottom,"mousedown",w=>{if(w.button!==0)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),w.preventDefault();const I=w.clientY;let P=!1;const O=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set("bottom",void 0);const z=Eo(this._nodes.bottom),J=en(z,"mousemove",ae=>{const ye=ae.clientY-I;P=P||Math.abs(ye)>2;const Ce=Math.round(ye/x.getOption(67)),Fe=Math.max(0,Math.min(O-Ce,this._unchangedRegion.getMaxVisibleLineCountBottom())),rt=this._unchangedRegionRange.endLineNumberExclusive>x.getModel().getLineCount()?x.getContentHeight():x.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(Fe,void 0);const ct=this._unchangedRegionRange.endLineNumberExclusive>x.getModel().getLineCount()?x.getContentHeight():x.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);x.setScrollTop(x.getScrollTop()+(ct-rt))}),Y=en(z,"mouseup",ae=>{if(this._unchangedRegion.isDragged.set(void 0,void 0),!P){const me=x.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const ye=x.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);x.setScrollTop(x.getScrollTop()+(ye-me))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),J.dispose(),Y.dispose()})})),this._register(ba(w=>{const I=[];if(!this._hide){const P=n.getHiddenModifiedRange(w).length,O=W("hiddenLines","{0} hidden lines",P),z=Cr("span",{title:W("diff.hiddenLines.expandAll","Double click to unfold")},O);z.addEventListener("dblclick",ae=>{ae.button===0&&(ae.preventDefault(),this._unchangedRegion.showAll(void 0))}),I.push(z);const J=this._unchangedRegion.getHiddenModifiedRange(w),Y=this._modifiedOutlineSource.getBreadcrumbItems(J,w);if(Y.length>0){I.push(Cr("span",void 0,"  |  "));for(let ae=0;ae<Y.length;ae++){const me=Y[ae],ye=Y1e.toIcon(me.kind),Ce=Rc("div.breadcrumb-item",{style:{display:"flex",alignItems:"center"}},[IB(ye)," ",me.name,...ae===Y.length-1?[]:[IB(pr.chevronRight)]]).root;I.push(Ce),Ce.onclick=()=>{this._revealModifiedHiddenLine(me.startLineNumber)}}}}o0(this._nodes.others,...I)}))}}var $Ti=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},JTi=function(l,e){return function(i,n){e(i,n,l)}},fE,G4;let Lre=(G4=class extends xi{constructor(e,i,n,s,c,d,f){super(),this._editors=e,this._rootElement=i,this._diffModel=n,this._rootWidth=s,this._rootHeight=c,this._modifiedEditorLayoutInfo=d,this._themeService=f,this.width=fE.ENTIRE_DIFF_OVERVIEW_WIDTH;const m=Tu(this._themeService.onDidColorThemeChange,()=>this._themeService.getColorTheme()),v=ro(I=>{const P=m.read(I),O=P.getColor(_pi)||(P.getColor(fpi)||nVe).transparent(2),z=P.getColor(ppi)||(P.getColor(hpi)||rVe).transparent(2);return{insertColor:O,removeColor:z}}),x=_u(document.createElement("div"));x.setClassName("diffViewport"),x.setPosition("absolute");const w=Rc("div.diffOverview",{style:{position:"absolute",top:"0px",width:fE.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;this._register(_q(w,x.domNode)),this._register(ph(w,br.POINTER_DOWN,I=>{this._editors.modified.delegateVerticalScrollbarPointerDown(I)})),this._register(en(w,br.MOUSE_WHEEL,I=>{this._editors.modified.delegateScrollFromMouseWheelEvent(I)},{passive:!1})),this._register(_q(this._rootElement,w)),this._register(Ib((I,P)=>{const O=this._diffModel.read(I),z=this._editors.original.createOverviewRuler("original diffOverviewRuler");z&&(P.add(z),P.add(_q(w,z.getDomNode())));const J=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(J&&(P.add(J),P.add(_q(w,J.getDomNode()))),!z||!J)return;const Y=k0("viewZoneChanged",this._editors.original.onDidChangeViewZones),ae=k0("viewZoneChanged",this._editors.modified.onDidChangeViewZones),me=k0("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),ye=k0("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);P.add(ba(Ce=>{var Bi;Y.read(Ce),ae.read(Ce),me.read(Ce),ye.read(Ce);const Fe=v.read(Ce),rt=(Bi=O==null?void 0:O.diff.read(Ce))==null?void 0:Bi.mappings;function ct($i,$t,Hi){const An=Hi._getViewModel();return An?$i.filter(qt=>qt.length>0).map(qt=>{const ms=An.coordinatesConverter.convertModelPositionToViewPosition(new pi(qt.startLineNumber,1)),Wr=An.coordinatesConverter.convertModelPositionToViewPosition(new pi(qt.endLineNumberExclusive,1)),Dr=Wr.lineNumber-ms.lineNumber;return new IIt(ms.lineNumber,Wr.lineNumber,Dr,$t.toString())}):[]}const Mt=ct((rt||[]).map($i=>$i.lineRangeMapping.original),Fe.removeColor,this._editors.original),Yt=ct((rt||[]).map($i=>$i.lineRangeMapping.modified),Fe.insertColor,this._editors.modified);z==null||z.setZones(Mt),J==null||J.setZones(Yt)})),P.add(ba(Ce=>{const Fe=this._rootHeight.read(Ce),rt=this._rootWidth.read(Ce),ct=this._modifiedEditorLayoutInfo.read(Ce);if(ct){const Mt=fE.ENTIRE_DIFF_OVERVIEW_WIDTH-2*fE.ONE_OVERVIEW_WIDTH;z.setLayout({top:0,height:Fe,right:Mt+fE.ONE_OVERVIEW_WIDTH,width:fE.ONE_OVERVIEW_WIDTH}),J.setLayout({top:0,height:Fe,right:0,width:fE.ONE_OVERVIEW_WIDTH});const Yt=this._editors.modifiedScrollTop.read(Ce),Bi=this._editors.modifiedScrollHeight.read(Ce),$i=this._editors.modified.getOption(104),$t=new O$($i.verticalHasArrows?$i.arrowSize:0,$i.verticalScrollbarSize,0,ct.height,Bi,Yt);x.setTop($t.getSliderPosition()),x.setHeight($t.getSliderSize())}else x.setTop(0),x.setHeight(0);w.style.height=Fe+"px",w.style.left=rt-fE.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",x.setWidth(fE.ENTIRE_DIFF_OVERVIEW_WIDTH)}))}))}},fE=G4,G4.ONE_OVERVIEW_WIDTH=15,G4.ENTIRE_DIFF_OVERVIEW_WIDTH=G4.ONE_OVERVIEW_WIDTH*2,G4);Lre=fE=$Ti([JTi(6,im)],Lre);const w9e=[];class GTi extends xi{constructor(e,i,n,s){super(),this._editors=e,this._diffModel=i,this._options=n,this._widget=s,this._selectedDiffs=ro(this,c=>{const d=this._diffModel.read(c),f=d==null?void 0:d.diff.read(c);if(!f)return w9e;const m=this._editors.modifiedSelections.read(c);if(m.every(I=>I.isEmpty()))return w9e;const v=new _k(m.map(I=>Za.fromRangeInclusive(I))),w=f.mappings.filter(I=>I.lineRangeMapping.innerChanges&&v.intersects(I.lineRangeMapping.modified)).map(I=>({mapping:I,rangeMappings:I.lineRangeMapping.innerChanges.filter(P=>m.some(O=>nt.areIntersecting(P.modifiedRange,O)))}));return w.length===0||w.every(I=>I.rangeMappings.length===0)?w9e:w}),this._register(Ib((c,d)=>{if(!this._options.shouldRenderOldRevertArrows.read(c))return;const f=this._diffModel.read(c),m=f==null?void 0:f.diff.read(c);if(!f||!m||f.movedTextToCompare.read(c))return;const v=[],x=this._selectedDiffs.read(c),w=new Set(x.map(I=>I.mapping));if(x.length>0){const I=this._editors.modifiedSelections.read(c),P=d.add(new Hve(I[I.length-1].positionLineNumber,this._widget,x.flatMap(O=>O.rangeMappings),!0));this._editors.modified.addGlyphMarginWidget(P),v.push(P)}for(const I of m.mappings)if(!w.has(I)&&!I.lineRangeMapping.modified.isEmpty&&I.lineRangeMapping.innerChanges){const P=d.add(new Hve(I.lineRangeMapping.modified.startLineNumber,this._widget,I.lineRangeMapping,!1));this._editors.modified.addGlyphMarginWidget(P),v.push(P)}d.add(fo(()=>{for(const I of v)this._editors.modified.removeGlyphMarginWidget(I)}))}))}}const MCe=class MCe extends xi{getId(){return this._id}constructor(e,i,n,s){super(),this._lineNumber=e,this._widget=i,this._diffs=n,this._revertSelection=s,this._id=`revertButton${MCe.counter++}`,this._domNode=Rc("div.revertButton",{title:this._revertSelection?W("revertSelectedChanges","Revert Selected Changes"):W("revertChange","Revert Change")},[IB(pr.arrowRight)]).root,this._register(en(this._domNode,br.MOUSE_DOWN,c=>{c.button!==2&&(c.stopPropagation(),c.preventDefault())})),this._register(en(this._domNode,br.MOUSE_UP,c=>{c.stopPropagation(),c.preventDefault()})),this._register(en(this._domNode,br.CLICK,c=>{this._diffs instanceof wy?this._widget.revert(this._diffs):this._widget.revertRangeMappings(this._diffs),c.stopPropagation(),c.preventDefault()}))}getDomNode(){return this._domNode}getPosition(){return{lane:CT.Right,range:{startColumn:1,startLineNumber:this._lineNumber,endColumn:1,endLineNumber:this._lineNumber},zIndex:10001}}};MCe.counter=0;let Hve=MCe;function KTi(l,e,i){return p1i({debugName:()=>`Configuration Key "${l}"`},n=>i.onDidChangeConfiguration(s=>{s.affectsConfiguration(l)&&n(s)}),()=>i.getValue(l)??e)}function _E(l,e,i){const n=l.bindTo(e);return kse({debugName:()=>`Set Context Key "${l.key}"`},s=>{n.set(i(s))})}var XTi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},_wt=function(l,e){return function(i,n){e(i,n,l)}};let Mje=class extends xi{get onDidContentSizeChange(){return this._onDidContentSizeChange.event}constructor(e,i,n,s,c,d,f){super(),this.originalEditorElement=e,this.modifiedEditorElement=i,this._options=n,this._argCodeEditorWidgetOptions=s,this._createInnerEditor=c,this._instantiationService=d,this._keybindingService=f,this.original=this._register(this._createLeftHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.modifiedEditor||{})),this._onDidContentSizeChange=this._register(new gi),this.modifiedScrollTop=Tu(this,this.modified.onDidScrollChange,()=>this.modified.getScrollTop()),this.modifiedScrollHeight=Tu(this,this.modified.onDidScrollChange,()=>this.modified.getScrollHeight()),this.modifiedObs=zC(this.modified),this.originalObs=zC(this.original),this.modifiedModel=this.modifiedObs.model,this.modifiedSelections=Tu(this,this.modified.onDidChangeCursorSelection,()=>this.modified.getSelections()??[]),this.modifiedCursor=mw({owner:this,equalsFn:pi.equals},m=>{var v;return((v=this.modifiedSelections.read(m)[0])==null?void 0:v.getPosition())??new pi(1,1)}),this.originalCursor=Tu(this,this.original.onDidChangeCursorPosition,()=>this.original.getPosition()??new pi(1,1)),this._argCodeEditorWidgetOptions=null,this._register(Tse({createEmptyChangeSummary:()=>({}),handleChange:(m,v)=>(m.didChange(n.editorOptions)&&Object.assign(v,m.change.changedOptions),!0)},(m,v)=>{n.editorOptions.read(m),this._options.renderSideBySide.read(m),this.modified.updateOptions(this._adjustOptionsForRightHandSide(m,v)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(m,v))}))}_createLeftHandSideEditor(e,i){const n=this._adjustOptionsForLeftHandSide(void 0,e),s=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,n,i);return s.setContextValue("isInDiffLeftEditor",!0),s}_createRightHandSideEditor(e,i){const n=this._adjustOptionsForRightHandSide(void 0,e),s=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,n,i);return s.setContextValue("isInDiffRightEditor",!0),s}_constructInnerEditor(e,i,n,s){const c=this._createInnerEditor(e,i,n,s);return this._register(c.onDidContentSizeChange(d=>{const f=this.original.getContentWidth()+this.modified.getContentWidth()+Lre.ENTIRE_DIFF_OVERVIEW_WIDTH,m=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:m,contentWidth:f,contentHeightChanged:d.contentHeightChanged,contentWidthChanged:d.contentWidthChanged})})),c}_adjustOptionsForLeftHandSide(e,i){const n=this._adjustOptionsForSubEditor(i);return this._options.renderSideBySide.get()?(n.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},n.wordWrapOverride1=this._options.diffWordWrap.get()):(n.wordWrapOverride1="off",n.wordWrapOverride2="off",n.stickyScroll={enabled:!1},n.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),n.glyphMargin=this._options.renderSideBySide.get(),i.originalAriaLabel&&(n.ariaLabel=i.originalAriaLabel),n.ariaLabel=this._updateAriaLabel(n.ariaLabel),n.readOnly=!this._options.originalEditable.get(),n.dropIntoEditor={enabled:!n.readOnly},n.extraEditorClassName="original-in-monaco-diff-editor",n}_adjustOptionsForRightHandSide(e,i){const n=this._adjustOptionsForSubEditor(i);return i.modifiedAriaLabel&&(n.ariaLabel=i.modifiedAriaLabel),n.ariaLabel=this._updateAriaLabel(n.ariaLabel),n.wordWrapOverride1=this._options.diffWordWrap.get(),n.revealHorizontalRightPadding=KE.revealHorizontalRightPadding.defaultValue+Lre.ENTIRE_DIFF_OVERVIEW_WIDTH,n.scrollbar.verticalHasArrows=!1,n.extraEditorClassName="modified-in-monaco-diff-editor",n}_adjustOptionsForSubEditor(e){const i={...e,dimension:{height:0,width:0}};return i.inDiffEditor=!0,i.automaticLayout=!1,i.scrollbar={...i.scrollbar||{}},i.folding=!1,i.codeLens=this._options.diffCodeLens.get(),i.fixedOverflowWidgets=!0,i.minimap={...i.minimap||{}},i.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?i.stickyScroll={enabled:!1}:i.stickyScroll=this._options.editorOptions.get().stickyScroll,i}_updateAriaLabel(e){var n;e||(e="");const i=W("diff-aria-navigation-tip"," use {0} to open the accessibility help.",(n=this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp"))==null?void 0:n.getAriaLabel());return this._options.accessibilityVerbose.get()?e+i:e?e.replaceAll(i,""):""}};Mje=XTi([_wt(5,ho),_wt(6,pu)],Mje);const RCe=class RCe extends xi{constructor(){super(...arguments),this._id=++RCe.idCounter,this._onDidDispose=this._register(new gi),this.onDidDispose=this._onDidDispose.event}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,i="api"){this._targetEditor.setPosition(e,i)}revealLine(e,i=0){this._targetEditor.revealLine(e,i)}revealLineInCenter(e,i=0){this._targetEditor.revealLineInCenter(e,i)}revealLineInCenterIfOutsideViewport(e,i=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,i)}revealLineNearTop(e,i=0){this._targetEditor.revealLineNearTop(e,i)}revealPosition(e,i=0){this._targetEditor.revealPosition(e,i)}revealPositionInCenter(e,i=0){this._targetEditor.revealPositionInCenter(e,i)}revealPositionInCenterIfOutsideViewport(e,i=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,i)}revealPositionNearTop(e,i=0){this._targetEditor.revealPositionNearTop(e,i)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,i="api"){this._targetEditor.setSelection(e,i)}setSelections(e,i="api"){this._targetEditor.setSelections(e,i)}revealLines(e,i,n=0){this._targetEditor.revealLines(e,i,n)}revealLinesInCenter(e,i,n=0){this._targetEditor.revealLinesInCenter(e,i,n)}revealLinesInCenterIfOutsideViewport(e,i,n=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,i,n)}revealLinesNearTop(e,i,n=0){this._targetEditor.revealLinesNearTop(e,i,n)}revealRange(e,i=0,n=!1,s=!0){this._targetEditor.revealRange(e,i,n,s)}revealRangeInCenter(e,i=0){this._targetEditor.revealRangeInCenter(e,i)}revealRangeInCenterIfOutsideViewport(e,i=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,i)}revealRangeNearTop(e,i=0){this._targetEditor.revealRangeNearTop(e,i)}revealRangeNearTopIfOutsideViewport(e,i=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,i)}revealRangeAtTop(e,i=0){this._targetEditor.revealRangeAtTop(e,i)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,i,n){this._targetEditor.trigger(e,i,n)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}};RCe.idCounter=0;let Rje=RCe;var QTi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},ZTi=function(l,e){return function(i,n){e(i,n,l)}};let Fje=class{get editorOptions(){return this._options}constructor(e,i){this._accessibilityService=i,this._diffEditorWidth=bc(this,0),this._screenReaderMode=Tu(this,this._accessibilityService.onDidChangeScreenReaderOptimized,()=>this._accessibilityService.isScreenReaderOptimized()),this.couldShowInlineViewBecauseOfSize=ro(this,s=>this._options.read(s).renderSideBySide&&this._diffEditorWidth.read(s)<=this._options.read(s).renderSideBySideInlineBreakpoint),this.renderOverviewRuler=ro(this,s=>this._options.read(s).renderOverviewRuler),this.renderSideBySide=ro(this,s=>this.compactMode.read(s)&&this.shouldRenderInlineViewInSmartMode.read(s)?!1:this._options.read(s).renderSideBySide&&!(this._options.read(s).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(s)&&!this._screenReaderMode.read(s))),this.readOnly=ro(this,s=>this._options.read(s).readOnly),this.shouldRenderOldRevertArrows=ro(this,s=>!(!this._options.read(s).renderMarginRevertIcon||!this.renderSideBySide.read(s)||this.readOnly.read(s)||this.shouldRenderGutterMenu.read(s))),this.shouldRenderGutterMenu=ro(this,s=>this._options.read(s).renderGutterMenu),this.renderIndicators=ro(this,s=>this._options.read(s).renderIndicators),this.enableSplitViewResizing=ro(this,s=>this._options.read(s).enableSplitViewResizing),this.splitViewDefaultRatio=ro(this,s=>this._options.read(s).splitViewDefaultRatio),this.ignoreTrimWhitespace=ro(this,s=>this._options.read(s).ignoreTrimWhitespace),this.maxComputationTimeMs=ro(this,s=>this._options.read(s).maxComputationTime),this.showMoves=ro(this,s=>this._options.read(s).experimental.showMoves&&this.renderSideBySide.read(s)),this.isInEmbeddedEditor=ro(this,s=>this._options.read(s).isInEmbeddedEditor),this.diffWordWrap=ro(this,s=>this._options.read(s).diffWordWrap),this.originalEditable=ro(this,s=>this._options.read(s).originalEditable),this.diffCodeLens=ro(this,s=>this._options.read(s).diffCodeLens),this.accessibilityVerbose=ro(this,s=>this._options.read(s).accessibilityVerbose),this.diffAlgorithm=ro(this,s=>this._options.read(s).diffAlgorithm),this.showEmptyDecorations=ro(this,s=>this._options.read(s).experimental.showEmptyDecorations),this.onlyShowAccessibleDiffViewer=ro(this,s=>this._options.read(s).onlyShowAccessibleDiffViewer),this.compactMode=ro(this,s=>this._options.read(s).compactMode),this.trueInlineDiffRenderingEnabled=ro(this,s=>this._options.read(s).experimental.useTrueInlineView),this.useTrueInlineDiffRendering=ro(this,s=>!this.renderSideBySide.read(s)&&this.trueInlineDiffRenderingEnabled.read(s)),this.hideUnchangedRegions=ro(this,s=>this._options.read(s).hideUnchangedRegions.enabled),this.hideUnchangedRegionsRevealLineCount=ro(this,s=>this._options.read(s).hideUnchangedRegions.revealLineCount),this.hideUnchangedRegionsContextLineCount=ro(this,s=>this._options.read(s).hideUnchangedRegions.contextLineCount),this.hideUnchangedRegionsMinimumLineCount=ro(this,s=>this._options.read(s).hideUnchangedRegions.minimumLineCount),this._model=bc(this,void 0),this.shouldRenderInlineViewInSmartMode=this._model.map(this,s=>v1i(this,c=>{const d=s==null?void 0:s.diff.read(c);return d?YTi(d,this.trueInlineDiffRenderingEnabled.read(c)):void 0})).flatten().map(this,s=>!!s),this.inlineViewHideOriginalLineNumbers=this.compactMode;const n={...e,...pwt(e,b0)};this._options=bc(this,n)}updateOptions(e){const i=pwt(e,this._options.get()),n={...this._options.get(),...e,...i};this._options.set(n,void 0,{changedOptions:e})}setWidth(e){this._diffEditorWidth.set(e,void 0)}setModel(e){this._model.set(e,void 0)}};Fje=QTi([ZTi(1,tS)],Fje);function YTi(l,e){return l.mappings.every(i=>eDi(i.lineRangeMapping)||tDi(i.lineRangeMapping)||e&&bGe(i.lineRangeMapping))}function eDi(l){return l.original.length===0}function tDi(l){return l.modified.length===0}function pwt(l,e){var i,n,s,c,d,f,m,v;return{enableSplitViewResizing:lo(l.enableSplitViewResizing,e.enableSplitViewResizing),splitViewDefaultRatio:oci(l.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:lo(l.renderSideBySide,e.renderSideBySide),renderMarginRevertIcon:lo(l.renderMarginRevertIcon,e.renderMarginRevertIcon),maxComputationTime:kF(l.maxComputationTime,e.maxComputationTime,0,1073741824),maxFileSize:kF(l.maxFileSize,e.maxFileSize,0,1073741824),ignoreTrimWhitespace:lo(l.ignoreTrimWhitespace,e.ignoreTrimWhitespace),renderIndicators:lo(l.renderIndicators,e.renderIndicators),originalEditable:lo(l.originalEditable,e.originalEditable),diffCodeLens:lo(l.diffCodeLens,e.diffCodeLens),renderOverviewRuler:lo(l.renderOverviewRuler,e.renderOverviewRuler),diffWordWrap:Ah(l.diffWordWrap,e.diffWordWrap,["off","on","inherit"]),diffAlgorithm:Ah(l.diffAlgorithm,e.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:lo(l.accessibilityVerbose,e.accessibilityVerbose),experimental:{showMoves:lo((i=l.experimental)==null?void 0:i.showMoves,e.experimental.showMoves),showEmptyDecorations:lo((n=l.experimental)==null?void 0:n.showEmptyDecorations,e.experimental.showEmptyDecorations),useTrueInlineView:lo((s=l.experimental)==null?void 0:s.useTrueInlineView,e.experimental.useTrueInlineView)},hideUnchangedRegions:{enabled:lo(((c=l.hideUnchangedRegions)==null?void 0:c.enabled)??((d=l.experimental)==null?void 0:d.collapseUnchangedRegions),e.hideUnchangedRegions.enabled),contextLineCount:kF((f=l.hideUnchangedRegions)==null?void 0:f.contextLineCount,e.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:kF((m=l.hideUnchangedRegions)==null?void 0:m.minimumLineCount,e.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:kF((v=l.hideUnchangedRegions)==null?void 0:v.revealLineCount,e.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:lo(l.isInEmbeddedEditor,e.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:lo(l.onlyShowAccessibleDiffViewer,e.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:kF(l.renderSideBySideInlineBreakpoint,e.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:lo(l.useInlineViewWhenSpaceIsLimited,e.useInlineViewWhenSpaceIsLimited),renderGutterMenu:lo(l.renderGutterMenu,e.renderGutterMenu),compactMode:lo(l.compactMode,e.compactMode)}}var iDi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},$te=function(l,e){return function(i,n){e(i,n,l)}};let h6=class extends Rje{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(e,i,n,s,c,d,f,m){super(),this._domElement=e,this._parentContextKeyService=s,this._parentInstantiationService=c,this._accessibilitySignalService=f,this._editorProgressService=m,this.elements=Rc("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[Rc("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),Rc("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),Rc("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModelSrc=this._register(sre(this,void 0)),this._diffModel=ro(this,ye=>{var Ce;return(Ce=this._diffModelSrc.read(ye))==null?void 0:Ce.object}),this.onDidChangeModel=Tr.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new IJ([Ko,this._contextKeyService]))),this._boundarySashes=bc(this,void 0),this._accessibleDiffViewerShouldBeVisible=bc(this,!1),this._accessibleDiffViewerVisible=ro(this,ye=>this._options.onlyShowAccessibleDiffViewer.read(ye)?!0:this._accessibleDiffViewerShouldBeVisible.read(ye)),this._movedBlocksLinesPart=bc(this,void 0),this._layoutInfo=ro(this,ye=>{var ms,Wr;const Ce=this._rootSizeObserver.width.read(ye),Fe=this._rootSizeObserver.height.read(ye);this._rootSizeObserver.automaticLayout?this.elements.root.style.height="100%":this.elements.root.style.height=Fe+"px";const rt=this._sash.read(ye),ct=this._gutter.read(ye),Mt=(ct==null?void 0:ct.width.read(ye))??0,Yt=((ms=this._overviewRulerPart.read(ye))==null?void 0:ms.width)??0;let Bi,$i,$t,Hi,An;if(!!rt){const Dr=rt.sashLeft.read(ye),Rr=((Wr=this._movedBlocksLinesPart.read(ye))==null?void 0:Wr.width.read(ye))??0;Bi=0,$i=Dr-Mt-Rr,An=Dr-Mt,$t=Dr,Hi=Ce-$t-Yt}else{An=0;const Dr=this._options.inlineViewHideOriginalLineNumbers.read(ye);Bi=Mt,Dr?$i=0:$i=Math.max(5,this._editors.originalObs.layoutInfoDecorationsLeft.read(ye)),$t=Mt+$i,Hi=Ce-$t-Yt}return this.elements.original.style.left=Bi+"px",this.elements.original.style.width=$i+"px",this._editors.original.layout({width:$i,height:Fe},!0),ct==null||ct.layout(An),this.elements.modified.style.left=$t+"px",this.elements.modified.style.width=Hi+"px",this._editors.modified.layout({width:Hi,height:Fe},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}),this._diffValue=this._diffModel.map((ye,Ce)=>ye==null?void 0:ye.diff.read(Ce)),this.onDidUpdateDiff=Tr.fromObservableLight(this._diffValue),d.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register(fo(()=>this.elements.root.remove())),this._rootSizeObserver=this._register(new OIt(this.elements.root,i.dimension)),this._rootSizeObserver.setAutomaticLayout(i.automaticLayout??!1),this._options=this._instantiationService.createInstance(Fje,i),this._register(ba(ye=>{this._options.setWidth(this._rootSizeObserver.width.read(ye))})),this._contextKeyService.createKey(Tt.isEmbeddedDiffEditor.key,!1),this._register(_E(Tt.isEmbeddedDiffEditor,this._contextKeyService,ye=>this._options.isInEmbeddedEditor.read(ye))),this._register(_E(Tt.comparingMovedCode,this._contextKeyService,ye=>{var Ce;return!!((Ce=this._diffModel.read(ye))!=null&&Ce.movedTextToCompare.read(ye))})),this._register(_E(Tt.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,ye=>this._options.couldShowInlineViewBecauseOfSize.read(ye))),this._register(_E(Tt.diffEditorInlineMode,this._contextKeyService,ye=>!this._options.renderSideBySide.read(ye))),this._register(_E(Tt.hasChanges,this._contextKeyService,ye=>{var Ce,Fe;return(((Fe=(Ce=this._diffModel.read(ye))==null?void 0:Ce.diff.read(ye))==null?void 0:Fe.mappings.length)??0)>0})),this._editors=this._register(this._instantiationService.createInstance(Mje,this.elements.original,this.elements.modified,this._options,n,(ye,Ce,Fe,rt)=>this._createInnerEditor(ye,Ce,Fe,rt))),this._register(_E(Tt.diffEditorOriginalWritable,this._contextKeyService,ye=>this._options.originalEditable.read(ye))),this._register(_E(Tt.diffEditorModifiedWritable,this._contextKeyService,ye=>!this._options.readOnly.read(ye))),this._register(_E(Tt.diffEditorOriginalUri,this._contextKeyService,ye=>{var Ce;return((Ce=this._diffModel.read(ye))==null?void 0:Ce.model.original.uri.toString())??""})),this._register(_E(Tt.diffEditorModifiedUri,this._contextKeyService,ye=>{var Ce;return((Ce=this._diffModel.read(ye))==null?void 0:Ce.model.modified.uri.toString())??""})),this._overviewRulerPart=Cy(this,ye=>this._options.renderOverviewRuler.read(ye)?this._instantiationService.createInstance(WC(Lre,ye),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map(Ce=>Ce.modifiedEditor)):void 0).recomputeInitiallyAndOnChange(this._store);const v={height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map((ye,Ce)=>{var Fe;return ye-(((Fe=this._overviewRulerPart.read(Ce))==null?void 0:Fe.width)??0)})};this._sashLayout=new WTi(this._options,v),this._sash=Cy(this,ye=>{const Ce=this._options.renderSideBySide.read(ye);return this.elements.root.classList.toggle("side-by-side",Ce),Ce?new WIt(this.elements.root,v,this._options.enableSplitViewResizing,this._boundarySashes,this._sashLayout.sashLeft,()=>this._sashLayout.resetSash()):void 0}).recomputeInitiallyAndOnChange(this._store);const x=Cy(this,ye=>this._instantiationService.createInstance(WC(Vve,ye),this._editors,this._diffModel,this._options)).recomputeInitiallyAndOnChange(this._store);Cy(this,ye=>this._instantiationService.createInstance(WC(BTi,ye),this._editors,this._diffModel,this._options,this)).recomputeInitiallyAndOnChange(this._store);const w=new Set,I=new Set;let P=!1;const O=Cy(this,ye=>this._instantiationService.createInstance(WC(Nje,ye),Eo(this._domElement),this._editors,this._diffModel,this._options,this,()=>P||x.get().isUpdatingHiddenAreas,w,I)).recomputeInitiallyAndOnChange(this._store),z=ro(this,ye=>{const Ce=O.read(ye).viewZones.read(ye).orig,Fe=x.read(ye).viewZones.read(ye).origViewZones;return Ce.concat(Fe)}),J=ro(this,ye=>{const Ce=O.read(ye).viewZones.read(ye).mod,Fe=x.read(ye).viewZones.read(ye).modViewZones;return Ce.concat(Fe)});this._register(Mve(this._editors.original,z,ye=>{P=ye},w));let Y;this._register(Mve(this._editors.modified,J,ye=>{P=ye,P?Y=GE.capture(this._editors.modified):(Y==null||Y.restore(this._editors.modified),Y=void 0)},I)),this._accessibleDiffViewer=Cy(this,ye=>this._instantiationService.createInstance(WC(a9,ye),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,(Ce,Fe)=>this._accessibleDiffViewerShouldBeVisible.set(Ce,Fe),this._options.onlyShowAccessibleDiffViewer.map(Ce=>!Ce),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map((Ce,Fe)=>{var rt;return(rt=Ce==null?void 0:Ce.diff.read(Fe))==null?void 0:rt.mappings.map(ct=>ct.lineRangeMapping)}),new TTi(this._editors))).recomputeInitiallyAndOnChange(this._store);const ae=this._accessibleDiffViewerVisible.map(ye=>ye?"hidden":"visible");this._register(f6(this.elements.modified,{visibility:ae})),this._register(f6(this.elements.original,{visibility:ae})),this._createDiffEditorContributions(),d.addDiffEditor(this),this._gutter=Cy(this,ye=>this._options.shouldRenderGutterMenu.read(ye)?this._instantiationService.createInstance(WC(Lje,ye),this.elements.root,this._diffModel,this._editors,this._options,this._sashLayout,this._boundarySashes):void 0),this._register(kJ(this._layoutInfo)),Cy(this,ye=>new(WC(a$,ye))(this.elements.root,this._diffModel,this._layoutInfo.map(Ce=>Ce.originalEditor),this._layoutInfo.map(Ce=>Ce.modifiedEditor),this._editors)).recomputeInitiallyAndOnChange(this._store,ye=>{this._movedBlocksLinesPart.set(ye,void 0)}),this._register(Tr.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,ye=>this._handleCursorPositionChange(ye,!0))),this._register(Tr.runAndSubscribe(this._editors.original.onDidChangeCursorPosition,ye=>this._handleCursorPositionChange(ye,!1)));const me=this._diffModel.map(this,(ye,Ce)=>{if(ye)return ye.diff.read(Ce)===void 0&&!ye.isDiffUpToDate.read(Ce)});this._register(Ib((ye,Ce)=>{if(me.read(ye)===!0){const Fe=this._editorProgressService.show(!0,1e3);Ce.add(fo(()=>Fe.done()))}})),this._register(Ib((ye,Ce)=>{Ce.add(new(WC(GTi,ye))(this._editors,this._diffModel,this._options,this))})),this._register(Ib((ye,Ce)=>{const Fe=this._diffModel.read(ye);if(Fe)for(const rt of[Fe.model.original,Fe.model.modified])Ce.add(rt.onWillDispose(ct=>{Pa(new tu("TextModel got disposed before DiffEditorWidget model got reset")),this.setModel(null)}))})),this._register(ba(ye=>{this._options.setModel(this._diffModel.read(ye))}))}_createInnerEditor(e,i,n,s){return e.createInstance(Dre,i,n,s)}_createDiffEditorContributions(){const e=p9.getDiffEditorContributions();for(const i of e)try{this._register(this._instantiationService.createInstance(i.ctor,this))}catch(n){Pa(n)}}get _targetEditor(){return this._editors.modified}getEditorType(){return Ase.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){var n;const e=this._editors.original.saveViewState(),i=this._editors.modified.saveViewState();return{original:e,modified:i,modelState:(n=this._diffModel.get())==null?void 0:n.serializeState()}}restoreViewState(e){var i;if(e&&e.original&&e.modified){const n=e;this._editors.original.restoreViewState(n.original),this._editors.modified.restoreViewState(n.modified),n.modelState&&((i=this._diffModel.get())==null||i.restoreSerializedState(n.modelState))}}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(e){return this._instantiationService.createInstance(Ije,e,this._options)}getModel(){var e;return((e=this._diffModel.get())==null?void 0:e.model)??null}setModel(e){const i=e?"model"in e?Rve.create(e).createNewRef(this):Rve.create(this.createViewModel(e),this):null;this.setDiffModel(i)}setDiffModel(e,i){const n=this._diffModel.get();!e&&n&&this._accessibleDiffViewer.get().close(),this._diffModel.get()!==(e==null?void 0:e.object)&&PB(i,s=>{var f;const c=e==null?void 0:e.object;Tu.batchEventsGlobally(s,()=>{this._editors.original.setModel(c?c.model.original:null),this._editors.modified.setModel(c?c.model.modified:null)});const d=(f=this._diffModelSrc.get())==null?void 0:f.createNewRef(this);this._diffModelSrc.set(e==null?void 0:e.createNewRef(this),s),setTimeout(()=>{d==null||d.dispose()},0)})}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){var i;const e=(i=this._diffModel.get())==null?void 0:i.diff.get();return e?nDi(e):null}revert(e){const i=this._diffModel.get();!i||!i.isDiffUpToDate.get()||this._editors.modified.executeEdits("diffEditor",[{range:e.modified.toExclusiveRange(),text:i.model.original.getValueInRange(e.original.toExclusiveRange())}])}revertRangeMappings(e){const i=this._diffModel.get();if(!i||!i.isDiffUpToDate.get())return;const n=e.map(s=>({range:s.modifiedRange,text:i.model.original.getValueInRange(s.originalRange)}));this._editors.modified.executeEdits("diffEditor",n)}_goTo(e){this._editors.modified.setPosition(new pi(e.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(e.lineRangeMapping.modified.toExclusiveRange())}goToDiff(e){var c,d;const i=(d=(c=this._diffModel.get())==null?void 0:c.diff.get())==null?void 0:d.mappings;if(!i||i.length===0)return;const n=this._editors.modified.getPosition().lineNumber;let s;e==="next"?s=i.find(f=>f.lineRangeMapping.modified.startLineNumber>n)??i[0]:s=jne(i,f=>f.lineRangeMapping.modified.startLineNumber<n)??i[i.length-1],this._goTo(s),s.lineRangeMapping.modified.isEmpty?this._accessibilitySignalService.playSignal(hw.diffLineDeleted,{source:"diffEditor.goToDiff"}):s.lineRangeMapping.original.isEmpty?this._accessibilitySignalService.playSignal(hw.diffLineInserted,{source:"diffEditor.goToDiff"}):s&&this._accessibilitySignalService.playSignal(hw.diffLineModified,{source:"diffEditor.goToDiff"})}revealFirstDiff(){const e=this._diffModel.get();e&&this.waitForDiff().then(()=>{var n;const i=(n=e.diff.get())==null?void 0:n.mappings;!i||i.length===0||this._goTo(i[0])})}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){const e=this._diffModel.get();e&&await e.waitForDiff()}mapToOtherSide(){var d,f;const e=this._editors.modified.hasWidgetFocus(),i=e?this._editors.modified:this._editors.original,n=e?this._editors.original:this._editors.modified;let s;const c=i.getSelection();if(c){const m=(f=(d=this._diffModel.get())==null?void 0:d.diff.get())==null?void 0:f.mappings.map(v=>e?v.lineRangeMapping.flip():v.lineRangeMapping);if(m){const v=YSt(c.getStartPosition(),m),x=YSt(c.getEndPosition(),m);s=nt.plusRange(v,x)}}return{destination:n,destinationSelection:s}}switchSide(){const{destination:e,destinationSelection:i}=this.mapToOtherSide();e.focus(),i&&e.setSelection(i)}exitCompareMove(){const e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){var i;const e=(i=this._diffModel.get())==null?void 0:i.unchangedRegions.get();e&&th(n=>{for(const s of e)s.collapseAll(n)})}showAllUnchangedRegions(){var i;const e=(i=this._diffModel.get())==null?void 0:i.unchangedRegions.get();e&&th(n=>{for(const s of e)s.showAll(n)})}_handleCursorPositionChange(e,i){var n,s;if((e==null?void 0:e.reason)===3){const c=(s=(n=this._diffModel.get())==null?void 0:n.diff.get())==null?void 0:s.mappings.find(d=>i?d.lineRangeMapping.modified.contains(e.position.lineNumber):d.lineRangeMapping.original.contains(e.position.lineNumber));c!=null&&c.lineRangeMapping.modified.isEmpty?this._accessibilitySignalService.playSignal(hw.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):c!=null&&c.lineRangeMapping.original.isEmpty?this._accessibilitySignalService.playSignal(hw.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):c&&this._accessibilitySignalService.playSignal(hw.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}};h6=iDi([$te(3,Ko),$te(4,ho),$te(5,Bl),$te(6,jR),$te(7,WR)],h6);function nDi(l){return l.mappings.map(e=>{const i=e.lineRangeMapping;let n,s,c,d,f=i.innerChanges;return i.original.isEmpty?(n=i.original.startLineNumber-1,s=0,f=void 0):(n=i.original.startLineNumber,s=i.original.endLineNumberExclusive-1),i.modified.isEmpty?(c=i.modified.startLineNumber-1,d=0,f=void 0):(c=i.modified.startLineNumber,d=i.modified.endLineNumberExclusive-1),{originalStartLineNumber:n,originalEndLineNumber:s,modifiedStartLineNumber:c,modifiedEndLineNumber:d,charChanges:f==null?void 0:f.map(m=>({originalStartLineNumber:m.originalRange.startLineNumber,originalStartColumn:m.originalRange.startColumn,originalEndLineNumber:m.originalRange.endLineNumber,originalEndColumn:m.originalRange.endColumn,modifiedStartLineNumber:m.modifiedRange.startLineNumber,modifiedStartColumn:m.modifiedRange.startColumn,modifiedEndLineNumber:m.modifiedRange.endLineNumber,modifiedEndColumn:m.modifiedRange.endColumn}))}})}var SGe=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Zd=function(l,e){return function(i,n){e(i,n,l)}};let rDi=0,mwt=!1;function sDi(l){if(!l){if(mwt)return;mwt=!0}d0i(l||cd.document.body)}let jve=class extends Dre{constructor(e,i,n,s,c,d,f,m,v,x,w,I,P){const O={...i};O.ariaLabel=O.ariaLabel||LVe.editorViewAccessibleLabel,super(e,O,{},n,s,c,d,v,x,w,I,P),m instanceof U$?this._standaloneKeybindingService=m:this._standaloneKeybindingService=null,sDi(O.ariaContainerElement),x1i((z,J)=>n.createInstance(P$,z,J,{})),k1i(f)}addCommand(e,i,n){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const s="DYNAMIC_"+ ++rDi,c=kn.deserialize(n);return this._standaloneKeybindingService.addDynamicKeybinding(s,e,i,c),s}createContextKey(e,i){return this._contextKeyService.createKey(e,i)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),xi.None;const i=e.id,n=e.label,s=kn.and(kn.equals("editorId",this.getId()),kn.deserialize(e.precondition)),c=e.keybindings,d=kn.and(s,kn.deserialize(e.keybindingContext)),f=e.contextMenuGroupId||null,m=e.contextMenuOrder||0,v=(P,...O)=>Promise.resolve(e.run(this,...O)),x=new wn,w=this.getId()+":"+i;if(x.add(fl.registerCommand(w,v)),f){const P={command:{id:w,title:n},when:s,group:f,order:m};x.add(yg.appendMenuItem(As.EditorContext,P))}if(Array.isArray(c))for(const P of c)x.add(this._standaloneKeybindingService.addDynamicKeybinding(w,P,v,d));const I=new NIt(w,n,n,void 0,s,(...P)=>Promise.resolve(e.run(this,...P)),this._contextKeyService);return this._actions.set(i,I),x.add(fo(()=>{this._actions.delete(i)})),x}_triggerCommand(e,i){if(this._codeEditorService instanceof Cye)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,i)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,i)}};jve=SGe([Zd(2,ho),Zd(3,Bl),Zd(4,qd),Zd(5,Ko),Zd(6,jL),Zd(7,pu),Zd(8,im),Zd(9,w_),Zd(10,tS),Zd(11,rh),Zd(12,Ts)],jve);let Bje=class extends jve{constructor(e,i,n,s,c,d,f,m,v,x,w,I,P,O,z,J){const Y={...i};gve(w,Y,!1);const ae=v.registerEditorContainer(e);typeof Y.theme=="string"&&v.setTheme(Y.theme),typeof Y.autoDetectHighContrast<"u"&&v.setAutoDetectHighContrast(!!Y.autoDetectHighContrast);const me=Y.model;delete Y.model,super(e,Y,n,s,c,d,f,m,v,x,I,z,J),this._configurationService=w,this._standaloneThemeService=v,this._register(ae);let ye;if(typeof me>"u"){const Ce=O.getLanguageIdByMimeType(Y.language)||Y.language||bv;ye=zIt(P,O,Y.value||"",Ce,void 0),this._ownsModel=!0}else ye=me,this._ownsModel=!1;if(this._attachModel(ye),ye){const Ce={oldModelUrl:null,newModelUrl:ye.uri};this._onDidChangeModel.fire(Ce)}}dispose(){super.dispose()}updateOptions(e){gve(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};Bje=SGe([Zd(2,ho),Zd(3,Bl),Zd(4,qd),Zd(5,Ko),Zd(6,jL),Zd(7,pu),Zd(8,Mw),Zd(9,w_),Zd(10,Cc),Zd(11,tS),Zd(12,rf),Zd(13,Pf),Zd(14,rh),Zd(15,Ts)],Bje);let Wje=class extends h6{constructor(e,i,n,s,c,d,f,m,v,x,w,I){const P={...i};gve(m,P,!0);const O=d.registerEditorContainer(e);typeof P.theme=="string"&&d.setTheme(P.theme),typeof P.autoDetectHighContrast<"u"&&d.setAutoDetectHighContrast(!!P.autoDetectHighContrast),super(e,P,{},s,n,c,I,x),this._configurationService=m,this._standaloneThemeService=d,this._register(O)}dispose(){super.dispose()}updateOptions(e){gve(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_createInnerEditor(e,i,n){return e.createInstance(jve,i,n)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,i,n){return this.getModifiedEditor().addCommand(e,i,n)}createContextKey(e,i){return this.getModifiedEditor().createContextKey(e,i)}addAction(e){return this.getModifiedEditor().addAction(e)}};Wje=SGe([Zd(2,ho),Zd(3,Ko),Zd(4,Bl),Zd(5,Mw),Zd(6,w_),Zd(7,Cc),Zd(8,eS),Zd(9,WR),Zd(10,w6),Zd(11,jR)],Wje);function zIt(l,e,i,n,s){if(i=i||"",!n){const c=i.indexOf(`
+`);let d=i;return c!==-1&&(d=i.substring(0,c)),gwt(l,i,e.createByFilepathOrFirstLine(s||null,d),s)}return gwt(l,i,e.createById(n),s)}function gwt(l,e,i,n){return l.createModel(e,i,n)}var oDi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},ywt=function(l,e){return function(i,n){e(i,n,l)}};class aDi{constructor(e,i){this.viewModel=e,this.deltaScrollVertical=i}getId(){return this.viewModel}}let zve=class extends xi{constructor(e,i,n,s,c){super(),this._container=e,this._overflowWidgetsDomNode=i,this._workbenchUIElementFactory=n,this._instantiationService=s,this._viewModel=bc(this,void 0),this._collapsed=ro(this,m=>{var v;return(v=this._viewModel.read(m))==null?void 0:v.collapsed.read(m)}),this._editorContentHeight=bc(this,500),this.contentHeight=ro(this,m=>(this._collapsed.read(m)?0:this._editorContentHeight.read(m))+this._outerEditorHeight),this._modifiedContentWidth=bc(this,0),this._modifiedWidth=bc(this,0),this._originalContentWidth=bc(this,0),this._originalWidth=bc(this,0),this.maxScroll=ro(this,m=>{const v=this._modifiedContentWidth.read(m)-this._modifiedWidth.read(m),x=this._originalContentWidth.read(m)-this._originalWidth.read(m);return v>x?{maxScroll:v,width:this._modifiedWidth.read(m)}:{maxScroll:x,width:this._originalWidth.read(m)}}),this._elements=Rc("div.multiDiffEntry",[Rc("div.header@header",[Rc("div.header-content",[Rc("div.collapse-button@collapseButton"),Rc("div.file-path",[Rc("div.title.modified.show-file-icons@primaryPath",[]),Rc("div.status.deleted@status",["R"]),Rc("div.title.original.show-file-icons@secondaryPath",[])]),Rc("div.actions@actions")])]),Rc("div.editorParent",[Rc("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(h6,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode},{})),this.isModifedFocused=zC(this.editor.getModifiedEditor()).isFocused,this.isOriginalFocused=zC(this.editor.getOriginalEditor()).isFocused,this.isFocused=ro(this,m=>this.isModifedFocused.read(m)||this.isOriginalFocused.read(m)),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.primaryPath)):void 0,this._resourceLabel2=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.secondaryPath)):void 0,this._dataStore=this._register(new wn),this._headerHeight=40,this._lastScrollTop=-1,this._isSettingScrollTop=!1;const d=new eve(this._elements.collapseButton,{});this._register(ba(m=>{d.element.className="",d.icon=this._collapsed.read(m)?pr.chevronRight:pr.chevronDown})),this._register(d.onDidClick(()=>{var m;(m=this._viewModel.get())==null||m.collapsed.set(!this._collapsed.get(),void 0)})),this._register(ba(m=>{this._elements.editor.style.display=this._collapsed.read(m)?"none":"block"})),this._register(this.editor.getModifiedEditor().onDidLayoutChange(m=>{const v=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(v,void 0)})),this._register(this.editor.getOriginalEditor().onDidLayoutChange(m=>{const v=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(v,void 0)})),this._register(this.editor.onDidContentSizeChange(m=>{sie(v=>{this._editorContentHeight.set(m.contentHeight,v),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),v),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),v)})})),this._register(this.editor.getOriginalEditor().onDidScrollChange(m=>{if(this._isSettingScrollTop||!m.scrollTopChanged||!this._data)return;const v=m.scrollTop-this._lastScrollTop;this._data.deltaScrollVertical(v)})),this._register(ba(m=>{var x;const v=(x=this._viewModel.read(m))==null?void 0:x.isActive.read(m);this._elements.root.classList.toggle("active",v)})),this._container.appendChild(this._elements.root),this._outerEditorHeight=this._headerHeight,this._contextKeyService=this._register(c.createScoped(this._elements.actions));const f=this._register(this._instantiationService.createChild(new IJ([Ko,this._contextKeyService])));this._register(f.createInstance(Wve,this._elements.actions,As.MultiDiffEditorFileToolbar,{actionRunner:this._register(new VIt(()=>{var m;return(m=this._viewModel.get())==null?void 0:m.modifiedUri})),menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:m=>m.startsWith("navigation")},actionViewItemProvider:(m,v)=>RDt(f,m,v)}))}setScrollLeft(e){this._modifiedContentWidth.get()-this._modifiedWidth.get()>this._originalContentWidth.get()-this._originalWidth.get()?this.editor.getModifiedEditor().setScrollLeft(e):this.editor.getOriginalEditor().setScrollLeft(e)}setData(e){this._data=e;function i(s){return{...s,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0,overviewRulerBorder:!1}}if(!e){sie(s=>{this._viewModel.set(void 0,s),this.editor.setDiffModel(null,s),this._dataStore.clear()});return}const n=e.viewModel.documentDiffItem;if(sie(s=>{var v,x;(v=this._resourceLabel)==null||v.setUri(e.viewModel.modifiedUri??e.viewModel.originalUri,{strikethrough:e.viewModel.modifiedUri===void 0});let c=!1,d=!1,f=!1,m="";e.viewModel.modifiedUri&&e.viewModel.originalUri&&e.viewModel.modifiedUri.path!==e.viewModel.originalUri.path?(m="R",c=!0):e.viewModel.modifiedUri?e.viewModel.originalUri||(m="A",f=!0):(m="D",d=!0),this._elements.status.classList.toggle("renamed",c),this._elements.status.classList.toggle("deleted",d),this._elements.status.classList.toggle("added",f),this._elements.status.innerText=m,(x=this._resourceLabel2)==null||x.setUri(c?e.viewModel.originalUri:void 0,{strikethrough:!0}),this._dataStore.clear(),this._viewModel.set(e.viewModel,s),this.editor.setDiffModel(e.viewModel.diffEditorViewModelRef,s),this.editor.updateOptions(i(n.options??{}))}),n.onOptionsDidChange&&this._dataStore.add(n.onOptionsDidChange(()=>{this.editor.updateOptions(i(n.options??{}))})),e.viewModel.isAlive.recomputeInitiallyAndOnChange(this._dataStore,s=>{s||this.setData(void 0)}),e.viewModel.documentDiffItem.contextKeys)for(const[s,c]of Object.entries(e.viewModel.documentDiffItem.contextKeys))this._contextKeyService.createKey(s,c)}render(e,i,n,s){this._elements.root.style.visibility="visible",this._elements.root.style.top=`${e.start}px`,this._elements.root.style.height=`${e.length}px`,this._elements.root.style.width=`${i}px`,this._elements.root.style.position="absolute";const c=e.length-this._headerHeight,d=Math.max(0,Math.min(s.start-e.start,c));this._elements.header.style.transform=`translateY(${d}px)`,sie(f=>{this.editor.layout({width:i-2*8-2*1,height:e.length-this._outerEditorHeight})});try{this._isSettingScrollTop=!0,this._lastScrollTop=n,this.editor.getOriginalEditor().setScrollTop(n)}finally{this._isSettingScrollTop=!1}this._elements.header.classList.toggle("shadow",d>0||n>0),this._elements.header.classList.toggle("collapsed",d===c)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};zve=oDi([ywt(3,ho),ywt(4,Ko)],zve);class cDi{constructor(e){this._create=e,this._unused=new Set,this._used=new Set,this._itemData=new Map}getUnusedObj(e){let i;if(this._unused.size===0)i=this._create(e),this._itemData.set(i,e);else{const n=[...this._unused.values()];i=n.find(s=>this._itemData.get(s).getId()===e.getId())??n[0],this._unused.delete(i),this._itemData.set(i,e),i.setData(e)}return this._used.add(i),{object:i,dispose:()=>{this._used.delete(i),this._unused.size>5?i.dispose():this._unused.add(i)}}}dispose(){for(const e of this._used)e.dispose();for(const e of this._unused)e.dispose();this._used.clear(),this._unused.clear()}}var lDi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},vwt=function(l,e){return function(i,n){e(i,n,l)}};let Vje=class extends xi{constructor(e,i,n,s,c,d){super(),this._element=e,this._dimension=i,this._viewModel=n,this._workbenchUIElementFactory=s,this._parentContextKeyService=c,this._parentInstantiationService=d,this._scrollableElements=Rc("div.scrollContent",[Rc("div@content",{style:{overflow:"hidden"}}),Rc("div.monaco-editor@overflowWidgetsDomNode",{})]),this._scrollable=this._register(new CJ({forceIntegerValues:!1,scheduleAtNextAnimationFrame:m=>ZC(Eo(this._element),m),smoothScrollDuration:100})),this._scrollableElement=this._register(new owe(this._scrollableElements.root,{vertical:1,horizontal:1,useShadows:!1},this._scrollable)),this._elements=Rc("div.monaco-component.multiDiffEditor",{},[Rc("div",{},[this._scrollableElement.getDomNode()]),Rc("div.placeholder@placeholder",{},[Rc("div",[W("noChangedFiles","No Changed Files")])])]),this._sizeObserver=this._register(new OIt(this._element,void 0)),this._objectPool=this._register(new cDi(m=>{const v=this._instantiationService.createInstance(zve,this._scrollableElements.content,this._scrollableElements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return v.setData(m),v})),this.scrollTop=Tu(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollTop),this.scrollLeft=Tu(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollLeft),this._viewItemsInfo=VR(this,(m,v)=>{const x=this._viewModel.read(m);if(!x)return{items:[],getItem:O=>{throw new tu}};const w=x.items.read(m),I=new Map;return{items:w.map(O=>{var Y;const z=v.add(new uDi(O,this._objectPool,this.scrollLeft,ae=>{this._scrollableElement.setScrollPosition({scrollTop:this._scrollableElement.getScrollPosition().scrollTop+ae})})),J=(Y=this._lastDocStates)==null?void 0:Y[z.getKey()];return J&&th(ae=>{z.setViewState(J,ae)}),I.set(O,z),z}),getItem:O=>I.get(O)}}),this._viewItems=this._viewItemsInfo.map(this,m=>m.items),this._spaceBetweenPx=0,this._totalHeight=this._viewItems.map(this,(m,v)=>m.reduce((x,w)=>x+w.contentHeight.read(v)+this._spaceBetweenPx,0)),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new IJ([Ko,this._contextKeyService]))),this._lastDocStates={},this._contextKeyService.createKey(Tt.inMultiDiffEditor.key,!0),this._register(Ib((m,v)=>{const x=this._viewModel.read(m);if(x&&x.contextKeys)for(const[w,I]of Object.entries(x.contextKeys)){const P=this._contextKeyService.createKey(w,void 0);P.set(I),v.add(fo(()=>P.reset()))}}));const f=this._parentContextKeyService.createKey(Tt.multiDiffEditorAllCollapsed.key,!1);this._register(ba(m=>{const v=this._viewModel.read(m);if(v){const x=v.items.read(m).every(w=>w.collapsed.read(m));f.set(x)}})),this._register(ba(m=>{const v=this._dimension.read(m);this._sizeObserver.observe(v)})),this._register(ba(m=>{const v=this._viewItems.read(m);this._elements.placeholder.classList.toggle("visible",v.length===0)})),this._scrollableElements.content.style.position="relative",this._register(ba(m=>{const v=this._sizeObserver.height.read(m);this._scrollableElements.root.style.height=`${v}px`;const x=this._totalHeight.read(m);this._scrollableElements.content.style.height=`${x}px`;const w=this._sizeObserver.width.read(m);let I=w;const P=this._viewItems.read(m),O=S$e(P,yv(z=>z.maxScroll.read(m).maxScroll,mT));if(O){const z=O.maxScroll.read(m);I=w+z.maxScroll}this._scrollableElement.setScrollDimensions({width:w,height:v,scrollHeight:x,scrollWidth:I})})),e.replaceChildren(this._elements.root),this._register(fo(()=>{e.replaceChildren()})),this._register(this._register(ba(m=>{sie(v=>{this.render(m)})})))}render(e){const i=this.scrollTop.read(e);let n=0,s=0,c=0;const d=this._sizeObserver.height.read(e),f=xc.ofStartAndLength(i,d),m=this._sizeObserver.width.read(e);for(const v of this._viewItems.read(e)){const x=v.contentHeight.read(e),w=Math.min(x,d),I=xc.ofStartAndLength(s,w),P=xc.ofStartAndLength(c,x);if(P.isBefore(f))n-=x-w,v.hide();else if(P.isAfter(f))v.hide();else{const O=Math.max(0,Math.min(f.start-P.start,x-w));n-=O;const z=xc.ofStartAndLength(i+n,d);v.render(I,O,m,z)}s+=w+this._spaceBetweenPx,c+=x+this._spaceBetweenPx}this._scrollableElements.content.style.transform=`translateY(${-(i+n)}px)`}};Vje=lDi([vwt(4,Ko),vwt(5,ho)],Vje);class uDi extends xi{constructor(e,i,n,s){super(),this.viewModel=e,this._objectPool=i,this._scrollLeft=n,this._deltaScrollVertical=s,this._templateRef=this._register(sre(this,void 0)),this.contentHeight=ro(this,c=>{var d,f;return((f=(d=this._templateRef.read(c))==null?void 0:d.object.contentHeight)==null?void 0:f.read(c))??this.viewModel.lastTemplateData.read(c).contentHeight}),this.maxScroll=ro(this,c=>{var d;return((d=this._templateRef.read(c))==null?void 0:d.object.maxScroll.read(c))??{maxScroll:0,scrollWidth:0}}),this.template=ro(this,c=>{var d;return(d=this._templateRef.read(c))==null?void 0:d.object}),this._isHidden=bc(this,!1),this._isFocused=ro(this,c=>{var d;return((d=this.template.read(c))==null?void 0:d.isFocused.read(c))??!1}),this.viewModel.setIsFocused(this._isFocused,void 0),this._register(ba(c=>{var f;const d=this._scrollLeft.read(c);(f=this._templateRef.read(c))==null||f.object.setScrollLeft(d)})),this._register(ba(c=>{const d=this._templateRef.read(c);!d||!this._isHidden.read(c)||d.object.isFocused.read(c)||this._clear()}))}dispose(){this._clear(),super.dispose()}toString(){var e;return`VirtualViewItem(${(e=this.viewModel.documentDiffItem.modified)==null?void 0:e.uri.toString()})`}getKey(){return this.viewModel.getKey()}setViewState(e,i){var d;this.viewModel.collapsed.set(e.collapsed,i),this._updateTemplateData(i);const n=this.viewModel.lastTemplateData.get(),s=(d=e.selections)==null?void 0:d.map(Us.liftSelection);this.viewModel.lastTemplateData.set({...n,selections:s},i);const c=this._templateRef.get();c&&s&&c.object.editor.setSelections(s)}_updateTemplateData(e){const i=this._templateRef.get();i&&this.viewModel.lastTemplateData.set({contentHeight:i.object.contentHeight.get(),selections:i.object.editor.getSelections()??void 0},e)}_clear(){const e=this._templateRef.get();e&&th(i=>{this._updateTemplateData(i),e.object.hide(),this._templateRef.set(void 0,i)})}hide(){this._isHidden.set(!0,void 0)}render(e,i,n,s){this._isHidden.set(!1,void 0);let c=this._templateRef.get();if(!c){c=this._objectPool.getUnusedObj(new aDi(this.viewModel,this._deltaScrollVertical)),this._templateRef.set(c,void 0);const d=this.viewModel.lastTemplateData.get().selections;d&&c.object.editor.setSelections(d)}c.object.render(e,n,i,s)}}It("multiDiffEditor.headerBackground",{dark:"#262626",light:"tab.inactiveBackground",hcDark:"tab.inactiveBackground",hcLight:"tab.inactiveBackground"},W("multiDiffEditor.headerBackground","The background color of the diff editor's header"));It("multiDiffEditor.background",wT,W("multiDiffEditor.background","The background color of the multi file diff editor"));It("multiDiffEditor.border",{dark:"sideBarSectionHeader.border",light:"#cccccc",hcDark:"sideBarSectionHeader.border",hcLight:"#cccccc"},W("multiDiffEditor.border","The border color of the multi file diff editor"));var dDi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},fDi=function(l,e){return function(i,n){e(i,n,l)}};let Hje=class extends xi{constructor(e,i,n){super(),this._element=e,this._workbenchUIElementFactory=i,this._instantiationService=n,this._dimension=bc(this,void 0),this._viewModel=bc(this,void 0),this._widgetImpl=VR(this,(s,c)=>(WC(zve,s),c.add(this._instantiationService.createInstance(WC(Vje,s),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory)))),this._register(kJ(this._widgetImpl))}};Hje=dDi([fDi(2,ho)],Hje);function hDi(l,e,i){return oa.initialize(i||{}).createInstance(Bje,l,e)}function _Di(l){return oa.get(Bl).onCodeEditorAdd(i=>{l(i)})}function pDi(l){return oa.get(Bl).onDiffEditorAdd(i=>{l(i)})}function mDi(){return oa.get(Bl).listCodeEditors()}function gDi(){return oa.get(Bl).listDiffEditors()}function yDi(l,e,i){return oa.initialize(i||{}).createInstance(Wje,l,e)}function vDi(l,e){const i=oa.initialize(e||{});return new Hje(l,{},i)}function bDi(l){if(typeof l.id!="string"||typeof l.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return fl.registerCommand(l.id,l.run)}function CDi(l){if(typeof l.id!="string"||typeof l.label!="string"||typeof l.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const e=kn.deserialize(l.precondition),i=(s,...c)=>tm.runEditorCommand(s,c,e,(d,f,m)=>Promise.resolve(l.run(f,...m))),n=new wn;if(n.add(fl.registerCommand(l.id,i)),l.contextMenuGroupId){const s={command:{id:l.id,title:l.label},when:e,group:l.contextMenuGroupId,order:l.contextMenuOrder||0};n.add(yg.appendMenuItem(As.EditorContext,s))}if(Array.isArray(l.keybindings)){const s=oa.get(pu);if(!(s instanceof U$))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{const c=kn.and(e,kn.deserialize(l.keybindingContext));n.add(s.addDynamicKeybindings(l.keybindings.map(d=>({keybinding:d,command:l.id,when:c}))))}}return n}function SDi(l){return UIt([l])}function UIt(l){const e=oa.get(pu);return e instanceof U$?e.addDynamicKeybindings(l.map(i=>({keybinding:i.keybinding,command:i.command,commandArgs:i.commandArgs,when:kn.deserialize(i.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),xi.None)}function wDi(l,e,i){const n=oa.get(Pf),s=n.getLanguageIdByMimeType(e)||e;return zIt(oa.get(rf),n,l,s,i)}function xDi(l,e){const i=oa.get(Pf),n=i.getLanguageIdByMimeType(e)||e||bv;l.setLanguage(i.createById(n))}function kDi(l,e,i){l&&oa.get(zL).changeOne(e,l.uri,i)}function TDi(l){oa.get(zL).changeAll(l,[])}function DDi(l){return oa.get(zL).read(l)}function EDi(l){return oa.get(zL).onMarkerChanged(l)}function IDi(l){return oa.get(rf).getModel(l)}function NDi(){return oa.get(rf).getModels()}function LDi(l){return oa.get(rf).onModelAdded(l)}function PDi(l){return oa.get(rf).onModelRemoved(l)}function ADi(l){return oa.get(rf).onModelLanguageChanged(i=>{l({model:i.model,oldLanguage:i.oldLanguageId})})}function ODi(l){return vwi(oa.get(rf),l)}function MDi(l,e){const i=oa.get(Pf),n=oa.get(Mw);return zJe.colorizeElement(n,i,l,e).then(()=>{n.registerEditorContainer(l)})}function RDi(l,e,i){const n=oa.get(Pf);return oa.get(Mw).registerEditorContainer(cd.document.body),zJe.colorize(n,l,e,i)}function FDi(l,e,i=4){return oa.get(Mw).registerEditorContainer(cd.document.body),zJe.colorizeModelLine(l,e,i)}function BDi(l){const e=Oh.get(l);return e||{getInitialState:()=>R$,tokenize:(i,n,s)=>Z$e(l,s)}}function WDi(l,e){Oh.getOrCreate(e);const i=BDi(e),n=BL(l),s=[];let c=i.getInitialState();for(let d=0,f=n.length;d<f;d++){const m=n[d],v=i.tokenize(m,!0,c);s[d]=v.tokens,c=v.endState}return s}function VDi(l,e){oa.get(Mw).defineTheme(l,e)}function HDi(l){oa.get(Mw).setTheme(l)}function jDi(){EWe.clearAllFontInfos()}function zDi(l,e){return fl.registerCommand({id:l,handler:e})}function UDi(l){return oa.get(Rb).registerOpener({async open(i){return typeof i=="string"&&(i=yo.parse(i)),l.open(i)}})}function qDi(l){return oa.get(Bl).registerCodeEditorOpenHandler(async(i,n,s)=>{var f;if(!n)return null;const c=(f=i.options)==null?void 0:f.selection;let d;return c&&typeof c.endLineNumber=="number"&&typeof c.endColumn=="number"?d=c:c&&(d={lineNumber:c.startLineNumber,column:c.startColumn}),await l.openCodeEditor(n,i.resource,d)?n:null})}function $Di(){return{create:hDi,getEditors:mDi,getDiffEditors:gDi,onDidCreateEditor:_Di,onDidCreateDiffEditor:pDi,createDiffEditor:yDi,addCommand:bDi,addEditorAction:CDi,addKeybindingRule:SDi,addKeybindingRules:UIt,createModel:wDi,setModelLanguage:xDi,setModelMarkers:kDi,getModelMarkers:DDi,removeAllMarkers:TDi,onDidChangeMarkers:EDi,getModels:NDi,getModel:IDi,onDidCreateModel:LDi,onWillDisposeModel:PDi,onDidChangeModelLanguage:ADi,createWebWorker:ODi,colorizeElement:MDi,colorize:RDi,colorizeModelLine:FDi,tokenize:WDi,defineTheme:VDi,setTheme:HDi,remeasureFonts:jDi,registerCommand:zDi,registerLinkOpener:UDi,registerEditorOpener:qDi,AccessibilitySupport:wBe,ContentWidgetPositionPreference:IBe,CursorChangeReason:NBe,DefaultEndOfLine:LBe,EditorAutoIndentStrategy:ABe,EditorOption:OBe,EndOfLinePreference:MBe,EndOfLineSequence:RBe,MinimapPosition:JBe,MinimapSectionHeaderStyle:GBe,MouseTargetType:KBe,OverlayWidgetPositionPreference:ZBe,OverviewRulerLane:YBe,GlyphMarginLane:FBe,RenderLineNumbersType:iWe,RenderMinimap:nWe,ScrollbarVisibility:sWe,ScrollType:rWe,TextEditorCursorBlinkingStyle:dWe,TextEditorCursorStyle:fWe,TrackedRangeStickiness:hWe,WrappingIndent:_We,InjectedTextCursorStops:VBe,PositionAffinity:tWe,ShowLightbulbIconMode:aWe,ConfigurationChangedEvent:Akt,BareFontInfo:h9,FontInfo:DWe,TextModelResolvedOptions:a1e,FindMatch:Hne,ApplyUpdateResult:Sie,EditorZoom:fk,createMultiFileDiffEditor:vDi,EditorType:Ase,EditorOptions:KE}}function JDi(l,e){if(!e||!Array.isArray(e))return!1;for(const i of e)if(!l(i))return!1;return!0}function N0e(l,e){return typeof l=="boolean"?l:e}function bwt(l,e){return typeof l=="string"?l:e}function GDi(l){const e={};for(const i of l)e[i]=!0;return e}function Cwt(l,e=!1){e&&(l=l.map(function(n){return n.toLowerCase()}));const i=GDi(l);return e?function(n){return i[n.toLowerCase()]!==void 0&&i.hasOwnProperty(n.toLowerCase())}:function(n){return i[n]!==void 0&&i.hasOwnProperty(n)}}function jje(l,e,i){e=e.replace(/@@/g,"");let n=0,s;do s=!1,e=e.replace(/@(\w+)/g,function(d,f){s=!0;let m="";if(typeof l[f]=="string")m=l[f];else if(l[f]&&l[f]instanceof RegExp)m=l[f].source;else throw l[f]===void 0?mf(l,"language definition does not contain attribute '"+f+"', used at: "+e):mf(l,"attribute reference '"+f+"' must be a string, used at: "+e);return qF(m)?"":"(?:"+m+")"}),n++;while(s&&n<5);e=e.replace(/\x01/g,"@");const c=(l.ignoreCase?"i":"")+(l.unicode?"u":"");if(i&&e.match(/\$[sS](\d\d?)/g)){let f=null,m=null;return v=>(m&&f===v||(f=v,m=new RegExp(Bwi(l,e,v),c)),m)}return new RegExp(e,c)}function KDi(l,e,i,n){if(n<0)return l;if(n<e.length)return e[n];if(n>=100){n=n-100;const s=i.split(".");if(s.unshift(i),n<s.length)return s[n]}return null}function XDi(l,e,i,n){let s=-1,c=i,d=i.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);d&&(d[3]&&(s=parseInt(d[3]),d[2]&&(s=s+100)),c=d[4]);let f="~",m=c;!c||c.length===0?(f="!=",m=""):/^\w*$/.test(m)?f="==":(d=c.match(/^(@|!@|~|!~|==|!=)(.*)$/),d&&(f=d[1],m=d[2]));let v;if((f==="~"||f==="!~")&&/^(\w|\|)*$/.test(m)){const x=Cwt(m.split("|"),l.ignoreCase);v=function(w){return f==="~"?x(w):!x(w)}}else if(f==="@"||f==="!@"){const x=l[m];if(!x)throw mf(l,"the @ match target '"+m+"' is not defined, in rule: "+e);if(!JDi(function(I){return typeof I=="string"},x))throw mf(l,"the @ match target '"+m+"' must be an array of strings, in rule: "+e);const w=Cwt(x,l.ignoreCase);v=function(I){return f==="@"?w(I):!w(I)}}else if(f==="~"||f==="!~")if(m.indexOf("$")<0){const x=jje(l,"^"+m+"$",!1);v=function(w){return f==="~"?x.test(w):!x.test(w)}}else v=function(x,w,I,P){return jje(l,"^"+xM(l,m,w,I,P)+"$",!1).test(x)};else if(m.indexOf("$")<0){const x=e6(l,m);v=function(w){return f==="=="?w===x:w!==x}}else{const x=e6(l,m);v=function(w,I,P,O,z){const J=xM(l,x,I,P,O);return f==="=="?w===J:w!==J}}return s===-1?{name:i,value:n,test:function(x,w,I,P){return v(x,x,w,I,P)}}:{name:i,value:n,test:function(x,w,I,P){const O=KDi(x,w,I,s);return v(O||"",x,w,I,P)}}}function zje(l,e,i){if(i){if(typeof i=="string")return i;if(i.token||i.token===""){if(typeof i.token!="string")throw mf(l,"a 'token' attribute must be of type string, in rule: "+e);{const n={token:i.token};if(i.token.indexOf("$")>=0&&(n.tokenSubst=!0),typeof i.bracket=="string")if(i.bracket==="@open")n.bracket=1;else if(i.bracket==="@close")n.bracket=-1;else throw mf(l,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(i.next){if(typeof i.next!="string")throw mf(l,"the next state must be a string value in rule: "+e);{let s=i.next;if(!/^(@pop|@push|@popall)$/.test(s)&&(s[0]==="@"&&(s=s.substr(1)),s.indexOf("$")<0&&!Wwi(l,xM(l,s,"",[],""))))throw mf(l,"the next state '"+i.next+"' is not defined in rule: "+e);n.next=s}}return typeof i.goBack=="number"&&(n.goBack=i.goBack),typeof i.switchTo=="string"&&(n.switchTo=i.switchTo),typeof i.log=="string"&&(n.log=i.log),typeof i.nextEmbedded=="string"&&(n.nextEmbedded=i.nextEmbedded,l.usesEmbedded=!0),n}}else if(Array.isArray(i)){const n=[];for(let s=0,c=i.length;s<c;s++)n[s]=zje(l,e,i[s]);return{group:n}}else if(i.cases){const n=[];for(const c in i.cases)if(i.cases.hasOwnProperty(c)){const d=zje(l,e,i.cases[c]);c==="@default"||c==="@"||c===""?n.push({test:void 0,value:d,name:c}):c==="@eos"?n.push({test:function(f,m,v,x){return x},value:d,name:c}):n.push(XDi(l,e,c,d))}const s=l.defaultToken;return{test:function(c,d,f,m){for(const v of n)if(!v.test||v.test(c,d,f,m))return v.value;return s}}}else throw mf(l,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+e)}else return{token:""}}class QDi{constructor(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}setRegex(e,i){let n;if(typeof i=="string")n=i;else if(i instanceof RegExp)n=i.source;else throw mf(e,"rules must start with a match string or regular expression: "+this.name);this.matchOnlyAtLineStart=n.length>0&&n[0]==="^",this.name=this.name+": "+n,this.regex=jje(e,"^(?:"+(this.matchOnlyAtLineStart?n.substr(1):n)+")",!0)}setAction(e,i){this.action=zje(e,this.name,i)}resolveRegex(e){return this.regex instanceof RegExp?this.regex:this.regex(e)}}function qIt(l,e){if(!e||typeof e!="object")throw new Error("Monarch: expecting a language definition object");const i={languageId:l,includeLF:N0e(e.includeLF,!1),noThrow:!1,maxStack:100,start:typeof e.start=="string"?e.start:null,ignoreCase:N0e(e.ignoreCase,!1),unicode:N0e(e.unicode,!1),tokenPostfix:bwt(e.tokenPostfix,"."+l),defaultToken:bwt(e.defaultToken,"source"),usesEmbedded:!1,stateNames:{},tokenizer:{},brackets:[]},n=e;n.languageId=l,n.includeLF=i.includeLF,n.ignoreCase=i.ignoreCase,n.unicode=i.unicode,n.noThrow=i.noThrow,n.usesEmbedded=i.usesEmbedded,n.stateNames=e.tokenizer,n.defaultToken=i.defaultToken;function s(d,f,m){for(const v of m){let x=v.include;if(x){if(typeof x!="string")throw mf(i,"an 'include' attribute must be a string at: "+d);if(x[0]==="@"&&(x=x.substr(1)),!e.tokenizer[x])throw mf(i,"include target '"+x+"' is not defined at: "+d);s(d+"."+x,f,e.tokenizer[x])}else{const w=new QDi(d);if(Array.isArray(v)&&v.length>=1&&v.length<=3)if(w.setRegex(n,v[0]),v.length>=3)if(typeof v[1]=="string")w.setAction(n,{token:v[1],next:v[2]});else if(typeof v[1]=="object"){const I=v[1];I.next=v[2],w.setAction(n,I)}else throw mf(i,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+d);else w.setAction(n,v[1]);else{if(!v.regex)throw mf(i,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+d);v.name&&typeof v.name=="string"&&(w.name=v.name),v.matchOnlyAtStart&&(w.matchOnlyAtLineStart=N0e(v.matchOnlyAtLineStart,!1)),w.setRegex(n,v.regex),w.setAction(n,v.action)}f.push(w)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw mf(i,"a language definition must define the 'tokenizer' attribute as an object");i.tokenizer=[];for(const d in e.tokenizer)if(e.tokenizer.hasOwnProperty(d)){i.start||(i.start=d);const f=e.tokenizer[d];i.tokenizer[d]=new Array,s("tokenizer."+d,i.tokenizer[d],f)}if(i.usesEmbedded=n.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw mf(i,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const c=[];for(const d of e.brackets){let f=d;if(f&&Array.isArray(f)&&f.length===3&&(f={token:f[2],open:f[0],close:f[1]}),f.open===f.close)throw mf(i,"open and close brackets in a 'brackets' attribute must be different: "+f.open+`
+ hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof f.open=="string"&&typeof f.token=="string"&&typeof f.close=="string")c.push({token:f.token+i.tokenPostfix,open:e6(i,f.open),close:e6(i,f.close)});else throw mf(i,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return i.brackets=c,i.noThrow=!0,i}function ZDi(l){D$.registerLanguage(l)}function YDi(){let l=[];return l=l.concat(D$.getLanguages()),l}function eEi(l){return oa.get(Pf).languageIdCodec.encodeLanguageId(l)}function tEi(l,e){return oa.withServices(()=>{const n=oa.get(Pf).onDidRequestRichLanguageFeatures(s=>{s===l&&(n.dispose(),e())});return n})}function iEi(l,e){return oa.withServices(()=>{const n=oa.get(Pf).onDidRequestBasicLanguageFeatures(s=>{s===l&&(n.dispose(),e())});return n})}function nEi(l,e){if(!oa.get(Pf).isRegisteredLanguageId(l))throw new Error(`Cannot set configuration for unknown language ${l}`);return oa.get(rh).register(l,e,100)}class rEi{constructor(e,i){this._languageId=e,this._actual=i}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,i,n){if(typeof this._actual.tokenize=="function")return Pre.adaptTokenize(this._languageId,this._actual,e,n);throw new Error("Not supported!")}tokenizeEncoded(e,i,n){const s=this._actual.tokenizeEncoded(e,n);return new ISe(s.tokens,s.endState)}}class Pre{constructor(e,i,n,s){this._languageId=e,this._actual=i,this._languageService=n,this._standaloneThemeService=s}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,i){const n=[];let s=0;for(let c=0,d=e.length;c<d;c++){const f=e[c];let m=f.startIndex;c===0?m=0:m<s&&(m=s),n[c]=new Pne(m,f.scopes,i),s=m}return n}static adaptTokenize(e,i,n,s){const c=i.tokenize(n,s),d=Pre._toClassicTokens(c.tokens,e);let f;return c.endState.equals(s)?f=s:f=c.endState,new Qqe(d,f)}tokenize(e,i,n){return Pre.adaptTokenize(this._languageId,this._actual,e,n)}_toBinaryTokens(e,i){const n=e.encodeLanguageId(this._languageId),s=this._standaloneThemeService.getColorTheme().tokenTheme,c=[];let d=0,f=0;for(let v=0,x=i.length;v<x;v++){const w=i[v],I=s.match(n,w.scopes)|1024;if(d>0&&c[d-1]===I)continue;let P=w.startIndex;v===0?P=0:P<f&&(P=f),c[d++]=P,c[d++]=I,f=P}const m=new Uint32Array(d);for(let v=0;v<d;v++)m[v]=c[v];return m}tokenizeEncoded(e,i,n){const s=this._actual.tokenize(e,n),c=this._toBinaryTokens(this._languageService.languageIdCodec,s.tokens);let d;return s.endState.equals(n)?d=n:d=s.endState,new ISe(c,d)}}function sEi(l){return typeof l.getInitialState=="function"}function oEi(l){return"tokenizeEncoded"in l}function $It(l){return l&&typeof l.then=="function"}function aEi(l){const e=oa.get(Mw);if(l){const i=[null];for(let n=1,s=l.length;n<s;n++)i[n]=In.fromHex(l[n]);e.setColorMapOverride(i)}else e.setColorMapOverride(null)}function JIt(l,e){return oEi(e)?new rEi(l,e):new Pre(l,e,oa.get(Pf),oa.get(Mw))}function wGe(l,e){const i=new Wli(async()=>{const n=await Promise.resolve(e.create());return n?sEi(n)?JIt(l,n):new bre(oa.get(Pf),oa.get(Mw),l,qIt(l,n),oa.get(Cc)):null});return Oh.registerFactory(l,i)}function cEi(l,e){if(!oa.get(Pf).isRegisteredLanguageId(l))throw new Error(`Cannot set tokens provider for unknown language ${l}`);return $It(e)?wGe(l,{create:()=>e}):Oh.register(l,JIt(l,e))}function lEi(l,e){const i=n=>new bre(oa.get(Pf),oa.get(Mw),l,qIt(l,n),oa.get(Cc));return $It(e)?wGe(l,{create:()=>e}):Oh.register(l,i(e))}function uEi(l,e){return oa.get(Ts).referenceProvider.register(l,e)}function dEi(l,e){return oa.get(Ts).renameProvider.register(l,e)}function fEi(l,e){return oa.get(Ts).newSymbolNamesProvider.register(l,e)}function hEi(l,e){return oa.get(Ts).signatureHelpProvider.register(l,e)}function _Ei(l,e){return oa.get(Ts).hoverProvider.register(l,{provideHover:async(n,s,c,d)=>{const f=n.getWordAtPosition(s);return Promise.resolve(e.provideHover(n,s,c,d)).then(m=>{if(m)return!m.range&&f&&(m.range=new nt(s.lineNumber,f.startColumn,s.lineNumber,f.endColumn)),m.range||(m.range=new nt(s.lineNumber,s.column,s.lineNumber,s.column)),m})}})}function pEi(l,e){return oa.get(Ts).documentSymbolProvider.register(l,e)}function mEi(l,e){return oa.get(Ts).documentHighlightProvider.register(l,e)}function gEi(l,e){return oa.get(Ts).linkedEditingRangeProvider.register(l,e)}function yEi(l,e){return oa.get(Ts).definitionProvider.register(l,e)}function vEi(l,e){return oa.get(Ts).implementationProvider.register(l,e)}function bEi(l,e){return oa.get(Ts).typeDefinitionProvider.register(l,e)}function CEi(l,e){return oa.get(Ts).codeLensProvider.register(l,e)}function SEi(l,e,i){return oa.get(Ts).codeActionProvider.register(l,{providedCodeActionKinds:i==null?void 0:i.providedCodeActionKinds,documentation:i==null?void 0:i.documentation,provideCodeActions:(s,c,d,f)=>{const v=oa.get(zL).read({resource:s.uri}).filter(x=>nt.areIntersectingOrTouching(x,c));return e.provideCodeActions(s,c,{markers:v,only:d.only,trigger:d.trigger},f)},resolveCodeAction:e.resolveCodeAction})}function wEi(l,e){return oa.get(Ts).documentFormattingEditProvider.register(l,e)}function xEi(l,e){return oa.get(Ts).documentRangeFormattingEditProvider.register(l,e)}function kEi(l,e){return oa.get(Ts).onTypeFormattingEditProvider.register(l,e)}function TEi(l,e){return oa.get(Ts).linkProvider.register(l,e)}function DEi(l,e){return oa.get(Ts).completionProvider.register(l,e)}function EEi(l,e){return oa.get(Ts).colorProvider.register(l,e)}function IEi(l,e){return oa.get(Ts).foldingRangeProvider.register(l,e)}function NEi(l,e){return oa.get(Ts).declarationProvider.register(l,e)}function LEi(l,e){return oa.get(Ts).selectionRangeProvider.register(l,e)}function PEi(l,e){return oa.get(Ts).documentSemanticTokensProvider.register(l,e)}function AEi(l,e){return oa.get(Ts).documentRangeSemanticTokensProvider.register(l,e)}function OEi(l,e){return oa.get(Ts).inlineCompletionsProvider.register(l,e)}function MEi(l,e){return oa.get(Ts).inlineEditProvider.register(l,e)}function REi(l,e){return oa.get(Ts).inlayHintsProvider.register(l,e)}function FEi(){return{register:ZDi,getLanguages:YDi,onLanguage:tEi,onLanguageEncountered:iEi,getEncodedLanguageId:eEi,setLanguageConfiguration:nEi,setColorMap:aEi,registerTokensProviderFactory:wGe,setTokensProvider:cEi,setMonarchTokensProvider:lEi,registerReferenceProvider:uEi,registerRenameProvider:dEi,registerNewSymbolNameProvider:fEi,registerCompletionItemProvider:DEi,registerSignatureHelpProvider:hEi,registerHoverProvider:_Ei,registerDocumentSymbolProvider:pEi,registerDocumentHighlightProvider:mEi,registerLinkedEditingRangeProvider:gEi,registerDefinitionProvider:yEi,registerImplementationProvider:vEi,registerTypeDefinitionProvider:bEi,registerCodeLensProvider:CEi,registerCodeActionProvider:SEi,registerDocumentFormattingEditProvider:wEi,registerDocumentRangeFormattingEditProvider:xEi,registerOnTypeFormattingEditProvider:kEi,registerLinkProvider:TEi,registerColorProvider:EEi,registerFoldingRangeProvider:IEi,registerDeclarationProvider:NEi,registerSelectionRangeProvider:LEi,registerDocumentSemanticTokensProvider:PEi,registerDocumentRangeSemanticTokensProvider:AEi,registerInlineCompletionsProvider:OEi,registerInlineEditProvider:MEi,registerInlayHintsProvider:REi,DocumentHighlightKind:PBe,CompletionItemKind:TBe,CompletionItemTag:DBe,CompletionItemInsertTextRule:kBe,SymbolKind:lWe,SymbolTag:uWe,IndentAction:WBe,CompletionTriggerKind:EBe,SignatureHelpTriggerKind:cWe,InlayHintKind:HBe,InlineCompletionTriggerKind:jBe,InlineEditTriggerKind:zBe,CodeActionTriggerType:xBe,NewSymbolNameTag:XBe,NewSymbolNameTriggerKind:QBe,PartialAcceptTriggerKind:eWe,HoverVerbosityAction:BBe,FoldingRangeKind:yR,SelectedSuggestionInfo:Kkt}}const xGe=jc("IEditorCancelService"),GIt=new rs("cancellableOperation",!1,W("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));nl(xGe,class{constructor(){this._tokens=new WeakMap}add(l,e){let i=this._tokens.get(l);i||(i=l.invokeWithinContext(s=>{const c=GIt.bindTo(s.get(Ko)),d=new _v;return{key:c,tokens:d}}),this._tokens.set(l,i));let n;return i.key.set(!0),n=i.tokens.push(e),()=>{n&&(n(),i.key.set(!i.tokens.isEmpty()),n=void 0)}}cancel(l){const e=this._tokens.get(l);if(!e)return;const i=e.tokens.pop();i&&(i.cancel(),e.key.set(!e.tokens.isEmpty()))}},1);class BEi extends ih{constructor(e,i){super(i),this.editor=e,this._unregister=e.invokeWithinContext(n=>n.get(xGe).add(e,this))}dispose(){this._unregister(),super.dispose()}}$r(new class extends tm{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:GIt})}runEditorCommand(l,e){l.get(xGe).cancel(e)}});let KIt=class Uje{constructor(e,i){if(this.flags=i,this.flags&1){const n=e.getModel();this.modelVersionId=n?SB("{0}#{1}",n.uri.toString(),n.getVersionId()):null}else this.modelVersionId=null;this.flags&4?this.position=e.getPosition():this.position=null,this.flags&2?this.selection=e.getSelection():this.selection=null,this.flags&8?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof Uje))return!1;const i=e;return!(this.modelVersionId!==i.modelVersionId||this.scrollLeft!==i.scrollLeft||this.scrollTop!==i.scrollTop||!this.position&&i.position||this.position&&!i.position||this.position&&i.position&&!this.position.equals(i.position)||!this.selection&&i.selection||this.selection&&!i.selection||this.selection&&i.selection&&!this.selection.equalsRange(i.selection))}validate(e){return this._equals(new Uje(e,this.flags))}};class LR extends BEi{constructor(e,i,n,s){super(e,s),this._listener=new wn,i&4&&this._listener.add(e.onDidChangeCursorPosition(c=>{(!n||!nt.containsPosition(n,c.position))&&this.cancel()})),i&2&&this._listener.add(e.onDidChangeCursorSelection(c=>{(!n||!nt.containsRange(n,c.selection))&&this.cancel()})),i&8&&this._listener.add(e.onDidScrollChange(c=>this.cancel())),i&1&&(this._listener.add(e.onDidChangeModel(c=>this.cancel())),this._listener.add(e.onDidChangeModelContent(c=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}class kGe extends ih{constructor(e,i){super(i),this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}function FL(l){return l&&typeof l.getEditorType=="function"?l.getEditorType()===Ase.ICodeEditor:!1}function TGe(l){return l&&typeof l.getEditorType=="function"?l.getEditorType()===Ase.IDiffEditor:!1}function WEi(l){return!!l&&typeof l=="object"&&typeof l.onDidChangeActiveEditor=="function"}function XIt(l){return FL(l)?l:TGe(l)?l.getModifiedEditor():WEi(l)&&FL(l.activeCodeEditor)?l.activeCodeEditor:null}class G${static _handleEolEdits(e,i){let n;const s=[];for(const c of i)typeof c.eol=="number"&&(n=c.eol),c.range&&typeof c.text=="string"&&s.push(c);return typeof n=="number"&&e.hasModel()&&e.getModel().pushEOL(n),s}static _isFullModelReplaceEdit(e,i){if(!e.hasModel())return!1;const n=e.getModel(),s=n.validateRange(i.range);return n.getFullModelRange().equalsRange(s)}static execute(e,i,n){n&&e.pushUndoStop();const s=GE.capture(e),c=G$._handleEolEdits(e,i);c.length===1&&G$._isFullModelReplaceEdit(e,c[0])?e.executeEdits("formatEditsCommand",c.map(d=>eh.replace(nt.lift(d.range),d.text))):e.executeEdits("formatEditsCommand",c.map(d=>eh.replaceMove(nt.lift(d.range),d.text))),n&&e.pushUndoStop(),s.restoreRelativeVerticalPositionOfCursor(e)}}class Swt{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}}class VEi{constructor(e){if(this._set=new Set,e)for(const i of e)this.add(i)}add(e){this._set.add(Swt.toKey(e))}has(e){return this._set.has(Swt.toKey(e))}}function QIt(l,e,i){const n=[],s=new VEi,c=l.ordered(i);for(const f of c)n.push(f),f.extensionId&&s.add(f.extensionId);const d=e.ordered(i);for(const f of d){if(f.extensionId){if(s.has(f.extensionId))continue;s.add(f.extensionId)}n.push({displayName:f.displayName,extensionId:f.extensionId,provideDocumentFormattingEdits(m,v,x){return f.provideDocumentRangeFormattingEdits(m,m.getFullModelRange(),v,x)}})}return n}const Cne=class Cne{static setFormatterSelector(e){return{dispose:Cne._selectors.unshift(e)}}static async select(e,i,n,s){if(e.length===0)return;const c=dl.first(Cne._selectors);if(c)return await c(e,i,n,s)}};Cne._selectors=new _v;let Are=Cne;async function ZIt(l,e,i,n,s,c,d){const f=l.get(ho),{documentRangeFormattingEditProvider:m}=l.get(Ts),v=FL(e)?e.getModel():e,x=m.ordered(v),w=await Are.select(x,v,n,2);w&&(s.report(w),await f.invokeFunction(HEi,w,e,i,c,d))}async function HEi(l,e,i,n,s,c){var Y,ae;const d=l.get(Fb),f=l.get(N0),m=l.get(jR);let v,x;FL(i)?(v=i.getModel(),x=new LR(i,5,void 0,s)):(v=i,x=new kGe(i,s));const w=[];let I=0;for(const me of Vqe(n).sort(nt.compareRangesUsingStarts))I>0&&nt.areIntersectingOrTouching(w[I-1],me)?w[I-1]=nt.fromPositions(w[I-1].getStartPosition(),me.getEndPosition()):I=w.push(me);const P=async me=>{var Ce,Fe;f.trace("[format][provideDocumentRangeFormattingEdits] (request)",(Ce=e.extensionId)==null?void 0:Ce.value,me);const ye=await e.provideDocumentRangeFormattingEdits(v,me,v.getFormattingOptions(),x.token)||[];return f.trace("[format][provideDocumentRangeFormattingEdits] (response)",(Fe=e.extensionId)==null?void 0:Fe.value,ye),ye},O=(me,ye)=>{if(!me.length||!ye.length)return!1;const Ce=me.reduce((Fe,rt)=>nt.plusRange(Fe,rt.range),me[0].range);if(!ye.some(Fe=>nt.intersectRanges(Ce,Fe.range)))return!1;for(const Fe of me)for(const rt of ye)if(nt.intersectRanges(Fe.range,rt.range))return!0;return!1},z=[],J=[];try{if(typeof e.provideDocumentRangesFormattingEdits=="function"){f.trace("[format][provideDocumentRangeFormattingEdits] (request)",(Y=e.extensionId)==null?void 0:Y.value,w);const me=await e.provideDocumentRangesFormattingEdits(v,w,v.getFormattingOptions(),x.token)||[];f.trace("[format][provideDocumentRangeFormattingEdits] (response)",(ae=e.extensionId)==null?void 0:ae.value,me),J.push(me)}else{for(const me of w){if(x.token.isCancellationRequested)return!0;J.push(await P(me))}for(let me=0;me<w.length;++me)for(let ye=me+1;ye<w.length;++ye){if(x.token.isCancellationRequested)return!0;if(O(J[me],J[ye])){const Ce=nt.plusRange(w[me],w[ye]),Fe=await P(Ce);w.splice(ye,1),w.splice(me,1),w.push(Ce),J.splice(ye,1),J.splice(me,1),J.push(Fe),me=0,ye=0}}}for(const me of J){if(x.token.isCancellationRequested)return!0;const ye=await d.computeMoreMinimalEdits(v.uri,me);ye&&z.push(...ye)}}finally{x.dispose()}if(z.length===0)return!1;if(FL(i))G$.execute(i,z,!0),i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1);else{const[{range:me}]=z,ye=new Us(me.startLineNumber,me.startColumn,me.endLineNumber,me.endColumn);v.pushEditOperations([ye],z.map(Ce=>({text:Ce.text,range:nt.lift(Ce.range),forceMoveMarkers:!0})),Ce=>{for(const{range:Fe}of Ce)if(nt.areIntersectingOrTouching(Fe,ye))return[new Us(Fe.startLineNumber,Fe.startColumn,Fe.endLineNumber,Fe.endColumn)];return null})}return m.playSignal(hw.format,{userGesture:c}),!0}async function jEi(l,e,i,n,s,c){const d=l.get(ho),f=l.get(Ts),m=FL(e)?e.getModel():e,v=QIt(f.documentFormattingEditProvider,f.documentRangeFormattingEditProvider,m),x=await Are.select(v,m,i,1);x&&(n.report(x),await d.invokeFunction(zEi,x,e,i,s,c))}async function zEi(l,e,i,n,s,c){const d=l.get(Fb),f=l.get(jR);let m,v;FL(i)?(m=i.getModel(),v=new LR(i,5,void 0,s)):(m=i,v=new kGe(i,s));let x;try{const w=await e.provideDocumentFormattingEdits(m,m.getFormattingOptions(),v.token);if(x=await d.computeMoreMinimalEdits(m.uri,w),v.token.isCancellationRequested)return!0}finally{v.dispose()}if(!x||x.length===0)return!1;if(FL(i))G$.execute(i,x,n!==2),n!==2&&i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1);else{const[{range:w}]=x,I=new Us(w.startLineNumber,w.startColumn,w.endLineNumber,w.endColumn);m.pushEditOperations([I],x.map(P=>({text:P.text,range:nt.lift(P.range),forceMoveMarkers:!0})),P=>{for(const{range:O}of P)if(nt.areIntersectingOrTouching(O,I))return[new Us(O.startLineNumber,O.startColumn,O.endLineNumber,O.endColumn)];return null})}return f.playSignal(hw.format,{userGesture:c}),!0}async function UEi(l,e,i,n,s,c){const d=e.documentRangeFormattingEditProvider.ordered(i);for(const f of d){const m=await Promise.resolve(f.provideDocumentRangeFormattingEdits(i,n,s,c)).catch(t_);if(ky(m))return await l.computeMoreMinimalEdits(i.uri,m)}}async function qEi(l,e,i,n,s){const c=QIt(e.documentFormattingEditProvider,e.documentRangeFormattingEditProvider,i);for(const d of c){const f=await Promise.resolve(d.provideDocumentFormattingEdits(i,n,s)).catch(t_);if(ky(f))return await l.computeMoreMinimalEdits(i.uri,f)}}function YIt(l,e,i,n,s,c,d){const f=e.onTypeFormattingEditProvider.ordered(i);return f.length===0||f[0].autoFormatTriggerCharacters.indexOf(s)<0?Promise.resolve(void 0):Promise.resolve(f[0].provideOnTypeFormattingEdits(i,n,s,c,d)).catch(t_).then(m=>l.computeMoreMinimalEdits(i.uri,m))}fl.registerCommand("_executeFormatRangeProvider",async function(l,...e){const[i,n,s]=e;Fl(yo.isUri(i)),Fl(nt.isIRange(n));const c=l.get(Ob),d=l.get(Fb),f=l.get(Ts),m=await c.createModelReference(i);try{return UEi(d,f,m.object.textEditorModel,nt.lift(n),s,cc.None)}finally{m.dispose()}});fl.registerCommand("_executeFormatDocumentProvider",async function(l,...e){const[i,n]=e;Fl(yo.isUri(i));const s=l.get(Ob),c=l.get(Fb),d=l.get(Ts),f=await s.createModelReference(i);try{return qEi(c,d,f.object.textEditorModel,n,cc.None)}finally{f.dispose()}});fl.registerCommand("_executeFormatOnTypeProvider",async function(l,...e){const[i,n,s,c]=e;Fl(yo.isUri(i)),Fl(pi.isIPosition(n)),Fl(typeof s=="string");const d=l.get(Ob),f=l.get(Fb),m=l.get(Ts),v=await d.createModelReference(i);try{return YIt(f,m,v.object.textEditorModel,pi.lift(n),s,c,cc.None)}finally{v.dispose()}});KE.wrappingIndent.defaultValue=0;KE.glyphMargin.defaultValue=!1;KE.autoIndent.defaultValue=3;KE.overviewRulerLanes.defaultValue=2;Are.setFormatterSelector((l,e,i)=>Promise.resolve(l[0]));const Ev=Xkt();Ev.editor=$Di();Ev.languages=FEi();const eNt=Ev.CancellationTokenSource,tNt=Ev.Emitter,iNt=Ev.KeyCode,nNt=Ev.KeyMod,rNt=Ev.Position,sNt=Ev.Range,oNt=Ev.Selection,aNt=Ev.SelectionDirection,cNt=Ev.MarkerSeverity,lNt=Ev.MarkerTag,Bwe=Ev.Uri,uNt=Ev.Token,c9=Ev.editor,aT=Ev.languages,x9e=globalThis.MonacoEnvironment;(x9e!=null&&x9e.globalAPI||typeof define=="function"&&define.amd)&&(globalThis.monaco=Ev);typeof globalThis.require<"u"&&typeof globalThis.require.config=="function"&&globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});const Fse=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:eNt,Emitter:tNt,KeyCode:iNt,KeyMod:nNt,MarkerSeverity:cNt,MarkerTag:lNt,Position:rNt,Range:sNt,Selection:oNt,SelectionDirection:aNt,Token:uNt,Uri:Bwe,editor:c9,languages:aT},Symbol.toStringTag,{value:"Module"}));/*!-----------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Version: 0.52.0(f6dc0eb8fce67e57f6036f4769d92c1666cdf546)
+ * Released under the MIT license
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
+ *-----------------------------------------------------------------------------*/var $Ei=Object.defineProperty,JEi=Object.getOwnPropertyDescriptor,GEi=Object.getOwnPropertyNames,KEi=Object.prototype.hasOwnProperty,XEi=(l,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of GEi(e))!KEi.call(l,s)&&s!==i&&$Ei(l,s,{get:()=>e[s],enumerable:!(n=JEi(e,s))||n.enumerable});return l},QEi=(l,e,i)=>(XEi(l,e,"default"),i),die={};QEi(die,Fse);var dNt={},k9e={},ZEi=class fNt{static getOrCreate(e){return k9e[e]||(k9e[e]=new fNt(e)),k9e[e]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((i,n)=>{this._lazyLoadPromiseResolve=i,this._lazyLoadPromiseReject=n})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,dNt[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}};function Io(l){const e=l.id;dNt[e]=l,die.languages.register(l);const i=ZEi.getOrCreate(e);die.languages.registerTokensProviderFactory(e,{create:async()=>(await i.load()).language}),die.languages.onLanguageEncountered(e,async()=>{const n=await i.load();die.languages.setLanguageConfiguration(e,n.conf)})}Io({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>_o(()=>import("./abap-Dwu-KH2x.js"),[])});Io({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>_o(()=>import("./apex-Dn-XaljK.js"),[])});Io({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>_o(()=>import("./azcli-C9RgAbUI.js"),[])});Io({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>_o(()=>import("./bat-CoZ5qQQA.js"),[])});Io({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>_o(()=>import("./bicep-BTXPn4uT.js"),[])});Io({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>_o(()=>import("./cameligo-J_4-LjdT.js"),[])});Io({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>_o(()=>import("./clojure-DDKRPAGl.js"),[])});Io({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>_o(()=>import("./coffee-C8z2l6sj.js"),[])});Io({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>_o(()=>import("./cpp-DI3p9f9v.js"),[])});Io({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>_o(()=>import("./cpp-DI3p9f9v.js"),[])});Io({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>_o(()=>import("./csharp-Bya7J2fC.js"),[])});Io({id:"csp",extensions:[".csp"],aliases:["CSP","csp"],loader:()=>_o(()=>import("./csp-g7vr-vut.js"),[])});Io({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>_o(()=>import("./css-fOVBx6Gk.js"),[])});Io({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>_o(()=>import("./cypher-DciL1opS.js"),[])});Io({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>_o(()=>import("./dart-CAkRrlCV.js"),[])});Io({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>_o(()=>import("./dockerfile-CHkS34TV.js"),[])});Io({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>_o(()=>import("./ecl-qjrLrnvP.js"),[])});Io({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>_o(()=>import("./elixir-Bn2aVyyF.js"),[])});Io({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>_o(()=>import("./flow9-CcGMeAxr.js"),[])});Io({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>_o(()=>import("./fsharp-P5WqO7sL.js"),[])});Io({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>_o(()=>import("./freemarker2-OnI5Gveq.js"),__vite__mapDeps([0,1,2])).then(l=>l.TagAutoInterpolationDollar)});Io({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>_o(()=>import("./freemarker2-OnI5Gveq.js"),__vite__mapDeps([0,1,2])).then(l=>l.TagAngleInterpolationDollar)});Io({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>_o(()=>import("./freemarker2-OnI5Gveq.js"),__vite__mapDeps([0,1,2])).then(l=>l.TagBracketInterpolationDollar)});Io({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>_o(()=>import("./freemarker2-OnI5Gveq.js"),__vite__mapDeps([0,1,2])).then(l=>l.TagAngleInterpolationBracket)});Io({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>_o(()=>import("./freemarker2-OnI5Gveq.js"),__vite__mapDeps([0,1,2])).then(l=>l.TagBracketInterpolationBracket)});Io({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>_o(()=>import("./freemarker2-OnI5Gveq.js"),__vite__mapDeps([0,1,2])).then(l=>l.TagAutoInterpolationDollar)});Io({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>_o(()=>import("./freemarker2-OnI5Gveq.js"),__vite__mapDeps([0,1,2])).then(l=>l.TagAutoInterpolationBracket)});Io({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>_o(()=>import("./go-DHzw8g6E.js"),[])});Io({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>_o(()=>import("./graphql-DHR0rah7.js"),[])});Io({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>_o(()=>import("./handlebars-BHvBDF_T.js"),__vite__mapDeps([3,1,2]))});Io({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>_o(()=>import("./hcl-C75BKXms.js"),[])});Io({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>_o(()=>import("./html-DfZYg3qg.js"),__vite__mapDeps([4,1,2]))});Io({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>_o(()=>import("./ini-BJrO4HmQ.js"),[])});Io({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>_o(()=>import("./java-BZVcG1df.js"),[])});Io({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>_o(()=>import("./javascript-DbX-vxQa.js"),__vite__mapDeps([5,6,1,2]))});Io({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>_o(()=>import("./julia-y6tXNwRO.js"),[])});Io({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>_o(()=>import("./kotlin-a3XSJ_gM.js"),[])});Io({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>_o(()=>import("./less-DFUTkVLx.js"),[])});Io({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>_o(()=>import("./lexon-DVsYuwex.js"),[])});Io({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>_o(()=>import("./lua-DYx-Jejz.js"),[])});Io({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>_o(()=>import("./liquid-fLVojwb4.js"),__vite__mapDeps([7,1,2]))});Io({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>_o(()=>import("./m3-BMrvfaad.js"),[])});Io({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>_o(()=>import("./markdown-DuPmBnHi.js"),[])});Io({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>_o(()=>import("./mdx-gI0abYvb.js"),__vite__mapDeps([8,1,2]))});Io({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>_o(()=>import("./mips-BqUeXQd9.js"),[])});Io({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>_o(()=>import("./msdax-Dw-TSVhm.js"),[])});Io({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>_o(()=>import("./mysql-CcpH9Ljq.js"),[])});Io({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>_o(()=>import("./objective-c-BRNxDdm3.js"),[])});Io({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>_o(()=>import("./pascal-Cn8aAeCV.js"),[])});Io({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>_o(()=>import("./pascaligo-dBAnVStS.js"),[])});Io({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>_o(()=>import("./perl-C4L3BrdA.js"),[])});Io({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>_o(()=>import("./pgsql-BOSk5tQb.js"),[])});Io({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>_o(()=>import("./php-DzsKq5vr.js"),[])});Io({id:"pla",extensions:[".pla"],loader:()=>_o(()=>import("./pla-C6GoMDq5.js"),[])});Io({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>_o(()=>import("./postiats-DQpJ_7Kk.js"),[])});Io({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>_o(()=>import("./powerquery-M-mSA4YD.js"),[])});Io({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>_o(()=>import("./powershell-DzOgjbHk.js"),[])});Io({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>_o(()=>import("./protobuf-BIE5FnyZ.js"),[])});Io({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>_o(()=>import("./pug-s9KOoKAL.js"),[])});Io({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>_o(()=>import("./python-D975luWu.js"),__vite__mapDeps([9,1,2]))});Io({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>_o(()=>import("./qsharp-DWDrKSir.js"),[])});Io({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>_o(()=>import("./r-DnKTOUT4.js"),[])});Io({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>_o(()=>import("./razor-BSJ28aAe.js"),__vite__mapDeps([10,1,2]))});Io({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>_o(()=>import("./redis-CWZNkOVt.js"),[])});Io({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>_o(()=>import("./redshift-Bhrh1xcx.js"),[])});Io({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>_o(()=>import("./restructuredtext-CWmU_seV.js"),[])});Io({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>_o(()=>import("./ruby-2Tz7EiV8.js"),[])});Io({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>_o(()=>import("./rust-CrxrYIVW.js"),[])});Io({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>_o(()=>import("./sb-DkpzO6Ij.js"),[])});Io({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>_o(()=>import("./scala-Du7mGxrp.js"),[])});Io({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>_o(()=>import("./scheme-DnCYVA2x.js"),[])});Io({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>_o(()=>import("./scss-3iLYYaxs.js"),[])});Io({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>_o(()=>import("./shell-D4ITwtg2.js"),[])});Io({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>_o(()=>import("./solidity-Bq53zNw4.js"),[])});Io({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>_o(()=>import("./sophia-BtzCauDs.js"),[])});Io({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>_o(()=>import("./sparql-7--tI-JV.js"),[])});Io({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>_o(()=>import("./sql-B8Hnjumu.js"),[])});Io({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>_o(()=>import("./st-BtpAQKub.js"),[])});Io({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>_o(()=>import("./swift-CVGPmAnX.js"),[])});Io({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>_o(()=>import("./systemverilog-CzfWLrvP.js"),[])});Io({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>_o(()=>import("./systemverilog-CzfWLrvP.js"),[])});Io({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>_o(()=>import("./tcl-0V1PA5XN.js"),[])});Io({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>_o(()=>import("./twig-BwWq3-l7.js"),[])});Io({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>_o(()=>import("./typescript-DSer1JU9.js"),__vite__mapDeps([6,1,2]))});Io({id:"typespec",extensions:[".tsp"],aliases:["TypeSpec"],loader:()=>_o(()=>import("./typespec-B73e1L9X.js"),[])});Io({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>_o(()=>import("./vb-ByO2b-39.js"),[])});Io({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>_o(()=>import("./wgsl-DYQqGqAW.js"),[])});Io({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:()=>_o(()=>import("./xml-Bfx2yygV.js"),__vite__mapDeps([11,1,2]))});Io({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>_o(()=>import("./yaml-BZGo8wj-.js"),__vite__mapDeps([12,1,2]))});/*!-----------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Version: 0.52.0(f6dc0eb8fce67e57f6036f4769d92c1666cdf546)
+ * Released under the MIT license
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
+ *-----------------------------------------------------------------------------*/var YEi=Object.defineProperty,eIi=Object.getOwnPropertyDescriptor,tIi=Object.getOwnPropertyNames,iIi=Object.prototype.hasOwnProperty,nIi=(l,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of tIi(e))!iIi.call(l,s)&&s!==i&&YEi(l,s,{get:()=>e[s],enumerable:!(n=eIi(e,s))||n.enumerable});return l},rIi=(l,e,i)=>(nIi(l,e,"default"),i),PJ={};rIi(PJ,Fse);var DGe=class{constructor(e,i,n){this._onDidChange=new PJ.Emitter,this._languageId=e,this.setOptions(i),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},EGe={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},IGe={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},hNt=new DGe("css",EGe,IGe),_Nt=new DGe("scss",EGe,IGe),pNt=new DGe("less",EGe,IGe);PJ.languages.css={cssDefaults:hNt,lessDefaults:pNt,scssDefaults:_Nt};function NGe(){return _o(()=>import("./cssMode-8LFZwXV3.js"),__vite__mapDeps([13,1,2]))}PJ.languages.onLanguage("less",()=>{NGe().then(l=>l.setupMode(pNt))});PJ.languages.onLanguage("scss",()=>{NGe().then(l=>l.setupMode(_Nt))});PJ.languages.onLanguage("css",()=>{NGe().then(l=>l.setupMode(hNt))});/*!-----------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Version: 0.52.0(f6dc0eb8fce67e57f6036f4769d92c1666cdf546)
+ * Released under the MIT license
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
+ *-----------------------------------------------------------------------------*/var sIi=Object.defineProperty,oIi=Object.getOwnPropertyDescriptor,aIi=Object.getOwnPropertyNames,cIi=Object.prototype.hasOwnProperty,lIi=(l,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of aIi(e))!cIi.call(l,s)&&s!==i&&sIi(l,s,{get:()=>e[s],enumerable:!(n=oIi(e,s))||n.enumerable});return l},uIi=(l,e,i)=>(lIi(l,e,"default"),i),Wwe={};uIi(Wwe,Fse);var dIi=class{constructor(e,i,n){this._onDidChange=new Wwe.Emitter,this._languageId=e,this.setOptions(i),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},fIi={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},Vwe={format:fIi,suggest:{},data:{useDefaultDataProvider:!0}};function Hwe(l){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:l===Qie,documentFormattingEdits:l===Qie,documentRangeFormattingEdits:l===Qie}}var Qie="html",wwt="handlebars",xwt="razor",mNt=jwe(Qie,Vwe,Hwe(Qie)),hIi=mNt.defaults,gNt=jwe(wwt,Vwe,Hwe(wwt)),_Ii=gNt.defaults,yNt=jwe(xwt,Vwe,Hwe(xwt)),pIi=yNt.defaults;Wwe.languages.html={htmlDefaults:hIi,razorDefaults:pIi,handlebarDefaults:_Ii,htmlLanguageService:mNt,handlebarLanguageService:gNt,razorLanguageService:yNt,registerHTMLLanguageService:jwe};function mIi(){return _o(()=>import("./htmlMode-c_yfuTN3.js"),__vite__mapDeps([14,1,2]))}function jwe(l,e=Vwe,i=Hwe(l)){const n=new dIi(l,e,i);let s;const c=Wwe.languages.onLanguage(l,async()=>{s=(await mIi()).setupMode(n)});return{defaults:n,dispose(){c.dispose(),s==null||s.dispose(),s=void 0}}}/*!-----------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Version: 0.52.0(f6dc0eb8fce67e57f6036f4769d92c1666cdf546)
+ * Released under the MIT license
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
+ *-----------------------------------------------------------------------------*/var gIi=Object.defineProperty,yIi=Object.getOwnPropertyDescriptor,vIi=Object.getOwnPropertyNames,bIi=Object.prototype.hasOwnProperty,CIi=(l,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of vIi(e))!bIi.call(l,s)&&s!==i&&gIi(l,s,{get:()=>e[s],enumerable:!(n=yIi(e,s))||n.enumerable});return l},SIi=(l,e,i)=>(CIi(l,e,"default"),i),Bse={};SIi(Bse,Fse);var wIi=class{constructor(e,i,n){this._onDidChange=new Bse.Emitter,this._languageId=e,this.setDiagnosticsOptions(i),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},xIi={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},kIi={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},vNt=new wIi("json",xIi,kIi),TIi=()=>bNt().then(l=>l.getWorker());Bse.languages.json={jsonDefaults:vNt,getWorker:TIi};function bNt(){return _o(()=>import("./jsonMode-BkHO8n_X.js"),__vite__mapDeps([15,1,2]))}Bse.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});Bse.languages.onLanguage("json",()=>{bNt().then(l=>l.setupMode(vNt))});/*!-----------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Version: 0.52.0(f6dc0eb8fce67e57f6036f4769d92c1666cdf546)
+ * Released under the MIT license
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
+ *-----------------------------------------------------------------------------*/var DIi=Object.defineProperty,EIi=Object.getOwnPropertyDescriptor,IIi=Object.getOwnPropertyNames,NIi=Object.prototype.hasOwnProperty,LIi=(l,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of IIi(e))!NIi.call(l,s)&&s!==i&&DIi(l,s,{get:()=>e[s],enumerable:!(n=EIi(e,s))||n.enumerable});return l},PIi=(l,e,i)=>(LIi(l,e,"default"),i),AIi="5.4.5",K$={};PIi(K$,Fse);var CNt=(l=>(l[l.None=0]="None",l[l.CommonJS=1]="CommonJS",l[l.AMD=2]="AMD",l[l.UMD=3]="UMD",l[l.System=4]="System",l[l.ES2015=5]="ES2015",l[l.ESNext=99]="ESNext",l))(CNt||{}),SNt=(l=>(l[l.None=0]="None",l[l.Preserve=1]="Preserve",l[l.React=2]="React",l[l.ReactNative=3]="ReactNative",l[l.ReactJSX=4]="ReactJSX",l[l.ReactJSXDev=5]="ReactJSXDev",l))(SNt||{}),wNt=(l=>(l[l.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",l[l.LineFeed=1]="LineFeed",l))(wNt||{}),xNt=(l=>(l[l.ES3=0]="ES3",l[l.ES5=1]="ES5",l[l.ES2015=2]="ES2015",l[l.ES2016=3]="ES2016",l[l.ES2017=4]="ES2017",l[l.ES2018=5]="ES2018",l[l.ES2019=6]="ES2019",l[l.ES2020=7]="ES2020",l[l.ESNext=99]="ESNext",l[l.JSON=100]="JSON",l[l.Latest=99]="Latest",l))(xNt||{}),kNt=(l=>(l[l.Classic=1]="Classic",l[l.NodeJs=2]="NodeJs",l))(kNt||{}),TNt=class{constructor(l,e,i,n,s){this._onDidChange=new K$.Emitter,this._onDidExtraLibsChange=new K$.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(l),this.setDiagnosticsOptions(e),this.setWorkerOptions(i),this.setInlayHintsOptions(n),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(l,e){let i;if(typeof e>"u"?i=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:i=e,this._extraLibs[i]&&this._extraLibs[i].content===l)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[i]&&(n=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(n=this._extraLibs[i].version+1),this._extraLibs[i]={content:l,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let s=this._extraLibs[i];s&&s.version===n&&(delete this._extraLibs[i],this._removedExtraLibs[i]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(l){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),l&&l.length>0)for(const e of l){const i=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=e.content;let s=1;this._removedExtraLibs[i]&&(s=this._removedExtraLibs[i]+1),this._extraLibs[i]={content:n,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(l){this._compilerOptions=l||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(l){this._diagnosticsOptions=l||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(l){this._workerOptions=l||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(l){this._inlayHintsOptions=l||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(l){}setEagerModelSync(l){this._eagerModelSync=l}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(l){this._modeConfiguration=l||Object.create(null),this._onDidChange.fire(void 0)}},OIi=AIi,DNt={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},ENt=new TNt({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},DNt),INt=new TNt({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},DNt),MIi=()=>zwe().then(l=>l.getTypeScriptWorker()),RIi=()=>zwe().then(l=>l.getJavaScriptWorker());K$.languages.typescript={ModuleKind:CNt,JsxEmit:SNt,NewLineKind:wNt,ScriptTarget:xNt,ModuleResolutionKind:kNt,typescriptVersion:OIi,typescriptDefaults:ENt,javascriptDefaults:INt,getTypeScriptWorker:MIi,getJavaScriptWorker:RIi};function zwe(){return _o(()=>import("./tsMode-CSjQzO28.js"),__vite__mapDeps([16,1,2]))}K$.languages.onLanguage("typescript",()=>zwe().then(l=>l.setupTypeScript(ENt)));K$.languages.onLanguage("javascript",()=>zwe().then(l=>l.setupJavaScript(INt)));class FIi extends Tv{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:aa("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),icon:pr.map,toggled:kn.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:kn.has("isInDiffEditor"),menu:{when:kn.has("isInDiffEditor"),id:As.EditorTitle,order:22,group:"navigation"}})}run(e,...i){const n=e.get(Cc),s=!n.getValue("diffEditor.hideUnchangedRegions.enabled");n.updateValue("diffEditor.hideUnchangedRegions.enabled",s)}}class NNt extends Tv{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:aa("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),precondition:kn.has("isInDiffEditor")})}run(e,...i){const n=e.get(Cc),s=!n.getValue("diffEditor.experimental.showMoves");n.updateValue("diffEditor.experimental.showMoves",s)}}class LNt extends Tv{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:aa("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),precondition:kn.has("isInDiffEditor")})}run(e,...i){const n=e.get(Cc),s=!n.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");n.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",s)}}const Wse=aa("diffEditor","Diff Editor");class BIi extends XE{constructor(){super({id:"diffEditor.switchSide",title:aa("switchSide","Switch Side"),icon:pr.arrowSwap,precondition:kn.has("isInDiffEditor"),f1:!0,category:Wse})}runEditorCommand(e,i,n){const s=AJ(e);if(s instanceof h6){if(n&&n.dryRun)return{destinationSelection:s.mapToOtherSide().destinationSelection};s.switchSide()}}}class WIi extends XE{constructor(){super({id:"diffEditor.exitCompareMove",title:aa("exitCompareMove","Exit Compare Move"),icon:pr.close,precondition:Tt.comparingMovedCode,f1:!1,category:Wse,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,i,...n){const s=AJ(e);s instanceof h6&&s.exitCompareMove()}}class VIi extends XE{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:aa("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),icon:pr.fold,precondition:kn.has("isInDiffEditor"),f1:!0,category:Wse})}runEditorCommand(e,i,...n){const s=AJ(e);s instanceof h6&&s.collapseAllUnchangedRegions()}}class HIi extends XE{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:aa("showAllUnchangedRegions","Show All Unchanged Regions"),icon:pr.unfold,precondition:kn.has("isInDiffEditor"),f1:!0,category:Wse})}runEditorCommand(e,i,...n){const s=AJ(e);s instanceof h6&&s.showAllUnchangedRegions()}}class qje extends Tv{constructor(){super({id:"diffEditor.revert",title:aa("revert","Revert"),f1:!1,category:Wse})}run(e,i){const n=jIi(e,i.originalUri,i.modifiedUri);n instanceof h6&&n.revertRangeMappings(i.mapping.innerChanges??[])}}const PNt=aa("accessibleDiffViewer","Accessible Diff Viewer"),FCe=class FCe extends Tv{constructor(){super({id:FCe.id,title:aa("editor.action.accessibleDiffViewer.next","Go to Next Difference"),category:PNt,precondition:kn.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const i=AJ(e);i==null||i.accessibleDiffViewerNext()}};FCe.id="editor.action.accessibleDiffViewer.next";let Ore=FCe;const BCe=class BCe extends Tv{constructor(){super({id:BCe.id,title:aa("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),category:PNt,precondition:kn.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const i=AJ(e);i==null||i.accessibleDiffViewerPrev()}};BCe.id="editor.action.accessibleDiffViewer.prev";let Uve=BCe;function jIi(l,e,i){return l.get(Bl).listDiffEditors().find(c=>{var m,v;const d=c.getModifiedEditor(),f=c.getOriginalEditor();return d&&((m=d.getModel())==null?void 0:m.uri.toString())===i.toString()&&f&&((v=f.getModel())==null?void 0:v.uri.toString())===e.toString()})||null}function AJ(l){const i=l.get(Bl).listDiffEditors(),n=D0();if(n)for(const s of i){const c=s.getContainerDomNode();if(zIi(c,n))return s}return null}function zIi(l,e){let i=e;for(;i;){if(i===l)return!0;i=i.parentElement}return!1}Nd(FIi);Nd(NNt);Nd(LNt);yg.appendMenuItem(As.EditorTitle,{command:{id:new LNt().desc.id,title:W("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:kn.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:kn.has("isInDiffEditor")},order:11,group:"1_diff",when:kn.and(Tt.diffEditorRenderSideBySideInlineBreakpointReached,kn.has("isInDiffEditor"))});yg.appendMenuItem(As.EditorTitle,{command:{id:new NNt().desc.id,title:W("showMoves","Show Moved Code Blocks"),icon:pr.move,toggled:pJ.create("config.diffEditor.experimental.showMoves",!0),precondition:kn.has("isInDiffEditor")},order:10,group:"1_diff",when:kn.has("isInDiffEditor")});Nd(qje);for(const l of[{icon:pr.arrowRight,key:Tt.diffEditorInlineMode.toNegated()},{icon:pr.discard,key:Tt.diffEditorInlineMode}])yg.appendMenuItem(As.DiffEditorHunkToolbar,{command:{id:new qje().desc.id,title:W("revertHunk","Revert Block"),icon:l.icon},when:kn.and(Tt.diffEditorModifiedWritable,l.key),order:5,group:"primary"}),yg.appendMenuItem(As.DiffEditorSelectionToolbar,{command:{id:new qje().desc.id,title:W("revertSelection","Revert Selection"),icon:l.icon},when:kn.and(Tt.diffEditorModifiedWritable,l.key),order:5,group:"primary"});Nd(BIi);Nd(WIi);Nd(VIi);Nd(HIi);yg.appendMenuItem(As.EditorTitle,{command:{id:Ore.id,title:W("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:kn.has("isInDiffEditor")},order:10,group:"2_diff",when:kn.and(Tt.accessibleDiffViewerVisible.negate(),kn.has("isInDiffEditor"))});fl.registerCommandAlias("editor.action.diffReview.next",Ore.id);Nd(Ore);fl.registerCommandAlias("editor.action.diffReview.prev",Uve.id);Nd(Uve);var UIi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},qIi=function(l,e){return function(i,n){e(i,n,l)}},$je;const Uwe=new rs("selectionAnchorSet",!1);var O9;let PR=(O9=class{static get(e){return e.getContribution($je.ID)}constructor(e,i){this.editor=e,this.selectionAnchorSetContextKey=Uwe.bindTo(i),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(i=>{this.decorationId&&i.removeDecoration(this.decorationId),this.decorationId=i.addDecoration(Us.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new m1().appendText(W("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),xv(W("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const i=this.editor.getPosition();this.editor.setSelection(Us.fromPositions(e.getStartPosition(),i)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(i=>{i.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}},$je=O9,O9.ID="editor.contrib.selectionAnchorController",O9);PR=$je=UIi([qIi(1,Ko)],PR);class $Ii extends hs{constructor(){super({id:"editor.action.setSelectionAnchor",label:W("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:pp(2089,2080),weight:100}})}async run(e,i){var n;(n=PR.get(i))==null||n.setSelectionAnchor()}}class JIi extends hs{constructor(){super({id:"editor.action.goToSelectionAnchor",label:W("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:Uwe})}async run(e,i){var n;(n=PR.get(i))==null||n.goToSelectionAnchor()}}class GIi extends hs{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:W("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:Uwe,kbOpts:{kbExpr:Tt.editorTextFocus,primary:pp(2089,2089),weight:100}})}async run(e,i){var n;(n=PR.get(i))==null||n.selectFromAnchorToCursor()}}class KIi extends hs{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:W("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:Uwe,kbOpts:{kbExpr:Tt.editorTextFocus,primary:9,weight:100}})}async run(e,i){var n;(n=PR.get(i))==null||n.cancelSelectionAnchor()}}Cl(PR.ID,PR,4);sr($Ii);sr(JIi);sr(GIi);sr(KIi);const XIi=It("editorOverviewRuler.bracketMatchForeground","#A0A0A0",W("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class QIi extends hs{constructor(){super({id:"editor.action.jumpToBracket",label:W("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:3165,weight:100}})}run(e,i){var n;(n=FB.get(i))==null||n.jumpToBracket()}}class ZIi extends hs{constructor(){super({id:"editor.action.selectToBracket",label:W("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:aa("smartSelect.selectToBracketDescription","Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,i,n){var c;let s=!0;n&&n.selectBrackets===!1&&(s=!1),(c=FB.get(i))==null||c.selectToBracket(s)}}class YIi extends hs{constructor(){super({id:"editor.action.removeBrackets",label:W("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:2561,weight:100}})}run(e,i){var n;(n=FB.get(i))==null||n.removeBrackets(this.id)}}class eNi{constructor(e,i,n){this.position=e,this.brackets=i,this.options=n}}const vM=class vM extends xi{static get(e){return e.getContribution(vM.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new qu(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(72),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(i=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(i=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(i=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(i=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(i=>{i.hasChanged(72)&&(this._matchBrackets=this._editor.getOption(72),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),i=this._editor.getSelections().map(n=>{const s=n.getStartPosition(),c=e.bracketPairs.matchBracket(s);let d=null;if(c)c[0].containsPosition(s)&&!c[1].containsPosition(s)?d=c[1].getStartPosition():c[1].containsPosition(s)&&(d=c[0].getStartPosition());else{const f=e.bracketPairs.findEnclosingBrackets(s);if(f)d=f[1].getStartPosition();else{const m=e.bracketPairs.findNextBracket(s);m&&m.range&&(d=m.range.getStartPosition())}}return d?new Us(d.lineNumber,d.column,d.lineNumber,d.column):new Us(s.lineNumber,s.column,s.lineNumber,s.column)});this._editor.setSelections(i),this._editor.revealRange(i[0])}selectToBracket(e){if(!this._editor.hasModel())return;const i=this._editor.getModel(),n=[];this._editor.getSelections().forEach(s=>{const c=s.getStartPosition();let d=i.bracketPairs.matchBracket(c);if(!d&&(d=i.bracketPairs.findEnclosingBrackets(c),!d)){const v=i.bracketPairs.findNextBracket(c);v&&v.range&&(d=i.bracketPairs.matchBracket(v.range.getStartPosition()))}let f=null,m=null;if(d){d.sort(nt.compareRangesUsingStarts);const[v,x]=d;if(f=e?v.getStartPosition():v.getEndPosition(),m=e?x.getEndPosition():x.getStartPosition(),x.containsPosition(c)){const w=f;f=m,m=w}}f&&m&&n.push(new Us(f.lineNumber,f.column,m.lineNumber,m.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const i=this._editor.getModel();this._editor.getSelections().forEach(n=>{const s=n.getPosition();let c=i.bracketPairs.matchBracket(s);c||(c=i.bracketPairs.findEnclosingBrackets(s)),c&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:c[0],text:""},{range:c[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let i=0;for(const n of this._lastBracketsData){const s=n.brackets;s&&(e[i++]={range:s[0],options:n.options},e[i++]={range:s[1],options:n.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const i=this._editor.getModel(),n=i.getVersionId();let s=[];this._lastVersionId===n&&(s=this._lastBracketsData);const c=[];let d=0;for(let w=0,I=e.length;w<I;w++){const P=e[w];P.isEmpty()&&(c[d++]=P.getStartPosition())}c.length>1&&c.sort(pi.compare);const f=[];let m=0,v=0;const x=s.length;for(let w=0,I=c.length;w<I;w++){const P=c[w];for(;v<x&&s[v].position.isBefore(P);)v++;if(v<x&&s[v].position.equals(P))f[m++]=s[v];else{let O=i.bracketPairs.matchBracket(P,20),z=vM._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!O&&this._matchBrackets==="always"&&(O=i.bracketPairs.findEnclosingBrackets(P,20),z=vM._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),f[m++]=new eNi(P,O,z)}}this._lastBracketsData=f,this._lastVersionId=n}};vM.ID="editor.contrib.bracketMatchingController",vM._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=qa.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:Mh(XIi),position:ww.Center}}),vM._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=qa.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});let FB=vM;Cl(FB.ID,FB,1);sr(ZIi);sr(QIi);sr(YIi);yg.appendMenuItem(As.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:W({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2});class tNi{constructor(e,i){this._selection=e,this._isMovingLeft=i}getEditOperations(e,i){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const n=this._selection.startLineNumber,s=this._selection.startColumn,c=this._selection.endColumn;if(!(this._isMovingLeft&&s===1)&&!(!this._isMovingLeft&&c===e.getLineMaxColumn(n)))if(this._isMovingLeft){const d=new nt(n,s-1,n,s),f=e.getValueInRange(d);i.addEditOperation(d,null),i.addEditOperation(new nt(n,c,n,c),f)}else{const d=new nt(n,c,n,c+1),f=e.getValueInRange(d);i.addEditOperation(d,null),i.addEditOperation(new nt(n,s,n,s),f)}}computeCursorState(e,i){return this._isMovingLeft?new Us(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new Us(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class ANt extends hs{constructor(e,i){super(i),this.left=e}run(e,i){if(!i.hasModel())return;const n=[],s=i.getSelections();for(const c of s)n.push(new tNi(c,this.left));i.pushUndoStop(),i.executeCommands(this.id,n),i.pushUndoStop()}}class iNi extends ANt{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:W("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:Tt.writable})}}class nNi extends ANt{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:W("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:Tt.writable})}}sr(iNi);sr(nNi);class rNi extends hs{constructor(){super({id:"editor.action.transposeLetters",label:W("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:Tt.writable,kbOpts:{kbExpr:Tt.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,i){if(!i.hasModel())return;const n=i.getModel(),s=[],c=i.getSelections();for(const d of c){if(!d.isEmpty())continue;const f=d.startLineNumber,m=d.startColumn,v=n.getLineMaxColumn(f);if(f===1&&(m===1||m===2&&v===2))continue;const x=m===v?d.getPosition():ku.rightPosition(n,d.getPosition().lineNumber,d.getPosition().column),w=ku.leftPosition(n,x),I=ku.leftPosition(n,w),P=n.getValueInRange(nt.fromPositions(I,w)),O=n.getValueInRange(nt.fromPositions(w,x)),z=nt.fromPositions(I,x);s.push(new T0(z,O+P))}s.length>0&&(i.pushUndoStop(),i.executeCommands(this.id,s),i.pushUndoStop())}}sr(rNi);const qwe=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let l;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?l=crypto.getRandomValues.bind(crypto):l=function(n){for(let s=0;s<n.length;s++)n[s]=Math.floor(Math.random()*256);return n};const e=new Uint8Array(16),i=[];for(let n=0;n<256;n++)i.push(n.toString(16).padStart(2,"0"));return function(){l(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let s=0,c="";return c+=i[e[s++]],c+=i[e[s++]],c+=i[e[s++]],c+=i[e[s++]],c+="-",c+=i[e[s++]],c+=i[e[s++]],c+="-",c+=i[e[s++]],c+=i[e[s++]],c+="-",c+=i[e[s++]],c+=i[e[s++]],c+="-",c+=i[e[s++]],c+=i[e[s++]],c+=i[e[s++]],c+=i[e[s++]],c+=i[e[s++]],c+=i[e[s++]],c}}();function LGe(l){return{asString:async()=>l,asFile:()=>{},value:typeof l=="string"?l:void 0}}function sNi(l,e,i){const n={id:qwe(),name:l,uri:e,data:i};return{asString:async()=>"",asFile:()=>n,value:void 0}}class ONt{constructor(){this._entries=new Map}get size(){let e=0;for(const i of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const i=[...this._entries.keys()];return dl.some(this,([n,s])=>s.asFile())&&i.push("files"),RNt(qve(e),i)}get(e){var i;return(i=this._entries.get(this.toKey(e)))==null?void 0:i[0]}append(e,i){const n=this._entries.get(e);n?n.push(i):this._entries.set(this.toKey(e),[i])}replace(e,i){this._entries.set(this.toKey(e),[i])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,i]of this._entries)for(const n of i)yield[e,n]}toKey(e){return qve(e)}}function qve(l){return l.toLowerCase()}function MNt(l,e){return RNt(qve(l),e.map(qve))}function RNt(l,e){if(l==="*/*")return e.length>0;if(e.includes(l))return!0;const i=l.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!i)return!1;const[n,s,c]=i;return c==="*"?e.some(d=>d.startsWith(s+"/")):!1}const $we=Object.freeze({create:l=>r6(l.map(e=>e.toString())).join(`\r
+`),split:l=>l.split(`\r
+`),parse:l=>$we.split(l).filter(e=>!e.startsWith("#"))}),oL=class oL{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+oL.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...e){return new oL((this.value?[this.value,...e]:e).join(oL.sep))}};oL.sep=".",oL.None=new oL("@@none@@"),oL.Empty=new oL("");let Nf=oL;const kwt={EDITORS:"CodeEditors",FILES:"CodeFiles"};class oNi{}const aNi={DragAndDropContribution:"workbench.contributions.dragAndDrop"};nh.add(aNi.DragAndDropContribution,new oNi);const Sne=class Sne{constructor(){}static getInstance(){return Sne.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}};Sne.INSTANCE=new Sne;let Jje=Sne;function FNt(l){const e=new ONt;for(const i of l.items){const n=i.type;if(i.kind==="string"){const s=new Promise(c=>i.getAsString(c));e.append(n,LGe(s))}else if(i.kind==="file"){const s=i.getAsFile();s&&e.append(n,cNi(s))}}return e}function cNi(l){const e=l.path?yo.parse(l.path):void 0;return sNi(l.name,e,async()=>new Uint8Array(await l.arrayBuffer()))}const lNi=Object.freeze([kwt.EDITORS,kwt.FILES,ore.RESOURCES,ore.INTERNAL_URI_LIST]);function BNt(l,e=!1){const i=FNt(l),n=i.get(ore.INTERNAL_URI_LIST);if(n)i.replace(Yh.uriList,n);else if(e||!i.has(Yh.uriList)){const s=[];for(const c of l.items){const d=c.getAsFile();if(d){const f=d.path;try{f?s.push(yo.file(f).toString()):s.push(yo.parse(d.name,!0).toString())}catch{}}}s.length&&i.replace(Yh.uriList,LGe($we.create(s)))}for(const s of lNi)i.delete(s);return i}var PGe=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Mre=function(l,e){return function(i,n){e(i,n,l)}};class AGe{async provideDocumentPasteEdits(e,i,n,s,c){const d=await this.getEdit(n,c);if(d)return{edits:[{insertText:d.insertText,title:d.title,kind:d.kind,handledMimeType:d.handledMimeType,yieldTo:d.yieldTo}],dispose(){}}}async provideDocumentDropEdits(e,i,n,s){const c=await this.getEdit(n,s);if(c)return{edits:[{insertText:c.insertText,title:c.title,kind:c.kind,handledMimeType:c.handledMimeType,yieldTo:c.yieldTo}],dispose(){}}}}const wne=class wne extends AGe{constructor(){super(...arguments),this.kind=wne.kind,this.dropMimeTypes=[Yh.text],this.pasteMimeTypes=[Yh.text]}async getEdit(e,i){const n=e.get(Yh.text);if(!n||e.has(Yh.uriList))return;const s=await n.asString();return{handledMimeType:Yh.text,title:W("text.label","Insert Plain Text"),insertText:s,kind:this.kind}}};wne.id="text",wne.kind=new Nf("text.plain");let BB=wne;class WNt extends AGe{constructor(){super(...arguments),this.kind=new Nf("uri.absolute"),this.dropMimeTypes=[Yh.uriList],this.pasteMimeTypes=[Yh.uriList]}async getEdit(e,i){const n=await VNt(e);if(!n.length||i.isCancellationRequested)return;let s=0;const c=n.map(({uri:f,originalText:m})=>f.scheme===Ma.file?f.fsPath:(s++,m)).join(" ");let d;return s>0?d=n.length>1?W("defaultDropProvider.uriList.uris","Insert Uris"):W("defaultDropProvider.uriList.uri","Insert Uri"):d=n.length>1?W("defaultDropProvider.uriList.paths","Insert Paths"):W("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:Yh.uriList,insertText:c,title:d,kind:this.kind}}}let $ve=class extends AGe{constructor(e){super(),this._workspaceContextService=e,this.kind=new Nf("uri.relative"),this.dropMimeTypes=[Yh.uriList],this.pasteMimeTypes=[Yh.uriList]}async getEdit(e,i){const n=await VNt(e);if(!n.length||i.isCancellationRequested)return;const s=yT(n.map(({uri:c})=>{const d=this._workspaceContextService.getWorkspaceFolder(c);return d?Egi(d.uri,c):void 0}));if(s.length)return{handledMimeType:Yh.uriList,insertText:s.join(" "),title:n.length>1?W("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):W("defaultDropProvider.uriList.relativePath","Insert Relative Path"),kind:this.kind}}};$ve=PGe([Mre(0,LB)],$ve);class uNi{constructor(){this.kind=new Nf("html"),this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:Yh.text}]}async provideDocumentPasteEdits(e,i,n,s,c){var m;if(s.triggerKind!==One.PasteAs&&!((m=s.only)!=null&&m.contains(this.kind)))return;const d=n.get("text/html"),f=await(d==null?void 0:d.asString());if(!(!f||c.isCancellationRequested))return{dispose(){},edits:[{insertText:f,yieldTo:this._yieldTo,title:W("pasteHtmlLabel","Insert HTML"),kind:this.kind}]}}}async function VNt(l){const e=l.get(Yh.uriList);if(!e)return[];const i=await e.asString(),n=[];for(const s of $we.parse(i))try{n.push({uri:yo.parse(s),originalText:s})}catch{}return n}let Gje=class extends xi{constructor(e,i){super(),this._register(e.documentDropEditProvider.register("*",new BB)),this._register(e.documentDropEditProvider.register("*",new WNt)),this._register(e.documentDropEditProvider.register("*",new $ve(i)))}};Gje=PGe([Mre(0,Ts),Mre(1,LB)],Gje);let Kje=class extends xi{constructor(e,i){super(),this._register(e.documentPasteEditProvider.register("*",new BB)),this._register(e.documentPasteEditProvider.register("*",new WNt)),this._register(e.documentPasteEditProvider.register("*",new $ve(i))),this._register(e.documentPasteEditProvider.register("*",new uNi))}};Kje=PGe([Mre(0,Ts),Mre(1,LB)],Kje);const rT=class rT{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let i=0,n=this.value.charCodeAt(e),s;if(s=rT._table[n],typeof s=="number")return this.pos+=1,{type:s,pos:e,len:1};if(rT.isDigitCharacter(n)){s=8;do i+=1,n=this.value.charCodeAt(e+i);while(rT.isDigitCharacter(n));return this.pos+=i,{type:s,pos:e,len:i}}if(rT.isVariableCharacter(n)){s=9;do n=this.value.charCodeAt(e+ ++i);while(rT.isVariableCharacter(n)||rT.isDigitCharacter(n));return this.pos+=i,{type:s,pos:e,len:i}}s=10;do i+=1,n=this.value.charCodeAt(e+i);while(!isNaN(n)&&typeof rT._table[n]>"u"&&!rT.isDigitCharacter(n)&&!rT.isVariableCharacter(n));return this.pos+=i,{type:s,pos:e,len:i}}};rT._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};let Xje=rT;class OJ{constructor(){this._children=[]}appendChild(e){return e instanceof hv&&this._children[this._children.length-1]instanceof hv?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,i){const{parent:n}=e,s=n.children.indexOf(e),c=n.children.slice(0);c.splice(s,1,...i),n._children=c,function d(f,m){for(const v of f)v.parent=m,d(v.children,v)}(i,n)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof Vse)return e;e=e.parent}}toString(){return this.children.reduce((e,i)=>e+i.toString(),"")}len(){return 0}}class hv extends OJ{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new hv(this.value)}}class HNt extends OJ{}class dk extends HNt{static compareByIndex(e,i){return e.index===i.index?0:e.isFinalTabstop?1:i.isFinalTabstop||e.index<i.index?-1:e.index>i.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof MJ?this._children[0]:void 0}clone(){const e=new dk(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(i=>i.clone()),e}}class MJ extends OJ{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof hv&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new MJ;return this.options.forEach(e.appendChild,e),e}}class OGe extends OJ{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const i=this;let n=!1,s=e.replace(this.regexp,function(){return n=!0,i._replace(Array.prototype.slice.call(arguments,0,-2))});return!n&&this._children.some(c=>c instanceof bE&&!!c.elseValue)&&(s=this._replace([])),s}_replace(e){let i="";for(const n of this._children)if(n instanceof bE){let s=e[n.index]||"";s=n.resolve(s),i+=s}else i+=n.toString();return i}toString(){return""}clone(){const e=new OGe;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(i=>i.clone()),e}}class bE extends OJ{constructor(e,i,n,s){super(),this.index=e,this.shorthandName=i,this.ifValue=n,this.elseValue=s}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){const i=e.match(/[a-z0-9]+/gi);return i?i.map(n=>n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}_toCamelCase(e){const i=e.match(/[a-z0-9]+/gi);return i?i.map((n,s)=>s===0?n.charAt(0).toLowerCase()+n.substr(1):n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}clone(){return new bE(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class Rre extends HNt{constructor(e){super(),this.name=e}resolve(e){let i=e.resolve(this);return this.transform&&(i=this.transform.resolve(i||"")),i!==void 0?(this._children=[new hv(i)],!0):!1}clone(){const e=new Rre(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(i=>i.clone()),e}}function Twt(l,e){const i=[...l];for(;i.length>0;){const n=i.shift();if(!e(n))break;i.unshift(...n.children)}}class Vse extends OJ{get placeholderInfo(){if(!this._placeholders){const e=[];let i;this.walk(function(n){return n instanceof dk&&(e.push(n),i=!i||i.index<n.index?n:i),!0}),this._placeholders={all:e,last:i}}return this._placeholders}get placeholders(){const{all:e}=this.placeholderInfo;return e}offset(e){let i=0,n=!1;return this.walk(s=>s===e?(n=!0,!1):(i+=s.len(),!0)),n?i:-1}fullLen(e){let i=0;return Twt([e],n=>(i+=n.len(),!0)),i}enclosingPlaceholders(e){const i=[];let{parent:n}=e;for(;n;)n instanceof dk&&i.push(n),n=n.parent;return i}resolveVariables(e){return this.walk(i=>(i instanceof Rre&&i.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,i){return this._placeholders=void 0,super.replace(e,i)}clone(){const e=new Vse;return this._children=this.children.map(i=>i.clone()),e}walk(e){Twt(this.children,e)}}class WB{constructor(){this._scanner=new Xje,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,i,n){const s=new Vse;return this.parseFragment(e,s),this.ensureFinalTabstop(s,n??!1,i??!1),s}parseFragment(e,i){const n=i.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(i););const s=new Map,c=[];i.walk(m=>(m instanceof dk&&(m.isFinalTabstop?s.set(0,void 0):!s.has(m.index)&&m.children.length>0?s.set(m.index,m.children):c.push(m)),!0));const d=(m,v)=>{const x=s.get(m.index);if(!x)return;const w=new dk(m.index);w.transform=m.transform;for(const I of x){const P=I.clone();w.appendChild(P),P instanceof dk&&s.has(P.index)&&!v.has(P.index)&&(v.add(P.index),d(P,v),v.delete(P.index))}i.replace(m,[w])},f=new Set;for(const m of c)d(m,f);return i.children.slice(n)}ensureFinalTabstop(e,i,n){(i||n&&e.placeholders.length>0)&&(e.placeholders.find(c=>c.index===0)||e.appendChild(new dk(0)))}_accept(e,i){if(e===void 0||this._token.type===e){const n=i?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),n}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const i=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){const s=this._scanner.next();if(s.type!==0&&s.type!==4&&s.type!==5)return!1}this._token=this._scanner.next()}const n=this._scanner.value.substring(i.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),n}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let i;return(i=this._accept(5,!0))?(i=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||i,e.appendChild(new hv(i)),!0):!1}_parseTabstopOrVariableName(e){let i;const n=this._token;return this._accept(0)&&(i=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(i)?new dk(Number(i)):new Rre(i)),!0):this._backTo(n)}_parseComplexPlaceholder(e){let i;const n=this._token;if(!(this._accept(0)&&this._accept(3)&&(i=this._accept(8,!0))))return this._backTo(n);const c=new dk(Number(i));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(c),!0;if(!this._parse(c))return e.appendChild(new hv("${"+i+":")),c.children.forEach(e.appendChild,e),!0}else if(c.index>0&&this._accept(7)){const d=new MJ;for(;;){if(this._parseChoiceElement(d)){if(this._accept(2))continue;if(this._accept(7)&&(c.appendChild(d),this._accept(4)))return e.appendChild(c),!0}return this._backTo(n),!1}}else return this._accept(6)?this._parseTransform(c)?(e.appendChild(c),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(c),!0):this._backTo(n)}_parseChoiceElement(e){const i=this._token,n=[];for(;!(this._token.type===2||this._token.type===7);){let s;if((s=this._accept(5,!0))?s=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||s:s=this._accept(void 0,!0),!s)return this._backTo(i),!1;n.push(s)}return n.length===0?(this._backTo(i),!1):(e.appendChild(new hv(n.join(""))),!0)}_parseComplexVariable(e){let i;const n=this._token;if(!(this._accept(0)&&this._accept(3)&&(i=this._accept(9,!0))))return this._backTo(n);const c=new Rre(i);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(c),!0;if(!this._parse(c))return e.appendChild(new hv("${"+i+":")),c.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(c)?(e.appendChild(c),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(c),!0):this._backTo(n)}_parseTransform(e){const i=new OGe;let n="",s="";for(;!this._accept(6);){let c;if(c=this._accept(5,!0)){c=this._accept(6,!0)||c,n+=c;continue}if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let c;if(c=this._accept(5,!0)){c=this._accept(5,!0)||this._accept(6,!0)||c,i.appendChild(new hv(c));continue}if(!(this._parseFormatString(i)||this._parseAnything(i)))return!1}for(;!this._accept(4);){if(this._token.type!==14){s+=this._accept(void 0,!0);continue}return!1}try{i.regexp=new RegExp(n,s)}catch{return!1}return e.transform=i,!0}_parseFormatString(e){const i=this._token;if(!this._accept(0))return!1;let n=!1;this._accept(3)&&(n=!0);const s=this._accept(8,!0);if(s)if(n){if(this._accept(4))return e.appendChild(new bE(Number(s))),!0;if(!this._accept(1))return this._backTo(i),!1}else return e.appendChild(new bE(Number(s))),!0;else return this._backTo(i),!1;if(this._accept(6)){const c=this._accept(9,!0);return!c||!this._accept(4)?(this._backTo(i),!1):(e.appendChild(new bE(Number(s),c)),!0)}else if(this._accept(11)){const c=this._until(4);if(c)return e.appendChild(new bE(Number(s),void 0,c,void 0)),!0}else if(this._accept(12)){const c=this._until(4);if(c)return e.appendChild(new bE(Number(s),void 0,void 0,c)),!0}else if(this._accept(13)){const c=this._until(1);if(c){const d=this._until(4);if(d)return e.appendChild(new bE(Number(s),void 0,c,d)),!0}}else{const c=this._until(4);if(c)return e.appendChild(new bE(Number(s),void 0,void 0,c)),!0}return this._backTo(i),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new hv(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}function jNt(l,e,i){var n,s;return(typeof i.insertText=="string"?i.insertText==="":i.insertText.snippet==="")?{edits:((n=i.additionalEdit)==null?void 0:n.edits)??[]}:{edits:[...e.map(c=>new GM(l,{range:c,text:typeof i.insertText=="string"?WB.escape(i.insertText)+"$0":i.insertText.snippet,insertAsSnippet:!0})),...((s=i.additionalEdit)==null?void 0:s.edits)??[]]}}function zNt(l){function e(d,f){return"mimeType"in d?d.mimeType===f.handledMimeType:!!f.kind&&d.kind.contains(f.kind)}const i=new Map;for(const d of l)for(const f of d.yieldTo??[])for(const m of l)if(m!==d&&e(f,m)){let v=i.get(d);v||(v=[],i.set(d,v)),v.push(m)}if(!i.size)return Array.from(l);const n=new Set,s=[];function c(d){if(!d.length)return[];const f=d[0];if(s.includes(f))return console.warn("Yield to cycle detected",f),d;if(n.has(f))return c(d.slice(1));let m=[];const v=i.get(f);return v&&(s.push(f),m=c(v),s.pop()),n.add(f),[...m,f,...c(d.slice(1))]}return c(Array.from(l))}var dNi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},fNi=function(l,e){return function(i,n){e(i,n,l)}};const hNi=qa.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:s2t,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}}),WCe=class WCe extends xi{constructor(e,i,n,s,c){super(),this.typeId=e,this.editor=i,this.range=n,this.delegate=c,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(s),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=Cr(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const i=Cr("span.icon");this.domNode.append(i),i.classList.add(...zo.asClassNameArray(pr.loading),"codicon-modifier-spin");const n=()=>{const s=this.editor.getOption(67);this.domNode.style.height=`${s}px`,this.domNode.style.width=`${Math.ceil(.8*s)}px`};n(),this._register(this.editor.onDidChangeConfiguration(s=>{(s.hasChanged(52)||s.hasChanged(67))&&n()})),this._register(en(this.domNode,br.CLICK,s=>{this.delegate.cancel()}))}getId(){return WCe.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}};WCe.baseId="editor.widget.inlineProgressWidget";let Qje=WCe,Jve=class extends xi{constructor(e,i,n){super(),this.id=e,this._editor=i,this._instantiationService=n,this._showDelay=500,this._showPromise=this._register(new Fm),this._currentWidget=this._register(new Fm),this._operationIdPool=0,this._currentDecorations=i.createDecorationsCollection()}dispose(){super.dispose(),this._currentDecorations.clear()}async showWhile(e,i,n,s,c){const d=this._operationIdPool++;this._currentOperation=d,this.clear(),this._showPromise.value=CR(()=>{const f=nt.fromPositions(e);this._currentDecorations.set([{range:f,options:hNi}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(Qje,this.id,this._editor,f,i,s))},c??this._showDelay);try{return await n}finally{this._currentOperation===d&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};Jve=dNi([fNi(2,ho)],Jve);var _Ni=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Dwt=function(l,e){return function(i,n){e(i,n,l)}},I1e,YM;let GC=(YM=class{static get(e){return e.getContribution(I1e.ID)}constructor(e,i,n){this._openerService=n,this._messageWidget=new Fm,this._messageListeners=new wn,this._mouseOverMessage=!1,this._editor=e,this._visible=I1e.MESSAGE_VISIBLE.bindTo(i)}dispose(){var e;(e=this._message)==null||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,i){xv(WE(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=WE(e)?dwe(e,{actionHandler:{callback:s=>{this.closeMessage(),Y$e(this._openerService,s,WE(e)?e.isTrusted:void 0)},disposables:this._messageListeners}}):void 0,this._messageWidget.value=new Ewt(this._editor,i,typeof e=="string"?e:this._message.element),this._messageListeners.add(Tr.debounce(this._editor.onDidBlurEditorText,(s,c)=>c,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&Am(D0(),this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(en(this._messageWidget.value.getDomNode(),br.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(en(this._messageWidget.value.getDomNode(),br.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let n;this._messageListeners.add(this._editor.onMouseMove(s=>{s.target.position&&(n?n.containsPosition(s.target.position)||this.closeMessage():n=new nt(i.lineNumber-3,1,s.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(Ewt.fadeOut(this._messageWidget.value))}},I1e=YM,YM.ID="editor.contrib.messageController",YM.MESSAGE_VISIBLE=new rs("messageVisible",!1,W("messageVisible","Whether the editor is currently showing an inline message")),YM);GC=I1e=_Ni([Dwt(1,Ko),Dwt(2,Rb)],GC);const pNi=tm.bindToContribution(GC.get);$r(new pNi({id:"leaveEditorMessage",precondition:GC.MESSAGE_VISIBLE,handler:l=>l.closeMessage(),kbOpts:{weight:130,primary:9}}));let Ewt=class{static fadeOut(e){const i=()=>{e.dispose(),clearTimeout(n),e.getDomNode().removeEventListener("animationend",i)},n=setTimeout(i,110);return e.getDomNode().addEventListener("animationend",i),e.getDomNode().classList.add("fadeOut"),{dispose:i}}constructor(e,{lineNumber:i,column:n},s){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(i,i,0),this._position={lineNumber:i,column:n},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const c=document.createElement("div");c.classList.add("anchor","top"),this._domNode.appendChild(c);const d=document.createElement("div");typeof s=="string"?(d.classList.add("message"),d.textContent=s):(s.classList.add("message"),d.appendChild(s)),this._domNode.appendChild(d);const f=document.createElement("div");f.classList.add("anchor","below"),this._domNode.appendChild(f),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};Cl(GC.ID,GC,4);function T9e(l,e){return e&&(l.stack||l.stacktrace)?W("stackTrace.format","{0}: {1}",Nwt(l),Iwt(l.stack)||Iwt(l.stacktrace)):Nwt(l)}function Iwt(l){return Array.isArray(l)?l.join(`
+`):l}function Nwt(l){return l.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${l.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof l.code=="string"&&typeof l.errno=="number"&&typeof l.syscall=="string"?W("nodeExceptionMessage","A system error occurred ({0})",l.message):l.message||W("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function Gve(l=null,e=!1){if(!l)return W("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(l)){const i=yT(l),n=Gve(i[0],e);return i.length>1?W("error.moreErrors","{0} ({1} errors in total)",n,i.length):n}if(Eb(l))return l;if(l.detail){const i=l.detail;if(i.error)return T9e(i.error,e);if(i.exception)return T9e(i.exception,e)}return l.stack?T9e(l,e):l.message?l.message:W("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var UNt=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},c$=function(l,e){return function(i,n){e(i,n,l)}},Zje,M9;let Yje=(M9=class extends xi{constructor(e,i,n,s,c,d,f,m,v,x){super(),this.typeId=e,this.editor=i,this.showCommand=s,this.range=c,this.edits=d,this.onSelectNewEdit=f,this._contextMenuService=m,this._keybindingService=x,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=n.bindTo(v),this.visibleContext.set(!0),this._register(fo(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(fo(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(w=>{c.containsPosition(w.position)||this.dispose()})),this._register(Tr.runAndSubscribe(x.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var i;const e=(i=this._keybindingService.lookupKeybinding(this.showCommand.id))==null?void 0:i.getLabel();this.button.element.title=this.showCommand.label+(e?` (${e})`:"")}create(){this.domNode=Cr(".post-edit-widget"),this.button=this._register(new eve(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(en(this.domNode,br.CLICK,()=>this.showSelector()))}getId(){return Zje.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=e_(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,i)=>_9({id:"",label:e.title,checked:i===this.edits.activeEditIndex,run:()=>{if(i!==this.edits.activeEditIndex)return this.onSelectNewEdit(i)}}))})}},Zje=M9,M9.baseId="editor.widget.postEditWidget",M9);Yje=Zje=UNt([c$(7,eS),c$(8,Ko),c$(9,pu)],Yje);let Kve=class extends xi{constructor(e,i,n,s,c,d,f){super(),this._id=e,this._editor=i,this._visibleContext=n,this._showCommand=s,this._instantiationService=c,this._bulkEditService=d,this._notificationService=f,this._currentWidget=this._register(new Fm),this._register(Tr.any(i.onDidChangeModel,i.onDidChangeModelContent)(()=>this.clear()))}async applyEditAndShowIfNeeded(e,i,n,s,c){const d=this._editor.getModel();if(!d||!e.length)return;const f=i.allEdits.at(i.activeEditIndex);if(!f)return;const m=async J=>{const Y=this._editor.getModel();Y&&(await Y.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:J,allEdits:i.allEdits},n,s,c))},v=(J,Y)=>{Tk(J)||(this._notificationService.error(Y),n&&this.show(e[0],i,m))};let x;try{x=await s(f,c)}catch(J){return v(J,W("resolveError",`Error resolving edit '{0}':
+{1}`,f.title,Gve(J)))}if(c.isCancellationRequested)return;const w=jNt(d.uri,e,x),I=e[0],P=d.deltaDecorations([],[{range:I,options:{description:"paste-line-suffix",stickiness:0}}]);this._editor.focus();let O,z;try{O=await this._bulkEditService.apply(w,{editor:this._editor,token:c}),z=d.getDecorationRange(P[0])}catch(J){return v(J,W("applyError",`Error applying edit '{0}':
+{1}`,f.title,Gve(J)))}finally{d.deltaDecorations(P,[])}c.isCancellationRequested||n&&O.isApplied&&i.allEdits.length>1&&this.show(z??I,i,m)}show(e,i,n){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(Yje,this._id,this._editor,this._visibleContext,this._showCommand,e,i,n))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;(e=this._currentWidget.value)==null||e.showSelector()}};Kve=UNt([c$(4,ho),c$(5,Sse),c$(6,w_)],Kve);var mNi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},PU=function(l,e){return function(i,n){e(i,n,l)}},AF;const qNt="editor.changePasteType",MGe=new rs("pasteWidgetVisible",!1,W("pasteWidgetVisible","Whether the paste widget is showing")),D9e="application/vnd.code.copyMetadata";var R9;let _6=(R9=class extends xi{static get(e){return e.getContribution(AF.ID)}constructor(e,i,n,s,c,d,f){super(),this._bulkEditService=n,this._clipboardService=s,this._languageFeaturesService=c,this._quickInputService=d,this._progressService=f,this._editor=e;const m=e.getContainerDomNode();this._register(en(m,"copy",v=>this.handleCopy(v))),this._register(en(m,"cut",v=>this.handleCopy(v))),this._register(en(m,"paste",v=>this.handlePaste(v),!0)),this._pasteProgressManager=this._register(new Jve("pasteIntoEditor",e,i)),this._postPasteWidgetManager=this._register(i.createInstance(Kve,"pasteIntoEditor",e,MGe,{id:qNt,label:W("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferred:e},_J().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}clearWidgets(){this._postPasteWidgetManager.clear()}isPasteAsEnabled(){return this._editor.getOption(85).enabled}async finishedPaste(){await this._currentPasteOperation}handleCopy(e){var z,J,Y,ae;if(!this._editor.hasTextFocus()||((J=(z=this._clipboardService).clearInternalState)==null||J.call(z),!e.clipboardData||!this.isPasteAsEnabled()))return;const i=this._editor.getModel(),n=this._editor.getSelections();if(!i||!(n!=null&&n.length))return;const s=this._editor.getOption(37);let c=n;const d=n.length===1&&n[0].isEmpty();if(d){if(!s)return;c=[new nt(c[0].startLineNumber,1,c[0].startLineNumber,1+i.getLineLength(c[0].startLineNumber))]}const f=(Y=this._editor._getViewModel())==null?void 0:Y.getPlainTextToCopy(n,s,I0),v={multicursorText:Array.isArray(f)?f:null,pasteOnNewLine:d,mode:null},x=this._languageFeaturesService.documentPasteEditProvider.ordered(i).filter(me=>!!me.prepareDocumentPaste);if(!x.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:v});return}const w=FNt(e.clipboardData),I=x.flatMap(me=>me.copyMimeTypes??[]),P=qwe();this.setCopyMetadata(e.clipboardData,{id:P,providerCopyMimeTypes:I,defaultPastePayload:v});const O=Om(async me=>{const ye=yT(await Promise.all(x.map(async Ce=>{try{return await Ce.prepareDocumentPaste(i,c,w,me)}catch(Fe){console.error(Fe);return}})));ye.reverse();for(const Ce of ye)for(const[Fe,rt]of Ce)w.replace(Fe,rt);return w});(ae=AF._currentCopyOperation)==null||ae.dataTransferPromise.cancel(),AF._currentCopyOperation={handle:P,dataTransferPromise:O}}async handlePaste(e){var m,v,x;if(!e.clipboardData||!this._editor.hasTextFocus())return;(m=GC.get(this._editor))==null||m.closeMessage(),(v=this._currentPasteOperation)==null||v.cancel(),this._currentPasteOperation=void 0;const i=this._editor.getModel(),n=this._editor.getSelections();if(!(n!=null&&n.length)||!i||this._editor.getOption(92)||!this.isPasteAsEnabled()&&!this._pasteAsActionContext)return;const s=this.fetchCopyMetadata(e),c=BNt(e.clipboardData);c.delete(D9e);const d=[...e.clipboardData.types,...(s==null?void 0:s.providerCopyMimeTypes)??[],Yh.uriList],f=this._languageFeaturesService.documentPasteEditProvider.ordered(i).filter(w=>{var P,O;const I=(P=this._pasteAsActionContext)==null?void 0:P.preferred;return I&&w.providedPasteEditKinds&&!this.providerMatchesPreference(w,I)?!1:(O=w.pasteMimeTypes)==null?void 0:O.some(z=>MNt(z,d))});if(!f.length){(x=this._pasteAsActionContext)!=null&&x.preferred&&this.showPasteAsNoEditMessage(n,this._pasteAsActionContext.preferred);return}e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferred,f,n,c,s):this.doPasteInline(f,n,c,s,e)}showPasteAsNoEditMessage(e,i){var n;(n=GC.get(this._editor))==null||n.showMessage(W("pasteAsError","No paste edits for '{0}' found",i instanceof Nf?i.value:i.providerId),e[0].getStartPosition())}doPasteInline(e,i,n,s,c){const d=this._editor;if(!d.hasModel())return;const f=new LR(d,3,void 0),m=Om(async v=>{const x=this._editor;if(!x.hasModel())return;const w=x.getModel(),I=new wn,P=I.add(new ih(v));I.add(f.token.onCancellationRequested(()=>P.cancel()));const O=P.token;try{if(await this.mergeInDataFromCopy(n,s,O),O.isCancellationRequested)return;const z=e.filter(ae=>this.isSupportedPasteProvider(ae,n));if(!z.length||z.length===1&&z[0]instanceof BB)return this.applyDefaultPasteHandler(n,s,O,c);const J={triggerKind:One.Automatic},Y=await this.getPasteEdits(z,n,w,i,J,O);if(I.add(Y),O.isCancellationRequested)return;if(Y.edits.length===1&&Y.edits[0].provider instanceof BB)return this.applyDefaultPasteHandler(n,s,O,c);if(Y.edits.length){const ae=x.getOption(85).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(i,{activeEditIndex:0,allEdits:Y.edits},ae,(me,ye)=>new Promise((Ce,Fe)=>{(async()=>{var rt,ct;try{const Mt=(ct=(rt=me.provider).resolveDocumentPasteEdit)==null?void 0:ct.call(rt,me,ye),Yt=new hJ,Bi=Mt&&await this._pasteProgressManager.showWhile(i[0].getEndPosition(),W("resolveProcess","Resolving paste edit. Click to cancel"),Promise.race([Yt.p,Mt]),{cancel:()=>(Yt.cancel(),Fe(new vT))},0);return Bi&&(me.additionalEdit=Bi.additionalEdit),Ce(me)}catch(Mt){return Fe(Mt)}})()}),O)}await this.applyDefaultPasteHandler(n,s,O,c)}finally{I.dispose(),this._currentPasteOperation===m&&(this._currentPasteOperation=void 0)}});this._pasteProgressManager.showWhile(i[0].getEndPosition(),W("pasteIntoEditorProgress","Running paste handlers. Click to cancel and do basic paste"),m,{cancel:async()=>{try{if(m.cancel(),f.token.isCancellationRequested)return;await this.applyDefaultPasteHandler(n,s,f.token,c)}finally{f.dispose()}}}).then(()=>{f.dispose()}),this._currentPasteOperation=m}showPasteAsPick(e,i,n,s,c){const d=Om(async f=>{const m=this._editor;if(!m.hasModel())return;const v=m.getModel(),x=new wn,w=x.add(new LR(m,3,void 0,f));try{if(await this.mergeInDataFromCopy(s,c,w.token),w.token.isCancellationRequested)return;let I=i.filter(Y=>this.isSupportedPasteProvider(Y,s,e));e&&(I=I.filter(Y=>this.providerMatchesPreference(Y,e)));const P={triggerKind:One.PasteAs,only:e&&e instanceof Nf?e:void 0};let O=x.add(await this.getPasteEdits(I,s,v,n,P,w.token));if(w.token.isCancellationRequested)return;if(e&&(O={edits:O.edits.filter(Y=>e instanceof Nf?e.contains(Y.kind):e.providerId===Y.provider.id),dispose:O.dispose}),!O.edits.length){P.only&&this.showPasteAsNoEditMessage(n,P.only);return}let z;if(e)z=O.edits.at(0);else{const Y=await this._quickInputService.pick(O.edits.map(ae=>{var me;return{label:ae.title,description:(me=ae.kind)==null?void 0:me.value,edit:ae}}),{placeHolder:W("pasteAsPickerPlaceholder","Select Paste Action")});z=Y==null?void 0:Y.edit}if(!z)return;const J=jNt(v.uri,n,z);await this._bulkEditService.apply(J,{editor:this._editor})}finally{x.dispose(),this._currentPasteOperation===d&&(this._currentPasteOperation=void 0)}});this._progressService.withProgress({location:10,title:W("pasteAsProgress","Running paste handlers")},()=>d)}setCopyMetadata(e,i){e.setData(D9e,JSON.stringify(i))}fetchCopyMetadata(e){if(!e.clipboardData)return;const i=e.clipboardData.getData(D9e);if(i)try{return JSON.parse(i)}catch{return}const[n,s]=oje.getTextData(e.clipboardData);if(s)return{defaultPastePayload:{mode:s.mode,multicursorText:s.multicursorText??null,pasteOnNewLine:!!s.isFromEmptySelection}}}async mergeInDataFromCopy(e,i,n){var s;if(i!=null&&i.id&&((s=AF._currentCopyOperation)==null?void 0:s.handle)===i.id){const c=await AF._currentCopyOperation.dataTransferPromise;if(n.isCancellationRequested)return;for(const[d,f]of c)e.replace(d,f)}if(!e.has(Yh.uriList)){const c=await this._clipboardService.readResources();if(n.isCancellationRequested)return;c.length&&e.append(Yh.uriList,LGe($we.create(c)))}}async getPasteEdits(e,i,n,s,c,d){const f=new wn,m=await _se(Promise.all(e.map(async x=>{var w,I;try{const P=await((w=x.provideDocumentPasteEdits)==null?void 0:w.call(x,n,s,i,c,d));return P&&f.add(P),(I=P==null?void 0:P.edits)==null?void 0:I.map(O=>({...O,provider:x}))}catch(P){Tk(P)||console.error(P);return}})),d),v=yT(m??[]).flat().filter(x=>!c.only||c.only.contains(x.kind));return{edits:zNt(v),dispose:()=>f.dispose()}}async applyDefaultPasteHandler(e,i,n,s){const c=e.get(Yh.text)??e.get("text"),d=await(c==null?void 0:c.asString())??"";if(n.isCancellationRequested)return;const f={clipboardEvent:s,text:d,pasteOnNewLine:(i==null?void 0:i.defaultPastePayload.pasteOnNewLine)??!1,multicursorText:(i==null?void 0:i.defaultPastePayload.multicursorText)??null,mode:null};this._editor.trigger("keyboard","paste",f)}isSupportedPasteProvider(e,i,n){var s;return(s=e.pasteMimeTypes)!=null&&s.some(c=>i.matches(c))?!n||this.providerMatchesPreference(e,n):!1}providerMatchesPreference(e,i){return i instanceof Nf?e.providedPasteEditKinds?e.providedPasteEditKinds.some(n=>i.contains(n)):!0:e.id===i.providerId}},AF=R9,R9.ID="editor.contrib.copyPasteActionController",R9);_6=AF=mNi([PU(1,ho),PU(2,Sse),PU(3,w6),PU(4,Ts),PU(5,Ek),PU(6,_Dt)],_6);const VB="9_cutcopypaste",gNi=PE||document.queryCommandSupported("cut"),$Nt=PE||document.queryCommandSupported("copy"),yNi=typeof navigator.clipboard>"u"||bk?document.queryCommandSupported("paste"):!0;function RGe(l){return l.register(),l}const vNi=gNi?RGe(new mJ({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:PE?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:As.MenubarEditMenu,group:"2_ccp",title:W({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:As.EditorContext,group:VB,title:W("actions.clipboard.cutLabel","Cut"),when:Tt.writable,order:1},{menuId:As.CommandPalette,group:"",title:W("actions.clipboard.cutLabel","Cut"),order:1},{menuId:As.SimpleEditorContext,group:VB,title:W("actions.clipboard.cutLabel","Cut"),when:Tt.writable,order:1}]})):void 0,bNi=$Nt?RGe(new mJ({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:PE?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:As.MenubarEditMenu,group:"2_ccp",title:W({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:As.EditorContext,group:VB,title:W("actions.clipboard.copyLabel","Copy"),order:2},{menuId:As.CommandPalette,group:"",title:W("actions.clipboard.copyLabel","Copy"),order:1},{menuId:As.SimpleEditorContext,group:VB,title:W("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;yg.appendMenuItem(As.MenubarEditMenu,{submenu:As.MenubarCopy,title:aa("copy as","Copy As"),group:"2_ccp",order:3});yg.appendMenuItem(As.EditorContext,{submenu:As.EditorContextCopy,title:aa("copy as","Copy As"),group:VB,order:3});yg.appendMenuItem(As.EditorContext,{submenu:As.EditorContextShare,title:aa("share","Share"),group:"11_share",order:-1,when:kn.and(kn.notEquals("resourceScheme","output"),Tt.editorTextFocus)});yg.appendMenuItem(As.ExplorerContext,{submenu:As.ExplorerContextShare,title:aa("share","Share"),group:"11_share",order:-1});const E9e=yNi?RGe(new mJ({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:PE?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:As.MenubarEditMenu,group:"2_ccp",title:W({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:As.EditorContext,group:VB,title:W("actions.clipboard.pasteLabel","Paste"),when:Tt.writable,order:4},{menuId:As.CommandPalette,group:"",title:W("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:As.SimpleEditorContext,group:VB,title:W("actions.clipboard.pasteLabel","Paste"),when:Tt.writable,order:4}]})):void 0;class CNi extends hs{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:W("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:Tt.textInputFocus,primary:0,weight:100}})}run(e,i){!i.hasModel()||!i.getOption(37)&&i.getSelection().isEmpty()||(rje.forceCopyWithSyntaxHighlighting=!0,i.focus(),i.getContainerDomNode().ownerDocument.execCommand("copy"),rje.forceCopyWithSyntaxHighlighting=!1)}}function JNt(l,e){l&&(l.addImplementation(1e4,"code-editor",(i,n)=>{const s=i.get(Bl).getFocusedCodeEditor();if(s&&s.hasTextFocus()){const c=s.getOption(37),d=s.getSelection();return d&&d.isEmpty()&&!c||s.getContainerDomNode().ownerDocument.execCommand(e),!0}return!1}),l.addImplementation(0,"generic-dom",(i,n)=>(_J().execCommand(e),!0)))}JNt(vNi,"cut");JNt(bNi,"copy");E9e&&(E9e.addImplementation(1e4,"code-editor",(l,e)=>{var c;const i=l.get(Bl),n=l.get(w6),s=i.getFocusedCodeEditor();return s&&s.hasTextFocus()?s.getContainerDomNode().ownerDocument.execCommand("paste")?((c=_6.get(s))==null?void 0:c.finishedPaste())??Promise.resolve():XB?(async()=>{const f=await n.readText();if(f!==""){const m=wre.INSTANCE.get(f);let v=!1,x=null,w=null;m&&(v=s.getOption(37)&&!!m.isFromEmptySelection,x=typeof m.multicursorText<"u"?m.multicursorText:null,w=m.mode),s.trigger("keyboard","paste",{text:f,pasteOnNewLine:v,multicursorText:x,mode:w})}})():!0:!1}),E9e.addImplementation(0,"generic-dom",(l,e)=>(_J().execCommand("paste"),!0)));$Nt&&sr(CNi);const gf=new class{constructor(){this.QuickFix=new Nf("quickfix"),this.Refactor=new Nf("refactor"),this.RefactorExtract=this.Refactor.append("extract"),this.RefactorInline=this.Refactor.append("inline"),this.RefactorMove=this.Refactor.append("move"),this.RefactorRewrite=this.Refactor.append("rewrite"),this.Notebook=new Nf("notebook"),this.Source=new Nf("source"),this.SourceOrganizeImports=this.Source.append("organizeImports"),this.SourceFixAll=this.Source.append("fixAll"),this.SurroundWith=this.Refactor.append("surround")}};var YC;(function(l){l.Refactor="refactor",l.RefactorPreview="refactor preview",l.Lightbulb="lightbulb",l.Default="other (default)",l.SourceAction="source action",l.QuickFix="quick fix action",l.FixAll="fix all",l.OrganizeImports="organize imports",l.AutoFix="auto fix",l.QuickFixHover="quick fix hover window",l.OnSave="save participants",l.ProblemsView="problems view"})(YC||(YC={}));function SNi(l,e){return!(l.include&&!l.include.intersects(e)||l.excludes&&l.excludes.some(i=>GNt(e,i,l.include))||!l.includeSourceActions&&gf.Source.contains(e))}function wNi(l,e){const i=e.kind?new Nf(e.kind):void 0;return!(l.include&&(!i||!l.include.contains(i))||l.excludes&&i&&l.excludes.some(n=>GNt(i,n,l.include))||!l.includeSourceActions&&i&&gf.Source.contains(i)||l.onlyIncludePreferredActions&&!e.isPreferred)}function GNt(l,e,i){return!(!e.contains(l)||i&&e.contains(i))}class yL{static fromUser(e,i){return!e||typeof e!="object"?new yL(i.kind,i.apply,!1):new yL(yL.getKindFromUser(e,i.kind),yL.getApplyFromUser(e,i.apply),yL.getPreferredUser(e))}static getApplyFromUser(e,i){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return i}}static getKindFromUser(e,i){return typeof e.kind=="string"?new Nf(e.kind):i}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,i,n){this.kind=e,this.apply=i,this.preferred=n}}class xNi{constructor(e,i,n){this.action=e,this.provider=i,this.highlightRange=n}async resolve(e){var i;if((i=this.provider)!=null&&i.resolveCodeAction&&!this.action.edit){let n;try{n=await this.provider.resolveCodeAction(this.action,e)}catch(s){t_(s)}n&&(this.action.edit=n.edit)}return this}}const KNt="editor.action.codeAction",FGe="editor.action.quickFix",XNt="editor.action.autoFix",QNt="editor.action.refactor",ZNt="editor.action.sourceAction",eze="editor.action.organizeImports",tze="editor.action.fixAll";class Zie extends xi{static codeActionsPreferredComparator(e,i){return e.isPreferred&&!i.isPreferred?-1:!e.isPreferred&&i.isPreferred?1:0}static codeActionsComparator({action:e},{action:i}){return e.isAI&&!i.isAI?1:!e.isAI&&i.isAI?-1:ky(e.diagnostics)?ky(i.diagnostics)?Zie.codeActionsPreferredComparator(e,i):-1:ky(i.diagnostics)?1:Zie.codeActionsPreferredComparator(e,i)}constructor(e,i,n){super(),this.documentation=i,this._register(n),this.allActions=[...e].sort(Zie.codeActionsComparator),this.validActions=this.allActions.filter(({action:s})=>!s.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&gf.QuickFix.contains(new Nf(e.kind))&&!!e.isPreferred)}get hasAIFix(){return this.validActions.some(({action:e})=>!!e.isAI)}get allAIFixes(){return this.validActions.every(({action:e})=>!!e.isAI)}}const Lwt={actions:[],documentation:void 0};async function mq(l,e,i,n,s,c){var z;const d=n.filter||{},f={...d,excludes:[...d.excludes||[],gf.Notebook]},m={only:(z=d.include)==null?void 0:z.value,trigger:n.type},v=new kGe(e,c),x=n.type===2,w=kNi(l,e,x?f:d),I=new wn,P=w.map(async J=>{try{s.report(J);const Y=await J.provideCodeActions(e,i,m,v.token);if(Y&&I.add(Y),v.token.isCancellationRequested)return Lwt;const ae=((Y==null?void 0:Y.actions)||[]).filter(ye=>ye&&wNi(d,ye)),me=DNi(J,ae,d.include);return{actions:ae.map(ye=>new xNi(ye,J)),documentation:me}}catch(Y){if(Tk(Y))throw Y;return t_(Y),Lwt}}),O=l.onDidChange(()=>{const J=l.all(e);Lf(J,w)||v.cancel()});try{const J=await Promise.all(P),Y=J.map(me=>me.actions).flat(),ae=[...yT(J.map(me=>me.documentation)),...TNi(l,e,n,Y)];return new Zie(Y,ae,I)}finally{O.dispose(),v.dispose()}}function kNi(l,e,i){return l.all(e).filter(n=>n.providedCodeActionKinds?n.providedCodeActionKinds.some(s=>SNi(i,new Nf(s))):!0)}function*TNi(l,e,i,n){var s,c,d;if(e&&n.length)for(const f of l.all(e))f._getAdditionalMenuItems&&(yield*(d=f._getAdditionalMenuItems)==null?void 0:d.call(f,{trigger:i.type,only:(c=(s=i.filter)==null?void 0:s.include)==null?void 0:c.value},n.map(m=>m.action)))}function DNi(l,e,i){if(!l.documentation)return;const n=l.documentation.map(s=>({kind:new Nf(s.kind),command:s.command}));if(i){let s;for(const c of n)c.kind.contains(i)&&(s?s.kind.contains(c.kind)&&(s=c):s=c);if(s)return s==null?void 0:s.command}for(const s of e)if(s.kind){for(const c of n)if(c.kind.contains(new Nf(s.kind)))return c.command}}var l9;(function(l){l.OnSave="onSave",l.FromProblemsView="fromProblemsView",l.FromCodeActions="fromCodeActions",l.FromAILightbulb="fromAILightbulb"})(l9||(l9={}));async function ENi(l,e,i,n,s=cc.None){var v;const c=l.get(Sse),d=l.get(qd),f=l.get(b1),m=l.get(w_);if(f.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:i}),await e.resolve(s),!s.isCancellationRequested&&!((v=e.action.edit)!=null&&v.edits.length&&!(await c.apply(e.action.edit,{editor:n==null?void 0:n.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:i!==l9.OnSave,showPreview:n==null?void 0:n.preview})).isApplied)&&e.action.command)try{await d.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(x){const w=INi(x);m.error(typeof w=="string"?w:W("applyCodeActionFailed","An unknown error occurred while applying the code action"))}}function INi(l){return typeof l=="string"?l:l instanceof Error&&typeof l.message=="string"?l.message:void 0}fl.registerCommand("_executeCodeActionProvider",async function(l,e,i,n,s){if(!(e instanceof yo))throw gk();const{codeActionProvider:c}=l.get(Ts),d=l.get(rf).getModel(e);if(!d)throw gk();const f=Us.isISelection(i)?Us.liftSelection(i):nt.isIRange(i)?d.validateRange(i):void 0;if(!f)throw gk();const m=typeof n=="string"?new Nf(n):void 0,v=await mq(c,d,f,{type:1,triggerAction:YC.Default,filter:{includeSourceActions:!0,include:m}},NE.None,cc.None),x=[],w=Math.min(v.validActions.length,typeof s=="number"?s:0);for(let I=0;I<w;I++)x.push(v.validActions[I].resolve(cc.None));try{return await Promise.all(x),v.validActions.map(I=>I.action)}finally{setTimeout(()=>v.dispose(),100)}});var NNi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},LNi=function(l,e){return function(i,n){e(i,n,l)}},ize,F9;let nze=(F9=class{constructor(e){this.keybindingService=e}getResolver(){const e=new HE(()=>this.keybindingService.getKeybindings().filter(i=>ize.codeActionCommands.indexOf(i.command)>=0).filter(i=>i.resolvedKeybinding).map(i=>{let n=i.commandArgs;return i.command===eze?n={kind:gf.SourceOrganizeImports.value}:i.command===tze&&(n={kind:gf.SourceFixAll.value}),{resolvedKeybinding:i.resolvedKeybinding,...yL.fromUser(n,{kind:Nf.None,apply:"never"})}}));return i=>{if(i.kind){const n=this.bestKeybindingForCodeAction(i,e.value);return n==null?void 0:n.resolvedKeybinding}}}bestKeybindingForCodeAction(e,i){if(!e.kind)return;const n=new Nf(e.kind);return i.filter(s=>s.kind.contains(n)).filter(s=>s.preferred?e.isPreferred:!0).reduceRight((s,c)=>s?s.kind.contains(c.kind)?c:s:c,void 0)}},ize=F9,F9.codeActionCommands=[QNt,KNt,ZNt,eze,tze],F9);nze=ize=NNi([LNi(0,pu)],nze);It("symbolIcon.arrayForeground",kc,W("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.booleanForeground",kc,W("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},W("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.colorForeground",kc,W("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.constantForeground",kc,W("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},W("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},W("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},W("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},W("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},W("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.fileForeground",kc,W("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.folderForeground",kc,W("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},W("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},W("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.keyForeground",kc,W("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.keywordForeground",kc,W("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},W("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.moduleForeground",kc,W("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.namespaceForeground",kc,W("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.nullForeground",kc,W("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.numberForeground",kc,W("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.objectForeground",kc,W("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.operatorForeground",kc,W("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.packageForeground",kc,W("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.propertyForeground",kc,W("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.referenceForeground",kc,W("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.snippetForeground",kc,W("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.stringForeground",kc,W("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.structForeground",kc,W("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.textForeground",kc,W("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.typeParameterForeground",kc,W("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.unitForeground",kc,W("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));It("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},W("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));const YNt=Object.freeze({kind:Nf.Empty,title:W("codeAction.widget.id.more","More Actions...")}),PNi=Object.freeze([{kind:gf.QuickFix,title:W("codeAction.widget.id.quickfix","Quick Fix")},{kind:gf.RefactorExtract,title:W("codeAction.widget.id.extract","Extract"),icon:pr.wrench},{kind:gf.RefactorInline,title:W("codeAction.widget.id.inline","Inline"),icon:pr.wrench},{kind:gf.RefactorRewrite,title:W("codeAction.widget.id.convert","Rewrite"),icon:pr.wrench},{kind:gf.RefactorMove,title:W("codeAction.widget.id.move","Move"),icon:pr.wrench},{kind:gf.SurroundWith,title:W("codeAction.widget.id.surround","Surround With"),icon:pr.surroundWith},{kind:gf.Source,title:W("codeAction.widget.id.source","Source Action"),icon:pr.symbolFile},YNt]);function ANi(l,e,i){if(!e)return l.map(c=>{var d;return{kind:"action",item:c,group:YNt,disabled:!!c.action.disabled,label:c.action.disabled||c.action.title,canPreview:!!((d=c.action.edit)!=null&&d.edits.length)}});const n=PNi.map(c=>({group:c,actions:[]}));for(const c of l){const d=c.action.kind?new Nf(c.action.kind):Nf.None;for(const f of n)if(f.group.kind.contains(d)){f.actions.push(c);break}}const s=[];for(const c of n)if(c.actions.length){s.push({kind:"header",group:c.group});for(const d of c.actions){const f=c.group;s.push({kind:"action",item:d,group:d.action.isAI?{title:f.title,kind:f.kind,icon:pr.sparkle}:f,label:d.action.title,disabled:!!d.action.disabled,keybinding:i(d.action)})}}return s}var ONi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},MNi=function(l,e){return function(i,n){e(i,n,l)}},$U;const Pwt=sf("gutter-lightbulb",pr.lightBulb,W("gutterLightbulbWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor.")),Awt=sf("gutter-lightbulb-auto-fix",pr.lightbulbAutofix,W("gutterLightbulbAutoFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and a quick fix is available.")),Owt=sf("gutter-lightbulb-sparkle",pr.lightbulbSparkle,W("gutterLightbulbAIFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix is available.")),Mwt=sf("gutter-lightbulb-aifix-auto-fix",pr.lightbulbSparkleAutofix,W("gutterLightbulbAIFixAutoFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available.")),Rwt=sf("gutter-lightbulb-sparkle-filled",pr.sparkleFilled,W("gutterLightbulbSparkleFilledWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available."));var pE;(function(l){l.Hidden={type:0};class e{constructor(n,s,c,d){this.actions=n,this.trigger=s,this.editorPosition=c,this.widgetPosition=d,this.type=1}}l.Showing=e})(pE||(pE={}));var K4;let Fre=(K4=class extends xi{constructor(e,i){super(),this._editor=e,this._keybindingService=i,this._onClick=this._register(new gi),this.onClick=this._onClick.event,this._state=pE.Hidden,this._gutterState=pE.Hidden,this._iconClasses=[],this.lightbulbClasses=["codicon-"+Pwt.id,"codicon-"+Mwt.id,"codicon-"+Awt.id,"codicon-"+Owt.id,"codicon-"+Rwt.id],this.gutterDecoration=$U.GUTTER_DECORATION,this._domNode=Cr("div.lightBulbWidget"),this._domNode.role="listbox",this._register(y1.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(n=>{const s=this._editor.getModel();(this.state.type!==1||!s||this.state.editorPosition.lineNumber>=s.getLineCount())&&this.hide(),(this.gutterState.type!==1||!s||this.gutterState.editorPosition.lineNumber>=s.getLineCount())&&this.gutterHide()})),this._register(tdi(this._domNode,n=>{if(this.state.type!==1)return;this._editor.focus(),n.preventDefault();const{top:s,height:c}=e_(this._domNode),d=this._editor.getOption(67);let f=Math.floor(d/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(f+=d),this._onClick.fire({x:n.posx,y:s+c+f,actions:this.state.actions,trigger:this.state.trigger})})),this._register(en(this._domNode,"mouseenter",n=>{(n.buttons&1)===1&&this.hide()})),this._register(Tr.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,()=>{var n,s;this._preferredKbLabel=((n=this._keybindingService.lookupKeybinding(XNt))==null?void 0:n.getLabel())??void 0,this._quickFixKbLabel=((s=this._keybindingService.lookupKeybinding(FGe))==null?void 0:s.getLabel())??void 0,this._updateLightBulbTitleAndIcon()})),this._register(this._editor.onMouseDown(async n=>{if(!n.target.element||!this.lightbulbClasses.some(m=>n.target.element&&n.target.element.classList.contains(m))||this.gutterState.type!==1)return;this._editor.focus();const{top:s,height:c}=e_(n.target.element),d=this._editor.getOption(67);let f=Math.floor(d/3);this.gutterState.widgetPosition.position!==null&&this.gutterState.widgetPosition.position.lineNumber<this.gutterState.editorPosition.lineNumber&&(f+=d),this._onClick.fire({x:n.event.posx,y:s+c+f,actions:this.gutterState.actions,trigger:this.gutterState.trigger})}))}dispose(){super.dispose(),this._editor.removeContentWidget(this),this._gutterDecorationID&&this._removeGutterDecoration(this._gutterDecorationID)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,i,n){if(e.validActions.length<=0)return this.gutterHide(),this.hide();if(!this._editor.hasTextFocus())return this.gutterHide(),this.hide();if(!this._editor.getOptions().get(65).enabled)return this.gutterHide(),this.hide();const d=this._editor.getModel();if(!d)return this.gutterHide(),this.hide();const{lineNumber:f,column:m}=d.validatePosition(n),v=d.getOptions().tabSize,x=this._editor.getOptions().get(50),w=d.getLineContent(f),I=Cwe(w,v),P=x.spaceWidth*I>22,O=Ce=>Ce>2&&this._editor.getTopForLineNumber(Ce)===this._editor.getTopForLineNumber(Ce-1),z=this._editor.getLineDecorations(f);let J=!1;if(z)for(const Ce of z){const Fe=Ce.options.glyphMarginClassName;if(Fe&&!this.lightbulbClasses.some(rt=>Fe.includes(rt))){J=!0;break}}let Y=f,ae=1;if(!P){const Ce=Fe=>{const rt=d.getLineContent(Fe);return/^\s*$|^\s+/.test(rt)||rt.length<=ae};if(f>1&&!O(f-1)){const Fe=d.getLineCount(),rt=f===Fe,ct=f>1&&Ce(f-1),Mt=!rt&&Ce(f+1),Yt=Ce(f),Bi=!Mt&&!ct;if(!Mt&&!ct&&!J)return this.gutterState=new pE.Showing(e,i,n,{position:{lineNumber:Y,column:ae},preference:$U._posPref}),this.renderGutterLightbub(),this.hide();ct||rt||ct&&!Yt?Y-=1:(Mt||Bi&&Yt)&&(Y+=1)}else if(f===1&&(f===d.getLineCount()||!Ce(f+1)&&!Ce(f)))if(this.gutterState=new pE.Showing(e,i,n,{position:{lineNumber:Y,column:ae},preference:$U._posPref}),J)this.gutterHide();else return this.renderGutterLightbub(),this.hide();else if(f<d.getLineCount()&&!O(f+1))Y+=1;else if(m*x.spaceWidth<22)return this.hide();ae=/^\S\s*$/.test(d.getLineContent(Y))?2:1}this.state=new pE.Showing(e,i,n,{position:{lineNumber:Y,column:ae},preference:$U._posPref}),this._gutterDecorationID&&(this._removeGutterDecoration(this._gutterDecorationID),this.gutterHide());const me=e.validActions,ye=e.validActions[0].action.kind;if(me.length!==1||!ye){this._editor.layoutContentWidget(this);return}this._editor.layoutContentWidget(this)}hide(){this.state!==pE.Hidden&&(this.state=pE.Hidden,this._editor.layoutContentWidget(this))}gutterHide(){this.gutterState!==pE.Hidden&&(this._gutterDecorationID&&this._removeGutterDecoration(this._gutterDecorationID),this.gutterState=pE.Hidden)}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}get gutterState(){return this._gutterState}set gutterState(e){this._gutterState=e,this._updateGutterLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this._domNode.classList.remove(...this._iconClasses),this._iconClasses=[],this.state.type!==1)return;let e,i=!1;this.state.actions.allAIFixes?(e=pr.sparkleFilled,this.state.actions.validActions.length===1&&(i=!0)):this.state.actions.hasAutoFix?this.state.actions.hasAIFix?e=pr.lightbulbSparkleAutofix:e=pr.lightbulbAutofix:this.state.actions.hasAIFix?e=pr.lightbulbSparkle:e=pr.lightBulb,this._updateLightbulbTitle(this.state.actions.hasAutoFix,i),this._iconClasses=zo.asClassNameArray(e),this._domNode.classList.add(...this._iconClasses)}_updateGutterLightBulbTitleAndIcon(){if(this.gutterState.type!==1)return;let e,i=!1;this.gutterState.actions.allAIFixes?(e=Rwt,this.gutterState.actions.validActions.length===1&&(i=!0)):this.gutterState.actions.hasAutoFix?this.gutterState.actions.hasAIFix?e=Mwt:e=Awt:this.gutterState.actions.hasAIFix?e=Owt:e=Pwt,this._updateLightbulbTitle(this.gutterState.actions.hasAutoFix,i);const n=qa.register({description:"codicon-gutter-lightbulb-decoration",glyphMarginClassName:zo.asClassName(e),glyphMargin:{position:CT.Left},stickiness:1});this.gutterDecoration=n}renderGutterLightbub(){const e=this._editor.getSelection();e&&(this._gutterDecorationID===void 0?this._addGutterDecoration(e.startLineNumber):this._updateGutterDecoration(this._gutterDecorationID,e.startLineNumber))}_addGutterDecoration(e){this._editor.changeDecorations(i=>{this._gutterDecorationID=i.addDecoration(new nt(e,0,e,0),this.gutterDecoration)})}_removeGutterDecoration(e){this._editor.changeDecorations(i=>{i.removeDecoration(e),this._gutterDecorationID=void 0})}_updateGutterDecoration(e,i){this._editor.changeDecorations(n=>{n.changeDecoration(e,new nt(i,0,i,0)),n.changeDecorationOptions(e,this.gutterDecoration)})}_updateLightbulbTitle(e,i){this.state.type===1&&(i?this.title=W("codeActionAutoRun","Run: {0}",this.state.actions.validActions[0].action.title):e&&this._preferredKbLabel?this.title=W("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel):!e&&this._quickFixKbLabel?this.title=W("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):e||(this.title=W("codeAction","Show Code Actions")))}set title(e){this._domNode.title=e}},$U=K4,K4.GUTTER_DECORATION=qa.register({description:"codicon-gutter-lightbulb-decoration",glyphMarginClassName:zo.asClassName(pr.lightBulb),glyphMargin:{position:CT.Left},stickiness:1}),K4.ID="editor.contrib.lightbulbWidget",K4._posPref=[0],K4);Fre=$U=ONi([MNi(1,pu)],Fre);var eLt=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},rze=function(l,e){return function(i,n){e(i,n,l)}};const tLt="acceptSelectedCodeAction",iLt="previewSelectedCodeAction";class RNi{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const i=document.createElement("span");return e.append(i),{container:e,text:i}}renderElement(e,i,n){var s;n.text.textContent=((s=e.group)==null?void 0:s.title)??""}disposeTemplate(e){}}let sze=class{get templateId(){return"action"}constructor(e,i){this._supportsPreview=e,this._keybindingService=i}renderTemplate(e){e.classList.add(this.templateId);const i=document.createElement("div");i.className="icon",e.append(i);const n=document.createElement("span");n.className="title",e.append(n);const s=new EJ(e,UC);return{container:e,icon:i,text:n,keybinding:s}}renderElement(e,i,n){var d,f,m;if((d=e.group)!=null&&d.icon?(n.icon.className=zo.asClassName(e.group.icon),e.group.icon.color&&(n.icon.style.color=cs(e.group.icon.color.id))):(n.icon.className=zo.asClassName(pr.lightBulb),n.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;n.text.textContent=nLt(e.label),n.keybinding.set(e.keybinding),mdi(!!e.keybinding,n.keybinding.element);const s=(f=this._keybindingService.lookupKeybinding(tLt))==null?void 0:f.getLabel(),c=(m=this._keybindingService.lookupKeybinding(iLt))==null?void 0:m.getLabel();n.container.classList.toggle("option-disabled",e.disabled),e.disabled?n.container.title=e.label:s&&c?this._supportsPreview&&e.canPreview?n.container.title=W({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to Apply, Shift+F2 to Preview"']},"{0} to Apply, {1} to Preview",s,c):n.container.title=W({key:"label",comment:['placeholder is a keybinding, e.g "F2 to Apply"']},"{0} to Apply",s):n.container.title=""}disposeTemplate(e){e.keybinding.dispose()}};sze=eLt([rze(1,pu)],sze);class FNi extends UIEvent{constructor(){super("acceptSelectedAction")}}class Fwt extends UIEvent{constructor(){super("previewSelectedAction")}}function BNi(l){if(l.kind==="action")return l.label}let oze=class extends xi{constructor(e,i,n,s,c,d){super(),this._delegate=s,this._contextViewService=c,this._keybindingService=d,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new ih),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const f={getHeight:m=>m.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:m=>m.kind};this._list=this._register(new Ow(e,this.domNode,f,[new sze(i,this._keybindingService),new RNi],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:BNi},accessibilityProvider:{getAriaLabel:m=>{if(m.kind==="action"){let v=m.label?nLt(m==null?void 0:m.label):"";return m.disabled&&(v=W({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",v,m.disabled)),v}return null},getWidgetAriaLabel:()=>W({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:m=>m.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(tW),this._register(this._list.onMouseClick(m=>this.onListClick(m))),this._register(this._list.onMouseOver(m=>this.onListHover(m))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(m=>this.onListSelection(m))),this._allMenuItems=n,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const i=this._allMenuItems.filter(m=>m.kind==="header").length,s=this._allMenuItems.length*this._actionLineHeight+i*this._headerLineHeight-i*this._actionLineHeight;this._list.layout(s);let c=e;if(this._allMenuItems.length>=50)c=380;else{const m=this._allMenuItems.map((v,x)=>{const w=this.domNode.ownerDocument.getElementById(this._list.getElementID(x));if(w){w.style.width="auto";const I=w.getBoundingClientRect().width;return w.style.width="",I}return 0});c=Math.max(...m,e)}const f=Math.min(s,this.domNode.ownerDocument.body.clientHeight*.7);return this._list.layout(f,c),this.domNode.style.height=`${f}px`,this._list.domFocus(),c}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const i=this._list.getFocus();if(i.length===0)return;const n=i[0],s=this._list.element(n);if(!this.focusCondition(s))return;const c=e?new Fwt:new FNi;this._list.setSelection([n],c)}onListSelection(e){if(!e.elements.length)return;const i=e.elements[0];i.item&&this.focusCondition(i)?this._delegate.onSelect(i.item,e.browserEvent instanceof Fwt):this._list.setSelection([])}onFocus(){var s,c;const e=this._list.getFocus();if(e.length===0)return;const i=e[0],n=this._list.element(i);(c=(s=this._delegate).onFocus)==null||c.call(s,n.item)}async onListHover(e){const i=e.element;if(i&&i.item&&this.focusCondition(i)){if(this._delegate.onHover&&!i.disabled&&i.kind==="action"){const n=await this._delegate.onHover(i.item,this.cts.token);i.canPreview=n?n.canPreview:void 0}e.index&&this._list.splice(e.index,1,[i])}this._list.setFocus(typeof e.index=="number"?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};oze=eLt([rze(4,b6),rze(5,pu)],oze);function nLt(l){return l.replace(/\r\n|\r|\n/g," ")}var WNi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},I9e=function(l,e){return function(i,n){e(i,n,l)}};It("actionBar.toggledBackground",yse,W("actionBar.toggledBackground","Background color for toggled action items in action bar."));const HB={Visible:new rs("codeActionMenuVisible",!1,W("codeActionMenuVisible","Whether the action widget list is visible"))},cW=jc("actionWidgetService");let jB=class extends xi{get isVisible(){return HB.Visible.getValue(this._contextKeyService)||!1}constructor(e,i,n){super(),this._contextViewService=e,this._contextKeyService=i,this._instantiationService=n,this._list=this._register(new Fm)}show(e,i,n,s,c,d,f){const m=HB.Visible.bindTo(this._contextKeyService),v=this._instantiationService.createInstance(oze,e,i,n,s);this._contextViewService.showContextView({getAnchor:()=>c,render:x=>(m.set(!0),this._renderWidget(x,v,f??[])),onHide:x=>{m.reset(),this._onWidgetClosed(x)}},d,!1)}acceptSelected(e){var i;(i=this._list.value)==null||i.acceptSelected(e)}focusPrevious(){var e,i;(i=(e=this._list)==null?void 0:e.value)==null||i.focusPrevious()}focusNext(){var e,i;(i=(e=this._list)==null?void 0:e.value)==null||i.focusNext()}hide(e){var i;(i=this._list.value)==null||i.hide(e),this._list.clear()}_renderWidget(e,i,n){var P;const s=document.createElement("div");if(s.classList.add("action-widget"),e.appendChild(s),this._list.value=i,this._list.value)s.appendChild(this._list.value.domNode);else throw new Error("List has no value");const c=new wn,d=document.createElement("div"),f=e.appendChild(d);f.classList.add("context-view-block"),c.add(en(f,br.MOUSE_DOWN,O=>O.stopPropagation()));const m=document.createElement("div"),v=e.appendChild(m);v.classList.add("context-view-pointerBlock"),c.add(en(v,br.POINTER_MOVE,()=>v.remove())),c.add(en(v,br.MOUSE_DOWN,()=>v.remove()));let x=0;if(n.length){const O=this._createActionBar(".action-widget-action-bar",n);O&&(s.appendChild(O.getContainer().parentElement),c.add(O),x=O.getContainer().offsetWidth)}const w=(P=this._list.value)==null?void 0:P.layout(x);s.style.width=`${w}px`;const I=c.add(zE(e));return c.add(I.onDidBlur(()=>this.hide(!0))),c}_createActionBar(e,i){if(!i.length)return;const n=Cr(e),s=new kw(n);return s.push(i,{icon:!1,label:!0}),s}_onWidgetClosed(e){var i;(i=this._list.value)==null||i.hide(e)}};jB=WNi([I9e(0,b6),I9e(1,Ko),I9e(2,ho)],jB);nl(cW,jB,1);const Hse=1100;Nd(class extends Tv{constructor(){super({id:"hideCodeActionWidget",title:aa("hideCodeActionWidget.title","Hide action widget"),precondition:HB.Visible,keybinding:{weight:Hse,primary:9,secondary:[1033]}})}run(l){l.get(cW).hide(!0)}});Nd(class extends Tv{constructor(){super({id:"selectPrevCodeAction",title:aa("selectPrevCodeAction.title","Select previous action"),precondition:HB.Visible,keybinding:{weight:Hse,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(l){const e=l.get(cW);e instanceof jB&&e.focusPrevious()}});Nd(class extends Tv{constructor(){super({id:"selectNextCodeAction",title:aa("selectNextCodeAction.title","Select next action"),precondition:HB.Visible,keybinding:{weight:Hse,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(l){const e=l.get(cW);e instanceof jB&&e.focusNext()}});Nd(class extends Tv{constructor(){super({id:tLt,title:aa("acceptSelected.title","Accept selected action"),precondition:HB.Visible,keybinding:{weight:Hse,primary:3,secondary:[2137]}})}run(l){const e=l.get(cW);e instanceof jB&&e.acceptSelected()}});Nd(class extends Tv{constructor(){super({id:iLt,title:aa("previewSelected.title","Preview selected action"),precondition:HB.Visible,keybinding:{weight:Hse,primary:2051}})}run(l){const e=l.get(cW);e instanceof jB&&e.acceptSelected(!0)}});const rLt=new rs("supportedCodeAction",""),Bwt="_typescript.applyFixAllCodeAction";class VNi extends xi{constructor(e,i,n,s=250){super(),this._editor=e,this._markerService=i,this._signalChange=n,this._delay=s,this._autoTriggerTimer=this._register(new TT),this._register(this._markerService.onMarkerChanged(c=>this._onMarkerChanges(c))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){const i=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(i?{trigger:e,selection:i}:void 0)}_onMarkerChanges(e){const i=this._editor.getModel();i&&e.some(n=>ire(n,i.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:YC.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const i=this._editor.getSelection();if(e.type===1)return i;const n=this._editor.getOption(65).enabled;if(n!==cT.Off){{if(n===cT.On)return i;if(n===cT.OnCode){if(!i.isEmpty())return i;const c=this._editor.getModel(),{lineNumber:d,column:f}=i.getPosition(),m=c.getLineContent(d);if(m.length===0)return;if(f===1){if(/\s/.test(m[0]))return}else if(f===c.getLineMaxColumn(d)){if(/\s/.test(m[m.length-1]))return}else if(/\s/.test(m[f-2])&&/\s/.test(m[f-1]))return}}return i}}}var GF;(function(l){l.Empty={type:0};class e{constructor(n,s,c){this.trigger=n,this.position=s,this._cancellablePromise=c,this.type=1,this.actions=c.catch(d=>{if(Tk(d))return sLt;throw d})}cancel(){this._cancellablePromise.cancel()}}l.Triggered=e})(GF||(GF={}));const sLt=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1});class HNi extends xi{constructor(e,i,n,s,c,d,f){super(),this._editor=e,this._registry=i,this._markerService=n,this._progressService=c,this._configurationService=d,this._telemetryService=f,this._codeActionOracle=this._register(new Fm),this._state=GF.Empty,this._onDidChangeState=this._register(new gi),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=rLt.bindTo(s),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._register(this._editor.onDidChangeConfiguration(m=>{m.hasChanged(65)&&this._update()})),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(GF.Empty,!0))}_settingEnabledNearbyQuickfixes(){var i;const e=(i=this._editor)==null?void 0:i.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes",{resource:e==null?void 0:e.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(GF.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(92)){const i=this._registry.all(e).flatMap(n=>n.providedCodeActionKinds??[]);this._supportedCodeActions.set(i.join(" ")),this._codeActionOracle.value=new VNi(this._editor,this._markerService,n=>{var m;if(!n){this.setState(GF.Empty);return}const s=n.selection.getStartPosition(),c=Om(async v=>{var x,w,I,P,O,z,J,Y,ae,me;if(this._settingEnabledNearbyQuickfixes()&&n.trigger.type===1&&(n.trigger.triggerAction===YC.QuickFix||(w=(x=n.trigger.filter)==null?void 0:x.include)!=null&&w.contains(gf.QuickFix))){const ye=await mq(this._registry,e,n.selection,n.trigger,NE.None,v),Ce=[...ye.allActions];if(v.isCancellationRequested)return sLt;const Fe=(I=ye.validActions)==null?void 0:I.some(ct=>ct.action.kind?gf.QuickFix.contains(new Nf(ct.action.kind)):!1),rt=this._markerService.read({resource:e.uri});if(Fe){for(const ct of ye.validActions)(O=(P=ct.action.command)==null?void 0:P.arguments)!=null&&O.some(Mt=>typeof Mt=="string"&&Mt.includes(Bwt))&&(ct.action.diagnostics=[...rt.filter(Mt=>Mt.relatedInformation)]);return{validActions:ye.validActions,allActions:Ce,documentation:ye.documentation,hasAutoFix:ye.hasAutoFix,hasAIFix:ye.hasAIFix,allAIFixes:ye.allAIFixes,dispose:()=>{ye.dispose()}}}else if(!Fe&&rt.length>0){const ct=n.selection.getPosition();let Mt=ct,Yt=Number.MAX_VALUE;const Bi=[...ye.validActions];for(const $t of rt){const Hi=$t.endColumn,An=$t.endLineNumber,qt=$t.startLineNumber;if(An===ct.lineNumber||qt===ct.lineNumber){Mt=new pi(An,Hi);const ms={type:n.trigger.type,triggerAction:n.trigger.triggerAction,filter:{include:(z=n.trigger.filter)!=null&&z.include?(J=n.trigger.filter)==null?void 0:J.include:gf.QuickFix},autoApply:n.trigger.autoApply,context:{notAvailableMessage:((Y=n.trigger.context)==null?void 0:Y.notAvailableMessage)||"",position:Mt}},Wr=new Us(Mt.lineNumber,Mt.column,Mt.lineNumber,Mt.column),Dr=await mq(this._registry,e,Wr,ms,NE.None,v);if(Dr.validActions.length!==0){for(const Rr of Dr.validActions)(me=(ae=Rr.action.command)==null?void 0:ae.arguments)!=null&&me.some(na=>typeof na=="string"&&na.includes(Bwt))&&(Rr.action.diagnostics=[...rt.filter(na=>na.relatedInformation)]);ye.allActions.length===0&&Ce.push(...Dr.allActions),Math.abs(ct.column-Hi)<Yt?Bi.unshift(...Dr.validActions):Bi.push(...Dr.validActions)}Yt=Math.abs(ct.column-Hi)}}const $i=Bi.filter(($t,Hi,An)=>An.findIndex(qt=>qt.action.title===$t.action.title)===Hi);return $i.sort(($t,Hi)=>$t.action.isPreferred&&!Hi.action.isPreferred?-1:!$t.action.isPreferred&&Hi.action.isPreferred||$t.action.isAI&&!Hi.action.isAI?1:!$t.action.isAI&&Hi.action.isAI?-1:0),{validActions:$i,allActions:Ce,documentation:ye.documentation,hasAutoFix:ye.hasAutoFix,hasAIFix:ye.hasAIFix,allAIFixes:ye.allAIFixes,dispose:()=>{ye.dispose()}}}}if(n.trigger.type===1){const ye=new bg,Ce=await mq(this._registry,e,n.selection,n.trigger,NE.None,v);return this._telemetryService&&this._telemetryService.publicLog2("codeAction.invokedDurations",{codeActions:Ce.validActions.length,duration:ye.elapsed()}),Ce}return mq(this._registry,e,n.selection,n.trigger,NE.None,v)});n.trigger.type===1&&((m=this._progressService)==null||m.showWhile(c,250));const d=new GF.Triggered(n.trigger,s,c);let f=!1;this._state.type===1&&(f=this._state.trigger.type===1&&d.type===1&&d.trigger.type===2&&this._state.position!==d.position),f?setTimeout(()=>{this.setState(d)},500):this.setState(d)},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:YC.Default})}else this._supportedCodeActions.reset()}trigger(e){var i;(i=this._codeActionOracle.value)==null||i.trigger(e)}setState(e,i){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!i&&!this._disposed&&this._onDidChangeState.fire(e))}}var jNi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},GN=function(l,e){return function(i,n){e(i,n,l)}},JU;const zNi="quickfix-edit-highlight";var eR;let X$=(eR=class extends xi{static get(e){return e.getContribution(JU.ID)}constructor(e,i,n,s,c,d,f,m,v,x,w){super(),this._commandService=f,this._configurationService=m,this._actionWidgetService=v,this._instantiationService=x,this._telemetryService=w,this._activeCodeActions=this._register(new Fm),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new HNi(this._editor,c.codeActionProvider,i,n,d,m,this._telemetryService)),this._register(this._model.onDidChangeState(I=>this.update(I))),this._lightBulbWidget=new HE(()=>{const I=this._editor.getContribution(Fre.ID);return I&&this._register(I.onClick(P=>this.showCodeActionsFromLightbulb(P.actions,P))),I}),this._resolver=s.createInstance(nze),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}async showCodeActionsFromLightbulb(e,i){if(e.allAIFixes&&e.validActions.length===1){const n=e.validActions[0],s=n.action.command;s&&s.id==="inlineChat.start"&&s.arguments&&s.arguments.length>=1&&(s.arguments[0]={...s.arguments[0],autoSend:!1}),await this._applyCodeAction(n,!1,!1,l9.FromAILightbulb);return}await this.showCodeActionList(e,i,{includeDisabledActions:!1,fromLightbulb:!0})}showCodeActions(e,i,n){return this.showCodeActionList(i,n,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,i,n,s){var d;if(!this._editor.hasModel())return;(d=GC.get(this._editor))==null||d.closeMessage();const c=this._editor.getPosition();this._trigger({type:1,triggerAction:i,filter:n,autoApply:s,context:{notAvailableMessage:e,position:c}})}_trigger(e){return this._model.trigger(e)}async _applyCodeAction(e,i,n,s){try{await this._instantiationService.invokeFunction(ENi,e,s,{preview:n,editor:this._editor})}finally{i&&this._trigger({type:2,triggerAction:YC.QuickFix,filter:{}})}}hideLightBulbWidget(){var e,i;(e=this._lightBulbWidget.rawValue)==null||e.hide(),(i=this._lightBulbWidget.rawValue)==null||i.gutterHide()}async update(e){var s,c,d,f,m;if(e.type!==1){this.hideLightBulbWidget();return}let i;try{i=await e.actions}catch(v){Pa(v);return}if(this._disposed)return;const n=this._editor.getSelection();if((n==null?void 0:n.startLineNumber)===e.position.lineNumber)if((s=this._lightBulbWidget.value)==null||s.update(i,e.trigger,e.position),e.trigger.type===1){if((c=e.trigger.filter)!=null&&c.include){const x=this.tryGetValidActionToApply(e.trigger,i);if(x){try{this.hideLightBulbWidget(),await this._applyCodeAction(x,!1,!1,l9.FromCodeActions)}finally{i.dispose()}return}if(e.trigger.context){const w=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,i);if(w&&w.action.disabled){(d=GC.get(this._editor))==null||d.showMessage(w.action.disabled,e.trigger.context.position),i.dispose();return}}}const v=!!((f=e.trigger.filter)!=null&&f.include);if(e.trigger.context&&(!i.allActions.length||!v&&!i.validActions.length)){(m=GC.get(this._editor))==null||m.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=i,i.dispose();return}this._activeCodeActions.value=i,this.showCodeActionList(i,this.toCoords(e.position),{includeDisabledActions:v,fromLightbulb:!1})}else this._actionWidgetService.isVisible?i.dispose():this._activeCodeActions.value=i}getInvalidActionThatWouldHaveBeenApplied(e,i){if(i.allActions.length&&(e.autoApply==="first"&&i.validActions.length===0||e.autoApply==="ifSingle"&&i.allActions.length===1))return i.allActions.find(({action:n})=>n.disabled)}tryGetValidActionToApply(e,i){if(i.validActions.length&&(e.autoApply==="first"&&i.validActions.length>0||e.autoApply==="ifSingle"&&i.validActions.length===1))return i.validActions[0]}async showCodeActionList(e,i,n){const s=this._editor.createDecorationsCollection(),c=this._editor.getDomNode();if(!c)return;const d=n.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!d.length)return;const f=pi.isIPosition(i)?this.toCoords(i):i,m={onSelect:async(v,x)=>{this._applyCodeAction(v,!0,!!x,n.fromLightbulb?l9.FromAILightbulb:l9.FromCodeActions),this._actionWidgetService.hide(!1),s.clear()},onHide:v=>{var x;(x=this._editor)==null||x.focus(),s.clear()},onHover:async(v,x)=>{var P;if(x.isCancellationRequested)return;let w=!1;const I=v.action.kind;if(I){const O=new Nf(I);w=[gf.RefactorExtract,gf.RefactorInline,gf.RefactorRewrite,gf.RefactorMove,gf.Source].some(J=>J.contains(O))}return{canPreview:w||!!((P=v.action.edit)!=null&&P.edits.length)}},onFocus:v=>{var x,w;if(v&&v.action){const I=v.action.ranges,P=v.action.diagnostics;if(s.clear(),I&&I.length>0){const O=P&&(P==null?void 0:P.length)>1?P.map(z=>({range:z,options:JU.DECORATION})):I.map(z=>({range:z,options:JU.DECORATION}));s.set(O)}else if(P&&P.length>0){const O=P.map(J=>({range:J,options:JU.DECORATION}));s.set(O);const z=P[0];if(z.startLineNumber&&z.startColumn){const J=(w=(x=this._editor.getModel())==null?void 0:x.getWordAtPosition({lineNumber:z.startLineNumber,column:z.startColumn}))==null?void 0:w.word;PL(W("editingNewSelection","Context: {0} at line {1} and column {2}.",J,z.startLineNumber,z.startColumn))}}}else s.clear()}};this._actionWidgetService.show("codeActionWidget",!0,ANi(d,this._shouldShowHeaders(),this._resolver.getResolver()),m,f,c,this._getActionBarActions(e,i,n))}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const i=this._editor.getScrolledVisiblePosition(e),n=e_(this._editor.getDomNode()),s=n.left+i.left,c=n.top+i.top+i.height;return{x:s,y:c}}_shouldShowHeaders(){var i;const e=(i=this._editor)==null?void 0:i.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:e==null?void 0:e.uri})}_getActionBarActions(e,i,n){if(n.fromLightbulb)return[];const s=e.documentation.map(c=>({id:c.id,label:c.title,tooltip:c.tooltip??"",class:void 0,enabled:!0,run:()=>this._commandService.executeCommand(c.id,...c.arguments??[])}));return n.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&s.push(this._showDisabled?{id:"hideMoreActions",label:W("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,i,n))}:{id:"showMoreActions",label:W("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,i,n))}),s}},JU=eR,eR.ID="editor.contrib.codeActionController",eR.DECORATION=qa.register({description:"quickfix-highlight",className:zNi}),eR);X$=JU=jNi([GN(1,zL),GN(2,Ko),GN(3,ho),GN(4,Ts),GN(5,WR),GN(6,qd),GN(7,Cc),GN(8,cW),GN(9,ho),GN(10,b1)],X$);Dk((l,e)=>{((s,c)=>{c&&e.addRule(`.monaco-editor ${s} { background-color: ${c}; }`)})(".quickfix-edit-highlight",l.getColor(H4));const n=l.getColor(AM);n&&e.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${RE(l.type)?"dotted":"solid"} ${n}; box-sizing: border-box; }`)});function jse(l){return kn.regex(rLt.keys()[0],new RegExp("(\\s|^)"+Tw(l.value)+"\\b"))}const BGe={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:W("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:W("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[W("args.schema.apply.first","Always apply the first returned code action."),W("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),W("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:W("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function lW(l,e,i,n,s=YC.Default){if(l.hasModel()){const c=X$.get(l);c==null||c.manualTriggerAtCurrentPosition(e,s,i,n)}}class UNi extends hs{constructor(){super({id:FGe,label:W("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:kn.and(Tt.writable,Tt.hasCodeActionsProvider),kbOpts:{kbExpr:Tt.textInputFocus,primary:2137,weight:100}})}run(e,i){return lW(i,W("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,YC.QuickFix)}}class qNi extends tm{constructor(){super({id:KNt,precondition:kn.and(Tt.writable,Tt.hasCodeActionsProvider),metadata:{description:"Trigger a code action",args:[{name:"args",schema:BGe}]}})}runEditorCommand(e,i,n){const s=yL.fromUser(n,{kind:Nf.Empty,apply:"ifSingle"});return lW(i,typeof(n==null?void 0:n.kind)=="string"?s.preferred?W("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):W("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):s.preferred?W("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):W("editor.action.codeAction.noneMessage","No code actions available"),{include:s.kind,includeSourceActions:!0,onlyIncludePreferredActions:s.preferred},s.apply)}}class $Ni extends hs{constructor(){super({id:QNt,label:W("refactor.label","Refactor..."),alias:"Refactor...",precondition:kn.and(Tt.writable,Tt.hasCodeActionsProvider),kbOpts:{kbExpr:Tt.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:kn.and(Tt.writable,jse(gf.Refactor))},metadata:{description:"Refactor...",args:[{name:"args",schema:BGe}]}})}run(e,i,n){const s=yL.fromUser(n,{kind:gf.Refactor,apply:"never"});return lW(i,typeof(n==null?void 0:n.kind)=="string"?s.preferred?W("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):W("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):s.preferred?W("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):W("editor.action.refactor.noneMessage","No refactorings available"),{include:gf.Refactor.contains(s.kind)?s.kind:Nf.None,onlyIncludePreferredActions:s.preferred},s.apply,YC.Refactor)}}class JNi extends hs{constructor(){super({id:ZNt,label:W("source.label","Source Action..."),alias:"Source Action...",precondition:kn.and(Tt.writable,Tt.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:kn.and(Tt.writable,jse(gf.Source))},metadata:{description:"Source Action...",args:[{name:"args",schema:BGe}]}})}run(e,i,n){const s=yL.fromUser(n,{kind:gf.Source,apply:"never"});return lW(i,typeof(n==null?void 0:n.kind)=="string"?s.preferred?W("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):W("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):s.preferred?W("editor.action.source.noneMessage.preferred","No preferred source actions available"):W("editor.action.source.noneMessage","No source actions available"),{include:gf.Source.contains(s.kind)?s.kind:Nf.None,includeSourceActions:!0,onlyIncludePreferredActions:s.preferred},s.apply,YC.SourceAction)}}class GNi extends hs{constructor(){super({id:eze,label:W("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:kn.and(Tt.writable,jse(gf.SourceOrganizeImports)),kbOpts:{kbExpr:Tt.textInputFocus,primary:1581,weight:100}})}run(e,i){return lW(i,W("editor.action.organize.noneMessage","No organize imports action available"),{include:gf.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",YC.OrganizeImports)}}class KNi extends hs{constructor(){super({id:tze,label:W("fixAll.label","Fix All"),alias:"Fix All",precondition:kn.and(Tt.writable,jse(gf.SourceFixAll))})}run(e,i){return lW(i,W("fixAll.noneMessage","No fix all action available"),{include:gf.SourceFixAll,includeSourceActions:!0},"ifSingle",YC.FixAll)}}class XNi extends hs{constructor(){super({id:XNt,label:W("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:kn.and(Tt.writable,jse(gf.QuickFix)),kbOpts:{kbExpr:Tt.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,i){return lW(i,W("editor.action.autoFix.noneMessage","No auto fixes available"),{include:gf.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",YC.AutoFix)}}Cl(X$.ID,X$,3);Cl(Fre.ID,Fre,4);sr(UNi);sr($Ni);sr(JNi);sr(GNi);sr(XNi);sr(KNi);$r(new qNi);nh.as(DT.Configuration).registerConfiguration({...wse,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:W("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}});nh.as(DT.Configuration).registerConfiguration({...wse,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:"boolean",scope:5,description:W("includeNearbyQuickFixes","Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),default:!0}}});nh.as(DT.Configuration).registerConfiguration({...wse,properties:{"editor.codeActions.triggerOnFocusChange":{type:"boolean",scope:5,markdownDescription:W("triggerOnFocusChange","Enable triggering {0} when {1} is set to {2}. Code Actions must be set to {3} to be triggered for window and focus changes.","`#editor.codeActionsOnSave#`","`#files.autoSave#`","`afterDelay`","`always`"),default:!1}}});class aze{constructor(){this.lenses=[],this._disposables=new wn}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,i){this._disposables.add(e);for(const n of e.lenses)this.lenses.push({symbol:n,provider:i})}}async function oLt(l,e,i){const n=l.ordered(e),s=new Map,c=new aze,d=n.map(async(f,m)=>{s.set(f,m);try{const v=await Promise.resolve(f.provideCodeLenses(e,i));v&&c.add(v,f)}catch(v){t_(v)}});return await Promise.all(d),c.lenses=c.lenses.sort((f,m)=>f.symbol.range.startLineNumber<m.symbol.range.startLineNumber?-1:f.symbol.range.startLineNumber>m.symbol.range.startLineNumber?1:s.get(f.provider)<s.get(m.provider)?-1:s.get(f.provider)>s.get(m.provider)?1:f.symbol.range.startColumn<m.symbol.range.startColumn?-1:f.symbol.range.startColumn>m.symbol.range.startColumn?1:0),c}fl.registerCommand("_executeCodeLensProvider",function(l,...e){let[i,n]=e;Fl(yo.isUri(i)),Fl(typeof n=="number"||!n);const{codeLensProvider:s}=l.get(Ts),c=l.get(rf).getModel(i);if(!c)throw gk();const d=[],f=new wn;return oLt(s,c,cc.None).then(m=>{f.add(m);const v=[];for(const x of m.lenses)n==null||x.symbol.command?d.push(x.symbol):n-- >0&&x.provider.resolveCodeLens&&v.push(Promise.resolve(x.provider.resolveCodeLens(c,x.symbol,cc.None)).then(w=>d.push(w||x.symbol)));return Promise.all(v)}).then(()=>d).finally(()=>{setTimeout(()=>f.dispose(),100)})});var QNi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},ZNi=function(l,e){return function(i,n){e(i,n,l)}};const aLt=jc("ICodeLensCache");class Wwt{constructor(e,i){this.lineCount=e,this.data=i}}let cze=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new VL(20,.75);const i="codelens/cache";Yte(cd,()=>e.remove(i,1));const n="codelens/cache2",s=e.get(n,1,"{}");this._deserialize(s);const c=Tr.filter(e.onWillSaveState,d=>d.reason===cre.SHUTDOWN);Tr.once(c)(d=>{e.store(n,this._serialize(),1,1)})}put(e,i){const n=i.lenses.map(d=>{var f;return{range:d.symbol.range,command:d.symbol.command&&{id:"",title:(f=d.symbol.command)==null?void 0:f.title}}}),s=new aze;s.add({lenses:n,dispose:()=>{}},this._fakeProvider);const c=new Wwt(e.getLineCount(),s);this._cache.set(e.uri.toString(),c)}get(e){const i=this._cache.get(e.uri.toString());return i&&i.lineCount===e.getLineCount()?i.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[i,n]of this._cache){const s=new Set;for(const c of n.data.lenses)s.add(c.symbol.range.startLineNumber);e[i]={lineCount:n.lineCount,lines:[...s.values()]}}return JSON.stringify(e)}_deserialize(e){try{const i=JSON.parse(e);for(const n in i){const s=i[n],c=[];for(const f of s.lines)c.push({range:new nt(f,1,f,11)});const d=new aze;d.add({lenses:c,dispose(){}},this._fakeProvider),this._cache.set(n,new Wwt(s.lineCount,d))}}catch{}}};cze=QNi([ZNi(0,ET)],cze);nl(aLt,cze,1);class YNi{constructor(e,i,n){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=i,this._onHeight=n,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}const xne=class xne{constructor(e,i){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${xne._idPool++}`,this.updatePosition(i),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,i){this._commands.clear();const n=[];let s=!1;for(let c=0;c<e.length;c++){const d=e[c];if(d&&(s=!0,d.command)){const f=JM(d.command.title.trim());if(d.command.id){const m=`c${xne._idPool++}`;n.push(Cr("a",{id:m,title:d.command.tooltip,role:"button"},...f)),this._commands.set(m,d.command)}else n.push(Cr("span",{title:d.command.tooltip},...f));c+1<e.length&&n.push(Cr("span",void 0," | "))}}s?(o0(this._domNode,...n),this._isEmpty&&i&&this._domNode.classList.add("fadein"),this._isEmpty=!1):o0(this._domNode,Cr("span",void 0,"no commands"))}getCommand(e){return e.parentElement===this._domNode?this._commands.get(e.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(e){const i=this._editor.getModel().getLineFirstNonWhitespaceColumn(e);this._widgetPosition={position:{lineNumber:e,column:i},preference:[1]}}getPosition(){return this._widgetPosition||null}};xne._idPool=0;let lze=xne;class N9e{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(e,i){this._addDecorations.push(e),this._addDecorationsCallbacks.push(i)}removeDecoration(e){this._removeDecorations.push(e)}commit(e){const i=e.deltaDecorations(this._removeDecorations,this._addDecorations);for(let n=0,s=i.length;n<s;n++)this._addDecorationsCallbacks[n](i[n])}}const Vwt=qa.register({collapseOnReplaceEdit:!0,description:"codelens"});class Hwt{constructor(e,i,n,s,c,d){this._isDisposed=!1,this._editor=i,this._data=e,this._decorationIds=[];let f;const m=[];this._data.forEach((v,x)=>{v.symbol.command&&m.push(v.symbol),n.addDecoration({range:v.symbol.range,options:Vwt},w=>this._decorationIds[x]=w),f?f=nt.plusRange(f,v.symbol.range):f=nt.lift(v.symbol.range)}),this._viewZone=new YNi(f.startLineNumber-1,c,d),this._viewZoneId=s.addZone(this._viewZone),m.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(m,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new lze(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,i){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],i==null||i.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,i)=>{const n=this._editor.getModel().getDecorationRange(e),s=this._data[i].symbol;return!!(n&&nt.isEmpty(s.range)===n.isEmpty())})}updateCodeLensSymbols(e,i){this._decorationIds.forEach(i.removeDecoration,i),this._decorationIds=[],this._data=e,this._data.forEach((n,s)=>{i.addDecoration({range:n.symbol.range,options:Vwt},c=>this._decorationIds[s]=c)})}updateHeight(e,i){this._viewZone.heightInPx=e,i.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let i=0;i<this._decorationIds.length;i++){const n=e.getDecorationRange(this._decorationIds[i]);n&&(this._data[i].symbol.range=n)}return this._data}updateCommands(e){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(e,!0);for(let i=0;i<this._data.length;i++){const n=e[i];if(n){const{symbol:s}=this._data[i];s.command=n.command||s.command}}}getCommand(e){var i;return(i=this._contentWidget)==null?void 0:i.getCommand(e)}getLineNumber(){const e=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return e?e.startLineNumber:-1}update(e){if(this.isValid()){const i=this._editor.getModel().getDecorationRange(this._decorationIds[0]);i&&(this._viewZone.afterLineNumber=i.startLineNumber-1,e.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(i.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}}var eLi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Jte=function(l,e){return function(i,n){e(i,n,l)}},h$;let Bre=(h$=class{constructor(e,i,n,s,c,d){this._editor=e,this._languageFeaturesService=i,this._commandService=s,this._notificationService=c,this._codeLensCache=d,this._disposables=new wn,this._localToDispose=new wn,this._lenses=[],this._oldCodeLensModels=new wn,this._provideCodeLensDebounce=n.for(i.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=n.for(i.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new qu(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(f=>{(f.hasChanged(50)||f.hasChanged(19)||f.hasChanged(18))&&this._updateLensStyle(),f.hasChanged(17)&&this._onModelChange()})),this._disposables.add(i.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)==null||e.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(67)/this._editor.getOption(52));let i=this._editor.getOption(19);return(!i||i<5)&&(i=this._editor.getOption(52)*.9|0),{fontSize:i,codeLensHeight:i*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:i}=this._getLayoutInfo(),n=this._editor.getOption(18),s=this._editor.getOption(50),{style:c}=this._editor.getContainerDomNode();c.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),c.setProperty("--vscode-editorCodeLens-fontSize",`${i}px`),c.setProperty("--vscode-editorCodeLens-fontFeatureSettings",s.fontFeatureSettings),n&&(c.setProperty("--vscode-editorCodeLens-fontFamily",n),c.setProperty("--vscode-editorCodeLens-fontFamilyDefault",vv.fontFamily)),this._editor.changeViewZones(d=>{for(const f of this._lenses)f.updateHeight(e,d)})}_localDispose(){var e,i,n;(e=this._getCodeLensModelPromise)==null||e.cancel(),this._getCodeLensModelPromise=void 0,(i=this._resolveCodeLensesPromise)==null||i.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(n=this._currentCodeLensModel)==null||n.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(17)||e.isTooLargeForTokenization())return;const i=this._codeLensCache.get(e);if(i&&this._renderCodeLensSymbols(i),!this._languageFeaturesService.codeLensProvider.has(e)){i&&CR(()=>{const s=this._codeLensCache.get(e);i===s&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3,this._localToDispose);return}for(const s of this._languageFeaturesService.codeLensProvider.all(e))if(typeof s.onDidChange=="function"){const c=s.onDidChange(()=>n.schedule());this._localToDispose.add(c)}const n=new qu(()=>{var c;const s=Date.now();(c=this._getCodeLensModelPromise)==null||c.cancel(),this._getCodeLensModelPromise=Om(d=>oLt(this._languageFeaturesService.codeLensProvider,e,d)),this._getCodeLensModelPromise.then(d=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=d,this._codeLensCache.put(e,d);const f=this._provideCodeLensDebounce.update(e,Date.now()-s);n.delay=f,this._renderCodeLensSymbols(d),this._resolveCodeLensesInViewportSoon()},Pa)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(n),this._localToDispose.add(fo(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var s;this._editor.changeDecorations(c=>{this._editor.changeViewZones(d=>{const f=[];let m=-1;this._lenses.forEach(x=>{!x.isValid()||m===x.getLineNumber()?f.push(x):(x.update(d),m=x.getLineNumber())});const v=new N9e;f.forEach(x=>{x.dispose(v,d),this._lenses.splice(this._lenses.indexOf(x),1)}),v.commit(c)})}),n.schedule(),this._resolveCodeLensesScheduler.cancel(),(s=this._resolveCodeLensesPromise)==null||s.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorText(()=>{n.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{n.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(s=>{s.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(fo(()=>{if(this._editor.getModel()){const s=GE.capture(this._editor);this._editor.changeDecorations(c=>{this._editor.changeViewZones(d=>{this._disposeAllLenses(c,d)})}),s.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(s=>{if(s.target.type!==9)return;let c=s.target.element;if((c==null?void 0:c.tagName)==="SPAN"&&(c=c.parentElement),(c==null?void 0:c.tagName)==="A")for(const d of this._lenses){const f=d.getCommand(c);if(f){this._commandService.executeCommand(f.id,...f.arguments||[]).catch(m=>this._notificationService.error(m));break}}})),n.schedule()}_disposeAllLenses(e,i){const n=new N9e;for(const s of this._lenses)s.dispose(n,i);e&&n.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const i=this._editor.getModel().getLineCount(),n=[];let s;for(const f of e.lenses){const m=f.symbol.range.startLineNumber;m<1||m>i||(s&&s[s.length-1].symbol.range.startLineNumber===m?s.push(f):(s=[f],n.push(s)))}if(!n.length&&!this._lenses.length)return;const c=GE.capture(this._editor),d=this._getLayoutInfo();this._editor.changeDecorations(f=>{this._editor.changeViewZones(m=>{const v=new N9e;let x=0,w=0;for(;w<n.length&&x<this._lenses.length;){const I=n[w][0].symbol.range.startLineNumber,P=this._lenses[x].getLineNumber();P<I?(this._lenses[x].dispose(v,m),this._lenses.splice(x,1)):P===I?(this._lenses[x].updateCodeLensSymbols(n[w],v),w++,x++):(this._lenses.splice(x,0,new Hwt(n[w],this._editor,v,m,d.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),x++,w++)}for(;x<this._lenses.length;)this._lenses[x].dispose(v,m),this._lenses.splice(x,1);for(;w<n.length;)this._lenses.push(new Hwt(n[w],this._editor,v,m,d.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),w++;v.commit(f)})}),c.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var d;(d=this._resolveCodeLensesPromise)==null||d.cancel(),this._resolveCodeLensesPromise=void 0;const e=this._editor.getModel();if(!e)return;const i=[],n=[];if(this._lenses.forEach(f=>{const m=f.computeIfNecessary(e);m&&(i.push(m),n.push(f))}),i.length===0)return;const s=Date.now(),c=Om(f=>{const m=i.map((v,x)=>{const w=new Array(v.length),I=v.map((P,O)=>!P.symbol.command&&typeof P.provider.resolveCodeLens=="function"?Promise.resolve(P.provider.resolveCodeLens(e,P.symbol,f)).then(z=>{w[O]=z},t_):(w[O]=P.symbol,Promise.resolve(void 0)));return Promise.all(I).then(()=>{!f.isCancellationRequested&&!n[x].isDisposed()&&n[x].updateCommands(w)})});return Promise.all(m)});this._resolveCodeLensesPromise=c,this._resolveCodeLensesPromise.then(()=>{const f=this._resolveCodeLensesDebounce.update(e,Date.now()-s);this._resolveCodeLensesScheduler.delay=f,this._currentCodeLensModel&&this._codeLensCache.put(e,this._currentCodeLensModel),this._oldCodeLensModels.clear(),c===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},f=>{Pa(f),c===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}async getModel(){var e;return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,(e=this._currentCodeLensModel)!=null&&e.isDisposed?void 0:this._currentCodeLensModel}},h$.ID="css.editor.codeLens",h$);Bre=eLi([Jte(1,Ts),Jte(2,Pw),Jte(3,qd),Jte(4,w_),Jte(5,aLt)],Bre);Cl(Bre.ID,Bre,1);sr(class extends hs{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:Tt.hasCodeLensProvider,label:W("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}async run(e,i){if(!i.hasModel())return;const n=e.get(Ek),s=e.get(qd),c=e.get(w_),d=i.getSelection().positionLineNumber,f=i.getContribution(Bre.ID);if(!f)return;const m=await f.getModel();if(!m)return;const v=[];for(const I of m.lenses)I.symbol.command&&I.symbol.range.startLineNumber===d&&v.push({label:I.symbol.command.title,command:I.symbol.command});if(v.length===0)return;const x=await n.pick(v,{canPickMany:!1,placeHolder:W("placeHolder","Select a command")});if(!x)return;let w=x.command;if(m.isDisposed){const I=await f.getModel(),P=I==null?void 0:I.lenses.find(O=>{var z;return O.symbol.range.startLineNumber===d&&((z=O.symbol.command)==null?void 0:z.title)===w.title});if(!P||!P.symbol.command)return;w=P.symbol.command}try{await s.executeCommand(w.id,...w.arguments||[])}catch(I){c.error(I)}}});var cLt=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},uze=function(l,e){return function(i,n){e(i,n,l)}};let Wre=class{constructor(e){this._editorWorkerService=e}async provideDocumentColors(e,i){return this._editorWorkerService.computeDefaultDocumentColors(e.uri)}provideColorPresentations(e,i,n){const s=i.range,c=i.color,d=c.alpha,f=new In(new El(Math.round(255*c.red),Math.round(255*c.green),Math.round(255*c.blue),d)),m=d?In.Format.CSS.formatRGB(f):In.Format.CSS.formatRGBA(f),v=d?In.Format.CSS.formatHSL(f):In.Format.CSS.formatHSLA(f),x=d?In.Format.CSS.formatHex(f):In.Format.CSS.formatHexA(f),w=[];return w.push({label:m,textEdit:{range:s,text:m}}),w.push({label:v,textEdit:{range:s,text:v}}),w.push({label:x,textEdit:{range:s,text:x}}),w}};Wre=cLt([uze(0,Fb)],Wre);let dze=class extends xi{constructor(e,i){super(),this._register(e.colorProvider.register("*",new Wre(i)))}};dze=cLt([uze(0,Ts),uze(1,Fb)],dze);NJ(dze);async function lLt(l,e,i,n=!0){return WGe(new tLi,l,e,i,n)}function uLt(l,e,i,n){return Promise.resolve(i.provideColorPresentations(l,e,n))}class tLi{constructor(){}async compute(e,i,n,s){const c=await e.provideDocumentColors(i,n);if(Array.isArray(c))for(const d of c)s.push({colorInfo:d,provider:e});return Array.isArray(c)}}class iLi{constructor(){}async compute(e,i,n,s){const c=await e.provideDocumentColors(i,n);if(Array.isArray(c))for(const d of c)s.push({range:d.range,color:[d.color.red,d.color.green,d.color.blue,d.color.alpha]});return Array.isArray(c)}}class nLi{constructor(e){this.colorInfo=e}async compute(e,i,n,s){const c=await e.provideColorPresentations(i,this.colorInfo,cc.None);return Array.isArray(c)&&s.push(...c),Array.isArray(c)}}async function WGe(l,e,i,n,s){let c=!1,d;const f=[],m=e.ordered(i);for(let v=m.length-1;v>=0;v--){const x=m[v];if(x instanceof Wre)d=x;else try{await l.compute(x,i,n,f)&&(c=!0)}catch(w){t_(w)}}return c?f:d&&s?(await l.compute(d,i,n,f),f):[]}function dLt(l,e){const{colorProvider:i}=l.get(Ts),n=l.get(rf).getModel(e);if(!n)throw gk();const s=l.get(Cc).getValue("editor.defaultColorDecorators",{resource:e});return{model:n,colorProviderRegistry:i,isDefaultColorDecoratorsEnabled:s}}fl.registerCommand("_executeDocumentColorProvider",function(l,...e){const[i]=e;if(!(i instanceof yo))throw gk();const{model:n,colorProviderRegistry:s,isDefaultColorDecoratorsEnabled:c}=dLt(l,i);return WGe(new iLi,s,n,cc.None,c)});fl.registerCommand("_executeColorPresentationProvider",function(l,...e){const[i,n]=e,{uri:s,range:c}=n;if(!(s instanceof yo)||!Array.isArray(i)||i.length!==4||!nt.isIRange(c))throw gk();const{model:d,colorProviderRegistry:f,isDefaultColorDecoratorsEnabled:m}=dLt(l,s),[v,x,w,I]=i;return WGe(new nLi({range:c,color:{red:v,green:x,blue:w,alpha:I}}),f,d,cc.None,m)});var rLi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},L9e=function(l,e){return function(i,n){e(i,n,l)}},fze;const fLt=Object.create({});var tR;let Q$=(tR=class extends xi{constructor(e,i,n,s){super(),this._editor=e,this._configurationService=i,this._languageFeaturesService=n,this._localToDispose=this._register(new wn),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new Cve(this._editor),this._decoratorLimitReporter=new sLi,this._colorDecorationClassRefs=this._register(new wn),this._debounceInformation=s.for(n.colorProvider,"Document Colors",{min:fze.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(e.onDidChangeModelLanguage(()=>this.updateColors())),this._register(n.colorProvider.onDidChange(()=>this.updateColors())),this._register(e.onDidChangeConfiguration(c=>{const d=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(148);const f=d!==this._isColorDecoratorsEnabled||c.hasChanged(21),m=c.hasChanged(148);(f||m)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(148),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const i=e.getLanguageId(),n=this._configurationService.getValue(i);if(n&&typeof n=="object"){const s=n.colorDecorators;if(s&&s.enable!==void 0&&!s.enable)return s.enable}return this._editor.getOption(20)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new TT,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}async beginCompute(){this._computePromise=Om(async e=>{const i=this._editor.getModel();if(!i)return[];const n=new bg(!1),s=await lLt(this._languageFeaturesService.colorProvider,i,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(i,n.elapsed()),s});try{const e=await this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){Pa(e)}}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const i=e.map(n=>({range:{startLineNumber:n.colorInfo.range.startLineNumber,startColumn:n.colorInfo.range.startColumn,endLineNumber:n.colorInfo.range.endLineNumber,endColumn:n.colorInfo.range.endColumn},options:qa.EMPTY}));this._editor.changeDecorations(n=>{this._decorationsIds=n.deltaDecorations(this._decorationsIds,i),this._colorDatas=new Map,this._decorationsIds.forEach((s,c)=>this._colorDatas.set(s,e[c]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const i=[],n=this._editor.getOption(21);for(let c=0;c<e.length&&i.length<n;c++){const{red:d,green:f,blue:m,alpha:v}=e[c].colorInfo.color,x=new El(Math.round(d*255),Math.round(f*255),Math.round(m*255),v),w=`rgba(${x.r}, ${x.g}, ${x.b}, ${x.a})`,I=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:w}));i.push({range:{startLineNumber:e[c].colorInfo.range.startLineNumber,startColumn:e[c].colorInfo.range.startColumn,endLineNumber:e[c].colorInfo.range.endLineNumber,endColumn:e[c].colorInfo.range.endColumn},options:{description:"colorDetector",before:{content:s2t,inlineClassName:`${I.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:fLt}}})}const s=n<e.length?n:!1;this._decoratorLimitReporter.update(e.length,s),this._colorDecoratorIds.set(i)}removeAllDecorations(){this._editor.removeDecorations(this._decorationsIds),this._decorationsIds=[],this._colorDecoratorIds.clear(),this._colorDecorationClassRefs.clear()}getColorData(e){const i=this._editor.getModel();if(!i)return null;const n=i.getDecorationsInRange(nt.fromPositions(e,e)).filter(s=>this._colorDatas.has(s.id));return n.length===0?null:this._colorDatas.get(n[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}},fze=tR,tR.ID="editor.contrib.colorDetector",tR.RECOMPUTE_TIME=1e3,tR);Q$=fze=rLi([L9e(1,Cc),L9e(2,Ts),L9e(3,Pw)],Q$);class sLi{constructor(){this._onDidChange=new gi,this._computed=0,this._limited=!1}update(e,i){(e!==this._computed||i!==this._limited)&&(this._computed=e,this._limited=i,this._onDidChange.fire())}}Cl(Q$.ID,Q$,1);class oLi{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,i,n){this.presentationIndex=n,this._onColorFlushed=new gi,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new gi,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new gi,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=i}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,i){let n=-1;for(let s=0;s<this.colorPresentations.length;s++)if(i.toLowerCase()===this.colorPresentations[s].label){n=s;break}if(n===-1){const s=i.split("(")[0].toLowerCase();for(let c=0;c<this.colorPresentations.length;c++)if(this.colorPresentations[c].label.toLowerCase().startsWith(s)){n=c;break}}n!==-1&&n!==this.presentationIndex&&(this.presentationIndex=n,this._onDidChangePresentation.fire(this.presentation))}flushColor(){this._onColorFlushed.fire(this._color)}}const yw=Cr;class aLi extends xi{constructor(e,i,n,s=!1){super(),this.model=i,this.showingStandaloneColorPicker=s,this._closeButton=null,this._domNode=yw(".colorpicker-header"),jn(e,this._domNode),this._pickedColorNode=jn(this._domNode,yw(".picked-color")),jn(this._pickedColorNode,yw("span.codicon.codicon-color-mode")),this._pickedColorPresentation=jn(this._pickedColorNode,document.createElement("span")),this._pickedColorPresentation.classList.add("picked-color-presentation");const c=W("clickToToggleColorOptions","Click to toggle color options (rgb/hsl/hex)");this._pickedColorNode.setAttribute("title",c),this._originalColorNode=jn(this._domNode,yw(".original-color")),this._originalColorNode.style.backgroundColor=In.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=n.getColorTheme().getColor(Tye)||In.white,this._register(n.onDidColorThemeChange(d=>{this.backgroundColor=d.getColor(Tye)||In.white})),this._register(en(this._pickedColorNode,br.CLICK,()=>this.model.selectNextColorPresentation())),this._register(en(this._originalColorNode,br.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(i.onDidChangeColor(this.onDidChangeColor,this)),this._register(i.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=In.Format.CSS.format(i.color)||"",this._pickedColorNode.classList.toggle("light",i.color.rgba.a<.5?this.backgroundColor.isLighter():i.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new cLi(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=In.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}class cLi extends xi{constructor(e){super(),this._onClicked=this._register(new gi),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),jn(e,this._button);const i=document.createElement("div");i.classList.add("close-button-inner-div"),jn(this._button,i),jn(i,yw(".button"+zo.asCSSSelector(sf("color-picker-close",pr.close,W("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._register(en(this._button,br.CLICK,()=>{this._onClicked.fire()}))}}class lLi extends xi{constructor(e,i,n,s=!1){super(),this.model=i,this.pixelRatio=n,this._insertButton=null,this._domNode=yw(".colorpicker-body"),jn(e,this._domNode),this._saturationBox=new uLi(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new dLi(this._domNode,this.model,s),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new fLi(this._domNode,this.model,s),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),s&&(this._insertButton=this._register(new hLi(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:i}){const n=this.model.color.hsva;this.model.color=new In(new SL(n.h,e,i,n.a))}onDidOpacityChange(e){const i=this.model.color.hsva;this.model.color=new In(new SL(i.h,i.s,i.v,e))}onDidHueChange(e){const i=this.model.color.hsva,n=(1-e)*360;this.model.color=new In(new SL(n===360?0:n,i.s,i.v,i.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}class uLi extends xi{constructor(e,i,n){super(),this.model=i,this.pixelRatio=n,this._onDidChange=new gi,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new gi,this.onColorFlushed=this._onColorFlushed.event,this._domNode=yw(".saturation-wrap"),jn(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",jn(this._domNode,this._canvas),this.selection=yw(".saturation-selection"),jn(this._domNode,this.selection),this.layout(),this._register(en(this._domNode,br.POINTER_DOWN,s=>this.onPointerDown(s))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new bJ);const i=e_(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,s=>this.onDidChangePosition(s.pageX-i.left,s.pageY-i.top),()=>null);const n=en(e.target.ownerDocument,br.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,i){const n=Math.max(0,Math.min(1,e/this.width)),s=Math.max(0,Math.min(1,1-i/this.height));this.paintSelection(n,s),this._onDidChange.fire({s:n,v:s})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,i=new In(new SL(e.h,1,1,1)),n=this._canvas.getContext("2d"),s=n.createLinearGradient(0,0,this._canvas.width,0);s.addColorStop(0,"rgba(255, 255, 255, 1)"),s.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),s.addColorStop(1,"rgba(255, 255, 255, 0)");const c=n.createLinearGradient(0,0,0,this._canvas.height);c.addColorStop(0,"rgba(0, 0, 0, 0)"),c.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this._canvas.width,this._canvas.height),n.fillStyle=In.Format.CSS.format(i),n.fill(),n.fillStyle=s,n.fill(),n.fillStyle=c,n.fill()}paintSelection(e,i){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-i*this.height}px`}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const i=e.hsva;this.paintSelection(i.s,i.v)}}class hLt extends xi{constructor(e,i,n=!1){super(),this.model=i,this._onDidChange=new gi,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new gi,this.onColorFlushed=this._onColorFlushed.event,n?(this.domNode=jn(e,yw(".standalone-strip")),this.overlay=jn(this.domNode,yw(".standalone-overlay"))):(this.domNode=jn(e,yw(".strip")),this.overlay=jn(this.domNode,yw(".overlay"))),this.slider=jn(this.domNode,yw(".slider")),this.slider.style.top="0px",this._register(en(this.domNode,br.POINTER_DOWN,s=>this.onPointerDown(s))),this._register(i.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){const i=this.getValue(e);this.updateSliderPosition(i)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const i=this._register(new bJ),n=e_(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),i.startMonitoring(e.target,e.pointerId,e.buttons,c=>this.onDidChangeTop(c.pageY-n.top),()=>null);const s=en(e.target.ownerDocument,br.POINTER_UP,()=>{this._onColorFlushed.fire(),s.dispose(),i.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){const i=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(i),this._onDidChange.fire(i)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}}class dLi extends hLt{constructor(e,i,n=!1){super(e,i,n),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);const{r:i,g:n,b:s}=e.rgba,c=new In(new El(i,n,s,1)),d=new In(new El(i,n,s,0));this.overlay.style.background=`linear-gradient(to bottom, ${c} 0%, ${d} 100%)`}getValue(e){return e.hsva.a}}class fLi extends hLt{constructor(e,i,n=!1){super(e,i,n),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class hLi extends xi{constructor(e){super(),this._onClicked=this._register(new gi),this.onClicked=this._onClicked.event,this._button=jn(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._register(en(this._button,br.CLICK,()=>{this._onClicked.fire()}))}get button(){return this._button}}class _Li extends Aw{constructor(e,i,n,s,c=!1){super(),this.model=i,this.pixelRatio=n,this._register(Wne.getInstance(Eo(e)).onDidChange(()=>this.layout())),this._domNode=yw(".colorpicker-widget"),e.appendChild(this._domNode),this.header=this._register(new aLi(this._domNode,this.model,s,c)),this.body=this._register(new lLi(this._domNode,this.model,this.pixelRatio,c))}layout(){this.body.layout()}get domNode(){return this._domNode}}class P9e{constructor(e,i,n,s){this.priority=e,this.range=i,this.initialMousePosX=n,this.initialMousePosY=s,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,i){return e.type===1&&i.lineNumber===this.range.startLineNumber}}class N1e{constructor(e,i,n,s,c,d){this.priority=e,this.owner=i,this.range=n,this.initialMousePosX=s,this.initialMousePosY=c,this.supportsMarkerHover=d,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,i){return e.type===2&&this.owner===e.owner}}class zB{constructor(e){this.renderedHoverParts=e}dispose(){for(const e of this.renderedHoverParts)e.dispose()}}const uW=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};var _Lt=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},pLt=function(l,e){return function(i,n){e(i,n,l)}};class pLi{constructor(e,i,n,s){this.owner=e,this.range=i,this.model=n,this.provider=s,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let Vre=class{constructor(e,i){this._editor=e,this._themeService=i,this.hoverOrdinal=2}computeSync(e,i){return[]}computeAsync(e,i,n){return bw.fromPromise(this._computeAsync(e,i,n))}async _computeAsync(e,i,n){if(!this._editor.hasModel())return[];const s=Q$.get(this._editor);if(!s)return[];for(const c of i){if(!s.isColorDecoration(c))continue;const d=s.getColorData(c.range.getStartPosition());if(d)return[await mLt(this,this._editor.getModel(),d.colorInfo,d.provider)]}return[]}renderHoverParts(e,i){const n=gLt(this,this._editor,this._themeService,i,e);if(!n)return new zB([]);this._colorPicker=n.colorPicker;const s={hoverPart:n.hoverPart,hoverElement:this._colorPicker.domNode,dispose(){n.disposables.dispose()}};return new zB([s])}handleResize(){var e;(e=this._colorPicker)==null||e.layout()}isColorPickerVisible(){return!!this._colorPicker}};Vre=_Lt([pLt(1,im)],Vre);class mLi{constructor(e,i,n,s){this.owner=e,this.range=i,this.model=n,this.provider=s}}let Hre=class{constructor(e,i){this._editor=e,this._themeService=i,this._color=null}async createColorHover(e,i,n){if(!this._editor.hasModel()||!Q$.get(this._editor))return null;const c=await lLt(n,this._editor.getModel(),cc.None);let d=null,f=null;for(const w of c){const I=w.colorInfo;nt.containsRange(I.range,e.range)&&(d=I,f=w.provider)}const m=d??e,v=f??i,x=!!d;return{colorHover:await mLt(this,this._editor.getModel(),m,v),foundInEditor:x}}async updateEditorModel(e){if(!this._editor.hasModel())return;const i=e.model;let n=new nt(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(await L1e(this._editor.getModel(),i,this._color,n,e),n=yLt(this._editor,n,i))}renderHoverParts(e,i){return gLt(this,this._editor,this._themeService,i,e)}set color(e){this._color=e}get color(){return this._color}};Hre=_Lt([pLt(1,im)],Hre);async function mLt(l,e,i,n){const s=e.getValueInRange(i.range),{red:c,green:d,blue:f,alpha:m}=i.color,v=new El(Math.round(c*255),Math.round(d*255),Math.round(f*255),m),x=new In(v),w=await uLt(e,i,n,cc.None),I=new oLi(x,[],0);return I.colorPresentations=w||[],I.guessColorPresentation(x,s),l instanceof Vre?new pLi(l,nt.lift(i.range),I,n):new mLi(l,nt.lift(i.range),I,n)}function gLt(l,e,i,n,s){if(n.length===0||!e.hasModel())return;if(s.setMinimumDimensions){const I=e.getOption(67)+8;s.setMinimumDimensions(new Du(302,I))}const c=new wn,d=n[0],f=e.getModel(),m=d.model,v=c.add(new _Li(s.fragment,m,e.getOption(144),i,l instanceof Hre));let x=!1,w=new nt(d.range.startLineNumber,d.range.startColumn,d.range.endLineNumber,d.range.endColumn);if(l instanceof Hre){const I=d.model.color;l.color=I,L1e(f,m,I,w,d),c.add(m.onColorFlushed(P=>{l.color=P}))}else c.add(m.onColorFlushed(async I=>{await L1e(f,m,I,w,d),x=!0,w=yLt(e,w,m)}));return c.add(m.onDidChangeColor(I=>{L1e(f,m,I,w,d)})),c.add(e.onDidChangeModelContent(I=>{x?x=!1:(s.hide(),e.focus())})),{hoverPart:d,colorPicker:v,disposables:c}}function yLt(l,e,i){const n=[],s=i.presentation.textEdit??{range:e,text:i.presentation.label,forceMoveMarkers:!1};n.push(s),i.presentation.additionalTextEdits&&n.push(...i.presentation.additionalTextEdits);const c=nt.lift(s.range),d=l.getModel()._setTrackedRange(null,c,3);return l.executeEdits("colorpicker",n),l.pushUndoStop(),l.getModel()._getTrackedRange(d)??c}async function L1e(l,e,i,n,s){const c=await uLt(l,{range:n,color:{red:i.rgba.r/255,green:i.rgba.g/255,blue:i.rgba.b/255,alpha:i.rgba.a}},s.provider,cc.None);e.colorPresentations=c||[]}const vLt="editor.action.showHover",gLi="editor.action.showDefinitionPreviewHover",yLi="editor.action.scrollUpHover",vLi="editor.action.scrollDownHover",bLi="editor.action.scrollLeftHover",CLi="editor.action.scrollRightHover",SLi="editor.action.pageUpHover",wLi="editor.action.pageDownHover",xLi="editor.action.goToTopHover",kLi="editor.action.goToBottomHover",Jwe="editor.action.increaseHoverVerbosityLevel",TLi=W({key:"increaseHoverVerbosityLevel",comment:["Label for action that will increase the hover verbosity level."]},"Increase Hover Verbosity Level"),Gwe="editor.action.decreaseHoverVerbosityLevel",DLi=W({key:"decreaseHoverVerbosityLevel",comment:["Label for action that will decrease the hover verbosity level."]},"Decrease Hover Verbosity Level"),bLt="editor.action.inlineSuggest.commit",CLt="editor.action.inlineSuggest.showPrevious",SLt="editor.action.inlineSuggest.showNext";var VGe=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},dT=function(l,e){return function(i,n){e(i,n,l)}},P1e;let hze=class extends xi{constructor(e,i,n){super(),this.editor=e,this.model=i,this.instantiationService=n,this.alwaysShowToolbar=Tu(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).showToolbar==="always"),this.sessionPosition=void 0,this.position=ro(this,s=>{var m,v;const c=(m=this.model.read(s))==null?void 0:m.primaryGhostText.read(s);if(!this.alwaysShowToolbar.read(s)||!c||c.parts.length===0)return this.sessionPosition=void 0,null;const d=c.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==c.lineNumber&&(this.sessionPosition=void 0);const f=new pi(c.lineNumber,Math.min(d,((v=this.sessionPosition)==null?void 0:v.column)??Number.MAX_SAFE_INTEGER));return this.sessionPosition=f,f}),this._register(Ib((s,c)=>{const d=this.model.read(s);if(!d||!this.alwaysShowToolbar.read(s))return;const f=VR((v,x)=>{const w=x.add(this.instantiationService.createInstance(Z$,this.editor,!0,this.position,d.selectedInlineCompletionIndex,d.inlineCompletionsCount,d.activeCommands));return e.addContentWidget(w),x.add(fo(()=>e.removeContentWidget(w))),x.add(ba(I=>{this.position.read(I)&&d.lastTriggerKind.read(I)!==OE.Explicit&&d.triggerExplicitly()})),w}),m=Dse(this,(v,x)=>!!this.position.read(v)||!!x);c.add(ba(v=>{m.read(v)&&f.read(v)}))}))}};hze=VGe([dT(2,ho)],hze);const ELi=sf("inline-suggestion-hints-next",pr.chevronRight,W("parameterHintsNextIcon","Icon for show next parameter hint.")),ILi=sf("inline-suggestion-hints-previous",pr.chevronLeft,W("parameterHintsPreviousIcon","Icon for show previous parameter hint."));var iR;let Z$=(iR=class extends xi{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,i,n){const s=new $C(e,i,n,!0,()=>this._commandService.executeCommand(e)),c=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let d=i;return c&&(d=W({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",i,c.getLabel())),s.tooltip=d,s}constructor(e,i,n,s,c,d,f,m,v,x,w){super(),this.editor=e,this.withBorder=i,this._position=n,this._currentSuggestionIdx=s,this._suggestionCount=c,this._extraCommands=d,this._commandService=f,this.keybindingService=v,this._contextKeyService=x,this._menuService=w,this.id=`InlineSuggestionHintsContentWidget${P1e.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=Rc("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[Rc("div@toolBar")]),this.previousAction=this.createCommandAction(CLt,W("previous","Previous"),zo.asClassName(ILi)),this.availableSuggestionCountAction=new $C("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(SLt,W("next","Next"),zo.asClassName(ELi)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(As.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new qu(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new qu(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.toolBar=this._register(m.createInstance(_ze,this.nodes.toolBar,As.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:I=>I.startsWith("primary")},actionViewItemProvider:(I,P)=>{if(I instanceof JC)return m.createInstance(LLi,I,void 0);if(I===this.availableSuggestionCountAction){const O=new NLi(void 0,I,{label:!0,icon:!1});return O.setClass("availableSuggestionCount"),O}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(I=>{P1e._dropDownVisible=I})),this._register(ba(I=>{this._position.read(I),this.editor.layoutContentWidget(this)})),this._register(ba(I=>{const P=this._suggestionCount.read(I),O=this._currentSuggestionIdx.read(I);P!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${O+1}/${P}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),P!==void 0&&P>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(ba(I=>{const O=this._extraCommands.read(I).map(z=>({class:void 0,id:z.id,enabled:!0,tooltip:z.tooltip||"",label:z.title,run:J=>this._commandService.executeCommand(z.id)}));for(const[z,J]of this.inlineCompletionsActionsMenus.getActions())for(const Y of J)Y instanceof JC&&O.push(Y);O.length>0&&O.unshift(new Rm),this.toolBar.setAdditionalSecondaryActions(O)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}},P1e=iR,iR._dropDownVisible=!1,iR.id=0,iR);Z$=P1e=VGe([dT(6,qd),dT(7,ho),dT(8,pu),dT(9,Ko),dT(10,Lw)],Z$);class NLi extends V${constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}updateTooltip(){}}let LLi=class extends TR{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const i=Rc("div.keybinding").root;this._register(new EJ(i,UC,{disableTitle:!0,...qEt})).set(e),this.label.textContent=this._action.label,this.label.appendChild(i),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}updateTooltip(){}},_ze=class extends Nre{constructor(e,i,n,s,c,d,f,m,v){super(e,{resetMenu:i,...n},s,c,d,f,m,v),this.menuId=i,this.options2=n,this.menuService=s,this.contextKeyService=c,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var n,s,c,d,f,m,v;const e=[],i=[];vwe(this.menu,(n=this.options2)==null?void 0:n.menuOptions,{primary:e,secondary:i},(c=(s=this.options2)==null?void 0:s.toolbarOptions)==null?void 0:c.primaryGroup,(f=(d=this.options2)==null?void 0:d.toolbarOptions)==null?void 0:f.shouldInlineSubmenu,(v=(m=this.options2)==null?void 0:m.toolbarOptions)==null?void 0:v.useSeparatorsInPrimaryActions),i.push(...this.additionalActions),e.unshift(...this.prependedPrimaryActions),this.setActions(e,i)}setPrependedPrimaryActions(e){Lf(this.prependedPrimaryActions,e,(i,n)=>i===n)||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){Lf(this.additionalActions,e,(i,n)=>i===n)||(this.additionalActions=e,this.updateToolbar())}};_ze=VGe([dT(3,Lw),dT(4,Ko),dT(5,eS),dT(6,pu),dT(7,qd),dT(8,b1)],_ze);function Kwe(l,e,i){const n=e_(l);return!(e<n.left||e>n.left+n.width||i<n.top||i>n.top+n.height)}let PLi=class{constructor(e,i,n){this.value=e,this.isComplete=i,this.hasLoadingMessage=n}};class wLt extends xi{constructor(e,i){super(),this._editor=e,this._computer=i,this._onResult=this._register(new gi),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new qu(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new qu(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new qu(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(60).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,i=!0){this._state=e,i&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=Sui(e=>this._computer.computeAsync(e)),(async()=>{try{for await(const e of this._asyncIterable)e&&(this._result.push(e),this._fireResult());this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(e){Pa(e)}})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;const e=this._state===0,i=this._state===4;this._onResult.fire(new PLi(this._result.slice(0),e,i))}start(e){if(e===0)this._state===0&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}class HGe{constructor(){this._onDidWillResize=new gi,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new gi,this.onDidResize=this._onDidResize.event,this._sashListener=new wn,this._size=new Du(0,0),this._minSize=new Du(0,0),this._maxSize=new Du(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new _1(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new _1(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new _1(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:tve.North}),this._southSash=new _1(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:tve.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,i=0,n=0;this._sashListener.add(Tr.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,i=0,n=0)})),this._sashListener.add(Tr.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,i=0,n=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(s=>{e&&(n=s.currentX-s.startX,this.layout(e.height+i,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(s=>{e&&(n=-(s.currentX-s.startX),this.layout(e.height+i,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(s=>{e&&(i=-(s.currentY-s.startY),this.layout(e.height+i,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(s=>{e&&(i=s.currentY-s.startY,this.layout(e.height+i,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(Tr.any(this._eastSash.onDidReset,this._westSash.onDidReset)(s=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(Tr.any(this._northSash.onDidReset,this._southSash.onDidReset)(s=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,i,n,s){this._northSash.state=e?3:0,this._eastSash.state=i?3:0,this._southSash.state=n?3:0,this._westSash.state=s?3:0}layout(e=this.size.height,i=this.size.width){const{height:n,width:s}=this._minSize,{height:c,width:d}=this._maxSize;e=Math.max(n,Math.min(c,e)),i=Math.max(s,Math.min(d,i));const f=new Du(i,e);Du.equals(f,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=i+"px",this._size=f,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}const ALi=30,OLi=24;class MLi extends xi{constructor(e,i=new Du(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new HGe),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=Du.lift(i),this._resizableNode.layout(i.height,i.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(n=>{this._resize(new Du(n.dimension.width,n.dimension.height)),n.done&&(this._isResizing=!1)})),this._register(this._resizableNode.onDidWillResize(()=>{this._isResizing=!0}))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){var e;return(e=this._contentPosition)!=null&&e.position?pi.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const i=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);return!i||!n?void 0:e_(i).top+n.top-ALi}_availableVerticalSpaceBelow(e){const i=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);if(!i||!n)return;const s=e_(i),c=SR(i.ownerDocument.body),d=s.top+n.top+n.height;return c.height-d-OLi}_findPositionPreference(e,i){const n=Math.min(this._availableVerticalSpaceBelow(i)??1/0,e),s=Math.min(this._availableVerticalSpaceAbove(i)??1/0,e),c=Math.min(Math.max(s,n),e),d=Math.min(e,c);let f;return this._editor.getOption(60).above?f=d<=s?1:2:f=d<=n?2:1,f===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),f}_resize(e){this._resizableNode.layout(e.height,e.width)}}var RLi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},L0e=function(l,e){return function(i,n){e(i,n,l)}},eL;const jwt=30,FLi=6;var nR;let pze=(nR=class extends MLi{get isVisibleFromKeyboard(){var e;return((e=this._renderedHover)==null?void 0:e.source)===1}get isVisible(){return this._hoverVisibleKey.get()??!1}get isFocused(){return this._hoverFocusedKey.get()??!1}constructor(e,i,n,s,c){const d=e.getOption(67)+8,f=150,m=new Du(f,d);super(e,m),this._configurationService=n,this._accessibilityService=s,this._keybindingService=c,this._hover=this._register(new H$e),this._onDidResize=this._register(new gi),this.onDidResize=this._onDidResize.event,this._minimumSize=m,this._hoverVisibleKey=Tt.hoverVisible.bindTo(i),this._hoverFocusedKey=Tt.hoverFocused.bindTo(i),jn(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>{this.isVisible&&this._updateMaxDimensions()})),this._register(this._editor.onDidChangeConfiguration(x=>{x.hasChanged(50)&&this._updateFont()}));const v=this._register(zE(this._resizableNode.domNode));this._register(v.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(v.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._setRenderedHover(void 0),this._editor.addContentWidget(this)}dispose(){var e;super.dispose(),(e=this._renderedHover)==null||e.dispose(),this._editor.removeContentWidget(this)}getId(){return eL.ID}static _applyDimensions(e,i,n){const s=typeof i=="number"?`${i}px`:i,c=typeof n=="number"?`${n}px`:n;e.style.width=s,e.style.height=c}_setContentsDomNodeDimensions(e,i){const n=this._hover.contentsDomNode;return eL._applyDimensions(n,e,i)}_setContainerDomNodeDimensions(e,i){const n=this._hover.containerDomNode;return eL._applyDimensions(n,e,i)}_setHoverWidgetDimensions(e,i){this._setContentsDomNodeDimensions(e,i),this._setContainerDomNodeDimensions(e,i),this._layoutContentWidget()}static _applyMaxDimensions(e,i,n){const s=typeof i=="number"?`${i}px`:i,c=typeof n=="number"?`${n}px`:n;e.style.maxWidth=s,e.style.maxHeight=c}_setHoverWidgetMaxDimensions(e,i){eL._applyMaxDimensions(this._hover.contentsDomNode,e,i),eL._applyMaxDimensions(this._hover.containerDomNode,e,i),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof e=="number"?`${e}px`:e),this._layoutContentWidget()}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");const i=e.width,n=e.height;this._setHoverWidgetDimensions(i,n)}_updateResizableNodeMaxDimensions(){const e=this._findMaximumRenderingWidth()??1/0,i=this._findMaximumRenderingHeight()??1/0;this._resizableNode.maxSize=new Du(e,i),this._setHoverWidgetMaxDimensions(e,i)}_resize(e){eL._lastDimensions=new Du(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),this._onDidResize.fire()}_findAvailableSpaceVertically(){var i;const e=(i=this._renderedHover)==null?void 0:i.showAtPosition;if(e)return this._positionPreference===1?this._availableVerticalSpaceAbove(e):this._availableVerticalSpaceBelow(e)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let i=FLi;return Array.from(this._hover.contentsDomNode.children).forEach(n=>{i+=n.clientHeight}),Math.min(e,i)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const e=Array.from(this._hover.contentsDomNode.children).some(i=>i.scrollWidth>i.clientWidth);return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const e=this._isHoverTextOverflowing(),i=typeof this._contentWidth>"u"?0:this._contentWidth-2;return e||this._hover.containerDomNode.clientWidth<i?SR(this._hover.containerDomNode.ownerDocument.body).width-14:this._hover.containerDomNode.clientWidth+2}isMouseGettingCloser(e,i){if(!this._renderedHover)return!1;if(this._renderedHover.initialMousePosX===void 0||this._renderedHover.initialMousePosY===void 0)return this._renderedHover.initialMousePosX=e,this._renderedHover.initialMousePosY=i,!1;const n=e_(this.getDomNode());this._renderedHover.closestMouseDistance===void 0&&(this._renderedHover.closestMouseDistance=zwt(this._renderedHover.initialMousePosX,this._renderedHover.initialMousePosY,n.left,n.top,n.width,n.height));const s=zwt(e,i,n.left,n.top,n.width,n.height);return s>this._renderedHover.closestMouseDistance+4?!1:(this._renderedHover.closestMouseDistance=Math.min(this._renderedHover.closestMouseDistance,s),!0)}_setRenderedHover(e){var i;(i=this._renderedHover)==null||i.dispose(),this._renderedHover=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_updateFont(){const{fontSize:e,lineHeight:i}=this._editor.getOption(50),n=this._hover.contentsDomNode;n.style.fontSize=`${e}px`,n.style.lineHeight=`${i/e}`,Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(c=>this._editor.applyFontInfo(c))}_updateContent(e){const i=this._hover.contentsDomNode;i.style.paddingBottom="",i.textContent="",i.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,eL._lastDimensions.height),i=Math.max(this._editor.getLayoutInfo().width*.66,500,eL._lastDimensions.width);this._setHoverWidgetMaxDimensions(i,e)}_render(e){this._setRenderedHover(e),this._updateFont(),this._updateContent(e.domNode),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){return this._renderedHover?{position:this._renderedHover.showAtPosition,secondaryPosition:this._renderedHover.showAtSecondaryPosition,positionAffinity:this._renderedHover.shouldAppearBeforeContent?3:void 0,preference:[this._positionPreference??1]}:null}show(e){var d;if(!this._editor||!this._editor.hasModel())return;this._render(e);const i=B4(this._hover.containerDomNode),n=e.showAtPosition;this._positionPreference=this._findPositionPreference(i,n)??1,this.onContentsChanged(),e.shouldFocus&&this._hover.containerDomNode.focus(),this._onDidResize.fire();const c=this._hover.containerDomNode.ownerDocument.activeElement===this._hover.containerDomNode&&GTt(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),((d=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))==null?void 0:d.getAriaLabel())??"");c&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+c)}hide(){if(!this._renderedHover)return;const e=this._renderedHover.shouldFocus||this._hoverFocusedKey.get();this._setRenderedHover(void 0),this._resizableNode.maxSize=new Du(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){const e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}setMinimumDimensions(e){this._minimumSize=new Du(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e=typeof this._contentWidth>"u"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new Du(e,this._minimumSize.height)}onContentsChanged(){var s;this._removeConstraintsRenderNormally();const e=this._hover.containerDomNode;let i=B4(e),n=FC(e);if(this._resizableNode.layout(i,n),this._setHoverWidgetDimensions(n,i),i=B4(e),n=FC(e),this._contentWidth=n,this._updateMinimumWidth(),this._resizableNode.layout(i,n),(s=this._renderedHover)!=null&&s.showAtPosition){const c=B4(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(c,this._renderedHover.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,i=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-i.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,i=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+i.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-jwt})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+jwt})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,i=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-i})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,i=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+i})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}},eL=nR,nR.ID="editor.contrib.resizableContentHoverWidget",nR._lastDimensions=new Du(0,0),nR);pze=eL=RLi([L0e(1,Ko),L0e(2,Cc),L0e(3,tS),L0e(4,pu)],pze);function zwt(l,e,i,n,s,c){const d=i+s/2,f=n+c/2,m=Math.max(Math.abs(l-d)-s/2,0),v=Math.max(Math.abs(e-f)-c/2,0);return Math.sqrt(m*m+v*v)}class Xve{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,i){this._editor=e,this._participants=i,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,i){if(i.type!==1&&!i.supportsMarkerHover)return[];const n=e.getModel(),s=i.range.startLineNumber;if(s>n.getLineCount())return[];const c=n.getLineMaxColumn(s);return e.getLineDecorations(s).filter(d=>{if(d.options.isWholeLine)return!0;const f=d.range.startLineNumber===s?d.range.startColumn:1,m=d.range.endLineNumber===s?d.range.endColumn:c;if(d.options.showIfCollapsed){if(f>i.range.startColumn+1||i.range.endColumn-1>m)return!1}else if(f>i.range.startColumn||i.range.endColumn>m)return!1;return!0})}computeAsync(e){const i=this._anchor;if(!this._editor.hasModel()||!i)return bw.EMPTY;const n=Xve._getLineDecorations(this._editor,i);return bw.merge(this._participants.map(s=>s.computeAsync?s.computeAsync(i,n,e):bw.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=Xve._getLineDecorations(this._editor,this._anchor);let i=[];for(const n of this._participants)i=i.concat(n.computeSync(this._anchor,e));return yT(i)}}class xLt{constructor(e,i,n){this.anchor=e,this.hoverParts=i,this.isComplete=n}filter(e){const i=this.hoverParts.filter(n=>n.isValidForHoverAnchor(e));return i.length===this.hoverParts.length?this:new BLi(this,this.anchor,i,this.isComplete)}}class BLi extends xLt{constructor(e,i,n,s){super(i,n,s),this.original=e}filter(e){return this.original.filter(e)}}var WLi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},VLi=function(l,e){return function(i,n){e(i,n,l)}};const Uwt=Cr;let Qve=class extends xi{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this.actions=[],this._hasContent=!1,this.hoverElement=Uwt("div.hover-row.status-bar"),this.hoverElement.tabIndex=0,this.actionsElement=jn(this.hoverElement,Uwt("div.actions"))}addAction(e){const i=this._keybindingService.lookupKeybinding(e.commandId),n=i?i.getLabel():null;this._hasContent=!0;const s=this._register(awe.render(this.actionsElement,e,n));return this.actions.push(s),s}append(e){const i=jn(this.actionsElement,e);return this._hasContent=!0,i}};Qve=WLi([VLi(0,pu)],Qve);class HLi{constructor(e,i,n){this.provider=e,this.hover=i,this.ordinal=n}}async function jLi(l,e,i,n,s){const c=await Promise.resolve(l.provideHover(i,n,s)).catch(t_);if(!(!c||!zLi(c)))return new HLi(l,c,e)}function jGe(l,e,i,n,s=!1){const d=l.ordered(e,s).map((f,m)=>jLi(f,m,e,i,n));return bw.fromPromises(d).coalesce()}function kLt(l,e,i,n,s=!1){return jGe(l,e,i,n,s).map(c=>c.hover).toPromise()}Mb("_executeHoverProvider",(l,e,i)=>{const n=l.get(Ts);return kLt(n.hoverProvider,e,i,cc.None)});Mb("_executeHoverProvider_recursive",(l,e,i)=>{const n=l.get(Ts);return kLt(n.hoverProvider,e,i,cc.None,!0)});function zLi(l){const e=typeof l.range<"u",i=typeof l.contents<"u"&&l.contents&&l.contents.length>0;return e&&i}var ULi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},CF=function(l,e){return function(i,n){e(i,n,l)}};const gq=Cr,qLi=sf("hover-increase-verbosity",pr.add,W("increaseHoverVerbosity","Icon for increaseing hover verbosity.")),$Li=sf("hover-decrease-verbosity",pr.remove,W("decreaseHoverVerbosity","Icon for decreasing hover verbosity."));class fT{constructor(e,i,n,s,c,d=void 0){this.owner=e,this.range=i,this.contents=n,this.isBeforeContent=s,this.ordinal=c,this.source=d}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}class TLt{constructor(e,i,n){this.hover=e,this.hoverProvider=i,this.hoverPosition=n}supportsVerbosityAction(e){switch(e){case VC.Increase:return this.hover.canIncreaseVerbosity??!1;case VC.Decrease:return this.hover.canDecreaseVerbosity??!1}}}let jre=class{constructor(e,i,n,s,c,d,f,m){this._editor=e,this._languageService=i,this._openerService=n,this._configurationService=s,this._languageFeaturesService=c,this._keybindingService=d,this._hoverService=f,this._commandService=m,this.hoverOrdinal=3}createLoadingMessage(e){return new fT(this,e.range,[new m1().appendText(W("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,i){if(!this._editor.hasModel()||e.type!==1)return[];const n=this._editor.getModel(),s=e.range.startLineNumber,c=n.getLineMaxColumn(s),d=[];let f=1e3;const m=n.getLineLength(s),v=n.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),x=this._editor.getOption(118),w=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:v});let I=!1;x>=0&&m>x&&e.range.startColumn>=x&&(I=!0,d.push(new fT(this,e.range,[{value:W("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,f++))),!I&&typeof w=="number"&&m>=w&&d.push(new fT(this,e.range,[{value:W("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,f++));let P=!1;for(const O of i){const z=O.range.startLineNumber===s?O.range.startColumn:1,J=O.range.endLineNumber===s?O.range.endColumn:c,Y=O.options.hoverMessage;if(!Y||M$(Y))continue;O.options.beforeContentClassName&&(P=!0);const ae=new nt(e.range.startLineNumber,z,e.range.startLineNumber,J);d.push(new fT(this,ae,Vqe(Y),P,f++))}return d}computeAsync(e,i,n){if(!this._editor.hasModel()||e.type!==1)return bw.EMPTY;const s=this._editor.getModel(),c=this._languageFeaturesService.hoverProvider;return c.has(s)?this._getMarkdownHovers(c,s,e,n):bw.EMPTY}_getMarkdownHovers(e,i,n,s){const c=n.range.getStartPosition();return jGe(e,i,c,s).filter(m=>!M$(m.hover.contents)).map(m=>{const v=m.hover.range?nt.lift(m.hover.range):n.range,x=new TLt(m.hover,m.provider,c);return new fT(this,v,m.hover.contents,!1,m.ordinal,x)})}renderHoverParts(e,i){return this._renderedHoverParts=new JLi(i,e.fragment,this,this._editor,this._languageService,this._openerService,this._commandService,this._keybindingService,this._hoverService,this._configurationService,e.onContentsChanged),this._renderedHoverParts}updateMarkdownHoverVerbosityLevel(e,i,n){var s;return Promise.resolve((s=this._renderedHoverParts)==null?void 0:s.updateMarkdownHoverPartVerbosityLevel(e,i,n))}};jre=ULi([CF(1,Pf),CF(2,Rb),CF(3,Cc),CF(4,Ts),CF(5,pu),CF(6,jL),CF(7,qd)],jre);class P0e{constructor(e,i,n){this.hoverPart=e,this.hoverElement=i,this.disposables=n}dispose(){this.disposables.dispose()}}class JLi{constructor(e,i,n,s,c,d,f,m,v,x,w){this._hoverParticipant=n,this._editor=s,this._languageService=c,this._openerService=d,this._commandService=f,this._keybindingService=m,this._hoverService=v,this._configurationService=x,this._onFinishedRendering=w,this._ongoingHoverOperations=new Map,this._disposables=new wn,this.renderedHoverParts=this._renderHoverParts(e,i,this._onFinishedRendering),this._disposables.add(fo(()=>{this.renderedHoverParts.forEach(I=>{I.dispose()}),this._ongoingHoverOperations.forEach(I=>{I.tokenSource.dispose(!0)})}))}_renderHoverParts(e,i,n){return e.sort(yv(s=>s.ordinal,mT)),e.map(s=>{const c=this._renderHoverPart(s,n);return i.appendChild(c.hoverElement),c})}_renderHoverPart(e,i){const n=this._renderMarkdownHover(e,i),s=n.hoverElement,c=e.source,d=new wn;if(d.add(n),!c)return new P0e(e,s,d);const f=c.supportsVerbosityAction(VC.Increase),m=c.supportsVerbosityAction(VC.Decrease);if(!f&&!m)return new P0e(e,s,d);const v=gq("div.verbosity-actions");return s.prepend(v),d.add(this._renderHoverExpansionAction(v,VC.Increase,f)),d.add(this._renderHoverExpansionAction(v,VC.Decrease,m)),new P0e(e,s,d)}_renderMarkdownHover(e,i){return DLt(this._editor,e,this._languageService,this._openerService,i)}_renderHoverExpansionAction(e,i,n){const s=new wn,c=i===VC.Increase,d=jn(e,gq(zo.asCSSSelector(c?qLi:$Li)));d.tabIndex=0;const f=new P$("mouse",!1,{target:e,position:{hoverPosition:0}},this._configurationService,this._hoverService);if(s.add(this._hoverService.setupManagedHover(f,d,KLi(this._keybindingService,i))),!n)return d.classList.add("disabled"),s;d.classList.add("enabled");const m=()=>this._commandService.executeCommand(i===VC.Increase?Jwe:Gwe);return s.add(new KTt(d,m)),s.add(new XTt(d,m,[3,10])),s}async updateMarkdownHoverPartVerbosityLevel(e,i,n=!0){const s=this._editor.getModel();if(!s)return;const c=this._getRenderedHoverPartAtIndex(i),d=c==null?void 0:c.hoverPart.source;if(!c||!(d!=null&&d.supportsVerbosityAction(e)))return;const f=await this._fetchHover(d,s,e);if(!f)return;const m=new TLt(f,d.hoverProvider,d.hoverPosition),v=c.hoverPart,x=new fT(this._hoverParticipant,v.range,f.contents,v.isBeforeContent,v.ordinal,m),w=this._renderHoverPart(x,this._onFinishedRendering);return this._replaceRenderedHoverPartAtIndex(i,w,x),n&&this._focusOnHoverPartWithIndex(i),{hoverPart:x,hoverElement:w.hoverElement}}async _fetchHover(e,i,n){let s=n===VC.Increase?1:-1;const c=e.hoverProvider,d=this._ongoingHoverOperations.get(c);d&&(d.tokenSource.cancel(),s+=d.verbosityDelta);const f=new ih;this._ongoingHoverOperations.set(c,{verbosityDelta:s,tokenSource:f});const m={verbosityRequest:{verbosityDelta:s,previousHover:e.hover}};let v;try{v=await Promise.resolve(c.provideHover(i,e.hoverPosition,f.token,m))}catch(x){t_(x)}return f.dispose(),this._ongoingHoverOperations.delete(c),v}_replaceRenderedHoverPartAtIndex(e,i,n){if(e>=this.renderedHoverParts.length||e<0)return;const s=this.renderedHoverParts[e],c=s.hoverElement,d=i.hoverElement,f=Array.from(d.children);c.replaceChildren(...f);const m=new P0e(n,c,i.disposables);c.focus(),s.dispose(),this.renderedHoverParts[e]=m}_focusOnHoverPartWithIndex(e){this.renderedHoverParts[e].hoverElement.focus()}_getRenderedHoverPartAtIndex(e){return this.renderedHoverParts[e]}dispose(){this._disposables.dispose()}}function GLi(l,e,i,n,s){e.sort(yv(d=>d.ordinal,mT));const c=[];for(const d of e)c.push(DLt(i,d,n,s,l.onContentsChanged));return new zB(c)}function DLt(l,e,i,n,s){const c=new wn,d=gq("div.hover-row"),f=gq("div.hover-row-contents");d.appendChild(f);const m=e.contents;for(const x of m){if(M$(x))continue;const w=gq("div.markdown-hover"),I=jn(w,gq("div.hover-contents")),P=c.add(new d6({editor:l},i,n));c.add(P.onDidRenderAsync(()=>{I.className="hover-contents code-hover-contents",s()}));const O=c.add(P.render(x));I.appendChild(O.element),f.appendChild(w)}return{hoverPart:e,hoverElement:d,dispose(){c.dispose()}}}function KLi(l,e){switch(e){case VC.Increase:{const i=l.lookupKeybinding(Jwe);return i?W("increaseVerbosityWithKb","Increase Hover Verbosity ({0})",i.getLabel()):W("increaseVerbosity","Increase Hover Verbosity")}case VC.Decrease:{const i=l.lookupKeybinding(Gwe);return i?W("decreaseVerbosityWithKb","Decrease Hover Verbosity ({0})",i.getLabel()):W("decreaseVerbosity","Decrease Hover Verbosity")}}}function mze(l,e){return!!l[e]}class A9e{constructor(e,i){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=mze(e.event,i.triggerModifier),this.hasSideBySideModifier=mze(e.event,i.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class qwt{constructor(e,i){this.keyCodeIsTriggerKey=e.keyCode===i.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===i.triggerSideBySideKey,this.hasTriggerModifier=mze(e,i.triggerModifier)}}class A0e{constructor(e,i,n,s){this.triggerKey=e,this.triggerModifier=i,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=s}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function $wt(l){return l==="altKey"?Hc?new A0e(57,"metaKey",6,"altKey"):new A0e(5,"ctrlKey",6,"altKey"):Hc?new A0e(6,"altKey",57,"metaKey"):new A0e(6,"altKey",5,"ctrlKey")}class Xwe extends xi{constructor(e,i){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new gi),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new gi),this.onExecute=this._onExecute.event,this._onCancel=this._register(new gi),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=(i==null?void 0:i.extractLineNumberFromMouseEvent)??(n=>n.target.position?n.target.position.lineNumber:0),this._opts=$wt(this._editor.getOption(78)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(n=>{if(n.hasChanged(78)){const s=$wt(this._editor.getOption(78));if(this._opts.equals(s))return;this._opts=s,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(n=>this._onEditorMouseMove(new A9e(n,this._opts)))),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(new A9e(n,this._opts)))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(new A9e(n,this._opts)))),this._register(this._editor.onKeyDown(n=>this._onEditorKeyDown(new qwt(n,this._opts)))),this._register(this._editor.onKeyUp(n=>this._onEditorKeyUp(new qwt(n,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(n=>this._onDidChangeCursorSelection(n))),this._register(this._editor.onDidChangeModel(n=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(n=>{(n.scrollTopChanged||n.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){const i=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===i&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}class ELt{constructor(e,i){this.range=e,this.direction=i}}class zGe{constructor(e,i,n){this.hint=e,this.anchor=i,this.provider=n,this._isResolved=!1}with(e){const i=new zGe(this.hint,e.anchor,this.provider);return i._isResolved=this._isResolved,i._currentResolve=this._currentResolve,i}async resolve(e){if(typeof this.provider.resolveInlayHint=="function"){if(this._currentResolve)return await this._currentResolve,e.isCancellationRequested?void 0:this.resolve(e);this._isResolved||(this._currentResolve=this._doResolve(e).finally(()=>this._currentResolve=void 0)),await this._currentResolve}}async _doResolve(e){try{const i=await Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=(i==null?void 0:i.tooltip)??this.hint.tooltip,this.hint.label=(i==null?void 0:i.label)??this.hint.label,this.hint.textEdits=(i==null?void 0:i.textEdits)??this.hint.textEdits,this._isResolved=!0}catch(i){t_(i),this._isResolved=!1}}}const Oq=class Oq{static async create(e,i,n,s){const c=[],d=e.ordered(i).reverse().map(f=>n.map(async m=>{try{const v=await f.provideInlayHints(i,m,s);(v!=null&&v.hints.length||f.onDidChangeInlayHints)&&c.push([v??Oq._emptyInlayHintList,f])}catch(v){t_(v)}}));if(await Promise.all(d.flat()),s.isCancellationRequested||i.isDisposed())throw new vT;return new Oq(n,c,i)}constructor(e,i,n){this._disposables=new wn,this.ranges=e,this.provider=new Set;const s=[];for(const[c,d]of i){this._disposables.add(c),this.provider.add(d);for(const f of c.hints){const m=n.validatePosition(f.position);let v="before";const x=Oq._getRangeAtPosition(n,m);let w;x.getStartPosition().isBefore(m)?(w=nt.fromPositions(x.getStartPosition(),m),v="after"):(w=nt.fromPositions(m,x.getEndPosition()),v="before"),s.push(new zGe(f,new ELt(w,v),d))}}this.items=s.sort((c,d)=>pi.compare(c.hint.position,d.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,i){const n=i.lineNumber,s=e.getWordAtPosition(i);if(s)return new nt(n,s.startColumn,n,s.endColumn);e.tokenization.tokenizeIfCheap(n);const c=e.tokenization.getLineTokens(n),d=i.column-1,f=c.findTokenIndexAtOffset(d);let m=c.getStartOffset(f),v=c.getEndOffset(f);return v-m===1&&(m===d&&f>1?(m=c.getStartOffset(f-1),v=c.getEndOffset(f-1)):v===d&&f<c.getCount()-1&&(m=c.getStartOffset(f+1),v=c.getEndOffset(f+1))),new nt(n,m+1,n,v+1)}};Oq._emptyInlayHintList=Object.freeze({dispose(){},hints:[]});let Zve=Oq;function XLi(l){return yo.from({scheme:Ma.command,path:l.id,query:l.arguments&&encodeURIComponent(JSON.stringify(l.arguments))}).toString()}var QLi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},h4=function(l,e){return function(i,n){e(i,n,l)}};let kT=class extends Dre{constructor(e,i,n,s,c,d,f,m,v,x,w,I,P){super(e,{...s.getRawOptions(),overflowWidgetsDomNode:s.getOverflowWidgetsDomNode()},n,c,d,f,m,v,x,w,I,P),this._parentEditor=s,this._overwriteOptions=i,super.updateOptions(this._overwriteOptions),this._register(s.onDidChangeConfiguration(O=>this._onParentConfigurationChanged(O)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){TSe(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};kT=QLi([h4(4,ho),h4(5,Bl),h4(6,qd),h4(7,Ko),h4(8,im),h4(9,w_),h4(10,tS),h4(11,rh),h4(12,Ts)],kT);const Jwt=new In(new El(0,122,204)),ZLi={showArrow:!0,showFrame:!0,className:"",frameColor:Jwt,arrowColor:Jwt,keepEditorSelection:!1},YLi="vs.editor.contrib.zoneWidget";class ePi{constructor(e,i,n,s,c,d,f,m){this.id="",this.domNode=e,this.afterLineNumber=i,this.afterColumn=n,this.heightInLines=s,this.showInHiddenAreas=f,this.ordinal=m,this._onDomNodeTop=c,this._onComputedHeight=d}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class tPi{constructor(e,i){this._id=e,this._domNode=i}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}const VCe=class VCe{constructor(e){this._editor=e,this._ruleName=VCe._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),TWe(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){TWe(this._ruleName),lye(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px !important; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:nt.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}};VCe._IdGenerator=new X$e(".arrow-decoration-");let gze=VCe;class iPi{constructor(e,i={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new wn,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=D4(i),TSe(this.options,ZLi,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(n=>{const s=this._getWidth(n);this.domNode.style.width=s+"px",this.domNode.style.left=this._getLeft(n)+"px",this._onWidth(s)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new gze(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&e.minimap.minimapLeft===0?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var i;if(this.domNode.style.height=`${e}px`,this.container){const n=e-this._decoratingElementsHeight();this.container.style.height=`${n}px`;const s=this.editor.getLayoutInfo();this._doLayout(n,this._getWidth(s))}(i=this._resizeSash)==null||i.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,i){const n=nt.isIRange(e)?nt.lift(e):nt.fromPositions(e);this._isShowing=!0,this._showImpl(n,i),this._isShowing=!1,this._positionMarkerId.set([{range:n,options:qa.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(i=>{this._viewZone&&i.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(e=this._arrow)==null||e.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(67);let i=0;if(this.options.showArrow){const n=Math.round(e/3);i+=2*n}if(this.options.showFrame){const n=Math.round(e/9);i+=2*n}return i}_showImpl(e,i){const n=e.getStartPosition(),s=this.editor.getLayoutInfo(),c=this._getWidth(s);this.domNode.style.width=`${c}px`,this.domNode.style.left=this._getLeft(s)+"px";const d=document.createElement("div");d.style.overflow="hidden";const f=this.editor.getOption(67);if(!this.options.allowUnlimitedHeight){const I=Math.max(12,this.editor.getLayoutInfo().height/f*.8);i=Math.min(i,I)}let m=0,v=0;if(this._arrow&&this.options.showArrow&&(m=Math.round(f/3),this._arrow.height=m,this._arrow.show(n)),this.options.showFrame&&(v=Math.round(f/9)),this.editor.changeViewZones(I=>{this._viewZone&&I.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new ePi(d,n.lineNumber,n.column,i,P=>this._onViewZoneTop(P),P=>this._onViewZoneHeight(P),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=I.addZone(this._viewZone),this._overlayWidget=new tPi(YLi+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const I=this.options.frameWidth?this.options.frameWidth:v;this.container.style.borderTopWidth=I+"px",this.container.style.borderBottomWidth=I+"px"}const x=i*f-this._decoratingElementsHeight();this.container&&(this.container.style.top=m+"px",this.container.style.height=x+"px",this.container.style.overflow="hidden"),this._doLayout(x,c),this.options.keepEditorSelection||this.editor.setSelection(e);const w=this.editor.getModel();if(w){const I=w.validateRange(new nt(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(I,I.startLineNumber===w.getLineCount())}}revealRange(e,i){i?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,i){this.container&&(i&&this.container.classList.remove(i),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,i){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(i=>{this._viewZone&&(this._viewZone.heightInLines=e,i.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new _1(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(i=>{this._viewZone&&(e={startY:i.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(i=>{if(e){const n=(i.currentY-e.startY)/this.editor.getOption(67),s=n<0?Math.ceil(n):Math.floor(n),c=e.heightInLines+s;c>5&&c<35&&this._relayout(c)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var ILt=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},NLt=function(l,e){return function(i,n){e(i,n,l)}};const LLt=jc("IPeekViewService");nl(LLt,class{constructor(){this._widgets=new Map}addExclusiveWidget(l,e){const i=this._widgets.get(l);i&&(i.listener.dispose(),i.widget.dispose());const n=()=>{const s=this._widgets.get(l);s&&s.widget===e&&(s.listener.dispose(),this._widgets.delete(l))};this._widgets.set(l,{widget:e,listener:e.onDidClose(n)})}},1);var Pb;(function(l){l.inPeekEditor=new rs("inReferenceSearchEditor",!0,W("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),l.notInPeekEditor=l.inPeekEditor.toNegated()})(Pb||(Pb={}));var _$;let Yve=(_$=class{constructor(e,i){e instanceof kT&&Pb.inPeekEditor.bindTo(i)}dispose(){}},_$.ID="editor.contrib.referenceController",_$);Yve=ILt([NLt(1,Ko)],Yve);Cl(Yve.ID,Yve,0);function nPi(l){const e=l.get(Bl).getFocusedCodeEditor();return e instanceof kT?e.getParentEditor():e}const rPi={headerBackgroundColor:In.white,primaryHeadingColor:In.fromHex("#333333"),secondaryHeadingColor:In.fromHex("#6c6c6cb3")};let ebe=class extends iPi{constructor(e,i,n){super(e,i),this.instantiationService=n,this._onDidClose=new gi,this.onDidClose=this._onDidClose.event,TSe(this.options,rPi,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const i=this.options;e.headerBackgroundColor&&(i.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(i.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(i.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=Cr(".head"),this._bodyElement=Cr(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,i){this._titleElement=Cr(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),ph(this._titleElement,"click",c=>this._onTitleClick(c))),jn(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=Cr("span.filename"),this._secondaryHeading=Cr("span.dirname"),this._metaHeading=Cr("span.meta"),jn(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const n=Cr(".peekview-actions");jn(this._headElement,n);const s=this._getActionBarOptions();this._actionbarWidget=new kw(n,s),this._disposables.add(this._actionbarWidget),i||this._actionbarWidget.push(new $C("peekview.close",W("label.close","Close"),zo.asClassName(pr.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:RDt.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,i){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),i?this._secondaryHeading.innerText=i:s0(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,HC(this._metaHeading)):dv(this._metaHeading))}_doLayout(e,i){if(!this._isShowing&&e<0){this.dispose();return}const n=Math.ceil(this.editor.getOption(67)*1.2),s=Math.round(e-(n+2));this._doLayoutHead(n,i),this._doLayoutBody(s,i)}_doLayoutHead(e,i){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,i){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};ebe=ILt([NLt(2,ho)],ebe);const sPi=It("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:In.black,hcLight:In.white},W("peekViewTitleBackground","Background color of the peek view title area.")),PLt=It("peekViewTitleLabel.foreground",{dark:In.white,light:In.black,hcDark:In.white,hcLight:HL},W("peekViewTitleForeground","Color of the peek view title.")),ALt=It("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},W("peekViewTitleInfoForeground","Color of the peek view title info.")),oPi=It("peekView.border",{dark:LL,light:LL,hcDark:bl,hcLight:bl},W("peekViewBorder","Color of the peek view borders and arrow.")),aPi=It("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:In.black,hcLight:In.white},W("peekViewResultsBackground","Background color of the peek view result list."));It("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:In.white,hcLight:HL},W("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list."));It("peekViewResult.fileForeground",{dark:In.white,light:"#1E1E1E",hcDark:In.white,hcLight:HL},W("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list."));It("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},W("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list."));It("peekViewResult.selectionForeground",{dark:In.white,light:"#6C6C6C",hcDark:In.white,hcLight:HL},W("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list."));const OLt=It("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:In.black,hcLight:In.white},W("peekViewEditorBackground","Background color of the peek view editor."));It("peekViewEditorGutter.background",OLt,W("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor."));It("peekViewEditorStickyScroll.background",OLt,W("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor."));It("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},W("peekViewResultsMatchHighlight","Match highlight color in the peek view result list."));It("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},W("peekViewEditorMatchHighlight","Match highlight color in the peek view editor."));It("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:yf,hcLight:yf},W("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));class AR{constructor(e,i,n,s){this.isProviderFirst=e,this.parent=i,this.link=n,this._rangeCallback=s,this.id=mVe.nextId()}get uri(){return this.link.uri}get range(){return this._range??this.link.targetSelectionRange??this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var i;const e=(i=this.parent.getPreview(this))==null?void 0:i.preview(this.range);return e?W({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"{0} in {1} on line {2} at column {3}",e.value,wk(this.uri),this.range.startLineNumber,this.range.startColumn):W("aria.oneReference","in {0} on line {1} at column {2}",wk(this.uri),this.range.startLineNumber,this.range.startColumn)}}class cPi{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,i=8){const n=this._modelReference.object.textEditorModel;if(!n)return;const{startLineNumber:s,startColumn:c,endLineNumber:d,endColumn:f}=e,m=n.getWordUntilPosition({lineNumber:s,column:c-i}),v=new nt(s,m.startColumn,s,c),x=new nt(d,f,d,1073741824),w=n.getValueInRange(v).replace(/^\s+/,""),I=n.getValueInRange(e),P=n.getValueInRange(x).replace(/\s+$/,"");return{value:w+I+P,highlight:{start:w.length,end:w.length+I.length}}}}class zre{constructor(e,i){this.parent=e,this.uri=i,this.children=[],this._previews=new vg}dispose(){vd(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?W("aria.fileReferences.1","1 symbol in {0}, full path {1}",wk(this.uri),this.uri.fsPath):W("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,wk(this.uri),this.uri.fsPath)}async resolve(e){if(this._previews.size!==0)return this;for(const i of this.children)if(!this._previews.has(i.uri))try{const n=await e.createModelReference(i.uri);this._previews.set(i.uri,new cPi(n))}catch(n){Pa(n)}return this}}class KC{constructor(e,i){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new gi,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=i;const[n]=e;e.sort(KC._compareReferences);let s;for(const c of e)if((!s||!vf.isEqual(s.uri,c.uri,!0))&&(s=new zre(this,c.uri),this.groups.push(s)),s.children.length===0||KC._compareReferences(c,s.children[s.children.length-1])!==0){const d=new AR(n===c,s,c,f=>this._onDidChangeReferenceRange.fire(f));this.references.push(d),s.children.push(d)}}dispose(){vd(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new KC(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?W("aria.result.0","No results found"):this.references.length===1?W("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?W("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):W("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,i){const{parent:n}=e;let s=n.children.indexOf(e);const c=n.children.length,d=n.parent.groups.length;return d===1||i&&s+1<c||!i&&s>0?(i?s=(s+1)%c:s=(s+c-1)%c,n.children[s]):(s=n.parent.groups.indexOf(n),i?(s=(s+1)%d,n.parent.groups[s].children[0]):(s=(s+d-1)%d,n.parent.groups[s].children[n.parent.groups[s].children.length-1]))}nearestReference(e,i){const n=this.references.map((s,c)=>({idx:c,prefixLen:vR(s.uri.toString(),e.toString()),offsetDist:Math.abs(s.range.startLineNumber-i.lineNumber)*100+Math.abs(s.range.startColumn-i.column)})).sort((s,c)=>s.prefixLen>c.prefixLen?-1:s.prefixLen<c.prefixLen?1:s.offsetDist<c.offsetDist?-1:s.offsetDist>c.offsetDist?1:0)[0];if(n)return this.references[n.idx]}referenceAt(e,i){for(const n of this.references)if(n.uri.toString()===e.toString()&&nt.containsPosition(n.range,i))return n}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,i){return vf.compare(e.uri,i.uri)||nt.compareRangesUsingStarts(e.range,i.range)}}var Qwe=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Zwe=function(l,e){return function(i,n){e(i,n,l)}},yze;let vze=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof KC||e instanceof zre}getChildren(e){if(e instanceof KC)return e.groups;if(e instanceof zre)return e.resolve(this._resolverService).then(i=>i.children);throw new Error("bad tree")}};vze=Qwe([Zwe(0,Ob)],vze);class lPi{getHeight(){return 23}getTemplateId(e){return e instanceof zre?tbe.id:ibe.id}}let bze=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var i;if(e instanceof AR){const n=(i=e.parent.getPreview(e))==null?void 0:i.preview(e.range);if(n)return n.value}return wk(e.uri)}};bze=Qwe([Zwe(0,pu)],bze);class uPi{getId(e){return e instanceof AR?e.id:e.uri}}let Cze=class extends xi{constructor(e,i){super(),this._labelService=i;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new uve(n,{supportHighlights:!0})),this.badge=new pHe(jn(n,Cr(".count")),{},ODt),e.appendChild(n)}set(e,i){const n=lwe(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(n,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:i});const s=e.children.length;this.badge.setCount(s),s>1?this.badge.setTitleFormat(W("referencesCount","{0} references",s)):this.badge.setTitleFormat(W("referenceCount","{0} reference",s))}};Cze=Qwe([Zwe(1,F$)],Cze);var B9;let tbe=(B9=class{constructor(e){this._instantiationService=e,this.templateId=yze.id}renderTemplate(e){return this._instantiationService.createInstance(Cze,e)}renderElement(e,i,n){n.set(e.element,bse(e.filterData))}disposeTemplate(e){e.dispose()}},yze=B9,B9.id="FileReferencesRenderer",B9);tbe=yze=Qwe([Zwe(0,ho)],tbe);class dPi extends xi{constructor(e){super(),this.label=this._register(new XM(e))}set(e,i){var s;const n=(s=e.parent.getPreview(e))==null?void 0:s.preview(e.range);if(!n||!n.value)this.label.set(`${wk(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:c,highlight:d}=n;i&&!BE.isDefault(i)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(c,bse(i))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(c,[d]))}}}const HCe=class HCe{constructor(){this.templateId=HCe.id}renderTemplate(e){return new dPi(e)}renderElement(e,i,n){n.set(e.element,e.filterData)}disposeTemplate(e){e.dispose()}};HCe.id="OneReferenceRenderer";let ibe=HCe;class fPi{getWidgetAriaLabel(){return W("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var hPi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},AU=function(l,e){return function(i,n){e(i,n,l)}};const jCe=class jCe{constructor(e,i){this._editor=e,this._model=i,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new wn,this._callOnModelChange=new wn,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e){for(const i of this._model.references)if(i.uri.toString()===e.uri.toString()){this._addDecorations(i.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const i=[],n=[];for(let s=0,c=e.children.length;s<c;s++){const d=e.children[s];this._decorationIgnoreSet.has(d.id)||d.uri.toString()===this._editor.getModel().uri.toString()&&(i.push({range:d.range,options:jCe.DecorationOptions}),n.push(s))}this._editor.changeDecorations(s=>{const c=s.deltaDecorations([],i);for(let d=0;d<c.length;d++)this._decorations.set(c[d],e.children[n[d]])})}_onDecorationChanged(){const e=[],i=this._editor.getModel();if(i){for(const[n,s]of this._decorations){const c=i.getDecorationRange(n);if(!c)continue;let d=!1;if(!nt.equalsRange(c,s.range)){if(nt.spansMultipleLines(c))d=!0;else{const f=s.range.endColumn-s.range.startColumn,m=c.endColumn-c.startColumn;f!==m&&(d=!0)}d?(this._decorationIgnoreSet.add(s.id),e.push(n)):s.range=c}}for(let n=0,s=e.length;n<s;n++)this._decorations.delete(e[n]);this._editor.removeDecorations(e)}}removeDecorations(){this._editor.removeDecorations([...this._decorations.keys()]),this._decorations.clear()}};jCe.DecorationOptions=qa.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});let Sze=jCe;class _Pi{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(e){let i,n;try{const s=JSON.parse(e);i=s.ratio,n=s.heightInLines}catch{}return{ratio:i||.7,heightInLines:n||18}}}class pPi extends wHe{}let wze=class extends ebe{constructor(e,i,n,s,c,d,f,m,v){super(e,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},d),this._defaultTreeKeyboardSupport=i,this.layoutData=n,this._textModelResolverService=c,this._instantiationService=d,this._peekViewService=f,this._uriLabel=m,this._keybindingService=v,this._disposeOnNewModel=new wn,this._callOnDispose=new wn,this._onDidSelectReference=new gi,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new Du(0,0),this._isClosing=!1,this._applyTheme(s.getColorTheme()),this._callOnDispose.add(s.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(e,this),this.create()}get isClosing(){return this._isClosing}dispose(){this._isClosing=!0,this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),vd(this._preview),vd(this._previewNotAvailableMessage),vd(this._tree),vd(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(e){const i=e.getColor(oPi)||In.transparent;this.style({arrowColor:i,frameColor:i,headerBackgroundColor:e.getColor(sPi)||In.transparent,primaryHeadingColor:e.getColor(PLt),secondaryHeadingColor:e.getColor(ALt)})}show(e){super.show(e,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(e){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:e.ctrlKey||e.metaKey||e.altKey?"side":"open",source:"title"})}_fillBody(e){this.setCssClass("reference-zone-widget"),this._messageContainer=jn(e,Cr("div.messages")),dv(this._messageContainer),this._splitView=new TEt(e,{orientation:1}),this._previewContainer=jn(e,Cr("div.preview.inline"));const i={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!0},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(kT,this._previewContainer,i,{},this.editor),dv(this._previewContainer),this._previewNotAvailableMessage=this._instantiationService.createInstance(LE,W("missingPreviewMessage","no preview available"),bv,LE.DEFAULT_CREATION_OPTIONS,null),this._treeContainer=jn(e,Cr("div.ref-tree.inline"));const n={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new fPi,keyboardNavigationLabelProvider:this._instantiationService.createInstance(bze),identityProvider:new uPi,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:aPi}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(ph(this._treeContainer,"keydown",c=>{c.equals(9)&&(this._keybindingService.dispatchEvent(c,c.target),c.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(pPi,"ReferencesWidget",this._treeContainer,new lPi,[this._instantiationService.createInstance(tbe),this._instantiationService.createInstance(ibe)],this._instantiationService.createInstance(vze),n),this._splitView.addView({onDidChange:Tr.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:c=>{this._preview.layout({height:this._dim.height,width:c})}},nve.Distribute),this._splitView.addView({onDidChange:Tr.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:c=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${c}px`,this._tree.layout(this._dim.height,c)}},nve.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const s=(c,d)=>{c instanceof AR&&(d==="show"&&this._revealReference(c,!1),this._onDidSelectReference.fire({element:c,kind:d,source:"tree"}))};this._disposables.add(this._tree.onDidOpen(c=>{c.sideBySide?s(c.element,"side"):c.editorOptions.pinned?s(c.element,"goto"):s(c.element,"show")})),dv(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,i){super._doLayoutBody(e,i),this._dim=new Du(i,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(i),this._splitView.resizeView(0,i*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=W("noResults","No results"),HC(this._messageContainer),Promise.resolve(void 0)):(dv(this._messageContainer),this._decorationsManager=new Sze(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{const{event:i,target:n}=e;if(i.detail!==2)return;const s=this._getFocusedReference();s&&this._onDidSelectReference.fire({element:{uri:s.uri,range:n.range},kind:i.ctrlKey||i.metaKey||i.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),HC(this._treeContainer),HC(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();if(e instanceof AR)return e;if(e instanceof zre&&e.children.length>0)return e.children[0]}async revealReference(e){await this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}async _revealReference(e,i){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==Ma.inMemory?this.setTitle(xgi(e.uri),this._uriLabel.getUriLabel(lwe(e.uri))):this.setTitle(W("peekView.alternateTitle","References"));const n=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(i&&this._tree.reveal(e.parent),await this._tree.expand(e.parent),this._tree.reveal(e));const s=await n;if(!this._model){s.dispose();return}vd(this._previewModelReference);const c=s.object;if(c){const d=this._preview.getModel()===c.textEditorModel?0:1,f=nt.lift(e.range).collapseToStart();this._previewModelReference=s,this._preview.setModel(c.textEditorModel),this._preview.setSelection(f),this._preview.revealRangeInCenter(f,d)}else this._preview.setModel(this._previewNotAvailableMessage),s.dispose()}};wze=hPi([AU(3,im),AU(4,Ob),AU(5,ho),AU(6,LLt),AU(7,F$),AU(8,pu)],wze);var mPi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},OU=function(l,e){return function(i,n){e(i,n,l)}},A1e;const dW=new rs("referenceSearchVisible",!1,W("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));var W9;let UB=(W9=class{static get(e){return e.getContribution(A1e.ID)}constructor(e,i,n,s,c,d,f,m){this._defaultTreeKeyboardSupport=e,this._editor=i,this._editorService=s,this._notificationService=c,this._instantiationService=d,this._storageService=f,this._configurationService=m,this._disposables=new wn,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=dW.bindTo(n)}dispose(){var e,i;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)==null||e.dispose(),(i=this._model)==null||i.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,i,n){let s;if(this._widget&&(s=this._widget.position),this.closeWidget(),s&&e.containsPosition(s))return;this._peekMode=n,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const c="peekViewLayout",d=_Pi.fromJSON(this._storageService.get(c,0,"{}"));this._widget=this._instantiationService.createInstance(wze,this._editor,this._defaultTreeKeyboardSupport,d),this._widget.setTitle(W("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{i.cancel(),this._widget?(this._storageService.store(c,JSON.stringify(this._widget.layoutData),0,1),this._widget.isClosing||this.closeWidget(),this._widget=void 0):this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(m=>{const{element:v,kind:x}=m;if(v)switch(x){case"open":(m.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(v,!1,!1);break;case"side":this.openReference(v,!0,!1);break;case"goto":n?this._gotoReference(v,!0):this.openReference(v,!1,!0);break}}));const f=++this._requestIdPool;i.then(m=>{var v;if(f!==this._requestIdPool||!this._widget){m.dispose();return}return(v=this._model)==null||v.dispose(),this._model=m,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(W("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const x=this._editor.getModel().uri,w=new pi(e.startLineNumber,e.startColumn),I=this._model.nearestReference(x,w);if(I)return this._widget.setSelection(I).then(()=>{this._widget&&this._editor.getOption(87)==="editor"&&this._widget.focusOnPreviewEditor()})}})},m=>{this._notificationService.error(m)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}async goToNextOrPreviousReference(e){if(!this._editor.hasModel()||!this._model||!this._widget)return;const i=this._widget.position;if(!i)return;const n=this._model.nearestReference(this._editor.getModel().uri,i);if(!n)return;const s=this._model.nextOrPreviousReference(n,e),c=this._editor.hasTextFocus(),d=this._widget.isPreviewEditorFocused();await this._widget.setSelection(s),await this._gotoReference(s,!1),c?this._editor.focus():this._widget&&d&&this._widget.focusOnPreviewEditor()}async revealReference(e){!this._editor.hasModel()||!this._model||!this._widget||await this._widget.revealReference(e)}closeWidget(e=!0){var i,n;(i=this._widget)==null||i.dispose(),(n=this._model)==null||n.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,i){var s;(s=this._widget)==null||s.hide(),this._ignoreModelChangeEvent=!0;const n=nt.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:n,selectionSource:"code.jump",pinned:i}},this._editor).then(c=>{if(this._ignoreModelChangeEvent=!1,!c||!this._widget){this.closeWidget();return}if(this._editor===c)this._widget.show(n),this._widget.focusOnReferenceTree();else{const d=A1e.get(c),f=this._model.clone();this.closeWidget(),c.focus(),d==null||d.toggleWidget(n,Om(m=>Promise.resolve(f)),this._peekMode??!1)}},c=>{this._ignoreModelChangeEvent=!1,Pa(c)})}openReference(e,i,n){i||this.closeWidget();const{uri:s,range:c}=e;this._editorService.openCodeEditor({resource:s,options:{selection:c,selectionSource:"code.jump",pinned:n}},this._editor,i)}},A1e=W9,W9.ID="editor.contrib.referencesController",W9);UB=A1e=mPi([OU(2,Ko),OU(3,Bl),OU(4,w_),OU(5,ho),OU(6,ET),OU(7,Cc)],UB);function fW(l,e){const i=nPi(l);if(!i)return;const n=UB.get(i);n&&e(n)}wv.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:pp(2089,60),when:kn.or(dW,Pb.inPeekEditor),handler(l){fW(l,e=>{e.changeFocusBetweenPreviewAndReferences()})}});wv.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:kn.or(dW,Pb.inPeekEditor),handler(l){fW(l,e=>{e.goToNextOrPreviousReference(!0)})}});wv.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:kn.or(dW,Pb.inPeekEditor),handler(l){fW(l,e=>{e.goToNextOrPreviousReference(!1)})}});fl.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");fl.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");fl.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");fl.registerCommand("closeReferenceSearch",l=>fW(l,e=>e.closeWidget()));wv.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:kn.and(Pb.inPeekEditor,kn.not("config.editor.stablePeek"))});wv.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:kn.and(dW,kn.not("config.editor.stablePeek"),kn.or(Tt.editorTextFocus,REt.negate()))});wv.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:kn.and(dW,WEt,AJe.negate(),OJe.negate()),handler(l){var n;const i=(n=l.get(Ik).lastFocusedList)==null?void 0:n.getFocus();Array.isArray(i)&&i[0]instanceof AR&&fW(l,s=>s.revealReference(i[0]))}});wv.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:kn.and(dW,WEt,AJe.negate(),OJe.negate()),handler(l){var n;const i=(n=l.get(Ik).lastFocusedList)==null?void 0:n.getFocus();Array.isArray(i)&&i[0]instanceof AR&&fW(l,s=>s.openReference(i[0],!0,!0))}});fl.registerCommand("openReference",l=>{var n;const i=(n=l.get(Ik).lastFocusedList)==null?void 0:n.getFocus();Array.isArray(i)&&i[0]instanceof AR&&fW(l,s=>s.openReference(i[0],!1,!0))});var MLt=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},fie=function(l,e){return function(i,n){e(i,n,l)}};const UGe=new rs("hasSymbols",!1,W("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),Ywe=jc("ISymbolNavigationService");let xze=class{constructor(e,i,n,s){this._editorService=i,this._notificationService=n,this._keybindingService=s,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=UGe.bindTo(e)}reset(){var e,i;this._ctxHasSymbols.reset(),(e=this._currentState)==null||e.dispose(),(i=this._currentMessage)==null||i.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const i=e.parent.parent;if(i.references.length<=1){this.reset();return}this._currentModel=i,this._currentIdx=i.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const n=new kze(this._editorService),s=n.onDidChange(c=>{if(this._ignoreEditorChange)return;const d=this._editorService.getActiveCodeEditor();if(!d)return;const f=d.getModel(),m=d.getPosition();if(!f||!m)return;let v=!1,x=!1;for(const w of i.references)if(ire(w.uri,f.uri))v=!0,x=x||nt.containsPosition(w.range,m);else if(v)break;(!v||!x)&&this.reset()});this._currentState=gT(n,s)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const i=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:i.uri,options:{selection:nt.collapseToStart(i.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var n;(n=this._currentMessage)==null||n.dispose();const e=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=e?W("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,e.getLabel()):W("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};xze=MLt([fie(0,Ko),fie(1,Bl),fie(2,w_),fie(3,pu)],xze);nl(Ywe,xze,1);$r(new class extends tm{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:UGe,kbOpts:{weight:100,primary:70}})}runEditorCommand(l,e){return l.get(Ywe).revealNext(e)}});wv.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:UGe,primary:9,handler(l){l.get(Ywe).reset()}});let kze=class{constructor(e){this._listener=new Map,this._disposables=new wn,this._onDidChange=new gi,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),vd(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,gT(e.onDidChangeCursorPosition(i=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(i=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var i;(i=this._listener.get(e))==null||i.dispose(),this._listener.delete(e)}};kze=MLt([fie(0,Bl)],kze);function Tze(l,e){return e.uri.scheme===l.uri.scheme?!0:!SWe(e.uri,Ma.walkThroughSnippet,Ma.vscodeChatCodeBlock,Ma.vscodeChatCodeCompareBlock)}async function zse(l,e,i,n,s){const d=i.ordered(l,n).map(m=>Promise.resolve(s(m,l,e)).then(void 0,v=>{t_(v)})),f=await Promise.all(d);return yT(f.flat()).filter(m=>Tze(l,m))}function Use(l,e,i,n,s){return zse(e,i,l,n,(c,d,f)=>c.provideDefinition(d,f,s))}function qGe(l,e,i,n,s){return zse(e,i,l,n,(c,d,f)=>c.provideDeclaration(d,f,s))}function $Ge(l,e,i,n,s){return zse(e,i,l,n,(c,d,f)=>c.provideImplementation(d,f,s))}function JGe(l,e,i,n,s){return zse(e,i,l,n,(c,d,f)=>c.provideTypeDefinition(d,f,s))}function qse(l,e,i,n,s,c){return zse(e,i,l,s,async(d,f,m)=>{var w,I;const v=(w=await d.provideReferences(f,m,{includeDeclaration:!0},c))==null?void 0:w.filter(P=>Tze(f,P));if(!n||!v||v.length!==2)return v;const x=(I=await d.provideReferences(f,m,{includeDeclaration:!1},c))==null?void 0:I.filter(P=>Tze(f,P));return x&&x.length===1?x:v})}async function qL(l){const e=await l(),i=new KC(e,""),n=i.references.map(s=>s.link);return i.dispose(),n}Mb("_executeDefinitionProvider",(l,e,i)=>{const n=l.get(Ts),s=Use(n.definitionProvider,e,i,!1,cc.None);return qL(()=>s)});Mb("_executeDefinitionProvider_recursive",(l,e,i)=>{const n=l.get(Ts),s=Use(n.definitionProvider,e,i,!0,cc.None);return qL(()=>s)});Mb("_executeTypeDefinitionProvider",(l,e,i)=>{const n=l.get(Ts),s=JGe(n.typeDefinitionProvider,e,i,!1,cc.None);return qL(()=>s)});Mb("_executeTypeDefinitionProvider_recursive",(l,e,i)=>{const n=l.get(Ts),s=JGe(n.typeDefinitionProvider,e,i,!0,cc.None);return qL(()=>s)});Mb("_executeDeclarationProvider",(l,e,i)=>{const n=l.get(Ts),s=qGe(n.declarationProvider,e,i,!1,cc.None);return qL(()=>s)});Mb("_executeDeclarationProvider_recursive",(l,e,i)=>{const n=l.get(Ts),s=qGe(n.declarationProvider,e,i,!0,cc.None);return qL(()=>s)});Mb("_executeReferenceProvider",(l,e,i)=>{const n=l.get(Ts),s=qse(n.referenceProvider,e,i,!1,!1,cc.None);return qL(()=>s)});Mb("_executeReferenceProvider_recursive",(l,e,i)=>{const n=l.get(Ts),s=qse(n.referenceProvider,e,i,!1,!0,cc.None);return qL(()=>s)});Mb("_executeImplementationProvider",(l,e,i)=>{const n=l.get(Ts),s=$Ge(n.implementationProvider,e,i,!1,cc.None);return qL(()=>s)});Mb("_executeImplementationProvider_recursive",(l,e,i)=>{const n=l.get(Ts),s=$Ge(n.implementationProvider,e,i,!0,cc.None);return qL(()=>s)});yg.appendMenuItem(As.EditorContext,{submenu:As.EditorContextPeek,title:W("peek.submenu","Peek"),group:"navigation",order:100});class Y${static is(e){return!e||typeof e!="object"?!1:!!(e instanceof Y$||pi.isIPosition(e.position)&&e.model)}constructor(e,i){this.model=e,this.position=i}}const sT=class sT extends XE{static all(){return sT._allSymbolNavigationCommands.values()}static _patchConfig(e){const i={...e,f1:!0};if(i.menu)for(const n of dl.wrap(i.menu))(n.id===As.EditorContext||n.id===As.EditorContextPeek)&&(n.when=kn.and(e.precondition,n.when));return i}constructor(e,i){super(sT._patchConfig(i)),this.configuration=e,sT._allSymbolNavigationCommands.set(i.id,this)}runEditorCommand(e,i,n,s){if(!i.hasModel())return Promise.resolve(void 0);const c=e.get(w_),d=e.get(Bl),f=e.get(WR),m=e.get(Ywe),v=e.get(Ts),x=e.get(ho),w=i.getModel(),I=i.getPosition(),P=Y$.is(n)?n:new Y$(w,I),O=new LR(i,5),z=_se(this._getLocationModel(v,P.model,P.position,O.token),O.token).then(async J=>{var me;if(!J||O.token.isCancellationRequested)return;xv(J.ariaMessage);let Y;if(J.referenceAt(w.uri,I)){const ye=this._getAlternativeCommand(i);!sT._activeAlternativeCommands.has(ye)&&sT._allSymbolNavigationCommands.has(ye)&&(Y=sT._allSymbolNavigationCommands.get(ye))}const ae=J.references.length;if(ae===0){if(!this.configuration.muteMessage){const ye=w.getWordAtPosition(I);(me=GC.get(i))==null||me.showMessage(this._getNoResultFoundMessage(ye),I)}}else if(ae===1&&Y)sT._activeAlternativeCommands.add(this.desc.id),x.invokeFunction(ye=>Y.runEditorCommand(ye,i,n,s).finally(()=>{sT._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(d,m,i,J,s)},J=>{c.error(J)}).finally(()=>{O.dispose()});return f.showWhile(z,250),z}async _onResult(e,i,n,s,c){const d=this._getGoToPreference(n);if(!(n instanceof kT)&&(this.configuration.openInPeek||d==="peek"&&s.references.length>1))this._openInPeek(n,s,c);else{const f=s.firstReference(),m=s.references.length>1&&d==="gotoAndPeek",v=await this._openReference(n,e,f,this.configuration.openToSide,!m);m&&v?this._openInPeek(v,s,c):s.dispose(),d==="goto"&&i.put(f)}}async _openReference(e,i,n,s,c){let d;if(Rli(n)&&(d=n.targetSelectionRange),d||(d=n.range),!d)return;const f=await i.openCodeEditor({resource:n.uri,options:{selection:nt.collapseToStart(d),selectionRevealType:3,selectionSource:"code.jump"}},e,s);if(f){if(c){const m=f.getModel(),v=f.createDecorationsCollection([{range:d,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{f.getModel()===m&&v.clear()},350)}return f}}_openInPeek(e,i,n){const s=UB.get(e);s&&e.hasModel()?s.toggleWidget(n??e.getSelection(),Om(c=>Promise.resolve(i)),this.configuration.openInPeek):i.dispose()}};sT._allSymbolNavigationCommands=new Map,sT._activeAlternativeCommands=new Set;let p6=sT;class $se extends p6{async _getLocationModel(e,i,n,s){return new KC(await Use(e.definitionProvider,i,n,!1,s),W("def.title","Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?W("noResultWord","No definition found for '{0}'",e.word):W("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}}var rR;Nd((rR=class extends $se{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:rR.id,title:{...aa("actions.goToDecl.label","Go to Definition"),mnemonicTitle:W({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:Tt.hasDefinitionProvider,keybinding:[{when:Tt.editorTextFocus,primary:70,weight:100},{when:kn.and(Tt.editorTextFocus,OEt),primary:2118,weight:100}],menu:[{id:As.EditorContext,group:"navigation",order:1.1},{id:As.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),fl.registerCommandAlias("editor.action.goToDeclaration",rR.id)}},rR.id="editor.action.revealDefinition",rR));var sR;Nd((sR=class extends $se{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:sR.id,title:aa("actions.goToDeclToSide.label","Open Definition to the Side"),precondition:kn.and(Tt.hasDefinitionProvider,Tt.isInEmbeddedEditor.toNegated()),keybinding:[{when:Tt.editorTextFocus,primary:pp(2089,70),weight:100},{when:kn.and(Tt.editorTextFocus,OEt),primary:pp(2089,2118),weight:100}]}),fl.registerCommandAlias("editor.action.openDeclarationToTheSide",sR.id)}},sR.id="editor.action.revealDefinitionAside",sR));var oR;Nd((oR=class extends $se{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:oR.id,title:aa("actions.previewDecl.label","Peek Definition"),precondition:kn.and(Tt.hasDefinitionProvider,Pb.notInPeekEditor,Tt.isInEmbeddedEditor.toNegated()),keybinding:{when:Tt.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:As.EditorContextPeek,group:"peek",order:2}}),fl.registerCommandAlias("editor.action.previewDeclaration",oR.id)}},oR.id="editor.action.peekDefinition",oR));class RLt extends p6{async _getLocationModel(e,i,n,s){return new KC(await qGe(e.declarationProvider,i,n,!1,s),W("decl.title","Declarations"))}_getNoResultFoundMessage(e){return e&&e.word?W("decl.noResultWord","No declaration found for '{0}'",e.word):W("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}}var V9;Nd((V9=class extends RLt{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:V9.id,title:{...aa("actions.goToDeclaration.label","Go to Declaration"),mnemonicTitle:W({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:kn.and(Tt.hasDeclarationProvider,Tt.isInEmbeddedEditor.toNegated()),menu:[{id:As.EditorContext,group:"navigation",order:1.3},{id:As.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?W("decl.noResultWord","No declaration found for '{0}'",e.word):W("decl.generic.noResults","No declaration found")}},V9.id="editor.action.revealDeclaration",V9));Nd(class extends RLt{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:aa("actions.peekDecl.label","Peek Declaration"),precondition:kn.and(Tt.hasDeclarationProvider,Pb.notInPeekEditor,Tt.isInEmbeddedEditor.toNegated()),menu:{id:As.EditorContextPeek,group:"peek",order:3}})}});class FLt extends p6{async _getLocationModel(e,i,n,s){return new KC(await JGe(e.typeDefinitionProvider,i,n,!1,s),W("typedef.title","Type Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?W("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):W("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}}var H9;Nd((H9=class extends FLt{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:H9.ID,title:{...aa("actions.goToTypeDefinition.label","Go to Type Definition"),mnemonicTitle:W({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:Tt.hasTypeDefinitionProvider,keybinding:{when:Tt.editorTextFocus,primary:0,weight:100},menu:[{id:As.EditorContext,group:"navigation",order:1.4},{id:As.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},H9.ID="editor.action.goToTypeDefinition",H9));var j9;Nd((j9=class extends FLt{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:j9.ID,title:aa("actions.peekTypeDefinition.label","Peek Type Definition"),precondition:kn.and(Tt.hasTypeDefinitionProvider,Pb.notInPeekEditor,Tt.isInEmbeddedEditor.toNegated()),menu:{id:As.EditorContextPeek,group:"peek",order:4}})}},j9.ID="editor.action.peekTypeDefinition",j9));class BLt extends p6{async _getLocationModel(e,i,n,s){return new KC(await $Ge(e.implementationProvider,i,n,!1,s),W("impl.title","Implementations"))}_getNoResultFoundMessage(e){return e&&e.word?W("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):W("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}}var z9;Nd((z9=class extends BLt{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:z9.ID,title:{...aa("actions.goToImplementation.label","Go to Implementations"),mnemonicTitle:W({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:Tt.hasImplementationProvider,keybinding:{when:Tt.editorTextFocus,primary:2118,weight:100},menu:[{id:As.EditorContext,group:"navigation",order:1.45},{id:As.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},z9.ID="editor.action.goToImplementation",z9));var U9;Nd((U9=class extends BLt{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:U9.ID,title:aa("actions.peekImplementation.label","Peek Implementations"),precondition:kn.and(Tt.hasImplementationProvider,Pb.notInPeekEditor,Tt.isInEmbeddedEditor.toNegated()),keybinding:{when:Tt.editorTextFocus,primary:3142,weight:100},menu:{id:As.EditorContextPeek,group:"peek",order:5}})}},U9.ID="editor.action.peekImplementation",U9));class WLt extends p6{_getNoResultFoundMessage(e){return e?W("references.no","No references found for '{0}'",e.word):W("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}}Nd(class extends WLt{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{...aa("goToReferences.label","Go to References"),mnemonicTitle:W({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:kn.and(Tt.hasReferenceProvider,Pb.notInPeekEditor,Tt.isInEmbeddedEditor.toNegated()),keybinding:{when:Tt.editorTextFocus,primary:1094,weight:100},menu:[{id:As.EditorContext,group:"navigation",order:1.45},{id:As.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}async _getLocationModel(e,i,n,s){return new KC(await qse(e.referenceProvider,i,n,!0,!1,s),W("ref.title","References"))}});Nd(class extends WLt{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:aa("references.action.label","Peek References"),precondition:kn.and(Tt.hasReferenceProvider,Pb.notInPeekEditor,Tt.isInEmbeddedEditor.toNegated()),menu:{id:As.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(e,i,n,s){return new KC(await qse(e.referenceProvider,i,n,!1,!1,s),W("ref.title","References"))}});class gPi extends p6{constructor(e,i,n){super(e,{id:"editor.action.goToLocation",title:aa("label.generic","Go to Any Symbol"),precondition:kn.and(Pb.notInPeekEditor,Tt.isInEmbeddedEditor.toNegated())}),this._references=i,this._gotoMultipleBehaviour=n}async _getLocationModel(e,i,n,s){return new KC(this._references,W("generic.title","Locations"))}_getNoResultFoundMessage(e){return e&&W("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){return this._gotoMultipleBehaviour??e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}fl.registerCommand({id:"editor.action.goToLocations",metadata:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:yo},{name:"position",description:"The position at which to start",constraint:pi.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:async(l,e,i,n,s,c,d)=>{Fl(yo.isUri(e)),Fl(pi.isIPosition(i)),Fl(Array.isArray(n)),Fl(typeof s>"u"||typeof s=="string"),Fl(typeof d>"u"||typeof d=="boolean");const f=l.get(Bl),m=await f.openCodeEditor({resource:e},f.getFocusedCodeEditor());if(FL(m))return m.setPosition(i),m.revealPositionInCenterIfOutsideViewport(i,0),m.invokeWithinContext(v=>{const x=new class extends gPi{_getNoResultFoundMessage(w){return c||super._getNoResultFoundMessage(w)}}({muteMessage:!c,openInPeek:!!d,openToSide:!1},n,s);v.get(ho).invokeFunction(x.run.bind(x),m)})}});fl.registerCommand({id:"editor.action.peekLocations",metadata:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:yo},{name:"position",description:"The position at which to start",constraint:pi.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"}]},handler:async(l,e,i,n,s)=>{l.get(qd).executeCommand("editor.action.goToLocations",e,i,n,s,void 0,!0)}});fl.registerCommand({id:"editor.action.findReferences",handler:(l,e,i)=>{Fl(yo.isUri(e)),Fl(pi.isIPosition(i));const n=l.get(Ts),s=l.get(Bl);return s.openCodeEditor({resource:e},s.getFocusedCodeEditor()).then(c=>{if(!FL(c)||!c.hasModel())return;const d=UB.get(c);if(!d)return;const f=Om(v=>qse(n.referenceProvider,c.getModel(),pi.lift(i),!1,!1,v).then(x=>new KC(x,W("ref.title","References")))),m=new nt(i.lineNumber,i.column,i.lineNumber,i.column);return Promise.resolve(d.toggleWidget(m,f,!1))})}});fl.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");async function yPi(l,e,i,n){const s=l.get(Ob),c=l.get(eS),d=l.get(qd),f=l.get(ho),m=l.get(w_);if(await n.item.resolve(cc.None),!n.part.location)return;const v=n.part.location,x=[],w=new Set(yg.getMenuItems(As.EditorContext).map(P=>jq(P)?P.command.id:qwe()));for(const P of p6.all())w.has(P.desc.id)&&x.push(new $C(P.desc.id,JC.label(P.desc,{renderShortTitle:!0}),void 0,!0,async()=>{const O=await s.createModelReference(v.uri);try{const z=new Y$(O.object.textEditorModel,nt.getStartPosition(v.range)),J=n.item.anchor.range;await f.invokeFunction(P.runEditorCommand.bind(P),e,z,J)}finally{O.dispose()}}));if(n.part.command){const{command:P}=n.part;x.push(new Rm),x.push(new $C(P.id,P.title,void 0,!0,async()=>{try{await d.executeCommand(P.id,...P.arguments??[])}catch(O){m.notify({severity:QSe.Error,source:n.item.provider.displayName,message:O})}}))}const I=e.getOption(128);c.showContextMenu({domForShadowRoot:I?e.getDomNode()??void 0:void 0,getAnchor:()=>{const P=e_(i);return{x:P.left,y:P.top+P.height+8}},getActions:()=>x,onHide:()=>{e.focus()},autoSelectFirstItem:!0})}async function VLt(l,e,i,n){const c=await l.get(Ob).createModelReference(n.uri);await i.invokeWithinContext(async d=>{const f=e.hasSideBySideModifier,m=d.get(Ko),v=Pb.inPeekEditor.getValue(m),x=!f&&i.getOption(89)&&!v;return new $se({openToSide:f,openInPeek:x,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(d,new Y$(c.object.textEditorModel,nt.getStartPosition(n.range)),nt.lift(n.range))}),c.dispose()}var vPi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},MU=function(l,e){return function(i,n){e(i,n,l)}},GU;class nbe{constructor(){this._entries=new VL(50)}get(e){const i=nbe._key(e);return this._entries.get(i)}set(e,i){const n=nbe._key(e);this._entries.set(n,i)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}const HLt=jc("IInlayHintsCache");nl(HLt,nbe,1);class Dze{constructor(e,i){this.item=e,this.index=i}get part(){const e=this.item.hint.label;return typeof e=="string"?{label:e}:e[this.index]}}class bPi{constructor(e,i){this.part=e,this.hasTriggerModifier=i}}var X4;let Ure=(X4=class{static get(e){return e.getContribution(GU.ID)??void 0}constructor(e,i,n,s,c,d,f){this._editor=e,this._languageFeaturesService=i,this._inlayHintsCache=s,this._commandService=c,this._notificationService=d,this._instaService=f,this._disposables=new wn,this._sessionDisposables=new wn,this._decorationsMetadata=new Map,this._ruleFactory=new Cve(this._editor),this._activeRenderMode=0,this._debounceInfo=n.for(i.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(i.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(m=>{m.hasChanged(142)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(142);if(e.enabled==="off")return;const i=this._editor.getModel();if(!i||!this._languageFeaturesService.inlayHintsProvider.has(i))return;if(e.enabled==="on")this._activeRenderMode=0;else{let f,m;e.enabled==="onUnlessPressed"?(f=0,m=1):(f=1,m=0),this._activeRenderMode=f,this._sessionDisposables.add(W4.getInstance().event(v=>{if(!this._editor.hasModel())return;const x=v.altKey&&v.ctrlKey&&!(v.shiftKey||v.metaKey)?m:f;if(x!==this._activeRenderMode){this._activeRenderMode=x;const w=this._editor.getModel(),I=this._copyInlayHintsWithCurrentAnchor(w);this._updateHintsDecorators([w.getFullModelRange()],I),d.schedule(0)}}))}const n=this._inlayHintsCache.get(i);n&&this._updateHintsDecorators([i.getFullModelRange()],n),this._sessionDisposables.add(fo(()=>{i.isDisposed()||this._cacheHintsForFastRestore(i)}));let s;const c=new Set,d=new qu(async()=>{const f=Date.now();s==null||s.dispose(!0),s=new ih;const m=i.onWillDispose(()=>s==null?void 0:s.cancel());try{const v=s.token,x=await Zve.create(this._languageFeaturesService.inlayHintsProvider,i,this._getHintsRanges(),v);if(d.delay=this._debounceInfo.update(i,Date.now()-f),v.isCancellationRequested){x.dispose();return}for(const w of x.provider)typeof w.onDidChangeInlayHints=="function"&&!c.has(w)&&(c.add(w),this._sessionDisposables.add(w.onDidChangeInlayHints(()=>{d.isScheduled()||d.schedule()})));this._sessionDisposables.add(x),this._updateHintsDecorators(x.ranges,x.items),this._cacheHintsForFastRestore(i)}catch(v){Pa(v)}finally{s.dispose(),m.dispose()}},this._debounceInfo.get(i));this._sessionDisposables.add(d),this._sessionDisposables.add(fo(()=>s==null?void 0:s.dispose(!0))),d.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(f=>{(f.scrollTopChanged||!d.isScheduled())&&d.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(f=>{s==null||s.cancel();const m=Math.max(d.delay,1250);d.schedule(m)})),this._sessionDisposables.add(this._installDblClickGesture(()=>d.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new wn,i=e.add(new Xwe(this._editor)),n=new wn;return e.add(n),e.add(i.onMouseMoveOrRelevantKeyDown(s=>{const[c]=s,d=this._getInlayHintLabelPart(c),f=this._editor.getModel();if(!d||!f){n.clear();return}const m=new ih;n.add(fo(()=>m.dispose(!0))),d.item.resolve(m.token),this._activeInlayHintPart=d.part.command||d.part.location?new bPi(d,c.hasTriggerModifier):void 0;const v=f.validatePosition(d.item.hint.position).lineNumber,x=new nt(v,1,v,f.getLineMaxColumn(v)),w=this._getInlineHintsForRange(x);this._updateHintsDecorators([x],w),n.add(fo(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([x],w)}))})),e.add(i.onCancel(()=>n.clear())),e.add(i.onExecute(async s=>{const c=this._getInlayHintLabelPart(s);if(c){const d=c.part;d.location?this._instaService.invokeFunction(VLt,s,this._editor,d.location):CBe.is(d.command)&&await this._invokeCommand(d.command,c.item)}})),e}_getInlineHintsForRange(e){const i=new Set;for(const n of this._decorationsMetadata.values())e.containsRange(n.item.anchor.range)&&i.add(n.item);return Array.from(i)}_installDblClickGesture(e){return this._editor.onMouseUp(async i=>{if(i.event.detail!==2)return;const n=this._getInlayHintLabelPart(i);if(n&&(i.event.preventDefault(),await n.item.resolve(cc.None),ky(n.item.hint.textEdits))){const s=n.item.hint.textEdits.map(c=>eh.replace(nt.lift(c.range),c.text));this._editor.executeEdits("inlayHint.default",s),e()}})}_installContextMenu(){return this._editor.onContextMenu(async e=>{if(!Mm(e.event.target))return;const i=this._getInlayHintLabelPart(e);i&&await this._instaService.invokeFunction(yPi,this._editor,e.event.target,i)})}_getInlayHintLabelPart(e){var n;if(e.target.type!==6)return;const i=(n=e.target.detail.injectedText)==null?void 0:n.options;if(i instanceof ER&&(i==null?void 0:i.attachedData)instanceof Dze)return i.attachedData}async _invokeCommand(e,i){try{await this._commandService.executeCommand(e.id,...e.arguments??[])}catch(n){this._notificationService.notify({severity:QSe.Error,source:i.provider.displayName,message:n})}}_cacheHintsForFastRestore(e){const i=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,i)}_copyInlayHintsWithCurrentAnchor(e){const i=new Map;for(const[n,s]of this._decorationsMetadata){if(i.has(s.item))continue;const c=e.getDecorationRange(n);if(c){const d=new ELt(c,s.item.anchor.direction),f=s.item.with({anchor:d});i.set(s.item,f)}}return Array.from(i.values())}_getHintsRanges(){const i=this._editor.getModel(),n=this._editor.getVisibleRangesPlusViewportAboveBelow(),s=[];for(const c of n.sort(nt.compareRangesUsingStarts)){const d=i.validateRange(new nt(c.startLineNumber-30,c.startColumn,c.endLineNumber+30,c.endColumn));s.length===0||!nt.areIntersectingOrTouching(s[s.length-1],d)?s.push(d):s[s.length-1]=nt.plusRange(s[s.length-1],d)}return s}_updateHintsDecorators(e,i){var O,z;const n=[],s=(J,Y,ae,me,ye)=>{const Ce={content:ae,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:Y.className,cursorStops:me,attachedData:ye};n.push({item:J,classNameRef:Y,decoration:{range:J.anchor.range,options:{description:"InlayHint",showIfCollapsed:J.anchor.range.isEmpty(),collapseOnReplaceEdit:!J.anchor.range.isEmpty(),stickiness:0,[J.anchor.direction]:this._activeRenderMode===0?Ce:void 0}}})},c=(J,Y)=>{const ae=this._ruleFactory.createClassNameRef({width:`${d/3|0}px`,display:"inline-block"});s(J,ae," ",Y?_T.Right:_T.None)},{fontSize:d,fontFamily:f,padding:m,isUniform:v}=this._getLayoutInfo(),x="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(x,f);let w={line:0,totalLen:0};for(const J of i){if(w.line!==J.anchor.range.startLineNumber&&(w={line:J.anchor.range.startLineNumber,totalLen:0}),w.totalLen>GU._MAX_LABEL_LEN)continue;J.hint.paddingLeft&&c(J,!1);const Y=typeof J.hint.label=="string"?[{label:J.hint.label}]:J.hint.label;for(let ae=0;ae<Y.length;ae++){const me=Y[ae],ye=ae===0,Ce=ae===Y.length-1,Fe={fontSize:`${d}px`,fontFamily:`var(${x}), ${vv.fontFamily}`,verticalAlign:v?"baseline":"middle",unicodeBidi:"isolate"};ky(J.hint.textEdits)&&(Fe.cursor="default"),this._fillInColors(Fe,J.hint),(me.command||me.location)&&((O=this._activeInlayHintPart)==null?void 0:O.part.item)===J&&this._activeInlayHintPart.part.index===ae&&(Fe.textDecoration="underline",this._activeInlayHintPart.hasTriggerModifier&&(Fe.color=Mh(ipi),Fe.cursor="pointer")),m&&(ye&&Ce?(Fe.padding=`1px ${Math.max(1,d/4)|0}px`,Fe.borderRadius=`${d/4|0}px`):ye?(Fe.padding=`1px 0 1px ${Math.max(1,d/4)|0}px`,Fe.borderRadius=`${d/4|0}px 0 0 ${d/4|0}px`):Ce?(Fe.padding=`1px ${Math.max(1,d/4)|0}px 1px 0`,Fe.borderRadius=`0 ${d/4|0}px ${d/4|0}px 0`):Fe.padding="1px 0 1px 0");let rt=me.label;w.totalLen+=rt.length;let ct=!1;const Mt=w.totalLen-GU._MAX_LABEL_LEN;if(Mt>0&&(rt=rt.slice(0,-Mt)+"…",ct=!0),s(J,this._ruleFactory.createClassNameRef(Fe),CPi(rt),Ce&&!J.hint.paddingRight?_T.Right:_T.None,new Dze(J,ae)),ct)break}if(J.hint.paddingRight&&c(J,!0),n.length>GU._MAX_DECORATORS)break}const I=[];for(const[J,Y]of this._decorationsMetadata){const ae=(z=this._editor.getModel())==null?void 0:z.getDecorationRange(J);ae&&e.some(me=>me.containsRange(ae))&&(I.push(J),Y.classNameRef.dispose(),this._decorationsMetadata.delete(J))}const P=GE.capture(this._editor);this._editor.changeDecorations(J=>{const Y=J.deltaDecorations(I,n.map(ae=>ae.decoration));for(let ae=0;ae<Y.length;ae++){const me=n[ae];this._decorationsMetadata.set(Y[ae],me)}}),P.restore(this._editor)}_fillInColors(e,i){i.kind===eye.Parameter?(e.backgroundColor=Mh(upi),e.color=Mh(lpi)):i.kind===eye.Type?(e.backgroundColor=Mh(cpi),e.color=Mh(api)):(e.backgroundColor=Mh(M$e),e.color=Mh(O$e))}_getLayoutInfo(){const e=this._editor.getOption(142),i=e.padding,n=this._editor.getOption(52),s=this._editor.getOption(49);let c=e.fontSize;(!c||c<5||c>n)&&(c=n);const d=e.fontFamily||s;return{fontSize:c,fontFamily:d,padding:i,isUniform:!i&&d===s&&c===n}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}},GU=X4,X4.ID="editor.contrib.InlayHints",X4._MAX_DECORATORS=1500,X4._MAX_LABEL_LEN=43,X4);Ure=GU=vPi([MU(1,Ts),MU(2,Pw),MU(3,HLt),MU(4,qd),MU(5,w_),MU(6,ho)],Ure);function CPi(l){return l.replace(/[ \t]/g," ")}fl.registerCommand("_executeInlayHintProvider",async(l,...e)=>{const[i,n]=e;Fl(yo.isUri(i)),Fl(nt.isIRange(n));const{inlayHintsProvider:s}=l.get(Ts),c=await l.get(Ob).createModelReference(i);try{const d=await Zve.create(s,c.object.textEditorModel,[nt.lift(n)],cc.None),f=d.items.map(m=>m.hint);return setTimeout(()=>d.dispose(),0),f}finally{c.dispose()}});var SPi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},sM=function(l,e){return function(i,n){e(i,n,l)}};class Gwt extends N1e{constructor(e,i,n,s){super(10,i,e.item.anchor.range,n,s,!0),this.part=e}}let rbe=class extends jre{constructor(e,i,n,s,c,d,f,m,v){super(e,i,n,d,m,s,c,v),this._resolverService=f,this.hoverOrdinal=6}suggestHoverAnchor(e){var s;if(!Ure.get(this._editor)||e.target.type!==6)return null;const n=(s=e.target.detail.injectedText)==null?void 0:s.options;return n instanceof ER&&n.attachedData instanceof Dze?new Gwt(n.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,i,n){return e instanceof Gwt?new bw(async s=>{const{part:c}=e;if(await c.item.resolve(n),n.isCancellationRequested)return;let d;typeof c.item.hint.tooltip=="string"?d=new m1().appendText(c.item.hint.tooltip):c.item.hint.tooltip&&(d=c.item.hint.tooltip),d&&s.emitOne(new fT(this,e.range,[d],!1,0)),ky(c.item.hint.textEdits)&&s.emitOne(new fT(this,e.range,[new m1().appendText(W("hint.dbl","Double-click to insert"))],!1,10001));let f;if(typeof c.part.tooltip=="string"?f=new m1().appendText(c.part.tooltip):c.part.tooltip&&(f=c.part.tooltip),f&&s.emitOne(new fT(this,e.range,[f],!1,1)),c.part.location||c.part.command){let v;const w=this._editor.getOption(78)==="altKey"?Hc?W("links.navigate.kb.meta.mac","cmd + click"):W("links.navigate.kb.meta","ctrl + click"):Hc?W("links.navigate.kb.alt.mac","option + click"):W("links.navigate.kb.alt","alt + click");c.part.location&&c.part.command?v=new m1().appendText(W("hint.defAndCommand","Go to Definition ({0}), right click for more",w)):c.part.location?v=new m1().appendText(W("hint.def","Go to Definition ({0})",w)):c.part.command&&(v=new m1(`[${W("hint.cmd","Execute Command")}](${XLi(c.part.command)} "${c.part.command.title}") (${w})`,{isTrusted:!0})),v&&s.emitOne(new fT(this,e.range,[v],!1,1e4))}const m=await this._resolveInlayHintLabelPartHover(c,n);for await(const v of m)s.emitOne(v)}):bw.EMPTY}async _resolveInlayHintLabelPartHover(e,i){if(!e.part.location)return bw.EMPTY;const{uri:n,range:s}=e.part.location,c=await this._resolverService.createModelReference(n);try{const d=c.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(d)?jGe(this._languageFeaturesService.hoverProvider,d,new pi(s.startLineNumber,s.startColumn),i).filter(f=>!M$(f.hover.contents)).map(f=>new fT(this,e.item.anchor.range,f.hover.contents,!1,2+f.ordinal)):bw.EMPTY}finally{c.dispose()}}};rbe=SPi([sM(1,Pf),sM(2,Rb),sM(3,pu),sM(4,jL),sM(5,Cc),sM(6,Ob),sM(7,Ts),sM(8,qd)],rbe);class GGe extends xi{constructor(e,i,n,s,c,d){super();const f=i.anchor,m=i.hoverParts;this._renderedHoverParts=this._register(new Eze(e,n,m,d,c));const{showAtPosition:v,showAtSecondaryPosition:x}=GGe.computeHoverPositions(e,f.range,m);this.shouldAppearBeforeContent=m.some(w=>w.isBeforeContent),this.showAtPosition=v,this.showAtSecondaryPosition=x,this.initialMousePosX=f.initialMousePosX,this.initialMousePosY=f.initialMousePosY,this.shouldFocus=s.shouldFocus,this.source=s.source}get domNode(){return this._renderedHoverParts.domNode}get domNodeHasChildren(){return this._renderedHoverParts.domNodeHasChildren}get focusedHoverPartIndex(){return this._renderedHoverParts.focusedHoverPartIndex}async updateHoverVerbosityLevel(e,i,n){this._renderedHoverParts.updateHoverVerbosityLevel(e,i,n)}isColorPickerVisible(){return this._renderedHoverParts.isColorPickerVisible()}static computeHoverPositions(e,i,n){let s=1;if(e.hasModel()){const x=e._getViewModel(),w=x.coordinatesConverter,I=w.convertModelRangeToViewRange(i),P=x.getLineMinColumn(I.startLineNumber),O=new pi(I.startLineNumber,P);s=w.convertViewPositionToModelPosition(O).column}const c=i.startLineNumber;let d=i.startColumn,f;for(const x of n){const w=x.range,I=w.startLineNumber===c,P=w.endLineNumber===c;if(I&&P){const z=w.startColumn,J=Math.min(d,z);d=Math.max(J,s)}x.forceShowAtRange&&(f=w)}let m,v;if(f){const x=f.getStartPosition();m=x,v=x}else m=i.getStartPosition(),v=new pi(c,d);return{showAtPosition:m,showAtSecondaryPosition:v}}}class wPi{constructor(e,i){this._statusBar=i,e.appendChild(this._statusBar.hoverElement)}get hoverElement(){return this._statusBar.hoverElement}get actions(){return this._statusBar.actions}dispose(){this._statusBar.dispose()}}const zCe=class zCe extends xi{constructor(e,i,n,s,c){super(),this._renderedParts=[],this._focusedHoverPartIndex=-1,this._context=c,this._fragment=document.createDocumentFragment(),this._register(this._renderParts(i,n,c,s)),this._register(this._registerListenersOnRenderedParts()),this._register(this._createEditorDecorations(e,n)),this._updateMarkdownAndColorParticipantInfo(i)}_createEditorDecorations(e,i){if(i.length===0)return xi.None;let n=i[0].range;for(const c of i){const d=c.range;n=nt.plusRange(n,d)}const s=e.createDecorationsCollection();return s.set([{range:n,options:zCe._DECORATION_OPTIONS}]),fo(()=>{s.clear()})}_renderParts(e,i,n,s){const c=new Qve(s),d={fragment:this._fragment,statusBar:c,...n},f=new wn;for(const v of e){const x=this._renderHoverPartsForParticipant(i,v,d);f.add(x);for(const w of x.renderedHoverParts)this._renderedParts.push({type:"hoverPart",participant:v,hoverPart:w.hoverPart,hoverElement:w.hoverElement})}const m=this._renderStatusBar(this._fragment,c);return m&&(f.add(m),this._renderedParts.push({type:"statusBar",hoverElement:m.hoverElement,actions:m.actions})),fo(()=>{f.dispose()})}_renderHoverPartsForParticipant(e,i,n){const s=e.filter(d=>d.owner===i);return s.length>0?i.renderHoverParts(n,s):new zB([])}_renderStatusBar(e,i){if(i.hasContent)return new wPi(e,i)}_registerListenersOnRenderedParts(){const e=new wn;return this._renderedParts.forEach((i,n)=>{const s=i.hoverElement;s.tabIndex=0,e.add(en(s,br.FOCUS_IN,c=>{c.stopPropagation(),this._focusedHoverPartIndex=n})),e.add(en(s,br.FOCUS_OUT,c=>{c.stopPropagation(),this._focusedHoverPartIndex=-1}))}),e}_updateMarkdownAndColorParticipantInfo(e){const i=e.find(n=>n instanceof jre&&!(n instanceof rbe));i&&(this._markdownHoverParticipant=i),this._colorHoverParticipant=e.find(n=>n instanceof Vre)}async updateHoverVerbosityLevel(e,i,n){if(!this._markdownHoverParticipant)return;const s=this._normalizedIndexToMarkdownHoverIndexRange(this._markdownHoverParticipant,i);if(s===void 0)return;const c=await this._markdownHoverParticipant.updateMarkdownHoverVerbosityLevel(e,s,n);c&&(this._renderedParts[i]={type:"hoverPart",participant:this._markdownHoverParticipant,hoverPart:c.hoverPart,hoverElement:c.hoverElement},this._context.onContentsChanged())}isColorPickerVisible(){var e;return((e=this._colorHoverParticipant)==null?void 0:e.isColorPickerVisible())??!1}_normalizedIndexToMarkdownHoverIndexRange(e,i){const n=this._renderedParts[i];if(!n||n.type!=="hoverPart"||!(n.participant===e))return;const c=this._renderedParts.findIndex(d=>d.type==="hoverPart"&&d.participant===e);if(c===-1)throw new tu;return i-c}get domNode(){return this._fragment}get domNodeHasChildren(){return this._fragment.hasChildNodes()}get focusedHoverPartIndex(){return this._focusedHoverPartIndex}};zCe._DECORATION_OPTIONS=qa.register({description:"content-hover-highlight",className:"hoverHighlight"});let Eze=zCe;var xPi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Kwt=function(l,e){return function(i,n){e(i,n,l)}};let Ize=class extends xi{constructor(e,i,n){super(),this._editor=e,this._instantiationService=i,this._keybindingService=n,this._currentResult=null,this._onContentsChanged=this._register(new gi),this.onContentsChanged=this._onContentsChanged.event,this._contentHoverWidget=this._register(this._instantiationService.createInstance(pze,this._editor)),this._participants=this._initializeHoverParticipants(),this._computer=new Xve(this._editor,this._participants),this._hoverOperation=this._register(new wLt(this._editor,this._computer)),this._registerListeners()}_initializeHoverParticipants(){const e=[];for(const i of uW.getAll()){const n=this._instantiationService.createInstance(i,this._editor);e.push(n)}return e.sort((i,n)=>i.hoverOrdinal-n.hoverOrdinal),this._register(this._contentHoverWidget.onDidResize(()=>{this._participants.forEach(i=>{var n;return(n=i.handleResize)==null?void 0:n.call(i)})})),e}_registerListeners(){this._register(this._hoverOperation.onResult(i=>{if(!this._computer.anchor)return;const n=i.hasLoadingMessage?this._addLoadingMessage(i.value):i.value;this._withResult(new xLt(this._computer.anchor,n,i.isComplete))}));const e=this._contentHoverWidget.getDomNode();this._register(ph(e,"keydown",i=>{i.equals(9)&&this.hide()})),this._register(ph(e,"mouseleave",i=>{this._onMouseLeave(i)})),this._register(Oh.onDidChange(()=>{this._contentHoverWidget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)}))}_startShowingOrUpdateHover(e,i,n,s,c){if(!(this._contentHoverWidget.position&&this._currentResult))return e?(this._startHoverOperationIfNecessary(e,i,n,s,!1),!0):!1;const f=this._editor.getOption(60).sticky,m=c&&this._contentHoverWidget.isMouseGettingCloser(c.event.posx,c.event.posy);return f&&m?(e&&this._startHoverOperationIfNecessary(e,i,n,s,!0),!0):e?this._currentResult.anchor.equals(e)?!0:e.canAdoptVisibleHover(this._currentResult.anchor,this._contentHoverWidget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,i,n,s,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,i,n,s,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,i,n,s,c){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=s,this._computer.source=n,this._computer.insistOnKeepingHoverVisible=c,this._hoverOperation.start(i))}_setCurrentResult(e){let i=e;if(this._currentResult===i)return;i&&i.hoverParts.length===0&&(i=null),this._currentResult=i,this._currentResult?this._showHover(this._currentResult):this._hideHover()}_addLoadingMessage(e){if(!this._computer.anchor)return e;for(const i of this._participants){if(!i.createLoadingMessage)continue;const n=i.createLoadingMessage(this._computer.anchor);if(n)return e.slice(0).concat([n])}return e}_withResult(e){if(this._contentHoverWidget.position&&this._currentResult&&this._currentResult.isComplete||this._setCurrentResult(e),!e.isComplete)return;const s=e.hoverParts.length===0,c=this._computer.insistOnKeepingHoverVisible;s&&c||this._setCurrentResult(e)}_showHover(e){const i=this._getHoverContext();this._renderedContentHover=new GGe(this._editor,e,this._participants,this._computer,i,this._keybindingService),this._renderedContentHover.domNodeHasChildren?this._contentHoverWidget.show(this._renderedContentHover):this._renderedContentHover.dispose()}_hideHover(){this._contentHoverWidget.hide()}_getHoverContext(){return{hide:()=>{this.hide()},onContentsChanged:()=>{this._onContentsChanged.fire(),this._contentHoverWidget.onContentsChanged()},setMinimumDimensions:s=>{this._contentHoverWidget.setMinimumDimensions(s)}}}showsOrWillShow(e){if(this._contentHoverWidget.isResizing)return!0;const n=this._findHoverAnchorCandidates(e);if(!(n.length>0))return this._startShowingOrUpdateHover(null,0,0,!1,e);const c=n[0];return this._startShowingOrUpdateHover(c,0,0,!1,e)}_findHoverAnchorCandidates(e){const i=[];for(const s of this._participants){if(!s.suggestHoverAnchor)continue;const c=s.suggestHoverAnchor(e);c&&i.push(c)}const n=e.target;switch(n.type){case 6:{i.push(new P9e(0,n.range,e.event.posx,e.event.posy));break}case 7:{const s=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;if(!(!n.detail.isAfterLines&&typeof n.detail.horizontalDistanceToText=="number"&&n.detail.horizontalDistanceToText<s))break;i.push(new P9e(0,n.range,e.event.posx,e.event.posy));break}}return i.sort((s,c)=>c.priority-s.priority),i}_onMouseLeave(e){const i=this._editor.getDomNode();(!i||!Kwe(i,e.x,e.y))&&this.hide()}startShowingAtRange(e,i,n,s){this._startShowingOrUpdateHover(new P9e(0,e,void 0,void 0),i,n,s,null)}async updateHoverVerbosityLevel(e,i,n){var s;(s=this._renderedContentHover)==null||s.updateHoverVerbosityLevel(e,i,n)}focusedHoverPartIndex(){var e;return((e=this._renderedContentHover)==null?void 0:e.focusedHoverPartIndex)??-1}containsNode(e){return e?this._contentHoverWidget.getDomNode().contains(e):!1}focus(){this._contentHoverWidget.focus()}scrollUp(){this._contentHoverWidget.scrollUp()}scrollDown(){this._contentHoverWidget.scrollDown()}scrollLeft(){this._contentHoverWidget.scrollLeft()}scrollRight(){this._contentHoverWidget.scrollRight()}pageUp(){this._contentHoverWidget.pageUp()}pageDown(){this._contentHoverWidget.pageDown()}goToTop(){this._contentHoverWidget.goToTop()}goToBottom(){this._contentHoverWidget.goToBottom()}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}getDomNode(){return this._contentHoverWidget.getDomNode()}get isColorPickerVisible(){var e;return((e=this._renderedContentHover)==null?void 0:e.isColorPickerVisible())??!1}get isVisibleFromKeyboard(){return this._contentHoverWidget.isVisibleFromKeyboard}get isVisible(){return this._contentHoverWidget.isVisible}get isFocused(){return this._contentHoverWidget.isFocused}get isResizing(){return this._contentHoverWidget.isResizing}get widget(){return this._contentHoverWidget}};Ize=xPi([Kwt(1,ho),Kwt(2,pu)],Ize);var kPi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Xwt=function(l,e){return function(i,n){e(i,n,l)}},Nze;const TPi=!1;var q9;let Dy=(q9=class extends xi{constructor(e,i,n){super(),this._editor=e,this._instantiationService=i,this._keybindingService=n,this._onHoverContentsChanged=this._register(new gi),this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new wn,this._hoverState={mouseDown:!1,activatedByDecoratorClick:!1},this._reactToEditorMouseMoveRunner=this._register(new qu(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(60)&&(this._unhookListeners(),this._hookListeners())}))}static get(e){return e.getContribution(Nze.ID)}_hookListeners(){const e=this._editor.getOption(60);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.hidingDelay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown(i=>this._onEditorMouseDown(i))),this._listenersStore.add(this._editor.onMouseUp(()=>this._onEditorMouseUp())),this._listenersStore.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._listenersStore.add(this._editor.onKeyDown(i=>this._onKeyDown(i)))):(this._listenersStore.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._listenersStore.add(this._editor.onKeyDown(i=>this._onKeyDown(i)))),this._listenersStore.add(this._editor.onMouseLeave(i=>this._onEditorMouseLeave(i))),this._listenersStore.add(this._editor.onDidChangeModel(()=>{this._cancelScheduler(),this._hideWidgets()})),this._listenersStore.add(this._editor.onDidChangeModelContent(()=>this._cancelScheduler())),this._listenersStore.add(this._editor.onDidScrollChange(i=>this._onEditorScrollChanged(i)))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0,!this._shouldNotHideCurrentHoverWidget(e)&&this._hideWidgets()}_shouldNotHideCurrentHoverWidget(e){return this._isMouseOnContentHoverWidget(e)||this._isContentWidgetResizing()}_isMouseOnContentHoverWidget(e){var n;const i=(n=this._contentWidget)==null?void 0:n.getDomNode();return i?Kwe(i,e.event.posx,e.event.posy):!1}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._cancelScheduler(),this._shouldNotHideCurrentHoverWidget(e))||this._hideWidgets()}_shouldNotRecomputeCurrentHoverWidget(e){const i=this._hoverSettings.sticky,n=(d,f)=>{const m=this._isMouseOnContentHoverWidget(d);return f&&m},s=d=>{var v;const f=this._isMouseOnContentHoverWidget(d),m=((v=this._contentWidget)==null?void 0:v.isColorPickerVisible)??!1;return f&&m},c=(d,f)=>{var m,v,x,w;return(f&&((v=this._contentWidget)==null?void 0:v.containsNode((m=d.event.browserEvent.view)==null?void 0:m.document.activeElement))&&!((w=(x=d.event.browserEvent.view)==null?void 0:x.getSelection())!=null&&w.isCollapsed))??!1};return n(e,i)||s(e)||c(e,i)}_onEditorMouseMove(e){var f,m,v,x;if(this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._mouseMoveEvent=e,(f=this._contentWidget)!=null&&f.isFocused||(m=this._contentWidget)!=null&&m.isResizing))return;const i=this._hoverSettings.sticky;if(i&&((v=this._contentWidget)!=null&&v.isVisibleFromKeyboard))return;if(this._shouldNotRecomputeCurrentHoverWidget(e)){this._reactToEditorMouseMoveRunner.cancel();return}const s=this._hoverSettings.hidingDelay;if(((x=this._contentWidget)==null?void 0:x.isVisible)&&i&&s>0){this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(s);return}this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){var m;if(!e)return;const n=(m=e.target.element)==null?void 0:m.classList.contains("colorpicker-color-decoration"),s=this._editor.getOption(149),c=this._hoverSettings.enabled,d=this._hoverState.activatedByDecoratorClick;if(n&&(s==="click"&&!d||s==="hover"&&!c&&!TPi||s==="clickAndHover"&&!c&&!d)||!n&&!c&&!d){this._hideWidgets();return}this._tryShowHoverWidget(e)||this._hideWidgets()}_tryShowHoverWidget(e){return this._getOrCreateContentWidget().showsOrWillShow(e)}_onKeyDown(e){var s;if(!this._editor.hasModel())return;const i=this._keybindingService.softDispatch(e,this._editor.getDomNode()),n=i.kind===1||i.kind===2&&(i.commandId===vLt||i.commandId===Jwe||i.commandId===Gwe)&&((s=this._contentWidget)==null?void 0:s.isVisible);e.keyCode===5||e.keyCode===6||e.keyCode===57||e.keyCode===4||n||this._hideWidgets()}_hideWidgets(){var e,i;this._hoverState.mouseDown&&((e=this._contentWidget)!=null&&e.isColorPickerVisible)||Z$.dropDownVisible||(this._hoverState.activatedByDecoratorClick=!1,(i=this._contentWidget)==null||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(Ize,this._editor),this._listenersStore.add(this._contentWidget.onContentsChanged(()=>this._onHoverContentsChanged.fire()))),this._contentWidget}showContentHover(e,i,n,s,c=!1){this._hoverState.activatedByDecoratorClick=c,this._getOrCreateContentWidget().startShowingAtRange(e,i,n,s)}_isContentWidgetResizing(){var e;return((e=this._contentWidget)==null?void 0:e.widget.isResizing)||!1}focusedHoverPartIndex(){return this._getOrCreateContentWidget().focusedHoverPartIndex()}updateHoverVerbosityLevel(e,i,n){this._getOrCreateContentWidget().updateHoverVerbosityLevel(e,i,n)}focus(){var e;(e=this._contentWidget)==null||e.focus()}scrollUp(){var e;(e=this._contentWidget)==null||e.scrollUp()}scrollDown(){var e;(e=this._contentWidget)==null||e.scrollDown()}scrollLeft(){var e;(e=this._contentWidget)==null||e.scrollLeft()}scrollRight(){var e;(e=this._contentWidget)==null||e.scrollRight()}pageUp(){var e;(e=this._contentWidget)==null||e.pageUp()}pageDown(){var e;(e=this._contentWidget)==null||e.pageDown()}goToTop(){var e;(e=this._contentWidget)==null||e.goToTop()}goToBottom(){var e;(e=this._contentWidget)==null||e.goToBottom()}get isColorPickerVisible(){var e;return(e=this._contentWidget)==null?void 0:e.isColorPickerVisible}get isHoverVisible(){var e;return(e=this._contentWidget)==null?void 0:e.isVisible}dispose(){var e;super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),(e=this._contentWidget)==null||e.dispose()}},Nze=q9,q9.ID="editor.contrib.contentHover",q9);Dy=Nze=kPi([Xwt(1,ho),Xwt(2,pu)],Dy);const DKe=class DKe extends xi{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(i=>this.onMouseDown(i)))}dispose(){super.dispose()}onMouseDown(e){const i=this._editor.getOption(149);if(i!=="click"&&i!=="clickAndHover")return;const n=e.target;if(n.type!==6||!n.detail.injectedText||n.detail.injectedText.options.attachedData!==fLt||!n.range)return;const s=this._editor.getContribution(Dy.ID);if(s&&!s.isColorPickerVisible){const c=new nt(n.range.startLineNumber,n.range.startColumn+1,n.range.endLineNumber,n.range.endColumn+1);s.showContentHover(c,1,0,!1,!0)}}};DKe.ID="editor.contrib.colorContribution";let sbe=DKe;Cl(sbe.ID,sbe,2);uW.register(Vre);var jLt=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},yq=function(l,e){return function(i,n){e(i,n,l)}},Lze,Pze,$9;let qB=($9=class extends xi{constructor(e,i,n){super(),this._editor=e,this._instantiationService=n,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=Tt.standaloneColorPickerVisible.bindTo(i),this._standaloneColorPickerFocused=Tt.standaloneColorPickerFocused.bindTo(i)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(e=this._standaloneColorPickerWidget)==null||e.focus():this._standaloneColorPickerWidget=this._instantiationService.createInstance(Aze,this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused))}hide(){var e;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),(e=this._standaloneColorPickerWidget)==null||e.hide(),this._editor.focus()}insertColor(){var e;(e=this._standaloneColorPickerWidget)==null||e.updateEditor(),this.hide()}static get(e){return e.getContribution(Lze.ID)}},Lze=$9,$9.ID="editor.contrib.standaloneColorPickerController",$9);qB=Lze=jLt([yq(1,Ko),yq(2,ho)],qB);Cl(qB.ID,qB,1);const Qwt=8,DPi=22;var J9;let Aze=(J9=class extends xi{constructor(e,i,n,s,c,d,f){var w;super(),this._editor=e,this._standaloneColorPickerVisible=i,this._standaloneColorPickerFocused=n,this._keybindingService=c,this._languageFeaturesService=d,this._editorWorkerService=f,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new gi),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=s.createInstance(Hre,this._editor),this._position=(w=this._editor._getViewModel())==null?void 0:w.getPrimaryCursorState().modelState.position;const m=this._editor.getSelection(),v=m?{startLineNumber:m.startLineNumber,startColumn:m.startColumn,endLineNumber:m.endLineNumber,endColumn:m.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},x=this._register(zE(this._body));this._register(x.onDidBlur(I=>{this.hide()})),this._register(x.onDidFocus(I=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(I=>{var O;const P=(O=I.target.element)==null?void 0:O.classList;P&&P.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(I=>{this._render(I.value,I.foundInEditor)})),this._start(v),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return Pze.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}async _start(e){const i=await this._computeAsync(e);i&&this._onResult.fire(new EPi(i.result,i.foundInEditor))}async _computeAsync(e){if(!this._editor.hasModel())return null;const i={range:e,color:{red:0,green:0,blue:0,alpha:1}},n=await this._standaloneColorPickerParticipant.createColorHover(i,new Wre(this._editorWorkerService),this._languageFeaturesService.colorProvider);return n?{result:n.colorHover,foundInEditor:n.foundInEditor}:null}_render(e,i){const n=document.createDocumentFragment(),s=this._register(new Qve(this._keybindingService)),c={fragment:n,statusBar:s,onContentsChanged:()=>{},hide:()=>this.hide()};this._colorHover=e;const d=this._standaloneColorPickerParticipant.renderHoverParts(c,[e]);if(!d)return;this._register(d.disposables);const f=d.colorPicker;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this._body.tabIndex=0,this._body.appendChild(n),f.layout();const m=f.body,v=m.saturationBox.domNode.clientWidth,x=m.domNode.clientWidth-v-DPi-Qwt,w=f.body.enterButton;w==null||w.onClicked(()=>{this.updateEditor(),this.hide()});const I=f.header,P=I.pickedColorNode;P.style.width=v+Qwt+"px";const O=I.originalColorNode;O.style.width=x+"px";const z=f.header.closeButton;z==null||z.onClicked(()=>{this.hide()}),i&&(w&&(w.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}},Pze=J9,J9.ID="editor.contrib.standaloneColorPickerWidget",J9);Aze=Pze=jLt([yq(3,ho),yq(4,pu),yq(5,Ts),yq(6,Fb)],Aze);class EPi{constructor(e,i){this.value=e,this.foundInEditor=i}}class IPi extends XE{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{...aa("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:W({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker")},precondition:void 0,menu:[{id:As.CommandPalette}],metadata:{description:aa("showOrFocusStandaloneColorPickerDescription","Show or focus a standalone color picker which uses the default color provider. It displays hex/rgb/hsl colors.")}})}runEditorCommand(e,i){var n;(n=qB.get(i))==null||n.showOrFocus()}}class NPi extends hs{constructor(){super({id:"editor.action.hideColorPicker",label:W({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:Tt.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100},metadata:{description:aa("hideColorPickerDescription","Hide the standalone color picker.")}})}run(e,i){var n;(n=qB.get(i))==null||n.hide()}}class LPi extends hs{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:W({key:"insertColorWithStandaloneColorPicker",comment:["Action that inserts color with standalone color picker"]},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:Tt.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100},metadata:{description:aa("insertColorWithStandaloneColorPickerDescription","Insert hex/rgb/hsl colors with the focused standalone color picker.")}})}run(e,i){var n;(n=qB.get(i))==null||n.insertColor()}}sr(NPi);sr(LPi);Nd(IPi);class HM{constructor(e,i,n){this.languageConfigurationService=n,this._selection=e,this._insertSpace=i,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,i,n){if(n<0)return!1;const s=i.length,c=e.length;if(n+s>c)return!1;for(let d=0;d<s;d++){const f=e.charCodeAt(n+d),m=i.charCodeAt(d);if(f!==m&&!(f>=65&&f<=90&&f+32===m)&&!(m>=65&&m<=90&&m+32===f))return!1}return!0}_createOperationsForBlockComment(e,i,n,s,c,d){const f=e.startLineNumber,m=e.startColumn,v=e.endLineNumber,x=e.endColumn,w=c.getLineContent(f),I=c.getLineContent(v);let P=w.lastIndexOf(i,m-1+i.length),O=I.indexOf(n,x-1-n.length);if(P!==-1&&O!==-1)if(f===v)w.substring(P+i.length,O).indexOf(n)>=0&&(P=-1,O=-1);else{const J=w.substring(P+i.length),Y=I.substring(0,O);(J.indexOf(n)>=0||Y.indexOf(n)>=0)&&(P=-1,O=-1)}let z;P!==-1&&O!==-1?(s&&P+i.length<w.length&&w.charCodeAt(P+i.length)===32&&(i=i+" "),s&&O>0&&I.charCodeAt(O-1)===32&&(n=" "+n,O-=1),z=HM._createRemoveBlockCommentOperations(new nt(f,P+i.length+1,v,O+1),i,n)):(z=HM._createAddBlockCommentOperations(e,i,n,this._insertSpace),this._usedEndToken=z.length===1?n:null);for(const J of z)d.addTrackedEditOperation(J.range,J.text)}static _createRemoveBlockCommentOperations(e,i,n){const s=[];return nt.isEmpty(e)?s.push(eh.delete(new nt(e.startLineNumber,e.startColumn-i.length,e.endLineNumber,e.endColumn+n.length))):(s.push(eh.delete(new nt(e.startLineNumber,e.startColumn-i.length,e.startLineNumber,e.startColumn))),s.push(eh.delete(new nt(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),s}static _createAddBlockCommentOperations(e,i,n,s){const c=[];return nt.isEmpty(e)?c.push(eh.replace(new nt(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),i+" "+n)):(c.push(eh.insert(new pi(e.startLineNumber,e.startColumn),i+(s?" ":""))),c.push(eh.insert(new pi(e.endLineNumber,e.endColumn),(s?" ":"")+n))),c}getEditOperations(e,i){const n=this._selection.startLineNumber,s=this._selection.startColumn;e.tokenization.tokenizeIfCheap(n);const c=e.getLanguageIdAtPosition(n,s),d=this.languageConfigurationService.getLanguageConfiguration(c).comments;!d||!d.blockCommentStartToken||!d.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,d.blockCommentStartToken,d.blockCommentEndToken,this._insertSpace,e,i)}computeCursorState(e,i){const n=i.getInverseEditOperations();if(n.length===2){const s=n[0],c=n[1];return new Us(s.range.endLineNumber,s.range.endColumn,c.range.startLineNumber,c.range.startColumn)}else{const s=n[0].range,c=this._usedEndToken?-this._usedEndToken.length-1:0;return new Us(s.endLineNumber,s.endColumn+c,s.endLineNumber,s.endColumn+c)}}}class b4{constructor(e,i,n,s,c,d,f){this.languageConfigurationService=e,this._selection=i,this._indentSize=n,this._type=s,this._insertSpace=c,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=d,this._ignoreFirstLine=f||!1}static _gatherPreflightCommentStrings(e,i,n,s){e.tokenization.tokenizeIfCheap(i);const c=e.getLanguageIdAtPosition(i,1),d=s.getLanguageConfiguration(c).comments,f=d?d.lineCommentToken:null;if(!f)return null;const m=[];for(let v=0,x=n-i+1;v<x;v++)m[v]={ignore:!1,commentStr:f,commentStrOffset:0,commentStrLength:f.length};return m}static _analyzeLines(e,i,n,s,c,d,f,m){let v=!0,x;e===0?x=!0:e===1?x=!1:x=!0;for(let w=0,I=s.length;w<I;w++){const P=s[w],O=c+w;if(O===c&&f){P.ignore=!0;continue}const z=n.getLineContent(O),J=Ty(z);if(J===-1){P.ignore=d,P.commentStrOffset=z.length;continue}if(v=!1,P.ignore=!1,P.commentStrOffset=J,x&&!HM._haystackHasNeedleAtOffset(z,P.commentStr,J)&&(e===0?x=!1:e===1||(P.ignore=!0)),x&&i){const Y=J+P.commentStrLength;Y<z.length&&z.charCodeAt(Y)===32&&(P.commentStrLength+=1)}}if(e===0&&v){x=!1;for(let w=0,I=s.length;w<I;w++)s[w].ignore=!1}return{supported:!0,shouldRemoveComments:x,lines:s}}static _gatherPreflightData(e,i,n,s,c,d,f,m){const v=b4._gatherPreflightCommentStrings(n,s,c,m);return v===null?{supported:!1}:b4._analyzeLines(e,i,n,v,s,d,f,m)}_executeLineComments(e,i,n,s){let c;n.shouldRemoveComments?c=b4._createRemoveLineCommentsOperations(n.lines,s.startLineNumber):(b4._normalizeInsertionPoint(e,n.lines,s.startLineNumber,this._indentSize),c=this._createAddLineCommentsOperations(n.lines,s.startLineNumber));const d=new pi(s.positionLineNumber,s.positionColumn);for(let f=0,m=c.length;f<m;f++)i.addEditOperation(c[f].range,c[f].text),nt.isEmpty(c[f].range)&&nt.getStartPosition(c[f].range).equals(d)&&e.getLineContent(d.lineNumber).length+1===d.column&&(this._deltaColumn=(c[f].text||"").length);this._selectionId=i.trackSelection(s)}_attemptRemoveBlockComment(e,i,n,s){let c=i.startLineNumber,d=i.endLineNumber;const f=s.length+Math.max(e.getLineFirstNonWhitespaceColumn(i.startLineNumber),i.startColumn);let m=e.getLineContent(c).lastIndexOf(n,f-1),v=e.getLineContent(d).indexOf(s,i.endColumn-1-n.length);return m!==-1&&v===-1&&(v=e.getLineContent(c).indexOf(s,m+n.length),d=c),m===-1&&v!==-1&&(m=e.getLineContent(d).lastIndexOf(n,v),c=d),i.isEmpty()&&(m===-1||v===-1)&&(m=e.getLineContent(c).indexOf(n),m!==-1&&(v=e.getLineContent(c).indexOf(s,m+n.length))),m!==-1&&e.getLineContent(c).charCodeAt(m+n.length)===32&&(n+=" "),v!==-1&&e.getLineContent(d).charCodeAt(v-1)===32&&(s=" "+s,v-=1),m!==-1&&v!==-1?HM._createRemoveBlockCommentOperations(new nt(c,m+n.length+1,d,v+1),n,s):null}_executeBlockComment(e,i,n){e.tokenization.tokenizeIfCheap(n.startLineNumber);const s=e.getLanguageIdAtPosition(n.startLineNumber,1),c=this.languageConfigurationService.getLanguageConfiguration(s).comments;if(!c||!c.blockCommentStartToken||!c.blockCommentEndToken)return;const d=c.blockCommentStartToken,f=c.blockCommentEndToken;let m=this._attemptRemoveBlockComment(e,n,d,f);if(!m){if(n.isEmpty()){const v=e.getLineContent(n.startLineNumber);let x=Ty(v);x===-1&&(x=v.length),m=HM._createAddBlockCommentOperations(new nt(n.startLineNumber,x+1,n.startLineNumber,v.length+1),d,f,this._insertSpace)}else m=HM._createAddBlockCommentOperations(new nt(n.startLineNumber,e.getLineFirstNonWhitespaceColumn(n.startLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),d,f,this._insertSpace);m.length===1&&(this._deltaColumn=d.length+1)}this._selectionId=i.trackSelection(n);for(const v of m)i.addEditOperation(v.range,v.text)}getEditOperations(e,i){let n=this._selection;if(this._moveEndPositionDown=!1,n.startLineNumber===n.endLineNumber&&this._ignoreFirstLine){i.addEditOperation(new nt(n.startLineNumber,e.getLineMaxColumn(n.startLineNumber),n.startLineNumber+1,1),n.startLineNumber===e.getLineCount()?"":`
+`),this._selectionId=i.trackSelection(n);return}n.startLineNumber<n.endLineNumber&&n.endColumn===1&&(this._moveEndPositionDown=!0,n=n.setEndPosition(n.endLineNumber-1,e.getLineMaxColumn(n.endLineNumber-1)));const s=b4._gatherPreflightData(this._type,this._insertSpace,e,n.startLineNumber,n.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine,this.languageConfigurationService);return s.supported?this._executeLineComments(e,i,s,n):this._executeBlockComment(e,i,n)}computeCursorState(e,i){let n=i.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),new Us(n.selectionStartLineNumber,n.selectionStartColumn+this._deltaColumn,n.positionLineNumber,n.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(e,i){const n=[];for(let s=0,c=e.length;s<c;s++){const d=e[s];d.ignore||n.push(eh.delete(new nt(i+s,d.commentStrOffset+1,i+s,d.commentStrOffset+d.commentStrLength+1)))}return n}_createAddLineCommentsOperations(e,i){const n=[],s=this._insertSpace?" ":"";for(let c=0,d=e.length;c<d;c++){const f=e[c];f.ignore||n.push(eh.insert(new pi(i+c,f.commentStrOffset+1),f.commentStr+s))}return n}static nextVisibleColumn(e,i,n,s){return n?e+(i-e%i):e+s}static _normalizeInsertionPoint(e,i,n,s){let c=1073741824,d,f;for(let m=0,v=i.length;m<v;m++){if(i[m].ignore)continue;const x=e.getLineContent(n+m);let w=0;for(let I=0,P=i[m].commentStrOffset;w<c&&I<P;I++)w=b4.nextVisibleColumn(w,s,x.charCodeAt(I)===9,1);w<c&&(c=w)}c=Math.floor(c/s)*s;for(let m=0,v=i.length;m<v;m++){if(i[m].ignore)continue;const x=e.getLineContent(n+m);let w=0;for(d=0,f=i[m].commentStrOffset;w<c&&d<f;d++)w=b4.nextVisibleColumn(w,s,x.charCodeAt(d)===9,1);w>c?i[m].commentStrOffset=d-1:i[m].commentStrOffset=d}}}class KGe extends hs{constructor(e,i){super(i),this._type=e}run(e,i){const n=e.get(rh);if(!i.hasModel())return;const s=i.getModel(),c=[],d=s.getOptions(),f=i.getOption(23),m=i.getSelections().map((x,w)=>({selection:x,index:w,ignoreFirstLine:!1}));m.sort((x,w)=>nt.compareRangesUsingStarts(x.selection,w.selection));let v=m[0];for(let x=1;x<m.length;x++){const w=m[x];v.selection.endLineNumber===w.selection.startLineNumber&&(v.index<w.index?w.ignoreFirstLine=!0:(v.ignoreFirstLine=!0,v=w))}for(const x of m)c.push(new b4(n,x.selection,d.indentSize,this._type,f.insertSpace,f.ignoreEmptyLines,x.ignoreFirstLine));i.pushUndoStop(),i.executeCommands(this.id,c),i.pushUndoStop()}}class PPi extends KGe{constructor(){super(0,{id:"editor.action.commentLine",label:W("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:Tt.writable,kbOpts:{kbExpr:Tt.editorTextFocus,primary:2138,weight:100},menuOpts:{menuId:As.MenubarEditMenu,group:"5_insert",title:W({key:"miToggleLineComment",comment:["&& denotes a mnemonic"]},"&&Toggle Line Comment"),order:1}})}}class APi extends KGe{constructor(){super(1,{id:"editor.action.addCommentLine",label:W("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:Tt.writable,kbOpts:{kbExpr:Tt.editorTextFocus,primary:pp(2089,2081),weight:100}})}}class OPi extends KGe{constructor(){super(2,{id:"editor.action.removeCommentLine",label:W("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:Tt.writable,kbOpts:{kbExpr:Tt.editorTextFocus,primary:pp(2089,2099),weight:100}})}}class MPi extends hs{constructor(){super({id:"editor.action.blockComment",label:W("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:Tt.writable,kbOpts:{kbExpr:Tt.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:As.MenubarEditMenu,group:"5_insert",title:W({key:"miToggleBlockComment",comment:["&& denotes a mnemonic"]},"Toggle &&Block Comment"),order:2}})}run(e,i){const n=e.get(rh);if(!i.hasModel())return;const s=i.getOption(23),c=[],d=i.getSelections();for(const f of d)c.push(new HM(f,s.insertSpace,n));i.pushUndoStop(),i.executeCommands(this.id,c),i.pushUndoStop()}}sr(PPi);sr(APi);sr(OPi);sr(MPi);var RPi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},SF=function(l,e){return function(i,n){e(i,n,l)}},Oze,G9;let eJ=(G9=class{static get(e){return e.getContribution(Oze.ID)}constructor(e,i,n,s,c,d,f,m){this._contextMenuService=i,this._contextViewService=n,this._contextKeyService=s,this._keybindingService=c,this._menuService=d,this._configurationService=f,this._workspaceContextService=m,this._toDispose=new wn,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(v=>this._onContextMenu(v))),this._toDispose.add(this._editor.onMouseWheel(v=>{if(this._contextMenuIsBeingShownCount>0){const x=this._contextViewService.getContextViewElement(),w=v.srcElement;w.shadowRoot&&kB(x)===w.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(v=>{this._editor.getOption(24)&&v.keyCode===58&&(v.preventDefault(),v.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(24)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||e.target.type===6&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type===11)return this._showScrollbarContextMenu(e.event);if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let n=!1;for(const s of this._editor.getSelections())if(s.containsPosition(e.target.position)){n=!0;break}n||this._editor.setPosition(e.target.position)}let i=null;e.target.type!==1&&(i=e.event),this.showContextMenu(i)}showContextMenu(e){if(!this._editor.getOption(24)||!this._editor.hasModel())return;const i=this._getMenuActions(this._editor.getModel(),this._editor.contextMenuId);i.length>0&&this._doShowContextMenu(i,e)}_getMenuActions(e,i){const n=[],s=this._menuService.getMenuActions(i,this._contextKeyService,{arg:e.uri});for(const c of s){const[,d]=c;let f=0;for(const m of d)if(m instanceof zq){const v=this._getMenuActions(e,m.item.submenu);v.length>0&&(n.push(new T$(m.id,m.label,v)),f++)}else n.push(m),f++;f&&n.push(new Rm)}return n.length&&n.pop(),n}_doShowContextMenu(e,i=null){if(!this._editor.hasModel())return;const n=this._editor.getOption(60);this._editor.updateOptions({hover:{enabled:!1}});let s=i;if(!s){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const d=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),f=e_(this._editor.getDomNode()),m=f.left+d.left,v=f.top+d.top+d.height;s={x:m,y:v}}const c=this._editor.getOption(128)&&!VE;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:c?this._editor.getOverflowWidgetsDomNode()??this._editor.getDomNode():void 0,getAnchor:()=>s,getActions:()=>e,getActionViewItem:d=>{const f=this._keybindingFor(d);if(f)return new V$(d,d,{label:!0,keybinding:f.getLabel(),isMenu:!0});const m=d;return typeof m.getActionViewItem=="function"?m.getActionViewItem():new V$(d,d,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:d=>this._keybindingFor(d),onHide:d=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:n})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||J0i(this._workspaceContextService.getWorkspace()))return;const i=this._editor.getOption(73);let n=0;const s=v=>({id:`menu-action-${++n}`,label:v.label,tooltip:"",class:void 0,enabled:typeof v.enabled>"u"?!0:v.enabled,checked:v.checked,run:v.run}),c=(v,x)=>new T$(`menu-action-${++n}`,v,x,void 0),d=(v,x,w,I,P)=>{if(!x)return s({label:v,enabled:x,run:()=>{}});const O=J=>()=>{this._configurationService.updateValue(w,J)},z=[];for(const J of P)z.push(s({label:J.label,checked:I===J.value,run:O(J.value)}));return c(v,z)},f=[];f.push(s({label:W("context.minimap.minimap","Minimap"),checked:i.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!i.enabled)}})),f.push(new Rm),f.push(s({label:W("context.minimap.renderCharacters","Render Characters"),enabled:i.enabled,checked:i.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!i.renderCharacters)}})),f.push(d(W("context.minimap.size","Vertical size"),i.enabled,"editor.minimap.size",i.size,[{label:W("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:W("context.minimap.size.fill","Fill"),value:"fill"},{label:W("context.minimap.size.fit","Fit"),value:"fit"}])),f.push(d(W("context.minimap.slider","Slider"),i.enabled,"editor.minimap.showSlider",i.showSlider,[{label:W("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:W("context.minimap.slider.always","Always"),value:"always"}]));const m=this._editor.getOption(128)&&!VE;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:m?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>f,onHide:v=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}},Oze=G9,G9.ID="editor.contrib.contextmenu",G9);eJ=Oze=RPi([SF(1,eS),SF(2,b6),SF(3,Ko),SF(4,pu),SF(5,Lw),SF(6,Cc),SF(7,LB)],eJ);class FPi extends hs{constructor(){super({id:"editor.action.showContextMenu",label:W("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:Tt.textInputFocus,primary:1092,weight:100}})}run(e,i){var n;(n=eJ.get(i))==null||n.showContextMenu()}}Cl(eJ.ID,eJ,2);sr(FPi);class O9e{constructor(e){this.selections=e}equals(e){const i=this.selections.length,n=e.selections.length;if(i!==n)return!1;for(let s=0;s<i;s++)if(!this.selections[s].equalsSelection(e.selections[s]))return!1;return!0}}class M9e{constructor(e,i,n){this.cursorState=e,this.scrollTop=i,this.scrollLeft=n}}const UCe=class UCe extends xi{static get(e){return e.getContribution(UCe.ID)}constructor(e){super(),this._editor=e,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(e.onDidChangeModel(i=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(i=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(i=>{if(this._isCursorUndoRedo||!i.oldSelections||i.oldModelVersionId!==i.modelVersionId)return;const n=new O9e(i.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(n)||(this._undoStack.push(new M9e(n,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new M9e(new O9e(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new M9e(new O9e(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}};UCe.ID="editor.contrib.cursorUndoRedoController";let tJ=UCe;class BPi extends hs{constructor(){super({id:"cursorUndo",label:W("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:Tt.textInputFocus,primary:2099,weight:100}})}run(e,i,n){var s;(s=tJ.get(i))==null||s.cursorUndo()}}class WPi extends hs{constructor(){super({id:"cursorRedo",label:W("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,i,n){var s;(s=tJ.get(i))==null||s.cursorRedo()}}Cl(tJ.ID,tJ,0);sr(BPi);sr(WPi);class VPi{constructor(e,i,n){this.selection=e,this.targetPosition=i,this.copy=n,this.targetSelection=null}getEditOperations(e,i){const n=e.getValueInRange(this.selection);if(this.copy||i.addEditOperation(this.selection,null),i.addEditOperation(new nt(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),n),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new Us(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new Us(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber<this.selection.endLineNumber){this.targetSelection=new Us(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber+this.selection.endLineNumber-this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new Us(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column-this.selection.endColumn+this.selection.startColumn:this.targetPosition.column-this.selection.endColumn+this.selection.startColumn,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column:this.selection.endColumn):this.targetSelection=new Us(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column+this.selection.endColumn-this.selection.startColumn)}computeCursorState(e,i){return this.targetSelection}}function RU(l){return Hc?l.altKey:l.ctrlKey}const bM=class bM extends xi{constructor(e){super(),this._editor=e,this._dndDecorationIds=this._editor.createDecorationsCollection(),this._register(this._editor.onMouseDown(i=>this._onEditorMouseDown(i))),this._register(this._editor.onMouseUp(i=>this._onEditorMouseUp(i))),this._register(this._editor.onMouseDrag(i=>this._onEditorMouseDrag(i))),this._register(this._editor.onMouseDrop(i=>this._onEditorMouseDrop(i))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(i=>this.onEditorKeyDown(i))),this._register(this._editor.onKeyUp(i=>this.onEditorKeyUp(i))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){!this._editor.getOption(35)||this._editor.getOption(22)||(RU(e)&&(this._modifierPressed=!0),this._mouseDown&&RU(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(35)||this._editor.getOption(22)||(RU(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===bM.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){const i=e.target;if(this._dragSelection===null){const s=(this._editor.getSelections()||[]).filter(c=>i.position&&c.containsPosition(i.position));if(s.length===1)this._dragSelection=s[0];else return}RU(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),i.position&&(this._dragSelection.containsPosition(i.position)?this._removeDecoration():this.showAt(i.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){const i=new pi(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let n=null;if(e.event.shiftKey){const s=this._editor.getSelection();if(s){const{selectionStartLineNumber:c,selectionStartColumn:d}=s;n=[new Us(c,d,i.lineNumber,i.column)]}}else n=(this._editor.getSelections()||[]).map(s=>s.containsPosition(i)?new Us(i.lineNumber,i.column,i.lineNumber,i.column):s);this._editor.setSelections(n||[],"mouse",3)}else(!this._dragSelection.containsPosition(i)||(RU(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(i)||this._dragSelection.getStartPosition().equals(i)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(bM.ID,new VPi(this._dragSelection,i,RU(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new nt(e.lineNumber,e.column,e.lineNumber,e.column),options:bM._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return e.type===6||e.type===7}_hitMargin(e){return e.type===2||e.type===3||e.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}};bM.ID="editor.contrib.dragAndDrop",bM.TRIGGER_KEY_VALUE=Hc?6:5,bM._DECORATION_OPTIONS=qa.register({description:"dnd-target",className:"dnd-target"});let obe=bM;Cl(obe.ID,obe,2);Cl(_6.ID,_6,0);NJ(Kje);$r(new class extends tm{constructor(){super({id:qNt,precondition:MGe,kbOpts:{weight:100,primary:2137}})}runEditorCommand(l,e){var i;return(i=_6.get(e))==null?void 0:i.changePasteType()}});$r(new class extends tm{constructor(){super({id:"editor.hidePasteWidget",precondition:MGe,kbOpts:{weight:100,primary:9}})}runEditorCommand(l,e){var i;(i=_6.get(e))==null||i.clearWidgets()}});var K9;sr((K9=class extends hs{constructor(){super({id:"editor.action.pasteAs",label:W("pasteAs","Paste As..."),alias:"Paste As...",precondition:Tt.writable,metadata:{description:"Paste as",args:[{name:"args",schema:K9.argsSchema}]}})}run(e,i,n){var c;let s=typeof(n==null?void 0:n.kind)=="string"?n.kind:void 0;return!s&&n&&(s=typeof n.id=="string"?n.id:void 0),(c=_6.get(i))==null?void 0:c.pasteAs(s?new Nf(s):void 0)}},K9.argsSchema={type:"object",properties:{kind:{type:"string",description:W("pasteAs.kind","The kind of the paste edit to try applying. If not provided or there are multiple edits for this kind, the editor will show a picker.")}}},K9));sr(class extends hs{constructor(){super({id:"editor.action.pasteAsText",label:W("pasteAsText","Paste as Text"),alias:"Paste as Text",precondition:Tt.writable})}run(l,e){var i;return(i=_6.get(e))==null?void 0:i.pasteAs({providerId:BB.id})}});class HPi{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const i=this._dragOperations.get(e);return this._dragOperations.delete(e),i}}}class Zwt{constructor(e){this.identifier=e}}const zLt=jc("treeViewsDndService");nl(zLt,HPi,1);var jPi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},O0e=function(l,e){return function(i,n){e(i,n,l)}},Mze;const ULt="editor.experimental.dropIntoEditor.defaultProvider",qLt="editor.changeDropType",XGe=new rs("dropWidgetVisible",!1,W("dropWidgetVisible","Whether the drop widget is showing"));var X9;let iJ=(X9=class extends xi{static get(e){return e.getContribution(Mze.ID)}constructor(e,i,n,s,c){super(),this._configService=n,this._languageFeaturesService=s,this._treeViewsDragAndDropService=c,this.treeItemsTransfer=Jje.getInstance(),this._dropProgressManager=this._register(i.createInstance(Jve,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(i.createInstance(Kve,"dropIntoEditor",e,XGe,{id:qLt,label:W("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor(d=>this.onDropIntoEditor(e,d.position,d.event)))}clearWidgets(){this._postDropWidgetManager.clear()}changeDropType(){this._postDropWidgetManager.tryShowSelector()}async onDropIntoEditor(e,i,n){var c;if(!n.dataTransfer||!e.hasModel())return;(c=this._currentOperation)==null||c.cancel(),e.focus(),e.setPosition(i);const s=Om(async d=>{const f=new wn,m=f.add(new LR(e,1,void 0,d));try{const v=await this.extractDataTransferData(n);if(v.size===0||m.token.isCancellationRequested)return;const x=e.getModel();if(!x)return;const w=this._languageFeaturesService.documentDropEditProvider.ordered(x).filter(P=>P.dropMimeTypes?P.dropMimeTypes.some(O=>v.matches(O)):!0),I=f.add(await this.getDropEdits(w,x,i,v,m));if(m.token.isCancellationRequested)return;if(I.edits.length){const P=this.getInitialActiveEditIndex(x,I.edits),O=e.getOption(36).showDropSelector==="afterDrop";await this._postDropWidgetManager.applyEditAndShowIfNeeded([nt.fromPositions(i)],{activeEditIndex:P,allEdits:I.edits},O,async z=>z,d)}}finally{f.dispose(),this._currentOperation===s&&(this._currentOperation=void 0)}});this._dropProgressManager.showWhile(i,W("dropIntoEditorProgress","Running drop handlers. Click to cancel"),s,{cancel:()=>s.cancel()}),this._currentOperation=s}async getDropEdits(e,i,n,s,c){const d=new wn,f=await _se(Promise.all(e.map(async v=>{try{const x=await v.provideDocumentDropEdits(i,n,s,c.token);return x&&d.add(x),x==null?void 0:x.edits.map(w=>({...w,providerId:v.id}))}catch(x){console.error(x)}})),c.token),m=yT(f??[]).flat();return{edits:zNt(m),dispose:()=>d.dispose()}}getInitialActiveEditIndex(e,i){const n=this._configService.getValue(ULt,{resource:e.uri});for(const[s,c]of Object.entries(n)){const d=new Nf(c),f=i.findIndex(m=>d.value===m.providerId&&m.handledMimeType&&MNt(s,[m.handledMimeType]));if(f>=0)return f}return 0}async extractDataTransferData(e){if(!e.dataTransfer)return new ONt;const i=BNt(e.dataTransfer);if(this.treeItemsTransfer.hasData(Zwt.prototype)){const n=this.treeItemsTransfer.getData(Zwt.prototype);if(Array.isArray(n))for(const s of n){const c=await this._treeViewsDragAndDropService.removeDragOperationTransfer(s.identifier);if(c)for(const[d,f]of c)i.replace(d,f)}}return i}},Mze=X9,X9.ID="editor.contrib.dropIntoEditorController",X9);iJ=Mze=jPi([O0e(1,ho),O0e(2,Cc),O0e(3,Ts),O0e(4,zLt)],iJ);Cl(iJ.ID,iJ,2);NJ(Gje);$r(new class extends tm{constructor(){super({id:qLt,precondition:XGe,kbOpts:{weight:100,primary:2137}})}runEditorCommand(l,e,i){var n;(n=iJ.get(e))==null||n.changeDropType()}});$r(new class extends tm{constructor(){super({id:"editor.hideDropWidget",precondition:XGe,kbOpts:{weight:100,primary:9}})}runEditorCommand(l,e,i){var n;(n=iJ.get(e))==null||n.clearWidgets()}});nh.as(DT.Configuration).registerConfiguration({...wse,properties:{[ULt]:{type:"object",scope:5,description:W("defaultProviderDescription","Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}});const my=class my{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map(i=>this._editor.getModel().getDecorationRange(i)).filter(i=>!!i);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const i=this._decorations.indexOf(e);return i>=0?i+1:1}getDecorationRangeAt(e){const i=e<this._decorations.length?this._decorations[e]:null;return i?this._editor.getModel().getDecorationRange(i):null}getCurrentMatchesPosition(e){const i=this._editor.getModel().getDecorationsInRange(e);for(const n of i){const s=n.options;if(s===my._FIND_MATCH_DECORATION||s===my._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(n.id)}return 0}setCurrentFindMatch(e){let i=null,n=0;if(e)for(let s=0,c=this._decorations.length;s<c;s++){const d=this._editor.getModel().getDecorationRange(this._decorations[s]);if(e.equalsRange(d)){i=this._decorations[s],n=s+1;break}}return(this._highlightedDecorationId!==null||i!==null)&&this._editor.changeDecorations(s=>{if(this._highlightedDecorationId!==null&&(s.changeDecorationOptions(this._highlightedDecorationId,my._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),i!==null&&(this._highlightedDecorationId=i,s.changeDecorationOptions(this._highlightedDecorationId,my._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(s.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),i!==null){let c=this._editor.getModel().getDecorationRange(i);if(c.startLineNumber!==c.endLineNumber&&c.endColumn===1){const d=c.endLineNumber-1,f=this._editor.getModel().getLineMaxColumn(d);c=new nt(c.startLineNumber,c.startColumn,d,f)}this._rangeHighlightDecorationId=s.addDecoration(c,my._RANGE_HIGHLIGHT_DECORATION)}}),n}set(e,i){this._editor.changeDecorations(n=>{let s=my._FIND_MATCH_DECORATION;const c=[];if(e.length>1e3){s=my._FIND_MATCH_NO_OVERVIEW_DECORATION;const f=this._editor.getModel().getLineCount(),v=this._editor.getLayoutInfo().height/f,x=Math.max(2,Math.ceil(3/v));let w=e[0].range.startLineNumber,I=e[0].range.endLineNumber;for(let P=1,O=e.length;P<O;P++){const z=e[P].range;I+x>=z.startLineNumber?z.endLineNumber>I&&(I=z.endLineNumber):(c.push({range:new nt(w,1,I,1),options:my._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),w=z.startLineNumber,I=z.endLineNumber)}c.push({range:new nt(w,1,I,1),options:my._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const d=new Array(e.length);for(let f=0,m=e.length;f<m;f++)d[f]={range:e[f].range,options:s};this._decorations=n.deltaDecorations(this._decorations,d),this._overviewRulerApproximateDecorations=n.deltaDecorations(this._overviewRulerApproximateDecorations,c),this._rangeHighlightDecorationId&&(n.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(f=>n.removeDecoration(f)),this._findScopeDecorationIds=[]),i!=null&&i.length&&(this._findScopeDecorationIds=i.map(f=>n.addDecoration(f,my._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let i=this._decorations.length-1;i>=0;i--){const n=this._decorations[i],s=this._editor.getModel().getDecorationRange(n);if(!(!s||s.endLineNumber>e.lineNumber)){if(s.endLineNumber<e.lineNumber)return s;if(!(s.endColumn>e.column))return s}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let i=0,n=this._decorations.length;i<n;i++){const s=this._decorations[i],c=this._editor.getModel().getDecorationRange(s);if(!(!c||c.startLineNumber<e.lineNumber)){if(c.startLineNumber>e.lineNumber)return c;if(!(c.startColumn<e.column))return c}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let e=[];return e=e.concat(this._decorations),e=e.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&e.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&e.push(this._rangeHighlightDecorationId),e}};my._CURRENT_FIND_MATCH_DECORATION=qa.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",inlineClassName:"currentFindMatchInline",showIfCollapsed:!0,overviewRuler:{color:Mh(LFe),position:ww.Center},minimap:{color:Mh(cVe),position:1}}),my._FIND_MATCH_DECORATION=qa.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",inlineClassName:"findMatchInline",showIfCollapsed:!0,overviewRuler:{color:Mh(LFe),position:ww.Center},minimap:{color:Mh(cVe),position:1}}),my._FIND_MATCH_NO_OVERVIEW_DECORATION=qa.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0}),my._FIND_MATCH_ONLY_OVERVIEW_DECORATION=qa.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:Mh(LFe),position:ww.Center}}),my._RANGE_HIGHLIGHT_DECORATION=qa.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0}),my._FIND_SCOPE_DECORATION=qa.register({description:"find-scope",className:"findScope",isWholeLine:!0});let Rze=my;class zPi{constructor(e,i,n){this._editorSelection=e,this._ranges=i,this._replaceStrings=n,this._trackedEditorSelectionId=null}getEditOperations(e,i){if(this._ranges.length>0){const n=[];for(let d=0;d<this._ranges.length;d++)n.push({range:this._ranges[d],text:this._replaceStrings[d]});n.sort((d,f)=>nt.compareRangesUsingStarts(d.range,f.range));const s=[];let c=n[0];for(let d=1;d<n.length;d++)c.range.endLineNumber===n[d].range.startLineNumber&&c.range.endColumn===n[d].range.startColumn?(c.range=c.range.plusRange(n[d].range),c.text=c.text+n[d].text):(s.push(c),c=n[d]);s.push(c);for(const d of s)i.addEditOperation(d.range,d.text)}this._trackedEditorSelectionId=i.trackSelection(this._editorSelection)}computeCursorState(e,i){return i.getTrackedSelection(this._trackedEditorSelectionId)}}function $Lt(l,e){if(l&&l[0]!==""){const i=Ywt(l,e,"-"),n=Ywt(l,e,"_");return i&&!n?ext(l,e,"-"):!i&&n?ext(l,e,"_"):l[0].toUpperCase()===l[0]?e.toUpperCase():l[0].toLowerCase()===l[0]?e.toLowerCase():tui(l[0][0])&&e.length>0?e[0].toUpperCase()+e.substr(1):l[0][0].toUpperCase()!==l[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function Ywt(l,e,i){return l[0].indexOf(i)!==-1&&e.indexOf(i)!==-1&&l[0].split(i).length===e.split(i).length}function ext(l,e,i){const n=e.split(i),s=l[0].split(i);let c="";return n.forEach((d,f)=>{c+=$Lt([s[f]],d)+i}),c.slice(0,-1)}class txt{constructor(e){this.staticValue=e,this.kind=0}}class UPi{constructor(e){this.pieces=e,this.kind=1}}class nJ{static fromStaticValue(e){return new nJ([S9.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new txt(""):e.length===1&&e[0].staticValue!==null?this._state=new txt(e[0].staticValue):this._state=new UPi(e)}buildReplaceString(e,i){if(this._state.kind===0)return i?$Lt(e,this._state.staticValue):this._state.staticValue;let n="";for(let s=0,c=this._state.pieces.length;s<c;s++){const d=this._state.pieces[s];if(d.staticValue!==null){n+=d.staticValue;continue}let f=nJ._substitute(d.matchIndex,e);if(d.caseOps!==null&&d.caseOps.length>0){const m=[],v=d.caseOps.length;let x=0;for(let w=0,I=f.length;w<I;w++){if(x>=v){m.push(f.slice(w));break}switch(d.caseOps[x]){case"U":m.push(f[w].toUpperCase());break;case"u":m.push(f[w].toUpperCase()),x++;break;case"L":m.push(f[w].toLowerCase());break;case"l":m.push(f[w].toLowerCase()),x++;break;default:m.push(f[w])}}f=m.join("")}n+=f}return n}static _substitute(e,i){if(i===null)return"";if(e===0)return i[0];let n="";for(;e>0;){if(e<i.length)return(i[e]||"")+n;n=String(e%10)+n,e=Math.floor(e/10)}return"$"+n}}class S9{static staticValue(e){return new S9(e,-1,null)}static caseOps(e,i){return new S9(null,e,i)}constructor(e,i,n){this.staticValue=e,this.matchIndex=i,!n||n.length===0?this.caseOps=null:this.caseOps=n.slice(0)}}class qPi{constructor(e){this._source=e,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(e){this._emitStatic(this._source.substring(this._lastCharIndex,e)),this._lastCharIndex=e}emitStatic(e,i){this._emitStatic(e),this._lastCharIndex=i}_emitStatic(e){e.length!==0&&(this._currentStaticPiece+=e)}emitMatchIndex(e,i,n){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=S9.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=S9.caseOps(e,n),this._lastCharIndex=i}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=S9.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new nJ(this._result)}}function $Pi(l){if(!l||l.length===0)return new nJ(null);const e=[],i=new qPi(l);for(let n=0,s=l.length;n<s;n++){const c=l.charCodeAt(n);if(c===92){if(n++,n>=s)break;const d=l.charCodeAt(n);switch(d){case 92:i.emitUnchanged(n-1),i.emitStatic("\\",n+1);break;case 110:i.emitUnchanged(n-1),i.emitStatic(`
+`,n+1);break;case 116:i.emitUnchanged(n-1),i.emitStatic(" ",n+1);break;case 117:case 85:case 108:case 76:i.emitUnchanged(n-1),i.emitStatic("",n+1),e.push(String.fromCharCode(d));break}continue}if(c===36){if(n++,n>=s)break;const d=l.charCodeAt(n);if(d===36){i.emitUnchanged(n-1),i.emitStatic("$",n+1);continue}if(d===48||d===38){i.emitUnchanged(n-1),i.emitMatchIndex(0,n+1,e),e.length=0;continue}if(49<=d&&d<=57){let f=d-48;if(n+1<s){const m=l.charCodeAt(n+1);if(48<=m&&m<=57){n++,f=f*10+(m-48),i.emitUnchanged(n-2),i.emitMatchIndex(f,n+1,e),e.length=0;continue}}i.emitUnchanged(n-1),i.emitMatchIndex(f,n+1,e),e.length=0;continue}}}return i.finalize()}const x6=new rs("findWidgetVisible",!1);x6.toNegated();const exe=new rs("findInputFocussed",!1),QGe=new rs("replaceInputFocussed",!1),M0e={primary:545,mac:{primary:2593}},R0e={primary:565,mac:{primary:2613}},F0e={primary:560,mac:{primary:2608}},B0e={primary:554,mac:{primary:2602}},W0e={primary:558,mac:{primary:2606}},ef={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",GoToMatchFindAction:"editor.action.goToMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},jM=19999,JPi=240;class Yie{constructor(e,i){this._toDispose=new wn,this._editor=e,this._state=i,this._isDisposed=!1,this._startSearchingTimer=new TT,this._decorations=new Rze(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new qu(()=>{if(this._editor.hasModel())return this.research(!1)},100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(n=>{(n.reason===3||n.reason===5||n.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(n=>{this._ignoreModelContentChanged||(n.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(n=>this._onStateChanged(n))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,vd(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){this._isDisposed||this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},JPi)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,i){return i||e.getFullModelRange()}research(e,i){let n=null;typeof i<"u"?i!==null&&(Array.isArray(i)?n=i:n=[i]):n=this._decorations.getFindScopes(),n!==null&&(n=n.map(f=>{if(f.startLineNumber!==f.endLineNumber){let m=f.endLineNumber;return f.endColumn===1&&(m=m-1),new nt(f.startLineNumber,1,m,this._editor.getModel().getLineMaxColumn(m))}return f}));const s=this._findMatches(n,!1,jM);this._decorations.set(s,n);const c=this._editor.getSelection();let d=this._decorations.getCurrentMatchesPosition(c);if(d===0&&s.length>0){const f=Une(s.map(m=>m.range),m=>nt.compareRangesUsingStarts(m,c)>=0);d=f>0?f-1+1:d}this._state.changeMatchInfo(d,this._decorations.getCount(),void 0),e&&this._editor.getOption(41).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){const i=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(i,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const i=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:n,column:s}=e;const c=this._editor.getModel();return i||s===1?(n===1?n=c.getLineCount():n--,s=c.getLineMaxColumn(n)):s--,new pi(n,s)}_moveToPrevMatch(e,i=!1){if(!this._state.canNavigateBack()){const x=this._decorations.matchAfterPosition(e);x&&this._setCurrentFindMatch(x);return}if(this._decorations.getCount()<jM){let x=this._decorations.matchBeforePosition(e);x&&x.isEmpty()&&x.getStartPosition().equals(e)&&(e=this._prevSearchPosition(e),x=this._decorations.matchBeforePosition(e)),x&&this._setCurrentFindMatch(x);return}if(this._cannotFind())return;const n=this._decorations.getFindScope(),s=Yie._getSearchRange(this._editor.getModel(),n);s.getEndPosition().isBefore(e)&&(e=s.getEndPosition()),e.isBefore(s.getStartPosition())&&(e=s.getEndPosition());const{lineNumber:c,column:d}=e,f=this._editor.getModel();let m=new pi(c,d),v=f.findPreviousMatch(this._state.searchString,m,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,!1);if(v&&v.range.isEmpty()&&v.range.getStartPosition().equals(m)&&(m=this._prevSearchPosition(m),v=f.findPreviousMatch(this._state.searchString,m,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,!1)),!!v){if(!i&&!s.containsRange(v.range))return this._moveToPrevMatch(v.range.getStartPosition(),!0);this._setCurrentFindMatch(v.range)}}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(e){const i=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:n,column:s}=e;const c=this._editor.getModel();return i||s===c.getLineMaxColumn(n)?(n===c.getLineCount()?n=1:n++,s=1):s++,new pi(n,s)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const n=this._decorations.matchBeforePosition(e);n&&this._setCurrentFindMatch(n);return}if(this._decorations.getCount()<jM){let n=this._decorations.matchAfterPosition(e);n&&n.isEmpty()&&n.getStartPosition().equals(e)&&(e=this._nextSearchPosition(e),n=this._decorations.matchAfterPosition(e)),n&&this._setCurrentFindMatch(n);return}const i=this._getNextMatch(e,!1,!0);i&&this._setCurrentFindMatch(i.range)}_getNextMatch(e,i,n,s=!1){if(this._cannotFind())return null;const c=this._decorations.getFindScope(),d=Yie._getSearchRange(this._editor.getModel(),c);d.getEndPosition().isBefore(e)&&(e=d.getStartPosition()),e.isBefore(d.getStartPosition())&&(e=d.getStartPosition());const{lineNumber:f,column:m}=e,v=this._editor.getModel();let x=new pi(f,m),w=v.findNextMatch(this._state.searchString,x,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,i);return n&&w&&w.range.isEmpty()&&w.range.getStartPosition().equals(x)&&(x=this._nextSearchPosition(x),w=v.findNextMatch(this._state.searchString,x,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,i)),w?!s&&!d.containsRange(w.range)?this._getNextMatch(w.range.getEndPosition(),i,n,!0):w:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_moveToMatch(e){const i=this._decorations.getDecorationRangeAt(e);i&&this._setCurrentFindMatch(i)}moveToMatch(e){this._moveToMatch(e)}_getReplacePattern(){return this._state.isRegex?$Pi(this._state.replaceString):nJ.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;const e=this._getReplacePattern(),i=this._editor.getSelection(),n=this._getNextMatch(i.getStartPosition(),!0,!1);if(n)if(i.equalsRange(n.range)){const s=e.buildReplaceString(n.matches,this._state.preserveCase),c=new T0(i,s);this._executeEditorCommand("replace",c),this._decorations.setStartPosition(new pi(i.startLineNumber,i.startColumn+s.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(n.range)}_findMatches(e,i,n){const s=(e||[null]).map(c=>Yie._getSearchRange(this._editor.getModel(),c));return this._editor.getModel().findMatches(this._state.searchString,s,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,i,n)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=jM?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const i=new DF(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null).parseSearchRequest();if(!i)return;let n=i.regex;if(!n.multiline){let w="mu";n.ignoreCase&&(w+="i"),n.global&&(w+="g"),n=new RegExp(n.source,w)}const s=this._editor.getModel(),c=s.getValue(1),d=s.getFullModelRange(),f=this._getReplacePattern();let m;const v=this._state.preserveCase;f.hasReplacementPatterns||v?m=c.replace(n,function(){return f.buildReplaceString(arguments,v)}):m=c.replace(n,f.buildReplaceString(null,v));const x=new GJe(d,m,this._editor.getSelection());this._executeEditorCommand("replaceAll",x)}_regularReplaceAll(e){const i=this._getReplacePattern(),n=this._findMatches(e,i.hasReplacementPatterns||this._state.preserveCase,1073741824),s=[];for(let d=0,f=n.length;d<f;d++)s[d]=i.buildReplaceString(n[d].matches,this._state.preserveCase);const c=new zPi(this._editor.getSelection(),n.map(d=>d.range),s);this._executeEditorCommand("replaceAll",c)}selectAllMatches(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();let n=this._findMatches(e,!1,1073741824).map(c=>new Us(c.range.startLineNumber,c.range.startColumn,c.range.endLineNumber,c.range.endColumn));const s=this._editor.getSelection();for(let c=0,d=n.length;c<d;c++)if(n[c].equalsRange(s)){n=[s].concat(n.slice(0,c)).concat(n.slice(c+1));break}this._editor.setSelections(n)}_executeEditorCommand(e,i){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(e,i),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}const qCe=class qCe extends Aw{constructor(e,i,n){super(),this._hideSoon=this._register(new qu(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=i,this._keybindingService=n,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const s={inputActiveOptionBorder:cs(nwe),inputActiveOptionForeground:cs(rwe),inputActiveOptionBackground:cs(yse)},c=this._register(W$());this.caseSensitive=this._register(new bEt({appendTitle:this._keybindingLabelFor(ef.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,hoverDelegate:c,...s})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new CEt({appendTitle:this._keybindingLabelFor(ef.ToggleWholeWordCommand),isChecked:this._state.wholeWord,hoverDelegate:c,...s})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new SEt({appendTitle:this._keybindingLabelFor(ef.ToggleRegexCommand),isChecked:this._state.isRegex,hoverDelegate:c,...s})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(d=>{let f=!1;d.isRegex&&(this.regex.checked=this._state.isRegex,f=!0),d.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,f=!0),d.matchCase&&(this.caseSensitive.checked=this._state.matchCase,f=!0),!this._state.isRevealed&&f&&this._revealTemporarily()})),this._register(en(this._domNode,br.MOUSE_LEAVE,d=>this._onMouseLeave())),this._register(en(this._domNode,"mouseover",d=>this._onMouseOver()))}_keybindingLabelFor(e){const i=this._keybindingService.lookupKeybinding(e);return i?` (${i.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return qCe.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}};qCe.ID="editor.contrib.findOptionsWidget";let Fze=qCe;function V0e(l,e){return l===1?!0:l===2?!1:e}class GPi extends xi{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return V0e(this._isRegexOverride,this._isRegex)}get wholeWord(){return V0e(this._wholeWordOverride,this._wholeWord)}get matchCase(){return V0e(this._matchCaseOverride,this._matchCase)}get preserveCase(){return V0e(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new gi),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,i,n){const s={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let c=!1;i===0&&(e=0),e>i&&(e=i),this._matchesPosition!==e&&(this._matchesPosition=e,s.matchesPosition=!0,c=!0),this._matchesCount!==i&&(this._matchesCount=i,s.matchesCount=!0,c=!0),typeof n<"u"&&(nt.equalsRange(this._currentMatch,n)||(this._currentMatch=n,s.currentMatch=!0,c=!0)),c&&this._onFindReplaceStateChange.fire(s)}change(e,i,n=!0){var x;const s={moveCursor:i,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let c=!1;const d=this.isRegex,f=this.wholeWord,m=this.matchCase,v=this.preserveCase;typeof e.searchString<"u"&&this._searchString!==e.searchString&&(this._searchString=e.searchString,s.searchString=!0,c=!0),typeof e.replaceString<"u"&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,s.replaceString=!0,c=!0),typeof e.isRevealed<"u"&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,s.isRevealed=!0,c=!0),typeof e.isReplaceRevealed<"u"&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,s.isReplaceRevealed=!0,c=!0),typeof e.isRegex<"u"&&(this._isRegex=e.isRegex),typeof e.wholeWord<"u"&&(this._wholeWord=e.wholeWord),typeof e.matchCase<"u"&&(this._matchCase=e.matchCase),typeof e.preserveCase<"u"&&(this._preserveCase=e.preserveCase),typeof e.searchScope<"u"&&((x=e.searchScope)!=null&&x.every(w=>{var I;return(I=this._searchScope)==null?void 0:I.some(P=>!nt.equalsRange(P,w))})||(this._searchScope=e.searchScope,s.searchScope=!0,c=!0)),typeof e.loop<"u"&&this._loop!==e.loop&&(this._loop=e.loop,s.loop=!0,c=!0),typeof e.isSearching<"u"&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,s.isSearching=!0,c=!0),typeof e.filters<"u"&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,s.filters=!0,c=!0),this._isRegexOverride=typeof e.isRegexOverride<"u"?e.isRegexOverride:0,this._wholeWordOverride=typeof e.wholeWordOverride<"u"?e.wholeWordOverride:0,this._matchCaseOverride=typeof e.matchCaseOverride<"u"?e.matchCaseOverride:0,this._preserveCaseOverride=typeof e.preserveCaseOverride<"u"?e.preserveCaseOverride:0,d!==this.isRegex&&(c=!0,s.isRegex=!0),f!==this.wholeWord&&(c=!0,s.wholeWord=!0),m!==this.matchCase&&(c=!0,s.matchCase=!0),v!==this.preserveCase&&(c=!0,s.preserveCase=!0),c&&this._onFindReplaceStateChange.fire(s)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=jM}}const KPi=W("defaultLabel","input"),XPi=W("label.preserveCaseToggle","Preserve Case");class QPi extends TJ{constructor(e){super({icon:pr.preserveCase,title:XPi+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??Dv("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class ZPi extends Aw{constructor(e,i,n,s){super(),this._showOptionButtons=n,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new gi),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new gi),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new gi),this._onInput=this._register(new gi),this._onKeyUp=this._register(new gi),this._onPreserveCaseKeyDown=this._register(new gi),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=i,this.placeholder=s.placeholder||"",this.validation=s.validation,this.label=s.label||KPi;const c=s.appendPreserveCaseLabel||"",d=s.history||[],f=!!s.flexibleHeight,m=!!s.flexibleWidth,v=s.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new wEt(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:d,showHistoryHint:s.showHistoryHint,flexibleHeight:f,flexibleWidth:m,flexibleMaxHeight:v,inputBoxStyles:s.inputBoxStyles})),this.preserveCase=this._register(new QPi({appendTitle:c,isChecked:!1,...s.toggleStyles})),this._register(this.preserveCase.onChange(I=>{this._onDidOptionChange.fire(I),!I&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(I=>{this._onPreserveCaseKeyDown.fire(I)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const x=[this.preserveCase.domNode];this.onkeydown(this.domNode,I=>{if(I.equals(15)||I.equals(17)||I.equals(9)){const P=x.indexOf(this.domNode.ownerDocument.activeElement);if(P>=0){let O=-1;I.equals(17)?O=(P+1)%x.length:I.equals(15)&&(P===0?O=x.length-1:O=P-1),I.equals(9)?(x[P].blur(),this.inputBox.focus()):O>=0&&x[O].focus(),il.stop(I,!0)}}});const w=document.createElement("div");w.className="controls",w.style.display=this._showOptionButtons?"block":"none",w.appendChild(this.preserveCase.domNode),this.domNode.appendChild(w),e==null||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,I=>this._onKeyDown.fire(I)),this.onkeyup(this.inputBox.inputElement,I=>this._onKeyUp.fire(I)),this.oninput(this.inputBox.inputElement,I=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,I=>this._onMouseDown.fire(I))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){var e;(e=this.inputBox)==null||e.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var JLt=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},GLt=function(l,e){return function(i,n){e(i,n,l)}};const ZGe=new rs("suggestWidgetVisible",!1,W("suggestWidgetVisible","Whether suggestion are visible")),YGe="historyNavigationWidgetFocus",KLt="historyNavigationForwardsEnabled",XLt="historyNavigationBackwardsEnabled";let i6;const H0e=[];function QLt(l,e){if(H0e.includes(e))throw new Error("Cannot register the same widget multiple times");H0e.push(e);const i=new wn,n=new rs(YGe,!1).bindTo(l),s=new rs(KLt,!0).bindTo(l),c=new rs(XLt,!0).bindTo(l),d=()=>{n.set(!0),i6=e},f=()=>{n.set(!1),i6===e&&(i6=void 0)};return RSe(e.element)&&d(),i.add(e.onDidFocus(()=>d())),i.add(e.onDidBlur(()=>f())),i.add(fo(()=>{H0e.splice(H0e.indexOf(e),1),f()})),{historyNavigationForwardsEnablement:s,historyNavigationBackwardsEnablement:c,dispose(){i.dispose()}}}let Bze=class extends xEt{constructor(e,i,n,s){super(e,i,n);const c=this._register(s.createScoped(this.inputBox.element));this._register(QLt(c,this.inputBox))}};Bze=JLt([GLt(3,Ko)],Bze);let Wze=class extends ZPi{constructor(e,i,n,s,c=!1){super(e,i,c,n);const d=this._register(s.createScoped(this.inputBox.element));this._register(QLt(d,this.inputBox))}};Wze=JLt([GLt(3,Ko)],Wze);wv.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:kn.and(kn.has(YGe),kn.equals(XLt,!0),kn.not("isComposing"),ZGe.isEqualTo(!1)),primary:16,secondary:[528],handler:l=>{i6==null||i6.showPreviousValue()}});wv.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:kn.and(kn.has(YGe),kn.equals(KLt,!0),kn.not("isComposing"),ZGe.isEqualTo(!1)),primary:18,secondary:[530],handler:l=>{i6==null||i6.showNextValue()}});function ixt(l){var e,i;return((e=l.lookupKeybinding("history.showPrevious"))==null?void 0:e.getElectronAccelerator())==="Up"&&((i=l.lookupKeybinding("history.showNext"))==null?void 0:i.getElectronAccelerator())==="Down"}const nxt=sf("find-collapsed",pr.chevronRight,W("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),rxt=sf("find-expanded",pr.chevronDown,W("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),YPi=sf("find-selection",pr.selection,W("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),eAi=sf("find-replace",pr.replace,W("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),tAi=sf("find-replace-all",pr.replaceAll,W("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),iAi=sf("find-previous-match",pr.arrowUp,W("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),nAi=sf("find-next-match",pr.arrowDown,W("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),rAi=W("label.findDialog","Find / Replace"),sAi=W("label.find","Find"),oAi=W("placeholder.find","Find"),aAi=W("label.previousMatchButton","Previous Match"),cAi=W("label.nextMatchButton","Next Match"),lAi=W("label.toggleSelectionFind","Find in Selection"),uAi=W("label.closeButton","Close"),dAi=W("label.replace","Replace"),fAi=W("placeholder.replace","Replace"),hAi=W("label.replaceButton","Replace"),_Ai=W("label.replaceAllButton","Replace All"),pAi=W("label.toggleReplaceButton","Toggle Replace"),mAi=W("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",jM),gAi=W("label.matchesLocation","{0} of {1}"),sxt=W("label.noResults","No results"),KN=419,yAi=275,vAi=yAi-54;let Gte=69;const bAi=33,oxt="ctrlEnterReplaceAll.windows.donotask",axt=Hc?256:2048;class R9e{constructor(e){this.afterLineNumber=e,this.heightInPx=bAi,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function cxt(l,e,i){const n=!!e.match(/\n/);if(i&&n&&i.selectionStart>0){l.stopPropagation();return}}function lxt(l,e,i){const n=!!e.match(/\n/);if(i&&n&&i.selectionEnd<i.value.length){l.stopPropagation();return}}const $Ce=class $Ce extends Aw{constructor(e,i,n,s,c,d,f,m,v,x){super(),this._hoverService=x,this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=e,this._controller=i,this._state=n,this._contextViewProvider=s,this._keybindingService=c,this._contextKeyService=d,this._storageService=m,this._notificationService=v,this._ctrlEnterReplaceAllWarningPrompted=!!m.getBoolean(oxt,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new Ck(500),this._register(fo(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(w=>this._onStateChanged(w))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(w=>{if(w.hasChanged(92)&&(this._codeEditor.getOption(92)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),w.hasChanged(146)&&this._tryUpdateWidgetWidth(),w.hasChanged(2)&&this.updateAccessibilitySupport(),w.hasChanged(41)){const I=this._codeEditor.getOption(41).loop;this._state.change({loop:I},!1);const P=this._codeEditor.getOption(41).addExtraSpaceOnTop;P&&!this._viewZone&&(this._viewZone=new R9e(0),this._showViewZone()),!P&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(async()=>{if(this._isVisible){const w=await this._controller.getGlobalBufferTerm();w&&w!==this._state.searchString&&(this._state.change({searchString:w},!1),this._findInput.select())}})),this._findInputFocused=exe.bindTo(d),this._findFocusTracker=this._register(zE(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=QGe.bindTo(d),this._replaceFocusTracker=this._register(zE(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(41).addExtraSpaceOnTop&&(this._viewZone=new R9e(0)),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(w=>{if(w.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return $Ce.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(92)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=FC(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){const i=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",i),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,Pa)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){var i;this._matchesCount.style.minWidth=Gte+"px",this._state.matchesCount>=jM?this._matchesCount.title=mAi:this._matchesCount.title="",(i=this._matchesCount.firstChild)==null||i.remove();let e;if(this._state.matchesCount>0){let n=String(this._state.matchesCount);this._state.matchesCount>=jM&&(n+="+");let s=String(this._state.matchesPosition);s==="0"&&(s="?"),e=SB(gAi,s,n)}else e=sxt;this._matchesCount.appendChild(document.createTextNode(e)),xv(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),Gte=Math.max(Gte,this._matchesCount.clientWidth)}_getAriaLabel(e,i,n){if(e===sxt)return n===""?W("ariaSearchNoResultEmpty","{0} found",e):W("ariaSearchNoResult","{0} found for '{1}'",e,n);if(i){const s=W("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,n,i.startLineNumber+":"+i.startColumn),c=this._codeEditor.getModel();return c&&i.startLineNumber<=c.getLineCount()&&i.startLineNumber>=1?`${c.getLineContent(i.startLineNumber)}, ${s}`:s}return W("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,n)}_updateToggleSelectionFindButton(){const e=this._codeEditor.getSelection(),i=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,n=this._toggleSelectionFind.checked;this._isVisible&&(n||i)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const e=this._state.searchString.length>0,i=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&i&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&i&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const n=!this._codeEditor.getOption(92);this._toggleReplaceBtn.setEnabled(this._isVisible&&n)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(41).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const n=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=n;break}}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let i=!0;if(this._codeEditor.getOption(41).seedSearchStringFromSelection&&e){const n=this._codeEditor.getDomNode();if(n){const s=e_(n),c=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),d=s.left+(c?c.left:0),f=c?c.top:0;if(this._viewZone&&f<this._viewZone.heightInPx){e.endLineNumber>e.startLineNumber&&(i=!1);const m=S2t(this._domNode).left;d>m&&(i=!1);const v=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());s.left+(v?v.left:0)>m&&(i=!1)}}}this._showViewZone(i)}}_hide(e){this._revealTimeouts.forEach(i=>{clearTimeout(i)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(41).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const n=this._viewZone;this._viewZoneId!==void 0||!n||this._codeEditor.changeViewZones(s=>{n.heightInPx=this._getHeight(),this._viewZoneId=s.addZone(n),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+n.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(41).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new R9e(0));const n=this._viewZone;this._codeEditor.changeViewZones(s=>{if(this._viewZoneId!==void 0){const c=this._getHeight();if(c===n.heightInPx)return;const d=c-n.heightInPx;n.heightInPx=c,s.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+d);return}else{let c=this._getHeight();if(c-=this._codeEditor.getOption(84).top,c<=0)return;n.heightInPx=c,this._viewZoneId=s.addZone(n),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+c)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{this._viewZoneId!==void 0&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_tryUpdateWidgetWidth(){if(!this._isVisible||!this._domNode.isConnected)return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const n=e.width,s=e.minimap.minimapWidth;let c=!1,d=!1,f=!1;if(this._resized&&FC(this._domNode)>KN){this._domNode.style.maxWidth=`${n-28-s-15}px`,this._replaceInput.width=FC(this._findInput.domNode);return}if(KN+28+s>=n&&(d=!0),KN+28+s-Gte>=n&&(f=!0),KN+28+s-Gte>=n+50&&(c=!0),this._domNode.classList.toggle("collapsed-find-widget",c),this._domNode.classList.toggle("narrow-find-widget",f),this._domNode.classList.toggle("reduced-find-widget",d),!f&&!c&&(this._domNode.style.maxWidth=`${n-28-s-15}px`),this._findInput.layout({collapsedFindWidget:c,narrowFindWidget:f,reducedFindWidget:d}),this._resized){const m=this._findInput.inputBox.element.clientWidth;m>0&&(this._replaceInput.width=m)}else this._isReplaceVisible&&(this._replaceInput.width=FC(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===e?!1:(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const e=this._codeEditor.getSelections();e.map(i=>{i.endColumn===1&&i.endLineNumber>i.startLineNumber&&(i=i.setEndPosition(i.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(i.endLineNumber-1)));const n=this._state.currentMatch;return i.startLineNumber!==i.endLineNumber&&!nt.equalsRange(i,n)?i:null}).filter(i=>!!i),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(axt|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(`
+`),e.preventDefault();return}if(e.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return cxt(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return lxt(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(axt|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{I0&&PE&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(W("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(oxt,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(`
+`),e.preventDefault();return}if(e.equals(2)){this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(1026)){this._findInput.focus(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return cxt(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return lxt(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const i=this._keybindingService.lookupKeybinding(e);return i?` (${i.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new Bze(null,this._contextViewProvider,{width:vAi,label:sAi,placeholder:oAi,appendCaseSensitiveLabel:this._keybindingLabelFor(ef.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(ef.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(ef.ToggleRegexCommand),validation:x=>{if(x.length===0||!this._findInput.getRegex())return null;try{return new RegExp(x,"gu"),null}catch(w){return{content:w.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>ixt(this._keybindingService),inputBoxStyles:jye,toggleStyles:Hye},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(x=>this._onFindInputKeyDown(x))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(x=>{x.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),x.preventDefault())})),this._register(this._findInput.onRegexKeyDown(x=>{x.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),x.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(x=>{this._tryUpdateHeight()&&this._showViewZone()})),Cv&&this._register(this._findInput.onMouseDown(x=>this._onFindInputMouseDown(x))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount();const n=this._register(W$());this._prevBtn=this._register(new FU({label:aAi+this._keybindingLabelFor(ef.PreviousMatchFindAction),icon:iAi,hoverDelegate:n,onTrigger:()=>{NM(this._codeEditor.getAction(ef.PreviousMatchFindAction)).run().then(void 0,Pa)}},this._hoverService)),this._nextBtn=this._register(new FU({label:cAi+this._keybindingLabelFor(ef.NextMatchFindAction),icon:nAi,hoverDelegate:n,onTrigger:()=>{NM(this._codeEditor.getAction(ef.NextMatchFindAction)).run().then(void 0,Pa)}},this._hoverService));const s=document.createElement("div");s.className="find-part",s.appendChild(this._findInput.domNode);const c=document.createElement("div");c.className="find-actions",s.appendChild(c),c.appendChild(this._matchesCount),c.appendChild(this._prevBtn.domNode),c.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new TJ({icon:YPi,title:lAi+this._keybindingLabelFor(ef.ToggleSearchScopeCommand),isChecked:!1,hoverDelegate:n,inputActiveOptionBackground:cs(yse),inputActiveOptionBorder:cs(nwe),inputActiveOptionForeground:cs(rwe)})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let x=this._codeEditor.getSelections();x=x.map(w=>(w.endColumn===1&&w.endLineNumber>w.startLineNumber&&(w=w.setEndPosition(w.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(w.endLineNumber-1))),w.isEmpty()?null:w)).filter(w=>!!w),x.length&&this._state.change({searchScope:x},!0)}}else this._state.change({searchScope:null},!0)})),c.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new FU({label:uAi+this._keybindingLabelFor(ef.CloseFindWidgetCommand),icon:eIt,hoverDelegate:n,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:x=>{x.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),x.preventDefault())}},this._hoverService)),this._replaceInput=this._register(new Wze(null,void 0,{label:dAi,placeholder:fAi,appendPreserveCaseLabel:this._keybindingLabelFor(ef.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>ixt(this._keybindingService),inputBoxStyles:jye,toggleStyles:Hye},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(x=>this._onReplaceInputKeyDown(x))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(x=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(x=>{x.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),x.preventDefault())}));const d=this._register(W$());this._replaceBtn=this._register(new FU({label:hAi+this._keybindingLabelFor(ef.ReplaceOneAction),icon:eAi,hoverDelegate:d,onTrigger:()=>{this._controller.replace()},onKeyDown:x=>{x.equals(1026)&&(this._closeBtn.focus(),x.preventDefault())}},this._hoverService)),this._replaceAllBtn=this._register(new FU({label:_Ai+this._keybindingLabelFor(ef.ReplaceAllAction),icon:tAi,hoverDelegate:d,onTrigger:()=>{this._controller.replaceAll()}},this._hoverService));const f=document.createElement("div");f.className="replace-part",f.appendChild(this._replaceInput.domNode);const m=document.createElement("div");m.className="replace-actions",f.appendChild(m),m.appendChild(this._replaceBtn.domNode),m.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new FU({label:pAi,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=FC(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}},this._hoverService)),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.ariaLabel=rAi,this._domNode.role="dialog",this._domNode.style.width=`${KN}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(s),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(f),this._resizeSash=this._register(new _1(this._domNode,this,{orientation:0,size:2})),this._resized=!1;let v=KN;this._register(this._resizeSash.onDidStart(()=>{v=FC(this._domNode)})),this._register(this._resizeSash.onDidChange(x=>{this._resized=!0;const w=v+x.startX-x.currentX;if(w<KN)return;const I=parseFloat(MSe(this._domNode).maxWidth)||0;w>I||(this._domNode.style.width=`${w}px`,this._isReplaceVisible&&(this._replaceInput.width=FC(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const x=FC(this._domNode);if(x<KN)return;let w=KN;if(!this._resized||x===KN){const I=this._codeEditor.getLayoutInfo();w=I.width-28-I.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${w}px`,this._isReplaceVisible&&(this._replaceInput.width=FC(this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){const e=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(e!==2)}};$Ce.ID="editor.contrib.findWidget";let Vze=$Ce;class FU extends Aw{constructor(e,i){super(),this._opts=e;let n="button";this._opts.className&&(n=n+" "+this._opts.className),this._opts.icon&&(n=n+" "+zo.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.tabIndex=0,this._domNode.className=n,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this._register(i.setupManagedHover(e.hoverDelegate??Dv("element"),this._domNode,this._opts.label)),this.onclick(this._domNode,s=>{this._opts.onTrigger(),s.preventDefault()}),this.onkeydown(this._domNode,s=>{var c,d;if(s.equals(10)||s.equals(3)){this._opts.onTrigger(),s.preventDefault();return}(d=(c=this._opts).onKeyDown)==null||d.call(c,s)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...zo.asClassNameArray(nxt)),this._domNode.classList.add(...zo.asClassNameArray(rxt))):(this._domNode.classList.remove(...zo.asClassNameArray(rxt)),this._domNode.classList.add(...zo.asClassNameArray(nxt)))}}Dk((l,e)=>{const i=l.getColor(AM);i&&e.addRule(`.monaco-editor .findMatch { border: 1px ${RE(l.type)?"dotted":"solid"} ${i}; box-sizing: border-box; }`);const n=l.getColor(opi);n&&e.addRule(`.monaco-editor .findScope { border: 1px ${RE(l.type)?"dashed":"solid"} ${n}; }`);const s=l.getColor(bl);s&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${s}; }`);const c=l.getColor(rpi);c&&e.addRule(`.monaco-editor .findMatchInline { color: ${c}; }`);const d=l.getColor(spi);d&&e.addRule(`.monaco-editor .currentFindMatchInline { color: ${d}; }`)});var ZLt=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},lk=function(l,e){return function(i,n){e(i,n,l)}},Hze;const CAi=524288;function jze(l,e="single",i=!1){if(!l.hasModel())return null;const n=l.getSelection();if(e==="single"&&n.startLineNumber===n.endLineNumber||e==="multiple"){if(n.isEmpty()){const s=l.getConfiguredWordAtPosition(n.getStartPosition());if(s&&i===!1)return s.word}else if(l.getModel().getValueLengthInRange(n)<CAi)return l.getModel().getValueInRange(n)}return null}var Q9;let Ab=(Q9=class extends xi{get editor(){return this._editor}static get(e){return e.getContribution(Hze.ID)}constructor(e,i,n,s,c,d){super(),this._editor=e,this._findWidgetVisible=x6.bindTo(i),this._contextKeyService=i,this._storageService=n,this._clipboardService=s,this._notificationService=c,this._hoverService=d,this._updateHistoryDelayer=new Ck(500),this._state=this._register(new GPi),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(f=>this._onStateChanged(f))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{const f=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),f&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(41).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!exe.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e=e.map(i=>(i.endColumn===1&&i.endLineNumber>i.startLineNumber&&(i=i.setEndPosition(i.endLineNumber-1,this._editor.getModel().getLineMaxColumn(i.endLineNumber-1))),i.isEmpty()?null:i)).filter(i=>!!i),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=Tw(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}async _start(e,i){if(this.disposeModel(),!this._editor.hasModel())return;const n={...i,isRevealed:!0};if(e.seedSearchStringFromSelection==="single"){const s=jze(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);s&&(this._state.isRegex?n.searchString=Tw(s):n.searchString=s)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){const s=jze(this._editor,e.seedSearchStringFromSelection);s&&(n.searchString=s)}if(!n.searchString&&e.seedSearchStringFromGlobalClipboard){const s=await this.getGlobalBufferTerm();if(!this._editor.hasModel())return;s&&(n.searchString=s)}if(e.forceRevealReplace||n.isReplaceRevealed?n.isReplaceRevealed=!0:this._findWidgetVisible.get()||(n.isReplaceRevealed=!1),e.updateSearchScope){const s=this._editor.getSelections();s.some(c=>!c.isEmpty())&&(n.searchScope=s)}n.loop=e.loop,this._state.change(n,!1),this._model||(this._model=new Yie(this._editor,this._state))}start(e,i){return this._start(e,i)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(e){return this._model?(this._model.moveToMatch(e),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){var e;return this._model?(e=this._editor.getModel())!=null&&e.isTooLargeForHeapOperation()?(this._notificationService.warn(W("too.large.for.replaceall","The file is too large to perform a replace all operation.")),!1):(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}async getGlobalBufferTerm(){return this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}setGlobalBufferTerm(e){this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}},Hze=Q9,Q9.ID="editor.contrib.findController",Q9);Ab=Hze=ZLt([lk(1,Ko),lk(2,ET),lk(3,w6),lk(4,w_),lk(5,jL)],Ab);let zze=class extends Ab{constructor(e,i,n,s,c,d,f,m,v){super(e,n,f,m,d,v),this._contextViewService=i,this._keybindingService=s,this._themeService=c,this._widget=null,this._findOptionsWidget=null}async _start(e,i){this._widget||this._createFindWidget();const n=this._editor.getSelection();let s=!1;switch(this._editor.getOption(41).autoFindInSelection){case"always":s=!0;break;case"never":s=!1;break;case"multiline":{s=!!n&&n.startLineNumber!==n.endLineNumber;break}}e.updateSearchScope=e.updateSearchScope||s,await super._start(e,i),this._widget&&(e.shouldFocus===2?this._widget.focusReplaceInput():e.shouldFocus===1&&this._widget.focusFindInput())}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new Vze(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService,this._hoverService)),this._findOptionsWidget=this._register(new Fze(this._editor,this._state,this._keybindingService))}};zze=ZLt([lk(1,b6),lk(2,Ko),lk(3,pu),lk(4,im),lk(5,w_),lk(6,ET),lk(7,w6),lk(8,jL)],zze);const SAi=W2t(new B2t({id:ef.StartFindAction,label:W("startFindAction","Find"),alias:"Find",precondition:kn.or(Tt.focus,kn.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:As.MenubarEditMenu,group:"3_find",title:W({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));SAi.addImplementation(0,(l,e,i)=>{const n=Ab.get(e);return n?n.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(41).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(41).loop}):!1});const wAi={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},isRegex:{type:"boolean"},matchWholeWord:{type:"boolean"},isCaseSensitive:{type:"boolean"},preserveCase:{type:"boolean"},findInSelection:{type:"boolean"}}}}]};class xAi extends hs{constructor(){super({id:ef.StartFindWithArgs,label:W("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},metadata:wAi})}async run(e,i,n){const s=Ab.get(i);if(s){const c=n?{searchString:n.searchString,replaceString:n.replaceString,isReplaceRevealed:n.replaceString!==void 0,isRegex:n.isRegex,wholeWord:n.matchWholeWord,matchCase:n.isCaseSensitive,preserveCase:n.preserveCase}:{};await s.start({forceRevealReplace:!1,seedSearchStringFromSelection:s.getState().searchString.length===0&&i.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:i.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(n==null?void 0:n.findInSelection)||!1,loop:i.getOption(41).loop},c),s.setGlobalBufferTerm(s.getState().searchString)}}}class kAi extends hs{constructor(){super({id:ef.StartFindWithSelection,label:W("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}async run(e,i){const n=Ab.get(i);n&&(await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:i.getOption(41).loop}),n.setGlobalBufferTerm(n.getState().searchString))}}class YLt extends hs{async run(e,i){const n=Ab.get(i);n&&!this._run(n)&&(await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:n.getState().searchString.length===0&&i.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:i.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:i.getOption(41).loop}),this._run(n))}}class TAi extends YLt{constructor(){super({id:ef.NextMatchFindAction,label:W("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:Tt.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:kn.and(Tt.focus,exe),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}}class DAi extends YLt{constructor(){super({id:ef.PreviousMatchFindAction,label:W("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:Tt.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:kn.and(Tt.focus,exe),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}class EAi extends hs{constructor(){super({id:ef.GoToMatchFindAction,label:W("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:x6}),this._highlightDecorations=[]}run(e,i,n){const s=Ab.get(i);if(!s)return;const c=s.getState().matchesCount;if(c<1){e.get(w_).notify({severity:QSe.Warning,message:W("findMatchAction.noResults","No matches. Try searching for something else.")});return}const d=e.get(Ek),f=new wn,m=f.add(d.createInputBox());m.placeholder=W("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",c);const v=w=>{const I=parseInt(w);if(isNaN(I))return;const P=s.getState().matchesCount;if(I>0&&I<=P)return I-1;if(I<0&&I>=-P)return P+I},x=w=>{const I=v(w);if(typeof I=="number"){m.validationMessage=void 0,s.goToMatch(I);const P=s.getState().currentMatch;P&&this.addDecorations(i,P)}else m.validationMessage=W("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",s.getState().matchesCount),this.clearDecorations(i)};f.add(m.onDidChangeValue(w=>{x(w)})),f.add(m.onDidAccept(()=>{const w=v(m.value);typeof w=="number"?(s.goToMatch(w),m.hide()):m.validationMessage=W("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",s.getState().matchesCount)})),f.add(m.onDidHide(()=>{this.clearDecorations(i),f.dispose()})),m.show()}clearDecorations(e){e.changeDecorations(i=>{this._highlightDecorations=i.deltaDecorations(this._highlightDecorations,[])})}addDecorations(e,i){e.changeDecorations(n=>{this._highlightDecorations=n.deltaDecorations(this._highlightDecorations,[{range:i,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:i,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:Mh(HDt),position:ww.Full}}}])})}}class ePt extends hs{async run(e,i){const n=Ab.get(i);if(!n)return;const s=jze(i,"single",!1);s&&n.setSearchString(s),this._run(n)||(await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:i.getOption(41).loop}),this._run(n))}}class IAi extends ePt{constructor(){super({id:ef.NextSelectionMatchFindAction,label:W("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:Tt.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}class NAi extends ePt{constructor(){super({id:ef.PreviousSelectionMatchFindAction,label:W("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:Tt.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}const LAi=W2t(new B2t({id:ef.StartFindReplaceAction,label:W("startReplace","Replace"),alias:"Replace",precondition:kn.or(Tt.focus,kn.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:As.MenubarEditMenu,group:"3_find",title:W({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));LAi.addImplementation(0,(l,e,i)=>{if(!e.hasModel()||e.getOption(92))return!1;const n=Ab.get(e);if(!n)return!1;const s=e.getSelection(),c=n.isFindInputFocused(),d=!s.isEmpty()&&s.startLineNumber===s.endLineNumber&&e.getOption(41).seedSearchStringFromSelection!=="never"&&!c,f=c||d?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:d?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(41).seedSearchStringFromSelection!=="never",shouldFocus:f,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(41).loop})});Cl(Ab.ID,zze,0);sr(xAi);sr(kAi);sr(TAi);sr(DAi);sr(EAi);sr(IAi);sr(NAi);const YE=tm.bindToContribution(Ab.get);$r(new YE({id:ef.CloseFindWidgetCommand,precondition:x6,handler:l=>l.closeFindWidget(),kbOpts:{weight:105,kbExpr:kn.and(Tt.focus,kn.not("isComposing")),primary:9,secondary:[1033]}}));$r(new YE({id:ef.ToggleCaseSensitiveCommand,precondition:void 0,handler:l=>l.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:Tt.focus,primary:M0e.primary,mac:M0e.mac,win:M0e.win,linux:M0e.linux}}));$r(new YE({id:ef.ToggleWholeWordCommand,precondition:void 0,handler:l=>l.toggleWholeWords(),kbOpts:{weight:105,kbExpr:Tt.focus,primary:R0e.primary,mac:R0e.mac,win:R0e.win,linux:R0e.linux}}));$r(new YE({id:ef.ToggleRegexCommand,precondition:void 0,handler:l=>l.toggleRegex(),kbOpts:{weight:105,kbExpr:Tt.focus,primary:F0e.primary,mac:F0e.mac,win:F0e.win,linux:F0e.linux}}));$r(new YE({id:ef.ToggleSearchScopeCommand,precondition:void 0,handler:l=>l.toggleSearchScope(),kbOpts:{weight:105,kbExpr:Tt.focus,primary:B0e.primary,mac:B0e.mac,win:B0e.win,linux:B0e.linux}}));$r(new YE({id:ef.TogglePreserveCaseCommand,precondition:void 0,handler:l=>l.togglePreserveCase(),kbOpts:{weight:105,kbExpr:Tt.focus,primary:W0e.primary,mac:W0e.mac,win:W0e.win,linux:W0e.linux}}));$r(new YE({id:ef.ReplaceOneAction,precondition:x6,handler:l=>l.replace(),kbOpts:{weight:105,kbExpr:Tt.focus,primary:3094}}));$r(new YE({id:ef.ReplaceOneAction,precondition:x6,handler:l=>l.replace(),kbOpts:{weight:105,kbExpr:kn.and(Tt.focus,QGe),primary:3}}));$r(new YE({id:ef.ReplaceAllAction,precondition:x6,handler:l=>l.replaceAll(),kbOpts:{weight:105,kbExpr:Tt.focus,primary:2563}}));$r(new YE({id:ef.ReplaceAllAction,precondition:x6,handler:l=>l.replaceAll(),kbOpts:{weight:105,kbExpr:kn.and(Tt.focus,QGe),primary:void 0,mac:{primary:2051}}}));$r(new YE({id:ef.SelectAllMatchesAction,precondition:x6,handler:l=>l.selectAllMatches(),kbOpts:{weight:105,kbExpr:Tt.focus,primary:515}}));const PAi={0:" ",1:"u",2:"r"},uxt=65535,CE=16777215,dxt=4278190080;class F9e{constructor(e){const i=Math.ceil(e/32);this._states=new Uint32Array(i)}get(e){const i=e/32|0,n=e%32;return(this._states[i]&1<<n)!==0}set(e,i){const n=e/32|0,s=e%32,c=this._states[n];i?this._states[n]=c|1<<s:this._states[n]=c&~(1<<s)}}class _w{constructor(e,i,n){if(e.length!==i.length||e.length>uxt)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=i,this._collapseStates=new F9e(e.length),this._userDefinedStates=new F9e(e.length),this._recoveredStates=new F9e(e.length),this._types=n,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const e=[],i=(n,s)=>{const c=e[e.length-1];return this.getStartLineNumber(c)<=n&&this.getEndLineNumber(c)>=s};for(let n=0,s=this._startIndexes.length;n<s;n++){const c=this._startIndexes[n],d=this._endIndexes[n];if(c>CE||d>CE)throw new Error("startLineNumber or endLineNumber must not exceed "+CE);for(;e.length>0&&!i(c,d);)e.pop();const f=e.length>0?e[e.length-1]:-1;e.push(n),this._startIndexes[n]=c+((f&255)<<24),this._endIndexes[n]=d+((f&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&CE}getEndLineNumber(e){return this._endIndexes[e]&CE}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,i){this._collapseStates.set(e,i)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,i){return this._userDefinedStates.set(e,i)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,i){return this._recoveredStates.set(e,i)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,i){i===1?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):i===2?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,i){let n=!1;if(this._types)for(let s=0;s<this._types.length;s++)this._types[s]===e&&(this.setCollapsed(s,i),n=!0);return n}toRegion(e){return new AAi(this,e)}getParentIndex(e){this.ensureParentIndices();const i=((this._startIndexes[e]&dxt)>>>24)+((this._endIndexes[e]&dxt)>>>16);return i===uxt?-1:i}contains(e,i){return this.getStartLineNumber(e)<=i&&this.getEndLineNumber(e)>=i}findIndex(e){let i=0,n=this._startIndexes.length;if(n===0)return-1;for(;i<n;){const s=Math.floor((i+n)/2);e<this.getStartLineNumber(s)?n=s:i=s+1}return i-1}findRange(e){let i=this.findIndex(e);if(i>=0){if(this.getEndLineNumber(i)>=e)return i;for(i=this.getParentIndex(i);i!==-1;){if(this.contains(i,e))return i;i=this.getParentIndex(i)}}return-1}toString(){const e=[];for(let i=0;i<this.length;i++)e[i]=`[${PAi[this.getSource(i)]}${this.isCollapsed(i)?"+":"-"}] ${this.getStartLineNumber(i)}/${this.getEndLineNumber(i)}`;return e.join(", ")}toFoldRange(e){return{startLineNumber:this._startIndexes[e]&CE,endLineNumber:this._endIndexes[e]&CE,type:this._types?this._types[e]:void 0,isCollapsed:this.isCollapsed(e),source:this.getSource(e)}}static fromFoldRanges(e){const i=e.length,n=new Uint32Array(i),s=new Uint32Array(i);let c=[],d=!1;for(let m=0;m<i;m++){const v=e[m];n[m]=v.startLineNumber,s[m]=v.endLineNumber,c.push(v.type),v.type&&(d=!0)}d||(c=void 0);const f=new _w(n,s,c);for(let m=0;m<i;m++)e[m].isCollapsed&&f.setCollapsed(m,!0),f.setSource(m,e[m].source);return f}static sanitizeAndMerge(e,i,n,s){n=n??Number.MAX_VALUE;const c=(J,Y)=>Array.isArray(J)?ae=>ae<Y?J[ae]:void 0:ae=>ae<Y?J.toFoldRange(ae):void 0,d=c(e,e.length),f=c(i,i.length);let m=0,v=0,x=d(0),w=f(0);const I=[];let P,O=0;const z=[];for(;x||w;){let J;if(w&&(!x||x.startLineNumber>=w.startLineNumber))x&&x.startLineNumber===w.startLineNumber?(w.source===1?J=w:(J=x,J.isCollapsed=w.isCollapsed&&(x.endLineNumber===w.endLineNumber||!(s!=null&&s.startsInside(x.startLineNumber+1,x.endLineNumber+1))),J.source=0),x=d(++m)):(J=w,w.isCollapsed&&w.source===0&&(J.source=2)),w=f(++v);else{let Y=v,ae=w;for(;;){if(!ae||ae.startLineNumber>x.endLineNumber){J=x;break}if(ae.source===1&&ae.endLineNumber>x.endLineNumber)break;ae=f(++Y)}x=d(++m)}if(J){for(;P&&P.endLineNumber<J.startLineNumber;)P=I.pop();J.endLineNumber>J.startLineNumber&&J.startLineNumber>O&&J.endLineNumber<=n&&(!P||P.endLineNumber>=J.endLineNumber)&&(z.push(J),O=J.startLineNumber,P&&I.push(P),P=J)}}return z}}class AAi{constructor(e,i){this.ranges=e,this.index=i}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}class OAi{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,i){this._updateEventEmitter=new gi,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=i,this._regions=new _w(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort((n,s)=>n.regionIndex-s.regionIndex);const i={};this._decorationProvider.changeDecorations(n=>{let s=0,c=-1,d=-1;const f=m=>{for(;s<m;){const v=this._regions.getEndLineNumber(s),x=this._regions.isCollapsed(s);if(v<=c){const w=this.regions.getSource(s)!==0;n.changeDecorationOptions(this._editorDecorationIds[s],this._decorationProvider.getDecorationOption(x,v<=d,w))}x&&v>d&&(d=v),s++}};for(const m of e){const v=m.regionIndex,x=this._editorDecorationIds[v];if(x&&!i[x]){i[x]=!0,f(v);const w=!this._regions.isCollapsed(v);this._regions.setCollapsed(v,w),c=Math.max(c,this._regions.getEndLineNumber(v))}}f(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){const i=new Array,n=s=>{for(const c of e)if(!(c.startLineNumber>s.endLineNumber||s.startLineNumber>c.endLineNumber))return!0;return!1};for(let s=0;s<this._regions.length;s++){const c=this._regions.toFoldRange(s);(c.source===0||!n(c))&&i.push(c)}this.updatePost(_w.fromFoldRanges(i))}update(e,i){const n=this._currentFoldedOrManualRanges(i),s=_w.sanitizeAndMerge(e,n,this._textModel.getLineCount(),i);this.updatePost(_w.fromFoldRanges(s))}updatePost(e){const i=[];let n=-1;for(let s=0,c=e.length;s<c;s++){const d=e.getStartLineNumber(s),f=e.getEndLineNumber(s),m=e.isCollapsed(s),v=e.getSource(s)!==0,x={startLineNumber:d,startColumn:this._textModel.getLineMaxColumn(d),endLineNumber:f,endColumn:this._textModel.getLineMaxColumn(f)+1};i.push({range:x,options:this._decorationProvider.getDecorationOption(m,f<=n,v)}),m&&f>n&&(n=f)}this._decorationProvider.changeDecorations(s=>this._editorDecorationIds=s.deltaDecorations(this._editorDecorationIds,i)),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e){const i=[];for(let n=0,s=this._regions.length;n<s;n++){let c=this.regions.isCollapsed(n);const d=this.regions.getSource(n);if(c||d!==0){const f=this._regions.toFoldRange(n),m=this._textModel.getDecorationRange(this._editorDecorationIds[n]);m&&(c&&(e!=null&&e.startsInside(m.startLineNumber+1,m.endLineNumber))&&(c=!1),i.push({startLineNumber:m.startLineNumber,endLineNumber:m.endLineNumber,type:f.type,isCollapsed:c,source:d}))}}return i}getMemento(){const e=this._currentFoldedOrManualRanges(),i=[],n=this._textModel.getLineCount();for(let s=0,c=e.length;s<c;s++){const d=e[s];if(d.startLineNumber>=d.endLineNumber||d.startLineNumber<1||d.endLineNumber>n)continue;const f=this._getLinesChecksum(d.startLineNumber+1,d.endLineNumber);i.push({startLineNumber:d.startLineNumber,endLineNumber:d.endLineNumber,isCollapsed:d.isCollapsed,source:d.source,checksum:f})}return i.length>0?i:void 0}applyMemento(e){if(!Array.isArray(e))return;const i=[],n=this._textModel.getLineCount();for(const c of e){if(c.startLineNumber>=c.endLineNumber||c.startLineNumber<1||c.endLineNumber>n)continue;const d=this._getLinesChecksum(c.startLineNumber+1,c.endLineNumber);(!c.checksum||d===c.checksum)&&i.push({startLineNumber:c.startLineNumber,endLineNumber:c.endLineNumber,type:void 0,isCollapsed:c.isCollapsed??!0,source:c.source??0})}const s=_w.sanitizeAndMerge(this._regions,i,n);this.updatePost(_w.fromFoldRanges(s))}_getLinesChecksum(e,i){return PSe(this._textModel.getLineContent(e)+this._textModel.getLineContent(i))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,i){const n=[];if(this._regions){let s=this._regions.findRange(e),c=1;for(;s>=0;){const d=this._regions.toRegion(s);(!i||i(d,c))&&n.push(d),c++,s=d.parentIndex}}return n}getRegionAtLine(e){if(this._regions){const i=this._regions.findRange(e);if(i>=0)return this._regions.toRegion(i)}return null}getRegionsInside(e,i){const n=[],s=e?e.regionIndex+1:0,c=e?e.endLineNumber:Number.MAX_VALUE;if(i&&i.length===2){const d=[];for(let f=s,m=this._regions.length;f<m;f++){const v=this._regions.toRegion(f);if(this._regions.getStartLineNumber(f)<c){for(;d.length>0&&!v.containedBy(d[d.length-1]);)d.pop();d.push(v),i(v,d.length)&&n.push(v)}else break}}else for(let d=s,f=this._regions.length;d<f;d++){const m=this._regions.toRegion(d);if(this._regions.getStartLineNumber(d)<c)(!i||i(m))&&n.push(m);else break}return n}}function eKe(l,e,i){const n=[];for(const s of i){const c=l.getRegionAtLine(s);if(c){const d=!c.isCollapsed;if(n.push(c),e>1){const f=l.getRegionsInside(c,(m,v)=>m.isCollapsed!==d&&v<e);n.push(...f)}}}l.toggleCollapseState(n)}function RJ(l,e,i=Number.MAX_VALUE,n){const s=[];if(n&&n.length>0)for(const c of n){const d=l.getRegionAtLine(c);if(d&&(d.isCollapsed!==e&&s.push(d),i>1)){const f=l.getRegionsInside(d,(m,v)=>m.isCollapsed!==e&&v<i);s.push(...f)}}else{const c=l.getRegionsInside(null,(d,f)=>d.isCollapsed!==e&&f<i);s.push(...c)}l.toggleCollapseState(s)}function tPt(l,e,i,n){const s=[];for(const c of n){const d=l.getAllRegionsAtLine(c,(f,m)=>f.isCollapsed!==e&&m<=i);s.push(...d)}l.toggleCollapseState(s)}function MAi(l,e,i){const n=[];for(const s of i){const c=l.getAllRegionsAtLine(s,d=>d.isCollapsed!==e);c.length>0&&n.push(c[0])}l.toggleCollapseState(n)}function RAi(l,e,i,n){const s=(d,f)=>f===e&&d.isCollapsed!==i&&!n.some(m=>d.containsLine(m)),c=l.getRegionsInside(null,s);l.toggleCollapseState(c)}function iPt(l,e,i){const n=[];for(const d of i){const f=l.getAllRegionsAtLine(d,void 0);f.length>0&&n.push(f[0])}const s=d=>n.every(f=>!f.containedBy(d)&&!d.containedBy(f))&&d.isCollapsed!==e,c=l.getRegionsInside(null,s);l.toggleCollapseState(c)}function tKe(l,e,i){const n=l.textModel,s=l.regions,c=[];for(let d=s.length-1;d>=0;d--)if(i!==s.isCollapsed(d)){const f=s.getStartLineNumber(d);e.test(n.getLineContent(f))&&c.push(s.toRegion(d))}l.toggleCollapseState(c)}function iKe(l,e,i){const n=l.regions,s=[];for(let c=n.length-1;c>=0;c--)i!==n.isCollapsed(c)&&e===n.getType(c)&&s.push(n.toRegion(c));l.toggleCollapseState(s)}function FAi(l,e){let i=null;const n=e.getRegionAtLine(l);if(n!==null&&(i=n.startLineNumber,l===i)){const s=n.parentIndex;s!==-1?i=e.regions.getStartLineNumber(s):i=null}return i}function BAi(l,e){let i=e.getRegionAtLine(l);if(i!==null&&i.startLineNumber===l){if(l!==i.startLineNumber)return i.startLineNumber;{const n=i.parentIndex;let s=0;for(n!==-1&&(s=e.regions.getStartLineNumber(i.parentIndex));i!==null;)if(i.regionIndex>0){if(i=e.regions.toRegion(i.regionIndex-1),i.startLineNumber<=s)return null;if(i.parentIndex===n)return i.startLineNumber}else return null}}else if(e.regions.length>0)for(i=e.regions.toRegion(e.regions.length-1);i!==null;){if(i.startLineNumber<l)return i.startLineNumber;i.regionIndex>0?i=e.regions.toRegion(i.regionIndex-1):i=null}return null}function WAi(l,e){let i=e.getRegionAtLine(l);if(i!==null&&i.startLineNumber===l){const n=i.parentIndex;let s=0;if(n!==-1)s=e.regions.getEndLineNumber(i.parentIndex);else{if(e.regions.length===0)return null;s=e.regions.getEndLineNumber(e.regions.length-1)}for(;i!==null;)if(i.regionIndex<e.regions.length){if(i=e.regions.toRegion(i.regionIndex+1),i.startLineNumber>=s)return null;if(i.parentIndex===n)return i.startLineNumber}else return null}else if(e.regions.length>0)for(i=e.regions.toRegion(0);i!==null;){if(i.startLineNumber>l)return i.startLineNumber;i.regionIndex<e.regions.length?i=e.regions.toRegion(i.regionIndex+1):i=null}return null}class VAi{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(e){this._updateEventEmitter=new gi,this._hasLineChanges=!1,this._foldingModel=e,this._foldingModelListener=e.onDidChange(i=>this.updateHiddenRanges()),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some(i=>i.range.endLineNumber!==i.range.startLineNumber||xR(i.text)[0]!==0))}updateHiddenRanges(){let e=!1;const i=[];let n=0,s=0,c=Number.MAX_VALUE,d=-1;const f=this._foldingModel.regions;for(;n<f.length;n++){if(!f.isCollapsed(n))continue;const m=f.getStartLineNumber(n)+1,v=f.getEndLineNumber(n);c<=m&&v<=d||(!e&&s<this._hiddenRanges.length&&this._hiddenRanges[s].startLineNumber===m&&this._hiddenRanges[s].endLineNumber===v?(i.push(this._hiddenRanges[s]),s++):(e=!0,i.push(new nt(m,1,v,1))),c=m,d=v)}(this._hasLineChanges||e||s<this._hiddenRanges.length)&&this.applyHiddenRanges(i)}applyHiddenRanges(e){this._hiddenRanges=e,this._hasLineChanges=!1,this._updateEventEmitter.fire(e)}hasRanges(){return this._hiddenRanges.length>0}isHidden(e){return fxt(this._hiddenRanges,e)!==null}adjustSelections(e){let i=!1;const n=this._foldingModel.textModel;let s=null;const c=d=>((!s||!HAi(d,s))&&(s=fxt(this._hiddenRanges,d)),s?s.startLineNumber-1:null);for(let d=0,f=e.length;d<f;d++){let m=e[d];const v=c(m.startLineNumber);v&&(m=m.setStartPosition(v,n.getLineMaxColumn(v)),i=!0);const x=c(m.endLineNumber);x&&(m=m.setEndPosition(x,n.getLineMaxColumn(x)),i=!0),e[d]=m}return i}dispose(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function HAi(l,e){return l>=e.startLineNumber&&l<=e.endLineNumber}function fxt(l,e){const i=Une(l,n=>e<n.startLineNumber)-1;return i>=0&&l[i].endLineNumber>=e?l[i]:null}const jAi=5e3,zAi="indent";class nKe{constructor(e,i,n){this.editorModel=e,this.languageConfigurationService=i,this.foldingRangesLimit=n,this.id=zAi}dispose(){}compute(e){const i=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,n=i&&!!i.offSide,s=i&&i.markers;return Promise.resolve($Ai(this.editorModel,n,s,this.foldingRangesLimit))}}let UAi=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,i,n){if(e>CE||i>CE)return;const s=this._length;this._startIndexes[s]=e,this._endIndexes[s]=i,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}toIndentRanges(e){const i=this._foldingRangesLimit.limit;if(this._length<=i){this._foldingRangesLimit.update(this._length,!1);const n=new Uint32Array(this._length),s=new Uint32Array(this._length);for(let c=this._length-1,d=0;c>=0;c--,d++)n[d]=this._startIndexes[c],s[d]=this._endIndexes[c];return new _w(n,s)}else{this._foldingRangesLimit.update(this._length,i);let n=0,s=this._indentOccurrences.length;for(let m=0;m<this._indentOccurrences.length;m++){const v=this._indentOccurrences[m];if(v){if(v+n>i){s=m;break}n+=v}}const c=e.getOptions().tabSize,d=new Uint32Array(i),f=new Uint32Array(i);for(let m=this._length-1,v=0;m>=0;m--){const x=this._startIndexes[m],w=e.getLineContent(x),I=Cwe(w,c);(I<s||I===s&&n++<i)&&(d[v]=x,f[v]=this._endIndexes[m],v++)}return new _w(d,f)}}};const qAi={limit:jAi,update:()=>{}};function $Ai(l,e,i,n=qAi){const s=l.getOptions().tabSize,c=new UAi(n);let d;i&&(d=new RegExp(`(${i.start.source})|(?:${i.end.source})`));const f=[],m=l.getLineCount()+1;f.push({indent:-1,endAbove:m,line:m});for(let v=l.getLineCount();v>0;v--){const x=l.getLineContent(v),w=Cwe(x,s);let I=f[f.length-1];if(w===-1){e&&(I.endAbove=v);continue}let P;if(d&&(P=x.match(d)))if(P[1]){let O=f.length-1;for(;O>0&&f[O].indent!==-2;)O--;if(O>0){f.length=O+1,I=f[O],c.insertFirst(v,I.line,w),I.line=v,I.indent=w,I.endAbove=v;continue}}else{f.push({indent:-2,endAbove:v,line:v});continue}if(I.indent>w){do f.pop(),I=f[f.length-1];while(I.indent>w);const O=I.endAbove-1;O-v>=1&&c.insertFirst(v,O,w)}I.indent===w?I.endAbove=v:f.push({indent:w,endAbove:v,line:v})}return c.toIndentRanges(l)}const JAi=It("editor.foldBackground",{light:hc(PM,.3),dark:hc(PM,.3),hcDark:null,hcLight:null},W("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);It("editor.foldPlaceholderForeground",{light:"#808080",dark:"#808080",hcDark:null,hcLight:null},W("collapsedTextColor","Color of the collapsed text after the first line of a folded range."));It("editorGutter.foldingControlForeground",kye,W("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));const abe=sf("folding-expanded",pr.chevronDown,W("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),cbe=sf("folding-collapsed",pr.chevronRight,W("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),hxt=sf("folding-manual-collapsed",cbe,W("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),_xt=sf("folding-manual-expanded",abe,W("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),B9e={color:Mh(JAi),position:1},BU=W("linesCollapsed","Click to expand the range."),j0e=W("linesExpanded","Click to collapse the range."),hp=class hp{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,i,n){return i?hp.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?e?this.showFoldingHighlights?hp.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:hp.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:hp.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?n?this.showFoldingHighlights?hp.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:hp.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?hp.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:hp.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?n?hp.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:hp.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:n?hp.MANUALLY_EXPANDED_VISUAL_DECORATION:hp.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}};hp.COLLAPSED_VISUAL_DECORATION=qa.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:BU,firstLineDecorationClassName:zo.asClassName(cbe)}),hp.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=qa.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:B9e,isWholeLine:!0,linesDecorationsTooltip:BU,firstLineDecorationClassName:zo.asClassName(cbe)}),hp.MANUALLY_COLLAPSED_VISUAL_DECORATION=qa.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:BU,firstLineDecorationClassName:zo.asClassName(hxt)}),hp.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=qa.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:B9e,isWholeLine:!0,linesDecorationsTooltip:BU,firstLineDecorationClassName:zo.asClassName(hxt)}),hp.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=qa.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:BU}),hp.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=qa.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:B9e,isWholeLine:!0,linesDecorationsTooltip:BU}),hp.EXPANDED_VISUAL_DECORATION=qa.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+zo.asClassName(abe),linesDecorationsTooltip:j0e}),hp.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=qa.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:zo.asClassName(abe),linesDecorationsTooltip:j0e}),hp.MANUALLY_EXPANDED_VISUAL_DECORATION=qa.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+zo.asClassName(_xt),linesDecorationsTooltip:j0e}),hp.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=qa.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:zo.asClassName(_xt),linesDecorationsTooltip:j0e}),hp.NO_CONTROLS_EXPANDED_RANGE_DECORATION=qa.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0}),hp.HIDDEN_RANGE_DECORATION=qa.register({description:"folding-hidden-range-decoration",stickiness:1});let Uze=hp;const GAi={},KAi="syntax";class rKe{constructor(e,i,n,s,c){this.editorModel=e,this.providers=i,this.handleFoldingRangesChange=n,this.foldingRangesLimit=s,this.fallbackRangeProvider=c,this.id=KAi,this.disposables=new wn,c&&this.disposables.add(c);for(const d of i)typeof d.onDidChange=="function"&&this.disposables.add(d.onDidChange(n))}compute(e){return XAi(this.providers,this.editorModel,e).then(i=>{var n;return i?ZAi(i,this.foldingRangesLimit):((n=this.fallbackRangeProvider)==null?void 0:n.compute(e))??null})}dispose(){this.disposables.dispose()}}function XAi(l,e,i){let n=null;const s=l.map((c,d)=>Promise.resolve(c.provideFoldingRanges(e,GAi,i)).then(f=>{if(!i.isCancellationRequested&&Array.isArray(f)){Array.isArray(n)||(n=[]);const m=e.getLineCount();for(const v of f)v.start>0&&v.end>v.start&&v.end<=m&&n.push({start:v.start,end:v.end,rank:d,kind:v.kind})}},t_));return Promise.all(s).then(c=>n)}class QAi{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,i,n,s){if(e>CE||i>CE)return;const c=this._length;this._startIndexes[c]=e,this._endIndexes[c]=i,this._nestingLevels[c]=s,this._types[c]=n,this._length++,s<30&&(this._nestingLevelCounts[s]=(this._nestingLevelCounts[s]||0)+1)}toIndentRanges(){const e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);const i=new Uint32Array(this._length),n=new Uint32Array(this._length);for(let s=0;s<this._length;s++)i[s]=this._startIndexes[s],n[s]=this._endIndexes[s];return new _w(i,n,this._types)}else{this._foldingRangesLimit.update(this._length,e);let i=0,n=this._nestingLevelCounts.length;for(let f=0;f<this._nestingLevelCounts.length;f++){const m=this._nestingLevelCounts[f];if(m){if(m+i>e){n=f;break}i+=m}}const s=new Uint32Array(e),c=new Uint32Array(e),d=[];for(let f=0,m=0;f<this._length;f++){const v=this._nestingLevels[f];(v<n||v===n&&i++<e)&&(s[m]=this._startIndexes[f],c[m]=this._endIndexes[f],d[m]=this._types[f],m++)}return new _w(s,c,d)}}}function ZAi(l,e){const i=l.sort((d,f)=>{let m=d.start-f.start;return m===0&&(m=d.rank-f.rank),m}),n=new QAi(e);let s;const c=[];for(const d of i)if(!s)s=d,n.add(d.start,d.end,d.kind&&d.kind.value,c.length);else if(d.start>s.start)if(d.end<=s.end)c.push(s),s=d,n.add(d.start,d.end,d.kind&&d.kind.value,c.length);else{if(d.start>s.end){do s=c.pop();while(s&&d.start>s.end);s&&c.push(s),s=d}n.add(d.start,d.end,d.kind&&d.kind.value,c.length)}return n.toIndentRanges()}var YAi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Kte=function(l,e){return function(i,n){e(i,n,l)}},OF;const L0=new rs("foldingEnabled",!1);var Z9;let OR=(Z9=class extends xi{static get(e){return e.getContribution(OF.ID)}static getFoldingRangeProviders(e,i){var s;const n=e.foldingRangeProvider.ordered(i);return((s=OF._foldingRangeSelector)==null?void 0:s.call(OF,n,i))??n}constructor(e,i,n,s,c,d){super(),this.contextKeyService=i,this.languageConfigurationService=n,this.languageFeaturesService=d,this.localToDispose=this._register(new wn),this.editor=e,this._foldingLimitReporter=new nPt(e);const f=this.editor.getOptions();this._isEnabled=f.get(43),this._useFoldingProviders=f.get(44)!=="indentation",this._unfoldOnClickAfterEndOfLine=f.get(48),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=f.get(46),this.updateDebounceInfo=c.for(d.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new Uze(e),this.foldingDecorationProvider.showFoldingControls=f.get(111),this.foldingDecorationProvider.showFoldingHighlights=f.get(45),this.foldingEnabled=L0.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(m=>{if(m.hasChanged(43)&&(this._isEnabled=this.editor.getOptions().get(43),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),m.hasChanged(47)&&this.onModelChanged(),m.hasChanged(111)||m.hasChanged(45)){const v=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=v.get(111),this.foldingDecorationProvider.showFoldingHighlights=v.get(45),this.triggerFoldingModelChanged()}m.hasChanged(44)&&(this._useFoldingProviders=this.editor.getOptions().get(44)!=="indentation",this.onFoldingStrategyChanged()),m.hasChanged(48)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(48)),m.hasChanged(46)&&(this._foldingImportsByDefault=this.editor.getOptions().get(46))})),this.onModelChanged()}saveViewState(){const e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){const i=this.foldingModel.getMemento(),n=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:i,lineCount:e.getLineCount(),provider:n,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){const i=this.editor.getModel();if(!(!i||!this._isEnabled||i.isTooLargeForTokenization()||!this.hiddenRangeModel)&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const e=this.editor.getModel();!this._isEnabled||!e||e.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new OAi(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new VAi(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(i=>this.onHiddenRangesChanges(i))),this.updateScheduler=new Ck(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new qu(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(i=>this.onDidChangeModelContent(i))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(i=>this.onEditorMouseDown(i))),this.localToDispose.add(this.editor.onMouseUp(i=>this.onEditorMouseUp(i))),this.localToDispose.add({dispose:()=>{var i,n;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),(i=this.updateScheduler)==null||i.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,(n=this.rangeProvider)==null||n.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var e;(e=this.rangeProvider)==null||e.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;const i=new nKe(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=i,this._useFoldingProviders&&this.foldingModel){const n=OF.getFoldingRangeProviders(this.languageFeaturesService,e);n.length>0&&(this.rangeProvider=new rKe(e,n,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,i))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){var i;(i=this.hiddenRangeModel)==null||i.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const e=this.foldingModel;if(!e)return null;const i=new bg,n=this.getRangeProvider(e.textModel),s=this.foldingRegionPromise=Om(c=>n.compute(c));return s.then(c=>{if(c&&s===this.foldingRegionPromise){let d;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const v=c.setCollapsedAllOfType(yR.Imports.value,!0);v&&(d=GE.capture(this.editor),this._currentModelHasFoldedImports=v)}const f=this.editor.getSelections();e.update(c,e4i(f)),d==null||d.restore(this.editor);const m=this.updateDebounceInfo.update(e.textModel,i.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=m)}return e})}).then(void 0,e=>(Pa(e),null)))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){const i=this.editor.getSelections();i&&this.hiddenRangeModel.adjustSelections(i)&&this.editor.setSelections(i)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then(i=>{if(i){const n=this.editor.getSelections();if(n&&n.length>0){const s=[];for(const c of n){const d=c.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(d)&&s.push(...i.getAllRegionsAtLine(d,f=>f.isCollapsed&&d>f.startLineNumber))}s.length&&(i.toggleCollapseState(s),this.reveal(n[0].getPosition()))}}}).then(void 0,Pa)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range||!e.event.leftButton&&!e.event.middleButton)return;const i=e.target.range;let n=!1;switch(e.target.type){case 4:{const s=e.target.detail,c=e.target.element.offsetLeft;if(s.offsetX-c<4)return;n=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){const s=this.editor.getModel();if(s&&i.startColumn===s.getLineMaxColumn(i.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:i.startLineNumber,iconClicked:n}}onEditorMouseUp(e){const i=this.foldingModel;if(!i||!this.mouseDownInfo||!e.target)return;const n=this.mouseDownInfo.lineNumber,s=this.mouseDownInfo.iconClicked,c=e.target.range;if(!c||c.startLineNumber!==n)return;if(s){if(e.target.type!==4)return}else{const f=this.editor.getModel();if(!f||c.startColumn!==f.getLineMaxColumn(n))return}const d=i.getRegionAtLine(n);if(d&&d.startLineNumber===n){const f=d.isCollapsed;if(s||f){const m=e.event.altKey;let v=[];if(m){const x=I=>!I.containedBy(d)&&!d.containedBy(I),w=i.getRegionsInside(null,x);for(const I of w)I.isCollapsed&&v.push(I);v.length===0&&(v=w)}else{const x=e.event.middleButton||e.event.shiftKey;if(x)for(const w of i.getRegionsInside(d))w.isCollapsed===f&&v.push(w);(f||!x||v.length===0)&&v.push(d)}i.toggleCollapseState(v),this.reveal({lineNumber:n,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}},OF=Z9,Z9.ID="editor.contrib.folding",Z9);OR=OF=YAi([Kte(1,Ko),Kte(2,rh),Kte(3,w_),Kte(4,Pw),Kte(5,Ts)],OR);class nPt{constructor(e){this.editor=e,this._onDidChange=new gi,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(47)}update(e,i){(e!==this._computed||i!==this._limited)&&(this._computed=e,this._limited=i,this._onDidChange.fire())}}class S1 extends hs{runEditorCommand(e,i,n){const s=e.get(rh),c=OR.get(i);if(!c)return;const d=c.getFoldingModel();if(d)return this.reportTelemetry(e,i),d.then(f=>{if(f){this.invoke(c,f,i,n,s);const m=i.getSelection();m&&c.reveal(m.getStartPosition())}})}getSelectedLines(e){const i=e.getSelections();return i?i.map(n=>n.startLineNumber):[]}getLineNumbers(e,i){return e&&e.selectionLines?e.selectionLines.map(n=>n+1):this.getSelectedLines(i)}run(e,i){}}function e4i(l){return!l||l.length===0?{startsInside:()=>!1}:{startsInside(e,i){for(const n of l){const s=n.startLineNumber;if(s>=e&&s<=i)return!0}return!1}}}function rPt(l){if(!xy(l)){if(!gg(l))return!1;const e=l;if(!xy(e.levels)&&!pR(e.levels)||!xy(e.direction)&&!Eb(e.direction)||!xy(e.selectionLines)&&(!Array.isArray(e.selectionLines)||!e.selectionLines.every(pR)))return!1}return!0}class t4i extends S1{constructor(){super({id:"editor.unfold",label:W("unfoldAction.label","Unfold"),alias:"Unfold",precondition:L0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},metadata:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument:
+ * 'levels': Number of levels to unfold. If not set, defaults to 1.
+ * 'direction': If 'up', unfold given number of levels up otherwise unfolds down.
+ * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.
+ `,constraint:rPt,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,i,n,s){const c=s&&s.levels||1,d=this.getLineNumbers(s,n);s&&s.direction==="up"?tPt(i,!1,c,d):RJ(i,!1,c,d)}}class i4i extends S1{constructor(){super({id:"editor.unfoldRecursively",label:W("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:L0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:pp(2089,2142),weight:100}})}invoke(e,i,n,s){RJ(i,!1,Number.MAX_VALUE,this.getSelectedLines(n))}}class n4i extends S1{constructor(){super({id:"editor.fold",label:W("foldAction.label","Fold"),alias:"Fold",precondition:L0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},metadata:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:`Property-value pairs that can be passed through this argument:
+ * 'levels': Number of levels to fold.
+ * 'direction': If 'up', folds given number of levels up otherwise folds down.
+ * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.
+ If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.
+ `,constraint:rPt,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,i,n,s){const c=this.getLineNumbers(s,n),d=s&&s.levels,f=s&&s.direction;typeof d!="number"&&typeof f!="string"?MAi(i,!0,c):f==="up"?tPt(i,!0,d||1,c):RJ(i,!0,d||1,c)}}class r4i extends S1{constructor(){super({id:"editor.toggleFold",label:W("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:L0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:pp(2089,2090),weight:100}})}invoke(e,i,n){const s=this.getSelectedLines(n);eKe(i,1,s)}}class s4i extends S1{constructor(){super({id:"editor.foldRecursively",label:W("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:L0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:pp(2089,2140),weight:100}})}invoke(e,i,n){const s=this.getSelectedLines(n);RJ(i,!0,Number.MAX_VALUE,s)}}class o4i extends S1{constructor(){super({id:"editor.toggleFoldRecursively",label:W("toggleFoldRecursivelyAction.label","Toggle Fold Recursively"),alias:"Toggle Fold Recursively",precondition:L0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:pp(2089,3114),weight:100}})}invoke(e,i,n){const s=this.getSelectedLines(n);eKe(i,Number.MAX_VALUE,s)}}class a4i extends S1{constructor(){super({id:"editor.foldAllBlockComments",label:W("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:L0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:pp(2089,2138),weight:100}})}invoke(e,i,n,s,c){if(i.regions.hasTypes())iKe(i,yR.Comment.value,!0);else{const d=n.getModel();if(!d)return;const f=c.getLanguageConfiguration(d.getLanguageId()).comments;if(f&&f.blockCommentStartToken){const m=new RegExp("^\\s*"+Tw(f.blockCommentStartToken));tKe(i,m,!0)}}}}class c4i extends S1{constructor(){super({id:"editor.foldAllMarkerRegions",label:W("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:L0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:pp(2089,2077),weight:100}})}invoke(e,i,n,s,c){if(i.regions.hasTypes())iKe(i,yR.Region.value,!0);else{const d=n.getModel();if(!d)return;const f=c.getLanguageConfiguration(d.getLanguageId()).foldingRules;if(f&&f.markers&&f.markers.start){const m=new RegExp(f.markers.start);tKe(i,m,!0)}}}}class l4i extends S1{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:W("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:L0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:pp(2089,2078),weight:100}})}invoke(e,i,n,s,c){if(i.regions.hasTypes())iKe(i,yR.Region.value,!1);else{const d=n.getModel();if(!d)return;const f=c.getLanguageConfiguration(d.getLanguageId()).foldingRules;if(f&&f.markers&&f.markers.start){const m=new RegExp(f.markers.start);tKe(i,m,!1)}}}}class u4i extends S1{constructor(){super({id:"editor.foldAllExcept",label:W("foldAllExcept.label","Fold All Except Selected"),alias:"Fold All Except Selected",precondition:L0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:pp(2089,2136),weight:100}})}invoke(e,i,n){const s=this.getSelectedLines(n);iPt(i,!0,s)}}class d4i extends S1{constructor(){super({id:"editor.unfoldAllExcept",label:W("unfoldAllExcept.label","Unfold All Except Selected"),alias:"Unfold All Except Selected",precondition:L0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:pp(2089,2134),weight:100}})}invoke(e,i,n){const s=this.getSelectedLines(n);iPt(i,!1,s)}}class f4i extends S1{constructor(){super({id:"editor.foldAll",label:W("foldAllAction.label","Fold All"),alias:"Fold All",precondition:L0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:pp(2089,2069),weight:100}})}invoke(e,i,n){RJ(i,!0)}}class h4i extends S1{constructor(){super({id:"editor.unfoldAll",label:W("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:L0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:pp(2089,2088),weight:100}})}invoke(e,i,n){RJ(i,!1)}}const Mq=class Mq extends S1{getFoldingLevel(){return parseInt(this.id.substr(Mq.ID_PREFIX.length))}invoke(e,i,n){RAi(i,this.getFoldingLevel(),!0,this.getSelectedLines(n))}};Mq.ID_PREFIX="editor.foldLevel",Mq.ID=e=>Mq.ID_PREFIX+e;let lbe=Mq;class _4i extends S1{constructor(){super({id:"editor.gotoParentFold",label:W("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:L0,kbOpts:{kbExpr:Tt.editorTextFocus,weight:100}})}invoke(e,i,n){const s=this.getSelectedLines(n);if(s.length>0){const c=FAi(s[0],i);c!==null&&n.setSelection({startLineNumber:c,startColumn:1,endLineNumber:c,endColumn:1})}}}class p4i extends S1{constructor(){super({id:"editor.gotoPreviousFold",label:W("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:L0,kbOpts:{kbExpr:Tt.editorTextFocus,weight:100}})}invoke(e,i,n){const s=this.getSelectedLines(n);if(s.length>0){const c=BAi(s[0],i);c!==null&&n.setSelection({startLineNumber:c,startColumn:1,endLineNumber:c,endColumn:1})}}}class m4i extends S1{constructor(){super({id:"editor.gotoNextFold",label:W("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:L0,kbOpts:{kbExpr:Tt.editorTextFocus,weight:100}})}invoke(e,i,n){const s=this.getSelectedLines(n);if(s.length>0){const c=WAi(s[0],i);c!==null&&n.setSelection({startLineNumber:c,startColumn:1,endLineNumber:c,endColumn:1})}}}class g4i extends S1{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:W("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:L0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:pp(2089,2135),weight:100}})}invoke(e,i,n){var d;const s=[],c=n.getSelections();if(c){for(const f of c){let m=f.endLineNumber;f.endColumn===1&&--m,m>f.startLineNumber&&(s.push({startLineNumber:f.startLineNumber,endLineNumber:m,type:void 0,isCollapsed:!0,source:1}),n.setSelection({startLineNumber:f.startLineNumber,startColumn:1,endLineNumber:f.startLineNumber,endColumn:1}))}if(s.length>0){s.sort((m,v)=>m.startLineNumber-v.startLineNumber);const f=_w.sanitizeAndMerge(i.regions,s,(d=n.getModel())==null?void 0:d.getLineCount());i.updatePost(_w.fromFoldRanges(f))}}}}class y4i extends S1{constructor(){super({id:"editor.removeManualFoldingRanges",label:W("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:L0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:pp(2089,2137),weight:100}})}invoke(e,i,n){const s=n.getSelections();if(s){const c=[];for(const d of s){const{startLineNumber:f,endLineNumber:m}=d;c.push(m>=f?{startLineNumber:f,endLineNumber:m}:{endLineNumber:m,startLineNumber:f})}i.removeManualRanges(c),e.triggerFoldingModelChanged()}}}Cl(OR.ID,OR,0);sr(t4i);sr(i4i);sr(n4i);sr(s4i);sr(o4i);sr(f4i);sr(h4i);sr(a4i);sr(c4i);sr(l4i);sr(u4i);sr(d4i);sr(r4i);sr(_4i);sr(p4i);sr(m4i);sr(g4i);sr(y4i);for(let l=1;l<=7;l++)Zdi(new lbe({id:lbe.ID(l),label:W("foldLevelAction.label","Fold Level {0}",l),alias:`Fold Level ${l}`,precondition:L0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:pp(2089,2048|21+l),weight:100}}));fl.registerCommand("_executeFoldingRangeProvider",async function(l,...e){const[i]=e;if(!(i instanceof yo))throw gk();const n=l.get(Ts),s=l.get(rf).getModel(i);if(!s)throw gk();const c=l.get(Cc);if(!c.getValue("editor.folding",{resource:i}))return[];const d=l.get(rh),f=c.getValue("editor.foldingStrategy",{resource:i}),m={get limit(){return c.getValue("editor.foldingMaximumRegions",{resource:i})},update:(P,O)=>{}},v=new nKe(s,d,m);let x=v;if(f!=="indentation"){const P=OR.getFoldingRangeProviders(n,s);P.length&&(x=new rKe(s,P,()=>{},m,v))}const w=await x.compute(cc.None),I=[];try{if(w)for(let P=0;P<w.length;P++){const O=w.getType(P);I.push({start:w.getStartLineNumber(P),end:w.getEndLineNumber(P),kind:O?yR.fromValue(O):void 0})}return I}finally{x.dispose()}});class v4i extends hs{constructor(){super({id:"editor.action.fontZoomIn",label:W("EditorFontZoomIn.label","Increase Editor Font Size"),alias:"Increase Editor Font Size",precondition:void 0})}run(e,i){fk.setZoomLevel(fk.getZoomLevel()+1)}}class b4i extends hs{constructor(){super({id:"editor.action.fontZoomOut",label:W("EditorFontZoomOut.label","Decrease Editor Font Size"),alias:"Decrease Editor Font Size",precondition:void 0})}run(e,i){fk.setZoomLevel(fk.getZoomLevel()-1)}}class C4i extends hs{constructor(){super({id:"editor.action.fontZoomReset",label:W("EditorFontZoomReset.label","Reset Editor Font Size"),alias:"Reset Editor Font Size",precondition:void 0})}run(e,i){fk.setZoomLevel(0)}}sr(v4i);sr(b4i);sr(C4i);var sPt=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},ene=function(l,e){return function(i,n){e(i,n,l)}},p$;let ube=(p$=class{constructor(e,i,n,s){this._editor=e,this._languageFeaturesService=i,this._workerService=n,this._accessibilitySignalService=s,this._disposables=new wn,this._sessionDisposables=new wn,this._disposables.add(i.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(c=>{c.hasChanged(56)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(56)||!this._editor.hasModel())return;const e=this._editor.getModel(),[i]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!i||!i.autoFormatTriggerCharacters)return;const n=new pye;for(const s of i.autoFormatTriggerCharacters)n.add(s.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(s=>{const c=s.charCodeAt(s.length-1);n.has(c)&&this._trigger(String.fromCharCode(c))}))}_trigger(e){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const i=this._editor.getModel(),n=this._editor.getPosition(),s=new ih,c=this._editor.onDidChangeModelContent(d=>{if(d.isFlush){s.cancel(),c.dispose();return}for(let f=0,m=d.changes.length;f<m;f++)if(d.changes[f].range.endLineNumber<=n.lineNumber){s.cancel(),c.dispose();return}});YIt(this._workerService,this._languageFeaturesService,i,n,e,i.getFormattingOptions(),s.token).then(d=>{s.token.isCancellationRequested||ky(d)&&(this._accessibilitySignalService.playSignal(hw.format,{userGesture:!1}),G$.execute(this._editor,d,!0))}).finally(()=>{c.dispose()})}},p$.ID="editor.contrib.autoFormat",p$);ube=sPt([ene(1,Ts),ene(2,Fb),ene(3,jR)],ube);var m$;let dbe=(m$=class{constructor(e,i,n){this.editor=e,this._languageFeaturesService=i,this._instantiationService=n,this._callOnDispose=new wn,this._callOnModel=new wn,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(i.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(55)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:e})=>this._trigger(e)))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(ZIt,this.editor,e,2,NE.None,cc.None,!1).catch(Pa))}},m$.ID="editor.contrib.formatOnPaste",m$);dbe=sPt([ene(1,Ts),ene(2,ho)],dbe);class S4i extends hs{constructor(){super({id:"editor.action.formatDocument",label:W("formatDocument.label","Format Document"),alias:"Format Document",precondition:kn.and(Tt.notInCompositeEditor,Tt.writable,Tt.hasDocumentFormattingProvider),kbOpts:{kbExpr:Tt.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}async run(e,i){if(i.hasModel()){const n=e.get(ho);await e.get(WR).showWhile(n.invokeFunction(jEi,i,1,NE.None,cc.None,!0),250)}}}class w4i extends hs{constructor(){super({id:"editor.action.formatSelection",label:W("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:kn.and(Tt.writable,Tt.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:Tt.editorTextFocus,primary:pp(2089,2084),weight:100},contextMenuOpts:{when:Tt.hasNonEmptySelection,group:"1_modification",order:1.31}})}async run(e,i){if(!i.hasModel())return;const n=e.get(ho),s=i.getModel(),c=i.getSelections().map(f=>f.isEmpty()?new nt(f.startLineNumber,1,f.startLineNumber,s.getLineMaxColumn(f.startLineNumber)):f);await e.get(WR).showWhile(n.invokeFunction(ZIt,i,c,1,NE.None,cc.None,!0),250)}}Cl(ube.ID,ube,2);Cl(dbe.ID,dbe,2);sr(S4i);sr(w4i);fl.registerCommand("editor.action.format",async l=>{const e=l.get(Bl).getFocusedCodeEditor();if(!e||!e.hasModel())return;const i=l.get(qd);e.getSelection().isEmpty()?await i.executeCommand("editor.action.formatDocument"):await i.executeCommand("editor.action.formatSelection")});var x4i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},W9e=function(l,e){return function(i,n){e(i,n,l)}};class vq{remove(){var e;(e=this.parent)==null||e.children.delete(this.id)}static findId(e,i){let n;typeof e=="string"?n=`${i.id}/${e}`:(n=`${i.id}/${e.name}`,i.children.get(n)!==void 0&&(n=`${i.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let s=n;for(let c=0;i.children.get(s)!==void 0;c++)s=`${n}_${c}`;return s}static empty(e){return e.children.size===0}}class qze extends vq{constructor(e,i,n){super(),this.id=e,this.parent=i,this.symbol=n,this.children=new Map}}class oPt extends vq{constructor(e,i,n,s){super(),this.id=e,this.parent=i,this.label=n,this.order=s,this.children=new Map}}class L4 extends vq{static create(e,i,n){const s=new ih(n),c=new L4(i.uri),d=e.ordered(i),f=d.map((v,x)=>{const w=vq.findId(`provider_${x}`,c),I=new oPt(w,c,v.displayName??"Unknown Outline Provider",x);return Promise.resolve(v.provideDocumentSymbols(i,s.token)).then(P=>{for(const O of P||[])L4._makeOutlineElement(O,I);return I},P=>(t_(P),I)).then(P=>{vq.empty(P)?P.remove():c._groups.set(w,P)})}),m=e.onDidChange(()=>{const v=e.ordered(i);Lf(v,d)||s.cancel()});return Promise.all(f).then(()=>s.token.isCancellationRequested&&!n.isCancellationRequested?L4.create(e,i,n):c._compact()).finally(()=>{s.dispose(),m.dispose(),s.dispose()})}static _makeOutlineElement(e,i){const n=vq.findId(e,i),s=new qze(n,i,e);if(e.children)for(const c of e.children)L4._makeOutlineElement(c,s);i.children.set(s.id,s)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[i,n]of this._groups)n.children.size===0?this._groups.delete(i):e+=1;if(e!==1)this.children=this._groups;else{const i=dl.first(this._groups.values());for(const[,n]of i.children)n.parent=this,this.children.set(n.id,n)}return this}getTopLevelSymbols(){const e=[];for(const i of this.children.values())i instanceof qze?e.push(i.symbol):e.push(...dl.map(i.children.values(),n=>n.symbol));return e.sort((i,n)=>nt.compareRangesUsingStarts(i.range,n.range))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),i=[];return L4._flattenDocumentSymbols(i,e,""),i.sort((n,s)=>pi.compare(nt.getStartPosition(n.range),nt.getStartPosition(s.range))||pi.compare(nt.getEndPosition(s.range),nt.getEndPosition(n.range)))}static _flattenDocumentSymbols(e,i,n){for(const s of i)e.push({kind:s.kind,tags:s.tags,name:s.name,detail:s.detail,containerName:s.containerName||n,range:s.range,selectionRange:s.selectionRange,children:void 0}),s.children&&L4._flattenDocumentSymbols(e,s.children,s.name)}}const Jse=jc("IOutlineModelService");let $ze=class{constructor(e,i,n){this._languageFeaturesService=e,this._disposables=new wn,this._cache=new VL(10,.7),this._debounceInformation=i.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(n.onModelRemoved(s=>{this._cache.delete(s.id)}))}dispose(){this._disposables.dispose()}async getOrCreate(e,i){const n=this._languageFeaturesService.documentSymbolProvider,s=n.ordered(e);let c=this._cache.get(e.id);if(!c||c.versionId!==e.getVersionId()||!Lf(c.provider,s)){const f=new ih;c={versionId:e.getVersionId(),provider:s,promiseCnt:0,source:f,promise:L4.create(n,e,f.token),model:void 0},this._cache.set(e.id,c);const m=Date.now();c.promise.then(v=>{c.model=v,this._debounceInformation.update(e,Date.now()-m)}).catch(v=>{this._cache.delete(e.id)})}if(c.model)return c.model;c.promiseCnt+=1;const d=i.onCancellationRequested(()=>{--c.promiseCnt===0&&(c.source.cancel(),this._cache.delete(e.id))});try{return await c.promise}finally{d.dispose()}}};$ze=x4i([W9e(0,Ts),W9e(1,Pw),W9e(2,rf)],$ze);nl(Jse,$ze,1);fl.registerCommand("_executeDocumentSymbolProvider",async function(l,...e){const[i]=e;Fl(yo.isUri(i));const n=l.get(Jse),c=await l.get(Ob).createModelReference(i);try{return(await n.getOrCreate(c.object.textEditorModel,cc.None)).getTopLevelSymbols()}finally{c.dispose()}});const aL=class aL extends xi{constructor(e,i){super(),this.contextKeyService=e,this.model=i,this.inlineCompletionVisible=aL.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=aL.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=aL.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=aL.suppressSuggestions.bindTo(this.contextKeyService),this._register(ba(n=>{const s=this.model.read(n),c=s==null?void 0:s.state.read(n),d=!!(c!=null&&c.inlineCompletion)&&(c==null?void 0:c.primaryGhostText)!==void 0&&!(c!=null&&c.primaryGhostText.isEmpty());this.inlineCompletionVisible.set(d),c!=null&&c.primaryGhostText&&(c!=null&&c.inlineCompletion)&&this.suppressSuggestions.set(c.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)})),this._register(ba(n=>{const s=this.model.read(n);let c=!1,d=!0;const f=s==null?void 0:s.primaryGhostText.read(n);if(s!=null&&s.selectedSuggestItem&&f&&f.parts.length>0){const{column:m,lines:v}=f.parts[0],x=v[0],w=s.textModel.getLineIndentColumn(f.lineNumber);if(m<=w){let P=Ty(x);P===-1&&(P=x.length-1),c=P>0;const O=s.textModel.getOptions().tabSize;d=em.visibleColumnFromColumn(x,P+1,O)<O}}this.inlineCompletionSuggestsIndentation.set(c),this.inlineCompletionSuggestsIndentationLessThanTabSize.set(d)}))}};aL.inlineSuggestionVisible=new rs("inlineSuggestionVisible",!1,W("inlineSuggestionVisible","Whether an inline suggestion is visible")),aL.inlineSuggestionHasIndentation=new rs("inlineSuggestionHasIndentation",!1,W("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace")),aL.inlineSuggestionHasIndentationLessThanTabSize=new rs("inlineSuggestionHasIndentationLessThanTabSize",!0,W("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab")),aL.suppressSuggestions=new rs("inlineSuggestionSuppressSuggestions",void 0,W("suppressSuggestions","Whether suggestions should be suppressed for the current suggestion"));let XC=aL;function k4i(l){const e=new wn,i=e.add(T2t());return e.add(ba(n=>{i.setStyle(l.read(n))})),e}class qre{constructor(e,i){this.lineNumber=e,this.parts=i}equals(e){return this.lineNumber===e.lineNumber&&this.parts.length===e.parts.length&&this.parts.every((i,n)=>i.equals(e.parts[n]))}renderForScreenReader(e){if(this.parts.length===0)return"";const i=this.parts[this.parts.length-1],n=e.substr(0,i.column-1);return new w$e([...this.parts.map(c=>new IL(nt.fromPositions(new pi(1,c.column)),c.lines.join(`
+`)))]).applyToString(n).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(e=>e.lines.length===0)}get lineCount(){return 1+this.parts.reduce((e,i)=>e+i.lines.length-1,0)}}class fbe{constructor(e,i,n){this.column=e,this.text=i,this.preview=n,this.lines=BL(this.text)}equals(e){return this.column===e.column&&this.lines.length===e.lines.length&&this.lines.every((i,n)=>i===e.lines[n])}}class Jze{constructor(e,i,n,s=0){this.lineNumber=e,this.columnRange=i,this.text=n,this.additionalReservedLineCount=s,this.parts=[new fbe(this.columnRange.endColumnExclusive,this.text,!1)],this.newLines=BL(this.text)}renderForScreenReader(e){return this.newLines.join(`
+`)}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(e=>e.lines.length===0)}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every((i,n)=>i===e.newLines[n])&&this.additionalReservedLineCount===e.additionalReservedLineCount}}function pxt(l,e){return Lf(l,e,aPt)}function aPt(l,e){return l===e?!0:!l||!e?!1:l instanceof qre&&e instanceof qre||l instanceof Jze&&e instanceof Jze?l.equals(e):!1}const T4i=[];function D4i(){return T4i}class cPt{constructor(e,i){if(this.startColumn=e,this.endColumnExclusive=i,e>i)throw new tu(`startColumn ${e} cannot be after endColumnExclusive ${i}`)}toRange(e){return new nt(e,this.startColumn,e,this.endColumnExclusive)}equals(e){return this.startColumn===e.startColumn&&this.endColumnExclusive===e.endColumnExclusive}}function lPt(l,e){const i=new wn,n=l.createDecorationsCollection();return i.add(kse({debugName:()=>`Apply decorations from ${e.debugName}`},s=>{const c=e.read(s);n.set(c)})),i.add({dispose:()=>{n.clear()}}),i}function E4i(l,e){return new pi(l.lineNumber+e.lineNumber-1,e.lineNumber===1?l.column+e.column-1:e.column)}function mxt(l,e){return new pi(l.lineNumber-e.lineNumber+1,l.lineNumber-e.lineNumber===0?l.column-e.column+1:l.column)}var I4i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},N4i=function(l,e){return function(i,n){e(i,n,l)}};const gxt="ghost-text";let Gze=class extends xi{constructor(e,i,n){super(),this.editor=e,this.model=i,this.languageService=n,this.isDisposed=bc(this,!1),this.currentTextModel=Tu(this,this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=ro(this,s=>{if(this.isDisposed.read(s))return;const c=this.currentTextModel.read(s);if(c!==this.model.targetTextModel.read(s))return;const d=this.model.ghostText.read(s);if(!d)return;const f=d instanceof Jze?d.columnRange:void 0,m=[],v=[];function x(z,J){if(v.length>0){const Y=v[v.length-1];J&&Y.decorations.push(new mv(Y.content.length+1,Y.content.length+1+z[0].length,J,0)),Y.content+=z[0],z=z.slice(1)}for(const Y of z)v.push({content:Y,decorations:J?[new mv(1,Y.length+1,J,0)]:[]})}const w=c.getLineContent(d.lineNumber);let I,P=0;for(const z of d.parts){let J=z.lines;I===void 0?(m.push({column:z.column,text:J[0],preview:z.preview}),J=J.slice(1)):x([w.substring(P,z.column-1)],void 0),J.length>0&&(x(J,gxt),I===void 0&&z.column<=w.length&&(I=z.column)),P=z.column-1}I!==void 0&&x([w.substring(P)],void 0);const O=I!==void 0?new cPt(I,w.length+1):void 0;return{replacedRange:f,inlineTexts:m,additionalLines:v,hiddenRange:O,lineNumber:d.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(s),targetTextModel:c}}),this.decorations=ro(this,s=>{const c=this.uiState.read(s);if(!c)return[];const d=[];c.replacedRange&&d.push({range:c.replacedRange.toRange(c.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),c.hiddenRange&&d.push({range:c.hiddenRange.toRange(c.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const f of c.inlineTexts)d.push({range:nt.fromPositions(new pi(c.lineNumber,f.column)),options:{description:gxt,after:{content:f.text,inlineClassName:f.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:_T.Left},showIfCollapsed:!0}});return d}),this.additionalLinesWidget=this._register(new L4i(this.editor,this.languageService.languageIdCodec,ro(s=>{const c=this.uiState.read(s);return c?{lineNumber:c.lineNumber,additionalLines:c.additionalLines,minReservedLineCount:c.additionalReservedLineCount,targetTextModel:c.targetTextModel}:void 0}))),this._register(fo(()=>{this.isDisposed.set(!0,void 0)})),this._register(lPt(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};Gze=I4i([N4i(2,Pf)],Gze);class L4i extends xi{get viewZoneId(){return this._viewZoneId}constructor(e,i,n){super(),this.editor=e,this.languageIdCodec=i,this.lines=n,this._viewZoneId=void 0,this.editorOptionsChanged=k0("editorOptionChanged",Tr.filter(this.editor.onDidChangeConfiguration,s=>s.hasChanged(33)||s.hasChanged(118)||s.hasChanged(100)||s.hasChanged(95)||s.hasChanged(51)||s.hasChanged(50)||s.hasChanged(67))),this._register(ba(s=>{const c=this.lines.read(s);this.editorOptionsChanged.read(s),c?this.updateLines(c.lineNumber,c.additionalLines,c.minReservedLineCount):this.clear()}))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones(e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(e,i,n){const s=this.editor.getModel();if(!s)return;const{tabSize:c}=s.getOptions();this.editor.changeViewZones(d=>{this._viewZoneId&&(d.removeZone(this._viewZoneId),this._viewZoneId=void 0);const f=Math.max(i.length,n);if(f>0){const m=document.createElement("div");P4i(m,c,i,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=d.addZone({afterLineNumber:e,heightInLines:f,domNode:m,afterColumnAffinity:1})}})}}function P4i(l,e,i,n,s){const c=n.get(33),d=n.get(118),f="none",m=n.get(95),v=n.get(51),x=n.get(50),w=n.get(67),I=new gJ(1e4);I.appendString('<div class="suggest-preview-text">');for(let z=0,J=i.length;z<J;z++){const Y=i[z],ae=Y.content;I.appendString('<div class="view-line'),I.appendString('" style="top:'),I.appendString(String(z*w)),I.appendString('px;width:1000000px;">');const me=fse(ae),ye=k$(ae),Ce=Cg.createEmpty(ae,s);Ose(new zR(x.isMonospace&&!c,x.canUseHalfwidthRightwardsArrow,ae,!1,me,ye,0,Ce,Y.decorations,e,0,x.spaceWidth,x.middotWidth,x.wsmiddotWidth,d,f,m,v!==mR.OFF,null),I),I.appendString("</div>")}I.appendString("</div>"),a0(l,x);const P=I.build(),O=yxt?yxt.createHTML(P):P;l.innerHTML=O}const yxt=v6("editorGhostText",{createHTML:l=>l});function A4i(l,e){const i=new KDt,n=new QDt(i,v=>e.getLanguageConfiguration(v)),s=new XDt(new O4i([l]),n),c=tHe(s,[],void 0,!0);let d="";const f=l.getLineContent();function m(v,x){if(v.kind===2)if(m(v.openingBracket,x),x=Fh(x,v.openingBracket.length),v.child&&(m(v.child,x),x=Fh(x,v.child.length)),v.closingBracket)m(v.closingBracket,x),x=Fh(x,v.closingBracket.length);else{const I=n.getSingleLanguageBracketTokens(v.openingBracket.languageId).findClosingTokenText(v.openingBracket.bracketIds);d+=I}else if(v.kind!==3){if(v.kind===0||v.kind===1)d+=f.substring(x,Fh(x,v.length));else if(v.kind===4)for(const w of v.children)m(w,x),x=Fh(x,w.length)}}return m(c,pv),d}class O4i{constructor(e){this.lines=e,this.tokenization={getLineTokens:i=>this.lines[i-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}async function uPt(l,e,i,n,s=cc.None,c){const d=e instanceof pi?F4i(e,i):e,f=l.all(i),m=new y$e;for(const Y of f)Y.groupId&&m.add(Y.groupId,Y);function v(Y){if(!Y.yieldsToGroupIds)return[];const ae=[];for(const me of Y.yieldsToGroupIds||[]){const ye=m.get(me);for(const Ce of ye)ae.push(Ce)}return ae}const x=new Map,w=new Set;function I(Y,ae){if(ae=[...ae,Y],w.has(Y))return ae;w.add(Y);try{const me=v(Y);for(const ye of me){const Ce=I(ye,ae);if(Ce)return Ce}}finally{w.delete(Y)}}function P(Y){const ae=x.get(Y);if(ae)return ae;const me=I(Y,[]);me&&t_(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${me.map(Ce=>Ce.toString?Ce.toString():""+Ce).join(" -> ")}`));const ye=new hJ;return x.set(Y,ye.p),(async()=>{var Ce;if(!me){const Fe=v(Y);for(const rt of Fe){const ct=await P(rt);if(ct&&ct.items.length>0)return}}try{return e instanceof pi?await Y.provideInlineCompletions(i,e,n,s):await((Ce=Y.provideInlineEdits)==null?void 0:Ce.call(Y,i,e,n,s))}catch(Fe){t_(Fe);return}})().then(Ce=>ye.complete(Ce),Ce=>ye.error(Ce)),ye.p}const O=await Promise.all(f.map(async Y=>({provider:Y,completions:await P(Y)}))),z=new Map,J=[];for(const Y of O){const ae=Y.completions;if(!ae)continue;const me=new R4i(ae,Y.provider);J.push(me);for(const ye of ae.items){const Ce=hbe.from(ye,me,d,i,c);z.set(Ce.hash(),Ce)}}return new M4i(Array.from(z.values()),new Set(z.keys()),J)}class M4i{constructor(e,i,n){this.completions=e,this.hashs=i,this.providerResults=n}has(e){return this.hashs.has(e.hash())}dispose(){for(const e of this.providerResults)e.removeRef()}}class R4i{constructor(e,i){this.inlineCompletions=e,this.provider=i,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,this.refCount===0&&this.provider.freeInlineCompletions(this.inlineCompletions)}}class hbe{static from(e,i,n,s,c){let d,f,m=e.range?nt.lift(e.range):n;if(typeof e.insertText=="string"){if(d=e.insertText,c&&e.completeBracketPairs){d=vxt(d,m.getStartPosition(),s,c);const v=d.length-e.insertText.length;v!==0&&(m=new nt(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn+v))}f=void 0}else if("snippet"in e.insertText){const v=e.insertText.snippet.length;if(c&&e.completeBracketPairs){e.insertText.snippet=vxt(e.insertText.snippet,m.getStartPosition(),s,c);const w=e.insertText.snippet.length-v;w!==0&&(m=new nt(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn+w))}const x=new WB().parse(e.insertText.snippet);x.children.length===1&&x.children[0]instanceof hv?(d=x.children[0].value,f=void 0):(d=x.toString(),f={snippet:e.insertText.snippet,range:m})}else qSe(e.insertText);return new hbe(d,e.command,m,d,f,e.additionalTextEdits||D4i(),e,i)}constructor(e,i,n,s,c,d,f,m){this.filterText=e,this.command=i,this.range=n,this.insertText=s,this.snippetInfo=c,this.additionalTextEdits=d,this.sourceInlineCompletion=f,this.source=m,e=e.replace(/\r\n|\r/g,`
+`),s=e.replace(/\r\n|\r/g,`
+`)}withRange(e){return new hbe(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}toSingleTextEdit(){return new IL(this.range,this.insertText)}}function F4i(l,e){const i=e.getWordAtPosition(l),n=e.getLineMaxColumn(l.lineNumber);return i?new nt(l.lineNumber,i.startColumn,l.lineNumber,n):nt.fromPositions(l,l.with(void 0,n))}function vxt(l,e,i,n){const c=i.getLineContent(e.lineNumber).substring(0,e.column-1)+l,d=i.tokenization.tokenizeLineWithEdit(e,c.length-(e.column-1),l),f=d==null?void 0:d.sliceAndInflate(e.column-1,c.length,0);return f?A4i(f,n):l}function w9(l,e,i){const n=i?l.range.intersectRanges(i):l.range;if(!n)return l;const s=e.getValueInRange(n,1),c=vR(s,l.text),d=ST.ofText(s.substring(0,c)).addToPosition(l.range.getStartPosition()),f=l.text.substring(c),m=nt.fromPositions(d,l.range.getEndPosition());return new IL(m,f)}function dPt(l,e){return l.text.startsWith(e.text)&&B4i(l.range,e.range)}function bxt(l,e,i,n,s=0){let c=w9(l,e);if(c.range.endLineNumber!==c.range.startLineNumber)return;const d=e.getLineContent(c.range.startLineNumber),f=yd(d).length;if(c.range.startColumn-1<=f){const O=yd(c.text).length,z=d.substring(c.range.startColumn-1,f),[J,Y]=[c.range.getStartPosition(),c.range.getEndPosition()],ae=J.column+z.length<=Y.column?J.delta(0,z.length):Y,me=nt.fromPositions(ae,Y),ye=c.text.startsWith(z)?c.text.substring(z.length):c.text.substring(O);c=new IL(me,ye)}const v=e.getValueInRange(c.range),x=W4i(v,c.text);if(!x)return;const w=c.range.startLineNumber,I=new Array;if(i==="prefix"){const O=x.filter(z=>z.originalLength===0);if(O.length>1||O.length===1&&O[0].originalStart!==v.length)return}const P=c.text.length-s;for(const O of x){const z=c.range.startColumn+O.originalStart+O.originalLength;if(i==="subwordSmart"&&n&&n.lineNumber===c.range.startLineNumber&&z<n.column||O.originalLength>0)return;if(O.modifiedLength===0)continue;const J=O.modifiedStart+O.modifiedLength,Y=Math.max(O.modifiedStart,Math.min(J,P)),ae=c.text.substring(O.modifiedStart,Y),me=c.text.substring(Y,Math.max(O.modifiedStart,J));ae.length>0&&I.push(new fbe(z,ae,!1)),me.length>0&&I.push(new fbe(z,me,!0))}return new qre(w,I)}function B4i(l,e){return e.getStartPosition().equals(l.getStartPosition())&&e.getEndPosition().isBeforeOrEqual(l.getEndPosition())}let XN;function W4i(l,e){if((XN==null?void 0:XN.originalValue)===l&&(XN==null?void 0:XN.newValue)===e)return XN==null?void 0:XN.changes;{let i=Sxt(l,e,!0);if(i){const n=Cxt(i);if(n>0){const s=Sxt(l,e,!1);s&&Cxt(s)<n&&(i=s)}}return XN={originalValue:l,newValue:e,changes:i},i}}function Cxt(l){let e=0;for(const i of l)e+=i.originalLength;return e}function Sxt(l,e,i){if(l.length>5e3||e.length>5e3)return;function n(v){let x=0;for(let w=0,I=v.length;w<I;w++){const P=v.charCodeAt(w);P>x&&(x=P)}return x}const s=Math.max(n(l),n(e));function c(v){if(v<0)throw new Error("unexpected");return s+v+1}function d(v){let x=0,w=0;const I=new Int32Array(v.length);for(let P=0,O=v.length;P<O;P++)if(i&&v[P]==="("){const z=w*100+x;I[P]=c(2*z),x++}else if(i&&v[P]===")"){x=Math.max(x-1,0);const z=w*100+x;I[P]=c(2*z+1),x===0&&w++}else I[P]=v.charCodeAt(P);return I}const f=d(l),m=d(e);return new mL({getElements:()=>f},{getElements:()=>m}).ComputeDiff(!1).changes}var V4i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},wxt=function(l,e){return function(i,n){e(i,n,l)}};let Kze=class extends xi{constructor(e,i,n,s,c){super(),this.textModel=e,this.versionId=i,this._debounceValue=n,this.languageFeaturesService=s,this.languageConfigurationService=c,this._updateOperation=this._register(new Fm),this.inlineCompletions=sre("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=sre("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent(()=>{this._updateOperation.clear()}))}fetch(e,i,n){var x,w;const s=new j4i(e,i,this.textModel.getVersionId()),c=i.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if((x=this._updateOperation.value)!=null&&x.request.satisfies(s))return this._updateOperation.value.promise;if((w=c.get())!=null&&w.request.satisfies(s))return Promise.resolve(!0);const d=!!this._updateOperation.value;this._updateOperation.clear();const f=new ih,m=(async()=>{if((d||i.triggerKind===OE.Automatic)&&await H4i(this._debounceValue.get(this.textModel),f.token),f.token.isCancellationRequested||this._store.isDisposed||this.textModel.getVersionId()!==s.versionId)return!1;const P=new Date,O=await uPt(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,i,f.token,this.languageConfigurationService);if(f.token.isCancellationRequested||this._store.isDisposed||this.textModel.getVersionId()!==s.versionId)return!1;const z=new Date;this._debounceValue.update(this.textModel,z.getTime()-P.getTime());const J=new U4i(O,s,this.textModel,this.versionId);if(n){const Y=n.toInlineCompletion(void 0);n.canBeReused(this.textModel,e)&&!O.has(Y)&&J.prepend(n.inlineCompletion,Y.range,!0)}return this._updateOperation.clear(),th(Y=>{c.set(J,Y)}),!0})(),v=new z4i(s,f,m);return this._updateOperation.value=v,m}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){var i;(i=this._updateOperation.value)!=null&&i.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};Kze=V4i([wxt(3,Ts),wxt(4,rh)],Kze);function H4i(l,e){return new Promise(i=>{let n;const s=setTimeout(()=>{n&&n.dispose(),i()},l);e&&(n=e.onCancellationRequested(()=>{clearTimeout(s),n&&n.dispose(),i()}))})}class j4i{constructor(e,i,n){this.position=e,this.context=i,this.versionId=n}satisfies(e){return this.position.equals(e.position)&&MVe(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,t1i())&&(e.context.triggerKind===OE.Automatic||this.context.triggerKind===OE.Explicit)&&this.versionId===e.versionId}}class z4i{constructor(e,i,n){this.request=e,this.cancellationTokenSource=i,this.promise=n}dispose(){this.cancellationTokenSource.cancel()}}class U4i{get inlineCompletions(){return this._inlineCompletions}constructor(e,i,n,s){this.inlineCompletionProviderResult=e,this.request=i,this._textModel=n,this._versionId=s,this._refCount=1,this._prependedInlineCompletionItems=[];const c=n.deltaDecorations([],e.completions.map(d=>({range:d.range,options:{description:"inline-completion-tracking-range"}})));this._inlineCompletions=e.completions.map((d,f)=>new xxt(d,c[f],this._textModel,this._versionId))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,this._refCount===0){setTimeout(()=>{this._textModel.isDisposed()||this._textModel.deltaDecorations(this._inlineCompletions.map(e=>e.decorationId),[])},0),this.inlineCompletionProviderResult.dispose();for(const e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,i,n){n&&e.source.addRef();const s=this._textModel.deltaDecorations([],[{range:i,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new xxt(e,s,this._textModel,this._versionId)),this._prependedInlineCompletionItems.push(e)}}class xxt{get forwardStable(){return this.inlineCompletion.source.inlineCompletions.enableForwardStability??!1}constructor(e,i,n,s){this.inlineCompletion=e,this.decorationId=i,this._textModel=n,this._modelVersion=s,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._updatedRange=mw({owner:this,equalsFn:nt.equalsRange},c=>(this._modelVersion.read(c),this._textModel.getDecorationRange(this.decorationId)))}toInlineCompletion(e){return this.inlineCompletion.withRange(this._updatedRange.read(e)??V9e)}toSingleTextEdit(e){return new IL(this._updatedRange.read(e)??V9e,this.inlineCompletion.insertText)}isVisible(e,i,n){const s=w9(this._toFilterTextReplacement(n),e),c=this._updatedRange.read(n);if(!c||!this.inlineCompletion.range.getStartPosition().equals(c.getStartPosition())||i.lineNumber!==s.range.startLineNumber)return!1;const d=e.getValueInRange(s.range,1),f=s.text,m=Math.max(0,i.column-s.range.startColumn);let v=f.substring(0,m),x=f.substring(m),w=d.substring(0,m),I=d.substring(m);const P=e.getLineIndentColumn(s.range.startLineNumber);return s.range.startColumn<=P&&(w=w.trimStart(),w.length===0&&(I=I.trimStart()),v=v.trimStart(),v.length===0&&(x=x.trimStart())),v.startsWith(w)&&!!eDt(I,x)}canBeReused(e,i){const n=this._updatedRange.read(void 0);return!!n&&n.containsPosition(i)&&this.isVisible(e,i,void 0)&&ST.ofRange(n).isGreaterThanOrEqualTo(ST.ofRange(this.inlineCompletion.range))}_toFilterTextReplacement(e){return new IL(this._updatedRange.read(e)??V9e,this.inlineCompletion.filterText)}}const V9e=new nt(1,1,1,1),fc={Visible:ZGe,HasFocusedSuggestion:new rs("suggestWidgetHasFocusedSuggestion",!1,W("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new rs("suggestWidgetDetailsVisible",!1,W("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new rs("suggestWidgetMultipleSuggestions",!1,W("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new rs("suggestionMakesTextEdit",!0,W("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new rs("acceptSuggestionOnEnter",!0,W("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new rs("suggestionHasInsertAndReplaceRange",!1,W("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new rs("suggestionInsertMode",void 0,{type:"string",description:W("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new rs("suggestionCanResolve",!1,W("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},QM=new As("suggestWidgetStatusBar");class q4i{constructor(e,i,n,s){var c;this.position=e,this.completion=i,this.container=n,this.provider=s,this.isInvalid=!1,this.score=BE.Default,this.distance=0,this.textLabel=typeof i.label=="string"?i.label:(c=i.label)==null?void 0:c.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=i.sortText&&i.sortText.toLowerCase(),this.filterTextLow=i.filterText&&i.filterText.toLowerCase(),this.extensionId=i.extensionId,nt.isIRange(i.range)?(this.editStart=new pi(i.range.startLineNumber,i.range.startColumn),this.editInsertEnd=new pi(i.range.endLineNumber,i.range.endColumn),this.editReplaceEnd=new pi(i.range.endLineNumber,i.range.endColumn),this.isInvalid=this.isInvalid||nt.spansMultipleLines(i.range)||i.range.startLineNumber!==e.lineNumber):(this.editStart=new pi(i.range.insert.startLineNumber,i.range.insert.startColumn),this.editInsertEnd=new pi(i.range.insert.endLineNumber,i.range.insert.endColumn),this.editReplaceEnd=new pi(i.range.replace.endLineNumber,i.range.replace.endColumn),this.isInvalid=this.isInvalid||nt.spansMultipleLines(i.range.insert)||nt.spansMultipleLines(i.range.replace)||i.range.insert.startLineNumber!==e.lineNumber||i.range.replace.startLineNumber!==e.lineNumber||i.range.insert.startColumn!==i.range.replace.startColumn),typeof s.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return this._resolveDuration!==void 0}get resolveDuration(){return this._resolveDuration!==void 0?this._resolveDuration:-1}async resolve(e){if(!this._resolveCache){const i=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._resolveDuration=void 0}),n=new bg(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(s=>{Object.assign(this.completion,s),this._resolveDuration=n.elapsed()},s=>{Tk(s)&&(this._resolveCache=void 0,this._resolveDuration=void 0)}).finally(()=>{i.dispose()})}return this._resolveCache}}const JCe=class JCe{constructor(e=2,i=new Set,n=new Set,s=new Map,c=!0){this.snippetSortOrder=e,this.kindFilter=i,this.providerFilter=n,this.providerItemsToReuse=s,this.showDeprecated=c}};JCe.default=new JCe;let $re=JCe;class $4i{constructor(e,i,n,s){this.items=e,this.needsClipboard=i,this.durations=n,this.disposable=s}}async function sKe(l,e,i,n=$re.default,s={triggerKind:0},c=cc.None){const d=new bg;i=i.clone();const f=e.getWordAtPosition(i),m=f?new nt(i.lineNumber,f.startColumn,i.lineNumber,f.endColumn):nt.fromPositions(i),v={replace:m,insert:m.setEndPosition(i.lineNumber,i.column)},x=[],w=new wn,I=[];let P=!1;const O=(J,Y,ae)=>{var ye;let me=!1;if(!Y)return me;for(const Ce of Y.suggestions)if(!n.kindFilter.has(Ce.kind)){if(!n.showDeprecated&&((ye=Ce==null?void 0:Ce.tags)!=null&&ye.includes(1)))continue;Ce.range||(Ce.range=v),Ce.sortText||(Ce.sortText=typeof Ce.label=="string"?Ce.label:Ce.label.label),!P&&Ce.insertTextRules&&Ce.insertTextRules&4&&(P=WB.guessNeedsClipboard(Ce.insertText)),x.push(new q4i(i,Ce,Y,J)),me=!0}return ESe(Y)&&w.add(Y),I.push({providerName:J._debugDisplayName??"unknown_provider",elapsedProvider:Y.duration??-1,elapsedOverall:ae.elapsed()}),me},z=(async()=>{})();for(const J of l.orderedGroups(e)){let Y=!1;if(await Promise.all(J.map(async ae=>{if(n.providerItemsToReuse.has(ae)){const me=n.providerItemsToReuse.get(ae);me.forEach(ye=>x.push(ye)),Y=Y||me.length>0;return}if(!(n.providerFilter.size>0&&!n.providerFilter.has(ae)))try{const me=new bg,ye=await ae.provideCompletionItems(e,i,s,c);Y=O(ae,ye,me)||Y}catch(me){t_(me)}})),Y||c.isCancellationRequested)break}return await z,c.isCancellationRequested?(w.dispose(),Promise.reject(new vT)):new $4i(x.sort(K4i(n.snippetSortOrder)),P,{entries:I,elapsed:d.elapsed()},w)}function oKe(l,e){if(l.sortTextLow&&e.sortTextLow){if(l.sortTextLow<e.sortTextLow)return-1;if(l.sortTextLow>e.sortTextLow)return 1}return l.textLabel<e.textLabel?-1:l.textLabel>e.textLabel?1:l.completion.kind-e.completion.kind}function J4i(l,e){if(l.completion.kind!==e.completion.kind){if(l.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return oKe(l,e)}function G4i(l,e){if(l.completion.kind!==e.completion.kind){if(l.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return oKe(l,e)}const txe=new Map;txe.set(0,J4i);txe.set(2,G4i);txe.set(1,oKe);function K4i(l){return txe.get(l)}fl.registerCommand("_executeCompletionItemProvider",async(l,...e)=>{const[i,n,s,c]=e;Fl(yo.isUri(i)),Fl(pi.isIPosition(n)),Fl(typeof s=="string"||!s),Fl(typeof c=="number"||!c);const{completionProvider:d}=l.get(Ts),f=await l.get(Ob).createModelReference(i);try{const m={incomplete:!1,suggestions:[]},v=[],x=f.object.textEditorModel.validatePosition(n),w=await sKe(d,f.object.textEditorModel,x,void 0,{triggerCharacter:s??void 0,triggerKind:s?1:0});for(const I of w.items)v.length<(c??0)&&v.push(I.resolve(cc.None)),m.incomplete=m.incomplete||I.container.incomplete,m.suggestions.push(I.completion);try{return await Promise.all(v),m}finally{setTimeout(()=>w.disposable.dispose(),100)}}finally{f.dispose()}});function X4i(l,e){var i;(i=l.getContribution("editor.contrib.suggestController"))==null||i.triggerSuggest(new Set().add(e),void 0,!0)}class bq{static isAllOff(e){return e.other==="off"&&e.comments==="off"&&e.strings==="off"}static isAllOn(e){return e.other==="on"&&e.comments==="on"&&e.strings==="on"}static valueFor(e,i){switch(i){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}function kxt(l,e=I0){return D_i(l,e)?l.charAt(0).toUpperCase()+l.slice(1):l}var Q4i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Z4i=function(l,e){return function(i,n){e(i,n,l)}};class Txt{constructor(e){this._delegates=e}resolve(e){for(const i of this._delegates){const n=i.resolve(e);if(n!==void 0)return n}}}class Dxt{constructor(e,i,n,s){this._model=e,this._selection=i,this._selectionIdx=n,this._overtypingCapturer=s}resolve(e){const{name:i}=e;if(i==="SELECTION"||i==="TM_SELECTED_TEXT"){let n=this._model.getValueInRange(this._selection)||void 0,s=this._selection.startLineNumber!==this._selection.endLineNumber;if(!n&&this._overtypingCapturer){const c=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);c&&(n=c.value,s=c.multiline)}if(n&&s&&e.snippet){const c=this._model.getLineContent(this._selection.startLineNumber),d=yd(c,0,this._selection.startColumn-1);let f=d;e.snippet.walk(v=>v===e?!1:(v instanceof hv&&(f=yd(BL(v.value).pop())),!0));const m=vR(f,d);n=n.replace(/(\r\n|\r|\n)(.*)/g,(v,x,w)=>`${x}${f.substr(m)}${w}`)}return n}else{if(i==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(i==="TM_CURRENT_WORD"){const n=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return n&&n.word||void 0}else{if(i==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(i==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(i==="CURSOR_INDEX")return String(this._selectionIdx);if(i==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}}class Ext{constructor(e,i){this._labelService=e,this._model=i}resolve(e){const{name:i}=e;if(i==="TM_FILENAME")return qM(this._model.uri.fsPath);if(i==="TM_FILENAME_BASE"){const n=qM(this._model.uri.fsPath),s=n.lastIndexOf(".");return s<=0?n:n.slice(0,s)}else{if(i==="TM_DIRECTORY")return zkt(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(lwe(this._model.uri));if(i==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(i==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}class Ixt{constructor(e,i,n,s){this._readClipboardText=e,this._selectionIdx=i,this._selectionCount=n,this._spread=s}resolve(e){if(e.name!=="CLIPBOARD")return;const i=this._readClipboardText();if(i){if(this._spread){const n=i.split(/\r\n|\n|\r/).filter(s=>!Zkt(s));if(n.length===this._selectionCount)return n[this._selectionIdx]}return i}}}let _be=class{constructor(e,i,n){this._model=e,this._selection=i,this._languageConfigurationService=n}resolve(e){const{name:i}=e,n=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),s=this._languageConfigurationService.getLanguageConfiguration(n).comments;if(s){if(i==="LINE_COMMENT")return s.lineCommentToken||void 0;if(i==="BLOCK_COMMENT_START")return s.blockCommentStartToken||void 0;if(i==="BLOCK_COMMENT_END")return s.blockCommentEndToken||void 0}}};_be=Q4i([Z4i(2,rh)],_be);const cL=class cL{constructor(){this._date=new Date}resolve(e){const{name:i}=e;if(i==="CURRENT_YEAR")return String(this._date.getFullYear());if(i==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(i==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(i==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(i==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(i==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(i==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(i==="CURRENT_DAY_NAME")return cL.dayNames[this._date.getDay()];if(i==="CURRENT_DAY_NAME_SHORT")return cL.dayNamesShort[this._date.getDay()];if(i==="CURRENT_MONTH_NAME")return cL.monthNames[this._date.getMonth()];if(i==="CURRENT_MONTH_NAME_SHORT")return cL.monthNamesShort[this._date.getMonth()];if(i==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3));if(i==="CURRENT_TIMEZONE_OFFSET"){const n=this._date.getTimezoneOffset(),s=n>0?"-":"+",c=Math.trunc(Math.abs(n/60)),d=c<10?"0"+c:c,f=Math.abs(n)-c*60,m=f<10?"0"+f:f;return s+d+":"+m}}};cL.dayNames=[W("Sunday","Sunday"),W("Monday","Monday"),W("Tuesday","Tuesday"),W("Wednesday","Wednesday"),W("Thursday","Thursday"),W("Friday","Friday"),W("Saturday","Saturday")],cL.dayNamesShort=[W("SundayShort","Sun"),W("MondayShort","Mon"),W("TuesdayShort","Tue"),W("WednesdayShort","Wed"),W("ThursdayShort","Thu"),W("FridayShort","Fri"),W("SaturdayShort","Sat")],cL.monthNames=[W("January","January"),W("February","February"),W("March","March"),W("April","April"),W("May","May"),W("June","June"),W("July","July"),W("August","August"),W("September","September"),W("October","October"),W("November","November"),W("December","December")],cL.monthNamesShort=[W("JanuaryShort","Jan"),W("FebruaryShort","Feb"),W("MarchShort","Mar"),W("AprilShort","Apr"),W("MayShort","May"),W("JuneShort","Jun"),W("JulyShort","Jul"),W("AugustShort","Aug"),W("SeptemberShort","Sep"),W("OctoberShort","Oct"),W("NovemberShort","Nov"),W("DecemberShort","Dec")];let pbe=cL;class Nxt{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const i=U0i(this._workspaceService.getWorkspace());if(!j0i(i)){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(i);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(i)}}_resolveWorkspaceName(e){if(DVe(e))return qM(e.uri.path);let i=qM(e.configPath.path);return i.endsWith(EVe)&&(i=i.substr(0,i.length-EVe.length-1)),i}_resoveWorkspacePath(e){if(DVe(e))return kxt(e.uri.fsPath);const i=qM(e.configPath.path);let n=e.configPath.fsPath;return n.endsWith(i)&&(n=n.substr(0,n.length-i.length-1)),n?kxt(n):"/"}}class Lxt{resolve(e){const{name:i}=e;if(i==="RANDOM")return Math.random().toString().slice(-6);if(i==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(i==="UUID")return qwe()}}var Y4i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},e6i=function(l,e){return function(i,n){e(i,n,l)}},hE;const oT=class oT{constructor(e,i,n){this._editor=e,this._snippet=i,this._snippetLineLeadingWhitespace=n,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=Hyt(i.placeholders,dk.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(this._offset===-1)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations(i=>{for(const n of this._snippet.placeholders){const s=this._snippet.offset(n),c=this._snippet.fullLen(n),d=nt.fromPositions(e.getPositionAt(this._offset+s),e.getPositionAt(this._offset+s+c)),f=n.isFinalTabstop?oT._decor.inactiveFinal:oT._decor.inactive,m=i.addDecoration(d,f);this._placeholderDecorations.set(n,m)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const s=[];for(const c of this._placeholderGroups[this._placeholderGroupsIdx])if(c.transform){const d=this._placeholderDecorations.get(c),f=this._editor.getModel().getDecorationRange(d),m=this._editor.getModel().getValueInRange(f),v=c.transform.resolve(m).split(/\r\n|\r|\n/);for(let x=1;x<v.length;x++)v[x]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+v[x]);s.push(eh.replace(f,v.join(this._editor.getModel().getEOL())))}s.length>0&&this._editor.executeEdits("snippet.placeholderTransform",s)}let i=!1;e===!0&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,i=!0):e===!1&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,i=!0);const n=this._editor.getModel().changeDecorations(s=>{const c=new Set,d=[];for(const f of this._placeholderGroups[this._placeholderGroupsIdx]){const m=this._placeholderDecorations.get(f),v=this._editor.getModel().getDecorationRange(m);d.push(new Us(v.startLineNumber,v.startColumn,v.endLineNumber,v.endColumn)),i=i&&this._hasPlaceholderBeenCollapsed(f),s.changeDecorationOptions(m,f.isFinalTabstop?oT._decor.activeFinal:oT._decor.active),c.add(f);for(const x of this._snippet.enclosingPlaceholders(f)){const w=this._placeholderDecorations.get(x);s.changeDecorationOptions(w,x.isFinalTabstop?oT._decor.activeFinal:oT._decor.active),c.add(x)}}for(const[f,m]of this._placeholderDecorations)c.has(f)||s.changeDecorationOptions(m,f.isFinalTabstop?oT._decor.inactiveFinal:oT._decor.inactive);return d});return i?this.move(e):n??[]}_hasPlaceholderBeenCollapsed(e){let i=e;for(;i;){if(i instanceof dk){const n=this._placeholderDecorations.get(i);if(this._editor.getModel().getDecorationRange(n).isEmpty()&&i.toString().length>0)return!0}i=i.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(this._snippet.placeholders.length===0)return!0;if(this._snippet.placeholders.length===1){const[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){const e=new Map;for(const i of this._placeholderGroups){let n;for(const s of i){if(s.isFinalTabstop)break;n||(n=[],e.set(s.index,n));const c=this._placeholderDecorations.get(s),d=this._editor.getModel().getDecorationRange(c);if(!d){e.delete(s.index);break}n.push(d)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;const e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!(e!=null&&e.choice))return;const i=this._placeholderDecorations.get(e);if(!i)return;const n=this._editor.getModel().getDecorationRange(i);if(n)return{range:n,choice:e.choice}}get hasChoice(){let e=!1;return this._snippet.walk(i=>(e=i instanceof MJ,!e)),e}merge(e){const i=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(n=>{for(const s of this._placeholderGroups[this._placeholderGroupsIdx]){const c=e.shift();console.assert(c._offset!==-1),console.assert(!c._placeholderDecorations);const d=c._snippet.placeholderInfo.last.index;for(const m of c._snippet.placeholderInfo.all)m.isFinalTabstop?m.index=s.index+(d+1)/this._nestingLevel:m.index=s.index+m.index/this._nestingLevel;this._snippet.replace(s,c._snippet.children);const f=this._placeholderDecorations.get(s);n.removeDecoration(f),this._placeholderDecorations.delete(s);for(const m of c._snippet.placeholders){const v=c._snippet.offset(m),x=c._snippet.fullLen(m),w=nt.fromPositions(i.getPositionAt(c._offset+v),i.getPositionAt(c._offset+v+x)),I=n.addDecoration(w,oT._decor.inactive);this._placeholderDecorations.set(m,I)}}this._placeholderGroups=Hyt(this._snippet.placeholders,dk.compareByIndex)})}};oT._decor={active:qa.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:qa.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:qa.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:qa.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};let mbe=oT;const Pxt={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let gbe=hE=class{static adjustWhitespace(e,i,n,s,c){const d=e.getLineContent(i.lineNumber),f=yd(d,0,i.column-1);let m;return s.walk(v=>{if(!(v instanceof hv)||v.parent instanceof MJ||c&&!c.has(v))return!0;const x=v.value.split(/\r\n|\r|\n/);if(n){const I=s.offset(v);if(I===0)x[0]=e.normalizeIndentation(x[0]);else{m=m??s.toString();const P=m.charCodeAt(I-1);(P===10||P===13)&&(x[0]=e.normalizeIndentation(f+x[0]))}for(let P=1;P<x.length;P++)x[P]=e.normalizeIndentation(f+x[P])}const w=x.join(e.getEOL());return w!==v.value&&(v.parent.replace(v,[new hv(w)]),m=void 0),!0}),f}static adjustSelection(e,i,n,s){if(n!==0||s!==0){const{positionLineNumber:c,positionColumn:d}=i,f=d-n,m=d+s,v=e.validateRange({startLineNumber:c,startColumn:f,endLineNumber:c,endColumn:m});i=Us.createWithDirection(v.startLineNumber,v.startColumn,v.endLineNumber,v.endColumn,i.getDirection())}return i}static createEditsAndSnippetsFromSelections(e,i,n,s,c,d,f,m,v){const x=[],w=[];if(!e.hasModel())return{edits:x,snippets:w};const I=e.getModel(),P=e.invokeWithinContext(ye=>ye.get(LB)),O=e.invokeWithinContext(ye=>new Ext(ye.get(F$),I)),z=()=>f,J=I.getValueInRange(hE.adjustSelection(I,e.getSelection(),n,0)),Y=I.getValueInRange(hE.adjustSelection(I,e.getSelection(),0,s)),ae=I.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),me=e.getSelections().map((ye,Ce)=>({selection:ye,idx:Ce})).sort((ye,Ce)=>nt.compareRangesUsingStarts(ye.selection,Ce.selection));for(const{selection:ye,idx:Ce}of me){let Fe=hE.adjustSelection(I,ye,n,0),rt=hE.adjustSelection(I,ye,0,s);J!==I.getValueInRange(Fe)&&(Fe=ye),Y!==I.getValueInRange(rt)&&(rt=ye);const ct=ye.setStartPosition(Fe.startLineNumber,Fe.startColumn).setEndPosition(rt.endLineNumber,rt.endColumn),Mt=new WB().parse(i,!0,c),Yt=ct.getStartPosition(),Bi=hE.adjustWhitespace(I,Yt,d||Ce>0&&ae!==I.getLineFirstNonWhitespaceColumn(ye.positionLineNumber),Mt);Mt.resolveVariables(new Txt([O,new Ixt(z,Ce,me.length,e.getOption(79)==="spread"),new Dxt(I,ye,Ce,m),new _be(I,ye,v),new pbe,new Nxt(P),new Lxt])),x[Ce]=eh.replace(ct,Mt.toString()),x[Ce].identifier={major:Ce,minor:0},x[Ce]._isTracked=!0,w[Ce]=new mbe(e,Mt,Bi)}return{edits:x,snippets:w}}static createEditsAndSnippetsFromEdits(e,i,n,s,c,d,f){if(!e.hasModel()||i.length===0)return{edits:[],snippets:[]};const m=[],v=e.getModel(),x=new WB,w=new Vse,I=new Txt([e.invokeWithinContext(O=>new Ext(O.get(F$),v)),new Ixt(()=>c,0,e.getSelections().length,e.getOption(79)==="spread"),new Dxt(v,e.getSelection(),0,d),new _be(v,e.getSelection(),f),new pbe,new Nxt(e.invokeWithinContext(O=>O.get(LB))),new Lxt]);i=i.sort((O,z)=>nt.compareRangesUsingStarts(O.range,z.range));let P=0;for(let O=0;O<i.length;O++){const{range:z,template:J}=i[O];if(O>0){const Ce=i[O-1].range,Fe=nt.fromPositions(Ce.getEndPosition(),z.getStartPosition()),rt=new hv(v.getValueInRange(Fe));w.appendChild(rt),P+=rt.value.length}const Y=x.parseFragment(J,w);hE.adjustWhitespace(v,z.getStartPosition(),!0,w,new Set(Y)),w.resolveVariables(I);const ae=w.toString(),me=ae.slice(P);P=ae.length;const ye=eh.replace(z,me);ye.identifier={major:O,minor:0},ye._isTracked=!0,m.push(ye)}return x.ensureFinalTabstop(w,n,!0),{edits:m,snippets:[new mbe(e,w,"")]}}constructor(e,i,n=Pxt,s){this._editor=e,this._template=i,this._options=n,this._languageConfigurationService=s,this._templateMerges=[],this._snippets=[]}dispose(){vd(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:i}=typeof this._template=="string"?hE.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):hE.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=i,this._editor.executeEdits("snippet",e,n=>{const s=n.filter(c=>!!c.identifier);for(let c=0;c<i.length;c++)i[c].initialize(s[c].textChange);return this._snippets[0].hasPlaceholder?this._move(!0):s.map(c=>Us.fromPositions(c.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,i=Pxt){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:n,snippets:s}=hE.createEditsAndSnippetsFromSelections(this._editor,e,i.overwriteBefore,i.overwriteAfter,!0,i.adjustWhitespace,i.clipboardText,i.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",n,c=>{const d=c.filter(m=>!!m.identifier);for(let m=0;m<s.length;m++)s[m].initialize(d[m].textChange);const f=s[0].isTrivialSnippet;if(!f){for(const m of this._snippets)m.merge(s);console.assert(s.length===0)}return this._snippets[0].hasPlaceholder&&!f?this._move(void 0):d.map(m=>Us.fromPositions(m.range.getEndPosition()))})}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const i=[];for(const n of this._snippets){const s=n.move(e);i.push(...s)}return i}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length<this._snippets.length)return!1;const i=new Map;for(const n of this._snippets){const s=n.computePossibleSelections();if(i.size===0)for(const[c,d]of s){d.sort(nt.compareRangesUsingStarts);for(const f of e)if(d[0].containsRange(f)){i.set(c,[]);break}}if(i.size===0)return!1;i.forEach((c,d)=>{c.push(...s.get(d))})}e.sort(nt.compareRangesUsingStarts);for(const[n,s]of i){if(s.length!==e.length){i.delete(n);continue}s.sort(nt.compareRangesUsingStarts);for(let c=0;c<s.length;c++)if(!s[c].containsRange(e[c])){i.delete(n);continue}}return i.size>0}};gbe=hE=Y4i([e6i(3,rh)],gbe);var t6i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},z0e=function(l,e){return function(i,n){e(i,n,l)}},KU;const Axt={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};var bL;let kv=(bL=class{static get(e){return e.getContribution(KU.ID)}constructor(e,i,n,s,c){this._editor=e,this._logService=i,this._languageFeaturesService=n,this._languageConfigurationService=c,this._snippetListener=new wn,this._modelVersionId=-1,this._inSnippet=KU.InSnippetMode.bindTo(s),this._hasNextTabstop=KU.HasNextTabstop.bindTo(s),this._hasPrevTabstop=KU.HasPrevTabstop.bindTo(s)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(e=this._session)==null||e.dispose(),this._snippetListener.dispose()}insert(e,i){try{this._doInsert(e,typeof i>"u"?Axt:{...Axt,...i})}catch(n){this.cancel(),this._logService.error(n),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}_doInsert(e,i){var n;if(this._editor.hasModel()){if(this._snippetListener.clear(),i.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof e!="string"&&this.cancel(),this._session?(Fl(typeof e=="string"),this._session.merge(e,i)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new gbe(this._editor,e,i,this._languageConfigurationService),this._session.insert()),i.undoStopAfter&&this._editor.getModel().pushStackElement(),(n=this._session)!=null&&n.hasChoice){const s={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(x,w)=>{if(!this._session||x!==this._editor.getModel()||!pi.equals(this._editor.getPosition(),w))return;const{activeChoice:I}=this._session;if(!I||I.choice.options.length===0)return;const P=x.getValueInRange(I.range),O=!!I.choice.options.find(J=>J.value===P),z=[];for(let J=0;J<I.choice.options.length;J++){const Y=I.choice.options[J];z.push({kind:13,label:Y.value,insertText:Y.value,sortText:"a".repeat(J+1),range:I.range,filterText:O?`${P}_${Y.value}`:void 0,command:{id:"jumpToNextSnippetPlaceholder",title:W("next","Go to next placeholder...")}})}return{suggestions:z}}},c=this._editor.getModel();let d,f=!1;const m=()=>{d==null||d.dispose(),f=!1},v=()=>{f||(d=this._languageFeaturesService.completionProvider.register({language:c.getLanguageId(),pattern:c.uri.fsPath,scheme:c.uri.scheme,exclusive:!0},s),this._snippetListener.add(d),f=!0)};this._choiceCompletions={provider:s,enable:v,disable:m}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(s=>s.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState()))}}_updateState(){if(!(!this._session||!this._editor.hasModel())){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){var i;if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}const{activeChoice:e}=this._session;if(!e||!this._choiceCompletions){(i=this._choiceCompletions)==null||i.disable(),this._currentChoice=void 0;return}this._currentChoice!==e.choice&&(this._currentChoice=e.choice,this._choiceCompletions.enable(),queueMicrotask(()=>{X4i(this._editor,this._choiceCompletions.provider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var i;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,(i=this._session)==null||i.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){var e;(e=this._session)==null||e.prev(),this._updateState()}next(){var e;(e=this._session)==null||e.next(),this._updateState()}isInSnippet(){return!!this._inSnippet.get()}},KU=bL,bL.ID="snippetController2",bL.InSnippetMode=new rs("inSnippetMode",!1,W("inSnippetMode","Whether the editor in current in snippet mode")),bL.HasNextTabstop=new rs("hasNextTabstop",!1,W("hasNextTabstop","Whether there is a next tab stop when in snippet mode")),bL.HasPrevTabstop=new rs("hasPrevTabstop",!1,W("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode")),bL);kv=KU=t6i([z0e(1,N0),z0e(2,Ts),z0e(3,Ko),z0e(4,rh)],kv);Cl(kv.ID,kv,4);const ixe=tm.bindToContribution(kv.get);$r(new ixe({id:"jumpToNextSnippetPlaceholder",precondition:kn.and(kv.InSnippetMode,kv.HasNextTabstop),handler:l=>l.next(),kbOpts:{weight:130,kbExpr:Tt.textInputFocus,primary:2}}));$r(new ixe({id:"jumpToPrevSnippetPlaceholder",precondition:kn.and(kv.InSnippetMode,kv.HasPrevTabstop),handler:l=>l.prev(),kbOpts:{weight:130,kbExpr:Tt.textInputFocus,primary:1026}}));$r(new ixe({id:"leaveSnippet",precondition:kv.InSnippetMode,handler:l=>l.cancel(!0),kbOpts:{weight:130,kbExpr:Tt.textInputFocus,primary:9,secondary:[1033]}}));$r(new ixe({id:"acceptSnippet",precondition:kv.InSnippetMode,handler:l=>l.finish()}));var i6i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},H9e=function(l,e){return function(i,n){e(i,n,l)}};let Xze=class extends xi{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(e,i,n,s,c,d,f,m,v,x,w,I){super(),this.textModel=e,this.selectedSuggestItem=i,this._textModelVersionId=n,this._positions=s,this._debounceValue=c,this._suggestPreviewEnabled=d,this._suggestPreviewMode=f,this._inlineSuggestMode=m,this._enabled=v,this._instantiationService=x,this._commandService=w,this._languageConfigurationService=I,this._source=this._register(this._instantiationService.createInstance(Kze,this.textModel,this._textModelVersionId,this._debounceValue)),this._isActive=bc(this,!1),this._forceUpdateExplicitlySignal=xJ(this),this._selectedInlineCompletionId=bc(this,void 0),this._primaryPosition=ro(this,O=>this._positions.read(O)[0]??new pi(1,1)),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([C4.Redo,C4.Undo,C4.AcceptWord]),this._fetchInlineCompletionsPromise=wDt({owner:this,createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:OE.Automatic}),handleChange:(O,z)=>(O.didChange(this._textModelVersionId)&&this._preserveCurrentCompletionReasons.has(this._getReason(O.change))?z.preserveCurrentCompletion=!0:O.didChange(this._forceUpdateExplicitlySignal)&&(z.inlineCompletionTriggerKind=OE.Explicit),!0)},(O,z)=>{if(this._forceUpdateExplicitlySignal.read(O),!(this._enabled.read(O)&&this.selectedSuggestItem.read(O)||this._isActive.read(O))){this._source.cancelUpdate();return}this._textModelVersionId.read(O);const Y=this._source.suggestWidgetInlineCompletions.get(),ae=this.selectedSuggestItem.read(O);if(Y&&!ae){const rt=this._source.inlineCompletions.get();th(ct=>{(!rt||Y.request.versionId>rt.request.versionId)&&this._source.inlineCompletions.set(Y.clone(),ct),this._source.clearSuggestWidgetInlineCompletions(ct)})}const me=this._primaryPosition.read(O),ye={triggerKind:z.inlineCompletionTriggerKind,selectedSuggestionInfo:ae==null?void 0:ae.toSelectedSuggestionInfo()},Ce=this.selectedInlineCompletion.get(),Fe=z.preserveCurrentCompletion||Ce!=null&&Ce.forwardStable?Ce:void 0;return this._source.fetch(me,ye,Fe)}),this._filteredInlineCompletionItems=mw({owner:this,equalsFn:Fye()},O=>{const z=this._source.inlineCompletions.read(O);if(!z)return[];const J=this._primaryPosition.read(O);return z.inlineCompletions.filter(ae=>ae.isVisible(this.textModel,J,O))}),this.selectedInlineCompletionIndex=ro(this,O=>{const z=this._selectedInlineCompletionId.read(O),J=this._filteredInlineCompletionItems.read(O),Y=this._selectedInlineCompletionId===void 0?-1:J.findIndex(ae=>ae.semanticId===z);return Y===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):Y}),this.selectedInlineCompletion=ro(this,O=>{const z=this._filteredInlineCompletionItems.read(O),J=this.selectedInlineCompletionIndex.read(O);return z[J]}),this.activeCommands=mw({owner:this,equalsFn:Fye()},O=>{var z;return((z=this.selectedInlineCompletion.read(O))==null?void 0:z.inlineCompletion.source.inlineCompletions.commands)??[]}),this.lastTriggerKind=this._source.inlineCompletions.map(this,O=>O==null?void 0:O.request.context.triggerKind),this.inlineCompletionsCount=ro(this,O=>{if(this.lastTriggerKind.read(O)===OE.Explicit)return this._filteredInlineCompletionItems.read(O).length}),this.state=mw({owner:this,equalsFn:(O,z)=>!O||!z?O===z:pxt(O.ghostTexts,z.ghostTexts)&&O.inlineCompletion===z.inlineCompletion&&O.suggestItem===z.suggestItem},O=>{const z=this.textModel,J=this.selectedSuggestItem.read(O);if(J){const Y=w9(J.toSingleTextEdit(),z),ae=this._computeAugmentation(Y,O);if(!this._suggestPreviewEnabled.read(O)&&!ae)return;const ye=(ae==null?void 0:ae.edit)??Y,Ce=ae?ae.edit.text.length-Y.text.length:0,Fe=this._suggestPreviewMode.read(O),rt=this._positions.read(O),ct=[ye,...j9e(this.textModel,rt,ye)],Mt=ct.map((Bi,$i)=>bxt(Bi,z,Fe,rt[$i],Ce)).filter(xL),Yt=Mt[0]??new qre(ye.range.endLineNumber,[]);return{edits:ct,primaryGhostText:Yt,ghostTexts:Mt,inlineCompletion:ae==null?void 0:ae.completion,suggestItem:J}}else{if(!this._isActive.read(O))return;const Y=this.selectedInlineCompletion.read(O);if(!Y)return;const ae=Y.toSingleTextEdit(O),me=this._inlineSuggestMode.read(O),ye=this._positions.read(O),Ce=[ae,...j9e(this.textModel,ye,ae)],Fe=Ce.map((rt,ct)=>bxt(rt,z,me,ye[ct],0)).filter(xL);return Fe[0]?{edits:Ce,primaryGhostText:Fe[0],ghostTexts:Fe,inlineCompletion:Y,suggestItem:void 0}:void 0}}),this.ghostTexts=mw({owner:this,equalsFn:pxt},O=>{const z=this.state.read(O);if(z)return z.ghostTexts}),this.primaryGhostText=mw({owner:this,equalsFn:aPt},O=>{const z=this.state.read(O);if(z)return z==null?void 0:z.primaryGhostText}),this._register(kJ(this._fetchInlineCompletionsPromise));let P;this._register(ba(O=>{var Y,ae;const z=this.state.read(O),J=z==null?void 0:z.inlineCompletion;if((J==null?void 0:J.semanticId)!==(P==null?void 0:P.semanticId)&&(P=J,J)){const me=J.inlineCompletion,ye=me.source;(ae=(Y=ye.provider).handleItemDidShow)==null||ae.call(Y,ye.inlineCompletions,me.sourceInlineCompletion,me.insertText)}}))}_getReason(e){return e!=null&&e.isUndoing?C4.Undo:e!=null&&e.isRedoing?C4.Redo:this.isAcceptingPartially?C4.AcceptWord:C4.Other}async trigger(e){this._isActive.set(!0,e),await this._fetchInlineCompletionsPromise.get()}async triggerExplicitly(e){PB(e,i=>{this._isActive.set(!0,i),this._forceUpdateExplicitlySignal.trigger(i)}),await this._fetchInlineCompletionsPromise.get()}stop(e){PB(e,i=>{this._isActive.set(!1,i),this._source.clear(i)})}_computeAugmentation(e,i){const n=this.textModel,s=this._source.suggestWidgetInlineCompletions.read(i),c=s?s.inlineCompletions:[this.selectedInlineCompletion.read(i)].filter(xL);return Shi(c,f=>{let m=f.toSingleTextEdit(i);return m=w9(m,n,nt.fromPositions(m.range.getStartPosition(),e.range.getEndPosition())),dPt(m,e)?{completion:f,edit:m}:void 0})}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();const i=this._filteredInlineCompletionItems.get()||[];if(i.length>0){const n=(this.selectedInlineCompletionIndex.get()+e+i.length)%i.length;this._selectedInlineCompletionId.set(i[n].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}async accept(e){var s;if(e.getModel()!==this.textModel)throw new tu;const i=this.state.get();if(!i||i.primaryGhostText.isEmpty()||!i.inlineCompletion)return;const n=i.inlineCompletion.toInlineCompletion(void 0);if(n.command&&n.source.addRef(),e.pushUndoStop(),n.snippetInfo)e.executeEdits("inlineSuggestion.accept",[eh.replace(n.range,""),...n.additionalTextEdits]),e.setPosition(n.snippetInfo.range.getStartPosition(),"inlineCompletionAccept"),(s=kv.get(e))==null||s.insert(n.snippetInfo.snippet,{undoStopBefore:!1});else{const c=i.edits,d=Oxt(c).map(f=>Us.fromPositions(f));e.executeEdits("inlineSuggestion.accept",[...c.map(f=>eh.replace(f.range,f.text)),...n.additionalTextEdits]),e.setSelections(d,"inlineCompletionAccept")}this.stop(),n.command&&(await this._commandService.executeCommand(n.command.id,...n.command.arguments||[]).then(void 0,t_),n.source.removeRef())}async acceptNextWord(e){await this._acceptNext(e,(i,n)=>{const s=this.textModel.getLanguageIdAtPosition(i.lineNumber,i.column),c=this._languageConfigurationService.getLanguageConfiguration(s),d=new RegExp(c.wordDefinition.source,c.wordDefinition.flags.replace("g","")),f=n.match(d);let m=0;f&&f.index!==void 0?f.index===0?m=f[0].length:m=f.index:m=n.length;const x=/\s+/g.exec(n);return x&&x.index!==void 0&&x.index+x[0].length<m&&(m=x.index+x[0].length),m},0)}async acceptNextLine(e){await this._acceptNext(e,(i,n)=>{const s=n.match(/\n/);return s&&s.index!==void 0?s.index+1:n.length},1)}async _acceptNext(e,i,n){if(e.getModel()!==this.textModel)throw new tu;const s=this.state.get();if(!s||s.primaryGhostText.isEmpty()||!s.inlineCompletion)return;const c=s.primaryGhostText,d=s.inlineCompletion.toInlineCompletion(void 0);if(d.snippetInfo||d.filterText!==d.insertText){await this.accept(e);return}const f=c.parts[0],m=new pi(c.lineNumber,f.column),v=f.text,x=i(m,v);if(x===v.length&&c.parts.length===1){this.accept(e);return}const w=v.substring(0,x),I=this._positions.get(),P=I[0];d.source.addRef();try{this._isAcceptingPartially=!0;try{e.pushUndoStop();const O=nt.fromPositions(P,m),z=e.getModel().getValueInRange(O)+w,J=new IL(O,z),Y=[J,...j9e(this.textModel,I,J)],ae=Oxt(Y).map(me=>Us.fromPositions(me));e.executeEdits("inlineSuggestion.accept",Y.map(me=>eh.replace(me.range,me.text))),e.setSelections(ae,"inlineCompletionPartialAccept"),e.revealPositionInCenterIfOutsideViewport(e.getPosition(),1)}finally{this._isAcceptingPartially=!1}if(d.source.provider.handlePartialAccept){const O=nt.fromPositions(d.range.getStartPosition(),ST.ofText(w).addToPosition(m)),z=e.getModel().getValueInRange(O,1);d.source.provider.handlePartialAccept(d.source.inlineCompletions,d.sourceInlineCompletion,z.length,{kind:n})}}finally{d.source.removeRef()}}handleSuggestAccepted(e){var c,d;const i=w9(e.toSingleTextEdit(),this.textModel),n=this._computeAugmentation(i,void 0);if(!n)return;const s=n.completion.inlineCompletion;(d=(c=s.source.provider).handlePartialAccept)==null||d.call(c,s.source.inlineCompletions,s.sourceInlineCompletion,i.text.length,{kind:2})}};Xze=i6i([H9e(9,ho),H9e(10,qd),H9e(11,rh)],Xze);var C4;(function(l){l[l.Undo=0]="Undo",l[l.Redo=1]="Redo",l[l.AcceptWord=2]="AcceptWord",l[l.Other=3]="Other"})(C4||(C4={}));function j9e(l,e,i){if(e.length===1)return[];const n=e[0],s=e.slice(1),c=i.range.getStartPosition(),d=i.range.getEndPosition(),f=l.getValueInRange(nt.fromPositions(n,d)),m=mxt(n,c);if(m.lineNumber<1)return Pa(new tu(`positionWithinTextEdit line number should be bigger than 0.
+ Invalid subtraction between ${n.toString()} and ${c.toString()}`)),[];const v=n6i(i.text,m);return s.map(x=>{const w=E4i(mxt(x,c),d),I=l.getValueInRange(nt.fromPositions(x,w)),P=vR(f,I),O=nt.fromPositions(x,x.delta(0,P));return new IL(O,v)})}function n6i(l,e){let i="";const n=Kli(l);for(let s=e.lineNumber-1;s<n.length;s++)i+=n[s].substring(s===e.lineNumber-1?e.column-1:0);return i}function Oxt(l){const e=z1e.createSortPermutation(l,yv(c=>c.range,nt.compareRangesUsingStarts)),n=new w$e(e.apply(l)).getNewRanges();return e.inverse().apply(n).map(c=>c.getEndPosition())}var r6i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Mxt=function(l,e){return function(i,n){e(i,n,l)}},hie;class aKe{constructor(e){this.name=e}select(e,i,n){if(n.length===0)return 0;const s=n[0].score[0];for(let c=0;c<n.length;c++){const{score:d,completion:f}=n[c];if(d[0]!==s)break;if(f.preselect)return c}return 0}}class Rxt extends aKe{constructor(){super("first")}memorize(e,i,n){}toJSON(){}fromJSON(){}}class s6i extends aKe{constructor(){super("recentlyUsed"),this._cache=new VL(300,.66),this._seq=0}memorize(e,i,n){const s=`${e.getLanguageId()}/${n.textLabel}`;this._cache.set(s,{touch:this._seq++,type:n.completion.kind,insertText:n.completion.insertText})}select(e,i,n){if(n.length===0)return 0;const s=e.getLineContent(i.lineNumber).substr(i.column-10,i.column-1);if(/\s$/.test(s))return super.select(e,i,n);const c=n[0].score[0];let d=-1,f=-1,m=-1;for(let v=0;v<n.length&&n[v].score[0]===c;v++){const x=`${e.getLanguageId()}/${n[v].textLabel}`,w=this._cache.peek(x);if(w&&w.touch>m&&w.type===n[v].completion.kind&&w.insertText===n[v].completion.insertText&&(m=w.touch,f=v),n[v].completion.preselect&&d===-1)return d=v}return f!==-1?f:d!==-1?d:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();const i=0;for(const[n,s]of e)s.touch=i,s.type=typeof s.type=="number"?s.type:Ane.fromString(s.type),this._cache.set(n,s);this._seq=this._cache.size}}class o6i extends aKe{constructor(){super("recentlyUsedByPrefix"),this._trie=Jq.forStrings(),this._seq=0}memorize(e,i,n){const{word:s}=e.getWordUntilPosition(i),c=`${e.getLanguageId()}/${s}`;this._trie.set(c,{type:n.completion.kind,insertText:n.completion.insertText,touch:this._seq++})}select(e,i,n){const{word:s}=e.getWordUntilPosition(i);if(!s)return super.select(e,i,n);const c=`${e.getLanguageId()}/${s}`;let d=this._trie.get(c);if(d||(d=this._trie.findSubstr(c)),d)for(let f=0;f<n.length;f++){const{kind:m,insertText:v}=n[f].completion;if(m===d.type&&v===d.insertText)return f}return super.select(e,i,n)}toJSON(){const e=[];return this._trie.forEach((i,n)=>e.push([n,i])),e.sort((i,n)=>-(i[1].touch-n[1].touch)).forEach((i,n)=>i[1].touch=n),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[i,n]of e)n.type=typeof n.type=="number"?n.type:Ane.fromString(n.type),this._trie.set(i,n)}}}var aR;let Qze=(aR=class{constructor(e,i){this._storageService=e,this._configService=i,this._disposables=new wn,this._persistSoon=new qu(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(n=>{n.reason===cre.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,i,n){this._withStrategy(e,i).memorize(e,i,n),this._persistSoon.schedule()}select(e,i,n){return this._withStrategy(e,i).select(e,i,n)}_withStrategy(e,i){var s;const n=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(i.lineNumber,i.column),resource:e.uri});if(((s=this._strategy)==null?void 0:s.name)!==n){this._saveState();const c=hie._strategyCtors.get(n)||Rxt;this._strategy=new c;try{const f=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,m=this._storageService.get(`${hie._storagePrefix}/${n}`,f);m&&this._strategy.fromJSON(JSON.parse(m))}catch{}}return this._strategy}_saveState(){if(this._strategy){const i=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,n=JSON.stringify(this._strategy);this._storageService.store(`${hie._storagePrefix}/${this._strategy.name}`,n,i,1)}}},hie=aR,aR._strategyCtors=new Map([["recentlyUsedByPrefix",o6i],["recentlyUsed",s6i],["first",Rxt]]),aR._storagePrefix="suggest/memories",aR);Qze=hie=r6i([Mxt(0,ET),Mxt(1,Cc)],Qze);const nxe=jc("ISuggestMemories");nl(nxe,Qze,1);var a6i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},c6i=function(l,e){return function(i,n){e(i,n,l)}},Zze,Y9;let ybe=(Y9=class{constructor(e,i){this._editor=e,this._enabled=!1,this._ckAtEnd=Zze.AtEnd.bindTo(i),this._configListener=this._editor.onDidChangeConfiguration(n=>n.hasChanged(124)&&this._update()),this._update()}dispose(){var e;this._configListener.dispose(),(e=this._selectionListener)==null||e.dispose(),this._ckAtEnd.reset()}_update(){const e=this._editor.getOption(124)==="on";if(this._enabled!==e)if(this._enabled=e,this._enabled){const i=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const n=this._editor.getModel(),s=this._editor.getSelection(),c=n.getWordAtPosition(s.getStartPosition());if(!c){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(c.endColumn===s.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(i),i()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}},Zze=Y9,Y9.AtEnd=new rs("atEndOfWord",!1),Y9);ybe=Zze=a6i([c6i(1,Ko)],ybe);var l6i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},u6i=function(l,e){return function(i,n){e(i,n,l)}},_ie,eB;let rJ=(eB=class{constructor(e,i){this._editor=e,this._index=0,this._ckOtherSuggestions=_ie.OtherSuggestions.bindTo(i)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),(e=this._listener)==null||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:i},n){if(e.items.length===0){this.reset();return}if(_ie._moveIndex(!0,e,i)===i){this.reset();return}this._acceptNext=n,this._model=e,this._index=i,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(e,i,n){let s=n;for(let c=i.items.length;c>0&&(s=(s+i.items.length+(e?1:-1))%i.items.length,!(s===n||!i.items[s].completion.additionalTextEdits));c--);return s}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=_ie._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}},_ie=eB,eB.OtherSuggestions=new rs("hasOtherSuggestions",!1),eB);rJ=_ie=l6i([u6i(1,Ko)],rJ);class d6i{constructor(e,i,n,s){this._disposables=new wn,this._disposables.add(n.onDidSuggest(c=>{c.completionModel.items.length===0&&this.reset()})),this._disposables.add(n.onDidCancel(c=>{this.reset()})),this._disposables.add(i.onDidShow(()=>this._onItem(i.getFocusedItem()))),this._disposables.add(i.onDidFocus(this._onItem,this)),this._disposables.add(i.onDidHide(this.reset,this)),this._disposables.add(e.onWillType(c=>{if(this._active&&!i.isFrozen()&&n.state!==0){const d=c.charCodeAt(c.length-1);this._active.acceptCharacters.has(d)&&e.getOption(0)&&s(this._active.item)}}))}_onItem(e){if(!e||!ky(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;const i=new pye;for(const n of e.item.completion.commitCharacters)n.length>0&&i.add(n.charCodeAt(0));this._active={acceptCharacters:i,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}const ck=class ck{async provideSelectionRanges(e,i){const n=[];for(const s of i){const c=[];n.push(c);const d=new Map;await new Promise(f=>ck._bracketsRightYield(f,0,e,s,d)),await new Promise(f=>ck._bracketsLeftYield(f,0,e,s,d,c))}return n}static _bracketsRightYield(e,i,n,s,c){const d=new Map,f=Date.now();for(;;){if(i>=ck._maxRounds){e();break}if(!s){e();break}const m=n.bracketPairs.findNextBracket(s);if(!m){e();break}if(Date.now()-f>ck._maxDuration){setTimeout(()=>ck._bracketsRightYield(e,i+1,n,s,c));break}if(m.bracketInfo.isOpeningBracket){const x=m.bracketInfo.bracketText,w=d.has(x)?d.get(x):0;d.set(x,w+1)}else{const x=m.bracketInfo.getOpeningBrackets()[0].bracketText;let w=d.has(x)?d.get(x):0;if(w-=1,d.set(x,Math.max(0,w)),w<0){let I=c.get(x);I||(I=new _v,c.set(x,I)),I.push(m.range)}}s=m.range.getEndPosition()}}static _bracketsLeftYield(e,i,n,s,c,d){const f=new Map,m=Date.now();for(;;){if(i>=ck._maxRounds&&c.size===0){e();break}if(!s){e();break}const v=n.bracketPairs.findPrevBracket(s);if(!v){e();break}if(Date.now()-m>ck._maxDuration){setTimeout(()=>ck._bracketsLeftYield(e,i+1,n,s,c,d));break}if(v.bracketInfo.isOpeningBracket){const w=v.bracketInfo.bracketText;let I=f.has(w)?f.get(w):0;if(I-=1,f.set(w,Math.max(0,I)),I<0){const P=c.get(w);if(P){const O=P.shift();P.size===0&&c.delete(w);const z=nt.fromPositions(v.range.getEndPosition(),O.getStartPosition()),J=nt.fromPositions(v.range.getStartPosition(),O.getEndPosition());d.push({range:z}),d.push({range:J}),ck._addBracketLeading(n,J,d)}}}else{const w=v.bracketInfo.getOpeningBrackets()[0].bracketText,I=f.has(w)?f.get(w):0;f.set(w,I+1)}s=v.range.getStartPosition()}}static _addBracketLeading(e,i,n){if(i.startLineNumber===i.endLineNumber)return;const s=i.startLineNumber,c=e.getLineFirstNonWhitespaceColumn(s);c!==0&&c!==i.startColumn&&(n.push({range:nt.fromPositions(new pi(s,c),i.getEndPosition())}),n.push({range:nt.fromPositions(new pi(s,1),i.getEndPosition())}));const d=s-1;if(d>0){const f=e.getLineFirstNonWhitespaceColumn(d);f===i.startColumn&&f!==e.getLineLastNonWhitespaceColumn(d)&&(n.push({range:nt.fromPositions(new pi(d,f),i.getEndPosition())}),n.push({range:nt.fromPositions(new pi(d,1),i.getEndPosition())}))}}};ck._maxDuration=30,ck._maxRounds=2;let vbe=ck;const lL=class lL{static async create(e,i){if(!i.getOption(119).localityBonus||!i.hasModel())return lL.None;const n=i.getModel(),s=i.getPosition();if(!e.canComputeWordRanges(n.uri))return lL.None;const[c]=await new vbe().provideSelectionRanges(n,[s]);if(c.length===0)return lL.None;const d=await e.computeWordRanges(n.uri,c[0].range);if(!d)return lL.None;const f=n.getWordUntilPosition(s);return delete d[f.word],new class extends lL{distance(m,v){if(!s.equals(i.getPosition()))return 0;if(v.kind===17)return 2<<20;const x=typeof v.label=="string"?v.label:v.label.label,w=d[x];if(ykt(w))return 2<<20;const I=Dne(w,nt.fromPositions(m),nt.compareRangesUsingStarts),P=I>=0?w[I]:w[Math.max(0,~I-1)];let O=c.length;for(const z of c){if(!nt.containsRange(z.range,P))break;O-=1}return O}}}};lL.None=new class extends lL{distance(){return 0}};let bbe=lL,Fxt=class{constructor(e,i){this.leadingLineContent=e,this.characterCountDelta=i}};class EM{constructor(e,i,n,s,c,d,f=tre.default,m=void 0){this.clipboardText=m,this._snippetCompareFn=EM._compareCompletionItems,this._items=e,this._column=i,this._wordDistance=s,this._options=c,this._refilterKind=1,this._lineContext=n,this._fuzzyScoreOptions=f,d==="top"?this._snippetCompareFn=EM._compareCompletionItemsSnippetsUp:d==="bottom"&&(this._snippetCompareFn=EM._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){(this._lineContext.leadingLineContent!==e.leadingLineContent||this._lineContext.characterCountDelta!==e.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta<e.characterCountDelta&&this._filteredItems?2:1,this._lineContext=e)}get items(){return this._ensureCachedState(),this._filteredItems}getItemsByProvider(){return this._ensureCachedState(),this._itemsByProvider}getIncompleteProvider(){this._ensureCachedState();const e=new Set;for(const[i,n]of this.getItemsByProvider())n.length>0&&n[0].container.incomplete&&e.add(i);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const e=[],{leadingLineContent:i,characterCountDelta:n}=this._lineContext;let s="",c="";const d=this._refilterKind===1?this._items:this._filteredItems,f=[],m=!this._options.filterGraceful||d.length>2e3?NB:hgi;for(let v=0;v<d.length;v++){const x=d[v];if(x.isInvalid)continue;const w=this._itemsByProvider.get(x.provider);w?w.push(x):this._itemsByProvider.set(x.provider,[x]);const I=x.position.column-x.editStart.column,P=I+n-(x.position.column-this._column);if(s.length!==P&&(s=P===0?"":i.slice(-P),c=s.toLowerCase()),x.word=s,P===0)x.score=BE.Default;else{let O=0;for(;O<I;){const z=s.charCodeAt(O);if(z===32||z===9)O+=1;else break}if(O>=P)x.score=BE.Default;else if(typeof x.completion.filterText=="string"){const z=m(s,c,O,x.completion.filterText,x.filterTextLow,0,this._fuzzyScoreOptions);if(!z)continue;pWe(x.completion.filterText,x.textLabel)===0?x.score=z:(x.score=lgi(s,c,O,x.textLabel,x.labelLow,0),x.score[0]=z[0])}else{const z=m(s,c,O,x.textLabel,x.labelLow,0,this._fuzzyScoreOptions);if(!z)continue;x.score=z}}x.idx=v,x.distance=this._wordDistance.distance(x.position,x.completion),f.push(x),e.push(x.textLabel.length)}this._filteredItems=f.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?oBe(e.length-.85,e,(v,x)=>v-x):0}}static _compareCompletionItems(e,i){return e.score[0]>i.score[0]?-1:e.score[0]<i.score[0]?1:e.distance<i.distance?-1:e.distance>i.distance?1:e.idx<i.idx?-1:e.idx>i.idx?1:0}static _compareCompletionItemsSnippetsDown(e,i){if(e.completion.kind!==i.completion.kind){if(e.completion.kind===27)return 1;if(i.completion.kind===27)return-1}return EM._compareCompletionItems(e,i)}static _compareCompletionItemsSnippetsUp(e,i){if(e.completion.kind!==i.completion.kind){if(e.completion.kind===27)return-1;if(i.completion.kind===27)return 1}return EM._compareCompletionItems(e,i)}}var f6i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},oM=function(l,e){return function(i,n){e(i,n,l)}},Yze;class wF{static shouldAutoTrigger(e){if(!e.hasModel())return!1;const i=e.getModel(),n=e.getPosition();i.tokenization.tokenizeIfCheap(n.lineNumber);const s=i.getWordAtPosition(n);return!(!s||s.endColumn!==n.column&&s.startColumn+1!==n.column||!isNaN(Number(s.word)))}constructor(e,i,n){this.leadingLineContent=e.getLineContent(i.lineNumber).substr(0,i.column-1),this.leadingWord=e.getWordUntilPosition(i),this.lineNumber=i.lineNumber,this.column=i.column,this.triggerOptions=n}}function h6i(l,e,i){if(!e.getContextKeyValue(XC.inlineSuggestionVisible.key))return!0;const n=e.getContextKeyValue(XC.suppressSuggestions.key);return n!==void 0?!n:!l.getOption(62).suppressSuggestions}function _6i(l,e,i){if(!e.getContextKeyValue("inlineSuggestionVisible"))return!0;const n=e.getContextKeyValue(XC.suppressSuggestions.key);return n!==void 0?!n:!l.getOption(62).suppressSuggestions}let Cbe=Yze=class{constructor(e,i,n,s,c,d,f,m,v){this._editor=e,this._editorWorkerService=i,this._clipboardService=n,this._telemetryService=s,this._logService=c,this._contextKeyService=d,this._configurationService=f,this._languageFeaturesService=m,this._envService=v,this._toDispose=new wn,this._triggerCharacterListener=new wn,this._triggerQuickSuggest=new TT,this._triggerState=void 0,this._completionDisposables=new wn,this._onDidCancel=new gi,this._onDidTrigger=new gi,this._onDidSuggest=new gi,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new Us(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters()})),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let x=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{x=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{x=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(w=>{x||this._onCursorChange(w)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!x&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){vd(this._triggerCharacterListener),vd([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(92)||!this._editor.hasModel()||!this._editor.getOption(122))return;const e=new Map;for(const n of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const s of n.triggerCharacters||[]){let c=e.get(s);c||(c=new Set,e.set(s,c)),c.add(n)}const i=n=>{var d;if(!_6i(this._editor,this._contextKeyService,this._configurationService)||wF.shouldAutoTrigger(this._editor))return;if(!n){const f=this._editor.getPosition();n=this._editor.getModel().getLineContent(f.lineNumber).substr(0,f.column-1)}let s="";wB(n.charCodeAt(n.length-1))?Pm(n.charCodeAt(n.length-2))&&(s=n.substr(n.length-2)):s=n.charAt(n.length-1);const c=e.get(s);if(c){const f=new Map;if(this._completionModel)for(const[m,v]of this._completionModel.getItemsByProvider())c.has(m)||f.set(m,v);this.trigger({auto:!0,triggerKind:1,triggerCharacter:s,retrigger:!!this._completionModel,clipboardText:(d=this._completionModel)==null?void 0:d.clipboardText,completionOptions:{providerFilter:c,providerItemsToReuse:f}})}};this._triggerCharacterListener.add(this._editor.onDidType(i)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>i()))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){var i;this._triggerState!==void 0&&(this._triggerQuickSuggest.cancel(),(i=this._requestToken)==null||i.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._triggerState!==void 0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._triggerState.auto,retrigger:!0}))}_onCursorChange(e){if(!this._editor.hasModel())return;const i=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||e.reason!==0&&e.reason!==3||e.source!=="keyboard"&&e.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&e.reason===0?(i.containsRange(this._currentSelection)||i.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&e.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var e;bq.isAllOff(this._editor.getOption(90))||this._editor.getOption(119).snippetsPreventQuickSuggestions&&((e=kv.get(this._editor))!=null&&e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!wF.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const i=this._editor.getModel(),n=this._editor.getPosition(),s=this._editor.getOption(90);if(!bq.isAllOff(s)){if(!bq.isAllOn(s)){i.tokenization.tokenizeIfCheap(n.lineNumber);const c=i.tokenization.getLineTokens(n.lineNumber),d=c.getStandardTokenType(c.findTokenIndexAtOffset(Math.max(n.column-1-1,0)));if(bq.valueFor(s,d)!=="on")return}h6i(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(i)&&this.trigger({auto:!0})}},this._editor.getOption(91)))}_refilterCompletionItems(){Fl(this._editor.hasModel()),Fl(this._triggerState!==void 0);const e=this._editor.getModel(),i=this._editor.getPosition(),n=new wF(e,i,{...this._triggerState,refilter:!0});this._onNewContext(n)}trigger(e){var I,P,O;if(!this._editor.hasModel())return;const i=this._editor.getModel(),n=new wF(i,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:e.shy??!1,position:this._editor.getPosition()}),this._context=n;let s={triggerKind:e.triggerKind??0};e.triggerCharacter&&(s={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new ih;const c=this._editor.getOption(113);let d=1;switch(c){case"top":d=0;break;case"bottom":d=2;break}const{itemKind:f,showDeprecated:m}=Yze.createSuggestFilter(this._editor),v=new $re(d,((I=e.completionOptions)==null?void 0:I.kindFilter)??f,(P=e.completionOptions)==null?void 0:P.providerFilter,(O=e.completionOptions)==null?void 0:O.providerItemsToReuse,m),x=bbe.create(this._editorWorkerService,this._editor),w=sKe(this._languageFeaturesService.completionProvider,i,this._editor.getPosition(),v,s,this._requestToken.token);Promise.all([w,x]).then(async([z,J])=>{var Ce;if((Ce=this._requestToken)==null||Ce.dispose(),!this._editor.hasModel())return;let Y=e==null?void 0:e.clipboardText;if(!Y&&z.needsClipboard&&(Y=await this._clipboardService.readText()),this._triggerState===void 0)return;const ae=this._editor.getModel(),me=new wF(ae,this._editor.getPosition(),e),ye={...tre.default,firstMatchCanBeWeak:!this._editor.getOption(119).matchOnWordStartOnly};if(this._completionModel=new EM(z.items,this._context.column,{leadingLineContent:me.leadingLineContent,characterCountDelta:me.column-this._context.column},J,this._editor.getOption(119),this._editor.getOption(113),ye,Y),this._completionDisposables.add(z.disposable),this._onNewContext(me),this._reportDurationsTelemetry(z.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(const Fe of z.items)Fe.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${Fe.provider._debugDisplayName}`,Fe.completion)}).catch(Pa)}_reportDurationsTelemetry(e){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)})}static createSuggestFilter(e){const i=new Set;e.getOption(113)==="none"&&i.add(27);const s=e.getOption(119);return s.showMethods||i.add(0),s.showFunctions||i.add(1),s.showConstructors||i.add(2),s.showFields||i.add(3),s.showVariables||i.add(4),s.showClasses||i.add(5),s.showStructs||i.add(6),s.showInterfaces||i.add(7),s.showModules||i.add(8),s.showProperties||i.add(9),s.showEvents||i.add(10),s.showOperators||i.add(11),s.showUnits||i.add(12),s.showValues||i.add(13),s.showConstants||i.add(14),s.showEnums||i.add(15),s.showEnumMembers||i.add(16),s.showKeywords||i.add(17),s.showWords||i.add(18),s.showColors||i.add(19),s.showFiles||i.add(20),s.showReferences||i.add(21),s.showColors||i.add(22),s.showFolders||i.add(23),s.showTypeParameters||i.add(24),s.showSnippets||i.add(27),s.showUsers||i.add(25),s.showIssues||i.add(26),{itemKind:i,showDeprecated:s.showDeprecated}}_onNewContext(e){if(this._context){if(e.lineNumber!==this._context.lineNumber){this.cancel();return}if(yd(e.leadingLineContent)!==yd(this._context.leadingLineContent)){this.cancel();return}if(e.column<this._context.column){e.leadingWord.word?this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0}):this.cancel();return}if(this._completionModel){if(e.leadingWord.word.length!==0&&e.leadingWord.startColumn>this._context.leadingWord.startColumn){if(wF.shouldAutoTrigger(this._editor)&&this._context){const n=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:n}})}return}if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&e.leadingWord.word.length!==0){const i=new Map,n=new Set;for(const[s,c]of this._completionModel.getItemsByProvider())c.length>0&&c[0].container.incomplete?n.add(s):i.set(s,c);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:n,providerItemsToReuse:i}})}else{const i=this._completionModel.lineContext;let n=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},this._completionModel.items.length===0){const s=wF.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(s&&this._context.leadingWord.endColumn<e.leadingWord.startColumn){this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0});return}if(this._context.triggerOptions.auto){this.cancel();return}else if(this._completionModel.lineContext=i,n=this._completionModel.items.length>0,n&&e.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:n})}}}}};Cbe=Yze=f6i([oM(1,Fb),oM(2,w6),oM(3,b1),oM(4,N0),oM(5,Ko),oM(6,Cc),oM(7,Ts),oM(8,D$e)],Cbe);const GCe=class GCe{constructor(e,i){this._disposables=new wn,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType(()=>{if(this._locked||!e.hasModel())return;const n=e.getSelections(),s=n.length;let c=!1;for(let f=0;f<s;f++)if(!n[f].isEmpty()){c=!0;break}if(!c){this._lastOvertyped.length!==0&&(this._lastOvertyped.length=0);return}this._lastOvertyped=[];const d=e.getModel();for(let f=0;f<s;f++){const m=n[f];if(d.getValueLengthInRange(m)>GCe._maxSelectionLength)return;this._lastOvertyped[f]={value:d.getValueInRange(m),multiline:m.startLineNumber!==m.endLineNumber}}})),this._disposables.add(i.onDidTrigger(n=>{this._locked=!0})),this._disposables.add(i.onDidCancel(n=>{this._locked=!1}))}getLastOvertypedInfo(e){if(e>=0&&e<this._lastOvertyped.length)return this._lastOvertyped[e]}dispose(){this._disposables.dispose()}};GCe._maxSelectionLength=51200;let eUe=GCe;var p6i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},z9e=function(l,e){return function(i,n){e(i,n,l)}};let tUe=class{constructor(e,i,n,s,c){this._menuId=i,this._menuService=s,this._contextKeyService=c,this._menuDisposables=new wn,this.element=jn(e,Cr(".suggest-status-bar"));const d=f=>f instanceof JC?n.createInstance(sJe,f,{useComma:!0}):void 0;this._leftActions=new kw(this.element,{actionViewItemProvider:d}),this._rightActions=new kw(this.element,{actionViewItemProvider:d}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this._leftActions.dispose(),this._rightActions.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(this._menuId,this._contextKeyService),i=()=>{const n=[],s=[];for(const[c,d]of e.getActions())c==="left"?n.push(...d):s.push(...d);this._leftActions.clear(),this._leftActions.push(n),this._rightActions.clear(),this._rightActions.push(s)};this._menuDisposables.add(e.onDidChange(()=>i())),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};tUe=p6i([z9e(2,ho),z9e(3,Lw),z9e(4,Ko)],tUe);var m6i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},g6i=function(l,e){return function(i,n){e(i,n,l)}};function cKe(l){return!!l&&!!(l.completion.documentation||l.completion.detail&&l.completion.detail!==l.completion.label)}let iUe=class{constructor(e,i){this._editor=e,this._onDidClose=new gi,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new gi,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new wn,this._renderDisposeable=new wn,this._borderWidth=1,this._size=new Du(330,0),this.domNode=Cr(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=i.createInstance(d6,{editor:e}),this._body=Cr(".body"),this._scrollbar=new vse(this._body,{alwaysConsumeMouseWheel:!0}),jn(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=jn(this._body,Cr(".header")),this._close=jn(this._header,Cr("span"+zo.asCSSSelector(pr.close))),this._close.title=W("details.close","Close"),this._type=jn(this._header,Cr("p.type")),this._docs=jn(this._body,Cr("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(50)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),i=e.get(50),n=i.getMassagedFontFamily(),s=e.get(120)||i.fontSize,c=e.get(121)||i.lineHeight,d=i.fontWeight,f=`${s}px`,m=`${c}px`;this.domNode.style.fontSize=f,this.domNode.style.lineHeight=`${c/s}`,this.domNode.style.fontWeight=d,this.domNode.style.fontFeatureSettings=i.fontFeatureSettings,this._type.style.fontFamily=n,this._close.style.height=m,this._close.style.width=m}getLayoutInfo(){const e=this._editor.getOption(121)||this._editor.getOption(50).lineHeight,i=this._borderWidth,n=i*2;return{lineHeight:e,borderWidth:i,borderHeight:n,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=W("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(e,i){var c;this._renderDisposeable.clear();let{detail:n,documentation:s}=e.completion;if(i){let d="";d+=`score: ${e.score[0]}
+`,d+=`prefix: ${e.word??"(no prefix)"}
+`,d+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel}
+`,d+=`distance: ${e.distance} (localityBonus-setting)
+`,d+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}
+`,d+=`commit_chars: ${(c=e.completion.commitCharacters)==null?void 0:c.join("")}
+`,s=new m1().appendCodeblock("empty",d),n=`Provider: ${e.provider._debugDisplayName}`}if(!i&&!cKe(e)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),n){const d=n.length>1e5?`${n.substr(0,1e5)}…`:n;this._type.textContent=d,this._type.title=d,HC(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(d))}else s0(this._type),this._type.title="",dv(this._type),this.domNode.classList.add("no-type");if(s0(this._docs),typeof s=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=s;else if(s){this._docs.classList.add("markdown-docs"),s0(this._docs);const d=this._markdownRenderer.render(s);this._docs.appendChild(d.element),this._renderDisposeable.add(d),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=d=>{d.preventDefault(),d.stopPropagation()},this._close.onclick=d=>{d.preventDefault(),d.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get isEmpty(){return this.domNode.classList.contains("no-docs")}get size(){return this._size}layout(e,i){const n=new Du(e,i);Du.equals(n,this._size)||(this._size=n,ndi(this.domNode,e,i)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};iUe=m6i([g6i(1,ho)],iUe);class y6i{constructor(e,i){this.widget=e,this._editor=i,this.allowEditorOverflow=!0,this._disposables=new wn,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new HGe,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let n,s,c=0,d=0;this._disposables.add(this._resizable.onDidWillResize(()=>{n=this._topLeft,s=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(f=>{if(n&&s){this.widget.layout(f.dimension.width,f.dimension.height);let m=!1;f.west&&(d=s.width-f.dimension.width,m=!0),f.north&&(c=s.height-f.dimension.height,m=!0),m&&this._applyTopLeft({top:n.top+c,left:n.left+d})}f.done&&(n=void 0,s=void 0,c=0,d=0,this._userSize=f.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{this._anchorBox&&this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return this._topLeft?{preference:this._topLeft}:null}show(){this._added||(this._editor.addOverlayWidget(this),this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,i){const n=e.getBoundingClientRect();this._anchorBox=n,this._preferAlignAtTop=i,this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,i)}_placeAtAnchor(e,i,n){const s=SR(this.getDomNode().ownerDocument.body),c=this.widget.getLayoutInfo(),d=new Du(220,2*c.lineHeight),f=e.top,m=function(){const Ce=s.width-(e.left+e.width+c.borderWidth+c.horizontalPadding),Fe=-c.borderWidth+e.left+e.width,rt=new Du(Ce,s.height-e.top-c.borderHeight-c.verticalPadding),ct=rt.with(void 0,e.top+e.height-c.borderHeight-c.verticalPadding);return{top:f,left:Fe,fit:Ce-i.width,maxSizeTop:rt,maxSizeBottom:ct,minSize:d.with(Math.min(Ce,d.width))}}(),v=function(){const Ce=e.left-c.borderWidth-c.horizontalPadding,Fe=Math.max(c.horizontalPadding,e.left-i.width-c.borderWidth),rt=new Du(Ce,s.height-e.top-c.borderHeight-c.verticalPadding),ct=rt.with(void 0,e.top+e.height-c.borderHeight-c.verticalPadding);return{top:f,left:Fe,fit:Ce-i.width,maxSizeTop:rt,maxSizeBottom:ct,minSize:d.with(Math.min(Ce,d.width))}}(),x=function(){const Ce=e.left,Fe=-c.borderWidth+e.top+e.height,rt=new Du(e.width-c.borderHeight,s.height-e.top-e.height-c.verticalPadding);return{top:Fe,left:Ce,fit:rt.height-i.height,maxSizeBottom:rt,maxSizeTop:rt,minSize:d.with(rt.width)}}(),w=[m,v,x],I=w.find(Ce=>Ce.fit>=0)??w.sort((Ce,Fe)=>Fe.fit-Ce.fit)[0],P=e.top+e.height-c.borderHeight;let O,z=i.height;const J=Math.max(I.maxSizeTop.height,I.maxSizeBottom.height);z>J&&(z=J);let Y;n?z<=I.maxSizeTop.height?(O=!0,Y=I.maxSizeTop):(O=!1,Y=I.maxSizeBottom):z<=I.maxSizeBottom.height?(O=!1,Y=I.maxSizeBottom):(O=!0,Y=I.maxSizeTop);let{top:ae,left:me}=I;!O&&z>e.height&&(ae=P-z);const ye=this._editor.getDomNode();if(ye){const Ce=ye.getBoundingClientRect();ae-=Ce.top,me-=Ce.left}this._applyTopLeft({left:me,top:ae}),this._resizable.enableSashes(!O,I===m,O,I!==m),this._resizable.minSize=I.minSize,this._resizable.maxSize=Y,this._resizable.layout(z,Math.min(Y.width,i.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this._editor.layoutOverlayWidget(this)}}var wL;(function(l){l[l.FILE=0]="FILE",l[l.FOLDER=1]="FOLDER",l[l.ROOT_FOLDER=2]="ROOT_FOLDER"})(wL||(wL={}));const v6i=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function U0e(l,e,i,n,s){if(zo.isThemeIcon(s))return[`codicon-${s.id}`,"predefined-file-icon"];if(yo.isUri(s))return[];const c=n===wL.ROOT_FOLDER?["rootfolder-icon"]:n===wL.FOLDER?["folder-icon"]:["file-icon"];if(i){let d;if(i.scheme===Ma.data)d=kR.parseMetaData(i).get(kR.META_DATA_LABEL);else{const f=i.path.match(v6i);f?(d=q0e(f[2].toLowerCase()),f[1]&&c.push(`${q0e(f[1].toLowerCase())}-name-dir-icon`)):d=q0e(i.authority.toLowerCase())}if(n===wL.ROOT_FOLDER)c.push(`${d}-root-name-folder-icon`);else if(n===wL.FOLDER)c.push(`${d}-name-folder-icon`);else{if(d){if(c.push(`${d}-name-file-icon`),c.push("name-file-icon"),d.length<=255){const m=d.split(".");for(let v=1;v<m.length;v++)c.push(`${m.slice(v).join(".")}-ext-file-icon`)}c.push("ext-file-icon")}const f=b6i(l,e,i);f&&c.push(`${q0e(f)}-lang-file-icon`)}}return c}function b6i(l,e,i){if(!i)return null;let n=null;if(i.scheme===Ma.data){const c=kR.parseMetaData(i).get(kR.META_DATA_MIME);c&&(n=e.getLanguageIdByMimeType(c))}else{const s=l.getModel(i);s&&(n=s.getLanguageId())}return n&&n!==bv?n:e.guessLanguageIdByFilepathOrFirstLine(i)}function q0e(l){return l.replace(/[\s]/g,"/")}var C6i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},U9e=function(l,e){return function(i,n){e(i,n,l)}};function fPt(l){return`suggest-aria-id:${l}`}const S6i=sf("suggest-more-info",pr.chevronRight,W("suggestMoreInfoIcon","Icon for more information in the suggest widget."));var TE;const w6i=new(TE=class{extract(e,i){if(e.textLabel.match(TE._regexStrict))return i[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(TE._regexStrict))return i[0]=e.completion.detail,!0;if(e.completion.documentation){const n=typeof e.completion.documentation=="string"?e.completion.documentation:e.completion.documentation.value,s=TE._regexRelaxed.exec(n);if(s&&(s.index===0||s.index+s[0].length===n.length))return i[0]=s[0],!0}return!1}},TE._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,TE._regexStrict=new RegExp(`^${TE._regexRelaxed.source}$`,"i"),TE);let nUe=class{constructor(e,i,n,s){this._editor=e,this._modelService=i,this._languageService=n,this._themeService=s,this._onDidToggleDetails=new gi,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const i=new wn,n=e;n.classList.add("show-file-icons");const s=jn(e,Cr(".icon")),c=jn(s,Cr("span.colorspan")),d=jn(e,Cr(".contents")),f=jn(d,Cr(".main")),m=jn(f,Cr(".icon-label.codicon")),v=jn(f,Cr("span.left")),x=jn(f,Cr("span.right")),w=new uve(v,{supportHighlights:!0,supportIcons:!0});i.add(w);const I=jn(v,Cr("span.signature-label")),P=jn(v,Cr("span.qualifier-label")),O=jn(x,Cr("span.details-label")),z=jn(x,Cr("span.readMore"+zo.asCSSSelector(S6i)));return z.title=W("readMore","Read More"),{root:n,left:v,right:x,icon:s,colorspan:c,iconLabel:w,iconContainer:m,parametersLabel:I,qualifierLabel:P,detailsLabel:O,readMore:z,disposables:i,configureFont:()=>{const Y=this._editor.getOptions(),ae=Y.get(50),me=ae.getMassagedFontFamily(),ye=ae.fontFeatureSettings,Ce=Y.get(120)||ae.fontSize,Fe=Y.get(121)||ae.lineHeight,rt=ae.fontWeight,ct=ae.letterSpacing,Mt=`${Ce}px`,Yt=`${Fe}px`,Bi=`${ct}px`;n.style.fontSize=Mt,n.style.fontWeight=rt,n.style.letterSpacing=Bi,f.style.fontFamily=me,f.style.fontFeatureSettings=ye,f.style.lineHeight=Yt,s.style.height=Yt,s.style.width=Yt,z.style.height=Yt,z.style.width=Yt}}}renderElement(e,i,n){n.configureFont();const{completion:s}=e;n.root.id=fPt(i),n.colorspan.style.backgroundColor="";const c={labelEscapeNewLines:!0,matches:bse(e.score)},d=[];if(s.kind===19&&w6i.extract(e,d))n.icon.className="icon customcolor",n.iconContainer.className="icon hide",n.colorspan.style.backgroundColor=d[0];else if(s.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){n.icon.className="icon hide",n.iconContainer.className="icon hide";const f=U0e(this._modelService,this._languageService,yo.from({scheme:"fake",path:e.textLabel}),wL.FILE),m=U0e(this._modelService,this._languageService,yo.from({scheme:"fake",path:s.detail}),wL.FILE);c.extraClasses=f.length>m.length?f:m}else s.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(n.icon.className="icon hide",n.iconContainer.className="icon hide",c.extraClasses=[U0e(this._modelService,this._languageService,yo.from({scheme:"fake",path:e.textLabel}),wL.FOLDER),U0e(this._modelService,this._languageService,yo.from({scheme:"fake",path:s.detail}),wL.FOLDER)].flat()):(n.icon.className="icon hide",n.iconContainer.className="",n.iconContainer.classList.add("suggest-icon",...zo.asClassNameArray(Ane.toIcon(s.kind))));s.tags&&s.tags.indexOf(1)>=0&&(c.extraClasses=(c.extraClasses||[]).concat(["deprecated"]),c.matches=[]),n.iconLabel.setLabel(e.textLabel,void 0,c),typeof s.label=="string"?(n.parametersLabel.textContent="",n.detailsLabel.textContent=q9e(s.detail||""),n.root.classList.add("string-label")):(n.parametersLabel.textContent=q9e(s.label.detail||""),n.detailsLabel.textContent=q9e(s.label.description||""),n.root.classList.remove("string-label")),this._editor.getOption(119).showInlineDetails?HC(n.detailsLabel):dv(n.detailsLabel),cKe(e)?(n.right.classList.add("can-expand-details"),HC(n.readMore),n.readMore.onmousedown=f=>{f.stopPropagation(),f.preventDefault()},n.readMore.onclick=f=>{f.stopPropagation(),f.preventDefault(),this._onDidToggleDetails.fire()}):(n.right.classList.remove("can-expand-details"),dv(n.readMore),n.readMore.onmousedown=null,n.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};nUe=C6i([U9e(1,rf),U9e(2,Pf),U9e(3,im)],nUe);function q9e(l){return l.replace(/\r\n|\r|\n/g,"")}var x6i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},$0e=function(l,e){return function(i,n){e(i,n,l)}},XU;It("editorSuggestWidget.background",Cw,W("editorSuggestWidgetBackground","Background color of the suggest widget."));It("editorSuggestWidget.border",P$e,W("editorSuggestWidgetBorder","Border color of the suggest widget."));const k6i=It("editorSuggestWidget.foreground",HL,W("editorSuggestWidgetForeground","Foreground color of the suggest widget."));It("editorSuggestWidget.selectedForeground",Qne,W("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget."));It("editorSuggestWidget.selectedIconForeground",W$e,W("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));const T6i=It("editorSuggestWidget.selectedBackground",Zne,W("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));It("editorSuggestWidget.highlightForeground",rq,W("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget."));It("editorSuggestWidget.focusHighlightForeground",hmi,W("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));It("editorSuggestWidgetStatus.foreground",hc(k6i,.5),W("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));class D6i{constructor(e,i){this._service=e,this._key=`suggestWidget.size/${i.getEditorType()}/${i instanceof kT}`}restore(){const e=this._service.get(this._key,0)??"";try{const i=JSON.parse(e);if(Du.is(i))return Du.lift(i)}catch{}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}var cR;let rUe=(cR=class{constructor(e,i,n,s,c){this.editor=e,this._storageService=i,this._state=0,this._isAuto=!1,this._pendingLayout=new Fm,this._pendingShowDetails=new Fm,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new TT,this._disposables=new wn,this._onDidSelect=new CB,this._onDidFocus=new CB,this._onDidHide=new gi,this._onDidShow=new gi,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new gi,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new HGe,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new E6i(this,e),this._persistedSize=new D6i(i,e);class d{constructor(P,O,z=!1,J=!1){this.persistedSize=P,this.currentSize=O,this.persistHeight=z,this.persistWidth=J}}let f;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),f=new d(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(I=>{var P,O;if(this._resize(I.dimension.width,I.dimension.height),f&&(f.persistHeight=f.persistHeight||!!I.north||!!I.south,f.persistWidth=f.persistWidth||!!I.east||!!I.west),!!I.done){if(f){const{itemHeight:z,defaultSize:J}=this.getLayoutInfo(),Y=Math.round(z/2);let{width:ae,height:me}=this.element.size;(!f.persistHeight||Math.abs(f.currentSize.height-me)<=Y)&&(me=((P=f.persistedSize)==null?void 0:P.height)??J.height),(!f.persistWidth||Math.abs(f.currentSize.width-ae)<=Y)&&(ae=((O=f.persistedSize)==null?void 0:O.width)??J.width),this._persistedSize.store(new Du(ae,me))}this._contentWidget.unlockPreference(),f=void 0}})),this._messageElement=jn(this.element.domNode,Cr(".message")),this._listElement=jn(this.element.domNode,Cr(".tree"));const m=this._disposables.add(c.createInstance(iUe,this.editor));m.onDidClose(this.toggleDetails,this,this._disposables),this._details=new y6i(m,this.editor);const v=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(119).showIcons);v();const x=c.createInstance(nUe,this.editor);this._disposables.add(x),this._disposables.add(x.onDidToggleDetails(()=>this.toggleDetails())),this._list=new Ow("SuggestWidget",this._listElement,{getHeight:I=>this.getLayoutInfo().itemHeight,getTemplateId:I=>"suggestion"},[x],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>W("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:I=>{let P=I.textLabel;if(typeof I.completion.label!="string"){const{detail:Y,description:ae}=I.completion.label;Y&&ae?P=W("label.full","{0} {1}, {2}",P,Y,ae):Y?P=W("label.detail","{0} {1}",P,Y):ae&&(P=W("label.desc","{0}, {1}",P,ae))}if(!I.isResolved||!this._isDetailsVisible())return P;const{documentation:O,detail:z}=I.completion,J=SB("{0}{1}",z||"",O?typeof O=="string"?O:O.value:"");return W("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",P,J)}}}),this._list.style(iW({listInactiveFocusBackground:T6i,listInactiveFocusOutline:yf})),this._status=c.createInstance(tUe,this.element.domNode,QM);const w=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(119).showStatusBar);w(),this._disposables.add(s.onDidColorThemeChange(I=>this._onThemeChange(I))),this._onThemeChange(s.getColorTheme()),this._disposables.add(this._list.onMouseDown(I=>this._onListMouseDownOrTap(I))),this._disposables.add(this._list.onTap(I=>this._onListMouseDownOrTap(I))),this._disposables.add(this._list.onDidChangeSelection(I=>this._onListSelection(I))),this._disposables.add(this._list.onDidChangeFocus(I=>this._onListFocus(I))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(I=>{I.hasChanged(119)&&(w(),v()),this._completionModel&&(I.hasChanged(50)||I.hasChanged(120)||I.hasChanged(121))&&this._list.splice(0,this._list.length,this._completionModel.items)})),this._ctxSuggestWidgetVisible=fc.Visible.bindTo(n),this._ctxSuggestWidgetDetailsVisible=fc.DetailsVisible.bindTo(n),this._ctxSuggestWidgetMultipleSuggestions=fc.MultipleSuggestions.bindTo(n),this._ctxSuggestWidgetHasFocusedSuggestion=fc.HasFocusedSuggestion.bindTo(n),this._disposables.add(ph(this._details.widget.domNode,"keydown",I=>{this._onDetailsKeydown.fire(I)})),this._disposables.add(this.editor.onMouseDown(I=>this._onEditorMouseDown(I)))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(e=this._loadingTimeout)==null||e.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(e){typeof e.element>"u"||typeof e.index>"u"||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,i){const n=this._completionModel;n&&(this._onDidSelect.fire({item:e,index:i,model:n}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=RE(e.type)?2:1}_onListFocus(e){var s;if(this._ignoreFocusEvents)return;if(!e.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);return}if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const i=e.elements[0],n=e.indexes[0];i!==this._focusedItem&&((s=this._currentSuggestionDetails)==null||s.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=i,this._list.reveal(n),this._currentSuggestionDetails=Om(async c=>{const d=CR(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),f=c.onCancellationRequested(()=>d.dispose());try{return await i.resolve(c)}finally{d.dispose(),f.dispose()}}),this._currentSuggestionDetails.then(()=>{n>=this._list.length||i!==this._list.element(n)||(this._ignoreFocusEvents=!0,this._list.splice(n,1,[i]),this._list.setFocus([n]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:fPt(n)}))}).catch(Pa)),this._onDidFocus.fire({item:i,index:n,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",e===4),this.element.domNode.classList.remove("message"),e){case 0:dv(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=XU.LOADING_MESSAGE,dv(this._listElement,this._status.element),HC(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,PL(XU.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=XU.NO_SUGGESTIONS_MESSAGE,dv(this._listElement,this._status.element),HC(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,PL(XU.NO_SUGGESTIONS_MESSAGE);break;case 3:dv(this._messageElement),HC(this._listElement,this._status.element),this._show();break;case 4:dv(this._messageElement),HC(this._listElement,this._status.element),this._show();break;case 5:dv(this._messageElement),HC(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(e,i){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=CR(()=>this._setState(1),i)))}showSuggestions(e,i,n,s,c){var m,v;if(this._contentWidget.setPosition(this.editor.getPosition()),(m=this._loadingTimeout)==null||m.dispose(),(v=this._currentSuggestionDetails)==null||v.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),n&&this._state!==2&&this._state!==0){this._setState(4);return}const d=this._completionModel.items.length,f=d===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(d>1),f){this._setState(s?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(n?4:3),this._list.reveal(i,0),this._list.setFocus(c?[]:[i])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=aye(Eo(this.element.domNode),()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")})}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):(cKe(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=aye(Eo(this.element.domNode),()=>{this._pendingShowDetails.clear(),this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._details.widget.isEmpty?this._details.hide():(this._positionDetails(),this.element.domNode.classList.add("shows-details")),this.editor.focus()})}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var n;this._pendingLayout.clear(),this._pendingShowDetails.clear(),(n=this._loadingTimeout)==null||n.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const e=this._persistedSize.restore(),i=Math.ceil(this.getLayoutInfo().itemHeight*4.3);e&&e.height<i&&this._persistedSize.store(e.with(void 0,i))}isFrozen(){return this._state===4}_afterRender(e){if(e===null){this._isDetailsVisible()&&this._details.hide();return}this._state===2||this._state===1||(this._isDetailsVisible()&&!this._details.widget.isEmpty&&this._details.show(),this._positionDetails())}_layout(e){var d,f;if(!this.editor.hasModel()||!this.editor.getDomNode())return;const i=SR(this.element.domNode.ownerDocument.body),n=this.getLayoutInfo();e||(e=n.defaultSize);let s=e.height,c=e.width;if(this._status.element.style.height=`${n.itemHeight}px`,this._state===2||this._state===1)s=n.itemHeight+n.borderHeight,c=n.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new Du(c,s),this._contentWidget.setPreference(2);else{const m=i.width-n.borderHeight-2*n.horizontalPadding;c>m&&(c=m);const v=this._completionModel?this._completionModel.stats.pLabelLen*n.typicalHalfwidthCharacterWidth:c,x=n.statusBarHeight+this._list.contentHeight+n.borderHeight,w=n.itemHeight+n.statusBarHeight,I=e_(this.editor.getDomNode()),P=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),O=I.top+P.top+P.height,z=Math.min(i.height-O-n.verticalPadding,x),J=I.top+P.top-n.verticalPadding,Y=Math.min(J,x);let ae=Math.min(Math.max(Y,z)+n.borderHeight,x);s===((d=this._cappedHeight)==null?void 0:d.capped)&&(s=this._cappedHeight.wanted),s<w&&(s=w),s>ae&&(s=ae),s>z||this._forceRenderingAbove&&J>150?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),ae=Y):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),ae=z),this.element.preferredSize=new Du(v,n.defaultSize.height),this.element.maxSize=new Du(m,ae),this.element.minSize=new Du(220,w),this._cappedHeight=s===x?{wanted:((f=this._cappedHeight)==null?void 0:f.wanted)??e.height,capped:s}:void 0}this._resize(c,s)}_resize(e,i){const{width:n,height:s}=this.element.maxSize;e=Math.min(n,e),i=Math.min(s,i);const{statusBarHeight:c}=this.getLayoutInfo();this._list.layout(i-c,e),this._listElement.style.height=`${i-c}px`,this.element.layout(i,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var e;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,((e=this._contentWidget.getPosition())==null?void 0:e.preference[0])===2)}getLayoutInfo(){const e=this.editor.getOption(50),i=uv(this.editor.getOption(121)||e.lineHeight,8,1e3),n=!this.editor.getOption(119).showStatusBar||this._state===2||this._state===1?0:i,s=this._details.widget.borderWidth,c=2*s;return{itemHeight:i,statusBarHeight:n,borderWidth:s,borderHeight:c,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new Du(430,n+12*i+c)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}},XU=cR,cR.LOADING_MESSAGE=W("suggestWidget.loading","Loading..."),cR.NO_SUGGESTIONS_MESSAGE=W("suggestWidget.noSuggestions","No suggestions."),cR);rUe=XU=x6i([$0e(1,ET),$0e(2,Ko),$0e(3,im),$0e(4,ho)],rUe);class E6i{constructor(e,i){this._widget=e,this._editor=i,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){const{height:e,width:i}=this._widget.element.size,{borderWidth:n,horizontalPadding:s}=this._widget.getLayoutInfo();return new Du(i+2*n+s,e+2*n)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}var I6i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},WU=function(l,e){return function(i,n){e(i,n,l)}},sUe;class N6i{constructor(e,i){if(this._model=e,this._position=i,this._decorationOptions=qa.register({description:"suggest-line-suffix",stickiness:1}),e.getLineMaxColumn(i.lineNumber)!==i.column){const s=e.getOffsetAt(i),c=e.getPositionAt(s+1);e.changeDecorations(d=>{this._marker&&d.removeDecoration(this._marker),this._marker=d.addDecoration(nt.fromPositions(i,c),this._decorationOptions)})}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.changeDecorations(e=>{e.removeDecoration(this._marker),this._marker=void 0})}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const i=this._model.getDecorationRange(this._marker);return this._model.getOffsetAt(i.getStartPosition())-this._model.getOffsetAt(e)}else return this._model.getLineMaxColumn(e.lineNumber)-e.column}}var tB;let pT=(tB=class{static get(e){return e.getContribution(sUe.ID)}constructor(e,i,n,s,c,d,f){this._memoryService=i,this._commandService=n,this._contextKeyService=s,this._instantiationService=c,this._logService=d,this._telemetryService=f,this._lineSuffix=new Fm,this._toDispose=new wn,this._selectors=new L6i(w=>w.priority),this._onWillInsertSuggestItem=new gi,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=e,this.model=c.createInstance(Cbe,this.editor),this._selectors.register({priority:0,select:(w,I,P)=>this._memoryService.select(w,I,P)});const m=fc.InsertMode.bindTo(s);m.set(e.getOption(119).insertMode),this._toDispose.add(this.model.onDidTrigger(()=>m.set(e.getOption(119).insertMode))),this.widget=this._toDispose.add(new cFe(Eo(e.getDomNode()),()=>{const w=this._instantiationService.createInstance(rUe,this.editor);this._toDispose.add(w),this._toDispose.add(w.onDidSelect(J=>this._insertSuggestion(J,0),this));const I=new d6i(this.editor,w,this.model,J=>this._insertSuggestion(J,2));this._toDispose.add(I);const P=fc.MakesTextEdit.bindTo(this._contextKeyService),O=fc.HasInsertAndReplaceRange.bindTo(this._contextKeyService),z=fc.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(fo(()=>{P.reset(),O.reset(),z.reset()})),this._toDispose.add(w.onDidFocus(({item:J})=>{const Y=this.editor.getPosition(),ae=J.editStart.column,me=Y.column;let ye=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!J.completion.additionalTextEdits&&!(J.completion.insertTextRules&4)&&me-ae===J.completion.insertText.length&&(ye=this.editor.getModel().getValueInRange({startLineNumber:Y.lineNumber,startColumn:ae,endLineNumber:Y.lineNumber,endColumn:me})!==J.completion.insertText),P.set(ye),O.set(!pi.equals(J.editInsertEnd,J.editReplaceEnd)),z.set(!!J.provider.resolveCompletionItem||!!J.completion.documentation||J.completion.detail!==J.completion.label)})),this._toDispose.add(w.onDetailsKeyDown(J=>{if(J.toKeyCodeChord().equals(new a6(!0,!1,!1,!1,33))||Hc&&J.toKeyCodeChord().equals(new a6(!1,!1,!1,!0,33))){J.stopPropagation();return}J.toKeyCodeChord().isModifierKey()||this.editor.focus()})),w})),this._overtypingCapturer=this._toDispose.add(new cFe(Eo(e.getDomNode()),()=>this._toDispose.add(new eUe(this.editor,this.model)))),this._alternatives=this._toDispose.add(new cFe(Eo(e.getDomNode()),()=>this._toDispose.add(new rJ(this.editor,this._contextKeyService)))),this._toDispose.add(c.createInstance(ybe,e)),this._toDispose.add(this.model.onDidTrigger(w=>{this.widget.value.showTriggered(w.auto,w.shy?250:50),this._lineSuffix.value=new N6i(this.editor.getModel(),w.position)})),this._toDispose.add(this.model.onDidSuggest(w=>{if(w.triggerOptions.shy)return;let I=-1;for(const O of this._selectors.itemsOrderedByPriorityDesc)if(I=O.select(this.editor.getModel(),this.editor.getPosition(),w.completionModel.items),I!==-1)break;if(I===-1&&(I=0),this.model.state===0)return;let P=!1;if(w.triggerOptions.auto){const O=this.editor.getOption(119);O.selectionMode==="never"||O.selectionMode==="always"?P=O.selectionMode==="never":O.selectionMode==="whenTriggerCharacter"?P=w.triggerOptions.triggerKind!==1:O.selectionMode==="whenQuickSuggestion"&&(P=w.triggerOptions.triggerKind===1&&!w.triggerOptions.refilter)}this.widget.value.showSuggestions(w.completionModel,I,w.isFrozen,w.triggerOptions.auto,P)})),this._toDispose.add(this.model.onDidCancel(w=>{w.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{this.model.cancel(),this.model.clear()}));const v=fc.AcceptSuggestionsOnEnter.bindTo(s),x=()=>{const w=this.editor.getOption(1);v.set(w==="on"||w==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>x())),x()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(e,i){if(!e||!e.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const n=kv.get(this.editor);if(!n)return;this._onWillInsertSuggestItem.fire({item:e.item});const s=this.editor.getModel(),c=s.getAlternativeVersionId(),{item:d}=e,f=[],m=new ih;i&1||this.editor.pushUndoStop();const v=this.getOverwriteInfo(d,!!(i&8));this._memoryService.memorize(s,this.editor.getPosition(),d);const x=d.isResolved;let w=-1,I=-1;if(Array.isArray(d.completion.additionalTextEdits)){this.model.cancel();const O=GE.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",d.completion.additionalTextEdits.map(z=>{let J=nt.lift(z.range);if(J.startLineNumber===d.position.lineNumber&&J.startColumn>d.position.column){const Y=this.editor.getPosition().column-d.position.column,ae=Y,me=nt.spansMultipleLines(J)?0:Y;J=new nt(J.startLineNumber,J.startColumn+ae,J.endLineNumber,J.endColumn+me)}return eh.replaceMove(J,z.text)})),O.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!x){const O=new bg;let z;const J=s.onDidChangeContent(ye=>{if(ye.isFlush){m.cancel(),J.dispose();return}for(const Ce of ye.changes){const Fe=nt.getEndPosition(Ce.range);(!z||pi.isBefore(Fe,z))&&(z=Fe)}}),Y=i;i|=2;let ae=!1;const me=this.editor.onWillType(()=>{me.dispose(),ae=!0,Y&2||this.editor.pushUndoStop()});f.push(d.resolve(m.token).then(()=>{if(!d.completion.additionalTextEdits||m.token.isCancellationRequested)return;if(z&&d.completion.additionalTextEdits.some(Ce=>pi.isBefore(z,nt.getStartPosition(Ce.range))))return!1;ae&&this.editor.pushUndoStop();const ye=GE.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",d.completion.additionalTextEdits.map(Ce=>eh.replaceMove(nt.lift(Ce.range),Ce.text))),ye.restoreRelativeVerticalPositionOfCursor(this.editor),(ae||!(Y&2))&&this.editor.pushUndoStop(),!0}).then(ye=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",O.elapsed(),ye),I=ye===!0?1:ye===!1?0:-2}).finally(()=>{J.dispose(),me.dispose()}))}let{insertText:P}=d.completion;if(d.completion.insertTextRules&4||(P=WB.escape(P)),this.model.cancel(),n.insert(P,{overwriteBefore:v.overwriteBefore,overwriteAfter:v.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(d.completion.insertTextRules&1),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),i&2||this.editor.pushUndoStop(),d.completion.command)if(d.completion.command.id===Sbe.id)this.model.trigger({auto:!0,retrigger:!0});else{const O=new bg;f.push(this._commandService.executeCommand(d.completion.command.id,...d.completion.command.arguments?[...d.completion.command.arguments]:[]).catch(z=>{d.completion.extensionId?t_(z):Pa(z)}).finally(()=>{w=O.elapsed()}))}i&4&&this._alternatives.value.set(e,O=>{for(m.cancel();s.canUndo();){c!==s.getAlternativeVersionId()&&s.undo(),this._insertSuggestion(O,3|(i&8?8:0));break}}),this._alertCompletionItem(d),Promise.all(f).finally(()=>{this._reportSuggestionAcceptedTelemetry(d,s,x,w,I,e.index,e.model.items),this.model.clear(),m.dispose()})}_reportSuggestionAcceptedTelemetry(e,i,n,s,c,d,f){var I;if(Math.floor(Math.random()*100)===0)return;const m=new Map;for(let P=0;P<Math.min(30,f.length);P++){const O=f[P].textLabel;m.has(O)?m.get(O).push(P):m.set(O,[P])}const v=m.get(e.textLabel),w=v&&v.length>1?v[0]:-1;this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:((I=e.extensionId)==null?void 0:I.value)??"unknown",providerId:e.provider._debugDisplayName??"unknown",kind:e.completion.kind,basenameHash:PSe(wk(i.uri)).toString(16),languageId:i.getLanguageId(),fileExtension:kgi(i.uri),resolveInfo:e.provider.resolveCompletionItem?n?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:s,additionalEditsAsync:c,index:d,firstIndex:w})}getOverwriteInfo(e,i){Fl(this.editor.hasModel());let n=this.editor.getOption(119).insertMode==="replace";i&&(n=!n);const s=e.position.column-e.editStart.column,c=(n?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,d=this.editor.getPosition().column-e.position.column,f=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:s+d,overwriteAfter:c+f}}_alertCompletionItem(e){if(ky(e.completion.additionalTextEdits)){const i=W("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);xv(i)}}triggerSuggest(e,i,n){this.editor.hasModel()&&(this.model.trigger({auto:i??!1,completionOptions:{providerFilter:e,kindFilter:n?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const i=this.editor.getPosition(),n=()=>{i.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},s=c=>{if(c.completion.insertTextRules&4||c.completion.additionalTextEdits)return!0;const d=this.editor.getPosition(),f=c.editStart.column,m=d.column;return m-f!==c.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:d.lineNumber,startColumn:f,endLineNumber:d.lineNumber,endColumn:m})!==c.completion.insertText};Tr.once(this.model.onDidTrigger)(c=>{const d=[];Tr.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{vd(d),n()},void 0,d),this.model.onDidSuggest(({completionModel:f})=>{if(vd(d),f.items.length===0){n();return}const m=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),f.items),v=f.items[m];if(!s(v)){n();return}this.editor.pushUndoStop(),this._insertSuggestion({index:m,item:v,model:f},7)},void 0,d)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(i,0),this.editor.focus()}acceptSelectedSuggestion(e,i){const n=this.widget.value.getFocusedItem();let s=0;e&&(s|=4),i&&(s|=8),this._insertSuggestion(n,s)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}},sUe=tB,tB.ID="editor.contrib.suggestController",tB);pT=sUe=I6i([WU(1,nxe),WU(2,qd),WU(3,Ko),WU(4,ho),WU(5,N0),WU(6,b1)],pT);class L6i{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(this._items.indexOf(e)!==-1)throw new Error("Value is already registered");return this._items.push(e),this._items.sort((i,n)=>this.prioritySelector(n)-this.prioritySelector(i)),{dispose:()=>{const i=this._items.indexOf(e);i>=0&&this._items.splice(i,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}const KCe=class KCe extends hs{constructor(){super({id:KCe.id,label:W("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:kn.and(Tt.writable,Tt.hasCompletionItemProvider,fc.Visible.toNegated()),kbOpts:{kbExpr:Tt.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,i,n){const s=pT.get(i);if(!s)return;let c;n&&typeof n=="object"&&n.auto===!0&&(c=!0),s.triggerSuggest(void 0,c,void 0)}};KCe.id="editor.action.triggerSuggest";let Sbe=KCe;Cl(pT.ID,pT,2);sr(Sbe);const Nw=190,Iv=tm.bindToContribution(pT.get);$r(new Iv({id:"acceptSelectedSuggestion",precondition:kn.and(fc.Visible,fc.HasFocusedSuggestion),handler(l){l.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:kn.and(fc.Visible,Tt.textInputFocus),weight:Nw},{primary:3,kbExpr:kn.and(fc.Visible,Tt.textInputFocus,fc.AcceptSuggestionsOnEnter,fc.MakesTextEdit),weight:Nw}],menuOpts:[{menuId:QM,title:W("accept.insert","Insert"),group:"left",order:1,when:fc.HasInsertAndReplaceRange.toNegated()},{menuId:QM,title:W("accept.insert","Insert"),group:"left",order:1,when:kn.and(fc.HasInsertAndReplaceRange,fc.InsertMode.isEqualTo("insert"))},{menuId:QM,title:W("accept.replace","Replace"),group:"left",order:1,when:kn.and(fc.HasInsertAndReplaceRange,fc.InsertMode.isEqualTo("replace"))}]}));$r(new Iv({id:"acceptAlternativeSelectedSuggestion",precondition:kn.and(fc.Visible,Tt.textInputFocus,fc.HasFocusedSuggestion),kbOpts:{weight:Nw,kbExpr:Tt.textInputFocus,primary:1027,secondary:[1026]},handler(l){l.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:QM,group:"left",order:2,when:kn.and(fc.HasInsertAndReplaceRange,fc.InsertMode.isEqualTo("insert")),title:W("accept.replace","Replace")},{menuId:QM,group:"left",order:2,when:kn.and(fc.HasInsertAndReplaceRange,fc.InsertMode.isEqualTo("replace")),title:W("accept.insert","Insert")}]}));fl.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion");$r(new Iv({id:"hideSuggestWidget",precondition:fc.Visible,handler:l=>l.cancelSuggestWidget(),kbOpts:{weight:Nw,kbExpr:Tt.textInputFocus,primary:9,secondary:[1033]}}));$r(new Iv({id:"selectNextSuggestion",precondition:kn.and(fc.Visible,kn.or(fc.MultipleSuggestions,fc.HasFocusedSuggestion.negate())),handler:l=>l.selectNextSuggestion(),kbOpts:{weight:Nw,kbExpr:Tt.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}}));$r(new Iv({id:"selectNextPageSuggestion",precondition:kn.and(fc.Visible,kn.or(fc.MultipleSuggestions,fc.HasFocusedSuggestion.negate())),handler:l=>l.selectNextPageSuggestion(),kbOpts:{weight:Nw,kbExpr:Tt.textInputFocus,primary:12,secondary:[2060]}}));$r(new Iv({id:"selectLastSuggestion",precondition:kn.and(fc.Visible,kn.or(fc.MultipleSuggestions,fc.HasFocusedSuggestion.negate())),handler:l=>l.selectLastSuggestion()}));$r(new Iv({id:"selectPrevSuggestion",precondition:kn.and(fc.Visible,kn.or(fc.MultipleSuggestions,fc.HasFocusedSuggestion.negate())),handler:l=>l.selectPrevSuggestion(),kbOpts:{weight:Nw,kbExpr:Tt.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}}));$r(new Iv({id:"selectPrevPageSuggestion",precondition:kn.and(fc.Visible,kn.or(fc.MultipleSuggestions,fc.HasFocusedSuggestion.negate())),handler:l=>l.selectPrevPageSuggestion(),kbOpts:{weight:Nw,kbExpr:Tt.textInputFocus,primary:11,secondary:[2059]}}));$r(new Iv({id:"selectFirstSuggestion",precondition:kn.and(fc.Visible,kn.or(fc.MultipleSuggestions,fc.HasFocusedSuggestion.negate())),handler:l=>l.selectFirstSuggestion()}));$r(new Iv({id:"focusSuggestion",precondition:kn.and(fc.Visible,fc.HasFocusedSuggestion.negate()),handler:l=>l.focusSuggestion(),kbOpts:{weight:Nw,kbExpr:Tt.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}}));$r(new Iv({id:"focusAndAcceptSuggestion",precondition:kn.and(fc.Visible,fc.HasFocusedSuggestion.negate()),handler:l=>{l.focusSuggestion(),l.acceptSelectedSuggestion(!0,!1)}}));$r(new Iv({id:"toggleSuggestionDetails",precondition:kn.and(fc.Visible,fc.HasFocusedSuggestion),handler:l=>l.toggleSuggestionDetails(),kbOpts:{weight:Nw,kbExpr:Tt.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:QM,group:"right",order:1,when:kn.and(fc.DetailsVisible,fc.CanResolve),title:W("detail.more","Show Less")},{menuId:QM,group:"right",order:1,when:kn.and(fc.DetailsVisible.toNegated(),fc.CanResolve),title:W("detail.less","Show More")}]}));$r(new Iv({id:"toggleExplainMode",precondition:fc.Visible,handler:l=>l.toggleExplainMode(),kbOpts:{weight:100,primary:2138}}));$r(new Iv({id:"toggleSuggestionFocus",precondition:fc.Visible,handler:l=>l.toggleSuggestionFocus(),kbOpts:{weight:Nw,kbExpr:Tt.textInputFocus,primary:2570,mac:{primary:778}}}));$r(new Iv({id:"insertBestCompletion",precondition:kn.and(Tt.textInputFocus,kn.equals("config.editor.tabCompletion","on"),ybe.AtEnd,fc.Visible.toNegated(),rJ.OtherSuggestions.toNegated(),kv.InSnippetMode.toNegated()),handler:(l,e)=>{l.triggerSuggestAndAcceptBest(gg(e)?{fallback:"tab",...e}:{fallback:"tab"})},kbOpts:{weight:Nw,primary:2}}));$r(new Iv({id:"insertNextSuggestion",precondition:kn.and(Tt.textInputFocus,kn.equals("config.editor.tabCompletion","on"),rJ.OtherSuggestions,fc.Visible.toNegated(),kv.InSnippetMode.toNegated()),handler:l=>l.acceptNextSuggestion(),kbOpts:{weight:Nw,kbExpr:Tt.textInputFocus,primary:2}}));$r(new Iv({id:"insertPrevSuggestion",precondition:kn.and(Tt.textInputFocus,kn.equals("config.editor.tabCompletion","on"),rJ.OtherSuggestions,fc.Visible.toNegated(),kv.InSnippetMode.toNegated()),handler:l=>l.acceptPrevSuggestion(),kbOpts:{weight:Nw,kbExpr:Tt.textInputFocus,primary:1026}}));sr(class extends hs{constructor(){super({id:"editor.action.resetSuggestSize",label:W("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(l,e){var i;(i=pT.get(e))==null||i.resetWidgetSize()}});class P6i extends xi{get selectedItem(){return this._currentSuggestItemInfo}constructor(e,i,n){super(),this.editor=e,this.suggestControllerPreselector=i,this.onWillAccept=n,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._onDidSelectedItemChange=this._register(new gi),this.onDidSelectedItemChange=this._onDidSelectedItemChange.event,this._register(e.onKeyDown(c=>{c.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(c=>{c.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const s=pT.get(this.editor);if(s){this._register(s.registerSelector({priority:100,select:(f,m,v)=>{const x=this.editor.getModel();if(!x)return-1;const w=this.suggestControllerPreselector(),I=w?w9(w,x):void 0;if(!I)return-1;const P=pi.lift(m),O=v.map((J,Y)=>{const ae=tne.fromSuggestion(s,x,P,J,this.isShiftKeyPressed),me=w9(ae.toSingleTextEdit(),x),ye=dPt(I,me);return{index:Y,valid:ye,prefixLength:me.text.length,suggestItem:J}}).filter(J=>J&&J.valid&&J.prefixLength>0),z=S$e(O,yv(J=>J.prefixLength,mT));return z?z.index:-1}}));let c=!1;const d=()=>{c||(c=!0,this._register(s.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(s.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(s.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(Tr.once(s.model.onDidTrigger)(f=>{d()})),this._register(s.onWillInsertSuggestItem(f=>{const m=this.editor.getPosition(),v=this.editor.getModel();if(!m||!v)return;const x=tne.fromSuggestion(s,v,m,f.item,this.isShiftKeyPressed);this.onWillAccept(x)}))}this.update(this._isActive)}update(e){const i=this.getSuggestItemInfo();(this._isActive!==e||!A6i(this._currentSuggestItemInfo,i))&&(this._isActive=e,this._currentSuggestItemInfo=i,this._onDidSelectedItemChange.fire())}getSuggestItemInfo(){const e=pT.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const i=e.widget.value.getFocusedItem(),n=this.editor.getPosition(),s=this.editor.getModel();if(!(!i||!n||!s))return tne.fromSuggestion(e,s,n,i.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){const e=pT.get(this.editor);e==null||e.stopForceRenderingAbove()}forceRenderingAbove(){const e=pT.get(this.editor);e==null||e.forceRenderingAbove()}}class tne{static fromSuggestion(e,i,n,s,c){let{insertText:d}=s.completion,f=!1;if(s.completion.insertTextRules&4){const v=new WB().parse(d);v.children.length<100&&gbe.adjustWhitespace(i,n,!0,v),d=v.toString(),f=!0}const m=e.getOverwriteInfo(s,c);return new tne(nt.fromPositions(n.delta(0,-m.overwriteBefore),n.delta(0,Math.max(m.overwriteAfter,0))),d,s.completion.kind,f)}constructor(e,i,n,s){this.range=e,this.insertText=i,this.completionItemKind=n,this.isSnippetText=s}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new Kkt(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new IL(this.range,this.insertText)}}function A6i(l,e){return l===e?!0:!l||!e?!1:l.equals(e)}var O6i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},_4=function(l,e){return function(i,n){e(i,n,l)}},oUe,iB;let kk=(iB=class extends xi{static get(e){return e.getContribution(oUe.ID)}constructor(e,i,n,s,c,d,f,m,v,x){super(),this.editor=e,this._instantiationService=i,this._contextKeyService=n,this._configurationService=s,this._commandService=c,this._debounceService=d,this._languageFeaturesService=f,this._accessibilitySignalService=m,this._keybindingService=v,this._accessibilityService=x,this._editorObs=zC(this.editor),this._positions=ro(this,I=>{var P;return((P=this._editorObs.selections.read(I))==null?void 0:P.map(O=>O.getEndPosition()))??[new pi(1,1)]}),this._suggestWidgetAdaptor=this._register(new P6i(this.editor,()=>{var I,P;return this._editorObs.forceUpdate(),(P=(I=this.model.get())==null?void 0:I.selectedInlineCompletion.get())==null?void 0:P.toSingleTextEdit(void 0)},I=>this._editorObs.forceUpdate(P=>{var O;(O=this.model.get())==null||O.handleSuggestAccepted(I)}))),this._suggestWidgetSelectedItem=Tu(this,I=>this._suggestWidgetAdaptor.onDidSelectedItemChange(()=>{this._editorObs.forceUpdate(P=>I(void 0))}),()=>this._suggestWidgetAdaptor.selectedItem),this._enabledInConfig=Tu(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).enabled),this._isScreenReaderEnabled=Tu(this,this._accessibilityService.onDidChangeScreenReaderOptimized,()=>this._accessibilityService.isScreenReaderOptimized()),this._editorDictationInProgress=Tu(this,this._contextKeyService.onDidChangeContext,()=>this._contextKeyService.getContext(this.editor.getDomNode()).getValue("editorDictation.inProgress")===!0),this._enabled=ro(this,I=>this._enabledInConfig.read(I)&&(!this._isScreenReaderEnabled.read(I)||!this._editorDictationInProgress.read(I))),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this.model=Cy(this,I=>{if(this._editorObs.isReadonly.read(I))return;const P=this._editorObs.model.read(I);return P?this._instantiationService.createInstance(Xze,P,this._suggestWidgetSelectedItem,this._editorObs.versionId,this._positions,this._debounceValue,Tu(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(119).preview),Tu(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(119).previewMode),Tu(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).mode),this._enabled):void 0}).recomputeInitiallyAndOnChange(this._store),this._ghostTexts=ro(this,I=>{const P=this.model.read(I);return(P==null?void 0:P.ghostTexts.read(I))??[]}),this._stablizedGhostTexts=M6i(this._ghostTexts,this._store),this._ghostTextWidgets=y1i(this,this._stablizedGhostTexts,(I,P)=>P.add(this._instantiationService.createInstance(Gze,this.editor,{ghostText:I,minReservedLineCount:mk(0),targetTextModel:this.model.map(O=>O==null?void 0:O.textModel)}))).recomputeInitiallyAndOnChange(this._store),this._playAccessibilitySignal=xJ(this),this._fontFamily=Tu(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).fontFamily),this._register(new XC(this._contextKeyService,this.model)),this._register(Oje(this._editorObs.onDidType,(I,P)=>{var O;this._enabled.get()&&((O=this.model.get())==null||O.trigger())})),this._register(this._commandService.onDidExecuteCommand(I=>{new Set([s$.Tab.id,s$.DeleteLeft.id,s$.DeleteRight.id,bLt,"acceptSelectedSuggestion"]).has(I.commandId)&&e.hasTextFocus()&&this._enabled.get()&&this._editorObs.forceUpdate(O=>{var z;(z=this.model.get())==null||z.trigger(O)})})),this._register(Oje(this._editorObs.selections,(I,P)=>{var O;P.some(z=>z.reason===3||z.source==="api")&&((O=this.model.get())==null||O.stop())})),this._register(this.editor.onDidBlurEditorWidget(()=>{this._contextKeyService.getContextKeyValue("accessibleViewIsShown")||this._configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(62).keepOnBlur||Z$.dropDownVisible||th(I=>{var P;(P=this.model.get())==null||P.stop(I)})})),this._register(ba(I=>{var O;const P=(O=this.model.read(I))==null?void 0:O.state.read(I);P!=null&&P.suggestItem?P.primaryGhostText.lineCount>=2&&this._suggestWidgetAdaptor.forceRenderingAbove():this._suggestWidgetAdaptor.stopForceRenderingAbove()})),this._register(fo(()=>{this._suggestWidgetAdaptor.stopForceRenderingAbove()}));const w=Dse(this,(I,P)=>{var J;const O=this.model.read(I),z=O==null?void 0:O.state.read(I);return this._suggestWidgetSelectedItem.get()?P:(J=z==null?void 0:z.inlineCompletion)==null?void 0:J.semanticId});this._register(zTi(ro(I=>(this._playAccessibilitySignal.read(I),w.read(I),{})),async(I,P,O)=>{const z=this.model.get(),J=z==null?void 0:z.state.get();if(!J||!z)return;const Y=z.textModel.getLineContent(J.primaryGhostText.lineNumber);await c6(50,hBe(O)),await kDt(this._suggestWidgetSelectedItem,xy,()=>!1,hBe(O)),await this._accessibilitySignalService.playSignal(hw.inlineSuggestion),this.editor.getOption(8)&&this._provideScreenReaderUpdate(J.primaryGhostText.renderForScreenReader(Y))})),this._register(new hze(this.editor,this.model,this._instantiationService)),this._register(k4i(ro(I=>{const P=this._fontFamily.read(I);return P===""||P==="default"?"":`
+.monaco-editor .ghost-text-decoration,
+.monaco-editor .ghost-text-decoration-preview,
+.monaco-editor .ghost-text {
+ font-family: ${P};
+}`}))),this._register(this._configurationService.onDidChangeConfiguration(I=>{I.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})})),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})}playAccessibilitySignal(e){this._playAccessibilitySignal.trigger(e)}_provideScreenReaderUpdate(e){const i=this._contextKeyService.getContextKeyValue("accessibleViewIsShown"),n=this._keybindingService.lookupKeybinding("editor.action.accessibleView");let s;!i&&n&&this.editor.getOption(150)&&(s=W("showAccessibleViewHint","Inspect this in the accessible view ({0})",n.getAriaLabel())),xv(s?e+", "+s:e)}shouldShowHoverAt(e){var n;const i=(n=this.model.get())==null?void 0:n.primaryGhostText.get();return i?i.parts.some(s=>e.containsPosition(new pi(i.lineNumber,s.column))):!1}shouldShowHoverAtViewZone(e){var i;return((i=this._ghostTextWidgets.get()[0])==null?void 0:i.ownsViewZone(e))??!1}},oUe=iB,iB.ID="editor.contrib.inlineCompletionsController",iB);kk=oUe=O6i([_4(1,ho),_4(2,Ko),_4(3,Cc),_4(4,qd),_4(5,Pw),_4(6,Ts),_4(7,jR),_4(8,pu),_4(9,tS)],kk);function M6i(l,e){const i=bc("result",[]),n=[];return e.add(ba(s=>{const c=l.read(s);th(d=>{if(c.length!==n.length){n.length=c.length;for(let f=0;f<n.length;f++)n[f]||(n[f]=bc("item",c[f]));i.set([...n],d)}n.forEach((f,m)=>f.set(c[m],d))})})),i}const XCe=class XCe extends hs{constructor(){super({id:XCe.ID,label:W("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:kn.and(Tt.writable,XC.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}async run(e,i){var s;const n=kk.get(i);(s=n==null?void 0:n.model.get())==null||s.next()}};XCe.ID=SLt;let aUe=XCe;const QCe=class QCe extends hs{constructor(){super({id:QCe.ID,label:W("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:kn.and(Tt.writable,XC.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}async run(e,i){var s;const n=kk.get(i);(s=n==null?void 0:n.model.get())==null||s.previous()}};QCe.ID=CLt;let cUe=QCe;class R6i extends hs{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:W("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:Tt.writable})}async run(e,i){const n=kk.get(i);await SDt(async s=>{var c;await((c=n==null?void 0:n.model.get())==null?void 0:c.triggerExplicitly(s)),n==null||n.playAccessibilitySignal(s)})}}class F6i extends hs{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:W("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:kn.and(Tt.writable,XC.inlineSuggestionVisible),kbOpts:{weight:101,primary:2065,kbExpr:kn.and(Tt.writable,XC.inlineSuggestionVisible)},menuOpts:[{menuId:As.InlineSuggestionToolbar,title:W("acceptWord","Accept Word"),group:"primary",order:2}]})}async run(e,i){var s;const n=kk.get(i);await((s=n==null?void 0:n.model.get())==null?void 0:s.acceptNextWord(n.editor))}}class B6i extends hs{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:W("action.inlineSuggest.acceptNextLine","Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:kn.and(Tt.writable,XC.inlineSuggestionVisible),kbOpts:{weight:101},menuOpts:[{menuId:As.InlineSuggestionToolbar,title:W("acceptLine","Accept Line"),group:"secondary",order:2}]})}async run(e,i){var s;const n=kk.get(i);await((s=n==null?void 0:n.model.get())==null?void 0:s.acceptNextLine(n.editor))}}class W6i extends hs{constructor(){super({id:bLt,label:W("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:XC.inlineSuggestionVisible,menuOpts:[{menuId:As.InlineSuggestionToolbar,title:W("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:kn.and(XC.inlineSuggestionVisible,Tt.tabMovesFocus.toNegated(),XC.inlineSuggestionHasIndentationLessThanTabSize,fc.Visible.toNegated(),Tt.hoverFocused.toNegated())}})}async run(e,i){var s;const n=kk.get(i);n&&((s=n.model.get())==null||s.accept(n.editor),n.editor.focus())}}const ZCe=class ZCe extends hs{constructor(){super({id:ZCe.ID,label:W("action.inlineSuggest.hide","Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:XC.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}async run(e,i){const n=kk.get(i);th(s=>{var c;(c=n==null?void 0:n.model.get())==null||c.stop(s)})}};ZCe.ID="editor.action.inlineSuggest.hide";let lUe=ZCe;const YCe=class YCe extends Tv{constructor(){super({id:YCe.ID,title:W("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:As.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:kn.equals("config.editor.inlineSuggest.showToolbar","always")})}async run(e,i){const n=e.get(Cc),c=n.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";n.updateValue("editor.inlineSuggest.showToolbar",c)}};YCe.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar";let uUe=YCe;var V6i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Xte=function(l,e){return function(i,n){e(i,n,l)}};class H6i{constructor(e,i,n){this.owner=e,this.range=i,this.controller=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let dUe=class{constructor(e,i,n,s,c,d){this._editor=e,this._languageService=i,this._openerService=n,this.accessibilityService=s,this._instantiationService=c,this._telemetryService=d,this.hoverOrdinal=4}suggestHoverAnchor(e){const i=kk.get(this._editor);if(!i)return null;const n=e.target;if(n.type===8){const s=n.detail;if(i.shouldShowHoverAtViewZone(s.viewZoneId))return new N1e(1e3,this,nt.fromPositions(this._editor.getModel().validatePosition(s.positionBefore||s.position)),e.event.posx,e.event.posy,!1)}return n.type===7&&i.shouldShowHoverAt(n.range)?new N1e(1e3,this,n.range,e.event.posx,e.event.posy,!1):n.type===6&&n.detail.mightBeForeignElement&&i.shouldShowHoverAt(n.range)?new N1e(1e3,this,n.range,e.event.posx,e.event.posy,!1):null}computeSync(e,i){if(this._editor.getOption(62).showToolbar!=="onHover")return[];const n=kk.get(this._editor);return n&&n.shouldShowHoverAt(e.range)?[new H6i(this,e.range,n)]:[]}renderHoverParts(e,i){const n=new wn,s=i[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(8)&&n.add(this.renderScreenReaderText(e,s));const c=s.controller.model.get(),d=this._instantiationService.createInstance(Z$,this._editor,!1,mk(null),c.selectedInlineCompletionIndex,c.inlineCompletionsCount,c.activeCommands),f=d.getDomNode();e.fragment.appendChild(f),c.triggerExplicitly(),n.add(d);const m={hoverPart:s,hoverElement:f,dispose(){n.dispose()}};return new zB([m])}renderScreenReaderText(e,i){const n=new wn,s=Cr,c=s("div.hover-row.markdown-hover"),d=jn(c,s("div.hover-contents",{"aria-live":"assertive"})),f=n.add(new d6({editor:this._editor},this._languageService,this._openerService)),m=v=>{n.add(f.onDidRenderAsync(()=>{d.className="hover-contents code-hover-contents",e.onContentsChanged()}));const x=W("inlineSuggestionFollows","Suggestion:"),w=n.add(f.render(new m1().appendText(x).appendCodeblock("text",v)));d.replaceChildren(w.element)};return n.add(ba(v=>{var w;const x=(w=i.controller.model.read(v))==null?void 0:w.primaryGhostText.read(v);if(x){const I=this._editor.getModel().getLineContent(x.lineNumber);m(x.renderForScreenReader(I))}else o0(d)})),e.fragment.appendChild(c),n}};dUe=V6i([Xte(1,Pf),Xte(2,Rb),Xte(3,tS),Xte(4,ho),Xte(5,b1)],dUe);class j6i{}const rxe=new class{constructor(){this._implementations=[]}register(e){return this._implementations.push(e),{dispose:()=>{const i=this._implementations.indexOf(e);i!==-1&&this._implementations.splice(i,1)}}}getImplementations(){return this._implementations}};Cl(kk.ID,kk,3);sr(R6i);sr(aUe);sr(cUe);sr(F6i);sr(B6i);sr(W6i);sr(lUe);Nd(uUe);uW.register(dUe);rxe.register(new j6i);var z6i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},$9e=function(l,e){return function(i,n){e(i,n,l)}},pie,lR;let Jre=(lR=class{constructor(e,i,n,s){this.textModelResolverService=i,this.languageService=n,this.languageFeaturesService=s,this.toUnhook=new wn,this.toUnhookForKeyboard=new wn,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const c=new Xwe(e);this.toUnhook.add(c),this.toUnhook.add(c.onMouseMoveOrRelevantKeyDown(([d,f])=>{this.startFindDefinitionFromMouse(d,f??void 0)})),this.toUnhook.add(c.onExecute(d=>{this.isEnabled(d)&&this.gotoDefinition(d.target.position,d.hasSideBySideModifier).catch(f=>{Pa(f)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(c.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(pie.ID)}async startFindDefinitionFromCursor(e){await this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(i=>{i&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))}startFindDefinitionFromMouse(e,i){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,i)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const n=e.target.position;this.startFindDefinition(n)}async startFindDefinition(e){var d;this.toUnhookForKeyboard.clear();const i=e?(d=this.editor.getModel())==null?void 0:d.getWordAtPosition(e):null;if(!i){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return;this.currentWordAtPosition=i;const n=new KIt(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Om(f=>this.findDefinition(e,f));let s;try{s=await this.previousPromise}catch(f){Pa(f);return}if(!s||!s.length||!n.validate(this.editor)){this.removeLinkDecorations();return}const c=s[0].originSelectionRange?nt.lift(s[0].originSelectionRange):new nt(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);if(s.length>1){let f=c;for(const{originSelectionRange:m}of s)m&&(f=nt.plusRange(f,m));this.addDecoration(f,new m1().appendText(W("multipleResults","Click to show {0} definitions.",s.length)))}else{const f=s[0];if(!f.uri)return;this.textModelResolverService.createModelReference(f.uri).then(m=>{if(!m.object||!m.object.textEditorModel){m.dispose();return}const{object:{textEditorModel:v}}=m,{startLineNumber:x}=f.range;if(x<1||x>v.getLineCount()){m.dispose();return}const w=this.getPreviewValue(v,x,f),I=this.languageService.guessLanguageIdByFilepathOrFirstLine(v.uri);this.addDecoration(c,w?new m1().appendCodeblock(I||"",w):void 0),m.dispose()})}}getPreviewValue(e,i,n){let s=n.range;return s.endLineNumber-s.startLineNumber>=pie.MAX_SOURCE_PREVIEW_LINES&&(s=this.getPreviewRangeBasedOnIndentation(e,i)),this.stripIndentationFromPreviewRange(e,i,s)}stripIndentationFromPreviewRange(e,i,n){let c=e.getLineFirstNonWhitespaceColumn(i);for(let f=i+1;f<n.endLineNumber;f++){const m=e.getLineFirstNonWhitespaceColumn(f);c=Math.min(c,m)}return e.getValueInRange(n).replace(new RegExp(`^\\s{${c-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(e,i){const n=e.getLineFirstNonWhitespaceColumn(i),s=Math.min(e.getLineCount(),i+pie.MAX_SOURCE_PREVIEW_LINES);let c=i+1;for(;c<s;c++){const d=e.getLineFirstNonWhitespaceColumn(c);if(n===d)break}return new nt(i,1,c+1,1)}addDecoration(e,i){const n={range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:i}};this.linkDecorations.set([n])}removeLinkDecorations(){this.linkDecorations.clear()}isEnabled(e,i){var n;return this.editor.hasModel()&&e.isLeftClick&&e.isNoneOrSingleMouseDown&&e.target.type===6&&!(((n=e.target.detail.injectedText)==null?void 0:n.options)instanceof ER)&&(e.hasTriggerModifier||(i?i.keyCodeIsTriggerKey:!1))&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(e,i){const n=this.editor.getModel();return n?Use(this.languageFeaturesService.definitionProvider,n,e,!1,i):Promise.resolve(null)}gotoDefinition(e,i){return this.editor.setPosition(e),this.editor.invokeWithinContext(n=>{const s=!i&&this.editor.getOption(89)&&!this.isInPeekEditor(n);return new $se({openToSide:i,openInPeek:s,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(n)})}isInPeekEditor(e){const i=e.get(Ko);return Pb.inPeekEditor.getValue(i)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}},pie=lR,lR.ID="editor.contrib.gotodefinitionatposition",lR.MAX_SOURCE_PREVIEW_LINES=8,lR);Jre=pie=z6i([$9e(1,Ob),$9e(2,Pf),$9e(3,Ts)],Jre);Cl(Jre.ID,Jre,2);var hPt=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},wbe=function(l,e){return function(i,n){e(i,n,l)}};class Bxt{constructor(e,i,n){this.marker=e,this.index=i,this.total=n}}let fUe=class{constructor(e,i,n){this._markerService=i,this._configService=n,this._onDidChange=new gi,this.onDidChange=this._onDidChange.event,this._dispoables=new wn,this._markers=[],this._nextIdx=-1,yo.isUri(e)?this._resourceFilter=f=>f.toString()===e.toString():e&&(this._resourceFilter=e);const s=this._configService.getValue("problems.sortOrder"),c=(f,m)=>{let v=Rne(f.resource.toString(),m.resource.toString());return v===0&&(s==="position"?v=nt.compareRangesUsingStarts(f,m)||Rh.compare(f.severity,m.severity):v=Rh.compare(f.severity,m.severity)||nt.compareRangesUsingStarts(f,m)),v},d=()=>{this._markers=this._markerService.read({resource:yo.isUri(e)?e:void 0,severities:Rh.Error|Rh.Warning|Rh.Info}),typeof e=="function"&&(this._markers=this._markers.filter(f=>this._resourceFilter(f.resource))),this._markers.sort(c)};d(),this._dispoables.add(i.onMarkerChanged(f=>{(!this._resourceFilter||f.some(m=>this._resourceFilter(m)))&&(d(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new Bxt(e,this._nextIdx+1,this._markers.length)}_initIdx(e,i,n){let s=!1,c=this._markers.findIndex(d=>d.resource.toString()===e.uri.toString());c<0&&(c=Dne(this._markers,{resource:e.uri},(d,f)=>Rne(d.resource.toString(),f.resource.toString())),c<0&&(c=~c));for(let d=c;d<this._markers.length;d++){let f=nt.lift(this._markers[d]);if(f.isEmpty()){const m=e.getWordAtPosition(f.getStartPosition());m&&(f=new nt(f.startLineNumber,m.startColumn,f.startLineNumber,m.endColumn))}if(i&&(f.containsPosition(i)||i.isBeforeOrEqual(f.getStartPosition()))){this._nextIdx=d,s=!0;break}if(this._markers[d].resource.toString()!==e.uri.toString())break}s||(this._nextIdx=n?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(e,i,n){if(this._markers.length===0)return!1;const s=this._nextIdx;return this._nextIdx===-1?this._initIdx(i,n,e):e?this._nextIdx=(this._nextIdx+1)%this._markers.length:e||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),s!==this._nextIdx}find(e,i){let n=this._markers.findIndex(s=>s.resource.toString()===e.toString());if(!(n<0)){for(;n<this._markers.length;n++)if(nt.containsPosition(this._markers[n],i))return new Bxt(this._markers[n],n+1,this._markers.length)}}};fUe=hPt([wbe(1,zL),wbe(2,Cc)],fUe);const _Pt=jc("IMarkerNavigationService");let hUe=class{constructor(e,i){this._markerService=e,this._configService=i,this._provider=new _v}getMarkerList(e){for(const i of this._provider){const n=i.getMarkerList(e);if(n)return n}return new fUe(e,this._markerService,this._configService)}};hUe=hPt([wbe(0,zL),wbe(1,Cc)],hUe);nl(_Pt,hUe,1);var _Ue;(function(l){function e(i){switch(i){case S_.Ignore:return"severity-ignore "+zo.asClassName(pr.info);case S_.Info:return zo.asClassName(pr.info);case S_.Warning:return zo.asClassName(pr.warning);case S_.Error:return zo.asClassName(pr.error);default:return""}}l.className=e})(_Ue||(_Ue={}));var U6i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},VU=function(l,e){return function(i,n){e(i,n,l)}},pUe;class q6i{constructor(e,i,n,s,c){this._openerService=s,this._labelService=c,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new wn,this._editor=i;const d=document.createElement("div");d.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),d.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),d.appendChild(this._relatedBlock),this._disposables.add(ph(this._relatedBlock,"click",f=>{f.preventDefault();const m=this._relatedDiagnostics.get(f.target);m&&n(m)})),this._scrollable=new JTt(d,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(f=>{d.style.left=`-${f.scrollLeft}px`,d.style.top=`-${f.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){vd(this._disposables)}update(e){const{source:i,message:n,relatedInformation:s,code:c}=e;let d=((i==null?void 0:i.length)||0)+2;c&&(typeof c=="string"?d+=c.length:d+=c.value.length);const f=BL(n);this._lines=f.length,this._longestLineLength=0;for(const I of f)this._longestLineLength=Math.max(I.length+d,this._longestLineLength);s0(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let m=this._messageBlock;for(const I of f)m=document.createElement("div"),m.innerText=I,I===""&&(m.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(m);if(i||c){const I=document.createElement("span");if(I.classList.add("details"),m.appendChild(I),i){const P=document.createElement("span");P.innerText=i,P.classList.add("source"),I.appendChild(P)}if(c)if(typeof c=="string"){const P=document.createElement("span");P.innerText=`(${c})`,P.classList.add("code"),I.appendChild(P)}else{this._codeLink=Cr("a.code-link"),this._codeLink.setAttribute("href",`${c.target.toString()}`),this._codeLink.onclick=O=>{this._openerService.open(c.target,{allowCommands:!0}),O.preventDefault(),O.stopPropagation()};const P=jn(this._codeLink,Cr("span"));P.innerText=c.value,I.appendChild(this._codeLink)}}if(s0(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),ky(s)){const I=this._relatedBlock.appendChild(document.createElement("div"));I.style.paddingTop=`${Math.floor(this._editor.getOption(67)*.66)}px`,this._lines+=1;for(const P of s){const O=document.createElement("div"),z=document.createElement("a");z.classList.add("filename"),z.innerText=`${this._labelService.getUriBasenameLabel(P.resource)}(${P.startLineNumber}, ${P.startColumn}): `,z.title=this._labelService.getUriLabel(P.resource),this._relatedDiagnostics.set(z,P);const J=document.createElement("span");J.innerText=P.message,O.appendChild(z),O.appendChild(J),this._lines+=1,I.appendChild(O)}}const v=this._editor.getOption(50),x=Math.ceil(v.typicalFullwidthCharacterWidth*this._longestLineLength*.75),w=v.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:x,scrollHeight:w})}layout(e,i){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${i}px`,this._scrollable.setScrollDimensions({width:i,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let i="";switch(e.severity){case Rh.Error:i=W("Error","Error");break;case Rh.Warning:i=W("Warning","Warning");break;case Rh.Info:i=W("Info","Info");break;case Rh.Hint:i=W("Hint","Hint");break}let n=W("marker aria","{0} at {1}. ",i,e.startLineNumber+":"+e.startColumn);const s=this._editor.getModel();return s&&e.startLineNumber<=s.getLineCount()&&e.startLineNumber>=1&&(n=`${s.getLineContent(e.startLineNumber)}, ${n}`),n}}var nB;let Gre=(nB=class extends ebe{constructor(e,i,n,s,c,d,f){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},c),this._themeService=i,this._openerService=n,this._menuService=s,this._contextKeyService=d,this._labelService=f,this._callOnDispose=new wn,this._onDidSelectRelatedInformation=new gi,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Rh.Warning,this._backgroundColor=In.white,this._applyTheme(i.getColorTheme()),this._callOnDispose.add(i.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(K6i);let i=mUe,n=$6i;this._severity===Rh.Warning?(i=O1e,n=J6i):this._severity===Rh.Info&&(i=gUe,n=G6i);const s=e.getColor(i),c=e.getColor(n);this.style({arrowColor:s,frameColor:s,headerBackgroundColor:c,primaryHeadingColor:e.getColor(PLt),secondaryHeadingColor:e.getColor(ALt)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(s=>this.editor.focus()));const i=[],n=this._menuService.getMenuActions(pUe.TitleMenu,this._contextKeyService);vwe(n,i),this._actionbarWidget.push(i,{label:!1,icon:!0,index:0})}_fillTitleIcon(e){this._icon=jn(e,Cr(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new q6i(this._container,this.editor,i=>this._onDidSelectRelatedInformation.fire(i),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,i,n){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const s=nt.lift(e),c=this.editor.getPosition(),d=c&&s.containsPosition(c)?c:s.getStartPosition();super.show(d,this.computeRequiredHeight());const f=this.editor.getModel();if(f){const m=n>1?W("problems","{0} of {1} problems",i,n):W("change","{0} of {1} problem",i,n);this.setTitle(wk(f.uri),m)}this._icon.className=`codicon ${_Ue.className(Rh.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(d,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,i){super._doLayoutBody(e,i),this._heightInPixel=e,this._message.layout(e,i),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}},pUe=nB,nB.TitleMenu=new As("gotoErrorTitleMenu"),nB);Gre=pUe=U6i([VU(1,im),VU(2,Rb),VU(3,Lw),VU(4,ho),VU(5,Ko),VU(6,F$)],Gre);const Wxt=Jne(twe,Y_i),Vxt=Jne(u6,Gne),Hxt=Jne(LL,Kne),mUe=It("editorMarkerNavigationError.background",{dark:Wxt,light:Wxt,hcDark:bl,hcLight:bl},W("editorMarkerNavigationError","Editor marker navigation widget error color.")),$6i=It("editorMarkerNavigationError.headerBackground",{dark:hc(mUe,.1),light:hc(mUe,.1),hcDark:null,hcLight:null},W("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),O1e=It("editorMarkerNavigationWarning.background",{dark:Vxt,light:Vxt,hcDark:bl,hcLight:bl},W("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),J6i=It("editorMarkerNavigationWarning.headerBackground",{dark:hc(O1e,.1),light:hc(O1e,.1),hcDark:"#0C141F",hcLight:hc(O1e,.2)},W("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),gUe=It("editorMarkerNavigationInfo.background",{dark:Hxt,light:Hxt,hcDark:bl,hcLight:bl},W("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),G6i=It("editorMarkerNavigationInfo.headerBackground",{dark:hc(gUe,.1),light:hc(gUe,.1),hcDark:null,hcLight:null},W("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),K6i=It("editorMarkerNavigation.background",wT,W("editorMarkerNavigationBackground","Editor marker navigation widget background."));var X6i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},J0e=function(l,e){return function(i,n){e(i,n,l)}},mie,rB;let $B=(rB=class{static get(e){return e.getContribution(mie.ID)}constructor(e,i,n,s,c){this._markerNavigationService=i,this._contextKeyService=n,this._editorService=s,this._instantiationService=c,this._sessionDispoables=new wn,this._editor=e,this._widgetVisible=pPt.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let i=!1;return this._model&&(i=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),i&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(Gre,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(n=>{var s,c,d;(!((s=this._model)!=null&&s.selected)||!nt.containsPosition((c=this._model)==null?void 0:c.selected.marker,n.position))&&((d=this._model)==null||d.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const n=this._model.find(this._editor.getModel().uri,this._widget.position);n?this._widget.updateMarker(n.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(n=>{this._editorService.openCodeEditor({resource:n.resource,options:{pinned:!0,revealIfOpened:!0,selection:nt.lift(n).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const i=this._getOrCreateModel(this._editor.getModel().uri);i.resetIndex(),i.move(!0,this._editor.getModel(),new pi(e.startLineNumber,e.startColumn)),i.selected&&this._widget.showAtMarker(i.selected.marker,i.selected.index,i.selected.total)}}async nagivate(e,i){var n,s;if(this._editor.hasModel()){const c=this._getOrCreateModel(i?void 0:this._editor.getModel().uri);if(c.move(e,this._editor.getModel(),this._editor.getPosition()),!c.selected)return;if(c.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const d=await this._editorService.openCodeEditor({resource:c.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:c.selected.marker}},this._editor);d&&((n=mie.get(d))==null||n.close(),(s=mie.get(d))==null||s.nagivate(e,i))}else this._widget.showAtMarker(c.selected.marker,c.selected.index,c.selected.total)}}},mie=rB,rB.ID="editor.contrib.markerController",rB);$B=mie=X6i([J0e(1,_Pt),J0e(2,Ko),J0e(3,Bl),J0e(4,ho)],$B);class sxe extends hs{constructor(e,i,n){super(n),this._next=e,this._multiFile=i}async run(e,i){var n;i.hasModel()&&((n=$B.get(i))==null||n.nagivate(this._next,this._multiFile))}}const e9=class e9 extends sxe{constructor(){super(!0,!1,{id:e9.ID,label:e9.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Tt.focus,primary:578,weight:100},menuOpts:{menuId:Gre.TitleMenu,title:e9.LABEL,icon:sf("marker-navigation-next",pr.arrowDown,W("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}};e9.ID="editor.action.marker.next",e9.LABEL=W("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");let xbe=e9;const t9=class t9 extends sxe{constructor(){super(!1,!1,{id:t9.ID,label:t9.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Tt.focus,primary:1602,weight:100},menuOpts:{menuId:Gre.TitleMenu,title:t9.LABEL,icon:sf("marker-navigation-previous",pr.arrowUp,W("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}};t9.ID="editor.action.marker.prev",t9.LABEL=W("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");let yUe=t9;class Q6i extends sxe{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:W("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Tt.focus,primary:66,weight:100},menuOpts:{menuId:As.MenubarGoMenu,title:W({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class Z6i extends sxe{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:W("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Tt.focus,primary:1090,weight:100},menuOpts:{menuId:As.MenubarGoMenu,title:W({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}Cl($B.ID,$B,4);sr(xbe);sr(yUe);sr(Q6i);sr(Z6i);const pPt=new rs("markersNavigationVisible",!1),Y6i=tm.bindToContribution($B.get);$r(new Y6i({id:"closeMarkersNavigation",precondition:pPt,handler:l=>l.close(),kbOpts:{weight:150,kbExpr:Tt.focus,primary:9,secondary:[1033]}}));var mE;(function(l){l.NoAutoFocus="noAutoFocus",l.FocusIfVisible="focusIfVisible",l.AutoFocusImmediately="autoFocusImmediately"})(mE||(mE={}));class e3i extends hs{constructor(){super({id:vLt,label:W({key:"showOrFocusHover",comment:["Label for action that will trigger the showing/focusing of a hover in the editor.","If the hover is not visible, it will show the hover.","This allows for users to show the hover without using the mouse."]},"Show or Focus Hover"),metadata:{description:aa("showOrFocusHoverDescription","Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position."),args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if and when the hover should take focus upon being triggered by this action.",enum:[mE.NoAutoFocus,mE.FocusIfVisible,mE.AutoFocusImmediately],enumDescriptions:[W("showOrFocusHover.focus.noAutoFocus","The hover will not automatically take focus."),W("showOrFocusHover.focus.focusIfVisible","The hover will take focus only if it is already visible."),W("showOrFocusHover.focus.autoFocusImmediately","The hover will automatically take focus when it appears.")],default:mE.FocusIfVisible}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:pp(2089,2087),weight:100}})}run(e,i,n){if(!i.hasModel())return;const s=Dy.get(i);if(!s)return;const c=n==null?void 0:n.focus;let d=mE.FocusIfVisible;Object.values(mE).includes(c)?d=c:typeof c=="boolean"&&c&&(d=mE.AutoFocusImmediately);const f=v=>{const x=i.getPosition(),w=new nt(x.lineNumber,x.column,x.lineNumber,x.column);s.showContentHover(w,1,1,v)},m=i.getOption(2)===2;s.isHoverVisible?d!==mE.NoAutoFocus?s.focus():f(m):f(m||d===mE.AutoFocusImmediately)}}class t3i extends hs{constructor(){super({id:gLi,label:W({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0,metadata:{description:aa("showDefinitionPreviewHoverDescription","Show the definition preview hover in the editor.")}})}run(e,i){const n=Dy.get(i);if(!n)return;const s=i.getPosition();if(!s)return;const c=new nt(s.lineNumber,s.column,s.lineNumber,s.column),d=Jre.get(i);if(!d)return;d.startFindDefinitionFromCursor(s).then(()=>{n.showContentHover(c,1,1,!0)})}}class i3i extends hs{constructor(){super({id:yLi,label:W({key:"scrollUpHover",comment:["Action that allows to scroll up in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:Tt.hoverFocused,kbOpts:{kbExpr:Tt.hoverFocused,primary:16,weight:100},metadata:{description:aa("scrollUpHoverDescription","Scroll up the editor hover.")}})}run(e,i){const n=Dy.get(i);n&&n.scrollUp()}}class n3i extends hs{constructor(){super({id:vLi,label:W({key:"scrollDownHover",comment:["Action that allows to scroll down in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:Tt.hoverFocused,kbOpts:{kbExpr:Tt.hoverFocused,primary:18,weight:100},metadata:{description:aa("scrollDownHoverDescription","Scroll down the editor hover.")}})}run(e,i){const n=Dy.get(i);n&&n.scrollDown()}}class r3i extends hs{constructor(){super({id:bLi,label:W({key:"scrollLeftHover",comment:["Action that allows to scroll left in the hover widget with the left arrow when the hover widget is focused."]},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:Tt.hoverFocused,kbOpts:{kbExpr:Tt.hoverFocused,primary:15,weight:100},metadata:{description:aa("scrollLeftHoverDescription","Scroll left the editor hover.")}})}run(e,i){const n=Dy.get(i);n&&n.scrollLeft()}}class s3i extends hs{constructor(){super({id:CLi,label:W({key:"scrollRightHover",comment:["Action that allows to scroll right in the hover widget with the right arrow when the hover widget is focused."]},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:Tt.hoverFocused,kbOpts:{kbExpr:Tt.hoverFocused,primary:17,weight:100},metadata:{description:aa("scrollRightHoverDescription","Scroll right the editor hover.")}})}run(e,i){const n=Dy.get(i);n&&n.scrollRight()}}class o3i extends hs{constructor(){super({id:SLi,label:W({key:"pageUpHover",comment:["Action that allows to page up in the hover widget with the page up command when the hover widget is focused."]},"Page Up Hover"),alias:"Page Up Hover",precondition:Tt.hoverFocused,kbOpts:{kbExpr:Tt.hoverFocused,primary:11,secondary:[528],weight:100},metadata:{description:aa("pageUpHoverDescription","Page up the editor hover.")}})}run(e,i){const n=Dy.get(i);n&&n.pageUp()}}class a3i extends hs{constructor(){super({id:wLi,label:W({key:"pageDownHover",comment:["Action that allows to page down in the hover widget with the page down command when the hover widget is focused."]},"Page Down Hover"),alias:"Page Down Hover",precondition:Tt.hoverFocused,kbOpts:{kbExpr:Tt.hoverFocused,primary:12,secondary:[530],weight:100},metadata:{description:aa("pageDownHoverDescription","Page down the editor hover.")}})}run(e,i){const n=Dy.get(i);n&&n.pageDown()}}class c3i extends hs{constructor(){super({id:xLi,label:W({key:"goToTopHover",comment:["Action that allows to go to the top of the hover widget with the home command when the hover widget is focused."]},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:Tt.hoverFocused,kbOpts:{kbExpr:Tt.hoverFocused,primary:14,secondary:[2064],weight:100},metadata:{description:aa("goToTopHoverDescription","Go to the top of the editor hover.")}})}run(e,i){const n=Dy.get(i);n&&n.goToTop()}}class l3i extends hs{constructor(){super({id:kLi,label:W({key:"goToBottomHover",comment:["Action that allows to go to the bottom in the hover widget with the end command when the hover widget is focused."]},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:Tt.hoverFocused,kbOpts:{kbExpr:Tt.hoverFocused,primary:13,secondary:[2066],weight:100},metadata:{description:aa("goToBottomHoverDescription","Go to the bottom of the editor hover.")}})}run(e,i){const n=Dy.get(i);n&&n.goToBottom()}}class u3i extends hs{constructor(){super({id:Jwe,label:TLi,alias:"Increase Hover Verbosity Level",precondition:Tt.hoverVisible})}run(e,i,n){const s=Dy.get(i);if(!s)return;const c=(n==null?void 0:n.index)!==void 0?n.index:s.focusedHoverPartIndex();s.updateHoverVerbosityLevel(VC.Increase,c,n==null?void 0:n.focus)}}class d3i extends hs{constructor(){super({id:Gwe,label:DLi,alias:"Decrease Hover Verbosity Level",precondition:Tt.hoverVisible})}run(e,i,n){var d;const s=Dy.get(i);if(!s)return;const c=(n==null?void 0:n.index)!==void 0?n.index:s.focusedHoverPartIndex();(d=Dy.get(i))==null||d.updateHoverVerbosityLevel(VC.Decrease,c,n==null?void 0:n.focus)}}var f3i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},J9e=function(l,e){return function(i,n){e(i,n,l)}};const eT=Cr;class h3i{constructor(e,i,n){this.owner=e,this.range=i,this.marker=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const jxt={type:1,filter:{include:gf.QuickFix},triggerAction:YC.QuickFixHover};let vUe=class{constructor(e,i,n,s){this._editor=e,this._markerDecorationsService=i,this._openerService=n,this._languageFeaturesService=s,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,i){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];const n=this._editor.getModel(),s=e.range.startLineNumber,c=n.getLineMaxColumn(s),d=[];for(const f of i){const m=f.range.startLineNumber===s?f.range.startColumn:1,v=f.range.endLineNumber===s?f.range.endColumn:c,x=this._markerDecorationsService.getMarker(n.uri,f);if(!x)continue;const w=new nt(e.range.startLineNumber,m,e.range.startLineNumber,v);d.push(new h3i(this,w,x))}return d}renderHoverParts(e,i){if(!i.length)return new zB([]);const n=new wn,s=[];i.forEach(d=>{const f=this._renderMarkerHover(d);e.fragment.appendChild(f.hoverElement),s.push(f)});const c=i.length===1?i[0]:i.sort((d,f)=>Rh.compare(d.marker.severity,f.marker.severity))[0];return this.renderMarkerStatusbar(e,c,n),new zB(s)}_renderMarkerHover(e){const i=new wn,n=eT("div.hover-row"),s=jn(n,eT("div.marker.hover-contents")),{source:c,message:d,code:f,relatedInformation:m}=e.marker;this._editor.applyFontInfo(s);const v=jn(s,eT("span"));if(v.style.whiteSpace="pre-wrap",v.innerText=d,c||f)if(f&&typeof f!="string"){const w=eT("span");if(c){const z=jn(w,eT("span"));z.innerText=c}const I=jn(w,eT("a.code-link"));I.setAttribute("href",f.target.toString()),i.add(en(I,"click",z=>{this._openerService.open(f.target,{allowCommands:!0}),z.preventDefault(),z.stopPropagation()}));const P=jn(I,eT("span"));P.innerText=f.value;const O=jn(s,w);O.style.opacity="0.6",O.style.paddingLeft="6px"}else{const w=jn(s,eT("span"));w.style.opacity="0.6",w.style.paddingLeft="6px",w.innerText=c&&f?`${c}(${f})`:c||`(${f})`}if(ky(m))for(const{message:w,resource:I,startLineNumber:P,startColumn:O}of m){const z=jn(s,eT("div"));z.style.marginTop="8px";const J=jn(z,eT("a"));J.innerText=`${wk(I)}(${P}, ${O}): `,J.style.cursor="pointer",i.add(en(J,"click",ae=>{if(ae.stopPropagation(),ae.preventDefault(),this._openerService){const me={selection:{startLineNumber:P,startColumn:O}};this._openerService.open(I,{fromUserGesture:!0,editorOptions:me}).catch(Pa)}}));const Y=jn(z,eT("span"));Y.innerText=w,this._editor.applyFontInfo(Y)}return{hoverPart:e,hoverElement:n,dispose:()=>i.dispose()}}renderMarkerStatusbar(e,i,n){if(i.marker.severity===Rh.Error||i.marker.severity===Rh.Warning||i.marker.severity===Rh.Info){const s=$B.get(this._editor);s&&e.statusBar.addAction({label:W("view problem","View Problem"),commandId:xbe.ID,run:()=>{e.hide(),s.showAtMarker(i.marker),this._editor.focus()}})}if(!this._editor.getOption(92)){const s=e.statusBar.append(eT("div"));this.recentMarkerCodeActionsInfo&&($ye.makeKey(this.recentMarkerCodeActionsInfo.marker)===$ye.makeKey(i.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(s.textContent=W("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const c=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?xi.None:CR(()=>s.textContent=W("checkingForQuickFixes","Checking for quick fixes..."),200,n);s.textContent||(s.textContent=" ");const d=this.getCodeActions(i.marker);n.add(fo(()=>d.cancel())),d.then(f=>{if(c.dispose(),this.recentMarkerCodeActionsInfo={marker:i.marker,hasCodeActions:f.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){f.dispose(),s.textContent=W("noQuickFixes","No quick fixes available");return}s.style.display="none";let m=!1;n.add(fo(()=>{m||f.dispose()})),e.statusBar.addAction({label:W("quick fixes","Quick Fix..."),commandId:FGe,run:v=>{m=!0;const x=X$.get(this._editor),w=e_(v);e.hide(),x==null||x.showCodeActions(jxt,f,{x:w.left,y:w.top,width:w.width,height:w.height})}})},Pa)}}getCodeActions(e){return Om(i=>mq(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new nt(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),jxt,NE.None,i))}};vUe=f3i([J9e(1,lJe),J9e(2,Rb),J9e(3,Ts)],vUe);class _3i{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}get lane(){return this._laneOrLine}set lane(e){this._laneOrLine=e}constructor(e){this._editor=e,this._lineNumber=-1,this._laneOrLine=CT.Center}computeSync(){var c;const e=d=>({value:d}),i=this._editor.getLineDecorations(this._lineNumber),n=[],s=this._laneOrLine==="lineNo";if(!i)return n;for(const d of i){const f=((c=d.options.glyphMargin)==null?void 0:c.position)??CT.Center;if(!s&&f!==this._laneOrLine)continue;const m=s?d.options.lineNumberHoverMessage:d.options.glyphMarginHoverMessage;!m||M$(m)||n.push(...Vqe(m).map(e))}return n}}var p3i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},zxt=function(l,e){return function(i,n){e(i,n,l)}},bUe;const Uxt=Cr;var sB;let CUe=(sB=class extends xi{constructor(e,i,n){super(),this._renderDisposeables=this._register(new wn),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new H$e),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new d6({editor:this._editor},i,n)),this._computer=new _3i(this._editor),this._hoverOperation=this._register(new wLt(this._editor,this._computer)),this._register(this._hoverOperation.onResult(s=>{this._withResult(s.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(50)&&this._updateFont()})),this._register(ph(this._hover.containerDomNode,"mouseleave",s=>{this._onMouseLeave(s)})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return bUe.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(i=>this._editor.applyFontInfo(i))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}showsOrWillShow(e){const i=e.target;return i.type===2&&i.detail.glyphMarginLane?(this._startShowingAt(i.position.lineNumber,i.detail.glyphMarginLane),!0):i.type===3?(this._startShowingAt(i.position.lineNumber,"lineNo"),!0):!1}_startShowingAt(e,i){this._computer.lineNumber===e&&this._computer.lane===i||(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._computer.lane=i,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,i){this._renderDisposeables.clear();const n=document.createDocumentFragment();for(const s of i){const c=Uxt("div.hover-row.markdown-hover"),d=jn(c,Uxt("div.hover-contents")),f=this._renderDisposeables.add(this._markdownRenderer.render(s.value));d.appendChild(f.element),n.appendChild(c)}this._updateContents(n),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const i=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(e),s=this._editor.getScrollTop(),c=this._editor.getOption(67),d=this._hover.containerDomNode.clientHeight,f=n-s-(d-c)/2,m=i.glyphMarginLeft+i.glyphMarginWidth+(this._computer.lane==="lineNo"?i.lineNumbersWidth:0);this._hover.containerDomNode.style.left=`${m}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(f),0)}px`}_onMouseLeave(e){const i=this._editor.getDomNode();(!i||!Kwe(i,e.x,e.y))&&this.hide()}},bUe=sB,sB.ID="editor.contrib.modesGlyphHoverWidget",sB);CUe=bUe=p3i([zxt(1,Pf),zxt(2,Rb)],CUe);var m3i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},g3i=function(l,e){return function(i,n){e(i,n,l)}},g$;let kbe=(g$=class extends xi{constructor(e,i){super(),this._editor=e,this._instantiationService=i,this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new wn,this._hoverState={mouseDown:!1},this._reactToEditorMouseMoveRunner=this._register(new qu(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(60)&&(this._unhookListeners(),this._hookListeners())}))}_hookListeners(){const e=this._editor.getOption(60);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.hidingDelay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown(i=>this._onEditorMouseDown(i))),this._listenersStore.add(this._editor.onMouseUp(()=>this._onEditorMouseUp())),this._listenersStore.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._listenersStore.add(this._editor.onKeyDown(i=>this._onKeyDown(i)))):(this._listenersStore.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._listenersStore.add(this._editor.onKeyDown(i=>this._onKeyDown(i)))),this._listenersStore.add(this._editor.onMouseLeave(i=>this._onEditorMouseLeave(i))),this._listenersStore.add(this._editor.onDidChangeModel(()=>{this._cancelScheduler(),this._hideWidgets()})),this._listenersStore.add(this._editor.onDidChangeModelContent(()=>this._cancelScheduler())),this._listenersStore.add(this._editor.onDidScrollChange(i=>this._onEditorScrollChanged(i)))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0,!this._isMouseOnMarginHoverWidget(e)&&this._hideWidgets()}_isMouseOnMarginHoverWidget(e){var n;const i=(n=this._glyphWidget)==null?void 0:n.getDomNode();return i?Kwe(i,e.event.posx,e.event.posy):!1}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._cancelScheduler(),this._isMouseOnMarginHoverWidget(e))||this._hideWidgets()}_shouldNotRecomputeCurrentHoverWidget(e){const i=this._hoverSettings.sticky,n=this._isMouseOnMarginHoverWidget(e);return i&&n}_onEditorMouseMove(e){if(this.shouldKeepOpenOnEditorMouseMoveOrLeave)return;if(this._mouseMoveEvent=e,this._shouldNotRecomputeCurrentHoverWidget(e)){this._reactToEditorMouseMoveRunner.cancel();return}this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){!e||this._tryShowHoverWidget(e)||this._hideWidgets()}_tryShowHoverWidget(e){return this._getOrCreateGlyphWidget().showsOrWillShow(e)}_onKeyDown(e){this._editor.hasModel()&&(e.keyCode===5||e.keyCode===6||e.keyCode===57||e.keyCode===4||this._hideWidgets())}_hideWidgets(){var e;(e=this._glyphWidget)==null||e.hide()}_getOrCreateGlyphWidget(){return this._glyphWidget||(this._glyphWidget=this._instantiationService.createInstance(CUe,this._editor)),this._glyphWidget}dispose(){var e;super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),(e=this._glyphWidget)==null||e.dispose()}},g$.ID="editor.contrib.marginHover",g$);kbe=m3i([g3i(1,ho)],kbe);class y3i{}class v3i{}class b3i{}Cl(Dy.ID,Dy,2);Cl(kbe.ID,kbe,2);sr(e3i);sr(t3i);sr(i3i);sr(n3i);sr(r3i);sr(s3i);sr(o3i);sr(a3i);sr(c3i);sr(l3i);sr(u3i);sr(d3i);uW.register(jre);uW.register(vUe);Dk((l,e)=>{const i=l.getColor(OTt);i&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${i.transparent(.5)}; }`))});rxe.register(new y3i);rxe.register(new v3i);rxe.register(new b3i);function RC(l,e){let i=0;for(let n=0;n<l.length;n++)l.charAt(n)===" "?i+=e:i++;return i}function ine(l,e,i){l=l<0?0:l;let n="";if(!i){const s=Math.floor(l/e);l=l%e;for(let c=0;c<s;c++)n+=" "}for(let s=0;s<l;s++)n+=" ";return n}function mPt(l,e,i,n){if(l.getLineCount()===1&&l.getLineMaxColumn(1)===1)return[];const s=e.getLanguageConfiguration(l.getLanguageId()).indentRulesSupport;if(!s)return[];const c=new KJe(l,s,e);for(n=Math.min(n,l.getLineCount());i<=n&&c.shouldIgnore(i);)i++;if(i>n-1)return[];const{tabSize:d,indentSize:f,insertSpaces:m}=l.getOptions(),v=(z,J)=>(J=J||1,xk.shiftIndent(z,z.length+J,d,f,m)),x=(z,J)=>(J=J||1,xk.unshiftIndent(z,z.length+J,d,f,m)),w=[],I=l.getLineContent(i);let P=yd(I),O=P;c.shouldIncrease(i)?(O=v(O),P=v(P)):c.shouldIndentNextLine(i)&&(O=v(O)),i++;for(let z=i;z<=n;z++){if(C3i(l,z))continue;const J=l.getLineContent(z),Y=yd(J),ae=O;c.shouldDecrease(z,ae)&&(O=x(O),P=x(P)),Y!==O&&w.push(eh.replaceMove(new Us(z,1,z,Y.length+1),uJe(O,f,m))),!c.shouldIgnore(z)&&(c.shouldIncrease(z,ae)?(P=v(P),O=P):c.shouldIndentNextLine(z,ae)?O=v(O):O=P)}return w}function C3i(l,e){return l.tokenization.isCheapToTokenize(e)?l.tokenization.getLineTokens(e).getStandardTokenType(0)===2:!1}var S3i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},w3i=function(l,e){return function(i,n){e(i,n,l)}};const eSe=class eSe extends hs{constructor(){super({id:eSe.ID,label:W("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:Tt.writable,metadata:{description:aa("indentationToSpacesDescription","Convert the tab indentation to spaces.")}})}run(e,i){const n=i.getModel();if(!n)return;const s=n.getOptions(),c=i.getSelection();if(!c)return;const d=new E3i(c,s.tabSize);i.pushUndoStop(),i.executeCommands(this.id,[d]),i.pushUndoStop(),n.updateOptions({insertSpaces:!0})}};eSe.ID="editor.action.indentationToSpaces";let SUe=eSe;const tSe=class tSe extends hs{constructor(){super({id:tSe.ID,label:W("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:Tt.writable,metadata:{description:aa("indentationToTabsDescription","Convert the spaces indentation to tabs.")}})}run(e,i){const n=i.getModel();if(!n)return;const s=n.getOptions(),c=i.getSelection();if(!c)return;const d=new I3i(c,s.tabSize);i.pushUndoStop(),i.executeCommands(this.id,[d]),i.pushUndoStop(),n.updateOptions({insertSpaces:!1})}};tSe.ID="editor.action.indentationToTabs";let wUe=tSe;class lKe extends hs{constructor(e,i,n){super(n),this.insertSpaces=e,this.displaySizeOnly=i}run(e,i){const n=e.get(Ek),s=e.get(rf),c=i.getModel();if(!c)return;const d=s.getCreationOptions(c.getLanguageId(),c.uri,c.isForSimpleWidget),f=c.getOptions(),m=[1,2,3,4,5,6,7,8].map(x=>({id:x.toString(),label:x.toString(),description:x===d.tabSize&&x===f.tabSize?W("configuredTabSize","Configured Tab Size"):x===d.tabSize?W("defaultTabSize","Default Tab Size"):x===f.tabSize?W("currentTabSize","Current Tab Size"):void 0})),v=Math.min(c.getOptions().tabSize-1,7);setTimeout(()=>{n.pick(m,{placeHolder:W({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:m[v]}).then(x=>{if(x&&c&&!c.isDisposed()){const w=parseInt(x.label,10);this.displaySizeOnly?c.updateOptions({tabSize:w}):c.updateOptions({tabSize:w,indentSize:w,insertSpaces:this.insertSpaces})}})},50)}}const iSe=class iSe extends lKe{constructor(){super(!1,!1,{id:iSe.ID,label:W("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0,metadata:{description:aa("indentUsingTabsDescription","Use indentation with tabs.")}})}};iSe.ID="editor.action.indentUsingTabs";let xUe=iSe;const nSe=class nSe extends lKe{constructor(){super(!0,!1,{id:nSe.ID,label:W("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0,metadata:{description:aa("indentUsingSpacesDescription","Use indentation with spaces.")}})}};nSe.ID="editor.action.indentUsingSpaces";let kUe=nSe;const rSe=class rSe extends lKe{constructor(){super(!0,!0,{id:rSe.ID,label:W("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0,metadata:{description:aa("changeTabDisplaySizeDescription","Change the space size equivalent of the tab.")}})}};rSe.ID="editor.action.changeTabDisplaySize";let TUe=rSe;const sSe=class sSe extends hs{constructor(){super({id:sSe.ID,label:W("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0,metadata:{description:aa("detectIndentationDescription","Detect the indentation from content.")}})}run(e,i){const n=e.get(rf),s=i.getModel();if(!s)return;const c=n.getCreationOptions(s.getLanguageId(),s.uri,s.isForSimpleWidget);s.detectIndentation(c.insertSpaces,c.tabSize)}};sSe.ID="editor.action.detectIndentation";let DUe=sSe;class x3i extends hs{constructor(){super({id:"editor.action.reindentlines",label:W("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:Tt.writable,metadata:{description:aa("editor.reindentlinesDescription","Reindent the lines of the editor.")}})}run(e,i){const n=e.get(rh),s=i.getModel();if(!s)return;const c=mPt(s,n,1,s.getLineCount());c.length>0&&(i.pushUndoStop(),i.executeEdits(this.id,c),i.pushUndoStop())}}class k3i extends hs{constructor(){super({id:"editor.action.reindentselectedlines",label:W("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:Tt.writable,metadata:{description:aa("editor.reindentselectedlinesDescription","Reindent the selected lines of the editor.")}})}run(e,i){const n=e.get(rh),s=i.getModel();if(!s)return;const c=i.getSelections();if(c===null)return;const d=[];for(const f of c){let m=f.startLineNumber,v=f.endLineNumber;if(m!==v&&f.endColumn===1&&v--,m===1){if(m===v)continue}else m--;const x=mPt(s,n,m,v);d.push(...x)}d.length>0&&(i.pushUndoStop(),i.executeEdits(this.id,d),i.pushUndoStop())}}class T3i{constructor(e,i){this._initialSelection=i,this._edits=[],this._selectionId=null;for(const n of e)n.range&&typeof n.text=="string"&&this._edits.push(n)}getEditOperations(e,i){for(const s of this._edits)i.addEditOperation(nt.lift(s.range),s.text);let n=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(n=!0,this._selectionId=i.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(n=!0,this._selectionId=i.trackSelection(this._initialSelection,!1))),n||(this._selectionId=i.trackSelection(this._initialSelection))}computeCursorState(e,i){return i.getTrackedSelection(this._selectionId)}}var y$;let Tbe=(y$=class{constructor(e,i){this.editor=e,this._languageConfigurationService=i,this.callOnDispose=new wn,this.callOnModel=new wn,this.callOnDispose.add(e.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(e.onDidChangeModel(()=>this.update())),this.callOnDispose.add(e.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(12)<4||this.editor.getOption(55))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)}))}trigger(e){const i=this.editor.getSelections();if(i===null||i.length>1)return;const n=this.editor.getModel();if(!n||this.rangeContainsOnlyWhitespaceCharacters(n,e)||D3i(n,e)||!n.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const c=this.editor.getOption(12),{tabSize:d,indentSize:f,insertSpaces:m}=n.getOptions(),v=[],x={shiftIndent:O=>xk.shiftIndent(O,O.length+1,d,f,m),unshiftIndent:O=>xk.unshiftIndent(O,O.length+1,d,f,m)};let w=e.startLineNumber;for(;w<=e.endLineNumber;){if(this.shouldIgnoreLine(n,w)){w++;continue}break}if(w>e.endLineNumber)return;let I=n.getLineContent(w);if(!/\S/.test(I.substring(0,e.startColumn-1))){const O=zie(c,n,n.getLanguageId(),w,x,this._languageConfigurationService);if(O!==null){const z=yd(I),J=RC(O,d),Y=RC(z,d);if(J!==Y){const ae=ine(J,d,m);v.push({range:new nt(w,1,w,z.length+1),text:ae}),I=ae+I.substring(z.length)}else{const ae=bIt(n,w,this._languageConfigurationService);if(ae===0||ae===8)return}}}const P=w;for(;w<e.endLineNumber;){if(!/\S/.test(n.getLineContent(w+1))){w++;continue}break}if(w!==e.endLineNumber){const z=zie(c,{tokenization:{getLineTokens:J=>n.tokenization.getLineTokens(J),getLanguageId:()=>n.getLanguageId(),getLanguageIdAtPosition:(J,Y)=>n.getLanguageIdAtPosition(J,Y)},getLineContent:J=>J===P?I:n.getLineContent(J)},n.getLanguageId(),w+1,x,this._languageConfigurationService);if(z!==null){const J=RC(z,d),Y=RC(yd(n.getLineContent(w+1)),d);if(J!==Y){const ae=J-Y;for(let me=w+1;me<=e.endLineNumber;me++){const ye=n.getLineContent(me),Ce=yd(ye),rt=RC(Ce,d)+ae,ct=ine(rt,d,m);ct!==Ce&&v.push({range:new nt(me,1,me,Ce.length+1),text:ct})}}}}if(v.length>0){this.editor.pushUndoStop();const O=new T3i(v,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",O),this.editor.pushUndoStop()}}rangeContainsOnlyWhitespaceCharacters(e,i){const n=c=>c.trim().length===0;let s=!0;if(i.startLineNumber===i.endLineNumber){const d=e.getLineContent(i.startLineNumber).substring(i.startColumn-1,i.endColumn-1);s=n(d)}else for(let c=i.startLineNumber;c<=i.endLineNumber;c++){const d=e.getLineContent(c);if(c===i.startLineNumber){const f=d.substring(i.startColumn-1);s=n(f)}else if(c===i.endLineNumber){const f=d.substring(0,i.endColumn-1);s=n(f)}else s=e.getLineFirstNonWhitespaceColumn(c)===0;if(!s)break}return s}shouldIgnoreLine(e,i){e.tokenization.forceTokenization(i);const n=e.getLineFirstNonWhitespaceColumn(i);if(n===0)return!0;const s=e.tokenization.getLineTokens(i);if(s.getCount()>0){const c=s.findTokenIndexAtOffset(n);if(c>=0&&s.getStandardTokenType(c)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}},y$.ID="editor.contrib.autoIndentOnPaste",y$);Tbe=S3i([w3i(1,rh)],Tbe);function D3i(l,e){const i=n=>o0i(l,n)===2;return i(e.getStartPosition())||i(e.getEndPosition())}function gPt(l,e,i,n){if(l.getLineCount()===1&&l.getLineMaxColumn(1)===1)return;let s="";for(let d=0;d<i;d++)s+=" ";const c=new RegExp(s,"gi");for(let d=1,f=l.getLineCount();d<=f;d++){let m=l.getLineFirstNonWhitespaceColumn(d);if(m===0&&(m=l.getLineMaxColumn(d)),m===1)continue;const v=new nt(d,1,d,m),x=l.getValueInRange(v),w=n?x.replace(/\t/ig,s):x.replace(c," ");e.addEditOperation(v,w)}}class E3i{constructor(e,i){this.selection=e,this.tabSize=i,this.selectionId=null}getEditOperations(e,i){this.selectionId=i.trackSelection(this.selection),gPt(e,i,this.tabSize,!0)}computeCursorState(e,i){return i.getTrackedSelection(this.selectionId)}}class I3i{constructor(e,i){this.selection=e,this.tabSize=i,this.selectionId=null}getEditOperations(e,i){this.selectionId=i.trackSelection(this.selection),gPt(e,i,this.tabSize,!1)}computeCursorState(e,i){return i.getTrackedSelection(this.selectionId)}}Cl(Tbe.ID,Tbe,2);sr(SUe);sr(wUe);sr(xUe);sr(kUe);sr(TUe);sr(DUe);sr(x3i);sr(k3i);Cl(Ure.ID,Ure,1);uW.register(rbe);class N3i{constructor(e,i,n){this._editRange=e,this._originalSelection=i,this._text=n}getEditOperations(e,i){i.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,i){const s=i.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new Us(s.endLineNumber,Math.min(this._originalSelection.positionColumn,s.endColumn),s.endLineNumber,Math.min(this._originalSelection.positionColumn,s.endColumn)):new Us(s.endLineNumber,s.endColumn-this._text.length,s.endLineNumber,s.endColumn)}}var L3i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},P3i=function(l,e){return function(i,n){e(i,n,l)}},M1e,uR;let sJ=(uR=class{static get(e){return e.getContribution(M1e.ID)}constructor(e,i){this.editor=e,this.editorWorkerService=i,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,i){var m;(m=this.currentRequest)==null||m.cancel();const n=this.editor.getSelection(),s=this.editor.getModel();if(!s||!n)return;let c=n;if(c.startLineNumber!==c.endLineNumber)return;const d=new KIt(this.editor,5),f=s.uri;return this.editorWorkerService.canNavigateValueSet(f)?(this.currentRequest=Om(v=>this.editorWorkerService.navigateValueSet(f,c,i)),this.currentRequest.then(v=>{var O;if(!v||!v.range||!v.value||!d.validate(this.editor))return;const x=nt.lift(v.range);let w=v.range;const I=v.value.length-(c.endColumn-c.startColumn);w={startLineNumber:w.startLineNumber,startColumn:w.startColumn,endLineNumber:w.endLineNumber,endColumn:w.startColumn+v.value.length},I>1&&(c=new Us(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn+I-1));const P=new N3i(x,c,v.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,P),this.editor.pushUndoStop(),this.decorations.set([{range:w,options:M1e.DECORATION}]),(O=this.decorationRemover)==null||O.cancel(),this.decorationRemover=c6(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(Pa)}).catch(Pa)):Promise.resolve(void 0)}},M1e=uR,uR.ID="editor.contrib.inPlaceReplaceController",uR.DECORATION=qa.register({description:"in-place-replace",className:"valueSetReplacement"}),uR);sJ=M1e=L3i([P3i(1,Fb)],sJ);class A3i extends hs{constructor(){super({id:"editor.action.inPlaceReplace.up",label:W("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:Tt.writable,kbOpts:{kbExpr:Tt.editorTextFocus,primary:3159,weight:100}})}run(e,i){const n=sJ.get(i);return n?n.run(this.id,!1):Promise.resolve(void 0)}}class O3i extends hs{constructor(){super({id:"editor.action.inPlaceReplace.down",label:W("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:Tt.writable,kbOpts:{kbExpr:Tt.editorTextFocus,primary:3161,weight:100}})}run(e,i){const n=sJ.get(i);return n?n.run(this.id,!0):Promise.resolve(void 0)}}Cl(sJ.ID,sJ,4);sr(A3i);sr(O3i);class M3i extends hs{constructor(){super({id:"expandLineSelection",label:W("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:Tt.textInputFocus,primary:2090}})}run(e,i,n){if(n=n||{},!i.hasModel())return;const s=i._getViewModel();s.model.pushStackElement(),s.setCursorStates(n.source,3,t0.expandLineSelection(s,s.getCursorStates())),s.revealAllCursors(n.source,!0)}}sr(M3i);class R3i{constructor(e,i,n){this._selection=e,this._cursors=i,this._selectionId=null,this._trimInRegexesAndStrings=n}getEditOperations(e,i){const n=F3i(e,this._cursors,this._trimInRegexesAndStrings);for(let s=0,c=n.length;s<c;s++){const d=n[s];i.addEditOperation(d.range,d.text)}this._selectionId=i.trackSelection(this._selection)}computeCursorState(e,i){return i.getTrackedSelection(this._selectionId)}}function F3i(l,e,i){e.sort((f,m)=>f.lineNumber===m.lineNumber?f.column-m.column:f.lineNumber-m.lineNumber);for(let f=e.length-2;f>=0;f--)e[f].lineNumber===e[f+1].lineNumber&&e.splice(f,1);const n=[];let s=0,c=0;const d=e.length;for(let f=1,m=l.getLineCount();f<=m;f++){const v=l.getLineContent(f),x=v.length+1;let w=0;if(c<d&&e[c].lineNumber===f&&(w=e[c].column,c++,w===x)||v.length===0)continue;const I=ME(v);let P=0;if(I===-1)P=1;else if(I!==v.length-1)P=I+2;else continue;if(!i){if(!l.tokenization.hasAccurateTokensForLine(f))continue;const O=l.tokenization.getLineTokens(f),z=O.getStandardTokenType(O.findTokenIndexAtOffset(P));if(z===2||z===3)continue}P=Math.max(w,P),n[s++]=eh.delete(new nt(f,P,f,x))}return n}class yPt{constructor(e,i,n){this._selection=e,this._isCopyingDown=i,this._noop=n||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(e,i){let n=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,n.startLineNumber<n.endLineNumber&&n.endColumn===1&&(this._endLineNumberDelta=1,n=n.setEndPosition(n.endLineNumber-1,e.getLineMaxColumn(n.endLineNumber-1)));const s=[];for(let d=n.startLineNumber;d<=n.endLineNumber;d++)s.push(e.getLineContent(d));const c=s.join(`
+`);c===""&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?i.addEditOperation(new nt(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber+1,1),n.endLineNumber===e.getLineCount()?"":`
+`):this._isCopyingDown?i.addEditOperation(new nt(n.startLineNumber,1,n.startLineNumber,1),c+`
+`):i.addEditOperation(new nt(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),`
+`+c),this._selectionId=i.trackSelection(n),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,i){let n=i.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let s=n.startLineNumber,c=n.startColumn,d=n.endLineNumber,f=n.endColumn;this._startLineNumberDelta!==0&&(s=s+this._startLineNumberDelta,c=1),this._endLineNumberDelta!==0&&(d=d+this._endLineNumberDelta,f=1),n=Us.createWithDirection(s,c,d,f,this._selectionDirection)}return n}}var B3i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},W3i=function(l,e){return function(i,n){e(i,n,l)}};let EUe=class{constructor(e,i,n,s){this._languageConfigurationService=s,this._selection=e,this._isMovingDown=i,this._autoIndent=n,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,i){const n=()=>e.getLanguageId(),s=(w,I)=>e.getLanguageIdAtPosition(w,I),c=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===c){this._selectionId=i.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=i.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let d=this._selection;d.startLineNumber<d.endLineNumber&&d.endColumn===1&&(this._moveEndPositionDown=!0,d=d.setEndPosition(d.endLineNumber-1,e.getLineMaxColumn(d.endLineNumber-1)));const{tabSize:f,indentSize:m,insertSpaces:v}=e.getOptions(),x=this.buildIndentConverter(f,m,v);if(d.startLineNumber===d.endLineNumber&&e.getLineMaxColumn(d.startLineNumber)===1){const w=d.startLineNumber,I=this._isMovingDown?w+1:w-1;e.getLineMaxColumn(I)===1?i.addEditOperation(new nt(1,1,1,1),null):(i.addEditOperation(new nt(w,1,w,1),e.getLineContent(I)),i.addEditOperation(new nt(I,1,I,e.getLineMaxColumn(I)),null)),d=new Us(I,1,I,1)}else{let w,I;if(this._isMovingDown){w=d.endLineNumber+1,I=e.getLineContent(w),i.addEditOperation(new nt(w-1,e.getLineMaxColumn(w-1),w,e.getLineMaxColumn(w)),null);let P=I;if(this.shouldAutoIndent(e,d)){const O=this.matchEnterRule(e,x,f,w,d.startLineNumber-1);if(O!==null){const J=yd(e.getLineContent(w)),Y=O+RC(J,f);P=ine(Y,f,v)+this.trimStart(I)}else{const J={tokenization:{getLineTokens:ae=>ae===d.startLineNumber?e.tokenization.getLineTokens(w):e.tokenization.getLineTokens(ae),getLanguageId:n,getLanguageIdAtPosition:s},getLineContent:ae=>ae===d.startLineNumber?e.getLineContent(w):e.getLineContent(ae)},Y=zie(this._autoIndent,J,e.getLanguageIdAtPosition(w,1),d.startLineNumber,x,this._languageConfigurationService);if(Y!==null){const ae=yd(e.getLineContent(w)),me=RC(Y,f),ye=RC(ae,f);me!==ye&&(P=ine(me,f,v)+this.trimStart(I))}}i.addEditOperation(new nt(d.startLineNumber,1,d.startLineNumber,1),P+`
+`);const z=this.matchEnterRuleMovingDown(e,x,f,d.startLineNumber,w,P);if(z!==null)z!==0&&this.getIndentEditsOfMovingBlock(e,i,d,f,v,z);else{const J={tokenization:{getLineTokens:ae=>ae===d.startLineNumber?e.tokenization.getLineTokens(w):ae>=d.startLineNumber+1&&ae<=d.endLineNumber+1?e.tokenization.getLineTokens(ae-1):e.tokenization.getLineTokens(ae),getLanguageId:n,getLanguageIdAtPosition:s},getLineContent:ae=>ae===d.startLineNumber?P:ae>=d.startLineNumber+1&&ae<=d.endLineNumber+1?e.getLineContent(ae-1):e.getLineContent(ae)},Y=zie(this._autoIndent,J,e.getLanguageIdAtPosition(w,1),d.startLineNumber+1,x,this._languageConfigurationService);if(Y!==null){const ae=yd(e.getLineContent(d.startLineNumber)),me=RC(Y,f),ye=RC(ae,f);if(me!==ye){const Ce=me-ye;this.getIndentEditsOfMovingBlock(e,i,d,f,v,Ce)}}}}else i.addEditOperation(new nt(d.startLineNumber,1,d.startLineNumber,1),P+`
+`)}else if(w=d.startLineNumber-1,I=e.getLineContent(w),i.addEditOperation(new nt(w,1,w+1,1),null),i.addEditOperation(new nt(d.endLineNumber,e.getLineMaxColumn(d.endLineNumber),d.endLineNumber,e.getLineMaxColumn(d.endLineNumber)),`
+`+I),this.shouldAutoIndent(e,d)){const P={tokenization:{getLineTokens:z=>z===w?e.tokenization.getLineTokens(d.startLineNumber):e.tokenization.getLineTokens(z),getLanguageId:n,getLanguageIdAtPosition:s},getLineContent:z=>z===w?e.getLineContent(d.startLineNumber):e.getLineContent(z)},O=this.matchEnterRule(e,x,f,d.startLineNumber,d.startLineNumber-2);if(O!==null)O!==0&&this.getIndentEditsOfMovingBlock(e,i,d,f,v,O);else{const z=zie(this._autoIndent,P,e.getLanguageIdAtPosition(d.startLineNumber,1),w,x,this._languageConfigurationService);if(z!==null){const J=yd(e.getLineContent(d.startLineNumber)),Y=RC(z,f),ae=RC(J,f);if(Y!==ae){const me=Y-ae;this.getIndentEditsOfMovingBlock(e,i,d,f,v,me)}}}}}this._selectionId=i.trackSelection(d)}buildIndentConverter(e,i,n){return{shiftIndent:s=>xk.shiftIndent(s,s.length+1,e,i,n),unshiftIndent:s=>xk.unshiftIndent(s,s.length+1,e,i,n)}}parseEnterResult(e,i,n,s,c){if(c){let d=c.indentation;c.indentAction===_p.None||c.indentAction===_p.Indent?d=c.indentation+c.appendText:c.indentAction===_p.IndentOutdent?d=c.indentation:c.indentAction===_p.Outdent&&(d=i.unshiftIndent(c.indentation)+c.appendText);const f=e.getLineContent(s);if(this.trimStart(f).indexOf(this.trimStart(d))>=0){const m=yd(e.getLineContent(s));let v=yd(d);const x=bIt(e,s,this._languageConfigurationService);x!==null&&x&2&&(v=i.unshiftIndent(v));const w=RC(v,n),I=RC(m,n);return w-I}}return null}matchEnterRuleMovingDown(e,i,n,s,c,d){if(ME(d)>=0){const f=e.getLineMaxColumn(c),m=r$(this._autoIndent,e,new nt(c,f,c,f),this._languageConfigurationService);return this.parseEnterResult(e,i,n,s,m)}else{let f=s-1;for(;f>=1;){const x=e.getLineContent(f);if(ME(x)>=0)break;f--}if(f<1||s>e.getLineCount())return null;const m=e.getLineMaxColumn(f),v=r$(this._autoIndent,e,new nt(f,m,f,m),this._languageConfigurationService);return this.parseEnterResult(e,i,n,s,v)}}matchEnterRule(e,i,n,s,c,d){let f=c;for(;f>=1;){let x;if(f===c&&d!==void 0?x=d:x=e.getLineContent(f),ME(x)>=0)break;f--}if(f<1||s>e.getLineCount())return null;const m=e.getLineMaxColumn(f),v=r$(this._autoIndent,e,new nt(f,m,f,m),this._languageConfigurationService);return this.parseEnterResult(e,i,n,s,v)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,i){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(i.startLineNumber))return!1;const n=e.getLanguageIdAtPosition(i.startLineNumber,1),s=e.getLanguageIdAtPosition(i.endLineNumber,1);return!(n!==s||this._languageConfigurationService.getLanguageConfiguration(n).indentRulesSupport===null)}getIndentEditsOfMovingBlock(e,i,n,s,c,d){for(let f=n.startLineNumber;f<=n.endLineNumber;f++){const m=e.getLineContent(f),v=yd(m),w=RC(v,s)+d,I=ine(w,s,c);I!==v&&(i.addEditOperation(new nt(f,1,f,v.length+1),I),f===n.endLineNumber&&n.endColumn<=v.length+1&&I===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,i){let n=i.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber<n.endLineNumber&&(n=n.setEndPosition(n.endLineNumber,2)),n}};EUe=B3i([W3i(3,rh)],EUe);const Rq=class Rq{static getCollator(){return Rq._COLLATOR||(Rq._COLLATOR=new Intl.Collator),Rq._COLLATOR}constructor(e,i){this.selection=e,this.descending=i,this.selectionId=null}getEditOperations(e,i){const n=V3i(e,this.selection,this.descending);n&&i.addEditOperation(n.range,n.text),this.selectionId=i.trackSelection(this.selection)}computeCursorState(e,i){return i.getTrackedSelection(this.selectionId)}static canRun(e,i,n){if(e===null)return!1;const s=vPt(e,i,n);if(!s)return!1;for(let c=0,d=s.before.length;c<d;c++)if(s.before[c]!==s.after[c])return!0;return!1}};Rq._COLLATOR=null;let Kre=Rq;function vPt(l,e,i){const n=e.startLineNumber;let s=e.endLineNumber;if(e.endColumn===1&&s--,n>=s)return null;const c=[];for(let f=n;f<=s;f++)c.push(l.getLineContent(f));let d=c.slice(0);return d.sort(Kre.getCollator().compare),i===!0&&(d=d.reverse()),{startLineNumber:n,endLineNumber:s,before:c,after:d}}function V3i(l,e,i){const n=vPt(l,e,i);return n?eh.replace(new nt(n.startLineNumber,1,n.endLineNumber,l.getLineMaxColumn(n.endLineNumber)),n.after.join(`
+`)):null}class bPt extends hs{constructor(e,i){super(i),this.down=e}run(e,i){if(!i.hasModel())return;const n=i.getSelections().map((d,f)=>({selection:d,index:f,ignore:!1}));n.sort((d,f)=>nt.compareRangesUsingStarts(d.selection,f.selection));let s=n[0];for(let d=1;d<n.length;d++){const f=n[d];s.selection.endLineNumber===f.selection.startLineNumber&&(s.index<f.index?f.ignore=!0:(s.ignore=!0,s=f))}const c=[];for(const d of n)c.push(new yPt(d.selection,this.down,d.ignore));i.pushUndoStop(),i.executeCommands(this.id,c),i.pushUndoStop()}}class H3i extends bPt{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:W("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:Tt.writable,kbOpts:{kbExpr:Tt.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:As.MenubarSelectionMenu,group:"2_line",title:W({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}class j3i extends bPt{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:W("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:Tt.writable,kbOpts:{kbExpr:Tt.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:As.MenubarSelectionMenu,group:"2_line",title:W({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}class z3i extends hs{constructor(){super({id:"editor.action.duplicateSelection",label:W("duplicateSelection","Duplicate Selection"),alias:"Duplicate Selection",precondition:Tt.writable,menuOpts:{menuId:As.MenubarSelectionMenu,group:"2_line",title:W({key:"miDuplicateSelection",comment:["&& denotes a mnemonic"]},"&&Duplicate Selection"),order:5}})}run(e,i,n){if(!i.hasModel())return;const s=[],c=i.getSelections(),d=i.getModel();for(const f of c)if(f.isEmpty())s.push(new yPt(f,!0));else{const m=new Us(f.endLineNumber,f.endColumn,f.endLineNumber,f.endColumn);s.push(new Wxi(m,d.getValueInRange(f)))}i.pushUndoStop(),i.executeCommands(this.id,s),i.pushUndoStop()}}class CPt extends hs{constructor(e,i){super(i),this.down=e}run(e,i){const n=e.get(rh),s=[],c=i.getSelections()||[],d=i.getOption(12);for(const f of c)s.push(new EUe(f,this.down,d,n));i.pushUndoStop(),i.executeCommands(this.id,s),i.pushUndoStop()}}class U3i extends CPt{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:W("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:Tt.writable,kbOpts:{kbExpr:Tt.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:As.MenubarSelectionMenu,group:"2_line",title:W({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}class q3i extends CPt{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:W("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:Tt.writable,kbOpts:{kbExpr:Tt.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:As.MenubarSelectionMenu,group:"2_line",title:W({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}class SPt extends hs{constructor(e,i){super(i),this.descending=e}run(e,i){if(!i.hasModel())return;const n=i.getModel();let s=i.getSelections();s.length===1&&s[0].isEmpty()&&(s=[new Us(1,1,n.getLineCount(),n.getLineMaxColumn(n.getLineCount()))]);for(const d of s)if(!Kre.canRun(i.getModel(),d,this.descending))return;const c=[];for(let d=0,f=s.length;d<f;d++)c[d]=new Kre(s[d],this.descending);i.pushUndoStop(),i.executeCommands(this.id,c),i.pushUndoStop()}}class $3i extends SPt{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:W("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:Tt.writable})}}class J3i extends SPt{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:W("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:Tt.writable})}}class G3i extends hs{constructor(){super({id:"editor.action.removeDuplicateLines",label:W("lines.deleteDuplicates","Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:Tt.writable})}run(e,i){if(!i.hasModel())return;const n=i.getModel();if(n.getLineCount()===1&&n.getLineMaxColumn(1)===1)return;const s=[],c=[];let d=0,f=!0,m=i.getSelections();m.length===1&&m[0].isEmpty()&&(m=[new Us(1,1,n.getLineCount(),n.getLineMaxColumn(n.getLineCount()))],f=!1);for(const v of m){const x=new Set,w=[];for(let z=v.startLineNumber;z<=v.endLineNumber;z++){const J=n.getLineContent(z);x.has(J)||(w.push(J),x.add(J))}const I=new Us(v.startLineNumber,1,v.endLineNumber,n.getLineMaxColumn(v.endLineNumber)),P=v.startLineNumber-d,O=new Us(P,1,P+w.length-1,w[w.length-1].length);s.push(eh.replace(I,w.join(`
+`))),c.push(O),d+=v.endLineNumber-v.startLineNumber+1-w.length}i.pushUndoStop(),i.executeEdits(this.id,s,f?c:void 0),i.pushUndoStop()}}const oSe=class oSe extends hs{constructor(){super({id:oSe.ID,label:W("lines.trimTrailingWhitespace","Trim Trailing Whitespace"),alias:"Trim Trailing Whitespace",precondition:Tt.writable,kbOpts:{kbExpr:Tt.editorTextFocus,primary:pp(2089,2102),weight:100}})}run(e,i,n){let s=[];n.reason==="auto-save"&&(s=(i.getSelections()||[]).map(x=>new pi(x.positionLineNumber,x.positionColumn)));const c=i.getSelection();if(c===null)return;const d=e.get(Cc),f=i.getModel(),m=d.getValue("files.trimTrailingWhitespaceInRegexAndStrings",{overrideIdentifier:f==null?void 0:f.getLanguageId(),resource:f==null?void 0:f.uri}),v=new R3i(c,s,m);i.pushUndoStop(),i.executeCommands(this.id,[v]),i.pushUndoStop()}};oSe.ID="editor.action.trimTrailingWhitespace";let IUe=oSe;class K3i extends hs{constructor(){super({id:"editor.action.deleteLines",label:W("lines.delete","Delete Line"),alias:"Delete Line",precondition:Tt.writable,kbOpts:{kbExpr:Tt.textInputFocus,primary:3113,weight:100}})}run(e,i){if(!i.hasModel())return;const n=this._getLinesToRemove(i),s=i.getModel();if(s.getLineCount()===1&&s.getLineMaxColumn(1)===1)return;let c=0;const d=[],f=[];for(let m=0,v=n.length;m<v;m++){const x=n[m];let w=x.startLineNumber,I=x.endLineNumber,P=1,O=s.getLineMaxColumn(I);I<s.getLineCount()?(I+=1,O=1):w>1&&(w-=1,P=s.getLineMaxColumn(w)),d.push(eh.replace(new Us(w,P,I,O),"")),f.push(new Us(w-c,x.positionColumn,w-c,x.positionColumn)),c+=x.endLineNumber-x.startLineNumber+1}i.pushUndoStop(),i.executeEdits(this.id,d,f),i.pushUndoStop()}_getLinesToRemove(e){const i=e.getSelections().map(c=>{let d=c.endLineNumber;return c.startLineNumber<c.endLineNumber&&c.endColumn===1&&(d-=1),{startLineNumber:c.startLineNumber,selectionStartColumn:c.selectionStartColumn,endLineNumber:d,positionColumn:c.positionColumn}});i.sort((c,d)=>c.startLineNumber===d.startLineNumber?c.endLineNumber-d.endLineNumber:c.startLineNumber-d.startLineNumber);const n=[];let s=i[0];for(let c=1;c<i.length;c++)s.endLineNumber+1>=i[c].startLineNumber?s.endLineNumber=i[c].endLineNumber:(n.push(s),s=i[c]);return n.push(s),n}}class X3i extends hs{constructor(){super({id:"editor.action.indentLines",label:W("lines.indent","Indent Line"),alias:"Indent Line",precondition:Tt.writable,kbOpts:{kbExpr:Tt.editorTextFocus,primary:2142,weight:100}})}run(e,i){const n=i._getViewModel();n&&(i.pushUndoStop(),i.executeCommands(this.id,DM.indent(n.cursorConfig,i.getModel(),i.getSelections())),i.pushUndoStop())}}class Q3i extends hs{constructor(){super({id:"editor.action.outdentLines",label:W("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:Tt.writable,kbOpts:{kbExpr:Tt.editorTextFocus,primary:2140,weight:100}})}run(e,i){s$.Outdent.runEditorCommand(e,i,null)}}class Z3i extends hs{constructor(){super({id:"editor.action.insertLineBefore",label:W("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:Tt.writable,kbOpts:{kbExpr:Tt.editorTextFocus,primary:3075,weight:100}})}run(e,i){const n=i._getViewModel();n&&(i.pushUndoStop(),i.executeCommands(this.id,Owe.lineInsertBefore(n.cursorConfig,i.getModel(),i.getSelections())))}}class Y3i extends hs{constructor(){super({id:"editor.action.insertLineAfter",label:W("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:Tt.writable,kbOpts:{kbExpr:Tt.editorTextFocus,primary:2051,weight:100}})}run(e,i){const n=i._getViewModel();n&&(i.pushUndoStop(),i.executeCommands(this.id,Owe.lineInsertAfter(n.cursorConfig,i.getModel(),i.getSelections())))}}class wPt extends hs{run(e,i){if(!i.hasModel())return;const n=i.getSelection(),s=this._getRangesToDelete(i),c=[];for(let m=0,v=s.length-1;m<v;m++){const x=s[m],w=s[m+1];nt.intersectRanges(x,w)===null?c.push(x):s[m+1]=nt.plusRange(x,w)}c.push(s[s.length-1]);const d=this._getEndCursorState(n,c),f=c.map(m=>eh.replace(m,""));i.pushUndoStop(),i.executeEdits(this.id,f,d),i.pushUndoStop()}}class eOi extends wPt{constructor(){super({id:"deleteAllLeft",label:W("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:Tt.writable,kbOpts:{kbExpr:Tt.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,i){let n=null;const s=[];let c=0;return i.forEach(d=>{let f;if(d.endColumn===1&&c>0){const m=d.startLineNumber-c;f=new Us(m,d.startColumn,m,d.startColumn)}else f=new Us(d.startLineNumber,d.startColumn,d.startLineNumber,d.startColumn);c+=d.endLineNumber-d.startLineNumber,d.intersectRanges(e)?n=f:s.push(f)}),n&&s.unshift(n),s}_getRangesToDelete(e){const i=e.getSelections();if(i===null)return[];let n=i;const s=e.getModel();return s===null?[]:(n.sort(nt.compareRangesUsingStarts),n=n.map(c=>{if(c.isEmpty())if(c.startColumn===1){const d=Math.max(1,c.startLineNumber-1),f=c.startLineNumber===1?1:s.getLineLength(d)+1;return new nt(d,f,c.startLineNumber,1)}else return new nt(c.startLineNumber,1,c.startLineNumber,c.startColumn);else return new nt(c.startLineNumber,1,c.endLineNumber,c.endColumn)}),n)}}class tOi extends wPt{constructor(){super({id:"deleteAllRight",label:W("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:Tt.writable,kbOpts:{kbExpr:Tt.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,i){let n=null;const s=[];for(let c=0,d=i.length,f=0;c<d;c++){const m=i[c],v=new Us(m.startLineNumber-f,m.startColumn,m.startLineNumber-f,m.startColumn);m.intersectRanges(e)?n=v:s.push(v)}return n&&s.unshift(n),s}_getRangesToDelete(e){const i=e.getModel();if(i===null)return[];const n=e.getSelections();if(n===null)return[];const s=n.map(c=>{if(c.isEmpty()){const d=i.getLineMaxColumn(c.startLineNumber);return c.startColumn===d?new nt(c.startLineNumber,c.startColumn,c.startLineNumber+1,1):new nt(c.startLineNumber,c.startColumn,c.startLineNumber,d)}return c});return s.sort(nt.compareRangesUsingStarts),s}}class iOi extends hs{constructor(){super({id:"editor.action.joinLines",label:W("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:Tt.writable,kbOpts:{kbExpr:Tt.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,i){const n=i.getSelections();if(n===null)return;let s=i.getSelection();if(s===null)return;n.sort(nt.compareRangesUsingStarts);const c=[],d=n.reduce((I,P)=>I.isEmpty()?I.endLineNumber===P.startLineNumber?(s.equalsSelection(I)&&(s=P),P):P.startLineNumber>I.endLineNumber+1?(c.push(I),P):new Us(I.startLineNumber,I.startColumn,P.endLineNumber,P.endColumn):P.startLineNumber>I.endLineNumber?(c.push(I),P):new Us(I.startLineNumber,I.startColumn,P.endLineNumber,P.endColumn));c.push(d);const f=i.getModel();if(f===null)return;const m=[],v=[];let x=s,w=0;for(let I=0,P=c.length;I<P;I++){const O=c[I],z=O.startLineNumber,J=1;let Y=0,ae,me;const ye=f.getLineLength(O.endLineNumber)-O.endColumn;if(O.isEmpty()||O.startLineNumber===O.endLineNumber){const rt=O.getStartPosition();rt.lineNumber<f.getLineCount()?(ae=z+1,me=f.getLineMaxColumn(ae)):(ae=rt.lineNumber,me=f.getLineMaxColumn(rt.lineNumber))}else ae=O.endLineNumber,me=f.getLineMaxColumn(ae);let Ce=f.getLineContent(z);for(let rt=z+1;rt<=ae;rt++){const ct=f.getLineContent(rt),Mt=f.getLineFirstNonWhitespaceColumn(rt);if(Mt>=1){let Yt=!0;Ce===""&&(Yt=!1),Yt&&(Ce.charAt(Ce.length-1)===" "||Ce.charAt(Ce.length-1)===" ")&&(Yt=!1,Ce=Ce.replace(/[\s\uFEFF\xA0]+$/g," "));const Bi=ct.substr(Mt-1);Ce+=(Yt?" ":"")+Bi,Yt?Y=Bi.length+1:Y=Bi.length}else Y=0}const Fe=new nt(z,J,ae,me);if(!Fe.isEmpty()){let rt;O.isEmpty()?(m.push(eh.replace(Fe,Ce)),rt=new Us(Fe.startLineNumber-w,Ce.length-Y+1,z-w,Ce.length-Y+1)):O.startLineNumber===O.endLineNumber?(m.push(eh.replace(Fe,Ce)),rt=new Us(O.startLineNumber-w,O.startColumn,O.endLineNumber-w,O.endColumn)):(m.push(eh.replace(Fe,Ce)),rt=new Us(O.startLineNumber-w,O.startColumn,O.startLineNumber-w,Ce.length-ye)),nt.intersectRanges(Fe,s)!==null?x=rt:v.push(rt)}w+=Fe.endLineNumber-Fe.startLineNumber}v.unshift(x),i.pushUndoStop(),i.executeEdits(this.id,m,v),i.pushUndoStop()}}class nOi extends hs{constructor(){super({id:"editor.action.transpose",label:W("editor.transpose","Transpose Characters around the Cursor"),alias:"Transpose Characters around the Cursor",precondition:Tt.writable})}run(e,i){const n=i.getSelections();if(n===null)return;const s=i.getModel();if(s===null)return;const c=[];for(let d=0,f=n.length;d<f;d++){const m=n[d];if(!m.isEmpty())continue;const v=m.getStartPosition(),x=s.getLineMaxColumn(v.lineNumber);if(v.column>=x){if(v.lineNumber===s.getLineCount())continue;const w=new nt(v.lineNumber,Math.max(1,v.column-1),v.lineNumber+1,1),I=s.getValueInRange(w).split("").reverse().join("");c.push(new T0(new Us(v.lineNumber,Math.max(1,v.column-1),v.lineNumber+1,1),I))}else{const w=new nt(v.lineNumber,Math.max(1,v.column-1),v.lineNumber,v.column+1),I=s.getValueInRange(w).split("").reverse().join("");c.push(new GJe(w,I,new Us(v.lineNumber,v.column+1,v.lineNumber,v.column+1)))}}i.pushUndoStop(),i.executeCommands(this.id,c),i.pushUndoStop()}}class hW extends hs{run(e,i){const n=i.getSelections();if(n===null)return;const s=i.getModel();if(s===null)return;const c=i.getOption(132),d=[];for(const f of n)if(f.isEmpty()){const m=f.getStartPosition(),v=i.getConfiguredWordAtPosition(m);if(!v)continue;const x=new nt(m.lineNumber,v.startColumn,m.lineNumber,v.endColumn),w=s.getValueInRange(x);d.push(eh.replace(x,this._modifyText(w,c)))}else{const m=s.getValueInRange(f);d.push(eh.replace(f,this._modifyText(m,c)))}i.pushUndoStop(),i.executeEdits(this.id,d),i.pushUndoStop()}}class rOi extends hW{constructor(){super({id:"editor.action.transformToUppercase",label:W("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:Tt.writable})}_modifyText(e,i){return e.toLocaleUpperCase()}}class sOi extends hW{constructor(){super({id:"editor.action.transformToLowercase",label:W("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:Tt.writable})}_modifyText(e,i){return e.toLocaleLowerCase()}}class n6{constructor(e,i){this._pattern=e,this._flags=i,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch{}}return this._actual}isSupported(){return this.get()!==null}}const aSe=class aSe extends hW{constructor(){super({id:"editor.action.transformToTitlecase",label:W("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:Tt.writable})}_modifyText(e,i){const n=aSe.titleBoundary.get();return n?e.toLocaleLowerCase().replace(n,s=>s.toLocaleUpperCase()):e}};aSe.titleBoundary=new n6("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");let Dbe=aSe;const Fq=class Fq extends hW{constructor(){super({id:"editor.action.transformToSnakecase",label:W("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:Tt.writable})}_modifyText(e,i){const n=Fq.caseBoundary.get(),s=Fq.singleLetters.get();return!n||!s?e:e.replace(n,"$1_$2").replace(s,"$1_$2$3").toLocaleLowerCase()}};Fq.caseBoundary=new n6("(\\p{Ll})(\\p{Lu})","gmu"),Fq.singleLetters=new n6("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");let nne=Fq;const cSe=class cSe extends hW{constructor(){super({id:"editor.action.transformToCamelcase",label:W("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:Tt.writable})}_modifyText(e,i){const n=cSe.wordBoundary.get();if(!n)return e;const s=e.split(n);return s.shift()+s.map(d=>d.substring(0,1).toLocaleUpperCase()+d.substring(1)).join("")}};cSe.wordBoundary=new n6("[_\\s-]","gm");let Ebe=cSe;const Bq=class Bq extends hW{constructor(){super({id:"editor.action.transformToPascalcase",label:W("editor.transformToPascalcase","Transform to Pascal Case"),alias:"Transform to Pascal Case",precondition:Tt.writable})}_modifyText(e,i){const n=Bq.wordBoundary.get(),s=Bq.wordBoundaryToMaintain.get();return!n||!s?e:e.split(s).map(f=>f.split(n)).flat().map(f=>f.substring(0,1).toLocaleUpperCase()+f.substring(1)).join("")}};Bq.wordBoundary=new n6("[_\\s-]","gm"),Bq.wordBoundaryToMaintain=new n6("(?<=\\.)","gm");let Ibe=Bq;const CM=class CM extends hW{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(i=>i.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:W("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:Tt.writable})}_modifyText(e,i){const n=CM.caseBoundary.get(),s=CM.singleLetters.get(),c=CM.underscoreBoundary.get();return!n||!s||!c?e:e.replace(c,"$1-$3").replace(n,"$1-$2").replace(s,"$1-$2").toLocaleLowerCase()}};CM.caseBoundary=new n6("(\\p{Ll})(\\p{Lu})","gmu"),CM.singleLetters=new n6("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu"),CM.underscoreBoundary=new n6("(\\S)(_)(\\S)","gm");let Nbe=CM;sr(H3i);sr(j3i);sr(z3i);sr(U3i);sr(q3i);sr($3i);sr(J3i);sr(G3i);sr(IUe);sr(K3i);sr(X3i);sr(Q3i);sr(Z3i);sr(Y3i);sr(eOi);sr(tOi);sr(iOi);sr(nOi);sr(rOi);sr(sOi);nne.caseBoundary.isSupported()&&nne.singleLetters.isSupported()&&sr(nne);Ebe.wordBoundary.isSupported()&&sr(Ebe);Ibe.wordBoundary.isSupported()&&sr(Ibe);Dbe.titleBoundary.isSupported()&&sr(Dbe);Nbe.isSupported()&&sr(Nbe);var oOi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},G0e=function(l,e){return function(i,n){e(i,n,l)}},R1e;const xPt=new rs("LinkedEditingInputVisible",!1),aOi="linked-editing-decoration";var dR;let oJ=(dR=class extends xi{static get(e){return e.getContribution(R1e.ID)}constructor(e,i,n,s,c){super(),this.languageConfigurationService=s,this._syncRangesToken=0,this._localToDispose=this._register(new wn),this._editor=e,this._providers=n.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=xPt.bindTo(i),this._debounceInformation=c.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new wn),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequestCts=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(d=>{(d.hasChanged(70)||d.hasChanged(94))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(e){const i=this._editor.getModel(),n=i!==null&&(this._editor.getOption(70)||this._editor.getOption(94))&&this._providers.has(i);if(n===this._enabled&&!e||(this._enabled=n,this.clearRanges(),this._localToDispose.clear(),!n||i===null))return;this._localToDispose.add(Tr.runAndSubscribe(i.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(i.getLanguageId()).getWordDefinition()}));const s=new Ck(this._debounceInformation.get(i)),c=()=>{this._rangeUpdateTriggerPromise=s.trigger(()=>this.updateRanges(),this._debounceDuration??this._debounceInformation.get(i))},d=new Ck(0),f=m=>{this._rangeSyncTriggerPromise=d.trigger(()=>this._syncRanges(m))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{c()})),this._localToDispose.add(this._editor.onDidChangeModelContent(m=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const v=this._currentDecorations.getRange(0);if(v&&m.changes.every(x=>v.intersectRanges(x.range))){f(this._syncRangesToken);return}}c()})),this._localToDispose.add({dispose:()=>{s.dispose(),d.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||this._currentDecorations.length===0)return;const i=this._editor.getModel(),n=this._currentDecorations.getRange(0);if(!n||n.startLineNumber!==n.endLineNumber)return this.clearRanges();const s=i.getValueInRange(n);if(this._currentWordPattern){const d=s.match(this._currentWordPattern);if((d?d[0].length:0)!==s.length)return this.clearRanges()}const c=[];for(let d=1,f=this._currentDecorations.length;d<f;d++){const m=this._currentDecorations.getRange(d);if(m)if(m.startLineNumber!==m.endLineNumber)c.push({range:m,text:s});else{let v=i.getValueInRange(m),x=s,w=m.startColumn,I=m.endColumn;const P=vR(v,x);w+=P,v=v.substr(P),x=x.substr(P);const O=iye(v,x);I-=O,v=v.substr(0,v.length-O),x=x.substr(0,x.length-O),(w!==I||x.length!==0)&&c.push({range:new nt(m.startLineNumber,w,m.endLineNumber,I),text:x})}}if(c.length!==0)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;const d=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",c),this._editor._getViewModel().setPrevEditOperationType(d)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations.clear(),this._currentRequestCts&&(this._currentRequestCts.cancel(),this._currentRequestCts=null,this._currentRequestPosition=null)}async updateRanges(e=!1){if(!this._editor.hasModel()){this.clearRanges();return}const i=this._editor.getPosition();if(!this._enabled&&!e||this._editor.getSelections().length>1){this.clearRanges();return}const n=this._editor.getModel(),s=n.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===s){if(i.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const d=this._currentDecorations.getRange(0);if(d&&d.containsPosition(i))return}}this.clearRanges(),this._currentRequestPosition=i,this._currentRequestModelVersion=s;const c=this._currentRequestCts=new ih;try{const d=new bg(!1),f=await kPt(this._providers,n,i,c.token);if(this._debounceInformation.update(n,d.elapsed()),c!==this._currentRequestCts||(this._currentRequestCts=null,s!==n.getVersionId()))return;let m=[];f!=null&&f.ranges&&(m=f.ranges),this._currentWordPattern=(f==null?void 0:f.wordPattern)||this._languageWordPattern;let v=!1;for(let w=0,I=m.length;w<I;w++)if(nt.containsPosition(m[w],i)){if(v=!0,w!==0){const P=m[w];m.splice(w,1),m.unshift(P)}break}if(!v){this.clearRanges();return}const x=m.map(w=>({range:w,options:R1e.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(x),this._syncRangesToken++}catch(d){Tk(d)||Pa(d),(this._currentRequestCts===c||!this._currentRequestCts)&&this.clearRanges()}}},R1e=dR,dR.ID="editor.contrib.linkedEditing",dR.DECORATION=qa.register({description:"linked-editing",stickiness:0,className:aOi}),dR);oJ=R1e=oOi([G0e(1,Ko),G0e(2,Ts),G0e(3,rh),G0e(4,Pw)],oJ);class cOi extends hs{constructor(){super({id:"editor.action.linkedEditing",label:W("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:kn.and(Tt.writable,Tt.hasRenameProvider),kbOpts:{kbExpr:Tt.editorTextFocus,primary:3132,weight:100}})}runCommand(e,i){const n=e.get(Bl),[s,c]=Array.isArray(i)&&i||[void 0,void 0];return yo.isUri(s)&&pi.isIPosition(c)?n.openCodeEditor({resource:s},n.getActiveCodeEditor()).then(d=>{d&&(d.setPosition(c),d.invokeWithinContext(f=>(this.reportTelemetry(f,d),this.run(f,d))))},Pa):super.runCommand(e,i)}run(e,i){const n=oJ.get(i);return n?Promise.resolve(n.updateRanges(!0)):Promise.resolve()}}const lOi=tm.bindToContribution(oJ.get);$r(new lOi({id:"cancelLinkedEditingInput",precondition:xPt,handler:l=>l.clearRanges(),kbOpts:{kbExpr:Tt.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));function kPt(l,e,i,n){const s=l.ordered(e);return o$e(s.map(c=>async()=>{try{return await c.provideLinkedEditingRanges(e,i,n)}catch(d){t_(d);return}}),c=>!!c&&ky(c==null?void 0:c.ranges))}It("editor.linkedEditingBackground",{dark:In.fromHex("#f00").transparent(.3),light:In.fromHex("#f00").transparent(.3),hcDark:In.fromHex("#f00").transparent(.3),hcLight:In.white},W("editorLinkedEditingBackground","Background color when the editor auto renames on type."));Mb("_executeLinkedEditingProvider",(l,e,i)=>{const{linkedEditingRangeProvider:n}=l.get(Ts);return kPt(n,e,i,cc.None)});Cl(oJ.ID,oJ,1);sr(cOi);let uOi=class{constructor(e,i){this._link=e,this._provider=i}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}async resolve(e){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,e)).then(i=>(this._link=i||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))}};class Lbe{constructor(e){this._disposables=new wn;let i=[];for(const[n,s]of e){const c=n.links.map(d=>new uOi(d,s));i=Lbe._union(i,c),ESe(n)&&this._disposables.add(n)}this.links=i}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,i){const n=[];let s,c,d,f;for(s=0,d=0,c=e.length,f=i.length;s<c&&d<f;){const m=e[s],v=i[d];if(nt.areIntersectingOrTouching(m.range,v.range)){s++;continue}nt.compareRangesUsingStarts(m.range,v.range)<0?(n.push(m),s++):(n.push(v),d++)}for(;s<c;s++)n.push(e[s]);for(;d<f;d++)n.push(i[d]);return n}}function TPt(l,e,i){const n=[],s=l.ordered(e).reverse().map((c,d)=>Promise.resolve(c.provideLinks(e,i)).then(f=>{f&&(n[d]=[f,c])},t_));return Promise.all(s).then(()=>{const c=new Lbe(yT(n));return i.isCancellationRequested?(c.dispose(),new Lbe([])):c})}fl.registerCommand("_executeLinkProvider",async(l,...e)=>{let[i,n]=e;Fl(i instanceof yo),typeof n!="number"&&(n=0);const{linkProvider:s}=l.get(Ts),c=l.get(rf).getModel(i);if(!c)return[];const d=await TPt(s,c,cc.None);if(!d)return[];for(let m=0;m<Math.min(n,d.links.length);m++)await d.links[m].resolve(cc.None);const f=d.links.slice(0);return d.dispose(),f});var dOi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},K0e=function(l,e){return function(i,n){e(i,n,l)}},NUe,oB;let Xre=(oB=class extends xi{static get(e){return e.getContribution(NUe.ID)}constructor(e,i,n,s,c){super(),this.editor=e,this.openerService=i,this.notificationService=n,this.languageFeaturesService=s,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=c.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new qu(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const d=this._register(new Xwe(e));this._register(d.onMouseMoveOrRelevantKeyDown(([f,m])=>{this._onEditorMouseMove(f,m)})),this._register(d.onExecute(f=>{this.onEditorMouseUp(f)})),this._register(d.onCancel(f=>{this.cleanUpActiveLinkDecoration()})),this._register(e.onDidChangeConfiguration(f=>{f.hasChanged(71)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(e.onDidChangeModelContent(f=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(e.onDidChangeModel(f=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(e.onDidChangeModelLanguage(f=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(f=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}async computeLinksNow(){if(!this.editor.hasModel()||!this.editor.getOption(71))return;const e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=Om(i=>TPt(this.providers,e,i));try{const i=new bg(!1);if(this.activeLinksList=await this.computePromise,this.debounceInformation.update(e,i.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(i){Pa(i)}finally{this.computePromise=null}}}updateDecorations(e){const i=this.editor.getOption(78)==="altKey",n=[],s=Object.keys(this.currentOccurrences);for(const d of s){const f=this.currentOccurrences[d];n.push(f.decorationId)}const c=[];if(e)for(const d of e)c.push(l$.decoration(d,i));this.editor.changeDecorations(d=>{const f=d.deltaDecorations(n,c);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let m=0,v=f.length;m<v;m++){const x=new l$(e[m],f[m]);this.currentOccurrences[x.decorationId]=x}})}_onEditorMouseMove(e,i){const n=this.editor.getOption(78)==="altKey";if(this.isEnabled(e,i)){this.cleanUpActiveLinkDecoration();const s=this.getLinkOccurrence(e.target.position);s&&this.editor.changeDecorations(c=>{s.activate(c,n),this.activeLinkDecorationId=s.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e=this.editor.getOption(78)==="altKey";if(this.activeLinkDecorationId){const i=this.currentOccurrences[this.activeLinkDecorationId];i&&this.editor.changeDecorations(n=>{i.deactivate(n,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const i=this.getLinkOccurrence(e.target.position);i&&this.openLinkOccurrence(i,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,i,n=!1){if(!this.openerService)return;const{link:s}=e;s.resolve(cc.None).then(c=>{if(typeof c=="string"&&this.editor.hasModel()){const d=this.editor.getModel().uri;if(d.scheme===Ma.file&&c.startsWith(`${Ma.file}:`)){const f=yo.parse(c);if(f.scheme===Ma.file){const m=YN(f);let v=null;m.startsWith("/./")||m.startsWith("\\.\\")?v=`.${m.substr(1)}`:(m.startsWith("//./")||m.startsWith("\\\\.\\"))&&(v=`.${m.substr(2)}`),v&&(c=Tgi(d,v))}}}return this.openerService.open(c,{openToSide:i,fromUserGesture:n,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},c=>{const d=c instanceof Error?c.message:c;d==="invalid"?this.notificationService.warn(W("invalid.url","Failed to open this link because it is not well-formed: {0}",s.url.toString())):d==="missing"?this.notificationService.warn(W("missing.url","Failed to open this link because its target is missing.")):Pa(c)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const i=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const n of i){const s=this.currentOccurrences[n.id];if(s)return s}return null}isEnabled(e,i){return!!(e.target.type===6&&(e.hasTriggerModifier||i&&i.keyCodeIsTriggerKey))}stop(){var e;this.computeLinks.cancel(),this.activeLinksList&&((e=this.activeLinksList)==null||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}},NUe=oB,oB.ID="editor.linkDetector",oB);Xre=NUe=dOi([K0e(1,Rb),K0e(2,w_),K0e(3,Ts),K0e(4,Pw)],Xre);const qxt={general:qa.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:qa.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class l${static decoration(e,i){return{range:e.range,options:l$._getOptions(e,i,!1)}}static _getOptions(e,i,n){const s={...n?qxt.active:qxt.general};return s.hoverMessage=fOi(e,i),s}constructor(e,i){this.link=e,this.decorationId=i}activate(e,i){e.changeDecorationOptions(this.decorationId,l$._getOptions(this.link,i,!0))}deactivate(e,i){e.changeDecorationOptions(this.decorationId,l$._getOptions(this.link,i,!1))}}function fOi(l,e){const i=l.url&&/^command:/i.test(l.url.toString()),n=l.tooltip?l.tooltip:i?W("links.navigate.executeCmd","Execute command"):W("links.navigate.follow","Follow link"),s=e?Hc?W("links.navigate.kb.meta.mac","cmd + click"):W("links.navigate.kb.meta","ctrl + click"):Hc?W("links.navigate.kb.alt.mac","option + click"):W("links.navigate.kb.alt","alt + click");if(l.url){let c="";if(/^command:/i.test(l.url.toString())){const f=l.url.toString().match(/^command:([^?#]+)/);if(f){const m=f[1];c=W("tooltip.explanation","Execute command {0}",m)}}return new m1("",!0).appendLink(l.url.toString(!0).replace(/ /g,"%20"),n,c).appendMarkdown(` (${s})`)}else return new m1().appendText(`${n} (${s})`)}class hOi extends hs{constructor(){super({id:"editor.action.openLink",label:W("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,i){const n=Xre.get(i);if(!n||!i.hasModel())return;const s=i.getSelections();for(const c of s){const d=n.getLinkOccurrence(c.getEndPosition());d&&n.openLinkOccurrence(d,!1)}}}Cl(Xre.ID,Xre,1);sr(hOi);const EKe=class EKe extends xi{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown(i=>{const n=this._editor.getOption(118);n>=0&&i.target.type===6&&i.target.position.column>=n&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}};EKe.ID="editor.contrib.longLinesHelper";let Pbe=EKe;Cl(Pbe.ID,Pbe,2);const _Oi=It("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},W("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);It("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},W("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0);It("editor.wordHighlightTextBackground",_Oi,W("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);const pOi=It("editor.wordHighlightBorder",{light:null,dark:null,hcDark:yf,hcLight:yf},W("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));It("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:yf,hcLight:yf},W("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable."));It("editor.wordHighlightTextBorder",pOi,W("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));const mOi=It("editorOverviewRuler.wordHighlightForeground","#A0A0A0CC",W("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),gOi=It("editorOverviewRuler.wordHighlightStrongForeground","#C0A0C0CC",W("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),yOi=It("editorOverviewRuler.wordHighlightTextForeground",FTt,W("overviewRulerWordHighlightTextForeground","Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),vOi=qa.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:Mh(gOi),position:ww.Center},minimap:{color:Mh(iwe),position:1}}),bOi=qa.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:Mh(yOi),position:ww.Center},minimap:{color:Mh(iwe),position:1}}),COi=qa.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:Mh(FTt),position:ww.Center},minimap:{color:Mh(iwe),position:1}}),SOi=qa.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),wOi=qa.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:Mh(mOi),position:ww.Center},minimap:{color:Mh(iwe),position:1}});function xOi(l){return l===x$.Write?vOi:l===x$.Text?bOi:wOi}function kOi(l){return l?SOi:COi}Dk((l,e)=>{const i=l.getColor(A$e);i&&e.addRule(`.monaco-editor .selectionHighlight { background-color: ${i.transparent(.5)}; }`)});var TOi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},DOi=function(l,e){return function(i,n){e(i,n,l)}},LUe;function UR(l,e){const i=e.filter(n=>!l.find(s=>s.equals(n)));if(i.length>=1){const n=i.map(c=>`line ${c.viewState.position.lineNumber} column ${c.viewState.position.column}`).join(", "),s=i.length===1?W("cursorAdded","Cursor added: {0}",n):W("cursorsAdded","Cursors added: {0}",n);PL(s)}}class EOi extends hs{constructor(){super({id:"editor.action.insertCursorAbove",label:W("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:As.MenubarSelectionMenu,group:"3_multi",title:W({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,i,n){if(!i.hasModel())return;let s=!0;n&&n.logicalLine===!1&&(s=!1);const c=i._getViewModel();if(c.cursorConfig.readOnly)return;c.model.pushStackElement();const d=c.getCursorStates();c.setCursorStates(n.source,3,t0.addCursorUp(c,d,s)),c.revealTopMostCursor(n.source),UR(d,c.getCursorStates())}}class IOi extends hs{constructor(){super({id:"editor.action.insertCursorBelow",label:W("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:As.MenubarSelectionMenu,group:"3_multi",title:W({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,i,n){if(!i.hasModel())return;let s=!0;n&&n.logicalLine===!1&&(s=!1);const c=i._getViewModel();if(c.cursorConfig.readOnly)return;c.model.pushStackElement();const d=c.getCursorStates();c.setCursorStates(n.source,3,t0.addCursorDown(c,d,s)),c.revealBottomMostCursor(n.source),UR(d,c.getCursorStates())}}class NOi extends hs{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:W("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:As.MenubarSelectionMenu,group:"3_multi",title:W({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,i,n){if(!e.isEmpty()){for(let s=e.startLineNumber;s<e.endLineNumber;s++){const c=i.getLineMaxColumn(s);n.push(new Us(s,c,s,c))}e.endColumn>1&&n.push(new Us(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,i){if(!i.hasModel())return;const n=i.getModel(),s=i.getSelections(),c=i._getViewModel(),d=c.getCursorStates(),f=[];s.forEach(m=>this.getCursorsForSelection(m,n,f)),f.length>0&&i.setSelections(f),UR(d,c.getCursorStates())}}class LOi extends hs{constructor(){super({id:"editor.action.addCursorsToBottom",label:W("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,i){if(!i.hasModel())return;const n=i.getSelections(),s=i.getModel().getLineCount(),c=[];for(let m=n[0].startLineNumber;m<=s;m++)c.push(new Us(m,n[0].startColumn,m,n[0].endColumn));const d=i._getViewModel(),f=d.getCursorStates();c.length>0&&i.setSelections(c),UR(f,d.getCursorStates())}}class POi extends hs{constructor(){super({id:"editor.action.addCursorsToTop",label:W("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,i){if(!i.hasModel())return;const n=i.getSelections(),s=[];for(let f=n[0].startLineNumber;f>=1;f--)s.push(new Us(f,n[0].startColumn,f,n[0].endColumn));const c=i._getViewModel(),d=c.getCursorStates();s.length>0&&i.setSelections(s),UR(d,c.getCursorStates())}}class X0e{constructor(e,i,n){this.selections=e,this.revealRange=i,this.revealScrollType=n}}class Qre{static create(e,i){if(!e.hasModel())return null;const n=i.getState();if(!e.hasTextFocus()&&n.isRevealed&&n.searchString.length>0)return new Qre(e,i,!1,n.searchString,n.wholeWord,n.matchCase,null);let s=!1,c,d;const f=e.getSelections();f.length===1&&f[0].isEmpty()?(s=!0,c=!0,d=!0):(c=n.wholeWord,d=n.matchCase);const m=e.getSelection();let v,x=null;if(m.isEmpty()){const w=e.getConfiguredWordAtPosition(m.getStartPosition());if(!w)return null;v=w.word,x=new Us(m.startLineNumber,w.startColumn,m.startLineNumber,w.endColumn)}else v=e.getModel().getValueInRange(m).replace(/\r\n/g,`
+`);return new Qre(e,i,s,v,c,d,x)}constructor(e,i,n,s,c,d,f){this._editor=e,this.findController=i,this.isDisconnectedFromFindController=n,this.searchText=s,this.wholeWord=c,this.matchCase=d,this.currentMatch=f}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const i=this._editor.getSelections();return new X0e(i.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const i=this._editor.getSelections();return new X0e(i.slice(0,i.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const s=this.currentMatch;return this.currentMatch=null,s}this.findController.highlightFindOptions();const e=this._editor.getSelections(),i=e[e.length-1],n=this._editor.getModel().findNextMatch(this.searchText,i.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1);return n?new Us(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const i=this._editor.getSelections();return new X0e(i.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const i=this._editor.getSelections();return new X0e(i.slice(0,i.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const s=this.currentMatch;return this.currentMatch=null,s}this.findController.highlightFindOptions();const e=this._editor.getSelections(),i=e[e.length-1],n=this._editor.getModel().findPreviousMatch(this.searchText,i.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1);return n?new Us(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const i=this._editor.getModel();return e?i.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1,1073741824):i.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1,1073741824)}}const lSe=class lSe extends xi{static get(e){return e.getContribution(lSe.ID)}constructor(e){super(),this._sessionDispose=this._register(new wn),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const i=Qre.create(this._editor,e);if(!i)return;this._session=i;const n={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(n.wholeWordOverride=1,n.matchCaseOverride=1,n.isRegexOverride=2),e.getState().change(n,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(s=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(s=>{(s.matchCase||s.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,i){if(!i.isEmpty())return i;const n=this._editor.getConfiguredWordAtPosition(i.getStartPosition());return n?new Us(i.startLineNumber,n.startColumn,i.startLineNumber,n.endColumn):i}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const i=this._editor.getSelections();if(i.length>1){const s=e.getState().matchCase;if(!DPt(this._editor.getModel(),i,s)){const d=this._editor.getModel(),f=[];for(let m=0,v=i.length;m<v;m++)f[m]=this._expandEmptyToWord(d,i[m]);this._editor.setSelections(f);return}}}this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(e){if(!this._editor.hasModel())return;let i=null;const n=e.getState();if(n.isRevealed&&n.searchString.length>0&&n.isRegex){const s=this._editor.getModel();n.searchScope?i=s.findMatches(n.searchString,n.searchScope,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(132):null,!1,1073741824):i=s.findMatches(n.searchString,!0,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(132):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;i=this._session.selectAll(n.searchScope)}if(i.length>0){const s=this._editor.getSelection();for(let c=0,d=i.length;c<d;c++){const f=i[c];if(f.range.intersectRanges(s)){i[c]=i[0],i[0]=f;break}}this._setSelections(i.map(c=>new Us(c.range.startLineNumber,c.range.startColumn,c.range.endLineNumber,c.range.endColumn)))}}};lSe.ID="editor.contrib.multiCursorController";let aJ=lSe;class FJ extends hs{run(e,i){const n=aJ.get(i);if(!n)return;const s=i._getViewModel();if(s){const c=s.getCursorStates(),d=Ab.get(i);if(d)this._run(n,d);else{const f=e.get(ho).createInstance(Ab,i);this._run(n,f),f.dispose()}UR(c,s.getCursorStates())}}}class AOi extends FJ{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:W("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:Tt.focus,primary:2082,weight:100},menuOpts:{menuId:As.MenubarSelectionMenu,group:"3_multi",title:W({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,i){e.addSelectionToNextFindMatch(i)}}class OOi extends FJ{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:W("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:As.MenubarSelectionMenu,group:"3_multi",title:W({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,i){e.addSelectionToPreviousFindMatch(i)}}class MOi extends FJ{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:W("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:Tt.focus,primary:pp(2089,2082),weight:100}})}_run(e,i){e.moveSelectionToNextFindMatch(i)}}class ROi extends FJ{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:W("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,i){e.moveSelectionToPreviousFindMatch(i)}}class FOi extends FJ{constructor(){super({id:"editor.action.selectHighlights",label:W("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:Tt.focus,primary:3114,weight:100},menuOpts:{menuId:As.MenubarSelectionMenu,group:"3_multi",title:W({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,i){e.selectAll(i)}}class BOi extends FJ{constructor(){super({id:"editor.action.changeAll",label:W("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:kn.and(Tt.writable,Tt.editorTextFocus),kbOpts:{kbExpr:Tt.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,i){e.selectAll(i)}}class WOi{constructor(e,i,n,s,c){this._model=e,this._searchText=i,this._matchCase=n,this._wordSeparators=s,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,c&&this._model===c._model&&this._searchText===c._searchText&&this._matchCase===c._matchCase&&this._wordSeparators===c._wordSeparators&&this._modelVersionId===c._modelVersionId&&(this._cachedFindMatches=c._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(e=>e.range),this._cachedFindMatches.sort(nt.compareRangesUsingStarts)),this._cachedFindMatches}}var aB;let Abe=(aB=class extends xi{constructor(e,i){super(),this._languageFeaturesService=i,this.editor=e,this._isEnabled=e.getOption(109),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new qu(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(s=>{this._isEnabled=e.getOption(109)})),this._register(e.onDidChangeCursorSelection(s=>{this._isEnabled&&(s.selection.isEmpty()?s.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(s=>{this._setState(null)})),this._register(e.onDidChangeModelContent(s=>{this._isEnabled&&this.updateSoon.schedule()}));const n=Ab.get(e);n&&this._register(n.getState().onFindReplaceStateChange(s=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(LUe._createState(this.state,this._isEnabled,this.editor))}static _createState(e,i,n){if(!i||!n.hasModel())return null;const s=n.getSelection();if(s.startLineNumber!==s.endLineNumber)return null;const c=aJ.get(n);if(!c)return null;const d=Ab.get(n);if(!d)return null;let f=c.getSession(d);if(!f){const x=n.getSelections();if(x.length>1){const I=d.getState().matchCase;if(!DPt(n.getModel(),x,I))return null}f=Qre.create(n,d)}if(!f||f.currentMatch||/^[ \t]+$/.test(f.searchText)||f.searchText.length>200)return null;const m=d.getState(),v=m.matchCase;if(m.isRevealed){let x=m.searchString;v||(x=x.toLowerCase());let w=f.searchText;if(v||(w=w.toLowerCase()),x===w&&f.matchCase===m.matchCase&&f.wholeWord===m.wholeWord&&!m.isRegex)return null}return new WOi(n.getModel(),f.searchText,f.matchCase,f.wholeWord?n.getOption(132):null,e)}_setState(e){if(this.state=e,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;const i=this.editor.getModel();if(i.isTooLargeForTokenization())return;const n=this.state.findMatches(),s=this.editor.getSelections();s.sort(nt.compareRangesUsingStarts);const c=[];for(let v=0,x=0,w=n.length,I=s.length;v<w;){const P=n[v];if(x>=I)c.push(P),v++;else{const O=nt.compareRangesUsingStarts(P,s[x]);O<0?((s[x].isEmpty()||!nt.areIntersecting(P,s[x]))&&c.push(P),v++):(O>0||v++,x++)}}const d=this.editor.getOption(81)!=="off",f=this._languageFeaturesService.documentHighlightProvider.has(i)&&d,m=c.map(v=>({range:v,options:kOi(f)}));this._decorations.set(m)}dispose(){this._setState(null),super.dispose()}},LUe=aB,aB.ID="editor.contrib.selectionHighlighter",aB);Abe=LUe=TOi([DOi(1,Ts)],Abe);function DPt(l,e,i){const n=$xt(l,e[0],!i);for(let s=1,c=e.length;s<c;s++){const d=e[s];if(d.isEmpty())return!1;const f=$xt(l,d,!i);if(n!==f)return!1}return!0}function $xt(l,e,i){const n=l.getValueInRange(e);return i?n.toLowerCase():n}class VOi extends hs{constructor(){super({id:"editor.action.focusNextCursor",label:W("mutlicursor.focusNextCursor","Focus Next Cursor"),metadata:{description:W("mutlicursor.focusNextCursor.description","Focuses the next cursor"),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run(e,i,n){if(!i.hasModel())return;const s=i._getViewModel();if(s.cursorConfig.readOnly)return;s.model.pushStackElement();const c=Array.from(s.getCursorStates()),d=c.shift();d&&(c.push(d),s.setCursorStates(n.source,3,c),s.revealPrimaryCursor(n.source,!0),UR(c,s.getCursorStates()))}}class HOi extends hs{constructor(){super({id:"editor.action.focusPreviousCursor",label:W("mutlicursor.focusPreviousCursor","Focus Previous Cursor"),metadata:{description:W("mutlicursor.focusPreviousCursor.description","Focuses the previous cursor"),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run(e,i,n){if(!i.hasModel())return;const s=i._getViewModel();if(s.cursorConfig.readOnly)return;s.model.pushStackElement();const c=Array.from(s.getCursorStates()),d=c.pop();d&&(c.unshift(d),s.setCursorStates(n.source,3,c),s.revealPrimaryCursor(n.source,!0),UR(c,s.getCursorStates()))}}Cl(aJ.ID,aJ,4);Cl(Abe.ID,Abe,1);sr(EOi);sr(IOi);sr(NOi);sr(AOi);sr(OOi);sr(MOi);sr(ROi);sr(FOi);sr(BOi);sr(LOi);sr(POi);sr(VOi);sr(HOi);const jOi="editor.action.inlineEdit.accept",zOi="editor.action.inlineEdit.reject",UOi="editor.action.inlineEdit.jumpTo",qOi="editor.action.inlineEdit.jumpBack";var $Oi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},JOi=function(l,e){return function(i,n){e(i,n,l)}};const G9e="inline-edit";let PUe=class extends xi{constructor(e,i,n){super(),this.editor=e,this.model=i,this.languageService=n,this.isDisposed=bc(this,!1),this.currentTextModel=Tu(this,this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=ro(this,s=>{var ae;if(this.isDisposed.read(s))return;const c=this.currentTextModel.read(s);if(c!==this.model.targetTextModel.read(s))return;const d=this.model.ghostText.read(s);if(!d)return;let f=(ae=this.model.range)==null?void 0:ae.read(s);f&&f.startLineNumber===f.endLineNumber&&f.startColumn===f.endColumn&&(f=void 0);const m=(f?f.startLineNumber===f.endLineNumber:!0)&&d.parts.length===1&&d.parts[0].lines.length===1,v=d.parts.length===1&&d.parts[0].lines.every(me=>me.length===0),x=[],w=[];function I(me,ye){if(w.length>0){const Ce=w[w.length-1];ye&&Ce.decorations.push(new mv(Ce.content.length+1,Ce.content.length+1+me[0].length,ye,0)),Ce.content+=me[0],me=me.slice(1)}for(const Ce of me)w.push({content:Ce,decorations:ye?[new mv(1,Ce.length+1,ye,0)]:[]})}const P=c.getLineContent(d.lineNumber);let O,z=0;if(!v&&(m||!f)){for(const me of d.parts){let ye=me.lines;f&&!m&&(I(ye,G9e),ye=[]),O===void 0?(x.push({column:me.column,text:ye[0],preview:me.preview}),ye=ye.slice(1)):I([P.substring(z,me.column-1)],void 0),ye.length>0&&(I(ye,G9e),O===void 0&&me.column<=P.length&&(O=me.column)),z=me.column-1}O!==void 0&&I([P.substring(z)],void 0)}const J=O!==void 0?new cPt(O,P.length+1):void 0,Y=m||!f?d.lineNumber:f.endLineNumber-1;return{inlineTexts:x,additionalLines:w,hiddenRange:J,lineNumber:Y,additionalReservedLineCount:this.model.minReservedLineCount.read(s),targetTextModel:c,range:f,isSingleLine:m,isPureRemove:v}}),this.decorations=ro(this,s=>{const c=this.uiState.read(s);if(!c)return[];const d=[];if(c.hiddenRange&&d.push({range:c.hiddenRange.toRange(c.lineNumber),options:{inlineClassName:"inline-edit-hidden",description:"inline-edit-hidden"}}),c.range){const f=[];if(c.isSingleLine)f.push(c.range);else if(!c.isPureRemove){const m=c.range.endLineNumber-c.range.startLineNumber;for(let v=0;v<m;v++){const x=c.range.startLineNumber+v,w=c.targetTextModel.getLineFirstNonWhitespaceColumn(x),I=c.targetTextModel.getLineLastNonWhitespaceColumn(x),P=new nt(x,w,x,I);f.push(P)}}for(const m of f)d.push({range:m,options:J$})}if(c.range&&!c.isSingleLine&&c.isPureRemove){const f=new nt(c.range.startLineNumber,1,c.range.endLineNumber-1,1);d.push({range:f,options:Ere})}for(const f of c.inlineTexts)d.push({range:nt.fromPositions(new pi(c.lineNumber,f.column)),options:{description:G9e,after:{content:f.text,inlineClassName:f.preview?"inline-edit-decoration-preview":"inline-edit-decoration",cursorStops:_T.Left},showIfCollapsed:!0}});return d}),this._register(fo(()=>{this.isDisposed.set(!0,void 0)})),this._register(lPt(this.editor,this.decorations))}};PUe=$Oi([JOi(2,Pf)],PUe);var uKe=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},_L=function(l,e){return function(i,n){e(i,n,l)}},F1e;let AUe=class extends xi{constructor(e,i,n){super(),this.editor=e,this.model=i,this.instantiationService=n,this.alwaysShowToolbar=Tu(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(63).showToolbar==="always"),this.sessionPosition=void 0,this.position=ro(this,s=>{var m,v;const c=(m=this.model.read(s))==null?void 0:m.model.ghostText.read(s);if(!this.alwaysShowToolbar.read(s)||!c||c.parts.length===0)return this.sessionPosition=void 0,null;const d=c.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==c.lineNumber&&(this.sessionPosition=void 0);const f=new pi(c.lineNumber,Math.min(d,((v=this.sessionPosition)==null?void 0:v.column)??Number.MAX_SAFE_INTEGER));return this.sessionPosition=f,f}),this._register(Ib((s,c)=>{if(!this.model.read(s)||!this.alwaysShowToolbar.read(s))return;const f=c.add(this.instantiationService.createInstance(OUe,this.editor,!0,this.position));e.addContentWidget(f),c.add(fo(()=>e.removeContentWidget(f)))}))}};AUe=uKe([_L(2,ho)],AUe);var fR;let OUe=(fR=class extends xi{constructor(e,i,n,s,c,d){super(),this.editor=e,this.withBorder=i,this._position=n,this._contextKeyService=c,this._menuService=d,this.id=`InlineEditHintsContentWidget${F1e.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=Rc("div.inlineEditHints",{className:this.withBorder?".withBorder":""},[Rc("div@toolBar")]),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(As.InlineEditActions,this._contextKeyService)),this.toolBar=this._register(s.createInstance(MUe,this.nodes.toolBar,this.editor,As.InlineEditToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:f=>f.startsWith("primary")},actionViewItemProvider:(f,m)=>{if(f instanceof JC)return s.createInstance(GOi,f,void 0)},telemetrySource:"InlineEditToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility(f=>{F1e._dropDownVisible=f})),this._register(ba(f=>{this._position.read(f),this.editor.layoutContentWidget(this)})),this._register(ba(f=>{const m=[];for(const[v,x]of this.inlineCompletionsActionsMenus.getActions())for(const w of x)w instanceof JC&&m.push(w);m.length>0&&m.unshift(new Rm),this.toolBar.setAdditionalSecondaryActions(m)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}},F1e=fR,fR._dropDownVisible=!1,fR.id=0,fR);OUe=F1e=uKe([_L(3,ho),_L(4,Ko),_L(5,Lw)],OUe);class GOi extends TR{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const i=Rc("div.keybinding").root;this._register(new EJ(i,UC,{disableTitle:!0,...qEt})).set(e),this.label.textContent=this._action.label,this.label.appendChild(i),this.label.classList.add("inlineEditStatusBarItemLabel")}}updateTooltip(){}}let MUe=class extends Nre{constructor(e,i,n,s,c,d,f,m,v,x){super(e,{resetMenu:n,...s},c,d,f,m,v,x),this.editor=i,this.menuId=n,this.options2=s,this.menuService=c,this.contextKeyService=d,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this._store.add(this.editor.onDidChangeCursorPosition(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var n,s,c,d,f,m,v;const e=[],i=[];vwe(this.menu,(n=this.options2)==null?void 0:n.menuOptions,{primary:e,secondary:i},(c=(s=this.options2)==null?void 0:s.toolbarOptions)==null?void 0:c.primaryGroup,(f=(d=this.options2)==null?void 0:d.toolbarOptions)==null?void 0:f.shouldInlineSubmenu,(v=(m=this.options2)==null?void 0:m.toolbarOptions)==null?void 0:v.useSeparatorsInPrimaryActions),i.push(...this.additionalActions),e.unshift(...this.prependedPrimaryActions),this.setActions(e,i)}setAdditionalSecondaryActions(e){Lf(this.additionalActions,e,(i,n)=>i===n)||(this.additionalActions=e,this.updateToolbar())}};MUe=uKe([_L(4,Lw),_L(5,Ko),_L(6,eS),_L(7,pu),_L(8,qd),_L(9,b1)],MUe);var EPt=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},B1e=function(l,e){return function(i,n){e(i,n,l)}},gie,RUe;function*KOi(l,e,i=1){e===void 0&&([e,l]=[l,0]);for(let n=l;n<e;n+=i)yield n}function K9e(l){var n;const e=((n=l[0].match(/^\s*/))==null?void 0:n[0])??"",i=e.length;return{text:l.map(s=>s.replace(new RegExp("^"+e),"")),shift:i}}var cB;let FUe=(cB=class extends xi{static _createUniqueUri(){return yo.from({scheme:"inline-edit-widget",path:new Date().toString()+String(gie._modelId++)})}constructor(e,i,n,s,c){super(),this._editor=e,this._model=i,this._instantiationService=n,this._diffProviderFactoryService=s,this._modelService=c,this._position=ro(this,d=>{const f=this._model.read(d);if(!f||f.text.length===0||f.range.startLineNumber===f.range.endLineNumber&&!(f.range.startColumn===f.range.endColumn&&f.range.startColumn===1))return null;const m=this._editor.getModel();if(!m)return null;const v=Array.from(KOi(f.range.startLineNumber,f.range.endLineNumber+1)),x=v.map(z=>m.getLineLastNonWhitespaceColumn(z)),w=Math.max(...x),I=v[x.indexOf(w)],P=new pi(I,w);return{top:f.range.startLineNumber,left:P}}),this._text=ro(this,d=>{const f=this._model.read(d);if(!f)return{text:"",shift:0};const m=K9e(f.text.split(`
+`));return{text:m.text.join(`
+`),shift:m.shift}}),this._originalModel=Cy(()=>this._modelService.createModel("",null,gie._createUniqueUri())).keepObserved(this._store),this._modifiedModel=Cy(()=>this._modelService.createModel("",null,gie._createUniqueUri())).keepObserved(this._store),this._diff=ro(this,d=>{var f,m;return(m=(f=this._diffPromise.read(d))==null?void 0:f.promiseResult.read(d))==null?void 0:m.data}),this._diffPromise=ro(this,d=>{const f=this._model.read(d);if(!f)return;const m=this._editor.getModel();if(!m)return;const v=K9e(m.getValueInRange(f.range).split(`
+`)).text.join(`
+`),x=K9e(f.text.split(`
+`)).text.join(`
+`);this._originalModel.get().setValue(v),this._modifiedModel.get().setValue(x);const w=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:"advanced"});return mwe.fromFn(async()=>{const I=await w.computeDiff(this._originalModel.get(),this._modifiedModel.get(),{computeMoves:!1,ignoreTrimWhitespace:!1,maxComputationTimeMs:1e3},cc.None);if(!I.identical)return I.changes})}),this._register(Ib((d,f)=>{if(!this._model.read(d)||this._position.get()===null)return;const v=f.add(this._instantiationService.createInstance(BUe,this._editor,this._position,this._text.map(x=>x.text),this._text.map(x=>x.shift),this._diff));e.addOverlayWidget(v),f.add(fo(()=>e.removeOverlayWidget(v)))}))}},gie=cB,cB._modelId=0,cB);FUe=gie=EPt([B1e(2,ho),B1e(3,Rse),B1e(4,rf)],FUe);var lB;let BUe=(lB=class extends xi{constructor(e,i,n,s,c,d){var f;super(),this._editor=e,this._position=i,this._text=n,this._shift=s,this._diff=c,this._instantiationService=d,this.id=`InlineEditSideBySideContentWidget${RUe.id++}`,this.allowEditorOverflow=!1,this._nodes=Cr("div.inlineEditSideBySide",void 0),this._scrollChanged=k0("editor.onDidScrollChange",this._editor.onDidScrollChange),this._previewEditor=this._register(this._instantiationService.createInstance(kT,this._nodes,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0,scrollbar:{vertical:"hidden",horizontal:"hidden",alwaysConsumeMouseWheel:!1,handleMouseWheel:!1},readOnly:!0,wordWrap:"off",wordWrapOverride1:"off",wordWrapOverride2:"off",wrappingIndent:"none",wrappingStrategy:void 0},{contributions:[],isSimpleWidget:!0},this._editor)),this._previewEditorObs=zC(this._previewEditor),this._editorObs=zC(this._editor),this._previewTextModel=this._register(this._instantiationService.createInstance(LE,"",((f=this._editor.getModel())==null?void 0:f.getLanguageId())??bv,LE.DEFAULT_CREATION_OPTIONS,null)),this._setText=ro(m=>{const v=this._text.read(m);v&&this._previewTextModel.setValue(v)}).recomputeInitiallyAndOnChange(this._store),this._decorations=ro(this,m=>{this._setText.read(m);const v=this._position.read(m);if(!v)return{org:[],mod:[]};const x=this._diff.read(m);if(!x)return{org:[],mod:[]};const w=[],I=[];if(x.length===1&&x[0].innerChanges[0].modifiedRange.equalsRange(this._previewTextModel.getFullModelRange()))return{org:[],mod:[]};const P=this._shift.get(),O=z=>new nt(z.startLineNumber+v.top-1,z.startColumn+P,z.endLineNumber+v.top-1,z.endColumn+P);for(const z of x)if(z.original.isEmpty||w.push({range:O(z.original.toInclusiveRange()),options:Ere}),z.modified.isEmpty||I.push({range:z.modified.toInclusiveRange(),options:Fve}),z.modified.isEmpty||z.original.isEmpty)z.original.isEmpty||w.push({range:O(z.original.toInclusiveRange()),options:mGe}),z.modified.isEmpty||I.push({range:z.modified.toInclusiveRange(),options:_Ge});else for(const J of z.innerChanges||[])z.original.contains(J.originalRange.startLineNumber)&&w.push({range:O(J.originalRange),options:J.originalRange.isEmpty()?gGe:J$}),z.modified.contains(J.modifiedRange.startLineNumber)&&I.push({range:J.modifiedRange,options:J.modifiedRange.isEmpty()?pGe:Bve});return{org:w,mod:I}}),this._originalDecorations=ro(this,m=>this._decorations.read(m).org),this._modifiedDecorations=ro(this,m=>this._decorations.read(m).mod),this._previewEditor.setModel(this._previewTextModel),this._register(this._editorObs.setDecorations(this._originalDecorations)),this._register(this._previewEditorObs.setDecorations(this._modifiedDecorations)),this._register(ba(m=>{const v=this._previewEditorObs.contentWidth.read(m),x=this._text.read(m).split(`
+`).length-1,w=this._editor.getOption(67)*x;v<=0||this._previewEditor.layout({height:w,width:v})})),this._register(ba(m=>{this._position.read(m),this._editor.layoutOverlayWidget(this)})),this._register(ba(m=>{this._scrollChanged.read(m),this._position.read(m)&&this._editor.layoutOverlayWidget(this)}))}getId(){return this.id}getDomNode(){return this._nodes}getPosition(){const e=this._position.get();if(!e)return null;const i=this._editor.getLayoutInfo(),n=this._editor.getScrolledVisiblePosition(new pi(e.top,1));if(!n)return null;const s=n.top-1,c=this._editor.getOffsetForColumn(e.left.lineNumber,e.left.column);return{preference:{left:i.contentLeft+c+10,top:s}}}},RUe=lB,lB.id=0,lB);BUe=RUe=EPt([B1e(5,ho)],BUe);var XOi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},xF=function(l,e){return function(i,n){e(i,n,l)}},yie,uk;let gv=(uk=class extends xi{static get(e){return e.getContribution(yie.ID)}constructor(e,i,n,s,c,d,f,m){super(),this.editor=e,this.instantiationService=i,this.contextKeyService=n,this.languageFeaturesService=s,this._commandService=c,this._configurationService=d,this._diffProviderFactoryService=f,this._modelService=m,this._isVisibleContext=yie.inlineEditVisibleContext.bindTo(this.contextKeyService),this._isCursorAtInlineEditContext=yie.cursorAtInlineEditContext.bindTo(this.contextKeyService),this._currentEdit=bc(this,void 0),this._currentWidget=Cy(this._currentEdit,O=>{const z=this._currentEdit.read(O);if(!z)return;const J=z.range.endLineNumber,Y=z.range.endColumn,ae=z.text.endsWith(`
+`)&&!(z.range.startLineNumber===z.range.endLineNumber&&z.range.startColumn===z.range.endColumn)?z.text.slice(0,-1):z.text,me=new qre(J,[new fbe(Y,ae,!1)]),ye=z.range.startLineNumber===z.range.endLineNumber&&me.parts.length===1&&me.parts[0].lines.length===1,Ce=z.text==="";return!ye&&!Ce?void 0:this.instantiationService.createInstance(PUe,this.editor,{ghostText:mk(me),minReservedLineCount:mk(0),targetTextModel:mk(this.editor.getModel()??void 0),range:mk(z.range)})}),this._isAccepting=bc(this,!1),this._enabled=Tu(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(63).enabled),this._fontFamily=Tu(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(63).fontFamily);const v=k0("InlineEditController.modelContentChangedSignal",e.onDidChangeModelContent);this._register(ba(O=>{this._enabled.read(O)&&(v.read(O),!this._isAccepting.read(O)&&this.getInlineEdit(e,!0))}));const x=Tu(this,e.onDidChangeCursorPosition,()=>e.getPosition());this._register(ba(O=>{if(!this._enabled.read(O))return;const z=x.read(O);z&&this.checkCursorPosition(z)})),this._register(ba(O=>{const z=this._currentEdit.read(O);if(this._isCursorAtInlineEditContext.set(!1),!z){this._isVisibleContext.set(!1);return}this._isVisibleContext.set(!0);const J=e.getPosition();J&&this.checkCursorPosition(J)}));const w=k0("InlineEditController.editorBlurSignal",e.onDidBlurEditorWidget);this._register(ba(async O=>{var z;this._enabled.read(O)&&(w.read(O),!(this._configurationService.getValue("editor.experimentalInlineEdit.keepOnBlur")||e.getOption(63).keepOnBlur)&&((z=this._currentRequestCts)==null||z.dispose(!0),this._currentRequestCts=void 0,await this.clear(!1)))}));const I=k0("InlineEditController.editorFocusSignal",e.onDidFocusEditorText);this._register(ba(O=>{this._enabled.read(O)&&(I.read(O),this.getInlineEdit(e,!0))}));const P=this._register(T2t());this._register(ba(O=>{const z=this._fontFamily.read(O);P.setStyle(z===""||z==="default"?"":`
+.monaco-editor .inline-edit-decoration,
+.monaco-editor .inline-edit-decoration-preview,
+.monaco-editor .inline-edit {
+ font-family: ${z};
+}`)})),this._register(new AUe(this.editor,this._currentWidget,this.instantiationService)),this._register(new FUe(this.editor,this._currentEdit,this.instantiationService,this._diffProviderFactoryService,this._modelService))}checkCursorPosition(e){if(!this._currentEdit){this._isCursorAtInlineEditContext.set(!1);return}const i=this._currentEdit.get();if(!i){this._isCursorAtInlineEditContext.set(!1);return}this._isCursorAtInlineEditContext.set(nt.containsPosition(i.range,e))}validateInlineEdit(e,i){var n;if(i.text.includes(`
+`)&&i.range.startLineNumber!==i.range.endLineNumber&&i.range.startColumn!==i.range.endColumn){if(i.range.startColumn!==1)return!1;const c=i.range.endLineNumber,d=i.range.endColumn,f=((n=e.getModel())==null?void 0:n.getLineLength(c))??0;if(d!==f+1)return!1}return!0}async fetchInlineEdit(e,i){this._currentRequestCts&&this._currentRequestCts.dispose(!0);const n=e.getModel();if(!n)return;const s=n.getVersionId(),c=this.languageFeaturesService.inlineEditProvider.all(n);if(c.length===0)return;const d=c[0];this._currentRequestCts=new ih;const f=this._currentRequestCts.token,m=i?tye.Automatic:tye.Invoke;if(i&&await QOi(50,f),f.isCancellationRequested||n.isDisposed()||n.getVersionId()!==s)return;const x=await d.provideInlineEdit(n,{triggerKind:m},f);if(x&&!(f.isCancellationRequested||n.isDisposed()||n.getVersionId()!==s)&&this.validateInlineEdit(e,x))return x}async getInlineEdit(e,i){this._isCursorAtInlineEditContext.set(!1),await this.clear();const n=await this.fetchInlineEdit(e,i);n&&this._currentEdit.set(n,void 0)}async trigger(){await this.getInlineEdit(this.editor,!1)}async jumpBack(){this._jumpBackPosition&&(this.editor.setPosition(this._jumpBackPosition),this.editor.revealPositionInCenterIfOutsideViewport(this._jumpBackPosition))}async accept(){this._isAccepting.set(!0,void 0);const e=this._currentEdit.get();if(!e)return;let i=e.text;e.text.startsWith(`
+`)&&(i=e.text.substring(1)),this.editor.pushUndoStop(),this.editor.executeEdits("acceptCurrent",[eh.replace(nt.lift(e.range),i)]),e.accepted&&await this._commandService.executeCommand(e.accepted.id,...e.accepted.arguments||[]).then(void 0,t_),this.freeEdit(e),th(n=>{this._currentEdit.set(void 0,n),this._isAccepting.set(!1,n)})}jumpToCurrent(){var n;this._jumpBackPosition=(n=this.editor.getSelection())==null?void 0:n.getStartPosition();const e=this._currentEdit.get();if(!e)return;const i=pi.lift({lineNumber:e.range.startLineNumber,column:e.range.startColumn});this.editor.setPosition(i),this.editor.revealPositionInCenterIfOutsideViewport(i)}async clear(e=!0){const i=this._currentEdit.get();i&&(i!=null&&i.rejected)&&e&&await this._commandService.executeCommand(i.rejected.id,...i.rejected.arguments||[]).then(void 0,t_),i&&this.freeEdit(i),this._currentEdit.set(void 0,void 0)}freeEdit(e){const i=this.editor.getModel();if(!i)return;const n=this.languageFeaturesService.inlineEditProvider.all(i);n.length!==0&&n[0].freeInlineEdit(e)}},yie=uk,uk.ID="editor.contrib.inlineEditController",uk.inlineEditVisibleKey="inlineEditVisible",uk.inlineEditVisibleContext=new rs(uk.inlineEditVisibleKey,!1),uk.cursorAtInlineEditKey="cursorAtInlineEdit",uk.cursorAtInlineEditContext=new rs(uk.cursorAtInlineEditKey,!1),uk);gv=yie=XOi([xF(1,ho),xF(2,Ko),xF(3,Ts),xF(4,qd),xF(5,Cc),xF(6,Rse),xF(7,rf)],gv);function QOi(l,e){return new Promise(i=>{let n;const s=setTimeout(()=>{n&&n.dispose(),i()},l);e&&(n=e.onCancellationRequested(()=>{clearTimeout(s),n&&n.dispose(),i()}))})}let ZOi=class extends hs{constructor(){super({id:jOi,label:"Accept Inline Edit",alias:"Accept Inline Edit",precondition:kn.and(Tt.writable,gv.inlineEditVisibleContext),kbOpts:[{weight:101,primary:2,kbExpr:kn.and(Tt.writable,gv.inlineEditVisibleContext,gv.cursorAtInlineEditContext)}],menuOpts:[{menuId:As.InlineEditToolbar,title:"Accept",group:"primary",order:1}]})}async run(e,i){const n=gv.get(i);await(n==null?void 0:n.accept())}};class YOi extends hs{constructor(){const e=kn.and(Tt.writable,kn.not(gv.inlineEditVisibleKey));super({id:"editor.action.inlineEdit.trigger",label:"Trigger Inline Edit",alias:"Trigger Inline Edit",precondition:e,kbOpts:{weight:101,primary:2646,kbExpr:e}})}async run(e,i){const n=gv.get(i);n==null||n.trigger()}}class eMi extends hs{constructor(){const e=kn.and(Tt.writable,gv.inlineEditVisibleContext,kn.not(gv.cursorAtInlineEditKey));super({id:UOi,label:"Jump to Inline Edit",alias:"Jump to Inline Edit",precondition:e,kbOpts:{weight:101,primary:2646,kbExpr:e},menuOpts:[{menuId:As.InlineEditToolbar,title:"Jump To Edit",group:"primary",order:3,when:e}]})}async run(e,i){const n=gv.get(i);n==null||n.jumpToCurrent()}}class tMi extends hs{constructor(){const e=kn.and(Tt.writable,gv.cursorAtInlineEditContext);super({id:qOi,label:"Jump Back from Inline Edit",alias:"Jump Back from Inline Edit",precondition:e,kbOpts:{weight:110,primary:2646,kbExpr:e},menuOpts:[{menuId:As.InlineEditToolbar,title:"Jump Back",group:"primary",order:3,when:e}]})}async run(e,i){const n=gv.get(i);n==null||n.jumpBack()}}class iMi extends hs{constructor(){const e=kn.and(Tt.writable,gv.inlineEditVisibleContext);super({id:zOi,label:"Reject Inline Edit",alias:"Reject Inline Edit",precondition:e,kbOpts:{weight:100,primary:9,kbExpr:e},menuOpts:[{menuId:As.InlineEditToolbar,title:"Reject",group:"secondary",order:2}]})}async run(e,i){const n=gv.get(i);await(n==null?void 0:n.clear())}}sr(ZOi);sr(iMi);sr(eMi);sr(tMi);sr(YOi);Cl(gv.ID,gv,3);const nMi="editor.action.inlineEdits.accept",rMi="editor.action.inlineEdits.showPrevious",sMi="editor.action.inlineEdits.showNext",cJ=new rs("inlineEditsVisible",!1,W("inlineEditsVisible","Whether an inline edit is visible")),oMi=new rs("inlineEditsIsPinned",!1,W("isPinned","Whether an inline edit is visible")),IKe=class IKe extends xi{constructor(e){super(),this._editor=e,this._editorObs=zC(this._editor),this._placeholderText=this._editorObs.getOption(88),this._state=mw({owner:this,equalsFn:Bye},i=>{const n=this._placeholderText.read(i);if(n&&this._editorObs.valueIsEmpty.read(i))return{placeholder:n}}),this._shouldViewBeAlive=aMi(this,i=>{var n;return((n=this._state.read(i))==null?void 0:n.placeholder)!==void 0}),this._view=VR((i,n)=>{if(!this._shouldViewBeAlive.read(i))return;const s=Rc("div.editorPlaceholder");n.add(ba(c=>{const d=this._state.read(c),f=(d==null?void 0:d.placeholder)!==void 0;s.root.style.display=f?"block":"none",s.root.innerText=(d==null?void 0:d.placeholder)??""})),n.add(ba(c=>{const d=this._editorObs.layoutInfo.read(c);s.root.style.left=`${d.contentLeft}px`,s.root.style.width=d.contentWidth-d.verticalScrollbarWidth+"px",s.root.style.top=`${this._editor.getTopForLineNumber(0)}px`})),n.add(ba(c=>{s.root.style.fontFamily=this._editorObs.getOption(49).read(c),s.root.style.fontSize=this._editorObs.getOption(52).read(c)+"px",s.root.style.lineHeight=this._editorObs.getOption(67).read(c)+"px"})),n.add(this._editorObs.createOverlayWidget({allowEditorOverflow:!1,minContentWidthInPx:mk(0),position:mk(null),domNode:s.root}))}),this._view.recomputeInitiallyAndOnChange(this._store)}};IKe.ID="editor.contrib.placeholderText";let Zre=IKe;function aMi(l,e){return Dse(l,(i,n)=>n===!0?!0:e(i))}var cMi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},lMi=function(l,e){return function(i,n){e(i,n,l)}};class uMi{constructor(e,i,n){this.range=e,this.newLines=i,this.changes=n}}let WUe=class extends xi{constructor(e,i,n,s){super(),this._editor=e,this._edit=i,this._userPrompt=n,this._instantiationService=s,this._editorObs=zC(this._editor),this._elements=Rc("div.inline-edits-widget",{style:{position:"absolute",overflow:"visible",top:"0px",left:"0px"}},[Rc("div@editorContainer",{style:{position:"absolute",top:"0px",left:"0px",width:"500px",height:"500px"}},[Rc("div.toolbar@toolbar",{style:{position:"absolute",top:"-25px",left:"0px"}}),Rc("div.promptEditor@promptEditor",{style:{position:"absolute",top:"-25px",left:"80px",width:"300px",height:"22px"}}),Rc("div.preview@editor",{style:{position:"absolute",top:"0px",left:"0px"}})]),SU("svg",{style:{overflow:"visible",pointerEvents:"none"}},[SU("defs",[SU("linearGradient",{id:"Gradient2",x1:"0",y1:"0",x2:"1",y2:"0"},[SU("stop",{offset:"0%",class:"gradient-stop"}),SU("stop",{offset:"100%",class:"gradient-stop"})])]),SU("path@path",{d:"",fill:"url(#Gradient2)"})])]),this._previewTextModel=this._register(this._instantiationService.createInstance(LE,"",bv,LE.DEFAULT_CREATION_OPTIONS,null)),this._setText=ro(d=>{const f=this._edit.read(d);f&&this._previewTextModel.setValue(f.newLines.join(`
+`))}).recomputeInitiallyAndOnChange(this._store),this._promptTextModel=this._register(this._instantiationService.createInstance(LE,"",bv,LE.DEFAULT_CREATION_OPTIONS,null)),this._promptEditor=this._register(this._instantiationService.createInstance(kT,this._elements.promptEditor,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0,placeholder:"Describe the change you want...",fontFamily:EIt},{contributions:p9.getSomeEditorContributions([pT.ID,Zre.ID,eJ.ID]),isSimpleWidget:!0},this._editor)),this._previewEditor=this._register(this._instantiationService.createInstance(kT,this._elements.editor,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0},{contributions:[]},this._editor)),this._previewEditorObs=zC(this._previewEditor),this._decorations=ro(this,d=>{var x;this._setText.read(d);const f=(x=this._edit.read(d))==null?void 0:x.changes;if(!f)return[];const m=[],v=[];if(f.length===1&&f[0].innerChanges[0].modifiedRange.equalsRange(this._previewTextModel.getFullModelRange()))return[];for(const w of f)if(w.original.isEmpty||m.push({range:w.original.toInclusiveRange(),options:Ere}),w.modified.isEmpty||v.push({range:w.modified.toInclusiveRange(),options:Fve}),w.modified.isEmpty||w.original.isEmpty)w.original.isEmpty||m.push({range:w.original.toInclusiveRange(),options:mGe}),w.modified.isEmpty||v.push({range:w.modified.toInclusiveRange(),options:_Ge});else for(const I of w.innerChanges||[])w.original.contains(I.originalRange.startLineNumber)&&m.push({range:I.originalRange,options:I.originalRange.isEmpty()?gGe:J$}),w.modified.contains(I.modifiedRange.startLineNumber)&&v.push({range:I.modifiedRange,options:I.modifiedRange.isEmpty()?pGe:Bve});return v}),this._layout1=ro(this,d=>{const f=this._editor.getModel(),m=this._edit.read(d);if(!m)return null;const v=m.range;let x=0;for(let P=v.startLineNumber;P<v.endLineNumberExclusive;P++){const O=f.getLineMaxColumn(P),z=this._editor.getOffsetForColumn(P,O);x=Math.max(x,z)}return{left:this._editor.getLayoutInfo().contentLeft+x}}),this._layout=ro(this,d=>{const f=this._edit.read(d);if(!f)return null;const m=f.range,v=this._editorObs.scrollLeft.read(d),x=this._layout1.read(d).left+20-v,w=this._editor.getTopForLineNumber(m.startLineNumber)-this._editorObs.scrollTop.read(d),I=this._editor.getTopForLineNumber(m.endLineNumberExclusive)-this._editorObs.scrollTop.read(d),P=new Cq(x,w),O=new Cq(x,I),z=I-w,J=50,Y=this._editor.getOption(67)*f.newLines.length,ae=z-Y,me=new Cq(x+J,w+ae/2),ye=new Cq(x+J,I-ae/2);return{topCode:P,bottomCode:O,codeHeight:z,topEdit:me,bottomEdit:ye,editHeight:Y}});const c=ro(this,d=>this._edit.read(d)!==void 0||this._userPrompt.read(d)!==void 0);this._register(f6(this._elements.root,{display:ro(this,d=>c.read(d)?"block":"none")})),this._register(_q(this._editor.getDomNode(),this._elements.root)),this._register(zC(e).createOverlayWidget({domNode:this._elements.root,position:mk(null),allowEditorOverflow:!1,minContentWidthInPx:ro(d=>{var v;const f=(v=this._layout1.read(d))==null?void 0:v.left;if(f===void 0)return 0;const m=this._previewEditorObs.contentWidth.read(d);return f+m})})),this._previewEditor.setModel(this._previewTextModel),this._register(this._previewEditorObs.setDecorations(this._decorations)),this._register(ba(d=>{const f=this._layout.read(d);if(!f)return;const{topCode:m,bottomCode:v,topEdit:x,bottomEdit:w,editHeight:I}=f,P=10,O=0,z=40,J=new fMi().moveTo(m).lineTo(m.deltaX(P)).curveTo(m.deltaX(P+z),x.deltaX(-z-O),x.deltaX(-O)).lineTo(x).lineTo(w).lineTo(w.deltaX(-O)).curveTo(w.deltaX(-z-O),v.deltaX(P+z),v.deltaX(P)).lineTo(v).build();this._elements.path.setAttribute("d",J),this._elements.editorContainer.style.top=`${x.y}px`,this._elements.editorContainer.style.left=`${x.x}px`,this._elements.editorContainer.style.height=`${I}px`;const Y=this._previewEditorObs.contentWidth.read(d);this._previewEditor.layout({height:I,width:Y})})),this._promptEditor.setModel(this._promptTextModel),this._promptEditor.layout(),this._register(hMi(dMi(this._userPrompt,d=>d??"",d=>d),zC(this._promptEditor).value)),this._register(ba(d=>{const f=zC(this._promptEditor).isFocused.read(d);this._elements.root.classList.toggle("focused",f)}))}};WUe=cMi([lMi(3,ho)],WUe);function dMi(l,e,i){return xse(void 0,n=>e(l.read(n)),(n,s)=>l.set(i(n),s))}class Cq{constructor(e,i){this.x=e,this.y=i}deltaX(e){return new Cq(this.x+e,this.y)}}class fMi{constructor(){this._data=""}moveTo(e){return this._data+=`M ${e.x} ${e.y} `,this}lineTo(e){return this._data+=`L ${e.x} ${e.y} `,this}curveTo(e,i,n){return this._data+=`C ${e.x} ${e.y} ${i.x} ${i.y} ${n.x} ${n.y} `,this}build(){return this._data}}function hMi(l,e){const i=new wn;return i.add(ba(n=>{const s=l.read(n);e.set(s,void 0)})),i.add(ba(n=>{const s=e.read(n);l.set(s,void 0)})),i}var _Mi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},X9e=function(l,e){return function(i,n){e(i,n,l)}},vie,uB;let VUe=(uB=class extends xi{static _createUniqueUri(){return yo.from({scheme:"inline-edits",path:new Date().toString()+String(vie._modelId++)})}constructor(e,i,n,s,c,d,f){super(),this.textModel=e,this._textModelVersionId=i,this._selection=n,this._debounceValue=s,this.languageFeaturesService=c,this._diffProviderFactoryService=d,this._modelService=f,this._forceUpdateExplicitlySignal=xJ(this),this._selectedInlineCompletionId=bc(this,void 0),this._isActive=bc(this,!1),this._originalModel=Cy(()=>this._modelService.createModel("",null,vie._createUniqueUri())).keepObserved(this._store),this._modifiedModel=Cy(()=>this._modelService.createModel("",null,vie._createUniqueUri())).keepObserved(this._store),this._pinnedRange=new mMi(this.textModel,this._textModelVersionId),this.isPinned=this._pinnedRange.range.map(m=>!!m),this.userPrompt=bc(this,void 0),this.inlineEdit=ro(this,m=>{var v,x;return(x=(v=this._inlineEdit.read(m))==null?void 0:v.promiseResult.read(m))==null?void 0:x.data}),this._inlineEdit=ro(this,m=>{const v=this.selectedInlineEdit.read(m);if(!v)return;const x=v.inlineCompletion.range;if(v.inlineCompletion.insertText.trim()==="")return;let w=v.inlineCompletion.insertText.split(/\r\n|\r|\n/);function I(J){var ae;const Y=((ae=J[0].match(/^\s*/))==null?void 0:ae[0])??"";return J.map(me=>me.replace(new RegExp("^"+Y),""))}w=I(w);let O=this.textModel.getValueInRange(x).split(/\r\n|\r|\n/);O=I(O),this._originalModel.get().setValue(O.join(`
+`)),this._modifiedModel.get().setValue(w.join(`
+`));const z=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:"advanced"});return mwe.fromFn(async()=>{const J=await z.computeDiff(this._originalModel.get(),this._modifiedModel.get(),{computeMoves:!1,ignoreTrimWhitespace:!1,maxComputationTimeMs:1e3},cc.None);if(!J.identical)return new uMi(Za.fromRangeInclusive(x),I(w),J.changes)})}),this._fetchStore=this._register(new wn),this._inlineEditsFetchResult=sre(this,void 0),this._inlineEdits=mw({owner:this,equalsFn:Bye},m=>{var v;return((v=this._inlineEditsFetchResult.read(m))==null?void 0:v.completions.map(x=>new pMi(x)))??[]}),this._fetchInlineEditsPromise=wDt({owner:this,createEmptyChangeSummary:()=>({inlineCompletionTriggerKind:OE.Automatic}),handleChange:(m,v)=>(m.didChange(this._forceUpdateExplicitlySignal)&&(v.inlineCompletionTriggerKind=OE.Explicit),!0)},async(m,v)=>{this._fetchStore.clear(),this._forceUpdateExplicitlySignal.read(m),this._textModelVersionId.read(m);function x(z,J){return J(z)}const w=this._pinnedRange.range.read(m)??x(this._selection.read(m),z=>z.isEmpty()?void 0:z);if(!w){this._inlineEditsFetchResult.set(void 0,void 0),this.userPrompt.set(void 0,void 0);return}const I={triggerKind:v.inlineCompletionTriggerKind,selectedSuggestionInfo:void 0,userPrompt:this.userPrompt.read(m)},P=hBe(this._fetchStore);await c6(200,P);const O=await uPt(this.languageFeaturesService.inlineCompletionsProvider,w,this.textModel,I,P);P.isCancellationRequested||this._inlineEditsFetchResult.set(O,void 0)}),this._filteredInlineEditItems=mw({owner:this,equalsFn:Fye()},m=>this._inlineEdits.read(m)),this.selectedInlineCompletionIndex=ro(this,m=>{const v=this._selectedInlineCompletionId.read(m),x=this._filteredInlineEditItems.read(m),w=this._selectedInlineCompletionId===void 0?-1:x.findIndex(I=>I.semanticId===v);return w===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):w}),this.selectedInlineEdit=ro(this,m=>{const v=this._filteredInlineEditItems.read(m),x=this.selectedInlineCompletionIndex.read(m);return v[x]}),this._register(kJ(this._fetchInlineEditsPromise))}async triggerExplicitly(e){PB(e,i=>{this._isActive.set(!0,i),this._forceUpdateExplicitlySignal.trigger(i)}),await this._fetchInlineEditsPromise.get()}stop(e){PB(e,i=>{this.userPrompt.set(void 0,i),this._isActive.set(!1,i),this._inlineEditsFetchResult.set(void 0,i),this._pinnedRange.setRange(void 0,i)})}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();const i=this._filteredInlineEditItems.get()||[];if(i.length>0){const n=(this.selectedInlineCompletionIndex.get()+e+i.length)%i.length;this._selectedInlineCompletionId.set(i[n].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}async accept(e){if(e.getModel()!==this.textModel)throw new tu;const i=this.selectedInlineEdit.get();i&&(e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[i.inlineCompletion.toSingleTextEdit().toSingleEditOperation()]),this.stop())}},vie=uB,uB._modelId=0,uB);VUe=vie=_Mi([X9e(4,Ts),X9e(5,Rse),X9e(6,rf)],VUe);class pMi{constructor(e){this.inlineCompletion=e,this.semanticId=this.inlineCompletion.hash()}}class mMi extends xi{constructor(e,i){super(),this._textModel=e,this._versionId=i,this._decorations=bc(this,[]),this.range=ro(this,n=>{this._versionId.read(n);const s=this._decorations.read(n)[0];return s?this._textModel.getDecorationRange(s)??null:null}),this._register(fo(()=>{this._textModel.deltaDecorations(this._decorations.get(),[])}))}setRange(e,i){this._decorations.set(this._textModel.deltaDecorations(this._decorations.get(),e?[{range:e,options:{description:"trackedRange"}}]:[]),i)}}var gMi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Qte=function(l,e){return function(i,n){e(i,n,l)}},HUe,dB;let m6=(dB=class extends xi{static get(e){return e.getContribution(HUe.ID)}constructor(e,i,n,s,c,d){super(),this.editor=e,this._instantiationService=i,this._contextKeyService=n,this._debounceService=s,this._languageFeaturesService=c,this._configurationService=d,this._enabled=KTi("editor.inlineEdits.enabled",!1,this._configurationService),this._editorObs=zC(this.editor),this._selection=ro(this,f=>this._editorObs.cursorSelection.read(f)??new Us(1,1,1,1)),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineEditsDebounce",{min:50,max:50}),this.model=Cy(this,f=>{if(!this._enabled.read(f)||this._editorObs.isReadonly.read(f))return;const m=this._editorObs.model.read(f);return m?this._instantiationService.createInstance(WC(VUe,f),m,this._editorObs.versionId,this._selection,this._debounceValue):void 0}),this._hadInlineEdit=Dse(this,(f,m)=>{var v;return m||((v=this.model.read(f))==null?void 0:v.inlineEdit.read(f))!==void 0}),this._widget=Cy(this,f=>{if(this._hadInlineEdit.read(f))return this._instantiationService.createInstance(WC(WUe,f),this.editor,this.model.map((m,v)=>m==null?void 0:m.inlineEdit.read(v)),yMi(m=>{var v;return((v=this.model.read(m))==null?void 0:v.userPrompt)??bc("empty","")}))}),this._register(_E(cJ,this._contextKeyService,f=>{var m;return!!((m=this.model.read(f))!=null&&m.inlineEdit.read(f))})),this._register(_E(oMi,this._contextKeyService,f=>{var m;return!!((m=this.model.read(f))!=null&&m.isPinned.read(f))})),this.model.recomputeInitiallyAndOnChange(this._store),this._widget.recomputeInitiallyAndOnChange(this._store)}},HUe=dB,dB.ID="editor.contrib.inlineEditsController",dB);m6=HUe=gMi([Qte(1,ho),Qte(2,Ko),Qte(3,Pw),Qte(4,Ts),Qte(5,Cc)],m6);function yMi(l){return xse(void 0,e=>l(e).read(e),(e,i)=>{l(void 0).set(e,i)})}function Gse(l){return{label:l.value,alias:l.original}}const uSe=class uSe extends hs{constructor(){super({id:uSe.ID,...Gse(aa("action.inlineEdits.showNext","Show Next Inline Edit")),precondition:kn.and(Tt.writable,cJ),kbOpts:{weight:100,primary:606}})}async run(e,i){var s;const n=m6.get(i);(s=n==null?void 0:n.model.get())==null||s.next()}};uSe.ID=sMi;let jUe=uSe;const dSe=class dSe extends hs{constructor(){super({id:dSe.ID,...Gse(aa("action.inlineEdits.showPrevious","Show Previous Inline Edit")),precondition:kn.and(Tt.writable,cJ),kbOpts:{weight:100,primary:604}})}async run(e,i){var s;const n=m6.get(i);(s=n==null?void 0:n.model.get())==null||s.previous()}};dSe.ID=rMi;let zUe=dSe;class vMi extends hs{constructor(){super({id:"editor.action.inlineEdits.trigger",...Gse(aa("action.inlineEdits.trigger","Trigger Inline Edit")),precondition:Tt.writable})}async run(e,i){const n=m6.get(i);await SDt(async s=>{var c;await((c=n==null?void 0:n.model.get())==null?void 0:c.triggerExplicitly(s))})}}class bMi extends hs{constructor(){super({id:nMi,...Gse(aa("action.inlineEdits.accept","Accept Inline Edit")),precondition:cJ,menuOpts:{menuId:As.InlineEditsActions,title:W("inlineEditsActions","Accept Inline Edit"),group:"primary",order:1,icon:pr.check},kbOpts:{primary:2058,weight:2e4,kbExpr:cJ}})}async run(e,i){var s;i instanceof kT&&(i=i.getParentEditor());const n=m6.get(i);n&&((s=n.model.get())==null||s.accept(n.editor),n.editor.focus())}}const fSe=class fSe extends hs{constructor(){super({id:fSe.ID,...Gse(aa("action.inlineEdits.hide","Hide Inline Edit")),precondition:cJ,kbOpts:{weight:100,primary:9}})}async run(e,i){const n=m6.get(i);th(s=>{var c;(c=n==null?void 0:n.model.get())==null||c.stop(s)})}};fSe.ID="editor.action.inlineEdits.hide";let UUe=fSe;Cl(m6.ID,m6,3);sr(vMi);sr(jUe);sr(zUe);sr(bMi);sr(UUe);const JB={Visible:new rs("parameterHintsVisible",!1),MultipleSignatures:new rs("parameterHintsMultipleSignatures",!1)};async function IPt(l,e,i,n,s){const c=l.ordered(e);for(const d of c)try{const f=await d.provideSignatureHelp(e,i,s,n);if(f)return f}catch(f){t_(f)}}fl.registerCommand("_executeSignatureHelpProvider",async(l,...e)=>{const[i,n,s]=e;Fl(yo.isUri(i)),Fl(pi.isIPosition(n)),Fl(typeof s=="string"||!s);const c=l.get(Ts),d=await l.get(Ob).createModelReference(i);try{const f=await IPt(c.signatureHelpProvider,d.object.textEditorModel,pi.lift(n),{triggerKind:kL.Invoke,isRetrigger:!1,triggerCharacter:s},cc.None);return f?(setTimeout(()=>f.dispose(),0),f.value):void 0}finally{d.dispose()}});var pM;(function(l){l.Default={type:0};class e{constructor(s,c){this.request=s,this.previouslyActiveHints=c,this.type=2}}l.Pending=e;class i{constructor(s){this.hints=s,this.type=1}}l.Active=i})(pM||(pM={}));const hSe=class hSe extends xi{constructor(e,i,n=hSe.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new gi),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=pM.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new Fm),this.triggerChars=new pye,this.retriggerChars=new pye,this.triggerId=0,this.editor=e,this.providers=i,this.throttledDelayer=new Ck(n),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(s=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(s=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(s=>this.onCursorChange(s))),this._register(this.editor.onDidChangeModelContent(s=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(s=>this.onDidType(s))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){this._state.type===2&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=pM.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,i){const n=this.editor.getModel();if(!n||!this.providers.has(n))return;const s=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(s),i).catch(Pa)}next(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,i=this.state.hints.activeSignature,n=i%e===e-1,s=this.editor.getOption(86).cycle;if((e<2||n)&&!s){this.cancel();return}this.updateActiveSignature(n&&s?0:i+1)}previous(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,i=this.state.hints.activeSignature,n=i===0,s=this.editor.getOption(86).cycle;if((e<2||n)&&!s){this.cancel();return}this.updateActiveSignature(n&&s?e-1:i-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new pM.Active({...this.state.hints,activeSignature:e}),this._onChangedHints.fire(this.state.hints))}async doTrigger(e){const i=this.state.type===1||this.state.type===2,n=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const s=this._pendingTriggers.reduce(CMi);this._pendingTriggers=[];const c={triggerKind:s.triggerKind,triggerCharacter:s.triggerCharacter,isRetrigger:i,activeSignatureHelp:n};if(!this.editor.hasModel())return!1;const d=this.editor.getModel(),f=this.editor.getPosition();this.state=new pM.Pending(Om(m=>IPt(this.providers,d,f,c,m)),n);try{const m=await this.state.request;return e!==this.triggerId?(m==null||m.dispose(),!1):!m||!m.value.signatures||m.value.signatures.length===0?(m==null||m.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new pM.Active(m.value),this._lastSignatureHelpResult.value=m,this._onChangedHints.fire(this.state.hints),!0)}catch(m){return e===this.triggerId&&(this.state=pM.Default),Pa(m),!1}}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();const e=this.editor.getModel();if(e)for(const i of this.providers.ordered(e)){for(const n of i.signatureHelpTriggerCharacters||[])if(n.length){const s=n.charCodeAt(0);this.triggerChars.add(s),this.retriggerChars.add(s)}for(const n of i.signatureHelpRetriggerCharacters||[])n.length&&this.retriggerChars.add(n.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const i=e.length-1,n=e.charCodeAt(i);(this.triggerChars.has(n)||this.isTriggered&&this.retriggerChars.has(n))&&this.trigger({triggerKind:kL.TriggerCharacter,triggerCharacter:e.charAt(i)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:kL.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:kL.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(86).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}};hSe.DEFAULT_DELAY=120;let qUe=hSe;function CMi(l,e){switch(e.triggerKind){case kL.Invoke:return e;case kL.ContentChange:return l;case kL.TriggerCharacter:default:return e}}var SMi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Q0e=function(l,e){return function(i,n){e(i,n,l)}},$Ue;const sw=Cr,wMi=sf("parameter-hints-next",pr.chevronDown,W("parameterHintsNextIcon","Icon for show next parameter hint.")),xMi=sf("parameter-hints-previous",pr.chevronUp,W("parameterHintsPreviousIcon","Icon for show previous parameter hint."));var fB;let JUe=(fB=class extends xi{constructor(e,i,n,s,c,d){super(),this.editor=e,this.model=i,this.telemetryService=d,this.renderDisposeables=this._register(new wn),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new d6({editor:e},c,s)),this.keyVisible=JB.Visible.bindTo(n),this.keyMultipleSignatures=JB.MultipleSignatures.bindTo(n)}createParameterHintDOMNodes(){const e=sw(".editor-widget.parameter-hints-widget"),i=jn(e,sw(".phwrapper"));i.tabIndex=-1;const n=jn(i,sw(".controls")),s=jn(n,sw(".button"+zo.asCSSSelector(xMi))),c=jn(n,sw(".overloads")),d=jn(n,sw(".button"+zo.asCSSSelector(wMi)));this._register(en(s,"click",I=>{il.stop(I),this.previous()})),this._register(en(d,"click",I=>{il.stop(I),this.next()}));const f=sw(".body"),m=new vse(f,{alwaysConsumeMouseWheel:!0});this._register(m),i.appendChild(m.getDomNode());const v=jn(f,sw(".signature")),x=jn(f,sw(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:v,overloads:c,docs:x,scrollbar:m},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(I=>{this.visible&&this.editor.layoutContentWidget(this)}));const w=()=>{if(!this.domNodes)return;const I=this.editor.getOption(50),P=this.domNodes.element;P.style.fontSize=`${I.fontSize}px`,P.style.lineHeight=`${I.lineHeight/I.fontSize}`,P.style.setProperty("--vscode-parameterHintsWidget-editorFontFamily",I.fontFamily),P.style.setProperty("--vscode-parameterHintsWidget-editorFontFamilyDefault",vv.fontFamily)};w(),this._register(Tr.chain(this.editor.onDidChangeConfiguration.bind(this.editor),I=>I.filter(P=>P.hasChanged(50)))(w)),this._register(this.editor.onDidLayoutChange(I=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{var e;(e=this.domNodes)==null||e.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){var e;this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,(e=this.domNodes)==null||e.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){if(this.renderDisposeables.clear(),!this.domNodes)return;const i=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",i),this.keyMultipleSignatures.set(i),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const n=e.signatures[e.activeSignature];if(!n)return;const s=jn(this.domNodes.signature,sw(".code")),c=n.parameters.length>0,d=n.activeParameter??e.activeParameter;if(c)this.renderParameters(s,n,d);else{const v=jn(s,sw("span"));v.textContent=n.label}const f=n.parameters[d];if(f!=null&&f.documentation){const v=sw("span.documentation");if(typeof f.documentation=="string")v.textContent=f.documentation;else{const x=this.renderMarkdownDocs(f.documentation);v.appendChild(x.element)}jn(this.domNodes.docs,sw("p",{},v))}if(n.documentation!==void 0)if(typeof n.documentation=="string")jn(this.domNodes.docs,sw("p",{},n.documentation));else{const v=this.renderMarkdownDocs(n.documentation);jn(this.domNodes.docs,v.element)}const m=this.hasDocs(n,f);if(this.domNodes.signature.classList.toggle("has-docs",m),this.domNodes.docs.classList.toggle("empty",!m),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,f){let v="";const x=n.parameters[d];Array.isArray(x.label)?v=n.label.substring(x.label[0],x.label[1]):v=x.label,x.documentation&&(v+=typeof x.documentation=="string"?`, ${x.documentation}`:`, ${x.documentation.value}`),n.documentation&&(v+=typeof n.documentation=="string"?`, ${n.documentation}`:`, ${n.documentation.value}`),this.announcedLabel!==v&&(xv(W("hint","{0}, hint",v)),this.announcedLabel=v)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const i=new bg,n=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var c;(c=this.domNodes)==null||c.scrollbar.scanDomNode()}}));n.element.classList.add("markdown-docs");const s=i.elapsed();return s>300&&this.telemetryService.publicLog2("parameterHints.parseMarkdown",{renderDuration:s}),n}hasDocs(e,i){return!!(i&&typeof i.documentation=="string"&&NM(i.documentation).length>0||i&&typeof i.documentation=="object"&&NM(i.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&NM(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&NM(e.documentation.value).length>0)}renderParameters(e,i,n){const[s,c]=this.getParameterLabelOffsets(i,n),d=document.createElement("span");d.textContent=i.label.substring(0,s);const f=document.createElement("span");f.textContent=i.label.substring(s,c),f.className="parameter active";const m=document.createElement("span");m.textContent=i.label.substring(c),jn(e,d,f,m)}getParameterLabelOffsets(e,i){const n=e.parameters[i];if(n){if(Array.isArray(n.label))return n.label;if(n.label.length){const s=new RegExp(`(\\W|^)${Tw(n.label)}(?=\\W|$)`,"g");s.test(e.label);const c=s.lastIndex-n.label.length;return c>=0?[c,s.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return $Ue.ID}updateMaxHeight(){if(!this.domNodes)return;const i=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=i;const n=this.domNodes.element.getElementsByClassName("phwrapper");n.length&&(n[0].style.maxHeight=i)}},$Ue=fB,fB.ID="editor.widget.parameterHintsWidget",fB);JUe=$Ue=SMi([Q0e(2,Ko),Q0e(3,Rb),Q0e(4,Pf),Q0e(5,b1)],JUe);It("editorHoverWidget.highlightForeground",rq,W("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."));var kMi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Jxt=function(l,e){return function(i,n){e(i,n,l)}},GUe,hB;let lJ=(hB=class extends xi{static get(e){return e.getContribution(GUe.ID)}constructor(e,i,n){super(),this.editor=e,this.model=this._register(new qUe(e,n.signatureHelpProvider)),this._register(this.model.onChangedHints(s=>{var c;s?(this.widget.value.show(),this.widget.value.render(s)):(c=this.widget.rawValue)==null||c.hide()})),this.widget=new HE(()=>this._register(i.createInstance(JUe,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){var e;(e=this.widget.rawValue)==null||e.previous()}next(){var e;(e=this.widget.rawValue)==null||e.next()}trigger(e){this.model.trigger(e,0)}},GUe=hB,hB.ID="editor.controller.parameterHints",hB);lJ=GUe=kMi([Jxt(1,ho),Jxt(2,Ts)],lJ);class TMi extends hs{constructor(){super({id:"editor.action.triggerParameterHints",label:W("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:Tt.hasSignatureHelpProvider,kbOpts:{kbExpr:Tt.editorTextFocus,primary:3082,weight:100}})}run(e,i){const n=lJ.get(i);n==null||n.trigger({triggerKind:kL.Invoke})}}Cl(lJ.ID,lJ,2);sr(TMi);const dKe=175,fKe=tm.bindToContribution(lJ.get);$r(new fKe({id:"closeParameterHints",precondition:JB.Visible,handler:l=>l.cancel(),kbOpts:{weight:dKe,kbExpr:Tt.focus,primary:9,secondary:[1033]}}));$r(new fKe({id:"showPrevParameterHint",precondition:kn.and(JB.Visible,JB.MultipleSignatures),handler:l=>l.previous(),kbOpts:{weight:dKe,kbExpr:Tt.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}}));$r(new fKe({id:"showNextParameterHint",precondition:kn.and(JB.Visible,JB.MultipleSignatures),handler:l=>l.next(),kbOpts:{weight:dKe,kbExpr:Tt.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));var DMi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},EMi=function(l,e){return function(i,n){e(i,n,l)}};class IMi{constructor(e){this.instantiationService=e}init(...e){}}function NMi(l,e){return class extends e{constructor(){super(...arguments),this._autorun=void 0}init(...n){this._autorun=Ib((s,c)=>{const d=WC(l(),s);c.add(this.instantiationService.createInstance(d,...n))})}dispose(){var n;(n=this._autorun)==null||n.dispose()}}}function LMi(l){return Fwe()?NMi(l,KUe):l()}let KUe=class extends IMi{constructor(e,i){super(i),this.init(e)}};KUe=DMi([EMi(1,ho)],KUe);Cl(Zre.ID,LMi(()=>Zre),0);It("editor.placeholder.foreground",Byi,W("placeholderForeground","Foreground color of the placeholder text in the editor."));var PMi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Z0e=function(l,e){return function(i,n){e(i,n,l)}};const BJ=new rs("renameInputVisible",!1,W("renameInputVisible","Whether the rename input widget is visible"));new rs("renameInputFocused",!1,W("renameInputFocused","Whether the rename input widget is focused"));let XUe=class{constructor(e,i,n,s,c,d){this._editor=e,this._acceptKeybindings=i,this._themeService=n,this._keybindingService=s,this._logService=d,this.allowEditorOverflow=!0,this._disposables=new wn,this._visibleContextKey=BJ.bindTo(c),this._isEditingRenameCandidate=!1,this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,this._candidates=new Set,this._beforeFirstInputFieldEditSW=new bg,this._inputWithButton=new AMi,this._disposables.add(this._inputWithButton),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(f=>{f.hasChanged(50)&&this._updateFont()})),this._disposables.add(n.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._domNode.appendChild(this._inputWithButton.domNode),this._renameCandidateListView=this._disposables.add(new hKe(this._domNode,{fontInfo:this._editor.getOption(50),onFocusChange:e=>{this._inputWithButton.input.value=e,this._isEditingRenameCandidate=!1},onSelectionChange:()=>{this._isEditingRenameCandidate=!1,this.acceptInput(!1)}})),this._disposables.add(this._inputWithButton.onDidInputChange(()=>{var e,i,n;((e=this._renameCandidateListView)==null?void 0:e.focusedCandidate)!==void 0&&(this._isEditingRenameCandidate=!0),this._timeBeforeFirstInputFieldEdit??(this._timeBeforeFirstInputFieldEdit=this._beforeFirstInputFieldEditSW.elapsed()),((i=this._renameCandidateProvidersCts)==null?void 0:i.token.isCancellationRequested)===!1&&this._renameCandidateProvidersCts.cancel(),(n=this._renameCandidateListView)==null||n.clearFocus()})),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){if(!this._domNode)return;const i=e.getColor(vJ),n=e.getColor(MTt);this._domNode.style.backgroundColor=String(e.getColor(Cw)??""),this._domNode.style.boxShadow=i?` 0 0 8px 2px ${i}`:"",this._domNode.style.border=n?`1px solid ${n}`:"",this._domNode.style.color=String(e.getColor(BTt)??"");const s=e.getColor(WTt);this._inputWithButton.domNode.style.backgroundColor=String(e.getColor(lVe)??""),this._inputWithButton.input.style.backgroundColor=String(e.getColor(lVe)??""),this._inputWithButton.domNode.style.borderWidth=s?"1px":"0px",this._inputWithButton.domNode.style.borderStyle=s?"solid":"none",this._inputWithButton.domNode.style.borderColor=(s==null?void 0:s.toString())??"none"}_updateFont(){if(this._domNode===void 0)return;Fl(this._label!==void 0,"RenameWidget#_updateFont: _label must not be undefined given _domNode is defined"),this._editor.applyFontInfo(this._inputWithButton.input);const e=this._editor.getOption(50);this._label.style.fontSize=`${this._computeLabelFontSize(e.fontSize)}px`}_computeLabelFontSize(e){return e*.8}getPosition(){if(!this._visible||!this._editor.hasModel()||!this._editor.getDomNode())return null;const e=SR(this.getDomNode().ownerDocument.body),i=e_(this._editor.getDomNode()),n=this._getTopForPosition();this._nPxAvailableAbove=n+i.top,this._nPxAvailableBelow=e.height-this._nPxAvailableAbove;const s=this._editor.getOption(67),{totalHeight:c}=Yre.getLayoutInfo({lineHeight:s}),d=this._nPxAvailableBelow>c*6?[2,1]:[1,2];return{position:this._position,preference:d}}beforeRender(){var n,s;const[e,i]=this._acceptKeybindings;return this._label.innerText=W({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",(n=this._keybindingService.lookupKeybinding(e))==null?void 0:n.getLabel(),(s=this._keybindingService.lookupKeybinding(i))==null?void 0:s.getLabel()),this._domNode.style.minWidth="200px",null}afterRender(e){if(e===null){this.cancelInput(!0,"afterRender (because position is null)");return}if(!this._editor.hasModel()||!this._editor.getDomNode())return;Fl(this._renameCandidateListView),Fl(this._nPxAvailableAbove!==void 0),Fl(this._nPxAvailableBelow!==void 0);const i=B4(this._inputWithButton.domNode),n=B4(this._label);let s;e===2?s=this._nPxAvailableBelow:s=this._nPxAvailableAbove,this._renameCandidateListView.layout({height:s-n-i,width:FC(this._inputWithButton.domNode)})}acceptInput(e){var i;this._trace("invoking acceptInput"),(i=this._currentAcceptInput)==null||i.call(this,e)}cancelInput(e,i){var n;(n=this._currentCancelInput)==null||n.call(this,e)}focusNextRenameSuggestion(){var e;(e=this._renameCandidateListView)!=null&&e.focusNext()||(this._inputWithButton.input.value=this._currentName)}focusPreviousRenameSuggestion(){var e;(e=this._renameCandidateListView)!=null&&e.focusPrevious()||(this._inputWithButton.input.value=this._currentName)}getInput(e,i,n,s,c){const{start:d,end:f}=this._getSelection(e,i);this._renameCts=c;const m=new wn;this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,s===void 0?this._inputWithButton.button.style.display="none":(this._inputWithButton.button.style.display="flex",this._requestRenameCandidatesOnce=s,this._requestRenameCandidates(i,!1),m.add(en(this._inputWithButton.button,"click",()=>this._requestRenameCandidates(i,!0))),m.add(en(this._inputWithButton.button,br.KEY_DOWN,x=>{const w=new Id(x);(w.equals(3)||w.equals(10))&&(w.stopPropagation(),w.preventDefault(),this._requestRenameCandidates(i,!0))}))),this._isEditingRenameCandidate=!1,this._domNode.classList.toggle("preview",n),this._position=new pi(e.startLineNumber,e.startColumn),this._currentName=i,this._inputWithButton.input.value=i,this._inputWithButton.input.setAttribute("selectionStart",d.toString()),this._inputWithButton.input.setAttribute("selectionEnd",f.toString()),this._inputWithButton.input.size=Math.max((e.endColumn-e.startColumn)*1.1,20),this._beforeFirstInputFieldEditSW.reset(),m.add(fo(()=>{this._renameCts=void 0,c.dispose(!0)})),m.add(fo(()=>{this._renameCandidateProvidersCts!==void 0&&(this._renameCandidateProvidersCts.dispose(!0),this._renameCandidateProvidersCts=void 0)})),m.add(fo(()=>this._candidates.clear()));const v=new hJ;return v.p.finally(()=>{m.dispose(),this._hide()}),this._currentCancelInput=x=>{var w;return this._trace("invoking _currentCancelInput"),this._currentAcceptInput=void 0,this._currentCancelInput=void 0,(w=this._renameCandidateListView)==null||w.clearCandidates(),v.complete(x),!0},this._currentAcceptInput=x=>{this._trace("invoking _currentAcceptInput"),Fl(this._renameCandidateListView!==void 0);const w=this._renameCandidateListView.nCandidates;let I,P;const O=this._renameCandidateListView.focusedCandidate;if(O!==void 0?(this._trace("using new name from renameSuggestion"),I=O,P={k:"renameSuggestion"}):(this._trace("using new name from inputField"),I=this._inputWithButton.input.value,P=this._isEditingRenameCandidate?{k:"userEditedRenameSuggestion"}:{k:"inputField"}),I===i||I.trim().length===0){this.cancelInput(!0,"_currentAcceptInput (because newName === value || newName.trim().length === 0)");return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView.clearCandidates(),v.complete({newName:I,wantsPreview:n&&x,stats:{source:P,nRenameSuggestions:w,timeBeforeFirstInputFieldEdit:this._timeBeforeFirstInputFieldEdit,nRenameSuggestionsInvocations:this._nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:this._hadAutomaticRenameSuggestionsInvocation}})},m.add(c.token.onCancellationRequested(()=>this.cancelInput(!0,"cts.token.onCancellationRequested"))),m.add(this._editor.onDidBlurEditorWidget(()=>{var x;return this.cancelInput(!((x=this._domNode)!=null&&x.ownerDocument.hasFocus()),"editor.onDidBlurEditorWidget")})),this._show(),v.p}_requestRenameCandidates(e,i){if(this._requestRenameCandidatesOnce!==void 0&&(this._renameCandidateProvidersCts!==void 0&&this._renameCandidateProvidersCts.dispose(!0),Fl(this._renameCts),this._inputWithButton.buttonState!=="stop")){this._renameCandidateProvidersCts=new ih;const n=i?Mne.Invoke:Mne.Automatic,s=this._requestRenameCandidatesOnce(n,this._renameCandidateProvidersCts.token);if(s.length===0){this._inputWithButton.setSparkleButton();return}i||(this._hadAutomaticRenameSuggestionsInvocation=!0),this._nRenameSuggestionsInvocations+=1,this._inputWithButton.setStopButton(),this._updateRenameCandidates(s,e,this._renameCts.token)}}_getSelection(e,i){Fl(this._editor.hasModel());const n=this._editor.getSelection();let s=0,c=i.length;return!nt.isEmpty(n)&&!nt.spansMultipleLines(n)&&nt.containsRange(e,n)&&(s=Math.max(0,n.startColumn-e.startColumn),c=Math.min(e.endColumn,n.endColumn)-e.startColumn),{start:s,end:c}}_show(){this._trace("invoking _show"),this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._inputWithButton.input.focus(),this._inputWithButton.input.setSelectionRange(parseInt(this._inputWithButton.input.getAttribute("selectionStart")),parseInt(this._inputWithButton.input.getAttribute("selectionEnd")))},100)}async _updateRenameCandidates(e,i,n){const s=(...v)=>this._trace("_updateRenameCandidates",...v);s("start");const c=await _se(Promise.allSettled(e),n);if(this._inputWithButton.setSparkleButton(),c===void 0){s("returning early - received updateRenameCandidates results - undefined");return}const d=c.flatMap(v=>v.status==="fulfilled"&&xL(v.value)?v.value:[]);s(`received updateRenameCandidates results - total (unfiltered) ${d.length} candidates.`);const f=r6(d,v=>v.newSymbolName);s(`distinct candidates - ${f.length} candidates.`);const m=f.filter(({newSymbolName:v})=>v.trim().length>0&&v!==this._inputWithButton.input.value&&v!==i&&!this._candidates.has(v));if(s(`valid distinct candidates - ${d.length} candidates.`),m.forEach(v=>this._candidates.add(v.newSymbolName)),m.length<1){s("returning early - no valid distinct candidates");return}s("setting candidates"),this._renameCandidateListView.setCandidates(m),s("asking editor to re-layout"),this._editor.layoutContentWidget(this)}_hide(){this._trace("invoked _hide"),this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}_getTopForPosition(){const e=this._editor.getVisibleRanges();let i;return e.length>0?i=e[0].startLineNumber:(this._logService.warn("RenameWidget#_getTopForPosition: this should not happen - visibleRanges is empty"),i=Math.max(1,this._position.lineNumber-5)),this._editor.getTopForLineNumber(this._position.lineNumber)-this._editor.getTopForLineNumber(i)}_trace(...e){this._logService.trace("RenameWidget",...e)}};XUe=PMi([Z0e(2,im),Z0e(3,pu),Z0e(4,Ko),Z0e(5,N0)],XUe);class hKe{constructor(e,i){this._disposables=new wn,this._availableHeight=0,this._minimumWidth=0,this._lineHeight=i.fontInfo.lineHeight,this._typicalHalfwidthCharacterWidth=i.fontInfo.typicalHalfwidthCharacterWidth,this._listContainer=document.createElement("div"),this._listContainer.className="rename-box rename-candidate-list-container",e.appendChild(this._listContainer),this._listWidget=hKe._createListWidget(this._listContainer,this._candidateViewHeight,i.fontInfo),this._listWidget.onDidChangeFocus(n=>{n.elements.length===1&&i.onFocusChange(n.elements[0].newSymbolName)},this._disposables),this._listWidget.onDidChangeSelection(n=>{n.elements.length===1&&i.onSelectionChange()},this._disposables),this._disposables.add(this._listWidget.onDidBlur(n=>{this._listWidget.setFocus([])})),this._listWidget.style(iW({listInactiveFocusForeground:Qne,listInactiveFocusBackground:Zne}))}dispose(){this._listWidget.dispose(),this._disposables.dispose()}layout({height:e,width:i}){this._availableHeight=e,this._minimumWidth=i}setCandidates(e){this._listWidget.splice(0,0,e);const i=this._pickListHeight(this._listWidget.length),n=this._pickListWidth(e);this._listWidget.layout(i,n),this._listContainer.style.height=`${i}px`,this._listContainer.style.width=`${n}px`,PL(W("renameSuggestionsReceivedAria","Received {0} rename suggestions",e.length))}clearCandidates(){this._listContainer.style.height="0px",this._listContainer.style.width="0px",this._listWidget.splice(0,this._listWidget.length,[])}get nCandidates(){return this._listWidget.length}get focusedCandidate(){if(this._listWidget.length===0)return;const e=this._listWidget.getSelectedElements()[0];if(e!==void 0)return e.newSymbolName;const i=this._listWidget.getFocusedElements()[0];if(i!==void 0)return i.newSymbolName}focusNext(){if(this._listWidget.length===0)return!1;const e=this._listWidget.getFocus();if(e.length===0)return this._listWidget.focusFirst(),this._listWidget.reveal(0),!0;if(e[0]===this._listWidget.length-1)return this._listWidget.setFocus([]),this._listWidget.reveal(0),!1;{this._listWidget.focusNext();const i=this._listWidget.getFocus()[0];return this._listWidget.reveal(i),!0}}focusPrevious(){if(this._listWidget.length===0)return!1;const e=this._listWidget.getFocus();if(e.length===0){this._listWidget.focusLast();const i=this._listWidget.getFocus()[0];return this._listWidget.reveal(i),!0}else{if(e[0]===0)return this._listWidget.setFocus([]),!1;{this._listWidget.focusPrevious();const i=this._listWidget.getFocus()[0];return this._listWidget.reveal(i),!0}}}clearFocus(){this._listWidget.setFocus([])}get _candidateViewHeight(){const{totalHeight:e}=Yre.getLayoutInfo({lineHeight:this._lineHeight});return e}_pickListHeight(e){const i=this._candidateViewHeight*e;return Math.min(i,this._availableHeight,this._candidateViewHeight*7)}_pickListWidth(e){const i=Math.ceil(Math.max(...e.map(s=>s.newSymbolName.length))*this._typicalHalfwidthCharacterWidth);return Math.max(this._minimumWidth,25+i+10)}static _createListWidget(e,i,n){const s=new class{getTemplateId(d){return"candidate"}getHeight(d){return i}},c=new class{constructor(){this.templateId="candidate"}renderTemplate(d){return new Yre(d,n)}renderElement(d,f,m){m.populate(d)}disposeTemplate(d){d.dispose()}};return new Ow("NewSymbolNameCandidates",e,s,[c],{keyboardSupport:!1,mouseSupport:!0,multipleSelectionSupport:!1})}}class AMi{constructor(){this._onDidInputChange=new gi,this.onDidInputChange=this._onDidInputChange.event,this._disposables=new wn}get domNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="rename-input-with-button",this._domNode.style.display="flex",this._domNode.style.flexDirection="row",this._domNode.style.alignItems="center",this._inputNode=document.createElement("input"),this._inputNode.className="rename-input",this._inputNode.type="text",this._inputNode.style.border="none",this._inputNode.setAttribute("aria-label",W("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._inputNode),this._buttonNode=document.createElement("div"),this._buttonNode.className="rename-suggestions-button",this._buttonNode.setAttribute("tabindex","0"),this._buttonGenHoverText=W("generateRenameSuggestionsButton","Generate new name suggestions"),this._buttonCancelHoverText=W("cancelRenameSuggestionsButton","Cancel"),this._buttonHover=QE().setupManagedHover(Dv("element"),this._buttonNode,this._buttonGenHoverText),this._disposables.add(this._buttonHover),this._domNode.appendChild(this._buttonNode),this._disposables.add(en(this.input,br.INPUT,()=>this._onDidInputChange.fire())),this._disposables.add(en(this.input,br.KEY_DOWN,e=>{const i=new Id(e);(i.keyCode===15||i.keyCode===17)&&this._onDidInputChange.fire()})),this._disposables.add(en(this.input,br.CLICK,()=>this._onDidInputChange.fire())),this._disposables.add(en(this.input,br.FOCUS,()=>{this.domNode.style.outlineWidth="1px",this.domNode.style.outlineStyle="solid",this.domNode.style.outlineOffset="-1px",this.domNode.style.outlineColor="var(--vscode-focusBorder)"})),this._disposables.add(en(this.input,br.BLUR,()=>{this.domNode.style.outline="none"}))),this._domNode}get input(){return Fl(this._inputNode),this._inputNode}get button(){return Fl(this._buttonNode),this._buttonNode}get buttonState(){return this._buttonState}setSparkleButton(){var e;this._buttonState="sparkle",this._sparkleIcon??(this._sparkleIcon=IB(pr.sparkle)),s0(this.button),this.button.appendChild(this._sparkleIcon),this.button.setAttribute("aria-label","Generating new name suggestions"),(e=this._buttonHover)==null||e.update(this._buttonGenHoverText),this.input.focus()}setStopButton(){var e;this._buttonState="stop",this._stopIcon??(this._stopIcon=IB(pr.primitiveSquare)),s0(this.button),this.button.appendChild(this._stopIcon),this.button.setAttribute("aria-label","Cancel generating new name suggestions"),(e=this._buttonHover)==null||e.update(this._buttonCancelHoverText),this.input.focus()}dispose(){this._disposables.dispose()}}const kne=class kne{constructor(e,i){this._domNode=document.createElement("div"),this._domNode.className="rename-box rename-candidate",this._domNode.style.display="flex",this._domNode.style.columnGap="5px",this._domNode.style.alignItems="center",this._domNode.style.height=`${i.lineHeight}px`,this._domNode.style.padding=`${kne._PADDING}px`;const n=document.createElement("div");n.style.display="flex",n.style.alignItems="center",n.style.width=n.style.height=`${i.lineHeight*.8}px`,this._domNode.appendChild(n),this._icon=IB(pr.sparkle),this._icon.style.display="none",n.appendChild(this._icon),this._label=document.createElement("div"),a0(this._label,i),this._domNode.appendChild(this._label),e.appendChild(this._domNode)}populate(e){this._updateIcon(e),this._updateLabel(e)}_updateIcon(e){var n;const i=!!((n=e.tags)!=null&&n.includes(bBe.AIGenerated));this._icon.style.display=i?"inherit":"none"}_updateLabel(e){this._label.innerText=e.newSymbolName}static getLayoutInfo({lineHeight:e}){return{totalHeight:e+kne._PADDING*2}}dispose(){}};kne._PADDING=2;let Yre=kne;var OMi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},aM=function(l,e){return function(i,n){e(i,n,l)}},QUe;class _Ke{constructor(e,i,n){this.model=e,this.position=i,this._providerRenameIdx=0,this._providers=n.ordered(e)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(e){const i=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){const s=this._providers[this._providerRenameIdx];if(!s.resolveRenameLocation)break;const c=await s.resolveRenameLocation(this.model,this.position,e);if(c){if(c.rejectReason){i.push(c.rejectReason);continue}return c}}this._providerRenameIdx=0;const n=this.model.getWordAtPosition(this.position);return n?{range:new nt(this.position.lineNumber,n.startColumn,this.position.lineNumber,n.endColumn),text:n.word,rejectReason:i.length>0?i.join(`
+`):void 0}:{range:nt.fromPositions(this.position),text:"",rejectReason:i.length>0?i.join(`
+`):void 0}}async provideRenameEdits(e,i){return this._provideRenameEdits(e,this._providerRenameIdx,[],i)}async _provideRenameEdits(e,i,n,s){const c=this._providers[i];if(!c)return{edits:[],rejectReason:n.join(`
+`)};const d=await c.provideRenameEdits(this.model,this.position,e,s);if(d){if(d.rejectReason)return this._provideRenameEdits(e,i+1,n.concat(d.rejectReason),s)}else return this._provideRenameEdits(e,i+1,n.concat(W("no result","No result.")),s);return d}}async function MMi(l,e,i,n){const s=new _Ke(e,i,l),c=await s.resolveRenameLocation(cc.None);return c!=null&&c.rejectReason?{edits:[],rejectReason:c.rejectReason}:s.provideRenameEdits(n,cc.None)}var _B;let MR=(_B=class{static get(e){return e.getContribution(QUe.ID)}constructor(e,i,n,s,c,d,f,m,v){this.editor=e,this._instaService=i,this._notificationService=n,this._bulkEditService=s,this._progressService=c,this._logService=d,this._configService=f,this._languageFeaturesService=m,this._telemetryService=v,this._disposableStore=new wn,this._cts=new ih,this._renameWidget=this._disposableStore.add(this._instaService.createInstance(XUe,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){var O,z;const e=this._logService.trace.bind(this._logService,"[rename]");if(this._cts.dispose(!0),this._cts=new ih,!this.editor.hasModel()){e("editor has no model");return}const i=this.editor.getPosition(),n=new _Ke(this.editor.getModel(),i,this._languageFeaturesService.renameProvider);if(!n.hasProvider()){e("skeleton has no provider");return}const s=new LR(this.editor,5,void 0,this._cts.token);let c;try{e("resolving rename location");const J=n.resolveRenameLocation(s.token);this._progressService.showWhile(J,250),c=await J,e("resolved rename location")}catch(J){J instanceof vT?e("resolve rename location cancelled",JSON.stringify(J,null," ")):(e("resolve rename location failed",J instanceof Error?J:JSON.stringify(J,null," ")),(typeof J=="string"||WE(J))&&((O=GC.get(this.editor))==null||O.showMessage(J||W("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),i)));return}finally{s.dispose()}if(!c){e("returning early - no loc");return}if(c.rejectReason){e(`returning early - rejected with reason: ${c.rejectReason}`,c.rejectReason),(z=GC.get(this.editor))==null||z.showMessage(c.rejectReason,i);return}if(s.token.isCancellationRequested){e("returning early - cts1 cancelled");return}const d=new LR(this.editor,5,c.range,this._cts.token),f=this.editor.getModel(),m=this._languageFeaturesService.newSymbolNamesProvider.all(f),v=await Promise.all(m.map(async J=>[J,await J.supportsAutomaticNewSymbolNamesTriggerKind??!1])),x=(J,Y)=>{let ae=v.slice();return J===Mne.Automatic&&(ae=ae.filter(([me,ye])=>ye)),ae.map(([me])=>me.provideNewSymbolNames(f,c.range,J,Y))};e("creating rename input field and awaiting its result");const w=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),I=await this._renameWidget.getInput(c.range,c.text,w,m.length>0?x:void 0,d);if(e("received response from rename input field"),m.length>0&&this._reportTelemetry(m.length,f.getLanguageId(),I),typeof I=="boolean"){e(`returning early - rename input field response - ${I}`),I&&this.editor.focus(),d.dispose();return}this.editor.focus(),e("requesting rename edits");const P=_se(n.provideRenameEdits(I.newName,d.token),d.token).then(async J=>{if(!J){e("returning early - no rename edits result");return}if(!this.editor.hasModel()){e("returning early - no model after rename edits are provided");return}if(J.rejectReason){e(`returning early - rejected with reason: ${J.rejectReason}`),this._notificationService.info(J.rejectReason);return}this.editor.setSelection(nt.fromPositions(this.editor.getSelection().getPosition())),e("applying edits"),this._bulkEditService.apply(J,{editor:this.editor,showPreview:I.wantsPreview,label:W("label","Renaming '{0}' to '{1}'",c==null?void 0:c.text,I.newName),code:"undoredo.rename",quotableLabel:W("quotableLabel","Renaming {0} to {1}",c==null?void 0:c.text,I.newName),respectAutoSaveConfig:!0}).then(Y=>{e("edits applied"),Y.ariaSummary&&xv(W("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",c.text,I.newName,Y.ariaSummary))}).catch(Y=>{e(`error when applying edits ${JSON.stringify(Y,null," ")}`),this._notificationService.error(W("rename.failedApply","Rename failed to apply edits")),this._logService.error(Y)})},J=>{e("error when providing rename edits",JSON.stringify(J,null," ")),this._notificationService.error(W("rename.failed","Rename failed to compute edits")),this._logService.error(J)}).finally(()=>{d.dispose()});return e("returning rename operation"),this._progressService.showWhile(P,250),P}acceptRenameInput(e){this._renameWidget.acceptInput(e)}cancelRenameInput(){this._renameWidget.cancelInput(!0,"cancelRenameInput command")}focusNextRenameSuggestion(){this._renameWidget.focusNextRenameSuggestion()}focusPreviousRenameSuggestion(){this._renameWidget.focusPreviousRenameSuggestion()}_reportTelemetry(e,i,n){const s=typeof n=="boolean"?{kind:"cancelled",languageId:i,nRenameSuggestionProviders:e}:{kind:"accepted",languageId:i,nRenameSuggestionProviders:e,source:n.stats.source.k,nRenameSuggestions:n.stats.nRenameSuggestions,timeBeforeFirstInputFieldEdit:n.stats.timeBeforeFirstInputFieldEdit,wantsPreview:n.wantsPreview,nRenameSuggestionsInvocations:n.stats.nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:n.stats.hadAutomaticRenameSuggestionsInvocation};this._telemetryService.publicLog2("renameInvokedEvent",s)}},QUe=_B,_B.ID="editor.contrib.renameController",_B);MR=QUe=OMi([aM(1,ho),aM(2,w_),aM(3,Sse),aM(4,WR),aM(5,N0),aM(6,XSe),aM(7,Ts),aM(8,b1)],MR);class RMi extends hs{constructor(){super({id:"editor.action.rename",label:W("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:kn.and(Tt.writable,Tt.hasRenameProvider),kbOpts:{kbExpr:Tt.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,i){const n=e.get(Bl),[s,c]=Array.isArray(i)&&i||[void 0,void 0];return yo.isUri(s)&&pi.isIPosition(c)?n.openCodeEditor({resource:s},n.getActiveCodeEditor()).then(d=>{d&&(d.setPosition(c),d.invokeWithinContext(f=>(this.reportTelemetry(f,d),this.run(f,d))))},Pa):super.runCommand(e,i)}run(e,i){const n=e.get(N0),s=MR.get(i);return s?(n.trace("[RenameAction] got controller, running..."),s.run()):(n.trace("[RenameAction] returning early - controller missing"),Promise.resolve())}}Cl(MR.ID,MR,4);sr(RMi);const pKe=tm.bindToContribution(MR.get);$r(new pKe({id:"acceptRenameInput",precondition:BJ,handler:l=>l.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:kn.and(Tt.focus,kn.not("isComposing")),primary:3}}));$r(new pKe({id:"acceptRenameInputWithPreview",precondition:kn.and(BJ,kn.has("config.editor.rename.enablePreview")),handler:l=>l.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:kn.and(Tt.focus,kn.not("isComposing")),primary:2051}}));$r(new pKe({id:"cancelRenameInput",precondition:BJ,handler:l=>l.cancelRenameInput(),kbOpts:{weight:199,kbExpr:Tt.focus,primary:9,secondary:[1033]}}));Nd(class extends Tv{constructor(){super({id:"focusNextRenameSuggestion",title:{...aa("focusNextRenameSuggestion","Focus Next Rename Suggestion")},precondition:BJ,keybinding:[{primary:18,weight:199}]})}run(e){const i=e.get(Bl).getFocusedCodeEditor();if(!i)return;const n=MR.get(i);n&&n.focusNextRenameSuggestion()}});Nd(class extends Tv{constructor(){super({id:"focusPreviousRenameSuggestion",title:{...aa("focusPreviousRenameSuggestion","Focus Previous Rename Suggestion")},precondition:BJ,keybinding:[{primary:16,weight:199}]})}run(e){const i=e.get(Bl).getFocusedCodeEditor();if(!i)return;const n=MR.get(i);n&&n.focusPreviousRenameSuggestion()}});Mb("_executeDocumentRenameProvider",function(l,e,i,...n){const[s]=n;Fl(typeof s=="string");const{renameProvider:c}=l.get(Ts);return MMi(c,e,i,s)});Mb("_executePrepareRename",async function(l,e,i){const{renameProvider:n}=l.get(Ts),c=await new _Ke(e,i,n).resolveRenameLocation(cc.None);if(c!=null&&c.rejectReason)throw new Error(c.rejectReason);return c});nh.as(DT.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:W("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});var FMi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Gxt=function(l,e){return function(i,n){e(i,n,l)}},v$;let Obe=(v$=class extends xi{constructor(e,i,n){super(),this.editor=e,this.languageConfigurationService=i,this.editorWorkerService=n,this.decorations=this.editor.createDecorationsCollection(),this.options=this.createOptions(e.getOption(73)),this.computePromise=null,this.currentOccurrences={},this._register(e.onDidChangeModel(s=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(e.onDidChangeModelLanguage(s=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(i.onDidChange(s=>{var d;const c=(d=this.editor.getModel())==null?void 0:d.getLanguageId();c&&s.affects(c)&&(this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(e.onDidChangeConfiguration(s=>{this.options&&!s.hasChanged(73)||(this.options=this.createOptions(e.getOption(73)),this.updateDecorations([]),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(this.editor.onDidChangeModelContent(s=>{this.computeSectionHeaders.schedule()})),this._register(e.onDidChangeModelTokens(s=>{this.computeSectionHeaders.isScheduled()||this.computeSectionHeaders.schedule(1e3)})),this.computeSectionHeaders=this._register(new qu(()=>{this.findSectionHeaders()},250)),this.computeSectionHeaders.schedule(0)}createOptions(e){if(!e||!this.editor.hasModel())return;const i=this.editor.getModel().getLanguageId();if(!i)return;const n=this.languageConfigurationService.getLanguageConfiguration(i).comments,s=this.languageConfigurationService.getLanguageConfiguration(i).foldingRules;if(!(!n&&!(s!=null&&s.markers)))return{foldingRules:s,findMarkSectionHeaders:e.showMarkSectionHeaders,findRegionSectionHeaders:e.showRegionSectionHeaders}}findSectionHeaders(){var n,s;if(!this.editor.hasModel()||!((n=this.options)!=null&&n.findMarkSectionHeaders)&&!((s=this.options)!=null&&s.findRegionSectionHeaders))return;const e=this.editor.getModel();if(e.isDisposed()||e.isTooLargeForSyncing())return;const i=e.getVersionId();this.editorWorkerService.findSectionHeaders(e.uri,this.options).then(c=>{e.isDisposed()||e.getVersionId()!==i||this.updateDecorations(c)})}updateDecorations(e){const i=this.editor.getModel();i&&(e=e.filter(c=>{if(!c.shouldBeInComments)return!0;const d=i.validateRange(c.range),f=i.tokenization.getLineTokens(d.startLineNumber),m=f.findTokenIndexAtOffset(d.startColumn-1),v=f.getStandardTokenType(m);return f.getLanguageId(m)===i.getLanguageId()&&v===1}));const n=Object.values(this.currentOccurrences).map(c=>c.decorationId),s=e.map(c=>BMi(c));this.editor.changeDecorations(c=>{const d=c.deltaDecorations(n,s);this.currentOccurrences={};for(let f=0,m=d.length;f<m;f++){const v={sectionHeader:e[f],decorationId:d[f]};this.currentOccurrences[v.decorationId]=v}})}stop(){this.computeSectionHeaders.cancel(),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop(),this.decorations.clear()}},v$.ID="editor.sectionHeaderDetector",v$);Obe=FMi([Gxt(1,rh),Gxt(2,Fb)],Obe);function BMi(l){return{range:l.range,options:qa.createDynamic({description:"section-header",stickiness:3,collapseOnReplaceEdit:!0,minimap:{color:void 0,position:1,sectionHeaderStyle:l.hasSeparatorLine?2:1,sectionHeaderText:l.text}})}}Cl(Obe.ID,Obe,1);function WMi(l){for(let e=0,i=l.length;e<i;e+=4){const n=l[e+0],s=l[e+1],c=l[e+2],d=l[e+3];l[e+0]=d,l[e+1]=c,l[e+2]=s,l[e+3]=n}}function VMi(l){const e=new Uint8Array(l.buffer,l.byteOffset,l.length*4);return Nkt()||WMi(e),JSe.wrap(e)}function NPt(l){const e=new Uint32Array(HMi(l));let i=0;if(e[i++]=l.id,l.type==="full")e[i++]=1,e[i++]=l.data.length,e.set(l.data,i),i+=l.data.length;else{e[i++]=2,e[i++]=l.deltas.length;for(const n of l.deltas)e[i++]=n.start,e[i++]=n.deleteCount,n.data?(e[i++]=n.data.length,e.set(n.data,i),i+=n.data.length):e[i++]=0}return VMi(e)}function HMi(l){let e=0;if(e+=2,l.type==="full")e+=1+l.data.length;else{e+=1,e+=3*l.deltas.length;for(const i of l.deltas)i.data&&(e+=i.data.length)}return e}function oxe(l){return l&&!!l.data}function LPt(l){return l&&Array.isArray(l.edits)}class jMi{constructor(e,i,n){this.provider=e,this.tokens=i,this.error=n}}function PPt(l,e){return l.has(e)}function zMi(l,e){const i=l.orderedGroups(e);return i.length>0?i[0]:[]}async function APt(l,e,i,n,s){const c=zMi(l,e),d=await Promise.all(c.map(async f=>{let m,v=null;try{m=await f.provideDocumentSemanticTokens(e,f===i?n:null,s)}catch(x){v=x,m=null}return(!m||!oxe(m)&&!LPt(m))&&(m=null),new jMi(f,m,v)}));for(const f of d){if(f.error)throw f.error;if(f.tokens)return f}return d.length>0?d[0]:null}function UMi(l,e){const i=l.orderedGroups(e);return i.length>0?i[0]:null}class qMi{constructor(e,i){this.provider=e,this.tokens=i}}function $Mi(l,e){return l.has(e)}function OPt(l,e){const i=l.orderedGroups(e);return i.length>0?i[0]:[]}async function mKe(l,e,i,n){const s=OPt(l,e),c=await Promise.all(s.map(async d=>{let f;try{f=await d.provideDocumentRangeSemanticTokens(e,i,n)}catch(m){t_(m),f=null}return(!f||!oxe(f))&&(f=null),new qMi(d,f)}));for(const d of c)if(d.tokens)return d;return c.length>0?c[0]:null}fl.registerCommand("_provideDocumentSemanticTokensLegend",async(l,...e)=>{const[i]=e;Fl(i instanceof yo);const n=l.get(rf).getModel(i);if(!n)return;const{documentSemanticTokensProvider:s}=l.get(Ts),c=UMi(s,n);return c?c[0].getLegend():l.get(qd).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)});fl.registerCommand("_provideDocumentSemanticTokens",async(l,...e)=>{const[i]=e;Fl(i instanceof yo);const n=l.get(rf).getModel(i);if(!n)return;const{documentSemanticTokensProvider:s}=l.get(Ts);if(!PPt(s,n))return l.get(qd).executeCommand("_provideDocumentRangeSemanticTokens",i,n.getFullModelRange());const c=await APt(s,n,null,null,cc.None);if(!c)return;const{provider:d,tokens:f}=c;if(!f||!oxe(f))return;const m=NPt({id:0,type:"full",data:f.data});return f.resultId&&d.releaseDocumentSemanticTokens(f.resultId),m});fl.registerCommand("_provideDocumentRangeSemanticTokensLegend",async(l,...e)=>{const[i,n]=e;Fl(i instanceof yo);const s=l.get(rf).getModel(i);if(!s)return;const{documentRangeSemanticTokensProvider:c}=l.get(Ts),d=OPt(c,s);if(d.length===0)return;if(d.length===1)return d[0].getLegend();if(!n||!nt.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),d[0].getLegend();const f=await mKe(c,s,nt.lift(n),cc.None);if(f)return f.provider.getLegend()});fl.registerCommand("_provideDocumentRangeSemanticTokens",async(l,...e)=>{const[i,n]=e;Fl(i instanceof yo),Fl(nt.isIRange(n));const s=l.get(rf).getModel(i);if(!s)return;const{documentRangeSemanticTokensProvider:c}=l.get(Ts),d=await mKe(c,s,nt.lift(n),cc.None);if(!(!d||!d.tokens))return NPt({id:0,type:"full",data:d.tokens.data})});const gKe="editor.semanticHighlighting";function W1e(l,e,i){var s;const n=(s=i.getValue(gKe,{overrideIdentifier:l.getLanguageId(),resource:l.uri}))==null?void 0:s.enabled;return typeof n=="boolean"?n:e.getColorTheme().semanticHighlighting}var MPt=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},pL=function(l,e){return function(i,n){e(i,n,l)}},fM;let ZUe=class extends xi{constructor(e,i,n,s,c,d){super(),this._watchers=Object.create(null);const f=x=>{this._watchers[x.uri.toString()]=new YUe(x,e,n,c,d)},m=(x,w)=>{w.dispose(),delete this._watchers[x.uri.toString()]},v=()=>{for(const x of i.getModels()){const w=this._watchers[x.uri.toString()];W1e(x,n,s)?w||f(x):w&&m(x,w)}};i.getModels().forEach(x=>{W1e(x,n,s)&&f(x)}),this._register(i.onModelAdded(x=>{W1e(x,n,s)&&f(x)})),this._register(i.onModelRemoved(x=>{const w=this._watchers[x.uri.toString()];w&&m(x,w)})),this._register(s.onDidChangeConfiguration(x=>{x.affectsConfiguration(gKe)&&v()})),this._register(n.onDidColorThemeChange(v))}dispose(){for(const e of Object.values(this._watchers))e.dispose();super.dispose()}};ZUe=MPt([pL(0,ZSe),pL(1,rf),pL(2,im),pL(3,Cc),pL(4,Pw),pL(5,Ts)],ZUe);var hR;let YUe=(hR=class extends xi{constructor(e,i,n,s,c){super(),this._semanticTokensStylingService=i,this._isDisposed=!1,this._model=e,this._provider=c.documentSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentSemanticTokens",{min:fM.REQUEST_MIN_DELAY,max:fM.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new qu(()=>this._fetchDocumentSemanticTokensNow(),fM.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));const d=()=>{vd(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const f of this._provider.all(e))typeof f.onDidChange=="function"&&this._documentProvidersChangeListeners.push(f.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};d(),this._register(this._provider.onDidChange(()=>{d(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(n.onDidColorThemeChange(f=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),vd(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!PPt(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;const e=new ih,i=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,n=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,s=APt(this._provider,this._model,i,n,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const c=[],d=this._model.onDidChangeContent(m=>{c.push(m)}),f=new bg(!1);s.then(m=>{if(this._debounceInformation.update(this._model,f.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,d.dispose(),!m)this._setDocumentSemanticTokens(null,null,null,c);else{const{provider:v,tokens:x}=m,w=this._semanticTokensStylingService.getStyling(v);this._setDocumentSemanticTokens(v,x||null,w,c)}},m=>{m&&(Tk(m)||typeof m.message=="string"&&m.message.indexOf("busy")!==-1)||Pa(m),this._currentDocumentRequestCancellationTokenSource=null,d.dispose(),(c.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,i,n,s,c){c=Math.min(c,n.length-s,e.length-i);for(let d=0;d<c;d++)n[s+d]=e[i+d]}_setDocumentSemanticTokens(e,i,n,s){const c=this._currentDocumentResponse,d=()=>{(s.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&i&&e.releaseDocumentSemanticTokens(i.resultId);return}if(!e||!n){this._model.tokenization.setSemanticTokens(null,!1);return}if(!i){this._model.tokenization.setSemanticTokens(null,!0),d();return}if(LPt(i)){if(!c){this._model.tokenization.setSemanticTokens(null,!0);return}if(i.edits.length===0)i={resultId:i.resultId,data:c.data};else{let f=0;for(const I of i.edits)f+=(I.data?I.data.length:0)-I.deleteCount;const m=c.data,v=new Uint32Array(m.length+f);let x=m.length,w=v.length;for(let I=i.edits.length-1;I>=0;I--){const P=i.edits[I];if(P.start>m.length){n.warnInvalidEditStart(c.resultId,i.resultId,I,P.start,m.length),this._model.tokenization.setSemanticTokens(null,!0);return}const O=x-(P.start+P.deleteCount);O>0&&(fM._copy(m,x-O,v,w-O,O),w-=O),P.data&&(fM._copy(P.data,0,v,w-P.data.length,P.data.length),w-=P.data.length),x=P.start}x>0&&fM._copy(m,0,v,0,x),i={resultId:i.resultId,data:v}}}if(oxe(i)){this._currentDocumentResponse=new JMi(e,i.resultId,i.data);const f=bTt(i,n,this._model.getLanguageId());if(s.length>0)for(const m of s)for(const v of f)for(const x of m.changes)v.applyEdit(x.range,x.text);this._model.tokenization.setSemanticTokens(f,!0)}else this._model.tokenization.setSemanticTokens(null,!0);d()}},fM=hR,hR.REQUEST_MIN_DELAY=300,hR.REQUEST_MAX_DELAY=2e3,hR);YUe=fM=MPt([pL(1,ZSe),pL(2,im),pL(3,Pw),pL(4,Ts)],YUe);class JMi{constructor(e,i,n){this.provider=e,this.resultId=i,this.data=n}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}NJ(ZUe);var GMi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Zte=function(l,e){return function(i,n){e(i,n,l)}},b$;let Mbe=(b$=class extends xi{constructor(e,i,n,s,c,d){super(),this._semanticTokensStylingService=i,this._themeService=n,this._configurationService=s,this._editor=e,this._provider=d.documentRangeSemanticTokensProvider,this._debounceInformation=c.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new qu(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];const f=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{f()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),f()})),this._register(this._editor.onDidChangeModelContent(m=>{this._cancelAll(),f()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),f()})),this._register(this._configurationService.onDidChangeConfiguration(m=>{m.affectsConfiguration(gKe)&&(this._cancelAll(),f())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),f()})),f()}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let i=0,n=this._outstandingRequests.length;i<n;i++)if(this._outstandingRequests[i]===e){this._outstandingRequests.splice(i,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const e=this._editor.getModel();if(e.tokenization.hasCompleteSemanticTokens())return;if(!W1e(e,this._themeService,this._configurationService)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}if(!$Mi(this._provider,e)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}const i=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(i.map(n=>this._requestRange(e,n)))}_requestRange(e,i){const n=e.getVersionId(),s=Om(d=>Promise.resolve(mKe(this._provider,e,i,d))),c=new bg(!1);return s.then(d=>{if(this._debounceInformation.update(e,c.elapsed()),!d||!d.tokens||e.isDisposed()||e.getVersionId()!==n)return;const{provider:f,tokens:m}=d,v=this._semanticTokensStylingService.getStyling(f);e.tokenization.setPartialSemanticTokens(i,bTt(m,v,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(s),()=>this._removeOutstandingRequest(s)),s}},b$.ID="editor.contrib.viewportSemanticTokens",b$);Mbe=GMi([Zte(1,ZSe),Zte(2,im),Zte(3,Cc),Zte(4,Pw),Zte(5,Ts)],Mbe);Cl(Mbe.ID,Mbe,1);class KMi{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,i){const n=[];for(const s of i){const c=[];n.push(c),this.selectSubwords&&this._addInWordRanges(c,e,s),this._addWordRanges(c,e,s),this._addWhitespaceLine(c,e,s),c.push({range:e.getFullModelRange()})}return n}_addInWordRanges(e,i,n){const s=i.getWordAtPosition(n);if(!s)return;const{word:c,startColumn:d}=s,f=n.column-d;let m=f,v=f,x=0;for(;m>=0;m--){const w=c.charCodeAt(m);if(m!==f&&(w===95||w===45))break;if(LM(w)&&fL(x))break;x=w}for(m+=1;v<c.length;v++){const w=c.charCodeAt(v);if(fL(w)&&LM(x))break;if(w===95||w===45)break;x=w}m<v&&e.push({range:new nt(n.lineNumber,d+m,n.lineNumber,d+v)})}_addWordRanges(e,i,n){const s=i.getWordAtPosition(n);s&&e.push({range:new nt(n.lineNumber,s.startColumn,n.lineNumber,s.endColumn)})}_addWhitespaceLine(e,i,n){i.getLineLength(n.lineNumber)>0&&i.getLineFirstNonWhitespaceColumn(n.lineNumber)===0&&i.getLineLastNonWhitespaceColumn(n.lineNumber)===0&&e.push({range:new nt(n.lineNumber,1,n.lineNumber,i.getLineMaxColumn(n.lineNumber))})}}var XMi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},QMi=function(l,e){return function(i,n){e(i,n,l)}},eqe;class yKe{constructor(e,i){this.index=e,this.ranges=i}mov(e){const i=this.index+(e?1:-1);if(i<0||i>=this.ranges.length)return this;const n=new yKe(i,this.ranges);return n.ranges[i].equalsRange(this.ranges[this.index])?n.mov(e):n}}var pB;let ese=(pB=class{static get(e){return e.getContribution(eqe.ID)}constructor(e,i){this._editor=e,this._languageFeaturesService=i,this._ignoreSelection=!1}dispose(){var e;(e=this._selectionListener)==null||e.dispose()}async run(e){if(!this._editor.hasModel())return;const i=this._editor.getSelections(),n=this._editor.getModel();if(this._state||await FPt(this._languageFeaturesService.selectionRangeProvider,n,i.map(c=>c.getPosition()),this._editor.getOption(114),cc.None).then(c=>{var d;if(!(!ky(c)||c.length!==i.length)&&!(!this._editor.hasModel()||!Lf(this._editor.getSelections(),i,(f,m)=>f.equalsSelection(m)))){for(let f=0;f<c.length;f++)c[f]=c[f].filter(m=>m.containsPosition(i[f].getStartPosition())&&m.containsPosition(i[f].getEndPosition())),c[f].unshift(i[f]);this._state=c.map(f=>new yKe(0,f)),(d=this._selectionListener)==null||d.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var f;this._ignoreSelection||((f=this._selectionListener)==null||f.dispose(),this._state=void 0)})}}),!this._state)return;this._state=this._state.map(c=>c.mov(e));const s=this._state.map(c=>Us.fromPositions(c.ranges[c.index].getStartPosition(),c.ranges[c.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(s)}finally{this._ignoreSelection=!1}}},eqe=pB,pB.ID="editor.contrib.smartSelectController",pB);ese=eqe=XMi([QMi(1,Ts)],ese);class RPt extends hs{constructor(e,i){super(i),this._forward=e}async run(e,i){const n=ese.get(i);n&&await n.run(this._forward)}}class ZMi extends RPt{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:W("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:As.MenubarSelectionMenu,group:"1_basic",title:W({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}fl.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class YMi extends RPt{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:W("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:As.MenubarSelectionMenu,group:"1_basic",title:W({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}Cl(ese.ID,ese,4);sr(ZMi);sr(YMi);async function FPt(l,e,i,n,s){const c=l.all(e).concat(new KMi(n.selectSubwords));c.length===1&&c.unshift(new vbe);const d=[],f=[];for(const m of c)d.push(Promise.resolve(m.provideSelectionRanges(e,i,s)).then(v=>{if(ky(v)&&v.length===i.length)for(let x=0;x<i.length;x++){f[x]||(f[x]=[]);for(const w of v[x])nt.isIRange(w.range)&&nt.containsPosition(w.range,i[x])&&f[x].push(nt.lift(w.range))}},t_));return await Promise.all(d),f.map(m=>{if(m.length===0)return[];m.sort((I,P)=>pi.isBefore(I.getStartPosition(),P.getStartPosition())?1:pi.isBefore(P.getStartPosition(),I.getStartPosition())||pi.isBefore(I.getEndPosition(),P.getEndPosition())?-1:pi.isBefore(P.getEndPosition(),I.getEndPosition())?1:0);const v=[];let x;for(const I of m)(!x||nt.containsRange(I,x)&&!nt.equalsRange(I,x))&&(v.push(I),x=I);if(!n.selectLeadingAndTrailingWhitespace)return v;const w=[v[0]];for(let I=1;I<v.length;I++){const P=v[I-1],O=v[I];if(O.startLineNumber!==P.startLineNumber||O.endLineNumber!==P.endLineNumber){const z=new nt(P.startLineNumber,e.getLineFirstNonWhitespaceColumn(P.startLineNumber),P.endLineNumber,e.getLineLastNonWhitespaceColumn(P.endLineNumber));z.containsRange(P)&&!z.equalsRange(P)&&O.containsRange(z)&&!O.equalsRange(z)&&w.push(z);const J=new nt(P.startLineNumber,1,P.endLineNumber,e.getLineMaxColumn(P.endLineNumber));J.containsRange(P)&&!J.equalsRange(z)&&O.containsRange(J)&&!O.equalsRange(J)&&w.push(J)}w.push(O)}return w})}fl.registerCommand("_executeSelectionRangeProvider",async function(l,...e){const[i,n]=e;Fl(yo.isUri(i));const s=l.get(Ts).selectionRangeProvider,c=await l.get(Ob).createModelReference(i);try{return FPt(s,c.object.textEditorModel,n,{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},cc.None)}finally{c.dispose()}});const eRi=Object.freeze({View:aa("view","View"),Help:aa("help","Help"),Test:aa("test","Test"),File:aa("file","File"),Preferences:aa("preferences","Preferences"),Developer:aa({key:"developer",comment:["A developer on Code itself or someone diagnosing issues in Code"]},"Developer")});class rne{constructor(e,i,n,s=null){this.startLineNumbers=e,this.endLineNumbers=i,this.lastLineRelativePosition=n,this.showEndForLine=s}equals(e){return!!e&&this.lastLineRelativePosition===e.lastLineRelativePosition&&this.showEndForLine===e.showEndForLine&&Lf(this.startLineNumbers,e.startLineNumbers)&&Lf(this.endLineNumbers,e.endLineNumbers)}static get Empty(){return new rne([],[],0)}}const Kxt=v6("stickyScrollViewLayer",{createHTML:l=>l}),Q9e="data-sticky-line-index",Xxt="data-sticky-is-line",tRi="data-sticky-is-line-number",Qxt="data-sticky-is-folding-icon";class iRi extends xi{constructor(e){super(),this._editor=e,this._foldingIconStore=new wn,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(67),this._renderedStickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof kT),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const i=()=>{this._linesDomNode.style.left=this._editor.getOption(116).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(116)&&i(),n.hasChanged(67)&&(this._lineHeight=this._editor.getOption(67))})),this._register(this._editor.onDidScrollChange(n=>{n.scrollLeftChanged&&i(),n.scrollWidthChanged&&this._updateWidgetWidth()})),this._register(this._editor.onDidChangeModel(()=>{i(),this._updateWidgetWidth()})),this._register(this._foldingIconStore),i(),this._register(this._editor.onDidLayoutChange(n=>{this._updateWidgetWidth()})),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getRenderedStickyLine(e){return this._renderedStickyLines.find(i=>i.lineNumber===e)}getCurrentLines(){return this._lineNumbers}setState(e,i,n){if(n===void 0&&(!this._previousState&&!e||this._previousState&&this._previousState.equals(e)))return;const s=this._isWidgetHeightZero(e),c=s?void 0:e,d=s?0:this._findLineToRebuildWidgetFrom(e,n);this._renderRootNode(c,i,d),this._previousState=e}_isWidgetHeightZero(e){if(!e)return!0;const i=e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition;if(i>0){this._lastLineRelativePosition=e.lastLineRelativePosition;const n=[...e.startLineNumbers];e.showEndForLine!==null&&(n[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=n}else this._lastLineRelativePosition=0,this._lineNumbers=[];return i===0}_findLineToRebuildWidgetFrom(e,i){if(!e||!this._previousState)return 0;if(i!==void 0)return i;const n=this._previousState,s=e.startLineNumbers.findIndex(c=>!n.startLineNumbers.includes(c));return s===-1?0:s}_updateWidgetWidth(){const e=this._editor.getLayoutInfo(),i=e.contentLeft;this._lineNumbersDomNode.style.width=`${i}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",`${this._editor.getScrollWidth()-e.verticalScrollbarWidth}px`),this._rootDomNode.style.width=`${e.width-e.verticalScrollbarWidth}px`}_clearStickyLinesFromLine(e){this._foldingIconStore.clear();for(let i=e;i<this._renderedStickyLines.length;i++){const n=this._renderedStickyLines[i];n.lineNumberDomNode.remove(),n.lineDomNode.remove()}this._renderedStickyLines=this._renderedStickyLines.slice(0,e),this._rootDomNode.style.display="none"}_useFoldingOpacityTransition(e){this._lineNumbersDomNode.style.setProperty("--vscode-editorStickyScroll-foldingOpacityTransition",`opacity ${e?.5:0}s`)}_setFoldingIconsVisibility(e){for(const i of this._renderedStickyLines){const n=i.foldingIcon;n&&n.setVisible(e?!0:n.isCollapsed)}}async _renderRootNode(e,i,n){if(this._clearStickyLinesFromLine(n),!e)return;for(const f of this._renderedStickyLines)this._updateTopAndZIndexOfStickyLine(f);const s=this._editor.getLayoutInfo(),c=this._lineNumbers.slice(n);for(const[f,m]of c.entries()){const v=this._renderChildNode(f+n,m,i,s);v&&(this._linesDomNode.appendChild(v.lineDomNode),this._lineNumbersDomNode.appendChild(v.lineNumberDomNode),this._renderedStickyLines.push(v))}i&&(this._setFoldingHoverListeners(),this._useFoldingOpacityTransition(!this._isOnGlyphMargin));const d=this._lineNumbers.length*this._lineHeight+this._lastLineRelativePosition;this._rootDomNode.style.display="block",this._lineNumbersDomNode.style.height=`${d}px`,this._linesDomNodeScrollable.style.height=`${d}px`,this._rootDomNode.style.height=`${d}px`,this._rootDomNode.style.marginLeft="0px",this._minContentWidthInPx=Math.max(...this._renderedStickyLines.map(f=>f.scrollWidth))+s.verticalScrollbarWidth,this._editor.layoutOverlayWidget(this)}_setFoldingHoverListeners(){this._editor.getOption(111)==="mouseover"&&(this._foldingIconStore.add(en(this._lineNumbersDomNode,br.MOUSE_ENTER,()=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)})),this._foldingIconStore.add(en(this._lineNumbersDomNode,br.MOUSE_LEAVE,()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)})))}_renderChildNode(e,i,n,s){const c=this._editor._getViewModel();if(!c)return;const d=c.coordinatesConverter.convertModelPositionToViewPosition(new pi(i,1)).lineNumber,f=c.getViewLineRenderingData(d),m=this._editor.getOption(68);let v;try{v=mv.filter(f.inlineDecorations,d,f.minColumn,f.maxColumn)}catch{v=[]}const x=new zR(!0,!0,f.content,f.continuesWithWrappedLine,f.isBasicASCII,f.containsRTL,0,f.tokens,v,f.tabSize,f.startVisibleColumn,1,1,1,500,"none",!0,!0,null),w=new gJ(2e3),I=Ose(x,w);let P;Kxt?P=Kxt.createHTML(w.build()):P=w.build();const O=document.createElement("span");O.setAttribute(Q9e,String(e)),O.setAttribute(Xxt,""),O.setAttribute("role","listitem"),O.tabIndex=0,O.className="sticky-line-content",O.classList.add(`stickyLine${i}`),O.style.lineHeight=`${this._lineHeight}px`,O.innerHTML=P;const z=document.createElement("span");z.setAttribute(Q9e,String(e)),z.setAttribute(tRi,""),z.className="sticky-line-number",z.style.lineHeight=`${this._lineHeight}px`;const J=s.contentLeft;z.style.width=`${J}px`;const Y=document.createElement("span");m.renderType===1||m.renderType===3&&i%10===0?Y.innerText=i.toString():m.renderType===2&&(Y.innerText=Math.abs(i-this._editor.getPosition().lineNumber).toString()),Y.className="sticky-line-number-inner",Y.style.lineHeight=`${this._lineHeight}px`,Y.style.width=`${s.lineNumbersWidth}px`,Y.style.paddingLeft=`${s.lineNumbersLeft}px`,z.appendChild(Y);const ae=this._renderFoldingIconForLine(n,i);ae&&z.appendChild(ae.domNode),this._editor.applyFontInfo(O),this._editor.applyFontInfo(Y),z.style.lineHeight=`${this._lineHeight}px`,O.style.lineHeight=`${this._lineHeight}px`,z.style.height=`${this._lineHeight}px`,O.style.height=`${this._lineHeight}px`;const me=new nRi(e,i,O,z,ae,I.characterMapping,O.scrollWidth);return this._updateTopAndZIndexOfStickyLine(me)}_updateTopAndZIndexOfStickyLine(e){var x;const i=e.index,n=e.lineDomNode,s=e.lineNumberDomNode,c=i===this._lineNumbers.length-1,d="0",f="1";n.style.zIndex=c?d:f,s.style.zIndex=c?d:f;const m=`${i*this._lineHeight+this._lastLineRelativePosition+((x=e.foldingIcon)!=null&&x.isCollapsed?1:0)}px`,v=`${i*this._lineHeight}px`;return n.style.top=c?m:v,s.style.top=c?m:v,e}_renderFoldingIconForLine(e,i){const n=this._editor.getOption(111);if(!e||n==="never")return;const s=e.regions,c=s.findRange(i),d=s.getStartLineNumber(c);if(!(i===d))return;const m=s.isCollapsed(c),v=new rRi(m,d,s.getEndLineNumber(c),this._lineHeight);return v.setVisible(this._isOnGlyphMargin?!0:m||n==="always"),v.domNode.setAttribute(Qxt,""),v}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:2,stackOridinal:10}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e<this._renderedStickyLines.length&&this._renderedStickyLines[e].lineDomNode.focus()}getEditorPositionFromNode(e){if(!e||e.children.length>0)return null;const i=this._getRenderedStickyLineFromChildDomNode(e);if(!i)return null;const n=$Je(i.characterMapping,e,0);return new pi(i.lineNumber,n)}getLineNumberFromChildDomNode(e){var i;return((i=this._getRenderedStickyLineFromChildDomNode(e))==null?void 0:i.lineNumber)??null}_getRenderedStickyLineFromChildDomNode(e){const i=this.getLineIndexFromChildDomNode(e);return i===null||i<0||i>=this._renderedStickyLines.length?null:this._renderedStickyLines[i]}getLineIndexFromChildDomNode(e){const i=this._getAttributeValue(e,Q9e);return i?parseInt(i,10):null}isInStickyLine(e){return this._getAttributeValue(e,Xxt)!==void 0}isInFoldingIconDomNode(e){return this._getAttributeValue(e,Qxt)!==void 0}_getAttributeValue(e,i){for(;e&&e!==this._rootDomNode;){const n=e.getAttribute(i);if(n!==null)return n;e=e.parentElement}}}class nRi{constructor(e,i,n,s,c,d,f){this.index=e,this.lineNumber=i,this.lineDomNode=n,this.lineNumberDomNode=s,this.foldingIcon=c,this.characterMapping=d,this.scrollWidth=f}}class rRi{constructor(e,i,n,s){this.isCollapsed=e,this.foldingStartLine=i,this.foldingEndLine=n,this.dimension=s,this.domNode=document.createElement("div"),this.domNode.style.width=`${s}px`,this.domNode.style.height=`${s}px`,this.domNode.className=zo.asClassName(e?cbe:abe)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}class sne{constructor(e,i){this.startLineNumber=e,this.endLineNumber=i}}class Rbe{constructor(e,i,n){this.range=e,this.children=i,this.parent=n}}class BPt{constructor(e,i,n,s){this.uri=e,this.version=i,this.element=n,this.outlineProviderId=s}}var axe=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},tse=function(l,e){return function(i,n){e(i,n,l)}},one;(function(l){l.OUTLINE_MODEL="outlineModel",l.FOLDING_PROVIDER_MODEL="foldingProviderModel",l.INDENTATION_MODEL="indentationModel"})(one||(one={}));var zM;(function(l){l[l.VALID=0]="VALID",l[l.INVALID=1]="INVALID",l[l.CANCELED=2]="CANCELED"})(zM||(zM={}));let tqe=class extends xi{constructor(e,i,n,s){switch(super(),this._editor=e,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new Ck(300)),this._updateOperation=this._register(new wn),this._editor.getOption(116).defaultModel){case one.OUTLINE_MODEL:this._modelProviders.push(new iqe(this._editor,s));case one.FOLDING_PROVIDER_MODEL:this._modelProviders.push(new rqe(this._editor,i,s));case one.INDENTATION_MODEL:this._modelProviders.push(new nqe(this._editor,n));break}}dispose(){this._modelProviders.forEach(e=>e.dispose()),this._updateOperation.clear(),this._cancelModelPromise(),super.dispose()}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}async update(e){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),await this._updateScheduler.trigger(async()=>{for(const i of this._modelProviders){const{statusPromise:n,modelPromise:s}=i.computeStickyModel(e);this._modelPromise=s;const c=await n;if(this._modelPromise!==s)return null;switch(c){case zM.CANCELED:return this._updateOperation.clear(),null;case zM.VALID:return i.stickyModel}}return null}).catch(i=>(Pa(i),null))}};tqe=axe([tse(2,ho),tse(3,Ts)],tqe);class WPt extends xi{constructor(e){super(),this._editor=e,this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,zM.INVALID}computeStickyModel(e){if(e.isCancellationRequested||!this.isProviderValid())return{statusPromise:this._invalid(),modelPromise:null};const i=Om(n=>this.createModelFromProvider(n));return{statusPromise:i.then(n=>this.isModelValid(n)?e.isCancellationRequested?zM.CANCELED:(this._stickyModel=this.createStickyModel(e,n),zM.VALID):this._invalid()).then(void 0,n=>(Pa(n),zM.CANCELED)),modelPromise:i}}isModelValid(e){return!0}isProviderValid(){return!0}}let iqe=class extends WPt{constructor(e,i){super(e),this._languageFeaturesService=i}createModelFromProvider(e){return L4.create(this._languageFeaturesService.documentSymbolProvider,this._editor.getModel(),e)}createStickyModel(e,i){var d;const{stickyOutlineElement:n,providerID:s}=this._stickyModelFromOutlineModel(i,(d=this._stickyModel)==null?void 0:d.outlineProviderId),c=this._editor.getModel();return new BPt(c.uri,c.getVersionId(),n,s)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,i){let n;if(dl.first(e.children.values())instanceof oPt){const f=dl.find(e.children.values(),m=>m.id===i);if(f)n=f.children;else{let m="",v=-1,x;for(const[w,I]of e.children.entries()){const P=this._findSumOfRangesOfGroup(I);P>v&&(x=I,v=P,m=I.id)}i=m,n=x.children}}else n=e.children;const s=[],c=Array.from(n.values()).sort((f,m)=>{const v=new sne(f.symbol.range.startLineNumber,f.symbol.range.endLineNumber),x=new sne(m.symbol.range.startLineNumber,m.symbol.range.endLineNumber);return this._comparator(v,x)});for(const f of c)s.push(this._stickyModelFromOutlineElement(f,f.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new Rbe(void 0,s,void 0),providerID:i}}_stickyModelFromOutlineElement(e,i){const n=[];for(const c of e.children.values())if(c.symbol.selectionRange.startLineNumber!==c.symbol.range.endLineNumber)if(c.symbol.selectionRange.startLineNumber!==i)n.push(this._stickyModelFromOutlineElement(c,c.symbol.selectionRange.startLineNumber));else for(const d of c.children.values())n.push(this._stickyModelFromOutlineElement(d,c.symbol.selectionRange.startLineNumber));n.sort((c,d)=>this._comparator(c.range,d.range));const s=new sne(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new Rbe(s,n,void 0)}_comparator(e,i){return e.startLineNumber!==i.startLineNumber?e.startLineNumber-i.startLineNumber:i.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let i=0;for(const n of e.children.values())i+=this._findSumOfRangesOfGroup(n);return e instanceof qze?i+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:i}};iqe=axe([tse(1,Ts)],iqe);class VPt extends WPt{constructor(e){super(e),this._foldingLimitReporter=new nPt(e)}createStickyModel(e,i){const n=this._fromFoldingRegions(i),s=this._editor.getModel();return new BPt(s.uri,s.getVersionId(),n,void 0)}isModelValid(e){return e!==null}_fromFoldingRegions(e){const i=e.length,n=[],s=new Rbe(void 0,[],void 0);for(let c=0;c<i;c++){const d=e.getParentIndex(c);let f;d!==-1?f=n[d]:f=s;const m=new Rbe(new sne(e.getStartLineNumber(c),e.getEndLineNumber(c)+1),[],f);f.children.push(m),n.push(m)}return s}}let nqe=class extends VPt{constructor(e,i){super(e),this._languageConfigurationService=i,this.provider=this._register(new nKe(e.getModel(),this._languageConfigurationService,this._foldingLimitReporter))}async createModelFromProvider(e){return this.provider.compute(e)}};nqe=axe([tse(1,rh)],nqe);let rqe=class extends VPt{constructor(e,i,n){super(e),this._languageFeaturesService=n;const s=OR.getFoldingRangeProviders(this._languageFeaturesService,e.getModel());s.length>0&&(this.provider=this._register(new rKe(e.getModel(),s,i,this._foldingLimitReporter,void 0)))}isProviderValid(){return this.provider!==void 0}async createModelFromProvider(e){var i;return((i=this.provider)==null?void 0:i.compute(e))??null}};rqe=axe([tse(2,Ts)],rqe);var sRi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Zxt=function(l,e){return function(i,n){e(i,n,l)}};class oRi{constructor(e,i,n){this.startLineNumber=e,this.endLineNumber=i,this.nestingDepth=n}}let sqe=class extends xi{constructor(e,i,n){super(),this._languageFeaturesService=i,this._languageConfigurationService=n,this._onDidChangeStickyScroll=this._register(new gi),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new wn),this._updateSoon=this._register(new qu(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(116)&&this.readConfiguration()})),this.readConfiguration()}readConfiguration(){this._sessionStore.clear(),this._editor.getOption(116).enabled&&(this._sessionStore.add(this._editor.onDidChangeModel(()=>{this._model=null,this.updateStickyModelProvider(),this._onDidChangeStickyScroll.fire(),this.update()})),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this.update())),this._sessionStore.add(fo(()=>{var i;(i=this._stickyModelProvider)==null||i.dispose(),this._stickyModelProvider=null})),this.updateStickyModelProvider(),this.update())}getVersionId(){var e;return(e=this._model)==null?void 0:e.version}updateStickyModelProvider(){var i;(i=this._stickyModelProvider)==null||i.dispose(),this._stickyModelProvider=null;const e=this._editor;e.hasModel()&&(this._stickyModelProvider=new tqe(e,()=>this._updateSoon.schedule(),this._languageConfigurationService,this._languageFeaturesService))}async update(){var e;(e=this._cts)==null||e.dispose(!0),this._cts=new ih,await this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()}async updateStickyModel(e){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization()){this._model=null;return}const i=await this._stickyModelProvider.update(e);e.isCancellationRequested||(this._model=i)}updateIndex(e){return e===-1?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,i,n,s,c){if(i.children.length===0)return;let d=c;const f=[];for(let x=0;x<i.children.length;x++){const w=i.children[x];w.range&&f.push(w.range.startLineNumber)}const m=this.updateIndex(Dne(f,e.startLineNumber,(x,w)=>x-w)),v=this.updateIndex(Dne(f,e.startLineNumber+s,(x,w)=>x-w));for(let x=m;x<=v;x++){const w=i.children[x];if(!w)return;if(w.range){const I=w.range.startLineNumber,P=w.range.endLineNumber;e.startLineNumber<=P+1&&I-1<=e.endLineNumber&&I!==d&&(d=I,n.push(new oRi(I,P-1,s+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,w,n,s+1,I))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,w,n,s,c)}}getCandidateStickyLinesIntersecting(e){var s,c;if(!((s=this._model)!=null&&s.element))return[];let i=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,i,0,-1);const n=(c=this._editor._getViewModel())==null?void 0:c.getHiddenAreas();if(n)for(const d of n)i=i.filter(f=>!(f.startLineNumber>=d.startLineNumber&&f.endLineNumber<=d.endLineNumber+1));return i}};sqe=sRi([Zxt(1,Ts),Zxt(2,rh)],sqe);var aRi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},HU=function(l,e){return function(i,n){e(i,n,l)}},oqe,mB;let g6=(mB=class extends xi{constructor(e,i,n,s,c,d,f){super(),this._editor=e,this._contextMenuService=i,this._languageFeaturesService=n,this._instaService=s,this._contextKeyService=f,this._sessionStore=new wn,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._stickyScrollWidget=new iRi(this._editor),this._stickyLineCandidateProvider=new sqe(this._editor,n,c),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=rne.Empty,this._onDidResize(),this._readConfiguration();const m=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration(x=>{this._readConfigurationChange(x)})),this._register(en(m,br.CONTEXT_MENU,async x=>{this._onContextMenu(Eo(m),x)})),this._stickyScrollFocusedContextKey=Tt.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=Tt.stickyScrollVisible.bindTo(this._contextKeyService);const v=this._register(zE(m));this._register(v.onDidBlur(x=>{this._positionRevealed===!1&&m.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(v.onDidFocus(x=>{this.focus()})),this._registerMouseListeners(),this._register(en(m,br.MOUSE_DOWN,x=>{this._onMouseDown=!0}))}static get(e){return e.getContribution(oqe.ID)}_disposeFocusStickyScrollStore(){var e;this._stickyScrollFocusedContextKey.set(!1),(e=this._focusDisposableStore)==null||e.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown){this._onMouseDown=!1,this._editor.focus();return}this._stickyScrollFocusedContextKey.get()!==!0&&(this._focused=!0,this._focusDisposableStore=new wn,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex<this._stickyScrollWidget.lineNumberCount-1&&this._focusNav(!0)}focusPrevious(){this._focusedStickyElementIndex>0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,()=>this._editor.revealPosition(e))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0))}_reveaInEditor(e,i){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,i(),this._editor.setSelection(nt.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){const e=this._register(new wn),i=this._register(new Xwe(this._editor,{extractLineNumberFromMouseEvent:c=>{const d=this._stickyScrollWidget.getEditorPositionFromNode(c.target.element);return d?d.lineNumber:0}})),n=c=>{if(!this._editor.hasModel()||c.target.type!==12||c.target.detail!==this._stickyScrollWidget.getId())return null;const d=c.target.element;if(!d||d.innerText!==d.innerHTML)return null;const f=this._stickyScrollWidget.getEditorPositionFromNode(d);return f?{range:new nt(f.lineNumber,f.column,f.lineNumber,f.column+d.innerText.length),textElement:d}:null},s=this._stickyScrollWidget.getDomNode();this._register(ph(s,br.CLICK,c=>{if(c.ctrlKey||c.altKey||c.metaKey||!c.leftButton)return;if(c.shiftKey){const v=this._stickyScrollWidget.getLineIndexFromChildDomNode(c.target);if(v===null)return;const x=new pi(this._endLineNumbers[v],1);this._revealLineInCenterIfOutsideViewport(x);return}if(this._stickyScrollWidget.isInFoldingIconDomNode(c.target)){const v=this._stickyScrollWidget.getLineNumberFromChildDomNode(c.target);this._toggleFoldingRegionForLine(v);return}if(!this._stickyScrollWidget.isInStickyLine(c.target))return;let m=this._stickyScrollWidget.getEditorPositionFromNode(c.target);if(!m){const v=this._stickyScrollWidget.getLineNumberFromChildDomNode(c.target);if(v===null)return;m=new pi(v,1)}this._revealPosition(m)})),this._register(ph(s,br.MOUSE_MOVE,c=>{if(c.shiftKey){const d=this._stickyScrollWidget.getLineIndexFromChildDomNode(c.target);if(d===null||this._showEndForLine!==null&&this._showEndForLine===d)return;this._showEndForLine=d,this._renderStickyScroll();return}this._showEndForLine!==void 0&&(this._showEndForLine=void 0,this._renderStickyScroll())})),this._register(en(s,br.MOUSE_LEAVE,c=>{this._showEndForLine!==void 0&&(this._showEndForLine=void 0,this._renderStickyScroll())})),this._register(i.onMouseMoveOrRelevantKeyDown(([c,d])=>{const f=n(c);if(!f||!c.hasTriggerModifier||!this._editor.hasModel()){e.clear();return}const{range:m,textElement:v}=f;if(!m.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=m,e.clear();else if(v.style.textDecoration==="underline")return;const x=new ih;e.add(fo(()=>x.dispose(!0)));let w;Use(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new pi(m.startLineNumber,m.startColumn+1),!1,x.token).then(I=>{if(!x.token.isCancellationRequested)if(I.length!==0){this._candidateDefinitionsLength=I.length;const P=v;w!==P?(e.clear(),w=P,w.style.textDecoration="underline",e.add(fo(()=>{w.style.textDecoration="none"}))):w||(w=P,w.style.textDecoration="underline",e.add(fo(()=>{w.style.textDecoration="none"})))}else e.clear()})})),this._register(i.onCancel(()=>{e.clear()})),this._register(i.onExecute(async c=>{if(c.target.type!==12||c.target.detail!==this._stickyScrollWidget.getId())return;const d=this._stickyScrollWidget.getEditorPositionFromNode(c.target.element);d&&(!this._editor.hasModel()||!this._stickyRangeProjectedOnEditor||(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:d.lineNumber,column:1})),this._instaService.invokeFunction(VLt,c,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor})))}))}_onContextMenu(e,i){const n=new hT(e,i);this._contextMenuService.showContextMenu({menuId:As.StickyScrollContext,getAnchor:()=>n})}_toggleFoldingRegionForLine(e){if(!this._foldingModel||e===null)return;const i=this._stickyScrollWidget.getRenderedStickyLine(e),n=i==null?void 0:i.foldingIcon;if(!n)return;eKe(this._foldingModel,Number.MAX_VALUE,[e]),n.isCollapsed=!n.isCollapsed;const s=(n.isCollapsed?this._editor.getTopForLineNumber(n.foldingEndLine):this._editor.getTopForLineNumber(n.foldingStartLine))-this._editor.getOption(67)*i.index+1;this._editor.setScrollTop(s),this._renderStickyScroll(e)}_readConfiguration(){const e=this._editor.getOption(116);if(e.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),this._enabled=!1;return}else e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&(this._showEndForLine=void 0,this._renderStickyScroll())})),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(n=>this._onTokensChange(n))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>{this._showEndForLine=void 0,this._renderStickyScroll()})),this._enabled=!0);this._editor.getOption(68).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>{this._showEndForLine=void 0,this._renderStickyScroll(0)}))}_readConfigurationChange(e){(e.hasChanged(116)||e.hasChanged(73)||e.hasChanged(67)||e.hasChanged(111)||e.hasChanged(68))&&this._readConfiguration(),e.hasChanged(68)&&this._renderStickyScroll(0)}_needsUpdate(e){const i=this._stickyScrollWidget.getCurrentLines();for(const n of i)for(const s of e.ranges)if(n>=s.fromLineNumber&&n<=s.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll(0)}_onDidResize(){const i=this._editor.getLayoutInfo().height/this._editor.getOption(67);this._maxStickyLines=Math.round(i*.25)}async _renderStickyScroll(e){const i=this._editor.getModel();if(!i||i.isTooLargeForTokenization()){this._resetState();return}const n=this._updateAndGetMinRebuildFromLine(e),s=this._stickyLineCandidateProvider.getVersionId();if(s===void 0||s===i.getVersionId())if(!this._focused)await this._updateState(n);else if(this._focusedStickyElementIndex===-1)await this._updateState(n),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,this._focusedStickyElementIndex!==-1&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const d=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];await this._updateState(n),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(d)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}}_updateAndGetMinRebuildFromLine(e){if(e!==void 0){const i=this._minRebuildFromLine!==void 0?this._minRebuildFromLine:1/0;this._minRebuildFromLine=Math.min(e,i)}return this._minRebuildFromLine}async _updateState(e){var n;this._minRebuildFromLine=void 0,this._foldingModel=await((n=OR.get(this._editor))==null?void 0:n.getFoldingModel())??void 0,this._widgetState=this.findScrollWidgetState();const i=this._widgetState.startLineNumbers.length>0;this._stickyScrollVisibleContextKey.set(i),this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e)}async _resetState(){this._minRebuildFromLine=void 0,this._foldingModel=void 0,this._widgetState=rne.Empty,this._stickyScrollVisibleContextKey.set(!1),this._stickyScrollWidget.setState(void 0,void 0)}findScrollWidgetState(){const e=this._editor.getOption(67),i=Math.min(this._maxStickyLines,this._editor.getOption(116).maxLineCount),n=this._editor.getScrollTop();let s=0;const c=[],d=[],f=this._editor.getVisibleRanges();if(f.length!==0){const m=new sne(f[0].startLineNumber,f[f.length-1].endLineNumber),v=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(m);for(const x of v){const w=x.startLineNumber,I=x.endLineNumber,P=x.nestingDepth;if(I-w>0){const O=(P-1)*e,z=P*e,J=this._editor.getBottomForLineNumber(w)-n,Y=this._editor.getTopForLineNumber(I)-n,ae=this._editor.getBottomForLineNumber(I)-n;if(O>Y&&O<=ae){c.push(w),d.push(I+1),s=ae-z;break}else z>J&&z<=ae&&(c.push(w),d.push(I+1));if(c.length===i)break}}}return this._endLineNumbers=d,new rne(c,d,s,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}},oqe=mB,mB.ID="store.contrib.stickyScrollController",mB);g6=oqe=aRi([HU(1,eS),HU(2,Ts),HU(3,ho),HU(4,rh),HU(5,Pw),HU(6,Ko)],g6);class cRi extends Tv{constructor(){super({id:"editor.action.toggleStickyScroll",title:{...aa("toggleEditorStickyScroll","Toggle Editor Sticky Scroll"),mnemonicTitle:W({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Editor Sticky Scroll")},metadata:{description:aa("toggleEditorStickyScroll.description","Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport")},category:eRi.View,toggled:{condition:kn.equals("config.editor.stickyScroll.enabled",!0),title:W("stickyScroll","Sticky Scroll"),mnemonicTitle:W({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:As.CommandPalette},{id:As.MenubarAppearanceMenu,group:"4_editor",order:3},{id:As.StickyScrollContext}]})}async run(e){const i=e.get(Cc),n=!i.getValue("editor.stickyScroll.enabled");return i.updateValue("editor.stickyScroll.enabled",n)}}const cxe=100;class lRi extends XE{constructor(){super({id:"editor.action.focusStickyScroll",title:{...aa("focusStickyScroll","Focus on the editor sticky scroll"),mnemonicTitle:W({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll")},precondition:kn.and(kn.has("config.editor.stickyScroll.enabled"),Tt.stickyScrollVisible),menu:[{id:As.CommandPalette}]})}runEditorCommand(e,i){var n;(n=g6.get(i))==null||n.focus()}}class uRi extends XE{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:aa("selectNextStickyScrollLine.title","Select the next editor sticky scroll line"),precondition:Tt.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:cxe,primary:18}})}runEditorCommand(e,i){var n;(n=g6.get(i))==null||n.focusNext()}}class dRi extends XE{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:aa("selectPreviousStickyScrollLine.title","Select the previous sticky scroll line"),precondition:Tt.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:cxe,primary:16}})}runEditorCommand(e,i){var n;(n=g6.get(i))==null||n.focusPrevious()}}class fRi extends XE{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:aa("goToFocusedStickyScrollLine.title","Go to the focused sticky scroll line"),precondition:Tt.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:cxe,primary:3}})}runEditorCommand(e,i){var n;(n=g6.get(i))==null||n.goToFocused()}}class hRi extends XE{constructor(){super({id:"editor.action.selectEditor",title:aa("selectEditor.title","Select Editor"),precondition:Tt.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:cxe,primary:9}})}runEditorCommand(e,i){var n;(n=g6.get(i))==null||n.selectEditor()}}Cl(g6.ID,g6,1);Nd(cRi);Nd(lRi);Nd(dRi);Nd(uRi);Nd(fRi);Nd(hRi);var HPt=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},bie=function(l,e){return function(i,n){e(i,n,l)}};class _Ri{constructor(e,i,n,s,c,d){this.range=e,this.insertText=i,this.filterText=n,this.additionalTextEdits=s,this.command=c,this.completion=d}}let aqe=class extends eli{constructor(e,i,n,s,c,d){super(c.disposable),this.model=e,this.line=i,this.word=n,this.completionModel=s,this._suggestMemoryService=d}canBeReused(e,i,n){return this.model===e&&this.line===i&&this.word.word.length>0&&this.word.startColumn===n.startColumn&&this.word.endColumn<n.endColumn&&this.completionModel.getIncompleteProvider().size===0}get items(){const e=[],{items:i}=this.completionModel,n=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},i),s=dl.slice(i,n),c=dl.slice(i,0,n);let d=5;for(const f of dl.concat(s,c)){if(f.score===BE.Default)continue;const m=new nt(f.editStart.lineNumber,f.editStart.column,f.editInsertEnd.lineNumber,f.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),v=f.completion.insertTextRules&&f.completion.insertTextRules&4?{snippet:f.completion.insertText}:f.completion.insertText;e.push(new _Ri(m,v,f.filterTextLow??f.labelLow,f.completion.additionalTextEdits,f.completion.command,f)),d-->=0&&f.resolve(cc.None)}return e}};aqe=HPt([bie(5,nxe)],aqe);let cqe=class extends xi{constructor(e,i,n,s){super(),this._languageFeatureService=e,this._clipboardService=i,this._suggestMemoryService=n,this._editorService=s,this._store.add(e.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(e,i,n,s){var P;if(n.selectedSuggestionInfo)return;let c;for(const O of this._editorService.listCodeEditors())if(O.getModel()===e){c=O;break}if(!c)return;const d=c.getOption(90);if(bq.isAllOff(d))return;e.tokenization.tokenizeIfCheap(i.lineNumber);const f=e.tokenization.getLineTokens(i.lineNumber),m=f.getStandardTokenType(f.findTokenIndexAtOffset(Math.max(i.column-1-1,0)));if(bq.valueFor(d,m)!=="inline")return;let v=e.getWordAtPosition(i),x;if(v!=null&&v.word||(x=this._getTriggerCharacterInfo(e,i)),!(v!=null&&v.word)&&!x||(v||(v=e.getWordUntilPosition(i)),v.endColumn!==i.column))return;let w;const I=e.getValueInRange(new nt(i.lineNumber,1,i.lineNumber,i.column));if(!x&&((P=this._lastResult)!=null&&P.canBeReused(e,i.lineNumber,v))){const O=new Fxt(I,i.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=O,this._lastResult.acquire(),w=this._lastResult}else{const O=await sKe(this._languageFeatureService.completionProvider,e,i,new $re(void 0,Cbe.createSuggestFilter(c).itemKind,x==null?void 0:x.providers),x&&{triggerKind:1,triggerCharacter:x.ch},s);let z;O.needsClipboard&&(z=await this._clipboardService.readText());const J=new EM(O.items,i.column,new Fxt(I,0),bbe.None,c.getOption(119),c.getOption(113),{boostFullMatch:!1,firstMatchCanBeWeak:!1},z);w=new aqe(e,i.lineNumber,v,J,O,this._suggestMemoryService)}return this._lastResult=w,w}handleItemDidShow(e,i){i.completion.resolve(cc.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,i){var c;const n=e.getValueInRange(nt.fromPositions({lineNumber:i.lineNumber,column:i.column-1},i)),s=new Set;for(const d of this._languageFeatureService.completionProvider.all(e))(c=d.triggerCharacters)!=null&&c.includes(n)&&s.add(d);if(s.size!==0)return{providers:s,ch:n}}};cqe=HPt([bie(0,Ts),bie(1,w6),bie(2,nxe),bie(3,Bl)],cqe);NJ(cqe);class pRi extends hs{constructor(){super({id:"editor.action.forceRetokenize",label:W("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,i){if(!i.hasModel())return;const n=i.getModel();n.tokenization.resetTokenization();const s=new bg;n.tokenization.forceTokenization(n.getLineCount()),s.stop(),console.log(`tokenization took ${s.elapsed()}`)}}sr(pRi);const _Se=class _Se extends Tv{constructor(){super({id:_Se.ID,title:aa({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},metadata:{description:aa("tabMovesFocusDescriptions","Determines whether the tab key moves focus around the workbench or inserts the tab character in the current editor. This is also called tab trapping, tab navigation, or tab focus mode.")},f1:!0})}run(){const i=!q$.getTabFocusMode();q$.setTabFocusMode(i),xv(i?W("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element"):W("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}};_Se.ID="editor.action.toggleTabFocusMode";let lqe=_Se;Nd(lqe);var mRi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},Yxt=function(l,e){return function(i,n){e(i,n,l)}};let uqe=class extends xi{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,i,n={},s,c){super(),this._link=i,this._hoverService=s,this._enabled=!0,this.el=jn(e,Cr("a.monaco-link",{tabIndex:i.tabIndex??0,href:i.href},i.label)),this.hoverDelegate=n.hoverDelegate??Dv("mouse"),this.setTooltip(i.title),this.el.setAttribute("role","button");const d=this._register(new Xc(this.el,"click")),f=this._register(new Xc(this.el,"keypress")),m=Tr.chain(f.event,w=>w.map(I=>new Id(I)).filter(I=>I.keyCode===3)),v=this._register(new Xc(this.el,Ud.Tap)).event;this._register(y1.addTarget(this.el));const x=Tr.any(d.event,m,v);this._register(x(w=>{this.enabled&&(il.stop(w,!0),n!=null&&n.opener?n.opener(this._link.href):c.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}setTooltip(e){this.hoverDelegate.showNativeHover?this.el.title=e??"":!this.hover&&e?this.hover=this._register(this._hoverService.setupManagedHover(this.hoverDelegate,this.el,e)):this.hover&&this.hover.update(e)}};uqe=mRi([Yxt(3,jL),Yxt(4,Rb)],uqe);var jPt=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},zPt=function(l,e){return function(i,n){e(i,n,l)}};const gRi=26;let dqe=class extends xi{constructor(e,i){super(),this._editor=e,this.instantiationService=i,this.banner=this._register(this.instantiationService.createInstance(fqe))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{var i;this.hide(),(i=e.onClose)==null||i.call(e)}}),this._editor.setBanner(this.banner.element,gRi)}};dqe=jPt([zPt(1,ho)],dqe);let fqe=class extends xi{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(d6,{}),this.element=Cr("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){const i=Cr("span");return i.innerText=e,i}return this.markdownRenderer.render(e).element}clear(){s0(this.element)}show(e){s0(this.element);const i=this.getAriaLabel(e);i&&this.element.setAttribute("aria-label",i);const n=jn(this.element,Cr("div.icon-container"));n.setAttribute("aria-hidden","true"),e.icon&&n.appendChild(Cr(`div${zo.asCSSSelector(e.icon)}`));const s=jn(this.element,Cr("div.message-container"));if(s.setAttribute("aria-hidden","true"),s.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=jn(this.element,Cr("div.message-actions-container")),e.actions)for(const d of e.actions)this._register(this.instantiationService.createInstance(uqe,this.messageActionsContainer,{...d,tabIndex:-1},{}));const c=jn(this.element,Cr("div.action-container"));this.actionBar=this._register(new kw(c)),this.actionBar.push(this._register(new $C("banner.close","Close Banner",zo.asClassName(eIt),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};fqe=jPt([zPt(0,ho)],fqe);var vKe=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},u$=function(l,e){return function(i,n){e(i,n,l)}};const yRi=sf("extensions-warning-message",pr.warning,W("warningIcon","Icon shown with a warning message in the extensions editor."));var C$;let ise=(C$=class extends xi{constructor(e,i,n,s){super(),this._editor=e,this._editorWorkerService=i,this._workspaceTrustService=n,this._highlighter=null,this._bannerClosed=!1,this._updateState=c=>{if(c&&c.hasMore){if(this._bannerClosed)return;const d=Math.max(c.ambiguousCharacterCount,c.nonBasicAsciiCharacterCount,c.invisibleCharacterCount);let f;if(c.nonBasicAsciiCharacterCount>=d)f={message:W("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new rse};else if(c.ambiguousCharacterCount>=d)f={message:W("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new GB};else if(c.invisibleCharacterCount>=d)f={message:W("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new nse};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:f.message,icon:yRi,actions:[{label:f.command.shortLabel,href:`command:${f.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(s.createInstance(dqe,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(126),this._register(n.onDidChangeTrust(c=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(c=>{c.hasChanged(126)&&(this._options=e.getOption(126),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const e=vRi(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(n=>n===!1))return;const i={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(n=>n.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(n=>n==="_os"?new Intl.NumberFormat().resolvedOptions().locale:n==="_vscode"?Zai:n)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new hqe(this._editor,i,this._updateState,this._editorWorkerService):this._highlighter=new bRi(this._editor,i,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}},C$.ID="editor.contrib.unicodeHighlighter",C$);ise=vKe([u$(1,Fb),u$(2,mDt),u$(3,ho)],ise);function vRi(l,e){return{nonBasicASCII:e.nonBasicASCII===cw?!l:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===cw?!l:e.includeComments,includeStrings:e.includeStrings===cw?!l:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}let hqe=class extends xi{constructor(e,i,n,s){super(),this._editor=e,this._options=i,this._updateState=n,this._editorWorkerService=s,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new qu(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(i=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(i);const n=[];if(!i.hasMore)for(const s of i.ranges)n.push({range:s,options:Fbe.instance.getDecorationFromOptions(this._options)});this._decorations.set(n)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;const i=this._editor.getModel();if(!aGe(i,e))return null;const n=i.getValueInRange(e.range);return{reason:qPt(n,this._options),inComment:cGe(i,e),inString:lGe(i,e)}}};hqe=vKe([u$(3,Fb)],hqe);class bRi extends xi{constructor(e,i,n){super(),this._editor=e,this._options=i,this._updateState=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new qu(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._editor.getVisibleRanges(),i=[],n={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const s of e){const c=b$e.computeUnicodeHighlights(this._model,this._options,s);for(const d of c.ranges)n.ranges.push(d);n.ambiguousCharacterCount+=n.ambiguousCharacterCount,n.invisibleCharacterCount+=n.invisibleCharacterCount,n.nonBasicAsciiCharacterCount+=n.nonBasicAsciiCharacterCount,n.hasMore=n.hasMore||c.hasMore}if(!n.hasMore)for(const s of n.ranges)i.push({range:s,options:Fbe.instance.getDecorationFromOptions(this._options)});this._updateState(n),this._decorations.set(i)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const i=this._editor.getModel(),n=i.getValueInRange(e.range);return aGe(i,e)?{reason:qPt(n,this._options),inComment:cGe(i,e),inString:lGe(i,e)}:null}}const UPt=W("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options");let _qe=class{constructor(e,i,n){this._editor=e,this._languageService=i,this._openerService=n,this.hoverOrdinal=5}computeSync(e,i){if(!this._editor.hasModel()||e.type!==1)return[];const n=this._editor.getModel(),s=this._editor.getContribution(ise.ID);if(!s)return[];const c=[],d=new Set;let f=300;for(const m of i){const v=s.getDecorationInfo(m);if(!v)continue;const w=n.getValueInRange(m.range).codePointAt(0),I=Z9e(w);let P;switch(v.reason.kind){case 0:{fse(v.reason.confusableWith)?P=W("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",I,Z9e(v.reason.confusableWith.codePointAt(0))):P=W("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",I,Z9e(v.reason.confusableWith.codePointAt(0)));break}case 1:P=W("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",I);break;case 2:P=W("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",I);break}if(d.has(P))continue;d.add(P);const O={codePoint:w,reason:v.reason,inComment:v.inComment,inString:v.inString},z=W("unicodeHighlight.adjustSettings","Adjust settings"),J=`command:${Bbe.ID}?${encodeURIComponent(JSON.stringify(O))}`,Y=new m1("",!0).appendMarkdown(P).appendText(" ").appendLink(J,z,UPt);c.push(new fT(this,m.range,[Y],!1,f++))}return c}renderHoverParts(e,i){return GLi(e,i,this._editor,this._languageService,this._openerService)}};_qe=vKe([u$(1,Pf),u$(2,Rb)],_qe);function pqe(l){return`U+${l.toString(16).padStart(4,"0")}`}function Z9e(l){let e=`\`${pqe(l)}\``;return d9.isInvisibleCharacter(l)||(e+=` "${`${CRi(l)}`}"`),e}function CRi(l){return l===96?"`` ` ``":"`"+String.fromCodePoint(l)+"`"}function qPt(l,e){return b$e.computeUnicodeHighlightReason(l,e)}const pSe=class pSe{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,i){const n=`${e}${i}`;let s=this.map.get(n);return s||(s=qa.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:i}),this.map.set(n,s)),s}};pSe.instance=new pSe;let Fbe=pSe;class SRi extends hs{constructor(){super({id:GB.ID,label:W("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=W("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}async run(e,i,n){const s=e==null?void 0:e.get(Cc);s&&this.runAction(s)}async runAction(e){await e.updateValue(wb.includeComments,!1,2)}}class wRi extends hs{constructor(){super({id:GB.ID,label:W("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=W("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}async run(e,i,n){const s=e==null?void 0:e.get(Cc);s&&this.runAction(s)}async runAction(e){await e.updateValue(wb.includeStrings,!1,2)}}const mSe=class mSe extends hs{constructor(){super({id:mSe.ID,label:W("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=W("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}async run(e,i,n){const s=e==null?void 0:e.get(Cc);s&&this.runAction(s)}async runAction(e){await e.updateValue(wb.ambiguousCharacters,!1,2)}};mSe.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";let GB=mSe;const gSe=class gSe extends hs{constructor(){super({id:gSe.ID,label:W("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=W("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}async run(e,i,n){const s=e==null?void 0:e.get(Cc);s&&this.runAction(s)}async runAction(e){await e.updateValue(wb.invisibleCharacters,!1,2)}};gSe.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";let nse=gSe;const ySe=class ySe extends hs{constructor(){super({id:ySe.ID,label:W("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=W("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}async run(e,i,n){const s=e==null?void 0:e.get(Cc);s&&this.runAction(s)}async runAction(e){await e.updateValue(wb.nonBasicASCII,!1,2)}};ySe.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";let rse=ySe;const vSe=class vSe extends hs{constructor(){super({id:vSe.ID,label:W("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}async run(e,i,n){const{codePoint:s,reason:c,inString:d,inComment:f}=n,m=String.fromCodePoint(s),v=e.get(Ek),x=e.get(Cc);function w(O){return d9.isInvisibleCharacter(O)?W("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",pqe(O)):W("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${pqe(O)} "${m}"`)}const I=[];if(c.kind===0)for(const O of c.notAmbiguousInLocales)I.push({label:W("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',O),run:async()=>{kRi(x,[O])}});if(I.push({label:w(s),run:()=>xRi(x,[s])}),f){const O=new SRi;I.push({label:O.label,run:async()=>O.runAction(x)})}else if(d){const O=new wRi;I.push({label:O.label,run:async()=>O.runAction(x)})}if(c.kind===0){const O=new GB;I.push({label:O.label,run:async()=>O.runAction(x)})}else if(c.kind===1){const O=new nse;I.push({label:O.label,run:async()=>O.runAction(x)})}else if(c.kind===2){const O=new rse;I.push({label:O.label,run:async()=>O.runAction(x)})}else TRi(c);const P=await v.pick(I,{title:UPt});P&&await P.run()}};vSe.ID="editor.action.unicodeHighlight.showExcludeOptions";let Bbe=vSe;async function xRi(l,e){const i=l.getValue(wb.allowedCharacters);let n;typeof i=="object"&&i?n=i:n={};for(const s of e)n[String.fromCodePoint(s)]=!0;await l.updateValue(wb.allowedCharacters,n,2)}async function kRi(l,e){var s;const i=(s=l.inspect(wb.allowedLocales).user)==null?void 0:s.value;let n;typeof i=="object"&&i?n=Object.assign({},i):n={};for(const c of e)n[c]=!0;await l.updateValue(wb.allowedLocales,n,2)}function TRi(l){throw new Error(`Unexpected value: ${l}`)}sr(GB);sr(nse);sr(rse);sr(Bbe);Cl(ise.ID,ise,1);uW.register(_qe);var DRi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},ekt=function(l,e){return function(i,n){e(i,n,l)}};const $Pt="ignoreUnusualLineTerminators";function ERi(l,e,i){l.setModelProperty(e.uri,$Pt,i)}function IRi(l,e){return l.getModelProperty(e.uri,$Pt)}var S$;let Wbe=(S$=class extends xi{constructor(e,i,n){super(),this._editor=e,this._dialogService=i,this._codeEditorService=n,this._isPresentingDialog=!1,this._config=this._editor.getOption(127),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(127)&&(this._config=this._editor.getOption(127),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(s=>{s.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if(this._config==="off"||!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||IRi(this._codeEditorService,e)===!0||this._editor.getOption(92))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let n;try{this._isPresentingDialog=!0,n=await this._dialogService.confirm({title:W("unusualLineTerminators.title","Unusual Line Terminators"),message:W("unusualLineTerminators.message","Detected unusual line terminators"),detail:W("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",wk(e.uri)),primaryButton:W({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:W("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}if(!n.confirmed){ERi(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())}},S$.ID="editor.contrib.unusualLineTerminatorsDetector",S$);Wbe=DRi([ekt(1,gse),ekt(2,Bl)],Wbe);Cl(Wbe.ID,Wbe,1);var NRi=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},LRi=function(l,e){return function(i,n){e(i,n,l)}};class tkt{constructor(){this.selector={language:"*"}}provideDocumentHighlights(e,i,n){const s=[],c=e.getWordAtPosition({lineNumber:i.lineNumber,column:i.column});return c?e.isDisposed()?void 0:e.findMatches(c.word,!0,!1,!0,J1e,!1).map(f=>({range:f.range,kind:x$.Text})):Promise.resolve(s)}provideMultiDocumentHighlights(e,i,n,s){const c=new vg,d=e.getWordAtPosition({lineNumber:i.lineNumber,column:i.column});if(!d)return Promise.resolve(c);for(const f of[e,...n]){if(f.isDisposed())continue;const v=f.findMatches(d.word,!0,!1,!0,J1e,!1).map(x=>({range:x.range,kind:x$.Text}));v&&c.set(f.uri,v)}return c}}let mqe=class extends xi{constructor(e){super(),this._register(e.documentHighlightProvider.register("*",new tkt)),this._register(e.multiDocumentHighlightProvider.register("*",new tkt))}};mqe=NRi([LRi(0,Ts)],mqe);var JPt=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},V1e=function(l,e){return function(i,n){e(i,n,l)}},v_,gqe;const bKe=new rs("hasWordHighlights",!1);function GPt(l,e,i,n){const s=l.ordered(e);return o$e(s.map(c=>()=>Promise.resolve(c.provideDocumentHighlights(e,i,n)).then(void 0,t_)),c=>c!=null).then(c=>{if(c){const d=new vg;return d.set(e.uri,c),d}return new vg})}function PRi(l,e,i,n,s,c){const d=l.ordered(e);return o$e(d.map(f=>()=>{const m=c.filter(v=>tTt(v)).filter(v=>I$e(f.selector,v.uri,v.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(f.provideMultiDocumentHighlights(e,i,m,s)).then(void 0,t_)}),f=>f!=null)}class KPt{constructor(e,i,n){this._model=e,this._selection=i,this._wordSeparators=n,this._wordRange=this._getCurrentWordRange(e,i),this._result=null}get result(){return this._result||(this._result=Om(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,i){const n=e.getWordAtPosition(i.getPosition());return n?new nt(i.startLineNumber,n.startColumn,i.startLineNumber,n.endColumn):null}isValid(e,i,n){const s=i.startLineNumber,c=i.startColumn,d=i.endColumn,f=this._getCurrentWordRange(e,i);let m=!!(this._wordRange&&this._wordRange.equalsRange(f));for(let v=0,x=n.length;!m&&v<x;v++){const w=n.getRange(v);w&&w.startLineNumber===s&&w.startColumn<=c&&w.endColumn>=d&&(m=!0)}return m}cancel(){this.result.cancel()}}class ARi extends KPt{constructor(e,i,n,s){super(e,i,n),this._providers=s}_compute(e,i,n,s){return GPt(this._providers,e,i.getPosition(),s).then(c=>c||new vg)}}class ORi extends KPt{constructor(e,i,n,s,c){super(e,i,n),this._providers=s,this._otherModels=c}_compute(e,i,n,s){return PRi(this._providers,e,i.getPosition(),n,s,this._otherModels).then(c=>c||new vg)}}function MRi(l,e,i,n,s){return new ARi(e,i,s,l)}function RRi(l,e,i,n,s,c){return new ORi(e,i,s,l,c)}Mb("_executeDocumentHighlights",async(l,e,i)=>{const n=l.get(Ts),s=await GPt(n.documentHighlightProvider,e,i,cc.None);return s==null?void 0:s.get(e.uri)});var _R;let yqe=(_R=class{constructor(e,i,n,s,c){this.toUnhook=new wn,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new vg,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.runDelayer=this.toUnhook.add(new Ck(50)),this.editor=e,this.providers=i,this.multiDocumentProviders=n,this.codeEditorService=c,this._hasWordHighlights=bKe.bindTo(s),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(81),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(d=>{this._ignorePositionChangeEvent||this.occurrencesHighlight!=="off"&&this.runDelayer.trigger(()=>{this._onPositionChanged(d)})})),this.toUnhook.add(e.onDidFocusEditorText(d=>{this.occurrencesHighlight!=="off"&&(this.workerRequest||this.runDelayer.trigger(()=>{this._run()}))})),this.toUnhook.add(e.onDidChangeModelContent(d=>{NSe(this.model.uri,"output")||this._stopAll()})),this.toUnhook.add(e.onDidChangeModel(d=>{!d.newModelUrl&&d.oldModelUrl?this._stopSingular():v_.query&&this._run()})),this.toUnhook.add(e.onDidChangeConfiguration(d=>{var m,v;const f=this.editor.getOption(81);if(this.occurrencesHighlight!==f)switch(this.occurrencesHighlight=f,f){case"off":this._stopAll();break;case"singleFile":this._stopAll((v=(m=v_.query)==null?void 0:m.modelInfo)==null?void 0:v.model);break;case"multiFile":v_.query&&this._run(!0);break;default:console.warn("Unknown occurrencesHighlight setting value:",f);break}})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,v_.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight!=="off"&&(this.runDelayer.cancel(),this._run())}_getSortedHighlights(){return this.decorations.getRanges().sort(nt.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),n=(e.findIndex(c=>c.containsPosition(this.editor.getPosition()))+1)%e.length,s=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(s.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(s);const c=this._getWord();if(c){const d=this.editor.getModel().getLineContent(s.startLineNumber);xv(`${d}, ${n+1} of ${e.length} for '${c.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),n=(e.findIndex(c=>c.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,s=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(s.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(s);const c=this._getWord();if(c){const d=this.editor.getModel().getLineContent(s.startLineNumber);xv(`${d}, ${n+1} of ${e.length} for '${c.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;const e=v_.storedDecorationIDs.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),v_.storedDecorationIDs.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(e){const i=this.codeEditorService.listCodeEditors(),n=[];for(const s of i){if(!s.hasModel()||ire(s.getModel().uri,e==null?void 0:e.uri))continue;const c=v_.storedDecorationIDs.get(s.getModel().uri);if(!c)continue;s.removeDecorations(c),n.push(s.getModel().uri);const d=RR.get(s);d!=null&&d.wordHighlighter&&d.wordHighlighter.decorations.length>0&&(d.wordHighlighter.decorations.clear(),d.wordHighlighter.workerRequest=null,d.wordHighlighter._hasWordHighlights.set(!1))}for(const s of n)v_.storedDecorationIDs.delete(s)}_stopSingular(){var e,i,n,s;this._removeSingleDecorations(),this.editor.hasTextFocus()&&(((e=this.editor.getModel())==null?void 0:e.uri.scheme)!==Ma.vscodeNotebookCell&&((n=(i=v_.query)==null?void 0:i.modelInfo)==null?void 0:n.model.uri.scheme)!==Ma.vscodeNotebookCell?(v_.query=null,this._run()):(s=v_.query)!=null&&s.modelInfo&&(v_.query.modelInfo=null)),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(e){this._removeAllDecorations(e),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){var i;if(this.occurrencesHighlight==="off"){this._stopAll();return}if(e.reason!==3&&((i=this.editor.getModel())==null?void 0:i.uri.scheme)!==Ma.vscodeNotebookCell){this._stopAll();return}this._run()}_getWord(){const e=this.editor.getSelection(),i=e.startLineNumber,n=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:i,column:n})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===Ma.vscodeNotebookCell){const c=[],d=this.codeEditorService.listCodeEditors();for(const f of d){const m=f.getModel();m&&m!==e&&m.uri.scheme===Ma.vscodeNotebookCell&&c.push(m)}return c}const n=[],s=this.codeEditorService.listCodeEditors();for(const c of s){if(!TGe(c))continue;const d=c.getModel();d&&e===d.modified&&n.push(d.modified)}if(n.length)return n;if(this.occurrencesHighlight==="singleFile")return[];for(const c of s){const d=c.getModel();d&&d!==e&&n.push(d)}return n}_run(e){var s,c;let i;if(this.editor.hasTextFocus()){const d=this.editor.getSelection();if(!d||d.startLineNumber!==d.endLineNumber){v_.query=null,this._stopAll();return}const f=d.startColumn,m=d.endColumn,v=this._getWord();if(!v||v.startColumn>f||v.endColumn<m){v_.query=null,this._stopAll();return}i=this.workerRequest&&this.workerRequest.isValid(this.model,d,this.decorations),v_.query={modelInfo:{model:this.model,selection:d},word:v}}else if(!v_.query){this._stopAll();return}if(this.lastCursorPositionChangeTime=new Date().getTime(),i)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else if(ire(this.editor.getModel().uri,(s=v_.query.modelInfo)==null?void 0:s.model.uri)){if(!e){const m=this.decorations.getRanges();for(const v of m)if(v.containsPosition(this.editor.getPosition()))return}this._stopAll(e?this.model:void 0);const d=++this.workerRequestTokenId;this.workerRequestCompleted=!1;const f=this.getOtherModelsToHighlight(this.editor.getModel());if(!v_.query||!v_.query.modelInfo||v_.query.modelInfo.model.isDisposed())return;this.workerRequest=this.computeWithModel(v_.query.modelInfo.model,v_.query.modelInfo.selection,v_.query.word,f),(c=this.workerRequest)==null||c.result.then(m=>{d===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=m||[],this._beginRenderDecorations())},Pa)}}computeWithModel(e,i,n,s){return s.length?RRi(this.multiDocumentProviders,e,i,n,this.editor.getOption(132),s):MRi(this.providers,e,i,n,this.editor.getOption(132))}_beginRenderDecorations(){const e=new Date().getTime(),i=this.lastCursorPositionChangeTime+250;e>=i?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},i-e)}renderDecorations(){var i,n,s;this.renderDecorationsTimer=-1;const e=this.codeEditorService.listCodeEditors();for(const c of e){const d=RR.get(c);if(!d)continue;const f=[],m=(i=c.getModel())==null?void 0:i.uri;if(m&&this.workerRequestValue.has(m)){const v=v_.storedDecorationIDs.get(m),x=this.workerRequestValue.get(m);if(x)for(const I of x)I.range&&f.push({range:I.range,options:xOi(I.kind)});let w=[];c.changeDecorations(I=>{w=I.deltaDecorations(v??[],f)}),v_.storedDecorationIDs=v_.storedDecorationIDs.set(m,w),f.length>0&&((n=d.wordHighlighter)==null||n.decorations.set(f),(s=d.wordHighlighter)==null||s._hasWordHighlights.set(!0))}}}dispose(){this._stopSingular(),this.toUnhook.dispose()}},v_=_R,_R.storedDecorationIDs=new vg,_R.query=null,_R);yqe=v_=JPt([V1e(4,Bl)],yqe);var gB;let RR=(gB=class extends xi{static get(e){return e.getContribution(gqe.ID)}constructor(e,i,n,s){super(),this._wordHighlighter=null;const c=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&(this._wordHighlighter=new yqe(e,n.documentHighlightProvider,n.multiDocumentHighlightProvider,i,s))};this._register(e.onDidChangeModel(d=>{this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),c()})),c()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){var e;(e=this._wordHighlighter)==null||e.moveNext()}moveBack(){var e;(e=this._wordHighlighter)==null||e.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore()}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}},gqe=gB,gB.ID="editor.contrib.wordHighlighter",gB);RR=gqe=JPt([V1e(1,Ko),V1e(2,Ts),V1e(3,Bl)],RR);class XPt extends hs{constructor(e,i){super(i),this._isNext=e}run(e,i){const n=RR.get(i);n&&(this._isNext?n.moveNext():n.moveBack())}}class FRi extends XPt{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:W("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:bKe,kbOpts:{kbExpr:Tt.editorTextFocus,primary:65,weight:100}})}}class BRi extends XPt{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:W("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:bKe,kbOpts:{kbExpr:Tt.editorTextFocus,primary:1089,weight:100}})}}class WRi extends hs{constructor(){super({id:"editor.action.wordHighlight.trigger",label:W("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:void 0,kbOpts:{kbExpr:Tt.editorTextFocus,primary:0,weight:100}})}run(e,i,n){const s=RR.get(i);s&&s.restoreViewState(!0)}}Cl(RR.ID,RR,0);sr(FRi);sr(BRi);sr(WRi);NJ(mqe);class lxe extends tm{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,i,n){if(!i.hasModel())return;const s=Sk(i.getOption(132),i.getOption(131)),c=i.getModel(),d=i.getSelections(),f=d.length>1,m=d.map(v=>{const x=new pi(v.positionLineNumber,v.positionColumn),w=this._move(s,c,x,this._wordNavigationType,f);return this._moveTo(v,w,this._inSelectionMode)});if(c.pushStackElement(),i._getViewModel().setCursorStates("moveWordCommand",3,m.map(v=>Rl.fromModelSelection(v))),m.length===1){const v=new pi(m[0].positionLineNumber,m[0].positionColumn);i.revealPosition(v,0)}}_moveTo(e,i,n){return n?new Us(e.selectionStartLineNumber,e.selectionStartColumn,i.lineNumber,i.column):new Us(i.lineNumber,i.column,i.lineNumber,i.column)}}class qR extends lxe{_move(e,i,n,s,c){return hu.moveWordLeft(e,i,n,s,c)}}class $R extends lxe{_move(e,i,n,s,c){return hu.moveWordRight(e,i,n,s)}}class VRi extends qR{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class HRi extends qR{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class jRi extends qR{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:kn.and(Tt.textInputFocus,(e=kn.and(Cse,Swe))==null?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}class zRi extends qR{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class URi extends qR{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class qRi extends qR{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:kn.and(Tt.textInputFocus,(e=kn.and(Cse,Swe))==null?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class $Ri extends qR{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,i,n,s,c){return super._move(Sk(KE.wordSeparators.defaultValue,e.intlSegmenterLocales),i,n,s,c)}}class JRi extends qR{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,i,n,s,c){return super._move(Sk(KE.wordSeparators.defaultValue,e.intlSegmenterLocales),i,n,s,c)}}class GRi extends $R{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class KRi extends $R{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:kn.and(Tt.textInputFocus,(e=kn.and(Cse,Swe))==null?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}class XRi extends $R{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class QRi extends $R{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class ZRi extends $R{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:kn.and(Tt.textInputFocus,(e=kn.and(Cse,Swe))==null?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class YRi extends $R{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class e8i extends $R{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,i,n,s,c){return super._move(Sk(KE.wordSeparators.defaultValue,e.intlSegmenterLocales),i,n,s,c)}}class t8i extends $R{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,i,n,s,c){return super._move(Sk(KE.wordSeparators.defaultValue,e.intlSegmenterLocales),i,n,s,c)}}class uxe extends tm{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,i,n){const s=e.get(rh);if(!i.hasModel())return;const c=Sk(i.getOption(132),i.getOption(131)),d=i.getModel(),f=i.getSelections(),m=i.getOption(6),v=i.getOption(11),x=s.getLanguageConfiguration(d.getLanguageId()).getAutoClosingPairs(),w=i._getViewModel(),I=f.map(P=>{const O=this._delete({wordSeparators:c,model:d,selection:P,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:i.getOption(9),autoClosingBrackets:m,autoClosingQuotes:v,autoClosingPairs:x,autoClosedCharacters:w.getCursorAutoClosedCharacters()},this._wordNavigationType);return new T0(O,"")});i.pushUndoStop(),i.executeCommands(this.id,I),i.pushUndoStop()}}class CKe extends uxe{_delete(e,i){const n=hu.deleteWordLeft(e,i);return n||new nt(1,1,1,1)}}class SKe extends uxe{_delete(e,i){const n=hu.deleteWordRight(e,i);if(n)return n;const s=e.model.getLineCount(),c=e.model.getLineMaxColumn(s);return new nt(s,c,s,c)}}class i8i extends CKe{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:Tt.writable})}}class n8i extends CKe{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:Tt.writable})}}class r8i extends CKe{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:Tt.writable,kbOpts:{kbExpr:Tt.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class s8i extends SKe{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:Tt.writable})}}class o8i extends SKe{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:Tt.writable})}}class a8i extends SKe{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:Tt.writable,kbOpts:{kbExpr:Tt.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class c8i extends hs{constructor(){super({id:"deleteInsideWord",precondition:Tt.writable,label:W("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,i,n){if(!i.hasModel())return;const s=Sk(i.getOption(132),i.getOption(131)),c=i.getModel(),f=i.getSelections().map(m=>{const v=hu.deleteInsideWord(s,c,m);return new T0(v,"")});i.pushUndoStop(),i.executeCommands(this.id,f),i.pushUndoStop()}}$r(new VRi);$r(new HRi);$r(new jRi);$r(new zRi);$r(new URi);$r(new qRi);$r(new GRi);$r(new KRi);$r(new XRi);$r(new QRi);$r(new ZRi);$r(new YRi);$r(new $Ri);$r(new JRi);$r(new e8i);$r(new t8i);$r(new i8i);$r(new n8i);$r(new r8i);$r(new s8i);$r(new o8i);$r(new a8i);sr(c8i);class l8i extends uxe{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:Tt.writable,kbOpts:{kbExpr:Tt.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,i){const n=Awe.deleteWordPartLeft(e);return n||new nt(1,1,1,1)}}class u8i extends uxe{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:Tt.writable,kbOpts:{kbExpr:Tt.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,i){const n=Awe.deleteWordPartRight(e);if(n)return n;const s=e.model.getLineCount(),c=e.model.getLineMaxColumn(s);return new nt(s,c,s,c)}}class QPt extends lxe{_move(e,i,n,s,c){return Awe.moveWordPartLeft(e,i,n,c)}}class d8i extends QPt{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:Tt.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}fl.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class f8i extends QPt{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:Tt.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}fl.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class ZPt extends lxe{_move(e,i,n,s,c){return Awe.moveWordPartRight(e,i,n)}}class h8i extends ZPt{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:Tt.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class _8i extends ZPt{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:Tt.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}$r(new l8i);$r(new u8i);$r(new d8i);$r(new f8i);$r(new h8i);$r(new _8i);const NKe=class NKe extends xi{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const e=GC.get(this.editor);if(e&&this.editor.hasModel()){let i=this.editor.getOptions().get(93);i||(this.editor.isSimpleWidget?i=new m1(W("editor.simple.readonly","Cannot edit in read-only input")):i=new m1(W("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(i,this.editor.getPosition())}}};NKe.ID="editor.contrib.readOnlyMessageController";let Vbe=NKe;Cl(Vbe.ID,Vbe,2);var p8i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},ikt=function(l,e){return function(i,n){e(i,n,l)}};let vqe=class extends xi{constructor(e,i,n){super(),this._textModel=e,this._languageFeaturesService=i,this._outlineModelService=n,this._currentModel=bc(this,void 0);const s=k0("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),c=k0("_textModel.onDidChangeContent",Tr.debounce(d=>this._textModel.onDidChangeContent(d),()=>{},100));this._register(Ib(async(d,f)=>{s.read(d),c.read(d);const m=f.add(new hTi),v=await this._outlineModelService.getOrCreate(this._textModel,m.token);f.isDisposed||this._currentModel.set(v,void 0)}))}getBreadcrumbItems(e,i){const n=this._currentModel.read(i);if(!n)return[];const s=n.asListOfDocumentSymbols().filter(c=>e.contains(c.range.startLineNumber)&&!e.contains(c.range.endLineNumber));return s.sort(bkt(yv(c=>c.range.endLineNumber-c.range.startLineNumber,mT))),s.map(c=>({name:c.name,kind:c.kind,startLineNumber:c.range.startLineNumber}))}};vqe=p8i([ikt(1,Ts),ikt(2,Jse)],vqe);Vve.setBreadcrumbsSourceFactory((l,e)=>e.createInstance(vqe,l));const LKe=class LKe extends xi{constructor(e){super(),this.editor=e,this.widget=null,VE&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const e=!this.editor.getOption(92);!this.widget&&e?this.widget=new bqe(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}};LKe.ID="editor.contrib.iPadShowKeyboard";let Hbe=LKe;const bSe=class bSe extends xi{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(en(this._domNode,"touchstart",i=>{this.editor.focus()})),this._register(en(this._domNode,"focus",i=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return bSe.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}};bSe.ID="editor.contrib.ShowKeyboardWidget";let bqe=bSe;Cl(Hbe.ID,Hbe,3);var m8i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},nkt=function(l,e){return function(i,n){e(i,n,l)}},Cqe,yB;let sse=(yB=class extends xi{static get(e){return e.getContribution(Cqe.ID)}constructor(e,i,n){super(),this._editor=e,this._languageService=n,this._widget=null,this._register(this._editor.onDidChangeModel(s=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(s=>this.stop())),this._register(Oh.onDidChange(s=>this.stop())),this._register(this._editor.onKeyUp(s=>s.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new Sqe(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}},Cqe=yB,yB.ID="editor.contrib.inspectTokens",yB);sse=Cqe=m8i([nkt(1,Mw),nkt(2,Pf)],sse);class g8i extends hs{constructor(){super({id:"editor.action.inspectTokens",label:IVe.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,i){const n=sse.get(i);n==null||n.launch()}}function y8i(l){let e="";for(let i=0,n=l.length;i<n;i++){const s=l.charCodeAt(i);switch(s){case 9:e+="→";break;case 32:e+="·";break;default:e+=String.fromCharCode(s)}}return e}function v8i(l,e){const i=Oh.get(e);if(i)return i;const n=l.encodeLanguageId(e);return{getInitialState:()=>R$,tokenize:(s,c,d)=>Z$e(e,d),tokenizeEncoded:(s,c,d)=>fwe(n,d)}}const CSe=class CSe extends xi{constructor(e,i){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=i,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=v8i(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(n=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return CSe._ID}_compute(e){const i=this._getTokensAtLine(e.lineNumber);let n=0;for(let m=i.tokens1.length-1;m>=0;m--){const v=i.tokens1[m];if(e.column-1>=v.offset){n=m;break}}let s=0;for(let m=i.tokens2.length>>>1;m>=0;m--)if(e.column-1>=i.tokens2[m<<1]){s=m;break}const c=this._model.getLineContent(e.lineNumber);let d="";if(n<i.tokens1.length){const m=i.tokens1[n].offset,v=n+1<i.tokens1.length?i.tokens1[n+1].offset:c.length;d=c.substring(m,v)}o0(this._domNode,Cr("h2.tm-token",void 0,y8i(d),Cr("span.tm-token-length",void 0,`${d.length} ${d.length===1?"char":"chars"}`))),jn(this._domNode,Cr("hr.tokens-inspect-separator",{style:"clear:both"}));const f=(s<<1)+1<i.tokens2.length?this._decodeMetadata(i.tokens2[(s<<1)+1]):null;jn(this._domNode,Cr("table.tm-metadata-table",void 0,Cr("tbody",void 0,Cr("tr",void 0,Cr("td.tm-metadata-key",void 0,"language"),Cr("td.tm-metadata-value",void 0,`${f?f.languageId:"-?-"}`)),Cr("tr",void 0,Cr("td.tm-metadata-key",void 0,"token type"),Cr("td.tm-metadata-value",void 0,`${f?this._tokenTypeToString(f.tokenType):"-?-"}`)),Cr("tr",void 0,Cr("td.tm-metadata-key",void 0,"font style"),Cr("td.tm-metadata-value",void 0,`${f?this._fontStyleToString(f.fontStyle):"-?-"}`)),Cr("tr",void 0,Cr("td.tm-metadata-key",void 0,"foreground"),Cr("td.tm-metadata-value",void 0,`${f?In.Format.CSS.formatHex(f.foreground):"-?-"}`)),Cr("tr",void 0,Cr("td.tm-metadata-key",void 0,"background"),Cr("td.tm-metadata-value",void 0,`${f?In.Format.CSS.formatHex(f.background):"-?-"}`))))),jn(this._domNode,Cr("hr.tokens-inspect-separator")),n<i.tokens1.length&&jn(this._domNode,Cr("span.tm-token-type",void 0,i.tokens1[n].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){const i=Oh.getColorMap(),n=kb.getLanguageId(e),s=kb.getTokenType(e),c=kb.getFontStyle(e),d=kb.getForeground(e),f=kb.getBackground(e);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(n),tokenType:s,fontStyle:c,foreground:i[d],background:i[f]}}_tokenTypeToString(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 3:return"RegEx";default:return"??"}}_fontStyleToString(e){let i="";return e&1&&(i+="italic "),e&2&&(i+="bold "),e&4&&(i+="underline "),e&8&&(i+="strikethrough "),i.length===0&&(i="---"),i}_getTokensAtLine(e){const i=this._getStateBeforeLine(e),n=this._tokenizationSupport.tokenize(this._model.getLineContent(e),!0,i),s=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(e),!0,i);return{startState:i,tokens1:n.tokens,tokens2:s.tokens,endState:n.endState}}_getStateBeforeLine(e){let i=this._tokenizationSupport.getInitialState();for(let n=1;n<e;n++)i=this._tokenizationSupport.tokenize(this._model.getLineContent(n),!0,i).endState;return i}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}};CSe._ID="editor.contrib.inspectTokensWidget";let Sqe=CSe;Cl(sse.ID,sse,4);sr(g8i);var b8i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},rkt=function(l,e){return function(i,n){e(i,n,l)}},Cie,vB;let wqe=(vB=class{constructor(e,i){this.quickInputService=e,this.keybindingService=i,this.registry=nh.as(nW.Quickaccess)}provide(e){const i=new wn;return i.add(e.onDidAccept(()=>{const[n]=e.selectedItems;n&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),i.add(e.onDidChangeValue(n=>{const s=this.registry.getQuickAccessProvider(n.substr(Cie.PREFIX.length));s&&s.prefix&&s.prefix!==Cie.PREFIX&&this.quickInputService.quickAccess.show(s.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(n=>n.prefix!==Cie.PREFIX),i}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((i,n)=>i.prefix.localeCompare(n.prefix)).flatMap(i=>this.createPicks(i))}createPicks(e){return e.helpEntries.map(i=>{const n=i.prefix||e.prefix,s=n||"…";return{prefix:n,label:s,keybinding:i.commandId?this.keybindingService.lookupKeybinding(i.commandId):void 0,ariaLabel:W("helpPickAriaLabel","{0}, {1}",s,i.description),description:i.description}})}},Cie=vB,vB.PREFIX="?",vB);wqe=Cie=b8i([rkt(0,Ek),rkt(1,pu)],wqe);nh.as(nW.Quickaccess).registerQuickAccessProvider({ctor:wqe,prefix:"",helpEntries:[{description:NVe.helpQuickAccessActionLabel}]});class YPt{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,i,n){var d;const s=new wn;e.canAcceptInBackground=!!((d=this.options)!=null&&d.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const c=s.add(new Fm);return c.value=this.doProvide(e,i,n),s.add(this.onDidActiveTextEditorControlChange(()=>{c.value=void 0,c.value=this.doProvide(e,i)})),s}doProvide(e,i,n){const s=new wn,c=this.activeTextEditorControl;if(c&&this.canProvideWithTextEditor(c)){const d={editor:c},f=XIt(c);if(f){let m=c.saveViewState()??void 0;s.add(f.onDidChangeCursorPosition(()=>{m=c.saveViewState()??void 0})),d.restoreViewState=()=>{m&&c===this.activeTextEditorControl&&c.restoreViewState(m)},s.add(gR(i.onCancellationRequested)(()=>{var v;return(v=d.restoreViewState)==null?void 0:v.call(d)}))}s.add(fo(()=>this.clearDecorations(c))),s.add(this.provideWithTextEditor(d,e,i,n))}else s.add(this.provideWithoutTextEditor(e,i));return s}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},i){e.setSelection(i.range,"code.jump"),e.revealRangeInCenter(i.range,0),i.preserveFocus||e.focus();const n=e.getModel();n&&"getLineContent"in n&&PL(`${n.getLineContent(i.range.startLineNumber)}`)}getModel(e){var i;return TGe(e)?(i=e.getModel())==null?void 0:i.modified:e.getModel()}addDecorations(e,i){e.changeDecorations(n=>{const s=[];this.rangeHighlightDecorationId&&(s.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),s.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const c=[{range:i,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:i,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:Mh(HDt),position:ww.Full}}}],[d,f]=n.deltaDecorations(s,c);this.rangeHighlightDecorationId={rangeHighlightId:d,overviewRulerDecorationId:f}})}clearDecorations(e){const i=this.rangeHighlightDecorationId;i&&(e.changeDecorations(n=>{n.deltaDecorations([i.overviewRulerDecorationId,i.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}const SSe=class SSe extends YPt{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const i=W("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:i}],e.ariaLabel=i,xi.None}provideWithTextEditor(e,i,n){const s=e.editor,c=new wn;c.add(i.onDidAccept(m=>{const[v]=i.selectedItems;if(v){if(!this.isValidLineNumber(s,v.lineNumber))return;this.gotoLocation(e,{range:this.toRange(v.lineNumber,v.column),keyMods:i.keyMods,preserveFocus:m.inBackground}),m.inBackground||i.hide()}}));const d=()=>{const m=this.parsePosition(s,i.value.trim().substr(SSe.PREFIX.length)),v=this.getPickLabel(s,m.lineNumber,m.column);if(i.items=[{lineNumber:m.lineNumber,column:m.column,label:v}],i.ariaLabel=v,!this.isValidLineNumber(s,m.lineNumber)){this.clearDecorations(s);return}const x=this.toRange(m.lineNumber,m.column);s.revealRangeInCenter(x,0),this.addDecorations(s,x)};d(),c.add(i.onDidChangeValue(()=>d()));const f=XIt(s);return f&&f.getOptions().get(68).renderType===2&&(f.updateOptions({lineNumbers:"on"}),c.add(fo(()=>f.updateOptions({lineNumbers:"relative"})))),c}toRange(e=1,i=1){return{startLineNumber:e,startColumn:i,endLineNumber:e,endColumn:i}}parsePosition(e,i){const n=i.split(/,|:|#/).map(c=>parseInt(c,10)).filter(c=>!isNaN(c)),s=this.lineCount(e)+1;return{lineNumber:n[0]>0?n[0]:s+n[0],column:n[1]}}getPickLabel(e,i,n){if(this.isValidLineNumber(e,i))return this.isValidColumn(e,i,n)?W("gotoLineColumnLabel","Go to line {0} and character {1}.",i,n):W("gotoLineLabel","Go to line {0}.",i);const s=e.getPosition()||{lineNumber:1,column:1},c=this.lineCount(e);return c>1?W("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",s.lineNumber,s.column,c):W("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",s.lineNumber,s.column)}isValidLineNumber(e,i){return!i||typeof i!="number"?!1:i>0&&i<=this.lineCount(e)}isValidColumn(e,i,n){if(!n||typeof n!="number")return!1;const s=this.getModel(e);if(!s)return!1;const c={lineNumber:i,column:n};return s.validatePosition(c).equals(c)}lineCount(e){var i;return((i=this.getModel(e))==null?void 0:i.getLineCount())??0}};SSe.PREFIX=":";let xqe=SSe;var C8i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},S8i=function(l,e){return function(i,n){e(i,n,l)}};let ose=class extends xqe{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=Tr.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};ose=C8i([S8i(0,Bl)],ose);var bB;let eAt=(bB=class extends hs{constructor(){super({id:bB.ID,label:Mye.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:Tt.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(Ek).quickAccess.show(ose.PREFIX)}},bB.ID="editor.action.gotoLine",bB);sr(eAt);nh.as(nW.Quickaccess).registerQuickAccessProvider({ctor:ose,prefix:ose.PREFIX,helpEntries:[{description:Mye.gotoLineActionLabel,commandId:eAt.ID}]});const tAt=[void 0,[]];function Y9e(l,e,i=0,n=0){const s=e;return s.values&&s.values.length>1?w8i(l,s.values,i,n):iAt(l,e,i,n)}function w8i(l,e,i,n){let s=0;const c=[];for(const d of e){const[f,m]=iAt(l,d,i,n);if(typeof f!="number")return tAt;s+=f,c.push(...m)}return[s,x8i(c)]}function iAt(l,e,i,n){const s=NB(e.original,e.originalLowercase,i,l,l.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return s?[s[0],bse(s)]:tAt}function x8i(l){const e=l.sort((s,c)=>s.start-c.start),i=[];let n;for(const s of e)!n||!k8i(n,s)?(n=s,i.push(s)):(n.start=Math.min(n.start,s.start),n.end=Math.max(n.end,s.end));return i}function k8i(l,e){return!(l.end<e.start||e.end<l.start)}function skt(l){return l.startsWith('"')&&l.endsWith('"')}const nAt=" ";function kqe(l){typeof l!="string"&&(l="");const e=l.toLowerCase(),{pathNormalized:i,normalized:n,normalizedLowercase:s}=okt(l),c=i.indexOf(AE)>=0,d=skt(l);let f;const m=l.split(nAt);if(m.length>1)for(const v of m){const x=skt(v),{pathNormalized:w,normalized:I,normalizedLowercase:P}=okt(v);I&&(f||(f=[]),f.push({original:v,originalLowercase:v.toLowerCase(),pathNormalized:w,normalized:I,normalizedLowercase:P,expectContiguousMatch:x}))}return{original:l,originalLowercase:e,pathNormalized:i,normalized:n,normalizedLowercase:s,values:f,containsPathSeparator:c,expectContiguousMatch:d}}function okt(l){let e;I0?e=l.replace(/\//g,AE):e=l.replace(/\\/g,AE);const i=Jli(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:i,normalizedLowercase:i.toLowerCase()}}function akt(l){return Array.isArray(l)?kqe(l.map(e=>e.original).join(nAt)):kqe(l.original)}var T8i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},ckt=function(l,e){return function(i,n){e(i,n,l)}},H1e,DE;let x9=(DE=class extends YPt{constructor(e,i,n=Object.create(null)){super(n),this._languageFeaturesService=e,this._outlineModelService=i,this.options=n,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,W("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),xi.None}provideWithTextEditor(e,i,n,s){const c=e.editor,d=this.getModel(c);return d?this._languageFeaturesService.documentSymbolProvider.has(d)?this.doProvideWithEditorSymbols(e,d,i,n,s):this.doProvideWithoutEditorSymbols(e,d,i,n):xi.None}doProvideWithoutEditorSymbols(e,i,n,s){const c=new wn;return this.provideLabelPick(n,W("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(async()=>!await this.waitForLanguageSymbolRegistry(i,c)||s.isCancellationRequested||c.add(this.doProvideWithEditorSymbols(e,i,n,s)))(),c}provideLabelPick(e,i){e.items=[{label:i,index:0,kind:14}],e.ariaLabel=i}async waitForLanguageSymbolRegistry(e,i){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const n=new hJ,s=i.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(s.dispose(),n.complete(!0))}));return i.add(fo(()=>n.complete(!1))),n.p}doProvideWithEditorSymbols(e,i,n,s,c){var w;const d=e.editor,f=new wn;f.add(n.onDidAccept(I=>{var O;const[P]=n.selectedItems;P&&P.range&&(this.gotoLocation(e,{range:P.range.selection,keyMods:n.keyMods,preserveFocus:I.inBackground}),(O=c==null?void 0:c.handleAccept)==null||O.call(c,P),I.inBackground||n.hide())})),f.add(n.onDidTriggerItemButton(({item:I})=>{I&&I.range&&(this.gotoLocation(e,{range:I.range.selection,keyMods:n.keyMods,forceSideBySide:!0}),n.hide())}));const m=this.getDocumentSymbols(i,s);let v;const x=async I=>{v==null||v.dispose(!0),n.busy=!1,v=new ih(s),n.busy=!0;try{const P=kqe(n.value.substr(H1e.PREFIX.length).trim()),O=await this.doGetSymbolPicks(m,P,void 0,v.token,i);if(s.isCancellationRequested)return;if(O.length>0){if(n.items=O,I&&P.original.length===0){const z=jne(O,J=>!!(J.type!=="separator"&&J.range&&nt.containsPosition(J.range.decoration,I)));z&&(n.activeItems=[z])}}else P.original.length>0?this.provideLabelPick(n,W("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(n,W("noSymbolResults","No editor symbols"))}finally{s.isCancellationRequested||(n.busy=!1)}};return f.add(n.onDidChangeValue(()=>x(void 0))),x((w=d.getSelection())==null?void 0:w.getPosition()),f.add(n.onDidChangeActive(()=>{const[I]=n.activeItems;I&&I.range&&(d.revealRangeInCenter(I.range.selection,0),this.addDecorations(d,I.range.decoration))})),f}async doGetSymbolPicks(e,i,n,s,c){var J,Y;const d=await e;if(s.isCancellationRequested)return[];const f=i.original.indexOf(H1e.SCOPE_PREFIX)===0,m=f?1:0;let v,x;i.values&&i.values.length>1?(v=akt(i.values[0]),x=akt(i.values.slice(1))):v=i;let w;const I=(Y=(J=this.options)==null?void 0:J.openSideBySideDirection)==null?void 0:Y.call(J);I&&(w=[{iconClass:I==="right"?zo.asClassName(pr.splitHorizontal):zo.asClassName(pr.splitVertical),tooltip:I==="right"?W("openToSide","Open to the Side"):W("openToBottom","Open to the Bottom")}]);const P=[];for(let ae=0;ae<d.length;ae++){const me=d[ae],ye=qli(me.name),Ce=`$(${Y1e.toIcon(me.kind).id}) ${ye}`,Fe=Ce.length-ye.length;let rt=me.containerName;n!=null&&n.extraContainerLabel&&(rt?rt=`${n.extraContainerLabel} • ${rt}`:rt=n.extraContainerLabel);let ct,Mt,Yt,Bi;if(i.original.length>m){let $t=!1;if(v!==i&&([ct,Mt]=Y9e(Ce,{...i,values:void 0},m,Fe),typeof ct=="number"&&($t=!0)),typeof ct!="number"&&([ct,Mt]=Y9e(Ce,v,m,Fe),typeof ct!="number"))continue;if(!$t&&x){if(rt&&x.original.length>0&&([Yt,Bi]=Y9e(rt,x)),typeof Yt!="number")continue;typeof ct=="number"&&(ct+=Yt)}}const $i=me.tags&&me.tags.indexOf(1)>=0;P.push({index:ae,kind:me.kind,score:ct,label:Ce,ariaLabel:Bli(me.name,me.kind),description:rt,highlights:$i?void 0:{label:Mt,description:Bi},range:{selection:nt.collapseToStart(me.selectionRange),decoration:me.range},uri:c.uri,symbolName:ye,strikethrough:$i,buttons:w})}const O=P.sort((ae,me)=>f?this.compareByKindAndScore(ae,me):this.compareByScore(ae,me));let z=[];if(f){let Ce=function(){me&&typeof ae=="number"&&ye>0&&(me.label=SB(tBe[ae]||eBe,ye))},ae,me,ye=0;for(const Fe of O)ae!==Fe.kind?(Ce(),ae=Fe.kind,ye=1,me={type:"separator"},z.push(me)):ye++,z.push(Fe);Ce()}else O.length>0&&(z=[{label:W("symbols","symbols ({0})",P.length),type:"separator"},...O]);return z}compareByScore(e,i){if(typeof e.score!="number"&&typeof i.score=="number")return 1;if(typeof e.score=="number"&&typeof i.score!="number")return-1;if(typeof e.score=="number"&&typeof i.score=="number"){if(e.score>i.score)return-1;if(e.score<i.score)return 1}return e.index<i.index?-1:e.index>i.index?1:0}compareByKindAndScore(e,i){const n=tBe[e.kind]||eBe,s=tBe[i.kind]||eBe,c=n.localeCompare(s);return c===0?this.compareByScore(e,i):c}async getDocumentSymbols(e,i){const n=await this._outlineModelService.getOrCreate(e,i);return i.isCancellationRequested?[]:n.asListOfDocumentSymbols()}},H1e=DE,DE.PREFIX="@",DE.SCOPE_PREFIX=":",DE.PREFIX_BY_CATEGORY=`${DE.PREFIX}${DE.SCOPE_PREFIX}`,DE);x9=H1e=T8i([ckt(0,Ts),ckt(1,Jse)],x9);const eBe=W("property","properties ({0})"),tBe={5:W("method","methods ({0})"),11:W("function","functions ({0})"),8:W("_constructor","constructors ({0})"),12:W("variable","variables ({0})"),4:W("class","classes ({0})"),22:W("struct","structs ({0})"),23:W("event","events ({0})"),24:W("operator","operators ({0})"),10:W("interface","interfaces ({0})"),2:W("namespace","namespaces ({0})"),3:W("package","packages ({0})"),25:W("typeParameter","type parameters ({0})"),1:W("modules","modules ({0})"),6:W("property","properties ({0})"),9:W("enum","enumerations ({0})"),21:W("enumMember","enumeration members ({0})"),14:W("string","strings ({0})"),0:W("file","files ({0})"),17:W("array","arrays ({0})"),15:W("number","numbers ({0})"),16:W("boolean","booleans ({0})"),18:W("object","objects ({0})"),19:W("key","keys ({0})"),7:W("field","fields ({0})"),13:W("constant","constants ({0})")};var D8i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},iBe=function(l,e){return function(i,n){e(i,n,l)}};let Tqe=class extends x9{constructor(e,i,n){super(i,n),this.editorService=e,this.onDidActiveTextEditorControlChange=Tr.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};Tqe=D8i([iBe(0,Bl),iBe(1,Ts),iBe(2,Jse)],Tqe);const wSe=class wSe extends hs{constructor(){super({id:wSe.ID,label:rre.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:Tt.hasDocumentSymbolProvider,kbOpts:{kbExpr:Tt.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(Ek).quickAccess.show(x9.PREFIX,{itemActivation:vE.NONE})}};wSe.ID="editor.action.quickOutline";let jbe=wSe;sr(jbe);nh.as(nW.Quickaccess).registerQuickAccessProvider({ctor:Tqe,prefix:x9.PREFIX,helpEntries:[{description:rre.quickOutlineActionLabel,prefix:x9.PREFIX,commandId:jbe.ID},{description:rre.quickOutlineByCategoryActionLabel,prefix:x9.PREFIX_BY_CATEGORY}]});function E8i(l){const e=new Map;for(const i of l)e.set(i,(e.get(i)??0)+1);return e}class ane{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,i){const n=this.computeEmbedding(e),s=new Map,c=[];for(const[d,f]of this.documents){if(i.isCancellationRequested)return[];for(const m of f.chunks){const v=this.computeSimilarityScore(m,n,s);v>0&&c.push({key:d,score:v})}}return c}static termFrequencies(e){return E8i(ane.splitTerms(e))}static*splitTerms(e){const i=n=>n.toLowerCase();for(const[n]of e.matchAll(new RegExp("\\b\\p{Letter}[\\p{Letter}\\d]{2,}\\b","gu"))){yield i(n);const s=n.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(s.length>1)for(const c of s)c.length>2&&new RegExp("\\p{Letter}{3,}","gu").test(c)&&(yield i(c))}}updateDocuments(e){for(const{key:i}of e)this.deleteDocument(i);for(const i of e){const n=[];for(const s of i.textChunks){const c=ane.termFrequencies(s);for(const d of c.keys())this.chunkOccurrences.set(d,(this.chunkOccurrences.get(d)??0)+1);n.push({text:s,tf:c})}this.chunkCount+=n.length,this.documents.set(i.key,{chunks:n})}return this}deleteDocument(e){const i=this.documents.get(e);if(i){this.documents.delete(e),this.chunkCount-=i.chunks.length;for(const n of i.chunks)for(const s of n.tf.keys()){const c=this.chunkOccurrences.get(s);if(typeof c=="number"){const d=c-1;d<=0?this.chunkOccurrences.delete(s):this.chunkOccurrences.set(s,d)}}}}computeSimilarityScore(e,i,n){let s=0;for(const[c,d]of Object.entries(i)){const f=e.tf.get(c);if(!f)continue;let m=n.get(c);typeof m!="number"&&(m=this.computeIdf(c),n.set(c,m));const v=f*m;s+=v*d}return s}computeEmbedding(e){const i=ane.termFrequencies(e);return this.computeTfidf(i)}computeIdf(e){const i=this.chunkOccurrences.get(e)??0;return i>0?Math.log((this.chunkCount+1)/i):0}computeTfidf(e){const i=Object.create(null);for(const[n,s]of e){const c=this.computeIdf(n);c>0&&(i[n]=s*c)}return i}}function I8i(l){var n;const e=l.slice(0);e.sort((s,c)=>c.score-s.score);const i=((n=e[0])==null?void 0:n.score)??0;if(i>0)for(const s of e)s.score/=i;return e}var Sq;(function(l){l[l.NO_ACTION=0]="NO_ACTION",l[l.CLOSE_PICKER=1]="CLOSE_PICKER",l[l.REFRESH_PICKER=2]="REFRESH_PICKER",l[l.REMOVE_ITEM=3]="REMOVE_ITEM"})(Sq||(Sq={}));function nBe(l){const e=l;return Array.isArray(e.items)}function lkt(l){const e=l;return!!e.picks&&e.additionalPicks instanceof Promise}class N8i extends xi{constructor(e,i){super(),this.prefix=e,this.options=i}provide(e,i,n){var v;const s=new wn;e.canAcceptInBackground=!!((v=this.options)!=null&&v.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let c;const d=s.add(new Fm),f=async()=>{var J;const x=d.value=new wn;c==null||c.dispose(!0),e.busy=!1,c=new ih(i);const w=c.token;let I=e.value.substring(this.prefix.length);(J=this.options)!=null&&J.shouldSkipTrimPickFilter||(I=I.trim());const P=this._getPicks(I,x,w,n),O=(Y,ae)=>{var Ce;let me,ye;if(nBe(Y)?(me=Y.items,ye=Y.active):me=Y,me.length===0){if(ae)return!1;(I.length>0||e.hideInput)&&((Ce=this.options)!=null&&Ce.noResultsPick)&&(Ine(this.options.noResultsPick)?me=[this.options.noResultsPick(I)]:me=[this.options.noResultsPick])}return e.items=me,ye&&(e.activeItems=[ye]),!0},z=async Y=>{let ae=!1,me=!1;await Promise.all([(async()=>{typeof Y.mergeDelay=="number"&&(await c6(Y.mergeDelay),w.isCancellationRequested)||me||(ae=O(Y.picks,!0))})(),(async()=>{e.busy=!0;try{const ye=await Y.additionalPicks;if(w.isCancellationRequested)return;let Ce,Fe;nBe(Y.picks)?(Ce=Y.picks.items,Fe=Y.picks.active):Ce=Y.picks;let rt,ct;if(nBe(ye)?(rt=ye.items,ct=ye.active):rt=ye,rt.length>0||!ae){let Mt;if(!Fe&&!ct){const Yt=e.activeItems[0];Yt&&Ce.indexOf(Yt)!==-1&&(Mt=Yt)}O({items:[...Ce,...rt],active:Fe||ct||Mt})}}finally{w.isCancellationRequested||(e.busy=!1),me=!0}})()])};if(P!==null)if(lkt(P))await z(P);else if(!(P instanceof Promise))O(P);else{e.busy=!0;try{const Y=await P;if(w.isCancellationRequested)return;lkt(Y)?await z(Y):O(Y)}finally{w.isCancellationRequested||(e.busy=!1)}}};s.add(e.onDidChangeValue(()=>f())),f(),s.add(e.onDidAccept(x=>{var I;if(n!=null&&n.handleAccept){x.inBackground||e.hide(),(I=n.handleAccept)==null||I.call(n,e.activeItems[0]);return}const[w]=e.selectedItems;typeof(w==null?void 0:w.accept)=="function"&&(x.inBackground||e.hide(),w.accept(e.keyMods,x))}));const m=async(x,w)=>{var P;if(typeof w.trigger!="function")return;const I=((P=w.buttons)==null?void 0:P.indexOf(x))??-1;if(I>=0){const O=w.trigger(I,e.keyMods),z=typeof O=="number"?O:await O;if(i.isCancellationRequested)return;switch(z){case Sq.NO_ACTION:break;case Sq.CLOSE_PICKER:e.hide();break;case Sq.REFRESH_PICKER:f();break;case Sq.REMOVE_ITEM:{const J=e.items.indexOf(w);if(J!==-1){const Y=e.items.slice(),ae=Y.splice(J,1),me=e.activeItems.filter(Ce=>Ce!==ae[0]),ye=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=Y,me&&(e.activeItems=me),e.keepScrollPosition=ye}break}}}};return s.add(e.onDidTriggerItemButton(({button:x,item:w})=>m(x,w))),s.add(e.onDidTriggerSeparatorButton(({button:x,separator:w})=>m(x,w))),s}}var rAt=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},IM=function(l,e){return function(i,n){e(i,n,l)}},MF,Hp,CL;let Dqe=(CL=class extends N8i{constructor(e,i,n,s,c,d){super(MF.PREFIX,e),this.instantiationService=i,this.keybindingService=n,this.commandService=s,this.telemetryService=c,this.dialogService=d,this.commandsHistory=this._register(this.instantiationService.createInstance(Eqe)),this.options=e}async _getPicks(e,i,n,s){var P,O;const c=await this.getCommandPicks(n);if(n.isCancellationRequested)return[];const d=gR(()=>{const z=new ane;z.updateDocuments(c.map(Y=>({key:Y.commandId,textChunks:[this.getTfIdfChunk(Y)]})));const J=z.calculateScores(e,n);return I8i(J).filter(Y=>Y.score>MF.TFIDF_THRESHOLD).slice(0,MF.TFIDF_MAX_RESULTS)}),f=[];for(const z of c){const J=MF.WORD_FILTER(e,z.label)??void 0,Y=z.commandAlias?MF.WORD_FILTER(e,z.commandAlias)??void 0:void 0;if(J||Y)z.highlights={label:J,detail:this.options.showAlias?Y:void 0},f.push(z);else if(e===z.commandId)f.push(z);else if(e.length>=3){const ae=d();if(n.isCancellationRequested)return[];const me=ae.find(ye=>ye.key===z.commandId);me&&(z.tfIdfScore=me.score,f.push(z))}}const m=new Map;for(const z of f){const J=m.get(z.label);J?(z.description=z.commandId,J.description=J.commandId):m.set(z.label,z)}f.sort((z,J)=>{if(z.tfIdfScore&&J.tfIdfScore)return z.tfIdfScore===J.tfIdfScore?z.label.localeCompare(J.label):J.tfIdfScore-z.tfIdfScore;if(z.tfIdfScore)return 1;if(J.tfIdfScore)return-1;const Y=this.commandsHistory.peek(z.commandId),ae=this.commandsHistory.peek(J.commandId);if(Y&&ae)return Y>ae?-1:1;if(Y)return-1;if(ae)return 1;if(this.options.suggestedCommandIds){const me=this.options.suggestedCommandIds.has(z.commandId),ye=this.options.suggestedCommandIds.has(J.commandId);if(me&&ye)return 0;if(me)return-1;if(ye)return 1}return z.label.localeCompare(J.label)});const v=[];let x=!1,w=!0,I=!!this.options.suggestedCommandIds;for(let z=0;z<f.length;z++){const J=f[z];z===0&&this.commandsHistory.peek(J.commandId)&&(v.push({type:"separator",label:W("recentlyUsed","recently used")}),x=!0),w&&J.tfIdfScore!==void 0&&(v.push({type:"separator",label:W("suggested","similar commands")}),w=!1),I&&J.tfIdfScore===void 0&&!this.commandsHistory.peek(J.commandId)&&((P=this.options.suggestedCommandIds)!=null&&P.has(J.commandId))&&(v.push({type:"separator",label:W("commonlyUsed","commonly used")}),x=!0,I=!1),x&&J.tfIdfScore===void 0&&!this.commandsHistory.peek(J.commandId)&&!((O=this.options.suggestedCommandIds)!=null&&O.has(J.commandId))&&(v.push({type:"separator",label:W("morecCommands","other commands")}),x=!1),v.push(this.toCommandPick(J,s))}return this.hasAdditionalCommandPicks(e,n)?{picks:v,additionalPicks:(async()=>{var Y;const z=await this.getAdditionalCommandPicks(c,f,e,n);if(n.isCancellationRequested)return[];const J=z.map(ae=>this.toCommandPick(ae,s));return w&&((Y=J[0])==null?void 0:Y.type)!=="separator"&&J.unshift({type:"separator",label:W("suggested","similar commands")}),J})()}:v}toCommandPick(e,i){if(e.type==="separator")return e;const n=this.keybindingService.lookupKeybinding(e.commandId),s=n?W("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,n.getAriaLabel()):e.label;return{...e,ariaLabel:s,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:n,accept:async()=>{var c;this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:(i==null?void 0:i.from)??"quick open"});try{(c=e.args)!=null&&c.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(d){Tk(d)||this.dialogService.error(W("canNotRun","Command '{0}' resulted in an error",e.label),Gve(d))}}}}getTfIdfChunk({label:e,commandAlias:i,commandDescription:n}){let s=e;return i&&i!==e&&(s+=` - ${i}`),n&&n.value!==e&&(s+=` - ${n.value===n.original?n.value:`${n.value} (${n.original})`}`),s}},MF=CL,CL.PREFIX=">",CL.TFIDF_THRESHOLD=.5,CL.TFIDF_MAX_RESULTS=5,CL.WORD_FILTER=z$e(ere,sgi,YTt),CL);Dqe=MF=rAt([IM(1,ho),IM(2,pu),IM(3,qd),IM(4,b1),IM(5,gse)],Dqe);var EE;let Eqe=(EE=class extends xi{constructor(e,i,n){super(),this.storageService=e,this.configurationService=i,this.logService=n,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e))),this._register(this.storageService.onWillSaveState(e=>{e.reason===cre.SHUTDOWN&&this.saveState()}))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=Hp.getConfiguredCommandHistoryLength(this.configurationService),Hp.cache&&Hp.cache.limit!==this.configuredCommandsHistoryLength&&(Hp.cache.limit=this.configuredCommandsHistoryLength,Hp.hasChanges=!0))}load(){const e=this.storageService.get(Hp.PREF_KEY_CACHE,0);let i;if(e)try{i=JSON.parse(e)}catch(s){this.logService.error(`[CommandsHistory] invalid data: ${s}`)}const n=Hp.cache=new VL(this.configuredCommandsHistoryLength,1);if(i){let s;i.usesLRU?s=i.entries:s=i.entries.sort((c,d)=>c.value-d.value),s.forEach(c=>n.set(c.key,c.value))}Hp.counter=this.storageService.getNumber(Hp.PREF_KEY_COUNTER,0,Hp.counter)}push(e){Hp.cache&&(Hp.cache.set(e,Hp.counter++),Hp.hasChanges=!0)}peek(e){var i;return(i=Hp.cache)==null?void 0:i.peek(e)}saveState(){if(!Hp.cache||!Hp.hasChanges)return;const e={usesLRU:!0,entries:[]};Hp.cache.forEach((i,n)=>e.entries.push({key:n,value:i})),this.storageService.store(Hp.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(Hp.PREF_KEY_COUNTER,Hp.counter,0,0),Hp.hasChanges=!1}static getConfiguredCommandHistoryLength(e){var s,c;const n=(c=(s=e.getValue().workbench)==null?void 0:s.commandPalette)==null?void 0:c.history;return typeof n=="number"?n:Hp.DEFAULT_COMMANDS_HISTORY_LENGTH}},Hp=EE,EE.DEFAULT_COMMANDS_HISTORY_LENGTH=50,EE.PREF_KEY_CACHE="commandPalette.mru.cache",EE.PREF_KEY_COUNTER="commandPalette.mru.counter",EE.counter=1,EE.hasChanges=!1,EE);Eqe=Hp=rAt([IM(0,ET),IM(1,Cc),IM(2,N0)],Eqe);class L8i extends Dqe{constructor(e,i,n,s,c,d){super(e,i,n,s,c,d)}getCodeEditorCommandPicks(){var n;const e=this.activeTextEditorControl;if(!e)return[];const i=[];for(const s of e.getSupportedActions()){let c;(n=s.metadata)!=null&&n.description&&(iyi(s.metadata.description)?c=s.metadata.description:c={original:s.metadata.description,value:s.metadata.description}),i.push({commandId:s.id,commandAlias:s.alias,commandDescription:c,label:K$e(s.label)||s.id})}return i}}var P8i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},jU=function(l,e){return function(i,n){e(i,n,l)}};let ase=class extends L8i{get activeTextEditorControl(){return this.codeEditorService.getFocusedCodeEditor()??void 0}constructor(e,i,n,s,c,d){super({showAlias:!1},e,n,s,c,d),this.codeEditorService=i}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};ase=P8i([jU(0,ho),jU(1,Bl),jU(2,pu),jU(3,qd),jU(4,b1),jU(5,gse)],ase);const xSe=class xSe extends hs{constructor(){super({id:xSe.ID,label:Rye.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:Tt.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(Ek).quickAccess.show(ase.PREFIX)}};xSe.ID="editor.action.quickCommand";let zbe=xSe;sr(zbe);nh.as(nW.Quickaccess).registerQuickAccessProvider({ctor:ase,prefix:ase.PREFIX,helpEntries:[{description:Rye.quickCommandHelp,commandId:zbe.ID}]});var A8i=function(l,e,i,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,i,n);else for(var f=l.length-1;f>=0;f--)(d=l[f])&&(c=(s<3?d(c):s>3?d(e,i,c):d(e,i))||c);return s>3&&c&&Object.defineProperty(e,i,c),c},zU=function(l,e){return function(i,n){e(i,n,l)}};let Iqe=class extends UB{constructor(e,i,n,s,c,d,f){super(!0,e,i,n,s,c,d,f)}};Iqe=A8i([zU(1,Ko),zU(2,Bl),zU(3,w_),zU(4,ho),zU(5,ET),zU(6,Cc)],Iqe);Cl(UB.ID,Iqe,4);class O8i extends hs{constructor(){super({id:"editor.action.toggleHighContrast",label:PVe.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,i){const n=e.get(Mw),s=n.getColorTheme();RE(s.type)?(n.setTheme(this._originalThemeName||(I$(s.type)?e$:M4)),this._originalThemeName=null):(n.setTheme(I$(s.type)?v9:b9),this._originalThemeName=s.themeName)}}sr(O8i);const rBe=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:eNt,Emitter:tNt,KeyCode:iNt,KeyMod:nNt,MarkerSeverity:cNt,MarkerTag:lNt,Position:rNt,Range:sNt,Selection:oNt,SelectionDirection:aNt,Token:uNt,Uri:Bwe,editor:c9,languages:aT},Symbol.toStringTag,{value:"Module"}));function M8i(l){return new Worker("/tuela24/assets/editor.worker-oRlJJsnX.js",{name:l==null?void 0:l.name})}function R8i(l){return new Worker("/tuela24/assets/css.worker-9mYIcYwc.js",{name:l==null?void 0:l.name})}function F8i(l){return new Worker("/tuela24/assets/html.worker-cftAoxKd.js",{name:l==null?void 0:l.name})}function B8i(l){return new Worker("/tuela24/assets/json.worker-CJ89eVXr.js",{name:l==null?void 0:l.name})}function W8i(l){return new Worker("/tuela24/assets/ts.worker-Brk6wN3W.js",{name:l==null?void 0:l.name})}function ukt(l){throw new Error('Could not dynamically require "'+l+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var sAt={exports:{}};const V8i={},H8i=Object.freeze(Object.defineProperty({__proto__:null,default:V8i},Symbol.toStringTag,{value:"Module"})),cM=tai(H8i);(function(l){var e={};/*! *****************************************************************************
+ Copyright (c) Microsoft Corporation. All rights reserved.
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of the
+ License at http://www.apache.org/licenses/LICENSE-2.0
+
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+ MERCHANTABLITY OR NON-INFRINGEMENT.
+
+ See the Apache Version 2.0 License for specific language governing permissions
+ and limitations under the License.
+ ***************************************************************************** */var i={};(n=>{var s=Object.defineProperty,c=(t,r)=>{for(var a in r)s(t,a,{get:r[a],enumerable:!0})},d=t=>t,f={};c(f,{ANONYMOUS:()=>lhe,AccessFlags:()=>tke,AssertionLevel:()=>dxe,AssignmentDeclarationKind:()=>uke,AssignmentKind:()=>MTe,Associativity:()=>zTe,BreakpointResolver:()=>o_e,BuilderFileEmit:()=>RLe,BuilderProgramKind:()=>ULe,BuilderState:()=>$0,CallHierarchy:()=>mA,CharacterCodes:()=>Cke,CheckFlags:()=>Qxe,CheckMode:()=>Iue,ClassificationType:()=>gfe,ClassificationTypeNames:()=>$Pe,CommentDirectiveType:()=>Rxe,Comparison:()=>x,CompletionInfoFlags:()=>WPe,CompletionTriggerKind:()=>pfe,Completions:()=>CA,ContainerFlags:()=>yNe,ContextFlags:()=>zxe,Debug:()=>j,DiagnosticCategory:()=>JJ,Diagnostics:()=>k,DocumentHighlights:()=>QZ,ElementFlags:()=>eke,EmitFlags:()=>xoe,EmitHint:()=>Tke,EmitOnly:()=>Bxe,EndOfLineState:()=>jPe,ExitStatus:()=>Wxe,ExportKind:()=>BAe,Extension:()=>Ske,ExternalEmitHelpers:()=>kke,FileIncludeKind:()=>_oe,FilePreprocessingDiagnosticsKind:()=>Fxe,FileSystemEntryKind:()=>Mke,FileWatcherEventKind:()=>Pke,FindAllReferences:()=>kl,FlattenLevel:()=>WNe,FlowFlags:()=>$J,ForegroundColorEscapeSequences:()=>ELe,FunctionFlags:()=>HTe,GeneratedIdentifierFlags:()=>hoe,GetLiteralTextFlags:()=>X2e,GoToDefinition:()=>uO,HighlightSpanKind:()=>FPe,IdentifierNameMap:()=>V3,ImportKind:()=>FAe,ImportsNotUsedAsValues:()=>mke,IndentStyle:()=>BPe,IndexFlags:()=>ike,IndexKind:()=>ske,InferenceFlags:()=>cke,InferencePriority:()=>ake,InlayHintKind:()=>RPe,InlayHints:()=>X_e,InternalEmitFlags:()=>wke,InternalNodeBuilderFlags:()=>qxe,InternalSymbolName:()=>Zxe,IntersectionFlags:()=>jxe,InvalidatedProjectKind:()=>hPe,JSDocParsingMode:()=>Lke,JsDoc:()=>S2,JsTyping:()=>J1,JsxEmit:()=>pke,JsxFlags:()=>Pxe,JsxReferenceKind:()=>nke,LanguageFeatureMinimumTarget:()=>xke,LanguageServiceMode:()=>OPe,LanguageVariant:()=>vke,LexicalEnvironmentFlags:()=>Eke,ListFormat:()=>Ike,LogLevel:()=>Cxe,MapCode:()=>Q_e,MemberOverrideStatus:()=>Vxe,ModifierFlags:()=>doe,ModuleDetectionKind:()=>dke,ModuleInstanceState:()=>mNe,ModuleKind:()=>bW,ModuleResolutionKind:()=>i8,ModuleSpecifierEnding:()=>VDe,NavigateTo:()=>a4e,NavigationBar:()=>l4e,NewLineKind:()=>gke,NodeBuilderFlags:()=>Uxe,NodeCheckFlags:()=>goe,NodeFactoryFlags:()=>hEe,NodeFlags:()=>uoe,NodeResolutionFeatures:()=>oNe,ObjectFlags:()=>voe,OperationCanceledException:()=>t8,OperatorPrecedence:()=>UTe,OrganizeImports:()=>w2,OrganizeImportsMode:()=>_fe,OuterExpressionKinds:()=>Dke,OutliningElementsCollector:()=>Y_e,OutliningSpanKind:()=>VPe,OutputFileType:()=>HPe,PackageJsonAutoImportPreference:()=>APe,PackageJsonDependencyGroup:()=>PPe,PatternMatchKind:()=>Ehe,PollingInterval:()=>koe,PollingWatchKind:()=>_ke,PragmaKindFlags:()=>Nke,PredicateSemantics:()=>Axe,PrivateIdentifierKind:()=>wEe,ProcessLevel:()=>zNe,ProgramUpdateLevel:()=>wLe,QuotePreference:()=>_Ae,RegularExpressionFlags:()=>Oxe,RelationComparisonResult:()=>foe,Rename:()=>RY,ScriptElementKind:()=>UPe,ScriptElementKindModifier:()=>qPe,ScriptKind:()=>Coe,ScriptSnapshot:()=>lZ,ScriptTarget:()=>yke,SemanticClassificationFormat:()=>MPe,SemanticMeaning:()=>JPe,SemicolonPreference:()=>mfe,SignatureCheckMode:()=>Nue,SignatureFlags:()=>boe,SignatureHelp:()=>ez,SignatureInfo:()=>MLe,SignatureKind:()=>rke,SmartSelectionRange:()=>ipe,SnippetKind:()=>woe,StatisticType:()=>SPe,StructureIsReused:()=>poe,SymbolAccessibility:()=>Gxe,SymbolDisplay:()=>NS,SymbolDisplayPartKind:()=>dZ,SymbolFlags:()=>moe,SymbolFormatFlags:()=>Jxe,SyntaxKind:()=>loe,Ternary:()=>lke,ThrottledCancellationToken:()=>g6e,TokenClass:()=>zPe,TokenFlags:()=>Mxe,TransformFlags:()=>Soe,TypeFacts:()=>Eue,TypeFlags:()=>yoe,TypeFormatFlags:()=>$xe,TypeMapKind:()=>oke,TypePredicateKind:()=>Kxe,TypeReferenceSerializationKind:()=>Xxe,UnionReduction:()=>Hxe,UpToDateStatusType:()=>oPe,VarianceFlags:()=>Yxe,Version:()=>P0,VersionRange:()=>qJ,WatchDirectoryFlags:()=>bke,WatchDirectoryKind:()=>hke,WatchFileKind:()=>fke,WatchLogLevel:()=>kLe,WatchType:()=>Kd,accessPrivateIdentifier:()=>BNe,addEmitFlags:()=>F1,addEmitHelper:()=>MP,addEmitHelpers:()=>Zb,addInternalEmitFlags:()=>AP,addNodeFactoryPatcher:()=>yQe,addObjectAllocatorPatcher:()=>rQe,addRange:()=>Sr,addRelatedInfo:()=>da,addSyntheticLeadingComment:()=>h7,addSyntheticTrailingComment:()=>uX,addToSeen:()=>Pg,advancedAsyncSuperHelper:()=>_X,affectsDeclarationPathOptionDeclarations:()=>IIe,affectsEmitOptionDeclarations:()=>EIe,allKeysStartWithDot:()=>lQ,altDirectorySeparator:()=>QJ,and:()=>jJ,append:()=>fn,appendIfUnique:()=>n_,arrayFrom:()=>as,arrayIsEqualTo:()=>i_,arrayIsHomogeneous:()=>KDe,arrayOf:()=>zc,arrayReverseIterator:()=>Bw,arrayToMap:()=>Ld,arrayToMultiMap:()=>Cn,arrayToNumericMap:()=>Sa,assertType:()=>MKe,assign:()=>$u,asyncSuperHelper:()=>hX,attachFileToDiagnostics:()=>TP,base64decode:()=>hDe,base64encode:()=>fDe,binarySearch:()=>Jt,binarySearchKey:()=>ti,bindSourceFile:()=>vNe,breakIntoCharacterSpans:()=>YAe,breakIntoWordSpans:()=>e4e,buildLinkParts:()=>SAe,buildOpts:()=>EH,buildOverload:()=>aht,bundlerModuleNameResolver:()=>aNe,canBeConvertedToAsync:()=>Ohe,canHaveDecorators:()=>uD,canHaveExportModifier:()=>eH,canHaveFlowNode:()=>wV,canHaveIllegalDecorators:()=>Fle,canHaveIllegalModifiers:()=>cIe,canHaveIllegalType:()=>UQe,canHaveIllegalTypeParameters:()=>aIe,canHaveJSDoc:()=>xV,canHaveLocals:()=>Ay,canHaveModifiers:()=>Fg,canHaveModuleSpecifier:()=>PTe,canHaveSymbol:()=>M0,canIncludeBindAndCheckDiagnostics:()=>r7,canJsonReportNoInputFiles:()=>O7,canProduceDiagnostics:()=>TQ,canUsePropertyAccess:()=>Gce,canWatchAffectingLocation:()=>ZLe,canWatchAtTypes:()=>QLe,canWatchDirectoryOrFile:()=>$Q,cartesianProduct:()=>vxe,cast:()=>ha,chainBundle:()=>q0,chainDiagnosticMessages:()=>jo,changeAnyExtension:()=>wW,changeCompilerHostLikeToUseCache:()=>Q7,changeExtension:()=>cx,changeFullExtension:()=>YJ,changesAffectModuleResolution:()=>TG,changesAffectingProgramStructure:()=>j2e,characterCodeToRegularExpressionFlag:()=>Roe,childIsDecorated:()=>N8,classElementOrClassElementParameterIsDecorated:()=>Mae,classHasClassThisAssignment:()=>Uue,classHasDeclaredOrExplicitlyAssignedName:()=>que,classHasExplicitlyAssignedName:()=>wQ,classOrConstructorParameterIsDecorated:()=>dS,classicNameResolver:()=>_Ne,classifier:()=>C6e,cleanExtendedConfigCache:()=>LQ,clear:()=>An,clearMap:()=>X_,clearSharedExtendedConfigFileWatcher:()=>sde,climbPastPropertyAccess:()=>_Z,clone:()=>Jd,cloneCompilerOptions:()=>Ffe,closeFileWatcher:()=>d0,closeFileWatcherOf:()=>Zm,codefix:()=>wh,collapseTextChangeRangesAcrossMultipleVersions:()=>n2e,collectExternalModuleInfo:()=>Vue,combine:()=>rS,combinePaths:()=>zr,commandLineOptionOfCustomType:()=>PIe,commentPragmas:()=>GJ,commonOptionsWithBuild:()=>jX,compact:()=>Rw,compareBooleans:()=>Ak,compareDataObjects:()=>xce,compareDiagnostics:()=>Z8,compareEmitHelpers:()=>kEe,compareNumberOfDirectorySeparators:()=>ZV,comparePaths:()=>Hb,comparePathsCaseInsensitive:()=>rXe,comparePathsCaseSensitive:()=>nXe,comparePatternKeys:()=>Cue,compareProperties:()=>pxe,compareStringsCaseInsensitive:()=>mW,compareStringsCaseInsensitiveEslintCompatible:()=>fxe,compareStringsCaseSensitive:()=>sh,compareStringsCaseSensitiveUI:()=>gW,compareTextSpans:()=>VJ,compareValues:()=>_l,compilerOptionsAffectDeclarationPath:()=>ADe,compilerOptionsAffectEmit:()=>PDe,compilerOptionsAffectSemanticDiagnostics:()=>LDe,compilerOptionsDidYouMeanDiagnostics:()=>$X,compilerOptionsIndicateEsModules:()=>zfe,computeCommonSourceDirectoryOfFilenames:()=>TLe,computeLineAndCharacterOfPosition:()=>P6,computeLineOfPosition:()=>a8,computeLineStarts:()=>ZL,computePositionOfLineAndCharacter:()=>nG,computeSignatureWithDiagnostics:()=>Tde,computeSuggestionDiagnostics:()=>Lhe,computedOptions:()=>Cd,concatenate:()=>Js,concatenateDiagnosticMessageChains:()=>TDe,consumesNodeCoreModules:()=>jZ,contains:()=>Yt,containsIgnoredPath:()=>a7,containsObjectRestOrSpread:()=>xH,containsParseError:()=>oP,containsPath:()=>Vm,convertCompilerOptionsForTelemetry:()=>GIe,convertCompilerOptionsFromJson:()=>ZZe,convertJsonOption:()=>BI,convertToBase64:()=>dDe,convertToJson:()=>LH,convertToObject:()=>HIe,convertToOptionsWithAbsolutePaths:()=>XX,convertToRelativePath:()=>s8,convertToTSConfig:()=>sue,convertTypeAcquisitionFromJson:()=>YZe,copyComments:()=>qI,copyEntries:()=>DG,copyLeadingComments:()=>iO,copyProperties:()=>wg,copyTrailingAsLeadingComments:()=>xj,copyTrailingComments:()=>h5,couldStartTrivia:()=>Uke,countWhere:()=>$i,createAbstractBuilder:()=>ltt,createAccessorPropertyBackingField:()=>Vle,createAccessorPropertyGetRedirector:()=>mIe,createAccessorPropertySetRedirector:()=>gIe,createBaseNodeFactory:()=>cEe,createBinaryExpressionTrampoline:()=>BX,createBuilderProgram:()=>Dde,createBuilderProgramUsingIncrementalBuildInfo:()=>GLe,createBuilderStatusReporter:()=>tZ,createCacheableExportInfoMap:()=>bhe,createCachedDirectoryStructureHost:()=>IQ,createClassifier:()=>Hit,createCommentDirectivesMap:()=>G2e,createCompilerDiagnostic:()=>Zl,createCompilerDiagnosticForInvalidCustomType:()=>AIe,createCompilerDiagnosticFromMessageChain:()=>PK,createCompilerHost:()=>DLe,createCompilerHostFromProgramHost:()=>$de,createCompilerHostWorker:()=>PQ,createDetachedDiagnostic:()=>kP,createDiagnosticCollection:()=>OV,createDiagnosticForFileFromMessageChain:()=>Nae,createDiagnosticForNode:()=>Kn,createDiagnosticForNodeArray:()=>q6,createDiagnosticForNodeArrayFromMessageChain:()=>eV,createDiagnosticForNodeFromMessageChain:()=>Bv,createDiagnosticForNodeInSourceFile:()=>jm,createDiagnosticForRange:()=>cTe,createDiagnosticMessageChainFromDiagnostic:()=>aTe,createDiagnosticReporter:()=>aA,createDocumentPositionMapper:()=>ANe,createDocumentRegistry:()=>jAe,createDocumentRegistryInternal:()=>khe,createEmitAndSemanticDiagnosticsBuilderProgram:()=>Lde,createEmitHelperFactory:()=>xEe,createEmptyExports:()=>gH,createEvaluator:()=>sEe,createExpressionForJsxElement:()=>tIe,createExpressionForJsxFragment:()=>iIe,createExpressionForObjectLiteralElementLike:()=>nIe,createExpressionForPropertyName:()=>Lle,createExpressionFromEntityName:()=>yH,createExternalHelpersImportDeclarationIfNeeded:()=>Ole,createFileDiagnostic:()=>Md,createFileDiagnosticFromMessageChain:()=>BG,createFlowNode:()=>zy,createForOfBindingStatement:()=>Nle,createFutureSourceFile:()=>GZ,createGetCanonicalFileName:()=>Mf,createGetIsolatedDeclarationErrors:()=>fLe,createGetSourceFile:()=>ude,createGetSymbolAccessibilityDiagnosticForNode:()=>xS,createGetSymbolAccessibilityDiagnosticForNodeName:()=>dLe,createGetSymbolWalker:()=>bNe,createIncrementalCompilerHost:()=>eZ,createIncrementalProgram:()=>sPe,createJsxFactoryExpression:()=>Ile,createLanguageService:()=>y6e,createLanguageServiceSourceFile:()=>hY,createMemberAccessForPropertyName:()=>RI,createModeAwareCache:()=>M3,createModeAwareCacheKey:()=>B7,createModeMismatchDetails:()=>_ae,createModuleNotFoundChain:()=>IG,createModuleResolutionCache:()=>R3,createModuleResolutionLoader:()=>gde,createModuleResolutionLoaderUsingGlobalCache:()=>iPe,createModuleSpecifierResolutionHost:()=>dA,createMultiMap:()=>Of,createNameResolver:()=>Yce,createNodeConverters:()=>dEe,createNodeFactory:()=>rH,createOptionNameMap:()=>UX,createOverload:()=>ppe,createPackageJsonImportFilter:()=>nO,createPackageJsonInfo:()=>fhe,createParenthesizerRules:()=>lEe,createPatternMatcher:()=>JAe,createPrinter:()=>bx,createPrinterWithDefaults:()=>CLe,createPrinterWithRemoveComments:()=>_D,createPrinterWithRemoveCommentsNeverAsciiEscape:()=>SLe,createPrinterWithRemoveCommentsOmitTrailingSemicolon:()=>rde,createProgram:()=>YH,createProgramHost:()=>Jde,createPropertyNameNodeForIdentifierOrLiteral:()=>tX,createQueue:()=>JR,createRange:()=>Um,createRedirectedBuilderProgram:()=>Nde,createResolutionCache:()=>Ade,createRuntimeTypeSerializer:()=>GNe,createScanner:()=>Ov,createSemanticDiagnosticsBuilderProgram:()=>ctt,createSet:()=>Xse,createSolutionBuilder:()=>uPe,createSolutionBuilderHost:()=>cPe,createSolutionBuilderWithWatch:()=>dPe,createSolutionBuilderWithWatchHost:()=>lPe,createSortedArray:()=>Lk,createSourceFile:()=>ZP,createSourceMapGenerator:()=>ENe,createSourceMapSource:()=>SQe,createSuperAccessVariableStatement:()=>kQ,createSymbolTable:()=>_a,createSymlinkCache:()=>Oce,createSyntacticTypeNodeBuilder:()=>IPe,createSystemWatchFunctions:()=>Rke,createTextChange:()=>mj,createTextChangeFromStartLength:()=>DZ,createTextChangeRange:()=>AW,createTextRangeFromNode:()=>Vfe,createTextRangeFromSpan:()=>TZ,createTextSpan:()=>Ff,createTextSpanFromBounds:()=>Fu,createTextSpanFromNode:()=>f_,createTextSpanFromRange:()=>DS,createTextSpanFromStringLiteralLikeContent:()=>Wfe,createTextWriter:()=>FV,createTokenRange:()=>bce,createTypeChecker:()=>TNe,createTypeReferenceDirectiveResolutionCache:()=>sQ,createTypeReferenceResolutionLoader:()=>MQ,createWatchCompilerHost:()=>vtt,createWatchCompilerHostOfConfigFile:()=>Gde,createWatchCompilerHostOfFilesAndCompilerOptions:()=>Kde,createWatchFactory:()=>qde,createWatchHost:()=>Ude,createWatchProgram:()=>Xde,createWatchStatusReporter:()=>Ode,createWriteFileMeasuringIO:()=>dde,declarationNameToString:()=>al,decodeMappings:()=>Fue,decodedTextSpanIntersectsWith:()=>PW,deduplicate:()=>Wb,defaultInitCompilerOptions:()=>Zle,defaultMaximumTruncationLength:()=>x8,diagnosticCategoryName:()=>nI,diagnosticToString:()=>bD,diagnosticsEqualityComparer:()=>AK,directoryProbablyExists:()=>B0,directorySeparator:()=>Kl,displayPart:()=>Z_,displayPartsToString:()=>Wj,disposeEmitNodes:()=>nle,documentSpansEqual:()=>Xfe,dumpTracingLegend:()=>Lxe,elementAt:()=>sm,elideNodes:()=>pIe,emitDetachedComments:()=>tDe,emitFiles:()=>ide,emitFilesAndReportErrors:()=>XQ,emitFilesAndReportErrorsAndGetExitStatus:()=>zde,emitModuleKindIsNonNodeESM:()=>KV,emitNewLineBeforeLeadingCommentOfPosition:()=>eDe,emitResolverSkipsTypeChecking:()=>tde,emitSkippedWithNoDiagnostics:()=>Cde,emptyArray:()=>w,emptyFileSystemEntries:()=>Vce,emptyMap:()=>I,emptyOptions:()=>Bg,endsWith:()=>su,ensurePathIsNonModuleName:()=>sI,ensureScriptKind:()=>qK,ensureTrailingDirectorySeparator:()=>Ad,entityNameToString:()=>bp,enumerateInsertsAndDeletes:()=>UJ,equalOwnProperties:()=>Af,equateStringsCaseInsensitive:()=>jw,equateStringsCaseSensitive:()=>NT,equateValues:()=>Hw,escapeJsxAttributeString:()=>sce,escapeLeadingUnderscores:()=>cu,escapeNonAsciiString:()=>dK,escapeSnippetText:()=>YT,escapeString:()=>Vy,escapeTemplateSubstitution:()=>nce,evaluatorResult:()=>Rd,every:()=>Ce,executeCommandLine:()=>Ztt,expandPreOrPostfixIncrementOrDecrementExpression:()=>PX,explainFiles:()=>Bde,explainIfFileIsRedirectAndImpliedFormat:()=>Wde,exportAssignmentIsAlias:()=>EV,expressionResultIsUnused:()=>QDe,extend:()=>T_,extensionFromPath:()=>i7,extensionIsTS:()=>QK,extensionsNotSupportingExtensionlessResolution:()=>KK,externalHelpersModuleNameText:()=>jk,factory:()=>G,fileContainsPackageImport:()=>Lj,fileExtensionIs:()=>Xl,fileExtensionIsOneOf:()=>Ru,fileIncludeReasonToDiagnostics:()=>jde,fileShouldUseJavaScriptRequire:()=>vhe,filter:()=>$t,filterMutate:()=>Hi,filterSemanticDiagnostics:()=>VQ,find:()=>Fe,findAncestor:()=>Qi,findBestPatternMatch:()=>ioe,findChildOfKind:()=>Uc,findComputedPropertyNameCacheAssignment:()=>WX,findConfigFile:()=>cde,findConstructorDeclaration:()=>nH,findContainingList:()=>vZ,findDiagnosticForNode:()=>OAe,findFirstNonJsxWhitespaceToken:()=>tAe,findIndex:()=>ct,findLast:()=>rt,findLastIndex:()=>Mt,findListItemInfo:()=>eAe,findModifier:()=>Y3,findNextToken:()=>yD,findPackageJson:()=>AAe,findPackageJsons:()=>dhe,findPrecedingMatchingToken:()=>xZ,findPrecedingToken:()=>xd,findSuperStatementIndexPath:()=>vQ,findTokenOnLeftOfPosition:()=>hj,findUseStrictPrologue:()=>Ale,first:()=>ya,firstDefined:()=>J,firstDefinedIterator:()=>Y,firstIterator:()=>D6,firstOrOnly:()=>phe,firstOrUndefined:()=>Ra,firstOrUndefinedIterator:()=>k_,fixupCompilerOptions:()=>Mhe,flatMap:()=>Rr,flatMapIterator:()=>$d,flatMapToMutable:()=>na,flatten:()=>Dr,flattenCommaList:()=>yIe,flattenDestructuringAssignment:()=>HI,flattenDestructuringBinding:()=>hD,flattenDiagnosticMessageText:()=>$1,forEach:()=>O,forEachAncestor:()=>z2e,forEachAncestorDirectory:()=>kg,forEachChild:()=>Uo,forEachChildRecursively:()=>QP,forEachEmittedFile:()=>Que,forEachEnclosingBlockScopeContainer:()=>rTe,forEachEntry:()=>cf,forEachExternalModuleToImportFrom:()=>She,forEachImportClauseDeclaration:()=>ATe,forEachKey:()=>qb,forEachLeadingCommentRange:()=>TW,forEachNameInAccessChainWalkingLeft:()=>CDe,forEachNameOfDefaultExport:()=>XZ,forEachPropertyAssignment:()=>G6,forEachResolvedProjectReference:()=>yde,forEachReturnStatement:()=>uS,forEachRight:()=>z,forEachTrailingCommentRange:()=>DW,forEachTsConfigPropArray:()=>sV,forEachUnique:()=>Zfe,forEachYieldExpression:()=>fTe,formatColorAndReset:()=>pD,formatDiagnostic:()=>fde,formatDiagnostics:()=>Oet,formatDiagnosticsWithColorAndContext:()=>LLe,formatGeneratedName:()=>c2,formatGeneratedNamePart:()=>L3,formatLocation:()=>hde,formatMessage:()=>DP,formatStringFromArgs:()=>jv,formatting:()=>pd,generateDjb2Hash:()=>n8,generateTSConfig:()=>zIe,getAdjustedReferenceLocation:()=>Lfe,getAdjustedRenameLocation:()=>CZ,getAliasDeclarationFromName:()=>Jae,getAllAccessorDeclarations:()=>nx,getAllDecoratorsOfClass:()=>jue,getAllDecoratorsOfClassElement:()=>CQ,getAllJSDocTags:()=>uG,getAllJSDocTagsOfKind:()=>DXe,getAllKeys:()=>vo,getAllProjectOutputs:()=>EQ,getAllSuperTypeNodes:()=>F8,getAllowJSCompilerOption:()=>ox,getAllowSyntheticDefaultImports:()=>EP,getAncestor:()=>Xk,getAnyExtensionFromPath:()=>L6,getAreDeclarationMapsEnabled:()=>MK,getAssignedExpandoInitializer:()=>dP,getAssignedName:()=>aG,getAssignmentDeclarationKind:()=>Bu,getAssignmentDeclarationPropertyAccessKind:()=>yV,getAssignmentTargetKind:()=>Kk,getAutomaticTypeDirectiveNames:()=>nQ,getBaseFileName:()=>ud,getBinaryOperatorPrecedence:()=>AV,getBuildInfo:()=>nde,getBuildInfoFileVersionMap:()=>Ide,getBuildInfoText:()=>vLe,getBuildOrderFromAnyBuildOrder:()=>nj,getBuilderCreationParameters:()=>UQ,getBuilderFileEmit:()=>Cx,getCanonicalDiagnostic:()=>lTe,getCheckFlags:()=>Iu,getClassExtendsHeritageElement:()=>qT,getClassLikeDeclarationOfSymbol:()=>Xb,getCombinedLocalAndExportSymbolFlags:()=>l3,getCombinedModifierFlags:()=>Rk,getCombinedNodeFlags:()=>zb,getCombinedNodeFlagsAlwaysIncludeJSDoc:()=>joe,getCommentRange:()=>B1,getCommonSourceDirectory:()=>X7,getCommonSourceDirectoryOfConfig:()=>oA,getCompilerOptionValue:()=>BK,getCompilerOptionsDiffValue:()=>jIe,getConditions:()=>gx,getConfigFileParsingDiagnostics:()=>mD,getConstantValue:()=>mEe,getContainerFlags:()=>wue,getContainerNode:()=>UI,getContainingClass:()=>Cf,getContainingClassExcludingClassDecorators:()=>$G,getContainingClassStaticBlock:()=>STe,getContainingFunction:()=>Up,getContainingFunctionDeclaration:()=>CTe,getContainingFunctionOrClassStaticBlock:()=>qG,getContainingNodeArray:()=>ZDe,getContainingObjectLiteralElement:()=>Vj,getContextualTypeFromParent:()=>RZ,getContextualTypeFromParentOrAncestorTypeNode:()=>bZ,getDeclarationDiagnostics:()=>hLe,getDeclarationEmitExtensionForPath:()=>_K,getDeclarationEmitOutputFilePath:()=>GTe,getDeclarationEmitOutputFilePathWorker:()=>hK,getDeclarationFileExtension:()=>Ule,getDeclarationFromName:()=>R8,getDeclarationModifierFlagsFromSymbol:()=>$m,getDeclarationOfKind:()=>ql,getDeclarationsOfKind:()=>H2e,getDeclaredExpandoInitializer:()=>A8,getDecorators:()=>$w,getDefaultCompilerOptions:()=>fY,getDefaultFormatCodeSettings:()=>uZ,getDefaultLibFileName:()=>IW,getDefaultLibFilePath:()=>v6e,getDefaultLikeExportInfo:()=>KZ,getDefaultLikeExportNameFromDeclaration:()=>mhe,getDefaultResolutionModeForFileWorker:()=>WQ,getDiagnosticText:()=>M_,getDiagnosticsWithinSpan:()=>MAe,getDirectoryPath:()=>ts,getDirectoryToWatchFailedLookupLocation:()=>Pde,getDirectoryToWatchFailedLookupLocationFromTypeRoot:()=>ePe,getDocumentPositionMapper:()=>Nhe,getDocumentSpansEqualityComparer:()=>Qfe,getESModuleInterop:()=>zv,getEditsForFileRename:()=>UAe,getEffectiveBaseTypeNode:()=>L1,getEffectiveConstraintOfTypeParameter:()=>R6,getEffectiveContainerForJSDocTemplateTag:()=>rK,getEffectiveImplementsTypeNodes:()=>i3,getEffectiveInitializer:()=>pV,getEffectiveJSDocHost:()=>Gk,getEffectiveModifierFlags:()=>jh,getEffectiveModifierFlagsAlwaysIncludeJSDoc:()=>sDe,getEffectiveModifierFlagsNoCache:()=>oDe,getEffectiveReturnTypeNode:()=>wp,getEffectiveSetAccessorTypeAnnotationNode:()=>YTe,getEffectiveTypeAnnotationNode:()=>dd,getEffectiveTypeParameterDeclarations:()=>Jw,getEffectiveTypeRoots:()=>F7,getElementOrPropertyAccessArgumentExpressionOrName:()=>nK,getElementOrPropertyAccessName:()=>$b,getElementsOfBindingOrAssignmentPattern:()=>N3,getEmitDeclarations:()=>Q_,getEmitFlags:()=>Ya,getEmitHelpers:()=>dX,getEmitModuleDetectionKind:()=>EDe,getEmitModuleFormatOfFileWorker:()=>e5,getEmitModuleKind:()=>zh,getEmitModuleResolutionKind:()=>yh,getEmitScriptTarget:()=>Ja,getEmitStandardClassFields:()=>Pce,getEnclosingBlockScopeContainer:()=>R0,getEnclosingContainer:()=>FG,getEncodedSemanticClassifications:()=>whe,getEncodedSyntacticClassifications:()=>xhe,getEndLinePosition:()=>KW,getEntityNameFromTypeNode:()=>cV,getEntrypointsFromPackageJsonInfo:()=>yue,getErrorCountForSummary:()=>GQ,getErrorSpanForNode:()=>pI,getErrorSummaryText:()=>Rde,getEscapedTextOfIdentifierOrLiteral:()=>V8,getEscapedTextOfJsxAttributeName:()=>u7,getEscapedTextOfJsxNamespacedName:()=>LP,getExpandoInitializer:()=>$k,getExportAssignmentExpression:()=>Gae,getExportInfoMap:()=>Pj,getExportNeedsImportStarHelper:()=>ONe,getExpressionAssociativity:()=>tce,getExpressionPrecedence:()=>H8,getExternalHelpersModuleName:()=>MX,getExternalModuleImportEqualsDeclarationExpression:()=>L8,getExternalModuleName:()=>fP,getExternalModuleNameFromDeclaration:()=>$Te,getExternalModuleNameFromPath:()=>cce,getExternalModuleNameLiteral:()=>XP,getExternalModuleRequireArgument:()=>Fae,getFallbackOptions:()=>XH,getFileEmitOutput:()=>OLe,getFileMatcherPatterns:()=>UK,getFileNamesFromConfigSpecs:()=>M7,getFileWatcherEventKind:()=>Eoe,getFilesInErrorForSummary:()=>KQ,getFirstConstructorWithBody:()=>Vv,getFirstIdentifier:()=>K_,getFirstNonSpaceCharacterPosition:()=>kAe,getFirstProjectOutput:()=>ede,getFixableErrorSpanExpression:()=>hhe,getFormatCodeSettingsForWriting:()=>$Z,getFullWidth:()=>GW,getFunctionFlags:()=>nd,getHeritageClause:()=>IV,getHostSignatureFromJSDoc:()=>Jk,getIdentifierAutoGenerate:()=>kQe,getIdentifierGeneratedImportReference:()=>SEe,getIdentifierTypeArguments:()=>kI,getImmediatelyInvokedFunctionExpression:()=>VT,getImpliedNodeFormatForEmitWorker:()=>jI,getImpliedNodeFormatForFile:()=>ZH,getImpliedNodeFormatForFileWorker:()=>BQ,getImportNeedsImportDefaultHelper:()=>Wue,getImportNeedsImportStarHelper:()=>gQ,getIndentString:()=>fK,getInferredLibraryNameResolveFrom:()=>FQ,getInitializedVariables:()=>K8,getInitializerOfBinaryExpression:()=>Hae,getInitializerOfBindingOrAssignmentElement:()=>CH,getInterfaceBaseTypeNodes:()=>B8,getInternalEmitFlags:()=>u0,getInvokedExpression:()=>KG,getIsFileExcluded:()=>WAe,getIsolatedModules:()=>Ag,getJSDocAugmentsTag:()=>h2e,getJSDocClassTag:()=>qoe,getJSDocCommentRanges:()=>Pae,getJSDocCommentsAndTags:()=>jae,getJSDocDeprecatedTag:()=>$oe,getJSDocDeprecatedTagNoCache:()=>b2e,getJSDocEnumTag:()=>Joe,getJSDocHost:()=>zT,getJSDocImplementsTags:()=>_2e,getJSDocOverloadTags:()=>Uae,getJSDocOverrideTagNoCache:()=>v2e,getJSDocParameterTags:()=>M6,getJSDocParameterTagsNoCache:()=>l2e,getJSDocPrivateTag:()=>wXe,getJSDocPrivateTagNoCache:()=>m2e,getJSDocProtectedTag:()=>xXe,getJSDocProtectedTagNoCache:()=>g2e,getJSDocPublicTag:()=>SXe,getJSDocPublicTagNoCache:()=>p2e,getJSDocReadonlyTag:()=>kXe,getJSDocReadonlyTagNoCache:()=>y2e,getJSDocReturnTag:()=>C2e,getJSDocReturnType:()=>MW,getJSDocRoot:()=>t3,getJSDocSatisfiesExpressionType:()=>Xce,getJSDocSatisfiesTag:()=>Goe,getJSDocTags:()=>Wk,getJSDocTemplateTag:()=>TXe,getJSDocThisTag:()=>cG,getJSDocType:()=>Bk,getJSDocTypeAliasName:()=>Rle,getJSDocTypeAssertionType:()=>N7,getJSDocTypeParameterDeclarations:()=>vK,getJSDocTypeParameterTags:()=>u2e,getJSDocTypeParameterTagsNoCache:()=>d2e,getJSDocTypeTag:()=>Fk,getJSXImplicitImportBase:()=>VK,getJSXRuntimeImport:()=>HK,getJSXTransformEnabled:()=>WK,getKeyForCompilerOptions:()=>hue,getLanguageVariant:()=>qV,getLastChild:()=>kce,getLeadingCommentRanges:()=>Av,getLeadingCommentRangesOfNode:()=>Lae,getLeftmostAccessExpression:()=>u3,getLeftmostExpression:()=>d3,getLibraryNameFromLibFileName:()=>vde,getLineAndCharacterOfPosition:()=>Ia,getLineInfo:()=>Rue,getLineOfLocalPosition:()=>j8,getLineStartPositionForPosition:()=>Wg,getLineStarts:()=>Lv,getLinesBetweenPositionAndNextNonWhitespaceCharacter:()=>yDe,getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter:()=>gDe,getLinesBetweenPositions:()=>c8,getLinesBetweenRangeEndAndRangeStart:()=>Cce,getLinesBetweenRangeEndPositions:()=>iQe,getLiteralText:()=>Q2e,getLocalNameForExternalImport:()=>I3,getLocalSymbolForExportDefault:()=>$8,getLocaleSpecificMessage:()=>Bo,getLocaleTimeString:()=>ij,getMappedContextSpan:()=>Yfe,getMappedDocumentSpan:()=>AZ,getMappedLocation:()=>u5,getMatchedFileSpec:()=>Vde,getMatchedIncludeSpec:()=>Hde,getMeaningFromDeclaration:()=>fZ,getMeaningFromLocation:()=>zI,getMembersOfDeclaration:()=>hTe,getModeForFileReference:()=>AQ,getModeForResolutionAtIndex:()=>Vet,getModeForUsageLocation:()=>pde,getModifiedTime:()=>XL,getModifiers:()=>PT,getModuleInstanceState:()=>nC,getModuleNameStringLiteralAt:()=>ej,getModuleSpecifierEndingPreference:()=>HDe,getModuleSpecifierResolverHost:()=>Ufe,getNameForExportedSymbol:()=>zZ,getNameFromImportAttribute:()=>sX,getNameFromIndexInfo:()=>sTe,getNameFromPropertyName:()=>yj,getNameOfAccessExpression:()=>Dce,getNameOfCompilerOptionValue:()=>oue,getNameOfDeclaration:()=>No,getNameOfExpando:()=>Bae,getNameOfJSDocTypedef:()=>c2e,getNameOfScriptTarget:()=>FK,getNameOrArgument:()=>gV,getNameTable:()=>s_e,getNamespaceDeclarationNode:()=>Y6,getNewLineCharacter:()=>mS,getNewLineKind:()=>Nj,getNewLineOrDefaultFromHost:()=>rC,getNewTargetContainer:()=>xTe,getNextJSDocCommentLocation:()=>zae,getNodeChildren:()=>Dle,getNodeForGeneratedName:()=>wH,getNodeId:()=>Sc,getNodeKind:()=>gD,getNodeModifiers:()=>a5,getNodeModulePathParts:()=>iX,getNonAssignedNameOfDeclaration:()=>oG,getNonAssignmentOperatorForCompoundAssignment:()=>U7,getNonAugmentationDeclaration:()=>xae,getNonDecoratorTokenPosOfNode:()=>yae,getNonIncrementalBuildInfoRoots:()=>KLe,getNonModifierTokenPosOfNode:()=>K2e,getNormalizedAbsolutePath:()=>wo,getNormalizedAbsolutePathWithoutRoot:()=>Poe,getNormalizedPathComponents:()=>SW,getObjectFlags:()=>Or,getOperatorAssociativity:()=>ice,getOperatorPrecedence:()=>PV,getOptionFromName:()=>eue,getOptionsForLibraryResolution:()=>_ue,getOptionsNameMap:()=>A3,getOrCreateEmitNode:()=>ch,getOrUpdate:()=>mp,getOriginalNode:()=>Ql,getOriginalNodeId:()=>d_,getOutputDeclarationFileName:()=>j3,getOutputDeclarationFileNameWorker:()=>Zue,getOutputExtension:()=>DQ,getOutputFileNames:()=>Pet,getOutputJSFileNameWorker:()=>Yue,getOutputPathsFor:()=>K7,getOwnEmitOutputFilePath:()=>JTe,getOwnKeys:()=>wr,getOwnValues:()=>So,getPackageJsonTypesVersionsPaths:()=>iQ,getPackageNameFromTypesPackageName:()=>H7,getPackageScopeForPath:()=>V7,getParameterSymbolFromJSDoc:()=>kV,getParentNodeInSpan:()=>bj,getParseTreeNode:()=>Mo,getParsedCommandLineOfConfigFile:()=>IH,getPathComponents:()=>af,getPathFromPathComponents:()=>sS,getPathUpdater:()=>Dhe,getPathsBasePath:()=>pK,getPatternFromSpec:()=>FDe,getPendingEmitKindWithSeen:()=>zQ,getPositionOfLineAndCharacter:()=>xW,getPossibleGenericSignatures:()=>Afe,getPossibleOriginalInputExtensionForExtension:()=>KTe,getPossibleTypeArgumentsInfo:()=>Ofe,getPreEmitDiagnostics:()=>Aet,getPrecedingNonSpaceCharacterPosition:()=>OZ,getPrivateIdentifier:()=>zue,getProperties:()=>Hue,getProperty:()=>hr,getPropertyArrayElementValue:()=>bTe,getPropertyAssignmentAliasLikeExpression:()=>VTe,getPropertyNameForPropertyNameNode:()=>CI,getPropertyNameFromType:()=>Gm,getPropertyNameOfBindingOrAssignmentElement:()=>Mle,getPropertySymbolFromBindingElement:()=>PZ,getPropertySymbolsFromContextualType:()=>_Y,getQuoteFromPreference:()=>$fe,getQuotePreference:()=>$p,getRangesWhere:()=>Ey,getRefactorContextSpan:()=>fA,getReferencedFileLocation:()=>Y7,getRegexFromPattern:()=>ax,getRegularExpressionForWildcard:()=>Y8,getRegularExpressionsForWildcards:()=>jK,getRelativePathFromDirectory:()=>c0,getRelativePathFromFile:()=>o8,getRelativePathToDirectoryOrUrl:()=>QL,getRenameLocation:()=>wj,getReplacementSpanForContextToken:()=>Bfe,getResolutionDiagnostic:()=>wde,getResolutionModeOverride:()=>z3,getResolveJsonModule:()=>XT,getResolvePackageJsonExports:()=>JV,getResolvePackageJsonImports:()=>OK,getResolvedExternalModuleName:()=>ace,getResolvedModuleFromResolution:()=>sP,getResolvedTypeReferenceDirectiveFromResolution:()=>EG,getRestIndicatorOfBindingOrAssignmentElement:()=>RX,getRestParameterElementType:()=>Aae,getRightMostAssignedExpression:()=>mV,getRootDeclaration:()=>A1,getRootDirectoryOfResolutionCache:()=>tPe,getRootLength:()=>Ly,getScriptKind:()=>nhe,getScriptKindFromFileName:()=>$K,getScriptTargetFeatures:()=>vae,getSelectedEffectiveModifierFlags:()=>bP,getSelectedSyntacticModifierFlags:()=>nDe,getSemanticClassifications:()=>VAe,getSemanticJsxChildren:()=>r3,getSetAccessorTypeAnnotationNode:()=>QTe,getSetAccessorValueParameter:()=>a3,getSetExternalModuleIndicator:()=>$V,getShebang:()=>rG,getSingleVariableOfVariableStatement:()=>pP,getSnapshotText:()=>uA,getSnippetElement:()=>rle,getSourceFileOfModule:()=>LG,getSourceFileOfNode:()=>_n,getSourceFilePathInNewDir:()=>gK,getSourceFileVersionAsHashFromText:()=>QQ,getSourceFilesToEmit:()=>mK,getSourceMapRange:()=>yS,getSourceMapper:()=>i4e,getSourceTextOfNodeFromSourceFile:()=>RT,getSpanOfTokenAtPosition:()=>E1,getSpellingSuggestion:()=>LT,getStartPositionOfLine:()=>Yw,getStartPositionOfRange:()=>G8,getStartsOnNewLine:()=>f7,getStaticPropertiesAndClassStaticBlock:()=>bQ,getStrictOptionValue:()=>ah,getStringComparer:()=>E6,getSubPatternFromSpec:()=>zK,getSuperCallFromStatement:()=>yQ,getSuperContainer:()=>oV,getSupportedCodeFixes:()=>n_e,getSupportedExtensions:()=>e7,getSupportedExtensionsWithJsonIfResolveJsonModule:()=>QV,getSwitchedType:()=>che,getSymbolId:()=>Ba,getSymbolNameForPrivateIdentifier:()=>NV,getSymbolTarget:()=>rhe,getSyntacticClassifications:()=>HAe,getSyntacticModifierFlags:()=>_S,getSyntacticModifierFlagsNoCache:()=>hce,getSynthesizedDeepClone:()=>Ec,getSynthesizedDeepCloneWithReplacements:()=>Sj,getSynthesizedDeepClones:()=>vD,getSynthesizedDeepClonesWithReplacements:()=>she,getSyntheticLeadingComments:()=>y3,getSyntheticTrailingComments:()=>cH,getTargetLabel:()=>pZ,getTargetOfBindingOrAssignmentElement:()=>px,getTemporaryModuleResolutionState:()=>W7,getTextOfConstantValue:()=>Z2e,getTextOfIdentifierOrLiteral:()=>Lg,getTextOfJSDocComment:()=>RW,getTextOfJsxAttributeName:()=>iH,getTextOfJsxNamespacedName:()=>d7,getTextOfNode:()=>uu,getTextOfNodeFromSourceText:()=>T8,getTextOfPropertyName:()=>lP,getThisContainer:()=>Hh,getThisParameter:()=>$T,getTokenAtPosition:()=>Rs,getTokenPosOfNode:()=>ex,getTokenSourceMapRange:()=>wQe,getTouchingPropertyName:()=>R_,getTouchingToken:()=>Q3,getTrailingCommentRanges:()=>qw,getTrailingSemicolonDeferringWriter:()=>oce,getTransformers:()=>mLe,getTsBuildInfoEmitOutputFilePath:()=>h2,getTsConfigObjectLiteralExpression:()=>I8,getTsConfigPropArrayElementValue:()=>UG,getTypeAnnotationNode:()=>ZTe,getTypeArgumentOrTypeParameterList:()=>cAe,getTypeKeywordOfTypeOnlyImport:()=>Kfe,getTypeNode:()=>bEe,getTypeNodeIfAccessible:()=>p5,getTypeParameterFromJsDoc:()=>OTe,getTypeParameterOwner:()=>yXe,getTypesPackageName:()=>uQ,getUILocale:()=>hxe,getUniqueName:()=>$I,getUniqueSymbolId:()=>xAe,getUseDefineForClassFields:()=>GV,getWatchErrorSummaryDiagnosticMessage:()=>Mde,getWatchFactory:()=>ade,group:()=>qs,groupBy:()=>ra,guessIndentation:()=>W2e,handleNoEmitOptions:()=>Sde,handleWatchOptionsConfigDirTemplateSubstitution:()=>QX,hasAbstractModifier:()=>KT,hasAccessorModifier:()=>O1,hasAmbientModifier:()=>fce,hasChangesInResolutions:()=>pae,hasContextSensitiveParameters:()=>eX,hasDecorators:()=>lm,hasDocComment:()=>oAe,hasDynamicName:()=>Jb,hasEffectiveModifier:()=>xp,hasEffectiveModifiers:()=>dce,hasEffectiveReadonlyModifier:()=>z8,hasExtension:()=>N6,hasImplementationTSFileExtension:()=>WDe,hasIndexSignature:()=>ahe,hasInferredType:()=>aEe,hasInitializer:()=>aS,hasInvalidEscape:()=>rce,hasJSDocNodes:()=>jp,hasJSDocParameterTags:()=>f2e,hasJSFileExtension:()=>Uv,hasJsonModuleEmitEnabled:()=>RK,hasOnlyExpressionInitializer:()=>hI,hasOverrideModifier:()=>bK,hasPossibleExternalModuleReference:()=>nTe,hasProperty:()=>Li,hasPropertyAccessExpressionWithName:()=>lj,hasQuestionToken:()=>_P,hasRecordedExternalHelpers:()=>oIe,hasResolutionModeOverride:()=>nEe,hasRestParameter:()=>uae,hasScopeMarker:()=>L2e,hasStaticModifier:()=>bd,hasSyntacticModifier:()=>Zr,hasSyntacticModifiers:()=>iDe,hasTSFileExtension:()=>IP,hasTabstop:()=>eEe,hasTrailingDirectorySeparator:()=>Uw,hasType:()=>wG,hasTypeArguments:()=>$Xe,hasZeroOrOneAsteriskCharacter:()=>Ace,hostGetCanonicalFileName:()=>hS,hostUsesCaseSensitiveFileNames:()=>yP,idText:()=>Fr,identifierIsThisKeyword:()=>uce,identifierToKeywordKind:()=>aI,identity:()=>hl,identitySourceMapConsumer:()=>Bue,ignoreSourceNewlines:()=>ole,ignoredPaths:()=>XJ,importFromModuleSpecifier:()=>O8,importSyntaxAffectsModuleResolution:()=>Lce,indexOfAnyCharCode:()=>Bi,indexOfNode:()=>U6,indicesOf:()=>Nk,inferredTypesContainingFile:()=>Z7,injectClassNamedEvaluationHelperBlockIfMissing:()=>xQ,injectClassThisAssignmentIfMissing:()=>jNe,insertImports:()=>Gfe,insertSorted:()=>rm,insertStatementAfterCustomPrologue:()=>_I,insertStatementAfterStandardPrologue:()=>WXe,insertStatementsAfterCustomPrologue:()=>mae,insertStatementsAfterStandardPrologue:()=>Fv,intersperse:()=>ye,intrinsicTagNameToString:()=>Qce,introducesArgumentsExoticObject:()=>gTe,inverseJsxOptionMap:()=>DH,isAbstractConstructorSymbol:()=>vDe,isAbstractModifier:()=>PEe,isAccessExpression:()=>Sl,isAccessibilityModifier:()=>Rfe,isAccessor:()=>Qw,isAccessorModifier:()=>OEe,isAliasableExpression:()=>sK,isAmbientModule:()=>Vh,isAmbientPropertyDeclaration:()=>Tae,isAnyDirectorySeparator:()=>Ioe,isAnyImportOrBareOrAccessedRequire:()=>tTe,isAnyImportOrReExport:()=>ZW,isAnyImportOrRequireStatement:()=>iTe,isAnyImportSyntax:()=>cP,isAnySupportedFileExtension:()=>pQe,isApplicableVersionedTypesKey:()=>RH,isArgumentExpressionOfElementAccess:()=>xfe,isArray:()=>Ao,isArrayBindingElement:()=>gG,isArrayBindingOrAssignmentElement:()=>jW,isArrayBindingOrAssignmentPattern:()=>rae,isArrayBindingPattern:()=>CS,isArrayLiteralExpression:()=>jf,isArrayLiteralOrObjectLiteralDestructuringPattern:()=>TS,isArrayTypeNode:()=>hH,isArrowFunction:()=>xl,isAsExpression:()=>v7,isAssertClause:()=>VEe,isAssertEntry:()=>OQe,isAssertionExpression:()=>Hk,isAssertsKeyword:()=>NEe,isAssignmentDeclaration:()=>P8,isAssignmentExpression:()=>lf,isAssignmentOperator:()=>Gb,isAssignmentPattern:()=>S8,isAssignmentTarget:()=>fS,isAsteriskToken:()=>uH,isAsyncFunction:()=>W8,isAsyncModifier:()=>m7,isAutoAccessorPropertyDeclaration:()=>I_,isAwaitExpression:()=>hx,isAwaitKeyword:()=>dle,isBigIntLiteral:()=>p7,isBinaryExpression:()=>ur,isBinaryLogicalOperator:()=>BV,isBinaryOperatorToken:()=>_Ie,isBindableObjectDefinePropertyCall:()=>vI,isBindableStaticAccessExpression:()=>jT,isBindableStaticElementAccessExpression:()=>iK,isBindableStaticNameExpression:()=>bI,isBindingElement:()=>ec,isBindingElementOfBareOrAccessedRequire:()=>DTe,isBindingName:()=>dI,isBindingOrAssignmentElement:()=>D2e,isBindingOrAssignmentPattern:()=>VW,isBindingPattern:()=>ta,isBlock:()=>Xo,isBlockLike:()=>hA,isBlockOrCatchScoped:()=>bae,isBlockScope:()=>Dae,isBlockScopedContainerTopLevel:()=>eTe,isBooleanLiteral:()=>C8,isBreakOrContinueStatement:()=>m8,isBreakStatement:()=>LQe,isBuild:()=>wPe,isBuildInfoFile:()=>gLe,isBuilderProgram:()=>Fde,isBundle:()=>UEe,isCallChain:()=>cI,isCallExpression:()=>la,isCallExpressionTarget:()=>yfe,isCallLikeExpression:()=>MT,isCallLikeOrFunctionLikeExpression:()=>sae,isCallOrNewExpression:()=>T1,isCallOrNewExpressionTarget:()=>vfe,isCallSignatureDeclaration:()=>VP,isCallToHelper:()=>_7,isCaseBlock:()=>w7,isCaseClause:()=>x3,isCaseKeyword:()=>MEe,isCaseOrDefaultClause:()=>CG,isCatchClause:()=>lD,isCatchClauseVariableDeclaration:()=>YDe,isCatchClauseVariableDeclarationOrBindingElement:()=>Cae,isCheckJsEnabledForFile:()=>n7,isCircularBuildOrder:()=>cA,isClassDeclaration:()=>hd,isClassElement:()=>Od,isClassExpression:()=>fd,isClassInstanceProperty:()=>k2e,isClassLike:()=>ss,isClassMemberModifier:()=>tae,isClassNamedEvaluationHelperBlock:()=>sA,isClassOrTypeElement:()=>mG,isClassStaticBlockDeclaration:()=>gu,isClassThisAssignmentBlock:()=>$7,isColonToken:()=>EEe,isCommaExpression:()=>vH,isCommaListExpression:()=>C7,isCommaSequence:()=>I7,isCommaToken:()=>DEe,isComment:()=>kZ,isCommonJsExportPropertyAssignment:()=>jG,isCommonJsExportedExpression:()=>pTe,isCompoundAssignment:()=>z7,isComputedNonLiteralName:()=>YW,isComputedPropertyName:()=>Ka,isConciseBody:()=>vG,isConditionalExpression:()=>qP,isConditionalTypeNode:()=>iD,isConstAssertion:()=>Zce,isConstTypeReference:()=>O0,isConstructSignatureDeclaration:()=>fH,isConstructorDeclaration:()=>iu,isConstructorTypeNode:()=>v3,isContextualKeyword:()=>aK,isContinueStatement:()=>NQe,isCustomPrologue:()=>rV,isDebuggerStatement:()=>PQe,isDeclaration:()=>Wf,isDeclarationBindingElement:()=>WW,isDeclarationFileName:()=>df,isDeclarationName:()=>Wy,isDeclarationNameOfEnumOrNamespace:()=>Sce,isDeclarationReadonly:()=>tV,isDeclarationStatement:()=>M2e,isDeclarationWithTypeParameterChildren:()=>Iae,isDeclarationWithTypeParameters:()=>Eae,isDecorator:()=>Fd,isDecoratorTarget:()=>KPe,isDefaultClause:()=>k7,isDefaultImport:()=>hP,isDefaultModifier:()=>yX,isDefaultedExpandoInitializer:()=>ETe,isDeleteExpression:()=>FEe,isDeleteTarget:()=>$ae,isDeprecatedDeclaration:()=>UZ,isDestructuringAssignment:()=>pS,isDiskPathRoot:()=>Noe,isDoStatement:()=>IQe,isDocumentRegistryEntry:()=>Aj,isDotDotDotToken:()=>mX,isDottedName:()=>VV,isDynamicName:()=>lK,isEffectiveExternalModule:()=>aP,isEffectiveStrictModeSourceFile:()=>kae,isElementAccessChain:()=>Koe,isElementAccessExpression:()=>wl,isEmittedFileOfProgram:()=>xLe,isEmptyArrayLiteral:()=>uDe,isEmptyBindingElement:()=>s2e,isEmptyBindingPattern:()=>r2e,isEmptyObjectLiteral:()=>yce,isEmptyStatement:()=>mle,isEmptyStringLiteral:()=>Rae,isEntityName:()=>E_,isEntityNameExpression:()=>pl,isEnumConst:()=>Uk,isEnumDeclaration:()=>sD,isEnumMember:()=>SS,isEqualityOperatorKind:()=>FZ,isEqualsGreaterThanToken:()=>IEe,isExclamationToken:()=>dH,isExcludedFile:()=>qIe,isExclusivelyTypeOnlyImportOrExport:()=>_de,isExpandoPropertyDeclaration:()=>PP,isExportAssignment:()=>Il,isExportDeclaration:()=>Ju,isExportModifier:()=>BP,isExportName:()=>AX,isExportNamespaceAsDefaultDeclaration:()=>OG,isExportOrDefaultModifier:()=>SH,isExportSpecifier:()=>vh,isExportsIdentifier:()=>yI,isExportsOrModuleExportsOrAlias:()=>dD,isExpression:()=>jt,isExpressionNode:()=>F0,isExpressionOfExternalModuleImportEqualsDeclaration:()=>ZPe,isExpressionOfOptionalChainRoot:()=>fG,isExpressionStatement:()=>uf,isExpressionWithTypeArguments:()=>Yb,isExpressionWithTypeArgumentsInClassExtendsClause:()=>SK,isExternalModule:()=>wd,isExternalModuleAugmentation:()=>BT,isExternalModuleImportEqualsDeclaration:()=>qk,isExternalModuleIndicator:()=>UW,isExternalModuleNameRelative:()=>Gd,isExternalModuleReference:()=>eC,isExternalModuleSymbol:()=>H6,isExternalOrCommonJsModule:()=>Cp,isFileLevelReservedGeneratedIdentifier:()=>BW,isFileLevelUniqueName:()=>PG,isFileProbablyExternalModule:()=>kH,isFirstDeclarationOfSymbolParameter:()=>ehe,isFixablePromiseHandler:()=>Ahe,isForInOrOfStatement:()=>fI,isForInStatement:()=>xX,isForInitializer:()=>Hm,isForOfStatement:()=>_H,isForStatement:()=>s2,isFullSourceFile:()=>Fy,isFunctionBlock:()=>WT,isFunctionBody:()=>aae,isFunctionDeclaration:()=>Wu,isFunctionExpression:()=>ml,isFunctionExpressionOrArrowFunction:()=>lx,isFunctionLike:()=>Ho,isFunctionLikeDeclaration:()=>Qc,isFunctionLikeKind:()=>tP,isFunctionLikeOrClassStaticBlockDeclaration:()=>B6,isFunctionOrConstructorTypeNode:()=>T2e,isFunctionOrModuleBlock:()=>iae,isFunctionSymbol:()=>LTe,isFunctionTypeNode:()=>Hy,isGeneratedIdentifier:()=>zl,isGeneratedPrivateIdentifier:()=>uI,isGetAccessor:()=>oS,isGetAccessorDeclaration:()=>um,isGetOrSetAccessorDeclaration:()=>FW,isGlobalScopeAugmentation:()=>Ry,isGlobalSourceFile:()=>cS,isGrammarError:()=>J2e,isHeritageClause:()=>Tp,isHoistedFunction:()=>VG,isHoistedVariableStatement:()=>HG,isIdentifier:()=>ot,isIdentifierANonContextualKeyword:()=>Qae,isIdentifierName:()=>WTe,isIdentifierOrThisTypeNode:()=>uIe,isIdentifierPart:()=>jb,isIdentifierStart:()=>Py,isIdentifierText:()=>J_,isIdentifierTypePredicate:()=>yTe,isIdentifierTypeReference:()=>GDe,isIfStatement:()=>r2,isIgnoredFileFromWildCardWatching:()=>KH,isImplicitGlob:()=>Rce,isImportAttribute:()=>HEe,isImportAttributeName:()=>x2e,isImportAttributes:()=>LI,isImportCall:()=>zp,isImportClause:()=>H0,isImportDeclaration:()=>du,isImportEqualsDeclaration:()=>Wd,isImportKeyword:()=>y7,isImportMeta:()=>J6,isImportOrExportSpecifier:()=>Vk,isImportOrExportSpecifierName:()=>wAe,isImportSpecifier:()=>l_,isImportTypeAssertionContainer:()=>AQe,isImportTypeNode:()=>V1,isImportableFile:()=>Che,isInComment:()=>kS,isInCompoundLikeAssignment:()=>qae,isInExpressionContext:()=>XG,isInJSDoc:()=>dV,isInJSFile:()=>nr,isInJSXText:()=>sAe,isInJsonFile:()=>ZG,isInNonReferenceComment:()=>dAe,isInReferenceComment:()=>uAe,isInRightSideOfInternalImportEqualsDeclaration:()=>hZ,isInString:()=>lA,isInTemplateString:()=>Pfe,isInTopLevelContext:()=>JG,isInTypeQuery:()=>vP,isIncrementalBuildInfo:()=>tj,isIncrementalBundleEmitBuildInfo:()=>zLe,isIncrementalCompilation:()=>QT,isIndexSignatureDeclaration:()=>eD,isIndexedAccessTypeNode:()=>nD,isInferTypeNode:()=>DI,isInfinityOrNaNString:()=>c7,isInitializedProperty:()=>HH,isInitializedVariable:()=>UV,isInsideJsxElement:()=>wZ,isInsideJsxElementOrAttribute:()=>rAe,isInsideNodeModules:()=>Dj,isInsideTemplateLiteral:()=>pj,isInstanceOfExpression:()=>wK,isInstantiatedModule:()=>Pue,isInterfaceDeclaration:()=>zf,isInternalDeclaration:()=>V2e,isInternalModuleImportEqualsDeclaration:()=>gI,isInternalName:()=>Ple,isIntersectionTypeNode:()=>zP,isIntrinsicJsxName:()=>s3,isIterationStatement:()=>Zw,isJSDoc:()=>z0,isJSDocAllType:()=>JEe,isJSDocAugmentsTag:()=>KP,isJSDocAuthorTag:()=>BQe,isJSDocCallbackTag:()=>ble,isJSDocClassTag:()=>KEe,isJSDocCommentContainingNode:()=>SG,isJSDocConstructSignature:()=>e3,isJSDocDeprecatedTag:()=>kle,isJSDocEnumTag:()=>mH,isJSDocFunctionType:()=>T3,isJSDocImplementsTag:()=>NX,isJSDocImportTag:()=>q1,isJSDocIndexSignature:()=>eK,isJSDocLikeText:()=>Hle,isJSDocLink:()=>qEe,isJSDocLinkCode:()=>$Ee,isJSDocLinkLike:()=>rP,isJSDocLinkPlain:()=>RQe,isJSDocMemberName:()=>a2,isJSDocNameReference:()=>T7,isJSDocNamepathType:()=>FQe,isJSDocNamespaceBody:()=>PXe,isJSDocNode:()=>W6,isJSDocNonNullableType:()=>TX,isJSDocNullableType:()=>k3,isJSDocOptionalParameter:()=>nX,isJSDocOptionalType:()=>vle,isJSDocOverloadTag:()=>D3,isJSDocOverrideTag:()=>EX,isJSDocParameterTag:()=>Qm,isJSDocPrivateTag:()=>Sle,isJSDocPropertyLikeTag:()=>g8,isJSDocPropertyTag:()=>XEe,isJSDocProtectedTag:()=>wle,isJSDocPublicTag:()=>Cle,isJSDocReadonlyTag:()=>xle,isJSDocReturnTag:()=>IX,isJSDocSatisfiesExpression:()=>Kce,isJSDocSatisfiesTag:()=>LX,isJSDocSeeTag:()=>WQe,isJSDocSignature:()=>tC,isJSDocTag:()=>V6,isJSDocTemplateTag:()=>Rg,isJSDocThisTag:()=>Tle,isJSDocThrowsTag:()=>HQe,isJSDocTypeAlias:()=>Ng,isJSDocTypeAssertion:()=>FI,isJSDocTypeExpression:()=>o2,isJSDocTypeLiteral:()=>OI,isJSDocTypeTag:()=>D7,isJSDocTypedefTag:()=>MI,isJSDocUnknownTag:()=>VQe,isJSDocUnknownType:()=>GEe,isJSDocVariadicType:()=>DX,isJSXTagName:()=>X6,isJsonEqual:()=>ZK,isJsonSourceFile:()=>Eg,isJsxAttribute:()=>U1,isJsxAttributeLike:()=>bG,isJsxAttributeName:()=>iEe,isJsxAttributes:()=>cD,isJsxChild:()=>JW,isJsxClosingElement:()=>oD,isJsxClosingFragment:()=>zEe,isJsxElement:()=>Gv,isJsxExpression:()=>x7,isJsxFragment:()=>aD,isJsxNamespacedName:()=>j0,isJsxOpeningElement:()=>z1,isJsxOpeningFragment:()=>AI,isJsxOpeningLikeElement:()=>oh,isJsxOpeningLikeElementTagName:()=>XPe,isJsxSelfClosingElement:()=>PI,isJsxSpreadAttribute:()=>GP,isJsxTagNameExpression:()=>w8,isJsxText:()=>RP,isJumpStatementTarget:()=>uj,isKeyword:()=>P_,isKeywordOrPunctuation:()=>oK,isKnownSymbol:()=>LV,isLabelName:()=>Sfe,isLabelOfLabeledStatement:()=>Cfe,isLabeledStatement:()=>_x,isLateVisibilityPaintedStatement:()=>RG,isLeftHandSideExpression:()=>N_,isLet:()=>WG,isLineBreak:()=>mh,isLiteralComputedPropertyDeclarationName:()=>DV,isLiteralExpression:()=>lI,isLiteralExpressionOfObject:()=>Yoe,isLiteralImportTypeNode:()=>lS,isLiteralKind:()=>y8,isLiteralNameOfPropertyDeclarationOrIndexAccess:()=>mZ,isLiteralTypeLiteral:()=>N2e,isLiteralTypeNode:()=>bS,isLocalName:()=>iC,isLogicalOperator:()=>aDe,isLogicalOrCoalescingAssignmentExpression:()=>_ce,isLogicalOrCoalescingAssignmentOperator:()=>U8,isLogicalOrCoalescingBinaryExpression:()=>WV,isLogicalOrCoalescingBinaryOperator:()=>CK,isMappedTypeNode:()=>II,isMemberName:()=>Mv,isMetaProperty:()=>b7,isMethodDeclaration:()=>Nu,isMethodOrAccessor:()=>iP,isMethodSignature:()=>W1,isMinusToken:()=>ule,isMissingDeclaration:()=>MQe,isMissingPackageJsonInfo:()=>nNe,isModifier:()=>Fa,isModifierKind:()=>Xw,isModifierLike:()=>Ul,isModuleAugmentationExternal:()=>wae,isModuleBlock:()=>H1,isModuleBody:()=>P2e,isModuleDeclaration:()=>rd,isModuleExportName:()=>kX,isModuleExportsAccessExpression:()=>Wv,isModuleIdentifier:()=>Wae,isModuleName:()=>hIe,isModuleOrEnumDeclaration:()=>qW,isModuleReference:()=>F2e,isModuleSpecifierLike:()=>LZ,isModuleWithStringLiteralName:()=>MG,isNameOfFunctionDeclaration:()=>Tfe,isNameOfModuleDeclaration:()=>kfe,isNamedDeclaration:()=>Bf,isNamedEvaluation:()=>Sp,isNamedEvaluationSource:()=>Zae,isNamedExportBindings:()=>Qoe,isNamedExports:()=>Xm,isNamedImportBindings:()=>cae,isNamedImports:()=>j1,isNamedImportsOrExports:()=>NK,isNamedTupleMember:()=>b3,isNamespaceBody:()=>LXe,isNamespaceExport:()=>jy,isNamespaceExportDeclaration:()=>pH,isNamespaceImport:()=>Jv,isNamespaceReexportDeclaration:()=>TTe,isNewExpression:()=>rD,isNewExpressionTarget:()=>r5,isNoSubstitutionTemplateLiteral:()=>TI,isNodeArray:()=>AT,isNodeArrayMultiLine:()=>mDe,isNodeDescendantOf:()=>UT,isNodeKind:()=>_G,isNodeLikeSystem:()=>soe,isNodeModulesDirectory:()=>eG,isNodeWithPossibleHoistedDeclaration:()=>FTe,isNonContextualKeyword:()=>Xae,isNonGlobalAmbientModule:()=>Sae,isNonNullAccess:()=>tEe,isNonNullChain:()=>hG,isNonNullExpression:()=>$P,isNonStaticMethodOrAccessorWithPrivateName:()=>MNe,isNotEmittedStatement:()=>jEe,isNullishCoalesce:()=>Xoe,isNumber:()=>Ww,isNumericLiteral:()=>A_,isNumericLiteralName:()=>$v,isObjectBindingElementWithoutPropertyName:()=>vj,isObjectBindingOrAssignmentElement:()=>HW,isObjectBindingOrAssignmentPattern:()=>nae,isObjectBindingPattern:()=>dm,isObjectLiteralElement:()=>lae,isObjectLiteralElementLike:()=>Ub,isObjectLiteralExpression:()=>Aa,isObjectLiteralMethod:()=>Ig,isObjectLiteralOrClassExpressionMethodOrAccessor:()=>zG,isObjectTypeDeclaration:()=>xP,isOmittedExpression:()=>Bd,isOptionalChain:()=>gh,isOptionalChainRoot:()=>_8,isOptionalDeclaration:()=>g3,isOptionalJSDocPropertyLikeTag:()=>tH,isOptionalTypeNode:()=>vX,isOuterExpression:()=>OX,isOutermostOptionalChain:()=>p8,isOverrideModifier:()=>AEe,isPackageJsonInfo:()=>rQ,isPackedArrayLiteral:()=>Jce,isParameter:()=>$s,isParameterPropertyDeclaration:()=>vp,isParameterPropertyModifier:()=>b8,isParenthesizedExpression:()=>c_,isParenthesizedTypeNode:()=>EI,isParseTreeNode:()=>h8,isPartOfParameterDeclaration:()=>Qk,isPartOfTypeNode:()=>N1,isPartOfTypeQuery:()=>QG,isPartiallyEmittedExpression:()=>ple,isPatternMatch:()=>HJ,isPinnedComment:()=>AG,isPlainJsFile:()=>k8,isPlusToken:()=>lle,isPossiblyTypeArgumentPosition:()=>_j,isPostfixUnaryExpression:()=>_le,isPrefixUnaryExpression:()=>n2,isPrimitiveLiteralValue:()=>oX,isPrivateIdentifier:()=>Vs,isPrivateIdentifierClassElementDeclaration:()=>Wh,isPrivateIdentifierPropertyAccessExpression:()=>F6,isPrivateIdentifierSymbol:()=>jTe,isProgramUptoDate:()=>bde,isPrologueDirective:()=>I1,isPropertyAccessChain:()=>dG,isPropertyAccessEntityNameExpression:()=>HV,isPropertyAccessExpression:()=>Nr,isPropertyAccessOrQualifiedName:()=>zW,isPropertyAccessOrQualifiedNameOrImportTypeNode:()=>E2e,isPropertyAssignment:()=>_d,isPropertyDeclaration:()=>Lo,isPropertyName:()=>id,isPropertyNameLiteral:()=>P1,isPropertySignature:()=>O_,isPrototypeAccess:()=>rx,isPrototypePropertyAssignment:()=>vV,isPunctuation:()=>Kae,isPushOrUnshiftIdentifier:()=>Yae,isQualifiedName:()=>o_,isQuestionDotToken:()=>gX,isQuestionOrExclamationToken:()=>lIe,isQuestionOrPlusOrMinusToken:()=>fIe,isQuestionToken:()=>dx,isReadonlyKeyword:()=>LEe,isReadonlyKeywordOrPlusOrMinusToken:()=>dIe,isRecognizedTripleSlashComment:()=>gae,isReferenceFileLocation:()=>U3,isReferencedFile:()=>_2,isRegularExpressionLiteral:()=>ale,isRequireCall:()=>L_,isRequireVariableStatement:()=>hV,isRestParameter:()=>Oy,isRestTypeNode:()=>bX,isReturnStatement:()=>Og,isReturnStatementWithFixablePromiseHandler:()=>ZZ,isRightSideOfAccessExpression:()=>gce,isRightSideOfInstanceofExpression:()=>lDe,isRightSideOfPropertyAccess:()=>K3,isRightSideOfQualifiedName:()=>QPe,isRightSideOfQualifiedNameOrPropertyAccess:()=>q8,isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName:()=>cDe,isRootedDiskPath:()=>yp,isSameEntityName:()=>Q6,isSatisfiesExpression:()=>wX,isSemicolonClassElement:()=>BEe,isSetAccessor:()=>D1,isSetAccessorDeclaration:()=>kp,isShiftOperatorOrHigher:()=>Ble,isShorthandAmbientModuleSymbol:()=>QW,isShorthandPropertyAssignment:()=>lh,isSideEffectImport:()=>ele,isSignedNumericLiteral:()=>cK,isSimpleCopiableExpression:()=>fD,isSimpleInlineableExpression:()=>Uy,isSimpleParameterList:()=>jH,isSingleOrDoubleQuote:()=>_V,isSourceElement:()=>rEe,isSourceFile:()=>Os,isSourceFileFromLibrary:()=>rO,isSourceFileJS:()=>r_,isSourceFileNotJson:()=>YG,isSourceMapping:()=>PNe,isSpecialPropertyDeclaration:()=>NTe,isSpreadAssignment:()=>Kv,isSpreadElement:()=>Km,isStatement:()=>Ps,isStatementButNotDeclaration:()=>$W,isStatementOrBlock:()=>R2e,isStatementWithLocals:()=>$2e,isStatic:()=>pa,isStaticModifier:()=>WP,isString:()=>Oo,isStringANonContextualKeyword:()=>gP,isStringAndEmptyAnonymousObjectIntersection:()=>lAe,isStringDoubleQuoted:()=>tK,isStringLiteral:()=>Ha,isStringLiteralLike:()=>Bc,isStringLiteralOrJsxExpression:()=>B2e,isStringLiteralOrTemplate:()=>IAe,isStringOrNumericLiteralLike:()=>cm,isStringOrRegularExpressionOrTemplateLiteral:()=>Mfe,isStringTextContainingNode:()=>eae,isSuperCall:()=>mI,isSuperKeyword:()=>g7,isSuperProperty:()=>G_,isSupportedSourceFileName:()=>jDe,isSwitchStatement:()=>S7,isSyntaxList:()=>E3,isSyntheticExpression:()=>EQe,isSyntheticReference:()=>JP,isTagName:()=>wfe,isTaggedTemplateExpression:()=>i2,isTaggedTemplateTag:()=>GPe,isTemplateExpression:()=>CX,isTemplateHead:()=>FP,isTemplateLiteral:()=>nP,isTemplateLiteralKind:()=>Gw,isTemplateLiteralToken:()=>S2e,isTemplateLiteralTypeNode:()=>REe,isTemplateLiteralTypeSpan:()=>fle,isTemplateMiddle:()=>cle,isTemplateMiddleOrTemplateTail:()=>pG,isTemplateSpan:()=>w3,isTemplateTail:()=>pX,isTextWhiteSpaceLike:()=>pAe,isThis:()=>X3,isThisContainerOrFunctionBlock:()=>wTe,isThisIdentifier:()=>ix,isThisInTypeQuery:()=>GT,isThisInitializedDeclaration:()=>GG,isThisInitializedObjectBindingExpression:()=>kTe,isThisProperty:()=>aV,isThisTypeNode:()=>C3,isThisTypeParameter:()=>l7,isThisTypePredicate:()=>vTe,isThrowStatement:()=>yle,isToken:()=>eP,isTokenKind:()=>Zoe,isTraceEnabled:()=>mx,isTransientSymbol:()=>Rv,isTrivia:()=>n3,isTryStatement:()=>NI,isTupleTypeNode:()=>jP,isTypeAlias:()=>SV,isTypeAliasDeclaration:()=>Mg,isTypeAssertionExpression:()=>hle,isTypeDeclaration:()=>NP,isTypeElement:()=>OT,isTypeKeyword:()=>c5,isTypeKeywordTokenOrIdentifier:()=>EZ,isTypeLiteralNode:()=>a_,isTypeNode:()=>ws,isTypeNodeKind:()=>Tce,isTypeOfExpression:()=>S3,isTypeOnlyExportDeclaration:()=>w2e,isTypeOnlyImportDeclaration:()=>v8,isTypeOnlyImportOrExportDeclaration:()=>Kw,isTypeOperatorNode:()=>t2,isTypeParameterDeclaration:()=>$l,isTypePredicateNode:()=>HP,isTypeQueryNode:()=>tD,isTypeReferenceNode:()=>qp,isTypeReferenceType:()=>xG,isTypeUsableAsPropertyName:()=>Jm,isUMDExportSymbol:()=>IK,isUnaryExpression:()=>oae,isUnaryExpressionWithWrite:()=>I2e,isUnicodeIdentifierStart:()=>iG,isUnionTypeNode:()=>fx,isUrl:()=>Bke,isValidBigIntString:()=>YK,isValidESSymbolDeclaration:()=>mTe,isValidTypeOnlyAliasUseSite:()=>Yk,isValueSignatureDeclaration:()=>mP,isVarAwaitUsing:()=>iV,isVarConst:()=>$6,isVarConstLike:()=>dTe,isVarUsing:()=>nV,isVariableDeclaration:()=>_s,isVariableDeclarationInVariableStatement:()=>E8,isVariableDeclarationInitializedToBareOrAccessedRequire:()=>HT,isVariableDeclarationInitializedToRequire:()=>fV,isVariableDeclarationList:()=>Sf,isVariableLike:()=>uP,isVariableLikeOrAccessor:()=>_Te,isVariableStatement:()=>Lu,isVoidExpression:()=>UP,isWatchSet:()=>wce,isWhileStatement:()=>gle,isWhiteSpaceLike:()=>Pv,isWhiteSpaceSingleLine:()=>k1,isWithStatement:()=>WEe,isWriteAccess:()=>wP,isWriteOnlyAccess:()=>EK,isYieldExpression:()=>SX,jsxModeNeedsExplicitImport:()=>yhe,keywordPart:()=>Np,last:()=>va,lastOrUndefined:()=>rl,length:()=>P,libMap:()=>Jle,libs:()=>HX,lineBreakPart:()=>tO,loadModuleFromGlobalCache:()=>pNe,loadWithModeAwareCache:()=>QH,makeIdentifierFromModuleName:()=>Y2e,makeImport:()=>Sx,makeStringLiteral:()=>l5,mangleScopedPackageName:()=>B3,map:()=>qt,mapAllOrFail:()=>jl,mapDefined:()=>es,mapDefinedIterator:()=>ld,mapEntries:()=>Nv,mapIterator:()=>ms,mapOneOrMany:()=>_he,mapToDisplayParts:()=>m2,matchFiles:()=>Fce,matchPatternOrExact:()=>Hce,matchedText:()=>yxe,matchesExclude:()=>eQ,maxBy:()=>Qse,maybeBind:()=>to,maybeSetLocalizedDiagnosticMessages:()=>kDe,memoize:()=>Bh,memoizeOne:()=>x1,min:()=>Zse,minAndMax:()=>qDe,missingFileModifiedTime:()=>gp,modifierToFlag:()=>CP,modifiersToFlags:()=>M1,moduleExportNameIsDefault:()=>My,moduleExportNameTextEscaped:()=>FT,moduleExportNameTextUnescaped:()=>tx,moduleOptionDeclaration:()=>kIe,moduleResolutionIsEqualTo:()=>U2e,moduleResolutionNameAndModeGetter:()=>OQ,moduleResolutionOptionDeclarations:()=>Kle,moduleResolutionSupportsPackageJsonExportsAndImports:()=>f3,moduleResolutionUsesNodeModules:()=>IZ,moduleSpecifierToValidIdentifier:()=>Ij,moduleSpecifiers:()=>wS,moduleSymbolToValidIdentifier:()=>Ej,moveEmitHelpers:()=>yEe,moveRangeEnd:()=>TK,moveRangePastDecorators:()=>Kb,moveRangePastModifiers:()=>R1,moveRangePos:()=>Zk,moveSyntheticComments:()=>pEe,mutateMap:()=>Q8,mutateMapSkippingNewValues:()=>Hv,needsParentheses:()=>MZ,needsScopeMarker:()=>yG,newCaseClauseTracker:()=>JZ,newPrivateEnvironment:()=>FNe,noEmitNotification:()=>qH,noEmitSubstitution:()=>G7,noTransformers:()=>pLe,noTruncationMaximumTruncationLength:()=>fae,nodeCanBeDecorated:()=>lV,nodeHasName:()=>OW,nodeIsDecorated:()=>K6,nodeIsMissing:()=>lu,nodeIsPresent:()=>Dg,nodeIsSynthesized:()=>cl,nodeModuleNameResolver:()=>cNe,nodeModulesPathPart:()=>Xv,nodeNextJsonConfigResolver:()=>lNe,nodeOrChildIsDecorated:()=>uV,nodeOverlapsWithStartEnd:()=>gZ,nodePosToString:()=>MXe,nodeSeenTracker:()=>Z3,nodeStartsNewLexicalEnvironment:()=>ece,noop:()=>Tc,noopFileWatcher:()=>t5,normalizePath:()=>ca,normalizeSlashes:()=>Rf,normalizeSpans:()=>Hoe,not:()=>zJ,notImplemented:()=>wa,notImplementedResolver:()=>bLe,nullNodeConverters:()=>fEe,nullParenthesizerRules:()=>uEe,nullTransformationContext:()=>JH,objectAllocator:()=>Hf,operatorPart:()=>d5,optionDeclarations:()=>U0,optionMapToObject:()=>GX,optionsAffectingProgramStructure:()=>NIe,optionsForBuild:()=>Qle,optionsForWatch:()=>eA,optionsHaveChanges:()=>j6,or:()=>om,orderedRemoveItem:()=>GR,orderedRemoveItemAt:()=>zw,packageIdToPackageName:()=>NG,packageIdToString:()=>zk,parameterIsThisKeyword:()=>JT,parameterNamePart:()=>gAe,parseBaseNodeFactory:()=>vIe,parseBigInt:()=>JDe,parseBuildCommand:()=>BIe,parseCommandLine:()=>RIe,parseCommandLineWorker:()=>Yle,parseConfigFileTextToJson:()=>tue,parseConfigFileWithSystem:()=>nPe,parseConfigHostFromCompilerHostLike:()=>HQ,parseCustomTypeOption:()=>qX,parseIsolatedEntityName:()=>YP,parseIsolatedJSDocComment:()=>CIe,parseJSDocTypeExpressionForTests:()=>dZe,parseJsonConfigFileContent:()=>VZe,parseJsonSourceFileConfigFileContent:()=>PH,parseJsonText:()=>TH,parseListTypeOption:()=>OIe,parseNodeFactory:()=>l2,parseNodeModuleFromPath:()=>MH,parsePackageName:()=>cQ,parsePseudoBigInt:()=>s7,parseValidBigInt:()=>qce,pasteEdits:()=>_pe,patchWriteFileEnsuringDirectory:()=>Fke,pathContainsNodeModules:()=>yx,pathIsAbsolute:()=>r8,pathIsBareSpecifier:()=>Loe,pathIsRelative:()=>am,patternText:()=>gxe,performIncrementalCompilation:()=>rPe,performance:()=>Txe,positionBelongsToNode:()=>Efe,positionIsASICandidate:()=>BZ,positionIsSynthesized:()=>W0,positionsAreOnSameLine:()=>qm,preProcessFile:()=>tnt,probablyUsesSemicolons:()=>kj,processCommentPragmas:()=>qle,processPragmasIntoFields:()=>$le,processTaggedTemplateExpression:()=>$ue,programContainsEsModules:()=>hAe,programContainsModules:()=>fAe,projectReferenceIsEqualTo:()=>hae,propertyNamePart:()=>yAe,pseudoBigIntToString:()=>ZT,punctuationPart:()=>Sh,pushIfUnique:()=>mu,quote:()=>_5,quotePreferenceFromString:()=>qfe,rangeContainsPosition:()=>s5,rangeContainsPositionExclusive:()=>dj,rangeContainsRange:()=>Ip,rangeContainsRangeExclusive:()=>YPe,rangeContainsStartEnd:()=>fj,rangeEndIsOnSameLineAsRangeStart:()=>zV,rangeEndPositionsAreOnSameLine:()=>_De,rangeEquals:()=>Vb,rangeIsOnSingleLine:()=>wI,rangeOfNode:()=>zce,rangeOfTypeParameters:()=>Uce,rangeOverlapsWithStartEnd:()=>o5,rangeStartIsOnSameLineAsRangeEnd:()=>pDe,rangeStartPositionsAreOnSameLine:()=>DK,readBuilderProgram:()=>YQ,readConfigFile:()=>NH,readJson:()=>J8,readJsonConfigFile:()=>WIe,readJsonOrUndefined:()=>vce,reduceEachLeadingCommentRange:()=>$ke,reduceEachTrailingCommentRange:()=>Jke,reduceLeft:()=>oi,reduceLeftIterator:()=>ae,reducePathComponents:()=>rI,refactor:()=>pA,regExpEscape:()=>uQe,regularExpressionFlagToCharacterCode:()=>lXe,relativeComplement:()=>T6,removeAllComments:()=>oH,removeEmitHelper:()=>xQe,removeExtension:()=>YV,removeFileExtension:()=>s_,removeIgnoredPath:()=>qQ,removeMinAndVersionNumbers:()=>toe,removePrefix:()=>KR,removeSuffix:()=>I6,removeTrailingDirectorySeparator:()=>Mk,repeatString:()=>gj,replaceElement:()=>Fc,replaceFirstStar:()=>xI,resolutionExtensionIsTSOrJson:()=>t7,resolveConfigFileProjectName:()=>Qde,resolveJSModule:()=>sNe,resolveLibrary:()=>oQ,resolveModuleName:()=>nA,resolveModuleNameFromCache:()=>mYe,resolvePackageNameToPackageJson:()=>fue,resolvePath:()=>Ok,resolveProjectReferencePath:()=>q3,resolveTripleslashReference:()=>lde,resolveTypeReferenceDirective:()=>tNe,resolvingEmptyArray:()=>dae,returnFalse:()=>w1,returnNoopFileWatcher:()=>i5,returnTrue:()=>Pk,returnUndefined:()=>IT,returnsPromise:()=>Phe,sameFlatMap:()=>Ca,sameMap:()=>Wr,sameMapping:()=>oet,scanTokenAtPosition:()=>uTe,scanner:()=>Uh,semanticDiagnosticsOptionDeclarations:()=>DIe,serializeCompilerOptions:()=>KX,server:()=>Qht,servicesVersion:()=>qrt,setCommentRange:()=>Sd,setConfigFileInOptions:()=>aue,setConstantValue:()=>gEe,setEmitFlags:()=>tr,setGetSourceFileAsHashVersioned:()=>ZQ,setIdentifierAutoGenerate:()=>lH,setIdentifierGeneratedImportReference:()=>CEe,setIdentifierTypeArguments:()=>vS,setInternalEmitFlags:()=>aH,setLocalizedDiagnosticMessages:()=>xDe,setNodeChildren:()=>QEe,setNodeFlags:()=>XDe,setObjectAllocator:()=>wDe,setOriginalNode:()=>Ir,setParent:()=>_c,setParentRecursive:()=>Qb,setPrivateIdentifier:()=>VI,setSnippetElement:()=>sle,setSourceMapRange:()=>Ga,setStackTraceLimit:()=>JKe,setStartsOnNewLine:()=>lX,setSyntheticLeadingComments:()=>e2,setSyntheticTrailingComments:()=>OP,setSys:()=>YKe,setSysLog:()=>Oke,setTextRange:()=>Ht,setTextRangeEnd:()=>m3,setTextRangePos:()=>o7,setTextRangePosEnd:()=>V0,setTextRangePosWidth:()=>$ce,setTokenSourceMapRange:()=>_Ee,setTypeNode:()=>vEe,setUILocale:()=>_xe,setValueDeclaration:()=>bV,shouldAllowImportingTsExtension:()=>W3,shouldPreserveConstEnums:()=>sx,shouldUseUriStyleNodeCoreModules:()=>qZ,showModuleSpecifier:()=>bDe,signatureHasRestParameter:()=>Ch,signatureToDisplayParts:()=>ihe,single:()=>$L,singleElementArray:()=>KL,singleIterator:()=>Bb,singleOrMany:()=>Sg,singleOrUndefined:()=>Bm,skipAlias:()=>Vf,skipConstraint:()=>jfe,skipOuterExpressions:()=>Vu,skipParentheses:()=>Dc,skipPartiallyEmittedExpressions:()=>l0,skipTrivia:()=>Va,skipTypeChecking:()=>p3,skipTypeCheckingIgnoringNoCheck:()=>$De,skipTypeParentheses:()=>M8,skipWhile:()=>bxe,sliceAfter:()=>jce,some:()=>Ft,sortAndDeduplicate:()=>Iy,sortAndDeduplicateDiagnostics:()=>O6,sourceFileAffectingCompilerOptions:()=>Xle,sourceFileMayBeEmitted:()=>SI,sourceMapCommentRegExp:()=>Oue,sourceMapCommentRegExpDontCareLineStart:()=>INe,spacePart:()=>bu,spanMap:()=>nm,startEndContainsRange:()=>Dfe,startEndOverlapsWithStartEnd:()=>yZ,startOnNewLine:()=>bh,startTracing:()=>Nxe,startsWith:()=>so,startsWithDirectory:()=>Ooe,startsWithUnderscore:()=>ghe,startsWithUseStrict:()=>rIe,stringContainsAt:()=>RAe,stringToToken:()=>oI,stripQuotes:()=>zm,supportedDeclarationExtensions:()=>GK,supportedJSExtensionsFlat:()=>h3,supportedLocaleDirectories:()=>a2e,supportedTSExtensionsFlat:()=>Bce,supportedTSImplementationExtensions:()=>XV,suppressLeadingAndTrailingTrivia:()=>Lp,suppressLeadingTrivia:()=>ohe,suppressTrailingTrivia:()=>TAe,symbolEscapedNameNoDefault:()=>NZ,symbolName:()=>Eu,symbolNameNoDefault:()=>Jfe,symbolToDisplayParts:()=>f5,sys:()=>Pd,sysLog:()=>CW,tagNamesAreEquivalent:()=>d2,takeWhile:()=>roe,targetOptionDeclaration:()=>Gle,testFormatSettings:()=>Sit,textChangeRangeIsUnchanged:()=>i2e,textChangeRangeNewSpan:()=>f8,textChanges:()=>er,textOrKeywordPart:()=>the,textPart:()=>pm,textRangeContainsPositionInclusive:()=>NW,textRangeContainsTextSpan:()=>Xke,textRangeIntersectsWithTextSpan:()=>e2e,textSpanContainsPosition:()=>Woe,textSpanContainsTextRange:()=>Voe,textSpanContainsTextSpan:()=>Kke,textSpanEnd:()=>au,textSpanIntersection:()=>t2e,textSpanIntersectsWith:()=>LW,textSpanIntersectsWithPosition:()=>Yke,textSpanIntersectsWithTextSpan:()=>Zke,textSpanIsEmpty:()=>Gke,textSpanOverlap:()=>Qke,textSpanOverlapsWith:()=>gXe,textSpansEqual:()=>eO,textToKeywordObj:()=>tG,timestamp:()=>sl,toArray:()=>JL,toBuilderFileEmit:()=>$Le,toBuilderStateFileInfoForMultiEmit:()=>qLe,toEditorSettings:()=>Bj,toFileNameLowerCase:()=>Vw,toPath:()=>ol,toProgramEmitPending:()=>JLe,toSorted:()=>Mu,tokenIsIdentifierOrKeyword:()=>D_,tokenIsIdentifierOrKeywordOrGreaterThan:()=>Vke,tokenToString:()=>xa,trace:()=>bo,tracing:()=>Zn,tracingEnabled:()=>vW,transferSourceFileChildren:()=>ZEe,transform:()=>tst,transformClassFields:()=>JNe,transformDeclarations:()=>Xue,transformECMAScriptModule:()=>Kue,transformES2015:()=>aLe,transformES2016:()=>oLe,transformES2017:()=>QNe,transformES2018:()=>ZNe,transformES2019:()=>YNe,transformES2020:()=>eLe,transformES2021:()=>tLe,transformESDecorators:()=>XNe,transformESNext:()=>iLe,transformGenerators:()=>cLe,transformImpliedNodeFormatDependentModule:()=>uLe,transformJsx:()=>sLe,transformLegacyDecorators:()=>KNe,transformModule:()=>Gue,transformNamedEvaluation:()=>Dp,transformNodes:()=>$H,transformSystemModule:()=>lLe,transformTypeScript:()=>$Ne,transpile:()=>unt,transpileDeclaration:()=>cnt,transpileModule:()=>r4e,transpileOptionValueCompilerOptions:()=>LIe,tryAddToSet:()=>of,tryAndIgnoreErrors:()=>HZ,tryCast:()=>Jr,tryDirectoryExists:()=>VZ,tryExtractTSExtension:()=>xK,tryFileExists:()=>Tj,tryGetClassExtendingExpressionWithTypeArguments:()=>pce,tryGetClassImplementingOrExtendingExpressionWithTypeArguments:()=>mce,tryGetDirectories:()=>WZ,tryGetExtensionFromPath:()=>qv,tryGetImportFromModuleSpecifier:()=>CV,tryGetJSDocSatisfiesTypeNode:()=>rX,tryGetModuleNameFromFile:()=>bH,tryGetModuleSpecifierFromDeclaration:()=>Z6,tryGetNativePerformanceHooks:()=>kxe,tryGetPropertyAccessOrIdentifierToString:()=>jV,tryGetPropertyNameOfBindingOrAssignmentElement:()=>FX,tryGetSourceMappingURL:()=>NNe,tryGetTextOfPropertyName:()=>D8,tryParseJson:()=>kK,tryParsePattern:()=>_3,tryParsePatterns:()=>XK,tryParseRawSourceMap:()=>LNe,tryReadDirectory:()=>uhe,tryReadFile:()=>A7,tryRemoveDirectoryPrefix:()=>Mce,tryRemoveExtension:()=>UDe,tryRemovePrefix:()=>noe,tryRemoveSuffix:()=>mxe,typeAcquisitionDeclarations:()=>zX,typeAliasNamePart:()=>vAe,typeDirectiveIsEqualTo:()=>q2e,typeKeywords:()=>Hfe,typeParameterNamePart:()=>bAe,typeToDisplayParts:()=>Cj,unchangedPollThresholds:()=>KJ,unchangedTextChangeRange:()=>sG,unescapeLeadingUnderscores:()=>Ws,unmangleScopedPackageName:()=>FH,unorderedRemoveItem:()=>GL,unreachableCodeIsError:()=>IDe,unsetNodeChildren:()=>Ele,unusedLabelIsError:()=>NDe,unwrapInnermostStatementOfLabel:()=>Oae,unwrapParenthesizedExpression:()=>oEe,updateErrorForNoInputFiles:()=>YX,updateLanguageServiceSourceFile:()=>r_e,updateMissingFilePathsWatch:()=>ode,updateResolutionField:()=>O3,updateSharedExtendedConfigFileWatcher:()=>NQ,updateSourceFile:()=>jle,updateWatchingWildcardDirectories:()=>GH,usingSingleLineStringWriter:()=>z6,utf16EncodeAsString:()=>d8,validateLocaleAndSetLanguage:()=>zoe,version:()=>v,versionMajorMinor:()=>m,visitArray:()=>VH,visitCommaListElements:()=>mQ,visitEachChild:()=>dn,visitFunctionBody:()=>_m,visitIterationBody:()=>u_,visitLexicalEnvironment:()=>Aue,visitNode:()=>bt,visitNodes:()=>Dn,visitParameterList:()=>yu,walkUpBindingElementsAndPatterns:()=>YL,walkUpOuterExpressions:()=>sIe,walkUpParenthesizedExpressions:()=>By,walkUpParenthesizedTypes:()=>TV,walkUpParenthesizedTypesAndGetParentAndChild:()=>BTe,whitespaceOrMapCommentRegExp:()=>Mue,writeCommentRange:()=>c3,writeFile:()=>yK,writeFileEnsuringDirectories:()=>lce,zipWith:()=>me}),n.exports=d(f);var m="5.6",v="5.6.3",x=(t=>(t[t.LessThan=-1]="LessThan",t[t.EqualTo=0]="EqualTo",t[t.GreaterThan=1]="GreaterThan",t))(x||{}),w=[],I=new Map;function P(t){return t!==void 0?t.length:0}function O(t,r){if(t!==void 0)for(let a=0;a<t.length;a++){const u=r(t[a],a);if(u)return u}}function z(t,r){if(t!==void 0)for(let a=t.length-1;a>=0;a--){const u=r(t[a],a);if(u)return u}}function J(t,r){if(t!==void 0)for(let a=0;a<t.length;a++){const u=r(t[a],a);if(u!==void 0)return u}}function Y(t,r){for(const a of t){const u=r(a);if(u!==void 0)return u}}function ae(t,r,a){let u=a;if(t){let h=0;for(const p of t)u=r(u,p,h),h++}return u}function me(t,r,a){const u=[];j.assertEqual(t.length,r.length);for(let h=0;h<t.length;h++)u.push(a(t[h],r[h],h));return u}function ye(t,r){if(t.length<=1)return t;const a=[];for(let u=0,h=t.length;u<h;u++)u!==0&&a.push(r),a.push(t[u]);return a}function Ce(t,r){if(t!==void 0){for(let a=0;a<t.length;a++)if(!r(t[a],a))return!1}return!0}function Fe(t,r,a){if(t!==void 0)for(let u=a??0;u<t.length;u++){const h=t[u];if(r(h,u))return h}}function rt(t,r,a){if(t!==void 0)for(let u=a??t.length-1;u>=0;u--){const h=t[u];if(r(h,u))return h}}function ct(t,r,a){if(t===void 0)return-1;for(let u=a??0;u<t.length;u++)if(r(t[u],u))return u;return-1}function Mt(t,r,a){if(t===void 0)return-1;for(let u=a??t.length-1;u>=0;u--)if(r(t[u],u))return u;return-1}function Yt(t,r,a=Hw){if(t!==void 0){for(let u=0;u<t.length;u++)if(a(t[u],r))return!0}return!1}function Bi(t,r,a){for(let u=a??0;u<t.length;u++)if(Yt(r,t.charCodeAt(u)))return u;return-1}function $i(t,r){let a=0;if(t!==void 0)for(let u=0;u<t.length;u++){const h=t[u];r(h,u)&&a++}return a}function $t(t,r){if(t!==void 0){const a=t.length;let u=0;for(;u<a&&r(t[u]);)u++;if(u<a){const h=t.slice(0,u);for(u++;u<a;){const p=t[u];r(p)&&h.push(p),u++}return h}}return t}function Hi(t,r){let a=0;for(let u=0;u<t.length;u++)r(t[u],u,t)&&(t[a]=t[u],a++);t.length=a}function An(t){t.length=0}function qt(t,r){let a;if(t!==void 0){a=[];for(let u=0;u<t.length;u++)a.push(r(t[u],u))}return a}function*ms(t,r){for(const a of t)yield r(a)}function Wr(t,r){if(t!==void 0)for(let a=0;a<t.length;a++){const u=t[a],h=r(u,a);if(u!==h){const p=t.slice(0,a);for(p.push(h),a++;a<t.length;a++)p.push(r(t[a],a));return p}}return t}function Dr(t){const r=[];for(let a=0;a<t.length;a++){const u=t[a];u&&(Ao(u)?Sr(r,u):r.push(u))}return r}function Rr(t,r){let a;if(t!==void 0)for(let u=0;u<t.length;u++){const h=r(t[u],u);h&&(Ao(h)?a=Sr(a,h):a=fn(a,h))}return a??w}function na(t,r){const a=[];if(t!==void 0)for(let u=0;u<t.length;u++){const h=r(t[u],u);h&&(Ao(h)?Sr(a,h):a.push(h))}return a}function*$d(t,r){for(const a of t){const u=r(a);u&&(yield*u)}}function Ca(t,r){let a;if(t!==void 0)for(let u=0;u<t.length;u++){const h=t[u],p=r(h,u);(a||h!==p||Ao(p))&&(a||(a=t.slice(0,u)),Ao(p)?Sr(a,p):a.push(p))}return a??t}function jl(t,r){const a=[];for(let u=0;u<t.length;u++){const h=r(t[u],u);if(h===void 0)return;a.push(h)}return a}function es(t,r){const a=[];if(t!==void 0)for(let u=0;u<t.length;u++){const h=r(t[u],u);h!==void 0&&a.push(h)}return a}function*ld(t,r){for(const a of t){const u=r(a);u!==void 0&&(yield u)}}function mp(t,r,a){if(t.has(r))return t.get(r);const u=a();return t.set(r,u),u}function of(t,r){return t.has(r)?!1:(t.add(r),!0)}function*Bb(t){yield t}function nm(t,r,a){let u;if(t!==void 0){u=[];const h=t.length;let p,g,C=0,b=0;for(;C<h;){for(;b<h;){const T=t[b];if(g=r(T,b),b===0)p=g;else if(g!==p)break;b++}if(C<b){const T=a(t.slice(C,b),p,C,b);T&&u.push(T),C=b}p=g,b++}}return u}function Nv(t,r){if(t===void 0)return;const a=new Map;return t.forEach((u,h)=>{const[p,g]=r(h,u);a.set(p,g)}),a}function Ft(t,r){if(t!==void 0)if(r!==void 0){for(let a=0;a<t.length;a++)if(r(t[a]))return!0}else return t.length>0;return!1}function Ey(t,r,a){let u;for(let h=0;h<t.length;h++)r(t[h])?u=u===void 0?h:u:u!==void 0&&(a(u,h),u=void 0);u!==void 0&&a(u,t.length)}function Js(t,r){return r===void 0||r.length===0?t:t===void 0||t.length===0?r:[...t,...r]}function k6(t,r){return r}function Nk(t){return t.map(k6)}function _W(t,r,a){const u=Nk(t);tI(t,u,a);let h=t[u[0]];const p=[u[0]];for(let g=1;g<u.length;g++){const C=u[g],b=t[C];r(h,b)||(p.push(C),h=b)}return p.sort(),p.map(g=>t[g])}function pW(t,r){const a=[];for(let u=0;u<t.length;u++)mu(a,t[u],r);return a}function Wb(t,r,a){return t.length===0?[]:t.length===1?t.slice():a?_W(t,r,a):pW(t,r)}function eI(t,r){if(t.length===0)return w;let a=t[0];const u=[a];for(let h=1;h<t.length;h++){const p=t[h];switch(r(p,a)){case!0:case 0:continue;case-1:return j.fail("Array is unsorted.")}u.push(a=p)}return u}function Lk(){return[]}function rm(t,r,a,u,h){if(t.length===0)return t.push(r),!0;const p=Jt(t,r,hl,a);if(p<0){if(u&&!h){const g=~p;if(g>0&&u(r,t[g-1]))return!1;if(g<t.length&&u(r,t[g]))return t.splice(g,1,r),!0}return t.splice(~p,0,r),!0}return h?(t.splice(p,0,r),!0):!1}function Iy(t,r,a){return eI(Mu(t,r),a??r??sh)}function i_(t,r,a=Hw){if(t===void 0||r===void 0)return t===r;if(t.length!==r.length)return!1;for(let u=0;u<t.length;u++)if(!a(t[u],r[u],u))return!1;return!0}function Rw(t){let r;if(t!==void 0)for(let a=0;a<t.length;a++){const u=t[a];(r??!u)&&(r??(r=t.slice(0,a)),u&&r.push(u))}return r??t}function T6(t,r,a){if(!r||!t||r.length===0||t.length===0)return r;const u=[];e:for(let h=0,p=0;p<r.length;p++){p>0&&j.assertGreaterThanOrEqual(a(r[p],r[p-1]),0);t:for(const g=h;h<t.length;h++)switch(h>g&&j.assertGreaterThanOrEqual(a(t[h],t[h-1]),0),a(r[p],t[h])){case-1:u.push(r[p]);continue e;case 0:continue e;case 1:continue t}}return u}function fn(t,r){return r===void 0?t:t===void 0?[r]:(t.push(r),t)}function rS(t,r){return t===void 0?r:r===void 0?t:Ao(t)?Ao(r)?Js(t,r):fn(t,r):Ao(r)?fn(r,t):[t,r]}function Fw(t,r){return r<0?t.length+r:r}function Sr(t,r,a,u){if(r===void 0||r.length===0)return t;if(t===void 0)return r.slice(a,u);a=a===void 0?0:Fw(r,a),u=u===void 0?r.length:Fw(r,u);for(let h=a;h<u&&h<r.length;h++)r[h]!==void 0&&t.push(r[h]);return t}function mu(t,r,a){return Yt(t,r,a)?!1:(t.push(r),!0)}function n_(t,r,a){return t!==void 0?(mu(t,r,a),t):[r]}function tI(t,r,a){r.sort((u,h)=>a(t[u],t[h])||_l(u,h))}function Mu(t,r){return t.length===0?w:t.slice().sort(r)}function*Bw(t){for(let r=t.length-1;r>=0;r--)yield t[r]}function Vb(t,r,a,u){for(;a<u;){if(t[a]!==r[a])return!1;a++}return!0}var sm=Array.prototype.at?(t,r)=>t==null?void 0:t.at(r):(t,r)=>{if(t!==void 0&&(r=Fw(t,r),r<t.length))return t[r]};function Ra(t){return t===void 0||t.length===0?void 0:t[0]}function k_(t){if(t!==void 0)for(const r of t)return r}function ya(t){return j.assert(t.length!==0),t[0]}function D6(t){for(const r of t)return r;j.fail("iterator is empty")}function rl(t){return t===void 0||t.length===0?void 0:t[t.length-1]}function va(t){return j.assert(t.length!==0),t[t.length-1]}function Bm(t){return t!==void 0&&t.length===1?t[0]:void 0}function $L(t){return j.checkDefined(Bm(t))}function Sg(t){return t!==void 0&&t.length===1?t[0]:t}function Fc(t,r,a){const u=t.slice(0);return u[r]=a,u}function Jt(t,r,a,u,h){return ti(t,a(r),a,u,h)}function ti(t,r,a,u,h){if(!Ft(t))return-1;let p=h??0,g=t.length-1;for(;p<=g;){const C=p+(g-p>>1),b=a(t[C],C);switch(u(b,r)){case-1:p=C+1;break;case 0:return C;case 1:g=C-1;break}}return~p}function oi(t,r,a,u,h){if(t&&t.length>0){const p=t.length;if(p>0){let g=u===void 0||u<0?0:u;const C=h===void 0||g+h>p-1?p-1:g+h;let b;for(arguments.length<=2?(b=t[g],g++):b=a;g<=C;)b=r(b,t[g],g),g++;return b}}return a}var Vi=Object.prototype.hasOwnProperty;function Li(t,r){return Vi.call(t,r)}function hr(t,r){return Vi.call(t,r)?t[r]:void 0}function wr(t){const r=[];for(const a in t)Vi.call(t,a)&&r.push(a);return r}function vo(t){const r=[];do{const a=Object.getOwnPropertyNames(t);for(const u of a)mu(r,u)}while(t=Object.getPrototypeOf(t));return r}function So(t){const r=[];for(const a in t)Vi.call(t,a)&&r.push(t[a]);return r}function zc(t,r){const a=new Array(t);for(let u=0;u<t;u++)a[u]=r(u);return a}function as(t,r){const a=[];for(const u of t)a.push(r?r(u):u);return a}function $u(t,...r){for(const a of r)if(a!==void 0)for(const u in a)Li(a,u)&&(t[u]=a[u]);return t}function Af(t,r,a=Hw){if(t===r)return!0;if(!t||!r)return!1;for(const u in t)if(Vi.call(t,u)&&(!Vi.call(r,u)||!a(t[u],r[u])))return!1;for(const u in r)if(Vi.call(r,u)&&!Vi.call(t,u))return!1;return!0}function Ld(t,r,a=hl){const u=new Map;for(let h=0;h<t.length;h++){const p=t[h],g=r(p);g!==void 0&&u.set(g,a(p))}return u}function Sa(t,r,a=hl){const u=[];for(let h=0;h<t.length;h++){const p=t[h];u[r(p)]=a(p)}return u}function Cn(t,r,a=hl){const u=Of();for(let h=0;h<t.length;h++){const p=t[h];u.add(r(p),a(p))}return u}function qs(t,r,a=hl){return as(Cn(t,r).values(),a)}function ra(t,r){const a={};if(t!==void 0)for(let u=0;u<t.length;u++){const h=t[u],p=`${r(h)}`;(a[p]??(a[p]=[])).push(h)}return a}function Jd(t){const r={};for(const a in t)Vi.call(t,a)&&(r[a]=t[a]);return r}function T_(t,r){const a={};for(const u in r)Vi.call(r,u)&&(a[u]=r[u]);for(const u in t)Vi.call(t,u)&&(a[u]=t[u]);return a}function wg(t,r){for(const a in r)Vi.call(r,a)&&(t[a]=r[a])}function to(t,r){return r==null?void 0:r.bind(t)}function Of(){const t=new Map;return t.add=WJ,t.remove=Kse,t}function WJ(t,r){let a=this.get(t);return a!==void 0?a.push(r):this.set(t,a=[r]),a}function Kse(t,r){const a=this.get(t);a!==void 0&&(GL(a,r),a.length||this.delete(t))}function JR(t){const r=(t==null?void 0:t.slice())??[];let a=0;function u(){return a===r.length}function h(...g){r.push(...g)}function p(){if(u())throw new Error("Queue is empty");const g=r[a];if(r[a]=void 0,a++,a>100&&a>r.length>>1){const C=r.length-a;r.copyWithin(0,a),r.length=C,a=0}return g}return{enqueue:h,dequeue:p,isEmpty:u}}function Xse(t,r){const a=new Map;let u=0;function*h(){for(const g of a.values())Ao(g)?yield*g:yield g}const p={has(g){const C=t(g);if(!a.has(C))return!1;const b=a.get(C);return Ao(b)?Yt(b,g,r):r(b,g)},add(g){const C=t(g);if(a.has(C)){const b=a.get(C);if(Ao(b))Yt(b,g,r)||(b.push(g),u++);else{const T=b;r(T,g)||(a.set(C,[T,g]),u++)}}else a.set(C,g),u++;return this},delete(g){const C=t(g);if(!a.has(C))return!1;const b=a.get(C);if(Ao(b)){for(let T=0;T<b.length;T++)if(r(b[T],g))return b.length===1?a.delete(C):b.length===2?a.set(C,b[1-T]):OKe(b,T),u--,!0}else if(r(b,g))return a.delete(C),u--,!0;return!1},clear(){a.clear(),u=0},get size(){return u},forEach(g){for(const C of as(a.values()))if(Ao(C))for(const b of C)g(b,b,p);else{const b=C;g(b,b,p)}},keys(){return h()},values(){return h()},*entries(){for(const g of h())yield[g,g]},[Symbol.iterator]:()=>h(),[Symbol.toStringTag]:a[Symbol.toStringTag]};return p}function Ao(t){return Array.isArray(t)}function JL(t){return Ao(t)?t:[t]}function Oo(t){return typeof t=="string"}function Ww(t){return typeof t=="number"}function Jr(t,r){return t!==void 0&&r(t)?t:void 0}function ha(t,r){return t!==void 0&&r(t)?t:j.fail(`Invalid cast. The supplied value ${t} did not pass the test '${j.getFunctionName(r)}'.`)}function Tc(t){}function w1(){return!1}function Pk(){return!0}function IT(){}function hl(t){return t}function mAt(t){return t.toLowerCase()}var PKe=/[^\u0130\u0131\u00DFa-z0-9\\/:\-_. ]+/g;function Vw(t){return PKe.test(t)?t.replace(PKe,mAt):t}function wa(){throw new Error("Not implemented")}function Bh(t){let r;return()=>(t&&(r=t(),t=void 0),r)}function x1(t){const r=new Map;return a=>{const u=`${typeof a}:${a}`;let h=r.get(u);return h===void 0&&!r.has(u)&&(h=t(a),r.set(u,h)),h}}var dxe=(t=>(t[t.None=0]="None",t[t.Normal=1]="Normal",t[t.Aggressive=2]="Aggressive",t[t.VeryAggressive=3]="VeryAggressive",t))(dxe||{});function Hw(t,r){return t===r}function jw(t,r){return t===r||t!==void 0&&r!==void 0&&t.toUpperCase()===r.toUpperCase()}function NT(t,r){return Hw(t,r)}function AKe(t,r){return t===r?0:t===void 0?-1:r===void 0?1:t<r?-1:1}function _l(t,r){return AKe(t,r)}function VJ(t,r){return _l(t==null?void 0:t.start,r==null?void 0:r.start)||_l(t==null?void 0:t.length,r==null?void 0:r.length)}function Qse(t,r,a){for(let u=0;u<t.length;u++)r=Math.max(r,a(t[u]));return r}function Zse(t,r){return oi(t,(a,u)=>r(a,u)===-1?a:u)}function mW(t,r){return t===r?0:t===void 0?-1:r===void 0?1:(t=t.toUpperCase(),r=r.toUpperCase(),t<r?-1:t>r?1:0)}function fxe(t,r){return t===r?0:t===void 0?-1:r===void 0?1:(t=t.toLowerCase(),r=r.toLowerCase(),t<r?-1:t>r?1:0)}function sh(t,r){return AKe(t,r)}function E6(t){return t?mW:sh}var gAt=(()=>{return r;function t(a,u,h){if(a===u)return 0;if(a===void 0)return-1;if(u===void 0)return 1;const p=h(a,u);return p<0?-1:p>0?1:0}function r(a){const u=new Intl.Collator(a,{usage:"sort",sensitivity:"variant",numeric:!0}).compare;return(h,p)=>t(h,p,u)}})(),Yse,eoe;function hxe(){return eoe}function _xe(t){eoe!==t&&(eoe=t,Yse=void 0)}function gW(t,r){return Yse??(Yse=gAt(eoe)),Yse(t,r)}function pxe(t,r,a,u){return t===r?0:t===void 0?-1:r===void 0?1:u(t[a],r[a])}function Ak(t,r){return _l(t?1:0,r?1:0)}function LT(t,r,a){const u=Math.max(2,Math.floor(t.length*.34));let h=Math.floor(t.length*.4)+1,p;for(const g of r){const C=a(g);if(C!==void 0&&Math.abs(C.length-t.length)<=u){if(C===t||C.length<3&&C.toLowerCase()!==t.toLowerCase())continue;const b=yAt(t,C,h-.1);if(b===void 0)continue;j.assert(b<h),h=b,p=g}}return p}function yAt(t,r,a){let u=new Array(r.length+1),h=new Array(r.length+1);const p=a+.01;for(let C=0;C<=r.length;C++)u[C]=C;for(let C=1;C<=t.length;C++){const b=t.charCodeAt(C-1),T=Math.ceil(C>a?C-a:1),E=Math.floor(r.length>a+C?a+C:r.length);h[0]=C;let N=C;for(let F=1;F<T;F++)h[F]=p;for(let F=T;F<=E;F++){const H=t[C-1].toLowerCase()===r[F-1].toLowerCase()?u[F-1]+.1:u[F-1]+2,U=b===r.charCodeAt(F-1)?u[F-1]:Math.min(u[F]+1,h[F-1]+1,H);h[F]=U,N=Math.min(N,U)}for(let F=E+1;F<=r.length;F++)h[F]=p;if(N>a)return;const R=u;u=h,h=R}const g=u[r.length];return g>a?void 0:g}function su(t,r,a){const u=t.length-r.length;return u>=0&&(a?jw(t.slice(u),r):t.indexOf(r,u)===u)}function I6(t,r){return su(t,r)?t.slice(0,t.length-r.length):t}function mxe(t,r){return su(t,r)?t.slice(0,t.length-r.length):void 0}function toe(t){let r=t.length;for(let a=r-1;a>0;a--){let u=t.charCodeAt(a);if(u>=48&&u<=57)do--a,u=t.charCodeAt(a);while(a>0&&u>=48&&u<=57);else if(a>4&&(u===110||u===78)){if(--a,u=t.charCodeAt(a),u!==105&&u!==73||(--a,u=t.charCodeAt(a),u!==109&&u!==77))break;--a,u=t.charCodeAt(a)}else break;if(u!==45&&u!==46)break;r=a}return r===t.length?t:t.slice(0,r)}function GR(t,r){for(let a=0;a<t.length;a++)if(t[a]===r)return zw(t,a),!0;return!1}function zw(t,r){for(let a=r;a<t.length-1;a++)t[a]=t[a+1];t.pop()}function OKe(t,r){t[r]=t[t.length-1],t.pop()}function GL(t,r){return vAt(t,a=>a===r)}function vAt(t,r){for(let a=0;a<t.length;a++)if(r(t[a]))return OKe(t,a),!0;return!1}function Mf(t){return t?hl:Vw}function gxe({prefix:t,suffix:r}){return`${t}*${r}`}function yxe(t,r){return j.assert(HJ(t,r)),r.substring(t.prefix.length,r.length-t.suffix.length)}function ioe(t,r,a){let u,h=-1;for(let p=0;p<t.length;p++){const g=t[p],C=r(g);HJ(C,a)&&C.prefix.length>h&&(h=C.prefix.length,u=g)}return u}function so(t,r,a){return a?jw(t.slice(0,r.length),r):t.lastIndexOf(r,0)===0}function KR(t,r){return so(t,r)?t.substr(r.length):t}function noe(t,r,a=hl){return so(a(t),a(r))?t.substring(r.length):void 0}function HJ({prefix:t,suffix:r},a){return a.length>=t.length+r.length&&so(a,t)&&su(a,r)}function jJ(t,r){return a=>t(a)&&r(a)}function om(...t){return(...r)=>{let a;for(const u of t)if(a=u(...r),a)return a;return a}}function zJ(t){return(...r)=>!t(...r)}function MKe(t){}function KL(t){return t===void 0?void 0:[t]}function UJ(t,r,a,u,h,p){p??(p=Tc);let g=0,C=0;const b=t.length,T=r.length;let E=!1;for(;g<b&&C<T;){const N=t[g],R=r[C],F=a(N,R);F===-1?(u(N),g++,E=!0):F===1?(h(R),C++,E=!0):(p(R,N),g++,C++)}for(;g<b;)u(t[g++]),E=!0;for(;C<T;)h(r[C++]),E=!0;return E}function vxe(t){const r=[];return RKe(t,r,void 0,0),r}function RKe(t,r,a,u){for(const h of t[u]){let p;a?(p=a.slice(),p.push(h)):p=[h],u===t.length-1?r.push(p):RKe(t,r,p,u+1)}}function roe(t,r){if(t!==void 0){const a=t.length;let u=0;for(;u<a&&r(t[u]);)u++;return t.slice(0,u)}}function bxe(t,r){if(t!==void 0){const a=t.length;let u=0;for(;u<a&&r(t[u]);)u++;return t.slice(u)}}function soe(){return typeof process<"u"&&!!process.nextTick&&!process.browser&&typeof ukt<"u"}var Cxe=(t=>(t[t.Off=0]="Off",t[t.Error=1]="Error",t[t.Warning=2]="Warning",t[t.Info=3]="Info",t[t.Verbose=4]="Verbose",t))(Cxe||{}),j;(t=>{let r=0;t.currentLogLevel=2,t.isDebugging=!1;function a(at){return t.currentLogLevel<=at}t.shouldLog=a;function u(at,yi){t.loggingHost&&a(at)&&t.loggingHost.log(at,yi)}function h(at){u(3,at)}t.log=h,(at=>{function yi(Xr){u(1,Xr)}at.error=yi;function Sn(Xr){u(2,Xr)}at.warn=Sn;function dr(Xr){u(3,Xr)}at.log=dr;function us(Xr){u(4,Xr)}at.trace=us})(h=t.log||(t.log={}));const p={};function g(){return r}t.getAssertionLevel=g;function C(at){const yi=r;if(r=at,at>yi)for(const Sn of wr(p)){const dr=p[Sn];dr!==void 0&&t[Sn]!==dr.assertion&&at>=dr.level&&(t[Sn]=dr,p[Sn]=void 0)}}t.setAssertionLevel=C;function b(at){return r>=at}t.shouldAssert=b;function T(at,yi){return b(at)?!0:(p[yi]={level:at,assertion:t[yi]},t[yi]=Tc,!1)}function E(at,yi){debugger;const Sn=new Error(at?`Debug Failure. ${at}`:"Debug Failure.");throw Error.captureStackTrace&&Error.captureStackTrace(Sn,yi||E),Sn}t.fail=E;function N(at,yi,Sn){return E(`${yi||"Unexpected node."}\r
+Node ${Ne(at.kind)} was unexpected.`,Sn||N)}t.failBadSyntaxKind=N;function R(at,yi,Sn,dr){at||(yi=yi?`False expression: ${yi}`:"False expression.",Sn&&(yi+=`\r
+Verbose Debug Information: `+(typeof Sn=="string"?Sn:Sn())),E(yi,dr||R))}t.assert=R;function F(at,yi,Sn,dr,us){if(at!==yi){const Xr=Sn?dr?`${Sn} ${dr}`:Sn:"";E(`Expected ${at} === ${yi}. ${Xr}`,us||F)}}t.assertEqual=F;function H(at,yi,Sn,dr){at>=yi&&E(`Expected ${at} < ${yi}. ${Sn||""}`,dr||H)}t.assertLessThan=H;function U(at,yi,Sn){at>yi&&E(`Expected ${at} <= ${yi}`,Sn||U)}t.assertLessThanOrEqual=U;function q(at,yi,Sn){at<yi&&E(`Expected ${at} >= ${yi}`,Sn||q)}t.assertGreaterThanOrEqual=q;function X(at,yi,Sn){at==null&&E(yi,Sn||X)}t.assertIsDefined=X;function Z(at,yi,Sn){return X(at,yi,Sn||Z),at}t.checkDefined=Z;function Q(at,yi,Sn){for(const dr of at)X(dr,yi,Sn||Q)}t.assertEachIsDefined=Q;function re(at,yi,Sn){return Q(at,yi,Sn||re),at}t.checkEachDefined=re;function oe(at,yi="Illegal value:",Sn){const dr=typeof at=="object"&&Li(at,"kind")&&Li(at,"pos")?"SyntaxKind: "+Ne(at.kind):JSON.stringify(at);return E(`${yi} ${dr}`,Sn||oe)}t.assertNever=oe;function pe(at,yi,Sn,dr){T(1,"assertEachNode")&&R(yi===void 0||Ce(at,yi),Sn||"Unexpected node.",()=>`Node array did not pass test '${ke(yi)}'.`,dr||pe)}t.assertEachNode=pe;function de(at,yi,Sn,dr){T(1,"assertNode")&&R(at!==void 0&&(yi===void 0||yi(at)),Sn||"Unexpected node.",()=>`Node ${Ne(at==null?void 0:at.kind)} did not pass test '${ke(yi)}'.`,dr||de)}t.assertNode=de;function ue(at,yi,Sn,dr){T(1,"assertNotNode")&&R(at===void 0||yi===void 0||!yi(at),Sn||"Unexpected node.",()=>`Node ${Ne(at.kind)} should not have passed test '${ke(yi)}'.`,dr||ue)}t.assertNotNode=ue;function Ie(at,yi,Sn,dr){T(1,"assertOptionalNode")&&R(yi===void 0||at===void 0||yi(at),Sn||"Unexpected node.",()=>`Node ${Ne(at==null?void 0:at.kind)} did not pass test '${ke(yi)}'.`,dr||Ie)}t.assertOptionalNode=Ie;function we(at,yi,Sn,dr){T(1,"assertOptionalToken")&&R(yi===void 0||at===void 0||at.kind===yi,Sn||"Unexpected node.",()=>`Node ${Ne(at==null?void 0:at.kind)} was not a '${Ne(yi)}' token.`,dr||we)}t.assertOptionalToken=we;function he(at,yi,Sn){T(1,"assertMissingNode")&&R(at===void 0,yi||"Unexpected node.",()=>`Node ${Ne(at.kind)} was unexpected'.`,Sn||he)}t.assertMissingNode=he;function Ae(at){}t.type=Ae;function ke(at){if(typeof at!="function")return"";if(Li(at,"name"))return at.name;{const yi=Function.prototype.toString.call(at),Sn=/^function\s+([\w$]+)\s*\(/.exec(yi);return Sn?Sn[1]:""}}t.getFunctionName=ke;function Te(at){return`{ name: ${Ws(at.escapedName)}; flags: ${et(at.flags)}; declarations: ${qt(at.declarations,yi=>Ne(yi.kind))} }`}t.formatSymbol=Te;function De(at=0,yi,Sn){const dr=se(yi);if(at===0)return dr.length>0&&dr[0][0]===0?dr[0][1]:"0";if(Sn){const us=[];let Xr=at;for(const[Gs,ma]of dr){if(Gs>at)break;Gs!==0&&Gs&at&&(us.push(ma),Xr&=~Gs)}if(Xr===0)return us.join("|")}else for(const[us,Xr]of dr)if(us===at)return Xr;return at.toString()}t.formatEnum=De;const qe=new Map;function se(at){const yi=qe.get(at);if(yi)return yi;const Sn=[];for(const us in at){const Xr=at[us];typeof Xr=="number"&&Sn.push([Xr,us])}const dr=Mu(Sn,(us,Xr)=>_l(us[0],Xr[0]));return qe.set(at,dr),dr}function Ne(at){return De(at,loe,!1)}t.formatSyntaxKind=Ne;function Oe(at){return De(at,woe,!1)}t.formatSnippetKind=Oe;function He(at){return De(at,Coe,!1)}t.formatScriptKind=He;function Pe(at){return De(at,uoe,!0)}t.formatNodeFlags=Pe;function We(at){return De(at,goe,!0)}t.formatNodeCheckFlags=We;function ze(at){return De(at,doe,!0)}t.formatModifierFlags=ze;function Nt(at){return De(at,Soe,!0)}t.formatTransformFlags=Nt;function $e(at){return De(at,xoe,!0)}t.formatEmitFlags=$e;function et(at){return De(at,moe,!0)}t.formatSymbolFlags=et;function Me(at){return De(at,yoe,!0)}t.formatTypeFlags=Me;function ut(at){return De(at,boe,!0)}t.formatSignatureFlags=ut;function wt(at){return De(at,voe,!0)}t.formatObjectFlags=wt;function Et(at){return De(at,$J,!0)}t.formatFlowFlags=Et;function dt(at){return De(at,foe,!0)}t.formatRelationComparisonResult=dt;function zt(at){return De(at,Iue,!0)}t.formatCheckMode=zt;function Ei(at){return De(at,Nue,!0)}t.formatSignatureCheckMode=Ei;function tn(at){return De(at,Eue,!0)}t.formatTypeFacts=tn;let xn=!1,Pn;function _i(at){"__debugFlowFlags"in at||Object.defineProperties(at,{__tsDebuggerDisplay:{value(){const yi=this.flags&2?"FlowStart":this.flags&4?"FlowBranchLabel":this.flags&8?"FlowLoopLabel":this.flags&16?"FlowAssignment":this.flags&32?"FlowTrueCondition":this.flags&64?"FlowFalseCondition":this.flags&128?"FlowSwitchClause":this.flags&256?"FlowArrayMutation":this.flags&512?"FlowCall":this.flags&1024?"FlowReduceLabel":this.flags&1?"FlowUnreachable":"UnknownFlow",Sn=this.flags&-2048;return`${yi}${Sn?` (${Et(Sn)})`:""}`}},__debugFlowFlags:{get(){return De(this.flags,$J,!0)}},__debugToString:{value(){return Zs(this)}}})}function Fi(at){return xn&&(typeof Object.setPrototypeOf=="function"?(Pn||(Pn=Object.create(Object.prototype),_i(Pn)),Object.setPrototypeOf(at,Pn)):_i(at)),at}t.attachFlowNodeDebugInfo=Fi;let On;function pn(at){"__tsDebuggerDisplay"in at||Object.defineProperties(at,{__tsDebuggerDisplay:{value(yi){return yi=String(yi).replace(/(?:,[\s\w]+:[^,]+)+\]$/,"]"),`NodeArray ${yi}`}}})}function qr(at){xn&&(typeof Object.setPrototypeOf=="function"?(On||(On=Object.create(Array.prototype),pn(On)),Object.setPrototypeOf(at,On)):pn(at))}t.attachNodeArrayDebugInfo=qr;function Fs(){if(xn)return;const at=new WeakMap,yi=new WeakMap;Object.defineProperties(Hf.getSymbolConstructor().prototype,{__tsDebuggerDisplay:{value(){const dr=this.flags&33554432?"TransientSymbol":"Symbol",us=this.flags&-33554433;return`${dr} '${Eu(this)}'${us?` (${et(us)})`:""}`}},__debugFlags:{get(){return et(this.flags)}}}),Object.defineProperties(Hf.getTypeConstructor().prototype,{__tsDebuggerDisplay:{value(){const dr=this.flags&67359327?`IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName?` (${this.debugIntrinsicName})`:""}`:this.flags&98304?"NullableType":this.flags&384?`LiteralType ${JSON.stringify(this.value)}`:this.flags&2048?`LiteralType ${this.value.negative?"-":""}${this.value.base10Value}n`:this.flags&8192?"UniqueESSymbolType":this.flags&32?"EnumType":this.flags&1048576?"UnionType":this.flags&2097152?"IntersectionType":this.flags&4194304?"IndexType":this.flags&8388608?"IndexedAccessType":this.flags&16777216?"ConditionalType":this.flags&33554432?"SubstitutionType":this.flags&262144?"TypeParameter":this.flags&524288?this.objectFlags&3?"InterfaceType":this.objectFlags&4?"TypeReference":this.objectFlags&8?"TupleType":this.objectFlags&16?"AnonymousType":this.objectFlags&32?"MappedType":this.objectFlags&1024?"ReverseMappedType":this.objectFlags&256?"EvolvingArrayType":"ObjectType":"Type",us=this.flags&524288?this.objectFlags&-1344:0;return`${dr}${this.symbol?` '${Eu(this.symbol)}'`:""}${us?` (${wt(us)})`:""}`}},__debugFlags:{get(){return Me(this.flags)}},__debugObjectFlags:{get(){return this.flags&524288?wt(this.objectFlags):""}},__debugTypeToString:{value(){let dr=at.get(this);return dr===void 0&&(dr=this.checker.typeToString(this),at.set(this,dr)),dr}}}),Object.defineProperties(Hf.getSignatureConstructor().prototype,{__debugFlags:{get(){return ut(this.flags)}},__debugSignatureToString:{value(){var dr;return(dr=this.checker)==null?void 0:dr.signatureToString(this)}}});const Sn=[Hf.getNodeConstructor(),Hf.getIdentifierConstructor(),Hf.getTokenConstructor(),Hf.getSourceFileConstructor()];for(const dr of Sn)Li(dr.prototype,"__debugKind")||Object.defineProperties(dr.prototype,{__tsDebuggerDisplay:{value(){return`${zl(this)?"GeneratedIdentifier":ot(this)?`Identifier '${Fr(this)}'`:Vs(this)?`PrivateIdentifier '${Fr(this)}'`:Ha(this)?`StringLiteral ${JSON.stringify(this.text.length<10?this.text:this.text.slice(10)+"...")}`:A_(this)?`NumericLiteral ${this.text}`:p7(this)?`BigIntLiteral ${this.text}n`:$l(this)?"TypeParameterDeclaration":$s(this)?"ParameterDeclaration":iu(this)?"ConstructorDeclaration":um(this)?"GetAccessorDeclaration":kp(this)?"SetAccessorDeclaration":VP(this)?"CallSignatureDeclaration":fH(this)?"ConstructSignatureDeclaration":eD(this)?"IndexSignatureDeclaration":HP(this)?"TypePredicateNode":qp(this)?"TypeReferenceNode":Hy(this)?"FunctionTypeNode":v3(this)?"ConstructorTypeNode":tD(this)?"TypeQueryNode":a_(this)?"TypeLiteralNode":hH(this)?"ArrayTypeNode":jP(this)?"TupleTypeNode":vX(this)?"OptionalTypeNode":bX(this)?"RestTypeNode":fx(this)?"UnionTypeNode":zP(this)?"IntersectionTypeNode":iD(this)?"ConditionalTypeNode":DI(this)?"InferTypeNode":EI(this)?"ParenthesizedTypeNode":C3(this)?"ThisTypeNode":t2(this)?"TypeOperatorNode":nD(this)?"IndexedAccessTypeNode":II(this)?"MappedTypeNode":bS(this)?"LiteralTypeNode":b3(this)?"NamedTupleMember":V1(this)?"ImportTypeNode":Ne(this.kind)}${this.flags?` (${Pe(this.flags)})`:""}`}},__debugKind:{get(){return Ne(this.kind)}},__debugNodeFlags:{get(){return Pe(this.flags)}},__debugModifierFlags:{get(){return ze(oDe(this))}},__debugTransformFlags:{get(){return Nt(this.transformFlags)}},__debugIsParseTreeNode:{get(){return h8(this)}},__debugEmitFlags:{get(){return $e(Ya(this))}},__debugGetText:{value(us){if(cl(this))return"";let Xr=yi.get(this);if(Xr===void 0){const Gs=Mo(this),ma=Gs&&_n(Gs);Xr=ma?RT(ma,Gs,us):"",yi.set(this,Xr)}return Xr}}});xn=!0}t.enableDebugInfo=Fs;function ko(at){const yi=at&7;let Sn=yi===0?"in out":yi===3?"[bivariant]":yi===2?"in":yi===1?"out":yi===4?"[independent]":"";return at&8?Sn+=" (unmeasurable)":at&16&&(Sn+=" (unreliable)"),Sn}t.formatVariance=ko;class ls{__debugToString(){var yi;switch(this.kind){case 3:return((yi=this.debugInfo)==null?void 0:yi.call(this))||"(function mapper)";case 0:return`${this.source.__debugTypeToString()} -> ${this.target.__debugTypeToString()}`;case 1:return me(this.sources,this.targets||qt(this.sources,()=>"any"),(Sn,dr)=>`${Sn.__debugTypeToString()} -> ${typeof dr=="string"?dr:dr.__debugTypeToString()}`).join(", ");case 2:return me(this.sources,this.targets,(Sn,dr)=>`${Sn.__debugTypeToString()} -> ${dr().__debugTypeToString()}`).join(", ");case 5:case 4:return`m1: ${this.mapper1.__debugToString().split(`
+`).join(`
+ `)}
+m2: ${this.mapper2.__debugToString().split(`
+`).join(`
+ `)}`;default:return oe(this)}}}t.DebugTypeMapper=ls;function Qs(at){return t.isDebugging?Object.setPrototypeOf(at,ls.prototype):at}t.attachDebugPrototypeIfDebug=Qs;function Mn(at){return console.log(Zs(at))}t.printControlFlowGraph=Mn;function Zs(at){let yi=-1;function Sn(Ue){return Ue.id||(Ue.id=yi,yi--),Ue.id}let dr;(Ue=>{Ue.lr="─",Ue.ud="│",Ue.dr="╭",Ue.dl="╮",Ue.ul="╯",Ue.ur="╰",Ue.udr="├",Ue.udl="┤",Ue.dlr="┬",Ue.ulr="┴",Ue.udlr="╫"})(dr||(dr={}));let us;(Ue=>{Ue[Ue.None=0]="None",Ue[Ue.Up=1]="Up",Ue[Ue.Down=2]="Down",Ue[Ue.Left=4]="Left",Ue[Ue.Right=8]="Right",Ue[Ue.UpDown=3]="UpDown",Ue[Ue.LeftRight=12]="LeftRight",Ue[Ue.UpLeft=5]="UpLeft",Ue[Ue.UpRight=9]="UpRight",Ue[Ue.DownLeft=6]="DownLeft",Ue[Ue.DownRight=10]="DownRight",Ue[Ue.UpDownLeft=7]="UpDownLeft",Ue[Ue.UpDownRight=11]="UpDownRight",Ue[Ue.UpLeftRight=13]="UpLeftRight",Ue[Ue.DownLeftRight=14]="DownLeftRight",Ue[Ue.UpDownLeftRight=15]="UpDownLeftRight",Ue[Ue.NoChildren=16]="NoChildren"})(us||(us={}));const Xr=2032,Gs=882,ma=Object.create(null),ka=[],Ji=Dt(at,new Set);for(const Ue of ka)Ue.text=gr(Ue.flowNode,Ue.circular),Rt(Ue);const ac=Ct(Ji),St=ii(ac);return vt(Ji,0),te();function ri(Ue){return!!(Ue.flags&128)}function xe(Ue){return!!(Ue.flags&12)&&!!Ue.antecedent}function pt(Ue){return!!(Ue.flags&Xr)}function Se(Ue){return!!(Ue.flags&Gs)}function Ze(Ue){const be=[];for(const Qt of Ue.edges)Qt.source===Ue&&be.push(Qt.target);return be}function gt(Ue){const be=[];for(const Qt of Ue.edges)Qt.target===Ue&&be.push(Qt.source);return be}function Dt(Ue,be){const Qt=Sn(Ue);let lt=ma[Qt];if(lt&&be.has(Ue))return lt.circular=!0,lt={id:-1,flowNode:Ue,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:"circularity"},ka.push(lt),lt;if(be.add(Ue),!lt)if(ma[Qt]=lt={id:Qt,flowNode:Ue,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:!1},ka.push(lt),xe(Ue))for(const st of Ue.antecedent)Je(lt,st,be);else pt(Ue)&&Je(lt,Ue.antecedent,be);return be.delete(Ue),lt}function Je(Ue,be,Qt){const lt=Dt(be,Qt),st={source:Ue,target:lt};Ue.edges.push(st),lt.edges.push(st)}function Rt(Ue){if(Ue.level!==-1)return Ue.level;let be=0;for(const Qt of gt(Ue))be=Math.max(be,Rt(Qt)+1);return Ue.level=be}function Ct(Ue){let be=0;for(const Qt of Ze(Ue))be=Math.max(be,Ct(Qt));return be+1}function ii(Ue){const be=Gt(Array(Ue),0);for(const Qt of ka)be[Qt.level]=Math.max(be[Qt.level],Qt.text.length);return be}function vt(Ue,be){if(Ue.lane===-1){Ue.lane=be,Ue.endLane=be;const Qt=Ze(Ue);for(let lt=0;lt<Qt.length;lt++){lt>0&&be++;const st=Qt[lt];vt(st,be),st.endLane>Ue.endLane&&(be=st.endLane)}Ue.endLane=be}}function Ni(Ue){if(Ue&2)return"Start";if(Ue&4)return"Branch";if(Ue&8)return"Loop";if(Ue&16)return"Assignment";if(Ue&32)return"True";if(Ue&64)return"False";if(Ue&128)return"SwitchClause";if(Ue&256)return"ArrayMutation";if(Ue&512)return"Call";if(Ue&1024)return"ReduceLabel";if(Ue&1)return"Unreachable";throw new Error}function ji(Ue){const be=_n(Ue);return RT(be,Ue,!1)}function gr(Ue,be){let Qt=Ni(Ue.flags);if(be&&(Qt=`${Qt}#${Sn(Ue)}`),ri(Ue)){const lt=[],{switchStatement:st,clauseStart:hi,clauseEnd:vn}=Ue.node;for(let ln=hi;ln<vn;ln++){const Un=st.caseBlock.clauses[ln];k7(Un)?lt.push("default"):lt.push(ji(Un.expression))}Qt+=` (${lt.join(", ")})`}else Se(Ue)&&Ue.node&&(Qt+=` (${ji(Ue.node)})`);return be==="circularity"?`Circular(${Qt})`:Qt}function te(){const Ue=St.length,be=Qse(ka,0,vn=>vn.lane)+1,Qt=Gt(Array(be),""),lt=St.map(()=>Array(be)),st=St.map(()=>Gt(Array(be),0));for(const vn of ka){lt[vn.level][vn.lane]=vn;const ln=Ze(vn);for(let Pt=0;Pt<ln.length;Pt++){const Bt=ln[Pt];let fi=8;Bt.lane===vn.lane&&(fi|=4),Pt>0&&(fi|=1),Pt<ln.length-1&&(fi|=2),st[vn.level][Bt.lane]|=fi}ln.length===0&&(st[vn.level][vn.lane]|=16);const Un=gt(vn);for(let Pt=0;Pt<Un.length;Pt++){const Bt=Un[Pt];let fi=4;Pt>0&&(fi|=1),Pt<Un.length-1&&(fi|=2),st[vn.level-1][Bt.lane]|=fi}}for(let vn=0;vn<Ue;vn++)for(let ln=0;ln<be;ln++){const Un=vn>0?st[vn-1][ln]:0,Pt=ln>0?st[vn][ln-1]:0;let Bt=st[vn][ln];Bt||(Un&8&&(Bt|=12),Pt&2&&(Bt|=3),st[vn][ln]=Bt)}for(let vn=0;vn<Ue;vn++)for(let ln=0;ln<Qt.length;ln++){const Un=st[vn][ln],Pt=Un&4?"─":" ",Bt=lt[vn][ln];Bt?(hi(ln,Bt.text),vn<Ue-1&&(hi(ln," "),hi(ln,le(Pt,St[vn]-Bt.text.length)))):vn<Ue-1&&hi(ln,le(Pt,St[vn]+1)),hi(ln,tt(Un)),hi(ln,Un&8&&vn<Ue-1&&!lt[vn+1][ln]?"─":" ")}return`
+${Qt.join(`
+`)}
+`;function hi(vn,ln){Qt[vn]+=ln}}function tt(Ue){switch(Ue){case 3:return"│";case 12:return"─";case 5:return"╯";case 9:return"╰";case 6:return"╮";case 10:return"╭";case 7:return"┤";case 11:return"├";case 13:return"┴";case 14:return"┬";case 15:return"╫"}return" "}function Gt(Ue,be){if(Ue.fill)Ue.fill(be);else for(let Qt=0;Qt<Ue.length;Qt++)Ue[Qt]=be;return Ue}function le(Ue,be){if(Ue.repeat)return be>0?Ue.repeat(be):"";let Qt="";for(;Qt.length<be;)Qt+=Ue;return Qt}}t.formatControlFlowGraph=Zs})(j||(j={}));var bAt=/^(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i,CAt=/^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)(?:\.(?:0|[1-9]\d*|[a-z-][a-z0-9-]*))*$/i,SAt=/^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)$/i,wAt=/^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/i,xAt=/^[a-z0-9-]+$/i,FKe=/^(?:0|[1-9]\d*)$/,Sxe=class QU{constructor(r,a=0,u=0,h="",p=""){typeof r=="string"&&({major:r,minor:a,patch:u,prerelease:h,build:p}=j.checkDefined(BKe(r),"Invalid version")),j.assert(r>=0,"Invalid argument: major"),j.assert(a>=0,"Invalid argument: minor"),j.assert(u>=0,"Invalid argument: patch");const g=h?Ao(h)?h:h.split("."):w,C=p?Ao(p)?p:p.split("."):w;j.assert(Ce(g,b=>SAt.test(b)),"Invalid argument: prerelease"),j.assert(Ce(C,b=>xAt.test(b)),"Invalid argument: build"),this.major=r,this.minor=a,this.patch=u,this.prerelease=g,this.build=C}static tryParse(r){const a=BKe(r);if(!a)return;const{major:u,minor:h,patch:p,prerelease:g,build:C}=a;return new QU(u,h,p,g,C)}compareTo(r){return this===r?0:r===void 0?1:_l(this.major,r.major)||_l(this.minor,r.minor)||_l(this.patch,r.patch)||kAt(this.prerelease,r.prerelease)}increment(r){switch(r){case"major":return new QU(this.major+1,0,0);case"minor":return new QU(this.major,this.minor+1,0);case"patch":return new QU(this.major,this.minor,this.patch+1);default:return j.assertNever(r)}}with(r){const{major:a=this.major,minor:u=this.minor,patch:h=this.patch,prerelease:p=this.prerelease,build:g=this.build}=r;return new QU(a,u,h,p,g)}toString(){let r=`${this.major}.${this.minor}.${this.patch}`;return Ft(this.prerelease)&&(r+=`-${this.prerelease.join(".")}`),Ft(this.build)&&(r+=`+${this.build.join(".")}`),r}};Sxe.zero=new Sxe(0,0,0,["0"]);var P0=Sxe;function BKe(t){const r=bAt.exec(t);if(!r)return;const[,a,u="0",h="0",p="",g=""]=r;if(!(p&&!CAt.test(p))&&!(g&&!wAt.test(g)))return{major:parseInt(a,10),minor:parseInt(u,10),patch:parseInt(h,10),prerelease:p,build:g}}function kAt(t,r){if(t===r)return 0;if(t.length===0)return r.length===0?0:1;if(r.length===0)return-1;const a=Math.min(t.length,r.length);for(let u=0;u<a;u++){const h=t[u],p=r[u];if(h===p)continue;const g=FKe.test(h),C=FKe.test(p);if(g||C){if(g!==C)return g?-1:1;const b=_l(+h,+p);if(b)return b}else{const b=sh(h,p);if(b)return b}}return _l(t.length,r.length)}var qJ=class oAt{constructor(r){this._alternatives=r?j.checkDefined(WKe(r),"Invalid range spec."):w}static tryParse(r){const a=WKe(r);if(a){const u=new oAt("");return u._alternatives=a,u}}test(r){return typeof r=="string"&&(r=new P0(r)),AAt(r,this._alternatives)}toString(){return RAt(this._alternatives)}},TAt=/\|\|/,DAt=/\s+/,EAt=/^([x*0]|[1-9]\d*)(?:\.([x*0]|[1-9]\d*)(?:\.([x*0]|[1-9]\d*)(?:-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i,IAt=/^\s*([a-z0-9-+.*]+)\s+-\s+([a-z0-9-+.*]+)\s*$/i,NAt=/^([~^<>=]|<=|>=)?\s*([a-z0-9-+.*]+)$/i;function WKe(t){const r=[];for(let a of t.trim().split(TAt)){if(!a)continue;const u=[];a=a.trim();const h=IAt.exec(a);if(h){if(!LAt(h[1],h[2],u))return}else for(const p of a.split(DAt)){const g=NAt.exec(p.trim());if(!g||!PAt(g[1],g[2],u))return}r.push(u)}return r}function wxe(t){const r=EAt.exec(t);if(!r)return;const[,a,u="*",h="*",p,g]=r;return{version:new P0(xg(a)?0:parseInt(a,10),xg(a)||xg(u)?0:parseInt(u,10),xg(a)||xg(u)||xg(h)?0:parseInt(h,10),p,g),major:a,minor:u,patch:h}}function LAt(t,r,a){const u=wxe(t);if(!u)return!1;const h=wxe(r);return h?(xg(u.major)||a.push(Ny(">=",u.version)),xg(h.major)||a.push(xg(h.minor)?Ny("<",h.version.increment("major")):xg(h.patch)?Ny("<",h.version.increment("minor")):Ny("<=",h.version)),!0):!1}function PAt(t,r,a){const u=wxe(r);if(!u)return!1;const{version:h,major:p,minor:g,patch:C}=u;if(xg(p))(t==="<"||t===">")&&a.push(Ny("<",P0.zero));else switch(t){case"~":a.push(Ny(">=",h)),a.push(Ny("<",h.increment(xg(g)?"major":"minor")));break;case"^":a.push(Ny(">=",h)),a.push(Ny("<",h.increment(h.major>0||xg(g)?"major":h.minor>0||xg(C)?"minor":"patch")));break;case"<":case">=":a.push(xg(g)||xg(C)?Ny(t,h.with({prerelease:"0"})):Ny(t,h));break;case"<=":case">":a.push(xg(g)?Ny(t==="<="?"<":">=",h.increment("major").with({prerelease:"0"})):xg(C)?Ny(t==="<="?"<":">=",h.increment("minor").with({prerelease:"0"})):Ny(t,h));break;case"=":case void 0:xg(g)||xg(C)?(a.push(Ny(">=",h.with({prerelease:"0"}))),a.push(Ny("<",h.increment(xg(g)?"major":"minor").with({prerelease:"0"})))):a.push(Ny("=",h));break;default:return!1}return!0}function xg(t){return t==="*"||t==="x"||t==="X"}function Ny(t,r){return{operator:t,operand:r}}function AAt(t,r){if(r.length===0)return!0;for(const a of r)if(OAt(t,a))return!0;return!1}function OAt(t,r){for(const a of r)if(!MAt(t,a.operator,a.operand))return!1;return!0}function MAt(t,r,a){const u=t.compareTo(a);switch(r){case"<":return u<0;case"<=":return u<=0;case">":return u>0;case">=":return u>=0;case"=":return u===0;default:return j.assertNever(r)}}function RAt(t){return qt(t,FAt).join(" || ")||"*"}function FAt(t){return qt(t,BAt).join(" ")}function BAt(t){return`${t.operator}${t.operand}`}function WAt(){if(soe())try{const{performance:t}=cM;if(t)return{shouldWriteNativeEvents:!1,performance:t}}catch{}if(typeof performance=="object")return{shouldWriteNativeEvents:!0,performance}}function VAt(){const t=WAt();if(!t)return;const{shouldWriteNativeEvents:r,performance:a}=t,u={shouldWriteNativeEvents:r,performance:void 0,performanceTime:void 0};return typeof a.timeOrigin=="number"&&typeof a.now=="function"&&(u.performanceTime=a),u.performanceTime&&typeof a.mark=="function"&&typeof a.measure=="function"&&typeof a.clearMarks=="function"&&typeof a.clearMeasures=="function"&&(u.performance=a),u}var xxe=VAt(),VKe=xxe==null?void 0:xxe.performanceTime;function kxe(){return xxe}var sl=VKe?()=>VKe.now():Date.now,Txe={};c(Txe,{clearMarks:()=>$Ke,clearMeasures:()=>qKe,createTimer:()=>ooe,createTimerIf:()=>HKe,disable:()=>Ixe,enable:()=>coe,forEachMark:()=>UKe,forEachMeasure:()=>aoe,getCount:()=>zKe,getDuration:()=>e8,isEnabled:()=>Exe,mark:()=>ou,measure:()=>Wm,nullTimer:()=>Dxe});var XR,iI;function HKe(t,r,a,u){return t?ooe(r,a,u):Dxe}function ooe(t,r,a){let u=0;return{enter:h,exit:p};function h(){++u===1&&ou(r)}function p(){--u===0?(ou(a),Wm(t,r,a)):u<0&&j.fail("enter/exit count does not match.")}}var Dxe={enter:Tc,exit:Tc},QR=!1,jKe=sl(),ZR=new Map,yW=new Map,YR=new Map;function ou(t){if(QR){const r=yW.get(t)??0;yW.set(t,r+1),ZR.set(t,sl()),iI==null||iI.mark(t),typeof onProfilerEvent=="function"&&onProfilerEvent(t)}}function Wm(t,r,a){if(QR){const u=(a!==void 0?ZR.get(a):void 0)??sl(),h=(r!==void 0?ZR.get(r):void 0)??jKe,p=YR.get(t)||0;YR.set(t,p+(u-h)),iI==null||iI.measure(t,r,a)}}function zKe(t){return yW.get(t)||0}function e8(t){return YR.get(t)||0}function aoe(t){YR.forEach((r,a)=>t(a,r))}function UKe(t){ZR.forEach((r,a)=>t(a))}function qKe(t){t!==void 0?YR.delete(t):YR.clear(),iI==null||iI.clearMeasures(t)}function $Ke(t){t!==void 0?(yW.delete(t),ZR.delete(t)):(yW.clear(),ZR.clear()),iI==null||iI.clearMarks(t)}function Exe(){return QR}function coe(t=Pd){var r;return QR||(QR=!0,XR||(XR=kxe()),XR!=null&&XR.performance&&(jKe=XR.performance.timeOrigin,(XR.shouldWriteNativeEvents||(r=t==null?void 0:t.cpuProfilingEnabled)!=null&&r.call(t)||t!=null&&t.debugMode)&&(iI=XR.performance))),!0}function Ixe(){QR&&(ZR.clear(),yW.clear(),YR.clear(),iI=void 0,QR=!1)}var Zn,vW;(t=>{let r,a=0,u=0,h;const p=[];let g;const C=[];function b(pe,de,ue){if(j.assert(!Zn,"Tracing already started"),r===void 0)try{r=cM}catch(ke){throw new Error(`tracing requires having fs
+(original error: ${ke.message||ke})`)}h=pe,p.length=0,g===void 0&&(g=zr(de,"legend.json")),r.existsSync(de)||r.mkdirSync(de,{recursive:!0});const Ie=h==="build"?`.${process.pid}-${++a}`:h==="server"?`.${process.pid}`:"",we=zr(de,`trace${Ie}.json`),he=zr(de,`types${Ie}.json`);C.push({configFilePath:ue,tracePath:we,typesPath:he}),u=r.openSync(we,"w"),Zn=t;const Ae={cat:"__metadata",ph:"M",ts:1e3*sl(),pid:1,tid:1};r.writeSync(u,`[
+`+[{name:"process_name",args:{name:"tsc"},...Ae},{name:"thread_name",args:{name:"Main"},...Ae},{name:"TracingStartedInBrowser",...Ae,cat:"disabled-by-default-devtools.timeline"}].map(ke=>JSON.stringify(ke)).join(`,
+`))}t.startTracing=b;function T(){j.assert(Zn,"Tracing is not in progress"),j.assert(!!p.length==(h!=="server")),r.writeSync(u,`
+]
+`),r.closeSync(u),Zn=void 0,p.length?re(p):C[C.length-1].typesPath=void 0}t.stopTracing=T;function E(pe){h!=="server"&&p.push(pe)}t.recordType=E,(pe=>{pe.Parse="parse",pe.Program="program",pe.Bind="bind",pe.Check="check",pe.CheckTypes="checkTypes",pe.Emit="emit",pe.Session="session"})(t.Phase||(t.Phase={}));function N(pe,de,ue){Z("I",pe,de,ue,'"s":"g"')}t.instant=N;const R=[];function F(pe,de,ue,Ie=!1){Ie&&Z("B",pe,de,ue),R.push({phase:pe,name:de,args:ue,time:1e3*sl(),separateBeginAndEnd:Ie})}t.push=F;function H(pe){j.assert(R.length>0),X(R.length-1,1e3*sl(),pe),R.length--}t.pop=H;function U(){const pe=1e3*sl();for(let de=R.length-1;de>=0;de--)X(de,pe);R.length=0}t.popAll=U;const q=1e3*10;function X(pe,de,ue){const{phase:Ie,name:we,args:he,time:Ae,separateBeginAndEnd:ke}=R[pe];ke?(j.assert(!ue,"`results` are not supported for events with `separateBeginAndEnd`"),Z("E",Ie,we,he,void 0,de)):q-Ae%q<=de-Ae&&Z("X",Ie,we,{...he,results:ue},`"dur":${de-Ae}`,Ae)}function Z(pe,de,ue,Ie,we,he=1e3*sl()){h==="server"&&de==="checkTypes"||(ou("beginTracing"),r.writeSync(u,`,
+{"pid":1,"tid":1,"ph":"${pe}","cat":"${de}","ts":${he},"name":"${ue}"`),we&&r.writeSync(u,`,${we}`),Ie&&r.writeSync(u,`,"args":${JSON.stringify(Ie)}`),r.writeSync(u,"}"),ou("endTracing"),Wm("Tracing","beginTracing","endTracing"))}function Q(pe){const de=_n(pe);return de?{path:de.path,start:ue(Ia(de,pe.pos)),end:ue(Ia(de,pe.end))}:void 0;function ue(Ie){return{line:Ie.line+1,character:Ie.character+1}}}function re(pe){var de,ue,Ie,we,he,Ae,ke,Te,De,qe,se,Ne,Oe,He,Pe,We,ze,Nt,$e;ou("beginDumpTypes");const et=C[C.length-1].typesPath,Me=r.openSync(et,"w"),ut=new Map;r.writeSync(Me,"[");const wt=pe.length;for(let Et=0;Et<wt;Et++){const dt=pe[Et],zt=dt.objectFlags,Ei=dt.aliasSymbol??dt.symbol;let tn;if(zt&16|dt.flags&2944)try{tn=(de=dt.checker)==null?void 0:de.typeToString(dt)}catch{tn=void 0}let xn={};if(dt.flags&8388608){const ls=dt;xn={indexedAccessObjectType:(ue=ls.objectType)==null?void 0:ue.id,indexedAccessIndexType:(Ie=ls.indexType)==null?void 0:Ie.id}}let Pn={};if(zt&4){const ls=dt;Pn={instantiatedType:(we=ls.target)==null?void 0:we.id,typeArguments:(he=ls.resolvedTypeArguments)==null?void 0:he.map(Qs=>Qs.id),referenceLocation:Q(ls.node)}}let _i={};if(dt.flags&16777216){const ls=dt;_i={conditionalCheckType:(Ae=ls.checkType)==null?void 0:Ae.id,conditionalExtendsType:(ke=ls.extendsType)==null?void 0:ke.id,conditionalTrueType:((Te=ls.resolvedTrueType)==null?void 0:Te.id)??-1,conditionalFalseType:((De=ls.resolvedFalseType)==null?void 0:De.id)??-1}}let Fi={};if(dt.flags&33554432){const ls=dt;Fi={substitutionBaseType:(qe=ls.baseType)==null?void 0:qe.id,constraintType:(se=ls.constraint)==null?void 0:se.id}}let On={};if(zt&1024){const ls=dt;On={reverseMappedSourceType:(Ne=ls.source)==null?void 0:Ne.id,reverseMappedMappedType:(Oe=ls.mappedType)==null?void 0:Oe.id,reverseMappedConstraintType:(He=ls.constraintType)==null?void 0:He.id}}let pn={};if(zt&256){const ls=dt;pn={evolvingArrayElementType:ls.elementType.id,evolvingArrayFinalType:(Pe=ls.finalArrayType)==null?void 0:Pe.id}}let qr;const Fs=dt.checker.getRecursionIdentity(dt);Fs&&(qr=ut.get(Fs),qr||(qr=ut.size,ut.set(Fs,qr)));const ko={id:dt.id,intrinsicName:dt.intrinsicName,symbolName:(Ei==null?void 0:Ei.escapedName)&&Ws(Ei.escapedName),recursionId:qr,isTuple:zt&8?!0:void 0,unionTypes:dt.flags&1048576?(We=dt.types)==null?void 0:We.map(ls=>ls.id):void 0,intersectionTypes:dt.flags&2097152?dt.types.map(ls=>ls.id):void 0,aliasTypeArguments:(ze=dt.aliasTypeArguments)==null?void 0:ze.map(ls=>ls.id),keyofType:dt.flags&4194304?(Nt=dt.type)==null?void 0:Nt.id:void 0,...xn,...Pn,..._i,...Fi,...On,...pn,destructuringPattern:Q(dt.pattern),firstDeclaration:Q(($e=Ei==null?void 0:Ei.declarations)==null?void 0:$e[0]),flags:j.formatTypeFlags(dt.flags).split("|"),display:tn};r.writeSync(Me,JSON.stringify(ko)),Et<wt-1&&r.writeSync(Me,`,
+`)}r.writeSync(Me,`]
+`),r.closeSync(Me),ou("endDumpTypes"),Wm("Dump types","beginDumpTypes","endDumpTypes")}function oe(){g&&r.writeFileSync(g,JSON.stringify(C))}t.dumpLegend=oe})(vW||(vW={}));var Nxe=vW.startTracing,Lxe=vW.dumpLegend,loe=(t=>(t[t.Unknown=0]="Unknown",t[t.EndOfFileToken=1]="EndOfFileToken",t[t.SingleLineCommentTrivia=2]="SingleLineCommentTrivia",t[t.MultiLineCommentTrivia=3]="MultiLineCommentTrivia",t[t.NewLineTrivia=4]="NewLineTrivia",t[t.WhitespaceTrivia=5]="WhitespaceTrivia",t[t.ShebangTrivia=6]="ShebangTrivia",t[t.ConflictMarkerTrivia=7]="ConflictMarkerTrivia",t[t.NonTextFileMarkerTrivia=8]="NonTextFileMarkerTrivia",t[t.NumericLiteral=9]="NumericLiteral",t[t.BigIntLiteral=10]="BigIntLiteral",t[t.StringLiteral=11]="StringLiteral",t[t.JsxText=12]="JsxText",t[t.JsxTextAllWhiteSpaces=13]="JsxTextAllWhiteSpaces",t[t.RegularExpressionLiteral=14]="RegularExpressionLiteral",t[t.NoSubstitutionTemplateLiteral=15]="NoSubstitutionTemplateLiteral",t[t.TemplateHead=16]="TemplateHead",t[t.TemplateMiddle=17]="TemplateMiddle",t[t.TemplateTail=18]="TemplateTail",t[t.OpenBraceToken=19]="OpenBraceToken",t[t.CloseBraceToken=20]="CloseBraceToken",t[t.OpenParenToken=21]="OpenParenToken",t[t.CloseParenToken=22]="CloseParenToken",t[t.OpenBracketToken=23]="OpenBracketToken",t[t.CloseBracketToken=24]="CloseBracketToken",t[t.DotToken=25]="DotToken",t[t.DotDotDotToken=26]="DotDotDotToken",t[t.SemicolonToken=27]="SemicolonToken",t[t.CommaToken=28]="CommaToken",t[t.QuestionDotToken=29]="QuestionDotToken",t[t.LessThanToken=30]="LessThanToken",t[t.LessThanSlashToken=31]="LessThanSlashToken",t[t.GreaterThanToken=32]="GreaterThanToken",t[t.LessThanEqualsToken=33]="LessThanEqualsToken",t[t.GreaterThanEqualsToken=34]="GreaterThanEqualsToken",t[t.EqualsEqualsToken=35]="EqualsEqualsToken",t[t.ExclamationEqualsToken=36]="ExclamationEqualsToken",t[t.EqualsEqualsEqualsToken=37]="EqualsEqualsEqualsToken",t[t.ExclamationEqualsEqualsToken=38]="ExclamationEqualsEqualsToken",t[t.EqualsGreaterThanToken=39]="EqualsGreaterThanToken",t[t.PlusToken=40]="PlusToken",t[t.MinusToken=41]="MinusToken",t[t.AsteriskToken=42]="AsteriskToken",t[t.AsteriskAsteriskToken=43]="AsteriskAsteriskToken",t[t.SlashToken=44]="SlashToken",t[t.PercentToken=45]="PercentToken",t[t.PlusPlusToken=46]="PlusPlusToken",t[t.MinusMinusToken=47]="MinusMinusToken",t[t.LessThanLessThanToken=48]="LessThanLessThanToken",t[t.GreaterThanGreaterThanToken=49]="GreaterThanGreaterThanToken",t[t.GreaterThanGreaterThanGreaterThanToken=50]="GreaterThanGreaterThanGreaterThanToken",t[t.AmpersandToken=51]="AmpersandToken",t[t.BarToken=52]="BarToken",t[t.CaretToken=53]="CaretToken",t[t.ExclamationToken=54]="ExclamationToken",t[t.TildeToken=55]="TildeToken",t[t.AmpersandAmpersandToken=56]="AmpersandAmpersandToken",t[t.BarBarToken=57]="BarBarToken",t[t.QuestionToken=58]="QuestionToken",t[t.ColonToken=59]="ColonToken",t[t.AtToken=60]="AtToken",t[t.QuestionQuestionToken=61]="QuestionQuestionToken",t[t.BacktickToken=62]="BacktickToken",t[t.HashToken=63]="HashToken",t[t.EqualsToken=64]="EqualsToken",t[t.PlusEqualsToken=65]="PlusEqualsToken",t[t.MinusEqualsToken=66]="MinusEqualsToken",t[t.AsteriskEqualsToken=67]="AsteriskEqualsToken",t[t.AsteriskAsteriskEqualsToken=68]="AsteriskAsteriskEqualsToken",t[t.SlashEqualsToken=69]="SlashEqualsToken",t[t.PercentEqualsToken=70]="PercentEqualsToken",t[t.LessThanLessThanEqualsToken=71]="LessThanLessThanEqualsToken",t[t.GreaterThanGreaterThanEqualsToken=72]="GreaterThanGreaterThanEqualsToken",t[t.GreaterThanGreaterThanGreaterThanEqualsToken=73]="GreaterThanGreaterThanGreaterThanEqualsToken",t[t.AmpersandEqualsToken=74]="AmpersandEqualsToken",t[t.BarEqualsToken=75]="BarEqualsToken",t[t.BarBarEqualsToken=76]="BarBarEqualsToken",t[t.AmpersandAmpersandEqualsToken=77]="AmpersandAmpersandEqualsToken",t[t.QuestionQuestionEqualsToken=78]="QuestionQuestionEqualsToken",t[t.CaretEqualsToken=79]="CaretEqualsToken",t[t.Identifier=80]="Identifier",t[t.PrivateIdentifier=81]="PrivateIdentifier",t[t.JSDocCommentTextToken=82]="JSDocCommentTextToken",t[t.BreakKeyword=83]="BreakKeyword",t[t.CaseKeyword=84]="CaseKeyword",t[t.CatchKeyword=85]="CatchKeyword",t[t.ClassKeyword=86]="ClassKeyword",t[t.ConstKeyword=87]="ConstKeyword",t[t.ContinueKeyword=88]="ContinueKeyword",t[t.DebuggerKeyword=89]="DebuggerKeyword",t[t.DefaultKeyword=90]="DefaultKeyword",t[t.DeleteKeyword=91]="DeleteKeyword",t[t.DoKeyword=92]="DoKeyword",t[t.ElseKeyword=93]="ElseKeyword",t[t.EnumKeyword=94]="EnumKeyword",t[t.ExportKeyword=95]="ExportKeyword",t[t.ExtendsKeyword=96]="ExtendsKeyword",t[t.FalseKeyword=97]="FalseKeyword",t[t.FinallyKeyword=98]="FinallyKeyword",t[t.ForKeyword=99]="ForKeyword",t[t.FunctionKeyword=100]="FunctionKeyword",t[t.IfKeyword=101]="IfKeyword",t[t.ImportKeyword=102]="ImportKeyword",t[t.InKeyword=103]="InKeyword",t[t.InstanceOfKeyword=104]="InstanceOfKeyword",t[t.NewKeyword=105]="NewKeyword",t[t.NullKeyword=106]="NullKeyword",t[t.ReturnKeyword=107]="ReturnKeyword",t[t.SuperKeyword=108]="SuperKeyword",t[t.SwitchKeyword=109]="SwitchKeyword",t[t.ThisKeyword=110]="ThisKeyword",t[t.ThrowKeyword=111]="ThrowKeyword",t[t.TrueKeyword=112]="TrueKeyword",t[t.TryKeyword=113]="TryKeyword",t[t.TypeOfKeyword=114]="TypeOfKeyword",t[t.VarKeyword=115]="VarKeyword",t[t.VoidKeyword=116]="VoidKeyword",t[t.WhileKeyword=117]="WhileKeyword",t[t.WithKeyword=118]="WithKeyword",t[t.ImplementsKeyword=119]="ImplementsKeyword",t[t.InterfaceKeyword=120]="InterfaceKeyword",t[t.LetKeyword=121]="LetKeyword",t[t.PackageKeyword=122]="PackageKeyword",t[t.PrivateKeyword=123]="PrivateKeyword",t[t.ProtectedKeyword=124]="ProtectedKeyword",t[t.PublicKeyword=125]="PublicKeyword",t[t.StaticKeyword=126]="StaticKeyword",t[t.YieldKeyword=127]="YieldKeyword",t[t.AbstractKeyword=128]="AbstractKeyword",t[t.AccessorKeyword=129]="AccessorKeyword",t[t.AsKeyword=130]="AsKeyword",t[t.AssertsKeyword=131]="AssertsKeyword",t[t.AssertKeyword=132]="AssertKeyword",t[t.AnyKeyword=133]="AnyKeyword",t[t.AsyncKeyword=134]="AsyncKeyword",t[t.AwaitKeyword=135]="AwaitKeyword",t[t.BooleanKeyword=136]="BooleanKeyword",t[t.ConstructorKeyword=137]="ConstructorKeyword",t[t.DeclareKeyword=138]="DeclareKeyword",t[t.GetKeyword=139]="GetKeyword",t[t.InferKeyword=140]="InferKeyword",t[t.IntrinsicKeyword=141]="IntrinsicKeyword",t[t.IsKeyword=142]="IsKeyword",t[t.KeyOfKeyword=143]="KeyOfKeyword",t[t.ModuleKeyword=144]="ModuleKeyword",t[t.NamespaceKeyword=145]="NamespaceKeyword",t[t.NeverKeyword=146]="NeverKeyword",t[t.OutKeyword=147]="OutKeyword",t[t.ReadonlyKeyword=148]="ReadonlyKeyword",t[t.RequireKeyword=149]="RequireKeyword",t[t.NumberKeyword=150]="NumberKeyword",t[t.ObjectKeyword=151]="ObjectKeyword",t[t.SatisfiesKeyword=152]="SatisfiesKeyword",t[t.SetKeyword=153]="SetKeyword",t[t.StringKeyword=154]="StringKeyword",t[t.SymbolKeyword=155]="SymbolKeyword",t[t.TypeKeyword=156]="TypeKeyword",t[t.UndefinedKeyword=157]="UndefinedKeyword",t[t.UniqueKeyword=158]="UniqueKeyword",t[t.UnknownKeyword=159]="UnknownKeyword",t[t.UsingKeyword=160]="UsingKeyword",t[t.FromKeyword=161]="FromKeyword",t[t.GlobalKeyword=162]="GlobalKeyword",t[t.BigIntKeyword=163]="BigIntKeyword",t[t.OverrideKeyword=164]="OverrideKeyword",t[t.OfKeyword=165]="OfKeyword",t[t.QualifiedName=166]="QualifiedName",t[t.ComputedPropertyName=167]="ComputedPropertyName",t[t.TypeParameter=168]="TypeParameter",t[t.Parameter=169]="Parameter",t[t.Decorator=170]="Decorator",t[t.PropertySignature=171]="PropertySignature",t[t.PropertyDeclaration=172]="PropertyDeclaration",t[t.MethodSignature=173]="MethodSignature",t[t.MethodDeclaration=174]="MethodDeclaration",t[t.ClassStaticBlockDeclaration=175]="ClassStaticBlockDeclaration",t[t.Constructor=176]="Constructor",t[t.GetAccessor=177]="GetAccessor",t[t.SetAccessor=178]="SetAccessor",t[t.CallSignature=179]="CallSignature",t[t.ConstructSignature=180]="ConstructSignature",t[t.IndexSignature=181]="IndexSignature",t[t.TypePredicate=182]="TypePredicate",t[t.TypeReference=183]="TypeReference",t[t.FunctionType=184]="FunctionType",t[t.ConstructorType=185]="ConstructorType",t[t.TypeQuery=186]="TypeQuery",t[t.TypeLiteral=187]="TypeLiteral",t[t.ArrayType=188]="ArrayType",t[t.TupleType=189]="TupleType",t[t.OptionalType=190]="OptionalType",t[t.RestType=191]="RestType",t[t.UnionType=192]="UnionType",t[t.IntersectionType=193]="IntersectionType",t[t.ConditionalType=194]="ConditionalType",t[t.InferType=195]="InferType",t[t.ParenthesizedType=196]="ParenthesizedType",t[t.ThisType=197]="ThisType",t[t.TypeOperator=198]="TypeOperator",t[t.IndexedAccessType=199]="IndexedAccessType",t[t.MappedType=200]="MappedType",t[t.LiteralType=201]="LiteralType",t[t.NamedTupleMember=202]="NamedTupleMember",t[t.TemplateLiteralType=203]="TemplateLiteralType",t[t.TemplateLiteralTypeSpan=204]="TemplateLiteralTypeSpan",t[t.ImportType=205]="ImportType",t[t.ObjectBindingPattern=206]="ObjectBindingPattern",t[t.ArrayBindingPattern=207]="ArrayBindingPattern",t[t.BindingElement=208]="BindingElement",t[t.ArrayLiteralExpression=209]="ArrayLiteralExpression",t[t.ObjectLiteralExpression=210]="ObjectLiteralExpression",t[t.PropertyAccessExpression=211]="PropertyAccessExpression",t[t.ElementAccessExpression=212]="ElementAccessExpression",t[t.CallExpression=213]="CallExpression",t[t.NewExpression=214]="NewExpression",t[t.TaggedTemplateExpression=215]="TaggedTemplateExpression",t[t.TypeAssertionExpression=216]="TypeAssertionExpression",t[t.ParenthesizedExpression=217]="ParenthesizedExpression",t[t.FunctionExpression=218]="FunctionExpression",t[t.ArrowFunction=219]="ArrowFunction",t[t.DeleteExpression=220]="DeleteExpression",t[t.TypeOfExpression=221]="TypeOfExpression",t[t.VoidExpression=222]="VoidExpression",t[t.AwaitExpression=223]="AwaitExpression",t[t.PrefixUnaryExpression=224]="PrefixUnaryExpression",t[t.PostfixUnaryExpression=225]="PostfixUnaryExpression",t[t.BinaryExpression=226]="BinaryExpression",t[t.ConditionalExpression=227]="ConditionalExpression",t[t.TemplateExpression=228]="TemplateExpression",t[t.YieldExpression=229]="YieldExpression",t[t.SpreadElement=230]="SpreadElement",t[t.ClassExpression=231]="ClassExpression",t[t.OmittedExpression=232]="OmittedExpression",t[t.ExpressionWithTypeArguments=233]="ExpressionWithTypeArguments",t[t.AsExpression=234]="AsExpression",t[t.NonNullExpression=235]="NonNullExpression",t[t.MetaProperty=236]="MetaProperty",t[t.SyntheticExpression=237]="SyntheticExpression",t[t.SatisfiesExpression=238]="SatisfiesExpression",t[t.TemplateSpan=239]="TemplateSpan",t[t.SemicolonClassElement=240]="SemicolonClassElement",t[t.Block=241]="Block",t[t.EmptyStatement=242]="EmptyStatement",t[t.VariableStatement=243]="VariableStatement",t[t.ExpressionStatement=244]="ExpressionStatement",t[t.IfStatement=245]="IfStatement",t[t.DoStatement=246]="DoStatement",t[t.WhileStatement=247]="WhileStatement",t[t.ForStatement=248]="ForStatement",t[t.ForInStatement=249]="ForInStatement",t[t.ForOfStatement=250]="ForOfStatement",t[t.ContinueStatement=251]="ContinueStatement",t[t.BreakStatement=252]="BreakStatement",t[t.ReturnStatement=253]="ReturnStatement",t[t.WithStatement=254]="WithStatement",t[t.SwitchStatement=255]="SwitchStatement",t[t.LabeledStatement=256]="LabeledStatement",t[t.ThrowStatement=257]="ThrowStatement",t[t.TryStatement=258]="TryStatement",t[t.DebuggerStatement=259]="DebuggerStatement",t[t.VariableDeclaration=260]="VariableDeclaration",t[t.VariableDeclarationList=261]="VariableDeclarationList",t[t.FunctionDeclaration=262]="FunctionDeclaration",t[t.ClassDeclaration=263]="ClassDeclaration",t[t.InterfaceDeclaration=264]="InterfaceDeclaration",t[t.TypeAliasDeclaration=265]="TypeAliasDeclaration",t[t.EnumDeclaration=266]="EnumDeclaration",t[t.ModuleDeclaration=267]="ModuleDeclaration",t[t.ModuleBlock=268]="ModuleBlock",t[t.CaseBlock=269]="CaseBlock",t[t.NamespaceExportDeclaration=270]="NamespaceExportDeclaration",t[t.ImportEqualsDeclaration=271]="ImportEqualsDeclaration",t[t.ImportDeclaration=272]="ImportDeclaration",t[t.ImportClause=273]="ImportClause",t[t.NamespaceImport=274]="NamespaceImport",t[t.NamedImports=275]="NamedImports",t[t.ImportSpecifier=276]="ImportSpecifier",t[t.ExportAssignment=277]="ExportAssignment",t[t.ExportDeclaration=278]="ExportDeclaration",t[t.NamedExports=279]="NamedExports",t[t.NamespaceExport=280]="NamespaceExport",t[t.ExportSpecifier=281]="ExportSpecifier",t[t.MissingDeclaration=282]="MissingDeclaration",t[t.ExternalModuleReference=283]="ExternalModuleReference",t[t.JsxElement=284]="JsxElement",t[t.JsxSelfClosingElement=285]="JsxSelfClosingElement",t[t.JsxOpeningElement=286]="JsxOpeningElement",t[t.JsxClosingElement=287]="JsxClosingElement",t[t.JsxFragment=288]="JsxFragment",t[t.JsxOpeningFragment=289]="JsxOpeningFragment",t[t.JsxClosingFragment=290]="JsxClosingFragment",t[t.JsxAttribute=291]="JsxAttribute",t[t.JsxAttributes=292]="JsxAttributes",t[t.JsxSpreadAttribute=293]="JsxSpreadAttribute",t[t.JsxExpression=294]="JsxExpression",t[t.JsxNamespacedName=295]="JsxNamespacedName",t[t.CaseClause=296]="CaseClause",t[t.DefaultClause=297]="DefaultClause",t[t.HeritageClause=298]="HeritageClause",t[t.CatchClause=299]="CatchClause",t[t.ImportAttributes=300]="ImportAttributes",t[t.ImportAttribute=301]="ImportAttribute",t[t.AssertClause=300]="AssertClause",t[t.AssertEntry=301]="AssertEntry",t[t.ImportTypeAssertionContainer=302]="ImportTypeAssertionContainer",t[t.PropertyAssignment=303]="PropertyAssignment",t[t.ShorthandPropertyAssignment=304]="ShorthandPropertyAssignment",t[t.SpreadAssignment=305]="SpreadAssignment",t[t.EnumMember=306]="EnumMember",t[t.SourceFile=307]="SourceFile",t[t.Bundle=308]="Bundle",t[t.JSDocTypeExpression=309]="JSDocTypeExpression",t[t.JSDocNameReference=310]="JSDocNameReference",t[t.JSDocMemberName=311]="JSDocMemberName",t[t.JSDocAllType=312]="JSDocAllType",t[t.JSDocUnknownType=313]="JSDocUnknownType",t[t.JSDocNullableType=314]="JSDocNullableType",t[t.JSDocNonNullableType=315]="JSDocNonNullableType",t[t.JSDocOptionalType=316]="JSDocOptionalType",t[t.JSDocFunctionType=317]="JSDocFunctionType",t[t.JSDocVariadicType=318]="JSDocVariadicType",t[t.JSDocNamepathType=319]="JSDocNamepathType",t[t.JSDoc=320]="JSDoc",t[t.JSDocComment=320]="JSDocComment",t[t.JSDocText=321]="JSDocText",t[t.JSDocTypeLiteral=322]="JSDocTypeLiteral",t[t.JSDocSignature=323]="JSDocSignature",t[t.JSDocLink=324]="JSDocLink",t[t.JSDocLinkCode=325]="JSDocLinkCode",t[t.JSDocLinkPlain=326]="JSDocLinkPlain",t[t.JSDocTag=327]="JSDocTag",t[t.JSDocAugmentsTag=328]="JSDocAugmentsTag",t[t.JSDocImplementsTag=329]="JSDocImplementsTag",t[t.JSDocAuthorTag=330]="JSDocAuthorTag",t[t.JSDocDeprecatedTag=331]="JSDocDeprecatedTag",t[t.JSDocClassTag=332]="JSDocClassTag",t[t.JSDocPublicTag=333]="JSDocPublicTag",t[t.JSDocPrivateTag=334]="JSDocPrivateTag",t[t.JSDocProtectedTag=335]="JSDocProtectedTag",t[t.JSDocReadonlyTag=336]="JSDocReadonlyTag",t[t.JSDocOverrideTag=337]="JSDocOverrideTag",t[t.JSDocCallbackTag=338]="JSDocCallbackTag",t[t.JSDocOverloadTag=339]="JSDocOverloadTag",t[t.JSDocEnumTag=340]="JSDocEnumTag",t[t.JSDocParameterTag=341]="JSDocParameterTag",t[t.JSDocReturnTag=342]="JSDocReturnTag",t[t.JSDocThisTag=343]="JSDocThisTag",t[t.JSDocTypeTag=344]="JSDocTypeTag",t[t.JSDocTemplateTag=345]="JSDocTemplateTag",t[t.JSDocTypedefTag=346]="JSDocTypedefTag",t[t.JSDocSeeTag=347]="JSDocSeeTag",t[t.JSDocPropertyTag=348]="JSDocPropertyTag",t[t.JSDocThrowsTag=349]="JSDocThrowsTag",t[t.JSDocSatisfiesTag=350]="JSDocSatisfiesTag",t[t.JSDocImportTag=351]="JSDocImportTag",t[t.SyntaxList=352]="SyntaxList",t[t.NotEmittedStatement=353]="NotEmittedStatement",t[t.PartiallyEmittedExpression=354]="PartiallyEmittedExpression",t[t.CommaListExpression=355]="CommaListExpression",t[t.SyntheticReferenceExpression=356]="SyntheticReferenceExpression",t[t.Count=357]="Count",t[t.FirstAssignment=64]="FirstAssignment",t[t.LastAssignment=79]="LastAssignment",t[t.FirstCompoundAssignment=65]="FirstCompoundAssignment",t[t.LastCompoundAssignment=79]="LastCompoundAssignment",t[t.FirstReservedWord=83]="FirstReservedWord",t[t.LastReservedWord=118]="LastReservedWord",t[t.FirstKeyword=83]="FirstKeyword",t[t.LastKeyword=165]="LastKeyword",t[t.FirstFutureReservedWord=119]="FirstFutureReservedWord",t[t.LastFutureReservedWord=127]="LastFutureReservedWord",t[t.FirstTypeNode=182]="FirstTypeNode",t[t.LastTypeNode=205]="LastTypeNode",t[t.FirstPunctuation=19]="FirstPunctuation",t[t.LastPunctuation=79]="LastPunctuation",t[t.FirstToken=0]="FirstToken",t[t.LastToken=165]="LastToken",t[t.FirstTriviaToken=2]="FirstTriviaToken",t[t.LastTriviaToken=7]="LastTriviaToken",t[t.FirstLiteralToken=9]="FirstLiteralToken",t[t.LastLiteralToken=15]="LastLiteralToken",t[t.FirstTemplateToken=15]="FirstTemplateToken",t[t.LastTemplateToken=18]="LastTemplateToken",t[t.FirstBinaryOperator=30]="FirstBinaryOperator",t[t.LastBinaryOperator=79]="LastBinaryOperator",t[t.FirstStatement=243]="FirstStatement",t[t.LastStatement=259]="LastStatement",t[t.FirstNode=166]="FirstNode",t[t.FirstJSDocNode=309]="FirstJSDocNode",t[t.LastJSDocNode=351]="LastJSDocNode",t[t.FirstJSDocTagNode=327]="FirstJSDocTagNode",t[t.LastJSDocTagNode=351]="LastJSDocTagNode",t[t.FirstContextualKeyword=128]="FirstContextualKeyword",t[t.LastContextualKeyword=165]="LastContextualKeyword",t))(loe||{}),uoe=(t=>(t[t.None=0]="None",t[t.Let=1]="Let",t[t.Const=2]="Const",t[t.Using=4]="Using",t[t.AwaitUsing=6]="AwaitUsing",t[t.NestedNamespace=8]="NestedNamespace",t[t.Synthesized=16]="Synthesized",t[t.Namespace=32]="Namespace",t[t.OptionalChain=64]="OptionalChain",t[t.ExportContext=128]="ExportContext",t[t.ContainsThis=256]="ContainsThis",t[t.HasImplicitReturn=512]="HasImplicitReturn",t[t.HasExplicitReturn=1024]="HasExplicitReturn",t[t.GlobalAugmentation=2048]="GlobalAugmentation",t[t.HasAsyncFunctions=4096]="HasAsyncFunctions",t[t.DisallowInContext=8192]="DisallowInContext",t[t.YieldContext=16384]="YieldContext",t[t.DecoratorContext=32768]="DecoratorContext",t[t.AwaitContext=65536]="AwaitContext",t[t.DisallowConditionalTypesContext=131072]="DisallowConditionalTypesContext",t[t.ThisNodeHasError=262144]="ThisNodeHasError",t[t.JavaScriptFile=524288]="JavaScriptFile",t[t.ThisNodeOrAnySubNodesHasError=1048576]="ThisNodeOrAnySubNodesHasError",t[t.HasAggregatedChildData=2097152]="HasAggregatedChildData",t[t.PossiblyContainsDynamicImport=4194304]="PossiblyContainsDynamicImport",t[t.PossiblyContainsImportMeta=8388608]="PossiblyContainsImportMeta",t[t.JSDoc=16777216]="JSDoc",t[t.Ambient=33554432]="Ambient",t[t.InWithStatement=67108864]="InWithStatement",t[t.JsonFile=134217728]="JsonFile",t[t.TypeCached=268435456]="TypeCached",t[t.Deprecated=536870912]="Deprecated",t[t.BlockScoped=7]="BlockScoped",t[t.Constant=6]="Constant",t[t.ReachabilityCheckFlags=1536]="ReachabilityCheckFlags",t[t.ReachabilityAndEmitFlags=5632]="ReachabilityAndEmitFlags",t[t.ContextFlags=101441536]="ContextFlags",t[t.TypeExcludesFlags=81920]="TypeExcludesFlags",t[t.PermanentlySetIncrementalFlags=12582912]="PermanentlySetIncrementalFlags",t[t.IdentifierHasExtendedUnicodeEscape=256]="IdentifierHasExtendedUnicodeEscape",t[t.IdentifierIsInJSDocNamespace=4096]="IdentifierIsInJSDocNamespace",t))(uoe||{}),doe=(t=>(t[t.None=0]="None",t[t.Public=1]="Public",t[t.Private=2]="Private",t[t.Protected=4]="Protected",t[t.Readonly=8]="Readonly",t[t.Override=16]="Override",t[t.Export=32]="Export",t[t.Abstract=64]="Abstract",t[t.Ambient=128]="Ambient",t[t.Static=256]="Static",t[t.Accessor=512]="Accessor",t[t.Async=1024]="Async",t[t.Default=2048]="Default",t[t.Const=4096]="Const",t[t.In=8192]="In",t[t.Out=16384]="Out",t[t.Decorator=32768]="Decorator",t[t.Deprecated=65536]="Deprecated",t[t.JSDocPublic=8388608]="JSDocPublic",t[t.JSDocPrivate=16777216]="JSDocPrivate",t[t.JSDocProtected=33554432]="JSDocProtected",t[t.JSDocReadonly=67108864]="JSDocReadonly",t[t.JSDocOverride=134217728]="JSDocOverride",t[t.SyntacticOrJSDocModifiers=31]="SyntacticOrJSDocModifiers",t[t.SyntacticOnlyModifiers=65504]="SyntacticOnlyModifiers",t[t.SyntacticModifiers=65535]="SyntacticModifiers",t[t.JSDocCacheOnlyModifiers=260046848]="JSDocCacheOnlyModifiers",t[t.JSDocOnlyModifiers=65536]="JSDocOnlyModifiers",t[t.NonCacheOnlyModifiers=131071]="NonCacheOnlyModifiers",t[t.HasComputedJSDocModifiers=268435456]="HasComputedJSDocModifiers",t[t.HasComputedFlags=536870912]="HasComputedFlags",t[t.AccessibilityModifier=7]="AccessibilityModifier",t[t.ParameterPropertyModifier=31]="ParameterPropertyModifier",t[t.NonPublicAccessibilityModifier=6]="NonPublicAccessibilityModifier",t[t.TypeScriptModifier=28895]="TypeScriptModifier",t[t.ExportDefault=2080]="ExportDefault",t[t.All=131071]="All",t[t.Modifier=98303]="Modifier",t))(doe||{}),Pxe=(t=>(t[t.None=0]="None",t[t.IntrinsicNamedElement=1]="IntrinsicNamedElement",t[t.IntrinsicIndexedElement=2]="IntrinsicIndexedElement",t[t.IntrinsicElement=3]="IntrinsicElement",t))(Pxe||{}),foe=(t=>(t[t.None=0]="None",t[t.Succeeded=1]="Succeeded",t[t.Failed=2]="Failed",t[t.ReportsUnmeasurable=8]="ReportsUnmeasurable",t[t.ReportsUnreliable=16]="ReportsUnreliable",t[t.ReportsMask=24]="ReportsMask",t[t.ComplexityOverflow=32]="ComplexityOverflow",t[t.StackDepthOverflow=64]="StackDepthOverflow",t[t.Overflow=96]="Overflow",t))(foe||{}),Axe=(t=>(t[t.None=0]="None",t[t.Always=1]="Always",t[t.Never=2]="Never",t[t.Sometimes=3]="Sometimes",t))(Axe||{}),hoe=(t=>(t[t.None=0]="None",t[t.Auto=1]="Auto",t[t.Loop=2]="Loop",t[t.Unique=3]="Unique",t[t.Node=4]="Node",t[t.KindMask=7]="KindMask",t[t.ReservedInNestedScopes=8]="ReservedInNestedScopes",t[t.Optimistic=16]="Optimistic",t[t.FileLevel=32]="FileLevel",t[t.AllowNameSubstitution=64]="AllowNameSubstitution",t))(hoe||{}),Oxe=(t=>(t[t.None=0]="None",t[t.HasIndices=1]="HasIndices",t[t.Global=2]="Global",t[t.IgnoreCase=4]="IgnoreCase",t[t.Multiline=8]="Multiline",t[t.DotAll=16]="DotAll",t[t.Unicode=32]="Unicode",t[t.UnicodeSets=64]="UnicodeSets",t[t.Sticky=128]="Sticky",t[t.AnyUnicodeMode=96]="AnyUnicodeMode",t[t.Modifiers=28]="Modifiers",t))(Oxe||{}),Mxe=(t=>(t[t.None=0]="None",t[t.PrecedingLineBreak=1]="PrecedingLineBreak",t[t.PrecedingJSDocComment=2]="PrecedingJSDocComment",t[t.Unterminated=4]="Unterminated",t[t.ExtendedUnicodeEscape=8]="ExtendedUnicodeEscape",t[t.Scientific=16]="Scientific",t[t.Octal=32]="Octal",t[t.HexSpecifier=64]="HexSpecifier",t[t.BinarySpecifier=128]="BinarySpecifier",t[t.OctalSpecifier=256]="OctalSpecifier",t[t.ContainsSeparator=512]="ContainsSeparator",t[t.UnicodeEscape=1024]="UnicodeEscape",t[t.ContainsInvalidEscape=2048]="ContainsInvalidEscape",t[t.HexEscape=4096]="HexEscape",t[t.ContainsLeadingZero=8192]="ContainsLeadingZero",t[t.ContainsInvalidSeparator=16384]="ContainsInvalidSeparator",t[t.PrecedingJSDocLeadingAsterisks=32768]="PrecedingJSDocLeadingAsterisks",t[t.BinaryOrOctalSpecifier=384]="BinaryOrOctalSpecifier",t[t.WithSpecifier=448]="WithSpecifier",t[t.StringLiteralFlags=7176]="StringLiteralFlags",t[t.NumericLiteralFlags=25584]="NumericLiteralFlags",t[t.TemplateLiteralLikeFlags=7176]="TemplateLiteralLikeFlags",t[t.IsInvalid=26656]="IsInvalid",t))(Mxe||{}),$J=(t=>(t[t.Unreachable=1]="Unreachable",t[t.Start=2]="Start",t[t.BranchLabel=4]="BranchLabel",t[t.LoopLabel=8]="LoopLabel",t[t.Assignment=16]="Assignment",t[t.TrueCondition=32]="TrueCondition",t[t.FalseCondition=64]="FalseCondition",t[t.SwitchClause=128]="SwitchClause",t[t.ArrayMutation=256]="ArrayMutation",t[t.Call=512]="Call",t[t.ReduceLabel=1024]="ReduceLabel",t[t.Referenced=2048]="Referenced",t[t.Shared=4096]="Shared",t[t.Label=12]="Label",t[t.Condition=96]="Condition",t))($J||{}),Rxe=(t=>(t[t.ExpectError=0]="ExpectError",t[t.Ignore=1]="Ignore",t))(Rxe||{}),t8=class{},_oe=(t=>(t[t.RootFile=0]="RootFile",t[t.SourceFromProjectReference=1]="SourceFromProjectReference",t[t.OutputFromProjectReference=2]="OutputFromProjectReference",t[t.Import=3]="Import",t[t.ReferenceFile=4]="ReferenceFile",t[t.TypeReferenceDirective=5]="TypeReferenceDirective",t[t.LibFile=6]="LibFile",t[t.LibReferenceDirective=7]="LibReferenceDirective",t[t.AutomaticTypeDirectiveFile=8]="AutomaticTypeDirectiveFile",t))(_oe||{}),Fxe=(t=>(t[t.FilePreprocessingLibReferenceDiagnostic=0]="FilePreprocessingLibReferenceDiagnostic",t[t.FilePreprocessingFileExplainingDiagnostic=1]="FilePreprocessingFileExplainingDiagnostic",t[t.ResolutionDiagnostics=2]="ResolutionDiagnostics",t))(Fxe||{}),Bxe=(t=>(t[t.Js=0]="Js",t[t.Dts=1]="Dts",t[t.BuilderSignature=2]="BuilderSignature",t))(Bxe||{}),poe=(t=>(t[t.Not=0]="Not",t[t.SafeModules=1]="SafeModules",t[t.Completely=2]="Completely",t))(poe||{}),Wxe=(t=>(t[t.Success=0]="Success",t[t.DiagnosticsPresent_OutputsSkipped=1]="DiagnosticsPresent_OutputsSkipped",t[t.DiagnosticsPresent_OutputsGenerated=2]="DiagnosticsPresent_OutputsGenerated",t[t.InvalidProject_OutputsSkipped=3]="InvalidProject_OutputsSkipped",t[t.ProjectReferenceCycle_OutputsSkipped=4]="ProjectReferenceCycle_OutputsSkipped",t))(Wxe||{}),Vxe=(t=>(t[t.Ok=0]="Ok",t[t.NeedsOverride=1]="NeedsOverride",t[t.HasInvalidOverride=2]="HasInvalidOverride",t))(Vxe||{}),Hxe=(t=>(t[t.None=0]="None",t[t.Literal=1]="Literal",t[t.Subtype=2]="Subtype",t))(Hxe||{}),jxe=(t=>(t[t.None=0]="None",t[t.NoSupertypeReduction=1]="NoSupertypeReduction",t[t.NoConstraintReduction=2]="NoConstraintReduction",t))(jxe||{}),zxe=(t=>(t[t.None=0]="None",t[t.Signature=1]="Signature",t[t.NoConstraints=2]="NoConstraints",t[t.Completions=4]="Completions",t[t.SkipBindingPatterns=8]="SkipBindingPatterns",t))(zxe||{}),Uxe=(t=>(t[t.None=0]="None",t[t.NoTruncation=1]="NoTruncation",t[t.WriteArrayAsGenericType=2]="WriteArrayAsGenericType",t[t.GenerateNamesForShadowedTypeParams=4]="GenerateNamesForShadowedTypeParams",t[t.UseStructuralFallback=8]="UseStructuralFallback",t[t.ForbidIndexedAccessSymbolReferences=16]="ForbidIndexedAccessSymbolReferences",t[t.WriteTypeArgumentsOfSignature=32]="WriteTypeArgumentsOfSignature",t[t.UseFullyQualifiedType=64]="UseFullyQualifiedType",t[t.UseOnlyExternalAliasing=128]="UseOnlyExternalAliasing",t[t.SuppressAnyReturnType=256]="SuppressAnyReturnType",t[t.WriteTypeParametersInQualifiedName=512]="WriteTypeParametersInQualifiedName",t[t.MultilineObjectLiterals=1024]="MultilineObjectLiterals",t[t.WriteClassExpressionAsTypeLiteral=2048]="WriteClassExpressionAsTypeLiteral",t[t.UseTypeOfFunction=4096]="UseTypeOfFunction",t[t.OmitParameterModifiers=8192]="OmitParameterModifiers",t[t.UseAliasDefinedOutsideCurrentScope=16384]="UseAliasDefinedOutsideCurrentScope",t[t.UseSingleQuotesForStringLiteralType=268435456]="UseSingleQuotesForStringLiteralType",t[t.NoTypeReduction=536870912]="NoTypeReduction",t[t.OmitThisParameter=33554432]="OmitThisParameter",t[t.AllowThisInObjectLiteral=32768]="AllowThisInObjectLiteral",t[t.AllowQualifiedNameInPlaceOfIdentifier=65536]="AllowQualifiedNameInPlaceOfIdentifier",t[t.AllowAnonymousIdentifier=131072]="AllowAnonymousIdentifier",t[t.AllowEmptyUnionOrIntersection=262144]="AllowEmptyUnionOrIntersection",t[t.AllowEmptyTuple=524288]="AllowEmptyTuple",t[t.AllowUniqueESSymbolType=1048576]="AllowUniqueESSymbolType",t[t.AllowEmptyIndexInfoType=2097152]="AllowEmptyIndexInfoType",t[t.AllowNodeModulesRelativePaths=67108864]="AllowNodeModulesRelativePaths",t[t.IgnoreErrors=70221824]="IgnoreErrors",t[t.InObjectTypeLiteral=4194304]="InObjectTypeLiteral",t[t.InTypeAlias=8388608]="InTypeAlias",t[t.InInitialEntityName=16777216]="InInitialEntityName",t))(Uxe||{}),qxe=(t=>(t[t.None=0]="None",t[t.WriteComputedProps=1]="WriteComputedProps",t[t.NoSyntacticPrinter=2]="NoSyntacticPrinter",t[t.DoNotIncludeSymbolChain=4]="DoNotIncludeSymbolChain",t[t.AllowUnresolvedNames=8]="AllowUnresolvedNames",t))(qxe||{}),$xe=(t=>(t[t.None=0]="None",t[t.NoTruncation=1]="NoTruncation",t[t.WriteArrayAsGenericType=2]="WriteArrayAsGenericType",t[t.GenerateNamesForShadowedTypeParams=4]="GenerateNamesForShadowedTypeParams",t[t.UseStructuralFallback=8]="UseStructuralFallback",t[t.WriteTypeArgumentsOfSignature=32]="WriteTypeArgumentsOfSignature",t[t.UseFullyQualifiedType=64]="UseFullyQualifiedType",t[t.SuppressAnyReturnType=256]="SuppressAnyReturnType",t[t.MultilineObjectLiterals=1024]="MultilineObjectLiterals",t[t.WriteClassExpressionAsTypeLiteral=2048]="WriteClassExpressionAsTypeLiteral",t[t.UseTypeOfFunction=4096]="UseTypeOfFunction",t[t.OmitParameterModifiers=8192]="OmitParameterModifiers",t[t.UseAliasDefinedOutsideCurrentScope=16384]="UseAliasDefinedOutsideCurrentScope",t[t.UseSingleQuotesForStringLiteralType=268435456]="UseSingleQuotesForStringLiteralType",t[t.NoTypeReduction=536870912]="NoTypeReduction",t[t.OmitThisParameter=33554432]="OmitThisParameter",t[t.AllowUniqueESSymbolType=1048576]="AllowUniqueESSymbolType",t[t.AddUndefined=131072]="AddUndefined",t[t.WriteArrowStyleSignature=262144]="WriteArrowStyleSignature",t[t.InArrayType=524288]="InArrayType",t[t.InElementType=2097152]="InElementType",t[t.InFirstTypeArgument=4194304]="InFirstTypeArgument",t[t.InTypeAlias=8388608]="InTypeAlias",t[t.NodeBuilderFlagsMask=848330095]="NodeBuilderFlagsMask",t))($xe||{}),Jxe=(t=>(t[t.None=0]="None",t[t.WriteTypeParametersOrArguments=1]="WriteTypeParametersOrArguments",t[t.UseOnlyExternalAliasing=2]="UseOnlyExternalAliasing",t[t.AllowAnyNodeKind=4]="AllowAnyNodeKind",t[t.UseAliasDefinedOutsideCurrentScope=8]="UseAliasDefinedOutsideCurrentScope",t[t.WriteComputedProps=16]="WriteComputedProps",t[t.DoNotIncludeSymbolChain=32]="DoNotIncludeSymbolChain",t))(Jxe||{}),Gxe=(t=>(t[t.Accessible=0]="Accessible",t[t.NotAccessible=1]="NotAccessible",t[t.CannotBeNamed=2]="CannotBeNamed",t[t.NotResolved=3]="NotResolved",t))(Gxe||{}),Kxe=(t=>(t[t.This=0]="This",t[t.Identifier=1]="Identifier",t[t.AssertsThis=2]="AssertsThis",t[t.AssertsIdentifier=3]="AssertsIdentifier",t))(Kxe||{}),Xxe=(t=>(t[t.Unknown=0]="Unknown",t[t.TypeWithConstructSignatureAndValue=1]="TypeWithConstructSignatureAndValue",t[t.VoidNullableOrNeverType=2]="VoidNullableOrNeverType",t[t.NumberLikeType=3]="NumberLikeType",t[t.BigIntLikeType=4]="BigIntLikeType",t[t.StringLikeType=5]="StringLikeType",t[t.BooleanType=6]="BooleanType",t[t.ArrayLikeType=7]="ArrayLikeType",t[t.ESSymbolType=8]="ESSymbolType",t[t.Promise=9]="Promise",t[t.TypeWithCallSignature=10]="TypeWithCallSignature",t[t.ObjectType=11]="ObjectType",t))(Xxe||{}),moe=(t=>(t[t.None=0]="None",t[t.FunctionScopedVariable=1]="FunctionScopedVariable",t[t.BlockScopedVariable=2]="BlockScopedVariable",t[t.Property=4]="Property",t[t.EnumMember=8]="EnumMember",t[t.Function=16]="Function",t[t.Class=32]="Class",t[t.Interface=64]="Interface",t[t.ConstEnum=128]="ConstEnum",t[t.RegularEnum=256]="RegularEnum",t[t.ValueModule=512]="ValueModule",t[t.NamespaceModule=1024]="NamespaceModule",t[t.TypeLiteral=2048]="TypeLiteral",t[t.ObjectLiteral=4096]="ObjectLiteral",t[t.Method=8192]="Method",t[t.Constructor=16384]="Constructor",t[t.GetAccessor=32768]="GetAccessor",t[t.SetAccessor=65536]="SetAccessor",t[t.Signature=131072]="Signature",t[t.TypeParameter=262144]="TypeParameter",t[t.TypeAlias=524288]="TypeAlias",t[t.ExportValue=1048576]="ExportValue",t[t.Alias=2097152]="Alias",t[t.Prototype=4194304]="Prototype",t[t.ExportStar=8388608]="ExportStar",t[t.Optional=16777216]="Optional",t[t.Transient=33554432]="Transient",t[t.Assignment=67108864]="Assignment",t[t.ModuleExports=134217728]="ModuleExports",t[t.All=-1]="All",t[t.Enum=384]="Enum",t[t.Variable=3]="Variable",t[t.Value=111551]="Value",t[t.Type=788968]="Type",t[t.Namespace=1920]="Namespace",t[t.Module=1536]="Module",t[t.Accessor=98304]="Accessor",t[t.FunctionScopedVariableExcludes=111550]="FunctionScopedVariableExcludes",t[t.BlockScopedVariableExcludes=111551]="BlockScopedVariableExcludes",t[t.ParameterExcludes=111551]="ParameterExcludes",t[t.PropertyExcludes=0]="PropertyExcludes",t[t.EnumMemberExcludes=900095]="EnumMemberExcludes",t[t.FunctionExcludes=110991]="FunctionExcludes",t[t.ClassExcludes=899503]="ClassExcludes",t[t.InterfaceExcludes=788872]="InterfaceExcludes",t[t.RegularEnumExcludes=899327]="RegularEnumExcludes",t[t.ConstEnumExcludes=899967]="ConstEnumExcludes",t[t.ValueModuleExcludes=110735]="ValueModuleExcludes",t[t.NamespaceModuleExcludes=0]="NamespaceModuleExcludes",t[t.MethodExcludes=103359]="MethodExcludes",t[t.GetAccessorExcludes=46015]="GetAccessorExcludes",t[t.SetAccessorExcludes=78783]="SetAccessorExcludes",t[t.AccessorExcludes=13247]="AccessorExcludes",t[t.TypeParameterExcludes=526824]="TypeParameterExcludes",t[t.TypeAliasExcludes=788968]="TypeAliasExcludes",t[t.AliasExcludes=2097152]="AliasExcludes",t[t.ModuleMember=2623475]="ModuleMember",t[t.ExportHasLocal=944]="ExportHasLocal",t[t.BlockScoped=418]="BlockScoped",t[t.PropertyOrAccessor=98308]="PropertyOrAccessor",t[t.ClassMember=106500]="ClassMember",t[t.ExportSupportsDefaultModifier=112]="ExportSupportsDefaultModifier",t[t.ExportDoesNotSupportDefaultModifier=-113]="ExportDoesNotSupportDefaultModifier",t[t.Classifiable=2885600]="Classifiable",t[t.LateBindingContainer=6256]="LateBindingContainer",t))(moe||{}),Qxe=(t=>(t[t.None=0]="None",t[t.Instantiated=1]="Instantiated",t[t.SyntheticProperty=2]="SyntheticProperty",t[t.SyntheticMethod=4]="SyntheticMethod",t[t.Readonly=8]="Readonly",t[t.ReadPartial=16]="ReadPartial",t[t.WritePartial=32]="WritePartial",t[t.HasNonUniformType=64]="HasNonUniformType",t[t.HasLiteralType=128]="HasLiteralType",t[t.ContainsPublic=256]="ContainsPublic",t[t.ContainsProtected=512]="ContainsProtected",t[t.ContainsPrivate=1024]="ContainsPrivate",t[t.ContainsStatic=2048]="ContainsStatic",t[t.Late=4096]="Late",t[t.ReverseMapped=8192]="ReverseMapped",t[t.OptionalParameter=16384]="OptionalParameter",t[t.RestParameter=32768]="RestParameter",t[t.DeferredType=65536]="DeferredType",t[t.HasNeverType=131072]="HasNeverType",t[t.Mapped=262144]="Mapped",t[t.StripOptional=524288]="StripOptional",t[t.Unresolved=1048576]="Unresolved",t[t.Synthetic=6]="Synthetic",t[t.Discriminant=192]="Discriminant",t[t.Partial=48]="Partial",t))(Qxe||{}),Zxe=(t=>(t.Call="__call",t.Constructor="__constructor",t.New="__new",t.Index="__index",t.ExportStar="__export",t.Global="__global",t.Missing="__missing",t.Type="__type",t.Object="__object",t.JSXAttributes="__jsxAttributes",t.Class="__class",t.Function="__function",t.Computed="__computed",t.Resolving="__resolving__",t.ExportEquals="export=",t.Default="default",t.This="this",t.InstantiationExpression="__instantiationExpression",t.ImportAttributes="__importAttributes",t))(Zxe||{}),goe=(t=>(t[t.None=0]="None",t[t.TypeChecked=1]="TypeChecked",t[t.LexicalThis=2]="LexicalThis",t[t.CaptureThis=4]="CaptureThis",t[t.CaptureNewTarget=8]="CaptureNewTarget",t[t.SuperInstance=16]="SuperInstance",t[t.SuperStatic=32]="SuperStatic",t[t.ContextChecked=64]="ContextChecked",t[t.MethodWithSuperPropertyAccessInAsync=128]="MethodWithSuperPropertyAccessInAsync",t[t.MethodWithSuperPropertyAssignmentInAsync=256]="MethodWithSuperPropertyAssignmentInAsync",t[t.CaptureArguments=512]="CaptureArguments",t[t.EnumValuesComputed=1024]="EnumValuesComputed",t[t.LexicalModuleMergesWithClass=2048]="LexicalModuleMergesWithClass",t[t.LoopWithCapturedBlockScopedBinding=4096]="LoopWithCapturedBlockScopedBinding",t[t.ContainsCapturedBlockScopeBinding=8192]="ContainsCapturedBlockScopeBinding",t[t.CapturedBlockScopedBinding=16384]="CapturedBlockScopedBinding",t[t.BlockScopedBindingInLoop=32768]="BlockScopedBindingInLoop",t[t.NeedsLoopOutParameter=65536]="NeedsLoopOutParameter",t[t.AssignmentsMarked=131072]="AssignmentsMarked",t[t.ContainsConstructorReference=262144]="ContainsConstructorReference",t[t.ConstructorReference=536870912]="ConstructorReference",t[t.ContainsClassWithPrivateIdentifiers=1048576]="ContainsClassWithPrivateIdentifiers",t[t.ContainsSuperPropertyInStaticInitializer=2097152]="ContainsSuperPropertyInStaticInitializer",t[t.InCheckIdentifier=4194304]="InCheckIdentifier",t[t.PartiallyTypeChecked=8388608]="PartiallyTypeChecked",t[t.LazyFlags=539358128]="LazyFlags",t))(goe||{}),yoe=(t=>(t[t.Any=1]="Any",t[t.Unknown=2]="Unknown",t[t.String=4]="String",t[t.Number=8]="Number",t[t.Boolean=16]="Boolean",t[t.Enum=32]="Enum",t[t.BigInt=64]="BigInt",t[t.StringLiteral=128]="StringLiteral",t[t.NumberLiteral=256]="NumberLiteral",t[t.BooleanLiteral=512]="BooleanLiteral",t[t.EnumLiteral=1024]="EnumLiteral",t[t.BigIntLiteral=2048]="BigIntLiteral",t[t.ESSymbol=4096]="ESSymbol",t[t.UniqueESSymbol=8192]="UniqueESSymbol",t[t.Void=16384]="Void",t[t.Undefined=32768]="Undefined",t[t.Null=65536]="Null",t[t.Never=131072]="Never",t[t.TypeParameter=262144]="TypeParameter",t[t.Object=524288]="Object",t[t.Union=1048576]="Union",t[t.Intersection=2097152]="Intersection",t[t.Index=4194304]="Index",t[t.IndexedAccess=8388608]="IndexedAccess",t[t.Conditional=16777216]="Conditional",t[t.Substitution=33554432]="Substitution",t[t.NonPrimitive=67108864]="NonPrimitive",t[t.TemplateLiteral=134217728]="TemplateLiteral",t[t.StringMapping=268435456]="StringMapping",t[t.Reserved1=536870912]="Reserved1",t[t.Reserved2=1073741824]="Reserved2",t[t.AnyOrUnknown=3]="AnyOrUnknown",t[t.Nullable=98304]="Nullable",t[t.Literal=2944]="Literal",t[t.Unit=109472]="Unit",t[t.Freshable=2976]="Freshable",t[t.StringOrNumberLiteral=384]="StringOrNumberLiteral",t[t.StringOrNumberLiteralOrUnique=8576]="StringOrNumberLiteralOrUnique",t[t.DefinitelyFalsy=117632]="DefinitelyFalsy",t[t.PossiblyFalsy=117724]="PossiblyFalsy",t[t.Intrinsic=67359327]="Intrinsic",t[t.StringLike=402653316]="StringLike",t[t.NumberLike=296]="NumberLike",t[t.BigIntLike=2112]="BigIntLike",t[t.BooleanLike=528]="BooleanLike",t[t.EnumLike=1056]="EnumLike",t[t.ESSymbolLike=12288]="ESSymbolLike",t[t.VoidLike=49152]="VoidLike",t[t.Primitive=402784252]="Primitive",t[t.DefinitelyNonNullable=470302716]="DefinitelyNonNullable",t[t.DisjointDomains=469892092]="DisjointDomains",t[t.UnionOrIntersection=3145728]="UnionOrIntersection",t[t.StructuredType=3670016]="StructuredType",t[t.TypeVariable=8650752]="TypeVariable",t[t.InstantiableNonPrimitive=58982400]="InstantiableNonPrimitive",t[t.InstantiablePrimitive=406847488]="InstantiablePrimitive",t[t.Instantiable=465829888]="Instantiable",t[t.StructuredOrInstantiable=469499904]="StructuredOrInstantiable",t[t.ObjectFlagsType=3899393]="ObjectFlagsType",t[t.Simplifiable=25165824]="Simplifiable",t[t.Singleton=67358815]="Singleton",t[t.Narrowable=536624127]="Narrowable",t[t.IncludesMask=473694207]="IncludesMask",t[t.IncludesMissingType=262144]="IncludesMissingType",t[t.IncludesNonWideningType=4194304]="IncludesNonWideningType",t[t.IncludesWildcard=8388608]="IncludesWildcard",t[t.IncludesEmptyObject=16777216]="IncludesEmptyObject",t[t.IncludesInstantiable=33554432]="IncludesInstantiable",t[t.IncludesConstrainedTypeVariable=536870912]="IncludesConstrainedTypeVariable",t[t.IncludesError=1073741824]="IncludesError",t[t.NotPrimitiveUnion=36323331]="NotPrimitiveUnion",t))(yoe||{}),voe=(t=>(t[t.None=0]="None",t[t.Class=1]="Class",t[t.Interface=2]="Interface",t[t.Reference=4]="Reference",t[t.Tuple=8]="Tuple",t[t.Anonymous=16]="Anonymous",t[t.Mapped=32]="Mapped",t[t.Instantiated=64]="Instantiated",t[t.ObjectLiteral=128]="ObjectLiteral",t[t.EvolvingArray=256]="EvolvingArray",t[t.ObjectLiteralPatternWithComputedProperties=512]="ObjectLiteralPatternWithComputedProperties",t[t.ReverseMapped=1024]="ReverseMapped",t[t.JsxAttributes=2048]="JsxAttributes",t[t.JSLiteral=4096]="JSLiteral",t[t.FreshLiteral=8192]="FreshLiteral",t[t.ArrayLiteral=16384]="ArrayLiteral",t[t.PrimitiveUnion=32768]="PrimitiveUnion",t[t.ContainsWideningType=65536]="ContainsWideningType",t[t.ContainsObjectOrArrayLiteral=131072]="ContainsObjectOrArrayLiteral",t[t.NonInferrableType=262144]="NonInferrableType",t[t.CouldContainTypeVariablesComputed=524288]="CouldContainTypeVariablesComputed",t[t.CouldContainTypeVariables=1048576]="CouldContainTypeVariables",t[t.ClassOrInterface=3]="ClassOrInterface",t[t.RequiresWidening=196608]="RequiresWidening",t[t.PropagatingFlags=458752]="PropagatingFlags",t[t.InstantiatedMapped=96]="InstantiatedMapped",t[t.ObjectTypeKindMask=1343]="ObjectTypeKindMask",t[t.ContainsSpread=2097152]="ContainsSpread",t[t.ObjectRestType=4194304]="ObjectRestType",t[t.InstantiationExpressionType=8388608]="InstantiationExpressionType",t[t.SingleSignatureType=134217728]="SingleSignatureType",t[t.IsClassInstanceClone=16777216]="IsClassInstanceClone",t[t.IdenticalBaseTypeCalculated=33554432]="IdenticalBaseTypeCalculated",t[t.IdenticalBaseTypeExists=67108864]="IdenticalBaseTypeExists",t[t.IsGenericTypeComputed=2097152]="IsGenericTypeComputed",t[t.IsGenericObjectType=4194304]="IsGenericObjectType",t[t.IsGenericIndexType=8388608]="IsGenericIndexType",t[t.IsGenericType=12582912]="IsGenericType",t[t.ContainsIntersections=16777216]="ContainsIntersections",t[t.IsUnknownLikeUnionComputed=33554432]="IsUnknownLikeUnionComputed",t[t.IsUnknownLikeUnion=67108864]="IsUnknownLikeUnion",t[t.IsNeverIntersectionComputed=16777216]="IsNeverIntersectionComputed",t[t.IsNeverIntersection=33554432]="IsNeverIntersection",t[t.IsConstrainedTypeVariable=67108864]="IsConstrainedTypeVariable",t))(voe||{}),Yxe=(t=>(t[t.Invariant=0]="Invariant",t[t.Covariant=1]="Covariant",t[t.Contravariant=2]="Contravariant",t[t.Bivariant=3]="Bivariant",t[t.Independent=4]="Independent",t[t.VarianceMask=7]="VarianceMask",t[t.Unmeasurable=8]="Unmeasurable",t[t.Unreliable=16]="Unreliable",t[t.AllowsStructuralFallback=24]="AllowsStructuralFallback",t))(Yxe||{}),eke=(t=>(t[t.Required=1]="Required",t[t.Optional=2]="Optional",t[t.Rest=4]="Rest",t[t.Variadic=8]="Variadic",t[t.Fixed=3]="Fixed",t[t.Variable=12]="Variable",t[t.NonRequired=14]="NonRequired",t[t.NonRest=11]="NonRest",t))(eke||{}),tke=(t=>(t[t.None=0]="None",t[t.IncludeUndefined=1]="IncludeUndefined",t[t.NoIndexSignatures=2]="NoIndexSignatures",t[t.Writing=4]="Writing",t[t.CacheSymbol=8]="CacheSymbol",t[t.AllowMissing=16]="AllowMissing",t[t.ExpressionPosition=32]="ExpressionPosition",t[t.ReportDeprecated=64]="ReportDeprecated",t[t.SuppressNoImplicitAnyError=128]="SuppressNoImplicitAnyError",t[t.Contextual=256]="Contextual",t[t.Persistent=1]="Persistent",t))(tke||{}),ike=(t=>(t[t.None=0]="None",t[t.StringsOnly=1]="StringsOnly",t[t.NoIndexSignatures=2]="NoIndexSignatures",t[t.NoReducibleCheck=4]="NoReducibleCheck",t))(ike||{}),nke=(t=>(t[t.Component=0]="Component",t[t.Function=1]="Function",t[t.Mixed=2]="Mixed",t))(nke||{}),rke=(t=>(t[t.Call=0]="Call",t[t.Construct=1]="Construct",t))(rke||{}),boe=(t=>(t[t.None=0]="None",t[t.HasRestParameter=1]="HasRestParameter",t[t.HasLiteralTypes=2]="HasLiteralTypes",t[t.Abstract=4]="Abstract",t[t.IsInnerCallChain=8]="IsInnerCallChain",t[t.IsOuterCallChain=16]="IsOuterCallChain",t[t.IsUntypedSignatureInJSFile=32]="IsUntypedSignatureInJSFile",t[t.IsNonInferrable=64]="IsNonInferrable",t[t.IsSignatureCandidateForOverloadFailure=128]="IsSignatureCandidateForOverloadFailure",t[t.PropagatingFlags=167]="PropagatingFlags",t[t.CallChainFlags=24]="CallChainFlags",t))(boe||{}),ske=(t=>(t[t.String=0]="String",t[t.Number=1]="Number",t))(ske||{}),oke=(t=>(t[t.Simple=0]="Simple",t[t.Array=1]="Array",t[t.Deferred=2]="Deferred",t[t.Function=3]="Function",t[t.Composite=4]="Composite",t[t.Merged=5]="Merged",t))(oke||{}),ake=(t=>(t[t.None=0]="None",t[t.NakedTypeVariable=1]="NakedTypeVariable",t[t.SpeculativeTuple=2]="SpeculativeTuple",t[t.SubstituteSource=4]="SubstituteSource",t[t.HomomorphicMappedType=8]="HomomorphicMappedType",t[t.PartialHomomorphicMappedType=16]="PartialHomomorphicMappedType",t[t.MappedTypeConstraint=32]="MappedTypeConstraint",t[t.ContravariantConditional=64]="ContravariantConditional",t[t.ReturnType=128]="ReturnType",t[t.LiteralKeyof=256]="LiteralKeyof",t[t.NoConstraints=512]="NoConstraints",t[t.AlwaysStrict=1024]="AlwaysStrict",t[t.MaxValue=2048]="MaxValue",t[t.PriorityImpliesCombination=416]="PriorityImpliesCombination",t[t.Circularity=-1]="Circularity",t))(ake||{}),cke=(t=>(t[t.None=0]="None",t[t.NoDefault=1]="NoDefault",t[t.AnyDefault=2]="AnyDefault",t[t.SkippedGenericFunction=4]="SkippedGenericFunction",t))(cke||{}),lke=(t=>(t[t.False=0]="False",t[t.Unknown=1]="Unknown",t[t.Maybe=3]="Maybe",t[t.True=-1]="True",t))(lke||{}),uke=(t=>(t[t.None=0]="None",t[t.ExportsProperty=1]="ExportsProperty",t[t.ModuleExports=2]="ModuleExports",t[t.PrototypeProperty=3]="PrototypeProperty",t[t.ThisProperty=4]="ThisProperty",t[t.Property=5]="Property",t[t.Prototype=6]="Prototype",t[t.ObjectDefinePropertyValue=7]="ObjectDefinePropertyValue",t[t.ObjectDefinePropertyExports=8]="ObjectDefinePropertyExports",t[t.ObjectDefinePrototypeProperty=9]="ObjectDefinePrototypeProperty",t))(uke||{}),JJ=(t=>(t[t.Warning=0]="Warning",t[t.Error=1]="Error",t[t.Suggestion=2]="Suggestion",t[t.Message=3]="Message",t))(JJ||{});function nI(t,r=!0){const a=JJ[t.category];return r?a.toLowerCase():a}var i8=(t=>(t[t.Classic=1]="Classic",t[t.NodeJs=2]="NodeJs",t[t.Node10=2]="Node10",t[t.Node16=3]="Node16",t[t.NodeNext=99]="NodeNext",t[t.Bundler=100]="Bundler",t))(i8||{}),dke=(t=>(t[t.Legacy=1]="Legacy",t[t.Auto=2]="Auto",t[t.Force=3]="Force",t))(dke||{}),fke=(t=>(t[t.FixedPollingInterval=0]="FixedPollingInterval",t[t.PriorityPollingInterval=1]="PriorityPollingInterval",t[t.DynamicPriorityPolling=2]="DynamicPriorityPolling",t[t.FixedChunkSizePolling=3]="FixedChunkSizePolling",t[t.UseFsEvents=4]="UseFsEvents",t[t.UseFsEventsOnParentDirectory=5]="UseFsEventsOnParentDirectory",t))(fke||{}),hke=(t=>(t[t.UseFsEvents=0]="UseFsEvents",t[t.FixedPollingInterval=1]="FixedPollingInterval",t[t.DynamicPriorityPolling=2]="DynamicPriorityPolling",t[t.FixedChunkSizePolling=3]="FixedChunkSizePolling",t))(hke||{}),_ke=(t=>(t[t.FixedInterval=0]="FixedInterval",t[t.PriorityInterval=1]="PriorityInterval",t[t.DynamicPriority=2]="DynamicPriority",t[t.FixedChunkSize=3]="FixedChunkSize",t))(_ke||{}),bW=(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.ES2020=6]="ES2020",t[t.ES2022=7]="ES2022",t[t.ESNext=99]="ESNext",t[t.Node16=100]="Node16",t[t.NodeNext=199]="NodeNext",t[t.Preserve=200]="Preserve",t))(bW||{}),pke=(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))(pke||{}),mke=(t=>(t[t.Remove=0]="Remove",t[t.Preserve=1]="Preserve",t[t.Error=2]="Error",t))(mke||{}),gke=(t=>(t[t.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",t[t.LineFeed=1]="LineFeed",t))(gke||{}),Coe=(t=>(t[t.Unknown=0]="Unknown",t[t.JS=1]="JS",t[t.JSX=2]="JSX",t[t.TS=3]="TS",t[t.TSX=4]="TSX",t[t.External=5]="External",t[t.JSON=6]="JSON",t[t.Deferred=7]="Deferred",t))(Coe||{}),yke=(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.ES2021=8]="ES2021",t[t.ES2022=9]="ES2022",t[t.ES2023=10]="ES2023",t[t.ESNext=99]="ESNext",t[t.JSON=100]="JSON",t[t.Latest=99]="Latest",t))(yke||{}),vke=(t=>(t[t.Standard=0]="Standard",t[t.JSX=1]="JSX",t))(vke||{}),bke=(t=>(t[t.None=0]="None",t[t.Recursive=1]="Recursive",t))(bke||{}),Cke=(t=>(t[t.EOF=-1]="EOF",t[t.nullCharacter=0]="nullCharacter",t[t.maxAsciiCharacter=127]="maxAsciiCharacter",t[t.lineFeed=10]="lineFeed",t[t.carriageReturn=13]="carriageReturn",t[t.lineSeparator=8232]="lineSeparator",t[t.paragraphSeparator=8233]="paragraphSeparator",t[t.nextLine=133]="nextLine",t[t.space=32]="space",t[t.nonBreakingSpace=160]="nonBreakingSpace",t[t.enQuad=8192]="enQuad",t[t.emQuad=8193]="emQuad",t[t.enSpace=8194]="enSpace",t[t.emSpace=8195]="emSpace",t[t.threePerEmSpace=8196]="threePerEmSpace",t[t.fourPerEmSpace=8197]="fourPerEmSpace",t[t.sixPerEmSpace=8198]="sixPerEmSpace",t[t.figureSpace=8199]="figureSpace",t[t.punctuationSpace=8200]="punctuationSpace",t[t.thinSpace=8201]="thinSpace",t[t.hairSpace=8202]="hairSpace",t[t.zeroWidthSpace=8203]="zeroWidthSpace",t[t.narrowNoBreakSpace=8239]="narrowNoBreakSpace",t[t.ideographicSpace=12288]="ideographicSpace",t[t.mathematicalSpace=8287]="mathematicalSpace",t[t.ogham=5760]="ogham",t[t.replacementCharacter=65533]="replacementCharacter",t[t._=95]="_",t[t.$=36]="$",t[t._0=48]="_0",t[t._1=49]="_1",t[t._2=50]="_2",t[t._3=51]="_3",t[t._4=52]="_4",t[t._5=53]="_5",t[t._6=54]="_6",t[t._7=55]="_7",t[t._8=56]="_8",t[t._9=57]="_9",t[t.a=97]="a",t[t.b=98]="b",t[t.c=99]="c",t[t.d=100]="d",t[t.e=101]="e",t[t.f=102]="f",t[t.g=103]="g",t[t.h=104]="h",t[t.i=105]="i",t[t.j=106]="j",t[t.k=107]="k",t[t.l=108]="l",t[t.m=109]="m",t[t.n=110]="n",t[t.o=111]="o",t[t.p=112]="p",t[t.q=113]="q",t[t.r=114]="r",t[t.s=115]="s",t[t.t=116]="t",t[t.u=117]="u",t[t.v=118]="v",t[t.w=119]="w",t[t.x=120]="x",t[t.y=121]="y",t[t.z=122]="z",t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.I=73]="I",t[t.J=74]="J",t[t.K=75]="K",t[t.L=76]="L",t[t.M=77]="M",t[t.N=78]="N",t[t.O=79]="O",t[t.P=80]="P",t[t.Q=81]="Q",t[t.R=82]="R",t[t.S=83]="S",t[t.T=84]="T",t[t.U=85]="U",t[t.V=86]="V",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.Z=90]="Z",t[t.ampersand=38]="ampersand",t[t.asterisk=42]="asterisk",t[t.at=64]="at",t[t.backslash=92]="backslash",t[t.backtick=96]="backtick",t[t.bar=124]="bar",t[t.caret=94]="caret",t[t.closeBrace=125]="closeBrace",t[t.closeBracket=93]="closeBracket",t[t.closeParen=41]="closeParen",t[t.colon=58]="colon",t[t.comma=44]="comma",t[t.dot=46]="dot",t[t.doubleQuote=34]="doubleQuote",t[t.equals=61]="equals",t[t.exclamation=33]="exclamation",t[t.greaterThan=62]="greaterThan",t[t.hash=35]="hash",t[t.lessThan=60]="lessThan",t[t.minus=45]="minus",t[t.openBrace=123]="openBrace",t[t.openBracket=91]="openBracket",t[t.openParen=40]="openParen",t[t.percent=37]="percent",t[t.plus=43]="plus",t[t.question=63]="question",t[t.semicolon=59]="semicolon",t[t.singleQuote=39]="singleQuote",t[t.slash=47]="slash",t[t.tilde=126]="tilde",t[t.backspace=8]="backspace",t[t.formFeed=12]="formFeed",t[t.byteOrderMark=65279]="byteOrderMark",t[t.tab=9]="tab",t[t.verticalTab=11]="verticalTab",t))(Cke||{}),Ske=(t=>(t.Ts=".ts",t.Tsx=".tsx",t.Dts=".d.ts",t.Js=".js",t.Jsx=".jsx",t.Json=".json",t.TsBuildInfo=".tsbuildinfo",t.Mjs=".mjs",t.Mts=".mts",t.Dmts=".d.mts",t.Cjs=".cjs",t.Cts=".cts",t.Dcts=".d.cts",t))(Ske||{}),Soe=(t=>(t[t.None=0]="None",t[t.ContainsTypeScript=1]="ContainsTypeScript",t[t.ContainsJsx=2]="ContainsJsx",t[t.ContainsESNext=4]="ContainsESNext",t[t.ContainsES2022=8]="ContainsES2022",t[t.ContainsES2021=16]="ContainsES2021",t[t.ContainsES2020=32]="ContainsES2020",t[t.ContainsES2019=64]="ContainsES2019",t[t.ContainsES2018=128]="ContainsES2018",t[t.ContainsES2017=256]="ContainsES2017",t[t.ContainsES2016=512]="ContainsES2016",t[t.ContainsES2015=1024]="ContainsES2015",t[t.ContainsGenerator=2048]="ContainsGenerator",t[t.ContainsDestructuringAssignment=4096]="ContainsDestructuringAssignment",t[t.ContainsTypeScriptClassSyntax=8192]="ContainsTypeScriptClassSyntax",t[t.ContainsLexicalThis=16384]="ContainsLexicalThis",t[t.ContainsRestOrSpread=32768]="ContainsRestOrSpread",t[t.ContainsObjectRestOrSpread=65536]="ContainsObjectRestOrSpread",t[t.ContainsComputedPropertyName=131072]="ContainsComputedPropertyName",t[t.ContainsBlockScopedBinding=262144]="ContainsBlockScopedBinding",t[t.ContainsBindingPattern=524288]="ContainsBindingPattern",t[t.ContainsYield=1048576]="ContainsYield",t[t.ContainsAwait=2097152]="ContainsAwait",t[t.ContainsHoistedDeclarationOrCompletion=4194304]="ContainsHoistedDeclarationOrCompletion",t[t.ContainsDynamicImport=8388608]="ContainsDynamicImport",t[t.ContainsClassFields=16777216]="ContainsClassFields",t[t.ContainsDecorators=33554432]="ContainsDecorators",t[t.ContainsPossibleTopLevelAwait=67108864]="ContainsPossibleTopLevelAwait",t[t.ContainsLexicalSuper=134217728]="ContainsLexicalSuper",t[t.ContainsUpdateExpressionForIdentifier=268435456]="ContainsUpdateExpressionForIdentifier",t[t.ContainsPrivateIdentifierInExpression=536870912]="ContainsPrivateIdentifierInExpression",t[t.HasComputedFlags=-2147483648]="HasComputedFlags",t[t.AssertTypeScript=1]="AssertTypeScript",t[t.AssertJsx=2]="AssertJsx",t[t.AssertESNext=4]="AssertESNext",t[t.AssertES2022=8]="AssertES2022",t[t.AssertES2021=16]="AssertES2021",t[t.AssertES2020=32]="AssertES2020",t[t.AssertES2019=64]="AssertES2019",t[t.AssertES2018=128]="AssertES2018",t[t.AssertES2017=256]="AssertES2017",t[t.AssertES2016=512]="AssertES2016",t[t.AssertES2015=1024]="AssertES2015",t[t.AssertGenerator=2048]="AssertGenerator",t[t.AssertDestructuringAssignment=4096]="AssertDestructuringAssignment",t[t.OuterExpressionExcludes=-2147483648]="OuterExpressionExcludes",t[t.PropertyAccessExcludes=-2147483648]="PropertyAccessExcludes",t[t.NodeExcludes=-2147483648]="NodeExcludes",t[t.ArrowFunctionExcludes=-2072174592]="ArrowFunctionExcludes",t[t.FunctionExcludes=-1937940480]="FunctionExcludes",t[t.ConstructorExcludes=-1937948672]="ConstructorExcludes",t[t.MethodOrAccessorExcludes=-2005057536]="MethodOrAccessorExcludes",t[t.PropertyExcludes=-2013249536]="PropertyExcludes",t[t.ClassExcludes=-2147344384]="ClassExcludes",t[t.ModuleExcludes=-1941676032]="ModuleExcludes",t[t.TypeExcludes=-2]="TypeExcludes",t[t.ObjectLiteralExcludes=-2147278848]="ObjectLiteralExcludes",t[t.ArrayLiteralOrCallOrNewExcludes=-2147450880]="ArrayLiteralOrCallOrNewExcludes",t[t.VariableDeclarationListExcludes=-2146893824]="VariableDeclarationListExcludes",t[t.ParameterExcludes=-2147483648]="ParameterExcludes",t[t.CatchClauseExcludes=-2147418112]="CatchClauseExcludes",t[t.BindingPatternExcludes=-2147450880]="BindingPatternExcludes",t[t.ContainsLexicalThisOrSuper=134234112]="ContainsLexicalThisOrSuper",t[t.PropertyNamePropagatingFlags=134234112]="PropertyNamePropagatingFlags",t))(Soe||{}),woe=(t=>(t[t.TabStop=0]="TabStop",t[t.Placeholder=1]="Placeholder",t[t.Choice=2]="Choice",t[t.Variable=3]="Variable",t))(woe||{}),xoe=(t=>(t[t.None=0]="None",t[t.SingleLine=1]="SingleLine",t[t.MultiLine=2]="MultiLine",t[t.AdviseOnEmitNode=4]="AdviseOnEmitNode",t[t.NoSubstitution=8]="NoSubstitution",t[t.CapturesThis=16]="CapturesThis",t[t.NoLeadingSourceMap=32]="NoLeadingSourceMap",t[t.NoTrailingSourceMap=64]="NoTrailingSourceMap",t[t.NoSourceMap=96]="NoSourceMap",t[t.NoNestedSourceMaps=128]="NoNestedSourceMaps",t[t.NoTokenLeadingSourceMaps=256]="NoTokenLeadingSourceMaps",t[t.NoTokenTrailingSourceMaps=512]="NoTokenTrailingSourceMaps",t[t.NoTokenSourceMaps=768]="NoTokenSourceMaps",t[t.NoLeadingComments=1024]="NoLeadingComments",t[t.NoTrailingComments=2048]="NoTrailingComments",t[t.NoComments=3072]="NoComments",t[t.NoNestedComments=4096]="NoNestedComments",t[t.HelperName=8192]="HelperName",t[t.ExportName=16384]="ExportName",t[t.LocalName=32768]="LocalName",t[t.InternalName=65536]="InternalName",t[t.Indented=131072]="Indented",t[t.NoIndentation=262144]="NoIndentation",t[t.AsyncFunctionBody=524288]="AsyncFunctionBody",t[t.ReuseTempVariableScope=1048576]="ReuseTempVariableScope",t[t.CustomPrologue=2097152]="CustomPrologue",t[t.NoHoisting=4194304]="NoHoisting",t[t.Iterator=8388608]="Iterator",t[t.NoAsciiEscaping=16777216]="NoAsciiEscaping",t))(xoe||{}),wke=(t=>(t[t.None=0]="None",t[t.TypeScriptClassWrapper=1]="TypeScriptClassWrapper",t[t.NeverApplyImportHelper=2]="NeverApplyImportHelper",t[t.IgnoreSourceNewlines=4]="IgnoreSourceNewlines",t[t.Immutable=8]="Immutable",t[t.IndirectCall=16]="IndirectCall",t[t.TransformPrivateStaticElements=32]="TransformPrivateStaticElements",t))(wke||{}),xke=(t=>(t[t.Classes=2]="Classes",t[t.ForOf=2]="ForOf",t[t.Generators=2]="Generators",t[t.Iteration=2]="Iteration",t[t.SpreadElements=2]="SpreadElements",t[t.RestElements=2]="RestElements",t[t.TaggedTemplates=2]="TaggedTemplates",t[t.DestructuringAssignment=2]="DestructuringAssignment",t[t.BindingPatterns=2]="BindingPatterns",t[t.ArrowFunctions=2]="ArrowFunctions",t[t.BlockScopedVariables=2]="BlockScopedVariables",t[t.ObjectAssign=2]="ObjectAssign",t[t.RegularExpressionFlagsUnicode=2]="RegularExpressionFlagsUnicode",t[t.RegularExpressionFlagsSticky=2]="RegularExpressionFlagsSticky",t[t.Exponentiation=3]="Exponentiation",t[t.AsyncFunctions=4]="AsyncFunctions",t[t.ForAwaitOf=5]="ForAwaitOf",t[t.AsyncGenerators=5]="AsyncGenerators",t[t.AsyncIteration=5]="AsyncIteration",t[t.ObjectSpreadRest=5]="ObjectSpreadRest",t[t.RegularExpressionFlagsDotAll=5]="RegularExpressionFlagsDotAll",t[t.BindinglessCatch=6]="BindinglessCatch",t[t.BigInt=7]="BigInt",t[t.NullishCoalesce=7]="NullishCoalesce",t[t.OptionalChaining=7]="OptionalChaining",t[t.LogicalAssignment=8]="LogicalAssignment",t[t.TopLevelAwait=9]="TopLevelAwait",t[t.ClassFields=9]="ClassFields",t[t.PrivateNamesAndClassStaticBlocks=9]="PrivateNamesAndClassStaticBlocks",t[t.RegularExpressionFlagsHasIndices=9]="RegularExpressionFlagsHasIndices",t[t.ShebangComments=99]="ShebangComments",t[t.UsingAndAwaitUsing=99]="UsingAndAwaitUsing",t[t.ClassAndClassElementDecorators=99]="ClassAndClassElementDecorators",t[t.RegularExpressionFlagsUnicodeSets=99]="RegularExpressionFlagsUnicodeSets",t))(xke||{}),kke=(t=>(t[t.Extends=1]="Extends",t[t.Assign=2]="Assign",t[t.Rest=4]="Rest",t[t.Decorate=8]="Decorate",t[t.ESDecorateAndRunInitializers=8]="ESDecorateAndRunInitializers",t[t.Metadata=16]="Metadata",t[t.Param=32]="Param",t[t.Awaiter=64]="Awaiter",t[t.Generator=128]="Generator",t[t.Values=256]="Values",t[t.Read=512]="Read",t[t.SpreadArray=1024]="SpreadArray",t[t.Await=2048]="Await",t[t.AsyncGenerator=4096]="AsyncGenerator",t[t.AsyncDelegator=8192]="AsyncDelegator",t[t.AsyncValues=16384]="AsyncValues",t[t.ExportStar=32768]="ExportStar",t[t.ImportStar=65536]="ImportStar",t[t.ImportDefault=131072]="ImportDefault",t[t.MakeTemplateObject=262144]="MakeTemplateObject",t[t.ClassPrivateFieldGet=524288]="ClassPrivateFieldGet",t[t.ClassPrivateFieldSet=1048576]="ClassPrivateFieldSet",t[t.ClassPrivateFieldIn=2097152]="ClassPrivateFieldIn",t[t.SetFunctionName=4194304]="SetFunctionName",t[t.PropKey=8388608]="PropKey",t[t.AddDisposableResourceAndDisposeResources=16777216]="AddDisposableResourceAndDisposeResources",t[t.FirstEmitHelper=1]="FirstEmitHelper",t[t.LastEmitHelper=16777216]="LastEmitHelper",t[t.ForOfIncludes=256]="ForOfIncludes",t[t.ForAwaitOfIncludes=16384]="ForAwaitOfIncludes",t[t.AsyncGeneratorIncludes=6144]="AsyncGeneratorIncludes",t[t.AsyncDelegatorIncludes=26624]="AsyncDelegatorIncludes",t[t.SpreadIncludes=1536]="SpreadIncludes",t))(kke||{}),Tke=(t=>(t[t.SourceFile=0]="SourceFile",t[t.Expression=1]="Expression",t[t.IdentifierName=2]="IdentifierName",t[t.MappedTypeParameter=3]="MappedTypeParameter",t[t.Unspecified=4]="Unspecified",t[t.EmbeddedStatement=5]="EmbeddedStatement",t[t.JsxAttributeValue=6]="JsxAttributeValue",t[t.ImportTypeNodeAttributes=7]="ImportTypeNodeAttributes",t))(Tke||{}),Dke=(t=>(t[t.Parentheses=1]="Parentheses",t[t.TypeAssertions=2]="TypeAssertions",t[t.NonNullAssertions=4]="NonNullAssertions",t[t.PartiallyEmittedExpressions=8]="PartiallyEmittedExpressions",t[t.ExpressionsWithTypeArguments=16]="ExpressionsWithTypeArguments",t[t.Assertions=6]="Assertions",t[t.All=31]="All",t[t.ExcludeJSDocTypeAssertion=-2147483648]="ExcludeJSDocTypeAssertion",t))(Dke||{}),Eke=(t=>(t[t.None=0]="None",t[t.InParameters=1]="InParameters",t[t.VariablesHoistedInParameters=2]="VariablesHoistedInParameters",t))(Eke||{}),Ike=(t=>(t[t.None=0]="None",t[t.SingleLine=0]="SingleLine",t[t.MultiLine=1]="MultiLine",t[t.PreserveLines=2]="PreserveLines",t[t.LinesMask=3]="LinesMask",t[t.NotDelimited=0]="NotDelimited",t[t.BarDelimited=4]="BarDelimited",t[t.AmpersandDelimited=8]="AmpersandDelimited",t[t.CommaDelimited=16]="CommaDelimited",t[t.AsteriskDelimited=32]="AsteriskDelimited",t[t.DelimitersMask=60]="DelimitersMask",t[t.AllowTrailingComma=64]="AllowTrailingComma",t[t.Indented=128]="Indented",t[t.SpaceBetweenBraces=256]="SpaceBetweenBraces",t[t.SpaceBetweenSiblings=512]="SpaceBetweenSiblings",t[t.Braces=1024]="Braces",t[t.Parenthesis=2048]="Parenthesis",t[t.AngleBrackets=4096]="AngleBrackets",t[t.SquareBrackets=8192]="SquareBrackets",t[t.BracketsMask=15360]="BracketsMask",t[t.OptionalIfUndefined=16384]="OptionalIfUndefined",t[t.OptionalIfEmpty=32768]="OptionalIfEmpty",t[t.Optional=49152]="Optional",t[t.PreferNewLine=65536]="PreferNewLine",t[t.NoTrailingNewLine=131072]="NoTrailingNewLine",t[t.NoInterveningComments=262144]="NoInterveningComments",t[t.NoSpaceIfEmpty=524288]="NoSpaceIfEmpty",t[t.SingleElement=1048576]="SingleElement",t[t.SpaceAfterList=2097152]="SpaceAfterList",t[t.Modifiers=2359808]="Modifiers",t[t.HeritageClauses=512]="HeritageClauses",t[t.SingleLineTypeLiteralMembers=768]="SingleLineTypeLiteralMembers",t[t.MultiLineTypeLiteralMembers=32897]="MultiLineTypeLiteralMembers",t[t.SingleLineTupleTypeElements=528]="SingleLineTupleTypeElements",t[t.MultiLineTupleTypeElements=657]="MultiLineTupleTypeElements",t[t.UnionTypeConstituents=516]="UnionTypeConstituents",t[t.IntersectionTypeConstituents=520]="IntersectionTypeConstituents",t[t.ObjectBindingPatternElements=525136]="ObjectBindingPatternElements",t[t.ArrayBindingPatternElements=524880]="ArrayBindingPatternElements",t[t.ObjectLiteralExpressionProperties=526226]="ObjectLiteralExpressionProperties",t[t.ImportAttributes=526226]="ImportAttributes",t[t.ImportClauseEntries=526226]="ImportClauseEntries",t[t.ArrayLiteralExpressionElements=8914]="ArrayLiteralExpressionElements",t[t.CommaListElements=528]="CommaListElements",t[t.CallExpressionArguments=2576]="CallExpressionArguments",t[t.NewExpressionArguments=18960]="NewExpressionArguments",t[t.TemplateExpressionSpans=262144]="TemplateExpressionSpans",t[t.SingleLineBlockStatements=768]="SingleLineBlockStatements",t[t.MultiLineBlockStatements=129]="MultiLineBlockStatements",t[t.VariableDeclarationList=528]="VariableDeclarationList",t[t.SingleLineFunctionBodyStatements=768]="SingleLineFunctionBodyStatements",t[t.MultiLineFunctionBodyStatements=1]="MultiLineFunctionBodyStatements",t[t.ClassHeritageClauses=0]="ClassHeritageClauses",t[t.ClassMembers=129]="ClassMembers",t[t.InterfaceMembers=129]="InterfaceMembers",t[t.EnumMembers=145]="EnumMembers",t[t.CaseBlockClauses=129]="CaseBlockClauses",t[t.NamedImportsOrExportsElements=525136]="NamedImportsOrExportsElements",t[t.JsxElementOrFragmentChildren=262144]="JsxElementOrFragmentChildren",t[t.JsxElementAttributes=262656]="JsxElementAttributes",t[t.CaseOrDefaultClauseStatements=163969]="CaseOrDefaultClauseStatements",t[t.HeritageClauseTypes=528]="HeritageClauseTypes",t[t.SourceFileStatements=131073]="SourceFileStatements",t[t.Decorators=2146305]="Decorators",t[t.TypeArguments=53776]="TypeArguments",t[t.TypeParameters=53776]="TypeParameters",t[t.Parameters=2576]="Parameters",t[t.IndexSignatureParameters=8848]="IndexSignatureParameters",t[t.JSDocComment=33]="JSDocComment",t))(Ike||{}),Nke=(t=>(t[t.None=0]="None",t[t.TripleSlashXML=1]="TripleSlashXML",t[t.SingleLine=2]="SingleLine",t[t.MultiLine=4]="MultiLine",t[t.All=7]="All",t[t.Default=7]="Default",t))(Nke||{}),GJ={reference:{args:[{name:"types",optional:!0,captureSpan:!0},{name:"lib",optional:!0,captureSpan:!0},{name:"path",optional:!0,captureSpan:!0},{name:"no-default-lib",optional:!0},{name:"resolution-mode",optional:!0},{name:"preserve",optional:!0}],kind:1},"amd-dependency":{args:[{name:"path"},{name:"name",optional:!0}],kind:1},"amd-module":{args:[{name:"name"}],kind:1},"ts-check":{kind:2},"ts-nocheck":{kind:2},jsx:{args:[{name:"factory"}],kind:4},jsxfrag:{args:[{name:"factory"}],kind:4},jsximportsource:{args:[{name:"factory"}],kind:4},jsxruntime:{args:[{name:"factory"}],kind:4}},Lke=(t=>(t[t.ParseAll=0]="ParseAll",t[t.ParseNone=1]="ParseNone",t[t.ParseForTypeErrors=2]="ParseForTypeErrors",t[t.ParseForTypeInfo=3]="ParseForTypeInfo",t))(Lke||{});function n8(t){let r=5381;for(let a=0;a<t.length;a++)r=(r<<5)+r+t.charCodeAt(a);return r.toString()}function JKe(){Error.stackTraceLimit<100&&(Error.stackTraceLimit=100)}var Pke=(t=>(t[t.Created=0]="Created",t[t.Changed=1]="Changed",t[t.Deleted=2]="Deleted",t))(Pke||{}),koe=(t=>(t[t.High=2e3]="High",t[t.Medium=500]="Medium",t[t.Low=250]="Low",t))(koe||{}),gp=new Date(0);function XL(t,r){return t.getModifiedTime(r)||gp}function Ake(t){return{250:t.Low,500:t.Medium,2e3:t.High}}var Toe={Low:32,Medium:64,High:256},Doe=Ake(Toe),KJ=Ake(Toe);function HAt(t){if(!t.getEnvironmentVariable)return;const r=h("TSC_WATCH_POLLINGINTERVAL",koe);Doe=p("TSC_WATCH_POLLINGCHUNKSIZE",Toe)||Doe,KJ=p("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS",Toe)||KJ;function a(g,C){return t.getEnvironmentVariable(`${g}_${C.toUpperCase()}`)}function u(g){let C;return b("Low"),b("Medium"),b("High"),C;function b(T){const E=a(g,T);E&&((C||(C={}))[T]=Number(E))}}function h(g,C){const b=u(g);if(b)return T("Low"),T("Medium"),T("High"),!0;return!1;function T(E){C[E]=b[E]||C[E]}}function p(g,C){const b=u(g);return(r||b)&&Ake(b?{...C,...b}:C)}}function GKe(t,r,a,u,h){let p=a;for(let C=r.length;u&&C;g(),C--){const b=r[a];if(b){if(b.isClosed){r[a]=void 0;continue}}else continue;u--;const T=qAt(b,XL(t,b.fileName));if(b.isClosed){r[a]=void 0;continue}h==null||h(b,a,T),r[a]&&(p<a&&(r[p]=b,r[a]=void 0),p++)}return a;function g(){a++,a===r.length&&(p<a&&(r.length=p),a=0,p=0)}}function jAt(t){const r=[],a=[],u=C(250),h=C(500),p=C(2e3);return g;function g(q,X,Z){const Q={fileName:q,callback:X,unchangedPolls:0,mtime:XL(t,q)};return r.push(Q),R(Q,Z),{close:()=>{Q.isClosed=!0,GL(r,Q)}}}function C(q){const X=[];return X.pollingInterval=q,X.pollIndex=0,X.pollScheduled=!1,X}function b(q,X){X.pollIndex=E(X,X.pollingInterval,X.pollIndex,Doe[X.pollingInterval]),X.length?U(X.pollingInterval):(j.assert(X.pollIndex===0),X.pollScheduled=!1)}function T(q,X){E(a,250,0,a.length),b(q,X),!X.pollScheduled&&a.length&&U(250)}function E(q,X,Z,Q){return GKe(t,q,Z,Q,re);function re(oe,pe,de){de?(oe.unchangedPolls=0,q!==a&&(q[pe]=void 0,F(oe))):oe.unchangedPolls!==KJ[X]?oe.unchangedPolls++:q===a?(oe.unchangedPolls=1,q[pe]=void 0,R(oe,250)):X!==2e3&&(oe.unchangedPolls++,q[pe]=void 0,R(oe,X===250?500:2e3))}}function N(q){switch(q){case 250:return u;case 500:return h;case 2e3:return p}}function R(q,X){N(X).push(q),H(X)}function F(q){a.push(q),H(250)}function H(q){N(q).pollScheduled||U(q)}function U(q){N(q).pollScheduled=t.setTimeout(q===250?T:b,q,q===250?"pollLowPollingIntervalQueue":"pollPollingIntervalQueue",N(q))}}function zAt(t,r,a,u){const h=Of(),p=u?new Map:void 0,g=new Map,C=Mf(r);return b;function b(E,N,R,F){const H=C(E);h.add(H,N).length===1&&p&&p.set(H,a(E)||gp);const U=ts(H)||".",q=g.get(U)||T(ts(E)||".",U,F);return q.referenceCount++,{close:()=>{q.referenceCount===1?(q.close(),g.delete(U)):q.referenceCount--,h.remove(H,N)}}}function T(E,N,R){const F=t(E,1,(H,U)=>{if(!Oo(U))return;const q=wo(U,E),X=C(q),Z=q&&h.get(X);if(Z){let Q,re=1;if(p){const oe=p.get(X);if(H==="change"&&(Q=a(q)||gp,Q.getTime()===oe.getTime()))return;Q||(Q=a(q)||gp),p.set(X,Q),oe===gp?re=0:Q===gp&&(re=2)}for(const oe of Z)oe(q,re,Q)}},!1,500,R);return F.referenceCount=0,g.set(N,F),F}}function UAt(t){const r=[];let a=0,u;return h;function h(C,b){const T={fileName:C,callback:b,mtime:XL(t,C)};return r.push(T),g(),{close:()=>{T.isClosed=!0,GL(r,T)}}}function p(){u=void 0,a=GKe(t,r,a,Doe[250]),g()}function g(){!r.length||u||(u=t.setTimeout(p,2e3,"pollQueue"))}}function KKe(t,r,a,u,h){const g=Mf(r)(a),C=t.get(g);return C?C.callbacks.push(u):t.set(g,{watcher:h((b,T,E)=>{var N;return(N=t.get(g))==null?void 0:N.callbacks.slice().forEach(R=>R(b,T,E))}),callbacks:[u]}),{close:()=>{const b=t.get(g);b&&(!GR(b.callbacks,u)||b.callbacks.length||(t.delete(g),Zm(b)))}}}function qAt(t,r){const a=t.mtime.getTime(),u=r.getTime();return a!==u?(t.mtime=r,t.callback(t.fileName,Eoe(a,u),r),!0):!1}function Eoe(t,r){return t===0?0:r===0?2:1}var XJ=["/node_modules/.","/.git","/.#"],XKe=Tc;function CW(t){return XKe(t)}function Oke(t){XKe=t}function $At({watchDirectory:t,useCaseSensitiveFileNames:r,getCurrentDirectory:a,getAccessibleSortedChildDirectories:u,fileSystemEntryExists:h,realpath:p,setTimeout:g,clearTimeout:C}){const b=new Map,T=Of(),E=new Map;let N;const R=E6(!r),F=Mf(r);return(ue,Ie,we,he)=>we?H(ue,he,Ie):t(ue,Ie,we,he);function H(ue,Ie,we,he){const Ae=F(ue);let ke=b.get(Ae);ke?ke.refCount++:(ke={watcher:t(ue,De=>{var qe;pe(De,Ie)||(Ie!=null&&Ie.synchronousWatchDirectory?((qe=b.get(Ae))!=null&&qe.targetWatcher||U(ue,Ae,De),oe(ue,Ae,Ie)):q(ue,Ae,De,Ie))},!1,Ie),refCount:1,childWatches:w,targetWatcher:void 0,links:void 0},b.set(Ae,ke),oe(ue,Ae,Ie)),he&&(ke.links??(ke.links=new Set)).add(he);const Te=we&&{dirName:ue,callback:we};return Te&&T.add(Ae,Te),{dirName:ue,close:()=>{var De;const qe=j.checkDefined(b.get(Ae));Te&&T.remove(Ae,Te),he&&((De=qe.links)==null||De.delete(he)),qe.refCount--,!qe.refCount&&(b.delete(Ae),qe.links=void 0,Zm(qe),re(qe),qe.childWatches.forEach(d0))}}}function U(ue,Ie,we,he){var Ae,ke;let Te,De;Oo(we)?Te=we:De=we,T.forEach((qe,se)=>{if(!(De&&De.get(se)===!0)&&(se===Ie||so(Ie,se)&&Ie[se.length]===Kl))if(De)if(he){const Ne=De.get(se);Ne?Ne.push(...he):De.set(se,he.slice())}else De.set(se,!0);else qe.forEach(({callback:Ne})=>Ne(Te))}),(ke=(Ae=b.get(Ie))==null?void 0:Ae.links)==null||ke.forEach(qe=>{const se=Ne=>zr(qe,c0(ue,Ne,F));De?U(qe,F(qe),De,he==null?void 0:he.map(se)):U(qe,F(qe),se(Te))})}function q(ue,Ie,we,he){const Ae=b.get(Ie);if(Ae&&h(ue,1)){X(ue,Ie,we,he);return}U(ue,Ie,we),re(Ae),Q(Ae)}function X(ue,Ie,we,he){const Ae=E.get(Ie);Ae?Ae.fileNames.push(we):E.set(Ie,{dirName:ue,options:he,fileNames:[we]}),N&&(C(N),N=void 0),N=g(Z,1e3,"timerToUpdateChildWatches")}function Z(){var ue;N=void 0,CW(`sysLog:: onTimerToUpdateChildWatches:: ${E.size}`);const Ie=sl(),we=new Map;for(;!N&&E.size;){const Ae=E.entries().next();j.assert(!Ae.done);const{value:[ke,{dirName:Te,options:De,fileNames:qe}]}=Ae;E.delete(ke);const se=oe(Te,ke,De);(ue=b.get(ke))!=null&&ue.targetWatcher||U(Te,ke,we,se?void 0:qe)}CW(`sysLog:: invokingWatchers:: Elapsed:: ${sl()-Ie}ms:: ${E.size}`),T.forEach((Ae,ke)=>{const Te=we.get(ke);Te&&Ae.forEach(({callback:De,dirName:qe})=>{Ao(Te)?Te.forEach(De):De(qe)})});const he=sl()-Ie;CW(`sysLog:: Elapsed:: ${he}ms:: onTimerToUpdateChildWatches:: ${E.size} ${N}`)}function Q(ue){if(!ue)return;const Ie=ue.childWatches;ue.childWatches=w;for(const we of Ie)we.close(),Q(b.get(F(we.dirName)))}function re(ue){ue!=null&&ue.targetWatcher&&(ue.targetWatcher.close(),ue.targetWatcher=void 0)}function oe(ue,Ie,we){const he=b.get(Ie);if(!he)return!1;const Ae=ca(p(ue));let ke,Te;return R(Ae,ue)===0?ke=UJ(h(ue,1)?es(u(ue),se=>{const Ne=wo(se,ue);return!pe(Ne,we)&&R(Ne,ca(p(Ne)))===0?Ne:void 0}):w,he.childWatches,(se,Ne)=>R(se,Ne.dirName),De,d0,qe):he.targetWatcher&&R(Ae,he.targetWatcher.dirName)===0?(ke=!1,j.assert(he.childWatches===w)):(re(he),he.targetWatcher=H(Ae,we,void 0,ue),he.childWatches.forEach(d0),ke=!0),he.childWatches=Te||w,ke;function De(se){const Ne=H(se,we);qe(Ne)}function qe(se){(Te||(Te=[])).push(se)}}function pe(ue,Ie){return Ft(XJ,we=>de(ue,we))||QKe(ue,Ie,r,a)}function de(ue,Ie){return ue.includes(Ie)?!0:r?!1:F(ue).includes(Ie)}}var Mke=(t=>(t[t.File=0]="File",t[t.Directory=1]="Directory",t))(Mke||{});function JAt(t){return(r,a,u)=>t(a===1?"change":"rename","",u)}function GAt(t,r,a){return(u,h,p)=>{u==="rename"?(p||(p=a(t)||gp),r(t,p!==gp?0:2,p)):r(t,1,p)}}function QKe(t,r,a,u){return((r==null?void 0:r.excludeDirectories)||(r==null?void 0:r.excludeFiles))&&(eQ(t,r==null?void 0:r.excludeFiles,a,u())||eQ(t,r==null?void 0:r.excludeDirectories,a,u()))}function ZKe(t,r,a,u,h){return(p,g)=>{if(p==="rename"){const C=g?ca(zr(t,g)):t;(!g||!QKe(C,a,u,h))&&r(C)}}}function Rke({pollingWatchFileWorker:t,getModifiedTime:r,setTimeout:a,clearTimeout:u,fsWatchWorker:h,fileSystemEntryExists:p,useCaseSensitiveFileNames:g,getCurrentDirectory:C,fsSupportsRecursiveFsWatch:b,getAccessibleSortedChildDirectories:T,realpath:E,tscWatchFile:N,useNonPollingWatchers:R,tscWatchDirectory:F,inodeWatching:H,fsWatchWithTimestamp:U,sysLog:q}){const X=new Map,Z=new Map,Q=new Map;let re,oe,pe,de,ue=!1;return{watchFile:Ie,watchDirectory:Te};function Ie(Pe,We,ze,Nt){Nt=Ae(Nt,R);const $e=j.checkDefined(Nt.watchFile);switch($e){case 0:return se(Pe,We,250,void 0);case 1:return se(Pe,We,ze,void 0);case 2:return we()(Pe,We,ze,void 0);case 3:return he()(Pe,We,void 0,void 0);case 4:return Ne(Pe,0,GAt(Pe,We,r),!1,ze,XH(Nt));case 5:return pe||(pe=zAt(Ne,g,r,U)),pe(Pe,We,ze,XH(Nt));default:j.assertNever($e)}}function we(){return re||(re=jAt({getModifiedTime:r,setTimeout:a}))}function he(){return oe||(oe=UAt({getModifiedTime:r,setTimeout:a}))}function Ae(Pe,We){if(Pe&&Pe.watchFile!==void 0)return Pe;switch(N){case"PriorityPollingInterval":return{watchFile:1};case"DynamicPriorityPolling":return{watchFile:2};case"UseFsEvents":return ke(4,1,Pe);case"UseFsEventsWithFallbackDynamicPolling":return ke(4,2,Pe);case"UseFsEventsOnParentDirectory":We=!0;default:return We?ke(5,1,Pe):{watchFile:4}}}function ke(Pe,We,ze){const Nt=ze==null?void 0:ze.fallbackPolling;return{watchFile:Pe,fallbackPolling:Nt===void 0?We:Nt}}function Te(Pe,We,ze,Nt){return b?Ne(Pe,1,ZKe(Pe,We,Nt,g,C),ze,500,XH(Nt)):(de||(de=$At({useCaseSensitiveFileNames:g,getCurrentDirectory:C,fileSystemEntryExists:p,getAccessibleSortedChildDirectories:T,watchDirectory:De,realpath:E,setTimeout:a,clearTimeout:u})),de(Pe,We,ze,Nt))}function De(Pe,We,ze,Nt){j.assert(!ze);const $e=qe(Nt),et=j.checkDefined($e.watchDirectory);switch(et){case 1:return se(Pe,()=>We(Pe),500,void 0);case 2:return we()(Pe,()=>We(Pe),500,void 0);case 3:return he()(Pe,()=>We(Pe),void 0,void 0);case 0:return Ne(Pe,1,ZKe(Pe,We,Nt,g,C),ze,500,XH($e));default:j.assertNever(et)}}function qe(Pe){if(Pe&&Pe.watchDirectory!==void 0)return Pe;switch(F){case"RecursiveDirectoryUsingFsWatchFile":return{watchDirectory:1};case"RecursiveDirectoryUsingDynamicPriorityPolling":return{watchDirectory:2};default:const We=Pe==null?void 0:Pe.fallbackPolling;return{watchDirectory:0,fallbackPolling:We!==void 0?We:void 0}}}function se(Pe,We,ze,Nt){return KKe(X,g,Pe,We,$e=>t(Pe,$e,ze,Nt))}function Ne(Pe,We,ze,Nt,$e,et){return KKe(Nt?Q:Z,g,Pe,ze,Me=>Oe(Pe,We,Me,Nt,$e,et))}function Oe(Pe,We,ze,Nt,$e,et){let Me,ut;H&&(Me=Pe.substring(Pe.lastIndexOf(Kl)),ut=Me.slice(Kl.length));let wt=p(Pe,We)?dt():tn();return{close:()=>{wt&&(wt.close(),wt=void 0)}};function Et(xn){wt&&(q(`sysLog:: ${Pe}:: Changing watcher to ${xn===dt?"Present":"Missing"}FileSystemEntryWatcher`),wt.close(),wt=xn())}function dt(){if(ue)return q(`sysLog:: ${Pe}:: Defaulting to watchFile`),Ei();try{const xn=(We===1||!U?h:He)(Pe,Nt,H?zt:ze);return xn.on("error",()=>{ze("rename",""),Et(tn)}),xn}catch(xn){return ue||(ue=xn.code==="ENOSPC"),q(`sysLog:: ${Pe}:: Changing to watchFile`),Ei()}}function zt(xn,Pn){let _i;if(Pn&&su(Pn,"~")&&(_i=Pn,Pn=Pn.slice(0,Pn.length-1)),xn==="rename"&&(!Pn||Pn===ut||su(Pn,Me))){const Fi=r(Pe)||gp;_i&&ze(xn,_i,Fi),ze(xn,Pn,Fi),H?Et(Fi===gp?tn:dt):Fi===gp&&Et(tn)}else _i&&ze(xn,_i),ze(xn,Pn)}function Ei(){return Ie(Pe,JAt(ze),$e,et)}function tn(){return Ie(Pe,(xn,Pn,_i)=>{Pn===0&&(_i||(_i=r(Pe)||gp),_i!==gp&&(ze("rename","",_i),Et(dt)))},$e,et)}}function He(Pe,We,ze){let Nt=r(Pe)||gp;return h(Pe,We,($e,et,Me)=>{$e==="change"&&(Me||(Me=r(Pe)||gp),Me.getTime()===Nt.getTime())||(Nt=Me||r(Pe)||gp,ze($e,et,Nt))})}}function Fke(t){const r=t.writeFile;t.writeFile=(a,u,h)=>lce(a,u,!!h,(p,g,C)=>r.call(t,p,g,C),p=>t.createDirectory(p),p=>t.directoryExists(p))}var Pd=(()=>{const t="\uFEFF";function r(){const u=/^native |^\([^)]+\)$|^(?:internal[\\/]|[\w\s]+(?:\.js)?$)/,h=cM,p=cM,g=cM;let C;try{C=cM}catch{C=void 0}let b,T="./profile.cpuprofile";const E=process.platform==="darwin",N=process.platform==="linux"||E,R=g.platform(),F=Ie(),H=h.realpathSync.native?process.platform==="win32"?Pe:h.realpathSync.native:h.realpathSync,U=__filename.endsWith("sys.js")?p.join(p.dirname(__dirname),"__fake__.js"):__filename,q=process.platform==="win32"||E,X=Bh(()=>process.cwd()),{watchFile:Z,watchDirectory:Q}=Rke({pollingWatchFileWorker:he,getModifiedTime:ze,setTimeout,clearTimeout,fsWatchWorker:Ae,useCaseSensitiveFileNames:F,getCurrentDirectory:X,fileSystemEntryExists:se,fsSupportsRecursiveFsWatch:q,getAccessibleSortedChildDirectories:Me=>De(Me).directories,realpath:We,tscWatchFile:e.TSC_WATCHFILE,useNonPollingWatchers:!!e.TSC_NONPOLLING_WATCHER,tscWatchDirectory:e.TSC_WATCHDIRECTORY,inodeWatching:N,fsWatchWithTimestamp:E,sysLog:CW}),re={args:process.argv.slice(2),newLine:g.EOL,useCaseSensitiveFileNames:F,write(Me){process.stdout.write(Me)},getWidthOfTerminal(){return process.stdout.columns},writeOutputIsTTY(){return process.stdout.isTTY},readFile:ke,writeFile:Te,watchFile:Z,watchDirectory:Q,preferNonRecursiveWatch:!q,resolvePath:Me=>p.resolve(Me),fileExists:Ne,directoryExists:Oe,getAccessibleFileSystemEntries:De,createDirectory(Me){if(!re.directoryExists(Me))try{h.mkdirSync(Me)}catch(ut){if(ut.code!=="EEXIST")throw ut}},getExecutingFilePath(){return U},getCurrentDirectory:X,getDirectories:He,getEnvironmentVariable(Me){return e[Me]||""},readDirectory:qe,getModifiedTime:ze,setModifiedTime:Nt,deleteFile:$e,createHash:C?et:n8,createSHA256Hash:C?et:void 0,getMemoryUsage(){return Pyt.gc&&Pyt.gc(),process.memoryUsage().heapUsed},getFileSize(Me){try{const ut=oe(Me);if(ut!=null&&ut.isFile())return ut.size}catch{}return 0},exit(Me){ue(()=>process.exit(Me))},enableCPUProfiler:pe,disableCPUProfiler:ue,cpuProfilingEnabled:()=>!!b||Yt(process.execArgv,"--cpu-prof")||Yt(process.execArgv,"--prof"),realpath:We,debugMode:!!e.NODE_INSPECTOR_IPC||!!e.VSCODE_INSPECTOR_OPTIONS||Ft(process.execArgv,Me=>/^--(?:inspect|debug)(?:-brk)?(?:=\d+)?$/i.test(Me))||!!process.recordreplay,tryEnableSourceMapsForHost(){try{cM.install()}catch{}},setTimeout,clearTimeout,clearScreen:()=>{process.stdout.write("\x1B[2J\x1B[3J\x1B[H")},setBlocking:()=>{var Me;const ut=(Me=process.stdout)==null?void 0:Me._handle;ut&&ut.setBlocking&&ut.setBlocking(!0)},base64decode:Me=>Buffer.from(Me,"base64").toString("utf8"),base64encode:Me=>Buffer.from(Me).toString("base64"),require:(Me,ut)=>{try{const wt=sNe(ut,Me,re);return{module:ukt(wt),modulePath:wt,error:void 0}}catch(wt){return{module:void 0,modulePath:void 0,error:wt}}}};return re;function oe(Me){return h.statSync(Me,{throwIfNoEntry:!1})}function pe(Me,ut){if(b)return ut(),!1;const wt=cM;if(!wt||!wt.Session)return ut(),!1;const Et=new wt.Session;return Et.connect(),Et.post("Profiler.enable",()=>{Et.post("Profiler.start",()=>{b=Et,T=Me,ut()})}),!0}function de(Me){let ut=0;const wt=new Map,Et=Rf(p.dirname(U)),dt=`file://${Ly(Et)===1?"":"/"}${Et}`;for(const zt of Me.nodes)if(zt.callFrame.url){const Ei=Rf(zt.callFrame.url);Vm(dt,Ei,F)?zt.callFrame.url=QL(dt,Ei,dt,Mf(F),!0):u.test(Ei)||(zt.callFrame.url=(wt.has(Ei)?wt:wt.set(Ei,`external${ut}.js`)).get(Ei),ut++)}return Me}function ue(Me){if(b&&b!=="stopping"){const ut=b;return b.post("Profiler.stop",(wt,{profile:Et})=>{var dt;if(!wt){try{(dt=oe(T))!=null&&dt.isDirectory()&&(T=p.join(T,`${new Date().toISOString().replace(/:/g,"-")}+P${process.pid}.cpuprofile`))}catch{}try{h.mkdirSync(p.dirname(T),{recursive:!0})}catch{}h.writeFileSync(T,JSON.stringify(de(Et)))}b=void 0,ut.disconnect(),Me()}),b="stopping",!0}else return Me(),!1}function Ie(){return R==="win32"||R==="win64"?!1:!Ne(we(__filename))}function we(Me){return Me.replace(/\w/g,ut=>{const wt=ut.toUpperCase();return ut===wt?ut.toLowerCase():wt})}function he(Me,ut,wt){h.watchFile(Me,{persistent:!0,interval:wt},dt);let Et;return{close:()=>h.unwatchFile(Me,dt)};function dt(zt,Ei){const tn=+Ei.mtime==0||Et===2;if(+zt.mtime==0){if(tn)return;Et=2}else if(tn)Et=0;else{if(+zt.mtime==+Ei.mtime)return;Et=1}ut(Me,Et,zt.mtime)}}function Ae(Me,ut,wt){return h.watch(Me,q?{persistent:!0,recursive:!!ut}:{persistent:!0},wt)}function ke(Me,ut){let wt;try{wt=h.readFileSync(Me)}catch{return}let Et=wt.length;if(Et>=2&&wt[0]===254&&wt[1]===255){Et&=-2;for(let dt=0;dt<Et;dt+=2){const zt=wt[dt];wt[dt]=wt[dt+1],wt[dt+1]=zt}return wt.toString("utf16le",2)}return Et>=2&&wt[0]===255&&wt[1]===254?wt.toString("utf16le",2):Et>=3&&wt[0]===239&&wt[1]===187&&wt[2]===191?wt.toString("utf8",3):wt.toString("utf8")}function Te(Me,ut,wt){wt&&(ut=t+ut);let Et;try{Et=h.openSync(Me,"w"),h.writeSync(Et,ut,void 0,"utf8")}finally{Et!==void 0&&h.closeSync(Et)}}function De(Me){try{const ut=h.readdirSync(Me||".",{withFileTypes:!0}),wt=[],Et=[];for(const dt of ut){const zt=typeof dt=="string"?dt:dt.name;if(zt==="."||zt==="..")continue;let Ei;if(typeof dt=="string"||dt.isSymbolicLink()){const tn=zr(Me,zt);try{if(Ei=oe(tn),!Ei)continue}catch{continue}}else Ei=dt;Ei.isFile()?wt.push(zt):Ei.isDirectory()&&Et.push(zt)}return wt.sort(),Et.sort(),{files:wt,directories:Et}}catch{return Vce}}function qe(Me,ut,wt,Et,dt){return Fce(Me,ut,wt,Et,F,process.cwd(),dt,De,We)}function se(Me,ut){const wt=Error.stackTraceLimit;Error.stackTraceLimit=0;try{const Et=oe(Me);if(!Et)return!1;switch(ut){case 0:return Et.isFile();case 1:return Et.isDirectory();default:return!1}}catch{return!1}finally{Error.stackTraceLimit=wt}}function Ne(Me){return se(Me,0)}function Oe(Me){return se(Me,1)}function He(Me){return De(Me).directories.slice()}function Pe(Me){return Me.length<260?h.realpathSync.native(Me):h.realpathSync(Me)}function We(Me){try{return H(Me)}catch{return Me}}function ze(Me){var ut;const wt=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return(ut=oe(Me))==null?void 0:ut.mtime}catch{return}finally{Error.stackTraceLimit=wt}}function Nt(Me,ut){try{h.utimesSync(Me,ut,ut)}catch{return}}function $e(Me){try{return h.unlinkSync(Me)}catch{return}}function et(Me){const ut=C.createHash("sha256");return ut.update(Me),ut.digest("hex")}}let a;return soe()&&(a=r()),a&&Fke(a),a})();function YKe(t){Pd=t}Pd&&Pd.getEnvironmentVariable&&(HAt(Pd),j.setAssertionLevel(/^development$/i.test(Pd.getEnvironmentVariable("NODE_ENV"))?1:0)),Pd&&Pd.debugMode&&(j.isDebugging=!0);var Kl="/",QJ="\\",eXe="://",KAt=/\\/g;function Ioe(t){return t===47||t===92}function Bke(t){return ZJ(t)<0}function yp(t){return ZJ(t)>0}function Noe(t){const r=ZJ(t);return r>0&&r===t.length}function r8(t){return ZJ(t)!==0}function am(t){return/^\.\.?(?:$|[\\/])/.test(t)}function Loe(t){return!r8(t)&&!am(t)}function N6(t){return ud(t).includes(".")}function Xl(t,r){return t.length>r.length&&su(t,r)}function Ru(t,r){for(const a of r)if(Xl(t,a))return!0;return!1}function Uw(t){return t.length>0&&Ioe(t.charCodeAt(t.length-1))}function tXe(t){return t>=97&&t<=122||t>=65&&t<=90}function XAt(t,r){const a=t.charCodeAt(r);if(a===58)return r+1;if(a===37&&t.charCodeAt(r+1)===51){const u=t.charCodeAt(r+2);if(u===97||u===65)return r+3}return-1}function ZJ(t){if(!t)return 0;const r=t.charCodeAt(0);if(r===47||r===92){if(t.charCodeAt(1)!==r)return 1;const u=t.indexOf(r===47?Kl:QJ,2);return u<0?t.length:u+1}if(tXe(r)&&t.charCodeAt(1)===58){const u=t.charCodeAt(2);if(u===47||u===92)return 3;if(t.length===2)return 2}const a=t.indexOf(eXe);if(a!==-1){const u=a+eXe.length,h=t.indexOf(Kl,u);if(h!==-1){const p=t.slice(0,a),g=t.slice(u,h);if(p==="file"&&(g===""||g==="localhost")&&tXe(t.charCodeAt(h+1))){const C=XAt(t,h+2);if(C!==-1){if(t.charCodeAt(C)===47)return~(C+1);if(C===t.length)return~C}}return~(h+1)}return~t.length}return 0}function Ly(t){const r=ZJ(t);return r<0?~r:r}function ts(t){t=Rf(t);const r=Ly(t);return r===t.length?t:(t=Mk(t),t.slice(0,Math.max(r,t.lastIndexOf(Kl))))}function ud(t,r,a){if(t=Rf(t),Ly(t)===t.length)return"";t=Mk(t);const h=t.slice(Math.max(Ly(t),t.lastIndexOf(Kl)+1)),p=r!==void 0&&a!==void 0?L6(h,r,a):void 0;return p?h.slice(0,h.length-p.length):h}function iXe(t,r,a){if(so(r,".")||(r="."+r),t.length>=r.length&&t.charCodeAt(t.length-r.length)===46){const u=t.slice(t.length-r.length);if(a(u,r))return u}}function QAt(t,r,a){if(typeof r=="string")return iXe(t,r,a)||"";for(const u of r){const h=iXe(t,u,a);if(h)return h}return""}function L6(t,r,a){if(r)return QAt(Mk(t),r,a?jw:NT);const u=ud(t),h=u.lastIndexOf(".");return h>=0?u.substring(h):""}function ZAt(t,r){const a=t.substring(0,r),u=t.substring(r).split(Kl);return u.length&&!rl(u)&&u.pop(),[a,...u]}function af(t,r=""){return t=zr(r,t),ZAt(t,Ly(t))}function sS(t,r){return t.length===0?"":(t[0]&&Ad(t[0]))+t.slice(1,r).join(Kl)}function Rf(t){return t.includes("\\")?t.replace(KAt,Kl):t}function rI(t){if(!Ft(t))return[];const r=[t[0]];for(let a=1;a<t.length;a++){const u=t[a];if(u&&u!=="."){if(u===".."){if(r.length>1){if(r[r.length-1]!==".."){r.pop();continue}}else if(r[0])continue}r.push(u)}}return r}function zr(t,...r){t&&(t=Rf(t));for(let a of r)a&&(a=Rf(a),!t||Ly(a)!==0?t=a:t=Ad(t)+a);return t}function Ok(t,...r){return ca(Ft(r)?zr(t,...r):Rf(t))}function SW(t,r){return rI(af(t,r))}function wo(t,r){return sS(SW(t,r))}function ca(t){if(t=Rf(t),!Aoe.test(t))return t;const r=t.replace(/\/\.\//g,"/").replace(/^\.\//,"");if(r!==t&&(t=r,!Aoe.test(t)))return t;const a=sS(rI(af(t)));return a&&Uw(t)?Ad(a):a}function YAt(t){return t.length===0?"":t.slice(1).join(Kl)}function Poe(t,r){return YAt(SW(t,r))}function ol(t,r,a){const u=yp(t)?ca(t):wo(t,r);return a(u)}function Mk(t){return Uw(t)?t.substr(0,t.length-1):t}function Ad(t){return Uw(t)?t:t+Kl}function sI(t){return!r8(t)&&!am(t)?"./"+t:t}function wW(t,r,a,u){const h=a!==void 0&&u!==void 0?L6(t,a,u):L6(t);return h?t.slice(0,t.length-h.length)+(so(r,".")?r:"."+r):t}function YJ(t,r){const a=Ule(t);return a?t.slice(0,t.length-a.length)+(so(r,".")?r:"."+r):wW(t,r)}var Aoe=/\/\/|(?:^|\/)\.\.?(?:$|\/)/;function Wke(t,r,a){if(t===r)return 0;if(t===void 0)return-1;if(r===void 0)return 1;const u=t.substring(0,Ly(t)),h=r.substring(0,Ly(r)),p=mW(u,h);if(p!==0)return p;const g=t.substring(u.length),C=r.substring(h.length);if(!Aoe.test(g)&&!Aoe.test(C))return a(g,C);const b=rI(af(t)),T=rI(af(r)),E=Math.min(b.length,T.length);for(let N=1;N<E;N++){const R=a(b[N],T[N]);if(R!==0)return R}return _l(b.length,T.length)}function nXe(t,r){return Wke(t,r,sh)}function rXe(t,r){return Wke(t,r,mW)}function Hb(t,r,a,u){return typeof a=="string"?(t=zr(a,t),r=zr(a,r)):typeof a=="boolean"&&(u=a),Wke(t,r,E6(u))}function Vm(t,r,a,u){if(typeof a=="string"?(t=zr(a,t),r=zr(a,r)):typeof a=="boolean"&&(u=a),t===void 0||r===void 0)return!1;if(t===r)return!0;const h=rI(af(t)),p=rI(af(r));if(p.length<h.length)return!1;const g=u?jw:NT;for(let C=0;C<h.length;C++)if(!(C===0?jw:g)(h[C],p[C]))return!1;return!0}function Ooe(t,r,a){const u=a(t),h=a(r);return so(u,h+"/")||so(u,h+"\\")}function sXe(t,r,a,u){const h=rI(af(t)),p=rI(af(r));let g;for(g=0;g<h.length&&g<p.length;g++){const T=u(h[g]),E=u(p[g]);if(!(g===0?jw:a)(T,E))break}if(g===0)return p;const C=p.slice(g),b=[];for(;g<h.length;g++)b.push("..");return["",...b,...C]}function c0(t,r,a){j.assert(Ly(t)>0==Ly(r)>0,"Paths must either both be absolute or both be relative");const p=sXe(t,r,(typeof a=="boolean"?a:!1)?jw:NT,typeof a=="function"?a:hl);return sS(p)}function s8(t,r,a){return yp(t)?QL(r,t,r,a,!1):t}function o8(t,r,a){return sI(c0(ts(t),r,a))}function QL(t,r,a,u,h){const p=sXe(Ok(a,t),Ok(a,r),NT,u),g=p[0];if(h&&yp(g)){const C=g.charAt(0)===Kl?"file://":"file:///";p[0]=C+g}return sS(p)}function kg(t,r){for(;;){const a=r(t);if(a!==void 0)return a;const u=ts(t);if(u===t)return;t=u}}function eG(t){return su(t,"/node_modules")}function M(t,r,a,u,h,p,g){return{code:t,category:r,key:a,message:u,reportsUnnecessary:h,elidedInCompatabilityPyramid:p,reportsDeprecated:g}}var k={Unterminated_string_literal:M(1002,1,"Unterminated_string_literal_1002","Unterminated string literal."),Identifier_expected:M(1003,1,"Identifier_expected_1003","Identifier expected."),_0_expected:M(1005,1,"_0_expected_1005","'{0}' expected."),A_file_cannot_have_a_reference_to_itself:M(1006,1,"A_file_cannot_have_a_reference_to_itself_1006","A file cannot have a reference to itself."),The_parser_expected_to_find_a_1_to_match_the_0_token_here:M(1007,1,"The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007","The parser expected to find a '{1}' to match the '{0}' token here."),Trailing_comma_not_allowed:M(1009,1,"Trailing_comma_not_allowed_1009","Trailing comma not allowed."),Asterisk_Slash_expected:M(1010,1,"Asterisk_Slash_expected_1010","'*/' expected."),An_element_access_expression_should_take_an_argument:M(1011,1,"An_element_access_expression_should_take_an_argument_1011","An element access expression should take an argument."),Unexpected_token:M(1012,1,"Unexpected_token_1012","Unexpected token."),A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma:M(1013,1,"A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013","A rest parameter or binding pattern may not have a trailing comma."),A_rest_parameter_must_be_last_in_a_parameter_list:M(1014,1,"A_rest_parameter_must_be_last_in_a_parameter_list_1014","A rest parameter must be last in a parameter list."),Parameter_cannot_have_question_mark_and_initializer:M(1015,1,"Parameter_cannot_have_question_mark_and_initializer_1015","Parameter cannot have question mark and initializer."),A_required_parameter_cannot_follow_an_optional_parameter:M(1016,1,"A_required_parameter_cannot_follow_an_optional_parameter_1016","A required parameter cannot follow an optional parameter."),An_index_signature_cannot_have_a_rest_parameter:M(1017,1,"An_index_signature_cannot_have_a_rest_parameter_1017","An index signature cannot have a rest parameter."),An_index_signature_parameter_cannot_have_an_accessibility_modifier:M(1018,1,"An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018","An index signature parameter cannot have an accessibility modifier."),An_index_signature_parameter_cannot_have_a_question_mark:M(1019,1,"An_index_signature_parameter_cannot_have_a_question_mark_1019","An index signature parameter cannot have a question mark."),An_index_signature_parameter_cannot_have_an_initializer:M(1020,1,"An_index_signature_parameter_cannot_have_an_initializer_1020","An index signature parameter cannot have an initializer."),An_index_signature_must_have_a_type_annotation:M(1021,1,"An_index_signature_must_have_a_type_annotation_1021","An index signature must have a type annotation."),An_index_signature_parameter_must_have_a_type_annotation:M(1022,1,"An_index_signature_parameter_must_have_a_type_annotation_1022","An index signature parameter must have a type annotation."),readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature:M(1024,1,"readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024","'readonly' modifier can only appear on a property declaration or index signature."),An_index_signature_cannot_have_a_trailing_comma:M(1025,1,"An_index_signature_cannot_have_a_trailing_comma_1025","An index signature cannot have a trailing comma."),Accessibility_modifier_already_seen:M(1028,1,"Accessibility_modifier_already_seen_1028","Accessibility modifier already seen."),_0_modifier_must_precede_1_modifier:M(1029,1,"_0_modifier_must_precede_1_modifier_1029","'{0}' modifier must precede '{1}' modifier."),_0_modifier_already_seen:M(1030,1,"_0_modifier_already_seen_1030","'{0}' modifier already seen."),_0_modifier_cannot_appear_on_class_elements_of_this_kind:M(1031,1,"_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031","'{0}' modifier cannot appear on class elements of this kind."),super_must_be_followed_by_an_argument_list_or_member_access:M(1034,1,"super_must_be_followed_by_an_argument_list_or_member_access_1034","'super' must be followed by an argument list or member access."),Only_ambient_modules_can_use_quoted_names:M(1035,1,"Only_ambient_modules_can_use_quoted_names_1035","Only ambient modules can use quoted names."),Statements_are_not_allowed_in_ambient_contexts:M(1036,1,"Statements_are_not_allowed_in_ambient_contexts_1036","Statements are not allowed in ambient contexts."),A_declare_modifier_cannot_be_used_in_an_already_ambient_context:M(1038,1,"A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038","A 'declare' modifier cannot be used in an already ambient context."),Initializers_are_not_allowed_in_ambient_contexts:M(1039,1,"Initializers_are_not_allowed_in_ambient_contexts_1039","Initializers are not allowed in ambient contexts."),_0_modifier_cannot_be_used_in_an_ambient_context:M(1040,1,"_0_modifier_cannot_be_used_in_an_ambient_context_1040","'{0}' modifier cannot be used in an ambient context."),_0_modifier_cannot_be_used_here:M(1042,1,"_0_modifier_cannot_be_used_here_1042","'{0}' modifier cannot be used here."),_0_modifier_cannot_appear_on_a_module_or_namespace_element:M(1044,1,"_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044","'{0}' modifier cannot appear on a module or namespace element."),Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier:M(1046,1,"Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046","Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."),A_rest_parameter_cannot_be_optional:M(1047,1,"A_rest_parameter_cannot_be_optional_1047","A rest parameter cannot be optional."),A_rest_parameter_cannot_have_an_initializer:M(1048,1,"A_rest_parameter_cannot_have_an_initializer_1048","A rest parameter cannot have an initializer."),A_set_accessor_must_have_exactly_one_parameter:M(1049,1,"A_set_accessor_must_have_exactly_one_parameter_1049","A 'set' accessor must have exactly one parameter."),A_set_accessor_cannot_have_an_optional_parameter:M(1051,1,"A_set_accessor_cannot_have_an_optional_parameter_1051","A 'set' accessor cannot have an optional parameter."),A_set_accessor_parameter_cannot_have_an_initializer:M(1052,1,"A_set_accessor_parameter_cannot_have_an_initializer_1052","A 'set' accessor parameter cannot have an initializer."),A_set_accessor_cannot_have_rest_parameter:M(1053,1,"A_set_accessor_cannot_have_rest_parameter_1053","A 'set' accessor cannot have rest parameter."),A_get_accessor_cannot_have_parameters:M(1054,1,"A_get_accessor_cannot_have_parameters_1054","A 'get' accessor cannot have parameters."),Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value:M(1055,1,"Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compa_1055","Type '{0}' is not a valid async function return type in ES5 because it does not refer to a Promise-compatible constructor value."),Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher:M(1056,1,"Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056","Accessors are only available when targeting ECMAScript 5 and higher."),The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:M(1058,1,"The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058","The return type of an async function must either be a valid promise or must not contain a callable 'then' member."),A_promise_must_have_a_then_method:M(1059,1,"A_promise_must_have_a_then_method_1059","A promise must have a 'then' method."),The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback:M(1060,1,"The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060","The first parameter of the 'then' method of a promise must be a callback."),Enum_member_must_have_initializer:M(1061,1,"Enum_member_must_have_initializer_1061","Enum member must have initializer."),Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method:M(1062,1,"Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062","Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."),An_export_assignment_cannot_be_used_in_a_namespace:M(1063,1,"An_export_assignment_cannot_be_used_in_a_namespace_1063","An export assignment cannot be used in a namespace."),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0:M(1064,1,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064","The return type of an async function or method must be the global Promise<T> type. Did you mean to write 'Promise<{0}>'?"),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type:M(1065,1,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1065","The return type of an async function or method must be the global Promise<T> type."),In_ambient_enum_declarations_member_initializer_must_be_constant_expression:M(1066,1,"In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066","In ambient enum declarations member initializer must be constant expression."),Unexpected_token_A_constructor_method_accessor_or_property_was_expected:M(1068,1,"Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068","Unexpected token. A constructor, method, accessor, or property was expected."),Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces:M(1069,1,"Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069","Unexpected token. A type parameter name was expected without curly braces."),_0_modifier_cannot_appear_on_a_type_member:M(1070,1,"_0_modifier_cannot_appear_on_a_type_member_1070","'{0}' modifier cannot appear on a type member."),_0_modifier_cannot_appear_on_an_index_signature:M(1071,1,"_0_modifier_cannot_appear_on_an_index_signature_1071","'{0}' modifier cannot appear on an index signature."),A_0_modifier_cannot_be_used_with_an_import_declaration:M(1079,1,"A_0_modifier_cannot_be_used_with_an_import_declaration_1079","A '{0}' modifier cannot be used with an import declaration."),Invalid_reference_directive_syntax:M(1084,1,"Invalid_reference_directive_syntax_1084","Invalid 'reference' directive syntax."),_0_modifier_cannot_appear_on_a_constructor_declaration:M(1089,1,"_0_modifier_cannot_appear_on_a_constructor_declaration_1089","'{0}' modifier cannot appear on a constructor declaration."),_0_modifier_cannot_appear_on_a_parameter:M(1090,1,"_0_modifier_cannot_appear_on_a_parameter_1090","'{0}' modifier cannot appear on a parameter."),Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:M(1091,1,"Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091","Only a single variable declaration is allowed in a 'for...in' statement."),Type_parameters_cannot_appear_on_a_constructor_declaration:M(1092,1,"Type_parameters_cannot_appear_on_a_constructor_declaration_1092","Type parameters cannot appear on a constructor declaration."),Type_annotation_cannot_appear_on_a_constructor_declaration:M(1093,1,"Type_annotation_cannot_appear_on_a_constructor_declaration_1093","Type annotation cannot appear on a constructor declaration."),An_accessor_cannot_have_type_parameters:M(1094,1,"An_accessor_cannot_have_type_parameters_1094","An accessor cannot have type parameters."),A_set_accessor_cannot_have_a_return_type_annotation:M(1095,1,"A_set_accessor_cannot_have_a_return_type_annotation_1095","A 'set' accessor cannot have a return type annotation."),An_index_signature_must_have_exactly_one_parameter:M(1096,1,"An_index_signature_must_have_exactly_one_parameter_1096","An index signature must have exactly one parameter."),_0_list_cannot_be_empty:M(1097,1,"_0_list_cannot_be_empty_1097","'{0}' list cannot be empty."),Type_parameter_list_cannot_be_empty:M(1098,1,"Type_parameter_list_cannot_be_empty_1098","Type parameter list cannot be empty."),Type_argument_list_cannot_be_empty:M(1099,1,"Type_argument_list_cannot_be_empty_1099","Type argument list cannot be empty."),Invalid_use_of_0_in_strict_mode:M(1100,1,"Invalid_use_of_0_in_strict_mode_1100","Invalid use of '{0}' in strict mode."),with_statements_are_not_allowed_in_strict_mode:M(1101,1,"with_statements_are_not_allowed_in_strict_mode_1101","'with' statements are not allowed in strict mode."),delete_cannot_be_called_on_an_identifier_in_strict_mode:M(1102,1,"delete_cannot_be_called_on_an_identifier_in_strict_mode_1102","'delete' cannot be called on an identifier in strict mode."),for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:M(1103,1,"for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103","'for await' loops are only allowed within async functions and at the top levels of modules."),A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement:M(1104,1,"A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104","A 'continue' statement can only be used within an enclosing iteration statement."),A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:M(1105,1,"A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105","A 'break' statement can only be used within an enclosing iteration or switch statement."),The_left_hand_side_of_a_for_of_statement_may_not_be_async:M(1106,1,"The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106","The left-hand side of a 'for...of' statement may not be 'async'."),Jump_target_cannot_cross_function_boundary:M(1107,1,"Jump_target_cannot_cross_function_boundary_1107","Jump target cannot cross function boundary."),A_return_statement_can_only_be_used_within_a_function_body:M(1108,1,"A_return_statement_can_only_be_used_within_a_function_body_1108","A 'return' statement can only be used within a function body."),Expression_expected:M(1109,1,"Expression_expected_1109","Expression expected."),Type_expected:M(1110,1,"Type_expected_1110","Type expected."),Private_field_0_must_be_declared_in_an_enclosing_class:M(1111,1,"Private_field_0_must_be_declared_in_an_enclosing_class_1111","Private field '{0}' must be declared in an enclosing class."),A_default_clause_cannot_appear_more_than_once_in_a_switch_statement:M(1113,1,"A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113","A 'default' clause cannot appear more than once in a 'switch' statement."),Duplicate_label_0:M(1114,1,"Duplicate_label_0_1114","Duplicate label '{0}'."),A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement:M(1115,1,"A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115","A 'continue' statement can only jump to a label of an enclosing iteration statement."),A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:M(1116,1,"A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116","A 'break' statement can only jump to a label of an enclosing statement."),An_object_literal_cannot_have_multiple_properties_with_the_same_name:M(1117,1,"An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117","An object literal cannot have multiple properties with the same name."),An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name:M(1118,1,"An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118","An object literal cannot have multiple get/set accessors with the same name."),An_object_literal_cannot_have_property_and_accessor_with_the_same_name:M(1119,1,"An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119","An object literal cannot have property and accessor with the same name."),An_export_assignment_cannot_have_modifiers:M(1120,1,"An_export_assignment_cannot_have_modifiers_1120","An export assignment cannot have modifiers."),Octal_literals_are_not_allowed_Use_the_syntax_0:M(1121,1,"Octal_literals_are_not_allowed_Use_the_syntax_0_1121","Octal literals are not allowed. Use the syntax '{0}'."),Variable_declaration_list_cannot_be_empty:M(1123,1,"Variable_declaration_list_cannot_be_empty_1123","Variable declaration list cannot be empty."),Digit_expected:M(1124,1,"Digit_expected_1124","Digit expected."),Hexadecimal_digit_expected:M(1125,1,"Hexadecimal_digit_expected_1125","Hexadecimal digit expected."),Unexpected_end_of_text:M(1126,1,"Unexpected_end_of_text_1126","Unexpected end of text."),Invalid_character:M(1127,1,"Invalid_character_1127","Invalid character."),Declaration_or_statement_expected:M(1128,1,"Declaration_or_statement_expected_1128","Declaration or statement expected."),Statement_expected:M(1129,1,"Statement_expected_1129","Statement expected."),case_or_default_expected:M(1130,1,"case_or_default_expected_1130","'case' or 'default' expected."),Property_or_signature_expected:M(1131,1,"Property_or_signature_expected_1131","Property or signature expected."),Enum_member_expected:M(1132,1,"Enum_member_expected_1132","Enum member expected."),Variable_declaration_expected:M(1134,1,"Variable_declaration_expected_1134","Variable declaration expected."),Argument_expression_expected:M(1135,1,"Argument_expression_expected_1135","Argument expression expected."),Property_assignment_expected:M(1136,1,"Property_assignment_expected_1136","Property assignment expected."),Expression_or_comma_expected:M(1137,1,"Expression_or_comma_expected_1137","Expression or comma expected."),Parameter_declaration_expected:M(1138,1,"Parameter_declaration_expected_1138","Parameter declaration expected."),Type_parameter_declaration_expected:M(1139,1,"Type_parameter_declaration_expected_1139","Type parameter declaration expected."),Type_argument_expected:M(1140,1,"Type_argument_expected_1140","Type argument expected."),String_literal_expected:M(1141,1,"String_literal_expected_1141","String literal expected."),Line_break_not_permitted_here:M(1142,1,"Line_break_not_permitted_here_1142","Line break not permitted here."),or_expected:M(1144,1,"or_expected_1144","'{' or ';' expected."),or_JSX_element_expected:M(1145,1,"or_JSX_element_expected_1145","'{' or JSX element expected."),Declaration_expected:M(1146,1,"Declaration_expected_1146","Declaration expected."),Import_declarations_in_a_namespace_cannot_reference_a_module:M(1147,1,"Import_declarations_in_a_namespace_cannot_reference_a_module_1147","Import declarations in a namespace cannot reference a module."),Cannot_use_imports_exports_or_module_augmentations_when_module_is_none:M(1148,1,"Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148","Cannot use imports, exports, or module augmentations when '--module' is 'none'."),File_name_0_differs_from_already_included_file_name_1_only_in_casing:M(1149,1,"File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149","File name '{0}' differs from already included file name '{1}' only in casing."),_0_declarations_must_be_initialized:M(1155,1,"_0_declarations_must_be_initialized_1155","'{0}' declarations must be initialized."),_0_declarations_can_only_be_declared_inside_a_block:M(1156,1,"_0_declarations_can_only_be_declared_inside_a_block_1156","'{0}' declarations can only be declared inside a block."),Unterminated_template_literal:M(1160,1,"Unterminated_template_literal_1160","Unterminated template literal."),Unterminated_regular_expression_literal:M(1161,1,"Unterminated_regular_expression_literal_1161","Unterminated regular expression literal."),An_object_member_cannot_be_declared_optional:M(1162,1,"An_object_member_cannot_be_declared_optional_1162","An object member cannot be declared optional."),A_yield_expression_is_only_allowed_in_a_generator_body:M(1163,1,"A_yield_expression_is_only_allowed_in_a_generator_body_1163","A 'yield' expression is only allowed in a generator body."),Computed_property_names_are_not_allowed_in_enums:M(1164,1,"Computed_property_names_are_not_allowed_in_enums_1164","Computed property names are not allowed in enums."),A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:M(1165,1,"A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165","A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type:M(1166,1,"A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166","A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type."),A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:M(1168,1,"A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168","A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:M(1169,1,"A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169","A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:M(1170,1,"A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170","A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_comma_expression_is_not_allowed_in_a_computed_property_name:M(1171,1,"A_comma_expression_is_not_allowed_in_a_computed_property_name_1171","A comma expression is not allowed in a computed property name."),extends_clause_already_seen:M(1172,1,"extends_clause_already_seen_1172","'extends' clause already seen."),extends_clause_must_precede_implements_clause:M(1173,1,"extends_clause_must_precede_implements_clause_1173","'extends' clause must precede 'implements' clause."),Classes_can_only_extend_a_single_class:M(1174,1,"Classes_can_only_extend_a_single_class_1174","Classes can only extend a single class."),implements_clause_already_seen:M(1175,1,"implements_clause_already_seen_1175","'implements' clause already seen."),Interface_declaration_cannot_have_implements_clause:M(1176,1,"Interface_declaration_cannot_have_implements_clause_1176","Interface declaration cannot have 'implements' clause."),Binary_digit_expected:M(1177,1,"Binary_digit_expected_1177","Binary digit expected."),Octal_digit_expected:M(1178,1,"Octal_digit_expected_1178","Octal digit expected."),Unexpected_token_expected:M(1179,1,"Unexpected_token_expected_1179","Unexpected token. '{' expected."),Property_destructuring_pattern_expected:M(1180,1,"Property_destructuring_pattern_expected_1180","Property destructuring pattern expected."),Array_element_destructuring_pattern_expected:M(1181,1,"Array_element_destructuring_pattern_expected_1181","Array element destructuring pattern expected."),A_destructuring_declaration_must_have_an_initializer:M(1182,1,"A_destructuring_declaration_must_have_an_initializer_1182","A destructuring declaration must have an initializer."),An_implementation_cannot_be_declared_in_ambient_contexts:M(1183,1,"An_implementation_cannot_be_declared_in_ambient_contexts_1183","An implementation cannot be declared in ambient contexts."),Modifiers_cannot_appear_here:M(1184,1,"Modifiers_cannot_appear_here_1184","Modifiers cannot appear here."),Merge_conflict_marker_encountered:M(1185,1,"Merge_conflict_marker_encountered_1185","Merge conflict marker encountered."),A_rest_element_cannot_have_an_initializer:M(1186,1,"A_rest_element_cannot_have_an_initializer_1186","A rest element cannot have an initializer."),A_parameter_property_may_not_be_declared_using_a_binding_pattern:M(1187,1,"A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187","A parameter property may not be declared using a binding pattern."),Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement:M(1188,1,"Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188","Only a single variable declaration is allowed in a 'for...of' statement."),The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:M(1189,1,"The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189","The variable declaration of a 'for...in' statement cannot have an initializer."),The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer:M(1190,1,"The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190","The variable declaration of a 'for...of' statement cannot have an initializer."),An_import_declaration_cannot_have_modifiers:M(1191,1,"An_import_declaration_cannot_have_modifiers_1191","An import declaration cannot have modifiers."),Module_0_has_no_default_export:M(1192,1,"Module_0_has_no_default_export_1192","Module '{0}' has no default export."),An_export_declaration_cannot_have_modifiers:M(1193,1,"An_export_declaration_cannot_have_modifiers_1193","An export declaration cannot have modifiers."),Export_declarations_are_not_permitted_in_a_namespace:M(1194,1,"Export_declarations_are_not_permitted_in_a_namespace_1194","Export declarations are not permitted in a namespace."),export_Asterisk_does_not_re_export_a_default:M(1195,1,"export_Asterisk_does_not_re_export_a_default_1195","'export *' does not re-export a default."),Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified:M(1196,1,"Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified_1196","Catch clause variable type annotation must be 'any' or 'unknown' if specified."),Catch_clause_variable_cannot_have_an_initializer:M(1197,1,"Catch_clause_variable_cannot_have_an_initializer_1197","Catch clause variable cannot have an initializer."),An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive:M(1198,1,"An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198","An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."),Unterminated_Unicode_escape_sequence:M(1199,1,"Unterminated_Unicode_escape_sequence_1199","Unterminated Unicode escape sequence."),Line_terminator_not_permitted_before_arrow:M(1200,1,"Line_terminator_not_permitted_before_arrow_1200","Line terminator not permitted before arrow."),Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead:M(1202,1,"Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202",`Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.`),Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead:M(1203,1,"Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203","Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."),Re_exporting_a_type_when_0_is_enabled_requires_using_export_type:M(1205,1,"Re_exporting_a_type_when_0_is_enabled_requires_using_export_type_1205","Re-exporting a type when '{0}' is enabled requires using 'export type'."),Decorators_are_not_valid_here:M(1206,1,"Decorators_are_not_valid_here_1206","Decorators are not valid here."),Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name:M(1207,1,"Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207","Decorators cannot be applied to multiple get/set accessors of the same name."),Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0:M(1209,1,"Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209","Invalid optional chain from new expression. Did you mean to call '{0}()'?"),Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode:M(1210,1,"Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210","Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."),A_class_declaration_without_the_default_modifier_must_have_a_name:M(1211,1,"A_class_declaration_without_the_default_modifier_must_have_a_name_1211","A class declaration without the 'default' modifier must have a name."),Identifier_expected_0_is_a_reserved_word_in_strict_mode:M(1212,1,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212","Identifier expected. '{0}' is a reserved word in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode:M(1213,1,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213","Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode:M(1214,1,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214","Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."),Invalid_use_of_0_Modules_are_automatically_in_strict_mode:M(1215,1,"Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215","Invalid use of '{0}'. Modules are automatically in strict mode."),Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules:M(1216,1,"Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216","Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."),Export_assignment_is_not_supported_when_module_flag_is_system:M(1218,1,"Export_assignment_is_not_supported_when_module_flag_is_system_1218","Export assignment is not supported when '--module' flag is 'system'."),Generators_are_not_allowed_in_an_ambient_context:M(1221,1,"Generators_are_not_allowed_in_an_ambient_context_1221","Generators are not allowed in an ambient context."),An_overload_signature_cannot_be_declared_as_a_generator:M(1222,1,"An_overload_signature_cannot_be_declared_as_a_generator_1222","An overload signature cannot be declared as a generator."),_0_tag_already_specified:M(1223,1,"_0_tag_already_specified_1223","'{0}' tag already specified."),Signature_0_must_be_a_type_predicate:M(1224,1,"Signature_0_must_be_a_type_predicate_1224","Signature '{0}' must be a type predicate."),Cannot_find_parameter_0:M(1225,1,"Cannot_find_parameter_0_1225","Cannot find parameter '{0}'."),Type_predicate_0_is_not_assignable_to_1:M(1226,1,"Type_predicate_0_is_not_assignable_to_1_1226","Type predicate '{0}' is not assignable to '{1}'."),Parameter_0_is_not_in_the_same_position_as_parameter_1:M(1227,1,"Parameter_0_is_not_in_the_same_position_as_parameter_1_1227","Parameter '{0}' is not in the same position as parameter '{1}'."),A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods:M(1228,1,"A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228","A type predicate is only allowed in return type position for functions and methods."),A_type_predicate_cannot_reference_a_rest_parameter:M(1229,1,"A_type_predicate_cannot_reference_a_rest_parameter_1229","A type predicate cannot reference a rest parameter."),A_type_predicate_cannot_reference_element_0_in_a_binding_pattern:M(1230,1,"A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230","A type predicate cannot reference element '{0}' in a binding pattern."),An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration:M(1231,1,"An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231","An export assignment must be at the top level of a file or module declaration."),An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module:M(1232,1,"An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232","An import declaration can only be used at the top level of a namespace or module."),An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module:M(1233,1,"An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233","An export declaration can only be used at the top level of a namespace or module."),An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:M(1234,1,"An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234","An ambient module declaration is only allowed at the top level in a file."),A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module:M(1235,1,"A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235","A namespace declaration is only allowed at the top level of a namespace or module."),The_return_type_of_a_property_decorator_function_must_be_either_void_or_any:M(1236,1,"The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236","The return type of a property decorator function must be either 'void' or 'any'."),The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any:M(1237,1,"The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237","The return type of a parameter decorator function must be either 'void' or 'any'."),Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression:M(1238,1,"Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238","Unable to resolve signature of class decorator when called as an expression."),Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression:M(1239,1,"Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239","Unable to resolve signature of parameter decorator when called as an expression."),Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression:M(1240,1,"Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240","Unable to resolve signature of property decorator when called as an expression."),Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression:M(1241,1,"Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241","Unable to resolve signature of method decorator when called as an expression."),abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration:M(1242,1,"abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242","'abstract' modifier can only appear on a class, method, or property declaration."),_0_modifier_cannot_be_used_with_1_modifier:M(1243,1,"_0_modifier_cannot_be_used_with_1_modifier_1243","'{0}' modifier cannot be used with '{1}' modifier."),Abstract_methods_can_only_appear_within_an_abstract_class:M(1244,1,"Abstract_methods_can_only_appear_within_an_abstract_class_1244","Abstract methods can only appear within an abstract class."),Method_0_cannot_have_an_implementation_because_it_is_marked_abstract:M(1245,1,"Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245","Method '{0}' cannot have an implementation because it is marked abstract."),An_interface_property_cannot_have_an_initializer:M(1246,1,"An_interface_property_cannot_have_an_initializer_1246","An interface property cannot have an initializer."),A_type_literal_property_cannot_have_an_initializer:M(1247,1,"A_type_literal_property_cannot_have_an_initializer_1247","A type literal property cannot have an initializer."),A_class_member_cannot_have_the_0_keyword:M(1248,1,"A_class_member_cannot_have_the_0_keyword_1248","A class member cannot have the '{0}' keyword."),A_decorator_can_only_decorate_a_method_implementation_not_an_overload:M(1249,1,"A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249","A decorator can only decorate a method implementation, not an overload."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5:M(1250,1,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_1250","Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definitions_are_automatically_in_strict_mode:M(1251,1,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definiti_1251","Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Class definitions are automatically in strict mode."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_automatically_in_strict_mode:M(1252,1,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_au_1252","Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Modules are automatically in strict mode."),Abstract_properties_can_only_appear_within_an_abstract_class:M(1253,1,"Abstract_properties_can_only_appear_within_an_abstract_class_1253","Abstract properties can only appear within an abstract class."),A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference:M(1254,1,"A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254","A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."),A_definite_assignment_assertion_is_not_permitted_in_this_context:M(1255,1,"A_definite_assignment_assertion_is_not_permitted_in_this_context_1255","A definite assignment assertion '!' is not permitted in this context."),A_required_element_cannot_follow_an_optional_element:M(1257,1,"A_required_element_cannot_follow_an_optional_element_1257","A required element cannot follow an optional element."),A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration:M(1258,1,"A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258","A default export must be at the top level of a file or module declaration."),Module_0_can_only_be_default_imported_using_the_1_flag:M(1259,1,"Module_0_can_only_be_default_imported_using_the_1_flag_1259","Module '{0}' can only be default-imported using the '{1}' flag"),Keywords_cannot_contain_escape_characters:M(1260,1,"Keywords_cannot_contain_escape_characters_1260","Keywords cannot contain escape characters."),Already_included_file_name_0_differs_from_file_name_1_only_in_casing:M(1261,1,"Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261","Already included file name '{0}' differs from file name '{1}' only in casing."),Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module:M(1262,1,"Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module_1262","Identifier expected. '{0}' is a reserved word at the top-level of a module."),Declarations_with_initializers_cannot_also_have_definite_assignment_assertions:M(1263,1,"Declarations_with_initializers_cannot_also_have_definite_assignment_assertions_1263","Declarations with initializers cannot also have definite assignment assertions."),Declarations_with_definite_assignment_assertions_must_also_have_type_annotations:M(1264,1,"Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264","Declarations with definite assignment assertions must also have type annotations."),A_rest_element_cannot_follow_another_rest_element:M(1265,1,"A_rest_element_cannot_follow_another_rest_element_1265","A rest element cannot follow another rest element."),An_optional_element_cannot_follow_a_rest_element:M(1266,1,"An_optional_element_cannot_follow_a_rest_element_1266","An optional element cannot follow a rest element."),Property_0_cannot_have_an_initializer_because_it_is_marked_abstract:M(1267,1,"Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267","Property '{0}' cannot have an initializer because it is marked abstract."),An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type:M(1268,1,"An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268","An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."),Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled:M(1269,1,"Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled_1269","Cannot use 'export import' on a type or type-only namespace when '{0}' is enabled."),Decorator_function_return_type_0_is_not_assignable_to_type_1:M(1270,1,"Decorator_function_return_type_0_is_not_assignable_to_type_1_1270","Decorator function return type '{0}' is not assignable to type '{1}'."),Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any:M(1271,1,"Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any_1271","Decorator function return type is '{0}' but is expected to be 'void' or 'any'."),A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled:M(1272,1,"A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272","A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and 'emitDecoratorMetadata' are enabled."),_0_modifier_cannot_appear_on_a_type_parameter:M(1273,1,"_0_modifier_cannot_appear_on_a_type_parameter_1273","'{0}' modifier cannot appear on a type parameter"),_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias:M(1274,1,"_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274","'{0}' modifier can only appear on a type parameter of a class, interface or type alias"),accessor_modifier_can_only_appear_on_a_property_declaration:M(1275,1,"accessor_modifier_can_only_appear_on_a_property_declaration_1275","'accessor' modifier can only appear on a property declaration."),An_accessor_property_cannot_be_declared_optional:M(1276,1,"An_accessor_property_cannot_be_declared_optional_1276","An 'accessor' property cannot be declared optional."),_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class:M(1277,1,"_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class_1277","'{0}' modifier can only appear on a type parameter of a function, method or class"),The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0:M(1278,1,"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0_1278","The runtime will invoke the decorator with {1} arguments, but the decorator expects {0}."),The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0:M(1279,1,"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0_1279","The runtime will invoke the decorator with {1} arguments, but the decorator expects at least {0}."),Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement:M(1280,1,"Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to__1280","Namespaces are not allowed in global script files when '{0}' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement."),Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead:M(1281,1,"Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead_1281","Cannot access '{0}' from another file without qualification when '{1}' is enabled. Use '{2}' instead."),An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:M(1282,1,"An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers__1282","An 'export =' declaration must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:M(1283,1,"An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolve_1283","An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:M(1284,1,"An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_1284","An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:M(1285,1,"An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_1285","An 'export default' must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled:M(1286,1,"ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286","ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled."),A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled:M(1287,1,"A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287","A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."),An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled:M(1288,1,"An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288","An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:M(1289,1,"_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1289","'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default:M(1290,1,"_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1290","'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:M(1291,1,"_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1291","'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default:M(1292,1,"_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1292","'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve:M(1293,1,"ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve_1293","ESM syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'."),with_statements_are_not_allowed_in_an_async_function_block:M(1300,1,"with_statements_are_not_allowed_in_an_async_function_block_1300","'with' statements are not allowed in an async function block."),await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:M(1308,1,"await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308","'await' expressions are only allowed within async functions and at the top levels of modules."),The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level:M(1309,1,"The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309","The current file is a CommonJS module and cannot use 'await' at the top level."),Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern:M(1312,1,"Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312","Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."),The_body_of_an_if_statement_cannot_be_the_empty_statement:M(1313,1,"The_body_of_an_if_statement_cannot_be_the_empty_statement_1313","The body of an 'if' statement cannot be the empty statement."),Global_module_exports_may_only_appear_in_module_files:M(1314,1,"Global_module_exports_may_only_appear_in_module_files_1314","Global module exports may only appear in module files."),Global_module_exports_may_only_appear_in_declaration_files:M(1315,1,"Global_module_exports_may_only_appear_in_declaration_files_1315","Global module exports may only appear in declaration files."),Global_module_exports_may_only_appear_at_top_level:M(1316,1,"Global_module_exports_may_only_appear_at_top_level_1316","Global module exports may only appear at top level."),A_parameter_property_cannot_be_declared_using_a_rest_parameter:M(1317,1,"A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317","A parameter property cannot be declared using a rest parameter."),An_abstract_accessor_cannot_have_an_implementation:M(1318,1,"An_abstract_accessor_cannot_have_an_implementation_1318","An abstract accessor cannot have an implementation."),A_default_export_can_only_be_used_in_an_ECMAScript_style_module:M(1319,1,"A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319","A default export can only be used in an ECMAScript-style module."),Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:M(1320,1,"Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320","Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."),Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:M(1321,1,"Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321","Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."),Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:M(1322,1,"Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322","Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."),Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext:M(1323,1,"Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323","Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'."),Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_nodenext_or_preserve:M(1324,1,"Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_nodene_1324","Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'nodenext', or 'preserve'."),Argument_of_dynamic_import_cannot_be_spread_element:M(1325,1,"Argument_of_dynamic_import_cannot_be_spread_element_1325","Argument of dynamic import cannot be spread element."),This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments:M(1326,1,"This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326","This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."),String_literal_with_double_quotes_expected:M(1327,1,"String_literal_with_double_quotes_expected_1327","String literal with double quotes expected."),Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal:M(1328,1,"Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328","Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."),_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0:M(1329,1,"_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329","'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"),A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly:M(1330,1,"A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330","A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."),A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly:M(1331,1,"A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331","A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."),A_variable_whose_type_is_a_unique_symbol_type_must_be_const:M(1332,1,"A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332","A variable whose type is a 'unique symbol' type must be 'const'."),unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name:M(1333,1,"unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333","'unique symbol' types may not be used on a variable declaration with a binding name."),unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement:M(1334,1,"unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334","'unique symbol' types are only allowed on variables in a variable statement."),unique_symbol_types_are_not_allowed_here:M(1335,1,"unique_symbol_types_are_not_allowed_here_1335","'unique symbol' types are not allowed here."),An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead:M(1337,1,"An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337","An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."),infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type:M(1338,1,"infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338","'infer' declarations are only permitted in the 'extends' clause of a conditional type."),Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here:M(1339,1,"Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339","Module '{0}' does not refer to a value, but is used as a value here."),Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0:M(1340,1,"Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340","Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),Class_constructor_may_not_be_an_accessor:M(1341,1,"Class_constructor_may_not_be_an_accessor_1341","Class constructor may not be an accessor."),The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext:M(1343,1,"The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343","The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."),A_label_is_not_allowed_here:M(1344,1,"A_label_is_not_allowed_here_1344","'A label is not allowed here."),An_expression_of_type_void_cannot_be_tested_for_truthiness:M(1345,1,"An_expression_of_type_void_cannot_be_tested_for_truthiness_1345","An expression of type 'void' cannot be tested for truthiness."),This_parameter_is_not_allowed_with_use_strict_directive:M(1346,1,"This_parameter_is_not_allowed_with_use_strict_directive_1346","This parameter is not allowed with 'use strict' directive."),use_strict_directive_cannot_be_used_with_non_simple_parameter_list:M(1347,1,"use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347","'use strict' directive cannot be used with non-simple parameter list."),Non_simple_parameter_declared_here:M(1348,1,"Non_simple_parameter_declared_here_1348","Non-simple parameter declared here."),use_strict_directive_used_here:M(1349,1,"use_strict_directive_used_here_1349","'use strict' directive used here."),Print_the_final_configuration_instead_of_building:M(1350,3,"Print_the_final_configuration_instead_of_building_1350","Print the final configuration instead of building."),An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal:M(1351,1,"An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351","An identifier or keyword cannot immediately follow a numeric literal."),A_bigint_literal_cannot_use_exponential_notation:M(1352,1,"A_bigint_literal_cannot_use_exponential_notation_1352","A bigint literal cannot use exponential notation."),A_bigint_literal_must_be_an_integer:M(1353,1,"A_bigint_literal_must_be_an_integer_1353","A bigint literal must be an integer."),readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types:M(1354,1,"readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354","'readonly' type modifier is only permitted on array and tuple literal types."),A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals:M(1355,1,"A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355","A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals."),Did_you_mean_to_mark_this_function_as_async:M(1356,1,"Did_you_mean_to_mark_this_function_as_async_1356","Did you mean to mark this function as 'async'?"),An_enum_member_name_must_be_followed_by_a_or:M(1357,1,"An_enum_member_name_must_be_followed_by_a_or_1357","An enum member name must be followed by a ',', '=', or '}'."),Tagged_template_expressions_are_not_permitted_in_an_optional_chain:M(1358,1,"Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358","Tagged template expressions are not permitted in an optional chain."),Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:M(1359,1,"Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359","Identifier expected. '{0}' is a reserved word that cannot be used here."),Type_0_does_not_satisfy_the_expected_type_1:M(1360,1,"Type_0_does_not_satisfy_the_expected_type_1_1360","Type '{0}' does not satisfy the expected type '{1}'."),_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type:M(1361,1,"_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361","'{0}' cannot be used as a value because it was imported using 'import type'."),_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type:M(1362,1,"_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362","'{0}' cannot be used as a value because it was exported using 'export type'."),A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both:M(1363,1,"A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363","A type-only import can specify a default import or named bindings, but not both."),Convert_to_type_only_export:M(1364,3,"Convert_to_type_only_export_1364","Convert to type-only export"),Convert_all_re_exported_types_to_type_only_exports:M(1365,3,"Convert_all_re_exported_types_to_type_only_exports_1365","Convert all re-exported types to type-only exports"),Split_into_two_separate_import_declarations:M(1366,3,"Split_into_two_separate_import_declarations_1366","Split into two separate import declarations"),Split_all_invalid_type_only_imports:M(1367,3,"Split_all_invalid_type_only_imports_1367","Split all invalid type-only imports"),Class_constructor_may_not_be_a_generator:M(1368,1,"Class_constructor_may_not_be_a_generator_1368","Class constructor may not be a generator."),Did_you_mean_0:M(1369,3,"Did_you_mean_0_1369","Did you mean '{0}'?"),await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:M(1375,1,"await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375","'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),_0_was_imported_here:M(1376,3,"_0_was_imported_here_1376","'{0}' was imported here."),_0_was_exported_here:M(1377,3,"_0_was_exported_here_1377","'{0}' was exported here."),Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:M(1378,1,"Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378","Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type:M(1379,1,"An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379","An import alias cannot reference a declaration that was exported using 'export type'."),An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type:M(1380,1,"An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380","An import alias cannot reference a declaration that was imported using 'import type'."),Unexpected_token_Did_you_mean_or_rbrace:M(1381,1,"Unexpected_token_Did_you_mean_or_rbrace_1381","Unexpected token. Did you mean `{'}'}` or `&rbrace;`?"),Unexpected_token_Did_you_mean_or_gt:M(1382,1,"Unexpected_token_Did_you_mean_or_gt_1382","Unexpected token. Did you mean `{'>'}` or `&gt;`?"),Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:M(1385,1,"Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385","Function type notation must be parenthesized when used in a union type."),Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type:M(1386,1,"Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386","Constructor type notation must be parenthesized when used in a union type."),Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:M(1387,1,"Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387","Function type notation must be parenthesized when used in an intersection type."),Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:M(1388,1,"Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1388","Constructor type notation must be parenthesized when used in an intersection type."),_0_is_not_allowed_as_a_variable_declaration_name:M(1389,1,"_0_is_not_allowed_as_a_variable_declaration_name_1389","'{0}' is not allowed as a variable declaration name."),_0_is_not_allowed_as_a_parameter_name:M(1390,1,"_0_is_not_allowed_as_a_parameter_name_1390","'{0}' is not allowed as a parameter name."),An_import_alias_cannot_use_import_type:M(1392,1,"An_import_alias_cannot_use_import_type_1392","An import alias cannot use 'import type'"),Imported_via_0_from_file_1:M(1393,3,"Imported_via_0_from_file_1_1393","Imported via {0} from file '{1}'"),Imported_via_0_from_file_1_with_packageId_2:M(1394,3,"Imported_via_0_from_file_1_with_packageId_2_1394","Imported via {0} from file '{1}' with packageId '{2}'"),Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions:M(1395,3,"Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395","Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions"),Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions:M(1396,3,"Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396","Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"),Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions:M(1397,3,"Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397","Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"),Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions:M(1398,3,"Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398","Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"),File_is_included_via_import_here:M(1399,3,"File_is_included_via_import_here_1399","File is included via import here."),Referenced_via_0_from_file_1:M(1400,3,"Referenced_via_0_from_file_1_1400","Referenced via '{0}' from file '{1}'"),File_is_included_via_reference_here:M(1401,3,"File_is_included_via_reference_here_1401","File is included via reference here."),Type_library_referenced_via_0_from_file_1:M(1402,3,"Type_library_referenced_via_0_from_file_1_1402","Type library referenced via '{0}' from file '{1}'"),Type_library_referenced_via_0_from_file_1_with_packageId_2:M(1403,3,"Type_library_referenced_via_0_from_file_1_with_packageId_2_1403","Type library referenced via '{0}' from file '{1}' with packageId '{2}'"),File_is_included_via_type_library_reference_here:M(1404,3,"File_is_included_via_type_library_reference_here_1404","File is included via type library reference here."),Library_referenced_via_0_from_file_1:M(1405,3,"Library_referenced_via_0_from_file_1_1405","Library referenced via '{0}' from file '{1}'"),File_is_included_via_library_reference_here:M(1406,3,"File_is_included_via_library_reference_here_1406","File is included via library reference here."),Matched_by_include_pattern_0_in_1:M(1407,3,"Matched_by_include_pattern_0_in_1_1407","Matched by include pattern '{0}' in '{1}'"),File_is_matched_by_include_pattern_specified_here:M(1408,3,"File_is_matched_by_include_pattern_specified_here_1408","File is matched by include pattern specified here."),Part_of_files_list_in_tsconfig_json:M(1409,3,"Part_of_files_list_in_tsconfig_json_1409","Part of 'files' list in tsconfig.json"),File_is_matched_by_files_list_specified_here:M(1410,3,"File_is_matched_by_files_list_specified_here_1410","File is matched by 'files' list specified here."),Output_from_referenced_project_0_included_because_1_specified:M(1411,3,"Output_from_referenced_project_0_included_because_1_specified_1411","Output from referenced project '{0}' included because '{1}' specified"),Output_from_referenced_project_0_included_because_module_is_specified_as_none:M(1412,3,"Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412","Output from referenced project '{0}' included because '--module' is specified as 'none'"),File_is_output_from_referenced_project_specified_here:M(1413,3,"File_is_output_from_referenced_project_specified_here_1413","File is output from referenced project specified here."),Source_from_referenced_project_0_included_because_1_specified:M(1414,3,"Source_from_referenced_project_0_included_because_1_specified_1414","Source from referenced project '{0}' included because '{1}' specified"),Source_from_referenced_project_0_included_because_module_is_specified_as_none:M(1415,3,"Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415","Source from referenced project '{0}' included because '--module' is specified as 'none'"),File_is_source_from_referenced_project_specified_here:M(1416,3,"File_is_source_from_referenced_project_specified_here_1416","File is source from referenced project specified here."),Entry_point_of_type_library_0_specified_in_compilerOptions:M(1417,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_1417","Entry point of type library '{0}' specified in compilerOptions"),Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1:M(1418,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418","Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"),File_is_entry_point_of_type_library_specified_here:M(1419,3,"File_is_entry_point_of_type_library_specified_here_1419","File is entry point of type library specified here."),Entry_point_for_implicit_type_library_0:M(1420,3,"Entry_point_for_implicit_type_library_0_1420","Entry point for implicit type library '{0}'"),Entry_point_for_implicit_type_library_0_with_packageId_1:M(1421,3,"Entry_point_for_implicit_type_library_0_with_packageId_1_1421","Entry point for implicit type library '{0}' with packageId '{1}'"),Library_0_specified_in_compilerOptions:M(1422,3,"Library_0_specified_in_compilerOptions_1422","Library '{0}' specified in compilerOptions"),File_is_library_specified_here:M(1423,3,"File_is_library_specified_here_1423","File is library specified here."),Default_library:M(1424,3,"Default_library_1424","Default library"),Default_library_for_target_0:M(1425,3,"Default_library_for_target_0_1425","Default library for target '{0}'"),File_is_default_library_for_target_specified_here:M(1426,3,"File_is_default_library_for_target_specified_here_1426","File is default library for target specified here."),Root_file_specified_for_compilation:M(1427,3,"Root_file_specified_for_compilation_1427","Root file specified for compilation"),File_is_output_of_project_reference_source_0:M(1428,3,"File_is_output_of_project_reference_source_0_1428","File is output of project reference source '{0}'"),File_redirects_to_file_0:M(1429,3,"File_redirects_to_file_0_1429","File redirects to file '{0}'"),The_file_is_in_the_program_because_Colon:M(1430,3,"The_file_is_in_the_program_because_Colon_1430","The file is in the program because:"),for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:M(1431,1,"for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431","'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:M(1432,1,"Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432","Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters:M(1433,1,"Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters_1433","Neither decorators nor modifiers may be applied to 'this' parameters."),Unexpected_keyword_or_identifier:M(1434,1,"Unexpected_keyword_or_identifier_1434","Unexpected keyword or identifier."),Unknown_keyword_or_identifier_Did_you_mean_0:M(1435,1,"Unknown_keyword_or_identifier_Did_you_mean_0_1435","Unknown keyword or identifier. Did you mean '{0}'?"),Decorators_must_precede_the_name_and_all_keywords_of_property_declarations:M(1436,1,"Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436","Decorators must precede the name and all keywords of property declarations."),Namespace_must_be_given_a_name:M(1437,1,"Namespace_must_be_given_a_name_1437","Namespace must be given a name."),Interface_must_be_given_a_name:M(1438,1,"Interface_must_be_given_a_name_1438","Interface must be given a name."),Type_alias_must_be_given_a_name:M(1439,1,"Type_alias_must_be_given_a_name_1439","Type alias must be given a name."),Variable_declaration_not_allowed_at_this_location:M(1440,1,"Variable_declaration_not_allowed_at_this_location_1440","Variable declaration not allowed at this location."),Cannot_start_a_function_call_in_a_type_annotation:M(1441,1,"Cannot_start_a_function_call_in_a_type_annotation_1441","Cannot start a function call in a type annotation."),Expected_for_property_initializer:M(1442,1,"Expected_for_property_initializer_1442","Expected '=' for property initializer."),Module_declaration_names_may_only_use_or_quoted_strings:M(1443,1,"Module_declaration_names_may_only_use_or_quoted_strings_1443",`Module declaration names may only use ' or " quoted strings.`),_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled:M(1448,1,"_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448","'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled."),Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed:M(1449,3,"Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449","Preserve unused imported values in the JavaScript output that would otherwise be removed."),Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments:M(1450,3,"Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments_1450","Dynamic imports can only accept a module specifier and an optional set of attributes as arguments"),Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression:M(1451,1,"Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451","Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"),resolution_mode_should_be_either_require_or_import:M(1453,1,"resolution_mode_should_be_either_require_or_import_1453","`resolution-mode` should be either `require` or `import`."),resolution_mode_can_only_be_set_for_type_only_imports:M(1454,1,"resolution_mode_can_only_be_set_for_type_only_imports_1454","`resolution-mode` can only be set for type-only imports."),resolution_mode_is_the_only_valid_key_for_type_import_assertions:M(1455,1,"resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455","`resolution-mode` is the only valid key for type import assertions."),Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require:M(1456,1,"Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456","Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."),Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk:M(1457,3,"Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457","Matched by default include pattern '**/*'"),File_is_ECMAScript_module_because_0_has_field_type_with_value_module:M(1458,3,"File_is_ECMAScript_module_because_0_has_field_type_with_value_module_1458",`File is ECMAScript module because '{0}' has field "type" with value "module"`),File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module:M(1459,3,"File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459",`File is CommonJS module because '{0}' has field "type" whose value is not "module"`),File_is_CommonJS_module_because_0_does_not_have_field_type:M(1460,3,"File_is_CommonJS_module_because_0_does_not_have_field_type_1460",`File is CommonJS module because '{0}' does not have field "type"`),File_is_CommonJS_module_because_package_json_was_not_found:M(1461,3,"File_is_CommonJS_module_because_package_json_was_not_found_1461","File is CommonJS module because 'package.json' was not found"),resolution_mode_is_the_only_valid_key_for_type_import_attributes:M(1463,1,"resolution_mode_is_the_only_valid_key_for_type_import_attributes_1463","'resolution-mode' is the only valid key for type import attributes."),Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require:M(1464,1,"Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1464","Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'."),The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output:M(1470,1,"The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470","The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead:M(1471,1,"Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471","Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."),catch_or_finally_expected:M(1472,1,"catch_or_finally_expected_1472","'catch' or 'finally' expected."),An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:M(1473,1,"An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473","An import declaration can only be used at the top level of a module."),An_export_declaration_can_only_be_used_at_the_top_level_of_a_module:M(1474,1,"An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474","An export declaration can only be used at the top level of a module."),Control_what_method_is_used_to_detect_module_format_JS_files:M(1475,3,"Control_what_method_is_used_to_detect_module_format_JS_files_1475","Control what method is used to detect module-format JS files."),auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules:M(1476,3,"auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476",'"auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.'),An_instantiation_expression_cannot_be_followed_by_a_property_access:M(1477,1,"An_instantiation_expression_cannot_be_followed_by_a_property_access_1477","An instantiation expression cannot be followed by a property access."),Identifier_or_string_literal_expected:M(1478,1,"Identifier_or_string_literal_expected_1478","Identifier or string literal expected."),The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead:M(1479,1,"The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479",`The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("{0}")' call instead.`),To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module:M(1480,3,"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480",'To convert this file to an ECMAScript module, change its file extension to \'{0}\' or create a local package.json file with `{ "type": "module" }`.'),To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1:M(1481,3,"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481",`To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field \`"type": "module"\` to '{1}'.`),To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0:M(1482,3,"To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482",'To convert this file to an ECMAScript module, add the field `"type": "module"` to \'{0}\'.'),To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module:M(1483,3,"To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483",'To convert this file to an ECMAScript module, create a local package.json file with `{ "type": "module" }`.'),_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:M(1484,1,"_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled_1484","'{0}' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:M(1485,1,"_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimMo_1485","'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),Decorator_used_before_export_here:M(1486,1,"Decorator_used_before_export_here_1486","Decorator used before 'export' here."),Octal_escape_sequences_are_not_allowed_Use_the_syntax_0:M(1487,1,"Octal_escape_sequences_are_not_allowed_Use_the_syntax_0_1487","Octal escape sequences are not allowed. Use the syntax '{0}'."),Escape_sequence_0_is_not_allowed:M(1488,1,"Escape_sequence_0_is_not_allowed_1488","Escape sequence '{0}' is not allowed."),Decimals_with_leading_zeros_are_not_allowed:M(1489,1,"Decimals_with_leading_zeros_are_not_allowed_1489","Decimals with leading zeros are not allowed."),File_appears_to_be_binary:M(1490,1,"File_appears_to_be_binary_1490","File appears to be binary."),_0_modifier_cannot_appear_on_a_using_declaration:M(1491,1,"_0_modifier_cannot_appear_on_a_using_declaration_1491","'{0}' modifier cannot appear on a 'using' declaration."),_0_declarations_may_not_have_binding_patterns:M(1492,1,"_0_declarations_may_not_have_binding_patterns_1492","'{0}' declarations may not have binding patterns."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration:M(1493,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493","The left-hand side of a 'for...in' statement cannot be a 'using' declaration."),The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration:M(1494,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494","The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),_0_modifier_cannot_appear_on_an_await_using_declaration:M(1495,1,"_0_modifier_cannot_appear_on_an_await_using_declaration_1495","'{0}' modifier cannot appear on an 'await using' declaration."),Identifier_string_literal_or_number_literal_expected:M(1496,1,"Identifier_string_literal_or_number_literal_expected_1496","Identifier, string literal, or number literal expected."),Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator:M(1497,1,"Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator_1497","Expression must be enclosed in parentheses to be used as a decorator."),Invalid_syntax_in_decorator:M(1498,1,"Invalid_syntax_in_decorator_1498","Invalid syntax in decorator."),Unknown_regular_expression_flag:M(1499,1,"Unknown_regular_expression_flag_1499","Unknown regular expression flag."),Duplicate_regular_expression_flag:M(1500,1,"Duplicate_regular_expression_flag_1500","Duplicate regular expression flag."),This_regular_expression_flag_is_only_available_when_targeting_0_or_later:M(1501,1,"This_regular_expression_flag_is_only_available_when_targeting_0_or_later_1501","This regular expression flag is only available when targeting '{0}' or later."),The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously:M(1502,1,"The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously_1502","The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously."),Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later:M(1503,1,"Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later_1503","Named capturing groups are only available when targeting 'ES2018' or later."),Subpattern_flags_must_be_present_when_there_is_a_minus_sign:M(1504,1,"Subpattern_flags_must_be_present_when_there_is_a_minus_sign_1504","Subpattern flags must be present when there is a minus sign."),Incomplete_quantifier_Digit_expected:M(1505,1,"Incomplete_quantifier_Digit_expected_1505","Incomplete quantifier. Digit expected."),Numbers_out_of_order_in_quantifier:M(1506,1,"Numbers_out_of_order_in_quantifier_1506","Numbers out of order in quantifier."),There_is_nothing_available_for_repetition:M(1507,1,"There_is_nothing_available_for_repetition_1507","There is nothing available for repetition."),Unexpected_0_Did_you_mean_to_escape_it_with_backslash:M(1508,1,"Unexpected_0_Did_you_mean_to_escape_it_with_backslash_1508","Unexpected '{0}'. Did you mean to escape it with backslash?"),This_regular_expression_flag_cannot_be_toggled_within_a_subpattern:M(1509,1,"This_regular_expression_flag_cannot_be_toggled_within_a_subpattern_1509","This regular expression flag cannot be toggled within a subpattern."),k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets:M(1510,1,"k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets_1510","'\\k' must be followed by a capturing group name enclosed in angle brackets."),q_is_only_available_inside_character_class:M(1511,1,"q_is_only_available_inside_character_class_1511","'\\q' is only available inside character class."),c_must_be_followed_by_an_ASCII_letter:M(1512,1,"c_must_be_followed_by_an_ASCII_letter_1512","'\\c' must be followed by an ASCII letter."),Undetermined_character_escape:M(1513,1,"Undetermined_character_escape_1513","Undetermined character escape."),Expected_a_capturing_group_name:M(1514,1,"Expected_a_capturing_group_name_1514","Expected a capturing group name."),Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other:M(1515,1,"Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other_1515","Named capturing groups with the same name must be mutually exclusive to each other."),A_character_class_range_must_not_be_bounded_by_another_character_class:M(1516,1,"A_character_class_range_must_not_be_bounded_by_another_character_class_1516","A character class range must not be bounded by another character class."),Range_out_of_order_in_character_class:M(1517,1,"Range_out_of_order_in_character_class_1517","Range out of order in character class."),Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class:M(1518,1,"Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_characte_1518","Anything that would possibly match more than a single character is invalid inside a negated character class."),Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead:M(1519,1,"Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead_1519","Operators must not be mixed within a character class. Wrap it in a nested class instead."),Expected_a_class_set_operand:M(1520,1,"Expected_a_class_set_operand_1520","Expected a class set operand."),q_must_be_followed_by_string_alternatives_enclosed_in_braces:M(1521,1,"q_must_be_followed_by_string_alternatives_enclosed_in_braces_1521","'\\q' must be followed by string alternatives enclosed in braces."),A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash:M(1522,1,"A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backs_1522","A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash?"),Expected_a_Unicode_property_name:M(1523,1,"Expected_a_Unicode_property_name_1523","Expected a Unicode property name."),Unknown_Unicode_property_name:M(1524,1,"Unknown_Unicode_property_name_1524","Unknown Unicode property name."),Expected_a_Unicode_property_value:M(1525,1,"Expected_a_Unicode_property_value_1525","Expected a Unicode property value."),Unknown_Unicode_property_value:M(1526,1,"Unknown_Unicode_property_value_1526","Unknown Unicode property value."),Expected_a_Unicode_property_name_or_value:M(1527,1,"Expected_a_Unicode_property_name_or_value_1527","Expected a Unicode property name or value."),Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set:M(1528,1,"Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_t_1528","Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set."),Unknown_Unicode_property_name_or_value:M(1529,1,"Unknown_Unicode_property_name_or_value_1529","Unknown Unicode property name or value."),Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set:M(1530,1,"Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v__1530","Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."),_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces:M(1531,1,"_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces_1531","'\\{0}' must be followed by a Unicode property value expression enclosed in braces."),There_is_no_capturing_group_named_0_in_this_regular_expression:M(1532,1,"There_is_no_capturing_group_named_0_in_this_regular_expression_1532","There is no capturing group named '{0}' in this regular expression."),This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_regular_expression:M(1533,1,"This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_r_1533","This backreference refers to a group that does not exist. There are only {0} capturing groups in this regular expression."),This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regular_expression:M(1534,1,"This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regul_1534","This backreference refers to a group that does not exist. There are no capturing groups in this regular expression."),This_character_cannot_be_escaped_in_a_regular_expression:M(1535,1,"This_character_cannot_be_escaped_in_a_regular_expression_1535","This character cannot be escaped in a regular expression."),Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead:M(1536,1,"Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended__1536","Octal escape sequences and backreferences are not allowed in a character class. If this was intended as an escape sequence, use the syntax '{0}' instead."),Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class:M(1537,1,"Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_1537","Decimal escape sequences and backreferences are not allowed in a character class."),Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set:M(1538,1,"Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_se_1538","Unicode escape sequences are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."),A_bigint_literal_cannot_be_used_as_a_property_name:M(1539,1,"A_bigint_literal_cannot_be_used_as_a_property_name_1539","A 'bigint' literal cannot be used as a property name."),A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead:M(1540,2,"A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540","A 'namespace' declaration should not be declared using the 'module' keyword. Please use the 'namespace' keyword instead.",void 0,void 0,!0),The_types_of_0_are_incompatible_between_these_types:M(2200,1,"The_types_of_0_are_incompatible_between_these_types_2200","The types of '{0}' are incompatible between these types."),The_types_returned_by_0_are_incompatible_between_these_types:M(2201,1,"The_types_returned_by_0_are_incompatible_between_these_types_2201","The types returned by '{0}' are incompatible between these types."),Call_signature_return_types_0_and_1_are_incompatible:M(2202,1,"Call_signature_return_types_0_and_1_are_incompatible_2202","Call signature return types '{0}' and '{1}' are incompatible.",void 0,!0),Construct_signature_return_types_0_and_1_are_incompatible:M(2203,1,"Construct_signature_return_types_0_and_1_are_incompatible_2203","Construct signature return types '{0}' and '{1}' are incompatible.",void 0,!0),Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1:M(2204,1,"Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204","Call signatures with no arguments have incompatible return types '{0}' and '{1}'.",void 0,!0),Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1:M(2205,1,"Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205","Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.",void 0,!0),The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement:M(2206,1,"The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206","The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."),The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement:M(2207,1,"The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207","The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."),This_type_parameter_might_need_an_extends_0_constraint:M(2208,1,"This_type_parameter_might_need_an_extends_0_constraint_2208","This type parameter might need an `extends {0}` constraint."),The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:M(2209,1,"The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209","The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:M(2210,1,"The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210","The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),Add_extends_constraint:M(2211,3,"Add_extends_constraint_2211","Add `extends` constraint."),Add_extends_constraint_to_all_type_parameters:M(2212,3,"Add_extends_constraint_to_all_type_parameters_2212","Add `extends` constraint to all type parameters"),Duplicate_identifier_0:M(2300,1,"Duplicate_identifier_0_2300","Duplicate identifier '{0}'."),Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:M(2301,1,"Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301","Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),Static_members_cannot_reference_class_type_parameters:M(2302,1,"Static_members_cannot_reference_class_type_parameters_2302","Static members cannot reference class type parameters."),Circular_definition_of_import_alias_0:M(2303,1,"Circular_definition_of_import_alias_0_2303","Circular definition of import alias '{0}'."),Cannot_find_name_0:M(2304,1,"Cannot_find_name_0_2304","Cannot find name '{0}'."),Module_0_has_no_exported_member_1:M(2305,1,"Module_0_has_no_exported_member_1_2305","Module '{0}' has no exported member '{1}'."),File_0_is_not_a_module:M(2306,1,"File_0_is_not_a_module_2306","File '{0}' is not a module."),Cannot_find_module_0_or_its_corresponding_type_declarations:M(2307,1,"Cannot_find_module_0_or_its_corresponding_type_declarations_2307","Cannot find module '{0}' or its corresponding type declarations."),Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity:M(2308,1,"Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308","Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."),An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements:M(2309,1,"An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309","An export assignment cannot be used in a module with other exported elements."),Type_0_recursively_references_itself_as_a_base_type:M(2310,1,"Type_0_recursively_references_itself_as_a_base_type_2310","Type '{0}' recursively references itself as a base type."),Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function:M(2311,1,"Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311","Cannot find name '{0}'. Did you mean to write this in an async function?"),An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members:M(2312,1,"An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312","An interface can only extend an object type or intersection of object types with statically known members."),Type_parameter_0_has_a_circular_constraint:M(2313,1,"Type_parameter_0_has_a_circular_constraint_2313","Type parameter '{0}' has a circular constraint."),Generic_type_0_requires_1_type_argument_s:M(2314,1,"Generic_type_0_requires_1_type_argument_s_2314","Generic type '{0}' requires {1} type argument(s)."),Type_0_is_not_generic:M(2315,1,"Type_0_is_not_generic_2315","Type '{0}' is not generic."),Global_type_0_must_be_a_class_or_interface_type:M(2316,1,"Global_type_0_must_be_a_class_or_interface_type_2316","Global type '{0}' must be a class or interface type."),Global_type_0_must_have_1_type_parameter_s:M(2317,1,"Global_type_0_must_have_1_type_parameter_s_2317","Global type '{0}' must have {1} type parameter(s)."),Cannot_find_global_type_0:M(2318,1,"Cannot_find_global_type_0_2318","Cannot find global type '{0}'."),Named_property_0_of_types_1_and_2_are_not_identical:M(2319,1,"Named_property_0_of_types_1_and_2_are_not_identical_2319","Named property '{0}' of types '{1}' and '{2}' are not identical."),Interface_0_cannot_simultaneously_extend_types_1_and_2:M(2320,1,"Interface_0_cannot_simultaneously_extend_types_1_and_2_2320","Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."),Excessive_stack_depth_comparing_types_0_and_1:M(2321,1,"Excessive_stack_depth_comparing_types_0_and_1_2321","Excessive stack depth comparing types '{0}' and '{1}'."),Type_0_is_not_assignable_to_type_1:M(2322,1,"Type_0_is_not_assignable_to_type_1_2322","Type '{0}' is not assignable to type '{1}'."),Cannot_redeclare_exported_variable_0:M(2323,1,"Cannot_redeclare_exported_variable_0_2323","Cannot redeclare exported variable '{0}'."),Property_0_is_missing_in_type_1:M(2324,1,"Property_0_is_missing_in_type_1_2324","Property '{0}' is missing in type '{1}'."),Property_0_is_private_in_type_1_but_not_in_type_2:M(2325,1,"Property_0_is_private_in_type_1_but_not_in_type_2_2325","Property '{0}' is private in type '{1}' but not in type '{2}'."),Types_of_property_0_are_incompatible:M(2326,1,"Types_of_property_0_are_incompatible_2326","Types of property '{0}' are incompatible."),Property_0_is_optional_in_type_1_but_required_in_type_2:M(2327,1,"Property_0_is_optional_in_type_1_but_required_in_type_2_2327","Property '{0}' is optional in type '{1}' but required in type '{2}'."),Types_of_parameters_0_and_1_are_incompatible:M(2328,1,"Types_of_parameters_0_and_1_are_incompatible_2328","Types of parameters '{0}' and '{1}' are incompatible."),Index_signature_for_type_0_is_missing_in_type_1:M(2329,1,"Index_signature_for_type_0_is_missing_in_type_1_2329","Index signature for type '{0}' is missing in type '{1}'."),_0_and_1_index_signatures_are_incompatible:M(2330,1,"_0_and_1_index_signatures_are_incompatible_2330","'{0}' and '{1}' index signatures are incompatible."),this_cannot_be_referenced_in_a_module_or_namespace_body:M(2331,1,"this_cannot_be_referenced_in_a_module_or_namespace_body_2331","'this' cannot be referenced in a module or namespace body."),this_cannot_be_referenced_in_current_location:M(2332,1,"this_cannot_be_referenced_in_current_location_2332","'this' cannot be referenced in current location."),this_cannot_be_referenced_in_a_static_property_initializer:M(2334,1,"this_cannot_be_referenced_in_a_static_property_initializer_2334","'this' cannot be referenced in a static property initializer."),super_can_only_be_referenced_in_a_derived_class:M(2335,1,"super_can_only_be_referenced_in_a_derived_class_2335","'super' can only be referenced in a derived class."),super_cannot_be_referenced_in_constructor_arguments:M(2336,1,"super_cannot_be_referenced_in_constructor_arguments_2336","'super' cannot be referenced in constructor arguments."),Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors:M(2337,1,"Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337","Super calls are not permitted outside constructors or in nested functions inside constructors."),super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class:M(2338,1,"super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338","'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."),Property_0_does_not_exist_on_type_1:M(2339,1,"Property_0_does_not_exist_on_type_1_2339","Property '{0}' does not exist on type '{1}'."),Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword:M(2340,1,"Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340","Only public and protected methods of the base class are accessible via the 'super' keyword."),Property_0_is_private_and_only_accessible_within_class_1:M(2341,1,"Property_0_is_private_and_only_accessible_within_class_1_2341","Property '{0}' is private and only accessible within class '{1}'."),This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0:M(2343,1,"This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343","This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."),Type_0_does_not_satisfy_the_constraint_1:M(2344,1,"Type_0_does_not_satisfy_the_constraint_1_2344","Type '{0}' does not satisfy the constraint '{1}'."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1:M(2345,1,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345","Argument of type '{0}' is not assignable to parameter of type '{1}'."),Untyped_function_calls_may_not_accept_type_arguments:M(2347,1,"Untyped_function_calls_may_not_accept_type_arguments_2347","Untyped function calls may not accept type arguments."),Value_of_type_0_is_not_callable_Did_you_mean_to_include_new:M(2348,1,"Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348","Value of type '{0}' is not callable. Did you mean to include 'new'?"),This_expression_is_not_callable:M(2349,1,"This_expression_is_not_callable_2349","This expression is not callable."),Only_a_void_function_can_be_called_with_the_new_keyword:M(2350,1,"Only_a_void_function_can_be_called_with_the_new_keyword_2350","Only a void function can be called with the 'new' keyword."),This_expression_is_not_constructable:M(2351,1,"This_expression_is_not_constructable_2351","This expression is not constructable."),Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first:M(2352,1,"Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352","Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first."),Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1:M(2353,1,"Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353","Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."),This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found:M(2354,1,"This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354","This syntax requires an imported helper but module '{0}' cannot be found."),A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value:M(2355,1,"A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value_2355","A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value."),An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type:M(2356,1,"An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356","An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."),The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access:M(2357,1,"The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357","The operand of an increment or decrement operator must be a variable or a property access."),The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter:M(2358,1,"The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358","The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."),The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method:M(2359,1,"The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_2359","The right-hand side of an 'instanceof' expression must be either of type 'any', a class, function, or other type assignable to the 'Function' interface type, or an object type with a 'Symbol.hasInstance' method."),The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:M(2362,1,"The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362","The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:M(2363,1,"The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363","The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access:M(2364,1,"The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364","The left-hand side of an assignment expression must be a variable or a property access."),Operator_0_cannot_be_applied_to_types_1_and_2:M(2365,1,"Operator_0_cannot_be_applied_to_types_1_and_2_2365","Operator '{0}' cannot be applied to types '{1}' and '{2}'."),Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined:M(2366,1,"Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366","Function lacks ending return statement and return type does not include 'undefined'."),This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap:M(2367,1,"This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367","This comparison appears to be unintentional because the types '{0}' and '{1}' have no overlap."),Type_parameter_name_cannot_be_0:M(2368,1,"Type_parameter_name_cannot_be_0_2368","Type parameter name cannot be '{0}'."),A_parameter_property_is_only_allowed_in_a_constructor_implementation:M(2369,1,"A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369","A parameter property is only allowed in a constructor implementation."),A_rest_parameter_must_be_of_an_array_type:M(2370,1,"A_rest_parameter_must_be_of_an_array_type_2370","A rest parameter must be of an array type."),A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation:M(2371,1,"A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371","A parameter initializer is only allowed in a function or constructor implementation."),Parameter_0_cannot_reference_itself:M(2372,1,"Parameter_0_cannot_reference_itself_2372","Parameter '{0}' cannot reference itself."),Parameter_0_cannot_reference_identifier_1_declared_after_it:M(2373,1,"Parameter_0_cannot_reference_identifier_1_declared_after_it_2373","Parameter '{0}' cannot reference identifier '{1}' declared after it."),Duplicate_index_signature_for_type_0:M(2374,1,"Duplicate_index_signature_for_type_0_2374","Duplicate index signature for type '{0}'."),Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties:M(2375,1,"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375","Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers:M(2376,1,"A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376","A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers."),Constructors_for_derived_classes_must_contain_a_super_call:M(2377,1,"Constructors_for_derived_classes_must_contain_a_super_call_2377","Constructors for derived classes must contain a 'super' call."),A_get_accessor_must_return_a_value:M(2378,1,"A_get_accessor_must_return_a_value_2378","A 'get' accessor must return a value."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties:M(2379,1,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379","Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),Overload_signatures_must_all_be_exported_or_non_exported:M(2383,1,"Overload_signatures_must_all_be_exported_or_non_exported_2383","Overload signatures must all be exported or non-exported."),Overload_signatures_must_all_be_ambient_or_non_ambient:M(2384,1,"Overload_signatures_must_all_be_ambient_or_non_ambient_2384","Overload signatures must all be ambient or non-ambient."),Overload_signatures_must_all_be_public_private_or_protected:M(2385,1,"Overload_signatures_must_all_be_public_private_or_protected_2385","Overload signatures must all be public, private or protected."),Overload_signatures_must_all_be_optional_or_required:M(2386,1,"Overload_signatures_must_all_be_optional_or_required_2386","Overload signatures must all be optional or required."),Function_overload_must_be_static:M(2387,1,"Function_overload_must_be_static_2387","Function overload must be static."),Function_overload_must_not_be_static:M(2388,1,"Function_overload_must_not_be_static_2388","Function overload must not be static."),Function_implementation_name_must_be_0:M(2389,1,"Function_implementation_name_must_be_0_2389","Function implementation name must be '{0}'."),Constructor_implementation_is_missing:M(2390,1,"Constructor_implementation_is_missing_2390","Constructor implementation is missing."),Function_implementation_is_missing_or_not_immediately_following_the_declaration:M(2391,1,"Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391","Function implementation is missing or not immediately following the declaration."),Multiple_constructor_implementations_are_not_allowed:M(2392,1,"Multiple_constructor_implementations_are_not_allowed_2392","Multiple constructor implementations are not allowed."),Duplicate_function_implementation:M(2393,1,"Duplicate_function_implementation_2393","Duplicate function implementation."),This_overload_signature_is_not_compatible_with_its_implementation_signature:M(2394,1,"This_overload_signature_is_not_compatible_with_its_implementation_signature_2394","This overload signature is not compatible with its implementation signature."),Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local:M(2395,1,"Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395","Individual declarations in merged declaration '{0}' must be all exported or all local."),Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters:M(2396,1,"Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396","Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."),Declaration_name_conflicts_with_built_in_global_identifier_0:M(2397,1,"Declaration_name_conflicts_with_built_in_global_identifier_0_2397","Declaration name conflicts with built-in global identifier '{0}'."),constructor_cannot_be_used_as_a_parameter_property_name:M(2398,1,"constructor_cannot_be_used_as_a_parameter_property_name_2398","'constructor' cannot be used as a parameter property name."),Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference:M(2399,1,"Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399","Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."),Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference:M(2400,1,"Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400","Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."),A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers:M(2401,1,"A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401","A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers."),Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference:M(2402,1,"Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402","Expression resolves to '_super' that compiler uses to capture base class reference."),Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2:M(2403,1,"Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403","Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."),The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:M(2404,1,"The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404","The left-hand side of a 'for...in' statement cannot use a type annotation."),The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any:M(2405,1,"The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405","The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."),The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access:M(2406,1,"The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406","The left-hand side of a 'for...in' statement must be a variable or a property access."),The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0:M(2407,1,"The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407","The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."),Setters_cannot_return_a_value:M(2408,1,"Setters_cannot_return_a_value_2408","Setters cannot return a value."),Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class:M(2409,1,"Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409","Return type of constructor signature must be assignable to the instance type of the class."),The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any:M(2410,1,"The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410","The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."),Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target:M(2412,1,"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412","Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."),Property_0_of_type_1_is_not_assignable_to_2_index_type_3:M(2411,1,"Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411","Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."),_0_index_type_1_is_not_assignable_to_2_index_type_3:M(2413,1,"_0_index_type_1_is_not_assignable_to_2_index_type_3_2413","'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."),Class_name_cannot_be_0:M(2414,1,"Class_name_cannot_be_0_2414","Class name cannot be '{0}'."),Class_0_incorrectly_extends_base_class_1:M(2415,1,"Class_0_incorrectly_extends_base_class_1_2415","Class '{0}' incorrectly extends base class '{1}'."),Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2:M(2416,1,"Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416","Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."),Class_static_side_0_incorrectly_extends_base_class_static_side_1:M(2417,1,"Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417","Class static side '{0}' incorrectly extends base class static side '{1}'."),Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1:M(2418,1,"Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418","Type of computed property's value is '{0}', which is not assignable to type '{1}'."),Types_of_construct_signatures_are_incompatible:M(2419,1,"Types_of_construct_signatures_are_incompatible_2419","Types of construct signatures are incompatible."),Class_0_incorrectly_implements_interface_1:M(2420,1,"Class_0_incorrectly_implements_interface_1_2420","Class '{0}' incorrectly implements interface '{1}'."),A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members:M(2422,1,"A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422","A class can only implement an object type or intersection of object types with statically known members."),Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor:M(2423,1,"Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423","Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."),Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function:M(2425,1,"Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425","Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."),Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function:M(2426,1,"Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426","Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."),Interface_name_cannot_be_0:M(2427,1,"Interface_name_cannot_be_0_2427","Interface name cannot be '{0}'."),All_declarations_of_0_must_have_identical_type_parameters:M(2428,1,"All_declarations_of_0_must_have_identical_type_parameters_2428","All declarations of '{0}' must have identical type parameters."),Interface_0_incorrectly_extends_interface_1:M(2430,1,"Interface_0_incorrectly_extends_interface_1_2430","Interface '{0}' incorrectly extends interface '{1}'."),Enum_name_cannot_be_0:M(2431,1,"Enum_name_cannot_be_0_2431","Enum name cannot be '{0}'."),In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element:M(2432,1,"In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432","In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."),A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged:M(2433,1,"A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433","A namespace declaration cannot be in a different file from a class or function with which it is merged."),A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged:M(2434,1,"A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434","A namespace declaration cannot be located prior to a class or function with which it is merged."),Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces:M(2435,1,"Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435","Ambient modules cannot be nested in other modules or namespaces."),Ambient_module_declaration_cannot_specify_relative_module_name:M(2436,1,"Ambient_module_declaration_cannot_specify_relative_module_name_2436","Ambient module declaration cannot specify relative module name."),Module_0_is_hidden_by_a_local_declaration_with_the_same_name:M(2437,1,"Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437","Module '{0}' is hidden by a local declaration with the same name."),Import_name_cannot_be_0:M(2438,1,"Import_name_cannot_be_0_2438","Import name cannot be '{0}'."),Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name:M(2439,1,"Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439","Import or export declaration in an ambient module declaration cannot reference module through relative module name."),Import_declaration_conflicts_with_local_declaration_of_0:M(2440,1,"Import_declaration_conflicts_with_local_declaration_of_0_2440","Import declaration conflicts with local declaration of '{0}'."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module:M(2441,1,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."),Types_have_separate_declarations_of_a_private_property_0:M(2442,1,"Types_have_separate_declarations_of_a_private_property_0_2442","Types have separate declarations of a private property '{0}'."),Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2:M(2443,1,"Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443","Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."),Property_0_is_protected_in_type_1_but_public_in_type_2:M(2444,1,"Property_0_is_protected_in_type_1_but_public_in_type_2_2444","Property '{0}' is protected in type '{1}' but public in type '{2}'."),Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses:M(2445,1,"Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445","Property '{0}' is protected and only accessible within class '{1}' and its subclasses."),Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2:M(2446,1,"Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446","Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."),The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead:M(2447,1,"The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447","The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."),Block_scoped_variable_0_used_before_its_declaration:M(2448,1,"Block_scoped_variable_0_used_before_its_declaration_2448","Block-scoped variable '{0}' used before its declaration."),Class_0_used_before_its_declaration:M(2449,1,"Class_0_used_before_its_declaration_2449","Class '{0}' used before its declaration."),Enum_0_used_before_its_declaration:M(2450,1,"Enum_0_used_before_its_declaration_2450","Enum '{0}' used before its declaration."),Cannot_redeclare_block_scoped_variable_0:M(2451,1,"Cannot_redeclare_block_scoped_variable_0_2451","Cannot redeclare block-scoped variable '{0}'."),An_enum_member_cannot_have_a_numeric_name:M(2452,1,"An_enum_member_cannot_have_a_numeric_name_2452","An enum member cannot have a numeric name."),Variable_0_is_used_before_being_assigned:M(2454,1,"Variable_0_is_used_before_being_assigned_2454","Variable '{0}' is used before being assigned."),Type_alias_0_circularly_references_itself:M(2456,1,"Type_alias_0_circularly_references_itself_2456","Type alias '{0}' circularly references itself."),Type_alias_name_cannot_be_0:M(2457,1,"Type_alias_name_cannot_be_0_2457","Type alias name cannot be '{0}'."),An_AMD_module_cannot_have_multiple_name_assignments:M(2458,1,"An_AMD_module_cannot_have_multiple_name_assignments_2458","An AMD module cannot have multiple name assignments."),Module_0_declares_1_locally_but_it_is_not_exported:M(2459,1,"Module_0_declares_1_locally_but_it_is_not_exported_2459","Module '{0}' declares '{1}' locally, but it is not exported."),Module_0_declares_1_locally_but_it_is_exported_as_2:M(2460,1,"Module_0_declares_1_locally_but_it_is_exported_as_2_2460","Module '{0}' declares '{1}' locally, but it is exported as '{2}'."),Type_0_is_not_an_array_type:M(2461,1,"Type_0_is_not_an_array_type_2461","Type '{0}' is not an array type."),A_rest_element_must_be_last_in_a_destructuring_pattern:M(2462,1,"A_rest_element_must_be_last_in_a_destructuring_pattern_2462","A rest element must be last in a destructuring pattern."),A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature:M(2463,1,"A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463","A binding pattern parameter cannot be optional in an implementation signature."),A_computed_property_name_must_be_of_type_string_number_symbol_or_any:M(2464,1,"A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464","A computed property name must be of type 'string', 'number', 'symbol', or 'any'."),this_cannot_be_referenced_in_a_computed_property_name:M(2465,1,"this_cannot_be_referenced_in_a_computed_property_name_2465","'this' cannot be referenced in a computed property name."),super_cannot_be_referenced_in_a_computed_property_name:M(2466,1,"super_cannot_be_referenced_in_a_computed_property_name_2466","'super' cannot be referenced in a computed property name."),A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type:M(2467,1,"A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467","A computed property name cannot reference a type parameter from its containing type."),Cannot_find_global_value_0:M(2468,1,"Cannot_find_global_value_0_2468","Cannot find global value '{0}'."),The_0_operator_cannot_be_applied_to_type_symbol:M(2469,1,"The_0_operator_cannot_be_applied_to_type_symbol_2469","The '{0}' operator cannot be applied to type 'symbol'."),Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher:M(2472,1,"Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472","Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."),Enum_declarations_must_all_be_const_or_non_const:M(2473,1,"Enum_declarations_must_all_be_const_or_non_const_2473","Enum declarations must all be const or non-const."),const_enum_member_initializers_must_be_constant_expressions:M(2474,1,"const_enum_member_initializers_must_be_constant_expressions_2474","const enum member initializers must be constant expressions."),const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query:M(2475,1,"const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475","'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."),A_const_enum_member_can_only_be_accessed_using_a_string_literal:M(2476,1,"A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476","A const enum member can only be accessed using a string literal."),const_enum_member_initializer_was_evaluated_to_a_non_finite_value:M(2477,1,"const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477","'const' enum member initializer was evaluated to a non-finite value."),const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN:M(2478,1,"const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478","'const' enum member initializer was evaluated to disallowed value 'NaN'."),let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations:M(2480,1,"let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480","'let' is not allowed to be used as a name in 'let' or 'const' declarations."),Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1:M(2481,1,"Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481","Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."),The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation:M(2483,1,"The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483","The left-hand side of a 'for...of' statement cannot use a type annotation."),Export_declaration_conflicts_with_exported_declaration_of_0:M(2484,1,"Export_declaration_conflicts_with_exported_declaration_of_0_2484","Export declaration conflicts with exported declaration of '{0}'."),The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access:M(2487,1,"The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487","The left-hand side of a 'for...of' statement must be a variable or a property access."),Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator:M(2488,1,"Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488","Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."),An_iterator_must_have_a_next_method:M(2489,1,"An_iterator_must_have_a_next_method_2489","An iterator must have a 'next()' method."),The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property:M(2490,1,"The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490","The type returned by the '{0}()' method of an iterator must have a 'value' property."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern:M(2491,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491","The left-hand side of a 'for...in' statement cannot be a destructuring pattern."),Cannot_redeclare_identifier_0_in_catch_clause:M(2492,1,"Cannot_redeclare_identifier_0_in_catch_clause_2492","Cannot redeclare identifier '{0}' in catch clause."),Tuple_type_0_of_length_1_has_no_element_at_index_2:M(2493,1,"Tuple_type_0_of_length_1_has_no_element_at_index_2_2493","Tuple type '{0}' of length '{1}' has no element at index '{2}'."),Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher:M(2494,1,"Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494","Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."),Type_0_is_not_an_array_type_or_a_string_type:M(2495,1,"Type_0_is_not_an_array_type_or_a_string_type_2495","Type '{0}' is not an array type or a string type."),The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_function_expression:M(2496,1,"The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_func_2496","The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression."),This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export:M(2497,1,"This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497","This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export."),Module_0_uses_export_and_cannot_be_used_with_export_Asterisk:M(2498,1,"Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498","Module '{0}' uses 'export =' and cannot be used with 'export *'."),An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments:M(2499,1,"An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499","An interface can only extend an identifier/qualified-name with optional type arguments."),A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments:M(2500,1,"A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500","A class can only implement an identifier/qualified-name with optional type arguments."),A_rest_element_cannot_contain_a_binding_pattern:M(2501,1,"A_rest_element_cannot_contain_a_binding_pattern_2501","A rest element cannot contain a binding pattern."),_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation:M(2502,1,"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502","'{0}' is referenced directly or indirectly in its own type annotation."),Cannot_find_namespace_0:M(2503,1,"Cannot_find_namespace_0_2503","Cannot find namespace '{0}'."),Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:M(2504,1,"Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504","Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."),A_generator_cannot_have_a_void_type_annotation:M(2505,1,"A_generator_cannot_have_a_void_type_annotation_2505","A generator cannot have a 'void' type annotation."),_0_is_referenced_directly_or_indirectly_in_its_own_base_expression:M(2506,1,"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506","'{0}' is referenced directly or indirectly in its own base expression."),Type_0_is_not_a_constructor_function_type:M(2507,1,"Type_0_is_not_a_constructor_function_type_2507","Type '{0}' is not a constructor function type."),No_base_constructor_has_the_specified_number_of_type_arguments:M(2508,1,"No_base_constructor_has_the_specified_number_of_type_arguments_2508","No base constructor has the specified number of type arguments."),Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members:M(2509,1,"Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509","Base constructor return type '{0}' is not an object type or intersection of object types with statically known members."),Base_constructors_must_all_have_the_same_return_type:M(2510,1,"Base_constructors_must_all_have_the_same_return_type_2510","Base constructors must all have the same return type."),Cannot_create_an_instance_of_an_abstract_class:M(2511,1,"Cannot_create_an_instance_of_an_abstract_class_2511","Cannot create an instance of an abstract class."),Overload_signatures_must_all_be_abstract_or_non_abstract:M(2512,1,"Overload_signatures_must_all_be_abstract_or_non_abstract_2512","Overload signatures must all be abstract or non-abstract."),Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression:M(2513,1,"Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513","Abstract method '{0}' in class '{1}' cannot be accessed via super expression."),A_tuple_type_cannot_be_indexed_with_a_negative_value:M(2514,1,"A_tuple_type_cannot_be_indexed_with_a_negative_value_2514","A tuple type cannot be indexed with a negative value."),Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2:M(2515,1,"Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515","Non-abstract class '{0}' does not implement inherited abstract member {1} from class '{2}'."),All_declarations_of_an_abstract_method_must_be_consecutive:M(2516,1,"All_declarations_of_an_abstract_method_must_be_consecutive_2516","All declarations of an abstract method must be consecutive."),Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type:M(2517,1,"Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517","Cannot assign an abstract constructor type to a non-abstract constructor type."),A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard:M(2518,1,"A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518","A 'this'-based type guard is not compatible with a parameter-based type guard."),An_async_iterator_must_have_a_next_method:M(2519,1,"An_async_iterator_must_have_a_next_method_2519","An async iterator must have a 'next()' method."),Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions:M(2520,1,"Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520","Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."),The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method:M(2522,1,"The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_sta_2522","The 'arguments' object cannot be referenced in an async function or method in ES5. Consider using a standard function or method."),yield_expressions_cannot_be_used_in_a_parameter_initializer:M(2523,1,"yield_expressions_cannot_be_used_in_a_parameter_initializer_2523","'yield' expressions cannot be used in a parameter initializer."),await_expressions_cannot_be_used_in_a_parameter_initializer:M(2524,1,"await_expressions_cannot_be_used_in_a_parameter_initializer_2524","'await' expressions cannot be used in a parameter initializer."),A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface:M(2526,1,"A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526","A 'this' type is available only in a non-static member of a class or interface."),The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary:M(2527,1,"The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527","The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."),A_module_cannot_have_multiple_default_exports:M(2528,1,"A_module_cannot_have_multiple_default_exports_2528","A module cannot have multiple default exports."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions:M(2529,1,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."),Property_0_is_incompatible_with_index_signature:M(2530,1,"Property_0_is_incompatible_with_index_signature_2530","Property '{0}' is incompatible with index signature."),Object_is_possibly_null:M(2531,1,"Object_is_possibly_null_2531","Object is possibly 'null'."),Object_is_possibly_undefined:M(2532,1,"Object_is_possibly_undefined_2532","Object is possibly 'undefined'."),Object_is_possibly_null_or_undefined:M(2533,1,"Object_is_possibly_null_or_undefined_2533","Object is possibly 'null' or 'undefined'."),A_function_returning_never_cannot_have_a_reachable_end_point:M(2534,1,"A_function_returning_never_cannot_have_a_reachable_end_point_2534","A function returning 'never' cannot have a reachable end point."),Type_0_cannot_be_used_to_index_type_1:M(2536,1,"Type_0_cannot_be_used_to_index_type_1_2536","Type '{0}' cannot be used to index type '{1}'."),Type_0_has_no_matching_index_signature_for_type_1:M(2537,1,"Type_0_has_no_matching_index_signature_for_type_1_2537","Type '{0}' has no matching index signature for type '{1}'."),Type_0_cannot_be_used_as_an_index_type:M(2538,1,"Type_0_cannot_be_used_as_an_index_type_2538","Type '{0}' cannot be used as an index type."),Cannot_assign_to_0_because_it_is_not_a_variable:M(2539,1,"Cannot_assign_to_0_because_it_is_not_a_variable_2539","Cannot assign to '{0}' because it is not a variable."),Cannot_assign_to_0_because_it_is_a_read_only_property:M(2540,1,"Cannot_assign_to_0_because_it_is_a_read_only_property_2540","Cannot assign to '{0}' because it is a read-only property."),Index_signature_in_type_0_only_permits_reading:M(2542,1,"Index_signature_in_type_0_only_permits_reading_2542","Index signature in type '{0}' only permits reading."),Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference:M(2543,1,"Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543","Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."),Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference:M(2544,1,"Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544","Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."),A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any:M(2545,1,"A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545","A mixin class must have a constructor with a single rest parameter of type 'any[]'."),The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property:M(2547,1,"The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547","The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property."),Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:M(2548,1,"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548","Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:M(2549,1,"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549","Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later:M(2550,1,"Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_c_2550","Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{2}' or later."),Property_0_does_not_exist_on_type_1_Did_you_mean_2:M(2551,1,"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"),Cannot_find_name_0_Did_you_mean_1:M(2552,1,"Cannot_find_name_0_Did_you_mean_1_2552","Cannot find name '{0}'. Did you mean '{1}'?"),Computed_values_are_not_permitted_in_an_enum_with_string_valued_members:M(2553,1,"Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553","Computed values are not permitted in an enum with string valued members."),Expected_0_arguments_but_got_1:M(2554,1,"Expected_0_arguments_but_got_1_2554","Expected {0} arguments, but got {1}."),Expected_at_least_0_arguments_but_got_1:M(2555,1,"Expected_at_least_0_arguments_but_got_1_2555","Expected at least {0} arguments, but got {1}."),A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter:M(2556,1,"A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556","A spread argument must either have a tuple type or be passed to a rest parameter."),Expected_0_type_arguments_but_got_1:M(2558,1,"Expected_0_type_arguments_but_got_1_2558","Expected {0} type arguments, but got {1}."),Type_0_has_no_properties_in_common_with_type_1:M(2559,1,"Type_0_has_no_properties_in_common_with_type_1_2559","Type '{0}' has no properties in common with type '{1}'."),Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it:M(2560,1,"Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560","Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"),Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2:M(2561,1,"Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561","Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"),Base_class_expressions_cannot_reference_class_type_parameters:M(2562,1,"Base_class_expressions_cannot_reference_class_type_parameters_2562","Base class expressions cannot reference class type parameters."),The_containing_function_or_module_body_is_too_large_for_control_flow_analysis:M(2563,1,"The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563","The containing function or module body is too large for control flow analysis."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor:M(2564,1,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564","Property '{0}' has no initializer and is not definitely assigned in the constructor."),Property_0_is_used_before_being_assigned:M(2565,1,"Property_0_is_used_before_being_assigned_2565","Property '{0}' is used before being assigned."),A_rest_element_cannot_have_a_property_name:M(2566,1,"A_rest_element_cannot_have_a_property_name_2566","A rest element cannot have a property name."),Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations:M(2567,1,"Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567","Enum declarations can only merge with namespace or other enum declarations."),Property_0_may_not_exist_on_type_1_Did_you_mean_2:M(2568,1,"Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568","Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"),Could_not_find_name_0_Did_you_mean_1:M(2570,1,"Could_not_find_name_0_Did_you_mean_1_2570","Could not find name '{0}'. Did you mean '{1}'?"),Object_is_of_type_unknown:M(2571,1,"Object_is_of_type_unknown_2571","Object is of type 'unknown'."),A_rest_element_type_must_be_an_array_type:M(2574,1,"A_rest_element_type_must_be_an_array_type_2574","A rest element type must be an array type."),No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments:M(2575,1,"No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575","No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."),Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead:M(2576,1,"Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576","Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"),Return_type_annotation_circularly_references_itself:M(2577,1,"Return_type_annotation_circularly_references_itself_2577","Return type annotation circularly references itself."),Unused_ts_expect_error_directive:M(2578,1,"Unused_ts_expect_error_directive_2578","Unused '@ts-expect-error' directive."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode:M(2580,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2580","Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery:M(2581,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2581","Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha:M(2582,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2582","Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`."),Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later:M(2583,1,"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583","Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later."),Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom:M(2584,1,"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584","Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later:M(2585,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585","'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later."),Cannot_assign_to_0_because_it_is_a_constant:M(2588,1,"Cannot_assign_to_0_because_it_is_a_constant_2588","Cannot assign to '{0}' because it is a constant."),Type_instantiation_is_excessively_deep_and_possibly_infinite:M(2589,1,"Type_instantiation_is_excessively_deep_and_possibly_infinite_2589","Type instantiation is excessively deep and possibly infinite."),Expression_produces_a_union_type_that_is_too_complex_to_represent:M(2590,1,"Expression_produces_a_union_type_that_is_too_complex_to_represent_2590","Expression produces a union type that is too complex to represent."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig:M(2591,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2591","Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig:M(2592,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2592","Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig:M(2593,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2593","Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig."),This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag:M(2594,1,"This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag_2594","This module is declared with 'export =', and can only be used with a default import when using the '{0}' flag."),_0_can_only_be_imported_by_using_a_default_import:M(2595,1,"_0_can_only_be_imported_by_using_a_default_import_2595","'{0}' can only be imported by using a default import."),_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:M(2596,1,"_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import_2596","'{0}' can only be imported by turning on the 'esModuleInterop' flag and using a default import."),_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import:M(2597,1,"_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import_2597","'{0}' can only be imported by using a 'require' call or by using a default import."),_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:M(2598,1,"_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using__2598","'{0}' can only be imported by using a 'require' call or by turning on the 'esModuleInterop' flag and using a default import."),JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist:M(2602,1,"JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602","JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."),Property_0_in_type_1_is_not_assignable_to_type_2:M(2603,1,"Property_0_in_type_1_is_not_assignable_to_type_2_2603","Property '{0}' in type '{1}' is not assignable to type '{2}'."),JSX_element_type_0_does_not_have_any_construct_or_call_signatures:M(2604,1,"JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604","JSX element type '{0}' does not have any construct or call signatures."),Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property:M(2606,1,"Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606","Property '{0}' of JSX spread attribute is not assignable to target property."),JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property:M(2607,1,"JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607","JSX element class does not support attributes because it does not have a '{0}' property."),The_global_type_JSX_0_may_not_have_more_than_one_property:M(2608,1,"The_global_type_JSX_0_may_not_have_more_than_one_property_2608","The global type 'JSX.{0}' may not have more than one property."),JSX_spread_child_must_be_an_array_type:M(2609,1,"JSX_spread_child_must_be_an_array_type_2609","JSX spread child must be an array type."),_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property:M(2610,1,"_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610","'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."),_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor:M(2611,1,"_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611","'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."),Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration:M(2612,1,"Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612","Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."),Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead:M(2613,1,"Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613","Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"),Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead:M(2614,1,"Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614","Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"),Type_of_property_0_circularly_references_itself_in_mapped_type_1:M(2615,1,"Type_of_property_0_circularly_references_itself_in_mapped_type_1_2615","Type of property '{0}' circularly references itself in mapped type '{1}'."),_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import:M(2616,1,"_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import_2616","'{0}' can only be imported by using 'import {1} = require({2})' or a default import."),_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:M(2617,1,"_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_us_2617","'{0}' can only be imported by using 'import {1} = require({2})' or by turning on the 'esModuleInterop' flag and using a default import."),Source_has_0_element_s_but_target_requires_1:M(2618,1,"Source_has_0_element_s_but_target_requires_1_2618","Source has {0} element(s) but target requires {1}."),Source_has_0_element_s_but_target_allows_only_1:M(2619,1,"Source_has_0_element_s_but_target_allows_only_1_2619","Source has {0} element(s) but target allows only {1}."),Target_requires_0_element_s_but_source_may_have_fewer:M(2620,1,"Target_requires_0_element_s_but_source_may_have_fewer_2620","Target requires {0} element(s) but source may have fewer."),Target_allows_only_0_element_s_but_source_may_have_more:M(2621,1,"Target_allows_only_0_element_s_but_source_may_have_more_2621","Target allows only {0} element(s) but source may have more."),Source_provides_no_match_for_required_element_at_position_0_in_target:M(2623,1,"Source_provides_no_match_for_required_element_at_position_0_in_target_2623","Source provides no match for required element at position {0} in target."),Source_provides_no_match_for_variadic_element_at_position_0_in_target:M(2624,1,"Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624","Source provides no match for variadic element at position {0} in target."),Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target:M(2625,1,"Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625","Variadic element at position {0} in source does not match element at position {1} in target."),Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target:M(2626,1,"Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626","Type at position {0} in source is not compatible with type at position {1} in target."),Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target:M(2627,1,"Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627","Type at positions {0} through {1} in source is not compatible with type at position {2} in target."),Cannot_assign_to_0_because_it_is_an_enum:M(2628,1,"Cannot_assign_to_0_because_it_is_an_enum_2628","Cannot assign to '{0}' because it is an enum."),Cannot_assign_to_0_because_it_is_a_class:M(2629,1,"Cannot_assign_to_0_because_it_is_a_class_2629","Cannot assign to '{0}' because it is a class."),Cannot_assign_to_0_because_it_is_a_function:M(2630,1,"Cannot_assign_to_0_because_it_is_a_function_2630","Cannot assign to '{0}' because it is a function."),Cannot_assign_to_0_because_it_is_a_namespace:M(2631,1,"Cannot_assign_to_0_because_it_is_a_namespace_2631","Cannot assign to '{0}' because it is a namespace."),Cannot_assign_to_0_because_it_is_an_import:M(2632,1,"Cannot_assign_to_0_because_it_is_an_import_2632","Cannot assign to '{0}' because it is an import."),JSX_property_access_expressions_cannot_include_JSX_namespace_names:M(2633,1,"JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633","JSX property access expressions cannot include JSX namespace names"),_0_index_signatures_are_incompatible:M(2634,1,"_0_index_signatures_are_incompatible_2634","'{0}' index signatures are incompatible."),Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable:M(2635,1,"Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635","Type '{0}' has no signatures for which the type argument list is applicable."),Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation:M(2636,1,"Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636","Type '{0}' is not assignable to type '{1}' as implied by variance annotation."),Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types:M(2637,1,"Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637","Variance annotations are only supported in type aliases for object, function, constructor, and mapped types."),Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator:M(2638,1,"Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638","Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."),React_components_cannot_include_JSX_namespace_names:M(2639,1,"React_components_cannot_include_JSX_namespace_names_2639","React components cannot include JSX namespace names"),Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity:M(2649,1,"Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649","Cannot augment module '{0}' with value exports because it resolves to a non-module entity."),Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more:M(2650,1,"Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and__2650","Non-abstract class expression is missing implementations for the following members of '{0}': {1} and {2} more."),A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums:M(2651,1,"A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651","A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."),Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead:M(2652,1,"Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652","Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."),Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1:M(2653,1,"Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653","Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."),Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2:M(2654,1,"Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_2654","Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2}."),Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more:M(2655,1,"Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more_2655","Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2} and {3} more."),Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1:M(2656,1,"Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_2656","Non-abstract class expression is missing implementations for the following members of '{0}': {1}."),JSX_expressions_must_have_one_parent_element:M(2657,1,"JSX_expressions_must_have_one_parent_element_2657","JSX expressions must have one parent element."),Type_0_provides_no_match_for_the_signature_1:M(2658,1,"Type_0_provides_no_match_for_the_signature_1_2658","Type '{0}' provides no match for the signature '{1}'."),super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher:M(2659,1,"super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659","'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."),super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions:M(2660,1,"super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660","'super' can only be referenced in members of derived classes or object literal expressions."),Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module:M(2661,1,"Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661","Cannot export '{0}'. Only local declarations can be exported from a module."),Cannot_find_name_0_Did_you_mean_the_static_member_1_0:M(2662,1,"Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662","Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"),Cannot_find_name_0_Did_you_mean_the_instance_member_this_0:M(2663,1,"Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663","Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"),Invalid_module_name_in_augmentation_module_0_cannot_be_found:M(2664,1,"Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664","Invalid module name in augmentation, module '{0}' cannot be found."),Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented:M(2665,1,"Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665","Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."),Exports_and_export_assignments_are_not_permitted_in_module_augmentations:M(2666,1,"Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666","Exports and export assignments are not permitted in module augmentations."),Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module:M(2667,1,"Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667","Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."),export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible:M(2668,1,"export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668","'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."),Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations:M(2669,1,"Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669","Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."),Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context:M(2670,1,"Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670","Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."),Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity:M(2671,1,"Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671","Cannot augment module '{0}' because it resolves to a non-module entity."),Cannot_assign_a_0_constructor_type_to_a_1_constructor_type:M(2672,1,"Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672","Cannot assign a '{0}' constructor type to a '{1}' constructor type."),Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration:M(2673,1,"Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673","Constructor of class '{0}' is private and only accessible within the class declaration."),Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration:M(2674,1,"Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674","Constructor of class '{0}' is protected and only accessible within the class declaration."),Cannot_extend_a_class_0_Class_constructor_is_marked_as_private:M(2675,1,"Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675","Cannot extend a class '{0}'. Class constructor is marked as private."),Accessors_must_both_be_abstract_or_non_abstract:M(2676,1,"Accessors_must_both_be_abstract_or_non_abstract_2676","Accessors must both be abstract or non-abstract."),A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type:M(2677,1,"A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677","A type predicate's type must be assignable to its parameter's type."),Type_0_is_not_comparable_to_type_1:M(2678,1,"Type_0_is_not_comparable_to_type_1_2678","Type '{0}' is not comparable to type '{1}'."),A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void:M(2679,1,"A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679","A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."),A_0_parameter_must_be_the_first_parameter:M(2680,1,"A_0_parameter_must_be_the_first_parameter_2680","A '{0}' parameter must be the first parameter."),A_constructor_cannot_have_a_this_parameter:M(2681,1,"A_constructor_cannot_have_a_this_parameter_2681","A constructor cannot have a 'this' parameter."),this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation:M(2683,1,"this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683","'this' implicitly has type 'any' because it does not have a type annotation."),The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1:M(2684,1,"The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684","The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."),The_this_types_of_each_signature_are_incompatible:M(2685,1,"The_this_types_of_each_signature_are_incompatible_2685","The 'this' types of each signature are incompatible."),_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead:M(2686,1,"_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686","'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."),All_declarations_of_0_must_have_identical_modifiers:M(2687,1,"All_declarations_of_0_must_have_identical_modifiers_2687","All declarations of '{0}' must have identical modifiers."),Cannot_find_type_definition_file_for_0:M(2688,1,"Cannot_find_type_definition_file_for_0_2688","Cannot find type definition file for '{0}'."),Cannot_extend_an_interface_0_Did_you_mean_implements:M(2689,1,"Cannot_extend_an_interface_0_Did_you_mean_implements_2689","Cannot extend an interface '{0}'. Did you mean 'implements'?"),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0:M(2690,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0_2690","'{0}' only refers to a type, but is being used as a value here. Did you mean to use '{1} in {0}'?"),_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible:M(2692,1,"_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692","'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here:M(2693,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693","'{0}' only refers to a type, but is being used as a value here."),Namespace_0_has_no_exported_member_1:M(2694,1,"Namespace_0_has_no_exported_member_1_2694","Namespace '{0}' has no exported member '{1}'."),Left_side_of_comma_operator_is_unused_and_has_no_side_effects:M(2695,1,"Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695","Left side of comma operator is unused and has no side effects.",!0),The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead:M(2696,1,"The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696","The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"),An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:M(2697,1,"An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697","An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."),Spread_types_may_only_be_created_from_object_types:M(2698,1,"Spread_types_may_only_be_created_from_object_types_2698","Spread types may only be created from object types."),Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1:M(2699,1,"Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699","Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."),Rest_types_may_only_be_created_from_object_types:M(2700,1,"Rest_types_may_only_be_created_from_object_types_2700","Rest types may only be created from object types."),The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access:M(2701,1,"The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701","The target of an object rest assignment must be a variable or a property access."),_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here:M(2702,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702","'{0}' only refers to a type, but is being used as a namespace here."),The_operand_of_a_delete_operator_must_be_a_property_reference:M(2703,1,"The_operand_of_a_delete_operator_must_be_a_property_reference_2703","The operand of a 'delete' operator must be a property reference."),The_operand_of_a_delete_operator_cannot_be_a_read_only_property:M(2704,1,"The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704","The operand of a 'delete' operator cannot be a read-only property."),An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:M(2705,1,"An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_2705","An async function or method in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."),Required_type_parameters_may_not_follow_optional_type_parameters:M(2706,1,"Required_type_parameters_may_not_follow_optional_type_parameters_2706","Required type parameters may not follow optional type parameters."),Generic_type_0_requires_between_1_and_2_type_arguments:M(2707,1,"Generic_type_0_requires_between_1_and_2_type_arguments_2707","Generic type '{0}' requires between {1} and {2} type arguments."),Cannot_use_namespace_0_as_a_value:M(2708,1,"Cannot_use_namespace_0_as_a_value_2708","Cannot use namespace '{0}' as a value."),Cannot_use_namespace_0_as_a_type:M(2709,1,"Cannot_use_namespace_0_as_a_type_2709","Cannot use namespace '{0}' as a type."),_0_are_specified_twice_The_attribute_named_0_will_be_overwritten:M(2710,1,"_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710","'{0}' are specified twice. The attribute named '{0}' will be overwritten."),A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:M(2711,1,"A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711","A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."),A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:M(2712,1,"A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_t_2712","A dynamic import call in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."),Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1:M(2713,1,"Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713",`Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}["{1}"]'?`),The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context:M(2714,1,"The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714","The expression of an export assignment must be an identifier or qualified name in an ambient context."),Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor:M(2715,1,"Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715","Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."),Type_parameter_0_has_a_circular_default:M(2716,1,"Type_parameter_0_has_a_circular_default_2716","Type parameter '{0}' has a circular default."),Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:M(2717,1,"Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717","Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."),Duplicate_property_0:M(2718,1,"Duplicate_property_0_2718","Duplicate property '{0}'."),Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated:M(2719,1,"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719","Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."),Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass:M(2720,1,"Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720","Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"),Cannot_invoke_an_object_which_is_possibly_null:M(2721,1,"Cannot_invoke_an_object_which_is_possibly_null_2721","Cannot invoke an object which is possibly 'null'."),Cannot_invoke_an_object_which_is_possibly_undefined:M(2722,1,"Cannot_invoke_an_object_which_is_possibly_undefined_2722","Cannot invoke an object which is possibly 'undefined'."),Cannot_invoke_an_object_which_is_possibly_null_or_undefined:M(2723,1,"Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723","Cannot invoke an object which is possibly 'null' or 'undefined'."),_0_has_no_exported_member_named_1_Did_you_mean_2:M(2724,1,"_0_has_no_exported_member_named_1_Did_you_mean_2_2724","'{0}' has no exported member named '{1}'. Did you mean '{2}'?"),Class_name_cannot_be_Object_when_targeting_ES5_with_module_0:M(2725,1,"Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725","Class name cannot be 'Object' when targeting ES5 with module {0}."),Cannot_find_lib_definition_for_0:M(2726,1,"Cannot_find_lib_definition_for_0_2726","Cannot find lib definition for '{0}'."),Cannot_find_lib_definition_for_0_Did_you_mean_1:M(2727,1,"Cannot_find_lib_definition_for_0_Did_you_mean_1_2727","Cannot find lib definition for '{0}'. Did you mean '{1}'?"),_0_is_declared_here:M(2728,3,"_0_is_declared_here_2728","'{0}' is declared here."),Property_0_is_used_before_its_initialization:M(2729,1,"Property_0_is_used_before_its_initialization_2729","Property '{0}' is used before its initialization."),An_arrow_function_cannot_have_a_this_parameter:M(2730,1,"An_arrow_function_cannot_have_a_this_parameter_2730","An arrow function cannot have a 'this' parameter."),Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String:M(2731,1,"Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731","Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."),Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension:M(2732,1,"Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732","Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension."),Property_0_was_also_declared_here:M(2733,1,"Property_0_was_also_declared_here_2733","Property '{0}' was also declared here."),Are_you_missing_a_semicolon:M(2734,1,"Are_you_missing_a_semicolon_2734","Are you missing a semicolon?"),Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1:M(2735,1,"Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735","Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"),Operator_0_cannot_be_applied_to_type_1:M(2736,1,"Operator_0_cannot_be_applied_to_type_1_2736","Operator '{0}' cannot be applied to type '{1}'."),BigInt_literals_are_not_available_when_targeting_lower_than_ES2020:M(2737,1,"BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737","BigInt literals are not available when targeting lower than ES2020."),An_outer_value_of_this_is_shadowed_by_this_container:M(2738,3,"An_outer_value_of_this_is_shadowed_by_this_container_2738","An outer value of 'this' is shadowed by this container."),Type_0_is_missing_the_following_properties_from_type_1_Colon_2:M(2739,1,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739","Type '{0}' is missing the following properties from type '{1}': {2}"),Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more:M(2740,1,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740","Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more."),Property_0_is_missing_in_type_1_but_required_in_type_2:M(2741,1,"Property_0_is_missing_in_type_1_but_required_in_type_2_2741","Property '{0}' is missing in type '{1}' but required in type '{2}'."),The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary:M(2742,1,"The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742","The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary."),No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments:M(2743,1,"No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743","No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments."),Type_parameter_defaults_can_only_reference_previously_declared_type_parameters:M(2744,1,"Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744","Type parameter defaults can only reference previously declared type parameters."),This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided:M(2745,1,"This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745","This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided."),This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided:M(2746,1,"This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746","This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided."),_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2:M(2747,1,"_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747","'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."),Cannot_access_ambient_const_enums_when_0_is_enabled:M(2748,1,"Cannot_access_ambient_const_enums_when_0_is_enabled_2748","Cannot access ambient const enums when '{0}' is enabled."),_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0:M(2749,1,"_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749","'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?"),The_implementation_signature_is_declared_here:M(2750,1,"The_implementation_signature_is_declared_here_2750","The implementation signature is declared here."),Circularity_originates_in_type_at_this_location:M(2751,1,"Circularity_originates_in_type_at_this_location_2751","Circularity originates in type at this location."),The_first_export_default_is_here:M(2752,1,"The_first_export_default_is_here_2752","The first export default is here."),Another_export_default_is_here:M(2753,1,"Another_export_default_is_here_2753","Another export default is here."),super_may_not_use_type_arguments:M(2754,1,"super_may_not_use_type_arguments_2754","'super' may not use type arguments."),No_constituent_of_type_0_is_callable:M(2755,1,"No_constituent_of_type_0_is_callable_2755","No constituent of type '{0}' is callable."),Not_all_constituents_of_type_0_are_callable:M(2756,1,"Not_all_constituents_of_type_0_are_callable_2756","Not all constituents of type '{0}' are callable."),Type_0_has_no_call_signatures:M(2757,1,"Type_0_has_no_call_signatures_2757","Type '{0}' has no call signatures."),Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other:M(2758,1,"Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758","Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other."),No_constituent_of_type_0_is_constructable:M(2759,1,"No_constituent_of_type_0_is_constructable_2759","No constituent of type '{0}' is constructable."),Not_all_constituents_of_type_0_are_constructable:M(2760,1,"Not_all_constituents_of_type_0_are_constructable_2760","Not all constituents of type '{0}' are constructable."),Type_0_has_no_construct_signatures:M(2761,1,"Type_0_has_no_construct_signatures_2761","Type '{0}' has no construct signatures."),Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other:M(2762,1,"Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762","Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0:M(2763,1,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0:M(2764,1,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0:M(2765,1,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'."),Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0:M(2766,1,"Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766","Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'."),The_0_property_of_an_iterator_must_be_a_method:M(2767,1,"The_0_property_of_an_iterator_must_be_a_method_2767","The '{0}' property of an iterator must be a method."),The_0_property_of_an_async_iterator_must_be_a_method:M(2768,1,"The_0_property_of_an_async_iterator_must_be_a_method_2768","The '{0}' property of an async iterator must be a method."),No_overload_matches_this_call:M(2769,1,"No_overload_matches_this_call_2769","No overload matches this call."),The_last_overload_gave_the_following_error:M(2770,1,"The_last_overload_gave_the_following_error_2770","The last overload gave the following error."),The_last_overload_is_declared_here:M(2771,1,"The_last_overload_is_declared_here_2771","The last overload is declared here."),Overload_0_of_1_2_gave_the_following_error:M(2772,1,"Overload_0_of_1_2_gave_the_following_error_2772","Overload {0} of {1}, '{2}', gave the following error."),Did_you_forget_to_use_await:M(2773,1,"Did_you_forget_to_use_await_2773","Did you forget to use 'await'?"),This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead:M(2774,1,"This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774","This condition will always return true since this function is always defined. Did you mean to call it instead?"),Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation:M(2775,1,"Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775","Assertions require every name in the call target to be declared with an explicit type annotation."),Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name:M(2776,1,"Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776","Assertions require the call target to be an identifier or qualified name."),The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access:M(2777,1,"The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777","The operand of an increment or decrement operator may not be an optional property access."),The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access:M(2778,1,"The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778","The target of an object rest assignment may not be an optional property access."),The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access:M(2779,1,"The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779","The left-hand side of an assignment expression may not be an optional property access."),The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access:M(2780,1,"The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780","The left-hand side of a 'for...in' statement may not be an optional property access."),The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access:M(2781,1,"The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781","The left-hand side of a 'for...of' statement may not be an optional property access."),_0_needs_an_explicit_type_annotation:M(2782,3,"_0_needs_an_explicit_type_annotation_2782","'{0}' needs an explicit type annotation."),_0_is_specified_more_than_once_so_this_usage_will_be_overwritten:M(2783,1,"_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783","'{0}' is specified more than once, so this usage will be overwritten."),get_and_set_accessors_cannot_declare_this_parameters:M(2784,1,"get_and_set_accessors_cannot_declare_this_parameters_2784","'get' and 'set' accessors cannot declare 'this' parameters."),This_spread_always_overwrites_this_property:M(2785,1,"This_spread_always_overwrites_this_property_2785","This spread always overwrites this property."),_0_cannot_be_used_as_a_JSX_component:M(2786,1,"_0_cannot_be_used_as_a_JSX_component_2786","'{0}' cannot be used as a JSX component."),Its_return_type_0_is_not_a_valid_JSX_element:M(2787,1,"Its_return_type_0_is_not_a_valid_JSX_element_2787","Its return type '{0}' is not a valid JSX element."),Its_instance_type_0_is_not_a_valid_JSX_element:M(2788,1,"Its_instance_type_0_is_not_a_valid_JSX_element_2788","Its instance type '{0}' is not a valid JSX element."),Its_element_type_0_is_not_a_valid_JSX_element:M(2789,1,"Its_element_type_0_is_not_a_valid_JSX_element_2789","Its element type '{0}' is not a valid JSX element."),The_operand_of_a_delete_operator_must_be_optional:M(2790,1,"The_operand_of_a_delete_operator_must_be_optional_2790","The operand of a 'delete' operator must be optional."),Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later:M(2791,1,"Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_lat_2791","Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later."),Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option:M(2792,1,"Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792","Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?"),The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible:M(2793,1,"The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_2793","The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible."),Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise:M(2794,1,"Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise_2794","Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'?"),The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types:M(2795,1,"The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795","The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types."),It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked:M(2796,1,"It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tag_2796","It is likely that you are missing a comma to separate these two template expressions. They form a tagged template expression which cannot be invoked."),A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract:M(2797,1,"A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797","A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."),The_declaration_was_marked_as_deprecated_here:M(2798,1,"The_declaration_was_marked_as_deprecated_here_2798","The declaration was marked as deprecated here."),Type_produces_a_tuple_type_that_is_too_large_to_represent:M(2799,1,"Type_produces_a_tuple_type_that_is_too_large_to_represent_2799","Type produces a tuple type that is too large to represent."),Expression_produces_a_tuple_type_that_is_too_large_to_represent:M(2800,1,"Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800","Expression produces a tuple type that is too large to represent."),This_condition_will_always_return_true_since_this_0_is_always_defined:M(2801,1,"This_condition_will_always_return_true_since_this_0_is_always_defined_2801","This condition will always return true since this '{0}' is always defined."),Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher:M(2802,1,"Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802","Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."),Cannot_assign_to_private_method_0_Private_methods_are_not_writable:M(2803,1,"Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803","Cannot assign to private method '{0}'. Private methods are not writable."),Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name:M(2804,1,"Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804","Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."),Private_accessor_was_defined_without_a_getter:M(2806,1,"Private_accessor_was_defined_without_a_getter_2806","Private accessor was defined without a getter."),This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0:M(2807,1,"This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807","This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."),A_get_accessor_must_be_at_least_as_accessible_as_the_setter:M(2808,1,"A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808","A get accessor must be at least as accessible as the setter"),Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses:M(2809,1,"Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809","Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses."),Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments:M(2810,1,"Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810","Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."),Initializer_for_property_0:M(2811,1,"Initializer_for_property_0_2811","Initializer for property '{0}'"),Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom:M(2812,1,"Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812","Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."),Class_declaration_cannot_implement_overload_list_for_0:M(2813,1,"Class_declaration_cannot_implement_overload_list_for_0_2813","Class declaration cannot implement overload list for '{0}'."),Function_with_bodies_can_only_merge_with_classes_that_are_ambient:M(2814,1,"Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814","Function with bodies can only merge with classes that are ambient."),arguments_cannot_be_referenced_in_property_initializers:M(2815,1,"arguments_cannot_be_referenced_in_property_initializers_2815","'arguments' cannot be referenced in property initializers."),Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class:M(2816,1,"Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816","Cannot use 'this' in a static property initializer of a decorated class."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block:M(2817,1,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817","Property '{0}' has no initializer and is not definitely assigned in a class static block."),Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers:M(2818,1,"Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818","Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."),Namespace_name_cannot_be_0:M(2819,1,"Namespace_name_cannot_be_0_2819","Namespace name cannot be '{0}'."),Type_0_is_not_assignable_to_type_1_Did_you_mean_2:M(2820,1,"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820","Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve:M(2821,1,"Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve_2821","Import assertions are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'."),Import_assertions_cannot_be_used_with_type_only_imports_or_exports:M(2822,1,"Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822","Import assertions cannot be used with type-only imports or exports."),Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve:M(2823,1,"Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve_2823","Import attributes are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'."),Cannot_find_namespace_0_Did_you_mean_1:M(2833,1,"Cannot_find_namespace_0_Did_you_mean_1_2833","Cannot find namespace '{0}'. Did you mean '{1}'?"),Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path:M(2834,1,"Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834","Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."),Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0:M(2835,1,"Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835","Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"),Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:M(2836,1,"Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2836","Import assertions are not allowed on statements that compile to CommonJS 'require' calls."),Import_assertion_values_must_be_string_literal_expressions:M(2837,1,"Import_assertion_values_must_be_string_literal_expressions_2837","Import assertion values must be string literal expressions."),All_declarations_of_0_must_have_identical_constraints:M(2838,1,"All_declarations_of_0_must_have_identical_constraints_2838","All declarations of '{0}' must have identical constraints."),This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value:M(2839,1,"This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839","This condition will always return '{0}' since JavaScript compares objects by reference, not value."),An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types:M(2840,1,"An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840","An interface cannot extend a primitive type like '{0}'. It can only extend other named object types."),_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation:M(2842,1,"_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842","'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"),We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here:M(2843,1,"We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843","We can only write a type for '{0}' by adding a type for the entire parameter here."),Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:M(2844,1,"Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844","Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),This_condition_will_always_return_0:M(2845,1,"This_condition_will_always_return_0_2845","This condition will always return '{0}'."),A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead:M(2846,1,"A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846","A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?"),The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression:M(2848,1,"The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression_2848","The right-hand side of an 'instanceof' expression must not be an instantiation expression."),Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1:M(2849,1,"Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849","Target signature provides too few arguments. Expected {0} or more, but got {1}."),The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined:M(2850,1,"The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_n_2850","The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined:M(2851,1,"The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851","The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:M(2852,1,"await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852","'await using' statements are only allowed within async functions and at the top levels of modules."),await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:M(2853,1,"await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853","'await using' statements are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:M(2854,1,"Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854","Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super:M(2855,1,"Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855","Class field '{0}' defined by the parent class is not accessible in the child class via super."),Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:M(2856,1,"Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856","Import attributes are not allowed on statements that compile to CommonJS 'require' calls."),Import_attributes_cannot_be_used_with_type_only_imports_or_exports:M(2857,1,"Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857","Import attributes cannot be used with type-only imports or exports."),Import_attribute_values_must_be_string_literal_expressions:M(2858,1,"Import_attribute_values_must_be_string_literal_expressions_2858","Import attribute values must be string literal expressions."),Excessive_complexity_comparing_types_0_and_1:M(2859,1,"Excessive_complexity_comparing_types_0_and_1_2859","Excessive complexity comparing types '{0}' and '{1}'."),The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method:M(2860,1,"The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860","The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."),An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression:M(2861,1,"An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861","An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."),Type_0_is_generic_and_can_only_be_indexed_for_reading:M(2862,1,"Type_0_is_generic_and_can_only_be_indexed_for_reading_2862","Type '{0}' is generic and can only be indexed for reading."),A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values:M(2863,1,"A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863","A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."),A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types:M(2864,1,"A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864","A class cannot implement a primitive type like '{0}'. It can only implement other named object types."),Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled:M(2865,1,"Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_2865","Import '{0}' conflicts with local value, so must be declared with a type-only import when 'isolatedModules' is enabled."),Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled:M(2866,1,"Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_w_2866","Import '{0}' conflicts with global value used in this file, so must be declared with a type-only import when 'isolatedModules' is enabled."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun:M(2867,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2867","Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig:M(2868,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2868","Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun` and then add 'bun' to the types field in your tsconfig."),Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish:M(2869,1,"Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869","Right operand of ?? is unreachable because the left operand is never nullish."),This_binary_expression_is_never_nullish_Are_you_missing_parentheses:M(2870,1,"This_binary_expression_is_never_nullish_Are_you_missing_parentheses_2870","This binary expression is never nullish. Are you missing parentheses?"),This_expression_is_always_nullish:M(2871,1,"This_expression_is_always_nullish_2871","This expression is always nullish."),This_kind_of_expression_is_always_truthy:M(2872,1,"This_kind_of_expression_is_always_truthy_2872","This kind of expression is always truthy."),This_kind_of_expression_is_always_falsy:M(2873,1,"This_kind_of_expression_is_always_falsy_2873","This kind of expression is always falsy."),Import_declaration_0_is_using_private_name_1:M(4e3,1,"Import_declaration_0_is_using_private_name_1_4000","Import declaration '{0}' is using private name '{1}'."),Type_parameter_0_of_exported_class_has_or_is_using_private_name_1:M(4002,1,"Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002","Type parameter '{0}' of exported class has or is using private name '{1}'."),Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1:M(4004,1,"Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004","Type parameter '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:M(4006,1,"Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006","Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:M(4008,1,"Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008","Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:M(4010,1,"Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010","Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:M(4012,1,"Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012","Type parameter '{0}' of public method from exported class has or is using private name '{1}'."),Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:M(4014,1,"Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014","Type parameter '{0}' of method from exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_function_has_or_is_using_private_name_1:M(4016,1,"Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016","Type parameter '{0}' of exported function has or is using private name '{1}'."),Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:M(4019,1,"Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019","Implements clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_class_0_has_or_is_using_private_name_1:M(4020,1,"extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020","'extends' clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_class_has_or_is_using_private_name_0:M(4021,1,"extends_clause_of_exported_class_has_or_is_using_private_name_0_4021","'extends' clause of exported class has or is using private name '{0}'."),extends_clause_of_exported_interface_0_has_or_is_using_private_name_1:M(4022,1,"extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022","'extends' clause of exported interface '{0}' has or is using private name '{1}'."),Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4023,1,"Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023","Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."),Exported_variable_0_has_or_is_using_name_1_from_private_module_2:M(4024,1,"Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024","Exported variable '{0}' has or is using name '{1}' from private module '{2}'."),Exported_variable_0_has_or_is_using_private_name_1:M(4025,1,"Exported_variable_0_has_or_is_using_private_name_1_4025","Exported variable '{0}' has or is using private name '{1}'."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4026,1,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026","Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:M(4027,1,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027","Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:M(4028,1,"Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028","Public static property '{0}' of exported class has or is using private name '{1}'."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4029,1,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029","Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:M(4030,1,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030","Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_property_0_of_exported_class_has_or_is_using_private_name_1:M(4031,1,"Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031","Public property '{0}' of exported class has or is using private name '{1}'."),Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:M(4032,1,"Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032","Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Property_0_of_exported_interface_has_or_is_using_private_name_1:M(4033,1,"Property_0_of_exported_interface_has_or_is_using_private_name_1_4033","Property '{0}' of exported interface has or is using private name '{1}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:M(4034,1,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034","Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1:M(4035,1,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035","Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:M(4036,1,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036","Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1:M(4037,1,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037","Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4038,1,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038","Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:M(4039,1,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039","Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1:M(4040,1,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040","Return type of public static getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4041,1,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041","Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:M(4042,1,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042","Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1:M(4043,1,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043","Return type of public getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:M(4044,1,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044","Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0:M(4045,1,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045","Return type of constructor signature from exported interface has or is using private name '{0}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:M(4046,1,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046","Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0:M(4047,1,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047","Return type of call signature from exported interface has or is using private name '{0}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:M(4048,1,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048","Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0:M(4049,1,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049","Return type of index signature from exported interface has or is using private name '{0}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:M(4050,1,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050","Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:M(4051,1,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051","Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:M(4052,1,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052","Return type of public static method from exported class has or is using private name '{0}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:M(4053,1,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053","Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:M(4054,1,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054","Return type of public method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:M(4055,1,"Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055","Return type of public method from exported class has or is using private name '{0}'."),Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:M(4056,1,"Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056","Return type of method from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0:M(4057,1,"Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057","Return type of method from exported interface has or is using private name '{0}'."),Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:M(4058,1,"Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058","Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:M(4059,1,"Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059","Return type of exported function has or is using name '{0}' from private module '{1}'."),Return_type_of_exported_function_has_or_is_using_private_name_0:M(4060,1,"Return_type_of_exported_function_has_or_is_using_private_name_0_4060","Return type of exported function has or is using private name '{0}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4061,1,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061","Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:M(4062,1,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062","Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1:M(4063,1,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063","Parameter '{0}' of constructor from exported class has or is using private name '{1}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:M(4064,1,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064","Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:M(4065,1,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065","Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:M(4066,1,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066","Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:M(4067,1,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067","Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4068,1,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068","Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:M(4069,1,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069","Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:M(4070,1,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070","Parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4071,1,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071","Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:M(4072,1,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072","Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:M(4073,1,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073","Parameter '{0}' of public method from exported class has or is using private name '{1}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:M(4074,1,"Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074","Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:M(4075,1,"Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075","Parameter '{0}' of method from exported interface has or is using private name '{1}'."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4076,1,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076","Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:M(4077,1,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077","Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."),Parameter_0_of_exported_function_has_or_is_using_private_name_1:M(4078,1,"Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078","Parameter '{0}' of exported function has or is using private name '{1}'."),Exported_type_alias_0_has_or_is_using_private_name_1:M(4081,1,"Exported_type_alias_0_has_or_is_using_private_name_1_4081","Exported type alias '{0}' has or is using private name '{1}'."),Default_export_of_the_module_has_or_is_using_private_name_0:M(4082,1,"Default_export_of_the_module_has_or_is_using_private_name_0_4082","Default export of the module has or is using private name '{0}'."),Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1:M(4083,1,"Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083","Type parameter '{0}' of exported type alias has or is using private name '{1}'."),Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2:M(4084,1,"Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084","Exported type alias '{0}' has or is using private name '{1}' from module {2}."),Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1:M(4085,1,"Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1_4085","Extends clause for inferred type '{0}' has or is using private name '{1}'."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:M(4091,1,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091","Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1:M(4092,1,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092","Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."),Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected:M(4094,1,"Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected_4094","Property '{0}' of exported anonymous class type may not be private or protected."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4095,1,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095","Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:M(4096,1,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096","Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_method_0_of_exported_class_has_or_is_using_private_name_1:M(4097,1,"Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097","Public static method '{0}' of exported class has or is using private name '{1}'."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4098,1,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098","Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:M(4099,1,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099","Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_method_0_of_exported_class_has_or_is_using_private_name_1:M(4100,1,"Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100","Public method '{0}' of exported class has or is using private name '{1}'."),Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:M(4101,1,"Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101","Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Method_0_of_exported_interface_has_or_is_using_private_name_1:M(4102,1,"Method_0_of_exported_interface_has_or_is_using_private_name_1_4102","Method '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1:M(4103,1,"Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103","Type parameter '{0}' of exported mapped object type is using private name '{1}'."),The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1:M(4104,1,"The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104","The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'."),Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter:M(4105,1,"Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105","Private or protected member '{0}' cannot be accessed on a type parameter."),Parameter_0_of_accessor_has_or_is_using_private_name_1:M(4106,1,"Parameter_0_of_accessor_has_or_is_using_private_name_1_4106","Parameter '{0}' of accessor has or is using private name '{1}'."),Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2:M(4107,1,"Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107","Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."),Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:M(4108,1,"Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108","Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."),Type_arguments_for_0_circularly_reference_themselves:M(4109,1,"Type_arguments_for_0_circularly_reference_themselves_4109","Type arguments for '{0}' circularly reference themselves."),Tuple_type_arguments_circularly_reference_themselves:M(4110,1,"Tuple_type_arguments_circularly_reference_themselves_4110","Tuple type arguments circularly reference themselves."),Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0:M(4111,1,"Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111","Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."),This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class:M(4112,1,"This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112","This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."),This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0:M(4113,1,"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113","This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."),This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0:M(4114,1,"This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114","This member must have an 'override' modifier because it overrides a member in the base class '{0}'."),This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0:M(4115,1,"This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115","This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."),This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0:M(4116,1,"This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116","This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."),This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:M(4117,1,"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117","This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"),The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized:M(4118,1,"The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118","The type of this node cannot be serialized because its property '{0}' cannot be serialized."),This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:M(4119,1,"This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119","This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:M(4120,1,"This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120","This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class:M(4121,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121","This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0:M(4122,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122","This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:M(4123,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123","This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next:M(4124,1,"Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124","Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given:M(4125,1,"Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125","Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."),One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value:M(4126,1,"One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126","One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."),The_current_host_does_not_support_the_0_option:M(5001,1,"The_current_host_does_not_support_the_0_option_5001","The current host does not support the '{0}' option."),Cannot_find_the_common_subdirectory_path_for_the_input_files:M(5009,1,"Cannot_find_the_common_subdirectory_path_for_the_input_files_5009","Cannot find the common subdirectory path for the input files."),File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:M(5010,1,"File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010","File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),Cannot_read_file_0_Colon_1:M(5012,1,"Cannot_read_file_0_Colon_1_5012","Cannot read file '{0}': {1}."),Unknown_compiler_option_0:M(5023,1,"Unknown_compiler_option_0_5023","Unknown compiler option '{0}'."),Compiler_option_0_requires_a_value_of_type_1:M(5024,1,"Compiler_option_0_requires_a_value_of_type_1_5024","Compiler option '{0}' requires a value of type {1}."),Unknown_compiler_option_0_Did_you_mean_1:M(5025,1,"Unknown_compiler_option_0_Did_you_mean_1_5025","Unknown compiler option '{0}'. Did you mean '{1}'?"),Could_not_write_file_0_Colon_1:M(5033,1,"Could_not_write_file_0_Colon_1_5033","Could not write file '{0}': {1}."),Option_project_cannot_be_mixed_with_source_files_on_a_command_line:M(5042,1,"Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042","Option 'project' cannot be mixed with source files on a command line."),Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher:M(5047,1,"Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047","Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."),Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided:M(5051,1,"Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051","Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."),Option_0_cannot_be_specified_without_specifying_option_1:M(5052,1,"Option_0_cannot_be_specified_without_specifying_option_1_5052","Option '{0}' cannot be specified without specifying option '{1}'."),Option_0_cannot_be_specified_with_option_1:M(5053,1,"Option_0_cannot_be_specified_with_option_1_5053","Option '{0}' cannot be specified with option '{1}'."),A_tsconfig_json_file_is_already_defined_at_Colon_0:M(5054,1,"A_tsconfig_json_file_is_already_defined_at_Colon_0_5054","A 'tsconfig.json' file is already defined at: '{0}'."),Cannot_write_file_0_because_it_would_overwrite_input_file:M(5055,1,"Cannot_write_file_0_because_it_would_overwrite_input_file_5055","Cannot write file '{0}' because it would overwrite input file."),Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files:M(5056,1,"Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056","Cannot write file '{0}' because it would be overwritten by multiple input files."),Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0:M(5057,1,"Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057","Cannot find a tsconfig.json file at the specified directory: '{0}'."),The_specified_path_does_not_exist_Colon_0:M(5058,1,"The_specified_path_does_not_exist_Colon_0_5058","The specified path does not exist: '{0}'."),Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier:M(5059,1,"Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059","Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."),Pattern_0_can_have_at_most_one_Asterisk_character:M(5061,1,"Pattern_0_can_have_at_most_one_Asterisk_character_5061","Pattern '{0}' can have at most one '*' character."),Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character:M(5062,1,"Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062","Substitution '{0}' in pattern '{1}' can have at most one '*' character."),Substitutions_for_pattern_0_should_be_an_array:M(5063,1,"Substitutions_for_pattern_0_should_be_an_array_5063","Substitutions for pattern '{0}' should be an array."),Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2:M(5064,1,"Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064","Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."),File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:M(5065,1,"File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065","File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."),Substitutions_for_pattern_0_shouldn_t_be_an_empty_array:M(5066,1,"Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066","Substitutions for pattern '{0}' shouldn't be an empty array."),Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name:M(5067,1,"Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067","Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."),Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig:M(5068,1,"Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068","Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."),Option_0_cannot_be_specified_without_specifying_option_1_or_option_2:M(5069,1,"Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069","Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."),Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic:M(5070,1,"Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic_5070","Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'."),Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd:M(5071,1,"Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd_5071","Option '--resolveJsonModule' cannot be specified when 'module' is set to 'none', 'system', or 'umd'."),Unknown_build_option_0:M(5072,1,"Unknown_build_option_0_5072","Unknown build option '{0}'."),Build_option_0_requires_a_value_of_type_1:M(5073,1,"Build_option_0_requires_a_value_of_type_1_5073","Build option '{0}' requires a value of type {1}."),Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified:M(5074,1,"Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074","Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified."),_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2:M(5075,1,"_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075","'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."),_0_and_1_operations_cannot_be_mixed_without_parentheses:M(5076,1,"_0_and_1_operations_cannot_be_mixed_without_parentheses_5076","'{0}' and '{1}' operations cannot be mixed without parentheses."),Unknown_build_option_0_Did_you_mean_1:M(5077,1,"Unknown_build_option_0_Did_you_mean_1_5077","Unknown build option '{0}'. Did you mean '{1}'?"),Unknown_watch_option_0:M(5078,1,"Unknown_watch_option_0_5078","Unknown watch option '{0}'."),Unknown_watch_option_0_Did_you_mean_1:M(5079,1,"Unknown_watch_option_0_Did_you_mean_1_5079","Unknown watch option '{0}'. Did you mean '{1}'?"),Watch_option_0_requires_a_value_of_type_1:M(5080,1,"Watch_option_0_requires_a_value_of_type_1_5080","Watch option '{0}' requires a value of type {1}."),Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0:M(5081,1,"Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081","Cannot find a tsconfig.json file at the current directory: {0}."),_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1:M(5082,1,"_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082","'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."),Cannot_read_file_0:M(5083,1,"Cannot_read_file_0_5083","Cannot read file '{0}'."),A_tuple_member_cannot_be_both_optional_and_rest:M(5085,1,"A_tuple_member_cannot_be_both_optional_and_rest_5085","A tuple member cannot be both optional and rest."),A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type:M(5086,1,"A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086","A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."),A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type:M(5087,1,"A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087","A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."),The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary:M(5088,1,"The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088","The inferred type of '{0}' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary."),Option_0_cannot_be_specified_when_option_jsx_is_1:M(5089,1,"Option_0_cannot_be_specified_when_option_jsx_is_1_5089","Option '{0}' cannot be specified when option 'jsx' is '{1}'."),Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash:M(5090,1,"Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash_5090","Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?"),Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled:M(5091,1,"Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled_5091","Option 'preserveConstEnums' cannot be disabled when '{0}' is enabled."),The_root_value_of_a_0_file_must_be_an_object:M(5092,1,"The_root_value_of_a_0_file_must_be_an_object_5092","The root value of a '{0}' file must be an object."),Compiler_option_0_may_only_be_used_with_build:M(5093,1,"Compiler_option_0_may_only_be_used_with_build_5093","Compiler option '--{0}' may only be used with '--build'."),Compiler_option_0_may_not_be_used_with_build:M(5094,1,"Compiler_option_0_may_not_be_used_with_build_5094","Compiler option '--{0}' may not be used with '--build'."),Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later:M(5095,1,"Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later_5095","Option '{0}' can only be used when 'module' is set to 'preserve' or to 'es2015' or later."),Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set:M(5096,1,"Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096","Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."),An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled:M(5097,1,"An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097","An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."),Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler:M(5098,1,"Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098","Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."),Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error:M(5101,1,"Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101",`Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`),Option_0_has_been_removed_Please_remove_it_from_your_configuration:M(5102,1,"Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102","Option '{0}' has been removed. Please remove it from your configuration."),Invalid_value_for_ignoreDeprecations:M(5103,1,"Invalid_value_for_ignoreDeprecations_5103","Invalid value for '--ignoreDeprecations'."),Option_0_is_redundant_and_cannot_be_specified_with_option_1:M(5104,1,"Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104","Option '{0}' is redundant and cannot be specified with option '{1}'."),Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System:M(5105,1,"Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105","Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."),Use_0_instead:M(5106,3,"Use_0_instead_5106","Use '{0}' instead."),Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error:M(5107,1,"Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107",`Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`),Option_0_1_has_been_removed_Please_remove_it_from_your_configuration:M(5108,1,"Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108","Option '{0}={1}' has been removed. Please remove it from your configuration."),Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1:M(5109,1,"Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109","Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."),Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1:M(5110,1,"Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110","Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."),Generates_a_sourcemap_for_each_corresponding_d_ts_file:M(6e3,3,"Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000","Generates a sourcemap for each corresponding '.d.ts' file."),Concatenate_and_emit_output_to_single_file:M(6001,3,"Concatenate_and_emit_output_to_single_file_6001","Concatenate and emit output to single file."),Generates_corresponding_d_ts_file:M(6002,3,"Generates_corresponding_d_ts_file_6002","Generates corresponding '.d.ts' file."),Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations:M(6004,3,"Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004","Specify the location where debugger should locate TypeScript files instead of source locations."),Watch_input_files:M(6005,3,"Watch_input_files_6005","Watch input files."),Redirect_output_structure_to_the_directory:M(6006,3,"Redirect_output_structure_to_the_directory_6006","Redirect output structure to the directory."),Do_not_erase_const_enum_declarations_in_generated_code:M(6007,3,"Do_not_erase_const_enum_declarations_in_generated_code_6007","Do not erase const enum declarations in generated code."),Do_not_emit_outputs_if_any_errors_were_reported:M(6008,3,"Do_not_emit_outputs_if_any_errors_were_reported_6008","Do not emit outputs if any errors were reported."),Do_not_emit_comments_to_output:M(6009,3,"Do_not_emit_comments_to_output_6009","Do not emit comments to output."),Do_not_emit_outputs:M(6010,3,"Do_not_emit_outputs_6010","Do not emit outputs."),Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking:M(6011,3,"Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011","Allow default imports from modules with no default export. This does not affect code emit, just typechecking."),Skip_type_checking_of_declaration_files:M(6012,3,"Skip_type_checking_of_declaration_files_6012","Skip type checking of declaration files."),Do_not_resolve_the_real_path_of_symlinks:M(6013,3,"Do_not_resolve_the_real_path_of_symlinks_6013","Do not resolve the real path of symlinks."),Only_emit_d_ts_declaration_files:M(6014,3,"Only_emit_d_ts_declaration_files_6014","Only emit '.d.ts' declaration files."),Specify_ECMAScript_target_version:M(6015,3,"Specify_ECMAScript_target_version_6015","Specify ECMAScript target version."),Specify_module_code_generation:M(6016,3,"Specify_module_code_generation_6016","Specify module code generation."),Print_this_message:M(6017,3,"Print_this_message_6017","Print this message."),Print_the_compiler_s_version:M(6019,3,"Print_the_compiler_s_version_6019","Print the compiler's version."),Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json:M(6020,3,"Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020","Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."),Syntax_Colon_0:M(6023,3,"Syntax_Colon_0_6023","Syntax: {0}"),options:M(6024,3,"options_6024","options"),file:M(6025,3,"file_6025","file"),Examples_Colon_0:M(6026,3,"Examples_Colon_0_6026","Examples: {0}"),Options_Colon:M(6027,3,"Options_Colon_6027","Options:"),Version_0:M(6029,3,"Version_0_6029","Version {0}"),Insert_command_line_options_and_files_from_a_file:M(6030,3,"Insert_command_line_options_and_files_from_a_file_6030","Insert command line options and files from a file."),Starting_compilation_in_watch_mode:M(6031,3,"Starting_compilation_in_watch_mode_6031","Starting compilation in watch mode..."),File_change_detected_Starting_incremental_compilation:M(6032,3,"File_change_detected_Starting_incremental_compilation_6032","File change detected. Starting incremental compilation..."),KIND:M(6034,3,"KIND_6034","KIND"),FILE:M(6035,3,"FILE_6035","FILE"),VERSION:M(6036,3,"VERSION_6036","VERSION"),LOCATION:M(6037,3,"LOCATION_6037","LOCATION"),DIRECTORY:M(6038,3,"DIRECTORY_6038","DIRECTORY"),STRATEGY:M(6039,3,"STRATEGY_6039","STRATEGY"),FILE_OR_DIRECTORY:M(6040,3,"FILE_OR_DIRECTORY_6040","FILE OR DIRECTORY"),Errors_Files:M(6041,3,"Errors_Files_6041","Errors Files"),Generates_corresponding_map_file:M(6043,3,"Generates_corresponding_map_file_6043","Generates corresponding '.map' file."),Compiler_option_0_expects_an_argument:M(6044,1,"Compiler_option_0_expects_an_argument_6044","Compiler option '{0}' expects an argument."),Unterminated_quoted_string_in_response_file_0:M(6045,1,"Unterminated_quoted_string_in_response_file_0_6045","Unterminated quoted string in response file '{0}'."),Argument_for_0_option_must_be_Colon_1:M(6046,1,"Argument_for_0_option_must_be_Colon_1_6046","Argument for '{0}' option must be: {1}."),Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1:M(6048,1,"Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048","Locale must be of the form <language> or <language>-<territory>. For example '{0}' or '{1}'."),Unable_to_open_file_0:M(6050,1,"Unable_to_open_file_0_6050","Unable to open file '{0}'."),Corrupted_locale_file_0:M(6051,1,"Corrupted_locale_file_0_6051","Corrupted locale file {0}."),Raise_error_on_expressions_and_declarations_with_an_implied_any_type:M(6052,3,"Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052","Raise error on expressions and declarations with an implied 'any' type."),File_0_not_found:M(6053,1,"File_0_not_found_6053","File '{0}' not found."),File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1:M(6054,1,"File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054","File '{0}' has an unsupported extension. The only supported extensions are {1}."),Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures:M(6055,3,"Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055","Suppress noImplicitAny errors for indexing objects lacking index signatures."),Do_not_emit_declarations_for_code_that_has_an_internal_annotation:M(6056,3,"Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056","Do not emit declarations for code that has an '@internal' annotation."),Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir:M(6058,3,"Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058","Specify the root directory of input files. Use to control the output directory structure with --outDir."),File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files:M(6059,1,"File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059","File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."),Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix:M(6060,3,"Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060","Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."),NEWLINE:M(6061,3,"NEWLINE_6061","NEWLINE"),Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line:M(6064,1,"Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064","Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."),Enables_experimental_support_for_ES7_decorators:M(6065,3,"Enables_experimental_support_for_ES7_decorators_6065","Enables experimental support for ES7 decorators."),Enables_experimental_support_for_emitting_type_metadata_for_decorators:M(6066,3,"Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066","Enables experimental support for emitting type metadata for decorators."),Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file:M(6070,3,"Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070","Initializes a TypeScript project and creates a tsconfig.json file."),Successfully_created_a_tsconfig_json_file:M(6071,3,"Successfully_created_a_tsconfig_json_file_6071","Successfully created a tsconfig.json file."),Suppress_excess_property_checks_for_object_literals:M(6072,3,"Suppress_excess_property_checks_for_object_literals_6072","Suppress excess property checks for object literals."),Stylize_errors_and_messages_using_color_and_context_experimental:M(6073,3,"Stylize_errors_and_messages_using_color_and_context_experimental_6073","Stylize errors and messages using color and context (experimental)."),Do_not_report_errors_on_unused_labels:M(6074,3,"Do_not_report_errors_on_unused_labels_6074","Do not report errors on unused labels."),Report_error_when_not_all_code_paths_in_function_return_a_value:M(6075,3,"Report_error_when_not_all_code_paths_in_function_return_a_value_6075","Report error when not all code paths in function return a value."),Report_errors_for_fallthrough_cases_in_switch_statement:M(6076,3,"Report_errors_for_fallthrough_cases_in_switch_statement_6076","Report errors for fallthrough cases in switch statement."),Do_not_report_errors_on_unreachable_code:M(6077,3,"Do_not_report_errors_on_unreachable_code_6077","Do not report errors on unreachable code."),Disallow_inconsistently_cased_references_to_the_same_file:M(6078,3,"Disallow_inconsistently_cased_references_to_the_same_file_6078","Disallow inconsistently-cased references to the same file."),Specify_library_files_to_be_included_in_the_compilation:M(6079,3,"Specify_library_files_to_be_included_in_the_compilation_6079","Specify library files to be included in the compilation."),Specify_JSX_code_generation:M(6080,3,"Specify_JSX_code_generation_6080","Specify JSX code generation."),Only_amd_and_system_modules_are_supported_alongside_0:M(6082,1,"Only_amd_and_system_modules_are_supported_alongside_0_6082","Only 'amd' and 'system' modules are supported alongside --{0}."),Base_directory_to_resolve_non_absolute_module_names:M(6083,3,"Base_directory_to_resolve_non_absolute_module_names_6083","Base directory to resolve non-absolute module names."),Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit:M(6084,3,"Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084","[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"),Enable_tracing_of_the_name_resolution_process:M(6085,3,"Enable_tracing_of_the_name_resolution_process_6085","Enable tracing of the name resolution process."),Resolving_module_0_from_1:M(6086,3,"Resolving_module_0_from_1_6086","======== Resolving module '{0}' from '{1}'. ========"),Explicitly_specified_module_resolution_kind_Colon_0:M(6087,3,"Explicitly_specified_module_resolution_kind_Colon_0_6087","Explicitly specified module resolution kind: '{0}'."),Module_resolution_kind_is_not_specified_using_0:M(6088,3,"Module_resolution_kind_is_not_specified_using_0_6088","Module resolution kind is not specified, using '{0}'."),Module_name_0_was_successfully_resolved_to_1:M(6089,3,"Module_name_0_was_successfully_resolved_to_1_6089","======== Module name '{0}' was successfully resolved to '{1}'. ========"),Module_name_0_was_not_resolved:M(6090,3,"Module_name_0_was_not_resolved_6090","======== Module name '{0}' was not resolved. ========"),paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0:M(6091,3,"paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091","'paths' option is specified, looking for a pattern to match module name '{0}'."),Module_name_0_matched_pattern_1:M(6092,3,"Module_name_0_matched_pattern_1_6092","Module name '{0}', matched pattern '{1}'."),Trying_substitution_0_candidate_module_location_Colon_1:M(6093,3,"Trying_substitution_0_candidate_module_location_Colon_1_6093","Trying substitution '{0}', candidate module location: '{1}'."),Resolving_module_name_0_relative_to_base_url_1_2:M(6094,3,"Resolving_module_name_0_relative_to_base_url_1_2_6094","Resolving module name '{0}' relative to base url '{1}' - '{2}'."),Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1:M(6095,3,"Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095","Loading module as file / folder, candidate module location '{0}', target file types: {1}."),File_0_does_not_exist:M(6096,3,"File_0_does_not_exist_6096","File '{0}' does not exist."),File_0_exists_use_it_as_a_name_resolution_result:M(6097,3,"File_0_exists_use_it_as_a_name_resolution_result_6097","File '{0}' exists - use it as a name resolution result."),Loading_module_0_from_node_modules_folder_target_file_types_Colon_1:M(6098,3,"Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098","Loading module '{0}' from 'node_modules' folder, target file types: {1}."),Found_package_json_at_0:M(6099,3,"Found_package_json_at_0_6099","Found 'package.json' at '{0}'."),package_json_does_not_have_a_0_field:M(6100,3,"package_json_does_not_have_a_0_field_6100","'package.json' does not have a '{0}' field."),package_json_has_0_field_1_that_references_2:M(6101,3,"package_json_has_0_field_1_that_references_2_6101","'package.json' has '{0}' field '{1}' that references '{2}'."),Allow_javascript_files_to_be_compiled:M(6102,3,"Allow_javascript_files_to_be_compiled_6102","Allow javascript files to be compiled."),Checking_if_0_is_the_longest_matching_prefix_for_1_2:M(6104,3,"Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104","Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."),Expected_type_of_0_field_in_package_json_to_be_1_got_2:M(6105,3,"Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105","Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'."),baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1:M(6106,3,"baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106","'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."),rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0:M(6107,3,"rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107","'rootDirs' option is set, using it to resolve relative module name '{0}'."),Longest_matching_prefix_for_0_is_1:M(6108,3,"Longest_matching_prefix_for_0_is_1_6108","Longest matching prefix for '{0}' is '{1}'."),Loading_0_from_the_root_dir_1_candidate_location_2:M(6109,3,"Loading_0_from_the_root_dir_1_candidate_location_2_6109","Loading '{0}' from the root dir '{1}', candidate location '{2}'."),Trying_other_entries_in_rootDirs:M(6110,3,"Trying_other_entries_in_rootDirs_6110","Trying other entries in 'rootDirs'."),Module_resolution_using_rootDirs_has_failed:M(6111,3,"Module_resolution_using_rootDirs_has_failed_6111","Module resolution using 'rootDirs' has failed."),Do_not_emit_use_strict_directives_in_module_output:M(6112,3,"Do_not_emit_use_strict_directives_in_module_output_6112","Do not emit 'use strict' directives in module output."),Enable_strict_null_checks:M(6113,3,"Enable_strict_null_checks_6113","Enable strict null checks."),Unknown_option_excludes_Did_you_mean_exclude:M(6114,1,"Unknown_option_excludes_Did_you_mean_exclude_6114","Unknown option 'excludes'. Did you mean 'exclude'?"),Raise_error_on_this_expressions_with_an_implied_any_type:M(6115,3,"Raise_error_on_this_expressions_with_an_implied_any_type_6115","Raise error on 'this' expressions with an implied 'any' type."),Resolving_type_reference_directive_0_containing_file_1_root_directory_2:M(6116,3,"Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116","======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"),Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2:M(6119,3,"Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119","======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"),Type_reference_directive_0_was_not_resolved:M(6120,3,"Type_reference_directive_0_was_not_resolved_6120","======== Type reference directive '{0}' was not resolved. ========"),Resolving_with_primary_search_path_0:M(6121,3,"Resolving_with_primary_search_path_0_6121","Resolving with primary search path '{0}'."),Root_directory_cannot_be_determined_skipping_primary_search_paths:M(6122,3,"Root_directory_cannot_be_determined_skipping_primary_search_paths_6122","Root directory cannot be determined, skipping primary search paths."),Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set:M(6123,3,"Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123","======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"),Type_declaration_files_to_be_included_in_compilation:M(6124,3,"Type_declaration_files_to_be_included_in_compilation_6124","Type declaration files to be included in compilation."),Looking_up_in_node_modules_folder_initial_location_0:M(6125,3,"Looking_up_in_node_modules_folder_initial_location_0_6125","Looking up in 'node_modules' folder, initial location '{0}'."),Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder:M(6126,3,"Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126","Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1:M(6127,3,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127","======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set:M(6128,3,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128","======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"),Resolving_real_path_for_0_result_1:M(6130,3,"Resolving_real_path_for_0_result_1_6130","Resolving real path for '{0}', result '{1}'."),Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system:M(6131,1,"Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131","Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."),File_name_0_has_a_1_extension_stripping_it:M(6132,3,"File_name_0_has_a_1_extension_stripping_it_6132","File name '{0}' has a '{1}' extension - stripping it."),_0_is_declared_but_its_value_is_never_read:M(6133,1,"_0_is_declared_but_its_value_is_never_read_6133","'{0}' is declared but its value is never read.",!0),Report_errors_on_unused_locals:M(6134,3,"Report_errors_on_unused_locals_6134","Report errors on unused locals."),Report_errors_on_unused_parameters:M(6135,3,"Report_errors_on_unused_parameters_6135","Report errors on unused parameters."),The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files:M(6136,3,"The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136","The maximum dependency depth to search under node_modules and load JavaScript files."),Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1:M(6137,1,"Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137","Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."),Property_0_is_declared_but_its_value_is_never_read:M(6138,1,"Property_0_is_declared_but_its_value_is_never_read_6138","Property '{0}' is declared but its value is never read.",!0),Import_emit_helpers_from_tslib:M(6139,3,"Import_emit_helpers_from_tslib_6139","Import emit helpers from 'tslib'."),Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2:M(6140,1,"Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140","Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."),Parse_in_strict_mode_and_emit_use_strict_for_each_source_file:M(6141,3,"Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141",'Parse in strict mode and emit "use strict" for each source file.'),Module_0_was_resolved_to_1_but_jsx_is_not_set:M(6142,1,"Module_0_was_resolved_to_1_but_jsx_is_not_set_6142","Module '{0}' was resolved to '{1}', but '--jsx' is not set."),Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1:M(6144,3,"Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144","Module '{0}' was resolved as locally declared ambient module in file '{1}'."),Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h:M(6146,3,"Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146","Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."),Resolution_for_module_0_was_found_in_cache_from_location_1:M(6147,3,"Resolution_for_module_0_was_found_in_cache_from_location_1_6147","Resolution for module '{0}' was found in cache from location '{1}'."),Directory_0_does_not_exist_skipping_all_lookups_in_it:M(6148,3,"Directory_0_does_not_exist_skipping_all_lookups_in_it_6148","Directory '{0}' does not exist, skipping all lookups in it."),Show_diagnostic_information:M(6149,3,"Show_diagnostic_information_6149","Show diagnostic information."),Show_verbose_diagnostic_information:M(6150,3,"Show_verbose_diagnostic_information_6150","Show verbose diagnostic information."),Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file:M(6151,3,"Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151","Emit a single file with source maps instead of having a separate file."),Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set:M(6152,3,"Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152","Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."),Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule:M(6153,3,"Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153","Transpile each file as a separate module (similar to 'ts.transpileModule')."),Print_names_of_generated_files_part_of_the_compilation:M(6154,3,"Print_names_of_generated_files_part_of_the_compilation_6154","Print names of generated files part of the compilation."),Print_names_of_files_part_of_the_compilation:M(6155,3,"Print_names_of_files_part_of_the_compilation_6155","Print names of files part of the compilation."),The_locale_used_when_displaying_messages_to_the_user_e_g_en_us:M(6156,3,"The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156","The locale used when displaying messages to the user (e.g. 'en-us')"),Do_not_generate_custom_helper_functions_like_extends_in_compiled_output:M(6157,3,"Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157","Do not generate custom helper functions like '__extends' in compiled output."),Do_not_include_the_default_library_file_lib_d_ts:M(6158,3,"Do_not_include_the_default_library_file_lib_d_ts_6158","Do not include the default library file (lib.d.ts)."),Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files:M(6159,3,"Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159","Do not add triple-slash references or imported modules to the list of compiled files."),Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files:M(6160,3,"Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160","[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."),List_of_folders_to_include_type_definitions_from:M(6161,3,"List_of_folders_to_include_type_definitions_from_6161","List of folders to include type definitions from."),Disable_size_limitations_on_JavaScript_projects:M(6162,3,"Disable_size_limitations_on_JavaScript_projects_6162","Disable size limitations on JavaScript projects."),The_character_set_of_the_input_files:M(6163,3,"The_character_set_of_the_input_files_6163","The character set of the input files."),Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1:M(6164,3,"Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1_6164","Skipping module '{0}' that looks like an absolute URI, target file types: {1}."),Do_not_truncate_error_messages:M(6165,3,"Do_not_truncate_error_messages_6165","Do not truncate error messages."),Output_directory_for_generated_declaration_files:M(6166,3,"Output_directory_for_generated_declaration_files_6166","Output directory for generated declaration files."),A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl:M(6167,3,"A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167","A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."),List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime:M(6168,3,"List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168","List of root folders whose combined content represents the structure of the project at runtime."),Show_all_compiler_options:M(6169,3,"Show_all_compiler_options_6169","Show all compiler options."),Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file:M(6170,3,"Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170","[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"),Command_line_Options:M(6171,3,"Command_line_Options_6171","Command-line Options"),Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5:M(6179,3,"Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_6179","Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5'."),Enable_all_strict_type_checking_options:M(6180,3,"Enable_all_strict_type_checking_options_6180","Enable all strict type-checking options."),Scoped_package_detected_looking_in_0:M(6182,3,"Scoped_package_detected_looking_in_0_6182","Scoped package detected, looking in '{0}'"),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:M(6183,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:M(6184,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Enable_strict_checking_of_function_types:M(6186,3,"Enable_strict_checking_of_function_types_6186","Enable strict checking of function types."),Enable_strict_checking_of_property_initialization_in_classes:M(6187,3,"Enable_strict_checking_of_property_initialization_in_classes_6187","Enable strict checking of property initialization in classes."),Numeric_separators_are_not_allowed_here:M(6188,1,"Numeric_separators_are_not_allowed_here_6188","Numeric separators are not allowed here."),Multiple_consecutive_numeric_separators_are_not_permitted:M(6189,1,"Multiple_consecutive_numeric_separators_are_not_permitted_6189","Multiple consecutive numeric separators are not permitted."),Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen:M(6191,3,"Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191","Whether to keep outdated console output in watch mode instead of clearing the screen."),All_imports_in_import_declaration_are_unused:M(6192,1,"All_imports_in_import_declaration_are_unused_6192","All imports in import declaration are unused.",!0),Found_1_error_Watching_for_file_changes:M(6193,3,"Found_1_error_Watching_for_file_changes_6193","Found 1 error. Watching for file changes."),Found_0_errors_Watching_for_file_changes:M(6194,3,"Found_0_errors_Watching_for_file_changes_6194","Found {0} errors. Watching for file changes."),Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols:M(6195,3,"Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195","Resolve 'keyof' to string valued property names only (no numbers or symbols)."),_0_is_declared_but_never_used:M(6196,1,"_0_is_declared_but_never_used_6196","'{0}' is declared but never used.",!0),Include_modules_imported_with_json_extension:M(6197,3,"Include_modules_imported_with_json_extension_6197","Include modules imported with '.json' extension"),All_destructured_elements_are_unused:M(6198,1,"All_destructured_elements_are_unused_6198","All destructured elements are unused.",!0),All_variables_are_unused:M(6199,1,"All_variables_are_unused_6199","All variables are unused.",!0),Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0:M(6200,1,"Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200","Definitions of the following identifiers conflict with those in another file: {0}"),Conflicts_are_in_this_file:M(6201,3,"Conflicts_are_in_this_file_6201","Conflicts are in this file."),Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0:M(6202,1,"Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202","Project references may not form a circular graph. Cycle detected: {0}"),_0_was_also_declared_here:M(6203,3,"_0_was_also_declared_here_6203","'{0}' was also declared here."),and_here:M(6204,3,"and_here_6204","and here."),All_type_parameters_are_unused:M(6205,1,"All_type_parameters_are_unused_6205","All type parameters are unused."),package_json_has_a_typesVersions_field_with_version_specific_path_mappings:M(6206,3,"package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206","'package.json' has a 'typesVersions' field with version-specific path mappings."),package_json_does_not_have_a_typesVersions_entry_that_matches_version_0:M(6207,3,"package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207","'package.json' does not have a 'typesVersions' entry that matches version '{0}'."),package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2:M(6208,3,"package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208","'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'."),package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range:M(6209,3,"package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209","'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range."),An_argument_for_0_was_not_provided:M(6210,3,"An_argument_for_0_was_not_provided_6210","An argument for '{0}' was not provided."),An_argument_matching_this_binding_pattern_was_not_provided:M(6211,3,"An_argument_matching_this_binding_pattern_was_not_provided_6211","An argument matching this binding pattern was not provided."),Did_you_mean_to_call_this_expression:M(6212,3,"Did_you_mean_to_call_this_expression_6212","Did you mean to call this expression?"),Did_you_mean_to_use_new_with_this_expression:M(6213,3,"Did_you_mean_to_use_new_with_this_expression_6213","Did you mean to use 'new' with this expression?"),Enable_strict_bind_call_and_apply_methods_on_functions:M(6214,3,"Enable_strict_bind_call_and_apply_methods_on_functions_6214","Enable strict 'bind', 'call', and 'apply' methods on functions."),Using_compiler_options_of_project_reference_redirect_0:M(6215,3,"Using_compiler_options_of_project_reference_redirect_0_6215","Using compiler options of project reference redirect '{0}'."),Found_1_error:M(6216,3,"Found_1_error_6216","Found 1 error."),Found_0_errors:M(6217,3,"Found_0_errors_6217","Found {0} errors."),Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2:M(6218,3,"Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218","======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========"),Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3:M(6219,3,"Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219","======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========"),package_json_had_a_falsy_0_field:M(6220,3,"package_json_had_a_falsy_0_field_6220","'package.json' had a falsy '{0}' field."),Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects:M(6221,3,"Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221","Disable use of source files instead of declaration files from referenced projects."),Emit_class_fields_with_Define_instead_of_Set:M(6222,3,"Emit_class_fields_with_Define_instead_of_Set_6222","Emit class fields with Define instead of Set."),Generates_a_CPU_profile:M(6223,3,"Generates_a_CPU_profile_6223","Generates a CPU profile."),Disable_solution_searching_for_this_project:M(6224,3,"Disable_solution_searching_for_this_project_6224","Disable solution searching for this project."),Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory:M(6225,3,"Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225","Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."),Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling:M(6226,3,"Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226","Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling'."),Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize:M(6227,3,"Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227","Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority', 'FixedChunkSize'."),Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3:M(6229,1,"Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229","Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."),Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line:M(6230,1,"Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230","Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."),Could_not_resolve_the_path_0_with_the_extensions_Colon_1:M(6231,1,"Could_not_resolve_the_path_0_with_the_extensions_Colon_1_6231","Could not resolve the path '{0}' with the extensions: {1}."),Declaration_augments_declaration_in_another_file_This_cannot_be_serialized:M(6232,1,"Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232","Declaration augments declaration in another file. This cannot be serialized."),This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file:M(6233,1,"This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233","This is the declaration being augmented. Consider moving the augmenting declaration into the same file."),This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without:M(6234,1,"This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without_6234","This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?"),Disable_loading_referenced_projects:M(6235,3,"Disable_loading_referenced_projects_6235","Disable loading referenced projects."),Arguments_for_the_rest_parameter_0_were_not_provided:M(6236,1,"Arguments_for_the_rest_parameter_0_were_not_provided_6236","Arguments for the rest parameter '{0}' were not provided."),Generates_an_event_trace_and_a_list_of_types:M(6237,3,"Generates_an_event_trace_and_a_list_of_types_6237","Generates an event trace and a list of types."),Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react:M(6238,1,"Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react_6238","Specify the module specifier to be used to import the 'jsx' and 'jsxs' factory functions from. eg, react"),File_0_exists_according_to_earlier_cached_lookups:M(6239,3,"File_0_exists_according_to_earlier_cached_lookups_6239","File '{0}' exists according to earlier cached lookups."),File_0_does_not_exist_according_to_earlier_cached_lookups:M(6240,3,"File_0_does_not_exist_according_to_earlier_cached_lookups_6240","File '{0}' does not exist according to earlier cached lookups."),Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1:M(6241,3,"Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241","Resolution for type reference directive '{0}' was found in cache from location '{1}'."),Resolving_type_reference_directive_0_containing_file_1:M(6242,3,"Resolving_type_reference_directive_0_containing_file_1_6242","======== Resolving type reference directive '{0}', containing file '{1}'. ========"),Interpret_optional_property_types_as_written_rather_than_adding_undefined:M(6243,3,"Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243","Interpret optional property types as written, rather than adding 'undefined'."),Modules:M(6244,3,"Modules_6244","Modules"),File_Management:M(6245,3,"File_Management_6245","File Management"),Emit:M(6246,3,"Emit_6246","Emit"),JavaScript_Support:M(6247,3,"JavaScript_Support_6247","JavaScript Support"),Type_Checking:M(6248,3,"Type_Checking_6248","Type Checking"),Editor_Support:M(6249,3,"Editor_Support_6249","Editor Support"),Watch_and_Build_Modes:M(6250,3,"Watch_and_Build_Modes_6250","Watch and Build Modes"),Compiler_Diagnostics:M(6251,3,"Compiler_Diagnostics_6251","Compiler Diagnostics"),Interop_Constraints:M(6252,3,"Interop_Constraints_6252","Interop Constraints"),Backwards_Compatibility:M(6253,3,"Backwards_Compatibility_6253","Backwards Compatibility"),Language_and_Environment:M(6254,3,"Language_and_Environment_6254","Language and Environment"),Projects:M(6255,3,"Projects_6255","Projects"),Output_Formatting:M(6256,3,"Output_Formatting_6256","Output Formatting"),Completeness:M(6257,3,"Completeness_6257","Completeness"),_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file:M(6258,1,"_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258","'{0}' should be set inside the 'compilerOptions' object of the config json file"),Found_1_error_in_0:M(6259,3,"Found_1_error_in_0_6259","Found 1 error in {0}"),Found_0_errors_in_the_same_file_starting_at_Colon_1:M(6260,3,"Found_0_errors_in_the_same_file_starting_at_Colon_1_6260","Found {0} errors in the same file, starting at: {1}"),Found_0_errors_in_1_files:M(6261,3,"Found_0_errors_in_1_files_6261","Found {0} errors in {1} files."),File_name_0_has_a_1_extension_looking_up_2_instead:M(6262,3,"File_name_0_has_a_1_extension_looking_up_2_instead_6262","File name '{0}' has a '{1}' extension - looking up '{2}' instead."),Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set:M(6263,1,"Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set_6263","Module '{0}' was resolved to '{1}', but '--allowArbitraryExtensions' is not set."),Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present:M(6264,3,"Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present_6264","Enable importing files with any extension, provided a declaration file is present."),Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder:M(6265,3,"Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_no_6265","Resolving type reference directive for program that specifies custom typeRoots, skipping lookup in 'node_modules' folder."),Option_0_can_only_be_specified_on_command_line:M(6266,1,"Option_0_can_only_be_specified_on_command_line_6266","Option '{0}' can only be specified on command line."),Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve:M(6270,3,"Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270","Directory '{0}' has no containing package.json scope. Imports will not resolve."),Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1:M(6271,3,"Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271","Import specifier '{0}' does not exist in package.json scope at path '{1}'."),Invalid_import_specifier_0_has_no_possible_resolutions:M(6272,3,"Invalid_import_specifier_0_has_no_possible_resolutions_6272","Invalid import specifier '{0}' has no possible resolutions."),package_json_scope_0_has_no_imports_defined:M(6273,3,"package_json_scope_0_has_no_imports_defined_6273","package.json scope '{0}' has no imports defined."),package_json_scope_0_explicitly_maps_specifier_1_to_null:M(6274,3,"package_json_scope_0_explicitly_maps_specifier_1_to_null_6274","package.json scope '{0}' explicitly maps specifier '{1}' to null."),package_json_scope_0_has_invalid_type_for_target_of_specifier_1:M(6275,3,"package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275","package.json scope '{0}' has invalid type for target of specifier '{1}'"),Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1:M(6276,3,"Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276","Export specifier '{0}' does not exist in package.json scope at path '{1}'."),Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update:M(6277,3,"Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_i_6277","Resolution of non-relative name failed; trying with modern Node resolution features disabled to see if npm library needs configuration update."),There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings:M(6278,3,"There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278",`There are types at '{0}', but this result could not be resolved when respecting package.json "exports". The '{1}' library may need to update its package.json or typings.`),Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update:M(6279,3,"Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_ne_6279","Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update."),There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler:M(6280,3,"There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setti_6280","There are types at '{0}', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'."),package_json_has_a_peerDependencies_field:M(6281,3,"package_json_has_a_peerDependencies_field_6281","'package.json' has a 'peerDependencies' field."),Found_peerDependency_0_with_1_version:M(6282,3,"Found_peerDependency_0_with_1_version_6282","Found peerDependency '{0}' with '{1}' version."),Failed_to_find_peerDependency_0:M(6283,3,"Failed_to_find_peerDependency_0_6283","Failed to find peerDependency '{0}'."),Enable_project_compilation:M(6302,3,"Enable_project_compilation_6302","Enable project compilation"),Composite_projects_may_not_disable_declaration_emit:M(6304,1,"Composite_projects_may_not_disable_declaration_emit_6304","Composite projects may not disable declaration emit."),Output_file_0_has_not_been_built_from_source_file_1:M(6305,1,"Output_file_0_has_not_been_built_from_source_file_1_6305","Output file '{0}' has not been built from source file '{1}'."),Referenced_project_0_must_have_setting_composite_Colon_true:M(6306,1,"Referenced_project_0_must_have_setting_composite_Colon_true_6306",`Referenced project '{0}' must have setting "composite": true.`),File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern:M(6307,1,"File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307","File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern."),Referenced_project_0_may_not_disable_emit:M(6310,1,"Referenced_project_0_may_not_disable_emit_6310","Referenced project '{0}' may not disable emit."),Project_0_is_out_of_date_because_output_1_is_older_than_input_2:M(6350,3,"Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350","Project '{0}' is out of date because output '{1}' is older than input '{2}'"),Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2:M(6351,3,"Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351","Project '{0}' is up to date because newest input '{1}' is older than output '{2}'"),Project_0_is_out_of_date_because_output_file_1_does_not_exist:M(6352,3,"Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352","Project '{0}' is out of date because output file '{1}' does not exist"),Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date:M(6353,3,"Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353","Project '{0}' is out of date because its dependency '{1}' is out of date"),Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies:M(6354,3,"Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354","Project '{0}' is up to date with .d.ts files from its dependencies"),Projects_in_this_build_Colon_0:M(6355,3,"Projects_in_this_build_Colon_0_6355","Projects in this build: {0}"),A_non_dry_build_would_delete_the_following_files_Colon_0:M(6356,3,"A_non_dry_build_would_delete_the_following_files_Colon_0_6356","A non-dry build would delete the following files: {0}"),A_non_dry_build_would_build_project_0:M(6357,3,"A_non_dry_build_would_build_project_0_6357","A non-dry build would build project '{0}'"),Building_project_0:M(6358,3,"Building_project_0_6358","Building project '{0}'..."),Updating_output_timestamps_of_project_0:M(6359,3,"Updating_output_timestamps_of_project_0_6359","Updating output timestamps of project '{0}'..."),Project_0_is_up_to_date:M(6361,3,"Project_0_is_up_to_date_6361","Project '{0}' is up to date"),Skipping_build_of_project_0_because_its_dependency_1_has_errors:M(6362,3,"Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362","Skipping build of project '{0}' because its dependency '{1}' has errors"),Project_0_can_t_be_built_because_its_dependency_1_has_errors:M(6363,3,"Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363","Project '{0}' can't be built because its dependency '{1}' has errors"),Build_one_or_more_projects_and_their_dependencies_if_out_of_date:M(6364,3,"Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364","Build one or more projects and their dependencies, if out of date"),Delete_the_outputs_of_all_projects:M(6365,3,"Delete_the_outputs_of_all_projects_6365","Delete the outputs of all projects."),Show_what_would_be_built_or_deleted_if_specified_with_clean:M(6367,3,"Show_what_would_be_built_or_deleted_if_specified_with_clean_6367","Show what would be built (or deleted, if specified with '--clean')"),Option_build_must_be_the_first_command_line_argument:M(6369,1,"Option_build_must_be_the_first_command_line_argument_6369","Option '--build' must be the first command line argument."),Options_0_and_1_cannot_be_combined:M(6370,1,"Options_0_and_1_cannot_be_combined_6370","Options '{0}' and '{1}' cannot be combined."),Updating_unchanged_output_timestamps_of_project_0:M(6371,3,"Updating_unchanged_output_timestamps_of_project_0_6371","Updating unchanged output timestamps of project '{0}'..."),A_non_dry_build_would_update_timestamps_for_output_of_project_0:M(6374,3,"A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374","A non-dry build would update timestamps for output of project '{0}'"),Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1:M(6377,1,"Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377","Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'"),Composite_projects_may_not_disable_incremental_compilation:M(6379,1,"Composite_projects_may_not_disable_incremental_compilation_6379","Composite projects may not disable incremental compilation."),Specify_file_to_store_incremental_compilation_information:M(6380,3,"Specify_file_to_store_incremental_compilation_information_6380","Specify file to store incremental compilation information"),Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2:M(6381,3,"Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381","Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"),Skipping_build_of_project_0_because_its_dependency_1_was_not_built:M(6382,3,"Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382","Skipping build of project '{0}' because its dependency '{1}' was not built"),Project_0_can_t_be_built_because_its_dependency_1_was_not_built:M(6383,3,"Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383","Project '{0}' can't be built because its dependency '{1}' was not built"),Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it:M(6384,3,"Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384","Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it."),_0_is_deprecated:M(6385,2,"_0_is_deprecated_6385","'{0}' is deprecated.",void 0,void 0,!0),Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found:M(6386,3,"Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_nativ_6386","Performance timings for '--diagnostics' or '--extendedDiagnostics' are not available in this session. A native implementation of the Web Performance API could not be found."),The_signature_0_of_1_is_deprecated:M(6387,2,"The_signature_0_of_1_is_deprecated_6387","The signature '{0}' of '{1}' is deprecated.",void 0,void 0,!0),Project_0_is_being_forcibly_rebuilt:M(6388,3,"Project_0_is_being_forcibly_rebuilt_6388","Project '{0}' is being forcibly rebuilt"),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved:M(6389,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389","Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2:M(6390,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:M(6391,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved:M(6392,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3:M(6393,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4:M(6394,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved:M(6395,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3:M(6396,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4:M(6397,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved:M(6398,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted:M(6399,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399","Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes were not emitted"),Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files:M(6400,3,"Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400","Project '{0}' is up to date but needs to update timestamps of output files that are older than input files"),Project_0_is_out_of_date_because_there_was_error_reading_file_1:M(6401,3,"Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401","Project '{0}' is out of date because there was error reading file '{1}'"),Resolving_in_0_mode_with_conditions_1:M(6402,3,"Resolving_in_0_mode_with_conditions_1_6402","Resolving in {0} mode with conditions {1}."),Matched_0_condition_1:M(6403,3,"Matched_0_condition_1_6403","Matched '{0}' condition '{1}'."),Using_0_subpath_1_with_target_2:M(6404,3,"Using_0_subpath_1_with_target_2_6404","Using '{0}' subpath '{1}' with target '{2}'."),Saw_non_matching_condition_0:M(6405,3,"Saw_non_matching_condition_0_6405","Saw non-matching condition '{0}'."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions:M(6406,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406","Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions"),Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set:M(6407,3,"Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noE_6407","Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set."),Use_the_package_json_exports_field_when_resolving_package_imports:M(6408,3,"Use_the_package_json_exports_field_when_resolving_package_imports_6408","Use the package.json 'exports' field when resolving package imports."),Use_the_package_json_imports_field_when_resolving_imports:M(6409,3,"Use_the_package_json_imports_field_when_resolving_imports_6409","Use the package.json 'imports' field when resolving imports."),Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports:M(6410,3,"Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports_6410","Conditions to set in addition to the resolver-specific defaults when resolving imports."),true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false:M(6411,3,"true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false_6411","`true` when 'moduleResolution' is 'node16', 'nodenext', or 'bundler'; otherwise `false`."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more:M(6412,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_6412","Project '{0}' is out of date because buildinfo file '{1}' indicates that file '{2}' was root file of compilation but not any more."),Entering_conditional_exports:M(6413,3,"Entering_conditional_exports_6413","Entering conditional exports."),Resolved_under_condition_0:M(6414,3,"Resolved_under_condition_0_6414","Resolved under condition '{0}'."),Failed_to_resolve_under_condition_0:M(6415,3,"Failed_to_resolve_under_condition_0_6415","Failed to resolve under condition '{0}'."),Exiting_conditional_exports:M(6416,3,"Exiting_conditional_exports_6416","Exiting conditional exports."),Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0:M(6417,3,"Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417","Searching all ancestor node_modules directories for preferred extensions: {0}."),Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0:M(6418,3,"Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418","Searching all ancestor node_modules directories for fallback extensions: {0}."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors:M(6419,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors_6419","Project '{0}' is out of date because buildinfo file '{1}' indicates that program needs to report errors."),Project_0_is_out_of_date_because_1:M(6420,3,"Project_0_is_out_of_date_because_1_6420","Project '{0}' is out of date because {1}."),The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1:M(6500,3,"The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500","The expected type comes from property '{0}' which is declared here on type '{1}'"),The_expected_type_comes_from_this_index_signature:M(6501,3,"The_expected_type_comes_from_this_index_signature_6501","The expected type comes from this index signature."),The_expected_type_comes_from_the_return_type_of_this_signature:M(6502,3,"The_expected_type_comes_from_the_return_type_of_this_signature_6502","The expected type comes from the return type of this signature."),Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing:M(6503,3,"Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503","Print names of files that are part of the compilation and then stop processing."),File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option:M(6504,1,"File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504","File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"),Print_names_of_files_and_the_reason_they_are_part_of_the_compilation:M(6505,3,"Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505","Print names of files and the reason they are part of the compilation."),Consider_adding_a_declare_modifier_to_this_class:M(6506,3,"Consider_adding_a_declare_modifier_to_this_class_6506","Consider adding a 'declare' modifier to this class."),Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files:M(6600,3,"Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600","Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files."),Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export:M(6601,3,"Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601","Allow 'import x from y' when a module doesn't have a default export."),Allow_accessing_UMD_globals_from_modules:M(6602,3,"Allow_accessing_UMD_globals_from_modules_6602","Allow accessing UMD globals from modules."),Disable_error_reporting_for_unreachable_code:M(6603,3,"Disable_error_reporting_for_unreachable_code_6603","Disable error reporting for unreachable code."),Disable_error_reporting_for_unused_labels:M(6604,3,"Disable_error_reporting_for_unused_labels_6604","Disable error reporting for unused labels."),Ensure_use_strict_is_always_emitted:M(6605,3,"Ensure_use_strict_is_always_emitted_6605","Ensure 'use strict' is always emitted."),Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it:M(6606,3,"Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606","Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it."),Specify_the_base_directory_to_resolve_non_relative_module_names:M(6607,3,"Specify_the_base_directory_to_resolve_non_relative_module_names_6607","Specify the base directory to resolve non-relative module names."),No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files:M(6608,3,"No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608","No longer supported. In early versions, manually set the text encoding for reading files."),Enable_error_reporting_in_type_checked_JavaScript_files:M(6609,3,"Enable_error_reporting_in_type_checked_JavaScript_files_6609","Enable error reporting in type-checked JavaScript files."),Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references:M(6611,3,"Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611","Enable constraints that allow a TypeScript project to be used with project references."),Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project:M(6612,3,"Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612","Generate .d.ts files from TypeScript and JavaScript files in your project."),Specify_the_output_directory_for_generated_declaration_files:M(6613,3,"Specify_the_output_directory_for_generated_declaration_files_6613","Specify the output directory for generated declaration files."),Create_sourcemaps_for_d_ts_files:M(6614,3,"Create_sourcemaps_for_d_ts_files_6614","Create sourcemaps for d.ts files."),Output_compiler_performance_information_after_building:M(6615,3,"Output_compiler_performance_information_after_building_6615","Output compiler performance information after building."),Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project:M(6616,3,"Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616","Disables inference for type acquisition by looking at filenames in a project."),Reduce_the_number_of_projects_loaded_automatically_by_TypeScript:M(6617,3,"Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617","Reduce the number of projects loaded automatically by TypeScript."),Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server:M(6618,3,"Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618","Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."),Opt_a_project_out_of_multi_project_reference_checking_when_editing:M(6619,3,"Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619","Opt a project out of multi-project reference checking when editing."),Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects:M(6620,3,"Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620","Disable preferring source files instead of declaration files when referencing composite projects."),Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration:M(6621,3,"Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621","Emit more compliant, but verbose and less performant JavaScript for iteration."),Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files:M(6622,3,"Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622","Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."),Only_output_d_ts_files_and_not_JavaScript_files:M(6623,3,"Only_output_d_ts_files_and_not_JavaScript_files_6623","Only output d.ts files and not JavaScript files."),Emit_design_type_metadata_for_decorated_declarations_in_source_files:M(6624,3,"Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624","Emit design-type metadata for decorated declarations in source files."),Disable_the_type_acquisition_for_JavaScript_projects:M(6625,3,"Disable_the_type_acquisition_for_JavaScript_projects_6625","Disable the type acquisition for JavaScript projects"),Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility:M(6626,3,"Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626","Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility."),Filters_results_from_the_include_option:M(6627,3,"Filters_results_from_the_include_option_6627","Filters results from the `include` option."),Remove_a_list_of_directories_from_the_watch_process:M(6628,3,"Remove_a_list_of_directories_from_the_watch_process_6628","Remove a list of directories from the watch process."),Remove_a_list_of_files_from_the_watch_mode_s_processing:M(6629,3,"Remove_a_list_of_files_from_the_watch_mode_s_processing_6629","Remove a list of files from the watch mode's processing."),Enable_experimental_support_for_legacy_experimental_decorators:M(6630,3,"Enable_experimental_support_for_legacy_experimental_decorators_6630","Enable experimental support for legacy experimental decorators."),Print_files_read_during_the_compilation_including_why_it_was_included:M(6631,3,"Print_files_read_during_the_compilation_including_why_it_was_included_6631","Print files read during the compilation including why it was included."),Output_more_detailed_compiler_performance_information_after_building:M(6632,3,"Output_more_detailed_compiler_performance_information_after_building_6632","Output more detailed compiler performance information after building."),Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited:M(6633,3,"Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633","Specify one or more path or node module references to base configuration files from which settings are inherited."),Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers:M(6634,3,"Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634","Specify what approach the watcher should use if the system runs out of native file watchers."),Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include:M(6635,3,"Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635","Include a list of files. This does not support glob patterns, as opposed to `include`."),Build_all_projects_including_those_that_appear_to_be_up_to_date:M(6636,3,"Build_all_projects_including_those_that_appear_to_be_up_to_date_6636","Build all projects, including those that appear to be up to date."),Ensure_that_casing_is_correct_in_imports:M(6637,3,"Ensure_that_casing_is_correct_in_imports_6637","Ensure that casing is correct in imports."),Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging:M(6638,3,"Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638","Emit a v8 CPU profile of the compiler run for debugging."),Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file:M(6639,3,"Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639","Allow importing helper functions from tslib once per project, instead of including them per-file."),Skip_building_downstream_projects_on_error_in_upstream_project:M(6640,3,"Skip_building_downstream_projects_on_error_in_upstream_project_6640","Skip building downstream projects on error in upstream project."),Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation:M(6641,3,"Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641","Specify a list of glob patterns that match files to be included in compilation."),Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects:M(6642,3,"Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642","Save .tsbuildinfo files to allow for incremental compilation of projects."),Include_sourcemap_files_inside_the_emitted_JavaScript:M(6643,3,"Include_sourcemap_files_inside_the_emitted_JavaScript_6643","Include sourcemap files inside the emitted JavaScript."),Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript:M(6644,3,"Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644","Include source code in the sourcemaps inside the emitted JavaScript."),Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports:M(6645,3,"Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645","Ensure that each file can be safely transpiled without relying on other imports."),Specify_what_JSX_code_is_generated:M(6646,3,"Specify_what_JSX_code_is_generated_6646","Specify what JSX code is generated."),Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h:M(6647,3,"Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647","Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'."),Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment:M(6648,3,"Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648","Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."),Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk:M(6649,3,"Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649","Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'."),Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option:M(6650,3,"Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650","Make keyof only return strings instead of string, numbers or symbols. Legacy option."),Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment:M(6651,3,"Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651","Specify a set of bundled library declaration files that describe the target runtime environment."),Print_the_names_of_emitted_files_after_a_compilation:M(6652,3,"Print_the_names_of_emitted_files_after_a_compilation_6652","Print the names of emitted files after a compilation."),Print_all_of_the_files_read_during_the_compilation:M(6653,3,"Print_all_of_the_files_read_during_the_compilation_6653","Print all of the files read during the compilation."),Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit:M(6654,3,"Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654","Set the language of the messaging from TypeScript. This does not affect emit."),Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations:M(6655,3,"Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655","Specify the location where debugger should locate map files instead of generated locations."),Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs:M(6656,3,"Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656","Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'."),Specify_what_module_code_is_generated:M(6657,3,"Specify_what_module_code_is_generated_6657","Specify what module code is generated."),Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier:M(6658,3,"Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658","Specify how TypeScript looks up a file from a given module specifier."),Set_the_newline_character_for_emitting_files:M(6659,3,"Set_the_newline_character_for_emitting_files_6659","Set the newline character for emitting files."),Disable_emitting_files_from_a_compilation:M(6660,3,"Disable_emitting_files_from_a_compilation_6660","Disable emitting files from a compilation."),Disable_generating_custom_helper_functions_like_extends_in_compiled_output:M(6661,3,"Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661","Disable generating custom helper functions like '__extends' in compiled output."),Disable_emitting_files_if_any_type_checking_errors_are_reported:M(6662,3,"Disable_emitting_files_if_any_type_checking_errors_are_reported_6662","Disable emitting files if any type checking errors are reported."),Disable_truncating_types_in_error_messages:M(6663,3,"Disable_truncating_types_in_error_messages_6663","Disable truncating types in error messages."),Enable_error_reporting_for_fallthrough_cases_in_switch_statements:M(6664,3,"Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664","Enable error reporting for fallthrough cases in switch statements."),Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type:M(6665,3,"Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665","Enable error reporting for expressions and declarations with an implied 'any' type."),Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier:M(6666,3,"Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666","Ensure overriding members in derived classes are marked with an override modifier."),Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function:M(6667,3,"Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667","Enable error reporting for codepaths that do not explicitly return in a function."),Enable_error_reporting_when_this_is_given_the_type_any:M(6668,3,"Enable_error_reporting_when_this_is_given_the_type_any_6668","Enable error reporting when 'this' is given the type 'any'."),Disable_adding_use_strict_directives_in_emitted_JavaScript_files:M(6669,3,"Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669","Disable adding 'use strict' directives in emitted JavaScript files."),Disable_including_any_library_files_including_the_default_lib_d_ts:M(6670,3,"Disable_including_any_library_files_including_the_default_lib_d_ts_6670","Disable including any library files, including the default lib.d.ts."),Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type:M(6671,3,"Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671","Enforces using indexed accessors for keys declared using an indexed type."),Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project:M(6672,3,"Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672","Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project."),Disable_strict_checking_of_generic_signatures_in_function_types:M(6673,3,"Disable_strict_checking_of_generic_signatures_in_function_types_6673","Disable strict checking of generic signatures in function types."),Add_undefined_to_a_type_when_accessed_using_an_index:M(6674,3,"Add_undefined_to_a_type_when_accessed_using_an_index_6674","Add 'undefined' to a type when accessed using an index."),Enable_error_reporting_when_local_variables_aren_t_read:M(6675,3,"Enable_error_reporting_when_local_variables_aren_t_read_6675","Enable error reporting when local variables aren't read."),Raise_an_error_when_a_function_parameter_isn_t_read:M(6676,3,"Raise_an_error_when_a_function_parameter_isn_t_read_6676","Raise an error when a function parameter isn't read."),Deprecated_setting_Use_outFile_instead:M(6677,3,"Deprecated_setting_Use_outFile_instead_6677","Deprecated setting. Use 'outFile' instead."),Specify_an_output_folder_for_all_emitted_files:M(6678,3,"Specify_an_output_folder_for_all_emitted_files_6678","Specify an output folder for all emitted files."),Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output:M(6679,3,"Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679","Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output."),Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations:M(6680,3,"Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680","Specify a set of entries that re-map imports to additional lookup locations."),Specify_a_list_of_language_service_plugins_to_include:M(6681,3,"Specify_a_list_of_language_service_plugins_to_include_6681","Specify a list of language service plugins to include."),Disable_erasing_const_enum_declarations_in_generated_code:M(6682,3,"Disable_erasing_const_enum_declarations_in_generated_code_6682","Disable erasing 'const enum' declarations in generated code."),Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node:M(6683,3,"Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683","Disable resolving symlinks to their realpath. This correlates to the same flag in node."),Disable_wiping_the_console_in_watch_mode:M(6684,3,"Disable_wiping_the_console_in_watch_mode_6684","Disable wiping the console in watch mode."),Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read:M(6685,3,"Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685","Enable color and formatting in TypeScript's output to make compiler errors easier to read."),Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit:M(6686,3,"Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686","Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit."),Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references:M(6687,3,"Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687","Specify an array of objects that specify paths for projects. Used in project references."),Disable_emitting_comments:M(6688,3,"Disable_emitting_comments_6688","Disable emitting comments."),Enable_importing_json_files:M(6689,3,"Enable_importing_json_files_6689","Enable importing .json files."),Specify_the_root_folder_within_your_source_files:M(6690,3,"Specify_the_root_folder_within_your_source_files_6690","Specify the root folder within your source files."),Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules:M(6691,3,"Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691","Allow multiple folders to be treated as one when resolving modules."),Skip_type_checking_d_ts_files_that_are_included_with_TypeScript:M(6692,3,"Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692","Skip type checking .d.ts files that are included with TypeScript."),Skip_type_checking_all_d_ts_files:M(6693,3,"Skip_type_checking_all_d_ts_files_6693","Skip type checking all .d.ts files."),Create_source_map_files_for_emitted_JavaScript_files:M(6694,3,"Create_source_map_files_for_emitted_JavaScript_files_6694","Create source map files for emitted JavaScript files."),Specify_the_root_path_for_debuggers_to_find_the_reference_source_code:M(6695,3,"Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695","Specify the root path for debuggers to find the reference source code."),Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function:M(6697,3,"Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697","Check that the arguments for 'bind', 'call', and 'apply' methods match the original function."),When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible:M(6698,3,"When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698","When assigning functions, check to ensure parameters and the return values are subtype-compatible."),When_type_checking_take_into_account_null_and_undefined:M(6699,3,"When_type_checking_take_into_account_null_and_undefined_6699","When type checking, take into account 'null' and 'undefined'."),Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor:M(6700,3,"Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700","Check for class properties that are declared but not set in the constructor."),Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments:M(6701,3,"Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701","Disable emitting declarations that have '@internal' in their JSDoc comments."),Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals:M(6702,3,"Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702","Disable reporting of excess property errors during the creation of object literals."),Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures:M(6703,3,"Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703","Suppress 'noImplicitAny' errors when indexing objects that lack index signatures."),Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively:M(6704,3,"Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704","Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."),Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations:M(6705,3,"Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705","Set the JavaScript language version for emitted JavaScript and include compatible library declarations."),Log_paths_used_during_the_moduleResolution_process:M(6706,3,"Log_paths_used_during_the_moduleResolution_process_6706","Log paths used during the 'moduleResolution' process."),Specify_the_path_to_tsbuildinfo_incremental_compilation_file:M(6707,3,"Specify_the_path_to_tsbuildinfo_incremental_compilation_file_6707","Specify the path to .tsbuildinfo incremental compilation file."),Specify_options_for_automatic_acquisition_of_declaration_files:M(6709,3,"Specify_options_for_automatic_acquisition_of_declaration_files_6709","Specify options for automatic acquisition of declaration files."),Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types:M(6710,3,"Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710","Specify multiple folders that act like './node_modules/@types'."),Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file:M(6711,3,"Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711","Specify type package names to be included without being referenced in a source file."),Emit_ECMAScript_standard_compliant_class_fields:M(6712,3,"Emit_ECMAScript_standard_compliant_class_fields_6712","Emit ECMAScript-standard-compliant class fields."),Enable_verbose_logging:M(6713,3,"Enable_verbose_logging_6713","Enable verbose logging."),Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality:M(6714,3,"Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714","Specify how directories are watched on systems that lack recursive file-watching functionality."),Specify_how_the_TypeScript_watch_mode_works:M(6715,3,"Specify_how_the_TypeScript_watch_mode_works_6715","Specify how the TypeScript watch mode works."),Require_undeclared_properties_from_index_signatures_to_use_element_accesses:M(6717,3,"Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717","Require undeclared properties from index signatures to use element accesses."),Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types:M(6718,3,"Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718","Specify emit/checking behavior for imports that are only used for types."),Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files:M(6719,3,"Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files_6719","Require sufficient annotation on exports so other tools can trivially generate declaration files."),Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any:M(6720,3,"Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any_6720","Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'."),Default_catch_clause_variables_as_unknown_instead_of_any:M(6803,3,"Default_catch_clause_variables_as_unknown_instead_of_any_6803","Default catch clause variables as 'unknown' instead of 'any'."),Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting:M(6804,3,"Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804","Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."),Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported:M(6805,3,"Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported_6805","Disable full type checking (only critical parse and emit errors will be reported)."),Check_side_effect_imports:M(6806,3,"Check_side_effect_imports_6806","Check side effect imports."),This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2:M(6807,1,"This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2_6807","This operation can be simplified. This shift is identical to `{0} {1} {2}`."),one_of_Colon:M(6900,3,"one_of_Colon_6900","one of:"),one_or_more_Colon:M(6901,3,"one_or_more_Colon_6901","one or more:"),type_Colon:M(6902,3,"type_Colon_6902","type:"),default_Colon:M(6903,3,"default_Colon_6903","default:"),module_system_or_esModuleInterop:M(6904,3,"module_system_or_esModuleInterop_6904",'module === "system" or esModuleInterop'),false_unless_strict_is_set:M(6905,3,"false_unless_strict_is_set_6905","`false`, unless `strict` is set"),false_unless_composite_is_set:M(6906,3,"false_unless_composite_is_set_6906","`false`, unless `composite` is set"),node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified:M(6907,3,"node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907",'`["node_modules", "bower_components", "jspm_packages"]`, plus the value of `outDir` if one is specified.'),if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk:M(6908,3,"if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908",'`[]` if `files` is specified, otherwise `["**/*"]`'),true_if_composite_false_otherwise:M(6909,3,"true_if_composite_false_otherwise_6909","`true` if `composite`, `false` otherwise"),module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node:M(69010,3,"module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010","module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"),Computed_from_the_list_of_input_files:M(6911,3,"Computed_from_the_list_of_input_files_6911","Computed from the list of input files"),Platform_specific:M(6912,3,"Platform_specific_6912","Platform specific"),You_can_learn_about_all_of_the_compiler_options_at_0:M(6913,3,"You_can_learn_about_all_of_the_compiler_options_at_0_6913","You can learn about all of the compiler options at {0}"),Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon:M(6914,3,"Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914","Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"),Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0:M(6915,3,"Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915","Using --build, -b will make tsc behave more like a build orchestrator than a compiler. This is used to trigger building composite projects which you can learn more about at {0}"),COMMON_COMMANDS:M(6916,3,"COMMON_COMMANDS_6916","COMMON COMMANDS"),ALL_COMPILER_OPTIONS:M(6917,3,"ALL_COMPILER_OPTIONS_6917","ALL COMPILER OPTIONS"),WATCH_OPTIONS:M(6918,3,"WATCH_OPTIONS_6918","WATCH OPTIONS"),BUILD_OPTIONS:M(6919,3,"BUILD_OPTIONS_6919","BUILD OPTIONS"),COMMON_COMPILER_OPTIONS:M(6920,3,"COMMON_COMPILER_OPTIONS_6920","COMMON COMPILER OPTIONS"),COMMAND_LINE_FLAGS:M(6921,3,"COMMAND_LINE_FLAGS_6921","COMMAND LINE FLAGS"),tsc_Colon_The_TypeScript_Compiler:M(6922,3,"tsc_Colon_The_TypeScript_Compiler_6922","tsc: The TypeScript Compiler"),Compiles_the_current_project_tsconfig_json_in_the_working_directory:M(6923,3,"Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923","Compiles the current project (tsconfig.json in the working directory.)"),Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options:M(6924,3,"Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924","Ignoring tsconfig.json, compiles the specified files with default compiler options."),Build_a_composite_project_in_the_working_directory:M(6925,3,"Build_a_composite_project_in_the_working_directory_6925","Build a composite project in the working directory."),Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory:M(6926,3,"Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926","Creates a tsconfig.json with the recommended settings in the working directory."),Compiles_the_TypeScript_project_located_at_the_specified_path:M(6927,3,"Compiles_the_TypeScript_project_located_at_the_specified_path_6927","Compiles the TypeScript project located at the specified path."),An_expanded_version_of_this_information_showing_all_possible_compiler_options:M(6928,3,"An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928","An expanded version of this information, showing all possible compiler options"),Compiles_the_current_project_with_additional_settings:M(6929,3,"Compiles_the_current_project_with_additional_settings_6929","Compiles the current project, with additional settings."),true_for_ES2022_and_above_including_ESNext:M(6930,3,"true_for_ES2022_and_above_including_ESNext_6930","`true` for ES2022 and above, including ESNext."),List_of_file_name_suffixes_to_search_when_resolving_a_module:M(6931,1,"List_of_file_name_suffixes_to_search_when_resolving_a_module_6931","List of file name suffixes to search when resolving a module."),Variable_0_implicitly_has_an_1_type:M(7005,1,"Variable_0_implicitly_has_an_1_type_7005","Variable '{0}' implicitly has an '{1}' type."),Parameter_0_implicitly_has_an_1_type:M(7006,1,"Parameter_0_implicitly_has_an_1_type_7006","Parameter '{0}' implicitly has an '{1}' type."),Member_0_implicitly_has_an_1_type:M(7008,1,"Member_0_implicitly_has_an_1_type_7008","Member '{0}' implicitly has an '{1}' type."),new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type:M(7009,1,"new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009","'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."),_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:M(7010,1,"_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010","'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."),Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:M(7011,1,"Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011","Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."),This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation:M(7012,1,"This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012","This overload implicitly returns the type '{0}' because it lacks a return type annotation."),Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:M(7013,1,"Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013","Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."),Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:M(7014,1,"Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014","Function type, which lacks return-type annotation, implicitly has an '{0}' return type."),Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number:M(7015,1,"Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015","Element implicitly has an 'any' type because index expression is not of type 'number'."),Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type:M(7016,1,"Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016","Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature:M(7017,1,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017","Element implicitly has an 'any' type because type '{0}' has no index signature."),Object_literal_s_property_0_implicitly_has_an_1_type:M(7018,1,"Object_literal_s_property_0_implicitly_has_an_1_type_7018","Object literal's property '{0}' implicitly has an '{1}' type."),Rest_parameter_0_implicitly_has_an_any_type:M(7019,1,"Rest_parameter_0_implicitly_has_an_any_type_7019","Rest parameter '{0}' implicitly has an 'any[]' type."),Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:M(7020,1,"Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020","Call signature, which lacks return-type annotation, implicitly has an 'any' return type."),_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer:M(7022,1,"_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022","'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."),_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:M(7023,1,"_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023","'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:M(7024,1,"Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024","Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation:M(7025,1,"Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025","Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation."),JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists:M(7026,1,"JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026","JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."),Unreachable_code_detected:M(7027,1,"Unreachable_code_detected_7027","Unreachable code detected.",!0),Unused_label:M(7028,1,"Unused_label_7028","Unused label.",!0),Fallthrough_case_in_switch:M(7029,1,"Fallthrough_case_in_switch_7029","Fallthrough case in switch."),Not_all_code_paths_return_a_value:M(7030,1,"Not_all_code_paths_return_a_value_7030","Not all code paths return a value."),Binding_element_0_implicitly_has_an_1_type:M(7031,1,"Binding_element_0_implicitly_has_an_1_type_7031","Binding element '{0}' implicitly has an '{1}' type."),Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation:M(7032,1,"Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032","Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."),Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation:M(7033,1,"Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033","Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."),Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined:M(7034,1,"Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034","Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."),Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0:M(7035,1,"Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035","Try `npm i --save-dev @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"),Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0:M(7036,1,"Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036","Dynamic import's specifier must be of type 'string', but here has type '{0}'."),Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports:M(7037,3,"Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037","Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."),Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead:M(7038,3,"Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038","Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead."),Mapped_object_type_implicitly_has_an_any_template_type:M(7039,1,"Mapped_object_type_implicitly_has_an_any_template_type_7039","Mapped object type implicitly has an 'any' template type."),If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1:M(7040,1,"If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040","If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}'"),The_containing_arrow_function_captures_the_global_value_of_this:M(7041,1,"The_containing_arrow_function_captures_the_global_value_of_this_7041","The containing arrow function captures the global value of 'this'."),Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used:M(7042,1,"Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042","Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used."),Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:M(7043,2,"Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043","Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:M(7044,2,"Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044","Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:M(7045,2,"Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045","Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage:M(7046,2,"Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046","Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage."),Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage:M(7047,2,"Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047","Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage."),Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage:M(7048,2,"Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048","Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage."),Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage:M(7049,2,"Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049","Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage."),_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage:M(7050,2,"_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050","'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage."),Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1:M(7051,1,"Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051","Parameter has a name but no type. Did you mean '{0}: {1}'?"),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1:M(7052,1,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052","Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?"),Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1:M(7053,1,"Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053","Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."),No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1:M(7054,1,"No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054","No index signature with a parameter of type '{0}' was found on type '{1}'."),_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type:M(7055,1,"_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055","'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type."),The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed:M(7056,1,"The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_ty_7056","The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed."),yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation:M(7057,1,"yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057","'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."),If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1:M(7058,1,"If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058","If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"),This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead:M(7059,1,"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059","This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."),This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint:M(7060,1,"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060","This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."),A_mapped_type_may_not_declare_properties_or_methods:M(7061,1,"A_mapped_type_may_not_declare_properties_or_methods_7061","A mapped type may not declare properties or methods."),You_cannot_rename_this_element:M(8e3,1,"You_cannot_rename_this_element_8000","You cannot rename this element."),You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library:M(8001,1,"You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001","You cannot rename elements that are defined in the standard TypeScript library."),import_can_only_be_used_in_TypeScript_files:M(8002,1,"import_can_only_be_used_in_TypeScript_files_8002","'import ... =' can only be used in TypeScript files."),export_can_only_be_used_in_TypeScript_files:M(8003,1,"export_can_only_be_used_in_TypeScript_files_8003","'export =' can only be used in TypeScript files."),Type_parameter_declarations_can_only_be_used_in_TypeScript_files:M(8004,1,"Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004","Type parameter declarations can only be used in TypeScript files."),implements_clauses_can_only_be_used_in_TypeScript_files:M(8005,1,"implements_clauses_can_only_be_used_in_TypeScript_files_8005","'implements' clauses can only be used in TypeScript files."),_0_declarations_can_only_be_used_in_TypeScript_files:M(8006,1,"_0_declarations_can_only_be_used_in_TypeScript_files_8006","'{0}' declarations can only be used in TypeScript files."),Type_aliases_can_only_be_used_in_TypeScript_files:M(8008,1,"Type_aliases_can_only_be_used_in_TypeScript_files_8008","Type aliases can only be used in TypeScript files."),The_0_modifier_can_only_be_used_in_TypeScript_files:M(8009,1,"The_0_modifier_can_only_be_used_in_TypeScript_files_8009","The '{0}' modifier can only be used in TypeScript files."),Type_annotations_can_only_be_used_in_TypeScript_files:M(8010,1,"Type_annotations_can_only_be_used_in_TypeScript_files_8010","Type annotations can only be used in TypeScript files."),Type_arguments_can_only_be_used_in_TypeScript_files:M(8011,1,"Type_arguments_can_only_be_used_in_TypeScript_files_8011","Type arguments can only be used in TypeScript files."),Parameter_modifiers_can_only_be_used_in_TypeScript_files:M(8012,1,"Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012","Parameter modifiers can only be used in TypeScript files."),Non_null_assertions_can_only_be_used_in_TypeScript_files:M(8013,1,"Non_null_assertions_can_only_be_used_in_TypeScript_files_8013","Non-null assertions can only be used in TypeScript files."),Type_assertion_expressions_can_only_be_used_in_TypeScript_files:M(8016,1,"Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016","Type assertion expressions can only be used in TypeScript files."),Signature_declarations_can_only_be_used_in_TypeScript_files:M(8017,1,"Signature_declarations_can_only_be_used_in_TypeScript_files_8017","Signature declarations can only be used in TypeScript files."),Report_errors_in_js_files:M(8019,3,"Report_errors_in_js_files_8019","Report errors in .js files."),JSDoc_types_can_only_be_used_inside_documentation_comments:M(8020,1,"JSDoc_types_can_only_be_used_inside_documentation_comments_8020","JSDoc types can only be used inside documentation comments."),JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags:M(8021,1,"JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021","JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."),JSDoc_0_is_not_attached_to_a_class:M(8022,1,"JSDoc_0_is_not_attached_to_a_class_8022","JSDoc '@{0}' is not attached to a class."),JSDoc_0_1_does_not_match_the_extends_2_clause:M(8023,1,"JSDoc_0_1_does_not_match_the_extends_2_clause_8023","JSDoc '@{0} {1}' does not match the 'extends {2}' clause."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name:M(8024,1,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024","JSDoc '@param' tag has name '{0}', but there is no parameter with that name."),Class_declarations_cannot_have_more_than_one_augments_or_extends_tag:M(8025,1,"Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025","Class declarations cannot have more than one '@augments' or '@extends' tag."),Expected_0_type_arguments_provide_these_with_an_extends_tag:M(8026,1,"Expected_0_type_arguments_provide_these_with_an_extends_tag_8026","Expected {0} type arguments; provide these with an '@extends' tag."),Expected_0_1_type_arguments_provide_these_with_an_extends_tag:M(8027,1,"Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027","Expected {0}-{1} type arguments; provide these with an '@extends' tag."),JSDoc_may_only_appear_in_the_last_parameter_of_a_signature:M(8028,1,"JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028","JSDoc '...' may only appear in the last parameter of a signature."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type:M(8029,1,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029","JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."),The_type_of_a_function_declaration_must_match_the_function_s_signature:M(8030,1,"The_type_of_a_function_declaration_must_match_the_function_s_signature_8030","The type of a function declaration must match the function's signature."),You_cannot_rename_a_module_via_a_global_import:M(8031,1,"You_cannot_rename_a_module_via_a_global_import_8031","You cannot rename a module via a global import."),Qualified_name_0_is_not_allowed_without_a_leading_param_object_1:M(8032,1,"Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032","Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."),A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags:M(8033,1,"A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033","A JSDoc '@typedef' comment may not contain multiple '@type' tags."),The_tag_was_first_specified_here:M(8034,1,"The_tag_was_first_specified_here_8034","The tag was first specified here."),You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder:M(8035,1,"You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035","You cannot rename elements that are defined in a 'node_modules' folder."),You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder:M(8036,1,"You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036","You cannot rename elements that are defined in another 'node_modules' folder."),Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files:M(8037,1,"Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037","Type satisfaction expressions can only be used in TypeScript files."),Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export:M(8038,1,"Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export_8038","Decorators may not appear after 'export' or 'export default' if they also appear before 'export'."),A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag:M(8039,1,"A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag_8039","A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag"),Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit:M(9005,1,"Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005","Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."),Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit:M(9006,1,"Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006","Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."),Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations:M(9007,1,"Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9007","Function must have an explicit return type annotation with --isolatedDeclarations."),Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations:M(9008,1,"Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9008","Method must have an explicit return type annotation with --isolatedDeclarations."),At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations:M(9009,1,"At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9009","At least one accessor must have an explicit return type annotation with --isolatedDeclarations."),Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations:M(9010,1,"Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9010","Variable must have an explicit type annotation with --isolatedDeclarations."),Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations:M(9011,1,"Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9011","Parameter must have an explicit type annotation with --isolatedDeclarations."),Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations:M(9012,1,"Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9012","Property must have an explicit type annotation with --isolatedDeclarations."),Expression_type_can_t_be_inferred_with_isolatedDeclarations:M(9013,1,"Expression_type_can_t_be_inferred_with_isolatedDeclarations_9013","Expression type can't be inferred with --isolatedDeclarations."),Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations:M(9014,1,"Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedD_9014","Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations."),Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations:M(9015,1,"Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations_9015","Objects that contain spread assignments can't be inferred with --isolatedDeclarations."),Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations:M(9016,1,"Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations_9016","Objects that contain shorthand properties can't be inferred with --isolatedDeclarations."),Only_const_arrays_can_be_inferred_with_isolatedDeclarations:M(9017,1,"Only_const_arrays_can_be_inferred_with_isolatedDeclarations_9017","Only const arrays can be inferred with --isolatedDeclarations."),Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations:M(9018,1,"Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations_9018","Arrays with spread elements can't inferred with --isolatedDeclarations."),Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations:M(9019,1,"Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations_9019","Binding elements can't be exported directly with --isolatedDeclarations."),Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations:M(9020,1,"Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDecl_9020","Enum member initializers must be computable without references to external symbols with --isolatedDeclarations."),Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations:M(9021,1,"Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations_9021","Extends clause can't contain an expression with --isolatedDeclarations."),Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations:M(9022,1,"Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations_9022","Inference from class expressions is not supported with --isolatedDeclarations."),Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function:M(9023,1,"Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations__9023","Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function."),Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_supported_with_isolatedDeclarations:M(9025,1,"Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_su_9025","Declaration emit for this parameter requires implicitly adding undefined to it's type. This is not supported with --isolatedDeclarations."),Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations:M(9026,1,"Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_support_9026","Declaration emit for this file requires preserving this import for augmentations. This is not supported with --isolatedDeclarations."),Add_a_type_annotation_to_the_variable_0:M(9027,1,"Add_a_type_annotation_to_the_variable_0_9027","Add a type annotation to the variable {0}."),Add_a_type_annotation_to_the_parameter_0:M(9028,1,"Add_a_type_annotation_to_the_parameter_0_9028","Add a type annotation to the parameter {0}."),Add_a_type_annotation_to_the_property_0:M(9029,1,"Add_a_type_annotation_to_the_property_0_9029","Add a type annotation to the property {0}."),Add_a_return_type_to_the_function_expression:M(9030,1,"Add_a_return_type_to_the_function_expression_9030","Add a return type to the function expression."),Add_a_return_type_to_the_function_declaration:M(9031,1,"Add_a_return_type_to_the_function_declaration_9031","Add a return type to the function declaration."),Add_a_return_type_to_the_get_accessor_declaration:M(9032,1,"Add_a_return_type_to_the_get_accessor_declaration_9032","Add a return type to the get accessor declaration."),Add_a_type_to_parameter_of_the_set_accessor_declaration:M(9033,1,"Add_a_type_to_parameter_of_the_set_accessor_declaration_9033","Add a type to parameter of the set accessor declaration."),Add_a_return_type_to_the_method:M(9034,1,"Add_a_return_type_to_the_method_9034","Add a return type to the method"),Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit:M(9035,1,"Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit_9035","Add satisfies and a type assertion to this expression (satisfies T as T) to make the type explicit."),Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it:M(9036,1,"Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it_9036","Move the expression in default export to a variable and add a type annotation to it."),Default_exports_can_t_be_inferred_with_isolatedDeclarations:M(9037,1,"Default_exports_can_t_be_inferred_with_isolatedDeclarations_9037","Default exports can't be inferred with --isolatedDeclarations."),Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations:M(9038,1,"Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations_9038","Computed property names on class or object literals cannot be inferred with --isolatedDeclarations."),Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations:M(9039,1,"Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations_9039","Type containing private name '{0}' can't be used with --isolatedDeclarations."),JSX_attributes_must_only_be_assigned_a_non_empty_expression:M(17e3,1,"JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000","JSX attributes must only be assigned a non-empty 'expression'."),JSX_elements_cannot_have_multiple_attributes_with_the_same_name:M(17001,1,"JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001","JSX elements cannot have multiple attributes with the same name."),Expected_corresponding_JSX_closing_tag_for_0:M(17002,1,"Expected_corresponding_JSX_closing_tag_for_0_17002","Expected corresponding JSX closing tag for '{0}'."),Cannot_use_JSX_unless_the_jsx_flag_is_provided:M(17004,1,"Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004","Cannot use JSX unless the '--jsx' flag is provided."),A_constructor_cannot_contain_a_super_call_when_its_class_extends_null:M(17005,1,"A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005","A constructor cannot contain a 'super' call when its class extends 'null'."),An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:M(17006,1,"An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006","An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:M(17007,1,"A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007","A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),JSX_element_0_has_no_corresponding_closing_tag:M(17008,1,"JSX_element_0_has_no_corresponding_closing_tag_17008","JSX element '{0}' has no corresponding closing tag."),super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class:M(17009,1,"super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009","'super' must be called before accessing 'this' in the constructor of a derived class."),Unknown_type_acquisition_option_0:M(17010,1,"Unknown_type_acquisition_option_0_17010","Unknown type acquisition option '{0}'."),super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class:M(17011,1,"super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011","'super' must be called before accessing a property of 'super' in the constructor of a derived class."),_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2:M(17012,1,"_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012","'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"),Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor:M(17013,1,"Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013","Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."),JSX_fragment_has_no_corresponding_closing_tag:M(17014,1,"JSX_fragment_has_no_corresponding_closing_tag_17014","JSX fragment has no corresponding closing tag."),Expected_corresponding_closing_tag_for_JSX_fragment:M(17015,1,"Expected_corresponding_closing_tag_for_JSX_fragment_17015","Expected corresponding closing tag for JSX fragment."),The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option:M(17016,1,"The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_com_17016","The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option."),An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments:M(17017,1,"An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017","An @jsxFrag pragma is required when using an @jsx pragma with JSX fragments."),Unknown_type_acquisition_option_0_Did_you_mean_1:M(17018,1,"Unknown_type_acquisition_option_0_Did_you_mean_1_17018","Unknown type acquisition option '{0}'. Did you mean '{1}'?"),_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:M(17019,1,"_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17019","'{0}' at the end of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"),_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:M(17020,1,"_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17020","'{0}' at the start of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"),Unicode_escape_sequence_cannot_appear_here:M(17021,1,"Unicode_escape_sequence_cannot_appear_here_17021","Unicode escape sequence cannot appear here."),Circularity_detected_while_resolving_configuration_Colon_0:M(18e3,1,"Circularity_detected_while_resolving_configuration_Colon_0_18000","Circularity detected while resolving configuration: {0}"),The_files_list_in_config_file_0_is_empty:M(18002,1,"The_files_list_in_config_file_0_is_empty_18002","The 'files' list in config file '{0}' is empty."),No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2:M(18003,1,"No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003","No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."),File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module:M(80001,2,"File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001","File is a CommonJS module; it may be converted to an ES module."),This_constructor_function_may_be_converted_to_a_class_declaration:M(80002,2,"This_constructor_function_may_be_converted_to_a_class_declaration_80002","This constructor function may be converted to a class declaration."),Import_may_be_converted_to_a_default_import:M(80003,2,"Import_may_be_converted_to_a_default_import_80003","Import may be converted to a default import."),JSDoc_types_may_be_moved_to_TypeScript_types:M(80004,2,"JSDoc_types_may_be_moved_to_TypeScript_types_80004","JSDoc types may be moved to TypeScript types."),require_call_may_be_converted_to_an_import:M(80005,2,"require_call_may_be_converted_to_an_import_80005","'require' call may be converted to an import."),This_may_be_converted_to_an_async_function:M(80006,2,"This_may_be_converted_to_an_async_function_80006","This may be converted to an async function."),await_has_no_effect_on_the_type_of_this_expression:M(80007,2,"await_has_no_effect_on_the_type_of_this_expression_80007","'await' has no effect on the type of this expression."),Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers:M(80008,2,"Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008","Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers."),JSDoc_typedef_may_be_converted_to_TypeScript_type:M(80009,2,"JSDoc_typedef_may_be_converted_to_TypeScript_type_80009","JSDoc typedef may be converted to TypeScript type."),JSDoc_typedefs_may_be_converted_to_TypeScript_types:M(80010,2,"JSDoc_typedefs_may_be_converted_to_TypeScript_types_80010","JSDoc typedefs may be converted to TypeScript types."),Add_missing_super_call:M(90001,3,"Add_missing_super_call_90001","Add missing 'super()' call"),Make_super_call_the_first_statement_in_the_constructor:M(90002,3,"Make_super_call_the_first_statement_in_the_constructor_90002","Make 'super()' call the first statement in the constructor"),Change_extends_to_implements:M(90003,3,"Change_extends_to_implements_90003","Change 'extends' to 'implements'"),Remove_unused_declaration_for_Colon_0:M(90004,3,"Remove_unused_declaration_for_Colon_0_90004","Remove unused declaration for: '{0}'"),Remove_import_from_0:M(90005,3,"Remove_import_from_0_90005","Remove import from '{0}'"),Implement_interface_0:M(90006,3,"Implement_interface_0_90006","Implement interface '{0}'"),Implement_inherited_abstract_class:M(90007,3,"Implement_inherited_abstract_class_90007","Implement inherited abstract class"),Add_0_to_unresolved_variable:M(90008,3,"Add_0_to_unresolved_variable_90008","Add '{0}.' to unresolved variable"),Remove_variable_statement:M(90010,3,"Remove_variable_statement_90010","Remove variable statement"),Remove_template_tag:M(90011,3,"Remove_template_tag_90011","Remove template tag"),Remove_type_parameters:M(90012,3,"Remove_type_parameters_90012","Remove type parameters"),Import_0_from_1:M(90013,3,"Import_0_from_1_90013",`Import '{0}' from "{1}"`),Change_0_to_1:M(90014,3,"Change_0_to_1_90014","Change '{0}' to '{1}'"),Declare_property_0:M(90016,3,"Declare_property_0_90016","Declare property '{0}'"),Add_index_signature_for_property_0:M(90017,3,"Add_index_signature_for_property_0_90017","Add index signature for property '{0}'"),Disable_checking_for_this_file:M(90018,3,"Disable_checking_for_this_file_90018","Disable checking for this file"),Ignore_this_error_message:M(90019,3,"Ignore_this_error_message_90019","Ignore this error message"),Initialize_property_0_in_the_constructor:M(90020,3,"Initialize_property_0_in_the_constructor_90020","Initialize property '{0}' in the constructor"),Initialize_static_property_0:M(90021,3,"Initialize_static_property_0_90021","Initialize static property '{0}'"),Change_spelling_to_0:M(90022,3,"Change_spelling_to_0_90022","Change spelling to '{0}'"),Declare_method_0:M(90023,3,"Declare_method_0_90023","Declare method '{0}'"),Declare_static_method_0:M(90024,3,"Declare_static_method_0_90024","Declare static method '{0}'"),Prefix_0_with_an_underscore:M(90025,3,"Prefix_0_with_an_underscore_90025","Prefix '{0}' with an underscore"),Rewrite_as_the_indexed_access_type_0:M(90026,3,"Rewrite_as_the_indexed_access_type_0_90026","Rewrite as the indexed access type '{0}'"),Declare_static_property_0:M(90027,3,"Declare_static_property_0_90027","Declare static property '{0}'"),Call_decorator_expression:M(90028,3,"Call_decorator_expression_90028","Call decorator expression"),Add_async_modifier_to_containing_function:M(90029,3,"Add_async_modifier_to_containing_function_90029","Add async modifier to containing function"),Replace_infer_0_with_unknown:M(90030,3,"Replace_infer_0_with_unknown_90030","Replace 'infer {0}' with 'unknown'"),Replace_all_unused_infer_with_unknown:M(90031,3,"Replace_all_unused_infer_with_unknown_90031","Replace all unused 'infer' with 'unknown'"),Add_parameter_name:M(90034,3,"Add_parameter_name_90034","Add parameter name"),Declare_private_property_0:M(90035,3,"Declare_private_property_0_90035","Declare private property '{0}'"),Replace_0_with_Promise_1:M(90036,3,"Replace_0_with_Promise_1_90036","Replace '{0}' with 'Promise<{1}>'"),Fix_all_incorrect_return_type_of_an_async_functions:M(90037,3,"Fix_all_incorrect_return_type_of_an_async_functions_90037","Fix all incorrect return type of an async functions"),Declare_private_method_0:M(90038,3,"Declare_private_method_0_90038","Declare private method '{0}'"),Remove_unused_destructuring_declaration:M(90039,3,"Remove_unused_destructuring_declaration_90039","Remove unused destructuring declaration"),Remove_unused_declarations_for_Colon_0:M(90041,3,"Remove_unused_declarations_for_Colon_0_90041","Remove unused declarations for: '{0}'"),Declare_a_private_field_named_0:M(90053,3,"Declare_a_private_field_named_0_90053","Declare a private field named '{0}'."),Includes_imports_of_types_referenced_by_0:M(90054,3,"Includes_imports_of_types_referenced_by_0_90054","Includes imports of types referenced by '{0}'"),Remove_type_from_import_declaration_from_0:M(90055,3,"Remove_type_from_import_declaration_from_0_90055",`Remove 'type' from import declaration from "{0}"`),Remove_type_from_import_of_0_from_1:M(90056,3,"Remove_type_from_import_of_0_from_1_90056",`Remove 'type' from import of '{0}' from "{1}"`),Add_import_from_0:M(90057,3,"Add_import_from_0_90057",'Add import from "{0}"'),Update_import_from_0:M(90058,3,"Update_import_from_0_90058",'Update import from "{0}"'),Export_0_from_module_1:M(90059,3,"Export_0_from_module_1_90059","Export '{0}' from module '{1}'"),Export_all_referenced_locals:M(90060,3,"Export_all_referenced_locals_90060","Export all referenced locals"),Update_modifiers_of_0:M(90061,3,"Update_modifiers_of_0_90061","Update modifiers of '{0}'"),Add_annotation_of_type_0:M(90062,3,"Add_annotation_of_type_0_90062","Add annotation of type '{0}'"),Add_return_type_0:M(90063,3,"Add_return_type_0_90063","Add return type '{0}'"),Extract_base_class_to_variable:M(90064,3,"Extract_base_class_to_variable_90064","Extract base class to variable"),Extract_default_export_to_variable:M(90065,3,"Extract_default_export_to_variable_90065","Extract default export to variable"),Extract_binding_expressions_to_variable:M(90066,3,"Extract_binding_expressions_to_variable_90066","Extract binding expressions to variable"),Add_all_missing_type_annotations:M(90067,3,"Add_all_missing_type_annotations_90067","Add all missing type annotations"),Add_satisfies_and_an_inline_type_assertion_with_0:M(90068,3,"Add_satisfies_and_an_inline_type_assertion_with_0_90068","Add satisfies and an inline type assertion with '{0}'"),Extract_to_variable_and_replace_with_0_as_typeof_0:M(90069,3,"Extract_to_variable_and_replace_with_0_as_typeof_0_90069","Extract to variable and replace with '{0} as typeof {0}'"),Mark_array_literal_as_const:M(90070,3,"Mark_array_literal_as_const_90070","Mark array literal as const"),Annotate_types_of_properties_expando_function_in_a_namespace:M(90071,3,"Annotate_types_of_properties_expando_function_in_a_namespace_90071","Annotate types of properties expando function in a namespace"),Convert_function_to_an_ES2015_class:M(95001,3,"Convert_function_to_an_ES2015_class_95001","Convert function to an ES2015 class"),Convert_0_to_1_in_0:M(95003,3,"Convert_0_to_1_in_0_95003","Convert '{0}' to '{1} in {0}'"),Extract_to_0_in_1:M(95004,3,"Extract_to_0_in_1_95004","Extract to {0} in {1}"),Extract_function:M(95005,3,"Extract_function_95005","Extract function"),Extract_constant:M(95006,3,"Extract_constant_95006","Extract constant"),Extract_to_0_in_enclosing_scope:M(95007,3,"Extract_to_0_in_enclosing_scope_95007","Extract to {0} in enclosing scope"),Extract_to_0_in_1_scope:M(95008,3,"Extract_to_0_in_1_scope_95008","Extract to {0} in {1} scope"),Annotate_with_type_from_JSDoc:M(95009,3,"Annotate_with_type_from_JSDoc_95009","Annotate with type from JSDoc"),Infer_type_of_0_from_usage:M(95011,3,"Infer_type_of_0_from_usage_95011","Infer type of '{0}' from usage"),Infer_parameter_types_from_usage:M(95012,3,"Infer_parameter_types_from_usage_95012","Infer parameter types from usage"),Convert_to_default_import:M(95013,3,"Convert_to_default_import_95013","Convert to default import"),Install_0:M(95014,3,"Install_0_95014","Install '{0}'"),Replace_import_with_0:M(95015,3,"Replace_import_with_0_95015","Replace import with '{0}'."),Use_synthetic_default_member:M(95016,3,"Use_synthetic_default_member_95016","Use synthetic 'default' member."),Convert_to_ES_module:M(95017,3,"Convert_to_ES_module_95017","Convert to ES module"),Add_undefined_type_to_property_0:M(95018,3,"Add_undefined_type_to_property_0_95018","Add 'undefined' type to property '{0}'"),Add_initializer_to_property_0:M(95019,3,"Add_initializer_to_property_0_95019","Add initializer to property '{0}'"),Add_definite_assignment_assertion_to_property_0:M(95020,3,"Add_definite_assignment_assertion_to_property_0_95020","Add definite assignment assertion to property '{0}'"),Convert_all_type_literals_to_mapped_type:M(95021,3,"Convert_all_type_literals_to_mapped_type_95021","Convert all type literals to mapped type"),Add_all_missing_members:M(95022,3,"Add_all_missing_members_95022","Add all missing members"),Infer_all_types_from_usage:M(95023,3,"Infer_all_types_from_usage_95023","Infer all types from usage"),Delete_all_unused_declarations:M(95024,3,"Delete_all_unused_declarations_95024","Delete all unused declarations"),Prefix_all_unused_declarations_with_where_possible:M(95025,3,"Prefix_all_unused_declarations_with_where_possible_95025","Prefix all unused declarations with '_' where possible"),Fix_all_detected_spelling_errors:M(95026,3,"Fix_all_detected_spelling_errors_95026","Fix all detected spelling errors"),Add_initializers_to_all_uninitialized_properties:M(95027,3,"Add_initializers_to_all_uninitialized_properties_95027","Add initializers to all uninitialized properties"),Add_definite_assignment_assertions_to_all_uninitialized_properties:M(95028,3,"Add_definite_assignment_assertions_to_all_uninitialized_properties_95028","Add definite assignment assertions to all uninitialized properties"),Add_undefined_type_to_all_uninitialized_properties:M(95029,3,"Add_undefined_type_to_all_uninitialized_properties_95029","Add undefined type to all uninitialized properties"),Change_all_jsdoc_style_types_to_TypeScript:M(95030,3,"Change_all_jsdoc_style_types_to_TypeScript_95030","Change all jsdoc-style types to TypeScript"),Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types:M(95031,3,"Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031","Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"),Implement_all_unimplemented_interfaces:M(95032,3,"Implement_all_unimplemented_interfaces_95032","Implement all unimplemented interfaces"),Install_all_missing_types_packages:M(95033,3,"Install_all_missing_types_packages_95033","Install all missing types packages"),Rewrite_all_as_indexed_access_types:M(95034,3,"Rewrite_all_as_indexed_access_types_95034","Rewrite all as indexed access types"),Convert_all_to_default_imports:M(95035,3,"Convert_all_to_default_imports_95035","Convert all to default imports"),Make_all_super_calls_the_first_statement_in_their_constructor:M(95036,3,"Make_all_super_calls_the_first_statement_in_their_constructor_95036","Make all 'super()' calls the first statement in their constructor"),Add_qualifier_to_all_unresolved_variables_matching_a_member_name:M(95037,3,"Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037","Add qualifier to all unresolved variables matching a member name"),Change_all_extended_interfaces_to_implements:M(95038,3,"Change_all_extended_interfaces_to_implements_95038","Change all extended interfaces to 'implements'"),Add_all_missing_super_calls:M(95039,3,"Add_all_missing_super_calls_95039","Add all missing super calls"),Implement_all_inherited_abstract_classes:M(95040,3,"Implement_all_inherited_abstract_classes_95040","Implement all inherited abstract classes"),Add_all_missing_async_modifiers:M(95041,3,"Add_all_missing_async_modifiers_95041","Add all missing 'async' modifiers"),Add_ts_ignore_to_all_error_messages:M(95042,3,"Add_ts_ignore_to_all_error_messages_95042","Add '@ts-ignore' to all error messages"),Annotate_everything_with_types_from_JSDoc:M(95043,3,"Annotate_everything_with_types_from_JSDoc_95043","Annotate everything with types from JSDoc"),Add_to_all_uncalled_decorators:M(95044,3,"Add_to_all_uncalled_decorators_95044","Add '()' to all uncalled decorators"),Convert_all_constructor_functions_to_classes:M(95045,3,"Convert_all_constructor_functions_to_classes_95045","Convert all constructor functions to classes"),Generate_get_and_set_accessors:M(95046,3,"Generate_get_and_set_accessors_95046","Generate 'get' and 'set' accessors"),Convert_require_to_import:M(95047,3,"Convert_require_to_import_95047","Convert 'require' to 'import'"),Convert_all_require_to_import:M(95048,3,"Convert_all_require_to_import_95048","Convert all 'require' to 'import'"),Move_to_a_new_file:M(95049,3,"Move_to_a_new_file_95049","Move to a new file"),Remove_unreachable_code:M(95050,3,"Remove_unreachable_code_95050","Remove unreachable code"),Remove_all_unreachable_code:M(95051,3,"Remove_all_unreachable_code_95051","Remove all unreachable code"),Add_missing_typeof:M(95052,3,"Add_missing_typeof_95052","Add missing 'typeof'"),Remove_unused_label:M(95053,3,"Remove_unused_label_95053","Remove unused label"),Remove_all_unused_labels:M(95054,3,"Remove_all_unused_labels_95054","Remove all unused labels"),Convert_0_to_mapped_object_type:M(95055,3,"Convert_0_to_mapped_object_type_95055","Convert '{0}' to mapped object type"),Convert_namespace_import_to_named_imports:M(95056,3,"Convert_namespace_import_to_named_imports_95056","Convert namespace import to named imports"),Convert_named_imports_to_namespace_import:M(95057,3,"Convert_named_imports_to_namespace_import_95057","Convert named imports to namespace import"),Add_or_remove_braces_in_an_arrow_function:M(95058,3,"Add_or_remove_braces_in_an_arrow_function_95058","Add or remove braces in an arrow function"),Add_braces_to_arrow_function:M(95059,3,"Add_braces_to_arrow_function_95059","Add braces to arrow function"),Remove_braces_from_arrow_function:M(95060,3,"Remove_braces_from_arrow_function_95060","Remove braces from arrow function"),Convert_default_export_to_named_export:M(95061,3,"Convert_default_export_to_named_export_95061","Convert default export to named export"),Convert_named_export_to_default_export:M(95062,3,"Convert_named_export_to_default_export_95062","Convert named export to default export"),Add_missing_enum_member_0:M(95063,3,"Add_missing_enum_member_0_95063","Add missing enum member '{0}'"),Add_all_missing_imports:M(95064,3,"Add_all_missing_imports_95064","Add all missing imports"),Convert_to_async_function:M(95065,3,"Convert_to_async_function_95065","Convert to async function"),Convert_all_to_async_functions:M(95066,3,"Convert_all_to_async_functions_95066","Convert all to async functions"),Add_missing_call_parentheses:M(95067,3,"Add_missing_call_parentheses_95067","Add missing call parentheses"),Add_all_missing_call_parentheses:M(95068,3,"Add_all_missing_call_parentheses_95068","Add all missing call parentheses"),Add_unknown_conversion_for_non_overlapping_types:M(95069,3,"Add_unknown_conversion_for_non_overlapping_types_95069","Add 'unknown' conversion for non-overlapping types"),Add_unknown_to_all_conversions_of_non_overlapping_types:M(95070,3,"Add_unknown_to_all_conversions_of_non_overlapping_types_95070","Add 'unknown' to all conversions of non-overlapping types"),Add_missing_new_operator_to_call:M(95071,3,"Add_missing_new_operator_to_call_95071","Add missing 'new' operator to call"),Add_missing_new_operator_to_all_calls:M(95072,3,"Add_missing_new_operator_to_all_calls_95072","Add missing 'new' operator to all calls"),Add_names_to_all_parameters_without_names:M(95073,3,"Add_names_to_all_parameters_without_names_95073","Add names to all parameters without names"),Enable_the_experimentalDecorators_option_in_your_configuration_file:M(95074,3,"Enable_the_experimentalDecorators_option_in_your_configuration_file_95074","Enable the 'experimentalDecorators' option in your configuration file"),Convert_parameters_to_destructured_object:M(95075,3,"Convert_parameters_to_destructured_object_95075","Convert parameters to destructured object"),Extract_type:M(95077,3,"Extract_type_95077","Extract type"),Extract_to_type_alias:M(95078,3,"Extract_to_type_alias_95078","Extract to type alias"),Extract_to_typedef:M(95079,3,"Extract_to_typedef_95079","Extract to typedef"),Infer_this_type_of_0_from_usage:M(95080,3,"Infer_this_type_of_0_from_usage_95080","Infer 'this' type of '{0}' from usage"),Add_const_to_unresolved_variable:M(95081,3,"Add_const_to_unresolved_variable_95081","Add 'const' to unresolved variable"),Add_const_to_all_unresolved_variables:M(95082,3,"Add_const_to_all_unresolved_variables_95082","Add 'const' to all unresolved variables"),Add_await:M(95083,3,"Add_await_95083","Add 'await'"),Add_await_to_initializer_for_0:M(95084,3,"Add_await_to_initializer_for_0_95084","Add 'await' to initializer for '{0}'"),Fix_all_expressions_possibly_missing_await:M(95085,3,"Fix_all_expressions_possibly_missing_await_95085","Fix all expressions possibly missing 'await'"),Remove_unnecessary_await:M(95086,3,"Remove_unnecessary_await_95086","Remove unnecessary 'await'"),Remove_all_unnecessary_uses_of_await:M(95087,3,"Remove_all_unnecessary_uses_of_await_95087","Remove all unnecessary uses of 'await'"),Enable_the_jsx_flag_in_your_configuration_file:M(95088,3,"Enable_the_jsx_flag_in_your_configuration_file_95088","Enable the '--jsx' flag in your configuration file"),Add_await_to_initializers:M(95089,3,"Add_await_to_initializers_95089","Add 'await' to initializers"),Extract_to_interface:M(95090,3,"Extract_to_interface_95090","Extract to interface"),Convert_to_a_bigint_numeric_literal:M(95091,3,"Convert_to_a_bigint_numeric_literal_95091","Convert to a bigint numeric literal"),Convert_all_to_bigint_numeric_literals:M(95092,3,"Convert_all_to_bigint_numeric_literals_95092","Convert all to bigint numeric literals"),Convert_const_to_let:M(95093,3,"Convert_const_to_let_95093","Convert 'const' to 'let'"),Prefix_with_declare:M(95094,3,"Prefix_with_declare_95094","Prefix with 'declare'"),Prefix_all_incorrect_property_declarations_with_declare:M(95095,3,"Prefix_all_incorrect_property_declarations_with_declare_95095","Prefix all incorrect property declarations with 'declare'"),Convert_to_template_string:M(95096,3,"Convert_to_template_string_95096","Convert to template string"),Add_export_to_make_this_file_into_a_module:M(95097,3,"Add_export_to_make_this_file_into_a_module_95097","Add 'export {}' to make this file into a module"),Set_the_target_option_in_your_configuration_file_to_0:M(95098,3,"Set_the_target_option_in_your_configuration_file_to_0_95098","Set the 'target' option in your configuration file to '{0}'"),Set_the_module_option_in_your_configuration_file_to_0:M(95099,3,"Set_the_module_option_in_your_configuration_file_to_0_95099","Set the 'module' option in your configuration file to '{0}'"),Convert_invalid_character_to_its_html_entity_code:M(95100,3,"Convert_invalid_character_to_its_html_entity_code_95100","Convert invalid character to its html entity code"),Convert_all_invalid_characters_to_HTML_entity_code:M(95101,3,"Convert_all_invalid_characters_to_HTML_entity_code_95101","Convert all invalid characters to HTML entity code"),Convert_all_const_to_let:M(95102,3,"Convert_all_const_to_let_95102","Convert all 'const' to 'let'"),Convert_function_expression_0_to_arrow_function:M(95105,3,"Convert_function_expression_0_to_arrow_function_95105","Convert function expression '{0}' to arrow function"),Convert_function_declaration_0_to_arrow_function:M(95106,3,"Convert_function_declaration_0_to_arrow_function_95106","Convert function declaration '{0}' to arrow function"),Fix_all_implicit_this_errors:M(95107,3,"Fix_all_implicit_this_errors_95107","Fix all implicit-'this' errors"),Wrap_invalid_character_in_an_expression_container:M(95108,3,"Wrap_invalid_character_in_an_expression_container_95108","Wrap invalid character in an expression container"),Wrap_all_invalid_characters_in_an_expression_container:M(95109,3,"Wrap_all_invalid_characters_in_an_expression_container_95109","Wrap all invalid characters in an expression container"),Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file:M(95110,3,"Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110","Visit https://aka.ms/tsconfig to read more about this file"),Add_a_return_statement:M(95111,3,"Add_a_return_statement_95111","Add a return statement"),Remove_braces_from_arrow_function_body:M(95112,3,"Remove_braces_from_arrow_function_body_95112","Remove braces from arrow function body"),Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal:M(95113,3,"Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113","Wrap the following body with parentheses which should be an object literal"),Add_all_missing_return_statement:M(95114,3,"Add_all_missing_return_statement_95114","Add all missing return statement"),Remove_braces_from_all_arrow_function_bodies_with_relevant_issues:M(95115,3,"Remove_braces_from_all_arrow_function_bodies_with_relevant_issues_95115","Remove braces from all arrow function bodies with relevant issues"),Wrap_all_object_literal_with_parentheses:M(95116,3,"Wrap_all_object_literal_with_parentheses_95116","Wrap all object literal with parentheses"),Move_labeled_tuple_element_modifiers_to_labels:M(95117,3,"Move_labeled_tuple_element_modifiers_to_labels_95117","Move labeled tuple element modifiers to labels"),Convert_overload_list_to_single_signature:M(95118,3,"Convert_overload_list_to_single_signature_95118","Convert overload list to single signature"),Generate_get_and_set_accessors_for_all_overriding_properties:M(95119,3,"Generate_get_and_set_accessors_for_all_overriding_properties_95119","Generate 'get' and 'set' accessors for all overriding properties"),Wrap_in_JSX_fragment:M(95120,3,"Wrap_in_JSX_fragment_95120","Wrap in JSX fragment"),Wrap_all_unparented_JSX_in_JSX_fragment:M(95121,3,"Wrap_all_unparented_JSX_in_JSX_fragment_95121","Wrap all unparented JSX in JSX fragment"),Convert_arrow_function_or_function_expression:M(95122,3,"Convert_arrow_function_or_function_expression_95122","Convert arrow function or function expression"),Convert_to_anonymous_function:M(95123,3,"Convert_to_anonymous_function_95123","Convert to anonymous function"),Convert_to_named_function:M(95124,3,"Convert_to_named_function_95124","Convert to named function"),Convert_to_arrow_function:M(95125,3,"Convert_to_arrow_function_95125","Convert to arrow function"),Remove_parentheses:M(95126,3,"Remove_parentheses_95126","Remove parentheses"),Could_not_find_a_containing_arrow_function:M(95127,3,"Could_not_find_a_containing_arrow_function_95127","Could not find a containing arrow function"),Containing_function_is_not_an_arrow_function:M(95128,3,"Containing_function_is_not_an_arrow_function_95128","Containing function is not an arrow function"),Could_not_find_export_statement:M(95129,3,"Could_not_find_export_statement_95129","Could not find export statement"),This_file_already_has_a_default_export:M(95130,3,"This_file_already_has_a_default_export_95130","This file already has a default export"),Could_not_find_import_clause:M(95131,3,"Could_not_find_import_clause_95131","Could not find import clause"),Could_not_find_namespace_import_or_named_imports:M(95132,3,"Could_not_find_namespace_import_or_named_imports_95132","Could not find namespace import or named imports"),Selection_is_not_a_valid_type_node:M(95133,3,"Selection_is_not_a_valid_type_node_95133","Selection is not a valid type node"),No_type_could_be_extracted_from_this_type_node:M(95134,3,"No_type_could_be_extracted_from_this_type_node_95134","No type could be extracted from this type node"),Could_not_find_property_for_which_to_generate_accessor:M(95135,3,"Could_not_find_property_for_which_to_generate_accessor_95135","Could not find property for which to generate accessor"),Name_is_not_valid:M(95136,3,"Name_is_not_valid_95136","Name is not valid"),Can_only_convert_property_with_modifier:M(95137,3,"Can_only_convert_property_with_modifier_95137","Can only convert property with modifier"),Switch_each_misused_0_to_1:M(95138,3,"Switch_each_misused_0_to_1_95138","Switch each misused '{0}' to '{1}'"),Convert_to_optional_chain_expression:M(95139,3,"Convert_to_optional_chain_expression_95139","Convert to optional chain expression"),Could_not_find_convertible_access_expression:M(95140,3,"Could_not_find_convertible_access_expression_95140","Could not find convertible access expression"),Could_not_find_matching_access_expressions:M(95141,3,"Could_not_find_matching_access_expressions_95141","Could not find matching access expressions"),Can_only_convert_logical_AND_access_chains:M(95142,3,"Can_only_convert_logical_AND_access_chains_95142","Can only convert logical AND access chains"),Add_void_to_Promise_resolved_without_a_value:M(95143,3,"Add_void_to_Promise_resolved_without_a_value_95143","Add 'void' to Promise resolved without a value"),Add_void_to_all_Promises_resolved_without_a_value:M(95144,3,"Add_void_to_all_Promises_resolved_without_a_value_95144","Add 'void' to all Promises resolved without a value"),Use_element_access_for_0:M(95145,3,"Use_element_access_for_0_95145","Use element access for '{0}'"),Use_element_access_for_all_undeclared_properties:M(95146,3,"Use_element_access_for_all_undeclared_properties_95146","Use element access for all undeclared properties."),Delete_all_unused_imports:M(95147,3,"Delete_all_unused_imports_95147","Delete all unused imports"),Infer_function_return_type:M(95148,3,"Infer_function_return_type_95148","Infer function return type"),Return_type_must_be_inferred_from_a_function:M(95149,3,"Return_type_must_be_inferred_from_a_function_95149","Return type must be inferred from a function"),Could_not_determine_function_return_type:M(95150,3,"Could_not_determine_function_return_type_95150","Could not determine function return type"),Could_not_convert_to_arrow_function:M(95151,3,"Could_not_convert_to_arrow_function_95151","Could not convert to arrow function"),Could_not_convert_to_named_function:M(95152,3,"Could_not_convert_to_named_function_95152","Could not convert to named function"),Could_not_convert_to_anonymous_function:M(95153,3,"Could_not_convert_to_anonymous_function_95153","Could not convert to anonymous function"),Can_only_convert_string_concatenations_and_string_literals:M(95154,3,"Can_only_convert_string_concatenations_and_string_literals_95154","Can only convert string concatenations and string literals"),Selection_is_not_a_valid_statement_or_statements:M(95155,3,"Selection_is_not_a_valid_statement_or_statements_95155","Selection is not a valid statement or statements"),Add_missing_function_declaration_0:M(95156,3,"Add_missing_function_declaration_0_95156","Add missing function declaration '{0}'"),Add_all_missing_function_declarations:M(95157,3,"Add_all_missing_function_declarations_95157","Add all missing function declarations"),Method_not_implemented:M(95158,3,"Method_not_implemented_95158","Method not implemented."),Function_not_implemented:M(95159,3,"Function_not_implemented_95159","Function not implemented."),Add_override_modifier:M(95160,3,"Add_override_modifier_95160","Add 'override' modifier"),Remove_override_modifier:M(95161,3,"Remove_override_modifier_95161","Remove 'override' modifier"),Add_all_missing_override_modifiers:M(95162,3,"Add_all_missing_override_modifiers_95162","Add all missing 'override' modifiers"),Remove_all_unnecessary_override_modifiers:M(95163,3,"Remove_all_unnecessary_override_modifiers_95163","Remove all unnecessary 'override' modifiers"),Can_only_convert_named_export:M(95164,3,"Can_only_convert_named_export_95164","Can only convert named export"),Add_missing_properties:M(95165,3,"Add_missing_properties_95165","Add missing properties"),Add_all_missing_properties:M(95166,3,"Add_all_missing_properties_95166","Add all missing properties"),Add_missing_attributes:M(95167,3,"Add_missing_attributes_95167","Add missing attributes"),Add_all_missing_attributes:M(95168,3,"Add_all_missing_attributes_95168","Add all missing attributes"),Add_undefined_to_optional_property_type:M(95169,3,"Add_undefined_to_optional_property_type_95169","Add 'undefined' to optional property type"),Convert_named_imports_to_default_import:M(95170,3,"Convert_named_imports_to_default_import_95170","Convert named imports to default import"),Delete_unused_param_tag_0:M(95171,3,"Delete_unused_param_tag_0_95171","Delete unused '@param' tag '{0}'"),Delete_all_unused_param_tags:M(95172,3,"Delete_all_unused_param_tags_95172","Delete all unused '@param' tags"),Rename_param_tag_name_0_to_1:M(95173,3,"Rename_param_tag_name_0_to_1_95173","Rename '@param' tag name '{0}' to '{1}'"),Use_0:M(95174,3,"Use_0_95174","Use `{0}`."),Use_Number_isNaN_in_all_conditions:M(95175,3,"Use_Number_isNaN_in_all_conditions_95175","Use `Number.isNaN` in all conditions."),Convert_typedef_to_TypeScript_type:M(95176,3,"Convert_typedef_to_TypeScript_type_95176","Convert typedef to TypeScript type."),Convert_all_typedef_to_TypeScript_types:M(95177,3,"Convert_all_typedef_to_TypeScript_types_95177","Convert all typedef to TypeScript types."),Move_to_file:M(95178,3,"Move_to_file_95178","Move to file"),Cannot_move_to_file_selected_file_is_invalid:M(95179,3,"Cannot_move_to_file_selected_file_is_invalid_95179","Cannot move to file, selected file is invalid"),Use_import_type:M(95180,3,"Use_import_type_95180","Use 'import type'"),Use_type_0:M(95181,3,"Use_type_0_95181","Use 'type {0}'"),Fix_all_with_type_only_imports:M(95182,3,"Fix_all_with_type_only_imports_95182","Fix all with type-only imports"),Cannot_move_statements_to_the_selected_file:M(95183,3,"Cannot_move_statements_to_the_selected_file_95183","Cannot move statements to the selected file"),Inline_variable:M(95184,3,"Inline_variable_95184","Inline variable"),Could_not_find_variable_to_inline:M(95185,3,"Could_not_find_variable_to_inline_95185","Could not find variable to inline."),Variables_with_multiple_declarations_cannot_be_inlined:M(95186,3,"Variables_with_multiple_declarations_cannot_be_inlined_95186","Variables with multiple declarations cannot be inlined."),Add_missing_comma_for_object_member_completion_0:M(95187,3,"Add_missing_comma_for_object_member_completion_0_95187","Add missing comma for object member completion '{0}'."),Add_missing_parameter_to_0:M(95188,3,"Add_missing_parameter_to_0_95188","Add missing parameter to '{0}'"),Add_missing_parameters_to_0:M(95189,3,"Add_missing_parameters_to_0_95189","Add missing parameters to '{0}'"),Add_all_missing_parameters:M(95190,3,"Add_all_missing_parameters_95190","Add all missing parameters"),Add_optional_parameter_to_0:M(95191,3,"Add_optional_parameter_to_0_95191","Add optional parameter to '{0}'"),Add_optional_parameters_to_0:M(95192,3,"Add_optional_parameters_to_0_95192","Add optional parameters to '{0}'"),Add_all_optional_parameters:M(95193,3,"Add_all_optional_parameters_95193","Add all optional parameters"),Wrap_in_parentheses:M(95194,3,"Wrap_in_parentheses_95194","Wrap in parentheses"),Wrap_all_invalid_decorator_expressions_in_parentheses:M(95195,3,"Wrap_all_invalid_decorator_expressions_in_parentheses_95195","Wrap all invalid decorator expressions in parentheses"),No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer:M(18004,1,"No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004","No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),Classes_may_not_have_a_field_named_constructor:M(18006,1,"Classes_may_not_have_a_field_named_constructor_18006","Classes may not have a field named 'constructor'."),JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array:M(18007,1,"JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007","JSX expressions may not use the comma operator. Did you mean to write an array?"),Private_identifiers_cannot_be_used_as_parameters:M(18009,1,"Private_identifiers_cannot_be_used_as_parameters_18009","Private identifiers cannot be used as parameters."),An_accessibility_modifier_cannot_be_used_with_a_private_identifier:M(18010,1,"An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010","An accessibility modifier cannot be used with a private identifier."),The_operand_of_a_delete_operator_cannot_be_a_private_identifier:M(18011,1,"The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011","The operand of a 'delete' operator cannot be a private identifier."),constructor_is_a_reserved_word:M(18012,1,"constructor_is_a_reserved_word_18012","'#constructor' is a reserved word."),Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier:M(18013,1,"Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013","Property '{0}' is not accessible outside class '{1}' because it has a private identifier."),The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling:M(18014,1,"The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014","The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling."),Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2:M(18015,1,"Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015","Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'."),Private_identifiers_are_not_allowed_outside_class_bodies:M(18016,1,"Private_identifiers_are_not_allowed_outside_class_bodies_18016","Private identifiers are not allowed outside class bodies."),The_shadowing_declaration_of_0_is_defined_here:M(18017,1,"The_shadowing_declaration_of_0_is_defined_here_18017","The shadowing declaration of '{0}' is defined here"),The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here:M(18018,1,"The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018","The declaration of '{0}' that you probably intended to use is defined here"),_0_modifier_cannot_be_used_with_a_private_identifier:M(18019,1,"_0_modifier_cannot_be_used_with_a_private_identifier_18019","'{0}' modifier cannot be used with a private identifier."),An_enum_member_cannot_be_named_with_a_private_identifier:M(18024,1,"An_enum_member_cannot_be_named_with_a_private_identifier_18024","An enum member cannot be named with a private identifier."),can_only_be_used_at_the_start_of_a_file:M(18026,1,"can_only_be_used_at_the_start_of_a_file_18026","'#!' can only be used at the start of a file."),Compiler_reserves_name_0_when_emitting_private_identifier_downlevel:M(18027,1,"Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027","Compiler reserves name '{0}' when emitting private identifier downlevel."),Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher:M(18028,1,"Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028","Private identifiers are only available when targeting ECMAScript 2015 and higher."),Private_identifiers_are_not_allowed_in_variable_declarations:M(18029,1,"Private_identifiers_are_not_allowed_in_variable_declarations_18029","Private identifiers are not allowed in variable declarations."),An_optional_chain_cannot_contain_private_identifiers:M(18030,1,"An_optional_chain_cannot_contain_private_identifiers_18030","An optional chain cannot contain private identifiers."),The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents:M(18031,1,"The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031","The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents."),The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some:M(18032,1,"The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032","The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some."),Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values:M(18033,1,"Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values_18033","Type '{0}' is not assignable to type '{1}' as required for computed enum member values."),Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment:M(18034,3,"Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034","Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."),Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name:M(18035,1,"Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035","Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."),Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator:M(18036,1,"Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036","Class decorators can't be used with static private identifier. Consider removing the experimental decorator."),await_expression_cannot_be_used_inside_a_class_static_block:M(18037,1,"await_expression_cannot_be_used_inside_a_class_static_block_18037","'await' expression cannot be used inside a class static block."),for_await_loops_cannot_be_used_inside_a_class_static_block:M(18038,1,"for_await_loops_cannot_be_used_inside_a_class_static_block_18038","'for await' loops cannot be used inside a class static block."),Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block:M(18039,1,"Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039","Invalid use of '{0}'. It cannot be used inside a class static block."),A_return_statement_cannot_be_used_inside_a_class_static_block:M(18041,1,"A_return_statement_cannot_be_used_inside_a_class_static_block_18041","A 'return' statement cannot be used inside a class static block."),_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation:M(18042,1,"_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042","'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."),Types_cannot_appear_in_export_declarations_in_JavaScript_files:M(18043,1,"Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043","Types cannot appear in export declarations in JavaScript files."),_0_is_automatically_exported_here:M(18044,3,"_0_is_automatically_exported_here_18044","'{0}' is automatically exported here."),Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher:M(18045,1,"Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045","Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."),_0_is_of_type_unknown:M(18046,1,"_0_is_of_type_unknown_18046","'{0}' is of type 'unknown'."),_0_is_possibly_null:M(18047,1,"_0_is_possibly_null_18047","'{0}' is possibly 'null'."),_0_is_possibly_undefined:M(18048,1,"_0_is_possibly_undefined_18048","'{0}' is possibly 'undefined'."),_0_is_possibly_null_or_undefined:M(18049,1,"_0_is_possibly_null_or_undefined_18049","'{0}' is possibly 'null' or 'undefined'."),The_value_0_cannot_be_used_here:M(18050,1,"The_value_0_cannot_be_used_here_18050","The value '{0}' cannot be used here."),Compiler_option_0_cannot_be_given_an_empty_string:M(18051,1,"Compiler_option_0_cannot_be_given_an_empty_string_18051","Compiler option '{0}' cannot be given an empty string."),Its_type_0_is_not_a_valid_JSX_element_type:M(18053,1,"Its_type_0_is_not_a_valid_JSX_element_type_18053","Its type '{0}' is not a valid JSX element type."),await_using_statements_cannot_be_used_inside_a_class_static_block:M(18054,1,"await_using_statements_cannot_be_used_inside_a_class_static_block_18054","'await using' statements cannot be used inside a class static block."),_0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is_enabled:M(18055,1,"_0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is__18055","'{0}' has a string type, but must have syntactically recognizable string syntax when 'isolatedModules' is enabled."),Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled:M(18056,1,"Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is__18056","Enum member following a non-literal numeric member must have an initializer when 'isolatedModules' is enabled."),String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es2020:M(18057,1,"String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es_18057","String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'.")};function D_(t){return t>=80}function Vke(t){return t===32||D_(t)}var tG={abstract:128,accessor:129,any:133,as:130,asserts:131,assert:132,bigint:163,boolean:136,break:83,case:84,catch:85,class:86,continue:88,const:87,constructor:137,debugger:89,declare:138,default:90,delete:91,do:92,else:93,enum:94,export:95,extends:96,false:97,finally:98,for:99,from:161,function:100,get:139,if:101,implements:119,import:102,in:103,infer:140,instanceof:104,interface:120,intrinsic:141,is:142,keyof:143,let:121,module:144,namespace:145,never:146,new:105,null:106,number:150,object:151,package:122,private:123,protected:124,public:125,override:164,out:147,readonly:148,require:149,global:162,return:107,satisfies:152,set:153,static:126,string:154,super:108,switch:109,symbol:155,this:110,throw:111,true:112,try:113,type:156,typeof:114,undefined:157,unique:158,unknown:159,using:160,var:115,void:116,while:117,with:118,yield:127,async:134,await:135,of:165},e4t=new Map(Object.entries(tG)),oXe=new Map(Object.entries({...tG,"{":19,"}":20,"(":21,")":22,"[":23,"]":24,".":25,"...":26,";":27,",":28,"<":30,">":32,"<=":33,">=":34,"==":35,"!=":36,"===":37,"!==":38,"=>":39,"+":40,"-":41,"**":43,"*":42,"/":44,"%":45,"++":46,"--":47,"<<":48,"</":31,">>":49,">>>":50,"&":51,"|":52,"^":53,"!":54,"~":55,"&&":56,"||":57,"?":58,"??":61,"?.":29,":":59,"=":64,"+=":65,"-=":66,"*=":67,"**=":68,"/=":69,"%=":70,"<<=":71,">>=":72,">>>=":73,"&=":74,"|=":75,"^=":79,"||=":76,"&&=":77,"??=":78,"@":60,"#":63,"`":62})),aXe=new Map([[100,1],[103,2],[105,4],[109,8],[115,16],[117,32],[118,64],[121,128]]),t4t=new Map([[1,9],[16,5],[32,2],[64,99],[128,2]]),i4t=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1319,1329,1366,1369,1369,1377,1415,1488,1514,1520,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2208,2208,2210,2220,2308,2361,2365,2365,2384,2384,2392,2401,2417,2423,2425,2431,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3133,3160,3161,3168,3169,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3294,3294,3296,3297,3313,3314,3333,3340,3342,3344,3346,3386,3389,3389,3406,3406,3424,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5905,5920,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6263,6272,6312,6314,6314,6320,6389,6400,6428,6480,6509,6512,6516,6528,6571,6593,6599,6656,6678,6688,6740,6823,6823,6917,6963,6981,6987,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7401,7404,7406,7409,7413,7414,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11823,11823,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42647,42656,42735,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43648,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],n4t=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1319,1329,1366,1369,1369,1377,1415,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1520,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2048,2093,2112,2139,2208,2208,2210,2220,2276,2302,2304,2403,2406,2415,2417,2423,2425,2431,2433,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2902,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3140,3142,3144,3146,3149,3157,3158,3160,3161,3168,3171,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3299,3302,3311,3313,3314,3330,3331,3333,3340,3342,3344,3346,3386,3389,3396,3398,3400,3402,3406,3415,3415,3424,3427,3430,3439,3450,3455,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3769,3771,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5908,5920,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6160,6169,6176,6263,6272,6314,6320,6389,6400,6428,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6617,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6912,6987,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7376,7378,7380,7414,7424,7654,7676,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8204,8205,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,11823,11823,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12442,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42647,42655,42737,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43047,43072,43123,43136,43204,43216,43225,43232,43255,43259,43259,43264,43309,43312,43347,43360,43388,43392,43456,43471,43481,43520,43574,43584,43597,43600,43609,43616,43638,43642,43643,43648,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65062,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],r4t=[65,90,97,122,170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,895,895,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1327,1329,1366,1369,1369,1376,1416,1488,1514,1519,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2144,2154,2160,2183,2185,2190,2208,2249,2308,2361,2365,2365,2384,2384,2392,2401,2417,2432,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2556,2556,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2809,2809,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3129,3133,3133,3160,3162,3165,3165,3168,3169,3200,3200,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3293,3294,3296,3297,3313,3314,3332,3340,3342,3344,3346,3386,3389,3389,3406,3406,3412,3414,3423,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5905,5919,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6264,6272,6312,6314,6314,6320,6389,6400,6430,6480,6509,6512,6516,6528,6571,6576,6601,6656,6678,6688,6740,6823,6823,6917,6963,6981,6988,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7296,7304,7312,7354,7357,7359,7401,7404,7406,7411,7413,7414,7418,7418,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12443,12447,12449,12538,12540,12543,12549,12591,12593,12686,12704,12735,12784,12799,13312,19903,19968,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42653,42656,42735,42775,42783,42786,42888,42891,42954,42960,42961,42963,42963,42965,42969,42994,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43261,43262,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43488,43492,43494,43503,43514,43518,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43646,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866,43868,43881,43888,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66176,66204,66208,66256,66304,66335,66349,66378,66384,66421,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,66736,66771,66776,66811,66816,66855,66864,66915,66928,66938,66940,66954,66956,66962,66964,66965,66967,66977,66979,66993,66995,67001,67003,67004,67072,67382,67392,67413,67424,67431,67456,67461,67463,67504,67506,67514,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096,68096,68112,68115,68117,68119,68121,68149,68192,68220,68224,68252,68288,68295,68297,68324,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864,68899,69248,69289,69296,69297,69376,69404,69415,69415,69424,69445,69488,69505,69552,69572,69600,69622,69635,69687,69745,69746,69749,69749,69763,69807,69840,69864,69891,69926,69956,69956,69959,69959,69968,70002,70006,70006,70019,70066,70081,70084,70106,70106,70108,70108,70144,70161,70163,70187,70207,70208,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312,70320,70366,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451,70453,70457,70461,70461,70480,70480,70493,70497,70656,70708,70727,70730,70751,70753,70784,70831,70852,70853,70855,70855,71040,71086,71128,71131,71168,71215,71236,71236,71296,71338,71352,71352,71424,71450,71488,71494,71680,71723,71840,71903,71935,71942,71945,71945,71948,71955,71957,71958,71960,71983,71999,71999,72001,72001,72096,72103,72106,72144,72161,72161,72163,72163,72192,72192,72203,72242,72250,72250,72272,72272,72284,72329,72349,72349,72368,72440,72704,72712,72714,72750,72768,72768,72818,72847,72960,72966,72968,72969,72971,73008,73030,73030,73056,73061,73063,73064,73066,73097,73112,73112,73440,73458,73474,73474,73476,73488,73490,73523,73648,73648,73728,74649,74752,74862,74880,75075,77712,77808,77824,78895,78913,78918,82944,83526,92160,92728,92736,92766,92784,92862,92880,92909,92928,92975,92992,92995,93027,93047,93053,93071,93760,93823,93952,94026,94032,94032,94099,94111,94176,94177,94179,94179,94208,100343,100352,101589,101632,101640,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,113664,113770,113776,113788,113792,113800,113808,113817,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770,120772,120779,122624,122654,122661,122666,122928,122989,123136,123180,123191,123197,123214,123214,123536,123565,123584,123627,124112,124139,124896,124902,124904,124907,124909,124910,124912,124926,124928,125124,125184,125251,125259,125259,126464,126467,126469,126495,126497,126498,126500,126500,126503,126503,126505,126514,126516,126519,126521,126521,126523,126523,126530,126530,126535,126535,126537,126537,126539,126539,126541,126543,126545,126546,126548,126548,126551,126551,126553,126553,126555,126555,126557,126557,126559,126559,126561,126562,126564,126564,126567,126570,126572,126578,126580,126583,126585,126588,126590,126590,126592,126601,126603,126619,126625,126627,126629,126633,126635,126651,131072,173791,173824,177977,177984,178205,178208,183969,183984,191456,191472,192093,194560,195101,196608,201546,201552,205743],s4t=[48,57,65,90,95,95,97,122,170,170,181,181,183,183,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,895,895,902,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1327,1329,1366,1369,1369,1376,1416,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1519,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2045,2045,2048,2093,2112,2139,2144,2154,2160,2183,2185,2190,2200,2273,2275,2403,2406,2415,2417,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2556,2556,2558,2558,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2809,2815,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2901,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3072,3084,3086,3088,3090,3112,3114,3129,3132,3140,3142,3144,3146,3149,3157,3158,3160,3162,3165,3165,3168,3171,3174,3183,3200,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3293,3294,3296,3299,3302,3311,3313,3315,3328,3340,3342,3344,3346,3396,3398,3400,3402,3406,3412,3415,3423,3427,3430,3439,3450,3455,3457,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3558,3567,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3773,3776,3780,3782,3782,3784,3790,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4969,4977,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5909,5919,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6159,6169,6176,6264,6272,6314,6320,6389,6400,6430,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6618,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6832,6845,6847,6862,6912,6988,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7296,7304,7312,7354,7357,7359,7376,7378,7380,7418,7424,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8204,8205,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12447,12449,12543,12549,12591,12593,12686,12704,12735,12784,12799,13312,19903,19968,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42737,42775,42783,42786,42888,42891,42954,42960,42961,42963,42963,42965,42969,42994,43047,43052,43052,43072,43123,43136,43205,43216,43225,43232,43255,43259,43259,43261,43309,43312,43347,43360,43388,43392,43456,43471,43481,43488,43518,43520,43574,43584,43597,43600,43609,43616,43638,43642,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866,43868,43881,43888,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65071,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65381,65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66045,66045,66176,66204,66208,66256,66272,66272,66304,66335,66349,66378,66384,66426,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,66720,66729,66736,66771,66776,66811,66816,66855,66864,66915,66928,66938,66940,66954,66956,66962,66964,66965,66967,66977,66979,66993,66995,67001,67003,67004,67072,67382,67392,67413,67424,67431,67456,67461,67463,67504,67506,67514,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096,68099,68101,68102,68108,68115,68117,68119,68121,68149,68152,68154,68159,68159,68192,68220,68224,68252,68288,68295,68297,68326,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864,68903,68912,68921,69248,69289,69291,69292,69296,69297,69373,69404,69415,69415,69424,69456,69488,69509,69552,69572,69600,69622,69632,69702,69734,69749,69759,69818,69826,69826,69840,69864,69872,69881,69888,69940,69942,69951,69956,69959,69968,70003,70006,70006,70016,70084,70089,70092,70094,70106,70108,70108,70144,70161,70163,70199,70206,70209,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312,70320,70378,70384,70393,70400,70403,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451,70453,70457,70459,70468,70471,70472,70475,70477,70480,70480,70487,70487,70493,70499,70502,70508,70512,70516,70656,70730,70736,70745,70750,70753,70784,70853,70855,70855,70864,70873,71040,71093,71096,71104,71128,71133,71168,71232,71236,71236,71248,71257,71296,71352,71360,71369,71424,71450,71453,71467,71472,71481,71488,71494,71680,71738,71840,71913,71935,71942,71945,71945,71948,71955,71957,71958,71960,71989,71991,71992,71995,72003,72016,72025,72096,72103,72106,72151,72154,72161,72163,72164,72192,72254,72263,72263,72272,72345,72349,72349,72368,72440,72704,72712,72714,72758,72760,72768,72784,72793,72818,72847,72850,72871,72873,72886,72960,72966,72968,72969,72971,73014,73018,73018,73020,73021,73023,73031,73040,73049,73056,73061,73063,73064,73066,73102,73104,73105,73107,73112,73120,73129,73440,73462,73472,73488,73490,73530,73534,73538,73552,73561,73648,73648,73728,74649,74752,74862,74880,75075,77712,77808,77824,78895,78912,78933,82944,83526,92160,92728,92736,92766,92768,92777,92784,92862,92864,92873,92880,92909,92912,92916,92928,92982,92992,92995,93008,93017,93027,93047,93053,93071,93760,93823,93952,94026,94031,94087,94095,94111,94176,94177,94179,94180,94192,94193,94208,100343,100352,101589,101632,101640,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,113664,113770,113776,113788,113792,113800,113808,113817,113821,113822,118528,118573,118576,118598,119141,119145,119149,119154,119163,119170,119173,119179,119210,119213,119362,119364,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770,120772,120779,120782,120831,121344,121398,121403,121452,121461,121461,121476,121476,121499,121503,121505,121519,122624,122654,122661,122666,122880,122886,122888,122904,122907,122913,122915,122916,122918,122922,122928,122989,123023,123023,123136,123180,123184,123197,123200,123209,123214,123214,123536,123566,123584,123641,124112,124153,124896,124902,124904,124907,124909,124910,124912,124926,124928,125124,125136,125142,125184,125259,125264,125273,126464,126467,126469,126495,126497,126498,126500,126500,126503,126503,126505,126514,126516,126519,126521,126521,126523,126523,126530,126530,126535,126535,126537,126537,126539,126539,126541,126543,126545,126546,126548,126548,126551,126551,126553,126553,126555,126555,126557,126557,126559,126559,126561,126562,126564,126564,126567,126570,126572,126578,126580,126583,126585,126588,126590,126590,126592,126601,126603,126619,126625,126627,126629,126633,126635,126651,130032,130041,131072,173791,173824,177977,177984,178205,178208,183969,183984,191456,191472,192093,194560,195101,196608,201546,201552,205743,917760,917999],o4t=/^\/\/\/?\s*@(ts-expect-error|ts-ignore)/,a4t=/^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/,c4t=/@(?:see|link)/i;function Moe(t,r){if(t<r[0])return!1;let a=0,u=r.length,h;for(;a+1<u;){if(h=a+(u-a)/2,h-=h%2,r[h]<=t&&t<=r[h+1])return!0;t<r[h]?u=h:a=h+2}return!1}function iG(t,r){return r>=2?Moe(t,r4t):Moe(t,i4t)}function l4t(t,r){return r>=2?Moe(t,s4t):Moe(t,n4t)}function cXe(t){const r=[];return t.forEach((a,u)=>{r[a]=u}),r}var u4t=cXe(oXe);function xa(t){return u4t[t]}function oI(t){return oXe.get(t)}var d4t=cXe(aXe);function lXe(t){return d4t[t]}function Roe(t){return aXe.get(t)}function ZL(t){const r=[];let a=0,u=0;for(;a<t.length;){const h=t.charCodeAt(a);switch(a++,h){case 13:t.charCodeAt(a)===10&&a++;case 10:r.push(u),u=a;break;default:h>127&&mh(h)&&(r.push(u),u=a);break}}return r.push(u),r}function xW(t,r,a,u){return t.getPositionOfLineAndCharacter?t.getPositionOfLineAndCharacter(r,a,u):nG(Lv(t),r,a,t.text,u)}function nG(t,r,a,u,h){(r<0||r>=t.length)&&(h?r=r<0?0:r>=t.length?t.length-1:r:j.fail(`Bad line number. Line: ${r}, lineStarts.length: ${t.length} , line map is correct? ${u!==void 0?i_(t,ZL(u)):"unknown"}`));const p=t[r]+a;return h?p>t[r+1]?t[r+1]:typeof u=="string"&&p>u.length?u.length:p:(r<t.length-1?j.assert(p<t[r+1]):u!==void 0&&j.assert(p<=u.length),p)}function Lv(t){return t.lineMap||(t.lineMap=ZL(t.text))}function P6(t,r){const a=a8(t,r);return{line:a,character:r-t[a]}}function a8(t,r,a){let u=Jt(t,r,hl,_l,a);return u<0&&(u=~u-1,j.assert(u!==-1,"position cannot precede the beginning of the file")),u}function c8(t,r,a){if(r===a)return 0;const u=Lv(t),h=Math.min(r,a),p=h===a,g=p?r:a,C=a8(u,h),b=a8(u,g,C);return p?C-b:b-C}function Ia(t,r){return P6(Lv(t),r)}function Pv(t){return k1(t)||mh(t)}function k1(t){return t===32||t===9||t===11||t===12||t===160||t===133||t===5760||t>=8192&&t<=8203||t===8239||t===8287||t===12288||t===65279}function mh(t){return t===10||t===13||t===8232||t===8233}function A6(t){return t>=48&&t<=57}function Hke(t){return A6(t)||t>=65&&t<=70||t>=97&&t<=102}function jke(t){return t>=65&&t<=90||t>=97&&t<=122}function uXe(t){return jke(t)||A6(t)||t===95}function zke(t){return t>=48&&t<=55}function Uke(t,r){const a=t.charCodeAt(r);switch(a){case 13:case 10:case 9:case 11:case 12:case 32:case 47:case 60:case 124:case 61:case 62:return!0;case 35:return r===0;default:return a>127}}function Va(t,r,a,u,h){if(W0(r))return r;let p=!1;for(;;){const g=t.charCodeAt(r);switch(g){case 13:t.charCodeAt(r+1)===10&&r++;case 10:if(r++,a)return r;p=!!h;continue;case 9:case 11:case 12:case 32:r++;continue;case 47:if(u)break;if(t.charCodeAt(r+1)===47){for(r+=2;r<t.length&&!mh(t.charCodeAt(r));)r++;p=!1;continue}if(t.charCodeAt(r+1)===42){for(r+=2;r<t.length;){if(t.charCodeAt(r)===42&&t.charCodeAt(r+1)===47){r+=2;break}r++}p=!1;continue}break;case 60:case 124:case 61:case 62:if(l8(t,r)){r=kW(t,r),p=!1;continue}break;case 35:if(r===0&&dXe(t,r)){r=fXe(t,r),p=!1;continue}break;case 42:if(p){r++,p=!1;continue}break;default:if(g>127&&Pv(g)){r++;continue}break}return r}}var Foe=7;function l8(t,r){if(j.assert(r>=0),r===0||mh(t.charCodeAt(r-1))){const a=t.charCodeAt(r);if(r+Foe<t.length){for(let u=0;u<Foe;u++)if(t.charCodeAt(r+u)!==a)return!1;return a===61||t.charCodeAt(r+Foe)===32}}return!1}function kW(t,r,a){a&&a(k.Merge_conflict_marker_encountered,r,Foe);const u=t.charCodeAt(r),h=t.length;if(u===60||u===62)for(;r<h&&!mh(t.charCodeAt(r));)r++;else for(j.assert(u===124||u===61);r<h;){const p=t.charCodeAt(r);if((p===61||p===62)&&p!==u&&l8(t,r))break;r++}return r}var qke=/^#!.*/;function dXe(t,r){return j.assert(r===0),qke.test(t)}function fXe(t,r){const a=qke.exec(t)[0];return r=r+a.length,r}function Boe(t,r,a,u,h,p,g){let C,b,T,E,N=!1,R=u,F=g;if(a===0){R=!0;const H=rG(r);H&&(a=H.length)}e:for(;a>=0&&a<r.length;){const H=r.charCodeAt(a);switch(H){case 13:r.charCodeAt(a+1)===10&&a++;case 10:if(a++,u)break e;R=!0,N&&(E=!0);continue;case 9:case 11:case 12:case 32:a++;continue;case 47:const U=r.charCodeAt(a+1);let q=!1;if(U===47||U===42){const X=U===47?2:3,Z=a;if(a+=2,U===47)for(;a<r.length;){if(mh(r.charCodeAt(a))){q=!0;break}a++}else for(;a<r.length;){if(r.charCodeAt(a)===42&&r.charCodeAt(a+1)===47){a+=2;break}a++}if(R){if(N&&(F=h(C,b,T,E,p,F),!t&&F))return F;C=Z,b=a,T=X,E=q,N=!0}continue}break e;default:if(H>127&&Pv(H)){N&&mh(H)&&(E=!0),a++;continue}break e}}return N&&(F=h(C,b,T,E,p,F)),F}function TW(t,r,a,u){return Boe(!1,t,r,!1,a,u)}function DW(t,r,a,u){return Boe(!1,t,r,!0,a,u)}function $ke(t,r,a,u,h){return Boe(!0,t,r,!1,a,u,h)}function Jke(t,r,a,u,h){return Boe(!0,t,r,!0,a,u,h)}function hXe(t,r,a,u,h,p=[]){return p.push({kind:a,pos:t,end:r,hasTrailingNewLine:u}),p}function Av(t,r){return $ke(t,r,hXe,void 0,void 0)}function qw(t,r){return Jke(t,r,hXe,void 0,void 0)}function rG(t){const r=qke.exec(t);if(r)return r[0]}function Py(t,r){return jke(t)||t===36||t===95||t>127&&iG(t,r)}function jb(t,r,a){return uXe(t)||t===36||(a===1?t===45||t===58:!1)||t>127&&l4t(t,r)}function J_(t,r,a){let u=u8(t,0);if(!Py(u,r))return!1;for(let h=A0(u);h<t.length;h+=A0(u))if(!jb(u=u8(t,h),r,a))return!1;return!0}function Ov(t,r,a=0,u,h,p,g){var C=u,b,T,E,N,R,F,H,U,q=0,X=0,Z=0;ma(C,p,g);var Q={getTokenFullStart:()=>E,getStartPos:()=>E,getTokenEnd:()=>b,getTextPos:()=>b,getToken:()=>R,getTokenStart:()=>N,getTokenPos:()=>N,getTokenText:()=>C.substring(N,b),getTokenValue:()=>F,hasUnicodeEscape:()=>(H&1024)!==0,hasExtendedUnicodeEscape:()=>(H&8)!==0,hasPrecedingLineBreak:()=>(H&1)!==0,hasPrecedingJSDocComment:()=>(H&2)!==0,hasPrecedingJSDocLeadingAsterisks:()=>(H&32768)!==0,isIdentifier:()=>R===80||R>118,isReservedWord:()=>R>=83&&R<=118,isUnterminated:()=>(H&4)!==0,getCommentDirectives:()=>U,getNumericLiteralFlags:()=>H&25584,getTokenFlags:()=>H,reScanGreaterToken:Et,reScanAsteriskEqualsToken:dt,reScanSlashToken:zt,reScanTemplateToken:_i,reScanTemplateHeadOrNoSubstitutionTemplate:Fi,scanJsxIdentifier:ls,scanJsxAttributeValue:Qs,reScanJsxAttributeValue:Mn,reScanJsxToken:On,reScanLessThanToken:pn,reScanHashToken:qr,reScanQuestionToken:Fs,reScanInvalidIdentifier:ut,scanJsxToken:ko,scanJsDocToken:at,scanJSDocCommentTextToken:Zs,scan:et,getText:Xr,clearCommentDirectives:Gs,setText:ma,setScriptTarget:Ji,setLanguageVariant:ac,setScriptKind:St,setJSDocParsingMode:ri,setOnError:ka,resetTokenState:xe,setTextPos:xe,setSkipJsDocLeadingAsterisks:pt,tryScan:us,lookAhead:dr,scanRange:Sn};return j.isDebugging&&Object.defineProperty(Q,"__debugShowCurrentPositionInText",{get:()=>{const Se=Q.getText();return Se.slice(0,Q.getTokenFullStart())+"║"+Se.slice(Q.getTokenFullStart())}}),Q;function re(Se){return u8(C,Se)}function oe(Se){return Se>=0&&Se<T?re(Se):-1}function pe(Se){return C.charCodeAt(Se)}function de(Se){return Se>=0&&Se<T?pe(Se):-1}function ue(Se,Ze=b,gt,Dt){if(h){const Je=b;b=Ze,h(Se,gt||0,Dt),b=Je}}function Ie(){let Se=b,Ze=!1,gt=!1,Dt="";for(;;){const Je=pe(b);if(Je===95){H|=512,Ze?(Ze=!1,gt=!0,Dt+=C.substring(Se,b)):(H|=16384,ue(gt?k.Multiple_consecutive_numeric_separators_are_not_permitted:k.Numeric_separators_are_not_allowed_here,b,1)),b++,Se=b;continue}if(A6(Je)){Ze=!0,gt=!1,b++;continue}break}return pe(b-1)===95&&(H|=16384,ue(k.Numeric_separators_are_not_allowed_here,b-1,1)),Dt+C.substring(Se,b)}function we(){let Se=b,Ze;if(pe(b)===48)if(b++,pe(b)===95)H|=16896,ue(k.Numeric_separators_are_not_allowed_here,b,1),b--,Ze=Ie();else if(!Ae())H|=8192,Ze=""+ +F;else if(!F)Ze="0";else{F=""+parseInt(F,8),H|=32;const Ct=R===41,ii=(Ct?"-":"")+"0o"+(+F).toString(8);return Ct&&Se--,ue(k.Octal_literals_are_not_allowed_Use_the_syntax_0,Se,b-Se,ii),9}else Ze=Ie();let gt,Dt;pe(b)===46&&(b++,gt=Ie());let Je=b;if(pe(b)===69||pe(b)===101){b++,H|=16,(pe(b)===43||pe(b)===45)&&b++;const Ct=b,ii=Ie();ii?(Dt=C.substring(Je,Ct)+ii,Je=b):ue(k.Digit_expected)}let Rt;if(H&512?(Rt=Ze,gt&&(Rt+="."+gt),Dt&&(Rt+=Dt)):Rt=C.substring(Se,Je),H&8192)return ue(k.Decimals_with_leading_zeros_are_not_allowed,Se,Je-Se),F=""+ +Rt,9;if(gt!==void 0||H&16)return he(Se,gt===void 0&&!!(H&16)),F=""+ +Rt,9;{F=Rt;const Ct=$e();return he(Se),Ct}}function he(Se,Ze){if(!Py(re(b),t))return;const gt=b,{length:Dt}=We();Dt===1&&C[gt]==="n"?ue(Ze?k.A_bigint_literal_cannot_use_exponential_notation:k.A_bigint_literal_must_be_an_integer,Se,gt-Se+1):(ue(k.An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal,gt,Dt),b=gt)}function Ae(){const Se=b;let Ze=!0;for(;A6(de(b));)zke(pe(b))||(Ze=!1),b++;return F=C.substring(Se,b),Ze}function ke(Se,Ze){const gt=De(Se,!1,Ze);return gt?parseInt(gt,16):-1}function Te(Se,Ze){return De(Se,!0,Ze)}function De(Se,Ze,gt){let Dt=[],Je=!1,Rt=!1;for(;Dt.length<Se||Ze;){let Ct=pe(b);if(gt&&Ct===95){H|=512,Je?(Je=!1,Rt=!0):ue(Rt?k.Multiple_consecutive_numeric_separators_are_not_permitted:k.Numeric_separators_are_not_allowed_here,b,1),b++;continue}if(Je=gt,Ct>=65&&Ct<=70)Ct+=32;else if(!(Ct>=48&&Ct<=57||Ct>=97&&Ct<=102))break;Dt.push(Ct),b++,Rt=!1}return Dt.length<Se&&(Dt=[]),pe(b-1)===95&&ue(k.Numeric_separators_are_not_allowed_here,b-1,1),String.fromCharCode(...Dt)}function qe(Se=!1){const Ze=pe(b);b++;let gt="",Dt=b;for(;;){if(b>=T){gt+=C.substring(Dt,b),H|=4,ue(k.Unterminated_string_literal);break}const Je=pe(b);if(Je===Ze){gt+=C.substring(Dt,b),b++;break}if(Je===92&&!Se){gt+=C.substring(Dt,b),gt+=Ne(3),Dt=b;continue}if((Je===10||Je===13)&&!Se){gt+=C.substring(Dt,b),H|=4,ue(k.Unterminated_string_literal);break}b++}return gt}function se(Se){const Ze=pe(b)===96;b++;let gt=b,Dt="",Je;for(;;){if(b>=T){Dt+=C.substring(gt,b),H|=4,ue(k.Unterminated_template_literal),Je=Ze?15:18;break}const Rt=pe(b);if(Rt===96){Dt+=C.substring(gt,b),b++,Je=Ze?15:18;break}if(Rt===36&&b+1<T&&pe(b+1)===123){Dt+=C.substring(gt,b),b+=2,Je=Ze?16:17;break}if(Rt===92){Dt+=C.substring(gt,b),Dt+=Ne(1|(Se?2:0)),gt=b;continue}if(Rt===13){Dt+=C.substring(gt,b),b++,b<T&&pe(b)===10&&b++,Dt+=`
+`,gt=b;continue}b++}return j.assert(Je!==void 0),F=Dt,Je}function Ne(Se){const Ze=b;if(b++,b>=T)return ue(k.Unexpected_end_of_text),"";const gt=pe(b);switch(b++,gt){case 48:if(b>=T||!A6(pe(b)))return"\0";case 49:case 50:case 51:b<T&&zke(pe(b))&&b++;case 52:case 53:case 54:case 55:if(b<T&&zke(pe(b))&&b++,H|=2048,Se&6){const Rt=parseInt(C.substring(Ze+1,b),8);return Se&4&&!(Se&32)&&gt!==48?ue(k.Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead,Ze,b-Ze,"\\x"+Rt.toString(16).padStart(2,"0")):ue(k.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0,Ze,b-Ze,"\\x"+Rt.toString(16).padStart(2,"0")),String.fromCharCode(Rt)}return C.substring(Ze,b);case 56:case 57:return H|=2048,Se&6?(Se&4&&!(Se&32)?ue(k.Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class,Ze,b-Ze):ue(k.Escape_sequence_0_is_not_allowed,Ze,b-Ze,C.substring(Ze,b)),String.fromCharCode(gt)):C.substring(Ze,b);case 98:return"\b";case 116:return" ";case 110:return`
+`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 39:return"'";case 34:return'"';case 117:if(b<T&&pe(b)===123){b-=2;const Rt=Oe(!!(Se&6));return Se&17||(H|=2048,Se&6&&ue(k.Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set,Ze,b-Ze)),Rt}for(;b<Ze+6;b++)if(!(b<T&&Hke(pe(b))))return H|=2048,Se&6&&ue(k.Hexadecimal_digit_expected),C.substring(Ze,b);H|=1024;const Dt=parseInt(C.substring(Ze+2,b),16),Je=String.fromCharCode(Dt);if(Se&16&&Dt>=55296&&Dt<=56319&&b+6<T&&C.substring(b,b+2)==="\\u"&&pe(b+2)!==123){const Rt=b;let Ct=b+2;for(;Ct<Rt+6;Ct++)if(!Hke(pe(Ct)))return Je;const ii=parseInt(C.substring(Rt+2,Ct),16);if(ii>=56320&&ii<=57343)return b=Ct,Je+String.fromCharCode(ii)}return Je;case 120:for(;b<Ze+4;b++)if(!(b<T&&Hke(pe(b))))return H|=2048,Se&6&&ue(k.Hexadecimal_digit_expected),C.substring(Ze,b);return H|=4096,String.fromCharCode(parseInt(C.substring(Ze+2,b),16));case 13:b<T&&pe(b)===10&&b++;case 10:case 8232:case 8233:return"";default:return(Se&16||Se&4&&!(Se&8)&&jb(gt,t))&&ue(k.This_character_cannot_be_escaped_in_a_regular_expression,b-2,2),String.fromCharCode(gt)}}function Oe(Se){const Ze=b;b+=3;const gt=b,Dt=Te(1,!1),Je=Dt?parseInt(Dt,16):-1;let Rt=!1;return Je<0?(Se&&ue(k.Hexadecimal_digit_expected),Rt=!0):Je>1114111&&(Se&&ue(k.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive,gt,b-gt),Rt=!0),b>=T?(Se&&ue(k.Unexpected_end_of_text),Rt=!0):pe(b)===125?b++:(Se&&ue(k.Unterminated_Unicode_escape_sequence),Rt=!0),Rt?(H|=2048,C.substring(Ze,b)):(H|=8,d8(Je))}function He(){if(b+5<T&&pe(b+1)===117){const Se=b;b+=2;const Ze=ke(4,!1);return b=Se,Ze}return-1}function Pe(){if(re(b+1)===117&&re(b+2)===123){const Se=b;b+=3;const Ze=Te(1,!1),gt=Ze?parseInt(Ze,16):-1;return b=Se,gt}return-1}function We(){let Se="",Ze=b;for(;b<T;){let gt=re(b);if(jb(gt,t))b+=A0(gt);else if(gt===92){if(gt=Pe(),gt>=0&&jb(gt,t)){Se+=Oe(!0),Ze=b;continue}if(gt=He(),!(gt>=0&&jb(gt,t)))break;H|=1024,Se+=C.substring(Ze,b),Se+=d8(gt),b+=6,Ze=b}else break}return Se+=C.substring(Ze,b),Se}function ze(){const Se=F.length;if(Se>=2&&Se<=12){const Ze=F.charCodeAt(0);if(Ze>=97&&Ze<=122){const gt=e4t.get(F);if(gt!==void 0)return R=gt}}return R=80}function Nt(Se){let Ze="",gt=!1,Dt=!1;for(;;){const Je=pe(b);if(Je===95){H|=512,gt?(gt=!1,Dt=!0):ue(Dt?k.Multiple_consecutive_numeric_separators_are_not_permitted:k.Numeric_separators_are_not_allowed_here,b,1),b++;continue}if(gt=!0,!A6(Je)||Je-48>=Se)break;Ze+=C[b],b++,Dt=!1}return pe(b-1)===95&&ue(k.Numeric_separators_are_not_allowed_here,b-1,1),Ze}function $e(){return pe(b)===110?(F+="n",H&384&&(F=s7(F)+"n"),b++,10):(F=""+(H&128?parseInt(F.slice(2),2):H&256?parseInt(F.slice(2),8):+F),9)}function et(){for(E=b,H=0;;){if(N=b,b>=T)return R=1;const Se=re(b);if(b===0&&Se===35&&dXe(C,b)){if(b=fXe(C,b),r)continue;return R=6}switch(Se){case 10:case 13:if(H|=1,r){b++;continue}else return Se===13&&b+1<T&&pe(b+1)===10?b+=2:b++,R=4;case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8203:case 8239:case 8287:case 12288:case 65279:if(r){b++;continue}else{for(;b<T&&k1(pe(b));)b++;return R=5}case 33:return pe(b+1)===61?pe(b+2)===61?(b+=3,R=38):(b+=2,R=36):(b++,R=54);case 34:case 39:return F=qe(),R=11;case 96:return R=se(!1);case 37:return pe(b+1)===61?(b+=2,R=70):(b++,R=45);case 38:return pe(b+1)===38?pe(b+2)===61?(b+=3,R=77):(b+=2,R=56):pe(b+1)===61?(b+=2,R=74):(b++,R=51);case 40:return b++,R=21;case 41:return b++,R=22;case 42:if(pe(b+1)===61)return b+=2,R=67;if(pe(b+1)===42)return pe(b+2)===61?(b+=3,R=68):(b+=2,R=43);if(b++,q&&!(H&32768)&&H&1){H|=32768;continue}return R=42;case 43:return pe(b+1)===43?(b+=2,R=46):pe(b+1)===61?(b+=2,R=65):(b++,R=40);case 44:return b++,R=28;case 45:return pe(b+1)===45?(b+=2,R=47):pe(b+1)===61?(b+=2,R=66):(b++,R=41);case 46:return A6(pe(b+1))?(we(),R=9):pe(b+1)===46&&pe(b+2)===46?(b+=3,R=26):(b++,R=25);case 47:if(pe(b+1)===47){for(b+=2;b<T&&!mh(pe(b));)b++;if(U=xn(U,C.slice(N,b),o4t,N),r)continue;return R=2}if(pe(b+1)===42){b+=2;const Ct=pe(b)===42&&pe(b+1)!==47;let ii=!1,vt=N;for(;b<T;){const Ni=pe(b);if(Ni===42&&pe(b+1)===47){b+=2,ii=!0;break}b++,mh(Ni)&&(vt=b,H|=1)}if(Ct&&Me()&&(H|=2),U=xn(U,C.slice(vt,b),a4t,vt),ii||ue(k.Asterisk_Slash_expected),r)continue;return ii||(H|=4),R=3}return pe(b+1)===61?(b+=2,R=69):(b++,R=44);case 48:if(b+2<T&&(pe(b+1)===88||pe(b+1)===120))return b+=2,F=Te(1,!0),F||(ue(k.Hexadecimal_digit_expected),F="0"),F="0x"+F,H|=64,R=$e();if(b+2<T&&(pe(b+1)===66||pe(b+1)===98))return b+=2,F=Nt(2),F||(ue(k.Binary_digit_expected),F="0"),F="0b"+F,H|=128,R=$e();if(b+2<T&&(pe(b+1)===79||pe(b+1)===111))return b+=2,F=Nt(8),F||(ue(k.Octal_digit_expected),F="0"),F="0o"+F,H|=256,R=$e();case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return R=we();case 58:return b++,R=59;case 59:return b++,R=27;case 60:if(l8(C,b)){if(b=kW(C,b,ue),r)continue;return R=7}return pe(b+1)===60?pe(b+2)===61?(b+=3,R=71):(b+=2,R=48):pe(b+1)===61?(b+=2,R=33):a===1&&pe(b+1)===47&&pe(b+2)!==42?(b+=2,R=31):(b++,R=30);case 61:if(l8(C,b)){if(b=kW(C,b,ue),r)continue;return R=7}return pe(b+1)===61?pe(b+2)===61?(b+=3,R=37):(b+=2,R=35):pe(b+1)===62?(b+=2,R=39):(b++,R=64);case 62:if(l8(C,b)){if(b=kW(C,b,ue),r)continue;return R=7}return b++,R=32;case 63:return pe(b+1)===46&&!A6(pe(b+2))?(b+=2,R=29):pe(b+1)===63?pe(b+2)===61?(b+=3,R=78):(b+=2,R=61):(b++,R=58);case 91:return b++,R=23;case 93:return b++,R=24;case 94:return pe(b+1)===61?(b+=2,R=79):(b++,R=53);case 123:return b++,R=19;case 124:if(l8(C,b)){if(b=kW(C,b,ue),r)continue;return R=7}return pe(b+1)===124?pe(b+2)===61?(b+=3,R=76):(b+=2,R=57):pe(b+1)===61?(b+=2,R=75):(b++,R=52);case 125:return b++,R=20;case 126:return b++,R=55;case 64:return b++,R=60;case 92:const Ze=Pe();if(Ze>=0&&Py(Ze,t))return F=Oe(!0)+We(),R=ze();const gt=He();return gt>=0&&Py(gt,t)?(b+=6,H|=1024,F=String.fromCharCode(gt)+We(),R=ze()):(ue(k.Invalid_character),b++,R=0);case 35:if(b!==0&&C[b+1]==="!")return ue(k.can_only_be_used_at_the_start_of_a_file,b,2),b++,R=0;const Dt=re(b+1);if(Dt===92){b++;const Ct=Pe();if(Ct>=0&&Py(Ct,t))return F="#"+Oe(!0)+We(),R=81;const ii=He();if(ii>=0&&Py(ii,t))return b+=6,H|=1024,F="#"+String.fromCharCode(ii)+We(),R=81;b--}return Py(Dt,t)?(b++,wt(Dt,t)):(F="#",ue(k.Invalid_character,b++,A0(Se))),R=81;case 65533:return ue(k.File_appears_to_be_binary,0,0),b=T,R=8;default:const Je=wt(Se,t);if(Je)return R=Je;if(k1(Se)){b+=A0(Se);continue}else if(mh(Se)){H|=1,b+=A0(Se);continue}const Rt=A0(Se);return ue(k.Invalid_character,b,Rt),b+=Rt,R=0}}}function Me(){switch(Z){case 0:return!0;case 1:return!1}return X!==3&&X!==4?!0:Z===3?!1:c4t.test(C.slice(E,b))}function ut(){j.assert(R===0,"'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."),b=N=E,H=0;const Se=re(b),Ze=wt(Se,99);return Ze?R=Ze:(b+=A0(Se),R)}function wt(Se,Ze){let gt=Se;if(Py(gt,Ze)){for(b+=A0(gt);b<T&&jb(gt=re(b),Ze);)b+=A0(gt);return F=C.substring(N,b),gt===92&&(F+=We()),ze()}}function Et(){if(R===32){if(pe(b)===62)return pe(b+1)===62?pe(b+2)===61?(b+=3,R=73):(b+=2,R=50):pe(b+1)===61?(b+=2,R=72):(b++,R=49);if(pe(b)===61)return b++,R=34}return R}function dt(){return j.assert(R===67,"'reScanAsteriskEqualsToken' should only be called on a '*='"),b=N+1,R=64}function zt(Se){if(R===44||R===69){const Ze=N+1;b=Ze;let gt=!1,Dt=!1,Je=!1;for(;;){const Ct=de(b);if(Ct===-1||mh(Ct)){H|=4;break}if(gt)gt=!1;else{if(Ct===47&&!Je)break;Ct===91?Je=!0:Ct===92?gt=!0:Ct===93?Je=!1:!Je&&Ct===40&&de(b+1)===63&&de(b+2)===60&&de(b+3)!==61&&de(b+3)!==33&&(Dt=!0)}b++}const Rt=b;if(H&4){b=Ze,gt=!1;let Ct=0,ii=!1,vt=0;for(;b<Rt;){const Ni=pe(b);if(gt)gt=!1;else if(Ni===92)gt=!0;else if(Ni===91)Ct++;else if(Ni===93&&Ct)Ct--;else if(!Ct){if(Ni===123)ii=!0;else if(Ni===125&&ii)ii=!1;else if(!ii){if(Ni===40)vt++;else if(Ni===41&&vt)vt--;else if(Ni===41||Ni===93||Ni===125)break}}b++}for(;Pv(de(b-1))||de(b-1)===59;)b--;ue(k.Unterminated_regular_expression_literal,N,b-N)}else{b++;let Ct=0;for(;;){const ii=oe(b);if(ii===-1||!jb(ii,t))break;const vt=A0(ii);if(Se){const Ni=Roe(ii);Ni===void 0?ue(k.Unknown_regular_expression_flag,b,vt):Ct&Ni?ue(k.Duplicate_regular_expression_flag,b,vt):((Ct|Ni)&96)===96?ue(k.The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously,b,vt):(Ct|=Ni,tn(Ni,vt))}b+=vt}Se&&Sn(Ze,Rt-Ze,()=>{Ei(Ct,!0,Dt)})}F=C.substring(N,b),R=14}return R}function Ei(Se,Ze,gt){var Dt=!!(Se&64),Je=!!(Se&96),Rt=Je||!Ze,Ct=!1,ii=0,vt,Ni,ji,gr=[],te;function tt(Di){for(;;){if(gr.push(te),te=void 0,Gt(Di),te=gr.pop(),de(b)!==124)return;b++}}function Gt(Di){let on=!1;for(;;){const zi=b,cn=de(b);switch(cn){case-1:return;case 94:case 36:b++,on=!1;break;case 92:switch(b++,de(b)){case 98:case 66:b++,on=!1;break;default:Ue(),on=!0;break}break;case 40:if(b++,de(b)===63)switch(b++,de(b)){case 61:case 33:b++,on=!Rt;break;case 60:const Wo=b;switch(b++,de(b)){case 61:case 33:b++,on=!1;break;default:lt(!1),Xn(62),t<5&&ue(k.Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later,Wo,b-Wo),ii++,on=!0;break}break;default:const $o=b,Lc=le(0);de(b)===45&&(b++,le(Lc),b===$o+1&&ue(k.Subpattern_flags_must_be_present_when_there_is_a_minus_sign,$o,b-$o)),Xn(58),on=!0;break}else ii++,on=!0;tt(!0),Xn(41);break;case 123:b++;const vi=b;Ae();const qo=F;if(!Rt&&!qo){on=!0;break}if(de(b)===44){b++,Ae();const Wo=F;if(qo)Wo&&Number.parseInt(qo)>Number.parseInt(Wo)&&(Rt||de(b)===125)&&ue(k.Numbers_out_of_order_in_quantifier,vi,b-vi);else if(Wo||de(b)===125)ue(k.Incomplete_quantifier_Digit_expected,vi,0);else{ue(k.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,zi,1,String.fromCharCode(cn)),on=!0;break}}else if(!qo){Rt&&ue(k.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,zi,1,String.fromCharCode(cn)),on=!0;break}if(de(b)!==125)if(Rt)ue(k._0_expected,b,0,"}"),b--;else{on=!0;break}case 42:case 43:case 63:b++,de(b)===63&&b++,on||ue(k.There_is_nothing_available_for_repetition,zi,b-zi),on=!1;break;case 46:b++,on=!0;break;case 91:b++,Dt?vn():hi(),Xn(93),on=!0;break;case 41:if(Di)return;case 93:case 125:(Rt||cn===41)&&ue(k.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,b,1,String.fromCharCode(cn)),b++,on=!0;break;case 47:case 124:return;default:Ai(),on=!0;break}}}function le(Di){for(;;){const on=oe(b);if(on===-1||!jb(on,t))break;const zi=A0(on),cn=Roe(on);cn===void 0?ue(k.Unknown_regular_expression_flag,b,zi):Di&cn?ue(k.Duplicate_regular_expression_flag,b,zi):cn&28?(Di|=cn,tn(cn,zi)):ue(k.This_regular_expression_flag_cannot_be_toggled_within_a_subpattern,b,zi),b+=zi}return Di}function Ue(){switch(j.assertEqual(pe(b-1),92),de(b)){case 107:b++,de(b)===60?(b++,lt(!0),Xn(62)):(Rt||gt)&&ue(k.k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets,b-2,2);break;case 113:if(Dt){b++,ue(k.q_is_only_available_inside_character_class,b-2,2);break}default:j.assert(wi()||be()||Qt(!0));break}}function be(){j.assertEqual(pe(b-1),92);const Di=de(b);if(Di>=49&&Di<=57){const on=b;return Ae(),ji=fn(ji,{pos:on,end:b,value:+F}),!0}return!1}function Qt(Di){j.assertEqual(pe(b-1),92);let on=de(b);switch(on){case-1:return ue(k.Undetermined_character_escape,b-1,1),"\\";case 99:if(b++,on=de(b),jke(on))return b++,String.fromCharCode(on&31);if(Rt)ue(k.c_must_be_followed_by_an_ASCII_letter,b-2,2);else if(Di)return b--,"\\";return String.fromCharCode(on);case 94:case 36:case 47:case 92:case 46:case 42:case 43:case 63:case 40:case 41:case 91:case 93:case 123:case 125:case 124:return b++,String.fromCharCode(on);default:return b--,Ne(12|(Je?16:0)|(Di?32:0))}}function lt(Di){j.assertEqual(pe(b-1),60),N=b,wt(oe(b),t),b===N?ue(k.Expected_a_capturing_group_name):Di?Ni=fn(Ni,{pos:N,end:b,name:F}):te!=null&&te.has(F)||gr.some(on=>on==null?void 0:on.has(F))?ue(k.Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other,N,b-N):(te??(te=new Set),te.add(F),vt??(vt=new Set),vt.add(F))}function st(Di){return Di===93||Di===-1||b>=T}function hi(){for(j.assertEqual(pe(b-1),91),de(b)===94&&b++;;){const Di=de(b);if(st(Di))return;const on=b,zi=fi();if(de(b)===45){b++;const cn=de(b);if(st(cn))return;!zi&&Rt&&ue(k.A_character_class_range_must_not_be_bounded_by_another_character_class,on,b-1-on);const vi=b,qo=fi();if(!qo&&Rt){ue(k.A_character_class_range_must_not_be_bounded_by_another_character_class,vi,b-vi);continue}if(!zi)continue;const Wo=u8(zi,0),$o=u8(qo,0);zi.length===A0(Wo)&&qo.length===A0($o)&&Wo>$o&&ue(k.Range_out_of_order_in_character_class,on,b-on)}}}function vn(){j.assertEqual(pe(b-1),91);let Di=!1;de(b)===94&&(b++,Di=!0);let on=!1,zi=de(b);if(st(zi))return;let cn=b,vi;switch(C.slice(b,b+2)){case"--":case"&&":ue(k.Expected_a_class_set_operand),Ct=!1;break;default:vi=Un();break}switch(de(b)){case 45:if(de(b+1)===45){Di&&Ct&&ue(k.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class,cn,b-cn),on=Ct,ln(3),Ct=!Di&&on;return}break;case 38:if(de(b+1)===38){ln(2),Di&&Ct&&ue(k.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class,cn,b-cn),on=Ct,Ct=!Di&&on;return}else ue(k.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,b,1,String.fromCharCode(zi));break;default:Di&&Ct&&ue(k.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class,cn,b-cn),on=Ct;break}for(;zi=de(b),zi!==-1;){switch(zi){case 45:if(b++,zi=de(b),st(zi)){Ct=!Di&&on;return}if(zi===45){b++,ue(k.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead,b-2,2),cn=b-2,vi=C.slice(cn,b);continue}else{vi||ue(k.A_character_class_range_must_not_be_bounded_by_another_character_class,cn,b-1-cn);const qo=b,Wo=Un();if(Di&&Ct&&ue(k.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class,qo,b-qo),on||(on=Ct),!Wo){ue(k.A_character_class_range_must_not_be_bounded_by_another_character_class,qo,b-qo);break}if(!vi)break;const $o=u8(vi,0),Lc=u8(Wo,0);vi.length===A0($o)&&Wo.length===A0(Lc)&&$o>Lc&&ue(k.Range_out_of_order_in_character_class,cn,b-cn)}break;case 38:cn=b,b++,de(b)===38?(b++,ue(k.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead,b-2,2),de(b)===38&&(ue(k.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,b,1,String.fromCharCode(zi)),b++)):ue(k.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,b-1,1,String.fromCharCode(zi)),vi=C.slice(cn,b);continue}if(st(de(b)))break;switch(cn=b,C.slice(b,b+2)){case"--":case"&&":ue(k.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead,b,2),b+=2,vi=C.slice(cn,b);break;default:vi=Un();break}}Ct=!Di&&on}function ln(Di){let on=Ct;for(;;){let zi=de(b);if(st(zi))break;switch(zi){case 45:b++,de(b)===45?(b++,Di!==3&&ue(k.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead,b-2,2)):ue(k.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead,b-1,1);break;case 38:b++,de(b)===38?(b++,Di!==2&&ue(k.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead,b-2,2),de(b)===38&&(ue(k.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,b,1,String.fromCharCode(zi)),b++)):ue(k.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,b-1,1,String.fromCharCode(zi));break;default:switch(Di){case 3:ue(k._0_expected,b,0,"--");break;case 2:ue(k._0_expected,b,0,"&&");break}break}if(zi=de(b),st(zi)){ue(k.Expected_a_class_set_operand);break}Un(),on&&(on=Ct)}Ct=on}function Un(){switch(Ct=!1,de(b)){case-1:return"";case 91:return b++,vn(),Xn(93),"";case 92:if(b++,wi())return"";if(de(b)===113)return b++,de(b)===123?(b++,Pt(),Xn(125),""):(ue(k.q_must_be_followed_by_string_alternatives_enclosed_in_braces,b-2,2),"q");b--;default:return Bt()}}function Pt(){j.assertEqual(pe(b-1),123);let Di=0;for(;;)switch(de(b)){case-1:return;case 125:Di!==1&&(Ct=!0);return;case 124:Di!==1&&(Ct=!0),b++,p=b,Di=0;break;default:Bt(),Di++;break}}function Bt(){const Di=de(b);if(Di===-1)return"";if(Di===92){b++;const on=de(b);switch(on){case 98:return b++,"\b";case 38:case 45:case 33:case 35:case 37:case 44:case 58:case 59:case 60:case 61:case 62:case 64:case 96:case 126:return b++,String.fromCharCode(on);default:return Qt(!1)}}else if(Di===de(b+1))switch(Di){case 38:case 33:case 35:case 37:case 42:case 43:case 44:case 46:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 96:case 126:return ue(k.A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash,b,2),b+=2,C.substring(b-2,b)}switch(Di){case 47:case 40:case 41:case 91:case 93:case 123:case 125:case 45:case 124:return ue(k.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,b,1,String.fromCharCode(Di)),b++,String.fromCharCode(Di)}return Ai()}function fi(){if(de(b)===92){b++;const Di=de(b);switch(Di){case 98:return b++,"\b";case 45:return b++,String.fromCharCode(Di);default:return wi()?"":Qt(!1)}}else return Ai()}function wi(){j.assertEqual(pe(b-1),92);let Di=!1;const on=b-1,zi=de(b);switch(zi){case 100:case 68:case 115:case 83:case 119:case 87:return b++,!0;case 80:Di=!0;case 112:if(b++,de(b)===123){b++;const cn=b,vi=Ri();if(de(b)===61){const qo=_Xe.get(vi);if(b===cn)ue(k.Expected_a_Unicode_property_name);else if(qo===void 0){ue(k.Unknown_Unicode_property_name,cn,b-cn);const Lc=LT(vi,_Xe.keys(),hl);Lc&&ue(k.Did_you_mean_0,cn,b-cn,Lc)}b++;const Wo=b,$o=Ri();if(b===Wo)ue(k.Expected_a_Unicode_property_value);else if(qo!==void 0&&!EW[qo].has($o)){ue(k.Unknown_Unicode_property_value,Wo,b-Wo);const Lc=LT($o,EW[qo],hl);Lc&&ue(k.Did_you_mean_0,Wo,b-Wo,Lc)}}else if(b===cn)ue(k.Expected_a_Unicode_property_name_or_value);else if(mXe.has(vi))Dt?Di?ue(k.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class,cn,b-cn):Ct=!0:ue(k.Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set,cn,b-cn);else if(!EW.General_Category.has(vi)&&!pXe.has(vi)){ue(k.Unknown_Unicode_property_name_or_value,cn,b-cn);const qo=LT(vi,[...EW.General_Category,...pXe,...mXe],hl);qo&&ue(k.Did_you_mean_0,cn,b-cn,qo)}Xn(125),Je||ue(k.Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set,on,b-on)}else if(Rt)ue(k._0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces,b-2,2,String.fromCharCode(zi));else return b--,!1;return!0}return!1}function Ri(){let Di="";for(;;){const on=de(b);if(on===-1||!uXe(on))break;Di+=String.fromCharCode(on),b++}return Di}function Ai(){const Di=Je?A0(oe(b)):1;return b+=Di,Di>0?C.substring(b-Di,b):""}function Xn(Di){de(b)===Di?b++:ue(k._0_expected,b,0,String.fromCharCode(Di))}tt(!1),O(Ni,Di=>{if(!(vt!=null&&vt.has(Di.name))&&(ue(k.There_is_no_capturing_group_named_0_in_this_regular_expression,Di.pos,Di.end-Di.pos,Di.name),vt)){const on=LT(Di.name,vt,hl);on&&ue(k.Did_you_mean_0,Di.pos,Di.end-Di.pos,on)}}),O(ji,Di=>{Di.value>ii&&(ii?ue(k.This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_regular_expression,Di.pos,Di.end-Di.pos,ii):ue(k.This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regular_expression,Di.pos,Di.end-Di.pos))})}function tn(Se,Ze){const gt=t4t.get(Se);gt&&t<gt&&ue(k.This_regular_expression_flag_is_only_available_when_targeting_0_or_later,b,Ze,FK(gt))}function xn(Se,Ze,gt,Dt){const Je=Pn(Ze.trimStart(),gt);return Je===void 0?Se:fn(Se,{range:{pos:Dt,end:b},type:Je})}function Pn(Se,Ze){const gt=Ze.exec(Se);if(gt)switch(gt[1]){case"ts-expect-error":return 0;case"ts-ignore":return 1}}function _i(Se){return b=N,R=se(!Se)}function Fi(){return b=N,R=se(!0)}function On(Se=!0){return b=N=E,R=ko(Se)}function pn(){return R===48?(b=N+1,R=30):R}function qr(){return R===81?(b=N+1,R=63):R}function Fs(){return j.assert(R===61,"'reScanQuestionToken' should only be called on a '??'"),b=N+1,R=58}function ko(Se=!0){if(E=N=b,b>=T)return R=1;let Ze=pe(b);if(Ze===60)return pe(b+1)===47?(b+=2,R=31):(b++,R=30);if(Ze===123)return b++,R=19;let gt=0;for(;b<T&&(Ze=pe(b),Ze!==123);){if(Ze===60){if(l8(C,b))return b=kW(C,b,ue),R=7;break}if(Ze===62&&ue(k.Unexpected_token_Did_you_mean_or_gt,b,1),Ze===125&&ue(k.Unexpected_token_Did_you_mean_or_rbrace,b,1),mh(Ze)&&gt===0)gt=-1;else{if(!Se&&mh(Ze)&&gt>0)break;Pv(Ze)||(gt=b)}b++}return F=C.substring(E,b),gt===-1?13:12}function ls(){if(D_(R)){for(;b<T;){if(pe(b)===45){F+="-",b++;continue}const Ze=b;if(F+=We(),b===Ze)break}return ze()}return R}function Qs(){switch(E=b,pe(b)){case 34:case 39:return F=qe(!0),R=11;default:return et()}}function Mn(){return b=N=E,Qs()}function Zs(Se){if(E=N=b,H=0,b>=T)return R=1;for(let Ze=pe(b);b<T&&!mh(Ze)&&Ze!==96;Ze=re(++b))if(!Se){if(Ze===123)break;if(Ze===64&&b-1>=0&&k1(pe(b-1))&&!(b+1<T&&Pv(pe(b+1))))break}return b===N?at():(F=C.substring(N,b),R=82)}function at(){if(E=N=b,H=0,b>=T)return R=1;const Se=re(b);switch(b+=A0(Se),Se){case 9:case 11:case 12:case 32:for(;b<T&&k1(pe(b));)b++;return R=5;case 64:return R=60;case 13:pe(b)===10&&b++;case 10:return H|=1,R=4;case 42:return R=42;case 123:return R=19;case 125:return R=20;case 91:return R=23;case 93:return R=24;case 40:return R=21;case 41:return R=22;case 60:return R=30;case 62:return R=32;case 61:return R=64;case 44:return R=28;case 46:return R=25;case 96:return R=62;case 35:return R=63;case 92:b--;const Ze=Pe();if(Ze>=0&&Py(Ze,t))return F=Oe(!0)+We(),R=ze();const gt=He();return gt>=0&&Py(gt,t)?(b+=6,H|=1024,F=String.fromCharCode(gt)+We(),R=ze()):(b++,R=0)}if(Py(Se,t)){let Ze=Se;for(;b<T&&jb(Ze=re(b),t)||Ze===45;)b+=A0(Ze);return F=C.substring(N,b),Ze===92&&(F+=We()),R=ze()}else return R=0}function yi(Se,Ze){const gt=b,Dt=E,Je=N,Rt=R,Ct=F,ii=H,vt=Se();return(!vt||Ze)&&(b=gt,E=Dt,N=Je,R=Rt,F=Ct,H=ii),vt}function Sn(Se,Ze,gt){const Dt=T,Je=b,Rt=E,Ct=N,ii=R,vt=F,Ni=H,ji=U;ma(C,Se,Ze);const gr=gt();return T=Dt,b=Je,E=Rt,N=Ct,R=ii,F=vt,H=Ni,U=ji,gr}function dr(Se){return yi(Se,!0)}function us(Se){return yi(Se,!1)}function Xr(){return C}function Gs(){U=void 0}function ma(Se,Ze,gt){C=Se||"",T=gt===void 0?C.length:Ze+gt,xe(Ze||0)}function ka(Se){h=Se}function Ji(Se){t=Se}function ac(Se){a=Se}function St(Se){X=Se}function ri(Se){Z=Se}function xe(Se){j.assert(Se>=0),b=Se,E=Se,N=Se,R=0,F=void 0,H=0}function pt(Se){q+=Se?1:-1}}function u8(t,r){return t.codePointAt(r)}function A0(t){return t>=65536?2:t===-1?0:1}function f4t(t){if(j.assert(0<=t&&t<=1114111),t<=65535)return String.fromCharCode(t);const r=Math.floor((t-65536)/1024)+55296,a=(t-65536)%1024+56320;return String.fromCharCode(r,a)}var h4t=String.fromCodePoint?t=>String.fromCodePoint(t):f4t;function d8(t){return h4t(t)}var _Xe=new Map(Object.entries({General_Category:"General_Category",gc:"General_Category",Script:"Script",sc:"Script",Script_Extensions:"Script_Extensions",scx:"Script_Extensions"})),pXe=new Set(["ASCII","ASCII_Hex_Digit","AHex","Alphabetic","Alpha","Any","Assigned","Bidi_Control","Bidi_C","Bidi_Mirrored","Bidi_M","Case_Ignorable","CI","Cased","Changes_When_Casefolded","CWCF","Changes_When_Casemapped","CWCM","Changes_When_Lowercased","CWL","Changes_When_NFKC_Casefolded","CWKCF","Changes_When_Titlecased","CWT","Changes_When_Uppercased","CWU","Dash","Default_Ignorable_Code_Point","DI","Deprecated","Dep","Diacritic","Dia","Emoji","Emoji_Component","EComp","Emoji_Modifier","EMod","Emoji_Modifier_Base","EBase","Emoji_Presentation","EPres","Extended_Pictographic","ExtPict","Extender","Ext","Grapheme_Base","Gr_Base","Grapheme_Extend","Gr_Ext","Hex_Digit","Hex","IDS_Binary_Operator","IDSB","IDS_Trinary_Operator","IDST","ID_Continue","IDC","ID_Start","IDS","Ideographic","Ideo","Join_Control","Join_C","Logical_Order_Exception","LOE","Lowercase","Lower","Math","Noncharacter_Code_Point","NChar","Pattern_Syntax","Pat_Syn","Pattern_White_Space","Pat_WS","Quotation_Mark","QMark","Radical","Regional_Indicator","RI","Sentence_Terminal","STerm","Soft_Dotted","SD","Terminal_Punctuation","Term","Unified_Ideograph","UIdeo","Uppercase","Upper","Variation_Selector","VS","White_Space","space","XID_Continue","XIDC","XID_Start","XIDS"]),mXe=new Set(["Basic_Emoji","Emoji_Keycap_Sequence","RGI_Emoji_Modifier_Sequence","RGI_Emoji_Flag_Sequence","RGI_Emoji_Tag_Sequence","RGI_Emoji_ZWJ_Sequence","RGI_Emoji"]),EW={General_Category:new Set(["C","Other","Cc","Control","cntrl","Cf","Format","Cn","Unassigned","Co","Private_Use","Cs","Surrogate","L","Letter","LC","Cased_Letter","Ll","Lowercase_Letter","Lm","Modifier_Letter","Lo","Other_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter","M","Mark","Combining_Mark","Mc","Spacing_Mark","Me","Enclosing_Mark","Mn","Nonspacing_Mark","N","Number","Nd","Decimal_Number","digit","Nl","Letter_Number","No","Other_Number","P","Punctuation","punct","Pc","Connector_Punctuation","Pd","Dash_Punctuation","Pe","Close_Punctuation","Pf","Final_Punctuation","Pi","Initial_Punctuation","Po","Other_Punctuation","Ps","Open_Punctuation","S","Symbol","Sc","Currency_Symbol","Sk","Modifier_Symbol","Sm","Math_Symbol","So","Other_Symbol","Z","Separator","Zl","Line_Separator","Zp","Paragraph_Separator","Zs","Space_Separator"]),Script:new Set(["Adlm","Adlam","Aghb","Caucasian_Albanian","Ahom","Arab","Arabic","Armi","Imperial_Aramaic","Armn","Armenian","Avst","Avestan","Bali","Balinese","Bamu","Bamum","Bass","Bassa_Vah","Batk","Batak","Beng","Bengali","Bhks","Bhaiksuki","Bopo","Bopomofo","Brah","Brahmi","Brai","Braille","Bugi","Buginese","Buhd","Buhid","Cakm","Chakma","Cans","Canadian_Aboriginal","Cari","Carian","Cham","Cher","Cherokee","Chrs","Chorasmian","Copt","Coptic","Qaac","Cpmn","Cypro_Minoan","Cprt","Cypriot","Cyrl","Cyrillic","Deva","Devanagari","Diak","Dives_Akuru","Dogr","Dogra","Dsrt","Deseret","Dupl","Duployan","Egyp","Egyptian_Hieroglyphs","Elba","Elbasan","Elym","Elymaic","Ethi","Ethiopic","Geor","Georgian","Glag","Glagolitic","Gong","Gunjala_Gondi","Gonm","Masaram_Gondi","Goth","Gothic","Gran","Grantha","Grek","Greek","Gujr","Gujarati","Guru","Gurmukhi","Hang","Hangul","Hani","Han","Hano","Hanunoo","Hatr","Hatran","Hebr","Hebrew","Hira","Hiragana","Hluw","Anatolian_Hieroglyphs","Hmng","Pahawh_Hmong","Hmnp","Nyiakeng_Puachue_Hmong","Hrkt","Katakana_Or_Hiragana","Hung","Old_Hungarian","Ital","Old_Italic","Java","Javanese","Kali","Kayah_Li","Kana","Katakana","Kawi","Khar","Kharoshthi","Khmr","Khmer","Khoj","Khojki","Kits","Khitan_Small_Script","Knda","Kannada","Kthi","Kaithi","Lana","Tai_Tham","Laoo","Lao","Latn","Latin","Lepc","Lepcha","Limb","Limbu","Lina","Linear_A","Linb","Linear_B","Lisu","Lyci","Lycian","Lydi","Lydian","Mahj","Mahajani","Maka","Makasar","Mand","Mandaic","Mani","Manichaean","Marc","Marchen","Medf","Medefaidrin","Mend","Mende_Kikakui","Merc","Meroitic_Cursive","Mero","Meroitic_Hieroglyphs","Mlym","Malayalam","Modi","Mong","Mongolian","Mroo","Mro","Mtei","Meetei_Mayek","Mult","Multani","Mymr","Myanmar","Nagm","Nag_Mundari","Nand","Nandinagari","Narb","Old_North_Arabian","Nbat","Nabataean","Newa","Nkoo","Nko","Nshu","Nushu","Ogam","Ogham","Olck","Ol_Chiki","Orkh","Old_Turkic","Orya","Oriya","Osge","Osage","Osma","Osmanya","Ougr","Old_Uyghur","Palm","Palmyrene","Pauc","Pau_Cin_Hau","Perm","Old_Permic","Phag","Phags_Pa","Phli","Inscriptional_Pahlavi","Phlp","Psalter_Pahlavi","Phnx","Phoenician","Plrd","Miao","Prti","Inscriptional_Parthian","Rjng","Rejang","Rohg","Hanifi_Rohingya","Runr","Runic","Samr","Samaritan","Sarb","Old_South_Arabian","Saur","Saurashtra","Sgnw","SignWriting","Shaw","Shavian","Shrd","Sharada","Sidd","Siddham","Sind","Khudawadi","Sinh","Sinhala","Sogd","Sogdian","Sogo","Old_Sogdian","Sora","Sora_Sompeng","Soyo","Soyombo","Sund","Sundanese","Sylo","Syloti_Nagri","Syrc","Syriac","Tagb","Tagbanwa","Takr","Takri","Tale","Tai_Le","Talu","New_Tai_Lue","Taml","Tamil","Tang","Tangut","Tavt","Tai_Viet","Telu","Telugu","Tfng","Tifinagh","Tglg","Tagalog","Thaa","Thaana","Thai","Tibt","Tibetan","Tirh","Tirhuta","Tnsa","Tangsa","Toto","Ugar","Ugaritic","Vaii","Vai","Vith","Vithkuqi","Wara","Warang_Citi","Wcho","Wancho","Xpeo","Old_Persian","Xsux","Cuneiform","Yezi","Yezidi","Yiii","Yi","Zanb","Zanabazar_Square","Zinh","Inherited","Qaai","Zyyy","Common","Zzzz","Unknown"]),Script_Extensions:void 0};EW.Script_Extensions=EW.Script;function Gd(t){return am(t)||yp(t)}function O6(t){return Iy(t,Z8,AK)}function IW(t){switch(Ja(t)){case 99:return"lib.esnext.full.d.ts";case 10:return"lib.es2023.full.d.ts";case 9:return"lib.es2022.full.d.ts";case 8:return"lib.es2021.full.d.ts";case 7:return"lib.es2020.full.d.ts";case 6:return"lib.es2019.full.d.ts";case 5:return"lib.es2018.full.d.ts";case 4:return"lib.es2017.full.d.ts";case 3:return"lib.es2016.full.d.ts";case 2:return"lib.es6.d.ts";default:return"lib.d.ts"}}function au(t){return t.start+t.length}function Gke(t){return t.length===0}function Woe(t,r){return r>=t.start&&r<au(t)}function NW(t,r){return r>=t.pos&&r<=t.end}function Kke(t,r){return r.start>=t.start&&au(r)<=au(t)}function Voe(t,r){return r.pos>=t.start&&r.end<=au(t)}function Xke(t,r){return r.start>=t.pos&&au(r)<=t.end}function gXe(t,r){return Qke(t,r)!==void 0}function Qke(t,r){const a=t2e(t,r);return a&&a.length===0?void 0:a}function Zke(t,r){return PW(t.start,t.length,r.start,r.length)}function LW(t,r,a){return PW(t.start,t.length,r,a)}function PW(t,r,a,u){const h=t+r,p=a+u;return a<=h&&p>=t}function Yke(t,r){return r<=au(t)&&r>=t.start}function e2e(t,r){return LW(r,t.pos,t.end-t.pos)}function t2e(t,r){const a=Math.max(t.start,r.start),u=Math.min(au(t),au(r));return a<=u?Fu(a,u):void 0}function Hoe(t){t=t.filter(u=>u.length>0).sort((u,h)=>u.start!==h.start?u.start-h.start:u.length-h.length);const r=[];let a=0;for(;a<t.length;){let u=t[a],h=a+1;for(;h<t.length&&Zke(u,t[h]);){const p=Math.min(u.start,t[h].start),g=Math.max(au(u),au(t[h]));u=Fu(p,g),h++}a=h,r.push(u)}return r}function Ff(t,r){if(t<0)throw new Error("start < 0");if(r<0)throw new Error("length < 0");return{start:t,length:r}}function Fu(t,r){return Ff(t,r-t)}function f8(t){return Ff(t.span.start,t.newLength)}function i2e(t){return Gke(t.span)&&t.newLength===0}function AW(t,r){if(r<0)throw new Error("newLength < 0");return{span:t,newLength:r}}var sG=AW(Ff(0,0),0);function n2e(t){if(t.length===0)return sG;if(t.length===1)return t[0];const r=t[0];let a=r.span.start,u=au(r.span),h=a+r.newLength;for(let p=1;p<t.length;p++){const g=t[p],C=a,b=u,T=h,E=g.span.start,N=au(g.span),R=E+g.newLength;a=Math.min(C,E),u=Math.max(b,b+(N-T)),h=Math.max(R,R+(T-N))}return AW(Fu(a,u),h-a)}function yXe(t){if(t&&t.kind===168){for(let r=t;r;r=r.parent)if(Ho(r)||ss(r)||r.kind===264)return r}}function vp(t,r){return $s(t)&&Zr(t,31)&&r.kind===176}function r2e(t){return ta(t)?Ce(t.elements,s2e):!1}function s2e(t){return Bd(t)?!0:r2e(t.name)}function YL(t){let r=t.parent;for(;ec(r.parent);)r=r.parent.parent;return r.parent}function o2e(t,r){ec(t)&&(t=YL(t));let a=r(t);return t.kind===260&&(t=t.parent),t&&t.kind===261&&(a|=r(t),t=t.parent),t&&t.kind===243&&(a|=r(t)),a}function Rk(t){return o2e(t,jh)}function joe(t){return o2e(t,sDe)}function zb(t){return o2e(t,_4t)}function _4t(t){return t.flags}var a2e=["cs","de","es","fr","it","ja","ko","pl","pt-br","ru","tr","zh-cn","zh-tw"];function zoe(t,r,a){const u=t.toLowerCase(),h=/^([a-z]+)(?:[_-]([a-z]+))?$/.exec(u);if(!h){a&&a.push(Zl(k.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1,"en","ja-jp"));return}const p=h[1],g=h[2];Yt(a2e,u)&&!C(p,g,a)&&C(p,void 0,a),_xe(t);function C(b,T,E){const N=ca(r.getExecutingFilePath()),R=ts(N);let F=zr(R,b);if(T&&(F=F+"-"+T),F=r.resolvePath(zr(F,"diagnosticMessages.generated.json")),!r.fileExists(F))return!1;let H="";try{H=r.readFile(F)}catch{return E&&E.push(Zl(k.Unable_to_open_file_0,F)),!1}try{xDe(JSON.parse(H))}catch{return E&&E.push(Zl(k.Corrupted_locale_file_0,F)),!1}return!0}}function Ql(t,r){if(t)for(;t.original!==void 0;)t=t.original;return!t||!r||r(t)?t:void 0}function Qi(t,r){for(;t;){const a=r(t);if(a==="quit")return;if(a)return t;t=t.parent}}function h8(t){return(t.flags&16)===0}function Mo(t,r){if(t===void 0||h8(t))return t;for(t=t.original;t;){if(h8(t))return!r||r(t)?t:void 0;t=t.original}}function cu(t){return t.length>=2&&t.charCodeAt(0)===95&&t.charCodeAt(1)===95?"_"+t:t}function Ws(t){const r=t;return r.length>=3&&r.charCodeAt(0)===95&&r.charCodeAt(1)===95&&r.charCodeAt(2)===95?r.substr(1):r}function Fr(t){return Ws(t.escapedText)}function aI(t){const r=oI(t.escapedText);return r?Jr(r,P_):void 0}function Eu(t){return t.valueDeclaration&&Wh(t.valueDeclaration)?Fr(t.valueDeclaration.name):Ws(t.escapedName)}function vXe(t){const r=t.parent.parent;if(r){if(Wf(r))return Uoe(r);switch(r.kind){case 243:if(r.declarationList&&r.declarationList.declarations[0])return Uoe(r.declarationList.declarations[0]);break;case 244:let a=r.expression;switch(a.kind===226&&a.operatorToken.kind===64&&(a=a.left),a.kind){case 211:return a.name;case 212:const u=a.argumentExpression;if(ot(u))return u}break;case 217:return Uoe(r.expression);case 256:{if(Wf(r.statement)||jt(r.statement))return Uoe(r.statement);break}}}}function Uoe(t){const r=No(t);return r&&ot(r)?r:void 0}function OW(t,r){return!!(Bf(t)&&ot(t.name)&&Fr(t.name)===Fr(r)||Lu(t)&&Ft(t.declarationList.declarations,a=>OW(a,r)))}function c2e(t){return t.name||vXe(t)}function Bf(t){return!!t.name}function oG(t){switch(t.kind){case 80:return t;case 348:case 341:{const{name:a}=t;if(a.kind===166)return a.right;break}case 213:case 226:{const a=t;switch(Bu(a)){case 1:case 4:case 5:case 3:return nK(a.left);case 7:case 8:case 9:return a.arguments[1];default:return}}case 346:return c2e(t);case 340:return vXe(t);case 277:{const{expression:a}=t;return ot(a)?a:void 0}case 212:const r=t;if(iK(r))return r.argumentExpression}return t.name}function No(t){if(t!==void 0)return oG(t)||(ml(t)||xl(t)||fd(t)?aG(t):void 0)}function aG(t){if(t.parent){if(_d(t.parent)||ec(t.parent))return t.parent.name;if(ur(t.parent)&&t===t.parent.right){if(ot(t.parent.left))return t.parent.left;if(Sl(t.parent.left))return nK(t.parent.left)}else if(_s(t.parent)&&ot(t.parent.name))return t.parent.name}else return}function $w(t){if(lm(t))return $t(t.modifiers,Fd)}function PT(t){if(Zr(t,98303))return $t(t.modifiers,Fa)}function bXe(t,r){if(t.name)if(ot(t.name)){const a=t.name.escapedText;return lG(t.parent,r).filter(u=>Qm(u)&&ot(u.name)&&u.name.escapedText===a)}else{const a=t.parent.parameters.indexOf(t);j.assert(a>-1,"Parameters should always be in their parents' parameter list");const u=lG(t.parent,r).filter(Qm);if(a<u.length)return[u[a]]}return w}function M6(t){return bXe(t,!1)}function l2e(t){return bXe(t,!0)}function CXe(t,r){const a=t.name.escapedText;return lG(t.parent,r).filter(u=>Rg(u)&&u.typeParameters.some(h=>h.name.escapedText===a))}function u2e(t){return CXe(t,!1)}function d2e(t){return CXe(t,!0)}function f2e(t){return!!Tg(t,Qm)}function h2e(t){return Tg(t,KP)}function _2e(t){return uG(t,NX)}function qoe(t){return Tg(t,KEe)}function SXe(t){return Tg(t,Cle)}function p2e(t){return Tg(t,Cle,!0)}function wXe(t){return Tg(t,Sle)}function m2e(t){return Tg(t,Sle,!0)}function xXe(t){return Tg(t,wle)}function g2e(t){return Tg(t,wle,!0)}function kXe(t){return Tg(t,xle)}function y2e(t){return Tg(t,xle,!0)}function v2e(t){return Tg(t,EX,!0)}function $oe(t){return Tg(t,kle)}function b2e(t){return Tg(t,kle,!0)}function Joe(t){return Tg(t,mH)}function cG(t){return Tg(t,Tle)}function C2e(t){return Tg(t,IX)}function TXe(t){return Tg(t,Rg)}function Goe(t){return Tg(t,LX)}function Fk(t){const r=Tg(t,D7);if(r&&r.typeExpression&&r.typeExpression.type)return r}function Bk(t){let r=Tg(t,D7);return!r&&$s(t)&&(r=Fe(M6(t),a=>!!a.typeExpression)),r&&r.typeExpression&&r.typeExpression.type}function MW(t){const r=C2e(t);if(r&&r.typeExpression)return r.typeExpression.type;const a=Fk(t);if(a&&a.typeExpression){const u=a.typeExpression.type;if(a_(u)){const h=Fe(u.members,VP);return h&&h.type}if(Hy(u)||T3(u))return u.type}}function lG(t,r){var a;if(!xV(t))return w;let u=(a=t.jsDoc)==null?void 0:a.jsDocCache;if(u===void 0||r){const h=jae(t,r);j.assert(h.length<2||h[0]!==h[1]),u=Rr(h,p=>z0(p)?p.tags:p),r||(t.jsDoc??(t.jsDoc=[]),t.jsDoc.jsDocCache=u)}return u}function Wk(t){return lG(t,!1)}function Tg(t,r,a){return Fe(lG(t,a),r)}function uG(t,r){return Wk(t).filter(r)}function DXe(t,r){return Wk(t).filter(a=>a.kind===r)}function RW(t){return typeof t=="string"?t:t==null?void 0:t.map(r=>r.kind===321?r.text:p4t(r)).join("")}function p4t(t){const r=t.kind===324?"link":t.kind===325?"linkcode":"linkplain",a=t.name?bp(t.name):"",u=t.name&&(t.text===""||t.text.startsWith("://"))?"":" ";return`{@${r} ${a}${u}${t.text}}`}function Jw(t){if(tC(t)){if(D3(t.parent)){const r=t3(t.parent);if(r&&P(r.tags))return Rr(r.tags,a=>Rg(a)?a.typeParameters:void 0)}return w}if(Ng(t))return j.assert(t.parent.kind===320),Rr(t.parent.tags,r=>Rg(r)?r.typeParameters:void 0);if(t.typeParameters||aIe(t)&&t.typeParameters)return t.typeParameters;if(nr(t)){const r=vK(t);if(r.length)return r;const a=Bk(t);if(a&&Hy(a)&&a.typeParameters)return a.typeParameters}return w}function R6(t){return t.constraint?t.constraint:Rg(t.parent)&&t===t.parent.typeParameters[0]?t.parent.constraint:void 0}function Mv(t){return t.kind===80||t.kind===81}function FW(t){return t.kind===178||t.kind===177}function dG(t){return Nr(t)&&!!(t.flags&64)}function Koe(t){return wl(t)&&!!(t.flags&64)}function cI(t){return la(t)&&!!(t.flags&64)}function gh(t){const r=t.kind;return!!(t.flags&64)&&(r===211||r===212||r===213||r===235)}function _8(t){return gh(t)&&!$P(t)&&!!t.questionDotToken}function fG(t){return _8(t.parent)&&t.parent.expression===t}function p8(t){return!gh(t.parent)||_8(t.parent)||t!==t.parent.expression}function Xoe(t){return t.kind===226&&t.operatorToken.kind===61}function O0(t){return qp(t)&&ot(t.typeName)&&t.typeName.escapedText==="const"&&!t.typeArguments}function l0(t){return Vu(t,8)}function hG(t){return $P(t)&&!!(t.flags&64)}function m8(t){return t.kind===252||t.kind===251}function Qoe(t){return t.kind===280||t.kind===279}function g8(t){return t.kind===348||t.kind===341}function _G(t){return t>=166}function Zoe(t){return t>=0&&t<=165}function eP(t){return Zoe(t.kind)}function AT(t){return Li(t,"pos")&&Li(t,"end")}function y8(t){return 9<=t&&t<=15}function lI(t){return y8(t.kind)}function Yoe(t){switch(t.kind){case 210:case 209:case 14:case 218:case 231:return!0}return!1}function Gw(t){return 15<=t&&t<=18}function S2e(t){return Gw(t.kind)}function pG(t){const r=t.kind;return r===17||r===18}function Vk(t){return l_(t)||vh(t)}function v8(t){switch(t.kind){case 276:return t.isTypeOnly||t.parent.parent.isTypeOnly;case 274:return t.parent.isTypeOnly;case 273:case 271:return t.isTypeOnly}return!1}function w2e(t){switch(t.kind){case 281:return t.isTypeOnly||t.parent.parent.isTypeOnly;case 278:return t.isTypeOnly&&!!t.moduleSpecifier&&!t.exportClause;case 280:return t.parent.isTypeOnly}return!1}function Kw(t){return v8(t)||w2e(t)}function eae(t){return t.kind===11||Gw(t.kind)}function x2e(t){return Ha(t)||ot(t)}function zl(t){var r;return ot(t)&&((r=t.emitNode)==null?void 0:r.autoGenerate)!==void 0}function uI(t){var r;return Vs(t)&&((r=t.emitNode)==null?void 0:r.autoGenerate)!==void 0}function BW(t){const r=t.emitNode.autoGenerate.flags;return!!(r&32)&&!!(r&16)&&!!(r&8)}function Wh(t){return(Lo(t)||iP(t))&&Vs(t.name)}function F6(t){return Nr(t)&&Vs(t.name)}function Xw(t){switch(t){case 128:case 129:case 134:case 87:case 138:case 90:case 95:case 103:case 125:case 123:case 124:case 148:case 126:case 147:case 164:return!0}return!1}function b8(t){return!!(CP(t)&31)}function tae(t){return b8(t)||t===126||t===164||t===129}function Fa(t){return Xw(t.kind)}function E_(t){const r=t.kind;return r===166||r===80}function id(t){const r=t.kind;return r===80||r===81||r===11||r===9||r===167}function dI(t){const r=t.kind;return r===80||r===206||r===207}function Ho(t){return!!t&&tP(t.kind)}function B6(t){return!!t&&(tP(t.kind)||gu(t))}function Qc(t){return t&&EXe(t.kind)}function C8(t){return t.kind===112||t.kind===97}function EXe(t){switch(t){case 262:case 174:case 176:case 177:case 178:case 218:case 219:return!0;default:return!1}}function tP(t){switch(t){case 173:case 179:case 323:case 180:case 181:case 184:case 317:case 185:return!0;default:return EXe(t)}}function iae(t){return Os(t)||H1(t)||Xo(t)&&Ho(t.parent)}function Od(t){const r=t.kind;return r===176||r===172||r===174||r===177||r===178||r===181||r===175||r===240}function ss(t){return t&&(t.kind===263||t.kind===231)}function Qw(t){return t&&(t.kind===177||t.kind===178)}function I_(t){return Lo(t)&&O1(t)}function k2e(t){return nr(t)&&PP(t)?(!jT(t)||!rx(t.expression))&&!bI(t,!0):t.parent&&ss(t.parent)&&Lo(t)&&!O1(t)}function iP(t){switch(t.kind){case 174:case 177:case 178:return!0;default:return!1}}function Ul(t){return Fa(t)||Fd(t)}function OT(t){const r=t.kind;return r===180||r===179||r===171||r===173||r===181||r===177||r===178}function mG(t){return OT(t)||Od(t)}function Ub(t){const r=t.kind;return r===303||r===304||r===305||r===174||r===177||r===178}function ws(t){return Tce(t.kind)}function T2e(t){switch(t.kind){case 184:case 185:return!0}return!1}function ta(t){if(t){const r=t.kind;return r===207||r===206}return!1}function S8(t){const r=t.kind;return r===209||r===210}function gG(t){const r=t.kind;return r===208||r===232}function WW(t){switch(t.kind){case 260:case 169:case 208:return!0}return!1}function D2e(t){return _s(t)||$s(t)||HW(t)||jW(t)}function VW(t){return nae(t)||rae(t)}function nae(t){switch(t.kind){case 206:case 210:return!0}return!1}function HW(t){switch(t.kind){case 208:case 303:case 304:case 305:return!0}return!1}function rae(t){switch(t.kind){case 207:case 209:return!0}return!1}function jW(t){switch(t.kind){case 208:case 232:case 230:case 209:case 210:case 80:case 211:case 212:return!0}return lf(t,!0)}function E2e(t){const r=t.kind;return r===211||r===166||r===205}function zW(t){const r=t.kind;return r===211||r===166}function sae(t){return MT(t)||lx(t)}function MT(t){switch(t.kind){case 286:case 285:case 213:case 214:case 215:case 170:return!0;default:return!1}}function T1(t){return t.kind===213||t.kind===214}function nP(t){const r=t.kind;return r===228||r===15}function N_(t){return IXe(l0(t).kind)}function IXe(t){switch(t){case 211:case 212:case 214:case 213:case 284:case 285:case 288:case 215:case 209:case 217:case 210:case 231:case 218:case 80:case 81:case 14:case 9:case 10:case 11:case 15:case 228:case 97:case 106:case 110:case 112:case 108:case 235:case 233:case 236:case 102:case 282:return!0;default:return!1}}function oae(t){return NXe(l0(t).kind)}function NXe(t){switch(t){case 224:case 225:case 220:case 221:case 222:case 223:case 216:return!0;default:return IXe(t)}}function I2e(t){switch(t.kind){case 225:return!0;case 224:return t.operator===46||t.operator===47;default:return!1}}function N2e(t){switch(t.kind){case 106:case 112:case 97:case 224:return!0;default:return lI(t)}}function jt(t){return m4t(l0(t).kind)}function m4t(t){switch(t){case 227:case 229:case 219:case 226:case 230:case 234:case 232:case 355:case 354:case 238:return!0;default:return NXe(t)}}function Hk(t){const r=t.kind;return r===216||r===234}function Zw(t,r){switch(t.kind){case 248:case 249:case 250:case 246:case 247:return!0;case 256:return r&&Zw(t.statement,r)}return!1}function g4t(t){return Il(t)||Ju(t)}function L2e(t){return Ft(t,g4t)}function yG(t){return!ZW(t)&&!Il(t)&&!Zr(t,32)&&!Vh(t)}function UW(t){return ZW(t)||Il(t)||Zr(t,32)}function fI(t){return t.kind===249||t.kind===250}function vG(t){return Xo(t)||jt(t)}function aae(t){return Xo(t)}function Hm(t){return Sf(t)||jt(t)}function P2e(t){const r=t.kind;return r===268||r===267||r===80}function LXe(t){const r=t.kind;return r===268||r===267}function PXe(t){const r=t.kind;return r===80||r===267}function cae(t){const r=t.kind;return r===275||r===274}function qW(t){return t.kind===267||t.kind===266}function M0(t){switch(t.kind){case 219:case 226:case 208:case 213:case 179:case 263:case 231:case 175:case 176:case 185:case 180:case 212:case 266:case 306:case 277:case 278:case 281:case 262:case 218:case 184:case 177:case 80:case 273:case 271:case 276:case 181:case 264:case 338:case 340:case 317:case 341:case 348:case 323:case 346:case 322:case 291:case 292:case 293:case 200:case 174:case 173:case 267:case 202:case 280:case 270:case 274:case 214:case 15:case 9:case 210:case 169:case 211:case 303:case 172:case 171:case 178:case 304:case 307:case 305:case 11:case 265:case 187:case 168:case 260:return!0;default:return!1}}function Ay(t){switch(t.kind){case 219:case 241:case 179:case 269:case 299:case 175:case 194:case 176:case 185:case 180:case 248:case 249:case 250:case 262:case 218:case 184:case 177:case 181:case 338:case 340:case 317:case 323:case 346:case 200:case 174:case 173:case 267:case 178:case 307:case 265:return!0;default:return!1}}function y4t(t){return t===219||t===208||t===263||t===231||t===175||t===176||t===266||t===306||t===281||t===262||t===218||t===177||t===273||t===271||t===276||t===264||t===291||t===174||t===173||t===267||t===270||t===274||t===280||t===169||t===303||t===172||t===171||t===178||t===304||t===265||t===168||t===260||t===346||t===338||t===348||t===202}function A2e(t){return t===262||t===282||t===263||t===264||t===265||t===266||t===267||t===272||t===271||t===278||t===277||t===270}function O2e(t){return t===252||t===251||t===259||t===246||t===244||t===242||t===249||t===250||t===248||t===245||t===256||t===253||t===255||t===257||t===258||t===243||t===247||t===254||t===353}function Wf(t){return t.kind===168?t.parent&&t.parent.kind!==345||nr(t):y4t(t.kind)}function M2e(t){return A2e(t.kind)}function $W(t){return O2e(t.kind)}function Ps(t){const r=t.kind;return O2e(r)||A2e(r)||v4t(t)}function v4t(t){return t.kind!==241||t.parent!==void 0&&(t.parent.kind===258||t.parent.kind===299)?!1:!WT(t)}function R2e(t){const r=t.kind;return O2e(r)||A2e(r)||r===241}function F2e(t){const r=t.kind;return r===283||r===166||r===80}function w8(t){const r=t.kind;return r===110||r===80||r===211||r===295}function JW(t){const r=t.kind;return r===284||r===294||r===285||r===12||r===288}function bG(t){const r=t.kind;return r===291||r===293}function B2e(t){const r=t.kind;return r===11||r===294}function oh(t){const r=t.kind;return r===286||r===285}function CG(t){const r=t.kind;return r===296||r===297}function W6(t){return t.kind>=309&&t.kind<=351}function SG(t){return t.kind===320||t.kind===319||t.kind===321||rP(t)||V6(t)||OI(t)||tC(t)}function V6(t){return t.kind>=327&&t.kind<=351}function D1(t){return t.kind===178}function oS(t){return t.kind===177}function jp(t){if(!xV(t))return!1;const{jsDoc:r}=t;return!!r&&r.length>0}function wG(t){return!!t.type}function aS(t){return!!t.initializer}function hI(t){switch(t.kind){case 260:case 169:case 208:case 172:case 303:case 306:return!0;default:return!1}}function lae(t){return t.kind===291||t.kind===293||Ub(t)}function xG(t){return t.kind===183||t.kind===233}var AXe=1073741823;function W2e(t){let r=AXe;for(const a of t){if(!a.length)continue;let u=0;for(;u<a.length&&u<r&&Pv(a.charCodeAt(u));u++);if(u<r&&(r=u),r===0)return 0}return r===AXe?void 0:r}function Bc(t){return t.kind===11||t.kind===15}function rP(t){return t.kind===324||t.kind===325||t.kind===326}function uae(t){const r=rl(t.parameters);return!!r&&Oy(r)}function Oy(t){const r=Qm(t)?t.typeExpression&&t.typeExpression.type:t.type;return t.dotDotDotToken!==void 0||!!r&&r.kind===318}function OXe(t,r){return r.text.substring(t.pos,t.end).includes("@internal")}function V2e(t,r){r??(r=_n(t));const a=Mo(t);if(a&&a.kind===169){const h=a.parent.parameters.indexOf(a),p=h>0?a.parent.parameters[h-1]:void 0,g=r.text,C=p?Js(qw(g,Va(g,p.end+1,!1,!0)),Av(g,t.pos)):qw(g,Va(g,t.pos,!1,!0));return Ft(C)&&OXe(va(C),r)}const u=a&&Lae(a,r);return!!O(u,h=>OXe(h,r))}var dae=[],jk="tslib",x8=160,fae=1e6;function ql(t,r){const a=t.declarations;if(a){for(const u of a)if(u.kind===r)return u}}function H2e(t,r){return $t(t.declarations||w,a=>a.kind===r)}function _a(t){const r=new Map;if(t)for(const a of t)r.set(a.escapedName,a);return r}function Rv(t){return(t.flags&33554432)!==0}function H6(t){return!!(t.flags&1536)&&t.escapedName.charCodeAt(0)===34}var kG=b4t();function b4t(){var t="";const r=a=>t+=a;return{getText:()=>t,write:r,rawWrite:r,writeKeyword:r,writeOperator:r,writePunctuation:r,writeSpace:r,writeStringLiteral:r,writeLiteral:r,writeParameter:r,writeProperty:r,writeSymbol:(a,u)=>r(a),writeTrailingSemicolon:r,writeComment:r,getTextPos:()=>t.length,getLine:()=>0,getColumn:()=>0,getIndent:()=>0,isAtStartOfLine:()=>!1,hasTrailingComment:()=>!1,hasTrailingWhitespace:()=>!!t.length&&Pv(t.charCodeAt(t.length-1)),writeLine:()=>t+=" ",increaseIndent:Tc,decreaseIndent:Tc,clear:()=>t=""}}function TG(t,r){return t.configFilePath!==r.configFilePath||C4t(t,r)}function C4t(t,r){return j6(t,r,Kle)}function j2e(t,r){return j6(t,r,NIe)}function j6(t,r,a){return t!==r&&a.some(u=>!ZK(BK(t,u),BK(r,u)))}function z2e(t,r){for(;;){const a=r(t);if(a==="quit")return;if(a!==void 0)return a;if(Os(t))return;t=t.parent}}function cf(t,r){const a=t.entries();for(const[u,h]of a){const p=r(h,u);if(p)return p}}function qb(t,r){const a=t.keys();for(const u of a){const h=r(u);if(h)return h}}function DG(t,r){t.forEach((a,u)=>{r.set(u,a)})}function z6(t){const r=kG.getText();try{return t(kG),kG.getText()}finally{kG.clear(),kG.writeKeyword(r)}}function GW(t){return t.end-t.pos}function hae(t,r){return t.path===r.path&&!t.prepend==!r.prepend&&!t.circular==!r.circular}function U2e(t,r){return t===r||t.resolvedModule===r.resolvedModule||!!t.resolvedModule&&!!r.resolvedModule&&t.resolvedModule.isExternalLibraryImport===r.resolvedModule.isExternalLibraryImport&&t.resolvedModule.extension===r.resolvedModule.extension&&t.resolvedModule.resolvedFileName===r.resolvedModule.resolvedFileName&&t.resolvedModule.originalPath===r.resolvedModule.originalPath&&S4t(t.resolvedModule.packageId,r.resolvedModule.packageId)&&t.alternateResult===r.alternateResult}function sP(t){return t.resolvedModule}function EG(t){return t.resolvedTypeReferenceDirective}function IG(t,r,a,u,h){var p;const g=(p=r.getResolvedModule(t,a,u))==null?void 0:p.alternateResult,C=g&&(yh(r.getCompilerOptions())===2?[k.There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler,[g]]:[k.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings,[g,g.includes(Xv+"@types/")?`@types/${B3(h)}`:h]]),b=C?jo(void 0,C[0],...C[1]):r.typesPackageExists(h)?jo(void 0,k.If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1,h,B3(h)):r.packageBundlesTypes(h)?jo(void 0,k.If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1,h,a):jo(void 0,k.Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0,a,B3(h));return b&&(b.repopulateInfo=()=>({moduleReference:a,mode:u,packageName:h===a?void 0:h})),b}function _ae(t){const r=qv(t.fileName),a=t.packageJsonScope,u=r===".ts"?".mts":r===".js"?".mjs":void 0,h=a&&!a.contents.packageJsonContent.type?u?jo(void 0,k.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1,u,zr(a.packageDirectory,"package.json")):jo(void 0,k.To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0,zr(a.packageDirectory,"package.json")):u?jo(void 0,k.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module,u):jo(void 0,k.To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module);return h.repopulateInfo=()=>!0,h}function S4t(t,r){return t===r||!!t&&!!r&&t.name===r.name&&t.subModuleName===r.subModuleName&&t.version===r.version&&t.peerDependencies===r.peerDependencies}function NG({name:t,subModuleName:r}){return r?`${t}/${r}`:t}function zk(t){return`${NG(t)}@${t.version}${t.peerDependencies??""}`}function q2e(t,r){return t===r||t.resolvedTypeReferenceDirective===r.resolvedTypeReferenceDirective||!!t.resolvedTypeReferenceDirective&&!!r.resolvedTypeReferenceDirective&&t.resolvedTypeReferenceDirective.resolvedFileName===r.resolvedTypeReferenceDirective.resolvedFileName&&!!t.resolvedTypeReferenceDirective.primary==!!r.resolvedTypeReferenceDirective.primary&&t.resolvedTypeReferenceDirective.originalPath===r.resolvedTypeReferenceDirective.originalPath}function pae(t,r,a,u){j.assert(t.length===r.length);for(let h=0;h<t.length;h++){const p=r[h],g=t[h],C=a(g);if(C?!p||!u(C,p):p)return!0}return!1}function oP(t){return w4t(t),(t.flags&1048576)!==0}function w4t(t){t.flags&2097152||((t.flags&262144||Uo(t,oP))&&(t.flags|=1048576),t.flags|=2097152)}function _n(t){for(;t&&t.kind!==307;)t=t.parent;return t}function LG(t){return _n(t.valueDeclaration||xae(t))}function k8(t,r){return!!t&&(t.scriptKind===1||t.scriptKind===2)&&!t.checkJsDirective&&r===void 0}function $2e(t){switch(t.kind){case 241:case 269:case 248:case 249:case 250:return!0}return!1}function Yw(t,r){return j.assert(t>=0),Lv(r)[t]}function MXe(t){const r=_n(t),a=Ia(r,t.pos);return`${r.fileName}(${a.line+1},${a.character+1})`}function KW(t,r){j.assert(t>=0);const a=Lv(r),u=t,h=r.text;if(u+1===a.length)return h.length-1;{const p=a[u];let g=a[u+1]-1;for(j.assert(mh(h.charCodeAt(g)));p<=g&&mh(h.charCodeAt(g));)g--;return g}}function PG(t,r,a){return!(a&&a(r))&&!t.identifiers.has(r)}function lu(t){return t===void 0?!0:t.pos===t.end&&t.pos>=0&&t.kind!==1}function Dg(t){return!lu(t)}function J2e(t,r){return $l(t)?r===t.expression:gu(t)?r===t.modifiers:O_(t)?r===t.initializer:Lo(t)?r===t.questionToken&&I_(t):_d(t)?r===t.modifiers||r===t.questionToken||r===t.exclamationToken||XW(t.modifiers,r,Ul):lh(t)?r===t.equalsToken||r===t.modifiers||r===t.questionToken||r===t.exclamationToken||XW(t.modifiers,r,Ul):Nu(t)?r===t.exclamationToken:iu(t)?r===t.typeParameters||r===t.type||XW(t.typeParameters,r,$l):um(t)?r===t.typeParameters||XW(t.typeParameters,r,$l):kp(t)?r===t.typeParameters||r===t.type||XW(t.typeParameters,r,$l):pH(t)?r===t.modifiers||XW(t.modifiers,r,Ul):!1}function XW(t,r,a){return!t||Ao(r)||!a(r)?!1:Yt(t,r)}function RXe(t,r,a){if(r===void 0||r.length===0)return t;let u=0;for(;u<t.length&&a(t[u]);++u);return t.splice(u,0,...r),t}function FXe(t,r,a){if(r===void 0)return t;let u=0;for(;u<t.length&&a(t[u]);++u);return t.splice(u,0,r),t}function BXe(t){return I1(t)||!!(Ya(t)&2097152)}function Fv(t,r){return RXe(t,r,I1)}function mae(t,r){return RXe(t,r,BXe)}function WXe(t,r){return FXe(t,r,I1)}function _I(t,r){return FXe(t,r,BXe)}function gae(t,r,a){if(t.charCodeAt(r+1)===47&&r+2<a&&t.charCodeAt(r+2)===47){const u=t.substring(r,a);return!!(P4t.test(u)||M4t.test(u)||R4t.test(u)||A4t.test(u)||O4t.test(u)||F4t.test(u))}return!1}function AG(t,r){return t.charCodeAt(r+1)===42&&t.charCodeAt(r+2)===33}function G2e(t,r){const a=new Map(r.map(g=>[`${Ia(t,g.range.end).line}`,g])),u=new Map;return{getUnusedExpectations:h,markUsed:p};function h(){return as(a.entries()).filter(([g,C])=>C.type===0&&!u.get(g)).map(([g,C])=>C)}function p(g){return a.has(`${g}`)?(u.set(`${g}`,!0),!0):!1}}function ex(t,r,a){if(lu(t))return t.pos;if(W6(t)||t.kind===12)return Va((r??_n(t)).text,t.pos,!1,!0);if(a&&jp(t))return ex(t.jsDoc[0],r);if(t.kind===352){r??(r=_n(t));const u=Ra(Dle(t,r));if(u)return ex(u,r,a)}return Va((r??_n(t)).text,t.pos,!1,!1,dV(t))}function yae(t,r){const a=!lu(t)&&Fg(t)?rt(t.modifiers,Fd):void 0;return a?Va((r||_n(t)).text,a.end):ex(t,r)}function K2e(t,r){const a=!lu(t)&&Fg(t)&&t.modifiers?va(t.modifiers):void 0;return a?Va((r||_n(t)).text,a.end):ex(t,r)}function RT(t,r,a=!1){return T8(t.text,r,a)}function x4t(t){return!!Qi(t,o2)}function OG(t){return!!(Ju(t)&&t.exportClause&&jy(t.exportClause)&&My(t.exportClause.name))}function tx(t){return t.kind===11?t.text:Ws(t.escapedText)}function FT(t){return t.kind===11?cu(t.text):t.escapedText}function My(t){return(t.kind===11?t.text:t.escapedText)==="default"}function T8(t,r,a=!1){if(lu(r))return"";let u=t.substring(a?r.pos:Va(t,r.pos),r.end);return x4t(r)&&(u=u.split(/\r\n|\n|\r/).map(h=>h.replace(/^\s*\*/,"").trimStart()).join(`
+`)),u}function uu(t,r=!1){return RT(_n(t),t,r)}function k4t(t){return t.pos}function U6(t,r){return Jt(t,r,k4t,_l)}function Ya(t){const r=t.emitNode;return r&&r.flags||0}function u0(t){const r=t.emitNode;return r&&r.internalFlags||0}var vae=Bh(()=>new Map(Object.entries({Array:new Map(Object.entries({es2015:["find","findIndex","fill","copyWithin","entries","keys","values"],es2016:["includes"],es2019:["flat","flatMap"],es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),Iterator:new Map(Object.entries({es2015:w})),AsyncIterator:new Map(Object.entries({es2015:w})),Atomics:new Map(Object.entries({es2017:w})),SharedArrayBuffer:new Map(Object.entries({es2017:w})),AsyncIterable:new Map(Object.entries({es2018:w})),AsyncIterableIterator:new Map(Object.entries({es2018:w})),AsyncGenerator:new Map(Object.entries({es2018:w})),AsyncGeneratorFunction:new Map(Object.entries({es2018:w})),RegExp:new Map(Object.entries({es2015:["flags","sticky","unicode"],es2018:["dotAll"]})),Reflect:new Map(Object.entries({es2015:["apply","construct","defineProperty","deleteProperty","get","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"]})),ArrayConstructor:new Map(Object.entries({es2015:["from","of"],esnext:["fromAsync"]})),ObjectConstructor:new Map(Object.entries({es2015:["assign","getOwnPropertySymbols","keys","is","setPrototypeOf"],es2017:["values","entries","getOwnPropertyDescriptors"],es2019:["fromEntries"],es2022:["hasOwn"]})),NumberConstructor:new Map(Object.entries({es2015:["isFinite","isInteger","isNaN","isSafeInteger","parseFloat","parseInt"]})),Math:new Map(Object.entries({es2015:["clz32","imul","sign","log10","log2","log1p","expm1","cosh","sinh","tanh","acosh","asinh","atanh","hypot","trunc","fround","cbrt"]})),Map:new Map(Object.entries({es2015:["entries","keys","values"]})),Set:new Map(Object.entries({es2015:["entries","keys","values"]})),PromiseConstructor:new Map(Object.entries({es2015:["all","race","reject","resolve"],es2020:["allSettled"],es2021:["any"]})),Symbol:new Map(Object.entries({es2015:["for","keyFor"],es2019:["description"]})),WeakMap:new Map(Object.entries({es2015:["entries","keys","values"]})),WeakSet:new Map(Object.entries({es2015:["entries","keys","values"]})),String:new Map(Object.entries({es2015:["codePointAt","includes","endsWith","normalize","repeat","startsWith","anchor","big","blink","bold","fixed","fontcolor","fontsize","italics","link","small","strike","sub","sup"],es2017:["padStart","padEnd"],es2019:["trimStart","trimEnd","trimLeft","trimRight"],es2020:["matchAll"],es2021:["replaceAll"],es2022:["at"],esnext:["isWellFormed","toWellFormed"]})),StringConstructor:new Map(Object.entries({es2015:["fromCodePoint","raw"]})),DateTimeFormat:new Map(Object.entries({es2017:["formatToParts"]})),Promise:new Map(Object.entries({es2015:w,es2018:["finally"]})),RegExpMatchArray:new Map(Object.entries({es2018:["groups"]})),RegExpExecArray:new Map(Object.entries({es2018:["groups"]})),Intl:new Map(Object.entries({es2018:["PluralRules"]})),NumberFormat:new Map(Object.entries({es2018:["formatToParts"]})),SymbolConstructor:new Map(Object.entries({es2020:["matchAll"]})),DataView:new Map(Object.entries({es2020:["setBigInt64","setBigUint64","getBigInt64","getBigUint64"]})),BigInt:new Map(Object.entries({es2020:w})),RelativeTimeFormat:new Map(Object.entries({es2020:["format","formatToParts","resolvedOptions"]})),Int8Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),Uint8Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),Uint8ClampedArray:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),Int16Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),Uint16Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),Int32Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),Uint32Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),Float32Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),Float64Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),BigInt64Array:new Map(Object.entries({es2020:w,es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),BigUint64Array:new Map(Object.entries({es2020:w,es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),Error:new Map(Object.entries({es2022:["cause"]}))}))),X2e=(t=>(t[t.None=0]="None",t[t.NeverAsciiEscape=1]="NeverAsciiEscape",t[t.JsxAttributeEscape=2]="JsxAttributeEscape",t[t.TerminateUnterminatedLiterals=4]="TerminateUnterminatedLiterals",t[t.AllowNumericSeparator=8]="AllowNumericSeparator",t))(X2e||{});function Q2e(t,r,a){if(r&&T4t(t,a))return RT(r,t);switch(t.kind){case 11:{const u=a&2?sce:a&1||Ya(t)&16777216?Vy:dK;return t.singleQuote?"'"+u(t.text,39)+"'":'"'+u(t.text,34)+'"'}case 15:case 16:case 17:case 18:{const u=a&1||Ya(t)&16777216?Vy:dK,h=t.rawText??nce(u(t.text,96));switch(t.kind){case 15:return"`"+h+"`";case 16:return"`"+h+"${";case 17:return"}"+h+"${";case 18:return"}"+h+"`"}break}case 9:case 10:return t.text;case 14:return a&4&&t.isUnterminated?t.text+(t.text.charCodeAt(t.text.length-1)===92?" /":"/"):t.text}return j.fail(`Literal kind '${t.kind}' not accounted for.`)}function T4t(t,r){if(cl(t)||!t.parent||r&4&&t.isUnterminated)return!1;if(A_(t)){if(t.numericLiteralFlags&26656)return!1;if(t.numericLiteralFlags&512)return!!(r&8)}return!p7(t)}function Z2e(t){return Oo(t)?`"${Vy(t)}"`:""+t}function Y2e(t){return ud(t).replace(/^(\d)/,"_$1").replace(/\W/g,"_")}function bae(t){return(zb(t)&7)!==0||Cae(t)}function Cae(t){const r=A1(t);return r.kind===260&&r.parent.kind===299}function Vh(t){return rd(t)&&(t.name.kind===11||Ry(t))}function MG(t){return rd(t)&&t.name.kind===11}function Sae(t){return rd(t)&&Ha(t.name)}function D4t(t){return rd(t)||ot(t)}function QW(t){return E4t(t.valueDeclaration)}function E4t(t){return!!t&&t.kind===267&&!t.body}function eTe(t){return t.kind===307||t.kind===267||B6(t)}function Ry(t){return!!(t.flags&2048)}function BT(t){return Vh(t)&&wae(t)}function wae(t){switch(t.parent.kind){case 307:return wd(t.parent);case 268:return Vh(t.parent.parent)&&Os(t.parent.parent.parent)&&!wd(t.parent.parent.parent)}return!1}function xae(t){var r;return(r=t.declarations)==null?void 0:r.find(a=>!BT(a)&&!(rd(a)&&Ry(a)))}function I4t(t){return t===1||t===100||t===199}function aP(t,r){return wd(t)||I4t(zh(r))&&!!t.commonJsModuleIndicator}function kae(t,r){switch(t.scriptKind){case 1:case 3:case 2:case 4:break;default:return!1}return t.isDeclarationFile?!1:!!(ah(r,"alwaysStrict")||rIe(t.statements)||wd(t)||Ag(r))}function Tae(t){return!!(t.flags&33554432)||Zr(t,128)}function Dae(t,r){switch(t.kind){case 307:case 269:case 299:case 267:case 248:case 249:case 250:case 176:case 174:case 177:case 178:case 262:case 218:case 219:case 172:case 175:return!0;case 241:return!B6(r)}return!1}function Eae(t){switch(j.type(t),t.kind){case 338:case 346:case 323:return!0;default:return Iae(t)}}function Iae(t){switch(j.type(t),t.kind){case 179:case 180:case 173:case 181:case 184:case 185:case 317:case 263:case 231:case 264:case 265:case 345:case 262:case 174:case 176:case 177:case 178:case 218:case 219:return!0;default:return!1}}function cP(t){switch(t.kind){case 272:case 271:return!0;default:return!1}}function tTe(t){return cP(t)||HT(t)}function iTe(t){return cP(t)||hV(t)}function RG(t){switch(t.kind){case 272:case 271:case 243:case 263:case 262:case 267:case 265:case 264:case 266:return!0;default:return!1}}function nTe(t){return ZW(t)||rd(t)||V1(t)||zp(t)}function ZW(t){return cP(t)||Ju(t)}function FG(t){return Qi(t.parent,r=>!!(wue(r)&1))}function R0(t){return Qi(t.parent,r=>Dae(r,r.parent))}function rTe(t,r){let a=R0(t);for(;a;)r(a),a=R0(a)}function al(t){return!t||GW(t)===0?"(Missing)":uu(t)}function sTe(t){return t.declaration?al(t.declaration.parameters[0].name):void 0}function YW(t){return t.kind===167&&!cm(t.expression)}function D8(t){var r;switch(t.kind){case 80:case 81:return(r=t.emitNode)!=null&&r.autoGenerate?void 0:t.escapedText;case 11:case 9:case 10:case 15:return cu(t.text);case 167:return cm(t.expression)?cu(t.expression.text):void 0;case 295:return LP(t);default:return j.assertNever(t)}}function lP(t){return j.checkDefined(D8(t))}function bp(t){switch(t.kind){case 110:return"this";case 81:case 80:return GW(t)===0?Fr(t):uu(t);case 166:return bp(t.left)+"."+bp(t.right);case 211:return ot(t.name)||Vs(t.name)?bp(t.expression)+"."+bp(t.name):j.assertNever(t.name);case 311:return bp(t.left)+"#"+bp(t.right);case 295:return bp(t.namespace)+":"+bp(t.name);default:return j.assertNever(t)}}function Kn(t,r,...a){const u=_n(t);return jm(u,t,r,...a)}function q6(t,r,a,...u){const h=Va(t.text,r.pos);return Md(t,h,r.end-h,a,...u)}function jm(t,r,a,...u){const h=pI(t,r);return Md(t,h.start,h.length,a,...u)}function Bv(t,r,a,u){const h=pI(t,r);return BG(t,h.start,h.length,a,u)}function eV(t,r,a,u){const h=Va(t.text,r.pos);return BG(t,h,r.end-h,a,u)}function oTe(t,r,a){j.assertGreaterThanOrEqual(r,0),j.assertGreaterThanOrEqual(a,0),j.assertLessThanOrEqual(r,t.length),j.assertLessThanOrEqual(r+a,t.length)}function BG(t,r,a,u,h){return oTe(t.text,r,a),{file:t,start:r,length:a,code:u.code,category:u.category,messageText:u.next?u:u.messageText,relatedInformation:h,canonicalHead:u.canonicalHead}}function Nae(t,r,a){return{file:t,start:0,length:0,code:r.code,category:r.category,messageText:r.next?r:r.messageText,relatedInformation:a}}function aTe(t){return typeof t.messageText=="string"?{code:t.code,category:t.category,messageText:t.messageText,next:t.next}:t.messageText}function cTe(t,r,a){return{file:t,start:r.pos,length:r.end-r.pos,code:a.code,category:a.category,messageText:a.message}}function lTe(t,...r){return{code:t.code,messageText:DP(t,...r)}}function E1(t,r){const a=Ov(t.languageVersion,!0,t.languageVariant,t.text,void 0,r);a.scan();const u=a.getTokenStart();return Fu(u,a.getTokenEnd())}function uTe(t,r){const a=Ov(t.languageVersion,!0,t.languageVariant,t.text,void 0,r);return a.scan(),a.getToken()}function N4t(t,r){const a=Va(t.text,r.pos);if(r.body&&r.body.kind===241){const{line:u}=Ia(t,r.body.pos),{line:h}=Ia(t,r.body.end);if(u<h)return Ff(a,KW(u,t)-a+1)}return Fu(a,r.end)}function pI(t,r){let a=r;switch(r.kind){case 307:{const p=Va(t.text,0,!1);return p===t.text.length?Ff(0,0):E1(t,p)}case 260:case 208:case 263:case 231:case 264:case 267:case 266:case 306:case 262:case 218:case 174:case 177:case 178:case 265:case 172:case 171:case 274:a=r.name;break;case 219:return N4t(t,r);case 296:case 297:{const p=Va(t.text,r.pos),g=r.statements.length>0?r.statements[0].pos:r.end;return Fu(p,g)}case 253:case 229:{const p=Va(t.text,r.pos);return E1(t,p)}case 238:{const p=Va(t.text,r.expression.end);return E1(t,p)}case 350:{const p=Va(t.text,r.tagName.pos);return E1(t,p)}case 176:{const p=r,g=Va(t.text,p.pos),C=Ov(t.languageVersion,!0,t.languageVariant,t.text,void 0,g);let b=C.scan();for(;b!==137&&b!==1;)b=C.scan();const T=C.getTokenEnd();return Fu(g,T)}}if(a===void 0)return E1(t,r.pos);j.assert(!z0(a));const u=lu(a),h=u||RP(r)?a.pos:Va(t.text,a.pos);return u?(j.assert(h===a.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),j.assert(h===a.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")):(j.assert(h>=a.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),j.assert(h<=a.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")),Fu(h,a.end)}function cS(t){return t.kind===307&&!Cp(t)}function Cp(t){return(t.externalModuleIndicator||t.commonJsModuleIndicator)!==void 0}function Eg(t){return t.scriptKind===6}function Uk(t){return!!(Rk(t)&4096)}function tV(t){return!!(Rk(t)&8&&!vp(t,t.parent))}function iV(t){return(zb(t)&7)===6}function nV(t){return(zb(t)&7)===4}function $6(t){return(zb(t)&7)===2}function dTe(t){const r=zb(t)&7;return r===2||r===4||r===6}function WG(t){return(zb(t)&7)===1}function mI(t){return t.kind===213&&t.expression.kind===108}function zp(t){return t.kind===213&&t.expression.kind===102}function J6(t){return b7(t)&&t.keywordToken===102&&t.name.escapedText==="meta"}function lS(t){return V1(t)&&bS(t.argument)&&Ha(t.argument.literal)}function I1(t){return t.kind===244&&t.expression.kind===11}function rV(t){return!!(Ya(t)&2097152)}function VG(t){return rV(t)&&Wu(t)}function L4t(t){return ot(t.name)&&!t.initializer}function HG(t){return rV(t)&&Lu(t)&&Ce(t.declarationList.declarations,L4t)}function Lae(t,r){return t.kind!==12?Av(r.text,t.pos):void 0}function Pae(t,r){const a=t.kind===169||t.kind===168||t.kind===218||t.kind===219||t.kind===217||t.kind===260||t.kind===281?Js(qw(r,t.pos),Av(r,t.pos)):Av(r,t.pos);return $t(a,u=>u.end<=t.end&&r.charCodeAt(u.pos+1)===42&&r.charCodeAt(u.pos+2)===42&&r.charCodeAt(u.pos+3)!==47)}var P4t=/^\/\/\/\s*<reference\s+path\s*=\s*(?:'[^']*'|"[^"]*").*?\/>/,A4t=/^\/\/\/\s*<reference\s+types\s*=\s*(?:'[^']*'|"[^"]*").*?\/>/,O4t=/^\/\/\/\s*<reference\s+lib\s*=\s*(?:'[^']*'|"[^"]*").*?\/>/,M4t=/^\/\/\/\s*<amd-dependency\s+path\s*=\s*(?:'[^']*'|"[^"]*").*?\/>/,R4t=/^\/\/\/\s*<amd-module\s+(?:\S.*?)??\/>/,F4t=/^\/\/\/\s*<reference\s+no-default-lib\s*=\s*(?:'[^']*'|"[^"]*")\s*\/>/;function N1(t){if(182<=t.kind&&t.kind<=205)return!0;switch(t.kind){case 133:case 159:case 150:case 163:case 154:case 136:case 155:case 151:case 157:case 106:case 146:return!0;case 116:return t.parent.kind!==222;case 233:return VXe(t);case 168:return t.parent.kind===200||t.parent.kind===195;case 80:(t.parent.kind===166&&t.parent.right===t||t.parent.kind===211&&t.parent.name===t)&&(t=t.parent),j.assert(t.kind===80||t.kind===166||t.kind===211,"'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");case 166:case 211:case 110:{const{parent:r}=t;if(r.kind===186)return!1;if(r.kind===205)return!r.isTypeOf;if(182<=r.kind&&r.kind<=205)return!0;switch(r.kind){case 233:return VXe(r);case 168:return t===r.constraint;case 345:return t===r.constraint;case 172:case 171:case 169:case 260:return t===r.type;case 262:case 218:case 219:case 176:case 174:case 173:case 177:case 178:return t===r.type;case 179:case 180:case 181:return t===r.type;case 216:return t===r.type;case 213:case 214:case 215:return Yt(r.typeArguments,t)}}}return!1}function VXe(t){return NX(t.parent)||KP(t.parent)||Tp(t.parent)&&!SK(t)}function uS(t,r){return a(t);function a(u){switch(u.kind){case 253:return r(u);case 269:case 241:case 245:case 246:case 247:case 248:case 249:case 250:case 254:case 255:case 296:case 297:case 256:case 258:case 299:return Uo(u,a)}}}function fTe(t,r){return a(t);function a(u){switch(u.kind){case 229:r(u);const h=u.expression;h&&a(h);return;case 266:case 264:case 267:case 265:return;default:if(Ho(u)){if(u.name&&u.name.kind===167){a(u.name.expression);return}}else N1(u)||Uo(u,a)}}}function Aae(t){return t&&t.kind===188?t.elementType:t&&t.kind===183?Bm(t.typeArguments):void 0}function hTe(t){switch(t.kind){case 264:case 263:case 231:case 187:return t.members;case 210:return t.properties}}function uP(t){if(t)switch(t.kind){case 208:case 306:case 169:case 303:case 172:case 171:case 304:case 260:return!0}return!1}function _Te(t){return uP(t)||Qw(t)}function E8(t){return t.parent.kind===261&&t.parent.parent.kind===243}function pTe(t){return nr(t)?Aa(t.parent)&&ur(t.parent.parent)&&Bu(t.parent.parent)===2||jG(t.parent):!1}function jG(t){return nr(t)?ur(t)&&Bu(t)===1:!1}function mTe(t){return(_s(t)?$6(t)&&ot(t.name)&&E8(t):Lo(t)?z8(t)&&bd(t):O_(t)&&z8(t))||jG(t)}function gTe(t){switch(t.kind){case 174:case 173:case 176:case 177:case 178:case 262:case 218:return!0}return!1}function Oae(t,r){for(;;){if(r&&r(t),t.statement.kind!==256)return t.statement;t=t.statement}}function WT(t){return t&&t.kind===241&&Ho(t.parent)}function Ig(t){return t&&t.kind===174&&t.parent.kind===210}function zG(t){return(t.kind===174||t.kind===177||t.kind===178)&&(t.parent.kind===210||t.parent.kind===231)}function yTe(t){return t&&t.kind===1}function vTe(t){return t&&t.kind===0}function G6(t,r,a,u){return O(t==null?void 0:t.properties,h=>{if(!_d(h))return;const p=D8(h.name);return r===p||u&&u===p?a(h):void 0})}function bTe(t,r,a){return G6(t,r,u=>jf(u.initializer)?Fe(u.initializer.elements,h=>Ha(h)&&h.text===a):void 0)}function I8(t){if(t&&t.statements.length){const r=t.statements[0].expression;return Jr(r,Aa)}}function UG(t,r,a){return sV(t,r,u=>jf(u.initializer)?Fe(u.initializer.elements,h=>Ha(h)&&h.text===a):void 0)}function sV(t,r,a){return G6(I8(t),r,a)}function Up(t){return Qi(t.parent,Ho)}function CTe(t){return Qi(t.parent,Qc)}function Cf(t){return Qi(t.parent,ss)}function STe(t){return Qi(t.parent,r=>ss(r)||Ho(r)?"quit":gu(r))}function qG(t){return Qi(t.parent,B6)}function $G(t){const r=Qi(t.parent,a=>ss(a)?"quit":Fd(a));return r&&ss(r.parent)?Cf(r.parent):Cf(r??t)}function Hh(t,r,a){for(j.assert(t.kind!==307);;){if(t=t.parent,!t)return j.fail();switch(t.kind){case 167:if(a&&ss(t.parent.parent))return t;t=t.parent.parent;break;case 170:t.parent.kind===169&&Od(t.parent.parent)?t=t.parent.parent:Od(t.parent)&&(t=t.parent);break;case 219:if(!r)continue;case 262:case 218:case 267:case 175:case 172:case 171:case 174:case 173:case 176:case 177:case 178:case 179:case 180:case 181:case 266:case 307:return t}}}function wTe(t){switch(t.kind){case 219:case 262:case 218:case 172:return!0;case 241:switch(t.parent.kind){case 176:case 174:case 177:case 178:return!0;default:return!1}default:return!1}}function JG(t){ot(t)&&(hd(t.parent)||Wu(t.parent))&&t.parent.name===t&&(t=t.parent);const r=Hh(t,!0,!1);return Os(r)}function xTe(t){const r=Hh(t,!1,!1);if(r)switch(r.kind){case 176:case 262:case 218:return r}}function oV(t,r){for(;;){if(t=t.parent,!t)return;switch(t.kind){case 167:t=t.parent;break;case 262:case 218:case 219:if(!r)continue;case 172:case 171:case 174:case 173:case 176:case 177:case 178:case 175:return t;case 170:t.parent.kind===169&&Od(t.parent.parent)?t=t.parent.parent:Od(t.parent)&&(t=t.parent);break}}}function VT(t){if(t.kind===218||t.kind===219){let r=t,a=t.parent;for(;a.kind===217;)r=a,a=a.parent;if(a.kind===213&&a.expression===r)return a}}function G_(t){const r=t.kind;return(r===211||r===212)&&t.expression.kind===108}function aV(t){const r=t.kind;return(r===211||r===212)&&t.expression.kind===110}function GG(t){var r;return!!t&&_s(t)&&((r=t.initializer)==null?void 0:r.kind)===110}function kTe(t){return!!t&&(lh(t)||_d(t))&&ur(t.parent.parent)&&t.parent.parent.operatorToken.kind===64&&t.parent.parent.right.kind===110}function cV(t){switch(t.kind){case 183:return t.typeName;case 233:return pl(t.expression)?t.expression:void 0;case 80:case 166:return t}}function KG(t){switch(t.kind){case 215:return t.tag;case 286:case 285:return t.tagName;case 226:return t.right;default:return t.expression}}function lV(t,r,a,u){if(t&&Bf(r)&&Vs(r.name))return!1;switch(r.kind){case 263:return!0;case 231:return!t;case 172:return a!==void 0&&(t?hd(a):ss(a)&&!KT(r)&&!fce(r));case 177:case 178:case 174:return r.body!==void 0&&a!==void 0&&(t?hd(a):ss(a));case 169:return t?a!==void 0&&a.body!==void 0&&(a.kind===176||a.kind===174||a.kind===178)&&$T(a)!==r&&u!==void 0&&u.kind===263:!1}return!1}function K6(t,r,a,u){return lm(r)&&lV(t,r,a,u)}function uV(t,r,a,u){return K6(t,r,a,u)||N8(t,r,a)}function N8(t,r,a){switch(r.kind){case 263:return Ft(r.members,u=>uV(t,u,r,a));case 231:return!t&&Ft(r.members,u=>uV(t,u,r,a));case 174:case 178:case 176:return Ft(r.parameters,u=>K6(t,u,r,a));default:return!1}}function dS(t,r){if(K6(t,r))return!0;const a=Vv(r);return!!a&&N8(t,a,r)}function Mae(t,r,a){let u;if(Qw(r)){const{firstAccessor:h,secondAccessor:p,setAccessor:g}=nx(a.members,r),C=lm(h)?h:p&&lm(p)?p:void 0;if(!C||r!==C)return!1;u=g==null?void 0:g.parameters}else Nu(r)&&(u=r.parameters);if(K6(t,r,a))return!0;if(u){for(const h of u)if(!JT(h)&&K6(t,h,r,a))return!0}return!1}function Rae(t){if(t.textSourceNode){switch(t.textSourceNode.kind){case 11:return Rae(t.textSourceNode);case 15:return t.text===""}return!1}return t.text===""}function X6(t){const{parent:r}=t;return r.kind===286||r.kind===285||r.kind===287?r.tagName===t:!1}function F0(t){switch(t.kind){case 108:case 106:case 112:case 97:case 14:case 209:case 210:case 211:case 212:case 213:case 214:case 215:case 234:case 216:case 238:case 235:case 217:case 218:case 231:case 219:case 222:case 220:case 221:case 224:case 225:case 226:case 227:case 230:case 228:case 232:case 284:case 285:case 288:case 229:case 223:case 236:return!0;case 233:return!Tp(t.parent)&&!KP(t.parent);case 166:for(;t.parent.kind===166;)t=t.parent;return t.parent.kind===186||rP(t.parent)||T7(t.parent)||a2(t.parent)||X6(t);case 311:for(;a2(t.parent);)t=t.parent;return t.parent.kind===186||rP(t.parent)||T7(t.parent)||a2(t.parent)||X6(t);case 81:return ur(t.parent)&&t.parent.left===t&&t.parent.operatorToken.kind===103;case 80:if(t.parent.kind===186||rP(t.parent)||T7(t.parent)||a2(t.parent)||X6(t))return!0;case 9:case 10:case 11:case 15:case 110:return XG(t);default:return!1}}function XG(t){const{parent:r}=t;switch(r.kind){case 260:case 169:case 172:case 171:case 306:case 303:case 208:return r.initializer===t;case 244:case 245:case 246:case 247:case 253:case 254:case 255:case 296:case 257:return r.expression===t;case 248:const a=r;return a.initializer===t&&a.initializer.kind!==261||a.condition===t||a.incrementor===t;case 249:case 250:const u=r;return u.initializer===t&&u.initializer.kind!==261||u.expression===t;case 216:case 234:return t===r.expression;case 239:return t===r.expression;case 167:return t===r.expression;case 170:case 294:case 293:case 305:return!0;case 233:return r.expression===t&&!N1(r);case 304:return r.objectAssignmentInitializer===t;case 238:return t===r.expression;default:return F0(r)}}function QG(t){for(;t.kind===166||t.kind===80;)t=t.parent;return t.kind===186}function TTe(t){return jy(t)&&!!t.parent.moduleSpecifier}function qk(t){return t.kind===271&&t.moduleReference.kind===283}function L8(t){return j.assert(qk(t)),t.moduleReference.expression}function Fae(t){return HT(t)&&u3(t.initializer).arguments[0]}function gI(t){return t.kind===271&&t.moduleReference.kind!==283}function Fy(t){return(t==null?void 0:t.kind)===307}function r_(t){return nr(t)}function nr(t){return!!t&&!!(t.flags&524288)}function ZG(t){return!!t&&!!(t.flags&134217728)}function YG(t){return!Eg(t)}function dV(t){return!!t&&!!(t.flags&16777216)}function eK(t){return qp(t)&&ot(t.typeName)&&t.typeName.escapedText==="Object"&&t.typeArguments&&t.typeArguments.length===2&&(t.typeArguments[0].kind===154||t.typeArguments[0].kind===150)}function L_(t,r){if(t.kind!==213)return!1;const{expression:a,arguments:u}=t;if(a.kind!==80||a.escapedText!=="require"||u.length!==1)return!1;const h=u[0];return!r||Bc(h)}function fV(t){return HXe(t,!1)}function HT(t){return HXe(t,!0)}function DTe(t){return ec(t)&&HT(t.parent.parent)}function HXe(t,r){return _s(t)&&!!t.initializer&&L_(r?u3(t.initializer):t.initializer,!0)}function hV(t){return Lu(t)&&t.declarationList.declarations.length>0&&Ce(t.declarationList.declarations,r=>fV(r))}function _V(t){return t===39||t===34}function tK(t,r){return RT(r,t).charCodeAt(0)===34}function P8(t){return ur(t)||Sl(t)||ot(t)||la(t)}function pV(t){return nr(t)&&t.initializer&&ur(t.initializer)&&(t.initializer.operatorToken.kind===57||t.initializer.operatorToken.kind===61)&&t.name&&pl(t.name)&&Q6(t.name,t.initializer.left)?t.initializer.right:t.initializer}function A8(t){const r=pV(t);return r&&$k(r,rx(t.name))}function B4t(t,r){return O(t.properties,a=>_d(a)&&ot(a.name)&&a.name.escapedText==="value"&&a.initializer&&$k(a.initializer,r))}function dP(t){if(t&&t.parent&&ur(t.parent)&&t.parent.operatorToken.kind===64){const r=rx(t.parent.left);return $k(t.parent.right,r)||W4t(t.parent.left,t.parent.right,r)}if(t&&la(t)&&vI(t)){const r=B4t(t.arguments[2],t.arguments[1].text==="prototype");if(r)return r}}function $k(t,r){if(la(t)){const a=Dc(t.expression);return a.kind===218||a.kind===219?t:void 0}if(t.kind===218||t.kind===231||t.kind===219||Aa(t)&&(t.properties.length===0||r))return t}function W4t(t,r,a){const u=ur(r)&&(r.operatorToken.kind===57||r.operatorToken.kind===61)&&$k(r.right,a);if(u&&Q6(t,r.left))return u}function ETe(t){const r=_s(t.parent)?t.parent.name:ur(t.parent)&&t.parent.operatorToken.kind===64?t.parent.left:void 0;return r&&$k(t.right,rx(r))&&pl(r)&&Q6(r,t.left)}function Bae(t){if(ur(t.parent)){const r=(t.parent.operatorToken.kind===57||t.parent.operatorToken.kind===61)&&ur(t.parent.parent)?t.parent.parent:t.parent;if(r.operatorToken.kind===64&&ot(r.left))return r.left}else if(_s(t.parent))return t.parent.name}function Q6(t,r){return P1(t)&&P1(r)?Lg(t)===Lg(r):Mv(t)&&ITe(r)&&(r.expression.kind===110||ot(r.expression)&&(r.expression.escapedText==="window"||r.expression.escapedText==="self"||r.expression.escapedText==="global"))?Q6(t,gV(r)):ITe(t)&&ITe(r)?$b(t)===$b(r)&&Q6(t.expression,r.expression):!1}function mV(t){for(;lf(t,!0);)t=t.right;return t}function yI(t){return ot(t)&&t.escapedText==="exports"}function Wae(t){return ot(t)&&t.escapedText==="module"}function Wv(t){return(Nr(t)||Vae(t))&&Wae(t.expression)&&$b(t)==="exports"}function Bu(t){const r=V4t(t);return r===5||nr(t)?r:0}function vI(t){return P(t.arguments)===3&&Nr(t.expression)&&ot(t.expression.expression)&&Fr(t.expression.expression)==="Object"&&Fr(t.expression.name)==="defineProperty"&&cm(t.arguments[1])&&bI(t.arguments[0],!0)}function ITe(t){return Nr(t)||Vae(t)}function Vae(t){return wl(t)&&cm(t.argumentExpression)}function jT(t,r){return Nr(t)&&(!r&&t.expression.kind===110||ot(t.name)&&bI(t.expression,!0))||iK(t,r)}function iK(t,r){return Vae(t)&&(!r&&t.expression.kind===110||pl(t.expression)||jT(t.expression,!0))}function bI(t,r){return pl(t)||jT(t,r)}function gV(t){return Nr(t)?t.name:t.argumentExpression}function V4t(t){if(la(t)){if(!vI(t))return 0;const r=t.arguments[0];return yI(r)||Wv(r)?8:jT(r)&&$b(r)==="prototype"?9:7}return t.operatorToken.kind!==64||!Sl(t.left)||H4t(mV(t))?0:bI(t.left.expression,!0)&&$b(t.left)==="prototype"&&Aa(Hae(t))?6:yV(t.left)}function H4t(t){return UP(t)&&A_(t.expression)&&t.expression.text==="0"}function nK(t){if(Nr(t))return t.name;const r=Dc(t.argumentExpression);return A_(r)||Bc(r)?r:t}function $b(t){const r=nK(t);if(r){if(ot(r))return r.escapedText;if(Bc(r)||A_(r))return cu(r.text)}}function yV(t){if(t.expression.kind===110)return 4;if(Wv(t))return 2;if(bI(t.expression,!0)){if(rx(t.expression))return 3;let r=t;for(;!ot(r.expression);)r=r.expression;const a=r.expression;if((a.escapedText==="exports"||a.escapedText==="module"&&$b(r)==="exports")&&jT(t))return 1;if(bI(t,!0)||wl(t)&&lK(t))return 5}return 0}function Hae(t){for(;ur(t.right);)t=t.right;return t.right}function vV(t){return ur(t)&&Bu(t)===3}function NTe(t){return nr(t)&&t.parent&&t.parent.kind===244&&(!wl(t)||Vae(t))&&!!Fk(t.parent)}function bV(t,r){const{valueDeclaration:a}=t;(!a||!(r.flags&33554432&&!nr(r)&&!(a.flags&33554432))&&P8(a)&&!P8(r)||a.kind!==r.kind&&D4t(a))&&(t.valueDeclaration=r)}function LTe(t){if(!t||!t.valueDeclaration)return!1;const r=t.valueDeclaration;return r.kind===262||_s(r)&&r.initializer&&Ho(r.initializer)}function PTe(t){switch(t==null?void 0:t.kind){case 260:case 208:case 272:case 278:case 271:case 273:case 280:case 274:case 281:case 276:case 205:return!0}return!1}function Z6(t){var r,a;switch(t.kind){case 260:case 208:return(r=Qi(t.initializer,u=>L_(u,!0)))==null?void 0:r.arguments[0];case 272:case 278:case 351:return Jr(t.moduleSpecifier,Bc);case 271:return Jr((a=Jr(t.moduleReference,eC))==null?void 0:a.expression,Bc);case 273:case 280:return Jr(t.parent.moduleSpecifier,Bc);case 274:case 281:return Jr(t.parent.parent.moduleSpecifier,Bc);case 276:return Jr(t.parent.parent.parent.moduleSpecifier,Bc);case 205:return lS(t)?t.argument.literal:void 0;default:j.assertNever(t)}}function O8(t){return CV(t)||j.failBadSyntaxKind(t.parent)}function CV(t){switch(t.parent.kind){case 272:case 278:case 351:return t.parent;case 283:return t.parent.parent;case 213:return zp(t.parent)||L_(t.parent,!1)?t.parent:void 0;case 201:return j.assert(Ha(t)),Jr(t.parent.parent,V1);default:return}}function fP(t){switch(t.kind){case 272:case 278:case 351:return t.moduleSpecifier;case 271:return t.moduleReference.kind===283?t.moduleReference.expression:void 0;case 205:return lS(t)?t.argument.literal:void 0;case 213:return t.arguments[0];case 267:return t.name.kind===11?t.name:void 0;default:return j.assertNever(t)}}function Y6(t){switch(t.kind){case 272:return t.importClause&&Jr(t.importClause.namedBindings,Jv);case 271:return t;case 278:return t.exportClause&&Jr(t.exportClause,jy);default:return j.assertNever(t)}}function hP(t){return(t.kind===272||t.kind===351)&&!!t.importClause&&!!t.importClause.name}function ATe(t,r){if(t.name){const a=r(t);if(a)return a}if(t.namedBindings){const a=Jv(t.namedBindings)?r(t.namedBindings):O(t.namedBindings.elements,r);if(a)return a}}function _P(t){if(t)switch(t.kind){case 169:case 174:case 173:case 304:case 303:case 172:case 171:return t.questionToken!==void 0}return!1}function e3(t){const r=T3(t)?Ra(t.parameters):void 0,a=Jr(r&&r.name,ot);return!!a&&a.escapedText==="new"}function Ng(t){return t.kind===346||t.kind===338||t.kind===340}function SV(t){return Ng(t)||Mg(t)}function j4t(t){return uf(t)&&ur(t.expression)&&t.expression.operatorToken.kind===64?mV(t.expression):void 0}function jXe(t){return uf(t)&&ur(t.expression)&&Bu(t.expression)!==0&&ur(t.expression.right)&&(t.expression.right.operatorToken.kind===57||t.expression.right.operatorToken.kind===61)?t.expression.right.right:void 0}function zXe(t){switch(t.kind){case 243:const r=pP(t);return r&&r.initializer;case 172:return t.initializer;case 303:return t.initializer}}function pP(t){return Lu(t)?Ra(t.declarationList.declarations):void 0}function UXe(t){return rd(t)&&t.body&&t.body.kind===267?t.body:void 0}function wV(t){if(t.kind>=243&&t.kind<=259)return!0;switch(t.kind){case 80:case 110:case 108:case 166:case 236:case 212:case 211:case 208:case 218:case 219:case 174:case 177:case 178:return!0;default:return!1}}function xV(t){switch(t.kind){case 219:case 226:case 241:case 252:case 179:case 296:case 263:case 231:case 175:case 176:case 185:case 180:case 251:case 259:case 246:case 212:case 242:case 1:case 266:case 306:case 277:case 278:case 281:case 244:case 249:case 250:case 248:case 262:case 218:case 184:case 177:case 80:case 245:case 272:case 271:case 181:case 264:case 317:case 323:case 256:case 174:case 173:case 267:case 202:case 270:case 210:case 169:case 217:case 211:case 303:case 172:case 171:case 253:case 240:case 178:case 304:case 305:case 255:case 257:case 258:case 265:case 168:case 260:case 243:case 247:case 254:return!0;default:return!1}}function jae(t,r){let a;uP(t)&&aS(t)&&jp(t.initializer)&&(a=Sr(a,qXe(t,t.initializer.jsDoc)));let u=t;for(;u&&u.parent;){if(jp(u)&&(a=Sr(a,qXe(t,u.jsDoc))),u.kind===169){a=Sr(a,(r?l2e:M6)(u));break}if(u.kind===168){a=Sr(a,(r?d2e:u2e)(u));break}u=zae(u)}return a||w}function qXe(t,r){const a=va(r);return Rr(r,u=>{if(u===a){const h=$t(u.tags,p=>z4t(t,p));return u.tags===h?[u]:h}else return $t(u.tags,D3)})}function z4t(t,r){return!(D7(r)||LX(r))||!r.parent||!z0(r.parent)||!c_(r.parent.parent)||r.parent.parent===t}function zae(t){const r=t.parent;if(r.kind===303||r.kind===277||r.kind===172||r.kind===244&&t.kind===211||r.kind===253||UXe(r)||lf(t))return r;if(r.parent&&(pP(r.parent)===t||lf(r)))return r.parent;if(r.parent&&r.parent.parent&&(pP(r.parent.parent)||zXe(r.parent.parent)===t||jXe(r.parent.parent)))return r.parent.parent}function kV(t){if(t.symbol)return t.symbol;if(!ot(t.name))return;const r=t.name.escapedText,a=Jk(t);if(!a)return;const u=Fe(a.parameters,h=>h.name.kind===80&&h.name.escapedText===r);return u&&u.symbol}function rK(t){if(z0(t.parent)&&t.parent.tags){const r=Fe(t.parent.tags,Ng);if(r)return r}return Jk(t)}function Uae(t){return uG(t,D3)}function Jk(t){const r=Gk(t);if(r)return O_(r)&&r.type&&Ho(r.type)?r.type:Ho(r)?r:void 0}function Gk(t){const r=zT(t);if(r)return jXe(r)||j4t(r)||zXe(r)||pP(r)||UXe(r)||r}function zT(t){const r=t3(t);if(!r)return;const a=r.parent;if(a&&a.jsDoc&&r===rl(a.jsDoc))return a}function t3(t){return Qi(t.parent,z0)}function OTe(t){const r=t.name.escapedText,{typeParameters:a}=t.parent.parent.parent;return a&&Fe(a,u=>u.name.escapedText===r)}function $Xe(t){return!!t.typeArguments}var MTe=(t=>(t[t.None=0]="None",t[t.Definite=1]="Definite",t[t.Compound=2]="Compound",t))(MTe||{});function RTe(t){let r=t.parent;for(;;){switch(r.kind){case 226:const a=r,u=a.operatorToken.kind;return Gb(u)&&a.left===t?a:void 0;case 224:case 225:const h=r,p=h.operator;return p===46||p===47?h:void 0;case 249:case 250:const g=r;return g.initializer===t?g:void 0;case 217:case 209:case 230:case 235:t=r;break;case 305:t=r.parent;break;case 304:if(r.name!==t)return;t=r.parent;break;case 303:if(r.name===t)return;t=r.parent;break;default:return}r=t.parent}}function Kk(t){const r=RTe(t);if(!r)return 0;switch(r.kind){case 226:const a=r.operatorToken.kind;return a===64||U8(a)?1:2;case 224:case 225:return 2;case 249:case 250:return 1}}function fS(t){return!!RTe(t)}function U4t(t){const r=Dc(t.right);return r.kind===226&&Ble(r.operatorToken.kind)}function qae(t){const r=RTe(t);return!!r&&lf(r,!0)&&U4t(r)}function FTe(t){switch(t.kind){case 241:case 243:case 254:case 245:case 255:case 269:case 296:case 297:case 256:case 248:case 249:case 250:case 246:case 247:case 258:case 299:return!0}return!1}function mP(t){return ml(t)||xl(t)||iP(t)||Wu(t)||iu(t)}function JXe(t,r){for(;t&&t.kind===r;)t=t.parent;return t}function TV(t){return JXe(t,196)}function By(t){return JXe(t,217)}function BTe(t){let r;for(;t&&t.kind===196;)r=t,t=t.parent;return[r,t]}function M8(t){for(;EI(t);)t=t.type;return t}function Dc(t,r){return Vu(t,r?-2147483647:1)}function $ae(t){return t.kind!==211&&t.kind!==212?!1:(t=By(t.parent),t&&t.kind===220)}function UT(t,r){for(;t;){if(t===r)return!0;t=t.parent}return!1}function Wy(t){return!Os(t)&&!ta(t)&&Wf(t.parent)&&t.parent.name===t}function R8(t){const r=t.parent;switch(t.kind){case 11:case 15:case 9:if(Ka(r))return r.parent;case 80:if(Wf(r))return r.name===t?r:void 0;if(o_(r)){const a=r.parent;return Qm(a)&&a.name===r?a:void 0}else{const a=r.parent;return ur(a)&&Bu(a)!==0&&(a.left.symbol||a.symbol)&&No(a)===t?a:void 0}case 81:return Wf(r)&&r.name===t?r:void 0;default:return}}function DV(t){return cm(t)&&t.parent.kind===167&&Wf(t.parent.parent)}function WTe(t){const r=t.parent;switch(r.kind){case 172:case 171:case 174:case 173:case 177:case 178:case 306:case 303:case 211:return r.name===t;case 166:return r.right===t;case 208:case 276:return r.propertyName===t;case 281:case 291:case 285:case 286:case 287:return!0}return!1}function Jae(t){switch(t.parent.kind){case 273:case 276:case 274:case 281:case 277:case 271:case 280:return t.parent;case 166:do t=t.parent;while(t.parent.kind===166);return Jae(t)}}function sK(t){return pl(t)||fd(t)}function EV(t){const r=Gae(t);return sK(r)}function Gae(t){return Il(t)?t.expression:t.right}function VTe(t){return t.kind===304?t.name:t.kind===303?t.initializer:t.parent.right}function L1(t){const r=qT(t);if(r&&nr(t)){const a=h2e(t);if(a)return a.class}return r}function qT(t){const r=IV(t.heritageClauses,96);return r&&r.types.length>0?r.types[0]:void 0}function i3(t){if(nr(t))return _2e(t).map(r=>r.class);{const r=IV(t.heritageClauses,119);return r==null?void 0:r.types}}function F8(t){return zf(t)?B8(t)||w:ss(t)&&Js(KL(L1(t)),i3(t))||w}function B8(t){const r=IV(t.heritageClauses,96);return r?r.types:void 0}function IV(t,r){if(t){for(const a of t)if(a.token===r)return a}}function Xk(t,r){for(;t;){if(t.kind===r)return t;t=t.parent}}function P_(t){return 83<=t&&t<=165}function Kae(t){return 19<=t&&t<=79}function oK(t){return P_(t)||Kae(t)}function aK(t){return 128<=t&&t<=165}function Xae(t){return P_(t)&&!aK(t)}function gP(t){const r=oI(t);return r!==void 0&&Xae(r)}function Qae(t){const r=aI(t);return!!r&&!aK(r)}function n3(t){return 2<=t&&t<=7}var HTe=(t=>(t[t.Normal=0]="Normal",t[t.Generator=1]="Generator",t[t.Async=2]="Async",t[t.Invalid=4]="Invalid",t[t.AsyncGenerator=3]="AsyncGenerator",t))(HTe||{});function nd(t){if(!t)return 4;let r=0;switch(t.kind){case 262:case 218:case 174:t.asteriskToken&&(r|=1);case 219:Zr(t,1024)&&(r|=2);break}return t.body||(r|=4),r}function W8(t){switch(t.kind){case 262:case 218:case 219:case 174:return t.body!==void 0&&t.asteriskToken===void 0&&Zr(t,1024)}return!1}function cm(t){return Bc(t)||A_(t)}function cK(t){return n2(t)&&(t.operator===40||t.operator===41)&&A_(t.operand)}function Jb(t){const r=No(t);return!!r&&lK(r)}function lK(t){if(!(t.kind===167||t.kind===212))return!1;const r=wl(t)?Dc(t.argumentExpression):t.expression;return!cm(r)&&!cK(r)}function CI(t){switch(t.kind){case 80:case 81:return t.escapedText;case 11:case 15:case 9:case 10:return cu(t.text);case 167:const r=t.expression;return cm(r)?cu(r.text):cK(r)?r.operator===41?xa(r.operator)+r.operand.text:r.operand.text:void 0;case 295:return LP(t);default:return j.assertNever(t)}}function P1(t){switch(t.kind){case 80:case 11:case 15:case 9:return!0;default:return!1}}function Lg(t){return Mv(t)?Fr(t):j0(t)?d7(t):t.text}function V8(t){return Mv(t)?t.escapedText:j0(t)?LP(t):cu(t.text)}function NV(t,r){return`__#${Ba(t)}@${r}`}function LV(t){return so(t.escapedName,"__@")}function jTe(t){return so(t.escapedName,"__#")}function q4t(t){return ot(t)?Fr(t)==="__proto__":Ha(t)&&t.text==="__proto__"}function uK(t,r){switch(t=Vu(t),t.kind){case 231:if(que(t))return!1;break;case 218:if(t.name)return!1;break;case 219:break;default:return!1}return typeof r=="function"?r(t):!0}function Zae(t){switch(t.kind){case 303:return!q4t(t.name);case 304:return!!t.objectAssignmentInitializer;case 260:return ot(t.name)&&!!t.initializer;case 169:return ot(t.name)&&!!t.initializer&&!t.dotDotDotToken;case 208:return ot(t.name)&&!!t.initializer&&!t.dotDotDotToken;case 172:return!!t.initializer;case 226:switch(t.operatorToken.kind){case 64:case 77:case 76:case 78:return ot(t.left)}break;case 277:return!0}return!1}function Sp(t,r){if(!Zae(t))return!1;switch(t.kind){case 303:return uK(t.initializer,r);case 304:return uK(t.objectAssignmentInitializer,r);case 260:case 169:case 208:case 172:return uK(t.initializer,r);case 226:return uK(t.right,r);case 277:return uK(t.expression,r)}}function Yae(t){return t.escapedText==="push"||t.escapedText==="unshift"}function Qk(t){return A1(t).kind===169}function A1(t){for(;t.kind===208;)t=t.parent.parent;return t}function ece(t){const r=t.kind;return r===176||r===218||r===262||r===219||r===174||r===177||r===178||r===267||r===307}function cl(t){return W0(t.pos)||W0(t.end)}var zTe=(t=>(t[t.Left=0]="Left",t[t.Right=1]="Right",t))(zTe||{});function tce(t){const r=GXe(t),a=t.kind===214&&t.arguments!==void 0;return ice(t.kind,r,a)}function ice(t,r,a){switch(t){case 214:return a?0:1;case 224:case 221:case 222:case 220:case 223:case 227:case 229:return 1;case 226:switch(r){case 43:case 64:case 65:case 66:case 68:case 67:case 69:case 70:case 71:case 72:case 73:case 74:case 79:case 75:case 76:case 77:case 78:return 1}}return 0}function H8(t){const r=GXe(t),a=t.kind===214&&t.arguments!==void 0;return PV(t.kind,r,a)}function GXe(t){return t.kind===226?t.operatorToken.kind:t.kind===224||t.kind===225?t.operator:t.kind}var UTe=(t=>(t[t.Comma=0]="Comma",t[t.Spread=1]="Spread",t[t.Yield=2]="Yield",t[t.Assignment=3]="Assignment",t[t.Conditional=4]="Conditional",t[t.Coalesce=4]="Coalesce",t[t.LogicalOR=5]="LogicalOR",t[t.LogicalAND=6]="LogicalAND",t[t.BitwiseOR=7]="BitwiseOR",t[t.BitwiseXOR=8]="BitwiseXOR",t[t.BitwiseAND=9]="BitwiseAND",t[t.Equality=10]="Equality",t[t.Relational=11]="Relational",t[t.Shift=12]="Shift",t[t.Additive=13]="Additive",t[t.Multiplicative=14]="Multiplicative",t[t.Exponentiation=15]="Exponentiation",t[t.Unary=16]="Unary",t[t.Update=17]="Update",t[t.LeftHandSide=18]="LeftHandSide",t[t.Member=19]="Member",t[t.Primary=20]="Primary",t[t.Highest=20]="Highest",t[t.Lowest=0]="Lowest",t[t.Invalid=-1]="Invalid",t))(UTe||{});function PV(t,r,a){switch(t){case 355:return 0;case 230:return 1;case 229:return 2;case 227:return 4;case 226:switch(r){case 28:return 0;case 64:case 65:case 66:case 68:case 67:case 69:case 70:case 71:case 72:case 73:case 74:case 79:case 75:case 76:case 77:case 78:return 3;default:return AV(r)}case 216:case 235:case 224:case 221:case 222:case 220:case 223:return 16;case 225:return 17;case 213:return 18;case 214:return a?19:18;case 215:case 211:case 212:case 236:return 19;case 234:case 238:return 11;case 110:case 108:case 80:case 81:case 106:case 112:case 97:case 9:case 10:case 11:case 209:case 210:case 218:case 219:case 231:case 14:case 15:case 228:case 217:case 232:case 284:case 285:case 288:return 20;default:return-1}}function AV(t){switch(t){case 61:return 4;case 57:return 5;case 56:return 6;case 52:return 7;case 53:return 8;case 51:return 9;case 35:case 36:case 37:case 38:return 10;case 30:case 32:case 33:case 34:case 104:case 103:case 130:case 152:return 11;case 48:case 49:case 50:return 12;case 40:case 41:return 13;case 42:case 44:case 45:return 14;case 43:return 15}return-1}function r3(t){return $t(t,r=>{switch(r.kind){case 294:return!!r.expression;case 12:return!r.containsOnlyTriviaWhiteSpaces;default:return!0}})}function OV(){let t=[];const r=[],a=new Map;let u=!1;return{add:p,lookup:h,getGlobalDiagnostics:g,getDiagnostics:C};function h(b){let T;if(b.file?T=a.get(b.file.fileName):T=t,!T)return;const E=Jt(T,b,hl,DDe);if(E>=0)return T[E];if(~E>0&&AK(b,T[~E-1]))return T[~E-1]}function p(b){let T;b.file?(T=a.get(b.file.fileName),T||(T=[],a.set(b.file.fileName,T),rm(r,b.file.fileName,sh))):(u&&(u=!1,t=t.slice()),T=t),rm(T,b,DDe,AK)}function g(){return u=!0,t}function C(b){if(b)return a.get(b)||[];const T=na(r,E=>a.get(E));return t.length&&T.unshift(...t),T}}var $4t=/\$\{/g;function nce(t){return t.replace($4t,"\\${")}function qTe(t){return!!((t.templateFlags||0)&2048)}function rce(t){return t&&!!(TI(t)?qTe(t):qTe(t.head)||Ft(t.templateSpans,r=>qTe(r.literal)))}var J4t=/[\\"\u0000-\u001f\u2028\u2029\u0085]/g,G4t=/[\\'\u0000-\u001f\u2028\u2029\u0085]/g,K4t=/\r\n|[\\`\u0000-\u001f\u2028\u2029\u0085]/g,X4t=new Map(Object.entries({" ":"\\t","\v":"\\v","\f":"\\f","\b":"\\b","\r":"\\r","\n":"\\n","\\":"\\\\",'"':'\\"',"'":"\\'","`":"\\`","\u2028":"\\u2028","\u2029":"\\u2029","…":"\\u0085","\r\n":"\\r\\n"}));function KXe(t){return"\\u"+("0000"+t.toString(16).toUpperCase()).slice(-4)}function Q4t(t,r,a){if(t.charCodeAt(0)===0){const u=a.charCodeAt(r+t.length);return u>=48&&u<=57?"\\x00":"\\0"}return X4t.get(t)||KXe(t.charCodeAt(0))}function Vy(t,r){const a=r===96?K4t:r===39?G4t:J4t;return t.replace(a,Q4t)}var XXe=/[^\u0000-\u007F]/g;function dK(t,r){return t=Vy(t,r),XXe.test(t)?t.replace(XXe,a=>KXe(a.charCodeAt(0))):t}var Z4t=/["\u0000-\u001f\u2028\u2029\u0085]/g,Y4t=/['\u0000-\u001f\u2028\u2029\u0085]/g,e6t=new Map(Object.entries({'"':"&quot;","'":"&apos;"}));function t6t(t){return"&#x"+t.toString(16).toUpperCase()+";"}function i6t(t){return t.charCodeAt(0)===0?"&#0;":e6t.get(t)||t6t(t.charCodeAt(0))}function sce(t,r){const a=r===39?Y4t:Z4t;return t.replace(a,i6t)}function zm(t){const r=t.length;return r>=2&&t.charCodeAt(0)===t.charCodeAt(r-1)&&n6t(t.charCodeAt(0))?t.substring(1,r-1):t}function n6t(t){return t===39||t===34||t===96}function s3(t){const r=t.charCodeAt(0);return r>=97&&r<=122||t.includes("-")}var MV=[""," "];function fK(t){const r=MV[1];for(let a=MV.length;a<=t;a++)MV.push(MV[a-1]+r);return MV[t]}function RV(){return MV[1].length}function FV(t){var r,a,u,h,p,g=!1;function C(U){const q=ZL(U);q.length>1?(h=h+q.length-1,p=r.length-U.length+va(q),u=p-r.length===0):u=!1}function b(U){U&&U.length&&(u&&(U=fK(a)+U,u=!1),r+=U,C(U))}function T(U){U&&(g=!1),b(U)}function E(U){U&&(g=!0),b(U)}function N(){r="",a=0,u=!0,h=0,p=0,g=!1}function R(U){U!==void 0&&(r+=U,C(U),g=!1)}function F(U){U&&U.length&&T(U)}function H(U){(!u||U)&&(r+=t,h++,p=r.length,u=!0,g=!1)}return N(),{write:T,rawWrite:R,writeLiteral:F,writeLine:H,increaseIndent:()=>{a++},decreaseIndent:()=>{a--},getIndent:()=>a,getTextPos:()=>r.length,getLine:()=>h,getColumn:()=>u?a*RV():r.length-p,getText:()=>r,isAtStartOfLine:()=>u,hasTrailingComment:()=>g,hasTrailingWhitespace:()=>!!r.length&&Pv(r.charCodeAt(r.length-1)),clear:N,writeKeyword:T,writeOperator:T,writeParameter:T,writeProperty:T,writePunctuation:T,writeSpace:T,writeStringLiteral:T,writeSymbol:(U,q)=>T(U),writeTrailingSemicolon:T,writeComment:E}}function oce(t){let r=!1;function a(){r&&(t.writeTrailingSemicolon(";"),r=!1)}return{...t,writeTrailingSemicolon(){r=!0},writeLiteral(u){a(),t.writeLiteral(u)},writeStringLiteral(u){a(),t.writeStringLiteral(u)},writeSymbol(u,h){a(),t.writeSymbol(u,h)},writePunctuation(u){a(),t.writePunctuation(u)},writeKeyword(u){a(),t.writeKeyword(u)},writeOperator(u){a(),t.writeOperator(u)},writeParameter(u){a(),t.writeParameter(u)},writeSpace(u){a(),t.writeSpace(u)},writeProperty(u){a(),t.writeProperty(u)},writeComment(u){a(),t.writeComment(u)},writeLine(){a(),t.writeLine()},increaseIndent(){a(),t.increaseIndent()},decreaseIndent(){a(),t.decreaseIndent()}}}function yP(t){return t.useCaseSensitiveFileNames?t.useCaseSensitiveFileNames():!1}function hS(t){return Mf(yP(t))}function ace(t,r,a){return r.moduleName||cce(t,r.fileName,a&&a.fileName)}function QXe(t,r){return t.getCanonicalFileName(wo(r,t.getCurrentDirectory()))}function $Te(t,r,a){const u=r.getExternalModuleFileFromDeclaration(a);if(!u||u.isDeclarationFile)return;const h=fP(a);if(!(h&&Bc(h)&&!am(h.text)&&!QXe(t,u.path).includes(QXe(t,Ad(t.getCommonSourceDirectory())))))return ace(t,u)}function cce(t,r,a){const u=b=>t.getCanonicalFileName(b),h=ol(a?ts(a):t.getCommonSourceDirectory(),t.getCurrentDirectory(),u),p=wo(r,t.getCurrentDirectory()),g=QL(h,p,h,u,!1),C=s_(g);return a?sI(C):C}function JTe(t,r,a){const u=r.getCompilerOptions();let h;return u.outDir?h=s_(gK(t,r,u.outDir)):h=s_(t),h+a}function GTe(t,r){return hK(t,r.getCompilerOptions(),r)}function hK(t,r,a){const u=r.declarationDir||r.outDir,h=u?XTe(t,u,a.getCurrentDirectory(),a.getCommonSourceDirectory(),g=>a.getCanonicalFileName(g)):t,p=_K(h);return s_(h)+p}function _K(t){return Ru(t,[".mjs",".mts"])?".d.mts":Ru(t,[".cjs",".cts"])?".d.cts":Ru(t,[".json"])?".d.json.ts":".d.ts"}function KTe(t){return Ru(t,[".d.mts",".mjs",".mts"])?[".mts",".mjs"]:Ru(t,[".d.cts",".cjs",".cts"])?[".cts",".cjs"]:Ru(t,[".d.json.ts"])?[".json"]:[".tsx",".ts",".jsx",".js"]}function pK(t,r){var a;if(t.paths)return t.baseUrl??j.checkDefined(t.pathsBasePath||((a=r.getCurrentDirectory)==null?void 0:a.call(r)),"Encountered 'paths' without a 'baseUrl', config file, or host 'getCurrentDirectory'.")}function mK(t,r,a){const u=t.getCompilerOptions();if(u.outFile){const h=zh(u),p=u.emitDeclarationOnly||h===2||h===4;return $t(t.getSourceFiles(),g=>(p||!wd(g))&&SI(g,t,a))}else{const h=r===void 0?t.getSourceFiles():[r];return $t(h,p=>SI(p,t,a))}}function SI(t,r,a){const u=r.getCompilerOptions();if(u.noEmitForJsFiles&&r_(t)||t.isDeclarationFile||r.isSourceFileFromExternalLibrary(t))return!1;if(a)return!0;if(r.isSourceOfProjectReferenceRedirect(t.fileName))return!1;if(!Eg(t))return!0;if(r.getResolvedProjectReferenceToRedirect(t.fileName))return!1;if(u.outFile)return!0;if(!u.outDir)return!1;if(u.rootDir||u.composite&&u.configFilePath){const h=wo(X7(u,()=>[],r.getCurrentDirectory(),r.getCanonicalFileName),r.getCurrentDirectory()),p=XTe(t.fileName,u.outDir,r.getCurrentDirectory(),h,r.getCanonicalFileName);if(Hb(t.fileName,p,r.getCurrentDirectory(),!r.useCaseSensitiveFileNames())===0)return!1}return!0}function gK(t,r,a){return XTe(t,a,r.getCurrentDirectory(),r.getCommonSourceDirectory(),u=>r.getCanonicalFileName(u))}function XTe(t,r,a,u,h){let p=wo(t,a);return p=h(p).indexOf(h(u))===0?p.substring(u.length):p,zr(r,p)}function yK(t,r,a,u,h,p,g){t.writeFile(a,u,h,C=>{r.add(Zl(k.Could_not_write_file_0_Colon_1,a,C))},p,g)}function ZXe(t,r,a){if(t.length>Ly(t)&&!a(t)){const u=ts(t);ZXe(u,r,a),r(t)}}function lce(t,r,a,u,h,p){try{u(t,r,a)}catch{ZXe(ts(ca(t)),h,p),u(t,r,a)}}function j8(t,r){const a=Lv(t);return a8(a,r)}function o3(t,r){return a8(t,r)}function Vv(t){return Fe(t.members,r=>iu(r)&&Dg(r.body))}function a3(t){if(t&&t.parameters.length>0){const r=t.parameters.length===2&&JT(t.parameters[0]);return t.parameters[r?1:0]}}function QTe(t){const r=a3(t);return r&&r.type}function $T(t){if(t.parameters.length&&!tC(t)){const r=t.parameters[0];if(JT(r))return r}}function JT(t){return ix(t.name)}function ix(t){return!!t&&t.kind===80&&uce(t)}function vP(t){return!!Qi(t,r=>r.kind===186?!0:r.kind===80||r.kind===166?!1:"quit")}function GT(t){if(!ix(t))return!1;for(;o_(t.parent)&&t.parent.left===t;)t=t.parent;return t.parent.kind===186}function uce(t){return t.escapedText==="this"}function nx(t,r){let a,u,h,p;return Jb(r)?(a=r,r.kind===177?h=r:r.kind===178?p=r:j.fail("Accessor has wrong kind")):O(t,g=>{if(Qw(g)&&pa(g)===pa(r)){const C=CI(g.name),b=CI(r.name);C===b&&(a?u||(u=g):a=g,g.kind===177&&!h&&(h=g),g.kind===178&&!p&&(p=g))}}),{firstAccessor:a,secondAccessor:u,getAccessor:h,setAccessor:p}}function dd(t){if(!nr(t)&&Wu(t)||Mg(t))return;const r=t.type;return r||!nr(t)?r:g8(t)?t.typeExpression&&t.typeExpression.type:Bk(t)}function ZTe(t){return t.type}function wp(t){return tC(t)?t.type&&t.type.typeExpression&&t.type.typeExpression.type:t.type||(nr(t)?MW(t):void 0)}function vK(t){return Rr(Wk(t),r=>r6t(r)?r.typeParameters:void 0)}function r6t(t){return Rg(t)&&!(t.parent.kind===320&&(t.parent.tags.some(Ng)||t.parent.tags.some(D3)))}function YTe(t){const r=a3(t);return r&&dd(r)}function s6t(t,r,a,u){o6t(t,r,a.pos,u)}function o6t(t,r,a,u){u&&u.length&&a!==u[0].pos&&o3(t,a)!==o3(t,u[0].pos)&&r.writeLine()}function eDe(t,r,a,u){a!==u&&o3(t,a)!==o3(t,u)&&r.writeLine()}function a6t(t,r,a,u,h,p,g,C){if(u&&u.length>0){let b=!1;for(const T of u)b&&(a.writeSpace(" "),b=!1),C(t,r,a,T.pos,T.end,g),T.hasTrailingNewLine?a.writeLine():b=!0;b&&p&&a.writeSpace(" ")}}function tDe(t,r,a,u,h,p,g){let C,b;if(g?h.pos===0&&(C=$t(Av(t,h.pos),T)):C=Av(t,h.pos),C){const E=[];let N;for(const R of C){if(N){const F=o3(r,N.end);if(o3(r,R.pos)>=F+2)break}E.push(R),N=R}if(E.length){const R=o3(r,va(E).end);o3(r,Va(t,h.pos))>=R+2&&(s6t(r,a,h,C),a6t(t,r,a,E,!1,!0,p,u),b={nodePos:h.pos,detachedCommentEndPos:va(E).end})}}return b;function T(E){return AG(t,E.pos)}}function c3(t,r,a,u,h,p){if(t.charCodeAt(u+1)===42){const g=P6(r,u),C=r.length;let b;for(let T=u,E=g.line;T<h;E++){const N=E+1===C?t.length+1:r[E+1];if(T!==u){b===void 0&&(b=YXe(t,r[g.line],u));const F=a.getIndent()*RV()-b+YXe(t,T,N);if(F>0){let H=F%RV();const U=fK((F-H)/RV());for(a.rawWrite(U);H;)a.rawWrite(" "),H--}else a.rawWrite("")}c6t(t,h,a,p,T,N),T=N}}else a.writeComment(t.substring(u,h))}function c6t(t,r,a,u,h,p){const g=Math.min(r,p-1),C=t.substring(h,g).trim();C?(a.writeComment(C),g!==r&&a.writeLine()):a.rawWrite(u)}function YXe(t,r,a){let u=0;for(;r<a&&k1(t.charCodeAt(r));r++)t.charCodeAt(r)===9?u+=RV()-u%RV():u++;return u}function dce(t){return jh(t)!==0}function iDe(t){return _S(t)!==0}function xp(t,r){return!!bP(t,r)}function Zr(t,r){return!!nDe(t,r)}function pa(t){return Od(t)&&bd(t)||gu(t)}function bd(t){return Zr(t,256)}function bK(t){return xp(t,16)}function KT(t){return Zr(t,64)}function fce(t){return Zr(t,128)}function O1(t){return Zr(t,512)}function z8(t){return xp(t,8)}function lm(t){return Zr(t,32768)}function bP(t,r){return jh(t)&r}function nDe(t,r){return _S(t)&r}function rDe(t,r,a){return t.kind>=0&&t.kind<=165?0:(t.modifierFlagsCache&536870912||(t.modifierFlagsCache=hce(t)|536870912),a||r&&nr(t)?(!(t.modifierFlagsCache&268435456)&&t.parent&&(t.modifierFlagsCache|=eQe(t)|268435456),tQe(t.modifierFlagsCache)):l6t(t.modifierFlagsCache))}function jh(t){return rDe(t,!0)}function sDe(t){return rDe(t,!0,!0)}function _S(t){return rDe(t,!1)}function eQe(t){let r=0;return t.parent&&!$s(t)&&(nr(t)&&(p2e(t)&&(r|=8388608),m2e(t)&&(r|=16777216),g2e(t)&&(r|=33554432),y2e(t)&&(r|=67108864),v2e(t)&&(r|=134217728)),b2e(t)&&(r|=65536)),r}function l6t(t){return t&65535}function tQe(t){return t&131071|(t&260046848)>>>23}function u6t(t){return tQe(eQe(t))}function oDe(t){return hce(t)|u6t(t)}function hce(t){let r=Fg(t)?M1(t.modifiers):0;return(t.flags&8||t.kind===80&&t.flags&4096)&&(r|=32),r}function M1(t){let r=0;if(t)for(const a of t)r|=CP(a.kind);return r}function CP(t){switch(t){case 126:return 256;case 125:return 1;case 124:return 4;case 123:return 2;case 128:return 64;case 129:return 512;case 95:return 32;case 138:return 128;case 87:return 4096;case 90:return 2048;case 134:return 1024;case 148:return 8;case 164:return 16;case 103:return 8192;case 147:return 16384;case 170:return 32768}return 0}function BV(t){return t===57||t===56}function aDe(t){return BV(t)||t===54}function U8(t){return t===76||t===77||t===78}function _ce(t){return ur(t)&&U8(t.operatorToken.kind)}function CK(t){return BV(t)||t===61}function WV(t){return ur(t)&&CK(t.operatorToken.kind)}function Gb(t){return t>=64&&t<=79}function pce(t){const r=mce(t);return r&&!r.isImplements?r.class:void 0}function mce(t){if(Yb(t)){if(Tp(t.parent)&&ss(t.parent.parent))return{class:t.parent.parent,isImplements:t.parent.token===119};if(KP(t.parent)){const r=Gk(t.parent);if(r&&ss(r))return{class:r,isImplements:!1}}}}function lf(t,r){return ur(t)&&(r?t.operatorToken.kind===64:Gb(t.operatorToken.kind))&&N_(t.left)}function pS(t){if(lf(t,!0)){const r=t.left.kind;return r===210||r===209}return!1}function SK(t){return pce(t)!==void 0}function pl(t){return t.kind===80||HV(t)}function K_(t){switch(t.kind){case 80:return t;case 166:do t=t.left;while(t.kind!==80);return t;case 211:do t=t.expression;while(t.kind!==80);return t}}function VV(t){return t.kind===80||t.kind===110||t.kind===108||t.kind===236||t.kind===211&&VV(t.expression)||t.kind===217&&VV(t.expression)}function HV(t){return Nr(t)&&ot(t.name)&&pl(t.expression)}function jV(t){if(Nr(t)){const r=jV(t.expression);if(r!==void 0)return r+"."+bp(t.name)}else if(wl(t)){const r=jV(t.expression);if(r!==void 0&&id(t.argumentExpression))return r+"."+CI(t.argumentExpression)}else{if(ot(t))return Ws(t.escapedText);if(j0(t))return d7(t)}}function rx(t){return jT(t)&&$b(t)==="prototype"}function q8(t){return t.parent.kind===166&&t.parent.right===t||t.parent.kind===211&&t.parent.name===t||t.parent.kind===236&&t.parent.name===t}function gce(t){return!!t.parent&&(Nr(t.parent)&&t.parent.name===t||wl(t.parent)&&t.parent.argumentExpression===t)}function cDe(t){return o_(t.parent)&&t.parent.right===t||Nr(t.parent)&&t.parent.name===t||a2(t.parent)&&t.parent.right===t}function wK(t){return ur(t)&&t.operatorToken.kind===104}function lDe(t){return wK(t.parent)&&t===t.parent.right}function yce(t){return t.kind===210&&t.properties.length===0}function uDe(t){return t.kind===209&&t.elements.length===0}function $8(t){if(!(!d6t(t)||!t.declarations)){for(const r of t.declarations)if(r.localSymbol)return r.localSymbol}}function d6t(t){return t&&P(t.declarations)>0&&Zr(t.declarations[0],2048)}function xK(t){return Fe(W6t,r=>Xl(t,r))}function f6t(t){const r=[],a=t.length;for(let u=0;u<a;u++){const h=t.charCodeAt(u);h<128?r.push(h):h<2048?(r.push(h>>6|192),r.push(h&63|128)):h<65536?(r.push(h>>12|224),r.push(h>>6&63|128),r.push(h&63|128)):h<131072?(r.push(h>>18|240),r.push(h>>12&63|128),r.push(h>>6&63|128),r.push(h&63|128)):j.assert(!1,"Unexpected code point")}return r}var SP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function dDe(t){let r="";const a=f6t(t);let u=0;const h=a.length;let p,g,C,b;for(;u<h;)p=a[u]>>2,g=(a[u]&3)<<4|a[u+1]>>4,C=(a[u+1]&15)<<2|a[u+2]>>6,b=a[u+2]&63,u+1>=h?C=b=64:u+2>=h&&(b=64),r+=SP.charAt(p)+SP.charAt(g)+SP.charAt(C)+SP.charAt(b),u+=3;return r}function h6t(t){let r="",a=0;const u=t.length;for(;a<u;){const h=t[a];if(h<128)r+=String.fromCharCode(h),a++;else if((h&192)===192){let p=h&63;a++;let g=t[a];for(;(g&192)===128;)p=p<<6|g&63,a++,g=t[a];r+=String.fromCharCode(p)}else r+=String.fromCharCode(h),a++}return r}function fDe(t,r){return t&&t.base64encode?t.base64encode(r):dDe(r)}function hDe(t,r){if(t&&t.base64decode)return t.base64decode(r);const a=r.length,u=[];let h=0;for(;h<a&&r.charCodeAt(h)!==SP.charCodeAt(64);){const p=SP.indexOf(r[h]),g=SP.indexOf(r[h+1]),C=SP.indexOf(r[h+2]),b=SP.indexOf(r[h+3]),T=(p&63)<<2|g>>4&3,E=(g&15)<<4|C>>2&15,N=(C&3)<<6|b&63;E===0&&C!==0?u.push(T):N===0&&b!==0?u.push(T,E):u.push(T,E,N),h+=4}return h6t(u)}function vce(t,r){const a=Oo(r)?r:r.readFile(t);if(!a)return;const u=tue(t,a);return u.error?void 0:u.config}function J8(t,r){return vce(t,r)||{}}function kK(t){try{return JSON.parse(t)}catch{return}}function B0(t,r){return!r.directoryExists||r.directoryExists(t)}var _6t=`\r
+`,p6t=`
+`;function mS(t){switch(t.newLine){case 0:return _6t;case 1:case void 0:return p6t}}function Um(t,r=t){return j.assert(r>=t||r===-1),{pos:t,end:r}}function TK(t,r){return Um(t.pos,r)}function Zk(t,r){return Um(r,t.end)}function Kb(t){const r=Fg(t)?rt(t.modifiers,Fd):void 0;return r&&!W0(r.end)?Zk(t,r.end):t}function R1(t){if(Lo(t)||Nu(t))return Zk(t,t.name.pos);const r=Fg(t)?rl(t.modifiers):void 0;return r&&!W0(r.end)?Zk(t,r.end):Kb(t)}function bce(t,r){return Um(t,t+xa(r).length)}function wI(t,r){return pDe(t,t,r)}function DK(t,r,a){return qm(G8(t,a,!1),G8(r,a,!1),a)}function _De(t,r,a){return qm(t.end,r.end,a)}function pDe(t,r,a){return qm(G8(t,a,!1),r.end,a)}function zV(t,r,a){return qm(t.end,G8(r,a,!1),a)}function Cce(t,r,a,u){const h=G8(r,a,u);return c8(a,t.end,h)}function iQe(t,r,a){return c8(a,t.end,r.end)}function mDe(t,r){return!qm(t.pos,t.end,r)}function qm(t,r,a){return c8(a,t,r)===0}function G8(t,r,a){return W0(t.pos)?-1:Va(r.text,t.pos,!1,a)}function gDe(t,r,a,u){const h=Va(a.text,t,!1,u),p=m6t(h,r,a);return c8(a,p??r,h)}function yDe(t,r,a,u){const h=Va(a.text,t,!1,u);return c8(a,t,Math.min(r,h))}function m6t(t,r=0,a){for(;t-- >r;)if(!Pv(a.text.charCodeAt(t)))return t}function Sce(t){const r=Mo(t);if(r)switch(r.parent.kind){case 266:case 267:return r===r.parent.name}return!1}function K8(t){return $t(t.declarations,UV)}function UV(t){return _s(t)&&t.initializer!==void 0}function wce(t){return t.watch&&Li(t,"watch")}function d0(t){t.close()}function Iu(t){return t.flags&33554432?t.links.checkFlags:0}function $m(t,r=!1){if(t.valueDeclaration){const a=r&&t.declarations&&Fe(t.declarations,kp)||t.flags&32768&&Fe(t.declarations,um)||t.valueDeclaration,u=Rk(a);return t.parent&&t.parent.flags&32?u:u&-8}if(Iu(t)&6){const a=t.links.checkFlags,u=a&1024?2:a&256?1:4,h=a&2048?256:0;return u|h}return t.flags&4194304?257:0}function Vf(t,r){return t.flags&2097152?r.getAliasedSymbol(t):t}function l3(t){return t.exportSymbol?t.exportSymbol.flags|t.flags:t.flags}function EK(t){return X8(t)===1}function wP(t){return X8(t)!==0}function X8(t){const{parent:r}=t;switch(r==null?void 0:r.kind){case 217:return X8(r);case 225:case 224:const{operator:a}=r;return a===46||a===47?2:0;case 226:const{left:u,operatorToken:h}=r;return u===t&&Gb(h.kind)?h.kind===64?1:2:0;case 211:return r.name!==t?0:X8(r);case 303:{const p=X8(r.parent);return t===r.name?g6t(p):p}case 304:return t===r.objectAssignmentInitializer?0:X8(r.parent);case 209:return X8(r);default:return 0}}function g6t(t){switch(t){case 0:return 1;case 1:return 0;case 2:return 2;default:return j.assertNever(t)}}function xce(t,r){if(!t||!r||Object.keys(t).length!==Object.keys(r).length)return!1;for(const a in t)if(typeof t[a]=="object"){if(!xce(t[a],r[a]))return!1}else if(typeof t[a]!="function"&&t[a]!==r[a])return!1;return!0}function X_(t,r){t.forEach(r),t.clear()}function Hv(t,r,a){const{onDeleteValue:u,onExistingValue:h}=a;t.forEach((p,g)=>{var C;r!=null&&r.has(g)?h&&h(p,(C=r.get)==null?void 0:C.call(r,g),g):(t.delete(g),u(p,g))})}function Q8(t,r,a){Hv(t,r,a);const{createNewValue:u}=a;r==null||r.forEach((h,p)=>{t.has(p)||t.set(p,u(p,h))})}function vDe(t){if(t.flags&32){const r=Xb(t);return!!r&&Zr(r,64)}return!1}function Xb(t){var r;return(r=t.declarations)==null?void 0:r.find(ss)}function Or(t){return t.flags&3899393?t.objectFlags:0}function IK(t){return!!t&&!!t.declarations&&!!t.declarations[0]&&pH(t.declarations[0])}function bDe({moduleSpecifier:t}){return Ha(t)?t.text:uu(t)}function kce(t){let r;return Uo(t,a=>{Dg(a)&&(r=a)},a=>{for(let u=a.length-1;u>=0;u--)if(Dg(a[u])){r=a[u];break}}),r}function Pg(t,r,a=!0){return t.has(r)?!1:(t.set(r,a),!0)}function xP(t){return ss(t)||zf(t)||a_(t)}function Tce(t){return t>=182&&t<=205||t===133||t===159||t===150||t===163||t===151||t===136||t===154||t===155||t===116||t===157||t===146||t===141||t===233||t===312||t===313||t===314||t===315||t===316||t===317||t===318}function Sl(t){return t.kind===211||t.kind===212}function Dce(t){return t.kind===211?t.name:(j.assert(t.kind===212),t.argumentExpression)}function NK(t){return t.kind===275||t.kind===279}function u3(t){for(;Sl(t);)t=t.expression;return t}function CDe(t,r){if(Sl(t.parent)&&gce(t))return a(t.parent);function a(u){if(u.kind===211){const h=r(u.name);if(h!==void 0)return h}else if(u.kind===212)if(ot(u.argumentExpression)||Bc(u.argumentExpression)){const h=r(u.argumentExpression);if(h!==void 0)return h}else return;if(Sl(u.expression))return a(u.expression);if(ot(u.expression))return r(u.expression)}}function d3(t,r){for(;;){switch(t.kind){case 225:t=t.operand;continue;case 226:t=t.left;continue;case 227:t=t.condition;continue;case 215:t=t.tag;continue;case 213:if(r)return t;case 234:case 212:case 211:case 235:case 354:case 238:t=t.expression;continue}return t}}function y6t(t,r){this.flags=t,this.escapedName=r,this.declarations=void 0,this.valueDeclaration=void 0,this.id=0,this.mergeId=0,this.parent=void 0,this.members=void 0,this.exports=void 0,this.exportSymbol=void 0,this.constEnumOnlyModule=void 0,this.isReferenced=void 0,this.lastAssignmentPos=void 0,this.links=void 0}function v6t(t,r){this.flags=r,(j.isDebugging||Zn)&&(this.checker=t)}function b6t(t,r){this.flags=r,j.isDebugging&&(this.checker=t)}function SDe(t,r,a){this.pos=r,this.end=a,this.kind=t,this.id=0,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}function C6t(t,r,a){this.pos=r,this.end=a,this.kind=t,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.emitNode=void 0}function S6t(t,r,a){this.pos=r,this.end=a,this.kind=t,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}function w6t(t,r,a){this.fileName=t,this.text=r,this.skipTrivia=a||(u=>u)}var Hf={getNodeConstructor:()=>SDe,getTokenConstructor:()=>C6t,getIdentifierConstructor:()=>S6t,getPrivateIdentifierConstructor:()=>SDe,getSourceFileConstructor:()=>SDe,getSymbolConstructor:()=>y6t,getTypeConstructor:()=>v6t,getSignatureConstructor:()=>b6t,getSourceMapSourceConstructor:()=>w6t},nQe=[];function rQe(t){nQe.push(t),t(Hf)}function wDe(t){Object.assign(Hf,t),O(nQe,r=>r(Hf))}function jv(t,r){return t.replace(/\{(\d+)\}/g,(a,u)=>""+j.checkDefined(r[+u]))}var LK;function xDe(t){LK=t}function kDe(t){!LK&&t&&(LK=t())}function Bo(t){return LK&&LK[t.key]||t.message}function kP(t,r,a,u,h,...p){a+u>r.length&&(u=r.length-a),oTe(r,a,u);let g=Bo(h);return Ft(p)&&(g=jv(g,p)),{file:void 0,start:a,length:u,messageText:g,category:h.category,code:h.code,reportsUnnecessary:h.reportsUnnecessary,fileName:t}}function x6t(t){return t.file===void 0&&t.start!==void 0&&t.length!==void 0&&typeof t.fileName=="string"}function sQe(t,r){const a=r.fileName||"",u=r.text.length;j.assertEqual(t.fileName,a),j.assertLessThanOrEqual(t.start,u),j.assertLessThanOrEqual(t.start+t.length,u);const h={file:r,start:t.start,length:t.length,messageText:t.messageText,category:t.category,code:t.code,reportsUnnecessary:t.reportsUnnecessary};if(t.relatedInformation){h.relatedInformation=[];for(const p of t.relatedInformation)x6t(p)&&p.fileName===a?(j.assertLessThanOrEqual(p.start,u),j.assertLessThanOrEqual(p.start+p.length,u),h.relatedInformation.push(sQe(p,r))):h.relatedInformation.push(p)}return h}function TP(t,r){const a=[];for(const u of t)a.push(sQe(u,r));return a}function Md(t,r,a,u,...h){oTe(t.text,r,a);let p=Bo(u);return Ft(h)&&(p=jv(p,h)),{file:t,start:r,length:a,messageText:p,category:u.category,code:u.code,reportsUnnecessary:u.reportsUnnecessary,reportsDeprecated:u.reportsDeprecated}}function DP(t,...r){let a=Bo(t);return Ft(r)&&(a=jv(a,r)),a}function Zl(t,...r){let a=Bo(t);return Ft(r)&&(a=jv(a,r)),{file:void 0,start:void 0,length:void 0,messageText:a,category:t.category,code:t.code,reportsUnnecessary:t.reportsUnnecessary,reportsDeprecated:t.reportsDeprecated}}function PK(t,r){return{file:void 0,start:void 0,length:void 0,code:t.code,category:t.category,messageText:t.next?t:t.messageText,relatedInformation:r}}function jo(t,r,...a){let u=Bo(r);return Ft(a)&&(u=jv(u,a)),{messageText:u,category:r.category,code:r.code,next:t===void 0||Array.isArray(t)?t:[t]}}function TDe(t,r){let a=t;for(;a.next;)a=a.next[0];a.next=[r]}function Ece(t){return t.file?t.file.path:void 0}function Z8(t,r){return DDe(t,r)||k6t(t,r)||0}function DDe(t,r){const a=Ice(t),u=Ice(r);return sh(Ece(t),Ece(r))||_l(t.start,r.start)||_l(t.length,r.length)||_l(a,u)||T6t(t,r)||0}function k6t(t,r){return!t.relatedInformation&&!r.relatedInformation?0:t.relatedInformation&&r.relatedInformation?_l(r.relatedInformation.length,t.relatedInformation.length)||O(t.relatedInformation,(a,u)=>{const h=r.relatedInformation[u];return Z8(a,h)})||0:t.relatedInformation?-1:1}function T6t(t,r){let a=Nce(t),u=Nce(r);typeof a!="string"&&(a=a.messageText),typeof u!="string"&&(u=u.messageText);const h=typeof t.messageText!="string"?t.messageText.next:void 0,p=typeof r.messageText!="string"?r.messageText.next:void 0;let g=sh(a,u);return g||(g=D6t(h,p),g)?g:t.canonicalHead&&!r.canonicalHead?-1:r.canonicalHead&&!t.canonicalHead?1:0}function D6t(t,r){return t===void 0&&r===void 0?0:t===void 0?1:r===void 0?-1:oQe(t,r)||aQe(t,r)}function oQe(t,r){if(t===void 0&&r===void 0)return 0;if(t===void 0)return 1;if(r===void 0)return-1;let a=_l(r.length,t.length);if(a)return a;for(let u=0;u<r.length;u++)if(a=oQe(t[u].next,r[u].next),a)return a;return 0}function aQe(t,r){let a;for(let u=0;u<r.length;u++){if(a=sh(t[u].messageText,r[u].messageText),a)return a;if(t[u].next!==void 0&&(a=aQe(t[u].next,r[u].next),a))return a}return 0}function AK(t,r){const a=Ice(t),u=Ice(r),h=Nce(t),p=Nce(r);return sh(Ece(t),Ece(r))===0&&_l(t.start,r.start)===0&&_l(t.length,r.length)===0&&_l(a,u)===0&&E6t(h,p)}function Ice(t){var r;return((r=t.canonicalHead)==null?void 0:r.code)||t.code}function Nce(t){var r;return((r=t.canonicalHead)==null?void 0:r.messageText)||t.messageText}function E6t(t,r){const a=typeof t=="string"?t:t.messageText,u=typeof r=="string"?r:r.messageText;return sh(a,u)===0}function qV(t){return t===4||t===2||t===1||t===6?1:0}function cQe(t){if(t.transformFlags&2)return oh(t)||aD(t)?t:Uo(t,cQe)}function I6t(t){return t.isDeclarationFile?void 0:cQe(t)}function N6t(t,r){return(jI(t,r)===99||Ru(t.fileName,[".cjs",".cts",".mjs",".mts"]))&&!t.isDeclarationFile?!0:void 0}function $V(t){switch(EDe(t)){case 3:return h=>{h.externalModuleIndicator=kH(h)||!h.isDeclarationFile||void 0};case 1:return h=>{h.externalModuleIndicator=kH(h)};case 2:const r=[kH];(t.jsx===4||t.jsx===5)&&r.push(I6t),r.push(N6t);const a=om(...r);return h=>void(h.externalModuleIndicator=a(h,t))}}function Lce(t){const r=yh(t);return 3<=r&&r<=99||JV(t)||OK(t)}function J8i(t){return t}var Cd={target:{dependencies:["module"],computeValue:t=>(t.target===0?void 0:t.target)??(t.module===100&&9||t.module===199&&99||1)},module:{dependencies:["target"],computeValue:t=>typeof t.module=="number"?t.module:Cd.target.computeValue(t)>=2?5:1},moduleResolution:{dependencies:["module","target"],computeValue:t=>{let r=t.moduleResolution;if(r===void 0)switch(Cd.module.computeValue(t)){case 1:r=2;break;case 100:r=3;break;case 199:r=99;break;case 200:r=100;break;default:r=1;break}return r}},moduleDetection:{dependencies:["module","target"],computeValue:t=>t.moduleDetection||(Cd.module.computeValue(t)===100||Cd.module.computeValue(t)===199?3:2)},isolatedModules:{dependencies:["verbatimModuleSyntax"],computeValue:t=>!!(t.isolatedModules||t.verbatimModuleSyntax)},esModuleInterop:{dependencies:["module","target"],computeValue:t=>{if(t.esModuleInterop!==void 0)return t.esModuleInterop;switch(Cd.module.computeValue(t)){case 100:case 199:case 200:return!0}return!1}},allowSyntheticDefaultImports:{dependencies:["module","target","moduleResolution"],computeValue:t=>t.allowSyntheticDefaultImports!==void 0?t.allowSyntheticDefaultImports:Cd.esModuleInterop.computeValue(t)||Cd.module.computeValue(t)===4||Cd.moduleResolution.computeValue(t)===100},resolvePackageJsonExports:{dependencies:["moduleResolution"],computeValue:t=>{const r=Cd.moduleResolution.computeValue(t);if(!f3(r))return!1;if(t.resolvePackageJsonExports!==void 0)return t.resolvePackageJsonExports;switch(r){case 3:case 99:case 100:return!0}return!1}},resolvePackageJsonImports:{dependencies:["moduleResolution","resolvePackageJsonExports"],computeValue:t=>{const r=Cd.moduleResolution.computeValue(t);if(!f3(r))return!1;if(t.resolvePackageJsonExports!==void 0)return t.resolvePackageJsonExports;switch(r){case 3:case 99:case 100:return!0}return!1}},resolveJsonModule:{dependencies:["moduleResolution","module","target"],computeValue:t=>t.resolveJsonModule!==void 0?t.resolveJsonModule:Cd.moduleResolution.computeValue(t)===100},declaration:{dependencies:["composite"],computeValue:t=>!!(t.declaration||t.composite)},preserveConstEnums:{dependencies:["isolatedModules","verbatimModuleSyntax"],computeValue:t=>!!(t.preserveConstEnums||Cd.isolatedModules.computeValue(t))},incremental:{dependencies:["composite"],computeValue:t=>!!(t.incremental||t.composite)},declarationMap:{dependencies:["declaration","composite"],computeValue:t=>!!(t.declarationMap&&Cd.declaration.computeValue(t))},allowJs:{dependencies:["checkJs"],computeValue:t=>t.allowJs===void 0?!!t.checkJs:t.allowJs},useDefineForClassFields:{dependencies:["target","module"],computeValue:t=>t.useDefineForClassFields===void 0?Cd.target.computeValue(t)>=9:t.useDefineForClassFields},noImplicitAny:{dependencies:["strict"],computeValue:t=>ah(t,"noImplicitAny")},noImplicitThis:{dependencies:["strict"],computeValue:t=>ah(t,"noImplicitThis")},strictNullChecks:{dependencies:["strict"],computeValue:t=>ah(t,"strictNullChecks")},strictFunctionTypes:{dependencies:["strict"],computeValue:t=>ah(t,"strictFunctionTypes")},strictBindCallApply:{dependencies:["strict"],computeValue:t=>ah(t,"strictBindCallApply")},strictPropertyInitialization:{dependencies:["strict"],computeValue:t=>ah(t,"strictPropertyInitialization")},strictBuiltinIteratorReturn:{dependencies:["strict"],computeValue:t=>ah(t,"strictBuiltinIteratorReturn")},alwaysStrict:{dependencies:["strict"],computeValue:t=>ah(t,"alwaysStrict")},useUnknownInCatchVariables:{dependencies:["strict"],computeValue:t=>ah(t,"useUnknownInCatchVariables")}},Ja=Cd.target.computeValue,zh=Cd.module.computeValue,yh=Cd.moduleResolution.computeValue,EDe=Cd.moduleDetection.computeValue,Ag=Cd.isolatedModules.computeValue,zv=Cd.esModuleInterop.computeValue,EP=Cd.allowSyntheticDefaultImports.computeValue,JV=Cd.resolvePackageJsonExports.computeValue,OK=Cd.resolvePackageJsonImports.computeValue,XT=Cd.resolveJsonModule.computeValue,Q_=Cd.declaration.computeValue,sx=Cd.preserveConstEnums.computeValue,QT=Cd.incremental.computeValue,MK=Cd.declarationMap.computeValue,ox=Cd.allowJs.computeValue,GV=Cd.useDefineForClassFields.computeValue;function KV(t){return t>=5&&t<=99}function RK(t){switch(zh(t)){case 0:case 4:case 3:return!1}return!0}function IDe(t){return t.allowUnreachableCode===!1}function NDe(t){return t.allowUnusedLabels===!1}function f3(t){return t>=3&&t<=99||t===100}function ah(t,r){return t[r]===void 0?!!t.strict:!!t[r]}function FK(t){return cf(Gle.type,(r,a)=>r===t?a:void 0)}function Pce(t){return t.useDefineForClassFields!==!1&&Ja(t)>=9}function LDe(t,r){return j6(r,t,DIe)}function PDe(t,r){return j6(r,t,EIe)}function ADe(t,r){return j6(r,t,IIe)}function BK(t,r){return r.strictFlag?ah(t,r.name):r.allowJsFlag?ox(t):t[r.name]}function WK(t){const r=t.jsx;return r===2||r===4||r===5}function VK(t,r){const a=r==null?void 0:r.pragmas.get("jsximportsource"),u=Ao(a)?a[a.length-1]:a,h=r==null?void 0:r.pragmas.get("jsxruntime"),p=Ao(h)?h[h.length-1]:h;if((p==null?void 0:p.arguments.factory)!=="classic")return t.jsx===4||t.jsx===5||t.jsxImportSource||u||(p==null?void 0:p.arguments.factory)==="automatic"?(u==null?void 0:u.arguments.factory)||t.jsxImportSource||"react":void 0}function HK(t,r){return t?`${t}/${r.jsx===5?"jsx-dev-runtime":"jsx-runtime"}`:void 0}function Ace(t){let r=!1;for(let a=0;a<t.length;a++)if(t.charCodeAt(a)===42)if(!r)r=!0;else return!1;return!0}function Oce(t,r){let a,u,h,p=!1;return{getSymlinkedFiles:()=>h,getSymlinkedDirectories:()=>a,getSymlinkedDirectoriesByRealpath:()=>u,setSymlinkedFile:(b,T)=>(h||(h=new Map)).set(b,T),setSymlinkedDirectory:(b,T)=>{let E=ol(b,t,r);a7(E)||(E=Ad(E),T!==!1&&!(a!=null&&a.has(E))&&(u||(u=Of())).add(T.realPath,b),(a||(a=new Map)).set(E,T))},setSymlinksFromResolutions(b,T,E){j.assert(!p),p=!0,b(N=>C(this,N.resolvedModule)),T(N=>C(this,N.resolvedTypeReferenceDirective)),E.forEach(N=>C(this,N.resolvedTypeReferenceDirective))},hasProcessedResolutions:()=>p,setSymlinksFromResolution(b){C(this,b)},hasAnySymlinks:g};function g(){return!!(h!=null&&h.size)||!!a&&!!cf(a,b=>!!b)}function C(b,T){if(!T||!T.originalPath||!T.resolvedFileName)return;const{resolvedFileName:E,originalPath:N}=T;b.setSymlinkedFile(ol(N,t,r),E);const[R,F]=L6t(E,N,t,r)||w;R&&F&&b.setSymlinkedDirectory(F,{real:Ad(R),realPath:Ad(ol(R,t,r))})}}function L6t(t,r,a,u){const h=af(wo(t,a)),p=af(wo(r,a));let g=!1;for(;h.length>=2&&p.length>=2&&!lQe(h[h.length-2],u)&&!lQe(p[p.length-2],u)&&u(h[h.length-1])===u(p[p.length-1]);)h.pop(),p.pop(),g=!0;return g?[sS(h),sS(p)]:void 0}function lQe(t,r){return t!==void 0&&(r(t)==="node_modules"||so(t,"@"))}function P6t(t){return Ioe(t.charCodeAt(0))?t.slice(1):void 0}function Mce(t,r,a){const u=noe(t,r,a);return u===void 0?void 0:P6t(u)}var ODe=/[^\w\s/]/g;function uQe(t){return t.replace(ODe,A6t)}function A6t(t){return"\\"+t}var O6t=[42,63],M6t=["node_modules","bower_components","jspm_packages"],MDe=`(?!(${M6t.join("|")})(/|$))`,dQe={singleAsteriskRegexFragment:"([^./]|(\\.(?!min\\.js$))?)*",doubleAsteriskRegexFragment:`(/${MDe}[^/.][^/]*)*?`,replaceWildcardCharacter:t=>BDe(t,dQe.singleAsteriskRegexFragment)},fQe={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:`(/${MDe}[^/.][^/]*)*?`,replaceWildcardCharacter:t=>BDe(t,fQe.singleAsteriskRegexFragment)},hQe={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:"(/.+?)?",replaceWildcardCharacter:t=>BDe(t,hQe.singleAsteriskRegexFragment)},RDe={files:dQe,directories:fQe,exclude:hQe};function Y8(t,r,a){const u=jK(t,r,a);return!u||!u.length?void 0:`^(${u.map(g=>`(${g})`).join("|")})${a==="exclude"?"($|/)":"$"}`}function jK(t,r,a){if(!(t===void 0||t.length===0))return Rr(t,u=>u&&zK(u,r,a,RDe[a]))}function Rce(t){return!/[.*?]/.test(t)}function FDe(t,r,a){const u=t&&zK(t,r,a,RDe[a]);return u&&`^(${u})${a==="exclude"?"($|/)":"$"}`}function zK(t,r,a,{singleAsteriskRegexFragment:u,doubleAsteriskRegexFragment:h,replaceWildcardCharacter:p}=RDe[a]){let g="",C=!1;const b=SW(t,r),T=va(b);if(a!=="exclude"&&T==="**")return;b[0]=Mk(b[0]),Rce(T)&&b.push("**","*");let E=0;for(let N of b){if(N==="**")g+=h;else if(a==="directories"&&(g+="(",E++),C&&(g+=Kl),a!=="exclude"){let R="";N.charCodeAt(0)===42?(R+="([^./]"+u+")?",N=N.substr(1)):N.charCodeAt(0)===63&&(R+="[^./]",N=N.substr(1)),R+=N.replace(ODe,p),R!==N&&(g+=MDe),g+=R}else g+=N.replace(ODe,p);C=!0}for(;E>0;)g+=")?",E--;return g}function BDe(t,r){return t==="*"?r:t==="?"?"[^/]":"\\"+t}function UK(t,r,a,u,h){t=ca(t),h=ca(h);const p=zr(h,t);return{includeFilePatterns:qt(jK(a,p,"files"),g=>`^${g}$`),includeFilePattern:Y8(a,p,"files"),includeDirectoryPattern:Y8(a,p,"directories"),excludePattern:Y8(r,p,"exclude"),basePaths:R6t(t,a,u)}}function ax(t,r){return new RegExp(t,r?"":"i")}function Fce(t,r,a,u,h,p,g,C,b){t=ca(t),p=ca(p);const T=UK(t,a,u,h,p),E=T.includeFilePatterns&&T.includeFilePatterns.map(X=>ax(X,h)),N=T.includeDirectoryPattern&&ax(T.includeDirectoryPattern,h),R=T.excludePattern&&ax(T.excludePattern,h),F=E?E.map(()=>[]):[[]],H=new Map,U=Mf(h);for(const X of T.basePaths)q(X,zr(p,X),g);return Dr(F);function q(X,Z,Q){const re=U(b(Z));if(H.has(re))return;H.set(re,!0);const{files:oe,directories:pe}=C(X);for(const de of Mu(oe,sh)){const ue=zr(X,de),Ie=zr(Z,de);if(!(r&&!Ru(ue,r))&&!(R&&R.test(Ie)))if(!E)F[0].push(ue);else{const we=ct(E,he=>he.test(Ie));we!==-1&&F[we].push(ue)}}if(!(Q!==void 0&&(Q--,Q===0)))for(const de of Mu(pe,sh)){const ue=zr(X,de),Ie=zr(Z,de);(!N||N.test(Ie))&&(!R||!R.test(Ie))&&q(ue,Ie,Q)}}}function R6t(t,r,a){const u=[t];if(r){const h=[];for(const p of r){const g=yp(p)?p:ca(zr(t,p));h.push(F6t(g))}h.sort(E6(!a));for(const p of h)Ce(u,g=>!Vm(g,p,t,!a))&&u.push(p)}return u}function F6t(t){const r=Bi(t,O6t);return r<0?N6(t)?Mk(ts(t)):t:t.substring(0,t.lastIndexOf(Kl,r))}function qK(t,r){return r||$K(t)||3}function $K(t){switch(t.substr(t.lastIndexOf(".")).toLowerCase()){case".js":case".cjs":case".mjs":return 1;case".jsx":return 2;case".ts":case".cts":case".mts":return 3;case".tsx":return 4;case".json":return 6;default:return 0}}var JK=[[".ts",".tsx",".d.ts"],[".cts",".d.cts"],[".mts",".d.mts"]],Bce=Dr(JK),B6t=[...JK,[".json"]],W6t=[".d.ts",".d.cts",".d.mts",".cts",".mts",".ts",".tsx"],V6t=[[".js",".jsx"],[".mjs"],[".cjs"]],h3=Dr(V6t),Wce=[[".ts",".tsx",".d.ts",".js",".jsx"],[".cts",".d.cts",".cjs"],[".mts",".d.mts",".mjs"]],H6t=[...Wce,[".json"]],GK=[".d.ts",".d.cts",".d.mts"],XV=[".ts",".cts",".mts",".tsx"],KK=[".mts",".d.mts",".mjs",".cts",".d.cts",".cjs"];function e7(t,r){const a=t&&ox(t);if(!r||r.length===0)return a?Wce:JK;const u=a?Wce:JK,h=Dr(u);return[...u,...es(r,g=>g.scriptKind===7||a&&j6t(g.scriptKind)&&!h.includes(g.extension)?[g.extension]:void 0)]}function QV(t,r){return!t||!XT(t)?r:r===Wce?H6t:r===JK?B6t:[...r,[".json"]]}function j6t(t){return t===1||t===2}function Uv(t){return Ft(h3,r=>Xl(t,r))}function IP(t){return Ft(Bce,r=>Xl(t,r))}function WDe(t){return Ft(XV,r=>Xl(t,r))&&!df(t)}var VDe=(t=>(t[t.Minimal=0]="Minimal",t[t.Index=1]="Index",t[t.JsExtension=2]="JsExtension",t[t.TsExtension=3]="TsExtension",t))(VDe||{});function z6t({imports:t},r=om(Uv,IP)){return J(t,({text:a})=>am(a)&&!Ru(a,KK)?r(a):void 0)||!1}function HDe(t,r,a,u){const h=yh(a),p=3<=h&&h<=99;if(t==="js"||r===99&&p)return W3(a)&&g()!==2?3:2;if(t==="minimal")return 0;if(t==="index")return 1;if(!W3(a))return u&&z6t(u)?2:0;return g();function g(){let C=!1;const b=u!=null&&u.imports.length?u.imports:u&&r_(u)?U6t(u).map(T=>T.arguments[0]):w;for(const T of b)if(am(T.text)){if(p&&r===1&&pde(u,T,a)===99||Ru(T.text,KK))continue;if(IP(T.text))return 3;Uv(T.text)&&(C=!0)}return C?2:0}}function U6t(t){let r=0,a;for(const u of t.statements){if(r>3)break;hV(u)?a=Js(a,u.declarationList.declarations.map(h=>h.initializer)):uf(u)&&L_(u.expression,!0)?a=fn(a,u.expression):r++}return a||w}function jDe(t,r,a){if(!t)return!1;const u=e7(r,a);for(const h of Dr(QV(r,u)))if(Xl(t,h))return!0;return!1}function _Qe(t){const r=t.match(/\//g);return r?r.length:0}function ZV(t,r){return _l(_Qe(t),_Qe(r))}var zDe=[".d.ts",".d.mts",".d.cts",".mjs",".mts",".cjs",".cts",".ts",".js",".tsx",".jsx",".json"];function s_(t){for(const r of zDe){const a=UDe(t,r);if(a!==void 0)return a}return t}function UDe(t,r){return Xl(t,r)?YV(t,r):void 0}function YV(t,r){return t.substring(0,t.length-r.length)}function cx(t,r){return wW(t,r,zDe,!1)}function _3(t){const r=t.indexOf("*");return r===-1?t:t.indexOf("*",r+1)!==-1?void 0:{prefix:t.substr(0,r),suffix:t.substr(r+1)}}function XK(t){return es(wr(t),r=>_3(r))}function W0(t){return!(t>=0)}function QK(t){return t===".ts"||t===".tsx"||t===".d.ts"||t===".cts"||t===".mts"||t===".d.mts"||t===".d.cts"||so(t,".d.")&&su(t,".ts")}function t7(t){return QK(t)||t===".json"}function i7(t){const r=qv(t);return r!==void 0?r:j.fail(`File ${t} has unknown extension.`)}function pQe(t){return qv(t)!==void 0}function qv(t){return Fe(zDe,r=>Xl(t,r))}function n7(t,r){return t.checkJsDirective?t.checkJsDirective.enabled:r.checkJs}var Vce={files:w,directories:w};function Hce(t,r){const a=[];for(const u of t){if(u===r)return r;Oo(u)||a.push(u)}return ioe(a,u=>u,r)}function jce(t,r){const a=t.indexOf(r);return j.assert(a!==-1),t.slice(a)}function da(t,...r){return r.length&&(t.relatedInformation||(t.relatedInformation=[]),j.assert(t.relatedInformation!==w,"Diagnostic had empty array singleton for related info, but is still being constructed!"),t.relatedInformation.push(...r)),t}function qDe(t,r){j.assert(t.length!==0);let a=r(t[0]),u=a;for(let h=1;h<t.length;h++){const p=r(t[h]);p<a?a=p:p>u&&(u=p)}return{min:a,max:u}}function zce(t){return{pos:ex(t),end:t.end}}function Uce(t,r){const a=r.pos-1,u=Math.min(t.text.length,Va(t.text,r.end)+1);return{pos:a,end:u}}function p3(t,r,a){return mQe(t,r,a,!1)}function $De(t,r,a){return mQe(t,r,a,!0)}function mQe(t,r,a,u){return r.skipLibCheck&&t.isDeclarationFile||r.skipDefaultLibCheck&&t.hasNoDefaultLib||!u&&r.noCheck||a.isSourceOfProjectReferenceRedirect(t.fileName)||!r7(t,r)}function r7(t,r){if(t.checkJsDirective&&t.checkJsDirective.enabled===!1)return!1;if(t.scriptKind===3||t.scriptKind===4||t.scriptKind===5)return!0;const u=(t.scriptKind===1||t.scriptKind===2)&&n7(t,r);return k8(t,r.checkJs)||u||t.scriptKind===7}function ZK(t,r){return t===r||typeof t=="object"&&t!==null&&typeof r=="object"&&r!==null&&Af(t,r,ZK)}function s7(t){let r;switch(t.charCodeAt(1)){case 98:case 66:r=1;break;case 111:case 79:r=3;break;case 120:case 88:r=4;break;default:const T=t.length-1;let E=0;for(;t.charCodeAt(E)===48;)E++;return t.slice(E,T)||"0"}const a=2,u=t.length-1,h=(u-a)*r,p=new Uint16Array((h>>>4)+(h&15?1:0));for(let T=u-1,E=0;T>=a;T--,E+=r){const N=E>>>4,R=t.charCodeAt(T),H=(R<=57?R-48:10+R-(R<=70?65:97))<<(E&15);p[N]|=H;const U=H>>>16;U&&(p[N+1]|=U)}let g="",C=p.length-1,b=!0;for(;b;){let T=0;b=!1;for(let E=C;E>=0;E--){const N=T<<16|p[E],R=N/10|0;p[E]=R,T=N-R*10,R&&!b&&(C=E,b=!0)}g=T+g}return g}function ZT({negative:t,base10Value:r}){return(t&&r!=="0"?"-":"")+r}function JDe(t){if(YK(t,!1))return qce(t)}function qce(t){const r=t.startsWith("-"),a=s7(`${r?t.slice(1):t}n`);return{negative:r,base10Value:a}}function YK(t,r){if(t==="")return!1;const a=Ov(99,!1);let u=!0;a.setOnError(()=>u=!1),a.setText(t+"n");let h=a.scan();const p=h===41;p&&(h=a.scan());const g=a.getTokenFlags();return u&&h===10&&a.getTokenEnd()===t.length+1&&!(g&512)&&(!r||t===ZT({negative:p,base10Value:s7(a.getTokenValue())}))}function Yk(t){return!!(t.flags&33554432)||QG(t)||J6t(t)||$6t(t)||!(F0(t)||q6t(t))}function q6t(t){return ot(t)&&lh(t.parent)&&t.parent.name===t}function $6t(t){for(;t.kind===80||t.kind===211;)t=t.parent;if(t.kind!==167)return!1;if(Zr(t.parent,64))return!0;const r=t.parent.parent.kind;return r===264||r===187}function J6t(t){if(t.kind!==80)return!1;const r=Qi(t.parent,a=>{switch(a.kind){case 298:return!0;case 211:case 233:return!1;default:return"quit"}});return(r==null?void 0:r.token)===119||(r==null?void 0:r.parent.kind)===264}function GDe(t){return qp(t)&&ot(t.typeName)}function KDe(t,r=Hw){if(t.length<2)return!0;const a=t[0];for(let u=1,h=t.length;u<h;u++){const p=t[u];if(!r(a,p))return!1}return!0}function o7(t,r){return t.pos=r,t}function m3(t,r){return t.end=r,t}function V0(t,r,a){return m3(o7(t,r),a)}function $ce(t,r,a){return V0(t,r,r+a)}function XDe(t,r){return t&&(t.flags=r),t}function _c(t,r){return t&&r&&(t.parent=r),t}function Qb(t,r){if(!t)return t;return QP(t,W6(t)?a:h),t;function a(p,g){if(r&&p.parent===g)return"skip";_c(p,g)}function u(p){if(jp(p))for(const g of p.jsDoc)a(g,p),QP(g,a)}function h(p,g){return a(p,g)||u(p)}}function G6t(t){return!Bd(t)}function Jce(t){return jf(t)&&Ce(t.elements,G6t)}function QDe(t){for(j.assertIsDefined(t.parent);;){const r=t.parent;if(c_(r)){t=r;continue}if(uf(r)||UP(r)||s2(r)&&(r.initializer===t||r.incrementor===t))return!0;if(C7(r)){if(t!==va(r.elements))return!0;t=r;continue}if(ur(r)&&r.operatorToken.kind===28){if(t===r.left)return!0;t=r;continue}return!1}}function a7(t){return Ft(XJ,r=>t.includes(r))}function ZDe(t){if(!t.parent)return;switch(t.kind){case 168:const{parent:a}=t;return a.kind===195?void 0:a.typeParameters;case 169:return t.parent.parameters;case 204:return t.parent.templateSpans;case 239:return t.parent.templateSpans;case 170:{const{parent:u}=t;return uD(u)?u.modifiers:void 0}case 298:return t.parent.heritageClauses}const{parent:r}=t;if(V6(t))return OI(t.parent)?void 0:t.parent.tags;switch(r.kind){case 187:case 264:return OT(t)?r.members:void 0;case 192:case 193:return r.types;case 189:case 209:case 355:case 275:case 279:return r.elements;case 210:case 292:return r.properties;case 213:case 214:return ws(t)?r.typeArguments:r.expression===t?void 0:r.arguments;case 284:case 288:return JW(t)?r.children:void 0;case 286:case 285:return ws(t)?r.typeArguments:void 0;case 241:case 296:case 297:case 268:return r.statements;case 269:return r.clauses;case 263:case 231:return Od(t)?r.members:void 0;case 266:return SS(t)?r.members:void 0;case 307:return r.statements}}function eX(t){if(!t.typeParameters){if(Ft(t.parameters,r=>!dd(r)))return!0;if(t.kind!==219){const r=Ra(t.parameters);if(!(r&&JT(r)))return!0}}return!1}function c7(t){return t==="Infinity"||t==="-Infinity"||t==="NaN"}function YDe(t){return t.kind===260&&t.parent.kind===299}function lx(t){return t.kind===218||t.kind===219}function YT(t){return t.replace(/\$/g,()=>"\\$")}function $v(t){return(+t).toString()===t}function tX(t,r,a,u,h){const p=h&&t==="new";return!p&&J_(t,r)?G.createIdentifier(t):!u&&!p&&$v(t)&&+t>=0?G.createNumericLiteral(+t):G.createStringLiteral(t,!!a)}function l7(t){return!!(t.flags&262144&&t.isThisType)}function iX(t){let r=0,a=0,u=0,h=0,p;(T=>{T[T.BeforeNodeModules=0]="BeforeNodeModules",T[T.NodeModules=1]="NodeModules",T[T.Scope=2]="Scope",T[T.PackageContent=3]="PackageContent"})(p||(p={}));let g=0,C=0,b=0;for(;C>=0;)switch(g=C,C=t.indexOf("/",g+1),b){case 0:t.indexOf(Xv,g)===g&&(r=g,a=C,b=1);break;case 1:case 2:b===1&&t.charAt(g+1)==="@"?b=2:(u=C,b=3);break;case 3:t.indexOf(Xv,g)===g?b=1:b=3;break}return h=g,b>1?{topLevelNodeModulesIndex:r,topLevelPackageNameIndex:a,packageRootIndex:u,fileNameIndex:h}:void 0}function NP(t){switch(t.kind){case 168:case 263:case 264:case 265:case 266:case 346:case 338:case 340:return!0;case 273:return t.isTypeOnly;case 276:case 281:return t.parent.parent.isTypeOnly;default:return!1}}function eH(t){return sD(t)||Lu(t)||Wu(t)||hd(t)||zf(t)||NP(t)||rd(t)&&!BT(t)&&!Ry(t)}function tH(t){if(!g8(t))return!1;const{isBracketed:r,typeExpression:a}=t;return r||!!a&&a.type.kind===316}function Gce(t,r){if(t.length===0)return!1;const a=t.charCodeAt(0);return a===35?t.length>1&&Py(t.charCodeAt(1),r):Py(a,r)}function eEe(t){var r;return((r=rle(t))==null?void 0:r.kind)===0}function nX(t){return nr(t)&&(t.type&&t.type.kind===316||M6(t).some(tH))}function g3(t){switch(t.kind){case 172:case 171:return!!t.questionToken;case 169:return!!t.questionToken||nX(t);case 348:case 341:return tH(t);default:return!1}}function tEe(t){const r=t.kind;return(r===211||r===212)&&$P(t.expression)}function Kce(t){return nr(t)&&c_(t)&&jp(t)&&!!Goe(t)}function Xce(t){return j.checkDefined(rX(t))}function rX(t){const r=Goe(t);return r&&r.typeExpression&&r.typeExpression.type}function u7(t){return ot(t)?t.escapedText:LP(t)}function iH(t){return ot(t)?Fr(t):d7(t)}function iEe(t){const r=t.kind;return r===80||r===295}function LP(t){return`${t.namespace.escapedText}:${Fr(t.name)}`}function d7(t){return`${Fr(t.namespace)}:${Fr(t.name)}`}function Qce(t){return ot(t)?Fr(t):d7(t)}function Jm(t){return!!(t.flags&8576)}function Gm(t){return t.flags&8192?t.escapedName:t.flags&384?cu(""+t.value):j.fail()}function PP(t){return!!t&&(Nr(t)||wl(t)||ur(t))}function nEe(t){return t===void 0?!1:!!z3(t.attributes)}var K6t=String.prototype.replace;function xI(t,r){return K6t.call(t,"*",r)}function sX(t){return ot(t.name)?t.name.escapedText:cu(t.name.text)}function rEe(t){switch(t.kind){case 168:case 169:case 172:case 171:case 185:case 184:case 179:case 180:case 181:case 174:case 173:case 175:case 176:case 177:case 178:case 183:case 182:case 186:case 187:case 188:case 189:case 192:case 193:case 196:case 190:case 191:case 197:case 198:case 194:case 195:case 203:case 205:case 202:case 328:case 329:case 346:case 338:case 340:case 345:case 344:case 324:case 325:case 326:case 341:case 348:case 317:case 315:case 314:case 312:case 313:case 322:case 318:case 309:case 333:case 335:case 334:case 350:case 343:case 199:case 200:case 262:case 241:case 268:case 243:case 244:case 245:case 246:case 247:case 248:case 249:case 250:case 251:case 252:case 253:case 254:case 255:case 256:case 257:case 258:case 260:case 208:case 263:case 264:case 265:case 266:case 267:case 272:case 271:case 278:case 277:case 242:case 259:case 282:return!0}return!1}function Rd(t,r=!1,a=!1,u=!1){return{value:t,isSyntacticallyString:r,resolvedOtherFiles:a,hasExternalReferences:u}}function sEe({evaluateElementAccessExpression:t,evaluateEntityNameExpression:r}){function a(h,p){let g=!1,C=!1,b=!1;switch(h=Dc(h),h.kind){case 224:const T=a(h.operand,p);if(C=T.resolvedOtherFiles,b=T.hasExternalReferences,typeof T.value=="number")switch(h.operator){case 40:return Rd(T.value,g,C,b);case 41:return Rd(-T.value,g,C,b);case 55:return Rd(~T.value,g,C,b)}break;case 226:{const E=a(h.left,p),N=a(h.right,p);if(g=(E.isSyntacticallyString||N.isSyntacticallyString)&&h.operatorToken.kind===40,C=E.resolvedOtherFiles||N.resolvedOtherFiles,b=E.hasExternalReferences||N.hasExternalReferences,typeof E.value=="number"&&typeof N.value=="number")switch(h.operatorToken.kind){case 52:return Rd(E.value|N.value,g,C,b);case 51:return Rd(E.value&N.value,g,C,b);case 49:return Rd(E.value>>N.value,g,C,b);case 50:return Rd(E.value>>>N.value,g,C,b);case 48:return Rd(E.value<<N.value,g,C,b);case 53:return Rd(E.value^N.value,g,C,b);case 42:return Rd(E.value*N.value,g,C,b);case 44:return Rd(E.value/N.value,g,C,b);case 40:return Rd(E.value+N.value,g,C,b);case 41:return Rd(E.value-N.value,g,C,b);case 45:return Rd(E.value%N.value,g,C,b);case 43:return Rd(E.value**N.value,g,C,b)}else if((typeof E.value=="string"||typeof E.value=="number")&&(typeof N.value=="string"||typeof N.value=="number")&&h.operatorToken.kind===40)return Rd(""+E.value+N.value,g,C,b);break}case 11:case 15:return Rd(h.text,!0);case 228:return u(h,p);case 9:return Rd(+h.text);case 80:return r(h,p);case 211:if(pl(h))return r(h,p);break;case 212:return t(h,p)}return Rd(void 0,g,C,b)}function u(h,p){let g=h.head.text,C=!1,b=!1;for(const T of h.templateSpans){const E=a(T.expression,p);if(E.value===void 0)return Rd(void 0,!0);g+=E.value,g+=T.literal.text,C||(C=E.resolvedOtherFiles),b||(b=E.hasExternalReferences)}return Rd(g,!0,C,b)}return a}function Zce(t){return Hk(t)&&O0(t.type)||D7(t)&&O0(t.typeExpression)}function nH(t){const r=t.members;for(const a of r)if(a.kind===176&&Dg(a.body))return a}function Yce({compilerOptions:t,requireSymbol:r,argumentsSymbol:a,error:u,getSymbolOfDeclaration:h,globals:p,lookup:g,setRequiresScopeChangeCache:C=IT,getRequiresScopeChangeCache:b=IT,onPropertyWithInvalidInitializer:T=w1,onFailedToResolveSymbol:E=IT,onSuccessfullyResolvedSymbol:N=IT}){var R=t.verbatimModuleSyntax?"verbatimModuleSyntax":"isolatedModules",F=Pce(t),H=_a();return U;function U(re,oe,pe,de,ue,Ie){var we,he,Ae;const ke=re;let Te,De,qe,se,Ne,Oe=!1,He;const Pe=Oo(oe)?oe:oe.escapedText;e:for(;re;){if(Pe==="const"&&Zce(re))return;if(qW(re)&&De&&re.name===De&&(De=re,re=re.parent),Ay(re)&&re.locals&&!cS(re)&&(Te=g(re.locals,Pe,pe))){let We=!0;if(Ho(re)&&De&&De!==re.body?(pe&Te.flags&788968&&De.kind!==320&&(We=Te.flags&262144?!!(De.flags&16)||De===re.type||De.kind===169||De.kind===341||De.kind===342||De.kind===168:!1),pe&Te.flags&3&&(q(Te,re,De)?We=!1:Te.flags&1&&(We=De.kind===169||!!(De.flags&16)||De===re.type&&!!Qi(Te.valueDeclaration,$s)))):re.kind===194&&(We=De===re.trueType),We)break e;Te=void 0}switch(Oe=Oe||X(re,De),re.kind){case 307:if(!Cp(re))break;case 267:const We=((we=h(re))==null?void 0:we.exports)||H;if(re.kind===307||rd(re)&&re.flags&33554432&&!Ry(re)){if(Te=We.get("default")){const $e=$8(Te);if($e&&Te.flags&pe&&$e.escapedName===Pe)break e;Te=void 0}const Nt=We.get(Pe);if(Nt&&Nt.flags===2097152&&(ql(Nt,281)||ql(Nt,280)))break}if(Pe!=="default"&&(Te=g(We,Pe,pe&2623475)))if(Os(re)&&re.commonJsModuleIndicator&&!((he=Te.declarations)!=null&&he.some(Ng)))Te=void 0;else break e;break;case 266:if(Te=g(((Ae=h(re))==null?void 0:Ae.exports)||H,Pe,pe&8)){de&&Ag(t)&&!(re.flags&33554432)&&_n(re)!==_n(Te.valueDeclaration)&&u(ke,k.Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead,Ws(Pe),R,`${Ws(h(re).escapedName)}.${Ws(Pe)}`);break e}break;case 172:if(!pa(re)){const Nt=nH(re.parent);Nt&&Nt.locals&&g(Nt.locals,Pe,pe&111551)&&(j.assertNode(re,Lo),se=re)}break;case 263:case 231:case 264:if(Te=g(h(re).members||H,Pe,pe&788968)){if(!Q(Te,re)){Te=void 0;break}if(De&&pa(De)){de&&u(ke,k.Static_members_cannot_reference_class_type_parameters);return}break e}if(fd(re)&&pe&32){const Nt=re.name;if(Nt&&Pe===Nt.escapedText){Te=re.symbol;break e}}break;case 233:if(De===re.expression&&re.parent.token===96){const Nt=re.parent.parent;if(ss(Nt)&&(Te=g(h(Nt).members,Pe,pe&788968))){de&&u(ke,k.Base_class_expressions_cannot_reference_class_type_parameters);return}}break;case 167:if(He=re.parent.parent,(ss(He)||He.kind===264)&&(Te=g(h(He).members,Pe,pe&788968))){de&&u(ke,k.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type);return}break;case 219:if(Ja(t)>=2)break;case 174:case 176:case 177:case 178:case 262:if(pe&3&&Pe==="arguments"){Te=a;break e}break;case 218:if(pe&3&&Pe==="arguments"){Te=a;break e}if(pe&16){const Nt=re.name;if(Nt&&Pe===Nt.escapedText){Te=re.symbol;break e}}break;case 170:re.parent&&re.parent.kind===169&&(re=re.parent),re.parent&&(Od(re.parent)||re.parent.kind===263)&&(re=re.parent);break;case 346:case 338:case 340:case 351:const ze=t3(re);ze&&(re=ze.parent);break;case 169:De&&(De===re.initializer||De===re.name&&ta(De))&&(Ne||(Ne=re));break;case 208:De&&(De===re.initializer||De===re.name&&ta(De))&&Qk(re)&&!Ne&&(Ne=re);break;case 195:if(pe&262144){const Nt=re.typeParameter.name;if(Nt&&Pe===Nt.escapedText){Te=re.typeParameter.symbol;break e}}break;case 281:De&&De===re.propertyName&&re.parent.parent.moduleSpecifier&&(re=re.parent.parent.parent);break}Z(re,De)&&(qe=re),De=re,re=Rg(re)?rK(re)||re.parent:(Qm(re)||IX(re))&&Jk(re)||re.parent}if(ue&&Te&&(!qe||Te!==qe.symbol)&&(Te.isReferenced|=pe),!Te){if(De&&(j.assertNode(De,Os),De.commonJsModuleIndicator&&Pe==="exports"&&pe&De.symbol.flags))return De.symbol;Ie||(Te=g(p,Pe,pe))}if(!Te&&ke&&nr(ke)&&ke.parent&&L_(ke.parent,!1))return r;if(de){if(se&&T(ke,Pe,se,Te))return;Te?N(ke,Te,pe,De,Ne,Oe):E(ke,oe,pe,de)}return Te}function q(re,oe,pe){const de=Ja(t),ue=oe;if($s(pe)&&ue.body&&re.valueDeclaration&&re.valueDeclaration.pos>=ue.body.pos&&re.valueDeclaration.end<=ue.body.end&&de>=2){let he=b(ue);return he===void 0&&(he=O(ue.parameters,Ie)||!1,C(ue,he)),!he}return!1;function Ie(he){return we(he.name)||!!he.initializer&&we(he.initializer)}function we(he){switch(he.kind){case 219:case 218:case 262:case 176:return!1;case 174:case 177:case 178:case 303:return we(he.name);case 172:return bd(he)?!F:we(he.name);default:return Xoe(he)||gh(he)?de<7:ec(he)&&he.dotDotDotToken&&dm(he.parent)?de<4:ws(he)?!1:Uo(he,we)||!1}}}function X(re,oe){return re.kind!==219&&re.kind!==218?tD(re)||(Qc(re)||re.kind===172&&!pa(re))&&(!oe||oe!==re.name):oe&&oe===re.name?!1:re.asteriskToken||Zr(re,1024)?!0:!VT(re)}function Z(re,oe){switch(re.kind){case 169:return!!oe&&oe===re.name;case 262:case 263:case 264:case 266:case 265:case 267:return!0;default:return!1}}function Q(re,oe){if(re.declarations){for(const pe of re.declarations)if(pe.kind===168&&(Rg(pe.parent)?zT(pe.parent):pe.parent)===oe)return!(Rg(pe.parent)&&Fe(pe.parent.parent.tags,Ng))}return!1}}function oX(t,r=!0){switch(j.type(t),t.kind){case 112:case 97:case 9:case 11:case 15:return!0;case 10:return r;case 224:return t.operator===41?A_(t.operand)||r&&p7(t.operand):t.operator===40?A_(t.operand):!1;default:return!1}}function oEe(t){for(;t.kind===217;)t=t.expression;return t}function aEe(t){switch(j.type(t),t.kind){case 169:case 171:case 172:case 208:case 211:case 212:case 226:case 260:case 277:case 303:return!0;default:return!1}}function ele(t){const r=Qi(t,du);return!!r&&!r.importClause}function cEe(){let t,r,a,u,h;return{createBaseSourceFileNode:p,createBaseIdentifierNode:g,createBasePrivateIdentifierNode:C,createBaseTokenNode:b,createBaseNode:T};function p(E){return new(h||(h=Hf.getSourceFileConstructor()))(E,-1,-1)}function g(E){return new(a||(a=Hf.getIdentifierConstructor()))(E,-1,-1)}function C(E){return new(u||(u=Hf.getPrivateIdentifierConstructor()))(E,-1,-1)}function b(E){return new(r||(r=Hf.getTokenConstructor()))(E,-1,-1)}function T(E){return new(t||(t=Hf.getNodeConstructor()))(E,-1,-1)}}function lEe(t){let r,a;return{getParenthesizeLeftSideOfBinaryForOperator:u,getParenthesizeRightSideOfBinaryForOperator:h,parenthesizeLeftSideOfBinary:T,parenthesizeRightSideOfBinary:E,parenthesizeExpressionOfComputedPropertyName:N,parenthesizeConditionOfConditionalExpression:R,parenthesizeBranchOfConditionalExpression:F,parenthesizeExpressionOfExportDefault:H,parenthesizeExpressionOfNew:U,parenthesizeLeftSideOfAccess:q,parenthesizeOperandOfPostfixUnary:X,parenthesizeOperandOfPrefixUnary:Z,parenthesizeExpressionsOfCommaDelimitedList:Q,parenthesizeExpressionForDisallowedComma:re,parenthesizeExpressionOfExpressionStatement:oe,parenthesizeConciseBodyOfArrowFunction:pe,parenthesizeCheckTypeOfConditionalType:de,parenthesizeExtendsTypeOfConditionalType:ue,parenthesizeConstituentTypesOfUnionType:we,parenthesizeConstituentTypeOfUnionType:Ie,parenthesizeConstituentTypesOfIntersectionType:Ae,parenthesizeConstituentTypeOfIntersectionType:he,parenthesizeOperandOfTypeOperator:ke,parenthesizeOperandOfReadonlyTypeOperator:Te,parenthesizeNonArrayTypeOfPostfixType:De,parenthesizeElementTypesOfTupleType:qe,parenthesizeElementTypeOfTupleType:se,parenthesizeTypeOfOptionalType:Oe,parenthesizeTypeArguments:We,parenthesizeLeadingTypeArgument:He};function u(ze){r||(r=new Map);let Nt=r.get(ze);return Nt||(Nt=$e=>T(ze,$e),r.set(ze,Nt)),Nt}function h(ze){a||(a=new Map);let Nt=a.get(ze);return Nt||(Nt=$e=>E(ze,void 0,$e),a.set(ze,Nt)),Nt}function p(ze,Nt,$e,et){const Me=PV(226,ze),ut=ice(226,ze),wt=l0(Nt);if(!$e&&Nt.kind===219&&Me>3)return!0;const Et=H8(wt);switch(_l(Et,Me)){case-1:return!(!$e&&ut===1&&Nt.kind===229);case 1:return!1;case 0:if($e)return ut===1;if(ur(wt)&&wt.operatorToken.kind===ze){if(g(ze))return!1;if(ze===40){const zt=et?C(et):0;if(y8(zt)&&zt===C(wt))return!1}}return tce(wt)===0}}function g(ze){return ze===42||ze===52||ze===51||ze===53||ze===28}function C(ze){if(ze=l0(ze),y8(ze.kind))return ze.kind;if(ze.kind===226&&ze.operatorToken.kind===40){if(ze.cachedLiteralKind!==void 0)return ze.cachedLiteralKind;const Nt=C(ze.left),$e=y8(Nt)&&Nt===C(ze.right)?Nt:0;return ze.cachedLiteralKind=$e,$e}return 0}function b(ze,Nt,$e,et){return l0(Nt).kind===217?Nt:p(ze,Nt,$e,et)?t.createParenthesizedExpression(Nt):Nt}function T(ze,Nt){return b(ze,Nt,!0)}function E(ze,Nt,$e){return b(ze,$e,!1,Nt)}function N(ze){return I7(ze)?t.createParenthesizedExpression(ze):ze}function R(ze){const Nt=PV(227,58),$e=l0(ze),et=H8($e);return _l(et,Nt)!==1?t.createParenthesizedExpression(ze):ze}function F(ze){const Nt=l0(ze);return I7(Nt)?t.createParenthesizedExpression(ze):ze}function H(ze){const Nt=l0(ze);let $e=I7(Nt);if(!$e)switch(d3(Nt,!1).kind){case 231:case 218:$e=!0}return $e?t.createParenthesizedExpression(ze):ze}function U(ze){const Nt=d3(ze,!0);switch(Nt.kind){case 213:return t.createParenthesizedExpression(ze);case 214:return Nt.arguments?ze:t.createParenthesizedExpression(ze)}return q(ze)}function q(ze,Nt){const $e=l0(ze);return N_($e)&&($e.kind!==214||$e.arguments)&&(Nt||!gh($e))?ze:Ht(t.createParenthesizedExpression(ze),ze)}function X(ze){return N_(ze)?ze:Ht(t.createParenthesizedExpression(ze),ze)}function Z(ze){return oae(ze)?ze:Ht(t.createParenthesizedExpression(ze),ze)}function Q(ze){const Nt=Wr(ze,re);return Ht(t.createNodeArray(Nt,ze.hasTrailingComma),ze)}function re(ze){const Nt=l0(ze),$e=H8(Nt),et=PV(226,28);return $e>et?ze:Ht(t.createParenthesizedExpression(ze),ze)}function oe(ze){const Nt=l0(ze);if(la(Nt)){const et=Nt.expression,Me=l0(et).kind;if(Me===218||Me===219){const ut=t.updateCallExpression(Nt,Ht(t.createParenthesizedExpression(et),et),Nt.typeArguments,Nt.arguments);return t.restoreOuterExpressions(ze,ut,8)}}const $e=d3(Nt,!1).kind;return $e===210||$e===218?Ht(t.createParenthesizedExpression(ze),ze):ze}function pe(ze){return!Xo(ze)&&(I7(ze)||d3(ze,!1).kind===210)?Ht(t.createParenthesizedExpression(ze),ze):ze}function de(ze){switch(ze.kind){case 184:case 185:case 194:return t.createParenthesizedType(ze)}return ze}function ue(ze){switch(ze.kind){case 194:return t.createParenthesizedType(ze)}return ze}function Ie(ze){switch(ze.kind){case 192:case 193:return t.createParenthesizedType(ze)}return de(ze)}function we(ze){return t.createNodeArray(Wr(ze,Ie))}function he(ze){switch(ze.kind){case 192:case 193:return t.createParenthesizedType(ze)}return Ie(ze)}function Ae(ze){return t.createNodeArray(Wr(ze,he))}function ke(ze){switch(ze.kind){case 193:return t.createParenthesizedType(ze)}return he(ze)}function Te(ze){switch(ze.kind){case 198:return t.createParenthesizedType(ze)}return ke(ze)}function De(ze){switch(ze.kind){case 195:case 198:case 186:return t.createParenthesizedType(ze)}return ke(ze)}function qe(ze){return t.createNodeArray(Wr(ze,se))}function se(ze){return Ne(ze)?t.createParenthesizedType(ze):ze}function Ne(ze){return k3(ze)?ze.postfix:b3(ze)||Hy(ze)||v3(ze)||t2(ze)?Ne(ze.type):iD(ze)?Ne(ze.falseType):fx(ze)||zP(ze)?Ne(va(ze.types)):DI(ze)?!!ze.typeParameter.constraint&&Ne(ze.typeParameter.constraint):!1}function Oe(ze){return Ne(ze)?t.createParenthesizedType(ze):De(ze)}function He(ze){return T2e(ze)&&ze.typeParameters?t.createParenthesizedType(ze):ze}function Pe(ze,Nt){return Nt===0?He(ze):ze}function We(ze){if(Ft(ze))return t.createNodeArray(Wr(ze,Pe))}}var uEe={getParenthesizeLeftSideOfBinaryForOperator:t=>hl,getParenthesizeRightSideOfBinaryForOperator:t=>hl,parenthesizeLeftSideOfBinary:(t,r)=>r,parenthesizeRightSideOfBinary:(t,r,a)=>a,parenthesizeExpressionOfComputedPropertyName:hl,parenthesizeConditionOfConditionalExpression:hl,parenthesizeBranchOfConditionalExpression:hl,parenthesizeExpressionOfExportDefault:hl,parenthesizeExpressionOfNew:t=>ha(t,N_),parenthesizeLeftSideOfAccess:t=>ha(t,N_),parenthesizeOperandOfPostfixUnary:t=>ha(t,N_),parenthesizeOperandOfPrefixUnary:t=>ha(t,oae),parenthesizeExpressionsOfCommaDelimitedList:t=>ha(t,AT),parenthesizeExpressionForDisallowedComma:hl,parenthesizeExpressionOfExpressionStatement:hl,parenthesizeConciseBodyOfArrowFunction:hl,parenthesizeCheckTypeOfConditionalType:hl,parenthesizeExtendsTypeOfConditionalType:hl,parenthesizeConstituentTypesOfUnionType:t=>ha(t,AT),parenthesizeConstituentTypeOfUnionType:hl,parenthesizeConstituentTypesOfIntersectionType:t=>ha(t,AT),parenthesizeConstituentTypeOfIntersectionType:hl,parenthesizeOperandOfTypeOperator:hl,parenthesizeOperandOfReadonlyTypeOperator:hl,parenthesizeNonArrayTypeOfPostfixType:hl,parenthesizeElementTypesOfTupleType:t=>ha(t,AT),parenthesizeElementTypeOfTupleType:hl,parenthesizeTypeOfOptionalType:hl,parenthesizeTypeArguments:t=>t&&ha(t,AT),parenthesizeLeadingTypeArgument:hl};function dEe(t){return{convertToFunctionBlock:r,convertToFunctionExpression:a,convertToClassExpression:u,convertToArrayAssignmentElement:h,convertToObjectAssignmentElement:p,convertToAssignmentPattern:g,convertToObjectAssignmentPattern:C,convertToArrayAssignmentPattern:b,convertToAssignmentElementTarget:T};function r(E,N){if(Xo(E))return E;const R=t.createReturnStatement(E);Ht(R,E);const F=t.createBlock([R],N);return Ht(F,E),F}function a(E){var N;if(!E.body)return j.fail("Cannot convert a FunctionDeclaration without a body");const R=t.createFunctionExpression((N=PT(E))==null?void 0:N.filter(F=>!BP(F)&&!yX(F)),E.asteriskToken,E.name,E.typeParameters,E.parameters,E.type,E.body);return Ir(R,E),Ht(R,E),f7(E)&&lX(R,!0),R}function u(E){var N;const R=t.createClassExpression((N=E.modifiers)==null?void 0:N.filter(F=>!BP(F)&&!yX(F)),E.name,E.typeParameters,E.heritageClauses,E.members);return Ir(R,E),Ht(R,E),f7(E)&&lX(R,!0),R}function h(E){if(ec(E)){if(E.dotDotDotToken)return j.assertNode(E.name,ot),Ir(Ht(t.createSpreadElement(E.name),E),E);const N=T(E.name);return E.initializer?Ir(Ht(t.createAssignment(N,E.initializer),E),E):N}return ha(E,jt)}function p(E){if(ec(E)){if(E.dotDotDotToken)return j.assertNode(E.name,ot),Ir(Ht(t.createSpreadAssignment(E.name),E),E);if(E.propertyName){const N=T(E.name);return Ir(Ht(t.createPropertyAssignment(E.propertyName,E.initializer?t.createAssignment(N,E.initializer):N),E),E)}return j.assertNode(E.name,ot),Ir(Ht(t.createShorthandPropertyAssignment(E.name,E.initializer),E),E)}return ha(E,Ub)}function g(E){switch(E.kind){case 207:case 209:return b(E);case 206:case 210:return C(E)}}function C(E){return dm(E)?Ir(Ht(t.createObjectLiteralExpression(qt(E.elements,p)),E),E):ha(E,Aa)}function b(E){return CS(E)?Ir(Ht(t.createArrayLiteralExpression(qt(E.elements,h)),E),E):ha(E,jf)}function T(E){return ta(E)?g(E):ha(E,jt)}}var fEe={convertToFunctionBlock:wa,convertToFunctionExpression:wa,convertToClassExpression:wa,convertToArrayAssignmentElement:wa,convertToObjectAssignmentElement:wa,convertToAssignmentPattern:wa,convertToObjectAssignmentPattern:wa,convertToArrayAssignmentPattern:wa,convertToAssignmentElementTarget:wa},tle=0,hEe=(t=>(t[t.None=0]="None",t[t.NoParenthesizerRules=1]="NoParenthesizerRules",t[t.NoNodeConverters=2]="NoNodeConverters",t[t.NoIndentationOnFreshPropertyAccess=4]="NoIndentationOnFreshPropertyAccess",t[t.NoOriginalNode=8]="NoOriginalNode",t))(hEe||{}),gQe=[];function yQe(t){gQe.push(t)}function rH(t,r){const a=t&8?hl:Ir,u=Bh(()=>t&1?uEe:lEe(X)),h=Bh(()=>t&2?fEe:dEe(X)),p=x1(A=>($,ie)=>Wn($,A,ie)),g=x1(A=>$=>Ot(A,$)),C=x1(A=>$=>Ci($,A)),b=x1(A=>()=>Vo(A)),T=x1(A=>$=>NA(A,$)),E=x1(A=>($,ie)=>rr(A,$,ie)),N=x1(A=>($,ie)=>HS(A,$,ie)),R=x1(A=>($,ie)=>P2(A,$,ie)),F=x1(A=>($,ie)=>Eh(A,$,ie)),H=x1(A=>($,ie,Ee)=>rp(A,$,ie,Ee)),U=x1(A=>($,ie,Ee)=>LA(A,$,ie,Ee)),q=x1(A=>($,ie,Ee,ht)=>ey(A,$,ie,Ee,ht)),X={get parenthesizer(){return u()},get converters(){return h()},baseFactory:r,flags:t,createNodeArray:Z,createNumericLiteral:pe,createBigIntLiteral:de,createStringLiteral:Ie,createStringLiteralFromNode:we,createRegularExpressionLiteral:he,createLiteralLikeNode:Ae,createIdentifier:De,createTempVariable:qe,createLoopVariable:se,createUniqueName:Ne,getGeneratedNameForNode:Oe,createPrivateIdentifier:Pe,createUniquePrivateName:ze,getGeneratedPrivateNameForNode:Nt,createToken:et,createSuper:Me,createThis:ut,createNull:wt,createTrue:Et,createFalse:dt,createModifier:zt,createModifiersFromModifierFlags:Ei,createQualifiedName:tn,updateQualifiedName:xn,createComputedPropertyName:Pn,updateComputedPropertyName:_i,createTypeParameterDeclaration:Fi,updateTypeParameterDeclaration:On,createParameterDeclaration:pn,updateParameterDeclaration:qr,createDecorator:Fs,updateDecorator:ko,createPropertySignature:ls,updatePropertySignature:Qs,createPropertyDeclaration:Zs,updatePropertyDeclaration:at,createMethodSignature:yi,updateMethodSignature:Sn,createMethodDeclaration:dr,updateMethodDeclaration:us,createConstructorDeclaration:Ji,updateConstructorDeclaration:ac,createGetAccessorDeclaration:ri,updateGetAccessorDeclaration:xe,createSetAccessorDeclaration:Se,updateSetAccessorDeclaration:Ze,createCallSignature:Dt,updateCallSignature:Je,createConstructSignature:Rt,updateConstructSignature:Ct,createIndexSignature:ii,updateIndexSignature:vt,createClassStaticBlockDeclaration:Gs,updateClassStaticBlockDeclaration:ma,createTemplateLiteralTypeSpan:Ni,updateTemplateLiteralTypeSpan:ji,createKeywordTypeNode:gr,createTypePredicateNode:te,updateTypePredicateNode:tt,createTypeReferenceNode:Gt,updateTypeReferenceNode:le,createFunctionTypeNode:Ue,updateFunctionTypeNode:be,createConstructorTypeNode:lt,updateConstructorTypeNode:vn,createTypeQueryNode:Pt,updateTypeQueryNode:Bt,createTypeLiteralNode:fi,updateTypeLiteralNode:wi,createArrayTypeNode:Ri,updateArrayTypeNode:Ai,createTupleTypeNode:Xn,updateTupleTypeNode:Di,createNamedTupleMember:on,updateNamedTupleMember:zi,createOptionalTypeNode:cn,updateOptionalTypeNode:vi,createRestTypeNode:qo,updateRestTypeNode:Wo,createUnionTypeNode:vu,updateUnionTypeNode:Gu,createIntersectionTypeNode:Zc,updateIntersectionTypeNode:Ls,createConditionalTypeNode:ja,updateConditionalTypeNode:wf,createInferTypeNode:Jo,updateInferTypeNode:kh,createImportTypeNode:pc,updateImportTypeNode:mc,createParenthesizedType:oo,updateParenthesizedType:tc,createThisTypeNode:ki,createTypeOperatorNode:Gc,updateTypeOperatorNode:uh,createIndexedAccessTypeNode:sd,updateIndexedAccessTypeNode:Pp,createMappedTypeNode:Nl,updateMappedTypeNode:Ve,createLiteralTypeNode:_e,updateLiteralTypeNode:Lt,createTemplateLiteralType:md,updateTemplateLiteralType:go,createObjectBindingPattern:ci,updateObjectBindingPattern:Mi,createArrayBindingPattern:Rn,updateArrayBindingPattern:Yr,createBindingElement:Xi,updateBindingElement:Mr,createArrayLiteralExpression:ds,updateArrayLiteralExpression:Ks,createObjectLiteralExpression:Ic,updateObjectLiteralExpression:Gl,createPropertyAccessExpression:t&4?(A,$)=>tr(Ku(A,$),262144):Ku,updatePropertyAccessExpression:Xu,createPropertyAccessChain:t&4?(A,$,ie)=>tr(Wl(A,$,ie),262144):Wl,updatePropertyAccessChain:Cu,createElementAccessExpression:Qu,updateElementAccessExpression:kd,createElementAccessChain:eg,updateElementAccessChain:Ye,createCallExpression:En,updateCallExpression:po,createCallChain:ic,updateCallChain:sc,createNewExpression:Hu,updateNewExpression:Hd,createTaggedTemplateExpression:Yc,updateTaggedTemplateExpression:Pc,createTypeAssertion:od,updateTypeAssertion:Ap,createParenthesizedExpression:Vg,updateParenthesizedExpression:Y_,createFunctionExpression:Jp,updateFunctionExpression:ym,createArrowFunction:tg,updateArrowFunction:Zv,createDeleteExpression:Hg,updateDeleteExpression:F_,createTypeOfExpression:jd,updateTypeOfExpression:lC,createVoidExpression:h_,updateVoidExpression:Yv,createAwaitExpression:vm,updateAwaitExpression:ve,createPrefixUnaryExpression:Ot,updatePrefixUnaryExpression:mi,createPostfixUnaryExpression:Ci,updatePostfixUnaryExpression:hn,createBinaryExpression:Wn,updateBinaryExpression:ps,createConditionalExpression:ee,updateConditionalExpression:Xe,createTemplateExpression:Zt,updateTemplateExpression:Nn,createTemplateHead:Xa,createTemplateMiddle:Yl,createTemplateTail:ig,createNoSubstitutionTemplateLiteral:h0,createTemplateLiteralLikeNode:uc,createYieldExpression:K0,updateYieldExpression:eb,createSpreadElement:PS,updateSpreadElement:tb,createClassExpression:ng,updateClassExpression:rg,createOmittedExpression:Vl,createExpressionWithTypeArguments:Gp,updateExpressionWithTypeArguments:ep,createAsExpression:X0,updateAsExpression:ib,createNonNullExpression:jg,updateNonNullExpression:$y,createSatisfiesExpression:uC,updateSatisfiesExpression:AS,createNonNullChain:zg,updateNonNullChain:x2,createMetaProperty:bm,updateMetaProperty:Ug,createTemplateSpan:dC,updateTemplateSpan:k2,createSemicolonClassElement:Jy,createBlock:nb,updateBlock:T2,createVariableStatement:xx,updateVariableStatement:it,createEmptyStatement:yt,createExpressionStatement:ei,updateExpressionStatement:Pi,createIfStatement:nn,updateIfStatement:Vn,createDoStatement:mn,updateDoStatement:Pr,createWhileStatement:ks,updateWhileStatement:ar,createForStatement:Ns,updateForStatement:cr,createForInStatement:Go,updateForInStatement:ll,createForOfStatement:qh,updateForOfStatement:qg,createContinueStatement:$h,updateContinueStatement:$g,createBreakStatement:Jh,updateBreakStatement:DD,createReturnStatement:kx,updateReturnStatement:rb,createWithStatement:fC,updateWithStatement:OS,createSwitchStatement:_0,updateSwitchStatement:MS,createLabeledStatement:Tx,updateLabeledStatement:Dx,createThrowStatement:Ex,updateThrowStatement:ZI,createTryStatement:D2,updateTryStatement:lc,createDebuggerStatement:ED,createVariableDeclaration:YI,updateVariableDeclaration:E2,createVariableDeclarationList:sb,updateVariableDeclarationList:ob,createFunctionDeclaration:Cm,updateFunctionDeclaration:Op,createClassDeclaration:tp,updateClassDeclaration:Ix,createInterfaceDeclaration:vO,updateInterfaceDeclaration:Xd,createTypeAliasDeclaration:Q0,updateTypeAliasDeclaration:RS,createEnumDeclaration:Gy,updateEnumDeclaration:kA,createModuleDeclaration:dh,updateModuleDeclaration:hC,createModuleBlock:ip,updateModuleBlock:I2,createCaseBlock:Q1,updateCaseBlock:ft,createNamespaceExportDeclaration:Z0,updateNamespaceExportDeclaration:Z1,createImportEqualsDeclaration:TA,updateImportEqualsDeclaration:_C,createImportDeclaration:FS,updateImportDeclaration:pC,createImportClause:DA,updateImportClause:$a,createAssertClause:p0,updateAssertClause:BS,createAssertEntry:L2,updateAssertEntry:Kp,createImportTypeAssertionContainer:ab,updateImportTypeAssertionContainer:Y0,createImportAttributes:Ky,updateImportAttributes:EA,createImportAttribute:Nx,updateImportAttribute:Jg,createNamespaceImport:IA,updateNamespaceImport:WS,createNamespaceExport:Ys,updateNamespaceExport:yr,createNamedImports:ff,updateNamedImports:mC,createImportSpecifier:VS,updateImportSpecifier:eN,createExportAssignment:Lx,updateExportAssignment:tN,createExportDeclaration:Tl,updateExportDeclaration:gC,createNamedExports:sg,updateNamedExports:ND,createExportSpecifier:iN,updateExportSpecifier:bO,createMissingDeclaration:CO,createExternalModuleReference:vr,updateExternalModuleReference:fh,get createJSDocAllType(){return b(312)},get createJSDocUnknownType(){return b(313)},get createJSDocNonNullableType(){return N(315)},get updateJSDocNonNullableType(){return R(315)},get createJSDocNullableType(){return N(314)},get updateJSDocNullableType(){return R(314)},get createJSDocOptionalType(){return T(316)},get updateJSDocOptionalType(){return E(316)},get createJSDocVariadicType(){return T(318)},get updateJSDocVariadicType(){return E(318)},get createJSDocNamepathType(){return T(319)},get updateJSDocNamepathType(){return E(319)},createJSDocFunctionType:SO,updateJSDocFunctionType:nN,createJSDocTypeLiteral:Th,updateJSDocTypeLiteral:Dh,createJSDocTypeExpression:Xp,updateJSDocTypeExpression:A2,createJSDocSignature:rN,updateJSDocSignature:cb,createJSDocTemplateTag:jS,updateJSDocTemplateTag:zS,createJSDocTypedefTag:LD,updateJSDocTypedefTag:sN,createJSDocParameterTag:Px,updateJSDocParameterTag:oN,createJSDocPropertyTag:aN,updateJSDocPropertyTag:cN,createJSDocCallbackTag:e1,updateJSDocCallbackTag:wO,createJSDocOverloadTag:O2,updateJSDocOverloadTag:Ax,createJSDocAugmentsTag:lb,updateJSDocAugmentsTag:yC,createJSDocImplementsTag:m0,updateJSDocImplementsTag:xO,createJSDocSeeTag:US,updateJSDocSeeTag:lN,createJSDocImportTag:nu,updateJSDocImportTag:kO,createJSDocNameReference:Qd,updateJSDocNameReference:uN,createJSDocMemberName:Xy,updateJSDocMemberName:dN,createJSDocLink:M2,updateJSDocLink:vC,createJSDocLinkCode:Ox,updateJSDocLinkCode:PD,createJSDocLinkPlain:Zu,updateJSDocLinkPlain:$f,get createJSDocTypeTag(){return U(344)},get updateJSDocTypeTag(){return q(344)},get createJSDocReturnTag(){return U(342)},get updateJSDocReturnTag(){return q(342)},get createJSDocThisTag(){return U(343)},get updateJSDocThisTag(){return q(343)},get createJSDocAuthorTag(){return F(330)},get updateJSDocAuthorTag(){return H(330)},get createJSDocClassTag(){return F(332)},get updateJSDocClassTag(){return H(332)},get createJSDocPublicTag(){return F(333)},get updateJSDocPublicTag(){return H(333)},get createJSDocPrivateTag(){return F(334)},get updateJSDocPrivateTag(){return H(334)},get createJSDocProtectedTag(){return F(335)},get updateJSDocProtectedTag(){return H(335)},get createJSDocReadonlyTag(){return F(336)},get updateJSDocReadonlyTag(){return H(336)},get createJSDocOverrideTag(){return F(337)},get updateJSDocOverrideTag(){return H(337)},get createJSDocDeprecatedTag(){return F(331)},get updateJSDocDeprecatedTag(){return H(331)},get createJSDocThrowsTag(){return U(349)},get updateJSDocThrowsTag(){return q(349)},get createJSDocSatisfiesTag(){return U(350)},get updateJSDocSatisfiesTag(){return q(350)},createJSDocEnumTag:fN,updateJSDocEnumTag:L5,createJSDocUnknownTag:PA,updateJSDocUnknownTag:qS,createJSDocText:AA,updateJSDocText:Mx,createJSDocComment:hN,updateJSDocComment:B_,createJsxElement:AD,updateJsxElement:OA,createJsxSelfClosingElement:OD,updateJsxSelfClosingElement:sp,createJsxOpeningElement:MA,updateJsxOpeningElement:Rx,createJsxClosingElement:wm,updateJsxClosingElement:_N,createJsxFragment:Fx,createJsxText:MD,updateJsxText:pN,createJsxOpeningFragment:RA,createJsxJsxClosingFragment:$S,updateJsxFragment:P5,createJsxAttribute:__,updateJsxAttribute:ub,createJsxAttributes:db,updateJsxAttributes:TO,createJsxSpreadAttribute:wc,updateJsxSpreadAttribute:xr,createJsxExpression:p_,updateJsxExpression:Qp,createJsxNamespacedName:RD,updateJsxNamespacedName:DO,createCaseClause:FA,updateCaseClause:R2,createDefaultClause:FD,updateDefaultClause:BD,createHeritageClause:Gg,updateHeritageClause:Rp,createCatchClause:Fp,updateCatchClause:t1,createPropertyAssignment:Kg,updatePropertyAssignment:mN,createShorthandPropertyAssignment:BA,updateShorthandPropertyAssignment:V,createSpreadAssignment:Ut,updateSpreadAssignment:Wi,createEnumMember:gs,updateEnumMember:ao,createSourceFile:Co,updateSourceFile:JS,createRedirectedSourceFile:co,createBundle:Bp,updateBundle:WD,createSyntheticExpression:F2,createSyntaxList:VD,createNotEmittedStatement:WA,createPartiallyEmittedExpression:gN,updatePartiallyEmittedExpression:n1,createCommaListExpression:GS,updateCommaListExpression:VA,createSyntheticReferenceExpression:Bx,updateSyntheticReferenceExpression:A5,cloneNode:Hn,get createComma(){return p(28)},get createAssignment(){return p(64)},get createLogicalOr(){return p(57)},get createLogicalAnd(){return p(56)},get createBitwiseOr(){return p(52)},get createBitwiseXor(){return p(53)},get createBitwiseAnd(){return p(51)},get createStrictEquality(){return p(37)},get createStrictInequality(){return p(38)},get createEquality(){return p(35)},get createInequality(){return p(36)},get createLessThan(){return p(30)},get createLessThanEquals(){return p(33)},get createGreaterThan(){return p(32)},get createGreaterThanEquals(){return p(34)},get createLeftShift(){return p(48)},get createRightShift(){return p(49)},get createUnsignedRightShift(){return p(50)},get createAdd(){return p(40)},get createSubtract(){return p(41)},get createMultiply(){return p(42)},get createDivide(){return p(44)},get createModulo(){return p(45)},get createExponent(){return p(43)},get createPrefixPlus(){return g(40)},get createPrefixMinus(){return g(41)},get createPrefixIncrement(){return g(46)},get createPrefixDecrement(){return g(47)},get createBitwiseNot(){return g(55)},get createLogicalNot(){return g(54)},get createPostfixIncrement(){return C(46)},get createPostfixDecrement(){return C(47)},createImmediatelyInvokedFunctionExpression:O5,createImmediatelyInvokedArrowFunction:EO,createVoidZero:Wx,createExportDefault:IO,createExternalModuleExport:vz,createTypeCheck:M5,createIsNotTypeCheck:JY,createMethodCall:ty,createGlobalMethodCall:yN,createFunctionBindCall:GY,createFunctionCallCall:R5,createFunctionApplyCall:KY,createArraySliceCall:vN,createArrayConcatCall:bz,createObjectDefinePropertyCall:Vx,createObjectGetOwnPropertyDescriptorCall:g0,createReflectGetCall:NO,createReflectSetCall:Qy,createPropertyDescriptor:Cz,createCallBinding:Nc,createAssignmentTargetWrapper:fe,inlineExpressions:Ke,getInternalName:Xt,getLocalName:Si,getExportName:an,getDeclarationName:jr,getNamespaceMemberName:Hs,getExternalModuleOrNamespaceExportName:Cs,restoreOuterExpressions:Sz,restoreEnclosingLabel:Yu,createUseStrictPrologue:$c,copyPrologue:Ss,copyStandardPrologue:Jc,copyCustomPrologue:dc,ensureUseStrict:og,liftToBlock:Dd,mergeLexicalEnvironment:bC,replaceModifiers:hb,replaceDecoratorsAndModifiers:jx,replacePropertyName:XY};return O(gQe,A=>A(X)),X;function Z(A,$){if(A===void 0||A===w)A=[];else if(AT(A)){if($===void 0||A.hasTrailingComma===$)return A.transformFlags===void 0&&bQe(A),j.attachNodeArrayDebugInfo(A),A;const ht=A.slice();return ht.pos=A.pos,ht.end=A.end,ht.hasTrailingComma=$,ht.transformFlags=A.transformFlags,j.attachNodeArrayDebugInfo(ht),ht}const ie=A.length,Ee=ie>=1&&ie<=4?A.slice():A;return Ee.pos=-1,Ee.end=-1,Ee.hasTrailingComma=!!$,Ee.transformFlags=0,bQe(Ee),j.attachNodeArrayDebugInfo(Ee),Ee}function Q(A){return r.createBaseNode(A)}function re(A){const $=Q(A);return $.symbol=void 0,$.localSymbol=void 0,$}function oe(A,$){return A!==$&&(A.typeArguments=$.typeArguments),ir(A,$)}function pe(A,$=0){const ie=typeof A=="number"?A+"":A;j.assert(ie.charCodeAt(0)!==45,"Negative numbers should be created in combination with createPrefixUnaryExpression");const Ee=re(9);return Ee.text=ie,Ee.numericLiteralFlags=$,$&384&&(Ee.transformFlags|=1024),Ee}function de(A){const $=$e(10);return $.text=typeof A=="string"?A:ZT(A)+"n",$.transformFlags|=32,$}function ue(A,$){const ie=re(11);return ie.text=A,ie.singleQuote=$,ie}function Ie(A,$,ie){const Ee=ue(A,$);return Ee.hasExtendedUnicodeEscape=ie,ie&&(Ee.transformFlags|=1024),Ee}function we(A){const $=ue(Lg(A),void 0);return $.textSourceNode=A,$}function he(A){const $=$e(14);return $.text=A,$}function Ae(A,$){switch(A){case 9:return pe($,0);case 10:return de($);case 11:return Ie($,void 0);case 12:return MD($,!1);case 13:return MD($,!0);case 14:return he($);case 15:return uc(A,$,void 0,0)}}function ke(A){const $=r.createBaseIdentifierNode(80);return $.escapedText=A,$.jsDoc=void 0,$.flowNode=void 0,$.symbol=void 0,$}function Te(A,$,ie,Ee){const ht=ke(cu(A));return lH(ht,{flags:$,id:tle,prefix:ie,suffix:Ee}),tle++,ht}function De(A,$,ie){$===void 0&&A&&($=oI(A)),$===80&&($=void 0);const Ee=ke(cu(A));return ie&&(Ee.flags|=256),Ee.escapedText==="await"&&(Ee.transformFlags|=67108864),Ee.flags&256&&(Ee.transformFlags|=1024),Ee}function qe(A,$,ie,Ee){let ht=1;$&&(ht|=8);const bi=Te("",ht,ie,Ee);return A&&A(bi),bi}function se(A){let $=2;return A&&($|=8),Te("",$,void 0,void 0)}function Ne(A,$=0,ie,Ee){return j.assert(!($&7),"Argument out of range: flags"),j.assert(($&48)!==32,"GeneratedIdentifierFlags.FileLevel cannot be set without also setting GeneratedIdentifierFlags.Optimistic"),Te(A,3|$,ie,Ee)}function Oe(A,$=0,ie,Ee){j.assert(!($&7),"Argument out of range: flags");const ht=A?Mv(A)?c2(!1,ie,A,Ee,Fr):`generated@${Sc(A)}`:"";(ie||Ee)&&($|=16);const bi=Te(ht,4|$,ie,Ee);return bi.original=A,bi}function He(A){const $=r.createBasePrivateIdentifierNode(81);return $.escapedText=A,$.transformFlags|=16777216,$}function Pe(A){return so(A,"#")||j.fail("First character of private identifier must be #: "+A),He(cu(A))}function We(A,$,ie,Ee){const ht=He(cu(A));return lH(ht,{flags:$,id:tle,prefix:ie,suffix:Ee}),tle++,ht}function ze(A,$,ie){A&&!so(A,"#")&&j.fail("First character of private identifier must be #: "+A);const Ee=8|(A?3:1);return We(A??"",Ee,$,ie)}function Nt(A,$,ie){const Ee=Mv(A)?c2(!0,$,A,ie,Fr):`#generated@${Sc(A)}`,bi=We(Ee,4|($||ie?16:0),$,ie);return bi.original=A,bi}function $e(A){return r.createBaseTokenNode(A)}function et(A){j.assert(A>=0&&A<=165,"Invalid token"),j.assert(A<=15||A>=18,"Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."),j.assert(A<=9||A>=15,"Invalid token. Use 'createLiteralLikeNode' to create literals."),j.assert(A!==80,"Invalid token. Use 'createIdentifier' to create identifiers");const $=$e(A);let ie=0;switch(A){case 134:ie=384;break;case 160:ie=4;break;case 125:case 123:case 124:case 148:case 128:case 138:case 87:case 133:case 150:case 163:case 146:case 151:case 103:case 147:case 164:case 154:case 136:case 155:case 116:case 159:case 157:ie=1;break;case 108:ie=134218752,$.flowNode=void 0;break;case 126:ie=1024;break;case 129:ie=16777216;break;case 110:ie=16384,$.flowNode=void 0;break}return ie&&($.transformFlags|=ie),$}function Me(){return et(108)}function ut(){return et(110)}function wt(){return et(106)}function Et(){return et(112)}function dt(){return et(97)}function zt(A){return et(A)}function Ei(A){const $=[];return A&32&&$.push(zt(95)),A&128&&$.push(zt(138)),A&2048&&$.push(zt(90)),A&4096&&$.push(zt(87)),A&1&&$.push(zt(125)),A&2&&$.push(zt(123)),A&4&&$.push(zt(124)),A&64&&$.push(zt(128)),A&256&&$.push(zt(126)),A&16&&$.push(zt(164)),A&8&&$.push(zt(148)),A&512&&$.push(zt(129)),A&1024&&$.push(zt(134)),A&8192&&$.push(zt(103)),A&16384&&$.push(zt(147)),$.length?$:void 0}function tn(A,$){const ie=Q(166);return ie.left=A,ie.right=gd($),ie.transformFlags|=mr(ie.left)|sH(ie.right),ie.flowNode=void 0,ie}function xn(A,$,ie){return A.left!==$||A.right!==ie?ir(tn($,ie),A):A}function Pn(A){const $=Q(167);return $.expression=u().parenthesizeExpressionOfComputedPropertyName(A),$.transformFlags|=mr($.expression)|1024|131072,$}function _i(A,$){return A.expression!==$?ir(Pn($),A):A}function Fi(A,$,ie,Ee){const ht=re(168);return ht.modifiers=gc(A),ht.name=gd($),ht.constraint=ie,ht.default=Ee,ht.transformFlags=1,ht.expression=void 0,ht.jsDoc=void 0,ht}function On(A,$,ie,Ee,ht){return A.modifiers!==$||A.name!==ie||A.constraint!==Ee||A.default!==ht?ir(Fi($,ie,Ee,ht),A):A}function pn(A,$,ie,Ee,ht,bi){const lr=re(169);return lr.modifiers=gc(A),lr.dotDotDotToken=$,lr.name=gd(ie),lr.questionToken=Ee,lr.type=ht,lr.initializer=HD(bi),ix(lr.name)?lr.transformFlags=1:lr.transformFlags=oc(lr.modifiers)|mr(lr.dotDotDotToken)|ux(lr.name)|mr(lr.questionToken)|mr(lr.initializer)|(lr.questionToken??lr.type?1:0)|(lr.dotDotDotToken??lr.initializer?1024:0)|(M1(lr.modifiers)&31?8192:0),lr.jsDoc=void 0,lr}function qr(A,$,ie,Ee,ht,bi,lr){return A.modifiers!==$||A.dotDotDotToken!==ie||A.name!==Ee||A.questionToken!==ht||A.type!==bi||A.initializer!==lr?ir(pn($,ie,Ee,ht,bi,lr),A):A}function Fs(A){const $=Q(170);return $.expression=u().parenthesizeLeftSideOfAccess(A,!1),$.transformFlags|=mr($.expression)|1|8192|33554432,$}function ko(A,$){return A.expression!==$?ir(Fs($),A):A}function ls(A,$,ie,Ee){const ht=re(171);return ht.modifiers=gc(A),ht.name=gd($),ht.type=Ee,ht.questionToken=ie,ht.transformFlags=1,ht.initializer=void 0,ht.jsDoc=void 0,ht}function Qs(A,$,ie,Ee,ht){return A.modifiers!==$||A.name!==ie||A.questionToken!==Ee||A.type!==ht?Mn(ls($,ie,Ee,ht),A):A}function Mn(A,$){return A!==$&&(A.initializer=$.initializer),ir(A,$)}function Zs(A,$,ie,Ee,ht){const bi=re(172);bi.modifiers=gc(A),bi.name=gd($),bi.questionToken=ie&&dx(ie)?ie:void 0,bi.exclamationToken=ie&&dH(ie)?ie:void 0,bi.type=Ee,bi.initializer=HD(ht);const lr=bi.flags&33554432||M1(bi.modifiers)&128;return bi.transformFlags=oc(bi.modifiers)|ux(bi.name)|mr(bi.initializer)|(lr||bi.questionToken||bi.exclamationToken||bi.type?1:0)|(Ka(bi.name)||M1(bi.modifiers)&256&&bi.initializer?8192:0)|16777216,bi.jsDoc=void 0,bi}function at(A,$,ie,Ee,ht,bi){return A.modifiers!==$||A.name!==ie||A.questionToken!==(Ee!==void 0&&dx(Ee)?Ee:void 0)||A.exclamationToken!==(Ee!==void 0&&dH(Ee)?Ee:void 0)||A.type!==ht||A.initializer!==bi?ir(Zs($,ie,Ee,ht,bi),A):A}function yi(A,$,ie,Ee,ht,bi){const lr=re(173);return lr.modifiers=gc(A),lr.name=gd($),lr.questionToken=ie,lr.typeParameters=gc(Ee),lr.parameters=gc(ht),lr.type=bi,lr.transformFlags=1,lr.jsDoc=void 0,lr.locals=void 0,lr.nextContainer=void 0,lr.typeArguments=void 0,lr}function Sn(A,$,ie,Ee,ht,bi,lr){return A.modifiers!==$||A.name!==ie||A.questionToken!==Ee||A.typeParameters!==ht||A.parameters!==bi||A.type!==lr?oe(yi($,ie,Ee,ht,bi,lr),A):A}function dr(A,$,ie,Ee,ht,bi,lr,xo){const el=re(174);if(el.modifiers=gc(A),el.asteriskToken=$,el.name=gd(ie),el.questionToken=Ee,el.exclamationToken=void 0,el.typeParameters=gc(ht),el.parameters=Z(bi),el.type=lr,el.body=xo,!el.body)el.transformFlags=1;else{const ag=M1(el.modifiers)&1024,Yy=!!el.asteriskToken,km=ag&&Yy;el.transformFlags=oc(el.modifiers)|mr(el.asteriskToken)|ux(el.name)|mr(el.questionToken)|oc(el.typeParameters)|oc(el.parameters)|mr(el.type)|mr(el.body)&-67108865|(km?128:ag?256:Yy?2048:0)|(el.questionToken||el.typeParameters||el.type?1:0)|1024}return el.typeArguments=void 0,el.jsDoc=void 0,el.locals=void 0,el.nextContainer=void 0,el.flowNode=void 0,el.endFlowNode=void 0,el.returnFlowNode=void 0,el}function us(A,$,ie,Ee,ht,bi,lr,xo,el){return A.modifiers!==$||A.asteriskToken!==ie||A.name!==Ee||A.questionToken!==ht||A.typeParameters!==bi||A.parameters!==lr||A.type!==xo||A.body!==el?Xr(dr($,ie,Ee,ht,bi,lr,xo,el),A):A}function Xr(A,$){return A!==$&&(A.exclamationToken=$.exclamationToken),ir(A,$)}function Gs(A){const $=re(175);return $.body=A,$.transformFlags=mr(A)|16777216,$.modifiers=void 0,$.jsDoc=void 0,$.locals=void 0,$.nextContainer=void 0,$.endFlowNode=void 0,$.returnFlowNode=void 0,$}function ma(A,$){return A.body!==$?ka(Gs($),A):A}function ka(A,$){return A!==$&&(A.modifiers=$.modifiers),ir(A,$)}function Ji(A,$,ie){const Ee=re(176);return Ee.modifiers=gc(A),Ee.parameters=Z($),Ee.body=ie,Ee.body?Ee.transformFlags=oc(Ee.modifiers)|oc(Ee.parameters)|mr(Ee.body)&-67108865|1024:Ee.transformFlags=1,Ee.typeParameters=void 0,Ee.type=void 0,Ee.typeArguments=void 0,Ee.jsDoc=void 0,Ee.locals=void 0,Ee.nextContainer=void 0,Ee.endFlowNode=void 0,Ee.returnFlowNode=void 0,Ee}function ac(A,$,ie,Ee){return A.modifiers!==$||A.parameters!==ie||A.body!==Ee?St(Ji($,ie,Ee),A):A}function St(A,$){return A!==$&&(A.typeParameters=$.typeParameters,A.type=$.type),oe(A,$)}function ri(A,$,ie,Ee,ht){const bi=re(177);return bi.modifiers=gc(A),bi.name=gd($),bi.parameters=Z(ie),bi.type=Ee,bi.body=ht,bi.body?bi.transformFlags=oc(bi.modifiers)|ux(bi.name)|oc(bi.parameters)|mr(bi.type)|mr(bi.body)&-67108865|(bi.type?1:0):bi.transformFlags=1,bi.typeArguments=void 0,bi.typeParameters=void 0,bi.jsDoc=void 0,bi.locals=void 0,bi.nextContainer=void 0,bi.flowNode=void 0,bi.endFlowNode=void 0,bi.returnFlowNode=void 0,bi}function xe(A,$,ie,Ee,ht,bi){return A.modifiers!==$||A.name!==ie||A.parameters!==Ee||A.type!==ht||A.body!==bi?pt(ri($,ie,Ee,ht,bi),A):A}function pt(A,$){return A!==$&&(A.typeParameters=$.typeParameters),oe(A,$)}function Se(A,$,ie,Ee){const ht=re(178);return ht.modifiers=gc(A),ht.name=gd($),ht.parameters=Z(ie),ht.body=Ee,ht.body?ht.transformFlags=oc(ht.modifiers)|ux(ht.name)|oc(ht.parameters)|mr(ht.body)&-67108865|(ht.type?1:0):ht.transformFlags=1,ht.typeArguments=void 0,ht.typeParameters=void 0,ht.type=void 0,ht.jsDoc=void 0,ht.locals=void 0,ht.nextContainer=void 0,ht.flowNode=void 0,ht.endFlowNode=void 0,ht.returnFlowNode=void 0,ht}function Ze(A,$,ie,Ee,ht){return A.modifiers!==$||A.name!==ie||A.parameters!==Ee||A.body!==ht?gt(Se($,ie,Ee,ht),A):A}function gt(A,$){return A!==$&&(A.typeParameters=$.typeParameters,A.type=$.type),oe(A,$)}function Dt(A,$,ie){const Ee=re(179);return Ee.typeParameters=gc(A),Ee.parameters=gc($),Ee.type=ie,Ee.transformFlags=1,Ee.jsDoc=void 0,Ee.locals=void 0,Ee.nextContainer=void 0,Ee.typeArguments=void 0,Ee}function Je(A,$,ie,Ee){return A.typeParameters!==$||A.parameters!==ie||A.type!==Ee?oe(Dt($,ie,Ee),A):A}function Rt(A,$,ie){const Ee=re(180);return Ee.typeParameters=gc(A),Ee.parameters=gc($),Ee.type=ie,Ee.transformFlags=1,Ee.jsDoc=void 0,Ee.locals=void 0,Ee.nextContainer=void 0,Ee.typeArguments=void 0,Ee}function Ct(A,$,ie,Ee){return A.typeParameters!==$||A.parameters!==ie||A.type!==Ee?oe(Rt($,ie,Ee),A):A}function ii(A,$,ie){const Ee=re(181);return Ee.modifiers=gc(A),Ee.parameters=gc($),Ee.type=ie,Ee.transformFlags=1,Ee.jsDoc=void 0,Ee.locals=void 0,Ee.nextContainer=void 0,Ee.typeArguments=void 0,Ee}function vt(A,$,ie,Ee){return A.parameters!==ie||A.type!==Ee||A.modifiers!==$?oe(ii($,ie,Ee),A):A}function Ni(A,$){const ie=Q(204);return ie.type=A,ie.literal=$,ie.transformFlags=1,ie}function ji(A,$,ie){return A.type!==$||A.literal!==ie?ir(Ni($,ie),A):A}function gr(A){return et(A)}function te(A,$,ie){const Ee=Q(182);return Ee.assertsModifier=A,Ee.parameterName=gd($),Ee.type=ie,Ee.transformFlags=1,Ee}function tt(A,$,ie,Ee){return A.assertsModifier!==$||A.parameterName!==ie||A.type!==Ee?ir(te($,ie,Ee),A):A}function Gt(A,$){const ie=Q(183);return ie.typeName=gd(A),ie.typeArguments=$&&u().parenthesizeTypeArguments(Z($)),ie.transformFlags=1,ie}function le(A,$,ie){return A.typeName!==$||A.typeArguments!==ie?ir(Gt($,ie),A):A}function Ue(A,$,ie){const Ee=re(184);return Ee.typeParameters=gc(A),Ee.parameters=gc($),Ee.type=ie,Ee.transformFlags=1,Ee.modifiers=void 0,Ee.jsDoc=void 0,Ee.locals=void 0,Ee.nextContainer=void 0,Ee.typeArguments=void 0,Ee}function be(A,$,ie,Ee){return A.typeParameters!==$||A.parameters!==ie||A.type!==Ee?Qt(Ue($,ie,Ee),A):A}function Qt(A,$){return A!==$&&(A.modifiers=$.modifiers),oe(A,$)}function lt(...A){return A.length===4?st(...A):A.length===3?hi(...A):j.fail("Incorrect number of arguments specified.")}function st(A,$,ie,Ee){const ht=re(185);return ht.modifiers=gc(A),ht.typeParameters=gc($),ht.parameters=gc(ie),ht.type=Ee,ht.transformFlags=1,ht.jsDoc=void 0,ht.locals=void 0,ht.nextContainer=void 0,ht.typeArguments=void 0,ht}function hi(A,$,ie){return st(void 0,A,$,ie)}function vn(...A){return A.length===5?ln(...A):A.length===4?Un(...A):j.fail("Incorrect number of arguments specified.")}function ln(A,$,ie,Ee,ht){return A.modifiers!==$||A.typeParameters!==ie||A.parameters!==Ee||A.type!==ht?oe(lt($,ie,Ee,ht),A):A}function Un(A,$,ie,Ee){return ln(A,A.modifiers,$,ie,Ee)}function Pt(A,$){const ie=Q(186);return ie.exprName=A,ie.typeArguments=$&&u().parenthesizeTypeArguments($),ie.transformFlags=1,ie}function Bt(A,$,ie){return A.exprName!==$||A.typeArguments!==ie?ir(Pt($,ie),A):A}function fi(A){const $=re(187);return $.members=Z(A),$.transformFlags=1,$}function wi(A,$){return A.members!==$?ir(fi($),A):A}function Ri(A){const $=Q(188);return $.elementType=u().parenthesizeNonArrayTypeOfPostfixType(A),$.transformFlags=1,$}function Ai(A,$){return A.elementType!==$?ir(Ri($),A):A}function Xn(A){const $=Q(189);return $.elements=Z(u().parenthesizeElementTypesOfTupleType(A)),$.transformFlags=1,$}function Di(A,$){return A.elements!==$?ir(Xn($),A):A}function on(A,$,ie,Ee){const ht=re(202);return ht.dotDotDotToken=A,ht.name=$,ht.questionToken=ie,ht.type=Ee,ht.transformFlags=1,ht.jsDoc=void 0,ht}function zi(A,$,ie,Ee,ht){return A.dotDotDotToken!==$||A.name!==ie||A.questionToken!==Ee||A.type!==ht?ir(on($,ie,Ee,ht),A):A}function cn(A){const $=Q(190);return $.type=u().parenthesizeTypeOfOptionalType(A),$.transformFlags=1,$}function vi(A,$){return A.type!==$?ir(cn($),A):A}function qo(A){const $=Q(191);return $.type=A,$.transformFlags=1,$}function Wo(A,$){return A.type!==$?ir(qo($),A):A}function $o(A,$,ie){const Ee=Q(A);return Ee.types=X.createNodeArray(ie($)),Ee.transformFlags=1,Ee}function Lc(A,$,ie){return A.types!==$?ir($o(A.kind,$,ie),A):A}function vu(A){return $o(192,A,u().parenthesizeConstituentTypesOfUnionType)}function Gu(A,$){return Lc(A,$,u().parenthesizeConstituentTypesOfUnionType)}function Zc(A){return $o(193,A,u().parenthesizeConstituentTypesOfIntersectionType)}function Ls(A,$){return Lc(A,$,u().parenthesizeConstituentTypesOfIntersectionType)}function ja(A,$,ie,Ee){const ht=Q(194);return ht.checkType=u().parenthesizeCheckTypeOfConditionalType(A),ht.extendsType=u().parenthesizeExtendsTypeOfConditionalType($),ht.trueType=ie,ht.falseType=Ee,ht.transformFlags=1,ht.locals=void 0,ht.nextContainer=void 0,ht}function wf(A,$,ie,Ee,ht){return A.checkType!==$||A.extendsType!==ie||A.trueType!==Ee||A.falseType!==ht?ir(ja($,ie,Ee,ht),A):A}function Jo(A){const $=Q(195);return $.typeParameter=A,$.transformFlags=1,$}function kh(A,$){return A.typeParameter!==$?ir(Jo($),A):A}function md(A,$){const ie=Q(203);return ie.head=A,ie.templateSpans=Z($),ie.transformFlags=1,ie}function go(A,$,ie){return A.head!==$||A.templateSpans!==ie?ir(md($,ie),A):A}function pc(A,$,ie,Ee,ht=!1){const bi=Q(205);return bi.argument=A,bi.attributes=$,bi.assertions&&bi.assertions.assertClause&&bi.attributes&&(bi.assertions.assertClause=bi.attributes),bi.qualifier=ie,bi.typeArguments=Ee&&u().parenthesizeTypeArguments(Ee),bi.isTypeOf=ht,bi.transformFlags=1,bi}function mc(A,$,ie,Ee,ht,bi=A.isTypeOf){return A.argument!==$||A.attributes!==ie||A.qualifier!==Ee||A.typeArguments!==ht||A.isTypeOf!==bi?ir(pc($,ie,Ee,ht,bi),A):A}function oo(A){const $=Q(196);return $.type=A,$.transformFlags=1,$}function tc(A,$){return A.type!==$?ir(oo($),A):A}function ki(){const A=Q(197);return A.transformFlags=1,A}function Gc(A,$){const ie=Q(198);return ie.operator=A,ie.type=A===148?u().parenthesizeOperandOfReadonlyTypeOperator($):u().parenthesizeOperandOfTypeOperator($),ie.transformFlags=1,ie}function uh(A,$){return A.type!==$?ir(Gc(A.operator,$),A):A}function sd(A,$){const ie=Q(199);return ie.objectType=u().parenthesizeNonArrayTypeOfPostfixType(A),ie.indexType=$,ie.transformFlags=1,ie}function Pp(A,$,ie){return A.objectType!==$||A.indexType!==ie?ir(sd($,ie),A):A}function Nl(A,$,ie,Ee,ht,bi){const lr=re(200);return lr.readonlyToken=A,lr.typeParameter=$,lr.nameType=ie,lr.questionToken=Ee,lr.type=ht,lr.members=bi&&Z(bi),lr.transformFlags=1,lr.locals=void 0,lr.nextContainer=void 0,lr}function Ve(A,$,ie,Ee,ht,bi,lr){return A.readonlyToken!==$||A.typeParameter!==ie||A.nameType!==Ee||A.questionToken!==ht||A.type!==bi||A.members!==lr?ir(Nl($,ie,Ee,ht,bi,lr),A):A}function _e(A){const $=Q(201);return $.literal=A,$.transformFlags=1,$}function Lt(A,$){return A.literal!==$?ir(_e($),A):A}function ci(A){const $=Q(206);return $.elements=Z(A),$.transformFlags|=oc($.elements)|1024|524288,$.transformFlags&32768&&($.transformFlags|=65664),$}function Mi(A,$){return A.elements!==$?ir(ci($),A):A}function Rn(A){const $=Q(207);return $.elements=Z(A),$.transformFlags|=oc($.elements)|1024|524288,$}function Yr(A,$){return A.elements!==$?ir(Rn($),A):A}function Xi(A,$,ie,Ee){const ht=re(208);return ht.dotDotDotToken=A,ht.propertyName=gd($),ht.name=gd(ie),ht.initializer=HD(Ee),ht.transformFlags|=mr(ht.dotDotDotToken)|ux(ht.propertyName)|ux(ht.name)|mr(ht.initializer)|(ht.dotDotDotToken?32768:0)|1024,ht.flowNode=void 0,ht}function Mr(A,$,ie,Ee,ht){return A.propertyName!==ie||A.dotDotDotToken!==$||A.name!==Ee||A.initializer!==ht?ir(Xi($,ie,Ee,ht),A):A}function ds(A,$){const ie=Q(209),Ee=A&&rl(A),ht=Z(A,Ee&&Bd(Ee)?!0:void 0);return ie.elements=u().parenthesizeExpressionsOfCommaDelimitedList(ht),ie.multiLine=$,ie.transformFlags|=oc(ie.elements),ie}function Ks(A,$){return A.elements!==$?ir(ds($,A.multiLine),A):A}function Ic(A,$){const ie=re(210);return ie.properties=Z(A),ie.multiLine=$,ie.transformFlags|=oc(ie.properties),ie.jsDoc=void 0,ie}function Gl(A,$){return A.properties!==$?ir(Ic($,A.multiLine),A):A}function Pu(A,$,ie){const Ee=re(211);return Ee.expression=A,Ee.questionDotToken=$,Ee.name=ie,Ee.transformFlags=mr(Ee.expression)|mr(Ee.questionDotToken)|(ot(Ee.name)?sH(Ee.name):mr(Ee.name)|536870912),Ee.jsDoc=void 0,Ee.flowNode=void 0,Ee}function Ku(A,$){const ie=Pu(u().parenthesizeLeftSideOfAccess(A,!1),void 0,gd($));return g7(A)&&(ie.transformFlags|=384),ie}function Xu(A,$,ie){return dG(A)?Cu(A,$,A.questionDotToken,ha(ie,ot)):A.expression!==$||A.name!==ie?ir(Ku($,ie),A):A}function Wl(A,$,ie){const Ee=Pu(u().parenthesizeLeftSideOfAccess(A,!0),$,gd(ie));return Ee.flags|=64,Ee.transformFlags|=32,Ee}function Cu(A,$,ie,Ee){return j.assert(!!(A.flags&64),"Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."),A.expression!==$||A.questionDotToken!==ie||A.name!==Ee?ir(Wl($,ie,Ee),A):A}function gm(A,$,ie){const Ee=re(212);return Ee.expression=A,Ee.questionDotToken=$,Ee.argumentExpression=ie,Ee.transformFlags|=mr(Ee.expression)|mr(Ee.questionDotToken)|mr(Ee.argumentExpression),Ee.jsDoc=void 0,Ee.flowNode=void 0,Ee}function Qu(A,$){const ie=gm(u().parenthesizeLeftSideOfAccess(A,!1),void 0,CC($));return g7(A)&&(ie.transformFlags|=384),ie}function kd(A,$,ie){return Koe(A)?Ye(A,$,A.questionDotToken,ie):A.expression!==$||A.argumentExpression!==ie?ir(Qu($,ie),A):A}function eg(A,$,ie){const Ee=gm(u().parenthesizeLeftSideOfAccess(A,!0),$,CC(ie));return Ee.flags|=64,Ee.transformFlags|=32,Ee}function Ye(A,$,ie,Ee){return j.assert(!!(A.flags&64),"Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."),A.expression!==$||A.questionDotToken!==ie||A.argumentExpression!==Ee?ir(eg($,ie,Ee),A):A}function li(A,$,ie,Ee){const ht=re(213);return ht.expression=A,ht.questionDotToken=$,ht.typeArguments=ie,ht.arguments=Ee,ht.transformFlags|=mr(ht.expression)|mr(ht.questionDotToken)|oc(ht.typeArguments)|oc(ht.arguments),ht.typeArguments&&(ht.transformFlags|=1),G_(ht.expression)&&(ht.transformFlags|=16384),ht}function En(A,$,ie){const Ee=li(u().parenthesizeLeftSideOfAccess(A,!1),void 0,gc($),u().parenthesizeExpressionsOfCommaDelimitedList(Z(ie)));return y7(Ee.expression)&&(Ee.transformFlags|=8388608),Ee}function po(A,$,ie,Ee){return cI(A)?sc(A,$,A.questionDotToken,ie,Ee):A.expression!==$||A.typeArguments!==ie||A.arguments!==Ee?ir(En($,ie,Ee),A):A}function ic(A,$,ie,Ee){const ht=li(u().parenthesizeLeftSideOfAccess(A,!0),$,gc(ie),u().parenthesizeExpressionsOfCommaDelimitedList(Z(Ee)));return ht.flags|=64,ht.transformFlags|=32,ht}function sc(A,$,ie,Ee,ht){return j.assert(!!(A.flags&64),"Cannot update a CallExpression using updateCallChain. Use updateCall instead."),A.expression!==$||A.questionDotToken!==ie||A.typeArguments!==Ee||A.arguments!==ht?ir(ic($,ie,Ee,ht),A):A}function Hu(A,$,ie){const Ee=re(214);return Ee.expression=u().parenthesizeExpressionOfNew(A),Ee.typeArguments=gc($),Ee.arguments=ie?u().parenthesizeExpressionsOfCommaDelimitedList(ie):void 0,Ee.transformFlags|=mr(Ee.expression)|oc(Ee.typeArguments)|oc(Ee.arguments)|32,Ee.typeArguments&&(Ee.transformFlags|=1),Ee}function Hd(A,$,ie,Ee){return A.expression!==$||A.typeArguments!==ie||A.arguments!==Ee?ir(Hu($,ie,Ee),A):A}function Yc(A,$,ie){const Ee=Q(215);return Ee.tag=u().parenthesizeLeftSideOfAccess(A,!1),Ee.typeArguments=gc($),Ee.template=ie,Ee.transformFlags|=mr(Ee.tag)|oc(Ee.typeArguments)|mr(Ee.template)|1024,Ee.typeArguments&&(Ee.transformFlags|=1),rce(Ee.template)&&(Ee.transformFlags|=128),Ee}function Pc(A,$,ie,Ee){return A.tag!==$||A.typeArguments!==ie||A.template!==Ee?ir(Yc($,ie,Ee),A):A}function od(A,$){const ie=Q(216);return ie.expression=u().parenthesizeOperandOfPrefixUnary($),ie.type=A,ie.transformFlags|=mr(ie.expression)|mr(ie.type)|1,ie}function Ap(A,$,ie){return A.type!==$||A.expression!==ie?ir(od($,ie),A):A}function Vg(A){const $=Q(217);return $.expression=A,$.transformFlags=mr($.expression),$.jsDoc=void 0,$}function Y_(A,$){return A.expression!==$?ir(Vg($),A):A}function Jp(A,$,ie,Ee,ht,bi,lr){const xo=re(218);xo.modifiers=gc(A),xo.asteriskToken=$,xo.name=gd(ie),xo.typeParameters=gc(Ee),xo.parameters=Z(ht),xo.type=bi,xo.body=lr;const el=M1(xo.modifiers)&1024,ag=!!xo.asteriskToken,Yy=el&&ag;return xo.transformFlags=oc(xo.modifiers)|mr(xo.asteriskToken)|ux(xo.name)|oc(xo.typeParameters)|oc(xo.parameters)|mr(xo.type)|mr(xo.body)&-67108865|(Yy?128:el?256:ag?2048:0)|(xo.typeParameters||xo.type?1:0)|4194304,xo.typeArguments=void 0,xo.jsDoc=void 0,xo.locals=void 0,xo.nextContainer=void 0,xo.flowNode=void 0,xo.endFlowNode=void 0,xo.returnFlowNode=void 0,xo}function ym(A,$,ie,Ee,ht,bi,lr,xo){return A.name!==Ee||A.modifiers!==$||A.asteriskToken!==ie||A.typeParameters!==ht||A.parameters!==bi||A.type!==lr||A.body!==xo?oe(Jp($,ie,Ee,ht,bi,lr,xo),A):A}function tg(A,$,ie,Ee,ht,bi){const lr=re(219);lr.modifiers=gc(A),lr.typeParameters=gc($),lr.parameters=Z(ie),lr.type=Ee,lr.equalsGreaterThanToken=ht??et(39),lr.body=u().parenthesizeConciseBodyOfArrowFunction(bi);const xo=M1(lr.modifiers)&1024;return lr.transformFlags=oc(lr.modifiers)|oc(lr.typeParameters)|oc(lr.parameters)|mr(lr.type)|mr(lr.equalsGreaterThanToken)|mr(lr.body)&-67108865|(lr.typeParameters||lr.type?1:0)|(xo?16640:0)|1024,lr.typeArguments=void 0,lr.jsDoc=void 0,lr.locals=void 0,lr.nextContainer=void 0,lr.flowNode=void 0,lr.endFlowNode=void 0,lr.returnFlowNode=void 0,lr}function Zv(A,$,ie,Ee,ht,bi,lr){return A.modifiers!==$||A.typeParameters!==ie||A.parameters!==Ee||A.type!==ht||A.equalsGreaterThanToken!==bi||A.body!==lr?oe(tg($,ie,Ee,ht,bi,lr),A):A}function Hg(A){const $=Q(220);return $.expression=u().parenthesizeOperandOfPrefixUnary(A),$.transformFlags|=mr($.expression),$}function F_(A,$){return A.expression!==$?ir(Hg($),A):A}function jd(A){const $=Q(221);return $.expression=u().parenthesizeOperandOfPrefixUnary(A),$.transformFlags|=mr($.expression),$}function lC(A,$){return A.expression!==$?ir(jd($),A):A}function h_(A){const $=Q(222);return $.expression=u().parenthesizeOperandOfPrefixUnary(A),$.transformFlags|=mr($.expression),$}function Yv(A,$){return A.expression!==$?ir(h_($),A):A}function vm(A){const $=Q(223);return $.expression=u().parenthesizeOperandOfPrefixUnary(A),$.transformFlags|=mr($.expression)|256|128|2097152,$}function ve(A,$){return A.expression!==$?ir(vm($),A):A}function Ot(A,$){const ie=Q(224);return ie.operator=A,ie.operand=u().parenthesizeOperandOfPrefixUnary($),ie.transformFlags|=mr(ie.operand),(A===46||A===47)&&ot(ie.operand)&&!zl(ie.operand)&&!iC(ie.operand)&&(ie.transformFlags|=268435456),ie}function mi(A,$){return A.operand!==$?ir(Ot(A.operator,$),A):A}function Ci(A,$){const ie=Q(225);return ie.operator=$,ie.operand=u().parenthesizeOperandOfPostfixUnary(A),ie.transformFlags|=mr(ie.operand),ot(ie.operand)&&!zl(ie.operand)&&!iC(ie.operand)&&(ie.transformFlags|=268435456),ie}function hn(A,$){return A.operand!==$?ir(Ci($,A.operator),A):A}function Wn(A,$,ie){const Ee=re(226),ht=F5($),bi=ht.kind;return Ee.left=u().parenthesizeLeftSideOfBinary(bi,A),Ee.operatorToken=ht,Ee.right=u().parenthesizeRightSideOfBinary(bi,Ee.left,ie),Ee.transformFlags|=mr(Ee.left)|mr(Ee.operatorToken)|mr(Ee.right),bi===61?Ee.transformFlags|=32:bi===64?Aa(Ee.left)?Ee.transformFlags|=5248|Lr(Ee.left):jf(Ee.left)&&(Ee.transformFlags|=5120|Lr(Ee.left)):bi===43||bi===68?Ee.transformFlags|=512:U8(bi)&&(Ee.transformFlags|=16),bi===103&&Vs(Ee.left)&&(Ee.transformFlags|=536870912),Ee.jsDoc=void 0,Ee}function Lr(A){return xH(A)?65536:0}function ps(A,$,ie,Ee){return A.left!==$||A.operatorToken!==ie||A.right!==Ee?ir(Wn($,ie,Ee),A):A}function ee(A,$,ie,Ee,ht){const bi=Q(227);return bi.condition=u().parenthesizeConditionOfConditionalExpression(A),bi.questionToken=$??et(58),bi.whenTrue=u().parenthesizeBranchOfConditionalExpression(ie),bi.colonToken=Ee??et(59),bi.whenFalse=u().parenthesizeBranchOfConditionalExpression(ht),bi.transformFlags|=mr(bi.condition)|mr(bi.questionToken)|mr(bi.whenTrue)|mr(bi.colonToken)|mr(bi.whenFalse),bi}function Xe(A,$,ie,Ee,ht,bi){return A.condition!==$||A.questionToken!==ie||A.whenTrue!==Ee||A.colonToken!==ht||A.whenFalse!==bi?ir(ee($,ie,Ee,ht,bi),A):A}function Zt(A,$){const ie=Q(228);return ie.head=A,ie.templateSpans=Z($),ie.transformFlags|=mr(ie.head)|oc(ie.templateSpans)|1024,ie}function Nn(A,$,ie){return A.head!==$||A.templateSpans!==ie?ir(Zt($,ie),A):A}function Is(A,$,ie,Ee=0){j.assert(!(Ee&-7177),"Unsupported template flags.");let ht;if(ie!==void 0&&ie!==$&&(ht=X6t(A,ie),typeof ht=="object"))return j.fail("Invalid raw text");if($===void 0){if(ht===void 0)return j.fail("Arguments 'text' and 'rawText' may not both be undefined.");$=ht}else ht!==void 0&&j.assert($===ht,"Expected argument 'text' to be the normalized (i.e. 'cooked') version of argument 'rawText'.");return $}function Qo(A){let $=1024;return A&&($|=128),$}function To(A,$,ie,Ee){const ht=$e(A);return ht.text=$,ht.rawText=ie,ht.templateFlags=Ee&7176,ht.transformFlags=Qo(ht.templateFlags),ht}function Zo(A,$,ie,Ee){const ht=re(A);return ht.text=$,ht.rawText=ie,ht.templateFlags=Ee&7176,ht.transformFlags=Qo(ht.templateFlags),ht}function uc(A,$,ie,Ee){return A===15?Zo(A,$,ie,Ee):To(A,$,ie,Ee)}function Xa(A,$,ie){return A=Is(16,A,$,ie),uc(16,A,$,ie)}function Yl(A,$,ie){return A=Is(16,A,$,ie),uc(17,A,$,ie)}function ig(A,$,ie){return A=Is(16,A,$,ie),uc(18,A,$,ie)}function h0(A,$,ie){return A=Is(16,A,$,ie),Zo(15,A,$,ie)}function K0(A,$){j.assert(!A||!!$,"A `YieldExpression` with an asteriskToken must have an expression.");const ie=Q(229);return ie.expression=$&&u().parenthesizeExpressionForDisallowedComma($),ie.asteriskToken=A,ie.transformFlags|=mr(ie.expression)|mr(ie.asteriskToken)|1024|128|1048576,ie}function eb(A,$,ie){return A.expression!==ie||A.asteriskToken!==$?ir(K0($,ie),A):A}function PS(A){const $=Q(230);return $.expression=u().parenthesizeExpressionForDisallowedComma(A),$.transformFlags|=mr($.expression)|1024|32768,$}function tb(A,$){return A.expression!==$?ir(PS($),A):A}function ng(A,$,ie,Ee,ht){const bi=re(231);return bi.modifiers=gc(A),bi.name=gd($),bi.typeParameters=gc(ie),bi.heritageClauses=gc(Ee),bi.members=Z(ht),bi.transformFlags|=oc(bi.modifiers)|ux(bi.name)|oc(bi.typeParameters)|oc(bi.heritageClauses)|oc(bi.members)|(bi.typeParameters?1:0)|1024,bi.jsDoc=void 0,bi}function rg(A,$,ie,Ee,ht,bi){return A.modifiers!==$||A.name!==ie||A.typeParameters!==Ee||A.heritageClauses!==ht||A.members!==bi?ir(ng($,ie,Ee,ht,bi),A):A}function Vl(){return Q(232)}function Gp(A,$){const ie=Q(233);return ie.expression=u().parenthesizeLeftSideOfAccess(A,!1),ie.typeArguments=$&&u().parenthesizeTypeArguments($),ie.transformFlags|=mr(ie.expression)|oc(ie.typeArguments)|1024,ie}function ep(A,$,ie){return A.expression!==$||A.typeArguments!==ie?ir(Gp($,ie),A):A}function X0(A,$){const ie=Q(234);return ie.expression=A,ie.type=$,ie.transformFlags|=mr(ie.expression)|mr(ie.type)|1,ie}function ib(A,$,ie){return A.expression!==$||A.type!==ie?ir(X0($,ie),A):A}function jg(A){const $=Q(235);return $.expression=u().parenthesizeLeftSideOfAccess(A,!1),$.transformFlags|=mr($.expression)|1,$}function $y(A,$){return hG(A)?x2(A,$):A.expression!==$?ir(jg($),A):A}function uC(A,$){const ie=Q(238);return ie.expression=A,ie.type=$,ie.transformFlags|=mr(ie.expression)|mr(ie.type)|1,ie}function AS(A,$,ie){return A.expression!==$||A.type!==ie?ir(uC($,ie),A):A}function zg(A){const $=Q(235);return $.flags|=64,$.expression=u().parenthesizeLeftSideOfAccess(A,!0),$.transformFlags|=mr($.expression)|1,$}function x2(A,$){return j.assert(!!(A.flags&64),"Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."),A.expression!==$?ir(zg($),A):A}function bm(A,$){const ie=Q(236);switch(ie.keywordToken=A,ie.name=$,ie.transformFlags|=mr(ie.name),A){case 105:ie.transformFlags|=1024;break;case 102:ie.transformFlags|=32;break;default:return j.assertNever(A)}return ie.flowNode=void 0,ie}function Ug(A,$){return A.name!==$?ir(bm(A.keywordToken,$),A):A}function dC(A,$){const ie=Q(239);return ie.expression=A,ie.literal=$,ie.transformFlags|=mr(ie.expression)|mr(ie.literal)|1024,ie}function k2(A,$,ie){return A.expression!==$||A.literal!==ie?ir(dC($,ie),A):A}function Jy(){const A=Q(240);return A.transformFlags|=1024,A}function nb(A,$){const ie=Q(241);return ie.statements=Z(A),ie.multiLine=$,ie.transformFlags|=oc(ie.statements),ie.jsDoc=void 0,ie.locals=void 0,ie.nextContainer=void 0,ie}function T2(A,$){return A.statements!==$?ir(nb($,A.multiLine),A):A}function xx(A,$){const ie=Q(243);return ie.modifiers=gc(A),ie.declarationList=Ao($)?sb($):$,ie.transformFlags|=oc(ie.modifiers)|mr(ie.declarationList),M1(ie.modifiers)&128&&(ie.transformFlags=1),ie.jsDoc=void 0,ie.flowNode=void 0,ie}function it(A,$,ie){return A.modifiers!==$||A.declarationList!==ie?ir(xx($,ie),A):A}function yt(){const A=Q(242);return A.jsDoc=void 0,A}function ei(A){const $=Q(244);return $.expression=u().parenthesizeExpressionOfExpressionStatement(A),$.transformFlags|=mr($.expression),$.jsDoc=void 0,$.flowNode=void 0,$}function Pi(A,$){return A.expression!==$?ir(ei($),A):A}function nn(A,$,ie){const Ee=Q(245);return Ee.expression=A,Ee.thenStatement=Zp($),Ee.elseStatement=Zp(ie),Ee.transformFlags|=mr(Ee.expression)|mr(Ee.thenStatement)|mr(Ee.elseStatement),Ee.jsDoc=void 0,Ee.flowNode=void 0,Ee}function Vn(A,$,ie,Ee){return A.expression!==$||A.thenStatement!==ie||A.elseStatement!==Ee?ir(nn($,ie,Ee),A):A}function mn(A,$){const ie=Q(246);return ie.statement=Zp(A),ie.expression=$,ie.transformFlags|=mr(ie.statement)|mr(ie.expression),ie.jsDoc=void 0,ie.flowNode=void 0,ie}function Pr(A,$,ie){return A.statement!==$||A.expression!==ie?ir(mn($,ie),A):A}function ks(A,$){const ie=Q(247);return ie.expression=A,ie.statement=Zp($),ie.transformFlags|=mr(ie.expression)|mr(ie.statement),ie.jsDoc=void 0,ie.flowNode=void 0,ie}function ar(A,$,ie){return A.expression!==$||A.statement!==ie?ir(ks($,ie),A):A}function Ns(A,$,ie,Ee){const ht=Q(248);return ht.initializer=A,ht.condition=$,ht.incrementor=ie,ht.statement=Zp(Ee),ht.transformFlags|=mr(ht.initializer)|mr(ht.condition)|mr(ht.incrementor)|mr(ht.statement),ht.jsDoc=void 0,ht.locals=void 0,ht.nextContainer=void 0,ht.flowNode=void 0,ht}function cr(A,$,ie,Ee,ht){return A.initializer!==$||A.condition!==ie||A.incrementor!==Ee||A.statement!==ht?ir(Ns($,ie,Ee,ht),A):A}function Go(A,$,ie){const Ee=Q(249);return Ee.initializer=A,Ee.expression=$,Ee.statement=Zp(ie),Ee.transformFlags|=mr(Ee.initializer)|mr(Ee.expression)|mr(Ee.statement),Ee.jsDoc=void 0,Ee.locals=void 0,Ee.nextContainer=void 0,Ee.flowNode=void 0,Ee}function ll(A,$,ie,Ee){return A.initializer!==$||A.expression!==ie||A.statement!==Ee?ir(Go($,ie,Ee),A):A}function qh(A,$,ie,Ee){const ht=Q(250);return ht.awaitModifier=A,ht.initializer=$,ht.expression=u().parenthesizeExpressionForDisallowedComma(ie),ht.statement=Zp(Ee),ht.transformFlags|=mr(ht.awaitModifier)|mr(ht.initializer)|mr(ht.expression)|mr(ht.statement)|1024,A&&(ht.transformFlags|=128),ht.jsDoc=void 0,ht.locals=void 0,ht.nextContainer=void 0,ht.flowNode=void 0,ht}function qg(A,$,ie,Ee,ht){return A.awaitModifier!==$||A.initializer!==ie||A.expression!==Ee||A.statement!==ht?ir(qh($,ie,Ee,ht),A):A}function $h(A){const $=Q(251);return $.label=gd(A),$.transformFlags|=mr($.label)|4194304,$.jsDoc=void 0,$.flowNode=void 0,$}function $g(A,$){return A.label!==$?ir($h($),A):A}function Jh(A){const $=Q(252);return $.label=gd(A),$.transformFlags|=mr($.label)|4194304,$.jsDoc=void 0,$.flowNode=void 0,$}function DD(A,$){return A.label!==$?ir(Jh($),A):A}function kx(A){const $=Q(253);return $.expression=A,$.transformFlags|=mr($.expression)|128|4194304,$.jsDoc=void 0,$.flowNode=void 0,$}function rb(A,$){return A.expression!==$?ir(kx($),A):A}function fC(A,$){const ie=Q(254);return ie.expression=A,ie.statement=Zp($),ie.transformFlags|=mr(ie.expression)|mr(ie.statement),ie.jsDoc=void 0,ie.flowNode=void 0,ie}function OS(A,$,ie){return A.expression!==$||A.statement!==ie?ir(fC($,ie),A):A}function _0(A,$){const ie=Q(255);return ie.expression=u().parenthesizeExpressionForDisallowedComma(A),ie.caseBlock=$,ie.transformFlags|=mr(ie.expression)|mr(ie.caseBlock),ie.jsDoc=void 0,ie.flowNode=void 0,ie.possiblyExhaustive=!1,ie}function MS(A,$,ie){return A.expression!==$||A.caseBlock!==ie?ir(_0($,ie),A):A}function Tx(A,$){const ie=Q(256);return ie.label=gd(A),ie.statement=Zp($),ie.transformFlags|=mr(ie.label)|mr(ie.statement),ie.jsDoc=void 0,ie.flowNode=void 0,ie}function Dx(A,$,ie){return A.label!==$||A.statement!==ie?ir(Tx($,ie),A):A}function Ex(A){const $=Q(257);return $.expression=A,$.transformFlags|=mr($.expression),$.jsDoc=void 0,$.flowNode=void 0,$}function ZI(A,$){return A.expression!==$?ir(Ex($),A):A}function D2(A,$,ie){const Ee=Q(258);return Ee.tryBlock=A,Ee.catchClause=$,Ee.finallyBlock=ie,Ee.transformFlags|=mr(Ee.tryBlock)|mr(Ee.catchClause)|mr(Ee.finallyBlock),Ee.jsDoc=void 0,Ee.flowNode=void 0,Ee}function lc(A,$,ie,Ee){return A.tryBlock!==$||A.catchClause!==ie||A.finallyBlock!==Ee?ir(D2($,ie,Ee),A):A}function ED(){const A=Q(259);return A.jsDoc=void 0,A.flowNode=void 0,A}function YI(A,$,ie,Ee){const ht=re(260);return ht.name=gd(A),ht.exclamationToken=$,ht.type=ie,ht.initializer=HD(Ee),ht.transformFlags|=ux(ht.name)|mr(ht.initializer)|(ht.exclamationToken??ht.type?1:0),ht.jsDoc=void 0,ht}function E2(A,$,ie,Ee,ht){return A.name!==$||A.type!==Ee||A.exclamationToken!==ie||A.initializer!==ht?ir(YI($,ie,Ee,ht),A):A}function sb(A,$=0){const ie=Q(261);return ie.flags|=$&7,ie.declarations=Z(A),ie.transformFlags|=oc(ie.declarations)|4194304,$&7&&(ie.transformFlags|=263168),$&4&&(ie.transformFlags|=4),ie}function ob(A,$){return A.declarations!==$?ir(sb($,A.flags),A):A}function Cm(A,$,ie,Ee,ht,bi,lr){const xo=re(262);if(xo.modifiers=gc(A),xo.asteriskToken=$,xo.name=gd(ie),xo.typeParameters=gc(Ee),xo.parameters=Z(ht),xo.type=bi,xo.body=lr,!xo.body||M1(xo.modifiers)&128)xo.transformFlags=1;else{const el=M1(xo.modifiers)&1024,ag=!!xo.asteriskToken,Yy=el&&ag;xo.transformFlags=oc(xo.modifiers)|mr(xo.asteriskToken)|ux(xo.name)|oc(xo.typeParameters)|oc(xo.parameters)|mr(xo.type)|mr(xo.body)&-67108865|(Yy?128:el?256:ag?2048:0)|(xo.typeParameters||xo.type?1:0)|4194304}return xo.typeArguments=void 0,xo.jsDoc=void 0,xo.locals=void 0,xo.nextContainer=void 0,xo.endFlowNode=void 0,xo.returnFlowNode=void 0,xo}function Op(A,$,ie,Ee,ht,bi,lr,xo){return A.modifiers!==$||A.asteriskToken!==ie||A.name!==Ee||A.typeParameters!==ht||A.parameters!==bi||A.type!==lr||A.body!==xo?Mp(Cm($,ie,Ee,ht,bi,lr,xo),A):A}function Mp(A,$){return A!==$&&A.modifiers===$.modifiers&&(A.modifiers=$.modifiers),oe(A,$)}function tp(A,$,ie,Ee,ht){const bi=re(263);return bi.modifiers=gc(A),bi.name=gd($),bi.typeParameters=gc(ie),bi.heritageClauses=gc(Ee),bi.members=Z(ht),M1(bi.modifiers)&128?bi.transformFlags=1:(bi.transformFlags|=oc(bi.modifiers)|ux(bi.name)|oc(bi.typeParameters)|oc(bi.heritageClauses)|oc(bi.members)|(bi.typeParameters?1:0)|1024,bi.transformFlags&8192&&(bi.transformFlags|=1)),bi.jsDoc=void 0,bi}function Ix(A,$,ie,Ee,ht,bi){return A.modifiers!==$||A.name!==ie||A.typeParameters!==Ee||A.heritageClauses!==ht||A.members!==bi?ir(tp($,ie,Ee,ht,bi),A):A}function vO(A,$,ie,Ee,ht){const bi=re(264);return bi.modifiers=gc(A),bi.name=gd($),bi.typeParameters=gc(ie),bi.heritageClauses=gc(Ee),bi.members=Z(ht),bi.transformFlags=1,bi.jsDoc=void 0,bi}function Xd(A,$,ie,Ee,ht,bi){return A.modifiers!==$||A.name!==ie||A.typeParameters!==Ee||A.heritageClauses!==ht||A.members!==bi?ir(vO($,ie,Ee,ht,bi),A):A}function Q0(A,$,ie,Ee){const ht=re(265);return ht.modifiers=gc(A),ht.name=gd($),ht.typeParameters=gc(ie),ht.type=Ee,ht.transformFlags=1,ht.jsDoc=void 0,ht.locals=void 0,ht.nextContainer=void 0,ht}function RS(A,$,ie,Ee,ht){return A.modifiers!==$||A.name!==ie||A.typeParameters!==Ee||A.type!==ht?ir(Q0($,ie,Ee,ht),A):A}function Gy(A,$,ie){const Ee=re(266);return Ee.modifiers=gc(A),Ee.name=gd($),Ee.members=Z(ie),Ee.transformFlags|=oc(Ee.modifiers)|mr(Ee.name)|oc(Ee.members)|1,Ee.transformFlags&=-67108865,Ee.jsDoc=void 0,Ee}function kA(A,$,ie,Ee){return A.modifiers!==$||A.name!==ie||A.members!==Ee?ir(Gy($,ie,Ee),A):A}function dh(A,$,ie,Ee=0){const ht=re(267);return ht.modifiers=gc(A),ht.flags|=Ee&2088,ht.name=$,ht.body=ie,M1(ht.modifiers)&128?ht.transformFlags=1:ht.transformFlags|=oc(ht.modifiers)|mr(ht.name)|mr(ht.body)|1,ht.transformFlags&=-67108865,ht.jsDoc=void 0,ht.locals=void 0,ht.nextContainer=void 0,ht}function hC(A,$,ie,Ee){return A.modifiers!==$||A.name!==ie||A.body!==Ee?ir(dh($,ie,Ee,A.flags),A):A}function ip(A){const $=Q(268);return $.statements=Z(A),$.transformFlags|=oc($.statements),$.jsDoc=void 0,$}function I2(A,$){return A.statements!==$?ir(ip($),A):A}function Q1(A){const $=Q(269);return $.clauses=Z(A),$.transformFlags|=oc($.clauses),$.locals=void 0,$.nextContainer=void 0,$}function ft(A,$){return A.clauses!==$?ir(Q1($),A):A}function Z0(A){const $=re(270);return $.name=gd(A),$.transformFlags|=sH($.name)|1,$.modifiers=void 0,$.jsDoc=void 0,$}function Z1(A,$){return A.name!==$?N2(Z0($),A):A}function N2(A,$){return A!==$&&(A.modifiers=$.modifiers),ir(A,$)}function TA(A,$,ie,Ee){const ht=re(271);return ht.modifiers=gc(A),ht.name=gd(ie),ht.isTypeOnly=$,ht.moduleReference=Ee,ht.transformFlags|=oc(ht.modifiers)|sH(ht.name)|mr(ht.moduleReference),eC(ht.moduleReference)||(ht.transformFlags|=1),ht.transformFlags&=-67108865,ht.jsDoc=void 0,ht}function _C(A,$,ie,Ee,ht){return A.modifiers!==$||A.isTypeOnly!==ie||A.name!==Ee||A.moduleReference!==ht?ir(TA($,ie,Ee,ht),A):A}function FS(A,$,ie,Ee){const ht=Q(272);return ht.modifiers=gc(A),ht.importClause=$,ht.moduleSpecifier=ie,ht.attributes=ht.assertClause=Ee,ht.transformFlags|=mr(ht.importClause)|mr(ht.moduleSpecifier),ht.transformFlags&=-67108865,ht.jsDoc=void 0,ht}function pC(A,$,ie,Ee,ht){return A.modifiers!==$||A.importClause!==ie||A.moduleSpecifier!==Ee||A.attributes!==ht?ir(FS($,ie,Ee,ht),A):A}function DA(A,$,ie){const Ee=re(273);return Ee.isTypeOnly=A,Ee.name=$,Ee.namedBindings=ie,Ee.transformFlags|=mr(Ee.name)|mr(Ee.namedBindings),A&&(Ee.transformFlags|=1),Ee.transformFlags&=-67108865,Ee}function $a(A,$,ie,Ee){return A.isTypeOnly!==$||A.name!==ie||A.namedBindings!==Ee?ir(DA($,ie,Ee),A):A}function p0(A,$){const ie=Q(300);return ie.elements=Z(A),ie.multiLine=$,ie.token=132,ie.transformFlags|=4,ie}function BS(A,$,ie){return A.elements!==$||A.multiLine!==ie?ir(p0($,ie),A):A}function L2(A,$){const ie=Q(301);return ie.name=A,ie.value=$,ie.transformFlags|=4,ie}function Kp(A,$,ie){return A.name!==$||A.value!==ie?ir(L2($,ie),A):A}function ab(A,$){const ie=Q(302);return ie.assertClause=A,ie.multiLine=$,ie}function Y0(A,$,ie){return A.assertClause!==$||A.multiLine!==ie?ir(ab($,ie),A):A}function Ky(A,$,ie){const Ee=Q(300);return Ee.token=ie??118,Ee.elements=Z(A),Ee.multiLine=$,Ee.transformFlags|=4,Ee}function EA(A,$,ie){return A.elements!==$||A.multiLine!==ie?ir(Ky($,ie,A.token),A):A}function Nx(A,$){const ie=Q(301);return ie.name=A,ie.value=$,ie.transformFlags|=4,ie}function Jg(A,$,ie){return A.name!==$||A.value!==ie?ir(Nx($,ie),A):A}function IA(A){const $=re(274);return $.name=A,$.transformFlags|=mr($.name),$.transformFlags&=-67108865,$}function WS(A,$){return A.name!==$?ir(IA($),A):A}function Ys(A){const $=re(280);return $.name=A,$.transformFlags|=mr($.name)|32,$.transformFlags&=-67108865,$}function yr(A,$){return A.name!==$?ir(Ys($),A):A}function ff(A){const $=Q(275);return $.elements=Z(A),$.transformFlags|=oc($.elements),$.transformFlags&=-67108865,$}function mC(A,$){return A.elements!==$?ir(ff($),A):A}function VS(A,$,ie){const Ee=re(276);return Ee.isTypeOnly=A,Ee.propertyName=$,Ee.name=ie,Ee.transformFlags|=mr(Ee.propertyName)|mr(Ee.name),Ee.transformFlags&=-67108865,Ee}function eN(A,$,ie,Ee){return A.isTypeOnly!==$||A.propertyName!==ie||A.name!==Ee?ir(VS($,ie,Ee),A):A}function Lx(A,$,ie){const Ee=re(277);return Ee.modifiers=gc(A),Ee.isExportEquals=$,Ee.expression=$?u().parenthesizeRightSideOfBinary(64,void 0,ie):u().parenthesizeExpressionOfExportDefault(ie),Ee.transformFlags|=oc(Ee.modifiers)|mr(Ee.expression),Ee.transformFlags&=-67108865,Ee.jsDoc=void 0,Ee}function tN(A,$,ie){return A.modifiers!==$||A.expression!==ie?ir(Lx($,A.isExportEquals,ie),A):A}function Tl(A,$,ie,Ee,ht){const bi=re(278);return bi.modifiers=gc(A),bi.isTypeOnly=$,bi.exportClause=ie,bi.moduleSpecifier=Ee,bi.attributes=bi.assertClause=ht,bi.transformFlags|=oc(bi.modifiers)|mr(bi.exportClause)|mr(bi.moduleSpecifier),bi.transformFlags&=-67108865,bi.jsDoc=void 0,bi}function gC(A,$,ie,Ee,ht,bi){return A.modifiers!==$||A.isTypeOnly!==ie||A.exportClause!==Ee||A.moduleSpecifier!==ht||A.attributes!==bi?ID(Tl($,ie,Ee,ht,bi),A):A}function ID(A,$){return A!==$&&A.modifiers===$.modifiers&&(A.modifiers=$.modifiers),ir(A,$)}function sg(A){const $=Q(279);return $.elements=Z(A),$.transformFlags|=oc($.elements),$.transformFlags&=-67108865,$}function ND(A,$){return A.elements!==$?ir(sg($),A):A}function iN(A,$,ie){const Ee=Q(281);return Ee.isTypeOnly=A,Ee.propertyName=gd($),Ee.name=gd(ie),Ee.transformFlags|=mr(Ee.propertyName)|mr(Ee.name),Ee.transformFlags&=-67108865,Ee.jsDoc=void 0,Ee}function bO(A,$,ie,Ee){return A.isTypeOnly!==$||A.propertyName!==ie||A.name!==Ee?ir(iN($,ie,Ee),A):A}function CO(){const A=re(282);return A.jsDoc=void 0,A}function vr(A){const $=Q(283);return $.expression=A,$.transformFlags|=mr($.expression),$.transformFlags&=-67108865,$}function fh(A,$){return A.expression!==$?ir(vr($),A):A}function Vo(A){return Q(A)}function HS(A,$,ie=!1){const Ee=NA(A,ie?$&&u().parenthesizeNonArrayTypeOfPostfixType($):$);return Ee.postfix=ie,Ee}function NA(A,$){const ie=Q(A);return ie.type=$,ie}function P2(A,$,ie){return $.type!==ie?ir(HS(A,ie,$.postfix),$):$}function rr(A,$,ie){return $.type!==ie?ir(NA(A,ie),$):$}function SO(A,$){const ie=re(317);return ie.parameters=gc(A),ie.type=$,ie.transformFlags=oc(ie.parameters)|(ie.type?1:0),ie.jsDoc=void 0,ie.locals=void 0,ie.nextContainer=void 0,ie.typeArguments=void 0,ie}function nN(A,$,ie){return A.parameters!==$||A.type!==ie?ir(SO($,ie),A):A}function Th(A,$=!1){const ie=re(322);return ie.jsDocPropertyTags=gc(A),ie.isArrayType=$,ie}function Dh(A,$,ie){return A.jsDocPropertyTags!==$||A.isArrayType!==ie?ir(Th($,ie),A):A}function Xp(A){const $=Q(309);return $.type=A,$}function A2(A,$){return A.type!==$?ir(Xp($),A):A}function rN(A,$,ie){const Ee=re(323);return Ee.typeParameters=gc(A),Ee.parameters=Z($),Ee.type=ie,Ee.jsDoc=void 0,Ee.locals=void 0,Ee.nextContainer=void 0,Ee}function cb(A,$,ie,Ee){return A.typeParameters!==$||A.parameters!==ie||A.type!==Ee?ir(rN($,ie,Ee),A):A}function np(A){const $=ile(A.kind);return A.tagName.escapedText===cu($)?A.tagName:De($)}function Y1(A,$,ie){const Ee=Q(A);return Ee.tagName=$,Ee.comment=ie,Ee}function Sm(A,$,ie){const Ee=re(A);return Ee.tagName=$,Ee.comment=ie,Ee}function jS(A,$,ie,Ee){const ht=Y1(345,A??De("template"),Ee);return ht.constraint=$,ht.typeParameters=Z(ie),ht}function zS(A,$=np(A),ie,Ee,ht){return A.tagName!==$||A.constraint!==ie||A.typeParameters!==Ee||A.comment!==ht?ir(jS($,ie,Ee,ht),A):A}function LD(A,$,ie,Ee){const ht=Sm(346,A??De("typedef"),Ee);return ht.typeExpression=$,ht.fullName=ie,ht.name=Rle(ie),ht.locals=void 0,ht.nextContainer=void 0,ht}function sN(A,$=np(A),ie,Ee,ht){return A.tagName!==$||A.typeExpression!==ie||A.fullName!==Ee||A.comment!==ht?ir(LD($,ie,Ee,ht),A):A}function Px(A,$,ie,Ee,ht,bi){const lr=Sm(341,A??De("param"),bi);return lr.typeExpression=Ee,lr.name=$,lr.isNameFirst=!!ht,lr.isBracketed=ie,lr}function oN(A,$=np(A),ie,Ee,ht,bi,lr){return A.tagName!==$||A.name!==ie||A.isBracketed!==Ee||A.typeExpression!==ht||A.isNameFirst!==bi||A.comment!==lr?ir(Px($,ie,Ee,ht,bi,lr),A):A}function aN(A,$,ie,Ee,ht,bi){const lr=Sm(348,A??De("prop"),bi);return lr.typeExpression=Ee,lr.name=$,lr.isNameFirst=!!ht,lr.isBracketed=ie,lr}function cN(A,$=np(A),ie,Ee,ht,bi,lr){return A.tagName!==$||A.name!==ie||A.isBracketed!==Ee||A.typeExpression!==ht||A.isNameFirst!==bi||A.comment!==lr?ir(aN($,ie,Ee,ht,bi,lr),A):A}function e1(A,$,ie,Ee){const ht=Sm(338,A??De("callback"),Ee);return ht.typeExpression=$,ht.fullName=ie,ht.name=Rle(ie),ht.locals=void 0,ht.nextContainer=void 0,ht}function wO(A,$=np(A),ie,Ee,ht){return A.tagName!==$||A.typeExpression!==ie||A.fullName!==Ee||A.comment!==ht?ir(e1($,ie,Ee,ht),A):A}function O2(A,$,ie){const Ee=Y1(339,A??De("overload"),ie);return Ee.typeExpression=$,Ee}function Ax(A,$=np(A),ie,Ee){return A.tagName!==$||A.typeExpression!==ie||A.comment!==Ee?ir(O2($,ie,Ee),A):A}function lb(A,$,ie){const Ee=Y1(328,A??De("augments"),ie);return Ee.class=$,Ee}function yC(A,$=np(A),ie,Ee){return A.tagName!==$||A.class!==ie||A.comment!==Ee?ir(lb($,ie,Ee),A):A}function m0(A,$,ie){const Ee=Y1(329,A??De("implements"),ie);return Ee.class=$,Ee}function US(A,$,ie){const Ee=Y1(347,A??De("see"),ie);return Ee.name=$,Ee}function lN(A,$,ie,Ee){return A.tagName!==$||A.name!==ie||A.comment!==Ee?ir(US($,ie,Ee),A):A}function Qd(A){const $=Q(310);return $.name=A,$}function uN(A,$){return A.name!==$?ir(Qd($),A):A}function Xy(A,$){const ie=Q(311);return ie.left=A,ie.right=$,ie.transformFlags|=mr(ie.left)|mr(ie.right),ie}function dN(A,$,ie){return A.left!==$||A.right!==ie?ir(Xy($,ie),A):A}function M2(A,$){const ie=Q(324);return ie.name=A,ie.text=$,ie}function vC(A,$,ie){return A.name!==$?ir(M2($,ie),A):A}function Ox(A,$){const ie=Q(325);return ie.name=A,ie.text=$,ie}function PD(A,$,ie){return A.name!==$?ir(Ox($,ie),A):A}function Zu(A,$){const ie=Q(326);return ie.name=A,ie.text=$,ie}function $f(A,$,ie){return A.name!==$?ir(Zu($,ie),A):A}function xO(A,$=np(A),ie,Ee){return A.tagName!==$||A.class!==ie||A.comment!==Ee?ir(m0($,ie,Ee),A):A}function Eh(A,$,ie){return Y1(A,$??De(ile(A)),ie)}function rp(A,$,ie=np($),Ee){return $.tagName!==ie||$.comment!==Ee?ir(Eh(A,ie,Ee),$):$}function LA(A,$,ie,Ee){const ht=Y1(A,$??De(ile(A)),Ee);return ht.typeExpression=ie,ht}function ey(A,$,ie=np($),Ee,ht){return $.tagName!==ie||$.typeExpression!==Ee||$.comment!==ht?ir(LA(A,ie,Ee,ht),$):$}function PA(A,$){return Y1(327,A,$)}function qS(A,$,ie){return A.tagName!==$||A.comment!==ie?ir(PA($,ie),A):A}function fN(A,$,ie){const Ee=Sm(340,A??De(ile(340)),ie);return Ee.typeExpression=$,Ee.locals=void 0,Ee.nextContainer=void 0,Ee}function L5(A,$=np(A),ie,Ee){return A.tagName!==$||A.typeExpression!==ie||A.comment!==Ee?ir(fN($,ie,Ee),A):A}function nu(A,$,ie,Ee,ht){const bi=Y1(351,A??De("import"),ht);return bi.importClause=$,bi.moduleSpecifier=ie,bi.attributes=Ee,bi.comment=ht,bi}function kO(A,$,ie,Ee,ht,bi){return A.tagName!==$||A.comment!==bi||A.importClause!==ie||A.moduleSpecifier!==Ee||A.attributes!==ht?ir(nu($,ie,Ee,ht,bi),A):A}function AA(A){const $=Q(321);return $.text=A,$}function Mx(A,$){return A.text!==$?ir(AA($),A):A}function hN(A,$){const ie=Q(320);return ie.comment=A,ie.tags=gc($),ie}function B_(A,$,ie){return A.comment!==$||A.tags!==ie?ir(hN($,ie),A):A}function AD(A,$,ie){const Ee=Q(284);return Ee.openingElement=A,Ee.children=Z($),Ee.closingElement=ie,Ee.transformFlags|=mr(Ee.openingElement)|oc(Ee.children)|mr(Ee.closingElement)|2,Ee}function OA(A,$,ie,Ee){return A.openingElement!==$||A.children!==ie||A.closingElement!==Ee?ir(AD($,ie,Ee),A):A}function OD(A,$,ie){const Ee=Q(285);return Ee.tagName=A,Ee.typeArguments=gc($),Ee.attributes=ie,Ee.transformFlags|=mr(Ee.tagName)|oc(Ee.typeArguments)|mr(Ee.attributes)|2,Ee.typeArguments&&(Ee.transformFlags|=1),Ee}function sp(A,$,ie,Ee){return A.tagName!==$||A.typeArguments!==ie||A.attributes!==Ee?ir(OD($,ie,Ee),A):A}function MA(A,$,ie){const Ee=Q(286);return Ee.tagName=A,Ee.typeArguments=gc($),Ee.attributes=ie,Ee.transformFlags|=mr(Ee.tagName)|oc(Ee.typeArguments)|mr(Ee.attributes)|2,$&&(Ee.transformFlags|=1),Ee}function Rx(A,$,ie,Ee){return A.tagName!==$||A.typeArguments!==ie||A.attributes!==Ee?ir(MA($,ie,Ee),A):A}function wm(A){const $=Q(287);return $.tagName=A,$.transformFlags|=mr($.tagName)|2,$}function _N(A,$){return A.tagName!==$?ir(wm($),A):A}function Fx(A,$,ie){const Ee=Q(288);return Ee.openingFragment=A,Ee.children=Z($),Ee.closingFragment=ie,Ee.transformFlags|=mr(Ee.openingFragment)|oc(Ee.children)|mr(Ee.closingFragment)|2,Ee}function P5(A,$,ie,Ee){return A.openingFragment!==$||A.children!==ie||A.closingFragment!==Ee?ir(Fx($,ie,Ee),A):A}function MD(A,$){const ie=Q(12);return ie.text=A,ie.containsOnlyTriviaWhiteSpaces=!!$,ie.transformFlags|=2,ie}function pN(A,$,ie){return A.text!==$||A.containsOnlyTriviaWhiteSpaces!==ie?ir(MD($,ie),A):A}function RA(){const A=Q(289);return A.transformFlags|=2,A}function $S(){const A=Q(290);return A.transformFlags|=2,A}function __(A,$){const ie=re(291);return ie.name=A,ie.initializer=$,ie.transformFlags|=mr(ie.name)|mr(ie.initializer)|2,ie}function ub(A,$,ie){return A.name!==$||A.initializer!==ie?ir(__($,ie),A):A}function db(A){const $=re(292);return $.properties=Z(A),$.transformFlags|=oc($.properties)|2,$}function TO(A,$){return A.properties!==$?ir(db($),A):A}function wc(A){const $=Q(293);return $.expression=A,$.transformFlags|=mr($.expression)|2,$}function xr(A,$){return A.expression!==$?ir(wc($),A):A}function p_(A,$){const ie=Q(294);return ie.dotDotDotToken=A,ie.expression=$,ie.transformFlags|=mr(ie.dotDotDotToken)|mr(ie.expression)|2,ie}function Qp(A,$){return A.expression!==$?ir(p_(A.dotDotDotToken,$),A):A}function RD(A,$){const ie=Q(295);return ie.namespace=A,ie.name=$,ie.transformFlags|=mr(ie.namespace)|mr(ie.name)|2,ie}function DO(A,$,ie){return A.namespace!==$||A.name!==ie?ir(RD($,ie),A):A}function FA(A,$){const ie=Q(296);return ie.expression=u().parenthesizeExpressionForDisallowedComma(A),ie.statements=Z($),ie.transformFlags|=mr(ie.expression)|oc(ie.statements),ie.jsDoc=void 0,ie}function R2(A,$,ie){return A.expression!==$||A.statements!==ie?ir(FA($,ie),A):A}function FD(A){const $=Q(297);return $.statements=Z(A),$.transformFlags=oc($.statements),$}function BD(A,$){return A.statements!==$?ir(FD($),A):A}function Gg(A,$){const ie=Q(298);switch(ie.token=A,ie.types=Z($),ie.transformFlags|=oc(ie.types),A){case 96:ie.transformFlags|=1024;break;case 119:ie.transformFlags|=1;break;default:return j.assertNever(A)}return ie}function Rp(A,$){return A.types!==$?ir(Gg(A.token,$),A):A}function Fp(A,$){const ie=Q(299);return ie.variableDeclaration=W2(A),ie.block=$,ie.transformFlags|=mr(ie.variableDeclaration)|mr(ie.block)|(A?0:64),ie.locals=void 0,ie.nextContainer=void 0,ie}function t1(A,$,ie){return A.variableDeclaration!==$||A.block!==ie?ir(Fp($,ie),A):A}function Kg(A,$){const ie=re(303);return ie.name=gd(A),ie.initializer=u().parenthesizeExpressionForDisallowedComma($),ie.transformFlags|=ux(ie.name)|mr(ie.initializer),ie.modifiers=void 0,ie.questionToken=void 0,ie.exclamationToken=void 0,ie.jsDoc=void 0,ie}function mN(A,$,ie){return A.name!==$||A.initializer!==ie?Td(Kg($,ie),A):A}function Td(A,$){return A!==$&&(A.modifiers=$.modifiers,A.questionToken=$.questionToken,A.exclamationToken=$.exclamationToken),ir(A,$)}function BA(A,$){const ie=re(304);return ie.name=gd(A),ie.objectAssignmentInitializer=$&&u().parenthesizeExpressionForDisallowedComma($),ie.transformFlags|=sH(ie.name)|mr(ie.objectAssignmentInitializer)|1024,ie.equalsToken=void 0,ie.modifiers=void 0,ie.questionToken=void 0,ie.exclamationToken=void 0,ie.jsDoc=void 0,ie}function V(A,$,ie){return A.name!==$||A.objectAssignmentInitializer!==ie?Le(BA($,ie),A):A}function Le(A,$){return A!==$&&(A.modifiers=$.modifiers,A.questionToken=$.questionToken,A.exclamationToken=$.exclamationToken,A.equalsToken=$.equalsToken),ir(A,$)}function Ut(A){const $=re(305);return $.expression=u().parenthesizeExpressionForDisallowedComma(A),$.transformFlags|=mr($.expression)|128|65536,$.jsDoc=void 0,$}function Wi(A,$){return A.expression!==$?ir(Ut($),A):A}function gs(A,$){const ie=re(306);return ie.name=gd(A),ie.initializer=$&&u().parenthesizeExpressionForDisallowedComma($),ie.transformFlags|=mr(ie.name)|mr(ie.initializer)|1,ie.jsDoc=void 0,ie}function ao(A,$,ie){return A.name!==$||A.initializer!==ie?ir(gs($,ie),A):A}function Co(A,$,ie){const Ee=r.createBaseSourceFileNode(307);return Ee.statements=Z(A),Ee.endOfFileToken=$,Ee.flags|=ie,Ee.text="",Ee.fileName="",Ee.path="",Ee.resolvedPath="",Ee.originalFileName="",Ee.languageVersion=1,Ee.languageVariant=0,Ee.scriptKind=0,Ee.isDeclarationFile=!1,Ee.hasNoDefaultLib=!1,Ee.transformFlags|=oc(Ee.statements)|mr(Ee.endOfFileToken),Ee.locals=void 0,Ee.nextContainer=void 0,Ee.endFlowNode=void 0,Ee.nodeCount=0,Ee.identifierCount=0,Ee.symbolCount=0,Ee.parseDiagnostics=void 0,Ee.bindDiagnostics=void 0,Ee.bindSuggestionDiagnostics=void 0,Ee.lineMap=void 0,Ee.externalModuleIndicator=void 0,Ee.setExternalModuleIndicator=void 0,Ee.pragmas=void 0,Ee.checkJsDirective=void 0,Ee.referencedFiles=void 0,Ee.typeReferenceDirectives=void 0,Ee.libReferenceDirectives=void 0,Ee.amdDependencies=void 0,Ee.commentDirectives=void 0,Ee.identifiers=void 0,Ee.packageJsonLocations=void 0,Ee.packageJsonScope=void 0,Ee.imports=void 0,Ee.moduleAugmentations=void 0,Ee.ambientModuleNames=void 0,Ee.classifiableNames=void 0,Ee.impliedNodeFormat=void 0,Ee}function co(A){const $=Object.create(A.redirectTarget);return Object.defineProperties($,{id:{get(){return this.redirectInfo.redirectTarget.id},set(ie){this.redirectInfo.redirectTarget.id=ie}},symbol:{get(){return this.redirectInfo.redirectTarget.symbol},set(ie){this.redirectInfo.redirectTarget.symbol=ie}}}),$.redirectInfo=A,$}function Xs(A){const $=co(A.redirectInfo);return $.flags|=A.flags&-17,$.fileName=A.fileName,$.path=A.path,$.resolvedPath=A.resolvedPath,$.originalFileName=A.originalFileName,$.packageJsonLocations=A.packageJsonLocations,$.packageJsonScope=A.packageJsonScope,$.emitNode=void 0,$}function Gh(A){const $=r.createBaseSourceFileNode(307);$.flags|=A.flags&-17;for(const ie in A)if(!(Li($,ie)||!Li(A,ie))){if(ie==="emitNode"){$.emitNode=void 0;continue}$[ie]=A[ie]}return $}function xf(A){const $=A.redirectInfo?Xs(A):Gh(A);return a($,A),$}function i1(A,$,ie,Ee,ht,bi,lr){const xo=xf(A);return xo.statements=Z($),xo.isDeclarationFile=ie,xo.referencedFiles=Ee,xo.typeReferenceDirectives=ht,xo.hasNoDefaultLib=bi,xo.libReferenceDirectives=lr,xo.transformFlags=oc(xo.statements)|mr(xo.endOfFileToken),xo}function JS(A,$,ie=A.isDeclarationFile,Ee=A.referencedFiles,ht=A.typeReferenceDirectives,bi=A.hasNoDefaultLib,lr=A.libReferenceDirectives){return A.statements!==$||A.isDeclarationFile!==ie||A.referencedFiles!==Ee||A.typeReferenceDirectives!==ht||A.hasNoDefaultLib!==bi||A.libReferenceDirectives!==lr?ir(i1(A,$,ie,Ee,ht,bi,lr),A):A}function Bp(A){const $=Q(308);return $.sourceFiles=A,$.syntheticFileReferences=void 0,$.syntheticTypeReferences=void 0,$.syntheticLibReferences=void 0,$.hasNoDefaultLib=void 0,$}function WD(A,$){return A.sourceFiles!==$?ir(Bp($),A):A}function F2(A,$=!1,ie){const Ee=Q(237);return Ee.type=A,Ee.isSpread=$,Ee.tupleNameSource=ie,Ee}function VD(A){const $=Q(352);return $._children=A,$}function WA(A){const $=Q(353);return $.original=A,Ht($,A),$}function gN(A,$){const ie=Q(354);return ie.expression=A,ie.original=$,ie.transformFlags|=mr(ie.expression)|1,Ht(ie,$),ie}function n1(A,$){return A.expression!==$?ir(gN($,A.original),A):A}function fb(A){if(cl(A)&&!h8(A)&&!A.original&&!A.emitNode&&!A.id){if(C7(A))return A.elements;if(ur(A)&&DEe(A.operatorToken))return[A.left,A.right]}return A}function GS(A){const $=Q(355);return $.elements=Z(Ca(A,fb)),$.transformFlags|=oc($.elements),$}function VA(A,$){return A.elements!==$?ir(GS($),A):A}function Bx(A,$){const ie=Q(356);return ie.expression=A,ie.thisArg=$,ie.transformFlags|=mr(ie.expression)|mr(ie.thisArg),ie}function A5(A,$,ie){return A.expression!==$||A.thisArg!==ie?ir(Bx($,ie),A):A}function gz(A){const $=ke(A.escapedText);return $.flags|=A.flags&-17,$.transformFlags=A.transformFlags,a($,A),lH($,{...A.emitNode.autoGenerate}),$}function yz(A){const $=ke(A.escapedText);$.flags|=A.flags&-17,$.jsDoc=A.jsDoc,$.flowNode=A.flowNode,$.symbol=A.symbol,$.transformFlags=A.transformFlags,a($,A);const ie=kI(A);return ie&&vS($,ie),$}function eo(A){const $=He(A.escapedText);return $.flags|=A.flags&-17,$.transformFlags=A.transformFlags,a($,A),lH($,{...A.emitNode.autoGenerate}),$}function B2(A){const $=He(A.escapedText);return $.flags|=A.flags&-17,$.transformFlags=A.transformFlags,a($,A),$}function Hn(A){if(A===void 0)return A;if(Os(A))return xf(A);if(zl(A))return gz(A);if(ot(A))return yz(A);if(uI(A))return eo(A);if(Vs(A))return B2(A);const $=_G(A.kind)?r.createBaseNode(A.kind):r.createBaseTokenNode(A.kind);$.flags|=A.flags&-17,$.transformFlags=A.transformFlags,a($,A);for(const ie in A)Li($,ie)||!Li(A,ie)||($[ie]=A[ie]);return $}function O5(A,$,ie){return En(Jp(void 0,void 0,void 0,void 0,$?[$]:[],void 0,nb(A,!0)),void 0,ie?[ie]:[])}function EO(A,$,ie){return En(tg(void 0,void 0,$?[$]:[],void 0,void 0,nb(A,!0)),void 0,ie?[ie]:[])}function Wx(){return h_(pe("0"))}function IO(A){return Lx(void 0,!1,A)}function vz(A){return Tl(void 0,!1,sg([iN(!1,void 0,A)]))}function M5(A,$){return $==="null"?X.createStrictEquality(A,wt()):$==="undefined"?X.createStrictEquality(A,Wx()):X.createStrictEquality(jd(A),Ie($))}function JY(A,$){return $==="null"?X.createStrictInequality(A,wt()):$==="undefined"?X.createStrictInequality(A,Wx()):X.createStrictInequality(jd(A),Ie($))}function ty(A,$,ie){return cI(A)?ic(Wl(A,void 0,$),void 0,void 0,ie):En(Ku(A,$),void 0,ie)}function GY(A,$,ie){return ty(A,"bind",[$,...ie])}function R5(A,$,ie){return ty(A,"call",[$,...ie])}function KY(A,$,ie){return ty(A,"apply",[$,ie])}function yN(A,$,ie){return ty(De(A),$,ie)}function vN(A,$){return ty(A,"slice",$===void 0?[]:[CC($)])}function bz(A,$){return ty(A,"concat",$)}function Vx(A,$,ie){return yN("Object","defineProperty",[A,CC($),ie])}function g0(A,$){return yN("Object","getOwnPropertyDescriptor",[A,CC($)])}function NO(A,$,ie){return yN("Reflect","get",ie?[A,$,ie]:[A,$])}function Qy(A,$,ie,Ee){return yN("Reflect","set",Ee?[A,$,ie,Ee]:[A,$,ie])}function Hx(A,$,ie){return ie?(A.push(Kg($,ie)),!0):!1}function Cz(A,$){const ie=[];Hx(ie,"enumerable",CC(A.enumerable)),Hx(ie,"configurable",CC(A.configurable));let Ee=Hx(ie,"writable",CC(A.writable));Ee=Hx(ie,"value",A.value)||Ee;let ht=Hx(ie,"get",A.get);return ht=Hx(ie,"set",A.set)||ht,j.assert(!(Ee&&ht),"A PropertyDescriptor may not be both an accessor descriptor and a data descriptor."),Ic(ie,!$)}function Zy(A,$){switch(A.kind){case 217:return Y_(A,$);case 216:return Ap(A,A.type,$);case 234:return ib(A,$,A.type);case 238:return AS(A,$,A.type);case 235:return $y(A,$);case 233:return ep(A,$,A.typeArguments);case 354:return n1(A,$)}}function bN(A){return c_(A)&&cl(A)&&cl(yS(A))&&cl(B1(A))&&!Ft(y3(A))&&!Ft(cH(A))}function Sz(A,$,ie=31){return A&&OX(A,ie)&&!bN(A)?Zy(A,Sz(A.expression,$)):$}function Yu(A,$,ie){if(!$)return A;const Ee=Dx($,$.label,_x($.statement)?Yu(A,$.statement):A);return ie&&ie($),Ee}function HA(A,$){const ie=Dc(A);switch(ie.kind){case 80:return $;case 110:case 9:case 10:case 11:return!1;case 209:return ie.elements.length!==0;case 210:return ie.properties.length>0;default:return!0}}function Nc(A,$,ie,Ee=!1){const ht=Vu(A,31);let bi,lr;return G_(ht)?(bi=ut(),lr=ht):g7(ht)?(bi=ut(),lr=ie!==void 0&&ie<2?Ht(De("_super"),ht):ht):Ya(ht)&8192?(bi=Wx(),lr=u().parenthesizeLeftSideOfAccess(ht,!1)):Nr(ht)?HA(ht.expression,Ee)?(bi=qe($),lr=Ku(Ht(X.createAssignment(bi,ht.expression),ht.expression),ht.name),Ht(lr,ht)):(bi=ht.expression,lr=ht):wl(ht)?HA(ht.expression,Ee)?(bi=qe($),lr=Qu(Ht(X.createAssignment(bi,ht.expression),ht.expression),ht.argumentExpression),Ht(lr,ht)):(bi=ht.expression,lr=ht):(bi=Wx(),lr=u().parenthesizeLeftSideOfAccess(A,!1)),{target:lr,thisArg:bi}}function fe(A,$){return Ku(Vg(Ic([Se(void 0,"value",[pn(void 0,void 0,A,void 0,void 0,void 0)],nb([ei($)]))])),"value")}function Ke(A){return A.length>10?GS(A):oi(A,X.createComma)}function mt(A,$,ie,Ee=0,ht){const bi=ht?A&&oG(A):No(A);if(bi&&ot(bi)&&!zl(bi)){const lr=_c(Ht(Hn(bi),bi),bi.parent);return Ee|=Ya(bi),ie||(Ee|=96),$||(Ee|=3072),Ee&&tr(lr,Ee),lr}return Oe(A)}function Xt(A,$,ie){return mt(A,$,ie,98304)}function Si(A,$,ie,Ee){return mt(A,$,ie,32768,Ee)}function an(A,$,ie){return mt(A,$,ie,16384)}function jr(A,$,ie){return mt(A,$,ie)}function Hs(A,$,ie,Ee){const ht=Ku(A,cl($)?$:Hn($));Ht(ht,$);let bi=0;return Ee||(bi|=96),ie||(bi|=3072),bi&&tr(ht,bi),ht}function Cs(A,$,ie,Ee){return A&&Zr($,32)?Hs(A,mt($),ie,Ee):an($,ie,Ee)}function Ss(A,$,ie,Ee){const ht=Jc(A,$,0,ie);return dc(A,$,ht,Ee)}function no(A){return Ha(A.expression)&&A.expression.text==="use strict"}function $c(){return bh(ei(Ie("use strict")))}function Jc(A,$,ie=0,Ee){j.assert($.length===0,"Prologue directives should be at the first statement in the target statements array");let ht=!1;const bi=A.length;for(;ie<bi;){const lr=A[ie];if(I1(lr))no(lr)&&(ht=!0),$.push(lr);else break;ie++}return Ee&&!ht&&$.push($c()),ie}function dc(A,$,ie,Ee,ht=Pk){const bi=A.length;for(;ie!==void 0&&ie<bi;){const lr=A[ie];if(Ya(lr)&2097152&&ht(lr))fn($,Ee?bt(lr,Ee,Ps):lr);else break;ie++}return ie}function og(A){return Ale(A)?A:Ht(Z([$c(),...A]),A)}function Dd(A){return j.assert(Ce(A,R2e),"Cannot lift nodes to a Block."),Bm(A)||nb(A)}function xm(A,$,ie){let Ee=ie;for(;Ee<A.length&&$(A[Ee]);)Ee++;return Ee}function bC(A,$){if(!Ft($))return A;const ie=xm(A,I1,0),Ee=xm(A,VG,ie),ht=xm(A,HG,Ee),bi=xm($,I1,0),lr=xm($,VG,bi),xo=xm($,HG,lr),el=xm($,rV,xo);j.assert(el===$.length,"Expected declarations to be valid standard or custom prologues");const ag=AT(A)?A.slice():A;if(el>xo&&ag.splice(ht,0,...$.slice(xo,el)),xo>lr&&ag.splice(Ee,0,...$.slice(lr,xo)),lr>bi&&ag.splice(ie,0,...$.slice(bi,lr)),bi>0)if(ie===0)ag.splice(0,0,...$.slice(0,bi));else{const Yy=new Map;for(let km=0;km<ie;km++){const LO=A[km];Yy.set(LO.expression.text,!0)}for(let km=bi-1;km>=0;km--){const LO=$[km];Yy.has(LO.expression.text)||ag.unshift(LO)}}return AT(A)?Ht(Z(ag,A.hasTrailingComma),A):A}function hb(A,$){let ie;return typeof $=="number"?ie=Ei($):ie=$,$l(A)?On(A,ie,A.name,A.constraint,A.default):$s(A)?qr(A,ie,A.dotDotDotToken,A.name,A.questionToken,A.type,A.initializer):v3(A)?ln(A,ie,A.typeParameters,A.parameters,A.type):O_(A)?Qs(A,ie,A.name,A.questionToken,A.type):Lo(A)?at(A,ie,A.name,A.questionToken??A.exclamationToken,A.type,A.initializer):W1(A)?Sn(A,ie,A.name,A.questionToken,A.typeParameters,A.parameters,A.type):Nu(A)?us(A,ie,A.asteriskToken,A.name,A.questionToken,A.typeParameters,A.parameters,A.type,A.body):iu(A)?ac(A,ie,A.parameters,A.body):um(A)?xe(A,ie,A.name,A.parameters,A.type,A.body):kp(A)?Ze(A,ie,A.name,A.parameters,A.body):eD(A)?vt(A,ie,A.parameters,A.type):ml(A)?ym(A,ie,A.asteriskToken,A.name,A.typeParameters,A.parameters,A.type,A.body):xl(A)?Zv(A,ie,A.typeParameters,A.parameters,A.type,A.equalsGreaterThanToken,A.body):fd(A)?rg(A,ie,A.name,A.typeParameters,A.heritageClauses,A.members):Lu(A)?it(A,ie,A.declarationList):Wu(A)?Op(A,ie,A.asteriskToken,A.name,A.typeParameters,A.parameters,A.type,A.body):hd(A)?Ix(A,ie,A.name,A.typeParameters,A.heritageClauses,A.members):zf(A)?Xd(A,ie,A.name,A.typeParameters,A.heritageClauses,A.members):Mg(A)?RS(A,ie,A.name,A.typeParameters,A.type):sD(A)?kA(A,ie,A.name,A.members):rd(A)?hC(A,ie,A.name,A.body):Wd(A)?_C(A,ie,A.isTypeOnly,A.name,A.moduleReference):du(A)?pC(A,ie,A.importClause,A.moduleSpecifier,A.attributes):Il(A)?tN(A,ie,A.expression):Ju(A)?gC(A,ie,A.isTypeOnly,A.exportClause,A.moduleSpecifier,A.attributes):j.assertNever(A)}function jx(A,$){return $s(A)?qr(A,$,A.dotDotDotToken,A.name,A.questionToken,A.type,A.initializer):Lo(A)?at(A,$,A.name,A.questionToken??A.exclamationToken,A.type,A.initializer):Nu(A)?us(A,$,A.asteriskToken,A.name,A.questionToken,A.typeParameters,A.parameters,A.type,A.body):um(A)?xe(A,$,A.name,A.parameters,A.type,A.body):kp(A)?Ze(A,$,A.name,A.parameters,A.body):fd(A)?rg(A,$,A.name,A.typeParameters,A.heritageClauses,A.members):hd(A)?Ix(A,$,A.name,A.typeParameters,A.heritageClauses,A.members):j.assertNever(A)}function XY(A,$){switch(A.kind){case 177:return xe(A,A.modifiers,$,A.parameters,A.type,A.body);case 178:return Ze(A,A.modifiers,$,A.parameters,A.body);case 174:return us(A,A.modifiers,A.asteriskToken,$,A.questionToken,A.typeParameters,A.parameters,A.type,A.body);case 173:return Sn(A,A.modifiers,$,A.questionToken,A.typeParameters,A.parameters,A.type);case 172:return at(A,A.modifiers,$,A.questionToken??A.exclamationToken,A.type,A.initializer);case 171:return Qs(A,A.modifiers,$,A.questionToken,A.type);case 303:return mN(A,$,A.initializer)}}function gc(A){return A?Z(A):void 0}function gd(A){return typeof A=="string"?De(A):A}function CC(A){return typeof A=="string"?Ie(A):typeof A=="number"?pe(A):typeof A=="boolean"?A?Et():dt():A}function HD(A){return A&&u().parenthesizeExpressionForDisallowedComma(A)}function F5(A){return typeof A=="number"?et(A):A}function Zp(A){return A&&jEe(A)?Ht(a(yt(),A),A):A}function W2(A){return typeof A=="string"||A&&!_s(A)?YI(A,void 0,void 0,void 0):A}function ir(A,$){return A!==$&&(a(A,$),Ht(A,$)),A}}function ile(t){switch(t){case 344:return"type";case 342:return"returns";case 343:return"this";case 340:return"enum";case 330:return"author";case 332:return"class";case 333:return"public";case 334:return"private";case 335:return"protected";case 336:return"readonly";case 337:return"override";case 345:return"template";case 346:return"typedef";case 341:return"param";case 348:return"prop";case 338:return"callback";case 339:return"overload";case 328:return"augments";case 329:return"implements";case 351:return"import";default:return j.fail(`Unsupported kind: ${j.formatSyntaxKind(t)}`)}}var gS,vQe={};function X6t(t,r){switch(gS||(gS=Ov(99,!1,0)),t){case 15:gS.setText("`"+r+"`");break;case 16:gS.setText("`"+r+"${");break;case 17:gS.setText("}"+r+"${");break;case 18:gS.setText("}"+r+"`");break}let a=gS.scan();if(a===20&&(a=gS.reScanTemplateToken(!1)),gS.isUnterminated())return gS.setText(void 0),vQe;let u;switch(a){case 15:case 16:case 17:case 18:u=gS.getTokenValue();break}return u===void 0||gS.scan()!==1?(gS.setText(void 0),vQe):(gS.setText(void 0),u)}function ux(t){return t&&ot(t)?sH(t):mr(t)}function sH(t){return mr(t)&-67108865}function Q6t(t,r){return r|t.transformFlags&134234112}function mr(t){if(!t)return 0;const r=t.transformFlags&~Z6t(t.kind);return Bf(t)&&id(t.name)?Q6t(t.name,r):r}function oc(t){return t?t.transformFlags:0}function bQe(t){let r=0;for(const a of t)r|=mr(a);t.transformFlags=r}function Z6t(t){if(t>=182&&t<=205)return-2;switch(t){case 213:case 214:case 209:return-2147450880;case 267:return-1941676032;case 169:return-2147483648;case 219:return-2072174592;case 218:case 262:return-1937940480;case 261:return-2146893824;case 263:case 231:return-2147344384;case 176:return-1937948672;case 172:return-2013249536;case 174:case 177:case 178:return-2005057536;case 133:case 150:case 163:case 146:case 154:case 151:case 136:case 155:case 116:case 168:case 171:case 173:case 179:case 180:case 181:case 264:case 265:return-2;case 210:return-2147278848;case 299:return-2147418112;case 206:case 207:return-2147450880;case 216:case 238:case 234:case 354:case 217:case 108:return-2147483648;case 211:case 212:return-2147483648;default:return-2147483648}}var aX=cEe();function cX(t){return t.flags|=16,t}var Y6t={createBaseSourceFileNode:t=>cX(aX.createBaseSourceFileNode(t)),createBaseIdentifierNode:t=>cX(aX.createBaseIdentifierNode(t)),createBasePrivateIdentifierNode:t=>cX(aX.createBasePrivateIdentifierNode(t)),createBaseTokenNode:t=>cX(aX.createBaseTokenNode(t)),createBaseNode:t=>cX(aX.createBaseNode(t))},G=rH(4,Y6t),CQe;function SQe(t,r,a){return new(CQe||(CQe=Hf.getSourceMapSourceConstructor()))(t,r,a)}function Ir(t,r){if(t.original!==r&&(t.original=r,r)){const a=r.emitNode;a&&(t.emitNode=e3t(a,t.emitNode))}return t}function e3t(t,r){const{flags:a,internalFlags:u,leadingComments:h,trailingComments:p,commentRange:g,sourceMapRange:C,tokenSourceMapRanges:b,constantValue:T,helpers:E,startsOnNewLine:N,snippetElement:R,classThis:F,assignedName:H}=t;if(r||(r={}),a&&(r.flags=a),u&&(r.internalFlags=u&-9),h&&(r.leadingComments=Sr(h.slice(),r.leadingComments)),p&&(r.trailingComments=Sr(p.slice(),r.trailingComments)),g&&(r.commentRange=g),C&&(r.sourceMapRange=C),b&&(r.tokenSourceMapRanges=t3t(b,r.tokenSourceMapRanges)),T!==void 0&&(r.constantValue=T),E)for(const U of E)r.helpers=n_(r.helpers,U);return N!==void 0&&(r.startsOnNewLine=N),R!==void 0&&(r.snippetElement=R),F&&(r.classThis=F),H&&(r.assignedName=H),r}function t3t(t,r){r||(r=[]);for(const a in t)r[a]=t[a];return r}function ch(t){if(t.emitNode)j.assert(!(t.emitNode.internalFlags&8),"Invalid attempt to mutate an immutable node.");else{if(h8(t)){if(t.kind===307)return t.emitNode={annotatedNodes:[t]};const r=_n(Mo(_n(t)))??j.fail("Could not determine parsed source file.");ch(r).annotatedNodes.push(t)}t.emitNode={}}return t.emitNode}function nle(t){var r,a;const u=(a=(r=_n(Mo(t)))==null?void 0:r.emitNode)==null?void 0:a.annotatedNodes;if(u)for(const h of u)h.emitNode=void 0}function oH(t){const r=ch(t);return r.flags|=3072,r.leadingComments=void 0,r.trailingComments=void 0,t}function tr(t,r){return ch(t).flags=r,t}function F1(t,r){const a=ch(t);return a.flags=a.flags|r,t}function aH(t,r){return ch(t).internalFlags=r,t}function AP(t,r){const a=ch(t);return a.internalFlags=a.internalFlags|r,t}function yS(t){var r;return((r=t.emitNode)==null?void 0:r.sourceMapRange)??t}function Ga(t,r){return ch(t).sourceMapRange=r,t}function wQe(t,r){var a,u;return(u=(a=t.emitNode)==null?void 0:a.tokenSourceMapRanges)==null?void 0:u[r]}function _Ee(t,r,a){const u=ch(t),h=u.tokenSourceMapRanges??(u.tokenSourceMapRanges=[]);return h[r]=a,t}function f7(t){var r;return(r=t.emitNode)==null?void 0:r.startsOnNewLine}function lX(t,r){return ch(t).startsOnNewLine=r,t}function B1(t){var r;return((r=t.emitNode)==null?void 0:r.commentRange)??t}function Sd(t,r){return ch(t).commentRange=r,t}function y3(t){var r;return(r=t.emitNode)==null?void 0:r.leadingComments}function e2(t,r){return ch(t).leadingComments=r,t}function h7(t,r,a,u){return e2(t,fn(y3(t),{kind:r,pos:-1,end:-1,hasTrailingNewLine:u,text:a}))}function cH(t){var r;return(r=t.emitNode)==null?void 0:r.trailingComments}function OP(t,r){return ch(t).trailingComments=r,t}function uX(t,r,a,u){return OP(t,fn(cH(t),{kind:r,pos:-1,end:-1,hasTrailingNewLine:u,text:a}))}function pEe(t,r){e2(t,y3(r)),OP(t,cH(r));const a=ch(r);return a.leadingComments=void 0,a.trailingComments=void 0,t}function mEe(t){var r;return(r=t.emitNode)==null?void 0:r.constantValue}function gEe(t,r){const a=ch(t);return a.constantValue=r,t}function MP(t,r){const a=ch(t);return a.helpers=fn(a.helpers,r),t}function Zb(t,r){if(Ft(r)){const a=ch(t);for(const u of r)a.helpers=n_(a.helpers,u)}return t}function xQe(t,r){var a;const u=(a=t.emitNode)==null?void 0:a.helpers;return u?GR(u,r):!1}function dX(t){var r;return(r=t.emitNode)==null?void 0:r.helpers}function yEe(t,r,a){const u=t.emitNode,h=u&&u.helpers;if(!Ft(h))return;const p=ch(r);let g=0;for(let C=0;C<h.length;C++){const b=h[C];a(b)?(g++,p.helpers=n_(p.helpers,b)):g>0&&(h[C-g]=b)}g>0&&(h.length-=g)}function rle(t){var r;return(r=t.emitNode)==null?void 0:r.snippetElement}function sle(t,r){const a=ch(t);return a.snippetElement=r,t}function ole(t){return ch(t).internalFlags|=4,t}function vEe(t,r){const a=ch(t);return a.typeNode=r,t}function bEe(t){var r;return(r=t.emitNode)==null?void 0:r.typeNode}function vS(t,r){return ch(t).identifierTypeArguments=r,t}function kI(t){var r;return(r=t.emitNode)==null?void 0:r.identifierTypeArguments}function lH(t,r){return ch(t).autoGenerate=r,t}function kQe(t){var r;return(r=t.emitNode)==null?void 0:r.autoGenerate}function CEe(t,r){return ch(t).generatedImportReference=r,t}function SEe(t){var r;return(r=t.emitNode)==null?void 0:r.generatedImportReference}var wEe=(t=>(t.Field="f",t.Method="m",t.Accessor="a",t))(wEe||{});function xEe(t){const r=t.factory,a=Bh(()=>aH(r.createTrue(),8)),u=Bh(()=>aH(r.createFalse(),8));return{getUnscopedHelperName:h,createDecorateHelper:p,createMetadataHelper:g,createParamHelper:C,createESDecorateHelper:U,createRunInitializersHelper:q,createAssignHelper:X,createAwaitHelper:Z,createAsyncGeneratorHelper:Q,createAsyncDelegatorHelper:re,createAsyncValuesHelper:oe,createRestHelper:pe,createAwaiterHelper:de,createExtendsHelper:ue,createTemplateObjectHelper:Ie,createSpreadArrayHelper:we,createPropKeyHelper:he,createSetFunctionNameHelper:Ae,createValuesHelper:ke,createReadHelper:Te,createGeneratorHelper:De,createImportStarHelper:qe,createImportStarCallbackHelper:se,createImportDefaultHelper:Ne,createExportStarHelper:Oe,createClassPrivateFieldGetHelper:He,createClassPrivateFieldSetHelper:Pe,createClassPrivateFieldInHelper:We,createAddDisposableResourceHelper:ze,createDisposeResourcesHelper:Nt};function h($e){return tr(r.createIdentifier($e),8196)}function p($e,et,Me,ut){t.requestEmitHelper(i3t);const wt=[];return wt.push(r.createArrayLiteralExpression($e,!0)),wt.push(et),Me&&(wt.push(Me),ut&&wt.push(ut)),r.createCallExpression(h("__decorate"),void 0,wt)}function g($e,et){return t.requestEmitHelper(n3t),r.createCallExpression(h("__metadata"),void 0,[r.createStringLiteral($e),et])}function C($e,et,Me){return t.requestEmitHelper(r3t),Ht(r.createCallExpression(h("__param"),void 0,[r.createNumericLiteral(et+""),$e]),Me)}function b($e){const et=[r.createPropertyAssignment(r.createIdentifier("kind"),r.createStringLiteral("class")),r.createPropertyAssignment(r.createIdentifier("name"),$e.name),r.createPropertyAssignment(r.createIdentifier("metadata"),$e.metadata)];return r.createObjectLiteralExpression(et)}function T($e){const et=$e.computed?r.createElementAccessExpression(r.createIdentifier("obj"),$e.name):r.createPropertyAccessExpression(r.createIdentifier("obj"),$e.name);return r.createPropertyAssignment("get",r.createArrowFunction(void 0,void 0,[r.createParameterDeclaration(void 0,void 0,r.createIdentifier("obj"))],void 0,void 0,et))}function E($e){const et=$e.computed?r.createElementAccessExpression(r.createIdentifier("obj"),$e.name):r.createPropertyAccessExpression(r.createIdentifier("obj"),$e.name);return r.createPropertyAssignment("set",r.createArrowFunction(void 0,void 0,[r.createParameterDeclaration(void 0,void 0,r.createIdentifier("obj")),r.createParameterDeclaration(void 0,void 0,r.createIdentifier("value"))],void 0,void 0,r.createBlock([r.createExpressionStatement(r.createAssignment(et,r.createIdentifier("value")))])))}function N($e){const et=$e.computed?$e.name:ot($e.name)?r.createStringLiteralFromNode($e.name):$e.name;return r.createPropertyAssignment("has",r.createArrowFunction(void 0,void 0,[r.createParameterDeclaration(void 0,void 0,r.createIdentifier("obj"))],void 0,void 0,r.createBinaryExpression(et,103,r.createIdentifier("obj"))))}function R($e,et){const Me=[];return Me.push(N($e)),et.get&&Me.push(T($e)),et.set&&Me.push(E($e)),r.createObjectLiteralExpression(Me)}function F($e){const et=[r.createPropertyAssignment(r.createIdentifier("kind"),r.createStringLiteral($e.kind)),r.createPropertyAssignment(r.createIdentifier("name"),$e.name.computed?$e.name.name:r.createStringLiteralFromNode($e.name.name)),r.createPropertyAssignment(r.createIdentifier("static"),$e.static?r.createTrue():r.createFalse()),r.createPropertyAssignment(r.createIdentifier("private"),$e.private?r.createTrue():r.createFalse()),r.createPropertyAssignment(r.createIdentifier("access"),R($e.name,$e.access)),r.createPropertyAssignment(r.createIdentifier("metadata"),$e.metadata)];return r.createObjectLiteralExpression(et)}function H($e){return $e.kind==="class"?b($e):F($e)}function U($e,et,Me,ut,wt,Et){return t.requestEmitHelper(s3t),r.createCallExpression(h("__esDecorate"),void 0,[$e??r.createNull(),et??r.createNull(),Me,H(ut),wt,Et])}function q($e,et,Me){return t.requestEmitHelper(o3t),r.createCallExpression(h("__runInitializers"),void 0,Me?[$e,et,Me]:[$e,et])}function X($e){return Ja(t.getCompilerOptions())>=2?r.createCallExpression(r.createPropertyAccessExpression(r.createIdentifier("Object"),"assign"),void 0,$e):(t.requestEmitHelper(a3t),r.createCallExpression(h("__assign"),void 0,$e))}function Z($e){return t.requestEmitHelper(fX),r.createCallExpression(h("__await"),void 0,[$e])}function Q($e,et){return t.requestEmitHelper(fX),t.requestEmitHelper(c3t),($e.emitNode||($e.emitNode={})).flags|=1572864,r.createCallExpression(h("__asyncGenerator"),void 0,[et?r.createThis():r.createVoidZero(),r.createIdentifier("arguments"),$e])}function re($e){return t.requestEmitHelper(fX),t.requestEmitHelper(l3t),r.createCallExpression(h("__asyncDelegator"),void 0,[$e])}function oe($e){return t.requestEmitHelper(u3t),r.createCallExpression(h("__asyncValues"),void 0,[$e])}function pe($e,et,Me,ut){t.requestEmitHelper(d3t);const wt=[];let Et=0;for(let dt=0;dt<et.length-1;dt++){const zt=Mle(et[dt]);if(zt)if(Ka(zt)){j.assertIsDefined(Me,"Encountered computed property name but 'computedTempVariables' argument was not provided.");const Ei=Me[Et];Et++,wt.push(r.createConditionalExpression(r.createTypeCheck(Ei,"symbol"),void 0,Ei,void 0,r.createAdd(Ei,r.createStringLiteral(""))))}else wt.push(r.createStringLiteralFromNode(zt))}return r.createCallExpression(h("__rest"),void 0,[$e,Ht(r.createArrayLiteralExpression(wt),ut)])}function de($e,et,Me,ut,wt){t.requestEmitHelper(f3t);const Et=r.createFunctionExpression(void 0,r.createToken(42),void 0,void 0,ut??[],void 0,wt);return(Et.emitNode||(Et.emitNode={})).flags|=1572864,r.createCallExpression(h("__awaiter"),void 0,[$e?r.createThis():r.createVoidZero(),et??r.createVoidZero(),Me?yH(r,Me):r.createVoidZero(),Et])}function ue($e){return t.requestEmitHelper(h3t),r.createCallExpression(h("__extends"),void 0,[$e,r.createUniqueName("_super",48)])}function Ie($e,et){return t.requestEmitHelper(_3t),r.createCallExpression(h("__makeTemplateObject"),void 0,[$e,et])}function we($e,et,Me){return t.requestEmitHelper(m3t),r.createCallExpression(h("__spreadArray"),void 0,[$e,et,Me?a():u()])}function he($e){return t.requestEmitHelper(g3t),r.createCallExpression(h("__propKey"),void 0,[$e])}function Ae($e,et,Me){return t.requestEmitHelper(y3t),t.factory.createCallExpression(h("__setFunctionName"),void 0,Me?[$e,et,t.factory.createStringLiteral(Me)]:[$e,et])}function ke($e){return t.requestEmitHelper(v3t),r.createCallExpression(h("__values"),void 0,[$e])}function Te($e,et){return t.requestEmitHelper(p3t),r.createCallExpression(h("__read"),void 0,et!==void 0?[$e,r.createNumericLiteral(et+"")]:[$e])}function De($e){return t.requestEmitHelper(b3t),r.createCallExpression(h("__generator"),void 0,[r.createThis(),$e])}function qe($e){return t.requestEmitHelper(DQe),r.createCallExpression(h("__importStar"),void 0,[$e])}function se(){return t.requestEmitHelper(DQe),h("__importStar")}function Ne($e){return t.requestEmitHelper(S3t),r.createCallExpression(h("__importDefault"),void 0,[$e])}function Oe($e,et=r.createIdentifier("exports")){return t.requestEmitHelper(w3t),t.requestEmitHelper(TEe),r.createCallExpression(h("__exportStar"),void 0,[$e,et])}function He($e,et,Me,ut){t.requestEmitHelper(x3t);let wt;return ut?wt=[$e,et,r.createStringLiteral(Me),ut]:wt=[$e,et,r.createStringLiteral(Me)],r.createCallExpression(h("__classPrivateFieldGet"),void 0,wt)}function Pe($e,et,Me,ut,wt){t.requestEmitHelper(k3t);let Et;return wt?Et=[$e,et,Me,r.createStringLiteral(ut),wt]:Et=[$e,et,Me,r.createStringLiteral(ut)],r.createCallExpression(h("__classPrivateFieldSet"),void 0,Et)}function We($e,et){return t.requestEmitHelper(T3t),r.createCallExpression(h("__classPrivateFieldIn"),void 0,[$e,et])}function ze($e,et,Me){return t.requestEmitHelper(D3t),r.createCallExpression(h("__addDisposableResource"),void 0,[$e,et,Me?r.createTrue():r.createFalse()])}function Nt($e){return t.requestEmitHelper(E3t),r.createCallExpression(h("__disposeResources"),void 0,[$e])}}function kEe(t,r){return t===r||t.priority===r.priority?0:t.priority===void 0?1:r.priority===void 0?-1:_l(t.priority,r.priority)}function TQe(t,...r){return a=>{let u="";for(let h=0;h<r.length;h++)u+=t[h],u+=a(r[h]);return u+=t[t.length-1],u}}var i3t={name:"typescript:decorate",importName:"__decorate",scoped:!1,priority:2,text:`
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
+ };`},n3t={name:"typescript:metadata",importName:"__metadata",scoped:!1,priority:3,text:`
+ var __metadata = (this && this.__metadata) || function (k, v) {
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
+ };`},r3t={name:"typescript:param",importName:"__param",scoped:!1,priority:4,text:`
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
+ return function (target, key) { decorator(target, key, paramIndex); }
+ };`},s3t={name:"typescript:esDecorate",importName:"__esDecorate",scoped:!1,priority:2,text:`
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
+ var _, done = false;
+ for (var i = decorators.length - 1; i >= 0; i--) {
+ var context = {};
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
+ if (kind === "accessor") {
+ if (result === void 0) continue;
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
+ if (_ = accept(result.get)) descriptor.get = _;
+ if (_ = accept(result.set)) descriptor.set = _;
+ if (_ = accept(result.init)) initializers.unshift(_);
+ }
+ else if (_ = accept(result)) {
+ if (kind === "field") initializers.unshift(_);
+ else descriptor[key] = _;
+ }
+ }
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
+ done = true;
+ };`},o3t={name:"typescript:runInitializers",importName:"__runInitializers",scoped:!1,priority:2,text:`
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
+ var useValue = arguments.length > 2;
+ for (var i = 0; i < initializers.length; i++) {
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
+ }
+ return useValue ? value : void 0;
+ };`},a3t={name:"typescript:assign",importName:"__assign",scoped:!1,priority:1,text:`
+ var __assign = (this && this.__assign) || function () {
+ __assign = Object.assign || function(t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
+ t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };`},fX={name:"typescript:await",importName:"__await",scoped:!1,text:`
+ var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }`},c3t={name:"typescript:asyncGenerator",importName:"__asyncGenerator",scoped:!1,dependencies:[fX],text:`
+ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
+ return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
+ function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
+ function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
+ function fulfill(value) { resume("next", value); }
+ function reject(value) { resume("throw", value); }
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
+ };`},l3t={name:"typescript:asyncDelegator",importName:"__asyncDelegator",scoped:!1,dependencies:[fX],text:`
+ var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {
+ var i, p;
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
+ };`},u3t={name:"typescript:asyncValues",importName:"__asyncValues",scoped:!1,text:`
+ var __asyncValues = (this && this.__asyncValues) || function (o) {
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
+ var m = o[Symbol.asyncIterator], i;
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
+ };`},d3t={name:"typescript:rest",importName:"__rest",scoped:!1,text:`
+ var __rest = (this && this.__rest) || function (s, e) {
+ var t = {};
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+ t[p] = s[p];
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+ t[p[i]] = s[p[i]];
+ }
+ return t;
+ };`},f3t={name:"typescript:awaiter",importName:"__awaiter",scoped:!1,priority:5,text:`
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+ };`},h3t={name:"typescript:extends",importName:"__extends",scoped:!1,priority:0,text:`
+ var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+
+ return function (d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+ })();`},_3t={name:"typescript:makeTemplateObject",importName:"__makeTemplateObject",scoped:!1,priority:0,text:`
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
+ return cooked;
+ };`},p3t={name:"typescript:read",importName:"__read",scoped:!1,text:`
+ var __read = (this && this.__read) || function (o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+ };`},m3t={name:"typescript:spreadArray",importName:"__spreadArray",scoped:!1,text:`
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
+ if (ar || !(i in from)) {
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
+ ar[i] = from[i];
+ }
+ }
+ return to.concat(ar || Array.prototype.slice.call(from));
+ };`},g3t={name:"typescript:propKey",importName:"__propKey",scoped:!1,text:`
+ var __propKey = (this && this.__propKey) || function (x) {
+ return typeof x === "symbol" ? x : "".concat(x);
+ };`},y3t={name:"typescript:setFunctionName",importName:"__setFunctionName",scoped:!1,text:`
+ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
+ if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
+ };`},v3t={name:"typescript:values",importName:"__values",scoped:!1,text:`
+ var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+ };`},b3t={name:"typescript:generator",importName:"__generator",scoped:!1,priority:6,text:`
+ var __generator = (this && this.__generator) || function (thisArg, body) {
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+ function verb(n) { return function (v) { return step([n, v]); }; }
+ function step(op) {
+ if (f) throw new TypeError("Generator is already executing.");
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+ if (y = 0, t) op = [op[0] & 2, t.value];
+ switch (op[0]) {
+ case 0: case 1: t = op; break;
+ case 4: _.label++; return { value: op[1], done: false };
+ case 5: _.label++; y = op[1]; op = [0]; continue;
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
+ default:
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+ if (t[2]) _.ops.pop();
+ _.trys.pop(); continue;
+ }
+ op = body.call(thisArg, _);
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+ }
+ };`},TEe={name:"typescript:commonjscreatebinding",importName:"__createBinding",scoped:!1,priority:1,text:`
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+ }) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+ }));`},C3t={name:"typescript:commonjscreatevalue",importName:"__setModuleDefault",scoped:!1,priority:1,text:`
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+ }) : function(o, v) {
+ o["default"] = v;
+ });`},DQe={name:"typescript:commonjsimportstar",importName:"__importStar",scoped:!1,dependencies:[TEe,C3t],priority:2,text:`
+ var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+ };`},S3t={name:"typescript:commonjsimportdefault",importName:"__importDefault",scoped:!1,text:`
+ var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+ };`},w3t={name:"typescript:export-star",importName:"__exportStar",scoped:!1,dependencies:[TEe],priority:2,text:`
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+ };`},x3t={name:"typescript:classPrivateFieldGet",importName:"__classPrivateFieldGet",scoped:!1,text:`
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
+ };`},k3t={name:"typescript:classPrivateFieldSet",importName:"__classPrivateFieldSet",scoped:!1,text:`
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
+ if (kind === "m") throw new TypeError("Private method is not writable");
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
+ };`},T3t={name:"typescript:classPrivateFieldIn",importName:"__classPrivateFieldIn",scoped:!1,text:`
+ var __classPrivateFieldIn = (this && this.__classPrivateFieldIn) || function(state, receiver) {
+ if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
+ return typeof state === "function" ? receiver === state : state.has(receiver);
+ };`},D3t={name:"typescript:addDisposableResource",importName:"__addDisposableResource",scoped:!1,text:`
+ var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
+ if (value !== null && value !== void 0) {
+ if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
+ var dispose, inner;
+ if (async) {
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
+ dispose = value[Symbol.asyncDispose];
+ }
+ if (dispose === void 0) {
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
+ dispose = value[Symbol.dispose];
+ if (async) inner = dispose;
+ }
+ if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
+ if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
+ env.stack.push({ value: value, dispose: dispose, async: async });
+ }
+ else if (async) {
+ env.stack.push({ async: true });
+ }
+ return value;
+ };`},E3t={name:"typescript:disposeResources",importName:"__disposeResources",scoped:!1,text:`
+ var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
+ return function (env) {
+ function fail(e) {
+ env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
+ env.hasError = true;
+ }
+ var r, s = 0;
+ function next() {
+ while (r = env.stack.pop()) {
+ try {
+ if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
+ if (r.dispose) {
+ var result = r.dispose.call(r.value);
+ if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
+ }
+ else s |= 1;
+ }
+ catch (e) {
+ fail(e);
+ }
+ }
+ if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
+ if (env.hasError) throw env.error;
+ }
+ return next();
+ };
+ })(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
+ var e = new Error(message);
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
+ });`},hX={name:"typescript:async-super",scoped:!0,text:TQe`
+ const ${"_superIndex"} = name => super[name];`},_X={name:"typescript:advanced-async-super",scoped:!0,text:TQe`
+ const ${"_superIndex"} = (function (geti, seti) {
+ const cache = Object.create(null);
+ return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });
+ })(name => super[name], (name, value) => super[name] = value);`};function _7(t,r){return la(t)&&ot(t.expression)&&(Ya(t.expression)&8192)!==0&&t.expression.escapedText===r}function A_(t){return t.kind===9}function p7(t){return t.kind===10}function Ha(t){return t.kind===11}function RP(t){return t.kind===12}function ale(t){return t.kind===14}function TI(t){return t.kind===15}function FP(t){return t.kind===16}function cle(t){return t.kind===17}function pX(t){return t.kind===18}function mX(t){return t.kind===26}function DEe(t){return t.kind===28}function lle(t){return t.kind===40}function ule(t){return t.kind===41}function uH(t){return t.kind===42}function dH(t){return t.kind===54}function dx(t){return t.kind===58}function EEe(t){return t.kind===59}function gX(t){return t.kind===29}function IEe(t){return t.kind===39}function ot(t){return t.kind===80}function Vs(t){return t.kind===81}function BP(t){return t.kind===95}function yX(t){return t.kind===90}function m7(t){return t.kind===134}function NEe(t){return t.kind===131}function dle(t){return t.kind===135}function LEe(t){return t.kind===148}function WP(t){return t.kind===126}function PEe(t){return t.kind===128}function AEe(t){return t.kind===164}function OEe(t){return t.kind===129}function g7(t){return t.kind===108}function y7(t){return t.kind===102}function MEe(t){return t.kind===84}function o_(t){return t.kind===166}function Ka(t){return t.kind===167}function $l(t){return t.kind===168}function $s(t){return t.kind===169}function Fd(t){return t.kind===170}function O_(t){return t.kind===171}function Lo(t){return t.kind===172}function W1(t){return t.kind===173}function Nu(t){return t.kind===174}function gu(t){return t.kind===175}function iu(t){return t.kind===176}function um(t){return t.kind===177}function kp(t){return t.kind===178}function VP(t){return t.kind===179}function fH(t){return t.kind===180}function eD(t){return t.kind===181}function HP(t){return t.kind===182}function qp(t){return t.kind===183}function Hy(t){return t.kind===184}function v3(t){return t.kind===185}function tD(t){return t.kind===186}function a_(t){return t.kind===187}function hH(t){return t.kind===188}function jP(t){return t.kind===189}function b3(t){return t.kind===202}function vX(t){return t.kind===190}function bX(t){return t.kind===191}function fx(t){return t.kind===192}function zP(t){return t.kind===193}function iD(t){return t.kind===194}function DI(t){return t.kind===195}function EI(t){return t.kind===196}function C3(t){return t.kind===197}function t2(t){return t.kind===198}function nD(t){return t.kind===199}function II(t){return t.kind===200}function bS(t){return t.kind===201}function V1(t){return t.kind===205}function fle(t){return t.kind===204}function REe(t){return t.kind===203}function dm(t){return t.kind===206}function CS(t){return t.kind===207}function ec(t){return t.kind===208}function jf(t){return t.kind===209}function Aa(t){return t.kind===210}function Nr(t){return t.kind===211}function wl(t){return t.kind===212}function la(t){return t.kind===213}function rD(t){return t.kind===214}function i2(t){return t.kind===215}function hle(t){return t.kind===216}function c_(t){return t.kind===217}function ml(t){return t.kind===218}function xl(t){return t.kind===219}function FEe(t){return t.kind===220}function S3(t){return t.kind===221}function UP(t){return t.kind===222}function hx(t){return t.kind===223}function n2(t){return t.kind===224}function _le(t){return t.kind===225}function ur(t){return t.kind===226}function qP(t){return t.kind===227}function CX(t){return t.kind===228}function SX(t){return t.kind===229}function Km(t){return t.kind===230}function fd(t){return t.kind===231}function Bd(t){return t.kind===232}function Yb(t){return t.kind===233}function v7(t){return t.kind===234}function wX(t){return t.kind===238}function $P(t){return t.kind===235}function b7(t){return t.kind===236}function EQe(t){return t.kind===237}function ple(t){return t.kind===354}function C7(t){return t.kind===355}function w3(t){return t.kind===239}function BEe(t){return t.kind===240}function Xo(t){return t.kind===241}function Lu(t){return t.kind===243}function mle(t){return t.kind===242}function uf(t){return t.kind===244}function r2(t){return t.kind===245}function IQe(t){return t.kind===246}function gle(t){return t.kind===247}function s2(t){return t.kind===248}function xX(t){return t.kind===249}function _H(t){return t.kind===250}function NQe(t){return t.kind===251}function LQe(t){return t.kind===252}function Og(t){return t.kind===253}function WEe(t){return t.kind===254}function S7(t){return t.kind===255}function _x(t){return t.kind===256}function yle(t){return t.kind===257}function NI(t){return t.kind===258}function PQe(t){return t.kind===259}function _s(t){return t.kind===260}function Sf(t){return t.kind===261}function Wu(t){return t.kind===262}function hd(t){return t.kind===263}function zf(t){return t.kind===264}function Mg(t){return t.kind===265}function sD(t){return t.kind===266}function rd(t){return t.kind===267}function H1(t){return t.kind===268}function w7(t){return t.kind===269}function pH(t){return t.kind===270}function Wd(t){return t.kind===271}function du(t){return t.kind===272}function H0(t){return t.kind===273}function AQe(t){return t.kind===302}function VEe(t){return t.kind===300}function OQe(t){return t.kind===301}function LI(t){return t.kind===300}function HEe(t){return t.kind===301}function Jv(t){return t.kind===274}function jy(t){return t.kind===280}function j1(t){return t.kind===275}function l_(t){return t.kind===276}function Il(t){return t.kind===277}function Ju(t){return t.kind===278}function Xm(t){return t.kind===279}function vh(t){return t.kind===281}function kX(t){return t.kind===80||t.kind===11}function MQe(t){return t.kind===282}function jEe(t){return t.kind===353}function JP(t){return t.kind===356}function eC(t){return t.kind===283}function Gv(t){return t.kind===284}function PI(t){return t.kind===285}function z1(t){return t.kind===286}function oD(t){return t.kind===287}function aD(t){return t.kind===288}function AI(t){return t.kind===289}function zEe(t){return t.kind===290}function U1(t){return t.kind===291}function cD(t){return t.kind===292}function GP(t){return t.kind===293}function x7(t){return t.kind===294}function j0(t){return t.kind===295}function x3(t){return t.kind===296}function k7(t){return t.kind===297}function Tp(t){return t.kind===298}function lD(t){return t.kind===299}function _d(t){return t.kind===303}function lh(t){return t.kind===304}function Kv(t){return t.kind===305}function SS(t){return t.kind===306}function Os(t){return t.kind===307}function UEe(t){return t.kind===308}function o2(t){return t.kind===309}function T7(t){return t.kind===310}function a2(t){return t.kind===311}function qEe(t){return t.kind===324}function $Ee(t){return t.kind===325}function RQe(t){return t.kind===326}function JEe(t){return t.kind===312}function GEe(t){return t.kind===313}function k3(t){return t.kind===314}function TX(t){return t.kind===315}function vle(t){return t.kind===316}function T3(t){return t.kind===317}function DX(t){return t.kind===318}function FQe(t){return t.kind===319}function z0(t){return t.kind===320}function OI(t){return t.kind===322}function tC(t){return t.kind===323}function KP(t){return t.kind===328}function BQe(t){return t.kind===330}function KEe(t){return t.kind===332}function ble(t){return t.kind===338}function Cle(t){return t.kind===333}function Sle(t){return t.kind===334}function wle(t){return t.kind===335}function xle(t){return t.kind===336}function EX(t){return t.kind===337}function D3(t){return t.kind===339}function kle(t){return t.kind===331}function WQe(t){return t.kind===347}function mH(t){return t.kind===340}function Qm(t){return t.kind===341}function IX(t){return t.kind===342}function Tle(t){return t.kind===343}function D7(t){return t.kind===344}function Rg(t){return t.kind===345}function MI(t){return t.kind===346}function VQe(t){return t.kind===327}function XEe(t){return t.kind===348}function NX(t){return t.kind===329}function LX(t){return t.kind===350}function HQe(t){return t.kind===349}function q1(t){return t.kind===351}function E3(t){return t.kind===352}var E7=new WeakMap;function Dle(t,r){var a;const u=t.kind;return _G(u)?u===352?t._children:(a=E7.get(r))==null?void 0:a.get(t):w}function QEe(t,r,a){t.kind===352&&j.fail("Should not need to re-set the children of a SyntaxList.");let u=E7.get(r);return u===void 0&&(u=new WeakMap,E7.set(r,u)),u.set(t,a),a}function Ele(t,r){var a;t.kind===352&&j.fail("Did not expect to unset the children of a SyntaxList."),(a=E7.get(r))==null||a.delete(t)}function ZEe(t,r){const a=E7.get(t);a!==void 0&&(E7.delete(t),E7.set(r,a))}function gH(t){return t.createExportDeclaration(void 0,!1,t.createNamedExports([]),void 0)}function RI(t,r,a,u){if(Ka(a))return Ht(t.createElementAccessExpression(r,a.expression),u);{const h=Ht(Mv(a)?t.createPropertyAccessExpression(r,a):t.createElementAccessExpression(r,a),a);return F1(h,128),h}}function YEe(t,r){const a=l2.createIdentifier(t||"React");return _c(a,Mo(r)),a}function eIe(t,r,a){if(o_(r)){const u=eIe(t,r.left,a),h=t.createIdentifier(Fr(r.right));return h.escapedText=r.right.escapedText,t.createPropertyAccessExpression(u,h)}else return YEe(Fr(r),a)}function Ile(t,r,a,u){return r?eIe(t,r,u):t.createPropertyAccessExpression(YEe(a,u),"createElement")}function I3t(t,r,a,u){return r?eIe(t,r,u):t.createPropertyAccessExpression(YEe(a,u),"Fragment")}function tIe(t,r,a,u,h,p){const g=[a];if(u&&g.push(u),h&&h.length>0)if(u||g.push(t.createNull()),h.length>1)for(const C of h)bh(C),g.push(C);else g.push(h[0]);return Ht(t.createCallExpression(r,void 0,g),p)}function iIe(t,r,a,u,h,p,g){const b=[I3t(t,a,u,p),t.createNull()];if(h&&h.length>0)if(h.length>1)for(const T of h)bh(T),b.push(T);else b.push(h[0]);return Ht(t.createCallExpression(Ile(t,r,u,p),void 0,b),g)}function Nle(t,r,a){if(Sf(r)){const u=ya(r.declarations),h=t.updateVariableDeclaration(u,u.name,void 0,void 0,a);return Ht(t.createVariableStatement(void 0,t.updateVariableDeclarationList(r,[h])),r)}else{const u=Ht(t.createAssignment(r,a),r);return Ht(t.createExpressionStatement(u),r)}}function yH(t,r){if(o_(r)){const a=yH(t,r.left),u=_c(Ht(t.cloneNode(r.right),r.right),r.right.parent);return Ht(t.createPropertyAccessExpression(a,u),r)}else return _c(Ht(t.cloneNode(r),r),r.parent)}function Lle(t,r){return ot(r)?t.createStringLiteralFromNode(r):Ka(r)?_c(Ht(t.cloneNode(r.expression),r.expression),r.expression.parent):_c(Ht(t.cloneNode(r),r),r.parent)}function N3t(t,r,a,u,h){const{firstAccessor:p,getAccessor:g,setAccessor:C}=nx(r,a);if(a===p)return Ht(t.createObjectDefinePropertyCall(u,Lle(t,a.name),t.createPropertyDescriptor({enumerable:t.createFalse(),configurable:!0,get:g&&Ht(Ir(t.createFunctionExpression(PT(g),void 0,void 0,void 0,g.parameters,void 0,g.body),g),g),set:C&&Ht(Ir(t.createFunctionExpression(PT(C),void 0,void 0,void 0,C.parameters,void 0,C.body),C),C)},!h)),p)}function L3t(t,r,a){return Ir(Ht(t.createAssignment(RI(t,a,r.name,r.name),r.initializer),r),r)}function P3t(t,r,a){return Ir(Ht(t.createAssignment(RI(t,a,r.name,r.name),t.cloneNode(r.name)),r),r)}function A3t(t,r,a){return Ir(Ht(t.createAssignment(RI(t,a,r.name,r.name),Ir(Ht(t.createFunctionExpression(PT(r),r.asteriskToken,void 0,void 0,r.parameters,void 0,r.body),r),r)),r),r)}function nIe(t,r,a,u){switch(a.name&&Vs(a.name)&&j.failBadSyntaxKind(a.name,"Private identifiers are not allowed in object literals."),a.kind){case 177:case 178:return N3t(t,r.properties,a,u,!!r.multiLine);case 303:return L3t(t,a,u);case 304:return P3t(t,a,u);case 174:return A3t(t,a,u)}}function PX(t,r,a,u,h){const p=r.operator;j.assert(p===46||p===47,"Expected 'node' to be a pre- or post-increment or pre- or post-decrement expression");const g=t.createTempVariable(u);a=t.createAssignment(g,a),Ht(a,r.operand);let C=n2(r)?t.createPrefixUnaryExpression(p,g):t.createPostfixUnaryExpression(g,p);return Ht(C,r),h&&(C=t.createAssignment(h,C),Ht(C,r)),a=t.createComma(a,C),Ht(a,r),_le(r)&&(a=t.createComma(a,g),Ht(a,r)),a}function Ple(t){return(Ya(t)&65536)!==0}function iC(t){return(Ya(t)&32768)!==0}function AX(t){return(Ya(t)&16384)!==0}function jQe(t){return Ha(t.expression)&&t.expression.text==="use strict"}function Ale(t){for(const r of t)if(I1(r)){if(jQe(r))return r}else break}function rIe(t){const r=Ra(t);return r!==void 0&&I1(r)&&jQe(r)}function vH(t){return t.kind===226&&t.operatorToken.kind===28}function I7(t){return vH(t)||C7(t)}function FI(t){return c_(t)&&nr(t)&&!!Fk(t)}function N7(t){const r=Bk(t);return j.assertIsDefined(r),r}function OX(t,r=31){switch(t.kind){case 217:return r&-2147483648&&FI(t)?!1:(r&1)!==0;case 216:case 234:case 238:return(r&2)!==0;case 233:return(r&16)!==0;case 235:return(r&4)!==0;case 354:return(r&8)!==0}return!1}function Vu(t,r=31){for(;OX(t,r);)t=t.expression;return t}function sIe(t,r=31){let a=t.parent;for(;OX(a,r);)a=a.parent,j.assert(a);return a}function bh(t){return lX(t,!0)}function MX(t){const r=Ql(t,Os),a=r&&r.emitNode;return a&&a.externalHelpersModuleName}function oIe(t){const r=Ql(t,Os),a=r&&r.emitNode;return!!a&&(!!a.externalHelpersModuleName||!!a.externalHelpers)}function Ole(t,r,a,u,h,p,g){if(u.importHelpers&&aP(a,u)){let C;const b=zh(u);if(b>=5&&b<=99||jI(a,u)===99){const T=dX(a);if(T){const E=[];for(const N of T)if(!N.scoped){const R=N.importName;R&&mu(E,R)}if(Ft(E)){E.sort(sh),C=t.createNamedImports(qt(E,F=>PG(a,F)?t.createImportSpecifier(!1,void 0,t.createIdentifier(F)):t.createImportSpecifier(!1,t.createIdentifier(F),r.getUnscopedHelperName(F))));const N=Ql(a,Os),R=ch(N);R.externalHelpers=!0}}}else{const T=O3t(t,a,u,h,p||g);T&&(C=t.createNamespaceImport(T))}if(C){const T=t.createImportDeclaration(void 0,t.createImportClause(!1,void 0,C),t.createStringLiteral(jk),void 0);return AP(T,2),T}}}function O3t(t,r,a,u,h){if(a.importHelpers&&aP(r,a)){const p=MX(r);if(p)return p;let g=(u||zv(a)&&h)&&e5(r,a)<4;if(!g){const C=dX(r);if(C){for(const b of C)if(!b.scoped){g=!0;break}}}if(g){const C=Ql(r,Os),b=ch(C);return b.externalHelpersModuleName||(b.externalHelpersModuleName=t.createUniqueName(jk))}}}function I3(t,r,a){const u=Y6(r);if(u&&!hP(r)&&!OG(r)){const h=u.name;return h.kind===11?t.getGeneratedNameForNode(r):zl(h)?h:t.createIdentifier(RT(a,h)||Fr(h))}if(r.kind===272&&r.importClause||r.kind===278&&r.moduleSpecifier)return t.getGeneratedNameForNode(r)}function XP(t,r,a,u,h,p){const g=fP(r);if(g&&Ha(g))return R3t(r,u,t,h,p)||M3t(t,g,a)||t.cloneNode(g)}function M3t(t,r,a){const u=a.renamedDependencies&&a.renamedDependencies.get(r.text);return u?t.createStringLiteral(u):void 0}function bH(t,r,a,u){if(r){if(r.moduleName)return t.createStringLiteral(r.moduleName);if(!r.isDeclarationFile&&u.outFile)return t.createStringLiteral(cce(a,r.fileName))}}function R3t(t,r,a,u,h){return bH(a,u.getExternalModuleFileFromDeclaration(t),r,h)}function CH(t){if(WW(t))return t.initializer;if(_d(t)){const r=t.initializer;return lf(r,!0)?r.right:void 0}if(lh(t))return t.objectAssignmentInitializer;if(lf(t,!0))return t.right;if(Km(t))return CH(t.expression)}function px(t){if(WW(t))return t.name;if(Ub(t)){switch(t.kind){case 303:return px(t.initializer);case 304:return t.name;case 305:return px(t.expression)}return}return lf(t,!0)?px(t.left):Km(t)?px(t.expression):t}function RX(t){switch(t.kind){case 169:case 208:return t.dotDotDotToken;case 230:case 305:return t}}function Mle(t){const r=FX(t);return j.assert(!!r||Kv(t),"Invalid property name for binding element."),r}function FX(t){switch(t.kind){case 208:if(t.propertyName){const a=t.propertyName;return Vs(a)?j.failBadSyntaxKind(a):Ka(a)&&zQe(a.expression)?a.expression:a}break;case 303:if(t.name){const a=t.name;return Vs(a)?j.failBadSyntaxKind(a):Ka(a)&&zQe(a.expression)?a.expression:a}break;case 305:return t.name&&Vs(t.name)?j.failBadSyntaxKind(t.name):t.name}const r=px(t);if(r&&id(r))return r}function zQe(t){const r=t.kind;return r===11||r===9}function N3(t){switch(t.kind){case 206:case 207:case 209:return t.elements;case 210:return t.properties}}function Rle(t){if(t){let r=t;for(;;){if(ot(r)||!r.body)return ot(r)?r:r.name;r=r.body}}}function UQe(t){const r=t.kind;return r===176||r===178}function aIe(t){const r=t.kind;return r===176||r===177||r===178}function Fle(t){const r=t.kind;return r===303||r===304||r===262||r===176||r===181||r===175||r===282||r===243||r===264||r===265||r===266||r===267||r===271||r===272||r===270||r===278||r===277}function cIe(t){const r=t.kind;return r===175||r===303||r===304||r===282||r===270}function lIe(t){return dx(t)||dH(t)}function uIe(t){return ot(t)||C3(t)}function dIe(t){return LEe(t)||lle(t)||ule(t)}function fIe(t){return dx(t)||lle(t)||ule(t)}function hIe(t){return ot(t)||Ha(t)}function F3t(t){return t===43}function B3t(t){return t===42||t===44||t===45}function W3t(t){return F3t(t)||B3t(t)}function V3t(t){return t===40||t===41}function H3t(t){return V3t(t)||W3t(t)}function j3t(t){return t===48||t===49||t===50}function Ble(t){return j3t(t)||H3t(t)}function z3t(t){return t===30||t===33||t===32||t===34||t===104||t===103}function U3t(t){return z3t(t)||Ble(t)}function q3t(t){return t===35||t===37||t===36||t===38}function $3t(t){return q3t(t)||U3t(t)}function J3t(t){return t===51||t===52||t===53}function G3t(t){return J3t(t)||$3t(t)}function K3t(t){return t===56||t===57}function X3t(t){return K3t(t)||G3t(t)}function Q3t(t){return t===61||X3t(t)||Gb(t)}function Z3t(t){return Q3t(t)||t===28}function _Ie(t){return Z3t(t.kind)}var Wle;(t=>{function r(E,N,R,F,H,U,q){const X=N>0?H[N-1]:void 0;return j.assertEqual(R[N],r),H[N]=E.onEnter(F[N],X,q),R[N]=C(E,r),N}t.enter=r;function a(E,N,R,F,H,U,q){j.assertEqual(R[N],a),j.assertIsDefined(E.onLeft),R[N]=C(E,a);const X=E.onLeft(F[N].left,H[N],F[N]);return X?(T(N,F,X),b(N,R,F,H,X)):N}t.left=a;function u(E,N,R,F,H,U,q){return j.assertEqual(R[N],u),j.assertIsDefined(E.onOperator),R[N]=C(E,u),E.onOperator(F[N].operatorToken,H[N],F[N]),N}t.operator=u;function h(E,N,R,F,H,U,q){j.assertEqual(R[N],h),j.assertIsDefined(E.onRight),R[N]=C(E,h);const X=E.onRight(F[N].right,H[N],F[N]);return X?(T(N,F,X),b(N,R,F,H,X)):N}t.right=h;function p(E,N,R,F,H,U,q){j.assertEqual(R[N],p),R[N]=C(E,p);const X=E.onExit(F[N],H[N]);if(N>0){if(N--,E.foldState){const Z=R[N]===p?"right":"left";H[N]=E.foldState(H[N],X,Z)}}else U.value=X;return N}t.exit=p;function g(E,N,R,F,H,U,q){return j.assertEqual(R[N],g),N}t.done=g;function C(E,N){switch(N){case r:if(E.onLeft)return a;case a:if(E.onOperator)return u;case u:if(E.onRight)return h;case h:return p;case p:return g;case g:return g;default:j.fail("Invalid state")}}t.nextState=C;function b(E,N,R,F,H){return E++,N[E]=r,R[E]=H,F[E]=void 0,E}function T(E,N,R){if(j.shouldAssert(2))for(;E>=0;)j.assert(N[E]!==R,"Circular traversal detected."),E--}})(Wle||(Wle={}));var Y3t=class{constructor(t,r,a,u,h,p){this.onEnter=t,this.onLeft=r,this.onOperator=a,this.onRight=u,this.onExit=h,this.foldState=p}};function BX(t,r,a,u,h,p){const g=new Y3t(t,r,a,u,h,p);return C;function C(b,T){const E={value:void 0},N=[Wle.enter],R=[b],F=[void 0];let H=0;for(;N[H]!==Wle.done;)H=N[H](g,H,N,R,F,E,T);return j.assertEqual(H,0),E.value}}function eOt(t){return t===95||t===90}function SH(t){const r=t.kind;return eOt(r)}function pIe(t,r){if(r!==void 0)return r.length===0?r:Ht(t.createNodeArray([],r.hasTrailingComma),r)}function wH(t){var r;const a=t.emitNode.autoGenerate;if(a.flags&4){const u=a.id;let h=t,p=h.original;for(;p;){h=p;const g=(r=h.emitNode)==null?void 0:r.autoGenerate;if(Mv(h)&&(g===void 0||g.flags&4&&g.id!==u))break;p=h.original}return h}return t}function L3(t,r){return typeof t=="object"?c2(!1,t.prefix,t.node,t.suffix,r):typeof t=="string"?t.length>0&&t.charCodeAt(0)===35?t.slice(1):t:""}function tOt(t,r){return typeof t=="string"?t:iOt(t,j.checkDefined(r))}function iOt(t,r){return uI(t)?r(t).slice(1):zl(t)?r(t):Vs(t)?t.escapedText.slice(1):Fr(t)}function c2(t,r,a,u,h){return r=L3(r,h),u=L3(u,h),a=tOt(a,h),`${t?"#":""}${r}${a}${u}`}function Vle(t,r,a,u){return t.updatePropertyDeclaration(r,a,t.getGeneratedPrivateNameForNode(r.name,void 0,"_accessor_storage"),void 0,void 0,u)}function mIe(t,r,a,u,h=t.createThis()){return t.createGetAccessorDeclaration(a,u,[],void 0,t.createBlock([t.createReturnStatement(t.createPropertyAccessExpression(h,t.getGeneratedPrivateNameForNode(r.name,void 0,"_accessor_storage")))]))}function gIe(t,r,a,u,h=t.createThis()){return t.createSetAccessorDeclaration(a,u,[t.createParameterDeclaration(void 0,void 0,"value")],t.createBlock([t.createExpressionStatement(t.createAssignment(t.createPropertyAccessExpression(h,t.getGeneratedPrivateNameForNode(r.name,void 0,"_accessor_storage")),t.createIdentifier("value")))]))}function WX(t){let r=t.expression;for(;;){if(r=Vu(r),C7(r)){r=va(r.elements);continue}if(vH(r)){r=r.right;continue}if(lf(r,!0)&&zl(r.left))return r;break}}function nOt(t){return c_(t)&&cl(t)&&!t.emitNode}function VX(t,r){if(nOt(t))VX(t.expression,r);else if(vH(t))VX(t.left,r),VX(t.right,r);else if(C7(t))for(const a of t.elements)VX(a,r);else r.push(t)}function yIe(t){const r=[];return VX(t,r),r}function xH(t){if(t.transformFlags&65536)return!0;if(t.transformFlags&128)for(const r of N3(t)){const a=px(r);if(a&&S8(a)&&(a.transformFlags&65536||a.transformFlags&128&&xH(a)))return!0}return!1}function Ht(t,r){return r?V0(t,r.pos,r.end):t}function Fg(t){const r=t.kind;return r===168||r===169||r===171||r===172||r===173||r===174||r===176||r===177||r===178||r===181||r===185||r===218||r===219||r===231||r===243||r===262||r===263||r===264||r===265||r===266||r===267||r===271||r===272||r===277||r===278}function uD(t){const r=t.kind;return r===169||r===172||r===174||r===177||r===178||r===231||r===263}var qQe,$Qe,JQe,GQe,KQe,vIe={createBaseSourceFileNode:t=>new(KQe||(KQe=Hf.getSourceFileConstructor()))(t,-1,-1),createBaseIdentifierNode:t=>new(JQe||(JQe=Hf.getIdentifierConstructor()))(t,-1,-1),createBasePrivateIdentifierNode:t=>new(GQe||(GQe=Hf.getPrivateIdentifierConstructor()))(t,-1,-1),createBaseTokenNode:t=>new($Qe||($Qe=Hf.getTokenConstructor()))(t,-1,-1),createBaseNode:t=>new(qQe||(qQe=Hf.getNodeConstructor()))(t,-1,-1)},l2=rH(1,vIe);function Ti(t,r){return r&&t(r)}function Ms(t,r,a){if(a){if(r)return r(a);for(const u of a){const h=t(u);if(h)return h}}}function Hle(t,r){return t.charCodeAt(r+1)===42&&t.charCodeAt(r+2)===42&&t.charCodeAt(r+3)!==47}function kH(t){return O(t.statements,rOt)||sOt(t)}function rOt(t){return Fg(t)&&oOt(t,95)||Wd(t)&&eC(t.moduleReference)||du(t)||Il(t)||Ju(t)?t:void 0}function sOt(t){return t.flags&8388608?XQe(t):void 0}function XQe(t){return aOt(t)?t:Uo(t,XQe)}function oOt(t,r){return Ft(t.modifiers,a=>a.kind===r)}function aOt(t){return b7(t)&&t.keywordToken===102&&t.name.escapedText==="meta"}var cOt={166:function(r,a,u){return Ti(a,r.left)||Ti(a,r.right)},168:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.name)||Ti(a,r.constraint)||Ti(a,r.default)||Ti(a,r.expression)},304:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.name)||Ti(a,r.questionToken)||Ti(a,r.exclamationToken)||Ti(a,r.equalsToken)||Ti(a,r.objectAssignmentInitializer)},305:function(r,a,u){return Ti(a,r.expression)},169:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.dotDotDotToken)||Ti(a,r.name)||Ti(a,r.questionToken)||Ti(a,r.type)||Ti(a,r.initializer)},172:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.name)||Ti(a,r.questionToken)||Ti(a,r.exclamationToken)||Ti(a,r.type)||Ti(a,r.initializer)},171:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.name)||Ti(a,r.questionToken)||Ti(a,r.type)||Ti(a,r.initializer)},303:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.name)||Ti(a,r.questionToken)||Ti(a,r.exclamationToken)||Ti(a,r.initializer)},260:function(r,a,u){return Ti(a,r.name)||Ti(a,r.exclamationToken)||Ti(a,r.type)||Ti(a,r.initializer)},208:function(r,a,u){return Ti(a,r.dotDotDotToken)||Ti(a,r.propertyName)||Ti(a,r.name)||Ti(a,r.initializer)},181:function(r,a,u){return Ms(a,u,r.modifiers)||Ms(a,u,r.typeParameters)||Ms(a,u,r.parameters)||Ti(a,r.type)},185:function(r,a,u){return Ms(a,u,r.modifiers)||Ms(a,u,r.typeParameters)||Ms(a,u,r.parameters)||Ti(a,r.type)},184:function(r,a,u){return Ms(a,u,r.modifiers)||Ms(a,u,r.typeParameters)||Ms(a,u,r.parameters)||Ti(a,r.type)},179:QQe,180:QQe,174:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.asteriskToken)||Ti(a,r.name)||Ti(a,r.questionToken)||Ti(a,r.exclamationToken)||Ms(a,u,r.typeParameters)||Ms(a,u,r.parameters)||Ti(a,r.type)||Ti(a,r.body)},173:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.name)||Ti(a,r.questionToken)||Ms(a,u,r.typeParameters)||Ms(a,u,r.parameters)||Ti(a,r.type)},176:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.name)||Ms(a,u,r.typeParameters)||Ms(a,u,r.parameters)||Ti(a,r.type)||Ti(a,r.body)},177:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.name)||Ms(a,u,r.typeParameters)||Ms(a,u,r.parameters)||Ti(a,r.type)||Ti(a,r.body)},178:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.name)||Ms(a,u,r.typeParameters)||Ms(a,u,r.parameters)||Ti(a,r.type)||Ti(a,r.body)},262:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.asteriskToken)||Ti(a,r.name)||Ms(a,u,r.typeParameters)||Ms(a,u,r.parameters)||Ti(a,r.type)||Ti(a,r.body)},218:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.asteriskToken)||Ti(a,r.name)||Ms(a,u,r.typeParameters)||Ms(a,u,r.parameters)||Ti(a,r.type)||Ti(a,r.body)},219:function(r,a,u){return Ms(a,u,r.modifiers)||Ms(a,u,r.typeParameters)||Ms(a,u,r.parameters)||Ti(a,r.type)||Ti(a,r.equalsGreaterThanToken)||Ti(a,r.body)},175:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.body)},183:function(r,a,u){return Ti(a,r.typeName)||Ms(a,u,r.typeArguments)},182:function(r,a,u){return Ti(a,r.assertsModifier)||Ti(a,r.parameterName)||Ti(a,r.type)},186:function(r,a,u){return Ti(a,r.exprName)||Ms(a,u,r.typeArguments)},187:function(r,a,u){return Ms(a,u,r.members)},188:function(r,a,u){return Ti(a,r.elementType)},189:function(r,a,u){return Ms(a,u,r.elements)},192:ZQe,193:ZQe,194:function(r,a,u){return Ti(a,r.checkType)||Ti(a,r.extendsType)||Ti(a,r.trueType)||Ti(a,r.falseType)},195:function(r,a,u){return Ti(a,r.typeParameter)},205:function(r,a,u){return Ti(a,r.argument)||Ti(a,r.attributes)||Ti(a,r.qualifier)||Ms(a,u,r.typeArguments)},302:function(r,a,u){return Ti(a,r.assertClause)},196:YQe,198:YQe,199:function(r,a,u){return Ti(a,r.objectType)||Ti(a,r.indexType)},200:function(r,a,u){return Ti(a,r.readonlyToken)||Ti(a,r.typeParameter)||Ti(a,r.nameType)||Ti(a,r.questionToken)||Ti(a,r.type)||Ms(a,u,r.members)},201:function(r,a,u){return Ti(a,r.literal)},202:function(r,a,u){return Ti(a,r.dotDotDotToken)||Ti(a,r.name)||Ti(a,r.questionToken)||Ti(a,r.type)},206:eZe,207:eZe,209:function(r,a,u){return Ms(a,u,r.elements)},210:function(r,a,u){return Ms(a,u,r.properties)},211:function(r,a,u){return Ti(a,r.expression)||Ti(a,r.questionDotToken)||Ti(a,r.name)},212:function(r,a,u){return Ti(a,r.expression)||Ti(a,r.questionDotToken)||Ti(a,r.argumentExpression)},213:tZe,214:tZe,215:function(r,a,u){return Ti(a,r.tag)||Ti(a,r.questionDotToken)||Ms(a,u,r.typeArguments)||Ti(a,r.template)},216:function(r,a,u){return Ti(a,r.type)||Ti(a,r.expression)},217:function(r,a,u){return Ti(a,r.expression)},220:function(r,a,u){return Ti(a,r.expression)},221:function(r,a,u){return Ti(a,r.expression)},222:function(r,a,u){return Ti(a,r.expression)},224:function(r,a,u){return Ti(a,r.operand)},229:function(r,a,u){return Ti(a,r.asteriskToken)||Ti(a,r.expression)},223:function(r,a,u){return Ti(a,r.expression)},225:function(r,a,u){return Ti(a,r.operand)},226:function(r,a,u){return Ti(a,r.left)||Ti(a,r.operatorToken)||Ti(a,r.right)},234:function(r,a,u){return Ti(a,r.expression)||Ti(a,r.type)},235:function(r,a,u){return Ti(a,r.expression)},238:function(r,a,u){return Ti(a,r.expression)||Ti(a,r.type)},236:function(r,a,u){return Ti(a,r.name)},227:function(r,a,u){return Ti(a,r.condition)||Ti(a,r.questionToken)||Ti(a,r.whenTrue)||Ti(a,r.colonToken)||Ti(a,r.whenFalse)},230:function(r,a,u){return Ti(a,r.expression)},241:iZe,268:iZe,307:function(r,a,u){return Ms(a,u,r.statements)||Ti(a,r.endOfFileToken)},243:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.declarationList)},261:function(r,a,u){return Ms(a,u,r.declarations)},244:function(r,a,u){return Ti(a,r.expression)},245:function(r,a,u){return Ti(a,r.expression)||Ti(a,r.thenStatement)||Ti(a,r.elseStatement)},246:function(r,a,u){return Ti(a,r.statement)||Ti(a,r.expression)},247:function(r,a,u){return Ti(a,r.expression)||Ti(a,r.statement)},248:function(r,a,u){return Ti(a,r.initializer)||Ti(a,r.condition)||Ti(a,r.incrementor)||Ti(a,r.statement)},249:function(r,a,u){return Ti(a,r.initializer)||Ti(a,r.expression)||Ti(a,r.statement)},250:function(r,a,u){return Ti(a,r.awaitModifier)||Ti(a,r.initializer)||Ti(a,r.expression)||Ti(a,r.statement)},251:nZe,252:nZe,253:function(r,a,u){return Ti(a,r.expression)},254:function(r,a,u){return Ti(a,r.expression)||Ti(a,r.statement)},255:function(r,a,u){return Ti(a,r.expression)||Ti(a,r.caseBlock)},269:function(r,a,u){return Ms(a,u,r.clauses)},296:function(r,a,u){return Ti(a,r.expression)||Ms(a,u,r.statements)},297:function(r,a,u){return Ms(a,u,r.statements)},256:function(r,a,u){return Ti(a,r.label)||Ti(a,r.statement)},257:function(r,a,u){return Ti(a,r.expression)},258:function(r,a,u){return Ti(a,r.tryBlock)||Ti(a,r.catchClause)||Ti(a,r.finallyBlock)},299:function(r,a,u){return Ti(a,r.variableDeclaration)||Ti(a,r.block)},170:function(r,a,u){return Ti(a,r.expression)},263:rZe,231:rZe,264:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.name)||Ms(a,u,r.typeParameters)||Ms(a,u,r.heritageClauses)||Ms(a,u,r.members)},265:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.name)||Ms(a,u,r.typeParameters)||Ti(a,r.type)},266:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.name)||Ms(a,u,r.members)},306:function(r,a,u){return Ti(a,r.name)||Ti(a,r.initializer)},267:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.name)||Ti(a,r.body)},271:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.name)||Ti(a,r.moduleReference)},272:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.importClause)||Ti(a,r.moduleSpecifier)||Ti(a,r.attributes)},273:function(r,a,u){return Ti(a,r.name)||Ti(a,r.namedBindings)},300:function(r,a,u){return Ms(a,u,r.elements)},301:function(r,a,u){return Ti(a,r.name)||Ti(a,r.value)},270:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.name)},274:function(r,a,u){return Ti(a,r.name)},280:function(r,a,u){return Ti(a,r.name)},275:sZe,279:sZe,278:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.exportClause)||Ti(a,r.moduleSpecifier)||Ti(a,r.attributes)},276:oZe,281:oZe,277:function(r,a,u){return Ms(a,u,r.modifiers)||Ti(a,r.expression)},228:function(r,a,u){return Ti(a,r.head)||Ms(a,u,r.templateSpans)},239:function(r,a,u){return Ti(a,r.expression)||Ti(a,r.literal)},203:function(r,a,u){return Ti(a,r.head)||Ms(a,u,r.templateSpans)},204:function(r,a,u){return Ti(a,r.type)||Ti(a,r.literal)},167:function(r,a,u){return Ti(a,r.expression)},298:function(r,a,u){return Ms(a,u,r.types)},233:function(r,a,u){return Ti(a,r.expression)||Ms(a,u,r.typeArguments)},283:function(r,a,u){return Ti(a,r.expression)},282:function(r,a,u){return Ms(a,u,r.modifiers)},355:function(r,a,u){return Ms(a,u,r.elements)},284:function(r,a,u){return Ti(a,r.openingElement)||Ms(a,u,r.children)||Ti(a,r.closingElement)},288:function(r,a,u){return Ti(a,r.openingFragment)||Ms(a,u,r.children)||Ti(a,r.closingFragment)},285:aZe,286:aZe,292:function(r,a,u){return Ms(a,u,r.properties)},291:function(r,a,u){return Ti(a,r.name)||Ti(a,r.initializer)},293:function(r,a,u){return Ti(a,r.expression)},294:function(r,a,u){return Ti(a,r.dotDotDotToken)||Ti(a,r.expression)},287:function(r,a,u){return Ti(a,r.tagName)},295:function(r,a,u){return Ti(a,r.namespace)||Ti(a,r.name)},190:L7,191:L7,309:L7,315:L7,314:L7,316:L7,318:L7,317:function(r,a,u){return Ms(a,u,r.parameters)||Ti(a,r.type)},320:function(r,a,u){return(typeof r.comment=="string"?void 0:Ms(a,u,r.comment))||Ms(a,u,r.tags)},347:function(r,a,u){return Ti(a,r.tagName)||Ti(a,r.name)||(typeof r.comment=="string"?void 0:Ms(a,u,r.comment))},310:function(r,a,u){return Ti(a,r.name)},311:function(r,a,u){return Ti(a,r.left)||Ti(a,r.right)},341:cZe,348:cZe,330:function(r,a,u){return Ti(a,r.tagName)||(typeof r.comment=="string"?void 0:Ms(a,u,r.comment))},329:function(r,a,u){return Ti(a,r.tagName)||Ti(a,r.class)||(typeof r.comment=="string"?void 0:Ms(a,u,r.comment))},328:function(r,a,u){return Ti(a,r.tagName)||Ti(a,r.class)||(typeof r.comment=="string"?void 0:Ms(a,u,r.comment))},345:function(r,a,u){return Ti(a,r.tagName)||Ti(a,r.constraint)||Ms(a,u,r.typeParameters)||(typeof r.comment=="string"?void 0:Ms(a,u,r.comment))},346:function(r,a,u){return Ti(a,r.tagName)||(r.typeExpression&&r.typeExpression.kind===309?Ti(a,r.typeExpression)||Ti(a,r.fullName)||(typeof r.comment=="string"?void 0:Ms(a,u,r.comment)):Ti(a,r.fullName)||Ti(a,r.typeExpression)||(typeof r.comment=="string"?void 0:Ms(a,u,r.comment)))},338:function(r,a,u){return Ti(a,r.tagName)||Ti(a,r.fullName)||Ti(a,r.typeExpression)||(typeof r.comment=="string"?void 0:Ms(a,u,r.comment))},342:P7,344:P7,343:P7,340:P7,350:P7,349:P7,339:P7,323:function(r,a,u){return O(r.typeParameters,a)||O(r.parameters,a)||Ti(a,r.type)},324:bIe,325:bIe,326:bIe,322:function(r,a,u){return O(r.jsDocPropertyTags,a)},327:P3,332:P3,333:P3,334:P3,335:P3,336:P3,331:P3,337:P3,351:lOt,354:uOt};function QQe(t,r,a){return Ms(r,a,t.typeParameters)||Ms(r,a,t.parameters)||Ti(r,t.type)}function ZQe(t,r,a){return Ms(r,a,t.types)}function YQe(t,r,a){return Ti(r,t.type)}function eZe(t,r,a){return Ms(r,a,t.elements)}function tZe(t,r,a){return Ti(r,t.expression)||Ti(r,t.questionDotToken)||Ms(r,a,t.typeArguments)||Ms(r,a,t.arguments)}function iZe(t,r,a){return Ms(r,a,t.statements)}function nZe(t,r,a){return Ti(r,t.label)}function rZe(t,r,a){return Ms(r,a,t.modifiers)||Ti(r,t.name)||Ms(r,a,t.typeParameters)||Ms(r,a,t.heritageClauses)||Ms(r,a,t.members)}function sZe(t,r,a){return Ms(r,a,t.elements)}function oZe(t,r,a){return Ti(r,t.propertyName)||Ti(r,t.name)}function aZe(t,r,a){return Ti(r,t.tagName)||Ms(r,a,t.typeArguments)||Ti(r,t.attributes)}function L7(t,r,a){return Ti(r,t.type)}function cZe(t,r,a){return Ti(r,t.tagName)||(t.isNameFirst?Ti(r,t.name)||Ti(r,t.typeExpression):Ti(r,t.typeExpression)||Ti(r,t.name))||(typeof t.comment=="string"?void 0:Ms(r,a,t.comment))}function P7(t,r,a){return Ti(r,t.tagName)||Ti(r,t.typeExpression)||(typeof t.comment=="string"?void 0:Ms(r,a,t.comment))}function bIe(t,r,a){return Ti(r,t.name)}function P3(t,r,a){return Ti(r,t.tagName)||(typeof t.comment=="string"?void 0:Ms(r,a,t.comment))}function lOt(t,r,a){return Ti(r,t.tagName)||Ti(r,t.importClause)||Ti(r,t.moduleSpecifier)||Ti(r,t.attributes)||(typeof t.comment=="string"?void 0:Ms(r,a,t.comment))}function uOt(t,r,a){return Ti(r,t.expression)}function Uo(t,r,a){if(t===void 0||t.kind<=165)return;const u=cOt[t.kind];return u===void 0?void 0:u(t,r,a)}function QP(t,r,a){const u=lZe(t),h=[];for(;h.length<u.length;)h.push(t);for(;u.length!==0;){const p=u.pop(),g=h.pop();if(Ao(p)){if(a){const C=a(p,g);if(C){if(C==="skip")continue;return C}}for(let C=p.length-1;C>=0;--C)u.push(p[C]),h.push(g)}else{const C=r(p,g);if(C){if(C==="skip")continue;return C}if(p.kind>=166)for(const b of lZe(p))u.push(b),h.push(p)}}}function lZe(t){const r=[];return Uo(t,a,a),r;function a(u){r.unshift(u)}}function uZe(t){t.externalModuleIndicator=kH(t)}function ZP(t,r,a,u=!1,h){var p,g;(p=Zn)==null||p.push(Zn.Phase.Parse,"createSourceFile",{path:t},!0),ou("beforeParse");let C;const{languageVersion:b,setExternalModuleIndicator:T,impliedNodeFormat:E,jsDocParsingMode:N}=typeof a=="object"?a:{languageVersion:a};if(b===100)C=u2.parseSourceFile(t,r,b,void 0,u,6,Tc,N);else{const R=E===void 0?T:F=>(F.impliedNodeFormat=E,(T||uZe)(F));C=u2.parseSourceFile(t,r,b,void 0,u,h,R,N)}return ou("afterParse"),Wm("Parse","beforeParse","afterParse"),(g=Zn)==null||g.pop(),C}function YP(t,r){return u2.parseIsolatedEntityName(t,r)}function TH(t,r){return u2.parseJsonText(t,r)}function wd(t){return t.externalModuleIndicator!==void 0}function jle(t,r,a,u=!1){const h=zle.updateSourceFile(t,r,a,u);return h.flags|=t.flags&12582912,h}function CIe(t,r,a){const u=u2.JSDocParser.parseIsolatedJSDocComment(t,r,a);return u&&u.jsDoc&&u2.fixupParentReferences(u.jsDoc),u}function dZe(t,r,a){return u2.JSDocParser.parseJSDocTypeExpressionForTests(t,r,a)}var u2;(t=>{var r=Ov(99,!0),a=40960,u,h,p,g,C;function b(fe){return dt++,fe}var T={createBaseSourceFileNode:fe=>b(new C(fe,0,0)),createBaseIdentifierNode:fe=>b(new p(fe,0,0)),createBasePrivateIdentifierNode:fe=>b(new g(fe,0,0)),createBaseTokenNode:fe=>b(new h(fe,0,0)),createBaseNode:fe=>b(new u(fe,0,0))},E=rH(11,T),{createNodeArray:N,createNumericLiteral:R,createStringLiteral:F,createLiteralLikeNode:H,createIdentifier:U,createPrivateIdentifier:q,createToken:X,createArrayLiteralExpression:Z,createObjectLiteralExpression:Q,createPropertyAccessExpression:re,createPropertyAccessChain:oe,createElementAccessExpression:pe,createElementAccessChain:de,createCallExpression:ue,createCallChain:Ie,createNewExpression:we,createParenthesizedExpression:he,createBlock:Ae,createVariableStatement:ke,createExpressionStatement:Te,createIfStatement:De,createWhileStatement:qe,createForStatement:se,createForOfStatement:Ne,createVariableDeclaration:Oe,createVariableDeclarationList:He}=E,Pe,We,ze,Nt,$e,et,Me,ut,wt,Et,dt,zt,Ei,tn,xn,Pn,_i=!0,Fi=!1;function On(fe,Ke,mt,Xt,Si=!1,an,jr,Hs=0){var Cs;if(an=qK(fe,an),an===6){const no=qr(fe,Ke,mt,Xt,Si);return LH(no,(Cs=no.statements[0])==null?void 0:Cs.expression,no.parseDiagnostics,!1,void 0),no.referencedFiles=w,no.typeReferenceDirectives=w,no.libReferenceDirectives=w,no.amdDependencies=w,no.hasNoDefaultLib=!1,no.pragmas=I,no}Fs(fe,Ke,mt,Xt,an,Hs);const Ss=ls(mt,Si,an,jr||uZe,Hs);return ko(),Ss}t.parseSourceFile=On;function pn(fe,Ke){Fs("",fe,Ke,void 0,1,0),st();const mt=ve(!0),Xt=be()===1&&!Me.length;return ko(),Xt?mt:void 0}t.parseIsolatedEntityName=pn;function qr(fe,Ke,mt=2,Xt,Si=!1){Fs(fe,Ke,mt,Xt,6,0),We=Pn,st();const an=le();let jr,Hs;if(be()===1)jr=tc([],an,an),Hs=md();else{let no;for(;be()!==1;){let dc;switch(be()){case 23:dc=e1();break;case 112:case 97:case 106:dc=md();break;case 41:Di(()=>st()===9&&st()!==59)?dc=Nx():dc=O2();break;case 9:case 11:if(Di(()=>st()!==59)){dc=Zt();break}default:dc=O2();break}no&&Ao(no)?no.push(dc):no?no=[no,dc]:(no=dc,be()!==1&&ji(k.Unexpected_token))}const $c=Ao(no)?ki(Z(no),an):j.checkDefined(no),Jc=Te($c);ki(Jc,an),jr=tc([Jc],an),Hs=Jo(1,k.Unexpected_token)}const Cs=yi(fe,2,6,!1,jr,Hs,We,Tc);Si&&at(Cs),Cs.nodeCount=dt,Cs.identifierCount=Ei,Cs.identifiers=zt,Cs.parseDiagnostics=TP(Me,Cs),ut&&(Cs.jsDocDiagnostics=TP(ut,Cs));const Ss=Cs;return ko(),Ss}t.parseJsonText=qr;function Fs(fe,Ke,mt,Xt,Si,an){switch(u=Hf.getNodeConstructor(),h=Hf.getTokenConstructor(),p=Hf.getIdentifierConstructor(),g=Hf.getPrivateIdentifierConstructor(),C=Hf.getSourceFileConstructor(),Pe=ca(fe),ze=Ke,Nt=mt,wt=Xt,$e=Si,et=qV(Si),Me=[],tn=0,zt=new Map,Ei=0,dt=0,We=0,_i=!0,$e){case 1:case 2:Pn=524288;break;case 6:Pn=134742016;break;default:Pn=0;break}Fi=!1,r.setText(ze),r.setOnError(Gt),r.setScriptTarget(Nt),r.setLanguageVariant(et),r.setScriptKind($e),r.setJSDocParsingMode(an)}function ko(){r.clearCommentDirectives(),r.setText(""),r.setOnError(void 0),r.setScriptKind(0),r.setJSDocParsingMode(0),ze=void 0,Nt=void 0,wt=void 0,$e=void 0,et=void 0,We=0,Me=void 0,ut=void 0,tn=0,zt=void 0,xn=void 0,_i=!0}function ls(fe,Ke,mt,Xt,Si){const an=df(Pe);an&&(Pn|=33554432),We=Pn,st();const jr=sc(0,wm);j.assert(be()===1);const Hs=Ue(),Cs=Mn(md(),Hs),Ss=yi(Pe,fe,mt,an,jr,Cs,We,Xt);return qle(Ss,ze),$le(Ss,no),Ss.commentDirectives=r.getCommentDirectives(),Ss.nodeCount=dt,Ss.identifierCount=Ei,Ss.identifiers=zt,Ss.parseDiagnostics=TP(Me,Ss),Ss.jsDocParsingMode=Si,ut&&(Ss.jsDocDiagnostics=TP(ut,Ss)),Ke&&at(Ss),Ss;function no($c,Jc,dc){Me.push(kP(Pe,ze,$c,Jc,dc))}}let Qs=!1;function Mn(fe,Ke){if(!Ke)return fe;j.assert(!fe.jsDoc);const mt=es(Pae(fe,ze),Xt=>Nc.parseJSDocComment(fe,Xt.pos,Xt.end-Xt.pos));return mt.length&&(fe.jsDoc=mt),Qs&&(Qs=!1,fe.flags|=536870912),fe}function Zs(fe){const Ke=wt,mt=zle.createSyntaxCursor(fe);wt={currentNode:no};const Xt=[],Si=Me;Me=[];let an=0,jr=Cs(fe.statements,0);for(;jr!==-1;){const $c=fe.statements[an],Jc=fe.statements[jr];Sr(Xt,fe.statements,an,jr),an=Ss(fe.statements,jr);const dc=ct(Si,Dd=>Dd.start>=$c.pos),og=dc>=0?ct(Si,Dd=>Dd.start>=Jc.pos,dc):-1;dc>=0&&Sr(Me,Si,dc,og>=0?og:void 0),Xn(()=>{const Dd=Pn;for(Pn|=65536,r.resetTokenState(Jc.pos),st();be()!==1;){const xm=r.getTokenFullStart(),bC=Hu(0,wm);if(Xt.push(bC),xm===r.getTokenFullStart()&&st(),an>=0){const hb=fe.statements[an];if(bC.end===hb.pos)break;bC.end>hb.pos&&(an=Ss(fe.statements,an+1))}}Pn=Dd},2),jr=an>=0?Cs(fe.statements,an):-1}if(an>=0){const $c=fe.statements[an];Sr(Xt,fe.statements,an);const Jc=ct(Si,dc=>dc.start>=$c.pos);Jc>=0&&Sr(Me,Si,Jc)}return wt=Ke,E.updateSourceFile(fe,Ht(N(Xt),fe.statements));function Hs($c){return!($c.flags&65536)&&!!($c.transformFlags&67108864)}function Cs($c,Jc){for(let dc=Jc;dc<$c.length;dc++)if(Hs($c[dc]))return dc;return-1}function Ss($c,Jc){for(let dc=Jc;dc<$c.length;dc++)if(!Hs($c[dc]))return dc;return-1}function no($c){const Jc=mt.currentNode($c);return _i&&Jc&&Hs(Jc)&&SIe(Jc),Jc}}function at(fe){Qb(fe,!0)}t.fixupParentReferences=at;function yi(fe,Ke,mt,Xt,Si,an,jr,Hs){let Cs=E.createSourceFile(Si,an,jr);if($ce(Cs,0,ze.length),Ss(Cs),!Xt&&wd(Cs)&&Cs.transformFlags&67108864){const no=Cs;Cs=Zs(Cs),no!==Cs&&Ss(Cs)}return Cs;function Ss(no){no.text=ze,no.bindDiagnostics=[],no.bindSuggestionDiagnostics=void 0,no.languageVersion=Ke,no.fileName=fe,no.languageVariant=qV(mt),no.isDeclarationFile=Xt,no.scriptKind=mt,Hs(no),no.setExternalModuleIndicator=Hs}}function Sn(fe,Ke){fe?Pn|=Ke:Pn&=~Ke}function dr(fe){Sn(fe,8192)}function us(fe){Sn(fe,16384)}function Xr(fe){Sn(fe,32768)}function Gs(fe){Sn(fe,65536)}function ma(fe,Ke){const mt=fe&Pn;if(mt){Sn(!1,mt);const Xt=Ke();return Sn(!0,mt),Xt}return Ke()}function ka(fe,Ke){const mt=fe&~Pn;if(mt){Sn(!0,mt);const Xt=Ke();return Sn(!1,mt),Xt}return Ke()}function Ji(fe){return ma(8192,fe)}function ac(fe){return ka(8192,fe)}function St(fe){return ma(131072,fe)}function ri(fe){return ka(131072,fe)}function xe(fe){return ka(16384,fe)}function pt(fe){return ka(32768,fe)}function Se(fe){return ka(65536,fe)}function Ze(fe){return ma(65536,fe)}function gt(fe){return ka(81920,fe)}function Dt(fe){return ma(81920,fe)}function Je(fe){return(Pn&fe)!==0}function Rt(){return Je(16384)}function Ct(){return Je(8192)}function ii(){return Je(131072)}function vt(){return Je(32768)}function Ni(){return Je(65536)}function ji(fe,...Ke){return te(r.getTokenStart(),r.getTokenEnd(),fe,...Ke)}function gr(fe,Ke,mt,...Xt){const Si=rl(Me);let an;return(!Si||fe!==Si.start)&&(an=kP(Pe,ze,fe,Ke,mt,...Xt),Me.push(an)),Fi=!0,an}function te(fe,Ke,mt,...Xt){return gr(fe,Ke-fe,mt,...Xt)}function tt(fe,Ke,...mt){te(fe.pos,fe.end,Ke,...mt)}function Gt(fe,Ke,mt){gr(r.getTokenEnd(),Ke,fe,mt)}function le(){return r.getTokenFullStart()}function Ue(){return r.hasPrecedingJSDocComment()}function be(){return Et}function Qt(){return Et=r.scan()}function lt(fe){return st(),fe()}function st(){return P_(Et)&&(r.hasUnicodeEscape()||r.hasExtendedUnicodeEscape())&&te(r.getTokenStart(),r.getTokenEnd(),k.Keywords_cannot_contain_escape_characters),Qt()}function hi(){return Et=r.scanJsDocToken()}function vn(fe){return Et=r.scanJSDocCommentTextToken(fe)}function ln(){return Et=r.reScanGreaterToken()}function Un(){return Et=r.reScanSlashToken()}function Pt(fe){return Et=r.reScanTemplateToken(fe)}function Bt(){return Et=r.reScanLessThanToken()}function fi(){return Et=r.reScanHashToken()}function wi(){return Et=r.scanJsxIdentifier()}function Ri(){return Et=r.scanJsxToken()}function Ai(){return Et=r.scanJsxAttributeValue()}function Xn(fe,Ke){const mt=Et,Xt=Me.length,Si=Fi,an=Pn,jr=Ke!==0?r.lookAhead(fe):r.tryScan(fe);return j.assert(an===Pn),(!jr||Ke!==0)&&(Et=mt,Ke!==2&&(Me.length=Xt),Fi=Si),jr}function Di(fe){return Xn(fe,1)}function on(fe){return Xn(fe,0)}function zi(){return be()===80?!0:be()>118}function cn(){return be()===80?!0:be()===127&&Rt()||be()===135&&Ni()?!1:be()>118}function vi(fe,Ke,mt=!0){return be()===fe?(mt&&st(),!0):(Ke?ji(Ke):ji(k._0_expected,xa(fe)),!1)}const qo=Object.keys(tG).filter(fe=>fe.length>2);function Wo(fe){if(i2(fe)){te(Va(ze,fe.template.pos),fe.template.end,k.Module_declaration_names_may_only_use_or_quoted_strings);return}const Ke=ot(fe)?Fr(fe):void 0;if(!Ke||!J_(Ke,Nt)){ji(k._0_expected,xa(27));return}const mt=Va(ze,fe.pos);switch(Ke){case"const":case"let":case"var":te(mt,fe.end,k.Variable_declaration_not_allowed_at_this_location);return;case"declare":return;case"interface":$o(k.Interface_name_cannot_be_0,k.Interface_must_be_given_a_name,19);return;case"is":te(mt,r.getTokenStart(),k.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);return;case"module":case"namespace":$o(k.Namespace_name_cannot_be_0,k.Namespace_must_be_given_a_name,19);return;case"type":$o(k.Type_alias_name_cannot_be_0,k.Type_alias_must_be_given_a_name,64);return}const Xt=LT(Ke,qo,hl)??Lc(Ke);if(Xt){te(mt,fe.end,k.Unknown_keyword_or_identifier_Did_you_mean_0,Xt);return}be()!==0&&te(mt,fe.end,k.Unexpected_keyword_or_identifier)}function $o(fe,Ke,mt){be()===mt?ji(Ke):ji(fe,r.getTokenValue())}function Lc(fe){for(const Ke of qo)if(fe.length>Ke.length+2&&so(fe,Ke))return`${Ke} ${fe.slice(Ke.length)}`}function vu(fe,Ke,mt){if(be()===60&&!r.hasPrecedingLineBreak()){ji(k.Decorators_must_precede_the_name_and_all_keywords_of_property_declarations);return}if(be()===21){ji(k.Cannot_start_a_function_call_in_a_type_annotation),st();return}if(Ke&&!pc()){mt?ji(k._0_expected,xa(27)):ji(k.Expected_for_property_initializer);return}if(!mc()){if(mt){ji(k._0_expected,xa(27));return}Wo(fe)}}function Gu(fe){return be()===fe?(hi(),!0):(j.assert(oK(fe)),ji(k._0_expected,xa(fe)),!1)}function Zc(fe,Ke,mt,Xt){if(be()===Ke){st();return}const Si=ji(k._0_expected,xa(Ke));mt&&Si&&da(Si,kP(Pe,ze,Xt,1,k.The_parser_expected_to_find_a_1_to_match_the_0_token_here,xa(fe),xa(Ke)))}function Ls(fe){return be()===fe?(st(),!0):!1}function ja(fe){if(be()===fe)return md()}function wf(fe){if(be()===fe)return go()}function Jo(fe,Ke,mt){return ja(fe)||Gc(fe,!1,Ke||k._0_expected,mt||xa(fe))}function kh(fe){const Ke=wf(fe);return Ke||(j.assert(oK(fe)),Gc(fe,!1,k._0_expected,xa(fe)))}function md(){const fe=le(),Ke=be();return st(),ki(X(Ke),fe)}function go(){const fe=le(),Ke=be();return hi(),ki(X(Ke),fe)}function pc(){return be()===27?!0:be()===20||be()===1||r.hasPrecedingLineBreak()}function mc(){return pc()?(be()===27&&st(),!0):!1}function oo(){return mc()||vi(27)}function tc(fe,Ke,mt,Xt){const Si=N(fe,Xt);return V0(Si,Ke,mt??r.getTokenFullStart()),Si}function ki(fe,Ke,mt){return V0(fe,Ke,mt??r.getTokenFullStart()),Pn&&(fe.flags|=Pn),Fi&&(Fi=!1,fe.flags|=262144),fe}function Gc(fe,Ke,mt,...Xt){Ke?gr(r.getTokenFullStart(),0,mt,...Xt):mt&&ji(mt,...Xt);const Si=le(),an=fe===80?U("",void 0):Gw(fe)?E.createTemplateLiteralLikeNode(fe,"","",void 0):fe===9?R("",void 0):fe===11?F("",void 0):fe===282?E.createMissingDeclaration():X(fe);return ki(an,Si)}function uh(fe){let Ke=zt.get(fe);return Ke===void 0&&zt.set(fe,Ke=fe),Ke}function sd(fe,Ke,mt){if(fe){Ei++;const Hs=r.hasPrecedingJSDocLeadingAsterisks()?r.getTokenStart():le(),Cs=be(),Ss=uh(r.getTokenValue()),no=r.hasExtendedUnicodeEscape();return Qt(),ki(U(Ss,Cs,no),Hs)}if(be()===81)return ji(mt||k.Private_identifiers_are_not_allowed_outside_class_bodies),sd(!0);if(be()===0&&r.tryScan(()=>r.reScanInvalidIdentifier()===80))return sd(!0);Ei++;const Xt=be()===1,Si=r.isReservedWord(),an=r.getTokenText(),jr=Si?k.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:k.Identifier_expected;return Gc(80,Xt,Ke||jr,an)}function Pp(fe){return sd(zi(),void 0,fe)}function Nl(fe,Ke){return sd(cn(),fe,Ke)}function Ve(fe){return sd(D_(be()),fe)}function _e(){return(r.hasUnicodeEscape()||r.hasExtendedUnicodeEscape())&&ji(k.Unicode_escape_sequence_cannot_appear_here),sd(D_(be()))}function Lt(){return D_(be())||be()===11||be()===9||be()===10}function ci(){return D_(be())||be()===11}function Mi(fe){if(be()===11||be()===9||be()===10){const Ke=Zt();return Ke.text=uh(Ke.text),Ke}return be()===23?Yr():be()===81?Xi():Ve()}function Rn(){return Mi()}function Yr(){const fe=le();vi(23);const Ke=Ji(dh);return vi(24),ki(E.createComputedPropertyName(Ke),fe)}function Xi(){const fe=le(),Ke=q(uh(r.getTokenValue()));return st(),ki(Ke,fe)}function Mr(fe){return be()===fe&&on(Ks)}function ds(){return st(),r.hasPrecedingLineBreak()?!1:Ku()}function Ks(){switch(be()){case 87:return st()===94;case 95:return st(),be()===90?Di(Xu):be()===156?Di(Gl):Ic();case 90:return Xu();case 126:case 139:case 153:return st(),Ku();default:return ds()}}function Ic(){return be()===60||be()!==42&&be()!==130&&be()!==19&&Ku()}function Gl(){return st(),Ic()}function Pu(){return Xw(be())&&on(Ks)}function Ku(){return be()===23||be()===19||be()===42||be()===26||Lt()}function Xu(){return st(),be()===86||be()===100||be()===120||be()===60||be()===128&&Di(L5)||be()===134&&Di(nu)}function Wl(fe,Ke){if(Hd(fe))return!0;switch(fe){case 0:case 1:case 3:return!(be()===27&&Ke)&&hN();case 2:return be()===84||be()===90;case 4:return Di(it);case 5:return Di(mN)||be()===27&&!Ke;case 6:return be()===23||Lt();case 12:switch(be()){case 23:case 42:case 26:case 25:return!0;default:return Lt()}case 18:return Lt();case 9:return be()===23||be()===26||Lt();case 24:return ci();case 7:return be()===19?Di(Cu):Ke?cn()&&!eg():RS()&&!eg();case 8:return xr();case 10:return be()===28||be()===26||xr();case 19:return be()===103||be()===87||cn();case 15:switch(be()){case 28:case 25:return!0}case 11:return be()===26||Gy();case 16:return X0(!1);case 17:return X0(!0);case 20:case 21:return be()===28||_0();case 22:return VD();case 23:return be()===161&&Di(pN)?!1:be()===11?!0:D_(be());case 13:return D_(be())||be()===19;case 14:return!0;case 25:return!0;case 26:return j.fail("ParsingContext.Count used as a context");default:j.assertNever(fe,"Non-exhaustive case in 'isListElement'.")}}function Cu(){if(j.assert(be()===19),st()===20){const fe=st();return fe===28||fe===19||fe===96||fe===119}return!0}function gm(){return st(),cn()}function Qu(){return st(),D_(be())}function kd(){return st(),Vke(be())}function eg(){return be()===119||be()===96?Di(Ye):!1}function Ye(){return st(),Gy()}function li(){return st(),_0()}function En(fe){if(be()===1)return!0;switch(fe){case 1:case 2:case 4:case 5:case 6:case 12:case 9:case 23:case 24:return be()===20;case 3:return be()===20||be()===84||be()===90;case 7:return be()===19||be()===96||be()===119;case 8:return po();case 19:return be()===32||be()===21||be()===19||be()===96||be()===119;case 11:return be()===22||be()===27;case 15:case 21:case 10:return be()===24;case 17:case 16:case 18:return be()===22||be()===24;case 20:return be()!==28;case 22:return be()===19||be()===20;case 13:return be()===32||be()===44;case 14:return be()===30&&Di(Hn);default:return!1}}function po(){return!!(pc()||L2(be())||be()===39)}function ic(){j.assert(tn,"Missing parsing context");for(let fe=0;fe<26;fe++)if(tn&1<<fe&&(Wl(fe,!0)||En(fe)))return!0;return!1}function sc(fe,Ke){const mt=tn;tn|=1<<fe;const Xt=[],Si=le();for(;!En(fe);){if(Wl(fe,!1)){Xt.push(Hu(fe,Ke));continue}if(Hg(fe))break}return tn=mt,tc(Xt,Si)}function Hu(fe,Ke){const mt=Hd(fe);return mt?Yc(mt):Ke()}function Hd(fe,Ke){var mt;if(!wt||!Pc(fe)||Fi)return;const Xt=wt.currentNode(Ke??r.getTokenFullStart());if(!(lu(Xt)||fOt(Xt)||oP(Xt)||(Xt.flags&101441536)!==Pn)&&od(Xt,fe))return xV(Xt)&&((mt=Xt.jsDoc)!=null&&mt.jsDocCache)&&(Xt.jsDoc.jsDocCache=void 0),Xt}function Yc(fe){return r.resetTokenState(fe.end),st(),fe}function Pc(fe){switch(fe){case 5:case 2:case 0:case 1:case 3:case 6:case 4:case 8:case 17:case 16:return!0}return!1}function od(fe,Ke){switch(Ke){case 5:return Ap(fe);case 2:return Vg(fe);case 0:case 1:case 3:return Y_(fe);case 6:return Jp(fe);case 4:return ym(fe);case 8:return tg(fe);case 17:case 16:return Zv(fe)}return!1}function Ap(fe){if(fe)switch(fe.kind){case 176:case 181:case 177:case 178:case 172:case 240:return!0;case 174:const Ke=fe;return!(Ke.name.kind===80&&Ke.name.escapedText==="constructor")}return!1}function Vg(fe){if(fe)switch(fe.kind){case 296:case 297:return!0}return!1}function Y_(fe){if(fe)switch(fe.kind){case 262:case 243:case 241:case 245:case 244:case 257:case 253:case 255:case 252:case 251:case 249:case 250:case 248:case 247:case 254:case 242:case 258:case 256:case 246:case 259:case 272:case 271:case 278:case 277:case 267:case 263:case 264:case 266:case 265:return!0}return!1}function Jp(fe){return fe.kind===306}function ym(fe){if(fe)switch(fe.kind){case 180:case 173:case 181:case 171:case 179:return!0}return!1}function tg(fe){return fe.kind!==260?!1:fe.initializer===void 0}function Zv(fe){return fe.kind!==169?!1:fe.initializer===void 0}function Hg(fe){return F_(fe),ic()?!0:(st(),!1)}function F_(fe){switch(fe){case 0:return be()===90?ji(k._0_expected,xa(95)):ji(k.Declaration_or_statement_expected);case 1:return ji(k.Declaration_or_statement_expected);case 2:return ji(k.case_or_default_expected);case 3:return ji(k.Statement_expected);case 18:case 4:return ji(k.Property_or_signature_expected);case 5:return ji(k.Unexpected_token_A_constructor_method_accessor_or_property_was_expected);case 6:return ji(k.Enum_member_expected);case 7:return ji(k.Expression_expected);case 8:return P_(be())?ji(k._0_is_not_allowed_as_a_variable_declaration_name,xa(be())):ji(k.Variable_declaration_expected);case 9:return ji(k.Property_destructuring_pattern_expected);case 10:return ji(k.Array_element_destructuring_pattern_expected);case 11:return ji(k.Argument_expression_expected);case 12:return ji(k.Property_assignment_expected);case 15:return ji(k.Expression_or_comma_expected);case 17:return ji(k.Parameter_declaration_expected);case 16:return P_(be())?ji(k._0_is_not_allowed_as_a_parameter_name,xa(be())):ji(k.Parameter_declaration_expected);case 19:return ji(k.Type_parameter_declaration_expected);case 20:return ji(k.Type_argument_expected);case 21:return ji(k.Type_expected);case 22:return ji(k.Unexpected_token_expected);case 23:return be()===161?ji(k._0_expected,"}"):ji(k.Identifier_expected);case 13:return ji(k.Identifier_expected);case 14:return ji(k.Identifier_expected);case 24:return ji(k.Identifier_or_string_literal_expected);case 25:return ji(k.Identifier_expected);case 26:return j.fail("ParsingContext.Count used as a context");default:j.assertNever(fe)}}function jd(fe,Ke,mt){const Xt=tn;tn|=1<<fe;const Si=[],an=le();let jr=-1;for(;;){if(Wl(fe,!1)){const Hs=r.getTokenFullStart(),Cs=Hu(fe,Ke);if(!Cs){tn=Xt;return}if(Si.push(Cs),jr=r.getTokenStart(),Ls(28))continue;if(jr=-1,En(fe))break;vi(28,lC(fe)),mt&&be()===27&&!r.hasPrecedingLineBreak()&&st(),Hs===r.getTokenFullStart()&&st();continue}if(En(fe)||Hg(fe))break}return tn=Xt,tc(Si,an,void 0,jr>=0)}function lC(fe){return fe===6?k.An_enum_member_name_must_be_followed_by_a_or:void 0}function h_(){const fe=tc([],le());return fe.isMissingList=!0,fe}function Yv(fe){return!!fe.isMissingList}function vm(fe,Ke,mt,Xt){if(vi(mt)){const Si=jd(fe,Ke);return vi(Xt),Si}return h_()}function ve(fe,Ke){const mt=le();let Xt=fe?Ve(Ke):Nl(Ke);for(;Ls(25)&&be()!==30;)Xt=ki(E.createQualifiedName(Xt,mi(fe,!1,!0)),mt);return Xt}function Ot(fe,Ke){return ki(E.createQualifiedName(fe,Ke),fe.pos)}function mi(fe,Ke,mt){if(r.hasPrecedingLineBreak()&&D_(be())&&Di(fN))return Gc(80,!0,k.Identifier_expected);if(be()===81){const Xt=Xi();return Ke?Xt:Gc(80,!0,k.Identifier_expected)}return fe?mt?Ve():_e():Nl()}function Ci(fe){const Ke=le(),mt=[];let Xt;do Xt=Xe(fe),mt.push(Xt);while(Xt.literal.kind===17);return tc(mt,Ke)}function hn(fe){const Ke=le();return ki(E.createTemplateExpression(Nn(fe),Ci(fe)),Ke)}function Wn(){const fe=le();return ki(E.createTemplateLiteralType(Nn(!1),Lr()),fe)}function Lr(){const fe=le(),Ke=[];let mt;do mt=ps(),Ke.push(mt);while(mt.literal.kind===17);return tc(Ke,fe)}function ps(){const fe=le();return ki(E.createTemplateLiteralTypeSpan(Xd(),ee(!1)),fe)}function ee(fe){return be()===20?(Pt(fe),Is()):Jo(18,k._0_expected,xa(20))}function Xe(fe){const Ke=le();return ki(E.createTemplateSpan(Ji(dh),ee(fe)),Ke)}function Zt(){return To(be())}function Nn(fe){!fe&&r.getTokenFlags()&26656&&Pt(!1);const Ke=To(be());return j.assert(Ke.kind===16,"Template head has wrong token kind"),Ke}function Is(){const fe=To(be());return j.assert(fe.kind===17||fe.kind===18,"Template fragment has wrong token kind"),fe}function Qo(fe){const Ke=fe===15||fe===18,mt=r.getTokenText();return mt.substring(1,mt.length-(r.isUnterminated()?0:Ke?1:2))}function To(fe){const Ke=le(),mt=Gw(fe)?E.createTemplateLiteralLikeNode(fe,r.getTokenValue(),Qo(fe),r.getTokenFlags()&7176):fe===9?R(r.getTokenValue(),r.getNumericLiteralFlags()):fe===11?F(r.getTokenValue(),void 0,r.hasExtendedUnicodeEscape()):y8(fe)?H(fe,r.getTokenValue()):j.fail();return r.hasExtendedUnicodeEscape()&&(mt.hasExtendedUnicodeEscape=!0),r.isUnterminated()&&(mt.isUnterminated=!0),st(),ki(mt,Ke)}function Zo(){return ve(!0,k.Type_expected)}function uc(){if(!r.hasPrecedingLineBreak()&&Bt()===30)return vm(20,Xd,30,32)}function Xa(){const fe=le();return ki(E.createTypeReferenceNode(Zo(),uc()),fe)}function Yl(fe){switch(fe.kind){case 183:return lu(fe.typeName);case 184:case 185:{const{parameters:Ke,type:mt}=fe;return Yv(Ke)||Yl(mt)}case 196:return Yl(fe.type);default:return!1}}function ig(fe){return st(),ki(E.createTypePredicateNode(void 0,fe,Xd()),fe.pos)}function h0(){const fe=le();return st(),ki(E.createThisTypeNode(),fe)}function K0(){const fe=le();return st(),ki(E.createJSDocAllType(),fe)}function eb(){const fe=le();return st(),ki(E.createJSDocNonNullableType(OS(),!1),fe)}function PS(){const fe=le();return st(),be()===28||be()===20||be()===22||be()===32||be()===64||be()===52?ki(E.createJSDocUnknownType(),fe):ki(E.createJSDocNullableType(Xd(),!1),fe)}function tb(){const fe=le(),Ke=Ue();if(on(eo)){const mt=Ug(36),Xt=zg(59,!1);return Mn(ki(E.createJSDocFunctionType(mt,Xt),fe),Ke)}return ki(E.createTypeReferenceNode(Ve(),void 0),fe)}function ng(){const fe=le();let Ke;return(be()===110||be()===105)&&(Ke=Ve(),vi(59)),ki(E.createParameterDeclaration(void 0,void 0,Ke,void 0,rg(),void 0),fe)}function rg(){r.setSkipJsDocLeadingAsterisks(!0);const fe=le();if(Ls(144)){const Xt=E.createJSDocNamepathType(void 0);e:for(;;)switch(be()){case 20:case 1:case 28:case 5:break e;default:hi()}return r.setSkipJsDocLeadingAsterisks(!1),ki(Xt,fe)}const Ke=Ls(26);let mt=tp();return r.setSkipJsDocLeadingAsterisks(!1),Ke&&(mt=ki(E.createJSDocVariadicType(mt),fe)),be()===64?(st(),ki(E.createJSDocOptionalType(mt),fe)):mt}function Vl(){const fe=le();vi(114);const Ke=ve(!0),mt=r.hasPrecedingLineBreak()?void 0:F2();return ki(E.createTypeQueryNode(Ke,mt),fe)}function Gp(){const fe=le(),Ke=Wi(!1,!0),mt=Nl();let Xt,Si;Ls(96)&&(_0()||!Gy()?Xt=Xd():Si=ff());const an=Ls(64)?Xd():void 0,jr=E.createTypeParameterDeclaration(Ke,mt,Xt,an);return jr.expression=Si,ki(jr,fe)}function ep(){if(be()===30)return vm(19,Gp,30,32)}function X0(fe){return be()===26||xr()||Xw(be())||be()===60||_0(!fe)}function ib(fe){const Ke=p_(k.Private_identifiers_cannot_be_used_as_parameters);return GW(Ke)===0&&!Ft(fe)&&Xw(be())&&st(),Ke}function jg(){return zi()||be()===23||be()===19}function $y(fe){return AS(fe)}function uC(fe){return AS(fe,!1)}function AS(fe,Ke=!0){const mt=le(),Xt=Ue(),Si=fe?Se(()=>Wi(!0)):Ze(()=>Wi(!0));if(be()===110){const Cs=E.createParameterDeclaration(Si,void 0,sd(!0),void 0,Q0(),void 0),Ss=Ra(Si);return Ss&&tt(Ss,k.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters),Mn(ki(Cs,mt),Xt)}const an=_i;_i=!1;const jr=ja(26);if(!Ke&&!jg())return;const Hs=Mn(ki(E.createParameterDeclaration(Si,jr,ib(Si),ja(58),Q0(),hC()),mt),Xt);return _i=an,Hs}function zg(fe,Ke){if(x2(fe,Ke))return St(tp)}function x2(fe,Ke){return fe===39?(vi(fe),!0):Ls(59)?!0:Ke&&be()===39?(ji(k._0_expected,xa(59)),st(),!0):!1}function bm(fe,Ke){const mt=Rt(),Xt=Ni();us(!!(fe&1)),Gs(!!(fe&2));const Si=fe&32?jd(17,ng):jd(16,()=>Ke?$y(Xt):uC(Xt));return us(mt),Gs(Xt),Si}function Ug(fe){if(!vi(21))return h_();const Ke=bm(fe,!0);return vi(22),Ke}function dC(){Ls(28)||oo()}function k2(fe){const Ke=le(),mt=Ue();fe===180&&vi(105);const Xt=ep(),Si=Ug(4),an=zg(59,!0);dC();const jr=fe===179?E.createCallSignature(Xt,Si,an):E.createConstructSignature(Xt,Si,an);return Mn(ki(jr,Ke),mt)}function Jy(){return be()===23&&Di(nb)}function nb(){if(st(),be()===26||be()===24)return!0;if(Xw(be())){if(st(),cn())return!0}else if(cn())st();else return!1;return be()===59||be()===28?!0:be()!==58?!1:(st(),be()===59||be()===28||be()===24)}function T2(fe,Ke,mt){const Xt=vm(16,()=>$y(!1),23,24),Si=Q0();dC();const an=E.createIndexSignature(mt,Xt,Si);return Mn(ki(an,fe),Ke)}function xx(fe,Ke,mt){const Xt=Rn(),Si=ja(58);let an;if(be()===21||be()===30){const jr=ep(),Hs=Ug(4),Cs=zg(59,!0);an=E.createMethodSignature(mt,Xt,Si,jr,Hs,Cs)}else{const jr=Q0();an=E.createPropertySignature(mt,Xt,Si,jr),be()===64&&(an.initializer=hC())}return dC(),Mn(ki(an,fe),Ke)}function it(){if(be()===21||be()===30||be()===139||be()===153)return!0;let fe=!1;for(;Xw(be());)fe=!0,st();return be()===23?!0:(Lt()&&(fe=!0,st()),fe?be()===21||be()===30||be()===58||be()===59||be()===28||pc():!1)}function yt(){if(be()===21||be()===30)return k2(179);if(be()===105&&Di(ei))return k2(180);const fe=le(),Ke=Ue(),mt=Wi(!1);return Mr(139)?Kg(fe,Ke,mt,177,4):Mr(153)?Kg(fe,Ke,mt,178,4):Jy()?T2(fe,Ke,mt):xx(fe,Ke,mt)}function ei(){return st(),be()===21||be()===30}function Pi(){return st()===25}function nn(){switch(st()){case 21:case 30:case 25:return!0}return!1}function Vn(){const fe=le();return ki(E.createTypeLiteralNode(mn()),fe)}function mn(){let fe;return vi(19)?(fe=sc(4,yt),vi(20)):fe=h_(),fe}function Pr(){return st(),be()===40||be()===41?st()===148:(be()===148&&st(),be()===23&&gm()&&st()===103)}function ks(){const fe=le(),Ke=Ve();vi(103);const mt=Xd();return ki(E.createTypeParameterDeclaration(void 0,Ke,mt,void 0),fe)}function ar(){const fe=le();vi(19);let Ke;(be()===148||be()===40||be()===41)&&(Ke=md(),Ke.kind!==148&&vi(148)),vi(23);const mt=ks(),Xt=Ls(130)?Xd():void 0;vi(24);let Si;(be()===58||be()===40||be()===41)&&(Si=md(),Si.kind!==58&&vi(58));const an=Q0();oo();const jr=sc(4,yt);return vi(20),ki(E.createMappedTypeNode(Ke,mt,Xt,Si,an,jr),fe)}function Ns(){const fe=le();if(Ls(26))return ki(E.createRestTypeNode(Xd()),fe);const Ke=Xd();if(k3(Ke)&&Ke.pos===Ke.type.pos){const mt=E.createOptionalTypeNode(Ke.type);return Ht(mt,Ke),mt.flags=Ke.flags,mt}return Ke}function cr(){return st()===59||be()===58&&st()===59}function Go(){return be()===26?D_(st())&&cr():D_(be())&&cr()}function ll(){if(Di(Go)){const fe=le(),Ke=Ue(),mt=ja(26),Xt=Ve(),Si=ja(58);vi(59);const an=Ns(),jr=E.createNamedTupleMember(mt,Xt,Si,an);return Mn(ki(jr,fe),Ke)}return Ns()}function qh(){const fe=le();return ki(E.createTupleTypeNode(vm(21,ll,23,24)),fe)}function qg(){const fe=le();vi(21);const Ke=Xd();return vi(22),ki(E.createParenthesizedType(Ke),fe)}function $h(){let fe;if(be()===128){const Ke=le();st();const mt=ki(X(128),Ke);fe=tc([mt],Ke)}return fe}function $g(){const fe=le(),Ke=Ue(),mt=$h(),Xt=Ls(105);j.assert(!mt||Xt,"Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers.");const Si=ep(),an=Ug(4),jr=zg(39,!1),Hs=Xt?E.createConstructorTypeNode(mt,Si,an,jr):E.createFunctionTypeNode(Si,an,jr);return Mn(ki(Hs,fe),Ke)}function Jh(){const fe=md();return be()===25?void 0:fe}function DD(fe){const Ke=le();fe&&st();let mt=be()===112||be()===97||be()===106?md():To(be());return fe&&(mt=ki(E.createPrefixUnaryExpression(41,mt),Ke)),ki(E.createLiteralTypeNode(mt),Ke)}function kx(){return st(),be()===102}function rb(){We|=4194304;const fe=le(),Ke=Ls(114);vi(102),vi(21);const mt=Xd();let Xt;if(Ls(28)){const jr=r.getTokenStart();vi(19);const Hs=be();if(Hs===118||Hs===132?st():ji(k._0_expected,xa(118)),vi(59),Xt=M5(Hs,!0),!vi(20)){const Cs=rl(Me);Cs&&Cs.code===k._0_expected.code&&da(Cs,kP(Pe,ze,jr,1,k.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}}vi(22);const Si=Ls(25)?Zo():void 0,an=uc();return ki(E.createImportTypeNode(mt,Xt,Si,an,Ke),fe)}function fC(){return st(),be()===9||be()===10}function OS(){switch(be()){case 133:case 159:case 154:case 150:case 163:case 155:case 136:case 157:case 146:case 151:return on(Jh)||Xa();case 67:r.reScanAsteriskEqualsToken();case 42:return K0();case 61:r.reScanQuestionToken();case 58:return PS();case 100:return tb();case 54:return eb();case 15:case 11:case 9:case 10:case 112:case 97:case 106:return DD();case 41:return Di(fC)?DD(!0):Xa();case 116:return md();case 110:{const fe=h0();return be()===142&&!r.hasPrecedingLineBreak()?ig(fe):fe}case 114:return Di(kx)?rb():Vl();case 19:return Di(Pr)?ar():Vn();case 23:return qh();case 21:return qg();case 102:return rb();case 131:return Di(fN)?vO():Xa();case 16:return Wn();default:return Xa()}}function _0(fe){switch(be()){case 133:case 159:case 154:case 150:case 163:case 136:case 148:case 155:case 158:case 116:case 157:case 106:case 110:case 114:case 146:case 19:case 23:case 30:case 52:case 51:case 105:case 11:case 9:case 10:case 112:case 97:case 151:case 42:case 58:case 54:case 26:case 140:case 102:case 131:case 15:case 16:return!0;case 100:return!fe;case 41:return!fe&&Di(fC);case 21:return!fe&&Di(MS);default:return cn()}}function MS(){return st(),be()===22||X0(!1)||_0()}function Tx(){const fe=le();let Ke=OS();for(;!r.hasPrecedingLineBreak();)switch(be()){case 54:st(),Ke=ki(E.createJSDocNonNullableType(Ke,!0),fe);break;case 58:if(Di(li))return Ke;st(),Ke=ki(E.createJSDocNullableType(Ke,!0),fe);break;case 23:if(vi(23),_0()){const mt=Xd();vi(24),Ke=ki(E.createIndexedAccessTypeNode(Ke,mt),fe)}else vi(24),Ke=ki(E.createArrayTypeNode(Ke),fe);break;default:return Ke}return Ke}function Dx(fe){const Ke=le();return vi(fe),ki(E.createTypeOperatorNode(fe,lc()),Ke)}function Ex(){if(Ls(96)){const fe=ri(Xd);if(ii()||be()!==58)return fe}}function ZI(){const fe=le(),Ke=Nl(),mt=on(Ex),Xt=E.createTypeParameterDeclaration(void 0,Ke,mt);return ki(Xt,fe)}function D2(){const fe=le();return vi(140),ki(E.createInferTypeNode(ZI()),fe)}function lc(){const fe=be();switch(fe){case 143:case 158:case 148:return Dx(fe);case 140:return D2()}return St(Tx)}function ED(fe){if(Cm()){const Ke=$g();let mt;return Hy(Ke)?mt=fe?k.Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:k.Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:mt=fe?k.Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type:k.Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type,tt(Ke,mt),Ke}}function YI(fe,Ke,mt){const Xt=le(),Si=fe===52,an=Ls(fe);let jr=an&&ED(Si)||Ke();if(be()===fe||an){const Hs=[jr];for(;Ls(fe);)Hs.push(ED(Si)||Ke());jr=ki(mt(tc(Hs,Xt)),Xt)}return jr}function E2(){return YI(51,lc,E.createIntersectionTypeNode)}function sb(){return YI(52,E2,E.createUnionTypeNode)}function ob(){return st(),be()===105}function Cm(){return be()===30||be()===21&&Di(Mp)?!0:be()===105||be()===128&&Di(ob)}function Op(){if(Xw(be())&&Wi(!1),cn()||be()===110)return st(),!0;if(be()===23||be()===19){const fe=Me.length;return p_(),fe===Me.length}return!1}function Mp(){return st(),!!(be()===22||be()===26||Op()&&(be()===59||be()===28||be()===58||be()===64||be()===22&&(st(),be()===39)))}function tp(){const fe=le(),Ke=cn()&&on(Ix),mt=Xd();return Ke?ki(E.createTypePredicateNode(void 0,Ke,mt),fe):mt}function Ix(){const fe=Nl();if(be()===142&&!r.hasPrecedingLineBreak())return st(),fe}function vO(){const fe=le(),Ke=Jo(131),mt=be()===110?h0():Nl(),Xt=Ls(142)?Xd():void 0;return ki(E.createTypePredicateNode(Ke,mt,Xt),fe)}function Xd(){if(Pn&81920)return ma(81920,Xd);if(Cm())return $g();const fe=le(),Ke=sb();if(!ii()&&!r.hasPrecedingLineBreak()&&Ls(96)){const mt=ri(Xd);vi(58);const Xt=St(Xd);vi(59);const Si=St(Xd);return ki(E.createConditionalTypeNode(Ke,mt,Xt,Si),fe)}return Ke}function Q0(){return Ls(59)?Xd():void 0}function RS(){switch(be()){case 110:case 108:case 106:case 112:case 97:case 9:case 10:case 11:case 15:case 16:case 21:case 23:case 19:case 100:case 86:case 105:case 44:case 69:case 80:return!0;case 102:return Di(nn);default:return cn()}}function Gy(){if(RS())return!0;switch(be()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 46:case 47:case 30:case 135:case 127:case 81:case 60:return!0;default:return ab()?!0:cn()}}function kA(){return be()!==19&&be()!==100&&be()!==86&&be()!==60&&Gy()}function dh(){const fe=vt();fe&&Xr(!1);const Ke=le();let mt=ip(!0),Xt;for(;Xt=ja(28);)mt=Ky(mt,Xt,ip(!0),Ke);return fe&&Xr(!0),mt}function hC(){return Ls(64)?ip(!0):void 0}function ip(fe){if(I2())return ft();const Ke=Z1(fe)||FS(fe);if(Ke)return Ke;const mt=le(),Xt=Ue(),Si=BS(0);return Si.kind===80&&be()===39?Z0(mt,Si,fe,Xt,void 0):N_(Si)&&Gb(ln())?Ky(Si,md(),ip(fe),mt):p0(Si,mt,fe)}function I2(){return be()===127?Rt()?!0:Di(kO):!1}function Q1(){return st(),!r.hasPrecedingLineBreak()&&cn()}function ft(){const fe=le();return st(),!r.hasPrecedingLineBreak()&&(be()===42||Gy())?ki(E.createYieldExpression(ja(42),ip(!0)),fe):ki(E.createYieldExpression(void 0,void 0),fe)}function Z0(fe,Ke,mt,Xt,Si){j.assert(be()===39,"parseSimpleArrowFunctionExpression should only have been called if we had a =>");const an=E.createParameterDeclaration(void 0,void 0,Ke,void 0,void 0,void 0);ki(an,Ke.pos);const jr=tc([an],an.pos,an.end),Hs=Jo(39),Cs=$a(!!Si,mt),Ss=E.createArrowFunction(Si,void 0,jr,void 0,Hs,Cs);return Mn(ki(Ss,fe),Xt)}function Z1(fe){const Ke=N2();if(Ke!==0)return Ke===1?DA(!0,!0):on(()=>_C(fe))}function N2(){return be()===21||be()===30||be()===134?Di(TA):be()===39?1:0}function TA(){if(be()===134&&(st(),r.hasPrecedingLineBreak()||be()!==21&&be()!==30))return 0;const fe=be(),Ke=st();if(fe===21){if(Ke===22)switch(st()){case 39:case 59:case 19:return 1;default:return 0}if(Ke===23||Ke===19)return 2;if(Ke===26)return 1;if(Xw(Ke)&&Ke!==134&&Di(gm))return st()===130?0:1;if(!cn()&&Ke!==110)return 0;switch(st()){case 59:return 1;case 58:return st(),be()===59||be()===28||be()===64||be()===22?1:0;case 28:case 64:case 22:return 2}return 0}else return j.assert(fe===30),!cn()&&be()!==87?0:et===1?Di(()=>{Ls(87);const Xt=st();if(Xt===96)switch(st()){case 64:case 32:case 44:return!1;default:return!0}else if(Xt===28||Xt===64)return!0;return!1})?1:0:2}function _C(fe){const Ke=r.getTokenStart();if(xn!=null&&xn.has(Ke))return;const mt=DA(!1,fe);return mt||(xn||(xn=new Set)).add(Ke),mt}function FS(fe){if(be()===134&&Di(pC)===1){const Ke=le(),mt=Ue(),Xt=gs(),Si=BS(0);return Z0(Ke,Si,fe,mt,Xt)}}function pC(){if(be()===134){if(st(),r.hasPrecedingLineBreak()||be()===39)return 0;const fe=BS(0);if(!r.hasPrecedingLineBreak()&&fe.kind===80&&be()===39)return 1}return 0}function DA(fe,Ke){const mt=le(),Xt=Ue(),Si=gs(),an=Ft(Si,m7)?2:0,jr=ep();let Hs;if(vi(21)){if(fe)Hs=bm(an,fe);else{const xm=bm(an,fe);if(!xm)return;Hs=xm}if(!vi(22)&&!fe)return}else{if(!fe)return;Hs=h_()}const Cs=be()===59,Ss=zg(59,!1);if(Ss&&!fe&&Yl(Ss))return;let no=Ss;for(;(no==null?void 0:no.kind)===196;)no=no.type;const $c=no&&T3(no);if(!fe&&be()!==39&&($c||be()!==19))return;const Jc=be(),dc=Jo(39),og=Jc===39||Jc===19?$a(Ft(Si,m7),Ke):Nl();if(!Ke&&Cs&&be()!==59)return;const Dd=E.createArrowFunction(Si,jr,Hs,Ss,dc,og);return Mn(ki(Dd,mt),Xt)}function $a(fe,Ke){if(be()===19)return US(fe?2:0);if(be()!==27&&be()!==100&&be()!==86&&hN()&&!kA())return US(16|(fe?2:0));const mt=_i;_i=!1;const Xt=fe?Se(()=>ip(Ke)):Ze(()=>ip(Ke));return _i=mt,Xt}function p0(fe,Ke,mt){const Xt=ja(58);if(!Xt)return fe;let Si;return ki(E.createConditionalExpression(fe,Xt,ma(a,()=>ip(!1)),Si=Jo(59),Dg(Si)?ip(mt):Gc(80,!1,k._0_expected,xa(59))),Ke)}function BS(fe){const Ke=le(),mt=ff();return Kp(fe,mt,Ke)}function L2(fe){return fe===103||fe===165}function Kp(fe,Ke,mt){for(;;){ln();const Xt=AV(be());if(!(be()===43?Xt>=fe:Xt>fe)||be()===103&&Ct())break;if(be()===130||be()===152){if(r.hasPrecedingLineBreak())break;{const an=be();st(),Ke=an===152?Y0(Ke,Xd()):EA(Ke,Xd())}}else Ke=Ky(Ke,md(),BS(Xt),mt)}return Ke}function ab(){return Ct()&&be()===103?!1:AV(be())>0}function Y0(fe,Ke){return ki(E.createSatisfiesExpression(fe,Ke),fe.pos)}function Ky(fe,Ke,mt,Xt){return ki(E.createBinaryExpression(fe,Ke,mt),Xt)}function EA(fe,Ke){return ki(E.createAsExpression(fe,Ke),fe.pos)}function Nx(){const fe=le();return ki(E.createPrefixUnaryExpression(be(),lt(mC)),fe)}function Jg(){const fe=le();return ki(E.createDeleteExpression(lt(mC)),fe)}function IA(){const fe=le();return ki(E.createTypeOfExpression(lt(mC)),fe)}function WS(){const fe=le();return ki(E.createVoidExpression(lt(mC)),fe)}function Ys(){return be()===135?Ni()?!0:Di(kO):!1}function yr(){const fe=le();return ki(E.createAwaitExpression(lt(mC)),fe)}function ff(){if(VS()){const mt=le(),Xt=eN();return be()===43?Kp(AV(be()),Xt,mt):Xt}const fe=be(),Ke=mC();if(be()===43){const mt=Va(ze,Ke.pos),{end:Xt}=Ke;Ke.kind===216?te(mt,Xt,k.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses):(j.assert(oK(fe)),te(mt,Xt,k.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses,xa(fe)))}return Ke}function mC(){switch(be()){case 40:case 41:case 55:case 54:return Nx();case 91:return Jg();case 114:return IA();case 116:return WS();case 30:return et===1?gC(!0,void 0,void 0,!0):nN();case 135:if(Ys())return yr();default:return eN()}}function VS(){switch(be()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 135:return!1;case 30:if(et!==1)return!1;default:return!0}}function eN(){if(be()===46||be()===47){const Ke=le();return ki(E.createPrefixUnaryExpression(be(),lt(Lx)),Ke)}else if(et===1&&be()===30&&Di(kd))return gC(!0);const fe=Lx();if(j.assert(N_(fe)),(be()===46||be()===47)&&!r.hasPrecedingLineBreak()){const Ke=be();return st(),ki(E.createPostfixUnaryExpression(fe,Ke),fe.pos)}return fe}function Lx(){const fe=le();let Ke;return be()===102?Di(ei)?(We|=4194304,Ke=md()):Di(Pi)?(st(),st(),Ke=ki(E.createMetaProperty(102,Ve()),fe),We|=8388608):Ke=tN():Ke=be()===108?Tl():tN(),Sm(fe,Ke)}function tN(){const fe=le(),Ke=sN();return cb(fe,Ke,!0)}function Tl(){const fe=le();let Ke=md();if(be()===30){const mt=le(),Xt=on(zS);Xt!==void 0&&(te(mt,le(),k.super_may_not_use_type_arguments),np()||(Ke=E.createExpressionWithTypeArguments(Ke,Xt)))}return be()===21||be()===25||be()===23?Ke:(Jo(25,k.super_must_be_followed_by_an_argument_list_or_member_access),ki(re(Ke,mi(!0,!0,!0)),fe))}function gC(fe,Ke,mt,Xt=!1){const Si=le(),an=bO(fe);let jr;if(an.kind===286){let Hs=ND(an),Cs;const Ss=Hs[Hs.length-1];if((Ss==null?void 0:Ss.kind)===284&&!d2(Ss.openingElement.tagName,Ss.closingElement.tagName)&&d2(an.tagName,Ss.closingElement.tagName)){const no=Ss.children.end,$c=ki(E.createJsxElement(Ss.openingElement,Ss.children,ki(E.createJsxClosingElement(ki(U(""),no,no)),no,no)),Ss.openingElement.pos,no);Hs=tc([...Hs.slice(0,Hs.length-1),$c],Hs.pos,no),Cs=Ss.closingElement}else Cs=rr(an,fe),d2(an.tagName,Cs.tagName)||(mt&&z1(mt)&&d2(Cs.tagName,mt.tagName)?tt(an.tagName,k.JSX_element_0_has_no_corresponding_closing_tag,T8(ze,an.tagName)):tt(Cs.tagName,k.Expected_corresponding_JSX_closing_tag_for_0,T8(ze,an.tagName)));jr=ki(E.createJsxElement(an,Hs,Cs),Si)}else an.kind===289?jr=ki(E.createJsxFragment(an,ND(an),SO(fe)),Si):(j.assert(an.kind===285),jr=an);if(!Xt&&fe&&be()===30){const Hs=typeof Ke>"u"?jr.pos:Ke,Cs=on(()=>gC(!0,Hs));if(Cs){const Ss=Gc(28,!1);return $ce(Ss,Cs.pos,0),te(Va(ze,Hs),Cs.end,k.JSX_expressions_must_have_one_parent_element),ki(E.createBinaryExpression(jr,Ss,Cs),Si)}}return jr}function ID(){const fe=le(),Ke=E.createJsxText(r.getTokenValue(),Et===13);return Et=r.scanJsxToken(),ki(Ke,fe)}function sg(fe,Ke){switch(Ke){case 1:if(AI(fe))tt(fe,k.JSX_fragment_has_no_corresponding_closing_tag);else{const mt=fe.tagName,Xt=Math.min(Va(ze,mt.pos),mt.end);te(Xt,mt.end,k.JSX_element_0_has_no_corresponding_closing_tag,T8(ze,fe.tagName))}return;case 31:case 7:return;case 12:case 13:return ID();case 19:return fh(!1);case 30:return gC(!1,void 0,fe);default:return j.assertNever(Ke)}}function ND(fe){const Ke=[],mt=le(),Xt=tn;for(tn|=16384;;){const Si=sg(fe,Et=r.reScanJsxToken());if(!Si||(Ke.push(Si),z1(fe)&&(Si==null?void 0:Si.kind)===284&&!d2(Si.openingElement.tagName,Si.closingElement.tagName)&&d2(fe.tagName,Si.closingElement.tagName)))break}return tn=Xt,tc(Ke,mt)}function iN(){const fe=le();return ki(E.createJsxAttributes(sc(13,Vo)),fe)}function bO(fe){const Ke=le();if(vi(30),be()===32)return Ri(),ki(E.createJsxOpeningFragment(),Ke);const mt=CO(),Xt=Pn&524288?void 0:F2(),Si=iN();let an;return be()===32?(Ri(),an=E.createJsxOpeningElement(mt,Xt,Si)):(vi(44),vi(32,void 0,!1)&&(fe?st():Ri()),an=E.createJsxSelfClosingElement(mt,Xt,Si)),ki(an,Ke)}function CO(){const fe=le(),Ke=vr();if(j0(Ke))return Ke;let mt=Ke;for(;Ls(25);)mt=ki(re(mt,mi(!0,!1,!1)),fe);return mt}function vr(){const fe=le();wi();const Ke=be()===110,mt=_e();return Ls(59)?(wi(),ki(E.createJsxNamespacedName(mt,_e()),fe)):Ke?ki(E.createToken(110),fe):mt}function fh(fe){const Ke=le();if(!vi(19))return;let mt,Xt;return be()!==20&&(fe||(mt=ja(26)),Xt=dh()),fe?vi(20):vi(20,void 0,!1)&&Ri(),ki(E.createJsxExpression(mt,Xt),Ke)}function Vo(){if(be()===19)return P2();const fe=le();return ki(E.createJsxAttribute(NA(),HS()),fe)}function HS(){if(be()===64){if(Ai()===11)return Zt();if(be()===19)return fh(!0);if(be()===30)return gC(!0);ji(k.or_JSX_element_expected)}}function NA(){const fe=le();wi();const Ke=_e();return Ls(59)?(wi(),ki(E.createJsxNamespacedName(Ke,_e()),fe)):Ke}function P2(){const fe=le();vi(19),vi(26);const Ke=dh();return vi(20),ki(E.createJsxSpreadAttribute(Ke),fe)}function rr(fe,Ke){const mt=le();vi(31);const Xt=CO();return vi(32,void 0,!1)&&(Ke||!d2(fe.tagName,Xt)?st():Ri()),ki(E.createJsxClosingElement(Xt),mt)}function SO(fe){const Ke=le();return vi(31),vi(32,k.Expected_corresponding_closing_tag_for_JSX_fragment,!1)&&(fe?st():Ri()),ki(E.createJsxJsxClosingFragment(),Ke)}function nN(){j.assert(et!==1,"Type assertions should never be parsed in JSX; they should be parsed as comparisons or JSX elements/fragments.");const fe=le();vi(30);const Ke=Xd();vi(32);const mt=mC();return ki(E.createTypeAssertion(Ke,mt),fe)}function Th(){return st(),D_(be())||be()===23||np()}function Dh(){return be()===29&&Di(Th)}function Xp(fe){if(fe.flags&64)return!0;if($P(fe)){let Ke=fe.expression;for(;$P(Ke)&&!(Ke.flags&64);)Ke=Ke.expression;if(Ke.flags&64){for(;$P(fe);)fe.flags|=64,fe=fe.expression;return!0}}return!1}function A2(fe,Ke,mt){const Xt=mi(!0,!0,!0),Si=mt||Xp(Ke),an=Si?oe(Ke,mt,Xt):re(Ke,Xt);if(Si&&Vs(an.name)&&tt(an.name,k.An_optional_chain_cannot_contain_private_identifiers),Yb(Ke)&&Ke.typeArguments){const jr=Ke.typeArguments.pos-1,Hs=Va(ze,Ke.typeArguments.end)+1;te(jr,Hs,k.An_instantiation_expression_cannot_be_followed_by_a_property_access)}return ki(an,fe)}function rN(fe,Ke,mt){let Xt;if(be()===24)Xt=Gc(80,!0,k.An_element_access_expression_should_take_an_argument);else{const an=Ji(dh);cm(an)&&(an.text=uh(an.text)),Xt=an}vi(24);const Si=mt||Xp(Ke)?de(Ke,mt,Xt):pe(Ke,Xt);return ki(Si,fe)}function cb(fe,Ke,mt){for(;;){let Xt,Si=!1;if(mt&&Dh()?(Xt=Jo(29),Si=D_(be())):Si=Ls(25),Si){Ke=A2(fe,Ke,Xt);continue}if((Xt||!vt())&&Ls(23)){Ke=rN(fe,Ke,Xt);continue}if(np()){Ke=!Xt&&Ke.kind===233?Y1(fe,Ke.expression,Xt,Ke.typeArguments):Y1(fe,Ke,Xt,void 0);continue}if(!Xt){if(be()===54&&!r.hasPrecedingLineBreak()){st(),Ke=ki(E.createNonNullExpression(Ke),fe);continue}const an=on(zS);if(an){Ke=ki(E.createExpressionWithTypeArguments(Ke,an),fe);continue}}return Ke}}function np(){return be()===15||be()===16}function Y1(fe,Ke,mt,Xt){const Si=E.createTaggedTemplateExpression(Ke,Xt,be()===15?(Pt(!0),Zt()):hn(!0));return(mt||Ke.flags&64)&&(Si.flags|=64),Si.questionDotToken=mt,ki(Si,fe)}function Sm(fe,Ke){for(;;){Ke=cb(fe,Ke,!0);let mt;const Xt=ja(29);if(Xt&&(mt=on(zS),np())){Ke=Y1(fe,Ke,Xt,mt);continue}if(mt||be()===21){!Xt&&Ke.kind===233&&(mt=Ke.typeArguments,Ke=Ke.expression);const Si=jS(),an=Xt||Xp(Ke)?Ie(Ke,Xt,mt,Si):ue(Ke,mt,Si);Ke=ki(an,fe);continue}if(Xt){const Si=Gc(80,!1,k.Identifier_expected);Ke=ki(oe(Ke,Xt,Si),fe)}break}return Ke}function jS(){vi(21);const fe=jd(11,cN);return vi(22),fe}function zS(){if(Pn&524288||Bt()!==30)return;st();const fe=jd(20,Xd);if(ln()===32)return st(),fe&&LD()?fe:void 0}function LD(){switch(be()){case 21:case 15:case 16:return!0;case 30:case 32:case 40:case 41:return!1}return r.hasPrecedingLineBreak()||ab()||!Gy()}function sN(){switch(be()){case 15:r.getTokenFlags()&26656&&Pt(!1);case 9:case 10:case 11:return Zt();case 110:case 108:case 106:case 112:case 97:return md();case 21:return Px();case 23:return e1();case 19:return O2();case 134:if(!Di(nu))break;return Ax();case 60:return Co();case 86:return co();case 100:return Ax();case 105:return yC();case 44:case 69:if(Un()===14)return Zt();break;case 16:return hn(!1);case 81:return Xi()}return Nl(k.Expression_expected)}function Px(){const fe=le(),Ke=Ue();vi(21);const mt=Ji(dh);return vi(22),Mn(ki(he(mt),fe),Ke)}function oN(){const fe=le();vi(26);const Ke=ip(!0);return ki(E.createSpreadElement(Ke),fe)}function aN(){return be()===26?oN():be()===28?ki(E.createOmittedExpression(),le()):ip(!0)}function cN(){return ma(a,aN)}function e1(){const fe=le(),Ke=r.getTokenStart(),mt=vi(23),Xt=r.hasPrecedingLineBreak(),Si=jd(15,aN);return Zc(23,24,mt,Ke),ki(Z(Si,Xt),fe)}function wO(){const fe=le(),Ke=Ue();if(ja(26)){const no=ip(!0);return Mn(ki(E.createSpreadAssignment(no),fe),Ke)}const mt=Wi(!0);if(Mr(139))return Kg(fe,Ke,mt,177,0);if(Mr(153))return Kg(fe,Ke,mt,178,0);const Xt=ja(42),Si=cn(),an=Rn(),jr=ja(58),Hs=ja(54);if(Xt||be()===21||be()===30)return Rp(fe,Ke,mt,Xt,an,jr,Hs);let Cs;if(Si&&be()!==59){const no=ja(64),$c=no?Ji(()=>ip(!0)):void 0;Cs=E.createShorthandPropertyAssignment(an,$c),Cs.equalsToken=no}else{vi(59);const no=Ji(()=>ip(!0));Cs=E.createPropertyAssignment(an,no)}return Cs.modifiers=mt,Cs.questionToken=jr,Cs.exclamationToken=Hs,Mn(ki(Cs,fe),Ke)}function O2(){const fe=le(),Ke=r.getTokenStart(),mt=vi(19),Xt=r.hasPrecedingLineBreak(),Si=jd(12,wO,!0);return Zc(19,20,mt,Ke),ki(Q(Si,Xt),fe)}function Ax(){const fe=vt();Xr(!1);const Ke=le(),mt=Ue(),Xt=Wi(!1);vi(100);const Si=ja(42),an=Si?1:0,jr=Ft(Xt,m7)?2:0,Hs=an&&jr?gt(lb):an?xe(lb):jr?Se(lb):lb(),Cs=ep(),Ss=Ug(an|jr),no=zg(59,!1),$c=US(an|jr);Xr(fe);const Jc=E.createFunctionExpression(Xt,Si,Hs,Cs,Ss,no,$c);return Mn(ki(Jc,Ke),mt)}function lb(){return zi()?Pp():void 0}function yC(){const fe=le();if(vi(105),Ls(25)){const an=Ve();return ki(E.createMetaProperty(105,an),fe)}const Ke=le();let mt=cb(Ke,sN(),!1),Xt;mt.kind===233&&(Xt=mt.typeArguments,mt=mt.expression),be()===29&&ji(k.Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0,T8(ze,mt));const Si=be()===21?jS():void 0;return ki(we(mt,Xt,Si),fe)}function m0(fe,Ke){const mt=le(),Xt=Ue(),Si=r.getTokenStart(),an=vi(19,Ke);if(an||fe){const jr=r.hasPrecedingLineBreak(),Hs=sc(1,wm);Zc(19,20,an,Si);const Cs=Mn(ki(Ae(Hs,jr),mt),Xt);return be()===64&&(ji(k.Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses),st()),Cs}else{const jr=h_();return Mn(ki(Ae(jr,void 0),mt),Xt)}}function US(fe,Ke){const mt=Rt();us(!!(fe&1));const Xt=Ni();Gs(!!(fe&2));const Si=_i;_i=!1;const an=vt();an&&Xr(!1);const jr=m0(!!(fe&16),Ke);return an&&Xr(!0),_i=Si,us(mt),Gs(Xt),jr}function lN(){const fe=le(),Ke=Ue();return vi(27),Mn(ki(E.createEmptyStatement(),fe),Ke)}function Qd(){const fe=le(),Ke=Ue();vi(101);const mt=r.getTokenStart(),Xt=vi(21),Si=Ji(dh);Zc(21,22,Xt,mt);const an=wm(),jr=Ls(93)?wm():void 0;return Mn(ki(De(Si,an,jr),fe),Ke)}function uN(){const fe=le(),Ke=Ue();vi(92);const mt=wm();vi(117);const Xt=r.getTokenStart(),Si=vi(21),an=Ji(dh);return Zc(21,22,Si,Xt),Ls(27),Mn(ki(E.createDoStatement(mt,an),fe),Ke)}function Xy(){const fe=le(),Ke=Ue();vi(117);const mt=r.getTokenStart(),Xt=vi(21),Si=Ji(dh);Zc(21,22,Xt,mt);const an=wm();return Mn(ki(qe(Si,an),fe),Ke)}function dN(){const fe=le(),Ke=Ue();vi(99);const mt=ja(135);vi(21);let Xt;be()!==27&&(be()===115||be()===121||be()===87||be()===160&&Di(OA)||be()===135&&Di(MA)?Xt=DO(!0):Xt=ac(dh));let Si;if(mt?vi(165):Ls(165)){const an=Ji(()=>ip(!0));vi(22),Si=Ne(mt,Xt,an,wm())}else if(Ls(103)){const an=Ji(dh);vi(22),Si=E.createForInStatement(Xt,an,wm())}else{vi(27);const an=be()!==27&&be()!==22?Ji(dh):void 0;vi(27);const jr=be()!==22?Ji(dh):void 0;vi(22),Si=se(Xt,an,jr,wm())}return Mn(ki(Si,fe),Ke)}function M2(fe){const Ke=le(),mt=Ue();vi(fe===252?83:88);const Xt=pc()?void 0:Nl();oo();const Si=fe===252?E.createBreakStatement(Xt):E.createContinueStatement(Xt);return Mn(ki(Si,Ke),mt)}function vC(){const fe=le(),Ke=Ue();vi(107);const mt=pc()?void 0:Ji(dh);return oo(),Mn(ki(E.createReturnStatement(mt),fe),Ke)}function Ox(){const fe=le(),Ke=Ue();vi(118);const mt=r.getTokenStart(),Xt=vi(21),Si=Ji(dh);Zc(21,22,Xt,mt);const an=ka(67108864,wm);return Mn(ki(E.createWithStatement(Si,an),fe),Ke)}function PD(){const fe=le(),Ke=Ue();vi(84);const mt=Ji(dh);vi(59);const Xt=sc(3,wm);return Mn(ki(E.createCaseClause(mt,Xt),fe),Ke)}function Zu(){const fe=le();vi(90),vi(59);const Ke=sc(3,wm);return ki(E.createDefaultClause(Ke),fe)}function $f(){return be()===84?PD():Zu()}function xO(){const fe=le();vi(19);const Ke=sc(2,$f);return vi(20),ki(E.createCaseBlock(Ke),fe)}function Eh(){const fe=le(),Ke=Ue();vi(109),vi(21);const mt=Ji(dh);vi(22);const Xt=xO();return Mn(ki(E.createSwitchStatement(mt,Xt),fe),Ke)}function rp(){const fe=le(),Ke=Ue();vi(111);let mt=r.hasPrecedingLineBreak()?void 0:Ji(dh);return mt===void 0&&(Ei++,mt=ki(U(""),le())),mc()||Wo(mt),Mn(ki(E.createThrowStatement(mt),fe),Ke)}function LA(){const fe=le(),Ke=Ue();vi(113);const mt=m0(!1),Xt=be()===85?ey():void 0;let Si;return(!Xt||be()===98)&&(vi(98,k.catch_or_finally_expected),Si=m0(!1)),Mn(ki(E.createTryStatement(mt,Xt,Si),fe),Ke)}function ey(){const fe=le();vi(85);let Ke;Ls(21)?(Ke=RD(),vi(22)):Ke=void 0;const mt=m0(!1);return ki(E.createCatchClause(Ke,mt),fe)}function PA(){const fe=le(),Ke=Ue();return vi(89),oo(),Mn(ki(E.createDebuggerStatement(),fe),Ke)}function qS(){const fe=le();let Ke=Ue(),mt;const Xt=be()===21,Si=Ji(dh);return ot(Si)&&Ls(59)?mt=E.createLabeledStatement(Si,wm()):(mc()||Wo(Si),mt=Te(Si),Xt&&(Ke=!1)),Mn(ki(mt,fe),Ke)}function fN(){return st(),D_(be())&&!r.hasPrecedingLineBreak()}function L5(){return st(),be()===86&&!r.hasPrecedingLineBreak()}function nu(){return st(),be()===100&&!r.hasPrecedingLineBreak()}function kO(){return st(),(D_(be())||be()===9||be()===10||be()===11)&&!r.hasPrecedingLineBreak()}function AA(){for(;;)switch(be()){case 115:case 121:case 87:case 100:case 86:case 94:return!0;case 160:return sp();case 135:return Rx();case 120:case 156:return Q1();case 144:case 145:return $S();case 128:case 129:case 134:case 138:case 123:case 124:case 125:case 148:const fe=be();if(st(),r.hasPrecedingLineBreak())return!1;if(fe===138&&be()===156)return!0;continue;case 162:return st(),be()===19||be()===80||be()===95;case 102:return st(),be()===11||be()===42||be()===19||D_(be());case 95:let Ke=st();if(Ke===156&&(Ke=Di(st)),Ke===64||Ke===42||Ke===19||Ke===90||Ke===130||Ke===60)return!0;continue;case 126:st();continue;default:return!1}}function Mx(){return Di(AA)}function hN(){switch(be()){case 60:case 27:case 19:case 115:case 121:case 160:case 100:case 86:case 94:case 101:case 92:case 117:case 99:case 88:case 83:case 107:case 118:case 109:case 111:case 113:case 89:case 85:case 98:return!0;case 102:return Mx()||Di(nn);case 87:case 95:return Mx();case 134:case 138:case 120:case 144:case 145:case 156:case 162:return!0;case 129:case 125:case 123:case 124:case 126:case 148:return Mx()||!Di(fN);default:return Gy()}}function B_(){return st(),zi()||be()===19||be()===23}function AD(){return Di(B_)}function OA(){return OD(!0)}function OD(fe){return st(),fe&&be()===165?!1:(zi()||be()===19)&&!r.hasPrecedingLineBreak()}function sp(){return Di(OD)}function MA(fe){return st()===160?OD(fe):!1}function Rx(){return Di(MA)}function wm(){switch(be()){case 27:return lN();case 19:return m0(!1);case 115:return R2(le(),Ue(),void 0);case 121:if(AD())return R2(le(),Ue(),void 0);break;case 135:if(Rx())return R2(le(),Ue(),void 0);break;case 160:if(sp())return R2(le(),Ue(),void 0);break;case 100:return FD(le(),Ue(),void 0);case 86:return Xs(le(),Ue(),void 0);case 101:return Qd();case 92:return uN();case 117:return Xy();case 99:return dN();case 88:return M2(251);case 83:return M2(252);case 107:return vC();case 118:return Ox();case 109:return Eh();case 111:return rp();case 113:case 85:case 98:return LA();case 89:return PA();case 60:return Fx();case 134:case 120:case 156:case 144:case 145:case 138:case 87:case 94:case 95:case 102:case 123:case 124:case 125:case 128:case 129:case 126:case 148:case 162:if(Mx())return Fx();break}return qS()}function _N(fe){return fe.kind===138}function Fx(){const fe=le(),Ke=Ue(),mt=Wi(!0);if(Ft(mt,_N)){const Si=P5(fe);if(Si)return Si;for(const an of mt)an.flags|=33554432;return ka(33554432,()=>MD(fe,Ke,mt))}else return MD(fe,Ke,mt)}function P5(fe){return ka(33554432,()=>{const Ke=Hd(tn,fe);if(Ke)return Yc(Ke)})}function MD(fe,Ke,mt){switch(be()){case 115:case 121:case 87:case 160:case 135:return R2(fe,Ke,mt);case 100:return FD(fe,Ke,mt);case 86:return Xs(fe,Ke,mt);case 120:return gN(fe,Ke,mt);case 156:return n1(fe,Ke,mt);case 94:return GS(fe,Ke,mt);case 162:case 144:case 145:return gz(fe,Ke,mt);case 102:return EO(fe,Ke,mt);case 95:switch(st(),be()){case 90:case 64:return Sz(fe,Ke,mt);case 130:return O5(fe,Ke,mt);default:return bN(fe,Ke,mt)}default:if(mt){const Xt=Gc(282,!0,k.Declaration_expected);return o7(Xt,fe),Xt.modifiers=mt,Xt}return}}function pN(){return st()===11}function RA(){return st(),be()===161||be()===64}function $S(){return st(),!r.hasPrecedingLineBreak()&&(cn()||be()===11)}function __(fe,Ke){if(be()!==19){if(fe&4){dC();return}if(pc()){oo();return}}return US(fe,Ke)}function ub(){const fe=le();if(be()===28)return ki(E.createOmittedExpression(),fe);const Ke=ja(26),mt=p_(),Xt=hC();return ki(E.createBindingElement(Ke,void 0,mt,Xt),fe)}function db(){const fe=le(),Ke=ja(26),mt=zi();let Xt=Rn(),Si;mt&&be()!==59?(Si=Xt,Xt=void 0):(vi(59),Si=p_());const an=hC();return ki(E.createBindingElement(Ke,Xt,Si,an),fe)}function TO(){const fe=le();vi(19);const Ke=Ji(()=>jd(9,db));return vi(20),ki(E.createObjectBindingPattern(Ke),fe)}function wc(){const fe=le();vi(23);const Ke=Ji(()=>jd(10,ub));return vi(24),ki(E.createArrayBindingPattern(Ke),fe)}function xr(){return be()===19||be()===23||be()===81||zi()}function p_(fe){return be()===23?wc():be()===19?TO():Pp(fe)}function Qp(){return RD(!0)}function RD(fe){const Ke=le(),mt=Ue(),Xt=p_(k.Private_identifiers_are_not_allowed_in_variable_declarations);let Si;fe&&Xt.kind===80&&be()===54&&!r.hasPrecedingLineBreak()&&(Si=md());const an=Q0(),jr=L2(be())?void 0:hC(),Hs=Oe(Xt,Si,an,jr);return Mn(ki(Hs,Ke),mt)}function DO(fe){const Ke=le();let mt=0;switch(be()){case 115:break;case 121:mt|=1;break;case 87:mt|=2;break;case 160:mt|=4;break;case 135:j.assert(Rx()),mt|=6,st();break;default:j.fail()}st();let Xt;if(be()===165&&Di(FA))Xt=h_();else{const Si=Ct();dr(fe),Xt=jd(8,fe?RD:Qp),dr(Si)}return ki(He(Xt,mt),Ke)}function FA(){return gm()&&st()===22}function R2(fe,Ke,mt){const Xt=DO(!1);oo();const Si=ke(mt,Xt);return Mn(ki(Si,fe),Ke)}function FD(fe,Ke,mt){const Xt=Ni(),Si=M1(mt);vi(100);const an=ja(42),jr=Si&2048?lb():Pp(),Hs=an?1:0,Cs=Si&1024?2:0,Ss=ep();Si&32&&Gs(!0);const no=Ug(Hs|Cs),$c=zg(59,!1),Jc=__(Hs|Cs,k.or_expected);Gs(Xt);const dc=E.createFunctionDeclaration(mt,an,jr,Ss,no,$c,Jc);return Mn(ki(dc,fe),Ke)}function BD(){if(be()===137)return vi(137);if(be()===11&&Di(st)===21)return on(()=>{const fe=Zt();return fe.text==="constructor"?fe:void 0})}function Gg(fe,Ke,mt){return on(()=>{if(BD()){const Xt=ep(),Si=Ug(0),an=zg(59,!1),jr=__(0,k.or_expected),Hs=E.createConstructorDeclaration(mt,Si,jr);return Hs.typeParameters=Xt,Hs.type=an,Mn(ki(Hs,fe),Ke)}})}function Rp(fe,Ke,mt,Xt,Si,an,jr,Hs){const Cs=Xt?1:0,Ss=Ft(mt,m7)?2:0,no=ep(),$c=Ug(Cs|Ss),Jc=zg(59,!1),dc=__(Cs|Ss,Hs),og=E.createMethodDeclaration(mt,Xt,Si,an,no,$c,Jc,dc);return og.exclamationToken=jr,Mn(ki(og,fe),Ke)}function Fp(fe,Ke,mt,Xt,Si){const an=!Si&&!r.hasPrecedingLineBreak()?ja(54):void 0,jr=Q0(),Hs=ma(90112,hC);vu(Xt,jr,Hs);const Cs=E.createPropertyDeclaration(mt,Xt,Si||an,jr,Hs);return Mn(ki(Cs,fe),Ke)}function t1(fe,Ke,mt){const Xt=ja(42),Si=Rn(),an=ja(58);return Xt||be()===21||be()===30?Rp(fe,Ke,mt,Xt,Si,an,void 0,k.or_expected):Fp(fe,Ke,mt,Si,an)}function Kg(fe,Ke,mt,Xt,Si){const an=Rn(),jr=ep(),Hs=Ug(0),Cs=zg(59,!1),Ss=__(Si),no=Xt===177?E.createGetAccessorDeclaration(mt,an,Hs,Cs,Ss):E.createSetAccessorDeclaration(mt,an,Hs,Ss);return no.typeParameters=jr,kp(no)&&(no.type=Cs),Mn(ki(no,fe),Ke)}function mN(){let fe;if(be()===60)return!0;for(;Xw(be());){if(fe=be(),tae(fe))return!0;st()}if(be()===42||(Lt()&&(fe=be(),st()),be()===23))return!0;if(fe!==void 0){if(!P_(fe)||fe===153||fe===139)return!0;switch(be()){case 21:case 30:case 54:case 59:case 64:case 58:return!0;default:return pc()}}return!1}function Td(fe,Ke,mt){Jo(126);const Xt=BA(),Si=Mn(ki(E.createClassStaticBlockDeclaration(Xt),fe),Ke);return Si.modifiers=mt,Si}function BA(){const fe=Rt(),Ke=Ni();us(!1),Gs(!0);const mt=m0(!1);return us(fe),Gs(Ke),mt}function V(){if(Ni()&&be()===135){const fe=le(),Ke=Nl(k.Expression_expected);st();const mt=cb(fe,Ke,!0);return Sm(fe,mt)}return Lx()}function Le(){const fe=le();if(!Ls(60))return;const Ke=pt(V);return ki(E.createDecorator(Ke),fe)}function Ut(fe,Ke,mt){const Xt=le(),Si=be();if(be()===87&&Ke){if(!on(ds))return}else{if(mt&&be()===126&&Di(B2))return;if(fe&&be()===126)return;if(!Pu())return}return ki(X(Si),Xt)}function Wi(fe,Ke,mt){const Xt=le();let Si,an,jr,Hs=!1,Cs=!1,Ss=!1;if(fe&&be()===60)for(;an=Le();)Si=fn(Si,an);for(;jr=Ut(Hs,Ke,mt);)jr.kind===126&&(Hs=!0),Si=fn(Si,jr),Cs=!0;if(Cs&&fe&&be()===60)for(;an=Le();)Si=fn(Si,an),Ss=!0;if(Ss)for(;jr=Ut(Hs,Ke,mt);)jr.kind===126&&(Hs=!0),Si=fn(Si,jr);return Si&&tc(Si,Xt)}function gs(){let fe;if(be()===134){const Ke=le();st();const mt=ki(X(134),Ke);fe=tc([mt],Ke)}return fe}function ao(){const fe=le(),Ke=Ue();if(be()===27)return st(),Mn(ki(E.createSemicolonClassElement(),fe),Ke);const mt=Wi(!0,!0,!0);if(be()===126&&Di(B2))return Td(fe,Ke,mt);if(Mr(139))return Kg(fe,Ke,mt,177,0);if(Mr(153))return Kg(fe,Ke,mt,178,0);if(be()===137||be()===11){const Xt=Gg(fe,Ke,mt);if(Xt)return Xt}if(Jy())return T2(fe,Ke,mt);if(D_(be())||be()===11||be()===9||be()===10||be()===42||be()===23)if(Ft(mt,_N)){for(const Si of mt)Si.flags|=33554432;return ka(33554432,()=>t1(fe,Ke,mt))}else return t1(fe,Ke,mt);if(mt){const Xt=Gc(80,!0,k.Declaration_expected);return Fp(fe,Ke,mt,Xt,void 0)}return j.fail("Should not have attempted to parse class member declaration.")}function Co(){const fe=le(),Ke=Ue(),mt=Wi(!0);if(be()===86)return Gh(fe,Ke,mt,231);const Xt=Gc(282,!0,k.Expression_expected);return o7(Xt,fe),Xt.modifiers=mt,Xt}function co(){return Gh(le(),Ue(),void 0,231)}function Xs(fe,Ke,mt){return Gh(fe,Ke,mt,263)}function Gh(fe,Ke,mt,Xt){const Si=Ni();vi(86);const an=xf(),jr=ep();Ft(mt,BP)&&Gs(!0);const Hs=JS();let Cs;vi(19)?(Cs=WA(),vi(20)):Cs=h_(),Gs(Si);const Ss=Xt===263?E.createClassDeclaration(mt,an,jr,Hs,Cs):E.createClassExpression(mt,an,jr,Hs,Cs);return Mn(ki(Ss,fe),Ke)}function xf(){return zi()&&!i1()?sd(zi()):void 0}function i1(){return be()===119&&Di(Qu)}function JS(){if(VD())return sc(22,Bp)}function Bp(){const fe=le(),Ke=be();j.assert(Ke===96||Ke===119),st();const mt=jd(7,WD);return ki(E.createHeritageClause(Ke,mt),fe)}function WD(){const fe=le(),Ke=Lx();if(Ke.kind===233)return Ke;const mt=F2();return ki(E.createExpressionWithTypeArguments(Ke,mt),fe)}function F2(){return be()===30?vm(20,Xd,30,32):void 0}function VD(){return be()===96||be()===119}function WA(){return sc(5,ao)}function gN(fe,Ke,mt){vi(120);const Xt=Nl(),Si=ep(),an=JS(),jr=mn(),Hs=E.createInterfaceDeclaration(mt,Xt,Si,an,jr);return Mn(ki(Hs,fe),Ke)}function n1(fe,Ke,mt){vi(156),r.hasPrecedingLineBreak()&&ji(k.Line_break_not_permitted_here);const Xt=Nl(),Si=ep();vi(64);const an=be()===141&&on(Jh)||Xd();oo();const jr=E.createTypeAliasDeclaration(mt,Xt,Si,an);return Mn(ki(jr,fe),Ke)}function fb(){const fe=le(),Ke=Ue(),mt=Rn(),Xt=Ji(hC);return Mn(ki(E.createEnumMember(mt,Xt),fe),Ke)}function GS(fe,Ke,mt){vi(94);const Xt=Nl();let Si;vi(19)?(Si=Dt(()=>jd(6,fb)),vi(20)):Si=h_();const an=E.createEnumDeclaration(mt,Xt,Si);return Mn(ki(an,fe),Ke)}function VA(){const fe=le();let Ke;return vi(19)?(Ke=sc(1,wm),vi(20)):Ke=h_(),ki(E.createModuleBlock(Ke),fe)}function Bx(fe,Ke,mt,Xt){const Si=Xt&32,an=Xt&8?Ve():Nl(),jr=Ls(25)?Bx(le(),!1,void 0,8|Si):VA(),Hs=E.createModuleDeclaration(mt,an,jr,Xt);return Mn(ki(Hs,fe),Ke)}function A5(fe,Ke,mt){let Xt=0,Si;be()===162?(Si=Nl(),Xt|=2048):(Si=Zt(),Si.text=uh(Si.text));let an;be()===19?an=VA():oo();const jr=E.createModuleDeclaration(mt,Si,an,Xt);return Mn(ki(jr,fe),Ke)}function gz(fe,Ke,mt){let Xt=0;if(be()===162)return A5(fe,Ke,mt);if(Ls(145))Xt|=32;else if(vi(144),be()===11)return A5(fe,Ke,mt);return Bx(fe,Ke,mt,Xt)}function yz(){return be()===149&&Di(eo)}function eo(){return st()===21}function B2(){return st()===19}function Hn(){return st()===44}function O5(fe,Ke,mt){vi(130),vi(145);const Xt=Nl();oo();const Si=E.createNamespaceExportDeclaration(Xt);return Si.modifiers=mt,Mn(ki(Si,fe),Ke)}function EO(fe,Ke,mt){vi(102);const Xt=r.getTokenFullStart();let Si;cn()&&(Si=Nl());let an=!1;if((Si==null?void 0:Si.escapedText)==="type"&&(be()!==161||cn()&&Di(RA))&&(cn()||JY())&&(an=!0,Si=cn()?Nl():void 0),Si&&!ty())return GY(fe,Ke,mt,Si,an);const jr=Wx(Si,Xt,an),Hs=vN(),Cs=IO();oo();const Ss=E.createImportDeclaration(mt,jr,Hs,Cs);return Mn(ki(Ss,fe),Ke)}function Wx(fe,Ke,mt,Xt=!1){let Si;return(fe||be()===42||be()===19)&&(Si=R5(fe,Ke,mt,Xt),vi(161)),Si}function IO(){const fe=be();if((fe===118||fe===132)&&!r.hasPrecedingLineBreak())return M5(fe)}function vz(){const fe=le(),Ke=D_(be())?Ve():To(11);vi(59);const mt=ip(!0);return ki(E.createImportAttribute(Ke,mt),fe)}function M5(fe,Ke){const mt=le();Ke||vi(fe);const Xt=r.getTokenStart();if(vi(19)){const Si=r.hasPrecedingLineBreak(),an=jd(24,vz,!0);if(!vi(20)){const jr=rl(Me);jr&&jr.code===k._0_expected.code&&da(jr,kP(Pe,ze,Xt,1,k.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}return ki(E.createImportAttributes(an,Si,fe),mt)}else{const Si=tc([],le(),void 0,!1);return ki(E.createImportAttributes(Si,!1,fe),mt)}}function JY(){return be()===42||be()===19}function ty(){return be()===28||be()===161}function GY(fe,Ke,mt,Xt,Si){vi(64);const an=KY();oo();const jr=E.createImportEqualsDeclaration(mt,Si,Xt,an);return Mn(ki(jr,fe),Ke)}function R5(fe,Ke,mt,Xt){let Si;return(!fe||Ls(28))&&(Xt&&r.setSkipJsDocLeadingAsterisks(!0),Si=be()===42?bz():NO(275),Xt&&r.setSkipJsDocLeadingAsterisks(!1)),ki(E.createImportClause(mt,fe,Si),Ke)}function KY(){return yz()?yN():ve(!1)}function yN(){const fe=le();vi(149),vi(21);const Ke=vN();return vi(22),ki(E.createExternalModuleReference(Ke),fe)}function vN(){if(be()===11){const fe=Zt();return fe.text=uh(fe.text),fe}else return dh()}function bz(){const fe=le();vi(42),vi(130);const Ke=Nl();return ki(E.createNamespaceImport(Ke),fe)}function Vx(){return D_(be())||be()===11}function g0(fe){return be()===11?Zt():fe()}function NO(fe){const Ke=le(),mt=fe===275?E.createNamedImports(vm(23,Hx,19,20)):E.createNamedExports(vm(23,Qy,19,20));return ki(mt,Ke)}function Qy(){const fe=Ue();return Mn(Cz(281),fe)}function Hx(){return Cz(276)}function Cz(fe){const Ke=le();let mt=P_(be())&&!cn(),Xt=r.getTokenStart(),Si=r.getTokenEnd(),an=!1,jr,Hs=!0,Cs=g0(Ve);if(Cs.kind===80&&Cs.escapedText==="type")if(be()===130){const $c=Ve();if(be()===130){const Jc=Ve();Vx()?(an=!0,jr=$c,Cs=g0(no),Hs=!1):(jr=Cs,Cs=Jc,Hs=!1)}else Vx()?(jr=Cs,Hs=!1,Cs=g0(no)):(an=!0,Cs=$c)}else Vx()&&(an=!0,Cs=g0(no));Hs&&be()===130&&(jr=Cs,vi(130),Cs=g0(no)),fe===276&&(Cs.kind!==80?(te(Va(ze,Cs.pos),Cs.end,k.Identifier_expected),Cs=V0(Gc(80,!1),Cs.pos,Cs.pos)):mt&&te(Xt,Si,k.Identifier_expected));const Ss=fe===276?E.createImportSpecifier(an,jr,Cs):E.createExportSpecifier(an,jr,Cs);return ki(Ss,Ke);function no(){return mt=P_(be())&&!cn(),Xt=r.getTokenStart(),Si=r.getTokenEnd(),Ve()}}function Zy(fe){return ki(E.createNamespaceExport(g0(Ve)),fe)}function bN(fe,Ke,mt){const Xt=Ni();Gs(!0);let Si,an,jr;const Hs=Ls(156),Cs=le();Ls(42)?(Ls(130)&&(Si=Zy(Cs)),vi(161),an=vN()):(Si=NO(279),(be()===161||be()===11&&!r.hasPrecedingLineBreak())&&(vi(161),an=vN()));const Ss=be();an&&(Ss===118||Ss===132)&&!r.hasPrecedingLineBreak()&&(jr=M5(Ss)),oo(),Gs(Xt);const no=E.createExportDeclaration(mt,Hs,Si,an,jr);return Mn(ki(no,fe),Ke)}function Sz(fe,Ke,mt){const Xt=Ni();Gs(!0);let Si;Ls(64)?Si=!0:vi(90);const an=ip(!0);oo(),Gs(Xt);const jr=E.createExportAssignment(mt,Si,an);return Mn(ki(jr,fe),Ke)}let Yu;(fe=>{fe[fe.SourceElements=0]="SourceElements",fe[fe.BlockStatements=1]="BlockStatements",fe[fe.SwitchClauses=2]="SwitchClauses",fe[fe.SwitchClauseStatements=3]="SwitchClauseStatements",fe[fe.TypeMembers=4]="TypeMembers",fe[fe.ClassMembers=5]="ClassMembers",fe[fe.EnumMembers=6]="EnumMembers",fe[fe.HeritageClauseElement=7]="HeritageClauseElement",fe[fe.VariableDeclarations=8]="VariableDeclarations",fe[fe.ObjectBindingElements=9]="ObjectBindingElements",fe[fe.ArrayBindingElements=10]="ArrayBindingElements",fe[fe.ArgumentExpressions=11]="ArgumentExpressions",fe[fe.ObjectLiteralMembers=12]="ObjectLiteralMembers",fe[fe.JsxAttributes=13]="JsxAttributes",fe[fe.JsxChildren=14]="JsxChildren",fe[fe.ArrayLiteralMembers=15]="ArrayLiteralMembers",fe[fe.Parameters=16]="Parameters",fe[fe.JSDocParameters=17]="JSDocParameters",fe[fe.RestProperties=18]="RestProperties",fe[fe.TypeParameters=19]="TypeParameters",fe[fe.TypeArguments=20]="TypeArguments",fe[fe.TupleElementTypes=21]="TupleElementTypes",fe[fe.HeritageClauses=22]="HeritageClauses",fe[fe.ImportOrExportSpecifiers=23]="ImportOrExportSpecifiers",fe[fe.ImportAttributes=24]="ImportAttributes",fe[fe.JSDocComment=25]="JSDocComment",fe[fe.Count=26]="Count"})(Yu||(Yu={}));let HA;(fe=>{fe[fe.False=0]="False",fe[fe.True=1]="True",fe[fe.Unknown=2]="Unknown"})(HA||(HA={}));let Nc;(fe=>{function Ke(Ss,no,$c){Fs("file.js",Ss,99,void 0,1,0),r.setText(Ss,no,$c),Et=r.scan();const Jc=mt(),dc=yi("file.js",99,1,!1,[],X(1),0,Tc),og=TP(Me,dc);return ut&&(dc.jsDocDiagnostics=TP(ut,dc)),ko(),Jc?{jsDocTypeExpression:Jc,diagnostics:og}:void 0}fe.parseJSDocTypeExpressionForTests=Ke;function mt(Ss){const no=le(),$c=(Ss?Ls:vi)(19),Jc=ka(16777216,rg);(!Ss||$c)&&Gu(20);const dc=E.createJSDocTypeExpression(Jc);return at(dc),ki(dc,no)}fe.parseJSDocTypeExpression=mt;function Xt(){const Ss=le(),no=Ls(19),$c=le();let Jc=ve(!1);for(;be()===81;)fi(),hi(),Jc=ki(E.createJSDocMemberName(Jc,Nl()),$c);no&&Gu(20);const dc=E.createJSDocNameReference(Jc);return at(dc),ki(dc,Ss)}fe.parseJSDocNameReference=Xt;function Si(Ss,no,$c){Fs("",Ss,99,void 0,1,0);const Jc=ka(16777216,()=>Cs(no,$c)),og=TP(Me,{languageVariant:0,text:Ss});return ko(),Jc?{jsDoc:Jc,diagnostics:og}:void 0}fe.parseIsolatedJSDocComment=Si;function an(Ss,no,$c){const Jc=Et,dc=Me.length,og=Fi,Dd=ka(16777216,()=>Cs(no,$c));return _c(Dd,Ss),Pn&524288&&(ut||(ut=[]),Sr(ut,Me,dc)),Et=Jc,Me.length=dc,Fi=og,Dd}fe.parseJSDocComment=an;let jr;(Ss=>{Ss[Ss.BeginningOfLine=0]="BeginningOfLine",Ss[Ss.SawAsterisk=1]="SawAsterisk",Ss[Ss.SavingComments=2]="SavingComments",Ss[Ss.SavingBackticks=3]="SavingBackticks"})(jr||(jr={}));let Hs;(Ss=>{Ss[Ss.Property=1]="Property",Ss[Ss.Parameter=2]="Parameter",Ss[Ss.CallbackParameter=4]="CallbackParameter"})(Hs||(Hs={}));function Cs(Ss=0,no){const $c=ze,Jc=no===void 0?$c.length:Ss+no;if(no=Jc-Ss,j.assert(Ss>=0),j.assert(Ss<=Jc),j.assert(Jc<=$c.length),!Hle($c,Ss))return;let dc,og,Dd,xm,bC,hb=[];const jx=[],XY=tn;tn|=1<<25;const gc=r.scanRange(Ss+3,no-5,gd);return tn=XY,gc;function gd(){let gn=1,Ar,Vr=Ss-($c.lastIndexOf(`
+`,Ss)+1)+4;function Ds(tl){Ar||(Ar=Vr),hb.push(tl),Vr+=tl.length}for(hi();y0(5););y0(4)&&(gn=0,Vr=0);e:for(;;){switch(be()){case 60:HD(hb),bC||(bC=le()),xo(ir(Vr)),gn=0,Ar=void 0;break;case 4:hb.push(r.getTokenText()),gn=0,Vr=0;break;case 42:const tl=r.getTokenText();gn===1?(gn=2,Ds(tl)):(j.assert(gn===0),gn=1,Vr+=tl.length);break;case 5:j.assert(gn!==2,"whitespace shouldn't come from the scanner while saving top-level comment text");const Ll=r.getTokenText();Ar!==void 0&&Vr+Ll.length>Ar&&hb.push(Ll.slice(Ar-Vr)),Vr+=Ll.length;break;case 1:break e;case 82:gn=2,Ds(r.getTokenValue());break;case 19:gn=2;const ev=r.getTokenFullStart(),ny=r.getTokenEnd()-1,r1=ie(ny);if(r1){xm||CC(hb),jx.push(ki(E.createJSDocText(hb.join("")),xm??Ss,ev)),jx.push(r1),hb=[],xm=r.getTokenEnd();break}default:gn=2,Ds(r.getTokenText());break}gn===2?vn(!1):hi()}const ys=hb.join("").trimEnd();jx.length&&ys.length&&jx.push(ki(E.createJSDocText(ys),xm??Ss,bC)),jx.length&&dc&&j.assertIsDefined(bC,"having parsed tags implies that the end of the comment span should be set");const yc=dc&&tc(dc,og,Dd);return ki(E.createJSDocComment(jx.length?tc(jx,Ss,bC):ys.length?ys:void 0,yc),Ss,Jc)}function CC(gn){for(;gn.length&&(gn[0]===`
+`||gn[0]==="\r");)gn.shift()}function HD(gn){for(;gn.length;){const Ar=gn[gn.length-1].trimEnd();if(Ar==="")gn.pop();else if(Ar.length<gn[gn.length-1].length){gn[gn.length-1]=Ar;break}else break}}function F5(){for(;;){if(hi(),be()===1)return!0;if(!(be()===5||be()===4))return!1}}function Zp(){if(!((be()===5||be()===4)&&Di(F5)))for(;be()===5||be()===4;)hi()}function W2(){if((be()===5||be()===4)&&Di(F5))return"";let gn=r.hasPrecedingLineBreak(),Ar=!1,Vr="";for(;gn&&be()===42||be()===5||be()===4;)Vr+=r.getTokenText(),be()===4?(gn=!0,Ar=!0,Vr=""):be()===42&&(gn=!1),hi();return Ar?Vr:""}function ir(gn){j.assert(be()===60);const Ar=r.getTokenStart();hi();const Vr=V2(void 0),Ds=W2();let ys;switch(Vr.escapedText){case"author":ys=fRe(Ar,Vr,gn,Ds);break;case"implements":ys=wz(Ar,Vr,gn,Ds);break;case"augments":case"extends":ys=Hpe(Ar,Vr,gn,Ds);break;case"class":case"constructor":ys=jA(Ar,E.createJSDocClassTag,Vr,gn,Ds);break;case"public":ys=jA(Ar,E.createJSDocPublicTag,Vr,gn,Ds);break;case"private":ys=jA(Ar,E.createJSDocPrivateTag,Vr,gn,Ds);break;case"protected":ys=jA(Ar,E.createJSDocProtectedTag,Vr,gn,Ds);break;case"readonly":ys=jA(Ar,E.createJSDocReadonlyTag,Vr,gn,Ds);break;case"override":ys=jA(Ar,E.createJSDocOverrideTag,Vr,gn,Ds);break;case"deprecated":Qs=!0,ys=jA(Ar,E.createJSDocDeprecatedTag,Vr,gn,Ds);break;case"this":ys=qpe(Ar,Vr,gn,Ds);break;case"enum":ys=_Re(Ar,Vr,gn,Ds);break;case"arg":case"argument":case"param":return km(Ar,Vr,2,gn);case"return":case"returns":ys=dRe(Ar,Vr,gn,Ds);break;case"template":ys=ZY(Ar,Vr,gn,Ds);break;case"type":ys=Vpe(Ar,Vr,gn,Ds);break;case"typedef":ys=PO(Ar,Vr,gn,Ds);break;case"callback":ys=Yn(Ar,Vr,gn,Ds);break;case"overload":ys=Ux(Ar,Vr,gn,Ds);break;case"satisfies":ys=jpe(Ar,Vr,gn,Ds);break;case"see":ys=CN(Ar,Vr,gn,Ds);break;case"exception":case"throws":ys=B5(Ar,Vr,gn,Ds);break;case"import":ys=W5(Ar,Vr,gn,Ds);break;default:ys=lr(Ar,Vr,gn,Ds);break}return ys}function A(gn,Ar,Vr,Ds){return Ds||(Vr+=Ar-gn),$(Vr,Ds.slice(Vr))}function $(gn,Ar){const Vr=le();let Ds=[];const ys=[];let yc,tl=0,Ll;function ev(ry){Ll||(Ll=gn),Ds.push(ry),gn+=ry.length}Ar!==void 0&&(Ar!==""&&ev(Ar),tl=1);let ny=be();e:for(;;){switch(ny){case 4:tl=0,Ds.push(r.getTokenText()),gn=0;break;case 60:r.resetTokenState(r.getTokenEnd()-1);break e;case 1:break e;case 5:j.assert(tl!==2&&tl!==3,"whitespace shouldn't come from the scanner while saving comment text");const ry=r.getTokenText();Ll!==void 0&&gn+ry.length>Ll&&(Ds.push(ry.slice(Ll-gn)),tl=2),gn+=ry.length;break;case 19:tl=2;const kz=r.getTokenFullStart(),MO=r.getTokenEnd()-1,W_=ie(MO);W_?(ys.push(ki(E.createJSDocText(Ds.join("")),yc??Vr,kz)),ys.push(W_),Ds=[],yc=r.getTokenEnd()):ev(r.getTokenText());break;case 62:tl===3?tl=2:tl=3,ev(r.getTokenText());break;case 82:tl!==3&&(tl=2),ev(r.getTokenValue());break;case 42:if(tl===0){tl=1,gn+=1;break}default:tl!==3&&(tl=2),ev(r.getTokenText());break}tl===2||tl===3?ny=vn(tl===3):ny=hi()}CC(Ds);const r1=Ds.join("").trimEnd();if(ys.length)return r1.length&&ys.push(ki(E.createJSDocText(r1),yc??Vr)),tc(ys,Vr,r.getTokenEnd());if(r1.length)return r1}function ie(gn){const Ar=on(ht);if(!Ar)return;hi(),Zp();const Vr=Ee(),Ds=[];for(;be()!==20&&be()!==4&&be()!==1;)Ds.push(r.getTokenText()),hi();const ys=Ar==="link"?E.createJSDocLink:Ar==="linkcode"?E.createJSDocLinkCode:E.createJSDocLinkPlain;return ki(ys(Vr,Ds.join("")),gn,r.getTokenEnd())}function Ee(){if(D_(be())){const gn=le();let Ar=Ve();for(;Ls(25);)Ar=ki(E.createQualifiedName(Ar,be()===81?Gc(80,!1):Ve()),gn);for(;be()===81;)fi(),hi(),Ar=ki(E.createJSDocMemberName(Ar,Nl()),gn);return Ar}}function ht(){if(W2(),be()===19&&hi()===60&&D_(hi())){const gn=r.getTokenValue();if(bi(gn))return gn}}function bi(gn){return gn==="link"||gn==="linkcode"||gn==="linkplain"}function lr(gn,Ar,Vr,Ds){return ki(E.createJSDocUnknownTag(Ar,A(gn,le(),Vr,Ds)),gn)}function xo(gn){gn&&(dc?dc.push(gn):(dc=[gn],og=gn.pos),Dd=gn.end)}function el(){return W2(),be()===19?mt():void 0}function ag(){const gn=y0(23);gn&&Zp();const Ar=y0(62),Vr=mRe();return Ar&&kh(62),gn&&(Zp(),ja(64)&&dh(),vi(24)),{name:Vr,isBracketed:gn}}function Yy(gn){switch(gn.kind){case 151:return!0;case 188:return Yy(gn.elementType);default:return qp(gn)&&ot(gn.typeName)&&gn.typeName.escapedText==="Object"&&!gn.typeArguments}}function km(gn,Ar,Vr,Ds){let ys=el(),yc=!ys;W2();const{name:tl,isBracketed:Ll}=ag(),ev=W2();yc&&!Di(ht)&&(ys=el());const ny=A(gn,le(),Ds,ev),r1=LO(ys,tl,Vr,Ds);r1&&(ys=r1,yc=!0);const ry=Vr===1?E.createJSDocPropertyTag(Ar,tl,Ll,ys,yc,ny):E.createJSDocParameterTag(Ar,tl,Ll,ys,yc,ny);return ki(ry,gn)}function LO(gn,Ar,Vr,Ds){if(gn&&Yy(gn.type)){const ys=le();let yc,tl;for(;yc=on(()=>SN(Vr,Ds,Ar));)yc.kind===341||yc.kind===348?tl=fn(tl,yc):yc.kind===345&&tt(yc.tagName,k.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);if(tl){const Ll=ki(E.createJSDocTypeLiteral(tl,gn.type.kind===188),ys);return ki(E.createJSDocTypeExpression(Ll),ys)}}}function dRe(gn,Ar,Vr,Ds){Ft(dc,IX)&&te(Ar.pos,r.getTokenStart(),k._0_tag_already_specified,Ws(Ar.escapedText));const ys=el();return ki(E.createJSDocReturnTag(Ar,ys,A(gn,le(),Vr,Ds)),gn)}function Vpe(gn,Ar,Vr,Ds){Ft(dc,D7)&&te(Ar.pos,r.getTokenStart(),k._0_tag_already_specified,Ws(Ar.escapedText));const ys=mt(!0),yc=Vr!==void 0&&Ds!==void 0?A(gn,le(),Vr,Ds):void 0;return ki(E.createJSDocTypeTag(Ar,ys,yc),gn)}function CN(gn,Ar,Vr,Ds){const yc=be()===23||Di(()=>hi()===60&&D_(hi())&&bi(r.getTokenValue()))?void 0:Xt(),tl=Vr!==void 0&&Ds!==void 0?A(gn,le(),Vr,Ds):void 0;return ki(E.createJSDocSeeTag(Ar,yc,tl),gn)}function B5(gn,Ar,Vr,Ds){const ys=el(),yc=A(gn,le(),Vr,Ds);return ki(E.createJSDocThrowsTag(Ar,ys,yc),gn)}function fRe(gn,Ar,Vr,Ds){const ys=le(),yc=hRe();let tl=r.getTokenFullStart();const Ll=A(gn,tl,Vr,Ds);Ll||(tl=r.getTokenFullStart());const ev=typeof Ll!="string"?tc(Js([ki(yc,ys,tl)],Ll),ys):yc.text+Ll;return ki(E.createJSDocAuthorTag(Ar,ev),gn)}function hRe(){const gn=[];let Ar=!1,Vr=r.getToken();for(;Vr!==1&&Vr!==4;){if(Vr===30)Ar=!0;else{if(Vr===60&&!Ar)break;if(Vr===32&&Ar){gn.push(r.getTokenText()),r.resetTokenState(r.getTokenEnd());break}}gn.push(r.getTokenText()),Vr=hi()}return E.createJSDocText(gn.join(""))}function wz(gn,Ar,Vr,Ds){const ys=zpe();return ki(E.createJSDocImplementsTag(Ar,ys,A(gn,le(),Vr,Ds)),gn)}function Hpe(gn,Ar,Vr,Ds){const ys=zpe();return ki(E.createJSDocAugmentsTag(Ar,ys,A(gn,le(),Vr,Ds)),gn)}function jpe(gn,Ar,Vr,Ds){const ys=mt(!1),yc=Vr!==void 0&&Ds!==void 0?A(gn,le(),Vr,Ds):void 0;return ki(E.createJSDocSatisfiesTag(Ar,ys,yc),gn)}function W5(gn,Ar,Vr,Ds){const ys=r.getTokenFullStart();let yc;cn()&&(yc=Nl());const tl=Wx(yc,ys,!0,!0),Ll=vN(),ev=IO(),ny=Vr!==void 0&&Ds!==void 0?A(gn,le(),Vr,Ds):void 0;return ki(E.createJSDocImportTag(Ar,tl,Ll,ev,ny),gn)}function zpe(){const gn=Ls(19),Ar=le(),Vr=Upe();r.setSkipJsDocLeadingAsterisks(!0);const Ds=F2();r.setSkipJsDocLeadingAsterisks(!1);const ys=E.createExpressionWithTypeArguments(Vr,Ds),yc=ki(ys,Ar);return gn&&vi(20),yc}function Upe(){const gn=le();let Ar=V2();for(;Ls(25);){const Vr=V2();Ar=ki(re(Ar,Vr),gn)}return Ar}function jA(gn,Ar,Vr,Ds,ys){return ki(Ar(Vr,A(gn,le(),Ds,ys)),gn)}function qpe(gn,Ar,Vr,Ds){const ys=mt(!0);return Zp(),ki(E.createJSDocThisTag(Ar,ys,A(gn,le(),Vr,Ds)),gn)}function _Re(gn,Ar,Vr,Ds){const ys=mt(!0);return Zp(),ki(E.createJSDocEnumTag(Ar,ys,A(gn,le(),Vr,Ds)),gn)}function PO(gn,Ar,Vr,Ds){let ys=el();W2();const yc=xz();Zp();let tl=$(Vr),Ll;if(!ys||Yy(ys.type)){let ny,r1,ry,kz=!1;for(;(ny=on(()=>iy(Vr)))&&ny.kind!==345;)if(kz=!0,ny.kind===344)if(r1){const MO=ji(k.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);MO&&da(MO,kP(Pe,ze,0,0,k.The_tag_was_first_specified_here));break}else r1=ny;else ry=fn(ry,ny);if(kz){const MO=ys&&ys.type.kind===188,W_=E.createJSDocTypeLiteral(ry,MO);ys=r1&&r1.typeExpression&&!Yy(r1.typeExpression.type)?r1.typeExpression:ki(W_,gn),Ll=ys.end}}Ll=Ll||tl!==void 0?le():(yc??ys??Ar).end,tl||(tl=A(gn,Ll,Vr,Ds));const ev=E.createJSDocTypedefTag(Ar,ys,yc,tl);return ki(ev,gn,Ll)}function xz(gn){const Ar=r.getTokenStart();if(!D_(be()))return;const Vr=V2();if(Ls(25)){const Ds=xz(!0),ys=E.createModuleDeclaration(void 0,Vr,Ds,gn?8:void 0);return ki(ys,Ar)}return gn&&(Vr.flags|=4096),Vr}function pRe(gn){const Ar=le();let Vr,Ds;for(;Vr=on(()=>SN(4,gn));){if(Vr.kind===345){tt(Vr.tagName,k.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);break}Ds=fn(Ds,Vr)}return tc(Ds||[],Ar)}function zx(gn,Ar){const Vr=pRe(Ar),Ds=on(()=>{if(y0(60)){const ys=ir(Ar);if(ys&&ys.kind===342)return ys}});return ki(E.createJSDocSignature(void 0,Vr,Ds),gn)}function Yn(gn,Ar,Vr,Ds){const ys=xz();Zp();let yc=$(Vr);const tl=zx(gn,Vr);yc||(yc=A(gn,le(),Vr,Ds));const Ll=yc!==void 0?le():tl.end;return ki(E.createJSDocCallbackTag(Ar,tl,ys,yc),gn,Ll)}function Ux(gn,Ar,Vr,Ds){Zp();let ys=$(Vr);const yc=zx(gn,Vr);ys||(ys=A(gn,le(),Vr,Ds));const tl=ys!==void 0?le():yc.end;return ki(E.createJSDocOverloadTag(Ar,yc,ys),gn,tl)}function $pe(gn,Ar){for(;!ot(gn)||!ot(Ar);)if(!ot(gn)&&!ot(Ar)&&gn.right.escapedText===Ar.right.escapedText)gn=gn.left,Ar=Ar.left;else return!1;return gn.escapedText===Ar.escapedText}function iy(gn){return SN(1,gn)}function SN(gn,Ar,Vr){let Ds=!0,ys=!1;for(;;)switch(hi()){case 60:if(Ds){const yc=AO(gn,Ar);return yc&&(yc.kind===341||yc.kind===348)&&Vr&&(ot(yc.name)||!$pe(Vr,yc.name.left))?!1:yc}ys=!1;break;case 4:Ds=!0,ys=!1;break;case 42:ys&&(Ds=!1),ys=!0;break;case 80:Ds=!1;break;case 1:return!1}}function AO(gn,Ar){j.assert(be()===60);const Vr=r.getTokenFullStart();hi();const Ds=V2(),ys=W2();let yc;switch(Ds.escapedText){case"type":return gn===1&&Vpe(Vr,Ds);case"prop":case"property":yc=1;break;case"arg":case"argument":case"param":yc=6;break;case"template":return ZY(Vr,Ds,Ar,ys);case"this":return qpe(Vr,Ds,Ar,ys);default:return!1}return gn&yc?km(Vr,Ds,gn,Ar):!1}function QY(){const gn=le(),Ar=y0(23);Ar&&Zp();const Vr=Wi(!1,!0),Ds=V2(k.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces);let ys;if(Ar&&(Zp(),vi(64),ys=ka(16777216,rg),vi(24)),!lu(Ds))return ki(E.createTypeParameterDeclaration(Vr,Ds,void 0,ys),gn)}function OO(){const gn=le(),Ar=[];do{Zp();const Vr=QY();Vr!==void 0&&Ar.push(Vr),W2()}while(y0(28));return tc(Ar,gn)}function ZY(gn,Ar,Vr,Ds){const ys=be()===19?mt():void 0,yc=OO();return ki(E.createJSDocTemplateTag(Ar,ys,yc,A(gn,le(),Vr,Ds)),gn)}function y0(gn){return be()===gn?(hi(),!0):!1}function mRe(){let gn=V2();for(Ls(23)&&vi(24);Ls(25);){const Ar=V2();Ls(23)&&vi(24),gn=Ot(gn,Ar)}return gn}function V2(gn){if(!D_(be()))return Gc(80,!gn,gn||k.Identifier_expected);Ei++;const Ar=r.getTokenStart(),Vr=r.getTokenEnd(),Ds=be(),ys=uh(r.getTokenValue()),yc=ki(U(ys,Ds),Ar,Vr);return hi(),yc}}})(Nc=t.JSDocParser||(t.JSDocParser={}))})(u2||(u2={}));var fZe=new WeakSet;function dOt(t){fZe.has(t)&&j.fail("Source file has already been incrementally parsed"),fZe.add(t)}var hZe=new WeakSet;function fOt(t){return hZe.has(t)}function SIe(t){hZe.add(t)}var zle;(t=>{function r(F,H,U,q){if(q=q||j.shouldAssert(2),E(F,H,U,q),i2e(U))return F;if(F.statements.length===0)return u2.parseSourceFile(F.fileName,H,F.languageVersion,void 0,!0,F.scriptKind,F.setExternalModuleIndicator,F.jsDocParsingMode);dOt(F),u2.fixupParentReferences(F);const X=F.text,Z=N(F),Q=b(F,U);E(F,H,Q,q),j.assert(Q.span.start<=U.span.start),j.assert(au(Q.span)===au(U.span)),j.assert(au(f8(Q))===au(f8(U)));const re=f8(Q).length-Q.span.length;C(F,Q.span.start,au(Q.span),au(f8(Q)),re,X,H,q);const oe=u2.parseSourceFile(F.fileName,H,F.languageVersion,Z,!0,F.scriptKind,F.setExternalModuleIndicator,F.jsDocParsingMode);return oe.commentDirectives=a(F.commentDirectives,oe.commentDirectives,Q.span.start,au(Q.span),re,X,H,q),oe.impliedNodeFormat=F.impliedNodeFormat,ZEe(F,oe),oe}t.updateSourceFile=r;function a(F,H,U,q,X,Z,Q,re){if(!F)return H;let oe,pe=!1;for(const ue of F){const{range:Ie,type:we}=ue;if(Ie.end<U)oe=fn(oe,ue);else if(Ie.pos>q){de();const he={range:{pos:Ie.pos+X,end:Ie.end+X},type:we};oe=fn(oe,he),re&&j.assert(Z.substring(Ie.pos,Ie.end)===Q.substring(he.range.pos,he.range.end))}}return de(),oe;function de(){pe||(pe=!0,oe?H&&oe.push(...H):oe=H)}}function u(F,H,U,q,X,Z,Q){U?oe(F):re(F);return;function re(pe){let de="";if(Q&&h(pe)&&(de=X.substring(pe.pos,pe.end)),Ele(pe,H),V0(pe,pe.pos+q,pe.end+q),Q&&h(pe)&&j.assert(de===Z.substring(pe.pos,pe.end)),Uo(pe,re,oe),jp(pe))for(const ue of pe.jsDoc)re(ue);g(pe,Q)}function oe(pe){V0(pe,pe.pos+q,pe.end+q);for(const de of pe)re(de)}}function h(F){switch(F.kind){case 11:case 9:case 80:return!0}return!1}function p(F,H,U,q,X){j.assert(F.end>=H,"Adjusting an element that was entirely before the change range"),j.assert(F.pos<=U,"Adjusting an element that was entirely after the change range"),j.assert(F.pos<=F.end);const Z=Math.min(F.pos,q),Q=F.end>=U?F.end+X:Math.min(F.end,q);if(j.assert(Z<=Q),F.parent){const re=F.parent;j.assertGreaterThanOrEqual(Z,re.pos),j.assertLessThanOrEqual(Q,re.end)}V0(F,Z,Q)}function g(F,H){if(H){let U=F.pos;const q=X=>{j.assert(X.pos>=U),U=X.end};if(jp(F))for(const X of F.jsDoc)q(X);Uo(F,q),j.assert(U<=F.end)}}function C(F,H,U,q,X,Z,Q,re){oe(F);return;function oe(de){if(j.assert(de.pos<=de.end),de.pos>U){u(de,F,!1,X,Z,Q,re);return}const ue=de.end;if(ue>=H){if(SIe(de),Ele(de,F),p(de,H,U,q,X),Uo(de,oe,pe),jp(de))for(const Ie of de.jsDoc)oe(Ie);g(de,re);return}j.assert(ue<H)}function pe(de){if(j.assert(de.pos<=de.end),de.pos>U){u(de,F,!0,X,Z,Q,re);return}const ue=de.end;if(ue>=H){SIe(de),p(de,H,U,q,X);for(const Ie of de)oe(Ie);return}j.assert(ue<H)}}function b(F,H){let q=H.span.start;for(let Q=0;q>0&&Q<=1;Q++){const re=T(F,q);j.assert(re.pos<=q);const oe=re.pos;q=Math.max(0,oe-1)}const X=Fu(q,au(H.span)),Z=H.newLength+(H.span.start-q);return AW(X,Z)}function T(F,H){let U=F,q;if(Uo(F,Z),q){const Q=X(q);Q.pos>U.pos&&(U=Q)}return U;function X(Q){for(;;){const re=kce(Q);if(re)Q=re;else return Q}}function Z(Q){if(!lu(Q))if(Q.pos<=H){if(Q.pos>=U.pos&&(U=Q),H<Q.end)return Uo(Q,Z),!0;j.assert(Q.end<=H),q=Q}else return j.assert(Q.pos>H),!0}}function E(F,H,U,q){const X=F.text;if(U&&(j.assert(X.length-U.span.length+U.newLength===H.length),q||j.shouldAssert(3))){const Z=X.substr(0,U.span.start),Q=H.substr(0,U.span.start);j.assert(Z===Q);const re=X.substring(au(U.span),X.length),oe=H.substring(au(f8(U)),H.length);j.assert(re===oe)}}function N(F){let H=F.statements,U=0;j.assert(U<H.length);let q=H[U],X=-1;return{currentNode(Q){return Q!==X&&(q&&q.end===Q&&U<H.length-1&&(U++,q=H[U]),(!q||q.pos!==Q)&&Z(Q)),X=Q,j.assert(!q||q.pos===Q),q}};function Z(Q){H=void 0,U=-1,q=void 0,Uo(F,re,oe);return;function re(pe){return Q>=pe.pos&&Q<pe.end?(Uo(pe,re,oe),!0):!1}function oe(pe){if(Q>=pe.pos&&Q<pe.end)for(let de=0;de<pe.length;de++){const ue=pe[de];if(ue){if(ue.pos===Q)return H=pe,U=de,q=ue,!0;if(ue.pos<Q&&Q<ue.end)return Uo(ue,re,oe),!0}}return!1}}}t.createSyntaxCursor=N;let R;(F=>{F[F.Value=-1]="Value"})(R||(R={}))})(zle||(zle={}));function df(t){return Ule(t)!==void 0}function Ule(t){const r=L6(t,GK,!1);if(r)return r;if(Xl(t,".ts")){const a=ud(t).lastIndexOf(".d.");if(a>=0)return t.substring(a)}}function hOt(t,r,a,u){if(t){if(t==="import")return 99;if(t==="require")return 1;u(r,a-r,k.resolution_mode_should_be_either_require_or_import)}}function qle(t,r){const a=[];for(const u of Av(r,0)||w){const h=r.substring(u.pos,u.end);gOt(a,u,h)}t.pragmas=new Map;for(const u of a){if(t.pragmas.has(u.name)){const h=t.pragmas.get(u.name);h instanceof Array?h.push(u.args):t.pragmas.set(u.name,[h,u.args]);continue}t.pragmas.set(u.name,u.args)}}function $le(t,r){t.checkJsDirective=void 0,t.referencedFiles=[],t.typeReferenceDirectives=[],t.libReferenceDirectives=[],t.amdDependencies=[],t.hasNoDefaultLib=!1,t.pragmas.forEach((a,u)=>{switch(u){case"reference":{const h=t.referencedFiles,p=t.typeReferenceDirectives,g=t.libReferenceDirectives;O(JL(a),C=>{const{types:b,lib:T,path:E,["resolution-mode"]:N,preserve:R}=C.arguments,F=R==="true"?!0:void 0;if(C.arguments["no-default-lib"]==="true")t.hasNoDefaultLib=!0;else if(b){const H=hOt(N,b.pos,b.end,r);p.push({pos:b.pos,end:b.end,fileName:b.value,...H?{resolutionMode:H}:{},...F?{preserve:F}:{}})}else T?g.push({pos:T.pos,end:T.end,fileName:T.value,...F?{preserve:F}:{}}):E?h.push({pos:E.pos,end:E.end,fileName:E.value,...F?{preserve:F}:{}}):r(C.range.pos,C.range.end-C.range.pos,k.Invalid_reference_directive_syntax)});break}case"amd-dependency":{t.amdDependencies=qt(JL(a),h=>({name:h.arguments.name,path:h.arguments.path}));break}case"amd-module":{if(a instanceof Array)for(const h of a)t.moduleName&&r(h.range.pos,h.range.end-h.range.pos,k.An_AMD_module_cannot_have_multiple_name_assignments),t.moduleName=h.arguments.name;else t.moduleName=a.arguments.name;break}case"ts-nocheck":case"ts-check":{O(JL(a),h=>{(!t.checkJsDirective||h.range.pos>t.checkJsDirective.pos)&&(t.checkJsDirective={enabled:u==="ts-check",end:h.range.end,pos:h.range.pos})});break}case"jsx":case"jsxfrag":case"jsximportsource":case"jsxruntime":return;default:j.fail("Unhandled pragma kind")}})}var wIe=new Map;function _Ot(t){if(wIe.has(t))return wIe.get(t);const r=new RegExp(`(\\s${t}\\s*=\\s*)(?:(?:'([^']*)')|(?:"([^"]*)"))`,"im");return wIe.set(t,r),r}var pOt=/^\/\/\/\s*<(\S+)\s.*?\/>/m,mOt=/^\/\/\/?\s*@([^\s:]+)((?:[^\S\r\n]|:).*)?$/m;function gOt(t,r,a){const u=r.kind===2&&pOt.exec(a);if(u){const p=u[1].toLowerCase(),g=GJ[p];if(!g||!(g.kind&1))return;if(g.args){const C={};for(const b of g.args){const E=_Ot(b.name).exec(a);if(!E&&!b.optional)return;if(E){const N=E[2]||E[3];if(b.captureSpan){const R=r.pos+E.index+E[1].length+1;C[b.name]={value:N,pos:R,end:R+N.length}}else C[b.name]=N}}t.push({name:p,args:{arguments:C,range:r}})}else t.push({name:p,args:{arguments:{},range:r}});return}const h=r.kind===2&&mOt.exec(a);if(h)return _Ze(t,r,2,h);if(r.kind===3){const p=/@(\S+)(\s+(?:\S.*)?)?$/gm;let g;for(;g=p.exec(a);)_Ze(t,r,4,g)}}function _Ze(t,r,a,u){if(!u)return;const h=u[1].toLowerCase(),p=GJ[h];if(!p||!(p.kind&a))return;const g=u[2],C=yOt(p,g);C!=="fail"&&t.push({name:h,args:{arguments:C,range:r}})}function yOt(t,r){if(!r)return{};if(!t.args)return{};const a=r.trim().split(/\s+/),u={};for(let h=0;h<t.args.length;h++){const p=t.args[h];if(!a[h]&&!p.optional)return"fail";if(p.captureSpan)return j.fail("Capture spans not yet implemented for non-xml pragmas");u[p.name]=a[h]}return u}function d2(t,r){return t.kind!==r.kind?!1:t.kind===80?t.escapedText===r.escapedText:t.kind===110?!0:t.kind===295?t.namespace.escapedText===r.namespace.escapedText&&t.name.escapedText===r.name.escapedText:t.name.escapedText===r.name.escapedText&&d2(t.expression,r.expression)}var xIe={name:"compileOnSave",type:"boolean",defaultValueDescription:!1},pZe=new Map(Object.entries({preserve:1,"react-native":3,react:2,"react-jsx":4,"react-jsxdev":5})),DH=new Map(ms(pZe.entries(),([t,r])=>[""+r,t])),mZe=[["es5","lib.es5.d.ts"],["es6","lib.es2015.d.ts"],["es2015","lib.es2015.d.ts"],["es7","lib.es2016.d.ts"],["es2016","lib.es2016.d.ts"],["es2017","lib.es2017.d.ts"],["es2018","lib.es2018.d.ts"],["es2019","lib.es2019.d.ts"],["es2020","lib.es2020.d.ts"],["es2021","lib.es2021.d.ts"],["es2022","lib.es2022.d.ts"],["es2023","lib.es2023.d.ts"],["esnext","lib.esnext.d.ts"],["dom","lib.dom.d.ts"],["dom.iterable","lib.dom.iterable.d.ts"],["dom.asynciterable","lib.dom.asynciterable.d.ts"],["webworker","lib.webworker.d.ts"],["webworker.importscripts","lib.webworker.importscripts.d.ts"],["webworker.iterable","lib.webworker.iterable.d.ts"],["webworker.asynciterable","lib.webworker.asynciterable.d.ts"],["scripthost","lib.scripthost.d.ts"],["es2015.core","lib.es2015.core.d.ts"],["es2015.collection","lib.es2015.collection.d.ts"],["es2015.generator","lib.es2015.generator.d.ts"],["es2015.iterable","lib.es2015.iterable.d.ts"],["es2015.promise","lib.es2015.promise.d.ts"],["es2015.proxy","lib.es2015.proxy.d.ts"],["es2015.reflect","lib.es2015.reflect.d.ts"],["es2015.symbol","lib.es2015.symbol.d.ts"],["es2015.symbol.wellknown","lib.es2015.symbol.wellknown.d.ts"],["es2016.array.include","lib.es2016.array.include.d.ts"],["es2016.intl","lib.es2016.intl.d.ts"],["es2017.date","lib.es2017.date.d.ts"],["es2017.object","lib.es2017.object.d.ts"],["es2017.sharedmemory","lib.es2017.sharedmemory.d.ts"],["es2017.string","lib.es2017.string.d.ts"],["es2017.intl","lib.es2017.intl.d.ts"],["es2017.typedarrays","lib.es2017.typedarrays.d.ts"],["es2018.asyncgenerator","lib.es2018.asyncgenerator.d.ts"],["es2018.asynciterable","lib.es2018.asynciterable.d.ts"],["es2018.intl","lib.es2018.intl.d.ts"],["es2018.promise","lib.es2018.promise.d.ts"],["es2018.regexp","lib.es2018.regexp.d.ts"],["es2019.array","lib.es2019.array.d.ts"],["es2019.object","lib.es2019.object.d.ts"],["es2019.string","lib.es2019.string.d.ts"],["es2019.symbol","lib.es2019.symbol.d.ts"],["es2019.intl","lib.es2019.intl.d.ts"],["es2020.bigint","lib.es2020.bigint.d.ts"],["es2020.date","lib.es2020.date.d.ts"],["es2020.promise","lib.es2020.promise.d.ts"],["es2020.sharedmemory","lib.es2020.sharedmemory.d.ts"],["es2020.string","lib.es2020.string.d.ts"],["es2020.symbol.wellknown","lib.es2020.symbol.wellknown.d.ts"],["es2020.intl","lib.es2020.intl.d.ts"],["es2020.number","lib.es2020.number.d.ts"],["es2021.promise","lib.es2021.promise.d.ts"],["es2021.string","lib.es2021.string.d.ts"],["es2021.weakref","lib.es2021.weakref.d.ts"],["es2021.intl","lib.es2021.intl.d.ts"],["es2022.array","lib.es2022.array.d.ts"],["es2022.error","lib.es2022.error.d.ts"],["es2022.intl","lib.es2022.intl.d.ts"],["es2022.object","lib.es2022.object.d.ts"],["es2022.sharedmemory","lib.es2022.sharedmemory.d.ts"],["es2022.string","lib.es2022.string.d.ts"],["es2022.regexp","lib.es2022.regexp.d.ts"],["es2023.array","lib.es2023.array.d.ts"],["es2023.collection","lib.es2023.collection.d.ts"],["es2023.intl","lib.es2023.intl.d.ts"],["esnext.array","lib.es2023.array.d.ts"],["esnext.collection","lib.esnext.collection.d.ts"],["esnext.symbol","lib.es2019.symbol.d.ts"],["esnext.asynciterable","lib.es2018.asynciterable.d.ts"],["esnext.intl","lib.esnext.intl.d.ts"],["esnext.disposable","lib.esnext.disposable.d.ts"],["esnext.bigint","lib.es2020.bigint.d.ts"],["esnext.string","lib.es2022.string.d.ts"],["esnext.promise","lib.esnext.promise.d.ts"],["esnext.weakref","lib.es2021.weakref.d.ts"],["esnext.decorators","lib.esnext.decorators.d.ts"],["esnext.object","lib.esnext.object.d.ts"],["esnext.array","lib.esnext.array.d.ts"],["esnext.regexp","lib.esnext.regexp.d.ts"],["esnext.string","lib.esnext.string.d.ts"],["esnext.iterator","lib.esnext.iterator.d.ts"],["decorators","lib.decorators.d.ts"],["decorators.legacy","lib.decorators.legacy.d.ts"]],HX=mZe.map(t=>t[0]),Jle=new Map(mZe),eA=[{name:"watchFile",type:new Map(Object.entries({fixedpollinginterval:0,prioritypollinginterval:1,dynamicprioritypolling:2,fixedchunksizepolling:3,usefsevents:4,usefseventsonparentdirectory:5})),category:k.Watch_and_Build_Modes,description:k.Specify_how_the_TypeScript_watch_mode_works,defaultValueDescription:4},{name:"watchDirectory",type:new Map(Object.entries({usefsevents:0,fixedpollinginterval:1,dynamicprioritypolling:2,fixedchunksizepolling:3})),category:k.Watch_and_Build_Modes,description:k.Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality,defaultValueDescription:0},{name:"fallbackPolling",type:new Map(Object.entries({fixedinterval:0,priorityinterval:1,dynamicpriority:2,fixedchunksize:3})),category:k.Watch_and_Build_Modes,description:k.Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers,defaultValueDescription:1},{name:"synchronousWatchDirectory",type:"boolean",category:k.Watch_and_Build_Modes,description:k.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively,defaultValueDescription:!1},{name:"excludeDirectories",type:"list",element:{name:"excludeDirectory",type:"string",isFilePath:!0,extraValidation:$Ie},allowConfigDirTemplateSubstitution:!0,category:k.Watch_and_Build_Modes,description:k.Remove_a_list_of_directories_from_the_watch_process},{name:"excludeFiles",type:"list",element:{name:"excludeFile",type:"string",isFilePath:!0,extraValidation:$Ie},allowConfigDirTemplateSubstitution:!0,category:k.Watch_and_Build_Modes,description:k.Remove_a_list_of_files_from_the_watch_mode_s_processing}],jX=[{name:"help",shortName:"h",type:"boolean",showInSimplifiedHelpView:!0,isCommandLineOnly:!0,category:k.Command_line_Options,description:k.Print_this_message,defaultValueDescription:!1},{name:"help",shortName:"?",type:"boolean",isCommandLineOnly:!0,category:k.Command_line_Options,defaultValueDescription:!1},{name:"watch",shortName:"w",type:"boolean",showInSimplifiedHelpView:!0,isCommandLineOnly:!0,category:k.Command_line_Options,description:k.Watch_input_files,defaultValueDescription:!1},{name:"preserveWatchOutput",type:"boolean",showInSimplifiedHelpView:!1,category:k.Output_Formatting,description:k.Disable_wiping_the_console_in_watch_mode,defaultValueDescription:!1},{name:"listFiles",type:"boolean",category:k.Compiler_Diagnostics,description:k.Print_all_of_the_files_read_during_the_compilation,defaultValueDescription:!1},{name:"explainFiles",type:"boolean",category:k.Compiler_Diagnostics,description:k.Print_files_read_during_the_compilation_including_why_it_was_included,defaultValueDescription:!1},{name:"listEmittedFiles",type:"boolean",category:k.Compiler_Diagnostics,description:k.Print_the_names_of_emitted_files_after_a_compilation,defaultValueDescription:!1},{name:"pretty",type:"boolean",showInSimplifiedHelpView:!0,category:k.Output_Formatting,description:k.Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read,defaultValueDescription:!0},{name:"traceResolution",type:"boolean",category:k.Compiler_Diagnostics,description:k.Log_paths_used_during_the_moduleResolution_process,defaultValueDescription:!1},{name:"diagnostics",type:"boolean",category:k.Compiler_Diagnostics,description:k.Output_compiler_performance_information_after_building,defaultValueDescription:!1},{name:"extendedDiagnostics",type:"boolean",category:k.Compiler_Diagnostics,description:k.Output_more_detailed_compiler_performance_information_after_building,defaultValueDescription:!1},{name:"generateCpuProfile",type:"string",isFilePath:!0,paramType:k.FILE_OR_DIRECTORY,category:k.Compiler_Diagnostics,description:k.Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging,defaultValueDescription:"profile.cpuprofile"},{name:"generateTrace",type:"string",isFilePath:!0,paramType:k.DIRECTORY,category:k.Compiler_Diagnostics,description:k.Generates_an_event_trace_and_a_list_of_types},{name:"incremental",shortName:"i",type:"boolean",category:k.Projects,description:k.Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects,transpileOptionValue:void 0,defaultValueDescription:k.false_unless_composite_is_set},{name:"declaration",shortName:"d",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:k.Emit,transpileOptionValue:void 0,description:k.Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project,defaultValueDescription:k.false_unless_composite_is_set},{name:"declarationMap",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:k.Emit,defaultValueDescription:!1,description:k.Create_sourcemaps_for_d_ts_files},{name:"emitDeclarationOnly",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:k.Emit,description:k.Only_output_d_ts_files_and_not_JavaScript_files,transpileOptionValue:void 0,defaultValueDescription:!1},{name:"sourceMap",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:k.Emit,defaultValueDescription:!1,description:k.Create_source_map_files_for_emitted_JavaScript_files},{name:"inlineSourceMap",type:"boolean",affectsBuildInfo:!0,category:k.Emit,description:k.Include_sourcemap_files_inside_the_emitted_JavaScript,defaultValueDescription:!1},{name:"noCheck",type:"boolean",showInSimplifiedHelpView:!1,category:k.Compiler_Diagnostics,description:k.Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported,transpileOptionValue:!0,defaultValueDescription:!1},{name:"noEmit",type:"boolean",showInSimplifiedHelpView:!0,category:k.Emit,description:k.Disable_emitting_files_from_a_compilation,transpileOptionValue:void 0,defaultValueDescription:!1},{name:"assumeChangesOnlyAffectDirectDependencies",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,category:k.Watch_and_Build_Modes,description:k.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it,defaultValueDescription:!1},{name:"locale",type:"string",category:k.Command_line_Options,isCommandLineOnly:!0,description:k.Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit,defaultValueDescription:k.Platform_specific}],Gle={name:"target",shortName:"t",type:new Map(Object.entries({es3:0,es5:1,es6:2,es2015:2,es2016:3,es2017:4,es2018:5,es2019:6,es2020:7,es2021:8,es2022:9,es2023:10,esnext:99})),affectsSourceFile:!0,affectsModuleResolution:!0,affectsEmit:!0,affectsBuildInfo:!0,deprecatedKeys:new Set(["es3"]),paramType:k.VERSION,showInSimplifiedHelpView:!0,category:k.Language_and_Environment,description:k.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,defaultValueDescription:1},kIe={name:"module",shortName:"m",type:new Map(Object.entries({none:0,commonjs:1,amd:2,system:4,umd:3,es6:5,es2015:5,es2020:6,es2022:7,esnext:99,node16:100,nodenext:199,preserve:200})),affectsSourceFile:!0,affectsModuleResolution:!0,affectsEmit:!0,affectsBuildInfo:!0,paramType:k.KIND,showInSimplifiedHelpView:!0,category:k.Modules,description:k.Specify_what_module_code_is_generated,defaultValueDescription:void 0},TIe=[{name:"all",type:"boolean",showInSimplifiedHelpView:!0,category:k.Command_line_Options,description:k.Show_all_compiler_options,defaultValueDescription:!1},{name:"version",shortName:"v",type:"boolean",showInSimplifiedHelpView:!0,category:k.Command_line_Options,description:k.Print_the_compiler_s_version,defaultValueDescription:!1},{name:"init",type:"boolean",showInSimplifiedHelpView:!0,category:k.Command_line_Options,description:k.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,defaultValueDescription:!1},{name:"project",shortName:"p",type:"string",isFilePath:!0,showInSimplifiedHelpView:!0,category:k.Command_line_Options,paramType:k.FILE_OR_DIRECTORY,description:k.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json},{name:"build",type:"boolean",shortName:"b",showInSimplifiedHelpView:!0,category:k.Command_line_Options,description:k.Build_one_or_more_projects_and_their_dependencies_if_out_of_date,defaultValueDescription:!1},{name:"showConfig",type:"boolean",showInSimplifiedHelpView:!0,category:k.Command_line_Options,isCommandLineOnly:!0,description:k.Print_the_final_configuration_instead_of_building,defaultValueDescription:!1},{name:"listFilesOnly",type:"boolean",category:k.Command_line_Options,isCommandLineOnly:!0,description:k.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,defaultValueDescription:!1},Gle,kIe,{name:"lib",type:"list",element:{name:"lib",type:Jle,defaultValueDescription:void 0},affectsProgramStructure:!0,showInSimplifiedHelpView:!0,category:k.Language_and_Environment,description:k.Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment,transpileOptionValue:void 0},{name:"allowJs",type:"boolean",allowJsFlag:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:k.JavaScript_Support,description:k.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,defaultValueDescription:!1},{name:"checkJs",type:"boolean",affectsModuleResolution:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:k.JavaScript_Support,description:k.Enable_error_reporting_in_type_checked_JavaScript_files,defaultValueDescription:!1},{name:"jsx",type:pZe,affectsSourceFile:!0,affectsEmit:!0,affectsBuildInfo:!0,affectsModuleResolution:!0,affectsSemanticDiagnostics:!0,paramType:k.KIND,showInSimplifiedHelpView:!0,category:k.Language_and_Environment,description:k.Specify_what_JSX_code_is_generated,defaultValueDescription:void 0},{name:"outFile",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:k.FILE,showInSimplifiedHelpView:!0,category:k.Emit,description:k.Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output,transpileOptionValue:void 0},{name:"outDir",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:k.DIRECTORY,showInSimplifiedHelpView:!0,category:k.Emit,description:k.Specify_an_output_folder_for_all_emitted_files},{name:"rootDir",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:k.LOCATION,category:k.Modules,description:k.Specify_the_root_folder_within_your_source_files,defaultValueDescription:k.Computed_from_the_list_of_input_files},{name:"composite",type:"boolean",affectsBuildInfo:!0,isTSConfigOnly:!0,category:k.Projects,transpileOptionValue:void 0,defaultValueDescription:!1,description:k.Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references},{name:"tsBuildInfoFile",type:"string",affectsEmit:!0,affectsBuildInfo:!0,isFilePath:!0,paramType:k.FILE,category:k.Projects,transpileOptionValue:void 0,defaultValueDescription:".tsbuildinfo",description:k.Specify_the_path_to_tsbuildinfo_incremental_compilation_file},{name:"removeComments",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:k.Emit,defaultValueDescription:!1,description:k.Disable_emitting_comments},{name:"importHelpers",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,affectsSourceFile:!0,category:k.Emit,description:k.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,defaultValueDescription:!1},{name:"importsNotUsedAsValues",type:new Map(Object.entries({remove:0,preserve:1,error:2})),affectsEmit:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Backwards_Compatibility,description:k.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,defaultValueDescription:0},{name:"downlevelIteration",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:k.Emit,description:k.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,defaultValueDescription:!1},{name:"isolatedModules",type:"boolean",category:k.Interop_Constraints,description:k.Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports,transpileOptionValue:!0,defaultValueDescription:!1},{name:"verbatimModuleSyntax",type:"boolean",affectsEmit:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Interop_Constraints,description:k.Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting,defaultValueDescription:!1},{name:"isolatedDeclarations",type:"boolean",category:k.Interop_Constraints,description:k.Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files,defaultValueDescription:!1,affectsBuildInfo:!0,affectsSemanticDiagnostics:!0},{name:"strict",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:k.Type_Checking,description:k.Enable_all_strict_type_checking_options,defaultValueDescription:!1},{name:"noImplicitAny",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:k.Type_Checking,description:k.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,defaultValueDescription:k.false_unless_strict_is_set},{name:"strictNullChecks",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:k.Type_Checking,description:k.When_type_checking_take_into_account_null_and_undefined,defaultValueDescription:k.false_unless_strict_is_set},{name:"strictFunctionTypes",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:k.Type_Checking,description:k.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,defaultValueDescription:k.false_unless_strict_is_set},{name:"strictBindCallApply",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:k.Type_Checking,description:k.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,defaultValueDescription:k.false_unless_strict_is_set},{name:"strictPropertyInitialization",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:k.Type_Checking,description:k.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,defaultValueDescription:k.false_unless_strict_is_set},{name:"strictBuiltinIteratorReturn",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:k.Type_Checking,description:k.Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any,defaultValueDescription:k.false_unless_strict_is_set},{name:"noImplicitThis",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:k.Type_Checking,description:k.Enable_error_reporting_when_this_is_given_the_type_any,defaultValueDescription:k.false_unless_strict_is_set},{name:"useUnknownInCatchVariables",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:k.Type_Checking,description:k.Default_catch_clause_variables_as_unknown_instead_of_any,defaultValueDescription:k.false_unless_strict_is_set},{name:"alwaysStrict",type:"boolean",affectsSourceFile:!0,affectsEmit:!0,affectsBuildInfo:!0,strictFlag:!0,category:k.Type_Checking,description:k.Ensure_use_strict_is_always_emitted,defaultValueDescription:k.false_unless_strict_is_set},{name:"noUnusedLocals",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Type_Checking,description:k.Enable_error_reporting_when_local_variables_aren_t_read,defaultValueDescription:!1},{name:"noUnusedParameters",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Type_Checking,description:k.Raise_an_error_when_a_function_parameter_isn_t_read,defaultValueDescription:!1},{name:"exactOptionalPropertyTypes",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Type_Checking,description:k.Interpret_optional_property_types_as_written_rather_than_adding_undefined,defaultValueDescription:!1},{name:"noImplicitReturns",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Type_Checking,description:k.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,defaultValueDescription:!1},{name:"noFallthroughCasesInSwitch",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Type_Checking,description:k.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,defaultValueDescription:!1},{name:"noUncheckedIndexedAccess",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Type_Checking,description:k.Add_undefined_to_a_type_when_accessed_using_an_index,defaultValueDescription:!1},{name:"noImplicitOverride",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Type_Checking,description:k.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,defaultValueDescription:!1},{name:"noPropertyAccessFromIndexSignature",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!1,category:k.Type_Checking,description:k.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,defaultValueDescription:!1},{name:"moduleResolution",type:new Map(Object.entries({node10:2,node:2,classic:1,node16:3,nodenext:99,bundler:100})),deprecatedKeys:new Set(["node"]),affectsSourceFile:!0,affectsModuleResolution:!0,paramType:k.STRATEGY,category:k.Modules,description:k.Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier,defaultValueDescription:k.module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node},{name:"baseUrl",type:"string",affectsModuleResolution:!0,isFilePath:!0,category:k.Modules,description:k.Specify_the_base_directory_to_resolve_non_relative_module_names},{name:"paths",type:"object",affectsModuleResolution:!0,allowConfigDirTemplateSubstitution:!0,isTSConfigOnly:!0,category:k.Modules,description:k.Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations,transpileOptionValue:void 0},{name:"rootDirs",type:"list",isTSConfigOnly:!0,element:{name:"rootDirs",type:"string",isFilePath:!0},affectsModuleResolution:!0,allowConfigDirTemplateSubstitution:!0,category:k.Modules,description:k.Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules,transpileOptionValue:void 0,defaultValueDescription:k.Computed_from_the_list_of_input_files},{name:"typeRoots",type:"list",element:{name:"typeRoots",type:"string",isFilePath:!0},affectsModuleResolution:!0,allowConfigDirTemplateSubstitution:!0,category:k.Modules,description:k.Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types},{name:"types",type:"list",element:{name:"types",type:"string"},affectsProgramStructure:!0,showInSimplifiedHelpView:!0,category:k.Modules,description:k.Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file,transpileOptionValue:void 0},{name:"allowSyntheticDefaultImports",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Interop_Constraints,description:k.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export,defaultValueDescription:k.module_system_or_esModuleInterop},{name:"esModuleInterop",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:k.Interop_Constraints,description:k.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,defaultValueDescription:!1},{name:"preserveSymlinks",type:"boolean",category:k.Interop_Constraints,description:k.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node,defaultValueDescription:!1},{name:"allowUmdGlobalAccess",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Modules,description:k.Allow_accessing_UMD_globals_from_modules,defaultValueDescription:!1},{name:"moduleSuffixes",type:"list",element:{name:"suffix",type:"string"},listPreserveFalsyValues:!0,affectsModuleResolution:!0,category:k.Modules,description:k.List_of_file_name_suffixes_to_search_when_resolving_a_module},{name:"allowImportingTsExtensions",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Modules,description:k.Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set,defaultValueDescription:!1,transpileOptionValue:void 0},{name:"resolvePackageJsonExports",type:"boolean",affectsModuleResolution:!0,category:k.Modules,description:k.Use_the_package_json_exports_field_when_resolving_package_imports,defaultValueDescription:k.true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false},{name:"resolvePackageJsonImports",type:"boolean",affectsModuleResolution:!0,category:k.Modules,description:k.Use_the_package_json_imports_field_when_resolving_imports,defaultValueDescription:k.true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false},{name:"customConditions",type:"list",element:{name:"condition",type:"string"},affectsModuleResolution:!0,category:k.Modules,description:k.Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports},{name:"noUncheckedSideEffectImports",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Modules,description:k.Check_side_effect_imports,defaultValueDescription:!1},{name:"sourceRoot",type:"string",affectsEmit:!0,affectsBuildInfo:!0,paramType:k.LOCATION,category:k.Emit,description:k.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code},{name:"mapRoot",type:"string",affectsEmit:!0,affectsBuildInfo:!0,paramType:k.LOCATION,category:k.Emit,description:k.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations},{name:"inlineSources",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:k.Emit,description:k.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,defaultValueDescription:!1},{name:"experimentalDecorators",type:"boolean",affectsEmit:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Language_and_Environment,description:k.Enable_experimental_support_for_legacy_experimental_decorators,defaultValueDescription:!1},{name:"emitDecoratorMetadata",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,category:k.Language_and_Environment,description:k.Emit_design_type_metadata_for_decorated_declarations_in_source_files,defaultValueDescription:!1},{name:"jsxFactory",type:"string",category:k.Language_and_Environment,description:k.Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h,defaultValueDescription:"`React.createElement`"},{name:"jsxFragmentFactory",type:"string",category:k.Language_and_Environment,description:k.Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment,defaultValueDescription:"React.Fragment"},{name:"jsxImportSource",type:"string",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,affectsModuleResolution:!0,affectsSourceFile:!0,category:k.Language_and_Environment,description:k.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,defaultValueDescription:"react"},{name:"resolveJsonModule",type:"boolean",affectsModuleResolution:!0,category:k.Modules,description:k.Enable_importing_json_files,defaultValueDescription:!1},{name:"allowArbitraryExtensions",type:"boolean",affectsProgramStructure:!0,category:k.Modules,description:k.Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present,defaultValueDescription:!1},{name:"out",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!1,category:k.Backwards_Compatibility,paramType:k.FILE,transpileOptionValue:void 0,description:k.Deprecated_setting_Use_outFile_instead},{name:"reactNamespace",type:"string",affectsEmit:!0,affectsBuildInfo:!0,category:k.Language_and_Environment,description:k.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit,defaultValueDescription:"`React`"},{name:"skipDefaultLibCheck",type:"boolean",affectsBuildInfo:!0,category:k.Completeness,description:k.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,defaultValueDescription:!1},{name:"charset",type:"string",category:k.Backwards_Compatibility,description:k.No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files,defaultValueDescription:"utf8"},{name:"emitBOM",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:k.Emit,description:k.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,defaultValueDescription:!1},{name:"newLine",type:new Map(Object.entries({crlf:0,lf:1})),affectsEmit:!0,affectsBuildInfo:!0,paramType:k.NEWLINE,category:k.Emit,description:k.Set_the_newline_character_for_emitting_files,defaultValueDescription:"lf"},{name:"noErrorTruncation",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Output_Formatting,description:k.Disable_truncating_types_in_error_messages,defaultValueDescription:!1},{name:"noLib",type:"boolean",category:k.Language_and_Environment,affectsProgramStructure:!0,description:k.Disable_including_any_library_files_including_the_default_lib_d_ts,transpileOptionValue:!0,defaultValueDescription:!1},{name:"noResolve",type:"boolean",affectsModuleResolution:!0,category:k.Modules,description:k.Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project,transpileOptionValue:!0,defaultValueDescription:!1},{name:"stripInternal",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:k.Emit,description:k.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,defaultValueDescription:!1},{name:"disableSizeLimit",type:"boolean",affectsProgramStructure:!0,category:k.Editor_Support,description:k.Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server,defaultValueDescription:!1},{name:"disableSourceOfProjectReferenceRedirect",type:"boolean",isTSConfigOnly:!0,category:k.Projects,description:k.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects,defaultValueDescription:!1},{name:"disableSolutionSearching",type:"boolean",isTSConfigOnly:!0,category:k.Projects,description:k.Opt_a_project_out_of_multi_project_reference_checking_when_editing,defaultValueDescription:!1},{name:"disableReferencedProjectLoad",type:"boolean",isTSConfigOnly:!0,category:k.Projects,description:k.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript,defaultValueDescription:!1},{name:"noImplicitUseStrict",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Backwards_Compatibility,description:k.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,defaultValueDescription:!1},{name:"noEmitHelpers",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:k.Emit,description:k.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,defaultValueDescription:!1},{name:"noEmitOnError",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:k.Emit,transpileOptionValue:void 0,description:k.Disable_emitting_files_if_any_type_checking_errors_are_reported,defaultValueDescription:!1},{name:"preserveConstEnums",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:k.Emit,description:k.Disable_erasing_const_enum_declarations_in_generated_code,defaultValueDescription:!1},{name:"declarationDir",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:k.DIRECTORY,category:k.Emit,transpileOptionValue:void 0,description:k.Specify_the_output_directory_for_generated_declaration_files},{name:"skipLibCheck",type:"boolean",affectsBuildInfo:!0,category:k.Completeness,description:k.Skip_type_checking_all_d_ts_files,defaultValueDescription:!1},{name:"allowUnusedLabels",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Type_Checking,description:k.Disable_error_reporting_for_unused_labels,defaultValueDescription:void 0},{name:"allowUnreachableCode",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Type_Checking,description:k.Disable_error_reporting_for_unreachable_code,defaultValueDescription:void 0},{name:"suppressExcessPropertyErrors",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Backwards_Compatibility,description:k.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,defaultValueDescription:!1},{name:"suppressImplicitAnyIndexErrors",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Backwards_Compatibility,description:k.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,defaultValueDescription:!1},{name:"forceConsistentCasingInFileNames",type:"boolean",affectsModuleResolution:!0,category:k.Interop_Constraints,description:k.Ensure_that_casing_is_correct_in_imports,defaultValueDescription:!0},{name:"maxNodeModuleJsDepth",type:"number",affectsModuleResolution:!0,category:k.JavaScript_Support,description:k.Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs,defaultValueDescription:0},{name:"noStrictGenericChecks",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:k.Backwards_Compatibility,description:k.Disable_strict_checking_of_generic_signatures_in_function_types,defaultValueDescription:!1},{name:"useDefineForClassFields",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,category:k.Language_and_Environment,description:k.Emit_ECMAScript_standard_compliant_class_fields,defaultValueDescription:k.true_for_ES2022_and_above_including_ESNext},{name:"preserveValueImports",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:k.Backwards_Compatibility,description:k.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,defaultValueDescription:!1},{name:"keyofStringsOnly",type:"boolean",category:k.Backwards_Compatibility,description:k.Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option,defaultValueDescription:!1},{name:"plugins",type:"list",isTSConfigOnly:!0,element:{name:"plugin",type:"object"},description:k.Specify_a_list_of_language_service_plugins_to_include,category:k.Editor_Support},{name:"moduleDetection",type:new Map(Object.entries({auto:2,legacy:1,force:3})),affectsSourceFile:!0,affectsModuleResolution:!0,description:k.Control_what_method_is_used_to_detect_module_format_JS_files,category:k.Language_and_Environment,defaultValueDescription:k.auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules},{name:"ignoreDeprecations",type:"string",defaultValueDescription:void 0}],U0=[...jX,...TIe],DIe=U0.filter(t=>!!t.affectsSemanticDiagnostics),EIe=U0.filter(t=>!!t.affectsEmit),IIe=U0.filter(t=>!!t.affectsDeclarationPath),Kle=U0.filter(t=>!!t.affectsModuleResolution),Xle=U0.filter(t=>!!t.affectsSourceFile||!!t.affectsBindDiagnostics),NIe=U0.filter(t=>!!t.affectsProgramStructure),LIe=U0.filter(t=>Li(t,"transpileOptionValue")),vOt=U0.filter(t=>t.allowConfigDirTemplateSubstitution||!t.isCommandLineOnly&&t.isFilePath),bOt=eA.filter(t=>t.allowConfigDirTemplateSubstitution||!t.isCommandLineOnly&&t.isFilePath),PIe=U0.filter(COt);function COt(t){return!Oo(t.type)}var Qle=[{name:"verbose",shortName:"v",category:k.Command_line_Options,description:k.Enable_verbose_logging,type:"boolean",defaultValueDescription:!1},{name:"dry",shortName:"d",category:k.Command_line_Options,description:k.Show_what_would_be_built_or_deleted_if_specified_with_clean,type:"boolean",defaultValueDescription:!1},{name:"force",shortName:"f",category:k.Command_line_Options,description:k.Build_all_projects_including_those_that_appear_to_be_up_to_date,type:"boolean",defaultValueDescription:!1},{name:"clean",category:k.Command_line_Options,description:k.Delete_the_outputs_of_all_projects,type:"boolean",defaultValueDescription:!1},{name:"stopBuildOnErrors",category:k.Command_line_Options,description:k.Skip_building_downstream_projects_on_error_in_upstream_project,type:"boolean",defaultValueDescription:!1}],EH=[...jX,...Qle],zX=[{name:"enable",type:"boolean",defaultValueDescription:!1},{name:"include",type:"list",element:{name:"include",type:"string"}},{name:"exclude",type:"list",element:{name:"exclude",type:"string"}},{name:"disableFilenameBasedTypeAcquisition",type:"boolean",defaultValueDescription:!1}];function UX(t){const r=new Map,a=new Map;return O(t,u=>{r.set(u.name.toLowerCase(),u),u.shortName&&a.set(u.shortName,u.name)}),{optionsNameMap:r,shortOptionNames:a}}var gZe;function A3(){return gZe||(gZe=UX(U0))}var SOt={diagnostic:k.Compiler_option_0_may_only_be_used_with_build,getOptionsNameMap:SZe},Zle={module:1,target:3,strict:!0,esModuleInterop:!0,forceConsistentCasingInFileNames:!0,skipLibCheck:!0};function AIe(t){return yZe(t,Zl)}function yZe(t,r){const a=as(t.type.keys()),u=(t.deprecatedKeys?a.filter(h=>!t.deprecatedKeys.has(h)):a).map(h=>`'${h}'`).join(", ");return r(k.Argument_for_0_option_must_be_Colon_1,`--${t.name}`,u)}function qX(t,r,a){return nYe(t,(r??"").trim(),a)}function OIe(t,r="",a){if(r=r.trim(),so(r,"-"))return;if(t.type==="listOrElement"&&!r.includes(","))return tA(t,r,a);if(r==="")return[];const u=r.split(",");switch(t.element.type){case"number":return es(u,h=>tA(t.element,parseInt(h),a));case"string":return es(u,h=>tA(t.element,h||"",a));case"boolean":case"object":return j.fail(`List of ${t.element.type} is not yet supported.`);default:return es(u,h=>qX(t.element,h,a))}}function vZe(t){return t.name}function MIe(t,r,a,u,h){var p;if((p=r.alternateMode)!=null&&p.getOptionsNameMap().optionsNameMap.has(t.toLowerCase()))return f2(h,u,r.alternateMode.diagnostic,t);const g=LT(t,r.optionDeclarations,vZe);return g?f2(h,u,r.unknownDidYouMeanDiagnostic,a||t,g.name):f2(h,u,r.unknownOptionDiagnostic,a||t)}function Yle(t,r,a){const u={};let h;const p=[],g=[];return C(r),{options:u,watchOptions:h,fileNames:p,errors:g};function C(T){let E=0;for(;E<T.length;){const N=T[E];if(E++,N.charCodeAt(0)===64)b(N.slice(1));else if(N.charCodeAt(0)===45){const R=N.slice(N.charCodeAt(1)===45?2:1),F=FIe(t.getOptionsNameMap,R,!0);if(F)E=bZe(T,E,t,F,u,g);else{const H=FIe(nue.getOptionsNameMap,R,!0);H?E=bZe(T,E,nue,H,h||(h={}),g):g.push(MIe(R,t,N))}}else p.push(N)}}function b(T){const E=A7(T,a||(F=>Pd.readFile(F)));if(!Oo(E)){g.push(E);return}const N=[];let R=0;for(;;){for(;R<E.length&&E.charCodeAt(R)<=32;)R++;if(R>=E.length)break;const F=R;if(E.charCodeAt(F)===34){for(R++;R<E.length&&E.charCodeAt(R)!==34;)R++;R<E.length?(N.push(E.substring(F+1,R)),R++):g.push(Zl(k.Unterminated_quoted_string_in_response_file_0,T))}else{for(;E.charCodeAt(R)>32;)R++;N.push(E.substring(F,R))}}C(N)}}function bZe(t,r,a,u,h,p){if(u.isTSConfigOnly){const g=t[r];g==="null"?(h[u.name]=void 0,r++):u.type==="boolean"?g==="false"?(h[u.name]=tA(u,!1,p),r++):(g==="true"&&r++,p.push(Zl(k.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line,u.name))):(p.push(Zl(k.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line,u.name)),g&&!so(g,"-")&&r++)}else if(!t[r]&&u.type!=="boolean"&&p.push(Zl(a.optionTypeMismatchDiagnostic,u.name,rue(u))),t[r]!=="null")switch(u.type){case"number":h[u.name]=tA(u,parseInt(t[r]),p),r++;break;case"boolean":const g=t[r];h[u.name]=tA(u,g!=="false",p),(g==="false"||g==="true")&&r++;break;case"string":h[u.name]=tA(u,t[r]||"",p),r++;break;case"list":const C=OIe(u,t[r],p);h[u.name]=C||[],C&&r++;break;case"listOrElement":j.fail("listOrElement not supported here");break;default:h[u.name]=qX(u,t[r],p),r++;break}else h[u.name]=void 0,r++;return r}var $X={alternateMode:SOt,getOptionsNameMap:A3,optionDeclarations:U0,unknownOptionDiagnostic:k.Unknown_compiler_option_0,unknownDidYouMeanDiagnostic:k.Unknown_compiler_option_0_Did_you_mean_1,optionTypeMismatchDiagnostic:k.Compiler_option_0_expects_an_argument};function RIe(t,r){return Yle($X,t,r)}function eue(t,r){return FIe(A3,t,r)}function FIe(t,r,a=!1){r=r.toLowerCase();const{optionsNameMap:u,shortOptionNames:h}=t();if(a){const p=h.get(r);p!==void 0&&(r=p)}return u.get(r)}var CZe;function SZe(){return CZe||(CZe=UX(EH))}var wOt={diagnostic:k.Compiler_option_0_may_not_be_used_with_build,getOptionsNameMap:A3},xOt={alternateMode:wOt,getOptionsNameMap:SZe,optionDeclarations:EH,unknownOptionDiagnostic:k.Unknown_build_option_0,unknownDidYouMeanDiagnostic:k.Unknown_build_option_0_Did_you_mean_1,optionTypeMismatchDiagnostic:k.Build_option_0_requires_a_value_of_type_1};function BIe(t){const{options:r,watchOptions:a,fileNames:u,errors:h}=Yle(xOt,t),p=r;return u.length===0&&u.push("."),p.clean&&p.force&&h.push(Zl(k.Options_0_and_1_cannot_be_combined,"clean","force")),p.clean&&p.verbose&&h.push(Zl(k.Options_0_and_1_cannot_be_combined,"clean","verbose")),p.clean&&p.watch&&h.push(Zl(k.Options_0_and_1_cannot_be_combined,"clean","watch")),p.watch&&p.dry&&h.push(Zl(k.Options_0_and_1_cannot_be_combined,"watch","dry")),{buildOptions:p,watchOptions:a,projects:u,errors:h}}function M_(t,...r){return ha(Zl(t,...r).messageText,Oo)}function IH(t,r,a,u,h,p){const g=A7(t,T=>a.readFile(T));if(!Oo(g)){a.onUnRecoverableConfigFileDiagnostic(g);return}const C=TH(t,g),b=a.getCurrentDirectory();return C.path=ol(t,b,Mf(a.useCaseSensitiveFileNames)),C.resolvedPath=C.path,C.originalFileName=C.fileName,PH(C,a,wo(ts(t),b),r,wo(t,b),void 0,p,u,h)}function NH(t,r){const a=A7(t,r);return Oo(a)?tue(t,a):{config:{},error:a}}function tue(t,r){const a=TH(t,r);return{config:MZe(a,a.parseDiagnostics,void 0),error:a.parseDiagnostics.length?a.parseDiagnostics[0]:void 0}}function WIe(t,r){const a=A7(t,r);return Oo(a)?TH(t,a):{fileName:t,parseDiagnostics:[a]}}function A7(t,r){let a;try{a=r(t)}catch(u){return Zl(k.Cannot_read_file_0_Colon_1,t,u.message)}return a===void 0?Zl(k.Cannot_read_file_0,t):a}function iue(t){return Ld(t,vZe)}var wZe={optionDeclarations:zX,unknownOptionDiagnostic:k.Unknown_type_acquisition_option_0,unknownDidYouMeanDiagnostic:k.Unknown_type_acquisition_option_0_Did_you_mean_1},xZe;function kZe(){return xZe||(xZe=UX(eA))}var nue={getOptionsNameMap:kZe,optionDeclarations:eA,unknownOptionDiagnostic:k.Unknown_watch_option_0,unknownDidYouMeanDiagnostic:k.Unknown_watch_option_0_Did_you_mean_1,optionTypeMismatchDiagnostic:k.Watch_option_0_requires_a_value_of_type_1},TZe;function DZe(){return TZe||(TZe=iue(U0))}var EZe;function IZe(){return EZe||(EZe=iue(eA))}var NZe;function LZe(){return NZe||(NZe=iue(zX))}var JX={name:"extends",type:"listOrElement",element:{name:"extends",type:"string"},category:k.File_Management,disallowNullOrUndefined:!0},PZe={name:"compilerOptions",type:"object",elementOptions:DZe(),extraKeyDiagnostics:$X},AZe={name:"watchOptions",type:"object",elementOptions:IZe(),extraKeyDiagnostics:nue},OZe={name:"typeAcquisition",type:"object",elementOptions:LZe(),extraKeyDiagnostics:wZe},VIe;function kOt(){return VIe===void 0&&(VIe={name:void 0,type:"object",elementOptions:iue([PZe,AZe,OZe,JX,{name:"references",type:"list",element:{name:"references",type:"object"},category:k.Projects},{name:"files",type:"list",element:{name:"files",type:"string"},category:k.File_Management},{name:"include",type:"list",element:{name:"include",type:"string"},category:k.File_Management,defaultValueDescription:k.if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk},{name:"exclude",type:"list",element:{name:"exclude",type:"string"},category:k.File_Management,defaultValueDescription:k.node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified},xIe])}),VIe}function MZe(t,r,a){var u;const h=(u=t.statements[0])==null?void 0:u.expression;if(h&&h.kind!==210){if(r.push(jm(t,h,k.The_root_value_of_a_0_file_must_be_an_object,ud(t.fileName)==="jsconfig.json"?"jsconfig.json":"tsconfig.json")),jf(h)){const p=Fe(h.elements,Aa);if(p)return LH(t,p,r,!0,a)}return{}}return LH(t,h,r,!0,a)}function HIe(t,r){var a;return LH(t,(a=t.statements[0])==null?void 0:a.expression,r,!0,void 0)}function LH(t,r,a,u,h){if(!r)return u?{}:void 0;return C(r,h==null?void 0:h.rootOptions);function p(T,E){var N;const R=u?{}:void 0;for(const F of T.properties){if(F.kind!==303){a.push(jm(t,F,k.Property_assignment_expected));continue}F.questionToken&&a.push(jm(t,F.questionToken,k.The_0_modifier_can_only_be_used_in_TypeScript_files,"?")),b(F.name)||a.push(jm(t,F.name,k.String_literal_with_double_quotes_expected));const H=YW(F.name)?void 0:lP(F.name),U=H&&Ws(H),q=U?(N=E==null?void 0:E.elementOptions)==null?void 0:N.get(U):void 0,X=C(F.initializer,q);typeof U<"u"&&(u&&(R[U]=X),h==null||h.onPropertySet(U,X,F,E,q))}return R}function g(T,E){if(!u){T.forEach(N=>C(N,E));return}return $t(T.map(N=>C(N,E)),N=>N!==void 0)}function C(T,E){switch(T.kind){case 112:return!0;case 97:return!1;case 106:return null;case 11:return b(T)||a.push(jm(t,T,k.String_literal_with_double_quotes_expected)),T.text;case 9:return Number(T.text);case 224:if(T.operator!==41||T.operand.kind!==9)break;return-Number(T.operand.text);case 210:return p(T,E);case 209:return g(T.elements,E&&E.element)}E?a.push(jm(t,T,k.Compiler_option_0_requires_a_value_of_type_1,E.name,rue(E))):a.push(jm(t,T,k.Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal))}function b(T){return Ha(T)&&tK(T,t)}}function rue(t){return t.type==="listOrElement"?`${rue(t.element)} or Array`:t.type==="list"?"Array":Oo(t.type)?t.type:"string"}function RZe(t,r){if(t){if(AH(r))return!t.disallowNullOrUndefined;if(t.type==="list")return Ao(r);if(t.type==="listOrElement")return Ao(r)||RZe(t.element,r);const a=Oo(t.type)?t.type:"string";return typeof r===a}return!1}function sue(t,r,a){var u,h,p;const g=Mf(a.useCaseSensitiveFileNames),C=qt($t(t.fileNames,(h=(u=t.options.configFile)==null?void 0:u.configFileSpecs)!=null&&h.validatedIncludeSpecs?DOt(r,t.options.configFile.configFileSpecs.validatedIncludeSpecs,t.options.configFile.configFileSpecs.validatedExcludeSpecs,a):Pk),H=>o8(wo(r,a.getCurrentDirectory()),wo(H,a.getCurrentDirectory()),g)),b={configFilePath:wo(r,a.getCurrentDirectory()),useCaseSensitiveFileNames:a.useCaseSensitiveFileNames},T=KX(t.options,b),E=t.watchOptions&&EOt(t.watchOptions),N={compilerOptions:{...GX(T),showConfig:void 0,configFile:void 0,configFilePath:void 0,help:void 0,init:void 0,listFiles:void 0,listEmittedFiles:void 0,project:void 0,build:void 0,version:void 0},watchOptions:E&&GX(E),references:qt(t.projectReferences,H=>({...H,path:H.originalPath?H.originalPath:"",originalPath:void 0})),files:P(C)?C:void 0,...(p=t.options.configFile)!=null&&p.configFileSpecs?{include:TOt(t.options.configFile.configFileSpecs.validatedIncludeSpecs),exclude:t.options.configFile.configFileSpecs.validatedExcludeSpecs}:{},compileOnSave:t.compileOnSave?!0:void 0},R=new Set(T.keys()),F={};for(const H in Cd)if(!R.has(H)&&Ft(Cd[H].dependencies,U=>R.has(U))){const U=Cd[H].computeValue(t.options),q=Cd[H].computeValue({});U!==q&&(F[H]=Cd[H].computeValue(t.options))}return $u(N.compilerOptions,GX(KX(F,b))),N}function GX(t){return Object.fromEntries(t)}function TOt(t){if(P(t)){if(P(t)!==1)return t;if(t[0]!==jZe)return t}}function DOt(t,r,a,u){if(!r)return Pk;const h=UK(t,a,r,u.useCaseSensitiveFileNames,u.getCurrentDirectory()),p=h.excludePattern&&ax(h.excludePattern,u.useCaseSensitiveFileNames),g=h.includeFilePattern&&ax(h.includeFilePattern,u.useCaseSensitiveFileNames);return g?p?C=>!(g.test(C)&&!p.test(C)):C=>!g.test(C):p?C=>p.test(C):Pk}function FZe(t){switch(t.type){case"string":case"number":case"boolean":case"object":return;case"list":case"listOrElement":return FZe(t.element);default:return t.type}}function oue(t,r){return cf(r,(a,u)=>{if(a===t)return u})}function KX(t,r){return BZe(t,A3(),r)}function EOt(t){return BZe(t,kZe())}function BZe(t,{optionsNameMap:r},a){const u=new Map,h=a&&Mf(a.useCaseSensitiveFileNames);for(const p in t)if(Li(t,p)){if(r.has(p)&&(r.get(p).category===k.Command_line_Options||r.get(p).category===k.Output_Formatting))continue;const g=t[p],C=r.get(p.toLowerCase());if(C){j.assert(C.type!=="listOrElement");const b=FZe(C);b?C.type==="list"?u.set(p,g.map(T=>oue(T,b))):u.set(p,oue(g,b)):a&&C.isFilePath?u.set(p,o8(a.configFilePath,wo(g,ts(a.configFilePath)),h)):a&&C.type==="list"&&C.element.isFilePath?u.set(p,g.map(T=>o8(a.configFilePath,wo(T,ts(a.configFilePath)),h))):u.set(p,g)}}return u}function jIe(t,r){const a=WZe(t);return h();function u(p){return Array(p+1).join(" ")}function h(){const p=[],g=u(2);return TIe.forEach(C=>{if(!a.has(C.name))return;const b=a.get(C.name),T=XIe(C);b!==T?p.push(`${g}${C.name}: ${b}`):Li(Zle,C.name)&&p.push(`${g}${C.name}: ${T}`)}),p.join(r)+r}}function WZe(t){const r=T_(t,Zle);return KX(r)}function zIe(t,r,a){const u=WZe(t);return g();function h(C){return Array(C+1).join(" ")}function p({category:C,name:b,isCommandLineOnly:T}){const E=[k.Command_line_Options,k.Editor_Support,k.Compiler_Diagnostics,k.Backwards_Compatibility,k.Watch_and_Build_Modes,k.Output_Formatting];return!T&&C!==void 0&&(!E.includes(C)||u.has(b))}function g(){const C=new Map;C.set(k.Projects,[]),C.set(k.Language_and_Environment,[]),C.set(k.Modules,[]),C.set(k.JavaScript_Support,[]),C.set(k.Emit,[]),C.set(k.Interop_Constraints,[]),C.set(k.Type_Checking,[]),C.set(k.Completeness,[]);for(const F of U0)if(p(F)){let H=C.get(F.category);H||C.set(F.category,H=[]),H.push(F)}let b=0,T=0;const E=[];C.forEach((F,H)=>{E.length!==0&&E.push({value:""}),E.push({value:`/* ${Bo(H)} */`});for(const U of F){let q;u.has(U.name)?q=`"${U.name}": ${JSON.stringify(u.get(U.name))}${(T+=1)===u.size?"":","}`:q=`// "${U.name}": ${JSON.stringify(XIe(U))},`,E.push({value:q,description:`/* ${U.description&&Bo(U.description)||U.name} */`}),b=Math.max(q.length,b)}});const N=h(2),R=[];R.push("{"),R.push(`${N}"compilerOptions": {`),R.push(`${N}${N}/* ${Bo(k.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file)} */`),R.push("");for(const F of E){const{value:H,description:U=""}=F;R.push(H&&`${N}${N}${H}${U&&h(b-H.length+2)+U}`)}if(r.length){R.push(`${N}},`),R.push(`${N}"files": [`);for(let F=0;F<r.length;F++)R.push(`${N}${N}${JSON.stringify(r[F])}${F===r.length-1?"":","}`);R.push(`${N}]`)}else R.push(`${N}}`);return R.push("}"),R.join(a)+a}}function XX(t,r){const a={},u=A3().optionsNameMap;for(const h in t)Li(t,h)&&(a[h]=IOt(u.get(h.toLowerCase()),t[h],r));return a.configFilePath&&(a.configFilePath=r(a.configFilePath)),a}function IOt(t,r,a){if(t&&!AH(r)){if(t.type==="list"){const u=r;if(t.element.isFilePath&&u.length)return u.map(a)}else if(t.isFilePath)return a(r);j.assert(t.type!=="listOrElement")}return r}function VZe(t,r,a,u,h,p,g,C,b){return zZe(t,void 0,r,a,u,b,h,p,g,C)}function PH(t,r,a,u,h,p,g,C,b){var T,E;(T=Zn)==null||T.push(Zn.Phase.Parse,"parseJsonSourceFileConfigFileContent",{path:t.fileName});const N=zZe(void 0,t,r,a,u,b,h,p,g,C);return(E=Zn)==null||E.pop(),N}function aue(t,r){r&&Object.defineProperty(t,"configFile",{enumerable:!1,writable:!1,value:r})}function AH(t){return t==null}function HZe(t,r){return ts(wo(t,r))}var jZe="**/*";function zZe(t,r,a,u,h={},p,g,C=[],b=[],T){j.assert(t===void 0&&r!==void 0||t!==void 0&&r===void 0);const E=[],N=KZe(t,r,a,u,g,C,E,T),{raw:R}=N,F=UZe(T_(h,N.options||{}),vOt,u),H=QX(p&&N.watchOptions?T_(p,N.watchOptions):N.watchOptions||p,u);F.configFilePath=g&&Rf(g);const U=ca(g?HZe(g,u):u),q=X();return r&&(r.configFileSpecs=q),aue(F,r),{options:F,watchOptions:H,fileNames:Z(U),projectReferences:Q(U),typeAcquisition:N.typeAcquisition||lue(),raw:R,errors:E,wildcardDirectories:HOt(q,U,a.useCaseSensitiveFileNames),compileOnSave:!!R.compileOnSave};function X(){const ue=pe("references",He=>typeof He=="object","object"),Ie=re(oe("files"));if(Ie){const He=ue==="no-prop"||Ao(ue)&&ue.length===0,Pe=Li(R,"extends");if(Ie.length===0&&He&&!Pe)if(r){const We=g||"tsconfig.json",ze=k.The_files_list_in_config_file_0_is_empty,Nt=sV(r,"files",et=>et.initializer),$e=f2(r,Nt,ze,We);E.push($e)}else de(k.The_files_list_in_config_file_0_is_empty,g||"tsconfig.json")}let we=re(oe("include"));const he=oe("exclude");let Ae=!1,ke=re(he);if(he==="no-prop"){const He=F.outDir,Pe=F.declarationDir;(He||Pe)&&(ke=$t([He,Pe],We=>!!We))}Ie===void 0&&we===void 0&&(we=[jZe],Ae=!0);let Te,De,qe,se;we&&(Te=aYe(we,E,!0,r,"include"),qe=ZX(Te,U)||Te),ke&&(De=aYe(ke,E,!1,r,"exclude"),se=ZX(De,U)||De);const Ne=$t(Ie,Oo),Oe=ZX(Ne,U)||Ne;return{filesSpecs:Ie,includeSpecs:we,excludeSpecs:ke,validatedFilesSpec:Oe,validatedIncludeSpecs:qe,validatedExcludeSpecs:se,validatedFilesSpecBeforeSubstitution:Ne,validatedIncludeSpecsBeforeSubstitution:Te,validatedExcludeSpecsBeforeSubstitution:De,pathPatterns:void 0,isDefaultIncludeSpec:Ae}}function Z(ue){const Ie=M7(q,ue,F,a,b);return GZe(Ie,O7(R),C)&&E.push(JZe(q,g)),Ie}function Q(ue){let Ie;const we=pe("references",he=>typeof he=="object","object");if(Ao(we))for(const he of we)typeof he.path!="string"?de(k.Compiler_option_0_requires_a_value_of_type_1,"reference.path","string"):(Ie||(Ie=[])).push({path:wo(he.path,ue),originalPath:he.path,prepend:he.prepend,circular:he.circular});return Ie}function re(ue){return Ao(ue)?ue:void 0}function oe(ue){return pe(ue,Oo,"string")}function pe(ue,Ie,we){if(Li(R,ue)&&!AH(R[ue]))if(Ao(R[ue])){const he=R[ue];return!r&&!Ce(he,Ie)&&E.push(Zl(k.Compiler_option_0_requires_a_value_of_type_1,ue,we)),he}else return de(k.Compiler_option_0_requires_a_value_of_type_1,ue,"Array"),"not-array";return"no-prop"}function de(ue,...Ie){r||E.push(Zl(ue,...Ie))}}function QX(t,r){return UZe(t,bOt,r)}function UZe(t,r,a){if(!t)return t;let u;for(const p of r)if(t[p.name]!==void 0){const g=t[p.name];switch(p.type){case"string":j.assert(p.isFilePath),cue(g)&&h(p,$Ze(g,a));break;case"list":j.assert(p.element.isFilePath);const C=ZX(g,a);C&&h(p,C);break;case"object":j.assert(p.name==="paths");const b=NOt(g,a);b&&h(p,b);break;default:j.fail("option type not supported")}}return u||t;function h(p,g){(u??(u=$u({},t)))[p.name]=g}}var qZe="${configDir}";function cue(t){return Oo(t)&&so(t,qZe,!0)}function $Ze(t,r){return wo(t.replace(qZe,"./"),r)}function ZX(t,r){if(!t)return t;let a;return t.forEach((u,h)=>{cue(u)&&((a??(a=t.slice()))[h]=$Ze(u,r))}),a}function NOt(t,r){let a;return wr(t).forEach(h=>{if(!Ao(t[h]))return;const p=ZX(t[h],r);p&&((a??(a=$u({},t)))[h]=p)}),a}function LOt(t){return t.code===k.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code}function JZe({includeSpecs:t,excludeSpecs:r},a){return Zl(k.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2,a||"tsconfig.json",JSON.stringify(t||[]),JSON.stringify(r||[]))}function GZe(t,r,a){return t.length===0&&r&&(!a||a.length===0)}function O7(t){return!Li(t,"files")&&!Li(t,"references")}function YX(t,r,a,u,h){const p=u.length;return GZe(t,h)?u.push(JZe(a,r)):Hi(u,g=>!LOt(g)),p!==u.length}function POt(t){return!!t.options}function KZe(t,r,a,u,h,p,g,C){var b;u=Rf(u);const T=wo(h||"",u);if(p.includes(T))return g.push(Zl(k.Circularity_detected_while_resolving_configuration_Colon_0,[...p,T].join(" -> "))),{raw:t||HIe(r,g)};const E=t?AOt(t,a,u,h,g):OOt(r,a,u,h,g);if((b=E.options)!=null&&b.paths&&(E.options.pathsBasePath=u),E.extendedConfigPath){p=p.concat([T]);const R={options:{}};Oo(E.extendedConfigPath)?N(R,E.extendedConfigPath):E.extendedConfigPath.forEach(F=>N(R,F)),R.include&&(E.raw.include=R.include),R.exclude&&(E.raw.exclude=R.exclude),R.files&&(E.raw.files=R.files),E.raw.compileOnSave===void 0&&R.compileOnSave&&(E.raw.compileOnSave=R.compileOnSave),r&&R.extendedSourceFiles&&(r.extendedSourceFiles=as(R.extendedSourceFiles.keys())),E.options=$u(R.options,E.options),E.watchOptions=E.watchOptions&&R.watchOptions?$u(R.watchOptions,E.watchOptions):E.watchOptions||R.watchOptions}return E;function N(R,F){const H=MOt(r,F,a,p,g,C,R);if(H&&POt(H)){const U=H.raw;let q;const X=Z=>{E.raw[Z]||U[Z]&&(R[Z]=qt(U[Z],Q=>cue(Q)||yp(Q)?Q:zr(q||(q=s8(ts(F),u,Mf(a.useCaseSensitiveFileNames))),Q)))};X("include"),X("exclude"),X("files"),U.compileOnSave!==void 0&&(R.compileOnSave=U.compileOnSave),$u(R.options,H.options),R.watchOptions=R.watchOptions&&H.watchOptions?$u({},R.watchOptions,H.watchOptions):R.watchOptions||H.watchOptions}}}function AOt(t,r,a,u,h){Li(t,"excludes")&&h.push(Zl(k.Unknown_option_excludes_Did_you_mean_exclude));const p=tYe(t.compilerOptions,a,h,u),g=iYe(t.typeAcquisition,a,h,u),C=FOt(t.watchOptions,a,h);t.compileOnSave=ROt(t,a,h);const b=t.extends||t.extends===""?XZe(t.extends,r,a,u,h):void 0;return{raw:t,options:p,watchOptions:C,typeAcquisition:g,extendedConfigPath:b}}function XZe(t,r,a,u,h,p,g,C){let b;const T=u?HZe(u,a):a;if(Oo(t))b=QZe(t,r,T,h,g,C);else if(Ao(t)){b=[];for(let E=0;E<t.length;E++){const N=t[E];Oo(N)?b=fn(b,QZe(N,r,T,h,g==null?void 0:g.elements[E],C)):BI(JX.element,t,a,h,p,g==null?void 0:g.elements[E],C)}}else BI(JX,t,a,h,p,g,C);return b}function OOt(t,r,a,u,h){const p=eYe(u);let g,C,b,T;const E=kOt(),N=MZe(t,h,{rootOptions:E,onPropertySet:R});return g||(g=lue(u)),T&&N&&N.compilerOptions===void 0&&h.push(jm(t,T[0],k._0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file,lP(T[0]))),{raw:N,options:p,watchOptions:C,typeAcquisition:g,extendedConfigPath:b};function R(F,H,U,q,X){if(X&&X!==JX&&(H=BI(X,H,a,h,U,U.initializer,t)),q!=null&&q.name)if(X){let Z;q===PZe?Z=p:q===AZe?Z=C??(C={}):q===OZe?Z=g??(g=lue(u)):j.fail("Unknown option"),Z[X.name]=H}else F&&(q!=null&&q.extraKeyDiagnostics)&&(q.elementOptions?h.push(MIe(F,q.extraKeyDiagnostics,void 0,U.name,t)):h.push(jm(t,U.name,q.extraKeyDiagnostics.unknownOptionDiagnostic,F)));else q===E&&(X===JX?b=XZe(H,r,a,u,h,U,U.initializer,t):X||(F==="excludes"&&h.push(jm(t,U.name,k.Unknown_option_excludes_Did_you_mean_exclude)),Fe(TIe,Z=>Z.name===F)&&(T=fn(T,U.name))))}}function QZe(t,r,a,u,h,p){if(t=Rf(t),yp(t)||so(t,"./")||so(t,"../")){let C=wo(t,a);if(!r.fileExists(C)&&!su(C,".json")&&(C=`${C}.json`,!r.fileExists(C))){u.push(f2(p,h,k.File_0_not_found,t));return}return C}const g=lNe(t,zr(a,"tsconfig.json"),r);if(g.resolvedModule)return g.resolvedModule.resolvedFileName;t===""?u.push(f2(p,h,k.Compiler_option_0_cannot_be_given_an_empty_string,"extends")):u.push(f2(p,h,k.File_0_not_found,t))}function MOt(t,r,a,u,h,p,g){const C=a.useCaseSensitiveFileNames?r:Vw(r);let b,T,E;if(p&&(b=p.get(C))?{extendedResult:T,extendedConfig:E}=b:(T=WIe(r,N=>a.readFile(N)),T.parseDiagnostics.length||(E=KZe(void 0,T,a,ts(r),ud(r),u,h,p)),p&&p.set(C,{extendedResult:T,extendedConfig:E})),t&&((g.extendedSourceFiles??(g.extendedSourceFiles=new Set)).add(T.fileName),T.extendedSourceFiles))for(const N of T.extendedSourceFiles)g.extendedSourceFiles.add(N);if(T.parseDiagnostics.length){h.push(...T.parseDiagnostics);return}return E}function ROt(t,r,a){if(!Li(t,xIe.name))return!1;const u=BI(xIe,t.compileOnSave,r,a);return typeof u=="boolean"&&u}function ZZe(t,r,a){const u=[];return{options:tYe(t,r,u,a),errors:u}}function YZe(t,r,a){const u=[];return{options:iYe(t,r,u,a),errors:u}}function eYe(t){return t&&ud(t)==="jsconfig.json"?{allowJs:!0,maxNodeModuleJsDepth:2,allowSyntheticDefaultImports:!0,skipLibCheck:!0,noEmit:!0}:{}}function tYe(t,r,a,u){const h=eYe(u);return UIe(DZe(),t,r,h,$X,a),u&&(h.configFilePath=Rf(u)),h}function lue(t){return{enable:!!t&&ud(t)==="jsconfig.json",include:[],exclude:[]}}function iYe(t,r,a,u){const h=lue(u);return UIe(LZe(),t,r,h,wZe,a),h}function FOt(t,r,a){return UIe(IZe(),t,r,void 0,nue,a)}function UIe(t,r,a,u,h,p){if(r){for(const g in r){const C=t.get(g);C?(u||(u={}))[C.name]=BI(C,r[g],a,p):p.push(MIe(g,h))}return u}}function f2(t,r,a,...u){return t&&r?jm(t,r,a,...u):Zl(a,...u)}function BI(t,r,a,u,h,p,g){if(t.isCommandLineOnly){u.push(f2(g,h==null?void 0:h.name,k.Option_0_can_only_be_specified_on_command_line,t.name));return}if(RZe(t,r)){const C=t.type;if(C==="list"&&Ao(r))return rYe(t,r,a,u,h,p,g);if(C==="listOrElement")return Ao(r)?rYe(t,r,a,u,h,p,g):BI(t.element,r,a,u,h,p,g);if(!Oo(t.type))return nYe(t,r,u,p,g);const b=tA(t,r,u,p,g);return AH(b)?b:BOt(t,a,b)}else u.push(f2(g,p,k.Compiler_option_0_requires_a_value_of_type_1,t.name,rue(t)))}function BOt(t,r,a){return t.isFilePath&&(a=Rf(a),a=cue(a)?a:wo(a,r),a===""&&(a=".")),a}function tA(t,r,a,u,h){var p;if(AH(r))return;const g=(p=t.extraValidation)==null?void 0:p.call(t,r);if(!g)return r;a.push(f2(h,u,...g))}function nYe(t,r,a,u,h){if(AH(r))return;const p=r.toLowerCase(),g=t.type.get(p);if(g!==void 0)return tA(t,g,a,u,h);a.push(yZe(t,(C,...b)=>f2(h,u,C,...b)))}function rYe(t,r,a,u,h,p,g){return $t(qt(r,(C,b)=>BI(t.element,C,a,u,h,p==null?void 0:p.elements[b],g)),C=>t.listPreserveFalsyValues?!0:!!C)}var WOt=/(?:^|\/)\*\*\/?$/,VOt=/^[^*?]*(?=\/[^/]*[*?])/;function M7(t,r,a,u,h=w){r=ca(r);const p=Mf(u.useCaseSensitiveFileNames),g=new Map,C=new Map,b=new Map,{validatedFilesSpec:T,validatedIncludeSpecs:E,validatedExcludeSpecs:N}=t,R=e7(a,h),F=QV(a,R);if(T)for(const X of T){const Z=wo(X,r);g.set(p(Z),Z)}let H;if(E&&E.length>0)for(const X of u.readDirectory(r,Dr(F),N,E,void 0)){if(Xl(X,".json")){if(!H){const re=E.filter(pe=>su(pe,".json")),oe=qt(jK(re,r,"files"),pe=>`^${pe}$`);H=oe?oe.map(pe=>ax(pe,u.useCaseSensitiveFileNames)):w}if(ct(H,re=>re.test(X))!==-1){const re=p(X);!g.has(re)&&!b.has(re)&&b.set(re,X)}continue}if(zOt(X,g,C,R,p))continue;UOt(X,C,R,p);const Z=p(X);!g.has(Z)&&!C.has(Z)&&C.set(Z,X)}const U=as(g.values()),q=as(C.values());return U.concat(q,as(b.values()))}function qIe(t,r,a,u,h){const{validatedFilesSpec:p,validatedIncludeSpecs:g,validatedExcludeSpecs:C}=r;if(!P(g)||!P(C))return!1;a=ca(a);const b=Mf(u);if(p){for(const T of p)if(b(wo(T,a))===t)return!1}return oYe(t,C,u,h,a)}function sYe(t){const r=so(t,"**/")?0:t.indexOf("/**/");return r===-1?!1:(su(t,"/..")?t.length:t.lastIndexOf("/../"))>r}function eQ(t,r,a,u){return oYe(t,$t(r,h=>!sYe(h)),a,u)}function oYe(t,r,a,u,h){const p=Y8(r,zr(ca(u),h),"exclude"),g=p&&ax(p,a);return g?g.test(t)?!0:!N6(t)&&g.test(Ad(t)):!1}function aYe(t,r,a,u,h){return t.filter(g=>{if(!Oo(g))return!1;const C=$Ie(g,a);return C!==void 0&&r.push(p(...C)),C===void 0});function p(g,C){const b=UG(u,h,C);return f2(u,b,g,C)}}function $Ie(t,r){if(j.assert(typeof t=="string"),r&&WOt.test(t))return[k.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0,t];if(sYe(t))return[k.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0,t]}function HOt({validatedIncludeSpecs:t,validatedExcludeSpecs:r},a,u){const h=Y8(r,a,"exclude"),p=h&&new RegExp(h,u?"":"i"),g={},C=new Map;if(t!==void 0){const b=[];for(const T of t){const E=ca(zr(a,T));if(p&&p.test(E))continue;const N=jOt(E,u);if(N){const{key:R,path:F,flags:H}=N,U=C.get(R),q=U!==void 0?g[U]:void 0;(q===void 0||q<H)&&(g[U!==void 0?U:F]=H,U===void 0&&C.set(R,F),H===1&&b.push(R))}}for(const T in g)if(Li(g,T))for(const E of b){const N=JIe(T,u);N!==E&&Vm(E,N,a,!u)&&delete g[T]}}return g}function JIe(t,r){return r?t:Vw(t)}function jOt(t,r){const a=VOt.exec(t);if(a){const u=t.indexOf("?"),h=t.indexOf("*"),p=t.lastIndexOf(Kl);return{key:JIe(a[0],r),path:a[0],flags:u!==-1&&u<p||h!==-1&&h<p?1:0}}if(Rce(t.substring(t.lastIndexOf(Kl)+1))){const u=Mk(t);return{key:JIe(u,r),path:u,flags:1}}}function zOt(t,r,a,u,h){const p=O(u,g=>Ru(t,g)?g:void 0);if(!p)return!1;for(const g of p){if(Xl(t,g)&&(g!==".ts"||!Xl(t,".d.ts")))return!1;const C=h(cx(t,g));if(r.has(C)||a.has(C)){if(g===".d.ts"&&(Xl(t,".js")||Xl(t,".jsx")))continue;return!0}}return!1}function UOt(t,r,a,u){const h=O(a,p=>Ru(t,p)?p:void 0);if(h)for(let p=h.length-1;p>=0;p--){const g=h[p];if(Xl(t,g))return;const C=u(cx(t,g));r.delete(C)}}function GIe(t){const r={};for(const a in t)if(Li(t,a)){const u=eue(a);u!==void 0&&(r[a]=KIe(t[a],u))}return r}function KIe(t,r){if(t===void 0)return t;switch(r.type){case"object":return"";case"string":return"";case"number":return typeof t=="number"?t:"";case"boolean":return typeof t=="boolean"?t:"";case"listOrElement":if(!Ao(t))return KIe(t,r.element);case"list":const a=r.element;return Ao(t)?es(t,u=>KIe(u,a)):"";default:return cf(r.type,(u,h)=>{if(u===t)return h})}}function XIe(t){switch(t.type){case"number":return 1;case"boolean":return!0;case"string":const r=t.defaultValueDescription;return t.isFilePath?`./${r&&typeof r=="string"?r:""}`:"";case"list":return[];case"listOrElement":return XIe(t.element);case"object":return{};default:const a=k_(t.type.keys());return a!==void 0?a:j.fail("Expected 'option.type' to have entries.")}}function bo(t,r,...a){t.trace(DP(r,...a))}function mx(t,r){return!!t.traceResolution&&r.trace!==void 0}function iA(t,r,a){let u;if(r&&t){const h=t.contents.packageJsonContent;typeof h.name=="string"&&typeof h.version=="string"&&(u={name:h.name,subModuleName:r.path.slice(t.packageDirectory.length+Kl.length),version:h.version,peerDependencies:fMt(t,a)})}return r&&{path:r.path,extension:r.ext,packageId:u,resolvedUsingTsExtension:r.resolvedUsingTsExtension}}function uue(t){return iA(void 0,t,void 0)}function cYe(t){if(t)return j.assert(t.packageId===void 0),{path:t.path,ext:t.extension,resolvedUsingTsExtension:t.resolvedUsingTsExtension}}function tQ(t){const r=[];return t&1&&r.push("TypeScript"),t&2&&r.push("JavaScript"),t&4&&r.push("Declaration"),t&8&&r.push("JSON"),r.join(", ")}function qOt(t){const r=[];return t&1&&r.push(...XV),t&2&&r.push(...h3),t&4&&r.push(...GK),t&8&&r.push(".json"),r}function QIe(t){if(t)return j.assert(QK(t.extension)),{fileName:t.path,packageId:t.packageId}}function lYe(t,r,a,u,h,p,g,C,b){if(!g.resultFromCache&&!g.compilerOptions.preserveSymlinks&&r&&a&&!r.originalPath&&!Gd(t)){const{resolvedFileName:T,originalPath:E}=dYe(r.path,g.host,g.traceEnabled);E&&(r={...r,path:T,originalPath:E})}return uYe(r,a,u,h,p,g.resultFromCache,C,b)}function uYe(t,r,a,u,h,p,g,C){return p?g!=null&&g.isReadonly?{...p,failedLookupLocations:ZIe(p.failedLookupLocations,a),affectingLocations:ZIe(p.affectingLocations,u),resolutionDiagnostics:ZIe(p.resolutionDiagnostics,h)}:(p.failedLookupLocations=O3(p.failedLookupLocations,a),p.affectingLocations=O3(p.affectingLocations,u),p.resolutionDiagnostics=O3(p.resolutionDiagnostics,h),p):{resolvedModule:t&&{resolvedFileName:t.path,originalPath:t.originalPath===!0?void 0:t.originalPath,extension:t.extension,isExternalLibraryImport:r,packageId:t.packageId,resolvedUsingTsExtension:!!t.resolvedUsingTsExtension},failedLookupLocations:R7(a),affectingLocations:R7(u),resolutionDiagnostics:R7(h),alternateResult:C}}function R7(t){return t.length?t:void 0}function O3(t,r){return r!=null&&r.length?t!=null&&t.length?(t.push(...r),t):r:t}function ZIe(t,r){return t!=null&&t.length?r.length?[...t,...r]:t.slice():R7(r)}function YIe(t,r,a,u){if(!Li(t,r)){u.traceEnabled&&bo(u.host,k.package_json_does_not_have_a_0_field,r);return}const h=t[r];if(typeof h!==a||h===null){u.traceEnabled&&bo(u.host,k.Expected_type_of_0_field_in_package_json_to_be_1_got_2,r,a,h===null?"null":typeof h);return}return h}function due(t,r,a,u){const h=YIe(t,r,"string",u);if(h===void 0)return;if(!h){u.traceEnabled&&bo(u.host,k.package_json_had_a_falsy_0_field,r);return}const p=ca(zr(a,h));return u.traceEnabled&&bo(u.host,k.package_json_has_0_field_1_that_references_2,r,h,p),p}function $Ot(t,r,a){return due(t,"typings",r,a)||due(t,"types",r,a)}function JOt(t,r,a){return due(t,"tsconfig",r,a)}function GOt(t,r,a){return due(t,"main",r,a)}function KOt(t,r){const a=YIe(t,"typesVersions","object",r);if(a!==void 0)return r.traceEnabled&&bo(r.host,k.package_json_has_a_typesVersions_field_with_version_specific_path_mappings),a}function XOt(t,r){const a=KOt(t,r);if(a===void 0)return;if(r.traceEnabled)for(const g in a)Li(a,g)&&!qJ.tryParse(g)&&bo(r.host,k.package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range,g);const u=iQ(a);if(!u){r.traceEnabled&&bo(r.host,k.package_json_does_not_have_a_typesVersions_entry_that_matches_version_0,m);return}const{version:h,paths:p}=u;if(typeof p!="object"){r.traceEnabled&&bo(r.host,k.Expected_type_of_0_field_in_package_json_to_be_1_got_2,`typesVersions['${h}']`,"object",typeof p);return}return u}var eNe;function iQ(t){eNe||(eNe=new P0(v));for(const r in t){if(!Li(t,r))continue;const a=qJ.tryParse(r);if(a!==void 0&&a.test(eNe))return{version:r,paths:t[r]}}}function F7(t,r){if(t.typeRoots)return t.typeRoots;let a;if(t.configFilePath?a=ts(t.configFilePath):r.getCurrentDirectory&&(a=r.getCurrentDirectory()),a!==void 0)return QOt(a)}function QOt(t){let r;return kg(ca(t),a=>{const u=zr(a,ZOt);(r??(r=[])).push(u)}),r}var ZOt=zr("node_modules","@types");function YOt(t,r,a){const u=typeof a.useCaseSensitiveFileNames=="function"?a.useCaseSensitiveFileNames():a.useCaseSensitiveFileNames;return Hb(t,r,!u)===0}function dYe(t,r,a){const u=bYe(t,r,a),h=YOt(t,u,r);return{resolvedFileName:h?t:u,originalPath:h?void 0:t}}function fYe(t,r,a){const u=su(t,"/node_modules/@types")||su(t,"/node_modules/@types/")?PYe(r,a):r;return zr(t,u)}function tNe(t,r,a,u,h,p,g){j.assert(typeof t=="string","Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.");const C=mx(a,u);h&&(a=h.commandLine.options);const b=r?ts(r):void 0;let T=b?p==null?void 0:p.getFromDirectoryCache(t,g,b,h):void 0;if(!T&&b&&!Gd(t)&&(T=p==null?void 0:p.getFromNonRelativeNameCache(t,g,b,h)),T)return C&&(bo(u,k.Resolving_type_reference_directive_0_containing_file_1,t,r),h&&bo(u,k.Using_compiler_options_of_project_reference_redirect_0,h.sourceFile.fileName),bo(u,k.Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1,t,b),oe(T)),T;const E=F7(a,u);C&&(r===void 0?E===void 0?bo(u,k.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set,t):bo(u,k.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1,t,E):E===void 0?bo(u,k.Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set,t,r):bo(u,k.Resolving_type_reference_directive_0_containing_file_1_root_directory_2,t,r,E),h&&bo(u,k.Using_compiler_options_of_project_reference_redirect_0,h.sourceFile.fileName));const N=[],R=[];let F=iNe(a);g!==void 0&&(F|=30);const H=yh(a);g===99&&3<=H&&H<=99&&(F|=32);const U=F&8?gx(a,g):[],q=[],X={compilerOptions:a,host:u,traceEnabled:C,failedLookupLocations:N,affectingLocations:R,packageJsonInfoCache:p,features:F,conditions:U,requestContainingDirectory:b,reportDiagnostic:ue=>void q.push(ue),isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1};let Z=pe(),Q=!0;Z||(Z=de(),Q=!1);let re;if(Z){const{fileName:ue,packageId:Ie}=Z;let we=ue,he;a.preserveSymlinks||({resolvedFileName:we,originalPath:he}=dYe(ue,u,C)),re={primary:Q,resolvedFileName:we,originalPath:he,packageId:Ie,isExternalLibraryImport:yx(ue)}}return T={resolvedTypeReferenceDirective:re,failedLookupLocations:R7(N),affectingLocations:R7(R),resolutionDiagnostics:R7(q)},b&&p&&!p.isReadonly&&(p.getOrCreateCacheForDirectory(b,h).set(t,g,T),Gd(t)||p.getOrCreateCacheForNonRelativeName(t,g,h).set(b,T)),C&&oe(T),T;function oe(ue){var Ie;(Ie=ue.resolvedTypeReferenceDirective)!=null&&Ie.resolvedFileName?ue.resolvedTypeReferenceDirective.packageId?bo(u,k.Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3,t,ue.resolvedTypeReferenceDirective.resolvedFileName,zk(ue.resolvedTypeReferenceDirective.packageId),ue.resolvedTypeReferenceDirective.primary):bo(u,k.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2,t,ue.resolvedTypeReferenceDirective.resolvedFileName,ue.resolvedTypeReferenceDirective.primary):bo(u,k.Type_reference_directive_0_was_not_resolved,t)}function pe(){if(E&&E.length)return C&&bo(u,k.Resolving_with_primary_search_path_0,E.join(", ")),J(E,ue=>{const Ie=fYe(ue,t,X),we=B0(ue,u);if(!we&&C&&bo(u,k.Directory_0_does_not_exist_skipping_all_lookups_in_it,ue),a.typeRoots){const he=F3(4,Ie,!we,X);if(he){const Ae=MH(he.path),ke=Ae?WI(Ae,!1,X):void 0;return QIe(iA(ke,he,X))}}return QIe(dNe(4,Ie,!we,X))});C&&bo(u,k.Root_directory_cannot_be_determined_skipping_primary_search_paths)}function de(){const ue=r&&ts(r);if(ue!==void 0){let Ie;if(!a.typeRoots||!su(r,Z7))if(C&&bo(u,k.Looking_up_in_node_modules_folder_initial_location_0,ue),Gd(t)){const{path:we}=vYe(ue,t);Ie=pue(4,we,!1,X,!0)}else{const we=EYe(4,t,ue,X,void 0,void 0);Ie=we&&we.value}else C&&bo(u,k.Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder);return QIe(Ie)}else C&&bo(u,k.Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder)}}function iNe(t){let r=0;switch(yh(t)){case 3:r=30;break;case 99:r=30;break;case 100:r=30;break}return t.resolvePackageJsonExports?r|=8:t.resolvePackageJsonExports===!1&&(r&=-9),t.resolvePackageJsonImports?r|=2:t.resolvePackageJsonImports===!1&&(r&=-3),r}function gx(t,r){const a=yh(t);if(r===void 0){if(a===100)r=99;else if(a===2)return[]}const u=r===99?["import"]:["require"];return t.noDtsResolution||u.push("types"),a!==100&&u.push("node"),Js(u,t.customConditions)}function fue(t,r,a,u,h){const p=W7(h==null?void 0:h.getPackageJsonInfoCache(),u,a);return kg(r,g=>{if(ud(g)!=="node_modules"){const C=zr(g,"node_modules"),b=zr(C,t);return WI(b,!1,p)}})}function nQ(t,r){if(t.types)return t.types;const a=[];if(r.directoryExists&&r.getDirectories){const u=F7(t,r);if(u){for(const h of u)if(r.directoryExists(h))for(const p of r.getDirectories(h)){const g=ca(p),C=zr(h,g,"package.json");if(!(r.fileExists(C)&&J8(C,r).typings===null)){const T=ud(g);T.charCodeAt(0)!==46&&a.push(T)}}}}return a}function rQ(t){return!!(t!=null&&t.contents)}function nNe(t){return!!t&&!t.contents}function rNe(t){var r;if(t===null||typeof t!="object")return""+t;if(Ao(t))return`[${(r=t.map(u=>rNe(u)))==null?void 0:r.join(",")}]`;let a="{";for(const u in t)Li(t,u)&&(a+=`${u}: ${rNe(t[u])}`);return a+"}"}function hue(t,r){return r.map(a=>rNe(BK(t,a))).join("|")+`|${t.pathsBasePath}`}function hYe(t,r){const a=new Map,u=new Map;let h=new Map;return t&&a.set(t,h),{getMapOfCacheRedirects:p,getOrCreateMapOfCacheRedirects:g,update:C,clear:T,getOwnMap:()=>h};function p(N){return N?b(N.commandLine.options,!1):h}function g(N){return N?b(N.commandLine.options,!0):h}function C(N){t!==N&&(t?h=b(N,!0):a.set(N,h),t=N)}function b(N,R){let F=a.get(N);if(F)return F;const H=E(N);if(F=u.get(H),!F){if(t){const U=E(t);U===H?F=h:u.has(U)||u.set(U,h)}R&&(F??(F=new Map)),F&&u.set(H,F)}return F&&a.set(N,F),F}function T(){const N=t&&r.get(t);h.clear(),a.clear(),r.clear(),u.clear(),t&&(N&&r.set(t,N),a.set(t,h))}function E(N){let R=r.get(N);return R||r.set(N,R=hue(N,Kle)),R}}function eMt(t,r){let a;return{getPackageJsonInfo:u,setPackageJsonInfo:h,clear:p,getInternalMap:g};function u(C){return a==null?void 0:a.get(ol(C,t,r))}function h(C,b){(a||(a=new Map)).set(ol(C,t,r),b)}function p(){a=void 0}function g(){return a}}function _Ye(t,r,a,u){const h=t.getOrCreateMapOfCacheRedirects(r);let p=h.get(a);return p||(p=u(),h.set(a,p)),p}function tMt(t,r,a,u){const h=hYe(a,u);return{getFromDirectoryCache:b,getOrCreateCacheForDirectory:C,clear:p,update:g,directoryToModuleNameMap:h};function p(){h.clear()}function g(T){h.update(T)}function C(T,E){const N=ol(T,t,r);return _Ye(h,E,N,()=>M3())}function b(T,E,N,R){var F,H;const U=ol(N,t,r);return(H=(F=h.getMapOfCacheRedirects(R))==null?void 0:F.get(U))==null?void 0:H.get(T,E)}}function B7(t,r){return r===void 0?t:`${r}|${t}`}function M3(){const t=new Map,r=new Map,a={get(h,p){return t.get(u(h,p))},set(h,p,g){return t.set(u(h,p),g),a},delete(h,p){return t.delete(u(h,p)),a},has(h,p){return t.has(u(h,p))},forEach(h){return t.forEach((p,g)=>{const[C,b]=r.get(g);return h(p,C,b)})},size(){return t.size}};return a;function u(h,p){const g=B7(h,p);return r.set(g,[h,p]),g}}function iMt(t){return t.resolvedModule&&(t.resolvedModule.originalPath||t.resolvedModule.resolvedFileName)}function nMt(t){return t.resolvedTypeReferenceDirective&&(t.resolvedTypeReferenceDirective.originalPath||t.resolvedTypeReferenceDirective.resolvedFileName)}function rMt(t,r,a,u,h){const p=hYe(a,h);return{getFromNonRelativeNameCache:b,getOrCreateCacheForNonRelativeName:T,clear:g,update:C};function g(){p.clear()}function C(N){p.update(N)}function b(N,R,F,H){var U,q;return j.assert(!Gd(N)),(q=(U=p.getMapOfCacheRedirects(H))==null?void 0:U.get(B7(N,R)))==null?void 0:q.get(F)}function T(N,R,F){return j.assert(!Gd(N)),_Ye(p,F,B7(N,R),E)}function E(){const N=new Map;return{get:R,set:F};function R(U){return N.get(ol(U,t,r))}function F(U,q){const X=ol(U,t,r);if(N.has(X))return;N.set(X,q);const Z=u(q),Q=Z&&H(X,Z);let re=X;for(;re!==Q;){const oe=ts(re);if(oe===re||N.has(oe))break;N.set(oe,q),re=oe}}function H(U,q){const X=ol(ts(q),t,r);let Z=0;const Q=Math.min(U.length,X.length);for(;Z<Q&&U.charCodeAt(Z)===X.charCodeAt(Z);)Z++;if(Z===U.length&&(X.length===Z||X[Z]===Kl))return U;const re=Ly(U);if(Z<re)return;const oe=U.lastIndexOf(Kl,Z-1);if(oe!==-1)return U.substr(0,Math.max(oe,re))}}}function pYe(t,r,a,u,h,p){p??(p=new Map);const g=tMt(t,r,a,p),C=rMt(t,r,a,h,p);return u??(u=eMt(t,r)),{...u,...g,...C,clear:b,update:E,getPackageJsonInfoCache:()=>u,clearAllExceptPackageJsonInfoCache:T,optionsToRedirectsKey:p};function b(){T(),u.clear()}function T(){g.clear(),C.clear()}function E(N){g.update(N),C.update(N)}}function R3(t,r,a,u,h){const p=pYe(t,r,a,u,iMt,h);return p.getOrCreateCacheForModuleName=(g,C,b)=>p.getOrCreateCacheForNonRelativeName(g,C,b),p}function sQ(t,r,a,u,h){return pYe(t,r,a,u,nMt,h)}function _ue(t){return{moduleResolution:2,traceResolution:t.traceResolution}}function oQ(t,r,a,u,h){return nA(t,r,_ue(a),u,h)}function mYe(t,r,a,u){const h=ts(r);return a.getFromDirectoryCache(t,u,h,void 0)}function nA(t,r,a,u,h,p,g){const C=mx(a,u);p&&(a=p.commandLine.options),C&&(bo(u,k.Resolving_module_0_from_1,t,r),p&&bo(u,k.Using_compiler_options_of_project_reference_redirect_0,p.sourceFile.fileName));const b=ts(r);let T=h==null?void 0:h.getFromDirectoryCache(t,g,b,p);if(T)C&&bo(u,k.Resolution_for_module_0_was_found_in_cache_from_location_1,t,b);else{let E=a.moduleResolution;switch(E===void 0?(E=yh(a),C&&bo(u,k.Module_resolution_kind_is_not_specified_using_0,i8[E])):C&&bo(u,k.Explicitly_specified_module_resolution_kind_Colon_0,i8[E]),E){case 3:T=cMt(t,r,a,u,h,p,g);break;case 99:T=lMt(t,r,a,u,h,p,g);break;case 2:T=cNe(t,r,a,u,h,p,g?gx(a,g):void 0);break;case 1:T=_Ne(t,r,a,u,h,p);break;case 100:T=aNe(t,r,a,u,h,p,g?gx(a,g):void 0);break;default:return j.fail(`Unexpected moduleResolution: ${E}`)}h&&!h.isReadonly&&(h.getOrCreateCacheForDirectory(b,p).set(t,g,T),Gd(t)||h.getOrCreateCacheForNonRelativeName(t,g,p).set(b,T))}return C&&(T.resolvedModule?T.resolvedModule.packageId?bo(u,k.Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2,t,T.resolvedModule.resolvedFileName,zk(T.resolvedModule.packageId)):bo(u,k.Module_name_0_was_successfully_resolved_to_1,t,T.resolvedModule.resolvedFileName):bo(u,k.Module_name_0_was_not_resolved,t)),T}function gYe(t,r,a,u,h){const p=sMt(t,r,u,h);return p?p.value:Gd(r)?oMt(t,r,a,u,h):aMt(t,r,u,h)}function sMt(t,r,a,u){var h;const{baseUrl:p,paths:g,configFile:C}=u.compilerOptions;if(g&&!am(r)){u.traceEnabled&&(p&&bo(u.host,k.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1,p,r),bo(u.host,k.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0,r));const b=pK(u.compilerOptions,u.host),T=C!=null&&C.configFileSpecs?(h=C.configFileSpecs).pathPatterns||(h.pathPatterns=XK(g)):void 0;return fNe(t,r,b,g,T,a,!1,u)}}function oMt(t,r,a,u,h){if(!h.compilerOptions.rootDirs)return;h.traceEnabled&&bo(h.host,k.rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0,r);const p=ca(zr(a,r));let g,C;for(const b of h.compilerOptions.rootDirs){let T=ca(b);su(T,Kl)||(T+=Kl);const E=so(p,T)&&(C===void 0||C.length<T.length);h.traceEnabled&&bo(h.host,k.Checking_if_0_is_the_longest_matching_prefix_for_1_2,T,p,E),E&&(C=T,g=b)}if(C){h.traceEnabled&&bo(h.host,k.Longest_matching_prefix_for_0_is_1,p,C);const b=p.substr(C.length);h.traceEnabled&&bo(h.host,k.Loading_0_from_the_root_dir_1_candidate_location_2,b,C,p);const T=u(t,p,!B0(a,h.host),h);if(T)return T;h.traceEnabled&&bo(h.host,k.Trying_other_entries_in_rootDirs);for(const E of h.compilerOptions.rootDirs){if(E===g)continue;const N=zr(ca(E),b);h.traceEnabled&&bo(h.host,k.Loading_0_from_the_root_dir_1_candidate_location_2,b,E,N);const R=ts(N),F=u(t,N,!B0(R,h.host),h);if(F)return F}h.traceEnabled&&bo(h.host,k.Module_resolution_using_rootDirs_has_failed)}}function aMt(t,r,a,u){const{baseUrl:h}=u.compilerOptions;if(!h)return;u.traceEnabled&&bo(u.host,k.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1,h,r);const p=ca(zr(h,r));return u.traceEnabled&&bo(u.host,k.Resolving_module_name_0_relative_to_base_url_1_2,r,h,p),a(t,p,!B0(ts(p),u.host),u)}function sNe(t,r,a){const{resolvedModule:u,failedLookupLocations:h}=uMt(t,r,a);if(!u)throw new Error(`Could not resolve JS module '${t}' starting at '${r}'. Looked in: ${h==null?void 0:h.join(", ")}`);return u.resolvedFileName}var oNe=(t=>(t[t.None=0]="None",t[t.Imports=2]="Imports",t[t.SelfName=4]="SelfName",t[t.Exports=8]="Exports",t[t.ExportsPatternTrailers=16]="ExportsPatternTrailers",t[t.AllFeatures=30]="AllFeatures",t[t.Node16Default=30]="Node16Default",t[t.NodeNextDefault=30]="NodeNextDefault",t[t.BundlerDefault=30]="BundlerDefault",t[t.EsmMode=32]="EsmMode",t))(oNe||{});function cMt(t,r,a,u,h,p,g){return yYe(30,t,r,a,u,h,p,g)}function lMt(t,r,a,u,h,p,g){return yYe(30,t,r,a,u,h,p,g)}function yYe(t,r,a,u,h,p,g,C,b){const T=ts(a),E=C===99?32:0;let N=u.noDtsResolution?3:7;return XT(u)&&(N|=8),OH(t|E,r,T,u,h,p,N,!1,g,b)}function uMt(t,r,a){return OH(0,t,r,{moduleResolution:2,allowJs:!0},a,void 0,2,!1,void 0,void 0)}function aNe(t,r,a,u,h,p,g){const C=ts(r);let b=a.noDtsResolution?3:7;return XT(a)&&(b|=8),OH(iNe(a),t,C,a,u,h,b,!1,p,g)}function cNe(t,r,a,u,h,p,g,C){let b;return C?b=8:a.noDtsResolution?(b=3,XT(a)&&(b|=8)):b=XT(a)?15:7,OH(g?30:0,t,ts(r),a,u,h,b,!!C,p,g)}function lNe(t,r,a){return OH(30,t,ts(r),{moduleResolution:99},a,void 0,8,!0,void 0,void 0)}function OH(t,r,a,u,h,p,g,C,b,T){var E,N,R,F,H;const U=mx(u,h),q=[],X=[],Z=yh(u);T??(T=gx(u,Z===100||Z===2?void 0:t&32?99:1));const Q=[],re={compilerOptions:u,host:h,traceEnabled:U,failedLookupLocations:q,affectingLocations:X,packageJsonInfoCache:p,features:t,conditions:T??w,requestContainingDirectory:a,reportDiagnostic:ue=>void Q.push(ue),isConfigLookup:C,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1};U&&f3(Z)&&bo(h,k.Resolving_in_0_mode_with_conditions_1,t&32?"ESM":"CJS",re.conditions.map(ue=>`'${ue}'`).join(", "));let oe;if(Z===2){const ue=g&5,Ie=g&-6;oe=ue&&de(ue,re)||Ie&&de(Ie,re)||void 0}else oe=de(g,re);let pe;if(re.resolvedPackageDirectory&&!C&&!Gd(r)){const ue=(oe==null?void 0:oe.value)&&g&5&&!kYe(5,oe.value.resolved.extension);if((E=oe==null?void 0:oe.value)!=null&&E.isExternalLibraryImport&&ue&&t&8&&(T!=null&&T.includes("import"))){vx(re,k.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);const Ie={...re,features:re.features&-9,reportDiagnostic:Tc},we=de(g&5,Ie);(N=we==null?void 0:we.value)!=null&&N.isExternalLibraryImport&&(pe=we.value.resolved.path)}else if((!(oe!=null&&oe.value)||ue)&&Z===2){vx(re,k.Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update);const Ie={...re.compilerOptions,moduleResolution:100},we={...re,compilerOptions:Ie,features:30,conditions:gx(Ie),reportDiagnostic:Tc},he=de(g&5,we);(R=he==null?void 0:he.value)!=null&&R.isExternalLibraryImport&&(pe=he.value.resolved.path)}}return lYe(r,(F=oe==null?void 0:oe.value)==null?void 0:F.resolved,(H=oe==null?void 0:oe.value)==null?void 0:H.isExternalLibraryImport,q,X,Q,re,p,pe);function de(ue,Ie){const he=gYe(ue,r,a,(Ae,ke,Te,De)=>pue(Ae,ke,Te,De,!0),Ie);if(he)return fm({resolved:he,isExternalLibraryImport:yx(he.path)});if(Gd(r)){const{path:Ae,parts:ke}=vYe(a,r),Te=pue(ue,Ae,!1,Ie,!0);return Te&&fm({resolved:Te,isExternalLibraryImport:Yt(ke,"node_modules")})}else{let Ae;if(t&2&&so(r,"#")&&(Ae=mMt(ue,r,a,Ie,p,b)),!Ae&&t&4&&(Ae=pMt(ue,r,a,Ie,p,b)),!Ae){if(r.includes(":")){U&&bo(h,k.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1,r,tQ(ue));return}U&&bo(h,k.Loading_module_0_from_node_modules_folder_target_file_types_Colon_1,r,tQ(ue)),Ae=EYe(ue,r,a,Ie,p,b)}return ue&4&&(Ae??(Ae=OYe(r,Ie))),Ae&&{value:Ae.value&&{resolved:Ae.value,isExternalLibraryImport:!0}}}}}function vYe(t,r){const a=zr(t,r),u=af(a),h=rl(u);return{path:h==="."||h===".."?Ad(ca(a)):ca(a),parts:u}}function bYe(t,r,a){if(!r.realpath)return t;const u=ca(r.realpath(t));return a&&bo(r,k.Resolving_real_path_for_0_result_1,t,u),u}function pue(t,r,a,u,h){if(u.traceEnabled&&bo(u.host,k.Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1,r,tQ(t)),!Uw(r)){if(!a){const g=ts(r);B0(g,u.host)||(u.traceEnabled&&bo(u.host,k.Directory_0_does_not_exist_skipping_all_lookups_in_it,g),a=!0)}const p=F3(t,r,a,u);if(p){const g=h?MH(p.path):void 0,C=g?WI(g,!1,u):void 0;return iA(C,p,u)}}if(a||B0(r,u.host)||(u.traceEnabled&&bo(u.host,k.Directory_0_does_not_exist_skipping_all_lookups_in_it,r),a=!0),!(u.features&32))return dNe(t,r,a,u,h)}var Xv="/node_modules/";function yx(t){return t.includes(Xv)}function MH(t,r){const a=ca(t),u=a.lastIndexOf(Xv);if(u===-1)return;const h=u+Xv.length;let p=CYe(a,h,r);return a.charCodeAt(h)===64&&(p=CYe(a,p,r)),a.slice(0,p)}function CYe(t,r,a){const u=t.indexOf(Kl,r+1);return u===-1?a?t.length:r:u}function uNe(t,r,a,u){return uue(F3(t,r,a,u))}function F3(t,r,a,u){const h=SYe(t,r,a,u);if(h)return h;if(!(u.features&32)){const p=wYe(r,t,"",a,u);if(p)return p}}function SYe(t,r,a,u){if(!ud(r).includes("."))return;let p=s_(r);p===r&&(p=r.substring(0,r.lastIndexOf(".")));const g=r.substring(p.length);return u.traceEnabled&&bo(u.host,k.File_name_0_has_a_1_extension_stripping_it,r,g),wYe(p,t,g,a,u)}function mue(t,r,a,u){return t&1&&Ru(r,XV)||t&4&&Ru(r,GK)?gue(r,a,u)!==void 0?{path:r,ext:xK(r),resolvedUsingTsExtension:void 0}:void 0:u.isConfigLookup&&t===8&&Xl(r,".json")?gue(r,a,u)!==void 0?{path:r,ext:".json",resolvedUsingTsExtension:void 0}:void 0:SYe(t,r,a,u)}function wYe(t,r,a,u,h){if(!u){const g=ts(t);g&&(u=!B0(g,h.host))}switch(a){case".mjs":case".mts":case".d.mts":return r&1&&p(".mts",a===".mts"||a===".d.mts")||r&4&&p(".d.mts",a===".mts"||a===".d.mts")||r&2&&p(".mjs")||void 0;case".cjs":case".cts":case".d.cts":return r&1&&p(".cts",a===".cts"||a===".d.cts")||r&4&&p(".d.cts",a===".cts"||a===".d.cts")||r&2&&p(".cjs")||void 0;case".json":return r&4&&p(".d.json.ts")||r&8&&p(".json")||void 0;case".tsx":case".jsx":return r&1&&(p(".tsx",a===".tsx")||p(".ts",a===".tsx"))||r&4&&p(".d.ts",a===".tsx")||r&2&&(p(".jsx")||p(".js"))||void 0;case".ts":case".d.ts":case".js":case"":return r&1&&(p(".ts",a===".ts"||a===".d.ts")||p(".tsx",a===".ts"||a===".d.ts"))||r&4&&p(".d.ts",a===".ts"||a===".d.ts")||r&2&&(p(".js")||p(".jsx"))||h.isConfigLookup&&p(".json")||void 0;default:return r&4&&!df(t+a)&&p(`.d${a}.ts`)||void 0}function p(g,C){const b=gue(t+g,u,h);return b===void 0?void 0:{path:b,ext:g,resolvedUsingTsExtension:!h.candidateIsFromPackageJsonField&&C}}}function gue(t,r,a){var u;if(!((u=a.compilerOptions.moduleSuffixes)!=null&&u.length))return xYe(t,r,a);const h=qv(t)??"",p=h?YV(t,h):t;return O(a.compilerOptions.moduleSuffixes,g=>xYe(p+g+h,r,a))}function xYe(t,r,a){var u;if(!r){if(a.host.fileExists(t))return a.traceEnabled&&bo(a.host,k.File_0_exists_use_it_as_a_name_resolution_result,t),t;a.traceEnabled&&bo(a.host,k.File_0_does_not_exist,t)}(u=a.failedLookupLocations)==null||u.push(t)}function dNe(t,r,a,u,h=!0){const p=h?WI(r,a,u):void 0,g=p&&p.contents.packageJsonContent,C=p&&aQ(p,u);return iA(p,vue(t,r,a,u,g,C),u)}function yue(t,r,a,u,h){if(!h&&t.contents.resolvedEntrypoints!==void 0)return t.contents.resolvedEntrypoints;let p;const g=5|(h?2:0),C=iNe(r),b=W7(u==null?void 0:u.getPackageJsonInfoCache(),a,r);b.conditions=gx(r),b.requestContainingDirectory=t.packageDirectory;const T=vue(g,t.packageDirectory,!1,b,t.contents.packageJsonContent,aQ(t,b));if(p=fn(p,T==null?void 0:T.path),C&8&&t.contents.packageJsonContent.exports){const E=Wb([gx(r,99),gx(r,1)],i_);for(const N of E){const R={...b,failedLookupLocations:[],conditions:N,host:a},F=dMt(t,t.contents.packageJsonContent.exports,R,g);if(F)for(const H of F)p=n_(p,H.path)}}return t.contents.resolvedEntrypoints=p||!1}function dMt(t,r,a,u){let h;if(Ao(r))for(const g of r)p(g);else if(typeof r=="object"&&r!==null&&lQ(r))for(const g in r)p(r[g]);else p(r);return h;function p(g){var C,b;if(typeof g=="string"&&so(g,"./"))if(g.includes("*")&&a.host.readDirectory){if(g.indexOf("*")!==g.lastIndexOf("*"))return!1;a.host.readDirectory(t.packageDirectory,qOt(u),void 0,[YJ(xI(g,"**/*"),".*")]).forEach(T=>{h=n_(h,{path:T,ext:L6(T),resolvedUsingTsExtension:void 0})})}else{const T=af(g).slice(2);if(T.includes("..")||T.includes(".")||T.includes("node_modules"))return!1;const E=zr(t.packageDirectory,g),N=wo(E,(b=(C=a.host).getCurrentDirectory)==null?void 0:b.call(C)),R=mue(u,N,!1,a);if(R)return h=n_(h,R,(F,H)=>F.path===H.path),!0}else if(Array.isArray(g)){for(const T of g)if(p(T))return!0}else if(typeof g=="object"&&g!==null)return O(wr(g),T=>{if(T==="default"||Yt(a.conditions,T)||RH(a.conditions,T))return p(g[T]),!0})}}function W7(t,r,a){return{host:r,compilerOptions:a,traceEnabled:mx(a,r),failedLookupLocations:void 0,affectingLocations:void 0,packageJsonInfoCache:t,features:0,conditions:w,requestContainingDirectory:void 0,reportDiagnostic:Tc,isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1}}function V7(t,r){return kg(t,a=>WI(a,!1,r))}function aQ(t,r){return t.contents.versionPaths===void 0&&(t.contents.versionPaths=XOt(t.contents.packageJsonContent,r)||!1),t.contents.versionPaths||void 0}function fMt(t,r){return t.contents.peerDependencies===void 0&&(t.contents.peerDependencies=hMt(t,r)||!1),t.contents.peerDependencies||void 0}function hMt(t,r){const a=YIe(t.contents.packageJsonContent,"peerDependencies","object",r);if(a===void 0)return;r.traceEnabled&&bo(r.host,k.package_json_has_a_peerDependencies_field);const u=bYe(t.packageDirectory,r.host,r.traceEnabled),h=u.substring(0,u.lastIndexOf("node_modules")+12)+Kl;let p="";for(const g in a)if(Li(a,g)){const C=WI(h+g,!1,r);if(C){const b=C.contents.packageJsonContent.version;p+=`+${g}@${b}`,r.traceEnabled&&bo(r.host,k.Found_peerDependency_0_with_1_version,g,b)}else r.traceEnabled&&bo(r.host,k.Failed_to_find_peerDependency_0,g)}return p}function WI(t,r,a){var u,h,p,g,C,b;const{host:T,traceEnabled:E}=a,N=zr(t,"package.json");if(r){(u=a.failedLookupLocations)==null||u.push(N);return}const R=(h=a.packageJsonInfoCache)==null?void 0:h.getPackageJsonInfo(N);if(R!==void 0){if(rQ(R))return E&&bo(T,k.File_0_exists_according_to_earlier_cached_lookups,N),(p=a.affectingLocations)==null||p.push(N),R.packageDirectory===t?R:{packageDirectory:t,contents:R.contents};R.directoryExists&&E&&bo(T,k.File_0_does_not_exist_according_to_earlier_cached_lookups,N),(g=a.failedLookupLocations)==null||g.push(N);return}const F=B0(t,T);if(F&&T.fileExists(N)){const H=J8(N,T);E&&bo(T,k.Found_package_json_at_0,N);const U={packageDirectory:t,contents:{packageJsonContent:H,versionPaths:void 0,resolvedEntrypoints:void 0,peerDependencies:void 0}};return a.packageJsonInfoCache&&!a.packageJsonInfoCache.isReadonly&&a.packageJsonInfoCache.setPackageJsonInfo(N,U),(C=a.affectingLocations)==null||C.push(N),U}else F&&E&&bo(T,k.File_0_does_not_exist,N),a.packageJsonInfoCache&&!a.packageJsonInfoCache.isReadonly&&a.packageJsonInfoCache.setPackageJsonInfo(N,{packageDirectory:t,directoryExists:F}),(b=a.failedLookupLocations)==null||b.push(N)}function vue(t,r,a,u,h,p){let g;h&&(u.isConfigLookup?g=JOt(h,r,u):g=t&4&&$Ot(h,r,u)||t&7&&GOt(h,r,u)||void 0);const C=(R,F,H,U)=>{const q=mue(R,F,H,U);if(q)return uue(q);const X=R===4?5:R,Z=U.features,Q=U.candidateIsFromPackageJsonField;U.candidateIsFromPackageJsonField=!0,(h==null?void 0:h.type)!=="module"&&(U.features&=-33);const re=pue(X,F,H,U,!1);return U.features=Z,U.candidateIsFromPackageJsonField=Q,re},b=g?!B0(ts(g),u.host):void 0,T=a||!B0(r,u.host),E=zr(r,u.isConfigLookup?"tsconfig":"index");if(p&&(!g||Vm(r,g))){const R=c0(r,g||E,!1);u.traceEnabled&&bo(u.host,k.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2,p.version,v,R);const F=fNe(t,R,r,p.paths,void 0,C,b||T,u);if(F)return cYe(F.value)}const N=g&&cYe(C(t,g,b,u));if(N)return N;if(!(u.features&32))return F3(t,E,T,u)}function kYe(t,r){return t&2&&(r===".js"||r===".jsx"||r===".mjs"||r===".cjs")||t&1&&(r===".ts"||r===".tsx"||r===".mts"||r===".cts")||t&4&&(r===".d.ts"||r===".d.mts"||r===".d.cts")||t&8&&r===".json"||!1}function cQ(t){let r=t.indexOf(Kl);return t[0]==="@"&&(r=t.indexOf(Kl,r+1)),r===-1?{packageName:t,rest:""}:{packageName:t.slice(0,r),rest:t.slice(r+1)}}function lQ(t){return Ce(wr(t),r=>so(r,"."))}function _Mt(t){return!Ft(wr(t),r=>so(r,"."))}function pMt(t,r,a,u,h,p){var g,C;const b=wo(a,(C=(g=u.host).getCurrentDirectory)==null?void 0:C.call(g)),T=V7(b,u);if(!T||!T.contents.packageJsonContent.exports||typeof T.contents.packageJsonContent.name!="string")return;const E=af(r),N=af(T.contents.packageJsonContent.name);if(!Ce(N,(q,X)=>E[X]===q))return;const R=E.slice(N.length),F=P(R)?`.${Kl}${R.join(Kl)}`:".";if(ox(u.compilerOptions)&&!yx(a))return bue(T,t,F,u,h,p);const H=t&5,U=t&-6;return bue(T,H,F,u,h,p)||bue(T,U,F,u,h,p)}function bue(t,r,a,u,h,p){if(t.contents.packageJsonContent.exports){if(a==="."){let g;if(typeof t.contents.packageJsonContent.exports=="string"||Array.isArray(t.contents.packageJsonContent.exports)||typeof t.contents.packageJsonContent.exports=="object"&&_Mt(t.contents.packageJsonContent.exports)?g=t.contents.packageJsonContent.exports:Li(t.contents.packageJsonContent.exports,".")&&(g=t.contents.packageJsonContent.exports["."]),g)return DYe(r,u,h,p,a,t,!1)(g,"",!1,".")}else if(lQ(t.contents.packageJsonContent.exports)){if(typeof t.contents.packageJsonContent.exports!="object")return u.traceEnabled&&bo(u.host,k.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1,a,t.packageDirectory),fm(void 0);const g=TYe(r,u,h,p,a,t.contents.packageJsonContent.exports,t,!1);if(g)return g}return u.traceEnabled&&bo(u.host,k.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1,a,t.packageDirectory),fm(void 0)}}function mMt(t,r,a,u,h,p){var g,C;if(r==="#"||so(r,"#/"))return u.traceEnabled&&bo(u.host,k.Invalid_import_specifier_0_has_no_possible_resolutions,r),fm(void 0);const b=wo(a,(C=(g=u.host).getCurrentDirectory)==null?void 0:C.call(g)),T=V7(b,u);if(!T)return u.traceEnabled&&bo(u.host,k.Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve,b),fm(void 0);if(!T.contents.packageJsonContent.imports)return u.traceEnabled&&bo(u.host,k.package_json_scope_0_has_no_imports_defined,T.packageDirectory),fm(void 0);const E=TYe(t,u,h,p,r,T.contents.packageJsonContent.imports,T,!0);return E||(u.traceEnabled&&bo(u.host,k.Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1,r,T.packageDirectory),fm(void 0))}function Cue(t,r){const a=t.indexOf("*"),u=r.indexOf("*"),h=a===-1?t.length:a+1,p=u===-1?r.length:u+1;return h>p?-1:p>h||a===-1?1:u===-1||t.length>r.length?-1:r.length>t.length?1:0}function TYe(t,r,a,u,h,p,g,C){const b=DYe(t,r,a,u,h,g,C);if(!su(h,Kl)&&!h.includes("*")&&Li(p,h)){const N=p[h];return b(N,"",!1,h)}const T=Mu($t(wr(p),N=>gMt(N)||su(N,"/")),Cue);for(const N of T)if(r.features&16&&E(N,h)){const R=p[N],F=N.indexOf("*"),H=h.substring(N.substring(0,F).length,h.length-(N.length-1-F));return b(R,H,!0,N)}else if(su(N,"*")&&so(h,N.substring(0,N.length-1))){const R=p[N],F=h.substring(N.length-1);return b(R,F,!0,N)}else if(so(h,N)){const R=p[N],F=h.substring(N.length);return b(R,F,!1,N)}function E(N,R){if(su(N,"*"))return!1;const F=N.indexOf("*");return F===-1?!1:so(R,N.substring(0,F))&&su(R,N.substring(F+1))}}function gMt(t){const r=t.indexOf("*");return r!==-1&&r===t.lastIndexOf("*")}function DYe(t,r,a,u,h,p,g){return C;function C(b,T,E,N){if(typeof b=="string"){if(!E&&T.length>0&&!su(b,"/"))return r.traceEnabled&&bo(r.host,k.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,p.packageDirectory,h),fm(void 0);if(!so(b,"./")){if(g&&!so(b,"../")&&!so(b,"/")&&!yp(b)){const oe=E?b.replace(/\*/g,T):b+T;vx(r,k.Using_0_subpath_1_with_target_2,"imports",N,oe),vx(r,k.Resolving_module_0_from_1,oe,p.packageDirectory+"/");const pe=OH(r.features,oe,p.packageDirectory+"/",r.compilerOptions,r.host,a,t,!1,u,r.conditions);return fm(pe.resolvedModule?{path:pe.resolvedModule.resolvedFileName,extension:pe.resolvedModule.extension,packageId:pe.resolvedModule.packageId,originalPath:pe.resolvedModule.originalPath,resolvedUsingTsExtension:pe.resolvedModule.resolvedUsingTsExtension}:void 0)}return r.traceEnabled&&bo(r.host,k.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,p.packageDirectory,h),fm(void 0)}const q=(am(b)?af(b).slice(1):af(b)).slice(1);if(q.includes("..")||q.includes(".")||q.includes("node_modules"))return r.traceEnabled&&bo(r.host,k.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,p.packageDirectory,h),fm(void 0);const X=zr(p.packageDirectory,b),Z=af(T);if(Z.includes("..")||Z.includes(".")||Z.includes("node_modules"))return r.traceEnabled&&bo(r.host,k.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,p.packageDirectory,h),fm(void 0);r.traceEnabled&&bo(r.host,k.Using_0_subpath_1_with_target_2,g?"imports":"exports",N,E?b.replace(/\*/g,T):b+T);const Q=R(E?X.replace(/\*/g,T):X+T),re=H(Q,T,zr(p.packageDirectory,"package.json"),g);return re||fm(iA(p,mue(t,Q,!1,r),r))}else if(typeof b=="object"&&b!==null)if(Array.isArray(b)){if(!P(b))return r.traceEnabled&&bo(r.host,k.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,p.packageDirectory,h),fm(void 0);for(const U of b){const q=C(U,T,E,N);if(q)return q}}else{vx(r,k.Entering_conditional_exports);for(const U of wr(b))if(U==="default"||r.conditions.includes(U)||RH(r.conditions,U)){vx(r,k.Matched_0_condition_1,g?"imports":"exports",U);const q=b[U],X=C(q,T,E,N);if(X)return vx(r,k.Resolved_under_condition_0,U),vx(r,k.Exiting_conditional_exports),X;vx(r,k.Failed_to_resolve_under_condition_0,U)}else vx(r,k.Saw_non_matching_condition_0,U);vx(r,k.Exiting_conditional_exports);return}else if(b===null)return r.traceEnabled&&bo(r.host,k.package_json_scope_0_explicitly_maps_specifier_1_to_null,p.packageDirectory,h),fm(void 0);return r.traceEnabled&&bo(r.host,k.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,p.packageDirectory,h),fm(void 0);function R(U){var q,X;return U===void 0?U:wo(U,(X=(q=r.host).getCurrentDirectory)==null?void 0:X.call(q))}function F(U,q){return Ad(zr(U,q))}function H(U,q,X,Z){var Q,re,oe,pe;if(!r.isConfigLookup&&(r.compilerOptions.declarationDir||r.compilerOptions.outDir)&&!U.includes("/node_modules/")&&(!r.compilerOptions.configFile||Vm(p.packageDirectory,R(r.compilerOptions.configFile.fileName),!Sue(r)))){const ue=hS({useCaseSensitiveFileNames:()=>Sue(r)}),Ie=[];if(r.compilerOptions.rootDir||r.compilerOptions.composite&&r.compilerOptions.configFilePath){const we=R(X7(r.compilerOptions,()=>[],((re=(Q=r.host).getCurrentDirectory)==null?void 0:re.call(Q))||"",ue));Ie.push(we)}else if(r.requestContainingDirectory){const we=R(zr(r.requestContainingDirectory,"index.ts")),he=R(X7(r.compilerOptions,()=>[we,R(X)],((pe=(oe=r.host).getCurrentDirectory)==null?void 0:pe.call(oe))||"",ue));Ie.push(he);let Ae=Ad(he);for(;Ae&&Ae.length>1;){const ke=af(Ae);ke.pop();const Te=sS(ke);Ie.unshift(Te),Ae=Ad(Te)}}Ie.length>1&&r.reportDiagnostic(Zl(Z?k.The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:k.The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate,q===""?".":q,X));for(const we of Ie){const he=de(we);for(const Ae of he)if(Vm(Ae,U,!Sue(r))){const ke=U.slice(Ae.length+1),Te=zr(we,ke),De=[".mjs",".cjs",".js",".json",".d.mts",".d.cts",".d.ts"];for(const qe of De)if(Xl(Te,qe)){const se=KTe(Te);for(const Ne of se){if(!kYe(t,Ne))continue;const Oe=wW(Te,Ne,qe,!Sue(r));if(r.host.fileExists(Oe))return fm(iA(p,mue(t,Oe,!1,r),r))}}}}}return;function de(ue){var Ie,we;const he=r.compilerOptions.configFile?((we=(Ie=r.host).getCurrentDirectory)==null?void 0:we.call(Ie))||"":ue,Ae=[];return r.compilerOptions.declarationDir&&Ae.push(R(F(he,r.compilerOptions.declarationDir))),r.compilerOptions.outDir&&r.compilerOptions.outDir!==r.compilerOptions.declarationDir&&Ae.push(R(F(he,r.compilerOptions.outDir))),Ae}}}}function RH(t,r){if(!t.includes("types")||!so(r,"types@"))return!1;const a=qJ.tryParse(r.substring(6));return a?a.test(v):!1}function EYe(t,r,a,u,h,p){return IYe(t,r,a,u,!1,h,p)}function yMt(t,r,a){return IYe(4,t,r,a,!0,void 0,void 0)}function IYe(t,r,a,u,h,p,g){const C=u.features===0?void 0:u.features&32?99:1,b=t&5,T=t&-6;if(b){vx(u,k.Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0,tQ(b));const N=E(b);if(N)return N}if(T&&!h)return vx(u,k.Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0,tQ(T)),E(T);function E(N){return kg(Rf(a),R=>{if(ud(R)!=="node_modules"){const F=AYe(p,r,C,R,g,u);return F||fm(NYe(N,r,R,u,h,p,g))}})}}function NYe(t,r,a,u,h,p,g){const C=zr(a,"node_modules"),b=B0(C,u.host);if(!b&&u.traceEnabled&&bo(u.host,k.Directory_0_does_not_exist_skipping_all_lookups_in_it,C),!h){const T=LYe(t,r,C,b,u,p,g);if(T)return T}if(t&4){const T=zr(C,"@types");let E=b;return b&&!B0(T,u.host)&&(u.traceEnabled&&bo(u.host,k.Directory_0_does_not_exist_skipping_all_lookups_in_it,T),E=!1),LYe(4,PYe(r,u),T,E,u,p,g)}}function LYe(t,r,a,u,h,p,g){var C,b;const T=ca(zr(a,r)),{packageName:E,rest:N}=cQ(r),R=zr(a,E);let F,H=WI(T,!u,h);if(N!==""&&H&&(!(h.features&8)||!Li(((C=F=WI(R,!u,h))==null?void 0:C.contents.packageJsonContent)??w,"exports"))){const X=F3(t,T,!u,h);if(X)return uue(X);const Z=vue(t,T,!u,h,H.contents.packageJsonContent,aQ(H,h));return iA(H,Z,h)}const U=(X,Z,Q,re)=>{let oe=(N||!(re.features&32))&&F3(X,Z,Q,re)||vue(X,Z,Q,re,H&&H.contents.packageJsonContent,H&&aQ(H,re));return!oe&&H&&(H.contents.packageJsonContent.exports===void 0||H.contents.packageJsonContent.exports===null)&&re.features&32&&(oe=F3(X,zr(Z,"index.js"),Q,re)),iA(H,oe,re)};if(N!==""&&(H=F??WI(R,!u,h)),H&&(h.resolvedPackageDirectory=!0),H&&H.contents.packageJsonContent.exports&&h.features&8)return(b=bue(H,t,zr(".",N),h,p,g))==null?void 0:b.value;const q=N!==""&&H?aQ(H,h):void 0;if(q){h.traceEnabled&&bo(h.host,k.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2,q.version,v,N);const X=u&&B0(R,h.host),Z=fNe(t,N,R,q.paths,void 0,U,!X,h);if(Z)return Z.value}return U(t,T,!u,h)}function fNe(t,r,a,u,h,p,g,C){h||(h=XK(u));const b=Hce(h,r);if(b){const T=Oo(b)?void 0:yxe(b,r),E=Oo(b)?b:gxe(b);return C.traceEnabled&&bo(C.host,k.Module_name_0_matched_pattern_1,r,E),{value:O(u[E],R=>{const F=T?xI(R,T):R,H=ca(zr(a,F));C.traceEnabled&&bo(C.host,k.Trying_substitution_0_candidate_module_location_Colon_1,R,F);const U=qv(R);if(U!==void 0){const q=gue(H,g,C);if(q!==void 0)return uue({path:q,ext:U,resolvedUsingTsExtension:void 0})}return p(t,H,g||!B0(ts(H),C.host),C)})}}}var hNe="__";function PYe(t,r){const a=B3(t);return r.traceEnabled&&a!==t&&bo(r.host,k.Scoped_package_detected_looking_in_0,a),a}function uQ(t){return`@types/${B3(t)}`}function B3(t){if(so(t,"@")){const r=t.replace(Kl,hNe);if(r!==t)return r.slice(1)}return t}function H7(t){const r=KR(t,"@types/");return r!==t?FH(r):t}function FH(t){return t.includes(hNe)?"@"+t.replace(hNe,Kl):t}function AYe(t,r,a,u,h,p){const g=t&&t.getFromNonRelativeNameCache(r,a,u,h);if(g)return p.traceEnabled&&bo(p.host,k.Resolution_for_module_0_was_found_in_cache_from_location_1,r,u),p.resultFromCache=g,{value:g.resolvedModule&&{path:g.resolvedModule.resolvedFileName,originalPath:g.resolvedModule.originalPath||!0,extension:g.resolvedModule.extension,packageId:g.resolvedModule.packageId,resolvedUsingTsExtension:g.resolvedModule.resolvedUsingTsExtension}}}function _Ne(t,r,a,u,h,p){const g=mx(a,u),C=[],b=[],T=ts(r),E=[],N={compilerOptions:a,host:u,traceEnabled:g,failedLookupLocations:C,affectingLocations:b,packageJsonInfoCache:h,features:0,conditions:[],requestContainingDirectory:T,reportDiagnostic:H=>void E.push(H),isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1},R=F(5)||F(2|(a.resolveJsonModule?8:0));return lYe(t,R&&R.value,(R==null?void 0:R.value)&&yx(R.value.path),C,b,E,N,h);function F(H){const U=gYe(H,t,T,uNe,N);if(U)return{value:U};if(Gd(t)){const q=ca(zr(T,t));return fm(uNe(H,q,!1,N))}else{const q=kg(T,X=>{const Z=AYe(h,t,void 0,X,p,N);if(Z)return Z;const Q=ca(zr(X,t));return fm(uNe(H,Q,!1,N))});if(q)return q;if(H&5){let X=yMt(t,T,N);return H&4&&(X??(X=OYe(t,N))),X}}}}function OYe(t,r){if(r.compilerOptions.typeRoots)for(const a of r.compilerOptions.typeRoots){const u=fYe(a,t,r),h=B0(a,r.host);!h&&r.traceEnabled&&bo(r.host,k.Directory_0_does_not_exist_skipping_all_lookups_in_it,a);const p=F3(4,u,!h,r);if(p){const C=MH(p.path),b=C?WI(C,!1,r):void 0;return fm(iA(b,p,r))}const g=dNe(4,u,!h,r);if(g)return fm(g)}}function W3(t,r){return!!t.allowImportingTsExtensions||r&&df(r)}function pNe(t,r,a,u,h,p){const g=mx(a,u);g&&bo(u,k.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2,r,t,h);const C=[],b=[],T=[],E={compilerOptions:a,host:u,traceEnabled:g,failedLookupLocations:C,affectingLocations:b,packageJsonInfoCache:p,features:0,conditions:[],requestContainingDirectory:void 0,reportDiagnostic:R=>void T.push(R),isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1},N=NYe(4,t,h,E,!1,void 0,void 0);return uYe(N,!0,C,b,T,E.resultFromCache,void 0)}function fm(t){return t!==void 0?{value:t}:void 0}function vx(t,r,...a){t.traceEnabled&&bo(t.host,r,...a)}function Sue(t){return t.host.useCaseSensitiveFileNames?typeof t.host.useCaseSensitiveFileNames=="boolean"?t.host.useCaseSensitiveFileNames:t.host.useCaseSensitiveFileNames():!0}var mNe=(t=>(t[t.NonInstantiated=0]="NonInstantiated",t[t.Instantiated=1]="Instantiated",t[t.ConstEnumOnly=2]="ConstEnumOnly",t))(mNe||{});function nC(t,r){return t.body&&!t.body.parent&&(_c(t.body,t),Qb(t.body,!1)),t.body?gNe(t.body,r):1}function gNe(t,r=new Map){const a=Sc(t);if(r.has(a))return r.get(a)||0;r.set(a,void 0);const u=vMt(t,r);return r.set(a,u),u}function vMt(t,r){switch(t.kind){case 264:case 265:return 0;case 266:if(Uk(t))return 2;break;case 272:case 271:if(!Zr(t,32))return 0;break;case 278:const a=t;if(!a.moduleSpecifier&&a.exportClause&&a.exportClause.kind===279){let u=0;for(const h of a.exportClause.elements){const p=bMt(h,r);if(p>u&&(u=p),u===1)return u}return u}break;case 268:{let u=0;return Uo(t,h=>{const p=gNe(h,r);switch(p){case 0:return;case 2:u=2;return;case 1:return u=1,!0;default:j.assertNever(p)}}),u}case 267:return nC(t,r);case 80:if(t.flags&4096)return 0}return 1}function bMt(t,r){const a=t.propertyName||t.name;if(a.kind!==80)return 1;let u=t.parent;for(;u;){if(Xo(u)||H1(u)||Os(u)){const h=u.statements;let p;for(const g of h)if(OW(g,a)){g.parent||(_c(g,u),Qb(g,!1));const C=gNe(g,r);if((p===void 0||C>p)&&(p=C),p===1)return p;g.kind===271&&(p=1)}if(p!==void 0)return p}u=u.parent}return 1}var yNe=(t=>(t[t.None=0]="None",t[t.IsContainer=1]="IsContainer",t[t.IsBlockScopedContainer=2]="IsBlockScopedContainer",t[t.IsControlFlowContainer=4]="IsControlFlowContainer",t[t.IsFunctionLike=8]="IsFunctionLike",t[t.IsFunctionExpression=16]="IsFunctionExpression",t[t.HasLocals=32]="HasLocals",t[t.IsInterface=64]="IsInterface",t[t.IsObjectLiteralOrClassExpressionMethodOrAccessor=128]="IsObjectLiteralOrClassExpressionMethodOrAccessor",t))(yNe||{});function zy(t,r,a){return j.attachFlowNodeDebugInfo({flags:t,id:0,node:r,antecedent:a})}var CMt=SMt();function vNe(t,r){ou("beforeBind"),CMt(t,r),ou("afterBind"),Wm("Bind","beforeBind","afterBind")}function SMt(){var t,r,a,u,h,p,g,C,b,T,E,N,R,F,H,U,q,X,Z,Q,re,oe,pe,de,ue=!1,Ie=0,we,he,Ae=zy(1,void 0,void 0),ke=zy(1,void 0,void 0),Te=Gt();return qe;function De(ee,Xe,...Zt){return jm(_n(ee)||t,ee,Xe,...Zt)}function qe(ee,Xe){var Zt,Nn;t=ee,r=Xe,a=Ja(r),de=se(t,Xe),he=new Set,Ie=0,we=Hf.getSymbolConstructor(),j.attachFlowNodeDebugInfo(Ae),j.attachFlowNodeDebugInfo(ke),t.locals||((Zt=Zn)==null||Zt.push(Zn.Phase.Bind,"bindSourceFile",{path:t.path},!0),Xi(t),(Nn=Zn)==null||Nn.pop(),t.symbolCount=Ie,t.classifiableNames=he,wf(),Jo()),t=void 0,r=void 0,a=void 0,u=void 0,h=void 0,p=void 0,g=void 0,C=void 0,b=void 0,E=void 0,T=!1,N=void 0,R=void 0,F=void 0,H=void 0,U=void 0,q=void 0,X=void 0,Q=void 0,re=!1,oe=!1,ue=!1,pe=0}function se(ee,Xe){return ah(Xe,"alwaysStrict")&&!ee.isDeclarationFile?!0:!!ee.externalModuleIndicator}function Ne(ee,Xe){return Ie++,new we(ee,Xe)}function Oe(ee,Xe,Zt){ee.flags|=Zt,Xe.symbol=ee,ee.declarations=n_(ee.declarations,Xe),Zt&1955&&!ee.exports&&(ee.exports=_a()),Zt&6240&&!ee.members&&(ee.members=_a()),ee.constEnumOnlyModule&&ee.flags&304&&(ee.constEnumOnlyModule=!1),Zt&111551&&bV(ee,Xe)}function He(ee){if(ee.kind===277)return ee.isExportEquals?"export=":"default";const Xe=No(ee);if(Xe){if(Vh(ee)){const Zt=Lg(Xe);return Ry(ee)?"__global":`"${Zt}"`}if(Xe.kind===167){const Zt=Xe.expression;if(cm(Zt))return cu(Zt.text);if(cK(Zt))return xa(Zt.operator)+Zt.operand.text;j.fail("Only computed properties with literal names have declaration names")}if(Vs(Xe)){const Zt=Cf(ee);if(!Zt)return;const Nn=Zt.symbol;return NV(Nn,Xe.escapedText)}return j0(Xe)?LP(Xe):P1(Xe)?V8(Xe):void 0}switch(ee.kind){case 176:return"__constructor";case 184:case 179:case 323:return"__call";case 185:case 180:return"__new";case 181:return"__index";case 278:return"__export";case 307:return"export=";case 226:if(Bu(ee)===2)return"export=";j.fail("Unknown binary declaration kind");break;case 317:return e3(ee)?"__new":"__call";case 169:return j.assert(ee.parent.kind===317,"Impossible parameter parent kind",()=>`parent is: ${j.formatSyntaxKind(ee.parent.kind)}, expected JSDocFunctionType`),"arg"+ee.parent.parameters.indexOf(ee)}}function Pe(ee){return Bf(ee)?al(ee.name):Ws(j.checkDefined(He(ee)))}function We(ee,Xe,Zt,Nn,Is,Qo,To){j.assert(To||!Jb(Zt));const Zo=Zr(Zt,2048)||vh(Zt)&&My(Zt.name),uc=To?"__computed":Zo&&Xe?"default":He(Zt);let Xa;if(uc===void 0)Xa=Ne(0,"__missing");else if(Xa=ee.get(uc),Nn&2885600&&he.add(uc),!Xa)ee.set(uc,Xa=Ne(0,uc)),Qo&&(Xa.isReplaceableByMethod=!0);else{if(Qo&&!Xa.isReplaceableByMethod)return Xa;if(Xa.flags&Is){if(Xa.isReplaceableByMethod)ee.set(uc,Xa=Ne(0,uc));else if(!(Nn&3&&Xa.flags&67108864)){Bf(Zt)&&_c(Zt.name,Zt);let Yl=Xa.flags&2?k.Cannot_redeclare_block_scoped_variable_0:k.Duplicate_identifier_0,ig=!0;(Xa.flags&384||Nn&384)&&(Yl=k.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations,ig=!1);let h0=!1;P(Xa.declarations)&&(Zo||Xa.declarations&&Xa.declarations.length&&Zt.kind===277&&!Zt.isExportEquals)&&(Yl=k.A_module_cannot_have_multiple_default_exports,ig=!1,h0=!0);const K0=[];Mg(Zt)&&lu(Zt.type)&&Zr(Zt,32)&&Xa.flags&2887656&&K0.push(De(Zt,k.Did_you_mean_0,`export type { ${Ws(Zt.name.escapedText)} }`));const eb=No(Zt)||Zt;O(Xa.declarations,(tb,ng)=>{const rg=No(tb)||tb,Vl=ig?De(rg,Yl,Pe(tb)):De(rg,Yl);t.bindDiagnostics.push(h0?da(Vl,De(eb,ng===0?k.Another_export_default_is_here:k.and_here)):Vl),h0&&K0.push(De(rg,k.The_first_export_default_is_here))});const PS=ig?De(eb,Yl,Pe(Zt)):De(eb,Yl);t.bindDiagnostics.push(da(PS,...K0)),Xa=Ne(0,uc)}}}return Oe(Xa,Zt,Nn),Xa.parent?j.assert(Xa.parent===Xe,"Existing symbol parent should match new one"):Xa.parent=Xe,Xa}function ze(ee,Xe,Zt){const Nn=!!(Rk(ee)&32)||Nt(ee);if(Xe&2097152)return ee.kind===281||ee.kind===271&&Nn?We(h.symbol.exports,h.symbol,ee,Xe,Zt):(j.assertNode(h,Ay),We(h.locals,void 0,ee,Xe,Zt));if(Ng(ee)&&j.assert(nr(ee)),!Vh(ee)&&(Nn||h.flags&128)){if(!Ay(h)||!h.locals||Zr(ee,2048)&&!He(ee))return We(h.symbol.exports,h.symbol,ee,Xe,Zt);const Is=Xe&111551?1048576:0,Qo=We(h.locals,void 0,ee,Is,Zt);return Qo.exportSymbol=We(h.symbol.exports,h.symbol,ee,Xe,Zt),ee.localSymbol=Qo,Qo}else return j.assertNode(h,Ay),We(h.locals,void 0,ee,Xe,Zt)}function Nt(ee){if(ee.parent&&rd(ee)&&(ee=ee.parent),!Ng(ee))return!1;if(!mH(ee)&&ee.fullName)return!0;const Xe=No(ee);return Xe?!!(HV(Xe.parent)&&ym(Xe.parent)||Wf(Xe.parent)&&Rk(Xe.parent)&32):!1}function $e(ee,Xe){const Zt=h,Nn=p,Is=g;if(Xe&1?(ee.kind!==219&&(p=h),h=g=ee,Xe&32&&(h.locals=_a(),Di(h))):Xe&2&&(g=ee,Xe&32&&(g.locals=void 0)),Xe&4){const Qo=N,To=R,Zo=F,uc=H,Xa=X,Yl=Q,ig=re,h0=Xe&16&&!Zr(ee,1024)&&!ee.asteriskToken&&!!VT(ee)||ee.kind===175;h0||(N=zy(2,void 0,void 0),Xe&144&&(N.node=ee)),H=h0||ee.kind===176||nr(ee)&&(ee.kind===262||ee.kind===218)?_i():void 0,X=void 0,R=void 0,F=void 0,Q=void 0,re=!1,wt(ee),ee.flags&=-5633,!(N.flags&1)&&Xe&8&&Dg(ee.body)&&(ee.flags|=512,re&&(ee.flags|=1024),ee.endFlowNode=N),ee.kind===307&&(ee.flags|=pe,ee.endFlowNode=N),H&&(qr(H,N),N=Mn(H),(ee.kind===176||ee.kind===175||nr(ee)&&(ee.kind===262||ee.kind===218))&&(ee.returnFlowNode=N)),h0||(N=Qo),R=To,F=Zo,H=uc,X=Xa,Q=Yl,re=ig}else Xe&64?(T=!1,wt(ee),j.assertNotNode(ee,ot),ee.flags=T?ee.flags|256:ee.flags&-257):wt(ee);h=Zt,p=Nn,g=Is}function et(ee){Me(ee,Xe=>Xe.kind===262?Xi(Xe):void 0),Me(ee,Xe=>Xe.kind!==262?Xi(Xe):void 0)}function Me(ee,Xe=Xi){ee!==void 0&&O(ee,Xe)}function ut(ee){Uo(ee,Xi,Me)}function wt(ee){const Xe=ue;if(ue=!1,ps(ee)){ut(ee),Mr(ee),ue=Xe;return}switch(ee.kind>=243&&ee.kind<=259&&(!r.allowUnreachableCode||ee.kind===253)&&(ee.flowNode=N),ee.kind){case 247:ma(ee);break;case 246:ka(ee);break;case 248:Ji(ee);break;case 249:case 250:ac(ee);break;case 245:St(ee);break;case 253:case 257:ri(ee);break;case 252:case 251:Se(ee);break;case 258:Ze(ee);break;case 255:gt(ee);break;case 269:Dt(ee);break;case 296:Je(ee);break;case 244:Rt(ee);break;case 256:ii(ee);break;case 224:gr(ee);break;case 225:te(ee);break;case 226:if(pS(ee)){ue=Xe,tt(ee);return}Te(ee);break;case 220:le(ee);break;case 227:Ue(ee);break;case 260:Qt(ee);break;case 211:case 212:Ai(ee);break;case 213:Xn(ee);break;case 235:Ri(ee);break;case 346:case 338:case 340:vn(ee);break;case 351:Un(ee);break;case 307:{et(ee.statements),Xi(ee.endOfFileToken);break}case 241:case 268:et(ee.statements);break;case 208:lt(ee);break;case 169:st(ee);break;case 210:case 209:case 303:case 230:ue=Xe;default:ut(ee);break}Mr(ee),ue=Xe}function Et(ee){switch(ee.kind){case 80:case 110:return!0;case 211:case 212:return zt(ee);case 213:return Ei(ee);case 217:if(FI(ee))return!1;case 235:return Et(ee.expression);case 226:return xn(ee);case 224:return ee.operator===54&&Et(ee.operand);case 221:return Et(ee.expression)}return!1}function dt(ee){switch(ee.kind){case 80:case 110:case 108:case 236:return!0;case 211:case 217:case 235:return dt(ee.expression);case 212:return(cm(ee.argumentExpression)||pl(ee.argumentExpression))&&dt(ee.expression);case 226:return ee.operatorToken.kind===28&&dt(ee.right)||Gb(ee.operatorToken.kind)&&N_(ee.left)}return!1}function zt(ee){return dt(ee)||gh(ee)&&zt(ee.expression)}function Ei(ee){if(ee.arguments){for(const Xe of ee.arguments)if(zt(Xe))return!0}return!!(ee.expression.kind===211&&zt(ee.expression.expression))}function tn(ee,Xe){return S3(ee)&&Pn(ee.expression)&&Bc(Xe)}function xn(ee){switch(ee.operatorToken.kind){case 64:case 76:case 77:case 78:return zt(ee.left);case 35:case 36:case 37:case 38:return Pn(ee.left)||Pn(ee.right)||tn(ee.right,ee.left)||tn(ee.left,ee.right)||C8(ee.right)&&Et(ee.left)||C8(ee.left)&&Et(ee.right);case 104:return Pn(ee.left);case 103:return Et(ee.right);case 28:return Et(ee.right)}return!1}function Pn(ee){switch(ee.kind){case 217:return Pn(ee.expression);case 226:switch(ee.operatorToken.kind){case 64:return Pn(ee.left);case 28:return Pn(ee.right)}}return zt(ee)}function _i(){return zy(4,void 0,void 0)}function Fi(){return zy(8,void 0,void 0)}function On(ee,Xe,Zt){return zy(1024,{target:ee,antecedents:Xe},Zt)}function pn(ee){ee.flags|=ee.flags&2048?4096:2048}function qr(ee,Xe){!(Xe.flags&1)&&!Yt(ee.antecedent,Xe)&&((ee.antecedent||(ee.antecedent=[])).push(Xe),pn(Xe))}function Fs(ee,Xe,Zt){return Xe.flags&1?Xe:Zt?(Zt.kind===112&&ee&64||Zt.kind===97&&ee&32)&&!fG(Zt)&&!Xoe(Zt.parent)?Ae:Et(Zt)?(pn(Xe),zy(ee,Zt,Xe)):Xe:ee&32?Xe:Ae}function ko(ee,Xe,Zt,Nn){return pn(ee),zy(128,{switchStatement:Xe,clauseStart:Zt,clauseEnd:Nn},ee)}function ls(ee,Xe,Zt){pn(Xe),oe=!0;const Nn=zy(ee,Zt,Xe);return X&&qr(X,Nn),Nn}function Qs(ee,Xe){return pn(ee),oe=!0,zy(512,Xe,ee)}function Mn(ee){const Xe=ee.antecedent;return Xe?Xe.length===1?Xe[0]:ee:Ae}function Zs(ee){const Xe=ee.parent;switch(Xe.kind){case 245:case 247:case 246:return Xe.expression===ee;case 248:case 227:return Xe.condition===ee}return!1}function at(ee){for(;;)if(ee.kind===217)ee=ee.expression;else if(ee.kind===224&&ee.operator===54)ee=ee.operand;else return WV(ee)}function yi(ee){return _ce(Dc(ee))}function Sn(ee){for(;c_(ee.parent)||n2(ee.parent)&&ee.parent.operator===54;)ee=ee.parent;return!Zs(ee)&&!at(ee.parent)&&!(gh(ee.parent)&&ee.parent.expression===ee)}function dr(ee,Xe,Zt,Nn){const Is=U,Qo=q;U=Zt,q=Nn,ee(Xe),U=Is,q=Qo}function us(ee,Xe,Zt){dr(Xi,ee,Xe,Zt),(!ee||!yi(ee)&&!at(ee)&&!(gh(ee)&&p8(ee)))&&(qr(Xe,Fs(32,N,ee)),qr(Zt,Fs(64,N,ee)))}function Xr(ee,Xe,Zt){const Nn=R,Is=F;R=Xe,F=Zt,Xi(ee),R=Nn,F=Is}function Gs(ee,Xe){let Zt=Q;for(;Zt&&ee.parent.kind===256;)Zt.continueTarget=Xe,Zt=Zt.next,ee=ee.parent;return Xe}function ma(ee){const Xe=Gs(ee,Fi()),Zt=_i(),Nn=_i();qr(Xe,N),N=Xe,us(ee.expression,Zt,Nn),N=Mn(Zt),Xr(ee.statement,Nn,Xe),qr(Xe,N),N=Mn(Nn)}function ka(ee){const Xe=Fi(),Zt=Gs(ee,_i()),Nn=_i();qr(Xe,N),N=Xe,Xr(ee.statement,Nn,Zt),qr(Zt,N),N=Mn(Zt),us(ee.expression,Xe,Nn),N=Mn(Nn)}function Ji(ee){const Xe=Gs(ee,Fi()),Zt=_i(),Nn=_i();Xi(ee.initializer),qr(Xe,N),N=Xe,us(ee.condition,Zt,Nn),N=Mn(Zt),Xr(ee.statement,Nn,Xe),Xi(ee.incrementor),qr(Xe,N),N=Mn(Nn)}function ac(ee){const Xe=Gs(ee,Fi()),Zt=_i();Xi(ee.expression),qr(Xe,N),N=Xe,ee.kind===250&&Xi(ee.awaitModifier),qr(Zt,N),Xi(ee.initializer),ee.initializer.kind!==261&&Ni(ee.initializer),Xr(ee.statement,Zt,Xe),qr(Xe,N),N=Mn(Zt)}function St(ee){const Xe=_i(),Zt=_i(),Nn=_i();us(ee.expression,Xe,Zt),N=Mn(Xe),Xi(ee.thenStatement),qr(Nn,N),N=Mn(Zt),Xi(ee.elseStatement),qr(Nn,N),N=Mn(Nn)}function ri(ee){Xi(ee.expression),ee.kind===253&&(re=!0,H&&qr(H,N)),N=Ae,oe=!0}function xe(ee){for(let Xe=Q;Xe;Xe=Xe.next)if(Xe.name===ee)return Xe}function pt(ee,Xe,Zt){const Nn=ee.kind===252?Xe:Zt;Nn&&(qr(Nn,N),N=Ae,oe=!0)}function Se(ee){if(Xi(ee.label),ee.label){const Xe=xe(ee.label.escapedText);Xe&&(Xe.referenced=!0,pt(ee,Xe.breakTarget,Xe.continueTarget))}else pt(ee,R,F)}function Ze(ee){const Xe=H,Zt=X,Nn=_i(),Is=_i();let Qo=_i();if(ee.finallyBlock&&(H=Is),qr(Qo,N),X=Qo,Xi(ee.tryBlock),qr(Nn,N),ee.catchClause&&(N=Mn(Qo),Qo=_i(),qr(Qo,N),X=Qo,Xi(ee.catchClause),qr(Nn,N)),H=Xe,X=Zt,ee.finallyBlock){const To=_i();To.antecedent=Js(Js(Nn.antecedent,Qo.antecedent),Is.antecedent),N=To,Xi(ee.finallyBlock),N.flags&1?N=Ae:(H&&Is.antecedent&&qr(H,On(To,Is.antecedent,N)),X&&Qo.antecedent&&qr(X,On(To,Qo.antecedent,N)),N=Nn.antecedent?On(To,Nn.antecedent,N):Ae)}else N=Mn(Nn)}function gt(ee){const Xe=_i();Xi(ee.expression);const Zt=R,Nn=Z;R=Xe,Z=N,Xi(ee.caseBlock),qr(Xe,N);const Is=O(ee.caseBlock.clauses,Qo=>Qo.kind===297);ee.possiblyExhaustive=!Is&&!Xe.antecedent,Is||qr(Xe,ko(Z,ee,0,0)),R=Zt,Z=Nn,N=Mn(Xe)}function Dt(ee){const Xe=ee.clauses,Zt=ee.parent.expression.kind===112||Et(ee.parent.expression);let Nn=Ae;for(let Is=0;Is<Xe.length;Is++){const Qo=Is;for(;!Xe[Is].statements.length&&Is+1<Xe.length;)Nn===Ae&&(N=Z),Xi(Xe[Is]),Is++;const To=_i();qr(To,Zt?ko(Z,ee.parent,Qo,Is+1):Z),qr(To,Nn),N=Mn(To);const Zo=Xe[Is];Xi(Zo),Nn=N,!(N.flags&1)&&Is!==Xe.length-1&&r.noFallthroughCasesInSwitch&&(Zo.fallthroughFlowNode=N)}}function Je(ee){const Xe=N;N=Z,Xi(ee.expression),N=Xe,Me(ee.statements)}function Rt(ee){Xi(ee.expression),Ct(ee.expression)}function Ct(ee){if(ee.kind===213){const Xe=ee;Xe.expression.kind!==108&&VV(Xe.expression)&&(N=Qs(N,Xe))}}function ii(ee){const Xe=_i();Q={next:Q,name:ee.label.escapedText,breakTarget:Xe,continueTarget:void 0,referenced:!1},Xi(ee.label),Xi(ee.statement),!Q.referenced&&!r.allowUnusedLabels&&Mi(NDe(r),ee.label,k.Unused_label),Q=Q.next,qr(Xe,N),N=Mn(Xe)}function vt(ee){ee.kind===226&&ee.operatorToken.kind===64?Ni(ee.left):Ni(ee)}function Ni(ee){if(dt(ee))N=ls(16,N,ee);else if(ee.kind===209)for(const Xe of ee.elements)Xe.kind===230?Ni(Xe.expression):vt(Xe);else if(ee.kind===210)for(const Xe of ee.properties)Xe.kind===303?vt(Xe.initializer):Xe.kind===304?Ni(Xe.name):Xe.kind===305&&Ni(Xe.expression)}function ji(ee,Xe,Zt){const Nn=_i();ee.operatorToken.kind===56||ee.operatorToken.kind===77?us(ee.left,Nn,Zt):us(ee.left,Xe,Nn),N=Mn(Nn),Xi(ee.operatorToken),U8(ee.operatorToken.kind)?(dr(Xi,ee.right,Xe,Zt),Ni(ee.left),qr(Xe,Fs(32,N,ee)),qr(Zt,Fs(64,N,ee))):us(ee.right,Xe,Zt)}function gr(ee){if(ee.operator===54){const Xe=U;U=q,q=Xe,ut(ee),q=U,U=Xe}else ut(ee),(ee.operator===46||ee.operator===47)&&Ni(ee.operand)}function te(ee){ut(ee),(ee.operator===46||ee.operator===47)&&Ni(ee.operand)}function tt(ee){ue?(ue=!1,Xi(ee.operatorToken),Xi(ee.right),ue=!0,Xi(ee.left)):(ue=!0,Xi(ee.left),ue=!1,Xi(ee.operatorToken),Xi(ee.right)),Ni(ee.left)}function Gt(){return BX(ee,Xe,Zt,Nn,Is,void 0);function ee(To,Zo){if(Zo){Zo.stackIndex++,_c(To,u);const Xa=de;Ic(To);const Yl=u;u=To,Zo.skip=!1,Zo.inStrictModeStack[Zo.stackIndex]=Xa,Zo.parentStack[Zo.stackIndex]=Yl}else Zo={stackIndex:0,skip:!1,inStrictModeStack:[void 0],parentStack:[void 0]};const uc=To.operatorToken.kind;if(CK(uc)||U8(uc)){if(Sn(To)){const Xa=_i(),Yl=N,ig=oe;oe=!1,ji(To,Xa,Xa),N=oe?Mn(Xa):Yl,oe||(oe=ig)}else ji(To,U,q);Zo.skip=!0}return Zo}function Xe(To,Zo,uc){if(!Zo.skip){const Xa=Qo(To);return uc.operatorToken.kind===28&&Ct(To),Xa}}function Zt(To,Zo,uc){Zo.skip||Xi(To)}function Nn(To,Zo,uc){if(!Zo.skip){const Xa=Qo(To);return uc.operatorToken.kind===28&&Ct(To),Xa}}function Is(To,Zo){if(!Zo.skip){const Yl=To.operatorToken.kind;if(Gb(Yl)&&!fS(To)&&(Ni(To.left),Yl===64&&To.left.kind===212)){const ig=To.left;Pn(ig.expression)&&(N=ls(256,N,To))}}const uc=Zo.inStrictModeStack[Zo.stackIndex],Xa=Zo.parentStack[Zo.stackIndex];uc!==void 0&&(de=uc),Xa!==void 0&&(u=Xa),Zo.skip=!1,Zo.stackIndex--}function Qo(To){if(To&&ur(To)&&!pS(To))return To;Xi(To)}}function le(ee){ut(ee),ee.expression.kind===211&&Ni(ee.expression)}function Ue(ee){const Xe=_i(),Zt=_i(),Nn=_i(),Is=N,Qo=oe;oe=!1,us(ee.condition,Xe,Zt),N=Mn(Xe),Xi(ee.questionToken),Xi(ee.whenTrue),qr(Nn,N),N=Mn(Zt),Xi(ee.colonToken),Xi(ee.whenFalse),qr(Nn,N),N=oe?Mn(Nn):Is,oe||(oe=Qo)}function be(ee){const Xe=Bd(ee)?void 0:ee.name;if(ta(Xe))for(const Zt of Xe.elements)be(Zt);else N=ls(16,N,ee)}function Qt(ee){ut(ee),(ee.initializer||fI(ee.parent.parent))&&be(ee)}function lt(ee){Xi(ee.dotDotDotToken),Xi(ee.propertyName),hi(ee.initializer),Xi(ee.name)}function st(ee){Me(ee.modifiers),Xi(ee.dotDotDotToken),Xi(ee.questionToken),Xi(ee.type),hi(ee.initializer),Xi(ee.name)}function hi(ee){if(!ee)return;const Xe=N;if(Xi(ee),Xe===Ae||Xe===N)return;const Zt=_i();qr(Zt,Xe),qr(Zt,N),N=Mn(Zt)}function vn(ee){Xi(ee.tagName),ee.kind!==340&&ee.fullName&&(_c(ee.fullName,ee),Qb(ee.fullName,!1)),typeof ee.comment!="string"&&Me(ee.comment)}function ln(ee){ut(ee);const Xe=Jk(ee);Xe&&Xe.kind!==174&&Oe(Xe.symbol,Xe,32)}function Un(ee){Xi(ee.tagName),Xi(ee.moduleSpecifier),Xi(ee.attributes),typeof ee.comment!="string"&&Me(ee.comment)}function Pt(ee,Xe,Zt){dr(Xi,ee,Xe,Zt),(!gh(ee)||p8(ee))&&(qr(Xe,Fs(32,N,ee)),qr(Zt,Fs(64,N,ee)))}function Bt(ee){switch(ee.kind){case 211:Xi(ee.questionDotToken),Xi(ee.name);break;case 212:Xi(ee.questionDotToken),Xi(ee.argumentExpression);break;case 213:Xi(ee.questionDotToken),Me(ee.typeArguments),Me(ee.arguments);break}}function fi(ee,Xe,Zt){const Nn=_8(ee)?_i():void 0;Pt(ee.expression,Nn||Xe,Zt),Nn&&(N=Mn(Nn)),dr(Bt,ee,Xe,Zt),p8(ee)&&(qr(Xe,Fs(32,N,ee)),qr(Zt,Fs(64,N,ee)))}function wi(ee){if(Sn(ee)){const Xe=_i(),Zt=N,Nn=oe;fi(ee,Xe,Xe),N=oe?Mn(Xe):Zt,oe||(oe=Nn)}else fi(ee,U,q)}function Ri(ee){gh(ee)?wi(ee):ut(ee)}function Ai(ee){gh(ee)?wi(ee):ut(ee)}function Xn(ee){if(gh(ee))wi(ee);else{const Xe=Dc(ee.expression);Xe.kind===218||Xe.kind===219?(Me(ee.typeArguments),Me(ee.arguments),Xi(ee.expression)):(ut(ee),ee.expression.kind===108&&(N=Qs(N,ee)))}if(ee.expression.kind===211){const Xe=ee.expression;ot(Xe.name)&&Pn(Xe.expression)&&Yae(Xe.name)&&(N=ls(256,N,ee))}}function Di(ee){C&&(C.nextContainer=ee),C=ee}function on(ee,Xe,Zt){switch(h.kind){case 267:return ze(ee,Xe,Zt);case 307:return cn(ee,Xe,Zt);case 231:case 263:return zi(ee,Xe,Zt);case 266:return We(h.symbol.exports,h.symbol,ee,Xe,Zt);case 187:case 322:case 210:case 264:case 292:return We(h.symbol.members,h.symbol,ee,Xe,Zt);case 184:case 185:case 179:case 180:case 323:case 181:case 174:case 173:case 176:case 177:case 178:case 262:case 218:case 219:case 317:case 175:case 265:case 200:return h.locals&&j.assertNode(h,Ay),We(h.locals,void 0,ee,Xe,Zt)}}function zi(ee,Xe,Zt){return pa(ee)?We(h.symbol.exports,h.symbol,ee,Xe,Zt):We(h.symbol.members,h.symbol,ee,Xe,Zt)}function cn(ee,Xe,Zt){return wd(t)?ze(ee,Xe,Zt):We(t.locals,void 0,ee,Xe,Zt)}function vi(ee){const Xe=Os(ee)?ee:Jr(ee.body,H1);return!!Xe&&Xe.statements.some(Zt=>Ju(Zt)||Il(Zt))}function qo(ee){ee.flags&33554432&&!vi(ee)?ee.flags|=128:ee.flags&=-129}function Wo(ee){if(qo(ee),Vh(ee))if(Zr(ee,32)&&ci(ee,k.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible),wae(ee))$o(ee);else{let Xe;if(ee.name.kind===11){const{text:Nn}=ee.name;Xe=_3(Nn),Xe===void 0&&ci(ee.name,k.Pattern_0_can_have_at_most_one_Asterisk_character,Nn)}const Zt=on(ee,512,110735);t.patternAmbientModules=fn(t.patternAmbientModules,Xe&&!Oo(Xe)?{pattern:Xe,symbol:Zt}:void 0)}else{const Xe=$o(ee);if(Xe!==0){const{symbol:Zt}=ee;Zt.constEnumOnlyModule=!(Zt.flags&304)&&Xe===2&&Zt.constEnumOnlyModule!==!1}}}function $o(ee){const Xe=nC(ee),Zt=Xe!==0;return on(ee,Zt?512:1024,Zt?110735:0),Xe}function Lc(ee){const Xe=Ne(131072,He(ee));Oe(Xe,ee,131072);const Zt=Ne(2048,"__type");Oe(Zt,ee,2048),Zt.members=_a(),Zt.members.set(Xe.escapedName,Xe)}function vu(ee){return Ls(ee,4096,"__object")}function Gu(ee){return Ls(ee,4096,"__jsxAttributes")}function Zc(ee,Xe,Zt){return on(ee,Xe,Zt)}function Ls(ee,Xe,Zt){const Nn=Ne(Xe,Zt);return Xe&106508&&(Nn.parent=h.symbol),Oe(Nn,ee,Xe),Nn}function ja(ee,Xe,Zt){switch(g.kind){case 267:ze(ee,Xe,Zt);break;case 307:if(Cp(h)){ze(ee,Xe,Zt);break}default:j.assertNode(g,Ay),g.locals||(g.locals=_a(),Di(g)),We(g.locals,void 0,ee,Xe,Zt)}}function wf(){if(!b)return;const ee=h,Xe=C,Zt=g,Nn=u,Is=N;for(const Qo of b){const To=Qo.parent.parent;h=FG(To)||t,g=R0(To)||t,N=zy(2,void 0,void 0),u=Qo,Xi(Qo.typeExpression);const Zo=No(Qo);if((mH(Qo)||!Qo.fullName)&&Zo&&HV(Zo.parent)){const uc=ym(Zo.parent);if(uc){Y_(t.symbol,Zo.parent,uc,!!Qi(Zo,Yl=>Nr(Yl)&&Yl.name.escapedText==="prototype"),!1);const Xa=h;switch(yV(Zo.parent)){case 1:case 2:Cp(t)?h=t:h=void 0;break;case 4:h=Zo.parent.expression;break;case 3:h=Zo.parent.expression.name;break;case 5:h=dD(t,Zo.parent.expression)?t:Nr(Zo.parent.expression)?Zo.parent.expression.name:Zo.parent.expression;break;case 0:return j.fail("Shouldn't have detected typedef or enum on non-assignment declaration")}h&&ze(Qo,524288,788968),h=Xa}}else mH(Qo)||!Qo.fullName||Qo.fullName.kind===80?(u=Qo.parent,ja(Qo,524288,788968)):Xi(Qo.fullName)}h=ee,C=Xe,g=Zt,u=Nn,N=Is}function Jo(){if(E===void 0)return;const ee=h,Xe=C,Zt=g,Nn=u,Is=N;for(const Qo of E){const To=zT(Qo),Zo=To?FG(To):void 0,uc=To?R0(To):void 0;h=Zo||t,g=uc||t,N=zy(2,void 0,void 0),u=Qo,Xi(Qo.importClause)}h=ee,C=Xe,g=Zt,u=Nn,N=Is}function kh(ee){if(!t.parseDiagnostics.length&&!(ee.flags&33554432)&&!(ee.flags&16777216)&&!WTe(ee)){const Xe=aI(ee);if(Xe===void 0)return;de&&Xe>=119&&Xe<=127?t.bindDiagnostics.push(De(ee,md(ee),al(ee))):Xe===135?wd(t)&&JG(ee)?t.bindDiagnostics.push(De(ee,k.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module,al(ee))):ee.flags&65536&&t.bindDiagnostics.push(De(ee,k.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here,al(ee))):Xe===127&&ee.flags&16384&&t.bindDiagnostics.push(De(ee,k.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here,al(ee)))}}function md(ee){return Cf(ee)?k.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode:t.externalModuleIndicator?k.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode:k.Identifier_expected_0_is_a_reserved_word_in_strict_mode}function go(ee){ee.escapedText==="#constructor"&&(t.parseDiagnostics.length||t.bindDiagnostics.push(De(ee,k.constructor_is_a_reserved_word,al(ee))))}function pc(ee){de&&N_(ee.left)&&Gb(ee.operatorToken.kind)&&ki(ee,ee.left)}function mc(ee){de&&ee.variableDeclaration&&ki(ee,ee.variableDeclaration.name)}function oo(ee){if(de&&ee.expression.kind===80){const Xe=pI(t,ee.expression);t.bindDiagnostics.push(Md(t,Xe.start,Xe.length,k.delete_cannot_be_called_on_an_identifier_in_strict_mode))}}function tc(ee){return ot(ee)&&(ee.escapedText==="eval"||ee.escapedText==="arguments")}function ki(ee,Xe){if(Xe&&Xe.kind===80){const Zt=Xe;if(tc(Zt)){const Nn=pI(t,Xe);t.bindDiagnostics.push(Md(t,Nn.start,Nn.length,Gc(ee),Fr(Zt)))}}}function Gc(ee){return Cf(ee)?k.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode:t.externalModuleIndicator?k.Invalid_use_of_0_Modules_are_automatically_in_strict_mode:k.Invalid_use_of_0_in_strict_mode}function uh(ee){de&&!(ee.flags&33554432)&&ki(ee,ee.name)}function sd(ee){return Cf(ee)?k.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definitions_are_automatically_in_strict_mode:t.externalModuleIndicator?k.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_automatically_in_strict_mode:k.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5}function Pp(ee){if(a<2&&g.kind!==307&&g.kind!==267&&!B6(g)){const Xe=pI(t,ee);t.bindDiagnostics.push(Md(t,Xe.start,Xe.length,sd(ee)))}}function Nl(ee){de&&ki(ee,ee.operand)}function Ve(ee){de&&(ee.operator===46||ee.operator===47)&&ki(ee,ee.operand)}function _e(ee){de&&ci(ee,k.with_statements_are_not_allowed_in_strict_mode)}function Lt(ee){de&&Ja(r)>=2&&(M2e(ee.statement)||Lu(ee.statement))&&ci(ee.label,k.A_label_is_not_allowed_here)}function ci(ee,Xe,...Zt){const Nn=E1(t,ee.pos);t.bindDiagnostics.push(Md(t,Nn.start,Nn.length,Xe,...Zt))}function Mi(ee,Xe,Zt){Rn(ee,Xe,Xe,Zt)}function Rn(ee,Xe,Zt,Nn){Yr(ee,{pos:ex(Xe,t),end:Zt.end},Nn)}function Yr(ee,Xe,Zt){const Nn=Md(t,Xe.pos,Xe.end-Xe.pos,Zt);ee?t.bindDiagnostics.push(Nn):t.bindSuggestionDiagnostics=fn(t.bindSuggestionDiagnostics,{...Nn,category:2})}function Xi(ee){if(!ee)return;_c(ee,u),Zn&&(ee.tracingPath=t.path);const Xe=de;if(Ic(ee),ee.kind>165){const Zt=u;u=ee;const Nn=wue(ee);Nn===0?wt(ee):$e(ee,Nn),u=Zt}else{const Zt=u;ee.kind===1&&(u=ee),Mr(ee),u=Zt}de=Xe}function Mr(ee){if(jp(ee))if(nr(ee))for(const Xe of ee.jsDoc)Xi(Xe);else for(const Xe of ee.jsDoc)_c(Xe,ee),Qb(Xe,!1)}function ds(ee){if(!de)for(const Xe of ee){if(!I1(Xe))return;if(Ks(Xe)){de=!0;return}}}function Ks(ee){const Xe=RT(t,ee.expression);return Xe==='"use strict"'||Xe==="'use strict'"}function Ic(ee){switch(ee.kind){case 80:if(ee.flags&4096){let To=ee.parent;for(;To&&!Ng(To);)To=To.parent;ja(To,524288,788968);break}case 110:return N&&(jt(ee)||u.kind===304)&&(ee.flowNode=N),kh(ee);case 166:N&&QG(ee)&&(ee.flowNode=N);break;case 236:case 108:ee.flowNode=N;break;case 81:return go(ee);case 211:case 212:const Xe=ee;N&&dt(Xe)&&(Xe.flowNode=N),NTe(Xe)&&Hu(Xe),nr(Xe)&&t.commonJsModuleIndicator&&Wv(Xe)&&!dQ(g,"module")&&We(t.locals,void 0,Xe.expression,134217729,111550);break;case 226:switch(Bu(ee)){case 1:Ye(ee);break;case 2:li(ee);break;case 3:Pc(ee.left,ee);break;case 6:Hd(ee);break;case 4:po(ee);break;case 5:const To=ee.left.expression;if(nr(ee)&&ot(To)){const Zo=dQ(g,To.escapedText);if(GG(Zo==null?void 0:Zo.valueDeclaration)){po(ee);break}}Ap(ee);break;case 0:break;default:j.fail("Unknown binary expression special property assignment kind")}return pc(ee);case 299:return mc(ee);case 220:return oo(ee);case 225:return Nl(ee);case 224:return Ve(ee);case 254:return _e(ee);case 256:return Lt(ee);case 197:T=!0;return;case 182:break;case 168:return Wn(ee);case 169:return ve(ee);case 260:return vm(ee);case 208:return ee.flowNode=N,vm(ee);case 172:case 171:return Gl(ee);case 303:case 304:return Ci(ee,4,0);case 306:return Ci(ee,8,900095);case 179:case 180:case 181:return on(ee,131072,0);case 174:case 173:return Ci(ee,8192|(ee.questionToken?16777216:0),Ig(ee)?0:103359);case 262:return Ot(ee);case 176:return on(ee,16384,0);case 177:return Ci(ee,32768,46015);case 178:return Ci(ee,65536,78783);case 184:case 317:case 323:case 185:return Lc(ee);case 187:case 322:case 200:return Pu(ee);case 332:return ln(ee);case 210:return vu(ee);case 218:case 219:return mi(ee);case 213:switch(Bu(ee)){case 7:return od(ee);case 8:return eg(ee);case 9:return Yc(ee);case 0:break;default:return j.fail("Unknown call expression assignment declaration kind")}nr(ee)&&lC(ee);break;case 231:case 263:return de=!0,h_(ee);case 264:return ja(ee,64,788872);case 265:return ja(ee,524288,788968);case 266:return Yv(ee);case 267:return Wo(ee);case 292:return Gu(ee);case 291:return Zc(ee,4,0);case 271:case 274:case 276:case 281:return on(ee,2097152,2097152);case 270:return Cu(ee);case 273:return Qu(ee);case 278:return gm(ee);case 277:return Wl(ee);case 307:return ds(ee.statements),Ku();case 241:if(!B6(ee.parent))return;case 268:return ds(ee.statements);case 341:if(ee.parent.kind===323)return ve(ee);if(ee.parent.kind!==322)break;case 348:const Is=ee,Qo=Is.isBracketed||Is.typeExpression&&Is.typeExpression.type.kind===316?16777220:4;return on(Is,Qo,0);case 346:case 338:case 340:return(b||(b=[])).push(ee);case 339:return Xi(ee.typeExpression);case 351:return(E||(E=[])).push(ee)}}function Gl(ee){const Xe=I_(ee),Zt=Xe?98304:4,Nn=Xe?13247:0;return Ci(ee,Zt|(ee.questionToken?16777216:0),Nn)}function Pu(ee){return Ls(ee,2048,"__type")}function Ku(){if(qo(t),wd(t))Xu();else if(Eg(t)){Xu();const ee=t.symbol;We(t.symbol.exports,t.symbol,t,4,-1),t.symbol=ee}}function Xu(){Ls(t,512,`"${s_(t.fileName)}"`)}function Wl(ee){if(!h.symbol||!h.symbol.exports)Ls(ee,111551,He(ee));else{const Xe=EV(ee)?2097152:4,Zt=We(h.symbol.exports,h.symbol,ee,Xe,-1);ee.isExportEquals&&bV(Zt,ee)}}function Cu(ee){Ft(ee.modifiers)&&t.bindDiagnostics.push(De(ee,k.Modifiers_cannot_appear_here));const Xe=Os(ee.parent)?wd(ee.parent)?ee.parent.isDeclarationFile?void 0:k.Global_module_exports_may_only_appear_in_declaration_files:k.Global_module_exports_may_only_appear_in_module_files:k.Global_module_exports_may_only_appear_at_top_level;Xe?t.bindDiagnostics.push(De(ee,Xe)):(t.symbol.globalExports=t.symbol.globalExports||_a(),We(t.symbol.globalExports,t.symbol,ee,2097152,2097152))}function gm(ee){!h.symbol||!h.symbol.exports?Ls(ee,8388608,He(ee)):ee.exportClause?jy(ee.exportClause)&&(_c(ee.exportClause,ee),We(h.symbol.exports,h.symbol,ee.exportClause,2097152,2097152)):We(h.symbol.exports,h.symbol,ee,8388608,0)}function Qu(ee){ee.name&&on(ee,2097152,2097152)}function kd(ee){return t.externalModuleIndicator&&t.externalModuleIndicator!==!0?!1:(t.commonJsModuleIndicator||(t.commonJsModuleIndicator=ee,t.externalModuleIndicator||Xu()),!0)}function eg(ee){if(!kd(ee))return;const Xe=jd(ee.arguments[0],void 0,(Zt,Nn)=>(Nn&&Oe(Nn,Zt,67110400),Nn));Xe&&We(Xe.exports,Xe,ee,1048580,0)}function Ye(ee){if(!kd(ee))return;const Xe=jd(ee.left.expression,void 0,(Zt,Nn)=>(Nn&&Oe(Nn,Zt,67110400),Nn));if(Xe){const Nn=sK(ee.right)&&(yI(ee.left.expression)||Wv(ee.left.expression))?2097152:1048580;_c(ee.left,ee),We(Xe.exports,Xe,ee.left,Nn,0)}}function li(ee){if(!kd(ee))return;const Xe=mV(ee.right);if(yce(Xe)||h===t&&dD(t,Xe))return;if(Aa(Xe)&&Ce(Xe.properties,lh)){O(Xe.properties,En);return}const Zt=EV(ee)?2097152:1049092,Nn=We(t.symbol.exports,t.symbol,ee,Zt|67108864,0);bV(Nn,ee)}function En(ee){We(t.symbol.exports,t.symbol,ee,69206016,0)}function po(ee){if(j.assert(nr(ee)),ur(ee)&&Nr(ee.left)&&Vs(ee.left.name)||Nr(ee)&&Vs(ee.name))return;const Zt=Hh(ee,!1,!1);switch(Zt.kind){case 262:case 218:let Nn=Zt.symbol;if(ur(Zt.parent)&&Zt.parent.operatorToken.kind===64){const To=Zt.parent.left;jT(To)&&rx(To.expression)&&(Nn=F_(To.expression.expression,p))}Nn&&Nn.valueDeclaration&&(Nn.members=Nn.members||_a(),Jb(ee)?ic(ee,Nn,Nn.members):We(Nn.members,Nn,ee,67108868,0),Oe(Nn,Nn.valueDeclaration,32));break;case 176:case 172:case 174:case 177:case 178:case 175:const Is=Zt.parent,Qo=pa(Zt)?Is.symbol.exports:Is.symbol.members;Jb(ee)?ic(ee,Is.symbol,Qo):We(Qo,Is.symbol,ee,67108868,0,!0);break;case 307:if(Jb(ee))break;Zt.commonJsModuleIndicator?We(Zt.symbol.exports,Zt.symbol,ee,1048580,0):on(ee,1,111550);break;case 267:break;default:j.failBadSyntaxKind(Zt)}}function ic(ee,Xe,Zt){We(Zt,Xe,ee,4,0,!0,!0),sc(ee,Xe)}function sc(ee,Xe){Xe&&(Xe.assignmentDeclarationMembers||(Xe.assignmentDeclarationMembers=new Map)).set(Sc(ee),ee)}function Hu(ee){ee.expression.kind===110?po(ee):jT(ee)&&ee.parent.parent.kind===307&&(rx(ee.expression)?Pc(ee,ee.parent):Vg(ee))}function Hd(ee){_c(ee.left,ee),_c(ee.right,ee),tg(ee.left.expression,ee.left,!1,!0)}function Yc(ee){const Xe=F_(ee.arguments[0].expression);Xe&&Xe.valueDeclaration&&Oe(Xe,Xe.valueDeclaration,32),Jp(ee,Xe,!0)}function Pc(ee,Xe){const Zt=ee.expression,Nn=Zt.expression;_c(Nn,Zt),_c(Zt,ee),_c(ee,Xe),tg(Nn,ee,!0,!0)}function od(ee){let Xe=F_(ee.arguments[0]);const Zt=ee.parent.parent.kind===307;Xe=Y_(Xe,ee.arguments[0],Zt,!1,!1),Jp(ee,Xe,!1)}function Ap(ee){var Xe;const Zt=F_(ee.left.expression,g)||F_(ee.left.expression,h);if(!nr(ee)&&!LTe(Zt))return;const Nn=u3(ee.left);if(!(ot(Nn)&&((Xe=dQ(h,Nn.escapedText))==null?void 0:Xe.flags)&2097152))if(_c(ee.left,ee),_c(ee.right,ee),ot(ee.left.expression)&&h===t&&dD(t,ee.left.expression))Ye(ee);else if(Jb(ee)){Ls(ee,67108868,"__computed");const Is=Y_(Zt,ee.left.expression,ym(ee.left),!1,!1);sc(ee,Is)}else Vg(ha(ee.left,bI))}function Vg(ee){j.assert(!ot(ee)),_c(ee.expression,ee),tg(ee.expression,ee,!1,!1)}function Y_(ee,Xe,Zt,Nn,Is){return(ee==null?void 0:ee.flags)&2097152||(Zt&&!Nn&&(ee=jd(Xe,ee,(Zo,uc,Xa)=>{if(uc)return Oe(uc,Zo,67110400),uc;{const Yl=Xa?Xa.exports:t.jsGlobalAugmentations||(t.jsGlobalAugmentations=_a());return We(Yl,Xa,Zo,67110400,110735)}})),Is&&ee&&ee.valueDeclaration&&Oe(ee,ee.valueDeclaration,32)),ee}function Jp(ee,Xe,Zt){if(!Xe||!Zv(Xe))return;const Nn=Zt?Xe.members||(Xe.members=_a()):Xe.exports||(Xe.exports=_a());let Is=0,Qo=0;Qc(dP(ee))?(Is=8192,Qo=103359):la(ee)&&vI(ee)&&(Ft(ee.arguments[2].properties,To=>{const Zo=No(To);return!!Zo&&ot(Zo)&&Fr(Zo)==="set"})&&(Is|=65540,Qo|=78783),Ft(ee.arguments[2].properties,To=>{const Zo=No(To);return!!Zo&&ot(Zo)&&Fr(Zo)==="get"})&&(Is|=32772,Qo|=46015)),Is===0&&(Is=4,Qo=0),We(Nn,Xe,ee,Is|67108864,Qo&-67108865)}function ym(ee){return ur(ee.parent)?Hg(ee.parent).parent.kind===307:ee.parent.parent.kind===307}function tg(ee,Xe,Zt,Nn){let Is=F_(ee,g)||F_(ee,h);const Qo=ym(Xe);Is=Y_(Is,Xe.expression,Qo,Zt,Nn),Jp(Xe,Is,Zt)}function Zv(ee){if(ee.flags&1072)return!0;const Xe=ee.valueDeclaration;if(Xe&&la(Xe))return!!dP(Xe);let Zt=Xe?_s(Xe)?Xe.initializer:ur(Xe)?Xe.right:Nr(Xe)&&ur(Xe.parent)?Xe.parent.right:void 0:void 0;if(Zt=Zt&&mV(Zt),Zt){const Nn=rx(_s(Xe)?Xe.name:ur(Xe)?Xe.left:Xe);return!!$k(ur(Zt)&&(Zt.operatorToken.kind===57||Zt.operatorToken.kind===61)?Zt.right:Zt,Nn)}return!1}function Hg(ee){for(;ur(ee.parent);)ee=ee.parent;return ee.parent}function F_(ee,Xe=h){if(ot(ee))return dQ(Xe,ee.escapedText);{const Zt=F_(ee.expression);return Zt&&Zt.exports&&Zt.exports.get($b(ee))}}function jd(ee,Xe,Zt){if(dD(t,ee))return t.symbol;if(ot(ee))return Zt(ee,F_(ee),Xe);{const Nn=jd(ee.expression,Xe,Zt),Is=gV(ee);return Vs(Is)&&j.fail("unexpected PrivateIdentifier"),Zt(Is,Nn&&Nn.exports&&Nn.exports.get($b(ee)),Nn)}}function lC(ee){!t.commonJsModuleIndicator&&L_(ee,!1)&&kd(ee)}function h_(ee){if(ee.kind===263)ja(ee,32,899503);else{const Is=ee.name?ee.name.escapedText:"__class";Ls(ee,32,Is),ee.name&&he.add(ee.name.escapedText)}const{symbol:Xe}=ee,Zt=Ne(4194308,"prototype"),Nn=Xe.exports.get(Zt.escapedName);Nn&&(ee.name&&_c(ee.name,ee),t.bindDiagnostics.push(De(Nn.declarations[0],k.Duplicate_identifier_0,Eu(Zt)))),Xe.exports.set(Zt.escapedName,Zt),Zt.parent=Xe}function Yv(ee){return Uk(ee)?ja(ee,128,899967):ja(ee,256,899327)}function vm(ee){if(de&&ki(ee,ee.name),!ta(ee.name)){const Xe=ee.kind===260?ee:ee.parent.parent;nr(ee)&&HT(Xe)&&!Fk(ee)&&!(Rk(ee)&32)?on(ee,2097152,2097152):bae(ee)?ja(ee,2,111551):Qk(ee)?on(ee,1,111551):on(ee,1,111550)}}function ve(ee){if(!(ee.kind===341&&h.kind!==323)&&(de&&!(ee.flags&33554432)&&ki(ee,ee.name),ta(ee.name)?Ls(ee,1,"__"+ee.parent.parameters.indexOf(ee)):on(ee,1,111551),vp(ee,ee.parent))){const Xe=ee.parent.parent;We(Xe.symbol.members,Xe.symbol,ee,4|(ee.questionToken?16777216:0),0)}}function Ot(ee){!t.isDeclarationFile&&!(ee.flags&33554432)&&W8(ee)&&(pe|=4096),uh(ee),de?(Pp(ee),ja(ee,16,110991)):on(ee,16,110991)}function mi(ee){!t.isDeclarationFile&&!(ee.flags&33554432)&&W8(ee)&&(pe|=4096),N&&(ee.flowNode=N),uh(ee);const Xe=ee.name?ee.name.escapedText:"__function";return Ls(ee,16,Xe)}function Ci(ee,Xe,Zt){return!t.isDeclarationFile&&!(ee.flags&33554432)&&W8(ee)&&(pe|=4096),N&&zG(ee)&&(ee.flowNode=N),Jb(ee)?Ls(ee,Xe,"__computed"):on(ee,Xe,Zt)}function hn(ee){const Xe=Qi(ee,Zt=>Zt.parent&&iD(Zt.parent)&&Zt.parent.extendsType===Zt);return Xe&&Xe.parent}function Wn(ee){if(Rg(ee.parent)){const Xe=rK(ee.parent);Xe?(j.assertNode(Xe,Ay),Xe.locals??(Xe.locals=_a()),We(Xe.locals,void 0,ee,262144,526824)):on(ee,262144,526824)}else if(ee.parent.kind===195){const Xe=hn(ee.parent);Xe?(j.assertNode(Xe,Ay),Xe.locals??(Xe.locals=_a()),We(Xe.locals,void 0,ee,262144,526824)):Ls(ee,262144,He(ee))}else on(ee,262144,526824)}function Lr(ee){const Xe=nC(ee);return Xe===1||Xe===2&&sx(r)}function ps(ee){if(!(N.flags&1))return!1;if(N===Ae&&($W(ee)&&ee.kind!==242||ee.kind===263||MYe(ee,r)||ee.kind===267&&Lr(ee))&&(N=ke,!r.allowUnreachableCode)){const Zt=IDe(r)&&!(ee.flags&33554432)&&(!Lu(ee)||!!(zb(ee.declarationList)&7)||ee.declarationList.declarations.some(Nn=>!!Nn.initializer));wMt(ee,r,(Nn,Is)=>Rn(Zt,Nn,Is,k.Unreachable_code_detected))}return!0}}function MYe(t,r){return t.kind===266&&(!Uk(t)||sx(r))}function wMt(t,r,a){if(Ps(t)&&u(t)&&Xo(t.parent)){const{statements:p}=t.parent,g=jce(p,t);Ey(g,u,(C,b)=>a(g[C],g[b-1]))}else a(t,t);function u(p){return!Wu(p)&&!h(p)&&!(Lu(p)&&!(zb(p)&7)&&p.declarationList.declarations.some(g=>!g.initializer))}function h(p){switch(p.kind){case 264:case 265:return!0;case 267:return nC(p)!==1;case 266:return!MYe(p,r);default:return!1}}}function dD(t,r){let a=0;const u=JR();for(u.enqueue(r);!u.isEmpty()&&a<100;){if(a++,r=u.dequeue(),yI(r)||Wv(r))return!0;if(ot(r)){const h=dQ(t,r.escapedText);if(h&&h.valueDeclaration&&_s(h.valueDeclaration)&&h.valueDeclaration.initializer){const p=h.valueDeclaration.initializer;u.enqueue(p),lf(p,!0)&&(u.enqueue(p.left),u.enqueue(p.right))}}}return!1}function wue(t){switch(t.kind){case 231:case 263:case 266:case 210:case 187:case 322:case 292:return 1;case 264:return 65;case 267:case 265:case 200:case 181:return 33;case 307:return 37;case 177:case 178:case 174:if(zG(t))return 173;case 176:case 262:case 173:case 179:case 323:case 317:case 184:case 180:case 185:case 175:return 45;case 218:case 219:return 61;case 268:return 4;case 172:return t.initializer?4:0;case 299:case 248:case 249:case 250:case 269:return 34;case 241:return Ho(t.parent)||gu(t.parent)?0:34}return 0}function dQ(t,r){var a,u,h,p;const g=(u=(a=Jr(t,Ay))==null?void 0:a.locals)==null?void 0:u.get(r);if(g)return g.exportSymbol??g;if(Os(t)&&t.jsGlobalAugmentations&&t.jsGlobalAugmentations.has(r))return t.jsGlobalAugmentations.get(r);if(M0(t))return(p=(h=t.symbol)==null?void 0:h.exports)==null?void 0:p.get(r)}function bNe(t,r,a,u,h,p,g,C,b,T){return E;function E(N=()=>!0){const R=[],F=[];return{walkType:Ie=>{try{return H(Ie),{visitedTypes:So(R),visitedSymbols:So(F)}}finally{An(R),An(F)}},walkSymbol:Ie=>{try{return ue(Ie),{visitedTypes:So(R),visitedSymbols:So(F)}}finally{An(R),An(F)}}};function H(Ie){if(!(!Ie||R[Ie.id]||(R[Ie.id]=Ie,ue(Ie.symbol)))){if(Ie.flags&524288){const he=Ie,Ae=he.objectFlags;Ae&4&&U(Ie),Ae&32&&re(Ie),Ae&3&&pe(Ie),Ae&24&&de(he)}Ie.flags&262144&&q(Ie),Ie.flags&3145728&&X(Ie),Ie.flags&4194304&&Z(Ie),Ie.flags&8388608&&Q(Ie)}}function U(Ie){H(Ie.target),O(T(Ie),H)}function q(Ie){H(C(Ie))}function X(Ie){O(Ie.types,H)}function Z(Ie){H(Ie.type)}function Q(Ie){H(Ie.objectType),H(Ie.indexType),H(Ie.constraint)}function re(Ie){H(Ie.typeParameter),H(Ie.constraintType),H(Ie.templateType),H(Ie.modifiersType)}function oe(Ie){const we=r(Ie);we&&H(we.type),O(Ie.typeParameters,H);for(const he of Ie.parameters)ue(he);H(t(Ie)),H(a(Ie))}function pe(Ie){de(Ie),O(Ie.typeParameters,H),O(u(Ie),H),H(Ie.thisType)}function de(Ie){const we=h(Ie);for(const he of we.indexInfos)H(he.keyType),H(he.type);for(const he of we.callSignatures)oe(he);for(const he of we.constructSignatures)oe(he);for(const he of we.properties)ue(he)}function ue(Ie){if(!Ie)return!1;const we=Ba(Ie);if(F[we])return!1;if(F[we]=Ie,!N(Ie))return!0;const he=p(Ie);return H(he),Ie.exports&&Ie.exports.forEach(ue),O(Ie.declarations,Ae=>{if(Ae.type&&Ae.type.kind===186){const ke=Ae.type,Te=g(b(ke.exprName));ue(Te)}}),!1}}}var wS={};c(wS,{RelativePreference:()=>RYe,countPathComponents:()=>_Q,forEachFileNameOfModule:()=>jYe,getLocalModuleSpecifierBetweenFileNames:()=>IMt,getModuleSpecifier:()=>TMt,getModuleSpecifierPreferences:()=>BH,getModuleSpecifiers:()=>WYe,getModuleSpecifiersWithCacheInfo:()=>VYe,getNodeModulesPackageName:()=>DMt,tryGetJSExtensionForFile:()=>kue,tryGetModuleSpecifiersFromCache:()=>EMt,tryGetRealFileNameForNonJsDeclarationFileName:()=>JYe,updateModuleSpecifier:()=>kMt});var xMt=x1(t=>{try{let r=t.indexOf("/");if(r!==0)return new RegExp(t);const a=t.lastIndexOf("/");if(r===a)return new RegExp(t);for(;(r=t.indexOf("/",r+1))!==a;)if(t[r-1]!=="\\")return new RegExp(t);const u=t.substring(a+1).replace(/[^iu]/g,"");return t=t.substring(1,a),new RegExp(t,u)}catch{return}}),RYe=(t=>(t[t.Relative=0]="Relative",t[t.NonRelative=1]="NonRelative",t[t.Shortest=2]="Shortest",t[t.ExternalNonRelative=3]="ExternalNonRelative",t))(RYe||{});function BH({importModuleSpecifierPreference:t,importModuleSpecifierEnding:r,autoImportSpecifierExcludeRegexes:a},u,h,p,g){const C=b();return{excludeRegexes:a,relativePreference:g!==void 0?Gd(g)?0:1:t==="relative"?0:t==="non-relative"?1:t==="project-relative"?3:2,getAllowedEndingsInPreferredOrder:T=>{const E=Tue(p,u,h),N=T!==E?b(T):C,R=yh(h);if((T??E)===99&&3<=R&&R<=99)return W3(h,p.fileName)?[3,2]:[2];if(yh(h)===1)return N===2?[2,1]:[1,2];const F=W3(h,p.fileName);switch(N){case 2:return F?[2,3,0,1]:[2,0,1];case 3:return[3,0,2,1];case 1:return F?[1,0,3,2]:[1,0,2];case 0:return F?[0,1,3,2]:[0,1,2];default:j.assertNever(N)}}};function b(T){if(g!==void 0){if(Uv(g))return 2;if(su(g,"/index"))return 1}return HDe(r,T??Tue(p,u,h),h,Fy(p)?p:void 0)}}function kMt(t,r,a,u,h,p,g={}){const C=FYe(t,r,a,u,h,BH({},h,t,r,p),{},g);if(C!==p)return C}function TMt(t,r,a,u,h,p={}){return FYe(t,r,a,u,h,BH({},h,t,r),{},p)}function DMt(t,r,a,u,h,p={}){const g=hQ(r.fileName,u),C=zYe(g,a,u,h,t,p);return J(C,b=>wNe(b,g,r,u,t,h,!0,p.overrideImportMode))}function FYe(t,r,a,u,h,p,g,C={}){const b=hQ(a,h),T=zYe(b,u,h,g,t,C);return J(T,E=>wNe(E,b,r,h,t,g,void 0,C.overrideImportMode))||CNe(u,b,t,h,C.overrideImportMode||Tue(r,h,t),p)}function EMt(t,r,a,u,h={}){const p=BYe(t,r,a,u,h);return p[1]&&{kind:p[0],moduleSpecifiers:p[1],computedWithoutCache:!1}}function BYe(t,r,a,u,h={}){var p;const g=LG(t);if(!g)return w;const C=(p=a.getModuleSpecifierCache)==null?void 0:p.call(a),b=C==null?void 0:C.get(r.path,g.path,u,h);return[b==null?void 0:b.kind,b==null?void 0:b.moduleSpecifiers,g,b==null?void 0:b.modulePaths,C]}function WYe(t,r,a,u,h,p,g={}){return VYe(t,r,a,u,h,p,g,!1).moduleSpecifiers}function VYe(t,r,a,u,h,p,g={},C){let b=!1;const T=OMt(t,r);if(T)return{kind:"ambient",moduleSpecifiers:C&&fQ(T,p.autoImportSpecifierExcludeRegexes)?w:[T],computedWithoutCache:b};let[E,N,R,F,H]=BYe(t,u,h,p,g);if(N)return{kind:E,moduleSpecifiers:N,computedWithoutCache:b};if(!R)return{kind:void 0,moduleSpecifiers:w,computedWithoutCache:b};b=!0,F||(F=UYe(hQ(u.fileName,h),R.originalFileName,h,a,g));const U=NMt(F,a,u,h,p,g,C);return H==null||H.set(u.path,R.path,p,g,U.kind,F,U.moduleSpecifiers),U}function IMt(t,r,a,u,h,p={}){const g=hQ(t.fileName,u),C=p.overrideImportMode??t.impliedNodeFormat;return CNe(r,g,a,u,C,BH(h,u,a,t))}function NMt(t,r,a,u,h,p={},g){const C=hQ(a.fileName,u),b=BH(h,u,r,a),T=Fy(a)&&O(t,U=>O(u.getFileIncludeReasons().get(ol(U.path,u.getCurrentDirectory(),C.getCanonicalFileName)),q=>{if(q.kind!==3||q.file!==a.path)return;const X=u.getModeForResolutionAtIndex(a,q.index),Z=p.overrideImportMode??u.getDefaultResolutionModeForFile(a);if(X!==Z&&X!==void 0&&Z!==void 0)return;const Q=ej(a,q.index).text;return b.relativePreference!==1||!am(Q)?Q:void 0}));if(T)return{kind:void 0,moduleSpecifiers:[T],computedWithoutCache:!0};const E=Ft(t,U=>U.isInNodeModules);let N,R,F,H;for(const U of t){const q=U.isInNodeModules?wNe(U,C,a,u,r,h,void 0,p.overrideImportMode):void 0;if(q&&!(g&&fQ(q,b.excludeRegexes))&&(N=fn(N,q),U.isRedirect))return{kind:"node_modules",moduleSpecifiers:N,computedWithoutCache:!0};if(!q){const X=CNe(U.path,C,r,u,p.overrideImportMode||a.impliedNodeFormat,b,U.isRedirect);if(!X||g&&fQ(X,b.excludeRegexes))continue;U.isRedirect?F=fn(F,X):Loe(X)?yx(X)?H=fn(H,X):R=fn(R,X):(g||!E||U.isInNodeModules)&&(H=fn(H,X))}}return R!=null&&R.length?{kind:"paths",moduleSpecifiers:R,computedWithoutCache:!0}:F!=null&&F.length?{kind:"redirect",moduleSpecifiers:F,computedWithoutCache:!0}:N!=null&&N.length?{kind:"node_modules",moduleSpecifiers:N,computedWithoutCache:!0}:{kind:"relative",moduleSpecifiers:H??w,computedWithoutCache:!0}}function fQ(t,r){return Ft(r,a=>{var u;return!!((u=xMt(a))!=null&&u.test(t))})}function hQ(t,r){t=wo(t,r.getCurrentDirectory());const a=Mf(r.useCaseSensitiveFileNames?r.useCaseSensitiveFileNames():!0),u=ts(t);return{getCanonicalFileName:a,importingSourceFileName:t,sourceDirectory:u,canonicalSourceDirectory:a(u)}}function CNe(t,r,a,u,h,{getAllowedEndingsInPreferredOrder:p,relativePreference:g,excludeRegexes:C},b){const{baseUrl:T,paths:E,rootDirs:N}=a;if(b&&!E)return;const{sourceDirectory:R,canonicalSourceDirectory:F,getCanonicalFileName:H}=r,U=p(h),q=N&&FMt(N,t,R,H,U,a)||WH(sI(c0(R,t,H)),U,a);if(!T&&!E&&!OK(a)||g===0)return b?void 0:q;const X=wo(pK(a,u)||T,u.getCurrentDirectory()),Z=GYe(t,X,H);if(!Z)return b?void 0:q;const Q=b?void 0:RMt(t,R,a,u,h,WMt(U)),re=b||Q===void 0?E&&qYe(Z,E,U,u,a):void 0;if(b)return re;const oe=Q??(re===void 0&&T!==void 0?WH(Z,U,a):re);if(!oe)return q;const pe=fQ(q,C),de=fQ(oe,C);if(!pe&&de)return q;if(pe&&!de||g===1&&!am(oe))return oe;if(g===3&&!am(oe)){const ue=a.configFilePath?ol(ts(a.configFilePath),u.getCurrentDirectory(),r.getCanonicalFileName):r.getCanonicalFileName(u.getCurrentDirectory()),Ie=ol(t,ue,H),we=so(F,ue),he=so(Ie,ue);if(we&&!he||!we&&he)return oe;const Ae=SNe(u,ts(Ie)),ke=SNe(u,R),Te=!yP(u);return LMt(Ae,ke,Te)?q:oe}return KYe(oe)||_Q(q)<_Q(oe)?q:oe}function LMt(t,r,a){return t===r?!0:t===void 0||r===void 0?!1:Hb(t,r,a)===0}function _Q(t){let r=0;for(let a=so(t,"./")?2:0;a<t.length;a++)t.charCodeAt(a)===47&&r++;return r}function HYe(t,r){return Ak(r.isRedirect,t.isRedirect)||ZV(t.path,r.path)}function SNe(t,r){return t.getNearestAncestorDirectoryWithPackageJson?t.getNearestAncestorDirectoryWithPackageJson(r):kg(r,a=>t.fileExists(zr(a,"package.json"))?a:void 0)}function jYe(t,r,a,u,h){var p;const g=hS(a),C=a.getCurrentDirectory(),b=a.isSourceOfProjectReferenceRedirect(r)?a.getProjectReferenceRedirect(r):void 0,T=ol(r,C,g),E=a.redirectTargetsMap.get(T)||w,R=[...b?[b]:w,r,...E].map(X=>wo(X,C));let F=!Ce(R,a7);if(!u){const X=O(R,Z=>!(F&&a7(Z))&&h(Z,b===Z));if(X)return X}const H=(p=a.getSymlinkCache)==null?void 0:p.call(a).getSymlinkedDirectoriesByRealpath(),U=wo(r,C);return H&&kg(ts(U),X=>{const Z=H.get(Ad(ol(X,C,g)));if(Z)return Ooe(t,X,g)?!1:O(R,Q=>{if(!Ooe(Q,X,g))return;const re=c0(X,Q,g);for(const oe of Z){const pe=Ok(oe,re),de=h(pe,Q===b);if(F=!0,de)return de}})})||(u?O(R,X=>F&&a7(X)?void 0:h(X,X===b)):void 0)}function zYe(t,r,a,u,h,p={}){var g;const C=ol(t.importingSourceFileName,a.getCurrentDirectory(),hS(a)),b=ol(r,a.getCurrentDirectory(),hS(a)),T=(g=a.getModuleSpecifierCache)==null?void 0:g.call(a);if(T){const N=T.get(C,b,u,p);if(N!=null&&N.modulePaths)return N.modulePaths}const E=UYe(t,r,a,h,p);return T&&T.setModulePaths(C,b,u,p,E),E}var PMt=["dependencies","peerDependencies","optionalDependencies"];function AMt(t){let r;for(const a of PMt){const u=t[a];u&&typeof u=="object"&&(r=Js(r,wr(u)))}return r}function UYe(t,r,a,u,h){var p,g;const C=(p=a.getModuleResolutionCache)==null?void 0:p.call(a),b=(g=a.getSymlinkCache)==null?void 0:g.call(a);if(C&&b&&a.readFile&&!yx(t.importingSourceFileName)){j.type(a);const N=W7(C.getPackageJsonInfoCache(),a,{}),R=V7(ts(t.importingSourceFileName),N);if(R){const F=AMt(R.contents.packageJsonContent);for(const H of F||w){const U=nA(H,zr(R.packageDirectory,"package.json"),u,a,C,void 0,h.overrideImportMode);b.setSymlinksFromResolution(U.resolvedModule)}}}const T=new Map;jYe(t.importingSourceFileName,r,a,!0,(N,R)=>{const F=yx(N);T.set(N,{path:t.getCanonicalFileName(N),isRedirect:R,isInNodeModules:F})});const E=[];for(let N=t.canonicalSourceDirectory;T.size!==0;){const R=Ad(N);let F;T.forEach(({path:U,isRedirect:q,isInNodeModules:X},Z)=>{so(U,R)&&((F||(F=[])).push({path:Z,isRedirect:q,isInNodeModules:X}),T.delete(Z))}),F&&(F.length>1&&F.sort(HYe),E.push(...F));const H=ts(N);if(H===N)break;N=H}if(T.size){const N=as(T.entries(),([R,{isRedirect:F,isInNodeModules:H}])=>({path:R,isRedirect:F,isInNodeModules:H}));N.length>1&&N.sort(HYe),E.push(...N)}return E}function OMt(t,r){var a;const u=(a=t.declarations)==null?void 0:a.find(g=>Sae(g)&&(!BT(g)||!Gd(Lg(g.name))));if(u)return u.name.text;const p=es(t.declarations,g=>{var C,b,T,E;if(!rd(g))return;const N=U(g);if(!((C=N==null?void 0:N.parent)!=null&&C.parent&&H1(N.parent)&&Vh(N.parent.parent)&&Os(N.parent.parent.parent)))return;const R=(E=(T=(b=N.parent.parent.symbol.exports)==null?void 0:b.get("export="))==null?void 0:T.valueDeclaration)==null?void 0:E.expression;if(!R)return;const F=r.getSymbolAtLocation(R);if(!F)return;if(((F==null?void 0:F.flags)&2097152?r.getAliasedSymbol(F):F)===g.symbol)return N.parent.parent;function U(q){for(;q.flags&8;)q=q.parent;return q}})[0];if(p)return p.name.text}function qYe(t,r,a,u,h){for(const g in r)for(const C of r[g]){const b=ca(C),T=b.indexOf("*"),E=a.map(N=>({ending:N,value:WH(t,[N],h)}));if(qv(b)&&E.push({ending:void 0,value:t}),T!==-1){const N=b.substring(0,T),R=b.substring(T+1);for(const{ending:F,value:H}of E)if(H.length>=N.length+R.length&&so(H,N)&&su(H,R)&&p({ending:F,value:H})){const U=H.substring(N.length,H.length-R.length);if(!am(U))return xI(g,U)}}else if(Ft(E,N=>N.ending!==0&&b===N.value)||Ft(E,N=>N.ending===0&&b===N.value&&p(N)))return g}function p({ending:g,value:C}){return g!==0||C===WH(t,[g],h,u)}}function pQ(t,r,a,u,h,p,g,C,b,T){if(typeof p=="string"){const E=!yP(r),N=()=>r.getCommonSourceDirectory(),R=b&&Yue(a,t,E,N),F=b&&Zue(a,t,E,N),H=wo(zr(u,p),void 0),U=IP(a)?s_(a)+kue(a,t):void 0,q=T&&WDe(a);switch(C){case 0:if(U&&Hb(U,H,E)===0||Hb(a,H,E)===0||R&&Hb(R,H,E)===0||F&&Hb(F,H,E)===0)return{moduleFileToTry:h};break;case 1:if(q&&Vm(a,H,E)){const re=c0(H,a,!1);return{moduleFileToTry:wo(zr(zr(h,p),re),void 0)}}if(U&&Vm(H,U,E)){const re=c0(H,U,!1);return{moduleFileToTry:wo(zr(zr(h,p),re),void 0)}}if(!q&&Vm(H,a,E)){const re=c0(H,a,!1);return{moduleFileToTry:wo(zr(zr(h,p),re),void 0)}}if(R&&Vm(H,R,E)){const re=c0(H,R,!1);return{moduleFileToTry:zr(h,re)}}if(F&&Vm(H,F,E)){const re=YJ(c0(H,F,!1),xue(F,t));return{moduleFileToTry:zr(h,re)}}break;case 2:const X=H.indexOf("*"),Z=H.slice(0,X),Q=H.slice(X+1);if(q&&so(a,Z,E)&&su(a,Q,E)){const re=a.slice(Z.length,a.length-Q.length);return{moduleFileToTry:xI(h,re)}}if(U&&so(U,Z,E)&&su(U,Q,E)){const re=U.slice(Z.length,U.length-Q.length);return{moduleFileToTry:xI(h,re)}}if(!q&&so(a,Z,E)&&su(a,Q,E)){const re=a.slice(Z.length,a.length-Q.length);return{moduleFileToTry:xI(h,re)}}if(R&&so(R,Z,E)&&su(R,Q,E)){const re=R.slice(Z.length,R.length-Q.length);return{moduleFileToTry:xI(h,re)}}if(F&&so(F,Z,E)&&su(F,Q,E)){const re=F.slice(Z.length,F.length-Q.length),oe=xI(h,re),pe=kue(F,t);return pe?{moduleFileToTry:YJ(oe,pe)}:void 0}break}}else{if(Array.isArray(p))return O(p,E=>pQ(t,r,a,u,h,E,g,C,b,T));if(typeof p=="object"&&p!==null){for(const E of wr(p))if(E==="default"||g.indexOf(E)>=0||RH(g,E)){const N=p[E],R=pQ(t,r,a,u,h,N,g,C,b,T);if(R)return R}}}}function MMt(t,r,a,u,h,p,g){return typeof p=="object"&&p!==null&&!Array.isArray(p)&&lQ(p)?O(wr(p),C=>{const b=wo(zr(h,C),void 0),T=su(C,"/")?1:C.includes("*")?2:0;return pQ(t,r,a,u,b,p[C],g,T,!1,!1)}):pQ(t,r,a,u,h,p,g,0,!1,!1)}function RMt(t,r,a,u,h,p){var g,C,b;if(!u.readFile||!OK(a))return;const T=SNe(u,r);if(!T)return;const E=zr(T,"package.json"),N=(C=(g=u.getPackageJsonInfoCache)==null?void 0:g.call(u))==null?void 0:C.getPackageJsonInfo(E);if(nNe(N)||!u.fileExists(E))return;const R=(N==null?void 0:N.contents.packageJsonContent)||kK(u.readFile(E)),F=R==null?void 0:R.imports;if(!F)return;const H=gx(a,h);return(b=O(wr(F),U=>{if(!so(U,"#")||U==="#"||so(U,"#/"))return;const q=su(U,"/")?1:U.includes("*")?2:0;return pQ(a,u,t,T,U,F[U],H,q,!0,p)}))==null?void 0:b.moduleFileToTry}function FMt(t,r,a,u,h,p){const g=$Ye(r,t,u);if(g===void 0)return;const C=$Ye(a,t,u),b=Rr(C,E=>qt(g,N=>sI(c0(E,N,u)))),T=Zse(b,ZV);if(T)return WH(T,h,p)}function wNe({path:t,isRedirect:r},{getCanonicalFileName:a,canonicalSourceDirectory:u},h,p,g,C,b,T){if(!p.fileExists||!p.readFile)return;const E=iX(t);if(!E)return;const R=BH(C,p,g,h).getAllowedEndingsInPreferredOrder();let F=t,H=!1;if(!b){let re=E.packageRootIndex,oe;for(;;){const{moduleFileToTry:pe,packageRootPath:de,blockedByExports:ue,verbatimFromExports:Ie}=Q(re);if(yh(g)!==1){if(ue)return;if(Ie)return pe}if(de){F=de,H=!0;break}if(oe||(oe=pe),re=t.indexOf(Kl,re+1),re===-1){F=WH(oe,R,g,p);break}}}if(r&&!H)return;const U=p.getGlobalTypingsCacheLocation&&p.getGlobalTypingsCacheLocation(),q=a(F.substring(0,E.topLevelNodeModulesIndex));if(!(so(u,q)||U&&so(a(U),q)))return;const X=F.substring(E.topLevelPackageNameIndex+1),Z=H7(X);return yh(g)===1&&Z===X?void 0:Z;function Q(re){var oe,pe;const de=t.substring(0,re),ue=zr(de,"package.json");let Ie=t,we=!1;const he=(pe=(oe=p.getPackageJsonInfoCache)==null?void 0:oe.call(p))==null?void 0:pe.getPackageJsonInfo(ue);if(rQ(he)||he===void 0&&p.fileExists(ue)){const Ae=(he==null?void 0:he.contents.packageJsonContent)||kK(p.readFile(ue)),ke=T||Tue(h,p,g);if(JV(g)){const qe=de.substring(E.topLevelPackageNameIndex+1),se=H7(qe),Ne=gx(g,ke),Oe=Ae!=null&&Ae.exports?MMt(g,p,t,de,se,Ae.exports,Ne):void 0;if(Oe)return{...Oe,verbatimFromExports:!0};if(Ae!=null&&Ae.exports)return{moduleFileToTry:t,blockedByExports:!0}}const Te=Ae!=null&&Ae.typesVersions?iQ(Ae.typesVersions):void 0;if(Te){const qe=t.slice(de.length+1),se=qYe(qe,Te.paths,R,p,g);se===void 0?we=!0:Ie=zr(de,se)}const De=(Ae==null?void 0:Ae.typings)||(Ae==null?void 0:Ae.types)||(Ae==null?void 0:Ae.main)||"index.js";if(Oo(De)&&!(we&&Hce(XK(Te.paths),De))){const qe=ol(De,de,a),se=a(Ie);if(s_(qe)===s_(se))return{packageRootPath:de,moduleFileToTry:Ie};if((Ae==null?void 0:Ae.type)!=="module"&&!Ru(se,KK)&&so(se,qe)&&ts(se)===Mk(qe)&&s_(ud(se))==="index")return{packageRootPath:de,moduleFileToTry:Ie}}}else{const Ae=a(Ie.substring(E.packageRootIndex+1));if(Ae==="index.d.ts"||Ae==="index.js"||Ae==="index.ts"||Ae==="index.tsx")return{moduleFileToTry:Ie,packageRootPath:de}}return{moduleFileToTry:Ie}}}function BMt(t,r){if(!t.fileExists)return;const a=Dr(e7({allowJs:!0},[{extension:"node",isMixedContent:!1},{extension:"json",isMixedContent:!1,scriptKind:6}]));for(const u of a){const h=r+u;if(t.fileExists(h))return h}}function $Ye(t,r,a){return es(r,u=>{const h=GYe(t,u,a);return h!==void 0&&KYe(h)?void 0:h})}function WH(t,r,a,u){if(Ru(t,[".json",".mjs",".cjs"]))return t;const h=s_(t);if(t===h)return t;const p=r.indexOf(2),g=r.indexOf(3);if(Ru(t,[".mts",".cts"])&&g!==-1&&g<p)return t;if(Ru(t,[".d.mts",".mts",".d.cts",".cts"]))return h+xue(t,a);if(!Ru(t,[".d.ts"])&&Ru(t,[".ts"])&&t.includes(".d."))return JYe(t);switch(r[0]){case 0:const C=I6(h,"/index");return u&&C!==h&&BMt(u,C)?h:C;case 1:return h;case 2:return h+xue(t,a);case 3:if(df(t)){const b=r.findIndex(T=>T===0||T===1);return b!==-1&&b<p?h:h+xue(t,a)}return t;default:return j.assertNever(r[0])}}function JYe(t){const r=ud(t);if(!su(t,".ts")||!r.includes(".d.")||Ru(r,[".d.ts"]))return;const a=YV(t,".ts"),u=a.substring(a.lastIndexOf("."));return a.substring(0,a.indexOf(".d."))+u}function xue(t,r){return kue(t,r)??j.fail(`Extension ${i7(t)} is unsupported:: FileName:: ${t}`)}function kue(t,r){const a=qv(t);switch(a){case".ts":case".d.ts":return".js";case".tsx":return r.jsx===1?".jsx":".js";case".js":case".jsx":case".json":return a;case".d.mts":case".mts":case".mjs":return".mjs";case".d.cts":case".cts":case".cjs":return".cjs";default:return}}function GYe(t,r,a){const u=QL(r,t,r,a,!1);return yp(u)?void 0:u}function KYe(t){return so(t,"..")}function Tue(t,r,a){return Fy(t)?r.getDefaultResolutionModeForFile(t):WQ(t,a)}function WMt(t){const r=t.indexOf(3);return r>-1&&r<t.indexOf(2)}var xNe=/^".+"$/,Due="(anonymous)",XYe=1,QYe=1,ZYe=1,YYe=1,Eue=(t=>(t[t.None=0]="None",t[t.TypeofEQString=1]="TypeofEQString",t[t.TypeofEQNumber=2]="TypeofEQNumber",t[t.TypeofEQBigInt=4]="TypeofEQBigInt",t[t.TypeofEQBoolean=8]="TypeofEQBoolean",t[t.TypeofEQSymbol=16]="TypeofEQSymbol",t[t.TypeofEQObject=32]="TypeofEQObject",t[t.TypeofEQFunction=64]="TypeofEQFunction",t[t.TypeofEQHostObject=128]="TypeofEQHostObject",t[t.TypeofNEString=256]="TypeofNEString",t[t.TypeofNENumber=512]="TypeofNENumber",t[t.TypeofNEBigInt=1024]="TypeofNEBigInt",t[t.TypeofNEBoolean=2048]="TypeofNEBoolean",t[t.TypeofNESymbol=4096]="TypeofNESymbol",t[t.TypeofNEObject=8192]="TypeofNEObject",t[t.TypeofNEFunction=16384]="TypeofNEFunction",t[t.TypeofNEHostObject=32768]="TypeofNEHostObject",t[t.EQUndefined=65536]="EQUndefined",t[t.EQNull=131072]="EQNull",t[t.EQUndefinedOrNull=262144]="EQUndefinedOrNull",t[t.NEUndefined=524288]="NEUndefined",t[t.NENull=1048576]="NENull",t[t.NEUndefinedOrNull=2097152]="NEUndefinedOrNull",t[t.Truthy=4194304]="Truthy",t[t.Falsy=8388608]="Falsy",t[t.IsUndefined=16777216]="IsUndefined",t[t.IsNull=33554432]="IsNull",t[t.IsUndefinedOrNull=50331648]="IsUndefinedOrNull",t[t.All=134217727]="All",t[t.BaseStringStrictFacts=3735041]="BaseStringStrictFacts",t[t.BaseStringFacts=12582401]="BaseStringFacts",t[t.StringStrictFacts=16317953]="StringStrictFacts",t[t.StringFacts=16776705]="StringFacts",t[t.EmptyStringStrictFacts=12123649]="EmptyStringStrictFacts",t[t.EmptyStringFacts=12582401]="EmptyStringFacts",t[t.NonEmptyStringStrictFacts=7929345]="NonEmptyStringStrictFacts",t[t.NonEmptyStringFacts=16776705]="NonEmptyStringFacts",t[t.BaseNumberStrictFacts=3734786]="BaseNumberStrictFacts",t[t.BaseNumberFacts=12582146]="BaseNumberFacts",t[t.NumberStrictFacts=16317698]="NumberStrictFacts",t[t.NumberFacts=16776450]="NumberFacts",t[t.ZeroNumberStrictFacts=12123394]="ZeroNumberStrictFacts",t[t.ZeroNumberFacts=12582146]="ZeroNumberFacts",t[t.NonZeroNumberStrictFacts=7929090]="NonZeroNumberStrictFacts",t[t.NonZeroNumberFacts=16776450]="NonZeroNumberFacts",t[t.BaseBigIntStrictFacts=3734276]="BaseBigIntStrictFacts",t[t.BaseBigIntFacts=12581636]="BaseBigIntFacts",t[t.BigIntStrictFacts=16317188]="BigIntStrictFacts",t[t.BigIntFacts=16775940]="BigIntFacts",t[t.ZeroBigIntStrictFacts=12122884]="ZeroBigIntStrictFacts",t[t.ZeroBigIntFacts=12581636]="ZeroBigIntFacts",t[t.NonZeroBigIntStrictFacts=7928580]="NonZeroBigIntStrictFacts",t[t.NonZeroBigIntFacts=16775940]="NonZeroBigIntFacts",t[t.BaseBooleanStrictFacts=3733256]="BaseBooleanStrictFacts",t[t.BaseBooleanFacts=12580616]="BaseBooleanFacts",t[t.BooleanStrictFacts=16316168]="BooleanStrictFacts",t[t.BooleanFacts=16774920]="BooleanFacts",t[t.FalseStrictFacts=12121864]="FalseStrictFacts",t[t.FalseFacts=12580616]="FalseFacts",t[t.TrueStrictFacts=7927560]="TrueStrictFacts",t[t.TrueFacts=16774920]="TrueFacts",t[t.SymbolStrictFacts=7925520]="SymbolStrictFacts",t[t.SymbolFacts=16772880]="SymbolFacts",t[t.ObjectStrictFacts=7888800]="ObjectStrictFacts",t[t.ObjectFacts=16736160]="ObjectFacts",t[t.FunctionStrictFacts=7880640]="FunctionStrictFacts",t[t.FunctionFacts=16728e3]="FunctionFacts",t[t.VoidFacts=9830144]="VoidFacts",t[t.UndefinedFacts=26607360]="UndefinedFacts",t[t.NullFacts=42917664]="NullFacts",t[t.EmptyObjectStrictFacts=83427327]="EmptyObjectStrictFacts",t[t.EmptyObjectFacts=83886079]="EmptyObjectFacts",t[t.UnknownFacts=83886079]="UnknownFacts",t[t.AllTypeofNE=556800]="AllTypeofNE",t[t.OrFactsMask=8256]="OrFactsMask",t[t.AndFactsMask=134209471]="AndFactsMask",t))(Eue||{}),kNe=new Map(Object.entries({string:256,number:512,bigint:1024,boolean:2048,symbol:4096,undefined:524288,object:8192,function:16384})),Iue=(t=>(t[t.Normal=0]="Normal",t[t.Contextual=1]="Contextual",t[t.Inferential=2]="Inferential",t[t.SkipContextSensitive=4]="SkipContextSensitive",t[t.SkipGenericFunctions=8]="SkipGenericFunctions",t[t.IsForSignatureHelp=16]="IsForSignatureHelp",t[t.RestBindingElement=32]="RestBindingElement",t[t.TypeOnly=64]="TypeOnly",t))(Iue||{}),Nue=(t=>(t[t.None=0]="None",t[t.BivariantCallback=1]="BivariantCallback",t[t.StrictCallback=2]="StrictCallback",t[t.IgnoreReturnTypes=4]="IgnoreReturnTypes",t[t.StrictArity=8]="StrictArity",t[t.StrictTopSignature=16]="StrictTopSignature",t[t.Callback=3]="Callback",t))(Nue||{}),VMt=jJ(tet,jMt),Lue=new Map(Object.entries({Uppercase:0,Lowercase:1,Capitalize:2,Uncapitalize:3,NoInfer:4})),eet=class{};function HMt(){this.flags=0}function Sc(t){return t.id||(t.id=QYe,QYe++),t.id}function Ba(t){return t.id||(t.id=XYe,XYe++),t.id}function Pue(t,r){const a=nC(t);return a===1||r&&a===2}function TNe(t){var r=[],a=o=>{r.push(o)},u,h,p=Hf.getSymbolConstructor(),g=Hf.getTypeConstructor(),C=Hf.getSignatureConstructor(),b=0,T=0,E=0,N=0,R=0,F=0,H,U,q=!1,X=_a(),Z=[1],Q=t.getCompilerOptions(),re=Ja(Q),oe=zh(Q),pe=!!Q.experimentalDecorators,de=GV(Q),ue=Pce(Q),Ie=EP(Q),we=ah(Q,"strictNullChecks"),he=ah(Q,"strictFunctionTypes"),Ae=ah(Q,"strictBindCallApply"),ke=ah(Q,"strictPropertyInitialization"),Te=ah(Q,"strictBuiltinIteratorReturn"),De=ah(Q,"noImplicitAny"),qe=ah(Q,"noImplicitThis"),se=ah(Q,"useUnknownInCatchVariables"),Ne=Q.exactOptionalPropertyTypes,Oe=!!Q.noUncheckedSideEffectImports,He=_ii(),Pe=Xsi(),We=JY(),ze=IPe(Q,{isEntityNameVisible:yz,isExpandoFunctionDeclaration:lyt,getAllAccessorDeclarations:Ste,requiresAddingImplicitUndefined:Mge,isUndefinedIdentifierExpression(o){return j.assert(F0(o)),Zg(o)===et},isDefinitelyReferenceToGlobalSymbolObject:Xd}),Nt=sEe({evaluateElementAccessExpression:Wri,evaluateEntityNameExpression:z1t}),$e=_a(),et=$a(4,"undefined");et.declarations=[];var Me=$a(1536,"globalThis",8);Me.exports=$e,Me.declarations=[],$e.set(Me.escapedName,Me);var ut=$a(4,"arguments"),wt=$a(4,"require"),Et=Q.verbatimModuleSyntax?"verbatimModuleSyntax":"isolatedModules",dt=!Q.verbatimModuleSyntax,zt,Ei,tn=0,xn,Pn=0,_i=Yce({compilerOptions:Q,requireSymbol:wt,argumentsSymbol:ut,globals:$e,getSymbolOfDeclaration:xr,error:ft,getRequiresScopeChangeCache:eN,setRequiresScopeChangeCache:Lx,lookup:ff,onPropertyWithInvalidInitializer:tN,onFailedToResolveSymbol:Tl,onSuccessfullyResolvedSymbol:gC}),Fi=Yce({compilerOptions:Q,requireSymbol:wt,argumentsSymbol:ut,globals:$e,getSymbolOfDeclaration:xr,error:ft,getRequiresScopeChangeCache:eN,setRequiresScopeChangeCache:Lx,lookup:Mei});const On={getNodeCount:()=>oi(t.getSourceFiles(),(o,_)=>o+_.nodeCount,0),getIdentifierCount:()=>oi(t.getSourceFiles(),(o,_)=>o+_.identifierCount,0),getSymbolCount:()=>oi(t.getSourceFiles(),(o,_)=>o+_.symbolCount,T),getTypeCount:()=>b,getInstantiationCount:()=>E,getRelationCacheSizes:()=>({assignable:Op.size,identity:tp.size,subtype:ob.size,strictSubtype:Cm.size}),isUndefinedSymbol:o=>o===et,isArgumentsSymbol:o=>o===ut,isUnknownSymbol:o=>o===pt,getMergedSymbol:wc,symbolIsValue:Fp,getDiagnostics:Q1t,getGlobalDiagnostics:lsi,getRecursionIdentity:wme,getUnmatchedProperties:U8e,getTypeOfSymbolAtLocation:(o,_)=>{const y=Mo(_);return y?QZt(o,y):vt},getTypeOfSymbol:Yn,getSymbolsOfParameterPropertyDeclaration:(o,_)=>{const y=Mo(o,$s);return y===void 0?j.fail("Cannot get symbols of a synthetic parameter that cannot be resolved to a parse-tree node."):(j.assert(vp(y,y.parent)),mC(y,cu(_)))},getDeclaredTypeOfSymbol:gl,getPropertiesOfType:Ac,getPropertyOfType:(o,_)=>Ta(o,cu(_)),getPrivateIdentifierPropertyOfType:(o,_,y)=>{const S=Mo(y);if(!S)return;const D=cu(_),L=Xee(D,S);return L?nge(o,L):void 0},getTypeOfPropertyOfType:(o,_)=>Yu(o,cu(_)),getIndexInfoOfType:(o,_)=>pb(o,_===0?st:hi),getIndexInfosOfType:Ih,getIndexInfosOfIndexSymbol:BRe,getSignaturesOfType:ia,getIndexTypeOfType:(o,_)=>H2(o,_===0?st:hi),getIndexType:o=>oy(o),getBaseTypes:Ll,getBaseTypeOfLiteralType:DC,getWidenedType:lp,getWidenedLiteralType:J2,getTypeFromTypeNode:o=>{const _=Mo(o,ws);return _?Bs(_):vt},getParameterType:u1,getParameterIdentifierInfoAtPosition:Iti,getPromisedTypeOfPromise:aU,getAwaitedType:o=>r4(o),getReturnTypeOfSignature:Oc,isNullableType:Kee,getNullableType:Lee,getNonNullableType:EC,getNonOptionalType:Dme,getTypeArguments:Pl,typeToTypeNode:We.typeToTypeNode,typePredicateToTypePredicateNode:We.typePredicateToTypePredicateNode,indexInfoToIndexSignatureDeclaration:We.indexInfoToIndexSignatureDeclaration,signatureToSignatureDeclaration:We.signatureToSignatureDeclaration,symbolToEntityName:We.symbolToEntityName,symbolToExpression:We.symbolToExpression,symbolToNode:We.symbolToNode,symbolToTypeParameterDeclarations:We.symbolToTypeParameterDeclarations,symbolToParameterDeclaration:We.symbolToParameterDeclaration,typeParameterToDeclaration:We.typeParameterToDeclaration,getSymbolsInScope:(o,_)=>{const y=Mo(o);return y?usi(y,_):[]},getSymbolAtLocation:o=>{const _=Mo(o);return _?Zg(_,!0):void 0},getIndexInfosAtLocation:o=>{const _=Mo(o);return _?ysi(_):void 0},getShorthandAssignmentValueSymbol:o=>{const _=Mo(o);return _?vsi(_):void 0},getExportSpecifierLocalTargetSymbol:o=>{const _=Mo(o,vh);return _?bsi(_):void 0},getExportSymbolOfSymbol(o){return wc(o.exportSymbol||o)},getTypeAtLocation:o=>{const _=Mo(o);return _?o4(_):vt},getTypeOfAssignmentPattern:o=>{const _=Mo(o,S8);return _&&Pge(_)||vt},getPropertySymbolOfDestructuringAssignment:o=>{const _=Mo(o,ot);return _?Csi(_):void 0},signatureToString:(o,_,y,S)=>B2(o,Mo(_),y,S),typeToString:(o,_,y)=>Hn(o,Mo(_),y),symbolToString:(o,_,y,S)=>eo(o,Mo(_),y,S),typePredicateToString:(o,_,y)=>ty(o,Mo(_),y),writeSignature:(o,_,y,S,D)=>B2(o,Mo(_),y,S,D),writeType:(o,_,y,S)=>Hn(o,Mo(_),y,S),writeSymbol:(o,_,y,S,D)=>eo(o,Mo(_),y,S,D),writeTypePredicate:(o,_,y,S)=>ty(o,Mo(_),y,S),getAugmentedPropertiesOfType:M5e,getRootSymbols:ryt,getSymbolOfExpando:lge,getContextualType:(o,_)=>{const y=Mo(o,jt);if(y)return _&4?Fs(y,()=>g_(y,_)):g_(y,_)},getContextualTypeForObjectLiteralElement:o=>{const _=Mo(o,Ub);return _?g7e(_,void 0):void 0},getContextualTypeForArgumentAtIndex:(o,_)=>{const y=Mo(o,MT);return y&&m7e(y,_)},getContextualTypeForJsxAttribute:o=>{const _=Mo(o,bG);return _&&Sgt(_,void 0)},isContextSensitive:Em,getTypeOfPropertyOfContextualType:K2,getFullyQualifiedName:qS,getResolvedSignature:(o,_,y)=>ko(o,_,y,0),getCandidateSignaturesForStringLiteralCompletions:pn,getResolvedSignatureForSignatureHelp:(o,_,y)=>qr(o,()=>ko(o,_,y,16)),getExpandedParameters:u_t,hasEffectiveRestParameter:ov,containsArgumentsReference:MRe,getConstantValue:o=>{const _=Mo(o,uyt);return _?F5e(_):void 0},isValidPropertyAccess:(o,_)=>{const y=Mo(o,E2e);return!!y&&Bei(y,cu(_))},isValidPropertyAccessForCompletions:(o,_,y)=>{const S=Mo(o,Nr);return!!S&&Zgt(S,_,y)},getSignatureFromDeclaration:o=>{const _=Mo(o,Ho);return _?Dm(_):void 0},isImplementationOfOverload:o=>{const _=Mo(o,Ho);return _?cyt(_):void 0},getImmediateAliasedSymbol:Qme,getAliasedSymbol:$f,getEmitResolver:hC,requiresAddingImplicitUndefined:Mge,getExportsOfModule:Fx,getExportsAndPropertiesOfModule:P5,forEachExportAndPropertyOfModule:MD,getSymbolWalker:bNe(hKt,cg,Oc,Ll,o1,Yn,Lh,m_,K_,Pl),getAmbientModules:Boi,getJsxIntrinsicTagNamesAt:yei,isOptionalParameter:o=>{const _=Mo(o,$s);return _?cee(_):!1},tryGetMemberInModuleExports:(o,_)=>pN(cu(o),_),tryGetMemberInModuleExportsAndProperties:(o,_)=>RA(cu(o),_),tryFindAmbientModule:o=>N_t(o,!0),getApparentType:Kh,getUnionType:is,isTypeAssignableTo:Da,createAnonymousType:Xs,createSignature:_b,createSymbol:$a,createIndexInfo:nv,getAnyType:()=>Je,getStringType:()=>st,getStringLiteralType:V_,getNumberType:()=>hi,getNumberLiteralType:v0,getBigIntType:()=>vn,getBigIntLiteralType:yee,createPromiseType:ate,createArrayType:hh,getElementTypeOfArrayType:Nee,getBooleanType:()=>fi,getFalseType:o=>o?ln:Un,getTrueType:o=>o?Pt:Bt,getVoidType:()=>Ri,getUndefinedType:()=>tt,getNullType:()=>Qt,getESSymbolType:()=>wi,getNeverType:()=>Ai,getOptionalType:()=>be,getPromiseType:()=>fee(!1),getPromiseLikeType:()=>ept(!1),getAnyAsyncIterableType:()=>{const o=hee(!1);if(o!==oo)return wC(o,[Je,Je,Je])},isSymbolAccessible:n1,isArrayType:ug,isTupleType:Qa,isArrayLikeType:YS,isEmptyAnonymousObjectType:sv,isTypeInvalidDueToUnionDiscriminant:GGt,getExactOptionalProperties:TQt,getAllPossiblePropertiesOfTypes:KGt,getSuggestedSymbolForNonexistentProperty:A7e,getSuggestedSymbolForNonexistentJSXAttribute:Ggt,getSuggestedSymbolForNonexistentSymbol:(o,_,y)=>Xgt(o,cu(_),y),getSuggestedSymbolForNonexistentModule:O7e,getSuggestedSymbolForNonexistentClassMember:Jgt,getBaseConstraintOfType:Jf,getDefaultFromTypeParameter:o=>o&&o.flags&262144?qD(o):void 0,resolveName(o,_,y,S){return _i(_,cu(o),y,void 0,!1,S)},getJsxNamespace:o=>Ws(Gy(o)),getJsxFragmentFactory:o=>{const _=W5e(o);return _&&Ws(K_(_).escapedText)},getAccessibleSymbolChain:JS,getTypePredicateOfSignature:cg,resolveExternalModuleName:o=>{const _=Mo(o,jt);return _&&B_(_,_,!0)},resolveExternalModuleSymbol:sp,tryGetThisTypeAt:(o,_,y)=>{const S=Mo(o);return S&&f7e(S,_,y)},getTypeArgumentConstraint:o=>{const _=Mo(o,ws);return _&&Jii(_)},getSuggestionDiagnostics:(o,_)=>{const y=Mo(o,Os)||j.fail("Could not determine parsed source file.");if(p3(y,Q,t))return w;let S;try{return u=_,P5e(y),j.assert(!!(yr(y).flags&1)),S=Sr(S,ED.getDiagnostics(y.fileName)),p1t(X1t(y),(D,L,B)=>{!oP(D)&&!K1t(L,!!(D.flags&33554432))&&(S||(S=[])).push({...B,category:2})}),S||w}finally{u=void 0}},runWithCancellationToken:(o,_)=>{try{return u=o,_(On)}finally{u=void 0}},getLocalTypeParametersOfClassOrInterfaceOrTypeAlias:y0,isDeclarationVisible:g0,isPropertyAccessible:R7e,getTypeOnlyAliasDeclaration:ey,getMemberOverrideModifierStatus:Eri,isTypeParameterPossiblyReferenced:Cee,typeHasCallOrConstructSignatures:Age,getSymbolFlags:Eh};function pn(o,_){const y=new Set,S=[];Fs(_,()=>ko(o,S,void 0,0));for(const D of S)y.add(D);S.length=0,qr(_,()=>ko(o,S,void 0,0));for(const D of S)y.add(D);return as(y)}function qr(o,_){if(o=Qi(o,sae),o){const y=[],S=[];for(;o;){const L=yr(o);if(y.push([L,L.resolvedSignature]),L.resolvedSignature=void 0,lx(o)){const B=Ys(xr(o)),K=B.type;S.push([B,K]),B.type=void 0}o=Qi(o.parent,sae)}const D=_();for(const[L,B]of y)L.resolvedSignature=B;for(const[L,B]of S)L.type=B;return D}return _()}function Fs(o,_){const y=Qi(o,MT);if(y){let D=o;do yr(D).skipDirectInference=!0,D=D.parent;while(D&&D!==y)}q=!0;const S=qr(o,_);if(q=!1,y){let D=o;do yr(D).skipDirectInference=void 0,D=D.parent;while(D&&D!==y)}return S}function ko(o,_,y,S){const D=Mo(o,MT);zt=y;const L=D?QO(D,_,S):void 0;return zt=void 0,L}var ls=new Map,Qs=new Map,Mn=new Map,Zs=new Map,at=new Map,yi=new Map,Sn=new Map,dr=new Map,us=new Map,Xr=new Map,Gs=new Map,ma=new Map,ka=new Map,Ji=new Map,ac=new Map,St=[],ri=new Map,xe=new Set,pt=$a(4,"unknown"),Se=$a(0,"__resolving__"),Ze=new Map,gt=new Map,Dt=new Set,Je=Td(1,"any"),Rt=Td(1,"any",262144,"auto"),Ct=Td(1,"any",void 0,"wildcard"),ii=Td(1,"any",void 0,"blocked string"),vt=Td(1,"error"),Ni=Td(1,"unresolved"),ji=Td(1,"any",65536,"non-inferrable"),gr=Td(1,"intrinsic"),te=Td(2,"unknown"),tt=Td(32768,"undefined"),Gt=we?tt:Td(32768,"undefined",65536,"widening"),le=Td(32768,"undefined",void 0,"missing"),Ue=Ne?le:tt,be=Td(32768,"undefined",void 0,"optional"),Qt=Td(65536,"null"),lt=we?Qt:Td(65536,"null",65536,"widening"),st=Td(4,"string"),hi=Td(8,"number"),vn=Td(64,"bigint"),ln=Td(512,"false",void 0,"fresh"),Un=Td(512,"false"),Pt=Td(512,"true",void 0,"fresh"),Bt=Td(512,"true");Pt.regularType=Bt,Pt.freshType=Pt,Bt.regularType=Bt,Bt.freshType=Pt,ln.regularType=Un,ln.freshType=ln,Un.regularType=Un,Un.freshType=ln;var fi=is([Un,Bt]),wi=Td(4096,"symbol"),Ri=Td(16384,"void"),Ai=Td(131072,"never"),Xn=Td(131072,"never",262144,"silent"),Di=Td(131072,"never",void 0,"implicit"),on=Td(131072,"never",void 0,"unreachable"),zi=Td(67108864,"object"),cn=is([st,hi]),vi=is([st,hi,wi]),qo=is([hi,vn]),Wo=is([st,hi,fi,vn,Qt,tt]),$o=TN(["",""],[hi]),Lc=bee(o=>o.flags&262144?ZXt(o):o,()=>"(restrictive mapper)"),vu=bee(o=>o.flags&262144?Ct:o,()=>"(permissive mapper)"),Gu=Td(131072,"never",void 0,"unique literal"),Zc=bee(o=>o.flags&262144?Gu:o,()=>"(unique literal mapper)"),Ls,ja=bee(o=>(Ls&&(o===sd||o===Pp||o===Nl)&&Ls(!0),o),()=>"(unmeasurable reporter)"),wf=bee(o=>(Ls&&(o===sd||o===Pp||o===Nl)&&Ls(!1),o),()=>"(unreliable reporter)"),Jo=Xs(void 0,X,w,w,w),kh=Xs(void 0,X,w,w,w);kh.objectFlags|=2048;var md=$a(2048,"__type");md.members=_a();var go=Xs(md,X,w,w,w),pc=Xs(void 0,X,w,w,w),mc=we?is([tt,Qt,pc]):te,oo=Xs(void 0,X,w,w,w);oo.instantiations=new Map;var tc=Xs(void 0,X,w,w,w);tc.objectFlags|=262144;var ki=Xs(void 0,X,w,w,w),Gc=Xs(void 0,X,w,w,w),uh=Xs(void 0,X,w,w,w),sd=Ut(),Pp=Ut();Pp.constraint=sd;var Nl=Ut(),Ve=Ut(),_e=Ut();_e.constraint=Ve;var Lt=Iz(1,"<<unresolved>>",0,Je),ci=_b(void 0,void 0,void 0,w,Je,void 0,0,0),Mi=_b(void 0,void 0,void 0,w,vt,void 0,0,0),Rn=_b(void 0,void 0,void 0,w,Je,void 0,0,0),Yr=_b(void 0,void 0,void 0,w,Xn,void 0,0,0),Xi=nv(hi,st,!0),Mr=new Map,ds={get yieldType(){return j.fail("Not supported")},get returnType(){return j.fail("Not supported")},get nextType(){return j.fail("Not supported")}},Ks=Q2(Je,Je,Je),Ic={iterableCacheKey:"iterationTypesOfAsyncIterable",iteratorCacheKey:"iterationTypesOfAsyncIterator",iteratorSymbolName:"asyncIterator",getGlobalIteratorType:NKt,getGlobalIterableType:hee,getGlobalIterableIteratorType:tpt,getGlobalIteratorObjectType:PKt,getGlobalGeneratorType:AKt,getGlobalBuiltinIteratorTypes:LKt,resolveIterationType:(o,_)=>r4(o,_,k.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member),mustHaveANextMethodDiagnostic:k.An_async_iterator_must_have_a_next_method,mustBeAMethodDiagnostic:k.The_0_property_of_an_async_iterator_must_be_a_method,mustHaveAValueDiagnostic:k.The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property},Gl={iterableCacheKey:"iterationTypesOfIterable",iteratorCacheKey:"iterationTypesOfIterator",iteratorSymbolName:"iterator",getGlobalIteratorType:OKt,getGlobalIterableType:ome,getGlobalIterableIteratorType:ipt,getGlobalIteratorObjectType:RKt,getGlobalGeneratorType:FKt,getGlobalBuiltinIteratorTypes:MKt,resolveIterationType:(o,_)=>o,mustHaveANextMethodDiagnostic:k.An_iterator_must_have_a_next_method,mustBeAMethodDiagnostic:k.The_0_property_of_an_iterator_must_be_a_method,mustHaveAValueDiagnostic:k.The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property},Pu,Ku=new Map,Xu=new Map,Wl,Cu,gm,Qu,kd,eg,Ye,li,En,po,ic,sc,Hu,Hd,Yc,Pc,od,Ap,Vg,Y_,Jp,ym,tg,Zv,Hg,F_,jd,lC,h_,Yv,vm,ve,Ot,mi,Ci,hn,Wn,Lr,ps,ee,Xe,Zt,Nn,Is,Qo,To,Zo,uc,Xa,Yl,ig,h0,K0,eb,PS,tb,ng,rg,Vl,Gp,ep,X0=new Map,ib=0,jg=0,$y=0,uC=!1,AS=0,zg,x2,bm,Ug=[],dC=[],k2=[],Jy=0,nb=[],T2=[],xx=[],it=0,yt=V_(""),ei=v0(0),Pi=yee({negative:!1,base10Value:"0"}),nn=[],Vn=[],mn=[],Pr=0,ks=!1,ar=0,Ns=10,cr=[],Go=[],ll=[],qh=[],qg=[],$h=[],$g=[],Jh=[],DD=[],kx=[],rb=[],fC=[],OS=[],_0=[],MS=[],Tx=[],Dx=[],Ex=[],ZI=[],D2=0,lc=OV(),ED=OV(),YI=Le(),E2,sb,ob=new Map,Cm=new Map,Op=new Map,Mp=new Map,tp=new Map,Ix=new Map,vO=[[".mts",".mjs"],[".ts",".js"],[".cts",".cjs"],[".mjs",".mjs"],[".js",".js"],[".cjs",".cjs"],[".tsx",Q.jsx===1?".jsx":".js"],[".jsx",".jsx"],[".json",".json"]];return Qsi(),On;function Xd(o){return!Nr(o)||!ot(o.name)||!Nr(o.expression)&&!ot(o.expression)?!1:ot(o.expression)?Fr(o.expression)==="Symbol"&&Lh(o.expression)===(jO("Symbol",1160127,void 0)||pt):ot(o.expression.expression)?Fr(o.expression.name)==="Symbol"&&Fr(o.expression.expression)==="globalThis"&&Lh(o.expression.expression)===Me:!1}function Q0(o){return o?ac.get(o):void 0}function RS(o,_){return o&&ac.set(o,_),_}function Gy(o){if(o){const _=_n(o);if(_)if(AI(o)){if(_.localJsxFragmentNamespace)return _.localJsxFragmentNamespace;const y=_.pragmas.get("jsxfrag");if(y){const D=Ao(y)?y[0]:y;if(_.localJsxFragmentFactory=YP(D.arguments.factory,re),bt(_.localJsxFragmentFactory,dh,E_),_.localJsxFragmentFactory)return _.localJsxFragmentNamespace=K_(_.localJsxFragmentFactory).escapedText}const S=W5e(o);if(S)return _.localJsxFragmentFactory=S,_.localJsxFragmentNamespace=K_(S).escapedText}else{const y=kA(_);if(y)return _.localJsxNamespace=y}}return E2||(E2="React",Q.jsxFactory?(sb=YP(Q.jsxFactory,re),bt(sb,dh),sb&&(E2=K_(sb).escapedText)):Q.reactNamespace&&(E2=cu(Q.reactNamespace))),sb||(sb=G.createQualifiedName(G.createIdentifier(Ws(E2)),"createElement")),E2}function kA(o){if(o.localJsxNamespace)return o.localJsxNamespace;const _=o.pragmas.get("jsx");if(_){const y=Ao(_)?_[0]:_;if(o.localJsxFactory=YP(y.arguments.factory,re),bt(o.localJsxFactory,dh,E_),o.localJsxFactory)return o.localJsxNamespace=K_(o.localJsxFactory).escapedText}}function dh(o){return V0(o,-1,-1),dn(o,dh,void 0)}function hC(o,_,y){return y||Q1t(o,_),Pe}function ip(o,_,...y){const S=o?Kn(o,_,...y):Zl(_,...y),D=lc.lookup(S);return D||(lc.add(S),S)}function I2(o,_,y,...S){const D=ft(_,y,...S);return D.skippedOn=o,D}function Q1(o,_,...y){return o?Kn(o,_,...y):Zl(_,...y)}function ft(o,_,...y){const S=Q1(o,_,...y);return lc.add(S),S}function Z0(o,_){o?lc.add(_):ED.add({..._,category:2})}function Z1(o,_,y,...S){if(_.pos<0||_.end<0){if(!o)return;const D=_n(_);Z0(o,"message"in y?Md(D,0,0,y,...S):Nae(D,y));return}Z0(o,"message"in y?Kn(_,y,...S):Bv(_n(_),_,y))}function N2(o,_,y,...S){const D=ft(o,y,...S);if(_){const L=Kn(o,k.Did_you_forget_to_use_await);da(D,L)}return D}function TA(o,_){const y=Array.isArray(o)?O(o,$oe):$oe(o);return y&&da(_,Kn(y,k.The_declaration_was_marked_as_deprecated_here)),ED.add(_),_}function _C(o){const _=Qp(o);return _&&P(o.declarations)>1?_.flags&64?Ft(o.declarations,FS):Ce(o.declarations,FS):!!o.valueDeclaration&&FS(o.valueDeclaration)||P(o.declarations)&&Ce(o.declarations,FS)}function FS(o){return!!(oE(o)&536870912)}function pC(o,_,y){const S=Kn(o,k._0_is_deprecated,y);return TA(_,S)}function DA(o,_,y,S){const D=y?Kn(o,k.The_signature_0_of_1_is_deprecated,S,y):Kn(o,k._0_is_deprecated,S);return TA(_,D)}function $a(o,_,y){T++;const S=new p(o|33554432,_);return S.links=new eet,S.links.checkFlags=y||0,S}function p0(o,_){const y=$a(1,o);return y.links.type=_,y}function BS(o,_){const y=$a(4,o);return y.links.type=_,y}function L2(o){let _=0;return o&2&&(_|=111551),o&1&&(_|=111550),o&4&&(_|=0),o&8&&(_|=900095),o&16&&(_|=110991),o&32&&(_|=899503),o&64&&(_|=788872),o&256&&(_|=899327),o&128&&(_|=899967),o&512&&(_|=110735),o&8192&&(_|=103359),o&32768&&(_|=46015),o&65536&&(_|=78783),o&262144&&(_|=526824),o&524288&&(_|=788968),o&2097152&&(_|=2097152),_}function Kp(o,_){_.mergeId||(_.mergeId=ZYe,ZYe++),cr[_.mergeId]=o}function ab(o){const _=$a(o.flags,o.escapedName);return _.declarations=o.declarations?o.declarations.slice():[],_.parent=o.parent,o.valueDeclaration&&(_.valueDeclaration=o.valueDeclaration),o.constEnumOnlyModule&&(_.constEnumOnlyModule=!0),o.members&&(_.members=new Map(o.members)),o.exports&&(_.exports=new Map(o.exports)),Kp(_,o),_}function Y0(o,_,y=!1){if(!(o.flags&L2(_.flags))||(_.flags|o.flags)&67108864){if(_===o)return o;if(!(o.flags&33554432)){const L=Zu(o);if(L===pt)return _;if(!(L.flags&L2(_.flags))||(_.flags|L.flags)&67108864)o=ab(L);else return S(o,_),_}_.flags&512&&o.flags&512&&o.constEnumOnlyModule&&!_.constEnumOnlyModule&&(o.constEnumOnlyModule=!1),o.flags|=_.flags,_.valueDeclaration&&bV(o,_.valueDeclaration),Sr(o.declarations,_.declarations),_.members&&(o.members||(o.members=_a()),Jg(o.members,_.members,y)),_.exports&&(o.exports||(o.exports=_a()),Jg(o.exports,_.exports,y,o)),y||Kp(o,_)}else o.flags&1024?o!==Me&&ft(_.declarations&&No(_.declarations[0]),k.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity,eo(o)):S(o,_);return o;function S(L,B){const K=!!(L.flags&384||B.flags&384),ne=!!(L.flags&2||B.flags&2),ce=K?k.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations:ne?k.Cannot_redeclare_block_scoped_variable_0:k.Duplicate_identifier_0,ge=B.declarations&&_n(B.declarations[0]),je=L.declarations&&_n(L.declarations[0]),Be=k8(ge,Q.checkJs),kt=k8(je,Q.checkJs),Vt=eo(B);if(ge&&je&&Pu&&!K&&ge!==je){const Kt=Hb(ge.path,je.path)===-1?ge:je,Oi=Kt===ge?je:ge,Ki=mp(Pu,`${Kt.path}|${Oi.path}`,()=>({firstFile:Kt,secondFile:Oi,conflictingSymbols:new Map})),qn=mp(Ki.conflictingSymbols,Vt,()=>({isBlockScoped:ne,firstFileLocations:[],secondFileLocations:[]}));Be||D(qn.firstFileLocations,B),kt||D(qn.secondFileLocations,L)}else Be||Ky(B,ce,Vt,L),kt||Ky(L,ce,Vt,B)}function D(L,B){if(B.declarations)for(const K of B.declarations)mu(L,K)}}function Ky(o,_,y,S){O(o.declarations,D=>{EA(D,_,y,S.declarations)})}function EA(o,_,y,S){const D=($k(o,!1)?Bae(o):No(o))||o,L=ip(D,_,y);for(const B of S||w){const K=($k(B,!1)?Bae(B):No(B))||B;if(K===D)continue;L.relatedInformation=L.relatedInformation||[];const ne=Kn(K,k._0_was_also_declared_here,y),ce=Kn(K,k.and_here);P(L.relatedInformation)>=5||Ft(L.relatedInformation,ge=>Z8(ge,ce)===0||Z8(ge,ne)===0)||da(L,P(L.relatedInformation)?ce:ne)}}function Nx(o,_){if(!(o!=null&&o.size))return _;if(!(_!=null&&_.size))return o;const y=_a();return Jg(y,o),Jg(y,_),y}function Jg(o,_,y=!1,S){_.forEach((D,L)=>{const B=o.get(L),K=B?Y0(B,D,y):wc(D);S&&B&&(K.parent=S),o.set(L,K)})}function IA(o){var _,y,S;const D=o.parent;if(((_=D.symbol.declarations)==null?void 0:_[0])!==D){j.assert(D.symbol.declarations.length>1);return}if(Ry(D))Jg($e,D.symbol.exports);else{const L=o.parent.parent.flags&33554432?void 0:k.Invalid_module_name_in_augmentation_module_0_cannot_be_found;let B=AD(o,o,L,!1,!0);if(!B)return;if(B=sp(B),B.flags&1920)if(Ft(Cu,K=>B===K.symbol)){const K=Y0(D.symbol,B,!0);gm||(gm=new Map),gm.set(o.text,K)}else{if((y=B.exports)!=null&&y.get("__export")&&((S=D.symbol.exports)!=null&&S.size)){const K=yRe(B,"resolvedExports");for(const[ne,ce]of as(D.symbol.exports.entries()))K.has(ne)&&!B.exports.has(ne)&&Y0(K.get(ne),ce)}Y0(B,D.symbol)}else ft(o,k.Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity,o.text)}}function WS(){const o=et.escapedName,_=$e.get(o);_?O(_.declarations,y=>{NP(y)||lc.add(Kn(y,k.Declaration_name_conflicts_with_built_in_global_identifier_0,Ws(o)))}):$e.set(o,et)}function Ys(o){if(o.flags&33554432)return o.links;const _=Ba(o);return Go[_]??(Go[_]=new eet)}function yr(o){const _=Sc(o);return ll[_]||(ll[_]=new HMt)}function ff(o,_,y){if(y){const S=wc(o.get(_));if(S&&(S.flags&y||S.flags&2097152&&Eh(S)&y))return S}}function mC(o,_){const y=o.parent,S=o.parent.parent,D=ff(y.locals,_,111551),L=ff(qx(S.symbol),_,111551);return D&&L?[D,L]:j.fail("There should exist two symbols, one as property declaration and one as parameter declaration")}function VS(o,_){const y=_n(o),S=_n(_),D=R0(o);if(y!==S){if(oe&&(y.externalModuleIndicator||S.externalModuleIndicator)||!Q.outFile||vP(_)||o.flags&33554432||B(_,o))return!0;const ne=t.getSourceFiles();return ne.indexOf(y)<=ne.indexOf(S)}if(_.flags&16777216||vP(_)||Q8e(_))return!0;if(o.pos<=_.pos&&!(Lo(o)&&aV(_.parent)&&!o.initializer&&!o.exclamationToken)){if(o.kind===208){const ne=Xk(_,208);return ne?Qi(ne,ec)!==Qi(o,ec)||o.pos<ne.pos:VS(Xk(o,260),_)}else{if(o.kind===260)return!L(o,_);if(ss(o)){const ne=Qi(_,ce=>ce===o?"quit":Ka(ce)?ce.parent.parent===o:!pe&&Fd(ce)&&(ce.parent===o||Nu(ce.parent)&&ce.parent.parent===o||FW(ce.parent)&&ce.parent.parent===o||Lo(ce.parent)&&ce.parent.parent===o||$s(ce.parent)&&ce.parent.parent.parent===o));return ne?!pe&&Fd(ne)?!!Qi(_,ce=>ce===ne?"quit":Ho(ce)&&!VT(ce)):!1:!0}else{if(Lo(o))return!K(o,_,!1);if(vp(o,o.parent))return!(ue&&Cf(o)===Cf(_)&&B(_,o))}}return!0}if(_.parent.kind===281||_.parent.kind===277&&_.parent.isExportEquals||_.kind===277&&_.isExportEquals)return!0;if(B(_,o))return ue&&Cf(o)&&(Lo(o)||vp(o,o.parent))?!K(o,_,!0):!0;return!1;function L(ne,ce){switch(ne.parent.parent.kind){case 243:case 248:case 250:if(nN(ce,ne,D))return!0;break}const ge=ne.parent.parent;return fI(ge)&&nN(ce,ge.expression,D)}function B(ne,ce){return!!Qi(ne,ge=>{if(ge===D)return"quit";if(Ho(ge))return!0;if(gu(ge))return ce.pos<ne.pos;const je=Jr(ge.parent,Lo);if(je&&je.initializer===ge){if(pa(ge.parent)){if(ce.kind===174)return!0;if(Lo(ce)&&Cf(ne)===Cf(ce)){const kt=ce.name;if(ot(kt)||Vs(kt)){const Vt=Yn(xr(ce)),Kt=$t(ce.parent.members,gu);if(Ori(kt,Vt,Kt,ce.parent.pos,ge.pos))return!0}}}else if(!(ce.kind===172&&!pa(ce))||Cf(ne)!==Cf(ce))return!0}return!1})}function K(ne,ce,ge){return ce.end>ne.end?!1:Qi(ce,Be=>{if(Be===ne)return"quit";switch(Be.kind){case 219:return!0;case 172:return ge&&(Lo(ne)&&Be.parent===ne.parent||vp(ne,ne.parent)&&Be.parent===ne.parent.parent)?"quit":!0;case 241:switch(Be.parent.kind){case 177:case 174:case 178:return!0;default:return!1}default:return!1}})===void 0}}function eN(o){return yr(o).declarationRequiresScopeChange}function Lx(o,_){yr(o).declarationRequiresScopeChange=_}function tN(o,_,y,S){return ue?!1:(o&&!S&&ND(o,_,_)||ft(o,o&&y.type&&NW(y.type,o.pos)?k.Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:k.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor,al(y.name),sg(_)),!0)}function Tl(o,_,y,S){const D=Oo(_)?_:_.escapedText;a(()=>{if(!o||o.parent.kind!==324&&!ND(o,D,_)&&!iN(o)&&!CO(o,D,y)&&!Vo(o,D)&&!rr(o,D,y)&&!HS(o,D,y)&&!vr(o,D,y)){let L,B;if(_&&(B=Aei(_),B&&ft(o,S,sg(_),B)),!B&&ar<Ns&&(L=Xgt(o,D,y),(L==null?void 0:L.valueDeclaration)&&Vh(L.valueDeclaration)&&Ry(L.valueDeclaration)&&(L=void 0),L)){const ne=eo(L),ce=L7e(o,L,!1),ge=y===1920||_&&typeof _!="string"&&cl(_)?k.Cannot_find_namespace_0_Did_you_mean_1:ce?k.Could_not_find_name_0_Did_you_mean_1:k.Cannot_find_name_0_Did_you_mean_1,je=Q1(o,ge,sg(_),ne);je.canonicalHead=lTe(S,sg(_)),Z0(!ce,je),L.valueDeclaration&&da(je,Kn(L.valueDeclaration,k._0_is_declared_here,ne))}!L&&!B&&_&&ft(o,S,sg(_)),ar++}})}function gC(o,_,y,S,D,L){a(()=>{var B;const K=_.escapedName,ne=S&&Os(S)&&Cp(S);if(o&&(y&2||(y&32||y&384)&&(y&111551)===111551)){const ce=Rp(_);(ce.flags&2||ce.flags&32||ce.flags&384)&&SO(ce,o)}if(ne&&(y&111551)===111551&&!(o.flags&16777216)){const ce=wc(_);P(ce.declarations)&&Ce(ce.declarations,ge=>pH(ge)||Os(ge)&&!!ge.symbol.globalExports)&&Z1(!Q.allowUmdGlobalAccess,o,k._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead,Ws(K))}if(D&&!L&&(y&111551)===111551){const ce=wc(Kpe(_)),ge=A1(D);ce===xr(D)?ft(o,k.Parameter_0_cannot_reference_itself,al(D.name)):ce.valueDeclaration&&ce.valueDeclaration.pos>D.pos&&ge.parent.locals&&ff(ge.parent.locals,ce.escapedName,y)===ce&&ft(o,k.Parameter_0_cannot_reference_identifier_1_declared_after_it,al(D.name),al(o))}if(o&&y&111551&&_.flags&2097152&&!(_.flags&111551)&&!Yk(o)){const ce=ey(_,111551);if(ce){const ge=ce.kind===281||ce.kind===278||ce.kind===280?k._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type:k._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type,je=Ws(K);ID(ft(o,ge,je),ce,je)}}if(Q.isolatedModules&&_&&ne&&(y&111551)===111551){const ge=ff($e,K,y)===_&&Os(S)&&S.locals&&ff(S.locals,K,-111552);if(ge){const je=(B=ge.declarations)==null?void 0:B.find(Be=>Be.kind===276||Be.kind===273||Be.kind===274||Be.kind===271);je&&!v8(je)&&ft(je,k.Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled,Ws(K))}}})}function ID(o,_,y){return _?da(o,Kn(_,_.kind===281||_.kind===278||_.kind===280?k._0_was_exported_here:k._0_was_imported_here,y)):o}function sg(o){return Oo(o)?Ws(o):al(o)}function ND(o,_,y){if(!ot(o)||o.escapedText!==_||Z1t(o)||vP(o))return!1;const S=Hh(o,!1,!1);let D=S;for(;D;){if(ss(D.parent)){const L=xr(D.parent);if(!L)break;const B=Yn(L);if(Ta(B,_))return ft(o,k.Cannot_find_name_0_Did_you_mean_the_static_member_1_0,sg(y),eo(L)),!0;if(D===S&&!pa(D)){const K=gl(L).thisType;if(Ta(K,_))return ft(o,k.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0,sg(y)),!0}}D=D.parent}return!1}function iN(o){const _=bO(o);return _&&nu(_,64,!0)?(ft(o,k.Cannot_extend_an_interface_0_Did_you_mean_implements,uu(_)),!0):!1}function bO(o){switch(o.kind){case 80:case 211:return o.parent?bO(o.parent):void 0;case 233:if(pl(o.expression))return o.expression;default:return}}function CO(o,_,y){const S=1920|(nr(o)?111551:0);if(y===S){const D=Zu(_i(o,_,788968&~S,void 0,!1)),L=o.parent;if(D){if(o_(L)){j.assert(L.left===o,"Should only be resolving left side of qualified name as a namespace");const B=L.right.escapedText;if(Ta(gl(D),B))return ft(L,k.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1,Ws(_),Ws(B)),!0}return ft(o,k._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here,Ws(_)),!0}}return!1}function vr(o,_,y){if(y&788584){const S=Zu(_i(o,_,111127,void 0,!1));if(S&&!(S.flags&1920))return ft(o,k._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0,Ws(_)),!0}return!1}function fh(o){return o==="any"||o==="string"||o==="number"||o==="boolean"||o==="never"||o==="unknown"}function Vo(o,_){return fh(_)&&o.parent.kind===281?(ft(o,k.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module,_),!0):!1}function HS(o,_,y){if(y&111551){if(fh(_)){const L=o.parent.parent;if(L&&L.parent&&Tp(L)){const B=L.token,K=L.parent.kind;K===264&&B===96?ft(o,k.An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types,Ws(_)):K===263&&B===96?ft(o,k.A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values,Ws(_)):K===263&&B===119&&ft(o,k.A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types,Ws(_))}else ft(o,k._0_only_refers_to_a_type_but_is_being_used_as_a_value_here,Ws(_));return!0}const S=Zu(_i(o,_,788544,void 0,!1)),D=S&&Eh(S);if(S&&D!==void 0&&!(D&111551)){const L=Ws(_);return P2(_)?ft(o,k._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later,L):NA(o,S)?ft(o,k._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0,L,L==="K"?"P":"K"):ft(o,k._0_only_refers_to_a_type_but_is_being_used_as_a_value_here,L),!0}}return!1}function NA(o,_){const y=Qi(o.parent,S=>Ka(S)||O_(S)?!1:a_(S)||"quit");if(y&&y.members.length===1){const S=gl(_);return!!(S.flags&1048576)&&nU(S,384,!0)}return!1}function P2(o){switch(o){case"Promise":case"Symbol":case"Map":case"WeakMap":case"Set":case"WeakSet":return!0}return!1}function rr(o,_,y){if(y&111127){if(Zu(_i(o,_,1024,void 0,!1)))return ft(o,k.Cannot_use_namespace_0_as_a_value,Ws(_)),!0}else if(y&788544&&Zu(_i(o,_,1536,void 0,!1)))return ft(o,k.Cannot_use_namespace_0_as_a_type,Ws(_)),!0;return!1}function SO(o,_){var y;if(j.assert(!!(o.flags&2||o.flags&32||o.flags&384)),o.flags&67108881&&o.flags&32)return;const S=(y=o.declarations)==null?void 0:y.find(D=>bae(D)||ss(D)||D.kind===266);if(S===void 0)return j.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration");if(!(S.flags&33554432)&&!VS(S,_)){let D;const L=al(No(S));o.flags&2?D=ft(_,k.Block_scoped_variable_0_used_before_its_declaration,L):o.flags&32?D=ft(_,k.Class_0_used_before_its_declaration,L):o.flags&256?D=ft(_,k.Enum_0_used_before_its_declaration,L):(j.assert(!!(o.flags&128)),Ag(Q)&&(D=ft(_,k.Enum_0_used_before_its_declaration,L))),D&&da(D,Kn(S,k._0_is_declared_here,L))}}function nN(o,_,y){return!!_&&!!Qi(o,S=>S===_||(S===y||Ho(S)&&(!VT(S)||nd(S)&3)?"quit":!1))}function Th(o){switch(o.kind){case 271:return o;case 273:return o.parent;case 274:return o.parent.parent;case 276:return o.parent.parent.parent;default:return}}function Dh(o){return o.declarations&&rt(o.declarations,Xp)}function Xp(o){return o.kind===271||o.kind===270||o.kind===273&&!!o.name||o.kind===274||o.kind===280||o.kind===276||o.kind===281||o.kind===277&&EV(o)||ur(o)&&Bu(o)===2&&EV(o)||Sl(o)&&ur(o.parent)&&o.parent.left===o&&o.parent.operatorToken.kind===64&&A2(o.parent.right)||o.kind===304||o.kind===303&&A2(o.initializer)||o.kind===260&&HT(o)||o.kind===208&&HT(o.parent.parent)}function A2(o){return sK(o)||ml(o)&&dy(o)}function rN(o,_){const y=Qd(o);if(y){const D=u3(y.expression).arguments[0];return ot(y.name)?Zu(Ta(L_t(D),y.name.escapedText)):void 0}if(_s(o)||o.moduleReference.kind===283){const D=B_(o,Fae(o)||L8(o)),L=sp(D);return rp(o,D,L,!1),L}const S=PA(o.moduleReference,_);return cb(o,S),S}function cb(o,_){if(rp(o,void 0,_,!1)&&!o.isTypeOnly){const y=ey(xr(o)),S=y.kind===281||y.kind===278,D=S?k.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type:k.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type,L=S?k._0_was_exported_here:k._0_was_imported_here,B=y.kind===278?"*":tx(y.name);da(ft(o.moduleReference,D),Kn(y,L,B))}}function np(o,_,y,S){const D=o.exports.get("export="),L=D?Ta(Yn(D),_,!0):o.exports.get(_),B=Zu(L,S);return rp(y,L,B,!1),B}function Y1(o){return Il(o)&&!o.isExportEquals||Zr(o,2048)||vh(o)||jy(o)}function Sm(o){return Bc(o)?t.getEmitSyntaxForUsageLocation(_n(o),o):void 0}function jS(o,_){return o===99&&_===1}function zS(o){return 100<=oe&&oe<=199?Sm(o)===99&&su(o.text,".json"):!1}function LD(o,_,y,S){const D=o&&Sm(S);if(o&&D!==void 0){const L=t.getImpliedNodeFormatForEmit(o);if(D===99&&L===1&&100<=oe&&oe<=199)return!0;if(D===99&&L===99)return!1}if(!Ie)return!1;if(!o||o.isDeclarationFile){const L=np(_,"default",void 0,!0);return!(L&&Ft(L.declarations,Y1)||np(_,cu("__esModule"),void 0,y))}return r_(o)?typeof o.externalModuleIndicator!="object"&&!np(_,cu("__esModule"),void 0,y):_N(_)}function sN(o,_){const y=B_(o,o.parent.moduleSpecifier);if(y)return Px(y,o,_)}function Px(o,_,y){var S;let D;QW(o)?D=o:D=np(o,"default",_,y);const L=(S=o.declarations)==null?void 0:S.find(Os),B=oN(_);if(!B)return D;const K=zS(B),ne=LD(L,o,y,B);if(!D&&!ne&&!K)if(_N(o)&&!Ie){const ce=oe>=5?"allowSyntheticDefaultImports":"esModuleInterop",je=o.exports.get("export=").valueDeclaration,Be=ft(_.name,k.Module_0_can_only_be_default_imported_using_the_1_flag,eo(o),ce);je&&da(Be,Kn(je,k.This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag,ce))}else H0(_)?aN(o,_):yC(o,o,_,Vk(_)&&_.propertyName||_.name);else if(ne||K){const ce=sp(o,y)||Zu(o,y);return rp(_,o,ce,!1),ce}return rp(_,D,void 0,!1),D}function oN(o){switch(o.kind){case 273:return o.parent.moduleSpecifier;case 271:return eC(o.moduleReference)?o.moduleReference.expression:void 0;case 274:return o.parent.parent.moduleSpecifier;case 276:return o.parent.parent.parent.moduleSpecifier;case 281:return o.parent.parent.moduleSpecifier;default:return j.assertNever(o)}}function aN(o,_){var y,S,D;if((y=o.exports)!=null&&y.has(_.symbol.escapedName))ft(_.name,k.Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead,eo(o),eo(_.symbol));else{const L=ft(_.name,k.Module_0_has_no_default_export,eo(o)),B=(S=o.exports)==null?void 0:S.get("__export");if(B){const K=(D=B.declarations)==null?void 0:D.find(ne=>{var ce,ge;return!!(Ju(ne)&&ne.moduleSpecifier&&((ge=(ce=B_(ne,ne.moduleSpecifier))==null?void 0:ce.exports)!=null&&ge.has("default")))});K&&da(L,Kn(K,k.export_Asterisk_does_not_re_export_a_default))}}}function cN(o,_){const y=o.parent.parent.moduleSpecifier,S=B_(o,y),D=Rx(S,y,_,!1);return rp(o,S,D,!1),D}function e1(o,_){const y=o.parent.moduleSpecifier,S=y&&B_(o,y),D=y&&Rx(S,y,_,!1);return rp(o,S,D,!1),D}function wO(o,_){if(o===pt&&_===pt)return pt;if(o.flags&790504)return o;const y=$a(o.flags|_.flags,o.escapedName);return j.assert(o.declarations||_.declarations),y.declarations=Wb(Js(o.declarations,_.declarations),Hw),y.parent=o.parent||_.parent,o.valueDeclaration&&(y.valueDeclaration=o.valueDeclaration),_.members&&(y.members=new Map(_.members)),o.exports&&(y.exports=new Map(o.exports)),y}function O2(o,_,y,S){var D;if(o.flags&1536){const L=__(o).get(_),B=Zu(L,S),K=(D=Ys(o).typeOnlyExportStarMap)==null?void 0:D.get(_);return rp(y,L,B,!1,K,_),B}}function Ax(o,_){if(o.flags&3){const y=o.valueDeclaration.type;if(y)return Zu(Ta(Bs(y),_))}}function lb(o,_,y=!1){var S;const D=Fae(o)||o.moduleSpecifier,L=B_(o,D),B=!Nr(_)&&_.propertyName||_.name;if(!ot(B)&&B.kind!==11)return;const K=FT(B),ce=Rx(L,D,!1,K==="default"&&Ie);if(ce&&(K||B.kind===11)){if(QW(L))return L;let ge;L&&L.exports&&L.exports.get("export=")?ge=Ta(Yn(ce),K,!0):ge=Ax(ce,K),ge=Zu(ge,y);let je=O2(ce,K,_,y);if(je===void 0&&K==="default"){const kt=(S=L.declarations)==null?void 0:S.find(Os);(zS(D)||LD(kt,L,y,D))&&(je=sp(L,y)||Zu(L,y))}const Be=je&&ge&&je!==ge?wO(ge,je):je||ge;return Be||yC(L,ce,o,B),Be}}function yC(o,_,y,S){var D;const L=qS(o,y),B=al(S),K=ot(S)?O7e(S,_):void 0;if(K!==void 0){const ne=eo(K),ce=ft(S,k._0_has_no_exported_member_named_1_Did_you_mean_2,L,B,ne);K.valueDeclaration&&da(ce,Kn(K.valueDeclaration,k._0_is_declared_here,ne))}else(D=o.exports)!=null&&D.has("default")?ft(S,k.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead,L,B):m0(y,S,B,o,L)}function m0(o,_,y,S,D){var L,B;const K=(B=(L=Jr(S.valueDeclaration,Ay))==null?void 0:L.locals)==null?void 0:B.get(FT(_)),ne=S.exports;if(K){const ce=ne==null?void 0:ne.get("export=");if(ce)Gg(ce,K)?US(o,_,y,D):ft(_,k.Module_0_has_no_exported_member_1,D,y);else{const ge=ne?Fe(ARe(ne),Be=>!!Gg(Be,K)):void 0,je=ge?ft(_,k.Module_0_declares_1_locally_but_it_is_exported_as_2,D,y,eo(ge)):ft(_,k.Module_0_declares_1_locally_but_it_is_not_exported,D,y);K.declarations&&da(je,...qt(K.declarations,(Be,kt)=>Kn(Be,kt===0?k._0_is_declared_here:k.and_here,y)))}}else ft(_,k.Module_0_has_no_exported_member_1,D,y)}function US(o,_,y,S){if(oe>=5){const D=zv(Q)?k._0_can_only_be_imported_by_using_a_default_import:k._0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import;ft(_,D,y)}else if(nr(o)){const D=zv(Q)?k._0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import:k._0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import;ft(_,D,y)}else{const D=zv(Q)?k._0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import:k._0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import;ft(_,D,y,y,S)}}function lN(o,_){if(l_(o)&&My(o.propertyName||o.name)){const B=oN(o),K=B&&B_(o,B);if(K)return Px(K,o,_)}const y=ec(o)?A1(o):o.parent.parent.parent,S=Qd(y),D=lb(y,S||o,_),L=o.propertyName||o.name;return S&&D&&ot(L)?Zu(Ta(Yn(D),L.escapedText),_):(rp(o,void 0,D,!1),D)}function Qd(o){if(_s(o)&&o.initializer&&Nr(o.initializer))return o.initializer}function uN(o,_){if(M0(o.parent)){const y=sp(o.parent.symbol,_);return rp(o,void 0,y,!1),y}}function Xy(o,_,y){const S=o.propertyName||o.name;if(My(S)){const L=oN(o),B=L&&B_(o,L);if(B)return Px(B,o,!!y)}const D=o.parent.parent.moduleSpecifier?lb(o.parent.parent,o,y):S.kind===11?void 0:nu(S,_,!1,y);return rp(o,void 0,D,!1),D}function dN(o,_){const y=Il(o)?o.expression:o.right,S=M2(y,_);return rp(o,void 0,S,!1),S}function M2(o,_){if(fd(o))return ju(o).symbol;if(!E_(o)&&!pl(o))return;const y=nu(o,901119,!0,_);return y||(ju(o),yr(o).resolvedSymbol)}function vC(o,_){if(ur(o.parent)&&o.parent.left===o&&o.parent.operatorToken.kind===64)return M2(o.parent.right,_)}function Ox(o,_=!1){switch(o.kind){case 271:case 260:return rN(o,_);case 273:return sN(o,_);case 274:return cN(o,_);case 280:return e1(o,_);case 276:case 208:return lN(o,_);case 281:return Xy(o,901119,_);case 277:case 226:return dN(o,_);case 270:return uN(o,_);case 304:return nu(o.name,901119,!0,_);case 303:return M2(o.initializer,_);case 212:case 211:return vC(o,_);default:return j.fail()}}function PD(o,_=901119){return o?(o.flags&(2097152|_))===2097152||!!(o.flags&2097152&&o.flags&67108864):!1}function Zu(o,_){return!_&&PD(o)?$f(o):o}function $f(o){j.assert((o.flags&2097152)!==0,"Should only get Alias here.");const _=Ys(o);if(_.aliasTarget)_.aliasTarget===Se&&(_.aliasTarget=pt);else{_.aliasTarget=Se;const y=Dh(o);if(!y)return j.fail();const S=Ox(y);_.aliasTarget===Se?_.aliasTarget=S||pt:ft(y,k.Circular_definition_of_import_alias_0,eo(o))}return _.aliasTarget}function xO(o){if(Ys(o).aliasTarget!==Se)return $f(o)}function Eh(o,_,y){const S=_&&ey(o),D=S&&Ju(S),L=S&&(D?B_(S.moduleSpecifier,S.moduleSpecifier,!0):$f(S.symbol)),B=D&&L?ub(L):void 0;let K=y?0:o.flags,ne;for(;o.flags&2097152;){const ce=Rp($f(o));if(!D&&ce===L||(B==null?void 0:B.get(ce.escapedName))===ce)break;if(ce===pt)return-1;if(ce===o||ne!=null&&ne.has(ce))break;ce.flags&2097152&&(ne?ne.add(ce):ne=new Set([o,ce])),K|=ce.flags,o=ce}return K}function rp(o,_,y,S,D,L){if(!o||Nr(o))return!1;const B=xr(o);if(Kw(o)){const ne=Ys(B);return ne.typeOnlyDeclaration=o,!0}if(D){const ne=Ys(B);return ne.typeOnlyDeclaration=D,B.escapedName!==L&&(ne.typeOnlyExportStarName=L),!0}const K=Ys(B);return LA(K,_,S)||LA(K,y,S)}function LA(o,_,y){var S;if(_&&(o.typeOnlyDeclaration===void 0||y&&o.typeOnlyDeclaration===!1)){const D=((S=_.exports)==null?void 0:S.get("export="))??_,L=D.declarations&&Fe(D.declarations,Kw);o.typeOnlyDeclaration=L??Ys(D).typeOnlyDeclaration??!1}return!!o.typeOnlyDeclaration}function ey(o,_){var y;if(!(o.flags&2097152))return;const S=Ys(o);if(S.typeOnlyDeclaration===void 0){S.typeOnlyDeclaration=!1;const D=Zu(o);rp((y=o.declarations)==null?void 0:y[0],Dh(o)&&Qme(o),D,!0)}if(_===void 0)return S.typeOnlyDeclaration||void 0;if(S.typeOnlyDeclaration){const D=S.typeOnlyDeclaration.kind===278?Zu(ub(S.typeOnlyDeclaration.symbol.parent).get(S.typeOnlyExportStarName||o.escapedName)):$f(S.typeOnlyDeclaration.symbol);return Eh(D)&_?S.typeOnlyDeclaration:void 0}}function PA(o,_){return o.kind===80&&q8(o)&&(o=o.parent),o.kind===80||o.parent.kind===166?nu(o,1920,!1,_):(j.assert(o.parent.kind===271),nu(o,901119,!1,_))}function qS(o,_){return o.parent?qS(o.parent,_)+"."+eo(o):eo(o,_,void 0,36)}function fN(o){for(;o_(o.parent);)o=o.parent;return o}function L5(o){let _=K_(o),y=_i(_,_,111551,void 0,!0);if(y){for(;o_(_.parent);){const S=Yn(y);if(y=Ta(S,_.parent.right.escapedText),!y)return;_=_.parent}return y}}function nu(o,_,y,S,D){if(lu(o))return;const L=1920|(nr(o)?_&111551:0);let B;if(o.kind===80){const K=_===L||cl(o)?k.Cannot_find_namespace_0:Imt(K_(o)),ne=nr(o)&&!cl(o)?kO(o,_):void 0;if(B=wc(_i(D||o,o,_,y||ne?void 0:K,!0,!1)),!B)return wc(ne)}else if(o.kind===166||o.kind===211){const K=o.kind===166?o.left:o.expression,ne=o.kind===166?o.right:o.name;let ce=nu(K,L,y,!1,D);if(!ce||lu(ne))return;if(ce===pt)return ce;if(ce.valueDeclaration&&nr(ce.valueDeclaration)&&yh(Q)!==100&&_s(ce.valueDeclaration)&&ce.valueDeclaration.initializer&&b0t(ce.valueDeclaration.initializer)){const ge=ce.valueDeclaration.initializer.arguments[0],je=B_(ge,ge);if(je){const Be=sp(je);Be&&(ce=Be)}}if(B=wc(ff(__(ce),ne.escapedText,_)),!B&&ce.flags&2097152&&(B=wc(ff(__($f(ce)),ne.escapedText,_))),!B){if(!y){const ge=qS(ce),je=al(ne),Be=O7e(ne,ce);if(Be){ft(ne,k._0_has_no_exported_member_named_1_Did_you_mean_2,ge,je,eo(Be));return}const kt=o_(o)&&fN(o);if(Qu&&_&788968&&kt&&!S3(kt.parent)&&L5(kt)){ft(kt,k._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0,bp(kt));return}if(_&1920&&o_(o.parent)){const Kt=wc(ff(__(ce),ne.escapedText,788968));if(Kt){ft(o.parent.right,k.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1,eo(Kt),Ws(o.parent.right.escapedText));return}}ft(ne,k.Namespace_0_has_no_exported_member_1,ge,je)}return}}else j.assertNever(o,"Unknown entity name kind.");return!cl(o)&&E_(o)&&(B.flags&2097152||o.parent.kind===277)&&rp(Jae(o),B,void 0,!0),B.flags&_||S?B:$f(B)}function kO(o,_){if(rme(o.parent)){const y=AA(o.parent);if(y)return _i(y,o,_,void 0,!0)}}function AA(o){if(Qi(o,D=>W6(D)||D.flags&16777216?Ng(D):"quit"))return;const y=zT(o);if(y&&uf(y)&&vV(y.expression)){const D=xr(y.expression.left);if(D)return Mx(D)}if(y&&ml(y)&&vV(y.parent)&&uf(y.parent.parent)){const D=xr(y.parent.left);if(D)return Mx(D)}if(y&&(Ig(y)||_d(y))&&ur(y.parent.parent)&&Bu(y.parent.parent)===6){const D=xr(y.parent.parent.left);if(D)return Mx(D)}const S=Gk(o);if(S&&Ho(S)){const D=xr(S);return D&&D.valueDeclaration}}function Mx(o){const _=o.parent.valueDeclaration;return _?(P8(_)?dP(_):hI(_)?A8(_):void 0)||_:void 0}function hN(o){const _=o.valueDeclaration;if(!_||!nr(_)||o.flags&524288||$k(_,!1))return;const y=_s(_)?A8(_):dP(_);if(y){const S=p_(y);if(S)return U7e(S,o)}}function B_(o,_,y){const D=yh(Q)===1?k.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option:k.Cannot_find_module_0_or_its_corresponding_type_declarations;return AD(o,_,y?void 0:D,y)}function AD(o,_,y,S=!1,D=!1){return Bc(_)?OA(o,_.text,y,S?void 0:_,D):void 0}function OA(o,_,y,S,D=!1){var L,B,K,ne,ce,ge,je,Be,kt,Vt,Kt;if(S&&so(_,"@types/")){const Ur=k.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1,ga=KR(_,"@types/");ft(S,Ur,ga,_)}const Oi=N_t(_,!0);if(Oi)return Oi;const Ki=_n(o),qn=Bc(o)?o:((L=rd(o)?o:o.parent&&rd(o.parent)&&o.parent.name===o?o.parent:void 0)==null?void 0:L.name)||((B=lS(o)?o:void 0)==null?void 0:B.argument.literal)||(nr(o)&&q1(o)?o.moduleSpecifier:void 0)||(_s(o)&&o.initializer&&L_(o.initializer,!0)?o.initializer.arguments[0]:void 0)||((K=Qi(o,zp))==null?void 0:K.arguments[0])||((ne=Qi(o,du))==null?void 0:ne.moduleSpecifier)||((ce=Qi(o,qk))==null?void 0:ce.moduleReference.expression)||((ge=Qi(o,Ju))==null?void 0:ge.moduleSpecifier),Qn=qn&&Bc(qn)?t.getModeForUsageLocation(Ki,qn):t.getDefaultResolutionModeForFile(Ki),rn=yh(Q),Ui=(je=t.getResolvedModule(Ki,_,Qn))==null?void 0:je.resolvedModule,fr=S&&Ui&&wde(Q,Ui,Ki),Gr=Ui&&(!fr||fr===k.Module_0_was_resolved_to_1_but_jsx_is_not_set)&&t.getSourceFile(Ui.resolvedFileName);if(Gr){if(fr&&ft(S,fr,_,Ui.resolvedFileName),Ui.resolvedUsingTsExtension&&df(_)){const Ur=((Be=Qi(o,du))==null?void 0:Be.importClause)||Qi(o,om(Wd,Ju));(S&&Ur&&!Ur.isTypeOnly||Qi(o,zp))&&ft(S,k.A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead,vs(j.checkDefined(xK(_))))}else if(Ui.resolvedUsingTsExtension&&!W3(Q,Ki.fileName)){const Ur=((kt=Qi(o,du))==null?void 0:kt.importClause)||Qi(o,om(Wd,Ju));if(S&&!(Ur!=null&&Ur.isTypeOnly||Qi(o,V1))){const ga=j.checkDefined(xK(_));ft(S,k.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled,ga)}}if(Gr.symbol){if(S&&Ui.isExternalLibraryImport&&!t7(Ui.extension)&&OD(!1,S,Ki,Qn,Ui,_),S&&(rn===3||rn===99)){const Ur=Ki.impliedNodeFormat===1&&!Qi(o,zp)||!!Qi(o,Wd),ga=Qi(o,fa=>V1(fa)||Ju(fa)||du(fa)||q1(fa));if(Ur&&Gr.impliedNodeFormat===99&&!nEe(ga))if(Qi(o,Wd))ft(S,k.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead,_);else{let fa;const Al=qv(Ki.fileName);(Al===".ts"||Al===".js"||Al===".tsx"||Al===".jsx")&&(fa=_ae(Ki)),lc.add(Bv(_n(S),S,jo(fa,k.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead,_)))}}return wc(Gr.symbol)}S&&y&&!ele(S)&&ft(S,k.File_0_is_not_a_module,Gr.fileName);return}if(Cu){const Ur=ioe(Cu,ga=>ga.pattern,_);if(Ur){const ga=gm&&gm.get(_);return wc(ga||Ur.symbol)}}if(!S)return;if(Ui&&!t7(Ui.extension)&&fr===void 0||fr===k.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type){if(D){const Ur=k.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented;ft(S,Ur,_,Ui.resolvedFileName)}else OD(De&&!!y,S,Ki,Qn,Ui,_);return}if(y){if(Ui){const Ur=t.getProjectReferenceRedirect(Ui.resolvedFileName);if(Ur){ft(S,k.Output_file_0_has_not_been_built_from_source_file_1,Ur,Ui.resolvedFileName);return}}if(fr)ft(S,fr,_,Ui.resolvedFileName);else{const Ur=am(_)&&!N6(_),ga=rn===3||rn===99;if(!XT(Q)&&Xl(_,".json")&&rn!==1&&RK(Q))ft(S,k.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension,_);else if(Qn===99&&ga&&Ur){const fa=wo(_,ts(Ki.path)),Al=(Vt=vO.find(([Po,fu])=>t.fileExists(fa+Po)))==null?void 0:Vt[1];Al?ft(S,k.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0,_+Al):ft(S,k.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path)}else if((Kt=t.getResolvedModule(Ki,_,Qn))!=null&&Kt.alternateResult){const fa=IG(Ki,t,_,Qn,_);Z1(!0,S,jo(fa,y,_))}else ft(S,y,_)}}return;function vs(Ur){const ga=YV(_,Ur);if(KV(oe)||Qn===99){const fa=df(_)&&W3(Q);return ga+(Ur===".mts"||Ur===".d.mts"?fa?".mts":".mjs":Ur===".cts"||Ur===".d.mts"?fa?".cts":".cjs":fa?".ts":".js")}return ga}}function OD(o,_,y,S,{packageId:D,resolvedFileName:L},B){if(ele(_))return;let K;!Gd(B)&&D&&(K=IG(y,t,B,S,D.name)),Z1(o,_,jo(K,k.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type,B,L))}function sp(o,_){if(o!=null&&o.exports){const y=Zu(o.exports.get("export="),_),S=MA(wc(y),wc(o));return wc(S)||o}}function MA(o,_){if(!o||o===pt||o===_||_.exports.size===1||o.flags&2097152)return o;const y=Ys(o);if(y.cjsExportMerged)return y.cjsExportMerged;const S=o.flags&33554432?o:ab(o);return S.flags=S.flags|512,S.exports===void 0&&(S.exports=_a()),_.exports.forEach((D,L)=>{L!=="export="&&S.exports.set(L,S.exports.has(L)?Y0(S.exports.get(L),D):D)}),S===o&&(Ys(S).resolvedExports=void 0,Ys(S).resolvedMembers=void 0),Ys(S).cjsExportMerged=S,y.cjsExportMerged=S}function Rx(o,_,y,S){var D;const L=sp(o,y);if(!y&&L){if(!S&&!(L.flags&1539)&&!ql(L,307)){const K=oe>=5?"allowSyntheticDefaultImports":"esModuleInterop";return ft(_,k.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export,K),L}const B=_.parent;if(du(B)&&Y6(B)||zp(B)){const K=zp(B)?B.arguments[0]:B.moduleSpecifier,ne=Yn(L),ce=y0t(ne,L,o,K);if(ce)return wm(L,ce,B);const ge=(D=o==null?void 0:o.declarations)==null?void 0:D.find(Os),je=ge&&jS(Sm(K),t.getImpliedNodeFormatForEmit(ge));if(zv(Q)||je){let Be=aee(ne,0);if((!Be||!Be.length)&&(Be=aee(ne,1)),Be&&Be.length||Ta(ne,"default",!0)||je){const kt=ne.flags&3670016?v0t(ne,L,o,K):q7e(L,L.parent);return wm(L,kt,B)}}}}return L}function wm(o,_,y){const S=$a(o.flags,o.escapedName);S.declarations=o.declarations?o.declarations.slice():[],S.parent=o.parent,S.links.target=o,S.links.originatingImport=y,o.valueDeclaration&&(S.valueDeclaration=o.valueDeclaration),o.constEnumOnlyModule&&(S.constEnumOnlyModule=!0),o.members&&(S.members=new Map(o.members)),o.exports&&(S.exports=new Map(o.exports));const D=o1(_);return S.links.type=Xs(S,D.members,w,w,D.indexInfos),S}function _N(o){return o.exports.get("export=")!==void 0}function Fx(o){return ARe(ub(o))}function P5(o){const _=Fx(o),y=sp(o);if(y!==o){const S=Yn(y);$S(S)&&Sr(_,Ac(S))}return _}function MD(o,_){ub(o).forEach((D,L)=>{Wi(L)||_(D,L)});const S=sp(o);if(S!==o){const D=Yn(S);$S(D)&&JGt(D,(L,B)=>{_(L,B)})}}function pN(o,_){const y=ub(_);if(y)return y.get(o)}function RA(o,_){const y=pN(o,_);if(y)return y;const S=sp(_);if(S===_)return;const D=Yn(S);return $S(D)?Ta(D,o):void 0}function $S(o){return!(o.flags&402784252||Or(o)&1||ug(o)||Qa(o))}function __(o){return o.flags&6256?yRe(o,"resolvedExports"):o.flags&1536?ub(o):o.exports||X}function ub(o){const _=Ys(o);if(!_.resolvedExports){const{exports:y,typeOnlyExportStarMap:S}=TO(o);_.resolvedExports=y,_.typeOnlyExportStarMap=S}return _.resolvedExports}function db(o,_,y,S){_&&_.forEach((D,L)=>{if(L==="default")return;const B=o.get(L);if(!B)o.set(L,D),y&&S&&y.set(L,{specifierText:uu(S.moduleSpecifier)});else if(y&&S&&B&&Zu(B)!==Zu(D)){const K=y.get(L);K.exportsWithDuplicate?K.exportsWithDuplicate.push(S):K.exportsWithDuplicate=[S]}})}function TO(o){const _=[];let y;const S=new Set;o=sp(o);const D=L(o)||X;return y&&S.forEach(B=>y.delete(B)),{exports:D,typeOnlyExportStarMap:y};function L(B,K,ne){if(!ne&&(B!=null&&B.exports)&&B.exports.forEach((je,Be)=>S.add(Be)),!(B&&B.exports&&mu(_,B)))return;const ce=new Map(B.exports),ge=B.exports.get("__export");if(ge){const je=_a(),Be=new Map;if(ge.declarations)for(const kt of ge.declarations){const Vt=B_(kt,kt.moduleSpecifier),Kt=L(Vt,kt,ne||kt.isTypeOnly);db(je,Kt,Be,kt)}Be.forEach(({exportsWithDuplicate:kt},Vt)=>{if(!(Vt==="export="||!(kt&&kt.length)||ce.has(Vt)))for(const Kt of kt)lc.add(Kn(Kt,k.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity,Be.get(Vt).specifierText,Ws(Vt)))}),db(ce,je)}return K!=null&&K.isTypeOnly&&(y??(y=new Map),ce.forEach((je,Be)=>y.set(Be,K))),ce}}function wc(o){let _;return o&&o.mergeId&&(_=cr[o.mergeId])?_:o}function xr(o){return wc(o.symbol&&Kpe(o.symbol))}function p_(o){return M0(o)?xr(o):void 0}function Qp(o){return wc(o.parent&&Kpe(o.parent))}function RD(o){var _,y;return(((_=o.valueDeclaration)==null?void 0:_.kind)===219||((y=o.valueDeclaration)==null?void 0:y.kind)===218)&&p_(o.valueDeclaration.parent)||o}function DO(o,_){const y=_n(_),S=Sc(y),D=Ys(o);let L;if(D.extendedContainersByFile&&(L=D.extendedContainersByFile.get(S)))return L;if(y&&y.imports){for(const K of y.imports){if(cl(K))continue;const ne=B_(_,K,!0);!ne||!BD(ne,o)||(L=fn(L,ne))}if(P(L))return(D.extendedContainersByFile||(D.extendedContainersByFile=new Map)).set(S,L),L}if(D.extendedContainers)return D.extendedContainers;const B=t.getSourceFiles();for(const K of B){if(!wd(K))continue;const ne=xr(K);BD(ne,o)&&(L=fn(L,ne))}return D.extendedContainers=L||w}function FA(o,_,y){const S=Qp(o);if(S&&!(o.flags&262144))return ne(S);const D=es(o.declarations,ge=>{if(!Vh(ge)&&ge.parent){if(Bx(ge.parent))return xr(ge.parent);if(H1(ge.parent)&&ge.parent.parent&&sp(xr(ge.parent.parent))===o)return xr(ge.parent.parent)}if(fd(ge)&&ur(ge.parent)&&ge.parent.operatorToken.kind===64&&Sl(ge.parent.left)&&pl(ge.parent.left.expression))return Wv(ge.parent.left)||yI(ge.parent.left.expression)?xr(_n(ge)):(ju(ge.parent.left.expression),yr(ge.parent.left.expression).resolvedSymbol)});if(!P(D))return;const L=es(D,ge=>BD(ge,o)?ge:void 0);let B=[],K=[];for(const ge of L){const[je,...Be]=ne(ge);B=fn(B,je),K=Sr(K,Be)}return Js(B,K);function ne(ge){const je=es(ge.declarations,ce),Be=_&&DO(o,_),kt=R2(ge,y);if(_&&ge.flags&i1(y)&&JS(ge,_,1920,!1))return fn(Js(Js([ge],je),Be),kt);const Vt=!(ge.flags&i1(y))&&ge.flags&788968&&gl(ge).flags&524288&&y===111551?xf(_,Oi=>cf(Oi,Ki=>{if(Ki.flags&i1(y)&&Yn(Ki)===gl(ge))return Ki})):void 0;let Kt=Vt?[Vt,...je,ge]:[...je,ge];return Kt=fn(Kt,kt),Kt=Sr(Kt,Be),Kt}function ce(ge){return S&&FD(ge,S)}}function R2(o,_){const y=!!P(o.declarations)&&ya(o.declarations);if(_&111551&&y&&y.parent&&_s(y.parent)&&(Aa(y)&&y===y.parent.initializer||a_(y)&&y===y.parent.type))return xr(y.parent)}function FD(o,_){const y=GS(o),S=y&&y.exports&&y.exports.get("export=");return S&&Gg(S,_)?y:void 0}function BD(o,_){if(o===Qp(_))return _;const y=o.exports&&o.exports.get("export=");if(y&&Gg(y,_))return o;const S=__(o),D=S.get(_.escapedName);return D&&Gg(D,_)?D:cf(S,L=>{if(Gg(L,_))return L})}function Gg(o,_){if(wc(Zu(wc(o)))===wc(Zu(wc(_))))return o}function Rp(o){return wc(o&&(o.flags&1048576)!==0&&o.exportSymbol||o)}function Fp(o,_){return!!(o.flags&111551||o.flags&2097152&&Eh(o,!_)&111551)}function t1(o){var _;const y=new g(On,o);return b++,y.id=b,(_=Zn)==null||_.recordType(y),y}function Kg(o,_){const y=t1(o);return y.symbol=_,y}function mN(o){return new g(On,o)}function Td(o,_,y=0,S){BA(_,S);const D=t1(o);return D.intrinsicName=_,D.debugIntrinsicName=S,D.objectFlags=y|524288|2097152|33554432|16777216,D}function BA(o,_){const y=`${o},${_??""}`;Dt.has(y)&&j.fail(`Duplicate intrinsic type name ${o}${_?` (${_})`:""}; you may need to pass a name to createIntrinsicType.`),Dt.add(y)}function V(o,_){const y=Kg(524288,_);return y.objectFlags=o,y.members=void 0,y.properties=void 0,y.callSignatures=void 0,y.constructSignatures=void 0,y.indexInfos=void 0,y}function Le(){return is(as(kNe.keys(),V_))}function Ut(o){return Kg(262144,o)}function Wi(o){return o.charCodeAt(0)===95&&o.charCodeAt(1)===95&&o.charCodeAt(2)!==95&&o.charCodeAt(2)!==64&&o.charCodeAt(2)!==35}function gs(o){let _;return o.forEach((y,S)=>{ao(y,S)&&(_||(_=[])).push(y)}),_||w}function ao(o,_){return!Wi(_)&&Fp(o)}function Co(o){const _=gs(o),y=Ype(o);return y?Js(_,[y]):_}function co(o,_,y,S,D){const L=o;return L.members=_,L.properties=w,L.callSignatures=y,L.constructSignatures=S,L.indexInfos=D,_!==X&&(L.properties=gs(_)),L}function Xs(o,_,y,S,D){return co(V(16,o),_,y,S,D)}function Gh(o){if(o.constructSignatures.length===0)return o;if(o.objectTypeWithoutAbstractConstructSignatures)return o.objectTypeWithoutAbstractConstructSignatures;const _=$t(o.constructSignatures,S=>!(S.flags&4));if(o.constructSignatures===_)return o;const y=Xs(o.symbol,o.members,o.callSignatures,Ft(_)?_:w,o.indexInfos);return o.objectTypeWithoutAbstractConstructSignatures=y,y.objectTypeWithoutAbstractConstructSignatures=y,y}function xf(o,_){let y;for(let S=o;S;S=S.parent){if(Ay(S)&&S.locals&&!cS(S)&&(y=_(S.locals,void 0,!0,S)))return y;switch(S.kind){case 307:if(!Cp(S))break;case 267:const D=xr(S);if(y=_((D==null?void 0:D.exports)||X,void 0,!0,S))return y;break;case 263:case 231:case 264:let L;if((xr(S).members||X).forEach((B,K)=>{B.flags&788968&&(L||(L=_a())).set(K,B)}),L&&(y=_(L,void 0,!1,S)))return y;break}}return _($e,void 0,!0)}function i1(o){return o===111551?111551:1920}function JS(o,_,y,S,D=new Map){if(!(o&&!WD(o)))return;const L=Ys(o),B=L.accessibleChainCache||(L.accessibleChainCache=new Map),K=xf(_,(Ki,qn,Qn,rn)=>rn),ne=`${S?0:1}|${K&&Sc(K)}|${y}`;if(B.has(ne))return B.get(ne);const ce=Ba(o);let ge=D.get(ce);ge||D.set(ce,ge=[]);const je=xf(_,Be);return B.set(ne,je),je;function Be(Ki,qn,Qn){if(!mu(ge,Ki))return;const rn=Kt(Ki,qn,Qn);return ge.pop(),rn}function kt(Ki,qn){return!Bp(Ki,_,qn)||!!JS(Ki.parent,_,i1(qn),S,D)}function Vt(Ki,qn,Qn){return(o===(qn||Ki)||wc(o)===wc(qn||Ki))&&!Ft(Ki.declarations,Bx)&&(Qn||kt(wc(Ki),y))}function Kt(Ki,qn,Qn){return Vt(Ki.get(o.escapedName),void 0,qn)?[o]:cf(Ki,Ui=>{if(Ui.flags&2097152&&Ui.escapedName!=="export="&&Ui.escapedName!=="default"&&!(IK(Ui)&&_&&wd(_n(_)))&&(!S||Ft(Ui.declarations,qk))&&(!Qn||!Ft(Ui.declarations,TTe))&&(qn||!ql(Ui,281))){const fr=$f(Ui),Gr=Oi(Ui,fr,qn);if(Gr)return Gr}if(Ui.escapedName===o.escapedName&&Ui.exportSymbol&&Vt(wc(Ui.exportSymbol),void 0,qn))return[o]})||(Ki===$e?Oi(Me,Me,qn):void 0)}function Oi(Ki,qn,Qn){if(Vt(Ki,qn,Qn))return[Ki];const rn=__(qn),Ui=rn&&Be(rn,!0);if(Ui&&kt(Ki,i1(y)))return[Ki].concat(Ui)}}function Bp(o,_,y){let S=!1;return xf(_,D=>{let L=wc(D.get(o.escapedName));if(!L)return!1;if(L===o)return!0;const B=L.flags&2097152&&!ql(L,281);return L=B?$f(L):L,(B?Eh(L):L.flags)&y?(S=!0,!0):!1}),S}function WD(o){if(o.declarations&&o.declarations.length){for(const _ of o.declarations)switch(_.kind){case 172:case 174:case 177:case 178:continue;default:return!1}return!0}return!1}function F2(o,_){return fb(o,_,788968,!1,!0).accessibility===0}function VD(o,_){return fb(o,_,111551,!1,!0).accessibility===0}function WA(o,_,y){return fb(o,_,y,!1,!1).accessibility===0}function gN(o,_,y,S,D,L){if(!P(o))return;let B,K=!1;for(const ne of o){const ce=JS(ne,_,S,!1);if(ce){B=ne;const Be=A5(ce[0],D);if(Be)return Be}if(L&&Ft(ne.declarations,Bx)){if(D){K=!0;continue}return{accessibility:0}}const ge=FA(ne,_,S),je=gN(ge,_,y,y===ne?i1(S):S,D,L);if(je)return je}if(K)return{accessibility:0};if(B)return{accessibility:1,errorSymbolName:eo(y,_,S),errorModuleName:B!==y?eo(B,_,1920):void 0}}function n1(o,_,y,S){return fb(o,_,y,S,!0)}function fb(o,_,y,S,D){if(o&&_){const L=gN([o],_,o,y,S,D);if(L)return L;const B=O(o.declarations,GS);if(B){const K=GS(_);if(B!==K)return{accessibility:2,errorSymbolName:eo(o,_,y),errorModuleName:eo(B),errorNode:nr(_)?_:void 0}}return{accessibility:1,errorSymbolName:eo(o,_,y)}}return{accessibility:0}}function GS(o){const _=Qi(o,VA);return _&&xr(_)}function VA(o){return Vh(o)||o.kind===307&&Cp(o)}function Bx(o){return MG(o)||o.kind===307&&Cp(o)}function A5(o,_){let y;if(!Ce($t(o.declarations,L=>L.kind!==80),S))return;return{accessibility:0,aliasesToMakeVisible:y};function S(L){var B,K;if(!g0(L)){const ne=Th(L);if(ne&&!Zr(ne,32)&&g0(ne.parent))return D(L,ne);if(_s(L)&&Lu(L.parent.parent)&&!Zr(L.parent.parent,32)&&g0(L.parent.parent.parent))return D(L,L.parent.parent);if(RG(L)&&!Zr(L,32)&&g0(L.parent))return D(L,L);if(ec(L)){if(o.flags&2097152&&nr(L)&&((B=L.parent)!=null&&B.parent)&&_s(L.parent.parent)&&((K=L.parent.parent.parent)!=null&&K.parent)&&Lu(L.parent.parent.parent.parent)&&!Zr(L.parent.parent.parent.parent,32)&&L.parent.parent.parent.parent.parent&&g0(L.parent.parent.parent.parent.parent))return D(L,L.parent.parent.parent.parent);if(o.flags&2){const ce=Qi(L,Lu);return Zr(ce,32)?!0:g0(ce.parent)?D(L,ce):!1}}return!1}return!0}function D(L,B){return _&&(yr(L).isVisible=!0,y=n_(y,B)),!0}}function gz(o){let _;return o.parent.kind===186||o.parent.kind===233&&!N1(o.parent)||o.parent.kind===167||o.parent.kind===182&&o.parent.parameterName===o?_=1160127:o.kind===166||o.kind===211||o.parent.kind===271||o.parent.kind===166&&o.parent.left===o||o.parent.kind===211&&o.parent.expression===o||o.parent.kind===212&&o.parent.expression===o?_=1920:_=788968,_}function yz(o,_,y=!0){const S=gz(o),D=K_(o),L=_i(_,D.escapedText,S,void 0,!1);return L&&L.flags&262144&&S&788968?{accessibility:0}:!L&&ix(D)&&n1(xr(Hh(D,!1,!1)),D,S,!1).accessibility===0?{accessibility:0}:L?A5(L,y)||{accessibility:1,errorSymbolName:uu(D),errorNode:D}:{accessibility:3,errorSymbolName:uu(D),errorNode:D}}function eo(o,_,y,S=4,D){let L=70221824,B=0;S&2&&(L|=128),S&1&&(L|=512),S&8&&(L|=16384),S&32&&(B|=4),S&16&&(B|=1);const K=S&4?We.symbolToNode:We.symbolToEntityName;return D?ne(D).getText():z6(ne);function ne(ce){const ge=K(o,y,_,L,B),je=(_==null?void 0:_.kind)===307?SLe():_D(),Be=_&&_n(_);return je.writeNode(4,ge,Be,ce),ce}}function B2(o,_,y=0,S,D){return D?L(D).getText():z6(L);function L(B){let K;y&262144?K=S===1?185:184:K=S===1?180:179;const ne=We.signatureToSignatureDeclaration(o,K,_,IO(y)|70221824|512),ce=rde(),ge=_&&_n(_);return ce.writeNode(4,ne,ge,oce(B)),B}}function Hn(o,_,y=1064960,S=FV("")){const D=Q.noErrorTruncation||y&1,L=We.typeToTypeNode(o,_,IO(y)|70221824|(D?1:0),void 0);if(L===void 0)return j.fail("should always get typenode");const B=o!==Ni?_D():CLe(),K=_&&_n(_);B.writeNode(4,L,K,S);const ne=S.getText(),ce=D?fae*2:x8*2;return ce&&ne&&ne.length>=ce?ne.substr(0,ce-3)+"...":ne}function O5(o,_){let y=Wx(o.symbol)?Hn(o,o.symbol.valueDeclaration):Hn(o),S=Wx(_.symbol)?Hn(_,_.symbol.valueDeclaration):Hn(_);return y===S&&(y=EO(o),S=EO(_)),[y,S]}function EO(o){return Hn(o,void 0,64)}function Wx(o){return o&&!!o.valueDeclaration&&jt(o.valueDeclaration)&&!Em(o.valueDeclaration)}function IO(o=0){return o&848330095}function vz(o){return!!o.symbol&&!!(o.symbol.flags&32)&&(o===W_(o.symbol)||!!(o.flags&524288)&&!!(Or(o)&16777216))}function M5(o){return Bs(o)}function JY(){return{typeToTypeNode:(Qe,Re,Ii,un,_r)=>K(Re,Ii,un,_r,Jn=>ge(Qe,Jn)),typePredicateToTypePredicateNode:(Qe,Re,Ii,un,_r)=>K(Re,Ii,un,_r,Jn=>Al(Qe,Jn)),expressionOrTypeToTypeNode:(Qe,Re,Ii,un,_r,Jn,$n)=>K(un,_r,Jn,$n,Es=>y(Es,Qe,Re,Ii)),serializeTypeForDeclaration:(Qe,Re,Ii,un,_r,Jn,$n)=>K(un,_r,Jn,$n,Es=>Z2(Es,Qe,Re,Ii)),serializeReturnTypeForSignature:(Qe,Re,Ii,un,_r)=>K(Re,Ii,un,_r,Jn=>Zi(Jn,Qe)),indexInfoToIndexSignatureDeclaration:(Qe,Re,Ii,un,_r)=>K(Re,Ii,un,_r,Jn=>qn(Qe,Jn,void 0)),signatureToSignatureDeclaration:(Qe,Re,Ii,un,_r,Jn)=>K(Ii,un,_r,Jn,$n=>Qn(Qe,Re,$n)),symbolToEntityName:(Qe,Re,Ii,un,_r,Jn)=>K(Ii,un,_r,Jn,$n=>Ou(Qe,$n,Re,!1)),symbolToExpression:(Qe,Re,Ii,un,_r,Jn)=>K(Ii,un,_r,Jn,$n=>ul(Qe,$n,Re)),symbolToTypeParameterDeclarations:(Qe,Re,Ii,un,_r)=>K(Re,Ii,un,_r,Jn=>js(Qe,Jn)),symbolToParameterDeclaration:(Qe,Re,Ii,un,_r)=>K(Re,Ii,un,_r,Jn=>fu(Qe,Jn)),typeParameterToDeclaration:(Qe,Re,Ii,un,_r)=>K(Re,Ii,un,_r,Jn=>fa(Qe,Jn)),symbolTableToDeclarationStatements:(Qe,Re,Ii,un,_r)=>K(Re,Ii,un,_r,Jn=>yl(Qe,Jn)),symbolToNode:(Qe,Re,Ii,un,_r,Jn)=>K(Ii,un,_r,Jn,$n=>B(Qe,$n,Re))};function o(Qe,Re,Ii){const un=M5(Re);if(!Qe.mapper)return un;const _r=io(un,Qe.mapper);return Ii&&_r!==un?void 0:_r}function _(Qe,Re,Ii){if((!cl(Re)||!(Re.flags&16)||!Qe.enclosingFile||Qe.enclosingFile!==_n(Ql(Re)))&&(Re=G.cloneNode(Re)),Re===Ii||!Ii)return Re;let un=Re.original;for(;un&&un!==Ii;)un=un.original;return un||Ir(Re,Ii),Qe.enclosingFile&&Qe.enclosingFile===_n(Ql(Ii))?Ht(Re,Ii):Re}function y(Qe,Re,Ii,un){const _r=ne(Qe);Re&&!(Qe.internalFlags&2)&&ze.serializeTypeOfExpression(Re,Qe,un),Qe.internalFlags|=2;const Jn=S(Qe,Re,Ii,un);return _r(),Jn}function S(Qe,Re,Ii,un){if(Re){const _r=Hk(Re)?Re.type:FI(Re)?N7(Re):void 0;if(_r&&!O0(_r)){const Jn=D(Qe,_r,Ii,Re.parent,un);if(Jn)return Jn}}return un&&(Ii=Zx(Ii)),ge(Ii,Qe)}function D(Qe,Re,Ii,un,_r){const Jn=Ii;_r&&(Ii=Zx(Ii,!$s(un)));const $n=L(Qe,Re,Ii,un);if($n)return _r&&Zpt(Ii)&&!dg(o(Qe,Re),Es=>!!(Es.flags&32768))?G.createUnionTypeNode([$n,G.createKeywordTypeNode(157)]):$n;if(_r&&Jn!==Ii){const Es=L(Qe,Re,Jn,un);if(Es)return G.createUnionTypeNode([Es,G.createKeywordTypeNode(157)])}}function L(Qe,Re,Ii,un=Qe.enclosingDeclaration,_r=o(Qe,Re,!0)){if(_r&&di(un,Ii,_r)&&lF(Re,Ii)){const Jn=Ua(Qe,Re);if(Jn)return Jn}}function B(Qe,Re,Ii){if(Re.internalFlags&1){if(Qe.valueDeclaration){const _r=No(Qe.valueDeclaration);if(_r&&Ka(_r))return _r}const un=Ys(Qe).nameType;if(un&&un.flags&9216)return Re.enclosingDeclaration=un.symbol.valueDeclaration,G.createComputedPropertyName(ul(un.symbol,Re,Ii))}return ul(Qe,Re,Ii)}function K(Qe,Re,Ii,un,_r){const Jn=un!=null&&un.trackSymbol?un.moduleResolverHost:(Ii||0)&4?zMt(t):void 0,$n={enclosingDeclaration:Qe,enclosingFile:Qe&&_n(Qe),flags:Re||0,internalFlags:Ii||0,tracker:void 0,encounteredError:!1,reportedDiagnostic:!1,visitedTypes:void 0,symbolDepth:void 0,inferTypeParameters:void 0,approximateLength:0,trackedSymbols:void 0,bundled:!!Q.outFile&&!!Qe&&Cp(_n(Qe)),truncating:!1,usedSymbolNames:void 0,remappedSymbolNames:void 0,remappedSymbolReferences:void 0,reverseMappedStack:void 0,mustCreateTypeParameterSymbolList:!0,typeParameterSymbolList:void 0,mustCreateTypeParametersNamesLookups:!0,typeParameterNames:void 0,typeParameterNamesByText:void 0,typeParameterNamesByTextNextNameCount:void 0,mapper:void 0};$n.tracker=new DNe($n,un,Jn);const Es=_r($n);return $n.truncating&&$n.flags&1&&$n.tracker.reportTruncationError(),$n.encounteredError?void 0:Es}function ne(Qe){const Re=Qe.flags,Ii=Qe.internalFlags;return un;function un(){Qe.flags=Re,Qe.internalFlags=Ii}}function ce(Qe){return Qe.truncating?Qe.truncating:Qe.truncating=Qe.approximateLength>(Qe.flags&1?fae:x8)}function ge(Qe,Re){const Ii=ne(Re),un=je(Qe,Re);return Ii(),un}function je(Qe,Re){var Ii,un;u&&u.throwIfCancellationRequested&&u.throwIfCancellationRequested();const _r=Re.flags&8388608;if(Re.flags&=-8388609,!Qe){if(!(Re.flags&262144)){Re.encounteredError=!0;return}return Re.approximateLength+=3,G.createKeywordTypeNode(133)}if(Re.flags&536870912||(Qe=a1(Qe)),Qe.flags&1)return Qe.aliasSymbol?G.createTypeReferenceNode(Ol(Qe.aliasSymbol),Oi(Qe.aliasTypeArguments,Re)):Qe===Ni?h7(G.createKeywordTypeNode(133),3,"unresolved"):(Re.approximateLength+=3,G.createKeywordTypeNode(Qe===gr?141:133));if(Qe.flags&2)return G.createKeywordTypeNode(159);if(Qe.flags&4)return Re.approximateLength+=6,G.createKeywordTypeNode(154);if(Qe.flags&8)return Re.approximateLength+=6,G.createKeywordTypeNode(150);if(Qe.flags&64)return Re.approximateLength+=6,G.createKeywordTypeNode(163);if(Qe.flags&16&&!Qe.aliasSymbol)return Re.approximateLength+=7,G.createKeywordTypeNode(136);if(Qe.flags&1056){if(Qe.symbol.flags&8){const ni=Qp(Qe.symbol),Yi=xu(ni,Re,788968);if(gl(ni)===Qe)return Yi;const Gn=Eu(Qe.symbol);return J_(Gn,1)?At(Yi,G.createTypeReferenceNode(Gn,void 0)):V1(Yi)?(Yi.isTypeOf=!0,G.createIndexedAccessTypeNode(Yi,G.createLiteralTypeNode(G.createStringLiteral(Gn)))):qp(Yi)?G.createIndexedAccessTypeNode(G.createTypeQueryNode(Yi.typeName),G.createLiteralTypeNode(G.createStringLiteral(Gn))):j.fail("Unhandled type node kind returned from `symbolToTypeNode`.")}return xu(Qe.symbol,Re,788968)}if(Qe.flags&128)return Re.approximateLength+=Qe.value.length+2,G.createLiteralTypeNode(tr(G.createStringLiteral(Qe.value,!!(Re.flags&268435456)),16777216));if(Qe.flags&256){const ni=Qe.value;return Re.approximateLength+=(""+ni).length,G.createLiteralTypeNode(ni<0?G.createPrefixUnaryExpression(41,G.createNumericLiteral(-ni)):G.createNumericLiteral(ni))}if(Qe.flags&2048)return Re.approximateLength+=ZT(Qe.value).length+1,G.createLiteralTypeNode(G.createBigIntLiteral(Qe.value));if(Qe.flags&512)return Re.approximateLength+=Qe.intrinsicName.length,G.createLiteralTypeNode(Qe.intrinsicName==="true"?G.createTrue():G.createFalse());if(Qe.flags&8192){if(!(Re.flags&1048576)){if(VD(Qe.symbol,Re.enclosingDeclaration))return Re.approximateLength+=6,xu(Qe.symbol,Re,111551);Re.tracker.reportInaccessibleUniqueSymbolError&&Re.tracker.reportInaccessibleUniqueSymbolError()}return Re.approximateLength+=13,G.createTypeOperatorNode(158,G.createKeywordTypeNode(155))}if(Qe.flags&16384)return Re.approximateLength+=4,G.createKeywordTypeNode(116);if(Qe.flags&32768)return Re.approximateLength+=9,G.createKeywordTypeNode(157);if(Qe.flags&65536)return Re.approximateLength+=4,G.createLiteralTypeNode(G.createNull());if(Qe.flags&131072)return Re.approximateLength+=5,G.createKeywordTypeNode(146);if(Qe.flags&4096)return Re.approximateLength+=6,G.createKeywordTypeNode(155);if(Qe.flags&67108864)return Re.approximateLength+=6,G.createKeywordTypeNode(151);if(l7(Qe))return Re.flags&4194304&&(!Re.encounteredError&&!(Re.flags&32768)&&(Re.encounteredError=!0),(un=(Ii=Re.tracker).reportInaccessibleThisError)==null||un.call(Ii)),Re.approximateLength+=4,G.createThisTypeNode();if(!_r&&Qe.aliasSymbol&&(Re.flags&16384||F2(Qe.aliasSymbol,Re.enclosingDeclaration))){const ni=Oi(Qe.aliasTypeArguments,Re);return Wi(Qe.aliasSymbol.escapedName)&&!(Qe.aliasSymbol.flags&32)?G.createTypeReferenceNode(G.createIdentifier(""),ni):P(ni)===1&&Qe.aliasSymbol===li.symbol?G.createArrayTypeNode(ni[0]):xu(Qe.aliasSymbol,Re,788968,ni)}const Jn=Or(Qe);if(Jn&4)return j.assert(!!(Qe.flags&524288)),Qe.node?xt(Qe,qi):qi(Qe);if(Qe.flags&262144||Jn&3){if(Qe.flags&262144&&Yt(Re.inferTypeParameters,Qe)){Re.approximateLength+=Eu(Qe.symbol).length+6;let Yi;const Gn=m_(Qe);if(Gn){const Gi=R_t(Qe,!0);Gi&&yb(Gn,Gi)||(Re.approximateLength+=9,Yi=Gn&&ge(Gn,Re))}return G.createInferTypeNode(Ur(Qe,Re,Yi))}if(Re.flags&4&&Qe.flags&262144){const Yi=hf(Qe,Re);return Re.approximateLength+=Fr(Yi).length,G.createTypeReferenceNode(G.createIdentifier(Fr(Yi)),void 0)}if(Qe.symbol)return xu(Qe.symbol,Re,788968);const ni=(Qe===Ve||Qe===_e)&&U&&U.symbol?(Qe===_e?"sub-":"super-")+Eu(U.symbol):"?";return G.createTypeReferenceNode(G.createIdentifier(ni),void 0)}if(Qe.flags&1048576&&Qe.origin&&(Qe=Qe.origin),Qe.flags&3145728){const ni=Qe.flags&1048576?GY(Qe.types):Qe.types;if(P(ni)===1)return ge(ni[0],Re);const Yi=Oi(ni,Re,!0);if(Yi&&Yi.length>0)return Qe.flags&1048576?G.createUnionTypeNode(Yi):G.createIntersectionTypeNode(Yi);!Re.encounteredError&&!(Re.flags&262144)&&(Re.encounteredError=!0);return}if(Jn&48)return j.assert(!!(Qe.flags&524288)),_t(Qe);if(Qe.flags&4194304){const ni=Qe.type;Re.approximateLength+=6;const Yi=ge(ni,Re);return G.createTypeOperatorNode(143,Yi)}if(Qe.flags&134217728){const ni=Qe.texts,Yi=Qe.types,Gn=G.createTemplateHead(ni[0]),Gi=G.createNodeArray(qt(Yi,(zn,Ln)=>G.createTemplateLiteralTypeSpan(ge(zn,Re),(Ln<Yi.length-1?G.createTemplateMiddle:G.createTemplateTail)(ni[Ln+1]))));return Re.approximateLength+=2,G.createTemplateLiteralType(Gn,Gi)}if(Qe.flags&268435456){const ni=ge(Qe.type,Re);return xu(Qe.symbol,Re,788968,[ni])}if(Qe.flags&8388608){const ni=ge(Qe.objectType,Re),Yi=ge(Qe.indexType,Re);return Re.approximateLength+=2,G.createIndexedAccessTypeNode(ni,Yi)}if(Qe.flags&16777216)return xt(Qe,ni=>$n(ni));if(Qe.flags&33554432){const ni=ge(Qe.baseType,Re),Yi=HO(Qe)&&qRe("NoInfer",!1);return Yi?xu(Yi,Re,788968,[ni]):ni}return j.fail("Should be unreachable.");function $n(ni){const Yi=ge(ni.checkType,Re);if(Re.approximateLength+=15,Re.flags&4&&ni.root.isDistributive&&!(ni.checkType.flags&262144)){const Hr=Ut($a(262144,"T")),xs=hf(Hr,Re),ns=G.createTypeReferenceNode(xs);Re.approximateLength+=37;const Fo=NN(ni.root.checkType,Hr,ni.mapper),Kc=Re.inferTypeParameters;Re.inferTypeParameters=ni.root.inferTypeParameters;const Xf=ge(io(ni.root.extendsType,Fo),Re);Re.inferTypeParameters=Kc;const H_=Es(io(o(Re,ni.root.node.trueType),Fo)),Yg=Es(io(o(Re,ni.root.node.falseType),Fo));return G.createConditionalTypeNode(Yi,G.createInferTypeNode(G.createTypeParameterDeclaration(void 0,G.cloneNode(ns.typeName))),G.createConditionalTypeNode(G.createTypeReferenceNode(G.cloneNode(xs)),ge(ni.checkType,Re),G.createConditionalTypeNode(ns,Xf,H_,Yg),G.createKeywordTypeNode(146)),G.createKeywordTypeNode(146))}const Gn=Re.inferTypeParameters;Re.inferTypeParameters=ni.root.inferTypeParameters;const Gi=ge(ni.extendsType,Re);Re.inferTypeParameters=Gn;const zn=Es(z2(ni)),Ln=Es(U2(ni));return G.createConditionalTypeNode(Yi,Gi,zn,Ln)}function Es(ni){var Yi,Gn,Gi;return ni.flags&1048576?(Yi=Re.visitedTypes)!=null&&Yi.has(kf(ni))?(Re.flags&131072||(Re.encounteredError=!0,(Gi=(Gn=Re.tracker)==null?void 0:Gn.reportCyclicStructureError)==null||Gi.call(Gn)),Be(Re)):xt(ni,zn=>ge(zn,Re)):ge(ni,Re)}function mo(ni){return!!Rz(ni)}function Ro(ni){return!!ni.target&&mo(ni.target)&&!mo(ni)}function Yo(ni){var Yi;j.assert(!!(ni.flags&524288));const Gn=ni.declaration.readonlyToken?G.createToken(ni.declaration.readonlyToken.kind):void 0,Gi=ni.declaration.questionToken?G.createToken(ni.declaration.questionToken.kind):void 0;let zn,Ln;const Hr=!FO(ni)&&!(zD(ni).flags&2)&&Re.flags&4&&!(Tm(ni).flags&262144&&((Yi=m_(Tm(ni)))==null?void 0:Yi.flags)&4194304);if(FO(ni)){if(Ro(ni)&&Re.flags&4){const H_=Ut($a(262144,"T")),Yg=hf(H_,Re);Ln=G.createTypeReferenceNode(Yg)}zn=G.createTypeOperatorNode(143,Ln||ge(zD(ni),Re))}else if(Hr){const H_=Ut($a(262144,"T")),Yg=hf(H_,Re);Ln=G.createTypeReferenceNode(Yg),zn=Ln}else zn=ge(Tm(ni),Re);const xs=Ur(s1(ni),Re,zn),ns=ni.declaration.nameType?ge(KS(ni),Re):void 0,Fo=ge(IC(SC(ni),!!(tv(ni)&4)),Re),Kc=G.createMappedTypeNode(Gn,xs,ns,Gi,Fo,void 0);Re.approximateLength+=10;const Xf=tr(Kc,1);if(Ro(ni)&&Re.flags&4){const H_=io(m_(o(Re,ni.declaration.typeParameter.constraint.type))||te,ni.mapper);return G.createConditionalTypeNode(ge(zD(ni),Re),G.createInferTypeNode(G.createTypeParameterDeclaration(void 0,G.cloneNode(Ln.typeName),H_.flags&2?void 0:ge(H_,Re))),Xf,G.createKeywordTypeNode(146))}else if(Hr)return G.createConditionalTypeNode(ge(Tm(ni),Re),G.createInferTypeNode(G.createTypeParameterDeclaration(void 0,G.cloneNode(Ln.typeName),G.createTypeOperatorNode(143,ge(zD(ni),Re)))),Xf,G.createKeywordTypeNode(146));return Xf}function _t(ni){var Yi,Gn;const Gi=ni.id,zn=ni.symbol;if(zn){if(!!(Or(ni)&8388608)){const Fo=ni.node;if(tD(Fo)){const Kc=L(Re,Fo,ni);if(Kc)return Kc}return(Yi=Re.visitedTypes)!=null&&Yi.has(Gi)?Be(Re):xt(ni,ai)}const xs=vz(ni)?788968:111551;if(dy(zn.valueDeclaration))return xu(zn,Re,xs);if(zn.flags&32&&!jpe(zn)&&!(zn.valueDeclaration&&ss(zn.valueDeclaration)&&Re.flags&2048&&(!hd(zn.valueDeclaration)||n1(zn,Re.enclosingDeclaration,xs,!1).accessibility!==0))||zn.flags&896||Ln())return xu(zn,Re,xs);if((Gn=Re.visitedTypes)!=null&&Gn.has(Gi)){const ns=KY(ni);return ns?xu(ns,Re,788968):Be(Re)}else return xt(ni,ai)}else return ai(ni);function Ln(){var Hr;const xs=!!(zn.flags&8192)&&Ft(zn.declarations,Fo=>pa(Fo)),ns=!!(zn.flags&16)&&(zn.parent||O(zn.declarations,Fo=>Fo.parent.kind===307||Fo.parent.kind===268));if(xs||ns)return(!!(Re.flags&4096)||((Hr=Re.visitedTypes)==null?void 0:Hr.has(Gi)))&&(!(Re.flags&8)||VD(zn,Re.enclosingDeclaration))}}function xt(ni,Yi){var Gn,Gi,zn;const Ln=ni.id,Hr=Or(ni)&16&&ni.symbol&&ni.symbol.flags&32,xs=Or(ni)&4&&ni.node?"N"+Sc(ni.node):ni.flags&16777216?"N"+Sc(ni.root.node):ni.symbol?(Hr?"+":"")+Ba(ni.symbol):void 0;Re.visitedTypes||(Re.visitedTypes=new Set),xs&&!Re.symbolDepth&&(Re.symbolDepth=new Map);const ns=Re.enclosingDeclaration&&yr(Re.enclosingDeclaration),Fo=`${kf(ni)}|${Re.flags}|${Re.internalFlags}`;ns&&(ns.serializedTypes||(ns.serializedTypes=new Map));const Kc=(Gn=ns==null?void 0:ns.serializedTypes)==null?void 0:Gn.get(Fo);if(Kc)return(Gi=Kc.trackedSymbols)==null||Gi.forEach(([j_,ik,dF])=>Re.tracker.trackSymbol(j_,ik,dF)),Kc.truncating&&(Re.truncating=!0),Re.approximateLength+=Kc.addedLength,rw(Kc.node);let Xf;if(xs){if(Xf=Re.symbolDepth.get(xs)||0,Xf>10)return Be(Re);Re.symbolDepth.set(xs,Xf+1)}Re.visitedTypes.add(Ln);const H_=Re.trackedSymbols;Re.trackedSymbols=void 0;const Yg=Re.approximateLength,Y2=Yi(ni),f1=Re.approximateLength-Yg;return!Re.reportedDiagnostic&&!Re.encounteredError&&((zn=ns==null?void 0:ns.serializedTypes)==null||zn.set(Fo,{node:Y2,truncating:Re.truncating,addedLength:f1,trackedSymbols:Re.trackedSymbols})),Re.visitedTypes.delete(Ln),xs&&Re.symbolDepth.set(xs,Xf),Re.trackedSymbols=H_,Y2;function rw(j_){return!cl(j_)&&Mo(j_)===j_?j_:_(Re,G.cloneNode(dn(j_,rw,void 0,uF,rw)),j_)}function uF(j_,ik,dF,gU,yU){return j_&&j_.length===0?Ht(G.createNodeArray(void 0,j_.hasTrailingComma),j_):Dn(j_,ik,dF,gU,yU)}}function ai(ni){if(op(ni)||ni.containsError)return Yo(ni);const Yi=o1(ni);if(!Yi.properties.length&&!Yi.indexInfos.length){if(!Yi.callSignatures.length&&!Yi.constructSignatures.length)return Re.approximateLength+=2,tr(G.createTypeLiteralNode(void 0),1);if(Yi.callSignatures.length===1&&!Yi.constructSignatures.length){const Hr=Yi.callSignatures[0];return Qn(Hr,184,Re)}if(Yi.constructSignatures.length===1&&!Yi.callSignatures.length){const Hr=Yi.constructSignatures[0];return Qn(Hr,185,Re)}}const Gn=$t(Yi.constructSignatures,Hr=>!!(Hr.flags&4));if(Ft(Gn)){const Hr=qt(Gn,ns=>kN(ns));return Yi.callSignatures.length+(Yi.constructSignatures.length-Gn.length)+Yi.indexInfos.length+(Re.flags&2048?$i(Yi.properties,ns=>!(ns.flags&4194304)):P(Yi.properties))&&Hr.push(Gh(Yi)),ge(Wa(Hr),Re)}const Gi=ne(Re);Re.flags|=4194304;const zn=yn(Yi);Gi();const Ln=G.createTypeLiteralNode(zn);return Re.approximateLength+=2,tr(Ln,Re.flags&1024?0:1),Ln}function qi(ni){let Yi=Pl(ni);if(ni.target===li||ni.target===En){if(Re.flags&2){const zn=ge(Yi[0],Re);return G.createTypeReferenceNode(ni.target===li?"Array":"ReadonlyArray",[zn])}const Gn=ge(Yi[0],Re),Gi=G.createArrayTypeNode(Gn);return ni.target===li?Gi:G.createTypeOperatorNode(148,Gi)}else if(ni.target.objectFlags&8){if(Yi=Wr(Yi,(Gn,Gi)=>IC(Gn,!!(ni.target.elementFlags[Gi]&2))),Yi.length>0){const Gn=QS(ni),Gi=Oi(Yi.slice(0,Gn),Re);if(Gi){const{labeledElementDeclarations:zn}=ni.target;for(let Hr=0;Hr<Gi.length;Hr++){const xs=ni.target.elementFlags[Hr],ns=zn==null?void 0:zn[Hr];ns?Gi[Hr]=G.createNamedTupleMember(xs&12?G.createToken(26):void 0,G.createIdentifier(Ws(X7e(ns))),xs&2?G.createToken(58):void 0,xs&4?G.createArrayTypeNode(Gi[Hr]):Gi[Hr]):Gi[Hr]=xs&12?G.createRestTypeNode(xs&4?G.createArrayTypeNode(Gi[Hr]):Gi[Hr]):xs&2?G.createOptionalTypeNode(Gi[Hr]):Gi[Hr]}const Ln=tr(G.createTupleTypeNode(Gi),1);return ni.target.readonly?G.createTypeOperatorNode(148,Ln):Ln}}if(Re.encounteredError||Re.flags&524288){const Gn=tr(G.createTupleTypeNode([]),1);return ni.target.readonly?G.createTypeOperatorNode(148,Gn):Gn}Re.encounteredError=!0;return}else{if(Re.flags&2048&&ni.symbol.valueDeclaration&&ss(ni.symbol.valueDeclaration)&&!VD(ni.symbol,Re.enclosingDeclaration))return _t(ni);{const Gn=ni.target.outerTypeParameters;let Gi=0,zn;if(Gn){const ns=Gn.length;for(;Gi<ns;){const Fo=Gi,Kc=F_t(Gn[Gi]);do Gi++;while(Gi<ns&&F_t(Gn[Gi])===Kc);if(!Vb(Gn,Yi,Fo,Gi)){const Xf=Oi(Yi.slice(Fo,Gi),Re),H_=ne(Re);Re.flags|=16;const Yg=xu(Kc,Re,788968,Xf);H_(),zn=zn?At(zn,Yg):Yg}}}let Ln;if(Yi.length>0){let ns=0;if(ni.target.typeParameters&&(ns=Math.min(ni.target.typeParameters.length,Yi.length),(iy(ni,ome(!1))||iy(ni,ipt(!1))||iy(ni,hee(!1))||iy(ni,tpt(!1)))&&(!ni.node||!qp(ni.node)||!ni.node.typeArguments||ni.node.typeArguments.length<ns)))for(;ns>0;){const Fo=Yi[ns-1],Kc=ni.target.typeParameters[ns-1],Xf=qD(Kc);if(!Xf||!yb(Fo,Xf))break;ns--}Ln=Oi(Yi.slice(Gi,ns),Re)}const Hr=ne(Re);Re.flags|=16;const xs=xu(ni.symbol,Re,788968,Ln);return Hr(),zn?At(zn,xs):xs}}}function At(ni,Yi){if(V1(ni)){let Gn=ni.typeArguments,Gi=ni.qualifier;Gi&&(ot(Gi)?Gn!==kI(Gi)&&(Gi=vS(G.cloneNode(Gi),Gn)):Gn!==kI(Gi.right)&&(Gi=G.updateQualifiedName(Gi,Gi.left,vS(G.cloneNode(Gi.right),Gn)))),Gn=Yi.typeArguments;const zn=ui(Yi);for(const Ln of zn)Gi=Gi?G.createQualifiedName(Gi,Ln):Ln;return G.updateImportTypeNode(ni,ni.argument,ni.attributes,Gi,Gn,ni.isTypeOf)}else{let Gn=ni.typeArguments,Gi=ni.typeName;ot(Gi)?Gn!==kI(Gi)&&(Gi=vS(G.cloneNode(Gi),Gn)):Gn!==kI(Gi.right)&&(Gi=G.updateQualifiedName(Gi,Gi.left,vS(G.cloneNode(Gi.right),Gn))),Gn=Yi.typeArguments;const zn=ui(Yi);for(const Ln of zn)Gi=G.createQualifiedName(Gi,Ln);return G.updateTypeReferenceNode(ni,Gi,Gn)}}function ui(ni){let Yi=ni.typeName;const Gn=[];for(;!ot(Yi);)Gn.unshift(Yi.right),Yi=Yi.left;return Gn.unshift(Yi),Gn}function yn(ni){if(ce(Re))return[G.createPropertySignature(void 0,"...",void 0,void 0)];const Yi=[];for(const zn of ni.callSignatures)Yi.push(Qn(zn,179,Re));for(const zn of ni.constructSignatures)zn.flags&4||Yi.push(Qn(zn,180,Re));for(const zn of ni.indexInfos)Yi.push(qn(zn,Re,ni.objectFlags&1024?Be(Re):void 0));const Gn=ni.properties;if(!Gn)return Yi;let Gi=0;for(const zn of Gn){if(Gi++,Re.flags&2048){if(zn.flags&4194304)continue;$m(zn)&6&&Re.tracker.reportPrivateInBaseOfClassExpression&&Re.tracker.reportPrivateInBaseOfClassExpression(Ws(zn.escapedName))}if(ce(Re)&&Gi+2<Gn.length-1){Yi.push(G.createPropertySignature(void 0,`... ${Gn.length-Gi} more ...`,void 0,void 0)),Vt(Gn[Gn.length-1],Re,Yi);break}Vt(zn,Re,Yi)}return Yi.length?Yi:void 0}}function Be(Qe){return Qe.approximateLength+=3,Qe.flags&1?G.createKeywordTypeNode(133):G.createTypeReferenceNode(G.createIdentifier("..."),void 0)}function kt(Qe,Re){var Ii;return!!(Iu(Qe)&8192)&&(Yt(Re.reverseMappedStack,Qe)||((Ii=Re.reverseMappedStack)==null?void 0:Ii[0])&&!(Or(va(Re.reverseMappedStack).links.propertyType)&16)||_r());function _r(){var Jn;if((((Jn=Re.reverseMappedStack)==null?void 0:Jn.length)??0)<3)return!1;for(let $n=0;$n<3;$n++)if(Re.reverseMappedStack[Re.reverseMappedStack.length-1-$n].links.mappedType.symbol!==Qe.links.mappedType.symbol)return!1;return!0}}function Vt(Qe,Re,Ii){var un;const _r=!!(Iu(Qe)&8192),Jn=kt(Qe,Re)?Je:Ux(Qe),$n=Re.enclosingDeclaration;if(Re.enclosingDeclaration=void 0,Re.tracker.canTrackSymbol&&Tz(Qe.escapedName))if(Qe.declarations){const ai=ya(Qe.declarations);if(eee(ai))if(ur(ai)){const qi=No(ai);qi&&wl(qi)&&HV(qi.argumentExpression)&&wu(qi.argumentExpression,$n,Re)}else wu(ai.name.expression,$n,Re)}else Re.tracker.reportNonSerializableProperty(eo(Qe));Re.enclosingDeclaration=Qe.valueDeclaration||((un=Qe.declarations)==null?void 0:un[0])||$n;const Es=ed(Qe,Re);if(Re.enclosingDeclaration=$n,Re.approximateLength+=Eu(Qe).length+1,Qe.flags&98304){const ai=zx(Qe);if(Jn!==ai&&!fe(Jn)&&!fe(ai)){const qi=ql(Qe,177),At=Dm(qi);Ii.push(Kt(Re,Qn(At,177,Re,{name:Es}),qi));const ui=ql(Qe,178),yn=Dm(ui);Ii.push(Kt(Re,Qn(yn,178,Re,{name:Es}),ui));return}}const mo=Qe.flags&16777216?G.createToken(58):void 0;if(Qe.flags&8208&&!XS(Jn).length&&!d1(Qe)){const ai=ia(ad(Jn,qi=>!(qi.flags&32768)),0);for(const qi of ai){const At=Qn(qi,173,Re,{name:Es,questionToken:mo});Ii.push(xt(At))}if(ai.length||!mo)return}let Ro;kt(Qe,Re)?Ro=Be(Re):(_r&&(Re.reverseMappedStack||(Re.reverseMappedStack=[]),Re.reverseMappedStack.push(Qe)),Ro=Jn?Z2(Re,void 0,Jn,Qe):G.createKeywordTypeNode(133),_r&&Re.reverseMappedStack.pop());const Yo=d1(Qe)?[G.createToken(148)]:void 0;Yo&&(Re.approximateLength+=9);const _t=G.createPropertySignature(Yo,Es,mo,Ro);Ii.push(xt(_t));function xt(ai){var qi;const At=(qi=Qe.declarations)==null?void 0:qi.find(ui=>ui.kind===348);if(At){const ui=RW(At.comment);ui&&e2(ai,[{kind:3,text:`*
+ * `+ui.replace(/\n/g,`
+ * `)+`
+ `,pos:-1,end:-1,hasTrailingNewLine:!0}])}else Qe.valueDeclaration&&Kt(Re,ai,Qe.valueDeclaration);return ai}}function Kt(Qe,Re,Ii){return Qe.enclosingFile&&Qe.enclosingFile===_n(Ii)?Sd(Re,Ii):Re}function Oi(Qe,Re,Ii){if(Ft(Qe)){if(ce(Re))if(Ii){if(Qe.length>2)return[ge(Qe[0],Re),G.createTypeReferenceNode(`... ${Qe.length-2} more ...`,void 0),ge(Qe[Qe.length-1],Re)]}else return[G.createTypeReferenceNode("...",void 0)];const _r=!(Re.flags&64)?Of():void 0,Jn=[];let $n=0;for(const Es of Qe){if($n++,ce(Re)&&$n+2<Qe.length-1){Jn.push(G.createTypeReferenceNode(`... ${Qe.length-$n} more ...`,void 0));const Ro=ge(Qe[Qe.length-1],Re);Ro&&Jn.push(Ro);break}Re.approximateLength+=2;const mo=ge(Es,Re);mo&&(Jn.push(mo),_r&&GDe(mo)&&_r.add(mo.typeName.escapedText,[Es,Jn.length-1]))}if(_r){const Es=ne(Re);Re.flags|=64,_r.forEach(mo=>{if(!KDe(mo,([Ro],[Yo])=>Ki(Ro,Yo)))for(const[Ro,Yo]of mo)Jn[Yo]=ge(Ro,Re)}),Es()}return Jn}}function Ki(Qe,Re){return Qe===Re||!!Qe.symbol&&Qe.symbol===Re.symbol||!!Qe.aliasSymbol&&Qe.aliasSymbol===Re.aliasSymbol}function qn(Qe,Re,Ii){const un=sTe(Qe)||"x",_r=ge(Qe.keyType,Re),Jn=G.createParameterDeclaration(void 0,void 0,un,void 0,_r,void 0);return Ii||(Ii=ge(Qe.type||Je,Re)),!Qe.type&&!(Re.flags&2097152)&&(Re.encounteredError=!0),Re.approximateLength+=un.length+4,G.createIndexSignature(Qe.isReadonly?[G.createToken(148)]:void 0,[Jn],Ii)}function Qn(Qe,Re,Ii,un){var _r;let Jn,$n;const Es=u_t(Qe,!0)[0],mo=Gr(Ii,Qe.declaration,Es,Qe.typeParameters,Qe.parameters,Qe.mapper);Ii.approximateLength+=3,Ii.flags&32&&Qe.target&&Qe.mapper&&Qe.target.typeParameters?$n=Qe.target.typeParameters.map(At=>ge(io(At,Qe.mapper),Ii)):Jn=Qe.typeParameters&&Qe.typeParameters.map(At=>fa(At,Ii));const Ro=ne(Ii);Ii.flags&=-257;const Yo=(Ft(Es,At=>At!==Es[Es.length-1]&&!!(Iu(At)&32768))?Qe.parameters:Es).map(At=>fu(At,Ii,Re===176)),_t=Ii.flags&33554432?void 0:vs(Qe,Ii);_t&&Yo.unshift(_t),Ro();const xt=Zi(Ii,Qe);let ai=un==null?void 0:un.modifiers;if(Re===185&&Qe.flags&4){const At=M1(ai);ai=G.createModifiersFromModifierFlags(At|64)}const qi=Re===179?G.createCallSignature(Jn,Yo,xt):Re===180?G.createConstructSignature(Jn,Yo,xt):Re===173?G.createMethodSignature(ai,(un==null?void 0:un.name)??G.createIdentifier(""),un==null?void 0:un.questionToken,Jn,Yo,xt):Re===174?G.createMethodDeclaration(ai,void 0,(un==null?void 0:un.name)??G.createIdentifier(""),void 0,Jn,Yo,xt,void 0):Re===176?G.createConstructorDeclaration(ai,Yo,void 0):Re===177?G.createGetAccessorDeclaration(ai,(un==null?void 0:un.name)??G.createIdentifier(""),Yo,xt,void 0):Re===178?G.createSetAccessorDeclaration(ai,(un==null?void 0:un.name)??G.createIdentifier(""),Yo,void 0):Re===181?G.createIndexSignature(ai,Yo,xt):Re===317?G.createJSDocFunctionType(Yo,xt):Re===184?G.createFunctionTypeNode(Jn,Yo,xt??G.createTypeReferenceNode(G.createIdentifier(""))):Re===185?G.createConstructorTypeNode(ai,Jn,Yo,xt??G.createTypeReferenceNode(G.createIdentifier(""))):Re===262?G.createFunctionDeclaration(ai,void 0,un!=null&&un.name?ha(un.name,ot):G.createIdentifier(""),Jn,Yo,xt,void 0):Re===218?G.createFunctionExpression(ai,void 0,un!=null&&un.name?ha(un.name,ot):G.createIdentifier(""),Jn,Yo,xt,G.createBlock([])):Re===219?G.createArrowFunction(ai,Jn,Yo,xt,void 0,G.createBlock([])):j.assertNever(Re);if($n&&(qi.typeArguments=G.createNodeArray($n)),((_r=Qe.declaration)==null?void 0:_r.kind)===323&&Qe.declaration.parent.kind===339){const At=uu(Qe.declaration.parent.parent,!0).slice(2,-2).split(/\r\n|\n|\r/).map(ui=>ui.replace(/^\s+/," ")).join(`
+`);h7(qi,3,At,!0)}return mo==null||mo(),qi}function rn(Qe){return Ho(Qe)||tC(Qe)||II(Qe)}function Ui(Qe){return Ho(Qe)||tC(Qe)?Dm(Qe).typeParameters:iD(Qe)?u8e(Qe):[jD(xr(Qe.typeParameter))]}function fr(Qe){return Ho(Qe)||tC(Qe)?Dm(Qe).parameters:void 0}function Gr(Qe,Re,Ii,un,_r,Jn){const $n=tM(Qe);let Es,mo;const Ro=Qe.enclosingDeclaration,Yo=Qe.mapper;if(Jn&&(Qe.mapper=Jn),Qe.enclosingDeclaration&&Re){let _t=function(xt,ai){j.assert(Qe.enclosingDeclaration);let qi;yr(Qe.enclosingDeclaration).fakeScopeForSignatureDeclaration===xt?qi=Qe.enclosingDeclaration:Qe.enclosingDeclaration.parent&&yr(Qe.enclosingDeclaration.parent).fakeScopeForSignatureDeclaration===xt&&(qi=Qe.enclosingDeclaration.parent),j.assertOptionalNode(qi,Xo);const At=(qi==null?void 0:qi.locals)??_a();let ui,yn;if(ai((ni,Yi)=>{if(qi){const Gn=At.get(ni);Gn?yn=fn(yn,{name:ni,oldSymbol:Gn}):ui=fn(ui,ni)}At.set(ni,Yi)}),qi)return function(){O(ui,Yi=>At.delete(Yi)),O(yn,Yi=>At.set(Yi.name,Yi.oldSymbol))};{const ni=G.createBlock(w);yr(ni).fakeScopeForSignatureDeclaration=xt,ni.locals=At,_c(ni,Qe.enclosingDeclaration),Qe.enclosingDeclaration=ni}};Es=Ft(Ii)?_t("params",xt=>{if(Ii)for(let ai=0;ai<Ii.length;ai++){const qi=Ii[ai],At=_r==null?void 0:_r[ai];_r&&At!==qi?(xt(qi.escapedName,pt),At&&xt(At.escapedName,pt)):O(qi.declarations,ui=>{if($s(ui)&&ta(ui.name))return yn(ui.name),!0;return;function yn(Yi){O(Yi.elements,Gn=>{switch(Gn.kind){case 232:return;case 208:return ni(Gn);default:return j.assertNever(Gn)}})}function ni(Yi){if(ta(Yi.name))return yn(Yi.name);const Gn=xr(Yi);xt(Gn.escapedName,Gn)}})||xt(qi.escapedName,qi)}}):void 0,Qe.flags&4&&Ft(un)&&(mo=_t("typeParams",xt=>{for(const ai of un??w){const qi=hf(ai,Qe).escapedText;xt(qi,ai.symbol)}}))}return()=>{Es==null||Es(),mo==null||mo(),$n(),Qe.enclosingDeclaration=Ro,Qe.mapper=Yo}}function vs(Qe,Re){if(Qe.thisParameter)return fu(Qe.thisParameter,Re);if(Qe.declaration&&nr(Qe.declaration)){const Ii=cG(Qe.declaration);if(Ii&&Ii.typeExpression)return G.createParameterDeclaration(void 0,void 0,"this",void 0,ge(o(Re,Ii.typeExpression),Re))}}function Ur(Qe,Re,Ii){const un=ne(Re);Re.flags&=-513;const _r=G.createModifiersFromModifierFlags(I8e(Qe)),Jn=hf(Qe,Re),$n=qD(Qe),Es=$n&&ge($n,Re);return un(),G.createTypeParameterDeclaration(_r,Jn,Ii,Es)}function ga(Qe,Re,Ii){return Re&&L(Ii,Re,Qe)||ge(Qe,Ii)}function fa(Qe,Re,Ii=m_(Qe)){const un=Ii&&ga(Ii,tme(Qe),Re);return Ur(Qe,Re,un)}function Al(Qe,Re){const Ii=Qe.kind===2||Qe.kind===3?G.createToken(131):void 0,un=Qe.kind===1||Qe.kind===3?tr(G.createIdentifier(Qe.parameterName),16777216):G.createThisTypeNode(),_r=Qe.type&&ge(Qe.type,Re);return G.createTypePredicateNode(Ii,un,_r)}function Po(Qe){const Re=ql(Qe,169);if(Re)return Re;if(!Rv(Qe))return ql(Qe,341)}function fu(Qe,Re,Ii){const un=Po(Qe),_r=Yn(Qe),Jn=Z2(Re,un,_r,Qe),$n=!(Re.flags&8192)&&Ii&&un&&Fg(un)?qt(PT(un),G.cloneNode):void 0,mo=un&&Oy(un)||Iu(Qe)&32768?G.createToken(26):void 0,Ro=Ef(Qe,un,Re),_t=un&&cee(un)||Iu(Qe)&16384?G.createToken(58):void 0,xt=G.createParameterDeclaration($n,mo,Ro,_t,Jn,void 0);return Re.approximateLength+=Eu(Qe).length+3,xt}function Ef(Qe,Re,Ii){return Re&&Re.name?Re.name.kind===80?tr(G.cloneNode(Re.name),16777216):Re.name.kind===166?tr(G.cloneNode(Re.name.right),16777216):un(Re.name):Eu(Qe);function un(_r){return Jn(_r);function Jn($n){Ii.tracker.canTrackSymbol&&Ka($n)&&Gpe($n)&&wu($n.expression,Ii.enclosingDeclaration,Ii);let Es=dn($n,Jn,void 0,void 0,Jn);return ec(Es)&&(Es=G.updateBindingElement(Es,Es.dotDotDotToken,Es.propertyName,Es.name,void 0)),cl(Es)||(Es=G.cloneNode(Es)),tr(Es,16777217)}}}function wu(Qe,Re,Ii){if(!Ii.tracker.canTrackSymbol)return;const un=K_(Qe),_r=_i(un,un.escapedText,1160127,void 0,!0);_r&&Ii.tracker.trackSymbol(_r,Re,111551)}function bn(Qe,Re,Ii,un){return Re.tracker.trackSymbol(Qe,Re.enclosingDeclaration,Ii),Fn(Qe,Re,Ii,un)}function Fn(Qe,Re,Ii,un){let _r;return!(Qe.flags&262144)&&(Re.enclosingDeclaration||Re.flags&64)&&!(Re.internalFlags&4)?(_r=j.checkDefined($n(Qe,Ii,!0)),j.assert(_r&&_r.length>0)):_r=[Qe],_r;function $n(Es,mo,Ro){let Yo=JS(Es,Re.enclosingDeclaration,mo,!!(Re.flags&128)),_t;if(!Yo||Bp(Yo[0],Re.enclosingDeclaration,Yo.length===1?mo:i1(mo))){const ai=FA(Yo?Yo[0]:Es,Re.enclosingDeclaration,mo);if(P(ai)){_t=ai.map(ui=>Ft(ui.declarations,Bx)?La(ui,Re):void 0);const qi=ai.map((ui,yn)=>yn);qi.sort(xt);const At=qi.map(ui=>ai[ui]);for(const ui of At){const yn=$n(ui,i1(mo),!1);if(yn){if(ui.exports&&ui.exports.get("export=")&&Gg(ui.exports.get("export="),Es)){Yo=yn;break}Yo=yn.concat(Yo||[BD(ui,Es)||Es]);break}}}}if(Yo)return Yo;if(Ro||!(Es.flags&6144))return!Ro&&!un&&O(Es.declarations,Bx)?void 0:[Es];function xt(ai,qi){const At=_t[ai],ui=_t[qi];if(At&&ui){const yn=am(ui);return am(At)===yn?_Q(At)-_Q(ui):yn?-1:1}return 0}}}function js(Qe,Re){let Ii;return eM(Qe).flags&524384&&(Ii=G.createNodeArray(qt(y0(Qe),_r=>fa(_r,Re)))),Ii}function or(Qe,Re,Ii){var un;j.assert(Qe&&0<=Re&&Re<Qe.length);const _r=Qe[Re],Jn=Ba(_r);if((un=Ii.typeParameterSymbolList)!=null&&un.has(Jn))return;Ii.mustCreateTypeParameterSymbolList&&(Ii.mustCreateTypeParameterSymbolList=!1,Ii.typeParameterSymbolList=new Set(Ii.typeParameterSymbolList)),Ii.typeParameterSymbolList.add(Jn);let $n;if(Ii.flags&512&&Re<Qe.length-1){const Es=_r,mo=Qe[Re+1];if(Iu(mo)&1){const Ro=mRe(Es.flags&2097152?$f(Es):Es);$n=Oi(qt(Ro,Yo=>ZS(Yo,mo.links.mapper)),Ii)}else $n=js(_r,Ii)}return $n}function Do(Qe){return nD(Qe.objectType)?Do(Qe.objectType):Qe}function La(Qe,Re,Ii){let un=ql(Qe,307);if(!un){const _t=J(Qe.declarations,xt=>FD(xt,Qe));_t&&(un=ql(_t,307))}if(un&&un.moduleName!==void 0)return un.moduleName;if(!un&&xNe.test(Qe.escapedName))return Qe.escapedName.substring(1,Qe.escapedName.length-1);if(!Re.enclosingFile||!Re.tracker.moduleResolverHost)return xNe.test(Qe.escapedName)?Qe.escapedName.substring(1,Qe.escapedName.length-1):_n(xae(Qe)).fileName;const _r=Ql(Re.enclosingDeclaration),Jn=PTe(_r)?Z6(_r):void 0,$n=Re.enclosingFile,Es=Ii||Jn&&t.getModeForUsageLocation($n,Jn)||$n&&t.getDefaultResolutionModeForFile($n),mo=B7($n.path,Es),Ro=Ys(Qe);let Yo=Ro.specifierCache&&Ro.specifierCache.get(mo);if(!Yo){const _t=!!Q.outFile,{moduleResolverHost:xt}=Re.tracker,ai=_t?{...Q,baseUrl:xt.getCommonSourceDirectory()}:Q;Yo=ya(WYe(Qe,On,ai,$n,xt,{importModuleSpecifierPreference:_t?"non-relative":"project-relative",importModuleSpecifierEnding:_t?"minimal":Es===99?"js":void 0},{overrideImportMode:Ii})),Ro.specifierCache??(Ro.specifierCache=new Map),Ro.specifierCache.set(mo,Yo)}return Yo}function Ol(Qe){const Re=G.createIdentifier(Ws(Qe.escapedName));return Qe.parent?G.createQualifiedName(Ol(Qe.parent),Re):Re}function xu(Qe,Re,Ii,un){const _r=bn(Qe,Re,Ii,!(Re.flags&16384)),Jn=Ii===111551;if(Ft(_r[0].declarations,Bx)){const mo=_r.length>1?Es(_r,_r.length-1,1):void 0,Ro=un||or(_r,0,Re),Yo=_n(Ql(Re.enclosingDeclaration)),_t=LG(_r[0]);let xt,ai;if((yh(Q)===3||yh(Q)===99)&&(_t==null?void 0:_t.impliedNodeFormat)===99&&_t.impliedNodeFormat!==(Yo==null?void 0:Yo.impliedNodeFormat)&&(xt=La(_r[0],Re,99),ai=G.createImportAttributes(G.createNodeArray([G.createImportAttribute(G.createStringLiteral("resolution-mode"),G.createStringLiteral("import"))]))),xt||(xt=La(_r[0],Re)),!(Re.flags&67108864)&&yh(Q)!==1&&xt.includes("/node_modules/")){const At=xt;if(yh(Q)===3||yh(Q)===99){const ui=(Yo==null?void 0:Yo.impliedNodeFormat)===99?1:99;xt=La(_r[0],Re,ui),xt.includes("/node_modules/")?xt=At:ai=G.createImportAttributes(G.createNodeArray([G.createImportAttribute(G.createStringLiteral("resolution-mode"),G.createStringLiteral(ui===99?"import":"require"))]))}ai||(Re.encounteredError=!0,Re.tracker.reportLikelyUnsafeImportRequiredError&&Re.tracker.reportLikelyUnsafeImportRequiredError(At))}const qi=G.createLiteralTypeNode(G.createStringLiteral(xt));if(Re.approximateLength+=xt.length+10,!mo||E_(mo)){if(mo){const At=ot(mo)?mo:mo.right;vS(At,void 0)}return G.createImportTypeNode(qi,ai,mo,Ro,Jn)}else{const At=Do(mo),ui=At.objectType.typeName;return G.createIndexedAccessTypeNode(G.createImportTypeNode(qi,ai,ui,Ro,Jn),At.indexType)}}const $n=Es(_r,_r.length-1,0);if(nD($n))return $n;if(Jn)return G.createTypeQueryNode($n);{const mo=ot($n)?$n:$n.right,Ro=kI(mo);return vS(mo,void 0),G.createTypeReferenceNode($n,Ro)}function Es(mo,Ro,Yo){const _t=Ro===mo.length-1?un:or(mo,Ro,Re),xt=mo[Ro],ai=mo[Ro-1];let qi;if(Ro===0)Re.flags|=16777216,qi=Vx(xt,Re),Re.approximateLength+=(qi?qi.length:0)+1,Re.flags^=16777216;else if(ai&&__(ai)){const ui=__(ai);cf(ui,(yn,ni)=>{if(Gg(yn,xt)&&!Tz(ni)&&ni!=="export=")return qi=Ws(ni),!0})}if(qi===void 0){const ui=J(xt.declarations,No);if(ui&&Ka(ui)&&E_(ui.expression)){const yn=Es(mo,Ro-1,Yo);return E_(yn)?G.createIndexedAccessTypeNode(G.createParenthesizedType(G.createTypeQueryNode(yn)),G.createTypeQueryNode(ui.expression)):yn}qi=Vx(xt,Re)}if(Re.approximateLength+=qi.length+1,!(Re.flags&16)&&ai&&qx(ai)&&qx(ai).get(xt.escapedName)&&Gg(qx(ai).get(xt.escapedName),xt)){const ui=Es(mo,Ro-1,Yo);return nD(ui)?G.createIndexedAccessTypeNode(ui,G.createLiteralTypeNode(G.createStringLiteral(qi))):G.createIndexedAccessTypeNode(G.createTypeReferenceNode(ui,_t),G.createLiteralTypeNode(G.createStringLiteral(qi)))}const At=tr(G.createIdentifier(qi),16777216);if(_t&&vS(At,G.createNodeArray(_t)),At.symbol=xt,Ro>Yo){const ui=Es(mo,Ro-1,Yo);return E_(ui)?G.createQualifiedName(ui,At):j.fail("Impossible construct - an export of an indexed access cannot be reachable")}return At}}function nc(Qe,Re,Ii){const un=_i(Re.enclosingDeclaration,Qe,788968,void 0,!1);return un&&un.flags&262144?un!==Ii.symbol:!1}function hf(Qe,Re){var Ii,un,_r,Jn;if(Re.flags&4&&Re.typeParameterNames){const mo=Re.typeParameterNames.get(kf(Qe));if(mo)return mo}let $n=Ou(Qe.symbol,Re,788968,!0);if(!($n.kind&80))return G.createIdentifier("(Missing type parameter)");const Es=(un=(Ii=Qe.symbol)==null?void 0:Ii.declarations)==null?void 0:un[0];if(Es&&$l(Es)&&($n=_(Re,$n,Es.name)),Re.flags&4){const mo=$n.escapedText;let Ro=((_r=Re.typeParameterNamesByTextNextNameCount)==null?void 0:_r.get(mo))||0,Yo=mo;for(;(Jn=Re.typeParameterNamesByText)!=null&&Jn.has(Yo)||nc(Yo,Re,Qe);)Ro++,Yo=`${mo}_${Ro}`;if(Yo!==mo){const _t=kI($n);$n=G.createIdentifier(Yo),vS($n,_t)}Re.mustCreateTypeParametersNamesLookups&&(Re.mustCreateTypeParametersNamesLookups=!1,Re.typeParameterNames=new Map(Re.typeParameterNames),Re.typeParameterNamesByTextNextNameCount=new Map(Re.typeParameterNamesByTextNextNameCount),Re.typeParameterNamesByText=new Set(Re.typeParameterNamesByText)),Re.typeParameterNamesByTextNextNameCount.set(mo,Ro),Re.typeParameterNames.set(kf(Qe),$n),Re.typeParameterNamesByText.add(Yo)}return $n}function Ou(Qe,Re,Ii,un){const _r=bn(Qe,Re,Ii);return un&&_r.length!==1&&!Re.encounteredError&&!(Re.flags&65536)&&(Re.encounteredError=!0),Jn(_r,_r.length-1);function Jn($n,Es){const mo=or($n,Es,Re),Ro=$n[Es];Es===0&&(Re.flags|=16777216);const Yo=Vx(Ro,Re);Es===0&&(Re.flags^=16777216);const _t=tr(G.createIdentifier(Yo),16777216);return mo&&vS(_t,G.createNodeArray(mo)),_t.symbol=Ro,Es>0?G.createQualifiedName(Jn($n,Es-1),_t):_t}}function ul(Qe,Re,Ii){const un=bn(Qe,Re,Ii);return _r(un,un.length-1);function _r(Jn,$n){const Es=or(Jn,$n,Re),mo=Jn[$n];$n===0&&(Re.flags|=16777216);let Ro=Vx(mo,Re);$n===0&&(Re.flags^=16777216);let Yo=Ro.charCodeAt(0);if(_V(Yo)&&Ft(mo.declarations,Bx))return G.createStringLiteral(La(mo,Re));if($n===0||Gce(Ro,re)){const _t=tr(G.createIdentifier(Ro),16777216);return Es&&vS(_t,G.createNodeArray(Es)),_t.symbol=mo,$n>0?G.createPropertyAccessExpression(_r(Jn,$n-1),_t):_t}else{Yo===91&&(Ro=Ro.substring(1,Ro.length-1),Yo=Ro.charCodeAt(0));let _t;if(_V(Yo)&&!(mo.flags&8)?_t=G.createStringLiteral(zm(Ro).replace(/\\./g,xt=>xt.substring(1)),Yo===39):""+ +Ro===Ro&&(_t=G.createNumericLiteral(+Ro)),!_t){const xt=tr(G.createIdentifier(Ro),16777216);Es&&vS(xt,G.createNodeArray(Es)),xt.symbol=mo,_t=xt}return G.createElementAccessExpression(_r(Jn,$n-1),_t)}}}function Im(Qe){const Re=No(Qe);return Re?Ka(Re)?!!(uo(Re.expression).flags&402653316):wl(Re)?!!(uo(Re.argumentExpression).flags&402653316):Ha(Re):!1}function zu(Qe){const Re=No(Qe);return!!(Re&&Ha(Re)&&(Re.singleQuote||!cl(Re)&&so(uu(Re,!1),"'")))}function ed(Qe,Re){const Ii=!!P(Qe.declarations)&&Ce(Qe.declarations,Im),un=!!P(Qe.declarations)&&Ce(Qe.declarations,zu),_r=!!(Qe.flags&8192),Jn=nw(Qe,Re,un,Ii,_r);if(Jn)return Jn;const $n=Ws(Qe.escapedName);return tX($n,Ja(Q),un,Ii,_r)}function nw(Qe,Re,Ii,un,_r){const Jn=Ys(Qe).nameType;if(Jn){if(Jn.flags&384){const $n=""+Jn.value;return!J_($n,Ja(Q))&&(un||!$v($n))?G.createStringLiteral($n,!!Ii):$v($n)&&so($n,"-")?G.createComputedPropertyName(G.createPrefixUnaryExpression(41,G.createNumericLiteral(-$n))):tX($n,Ja(Q),Ii,un,_r)}if(Jn.flags&8192)return G.createComputedPropertyName(ul(Jn.symbol,Re,111551))}}function tM(Qe){const Re=Qe.mustCreateTypeParameterSymbolList,Ii=Qe.mustCreateTypeParametersNamesLookups;Qe.mustCreateTypeParameterSymbolList=!0,Qe.mustCreateTypeParametersNamesLookups=!0;const un=Qe.typeParameterNames,_r=Qe.typeParameterNamesByText,Jn=Qe.typeParameterNamesByTextNextNameCount,$n=Qe.typeParameterSymbolList;return()=>{Qe.typeParameterNames=un,Qe.typeParameterNamesByText=_r,Qe.typeParameterNamesByTextNextNameCount=Jn,Qe.typeParameterSymbolList=$n,Qe.mustCreateTypeParameterSymbolList=Re,Qe.mustCreateTypeParametersNamesLookups=Ii}}function cF(Qe,Re){return Qe.declarations&&Fe(Qe.declarations,Ii=>!!Rge(Ii)&&(!Re||!!Qi(Ii,un=>un===Re)))}function lF(Qe,Re){if(!(Or(Re)&4)||!qp(Qe))return!0;uee(Qe);const Ii=yr(Qe).resolvedSymbol,un=Ii&&gl(Ii);return!un||un!==Re.target?!0:P(Qe.typeArguments)>=sy(Re.target.typeParameters)}function Yp(Qe){for(;yr(Qe).fakeScopeForSignatureDeclaration;)Qe=Qe.parent;return Qe}function Z2(Qe,Re,Ii,un){var _r,Jn;const $n=Re&&($s(Re)||Qm(Re))&&Mge(Re,Qe.enclosingDeclaration),Es=Qe.enclosingDeclaration,mo=ne(Qe);if(Re&&aEe(Re)&&!(Qe.internalFlags&2)&&ze.serializeTypeOfDeclaration(Re,Qe),Qe.internalFlags|=2,Es&&(!fe(Ii)||Qe.internalFlags&8)){const xt=Re&&Rge(Re)?Re:cF(un);if(xt&&!Qc(xt)&&!um(xt)){const ai=Rge(xt),qi=$n||!!(un.flags&4&&un.flags&16777216&&g3(xt)&&((_r=un.links)!=null&&_r.mappedType)&&Zpt(Ii)),At=!HP(ai)&&D(Qe,ai,Ii,xt,qi);if(At)return mo(),At}}Ii.flags&8192&&Ii.symbol===un&&(!Qe.enclosingDeclaration||Ft(un.declarations,xt=>_n(xt)===_n(Qe.enclosingDeclaration)))&&(Qe.flags|=1048576);const Ro=Re??un.valueDeclaration??((Jn=un.declarations)==null?void 0:Jn[0]),Yo=Ro&&Wsi(Ro)?dyt(Ro):void 0,_t=y(Qe,Yo,Ii,$n);return mo(),_t}function di(Qe,Re,Ii){return Ii===Re?!0:Qe&&($s(Qe)||O_(Qe)||Lo(Qe))&&Qe.questionToken?Qg(Re,524288)===Ii:!1}function Zi(Qe,Re){const Ii=Qe.flags&256,un=ne(Qe);Ii&&(Qe.flags&=-257);let _r;const Jn=Oc(Re);return Jn&&!(Ii&&Nc(Jn))?(Re.declaration&&!(Qe.internalFlags&2)&&ze.serializeReturnTypeForSignature(Re.declaration,Qe),Qe.internalFlags|=2,_r=Tn(Qe,Re)):Ii||(_r=G.createKeywordTypeNode(133)),un(),_r}function Tn(Qe,Re){const Ii=cg(Re),un=Oc(Re);if(Qe.enclosingDeclaration&&(!fe(un)||Qe.internalFlags&8)&&Re.declaration&&!cl(Re.declaration)){const Jn=Ksi(Re.declaration);if(Jn){const $n=D(Qe,Jn,un,Qe.enclosingDeclaration);if($n)return $n}}if(Ii)return Al(Ii,Qe);const _r=Re.declaration&&dyt(Re.declaration);return y(Qe,_r,un)}function Bn(Qe,Re){let Ii=!1;const un=K_(Qe);if(nr(Qe)&&(yI(un)||Wv(un.parent)||o_(un.parent)&&Wae(un.parent.left)&&yI(un.parent.right)))return Ii=!0,{introducesError:Ii,node:Qe};const _r=gz(Qe);let Jn;if(ix(un))return Jn=xr(Hh(un,!1,!1)),n1(Jn,un,_r,!1).accessibility!==0&&(Ii=!0,Re.tracker.reportInaccessibleThisError()),{introducesError:Ii,node:$n(Qe)};if(Jn=nu(un,_r,!0,!0),Re.enclosingDeclaration&&!(Jn&&Jn.flags&262144)){Jn=Rp(Jn);const Es=nu(un,_r,!0,!0,Re.enclosingDeclaration);if(Es===pt||Es===void 0&&Jn!==void 0||Es&&Jn&&!Gg(Rp(Es),Jn))return Es!==pt&&Re.tracker.reportInferenceFallback(Qe),Ii=!0,{introducesError:Ii,node:Qe,sym:Jn};Jn=Es}if(Jn)return Jn.flags&1&&Jn.valueDeclaration&&(Qk(Jn.valueDeclaration)||Qm(Jn.valueDeclaration))?{introducesError:Ii,node:$n(Qe)}:(!(Jn.flags&262144)&&!Wy(Qe)&&n1(Jn,Re.enclosingDeclaration,_r,!1).accessibility!==0?(Re.tracker.reportInferenceFallback(Qe),Ii=!0):Re.tracker.trackSymbol(Jn,Re.enclosingDeclaration,_r),{introducesError:Ii,node:$n(Qe)});return{introducesError:Ii,node:Qe};function $n(Es){if(Es===un){const Ro=gl(Jn),Yo=Jn.flags&262144?hf(Ro,Re):G.cloneNode(Es);return Yo.symbol=Jn,_(Re,tr(Yo,16777216),Es)}const mo=dn(Es,Ro=>$n(Ro),void 0);return mo!==Es&&_(Re,mo,Es),mo}}function Er(Qe,Re,Ii,un){const _r=Ii?111551:788968,Jn=nu(Re,_r,!0);if(!Jn)return;const $n=Jn.flags&2097152?$f(Jn):Jn;if(n1(Jn,Qe.enclosingDeclaration,_r,!1).accessibility===0)return xu($n,Qe,_r,un)}function os(Qe,Re){if(nr(Re)&&lS(Re)){Opt(Re);const Ii=yr(Re).resolvedSymbol;return!Ii||!(!Re.isTypeOf&&!(Ii.flags&788968)||!(P(Re.typeArguments)>=sy(y0(Ii))))}if(C3(Re))return Qe.mapper===void 0?!0:!!o(Qe,Re,!0);if(qp(Re)){if(O0(Re))return!1;const Ii=uee(Re),un=yr(Re).resolvedSymbol;if(!un)return!1;if(un.flags&262144){const _r=gl(un);if(Qe.mapper&&ZS(_r,Qe.mapper)!==_r)return!1}if(dV(Re))return lF(Re,Ii)&&!q_t(Re)&&un.flags&788968}if(t2(Re)&&Re.operator===158&&Re.type.kind===155){const Ii=Qe.enclosingDeclaration&&Yp(Qe.enclosingDeclaration);return!!Qi(Re,un=>un===Ii)}return!0}function Oa(Qe,Re){const Ii=o(Qe,Re);return ge(Ii,Qe)}function Ua(Qe,Re){u&&u.throwIfCancellationRequested&&u.throwIfCancellationRequested();let Ii=!1;const{finalizeBoundary:un,startRecoveryScope:_r}=Es(),Jn=bt(Re,$n,ws);if(!un())return;return Qe.approximateLength+=Re.end-Re.pos,Jn;function $n(At){if(Ii)return At;const ui=_r(),yn=rn(At)?mo(At):void 0,ni=qi(At);return yn==null||yn(),Ii?ws(At)&&!HP(At)?(ui(),Oa(Qe,At)):At:ni?_(Qe,ni,At):void 0}function Es(){let At,ui;const yn=Qe.tracker,ni=Qe.trackedSymbols;Qe.trackedSymbols=void 0;const Yi=Qe.encounteredError;return Qe.tracker=new DNe(Qe,{...yn.inner,reportCyclicStructureError(){Gn(()=>yn.reportCyclicStructureError())},reportInaccessibleThisError(){Gn(()=>yn.reportInaccessibleThisError())},reportInaccessibleUniqueSymbolError(){Gn(()=>yn.reportInaccessibleUniqueSymbolError())},reportLikelyUnsafeImportRequiredError(Ln){Gn(()=>yn.reportLikelyUnsafeImportRequiredError(Ln))},reportNonSerializableProperty(Ln){Gn(()=>yn.reportNonSerializableProperty(Ln))},trackSymbol(Ln,Hr,xs){return(At??(At=[])).push([Ln,Hr,xs]),!1},moduleResolverHost:Qe.tracker.moduleResolverHost},Qe.tracker.moduleResolverHost),{startRecoveryScope:Gi,finalizeBoundary:zn};function Gn(Ln){Ii=!0,(ui??(ui=[])).push(Ln)}function Gi(){const Ln=(At==null?void 0:At.length)??0,Hr=(ui==null?void 0:ui.length)??0;return()=>{Ii=!1,At&&(At.length=Ln),ui&&(ui.length=Hr)}}function zn(){return Qe.tracker=yn,Qe.trackedSymbols=ni,Qe.encounteredError=Yi,ui==null||ui.forEach(Ln=>Ln()),Ii?!1:(At==null||At.forEach(([Ln,Hr,xs])=>Qe.tracker.trackSymbol(Ln,Hr,xs)),!0)}}function mo(At){return Gr(Qe,At,fr(At),Ui(At))}function Ro(At){const ui=M8(At);switch(ui.kind){case 183:return ai(ui);case 186:return xt(ui);case 199:return Yo(ui);case 198:const yn=ui;if(yn.operator===143)return _t(yn)}return bt(At,$n,ws)}function Yo(At){const ui=Ro(At.objectType);if(ui!==void 0)return G.updateIndexedAccessTypeNode(At,ui,bt(At.indexType,$n,ws))}function _t(At){j.assertEqual(At.operator,143);const ui=Ro(At.type);if(ui!==void 0)return G.updateTypeOperatorNode(At,ui)}function xt(At){const{introducesError:ui,node:yn}=Bn(At.exprName,Qe);if(!ui)return G.updateTypeQueryNode(At,yn,Dn(At.typeArguments,$n,ws));const ni=Er(Qe,At.exprName,!0);if(ni)return _(Qe,ni,At.exprName)}function ai(At){if(os(Qe,At)){const{introducesError:ui,node:yn}=Bn(At.typeName,Qe),ni=Dn(At.typeArguments,$n,ws);if(ui){const Yi=Er(Qe,At.typeName,!1,ni);if(Yi)return _(Qe,Yi,At.typeName)}else{const Yi=G.updateTypeReferenceNode(At,yn,ni);return _(Qe,Yi,At)}}}function qi(At){if(o2(At))return bt(At.type,$n,ws);if(JEe(At)||At.kind===319)return G.createKeywordTypeNode(133);if(GEe(At))return G.createKeywordTypeNode(159);if(k3(At))return G.createUnionTypeNode([bt(At.type,$n,ws),G.createLiteralTypeNode(G.createNull())]);if(vle(At))return G.createUnionTypeNode([bt(At.type,$n,ws),G.createKeywordTypeNode(157)]);if(TX(At))return bt(At.type,$n);if(DX(At))return G.createArrayTypeNode(bt(At.type,$n,ws));if(OI(At))return G.createTypeLiteralNode(qt(At.jsDocPropertyTags,Gi=>{const zn=bt(ot(Gi.name)?Gi.name:Gi.name.right,$n,ot),Ln=Yu(o(Qe,At),zn.escapedText),Hr=Ln&&Gi.typeExpression&&o(Qe,Gi.typeExpression.type)!==Ln?ge(Ln,Qe):void 0;return G.createPropertySignature(void 0,zn,Gi.isBracketed||Gi.typeExpression&&vle(Gi.typeExpression.type)?G.createToken(58):void 0,Hr||Gi.typeExpression&&bt(Gi.typeExpression.type,$n,ws)||G.createKeywordTypeNode(133))}));if(qp(At)&&ot(At.typeName)&&At.typeName.escapedText==="")return Ir(G.createKeywordTypeNode(133),At);if((Yb(At)||qp(At))&&eK(At))return G.createTypeLiteralNode([G.createIndexSignature(void 0,[G.createParameterDeclaration(void 0,void 0,"x",void 0,bt(At.typeArguments[0],$n,ws))],bt(At.typeArguments[1],$n,ws))]);if(T3(At))if(e3(At)){let Gi;return G.createConstructorTypeNode(void 0,Dn(At.typeParameters,$n,$l),es(At.parameters,(zn,Ln)=>zn.name&&ot(zn.name)&&zn.name.escapedText==="new"?(Gi=zn.type,void 0):G.createParameterDeclaration(void 0,ni(zn),_(Qe,G.createIdentifier(Yi(zn,Ln)),zn),G.cloneNode(zn.questionToken),bt(zn.type,$n,ws),void 0)),bt(Gi||At.type,$n,ws)||G.createKeywordTypeNode(133))}else return G.createFunctionTypeNode(Dn(At.typeParameters,$n,$l),qt(At.parameters,(Gi,zn)=>G.createParameterDeclaration(void 0,ni(Gi),_(Qe,G.createIdentifier(Yi(Gi,zn)),Gi),G.cloneNode(Gi.questionToken),bt(Gi.type,$n,ws),void 0)),bt(At.type,$n,ws)||G.createKeywordTypeNode(133));if(C3(At))return os(Qe,At)||(Ii=!0),At;if($l(At))return G.updateTypeParameterDeclaration(At,Dn(At.modifiers,$n,Fa),_(Qe,hf(gl(xr(At)),Qe),At),bt(At.constraint,$n,ws),bt(At.default,$n,ws));if(nD(At)){const Gi=Yo(At);return Gi||(Ii=!0,At)}if(qp(At)){const Gi=ai(At);return Gi||(Ii=!0,At)}if(lS(At)){const Gi=yr(At).resolvedSymbol;return dV(At)&&Gi&&(!At.isTypeOf&&!(Gi.flags&788968)||!(P(At.typeArguments)>=sy(y0(Gi))))?_(Qe,ge(o(Qe,At),Qe),At):G.updateImportTypeNode(At,G.updateLiteralTypeNode(At.argument,Gn(At,At.argument.literal)),bt(At.attributes,$n,LI),bt(At.qualifier,$n,E_),Dn(At.typeArguments,$n,ws),At.isTypeOf)}if(Bf(At)&&At.name.kind===167&&!Gpe(At.name)){if(!Jb(At))return ui(At,$n);if(!(Qe.internalFlags&8&&pl(At.name.expression)&&cy(At.name).flags&1))return}if(Ho(At)&&!At.type||Lo(At)&&!At.type&&!At.initializer||O_(At)&&!At.type&&!At.initializer||$s(At)&&!At.type&&!At.initializer){let Gi=ui(At,$n);return Gi===At&&(Gi=_(Qe,G.cloneNode(At),At)),Gi.type=G.createKeywordTypeNode(133),$s(At)&&(Gi.modifiers=void 0),Gi}if(tD(At)){const Gi=xt(At);return Gi||(Ii=!0,At)}if(Ka(At)&&pl(At.expression)){const{node:Gi,introducesError:zn}=Bn(At.expression,Qe);if(zn){const Ln=lp(O5e(At.expression)),Hr=ge(Ln,Qe);let xs;if(bS(Hr))xs=Hr.literal;else{const ns=z1t(At.expression),Fo=typeof ns.value=="string"?G.createStringLiteral(ns.value,void 0):typeof ns.value=="number"?G.createNumericLiteral(ns.value,0):void 0;if(!Fo)return V1(Hr)&&wu(At.expression,Qe.enclosingDeclaration,Qe),At;xs=Fo}return xs.kind===11&&J_(xs.text,Ja(Q))?G.createIdentifier(xs.text):xs.kind===9&&!xs.text.startsWith("-")?xs:G.updateComputedPropertyName(At,xs)}else return G.updateComputedPropertyName(At,Gi)}if(HP(At)){let Gi;if(ot(At.parameterName)){const{node:zn,introducesError:Ln}=Bn(At.parameterName,Qe);Ii=Ii||Ln,Gi=zn}else Gi=G.cloneNode(At.parameterName);return G.updateTypePredicateNode(At,G.cloneNode(At.assertsModifier),Gi,bt(At.type,$n,ws))}if(jP(At)||a_(At)||II(At)){const Gi=ui(At,$n),zn=_(Qe,Gi===At?G.cloneNode(At):Gi,At),Ln=Ya(zn);return tr(zn,Ln|(Qe.flags&1024&&a_(At)?0:1)),zn}if(Ha(At)&&Qe.flags&268435456&&!At.singleQuote){const Gi=G.cloneNode(At);return Gi.singleQuote=!0,Gi}if(iD(At)){const Gi=bt(At.checkType,$n,ws),zn=mo(At),Ln=bt(At.extendsType,$n,ws),Hr=bt(At.trueType,$n,ws);zn();const xs=bt(At.falseType,$n,ws);return G.updateConditionalTypeNode(At,Gi,Ln,Hr,xs)}if(t2(At)){if(At.operator===158&&At.type.kind===155){if(!os(Qe,At))return Ii=!0,At}else if(At.operator===143){const Gi=_t(At);return Gi||(Ii=!0,At)}}return ui(At,$n);function ui(Gi,zn){const Ln=!Qe.enclosingFile||Qe.enclosingFile!==_n(Gi);return dn(Gi,zn,void 0,Ln?yn:void 0)}function yn(Gi,zn,Ln,Hr,xs){let ns=Dn(Gi,zn,Ln,Hr,xs);return ns&&(ns.pos!==-1||ns.end!==-1)&&(ns===Gi&&(ns=G.createNodeArray(Gi.slice(),Gi.hasTrailingComma)),V0(ns,-1,-1)),ns}function ni(Gi){return Gi.dotDotDotToken||(Gi.type&&DX(Gi.type)?G.createToken(26):void 0)}function Yi(Gi,zn){return Gi.name&&ot(Gi.name)&&Gi.name.escapedText==="this"?"this":ni(Gi)?"args":`arg${zn}`}function Gn(Gi,zn){if(Qe.bundled||Qe.enclosingFile!==_n(zn)){let Ln=zn.text;const Hr=yr(At).resolvedSymbol,xs=Gi.isTypeOf?111551:788968,ns=Hr&&n1(Hr,Qe.enclosingDeclaration,xs,!1).accessibility===0&&bn(Hr,Qe,xs,!0)[0];if(ns&&H6(ns))Ln=La(ns,Qe);else{const Fo=V5e(Gi);Fo&&(Ln=La(Fo.symbol,Qe))}if(Ln.includes("/node_modules/")&&(Qe.encounteredError=!0,Qe.tracker.reportLikelyUnsafeImportRequiredError&&Qe.tracker.reportLikelyUnsafeImportRequiredError(Ln)),Ln!==zn.text)return Ir(G.createStringLiteral(Ln),zn)}return bt(zn,$n,Ha)}}}function yl(Qe,Re){var Ii;const un=Iyt(G.createPropertyDeclaration,174,!0),_r=Iyt((si,Br,bs,fs)=>G.createPropertySignature(si,Br,bs,fs),173,!1),Jn=Re.enclosingDeclaration;let $n=[];const Es=new Set,mo=[],Ro=Re;Re={...Ro,usedSymbolNames:new Set(Ro.usedSymbolNames),remappedSymbolNames:new Map,remappedSymbolReferences:new Map((Ii=Ro.remappedSymbolReferences)==null?void 0:Ii.entries()),tracker:void 0};const Yo={...Ro.tracker.inner,trackSymbol:(si,Br,bs)=>{var fs,Qr;if((fs=Re.remappedSymbolNames)!=null&&fs.has(Ba(si)))return!1;if(n1(si,Br,bs,!1).accessibility===0){const Ea=Fn(si,Re,bs);if(!(si.flags&4)){const sa=Ea[0],ea=_n(Ro.enclosingDeclaration);Ft(sa.declarations,Mc=>_n(Mc)===ea)&&Hr(sa)}}else if((Qr=Ro.tracker.inner)!=null&&Qr.trackSymbol)return Ro.tracker.inner.trackSymbol(si,Br,bs);return!1}};Re.tracker=new DNe(Re,Yo,Ro.tracker.moduleResolverHost),cf(Qe,(si,Br)=>{const bs=Ws(Br);av(si,bs)});let _t=!Re.bundled;const xt=Qe.get("export=");return xt&&Qe.size>1&&xt.flags&2098688&&(Qe=_a(),Qe.set("export=",xt)),Gi(Qe),ni($n);function ai(si){return!!si&&si.kind===80}function qi(si){return Lu(si)?$t(qt(si.declarationList.declarations,No),ai):$t([No(si)],ai)}function At(si){const Br=Fe(si,Il),bs=ct(si,rd);let fs=bs!==-1?si[bs]:void 0;if(fs&&Br&&Br.isExportEquals&&ot(Br.expression)&&ot(fs.name)&&Fr(fs.name)===Fr(Br.expression)&&fs.body&&H1(fs.body)){const Qr=$t(si,sa=>!!(jh(sa)&32)),Wc=fs.name;let Ea=fs.body;if(P(Qr)&&(fs=G.updateModuleDeclaration(fs,fs.modifiers,fs.name,Ea=G.updateModuleBlock(Ea,G.createNodeArray([...fs.body.statements,G.createExportDeclaration(void 0,!1,G.createNamedExports(qt(Rr(Qr,sa=>qi(sa)),sa=>G.createExportSpecifier(!1,void 0,sa))),void 0)]))),si=[...si.slice(0,bs),fs,...si.slice(bs+1)]),!Fe(si,sa=>sa!==fs&&OW(sa,Wc))){$n=[];const sa=!Ft(Ea.statements,ea=>Zr(ea,32)||Il(ea)||Ju(ea));O(Ea.statements,ea=>{ns(ea,sa?32:0)}),si=[...$t(si,ea=>ea!==fs&&ea!==Br),...$n]}}return si}function ui(si){const Br=$t(si,fs=>Ju(fs)&&!fs.moduleSpecifier&&!!fs.exportClause&&Xm(fs.exportClause));P(Br)>1&&(si=[...$t(si,Qr=>!Ju(Qr)||!!Qr.moduleSpecifier||!Qr.exportClause),G.createExportDeclaration(void 0,!1,G.createNamedExports(Rr(Br,Qr=>ha(Qr.exportClause,Xm).elements)),void 0)]);const bs=$t(si,fs=>Ju(fs)&&!!fs.moduleSpecifier&&!!fs.exportClause&&Xm(fs.exportClause));if(P(bs)>1){const fs=qs(bs,Qr=>Ha(Qr.moduleSpecifier)?">"+Qr.moduleSpecifier.text:">");if(fs.length!==bs.length)for(const Qr of fs)Qr.length>1&&(si=[...$t(si,Wc=>!Qr.includes(Wc)),G.createExportDeclaration(void 0,!1,G.createNamedExports(Rr(Qr,Wc=>ha(Wc.exportClause,Xm).elements)),Qr[0].moduleSpecifier)])}return si}function yn(si){const Br=ct(si,bs=>Ju(bs)&&!bs.moduleSpecifier&&!bs.attributes&&!!bs.exportClause&&Xm(bs.exportClause));if(Br>=0){const bs=si[Br],fs=es(bs.exportClause.elements,Qr=>{if(!Qr.propertyName&&Qr.name.kind!==11){const Wc=Qr.name,Ea=Nk(si),sa=$t(Ea,ea=>OW(si[ea],Wc));if(P(sa)&&Ce(sa,ea=>eH(si[ea]))){for(const ea of sa)si[ea]=Yi(si[ea]);return}}return Qr});P(fs)?si[Br]=G.updateExportDeclaration(bs,bs.modifiers,bs.isTypeOnly,G.updateNamedExports(bs.exportClause,fs),bs.moduleSpecifier,bs.attributes):zw(si,Br)}return si}function ni(si){return si=At(si),si=ui(si),si=yn(si),Jn&&(Os(Jn)&&Cp(Jn)||rd(Jn))&&(!Ft(si,UW)||!L2e(si)&&Ft(si,yG))&&si.push(gH(G)),si}function Yi(si){const Br=(jh(si)|32)&-129;return G.replaceModifiers(si,Br)}function Gn(si){const Br=jh(si)&-33;return G.replaceModifiers(si,Br)}function Gi(si,Br,bs){Br||mo.push(new Map),si.forEach(fs=>{zn(fs,!1,!!bs)}),Br||(mo[mo.length-1].forEach(fs=>{zn(fs,!0,!!bs)}),mo.pop())}function zn(si,Br,bs){Ac(Yn(si));const fs=wc(si);if(Es.has(Ba(fs)))return;if(Es.add(Ba(fs)),!Br||P(si.declarations)&&Ft(si.declarations,Wc=>!!Qi(Wc,Ea=>Ea===Jn))){const Wc=tM(Re);Ln(si,Br,bs),Wc()}}function Ln(si,Br,bs,fs=si.escapedName){var Qr,Wc,Ea,sa,ea,Mc;const vl=Ws(fs),y_=fs==="default";if(Br&&!(Re.flags&131072)&&gP(vl)&&!y_){Re.encounteredError=!0;return}let _h=y_&&!!(si.flags&-113||si.flags&16&&P(Ac(Yn(si))))&&!(si.flags&2097152),Qf=!_h&&!Br&&gP(vl)&&!y_;(_h||Qf)&&(Br=!0);const Dl=(Br?0:32)|(y_&&!_h?2048:0),Zf=si.flags&1536&&si.flags&7&&fs!=="export=",fg=Zf&&$5e(Yn(si),si);if((si.flags&8208||fg)&&f1(Yn(si),si,av(si,vl),Dl),si.flags&524288&&Fo(si,vl,Dl),si.flags&98311&&fs!=="export="&&!(si.flags&4194304)&&!(si.flags&32)&&!(si.flags&8192)&&!fg)if(bs)xte(si)&&(Qf=!1,_h=!1);else{const _f=Yn(si),Vp=av(si,vl);if(_f.symbol&&_f.symbol!==si&&_f.symbol.flags&16&&Ft(_f.symbol.declarations,lx)&&((Qr=_f.symbol.members)!=null&&Qr.size||(Wc=_f.symbol.exports)!=null&&Wc.size))Re.remappedSymbolReferences||(Re.remappedSymbolReferences=new Map),Re.remappedSymbolReferences.set(Ba(_f.symbol),si),Ln(_f.symbol,Br,bs,fs),Re.remappedSymbolReferences.delete(Ba(_f.symbol));else if(!(si.flags&16)&&$5e(_f,si))f1(_f,si,Vp,Dl);else{const l4=si.flags&2?e4(si)?2:1:(Ea=si.parent)!=null&&Ea.valueDeclaration&&Os((sa=si.parent)==null?void 0:sa.valueDeclaration)?2:void 0,hy=_h||!(si.flags&4)?Vp:kte(Vp,si);let nk=si.declarations&&Fe(si.declarations,vU=>_s(vU));nk&&Sf(nk.parent)&&nk.parent.declarations.length===1&&(nk=nk.parent.parent);const rk=(ea=si.declarations)==null?void 0:ea.find(Nr);if(rk&&ur(rk.parent)&&ot(rk.parent.right)&&((Mc=_f.symbol)!=null&&Mc.valueDeclaration)&&Os(_f.symbol.valueDeclaration)){const vU=Vp===rk.parent.right.escapedText?void 0:rk.parent.right;ns(G.createExportDeclaration(void 0,!1,G.createNamedExports([G.createExportSpecifier(!1,vU,Vp)])),0),Re.tracker.trackSymbol(_f.symbol,Re.enclosingDeclaration,111551)}else{const vU=_(Re,G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(hy,void 0,Z2(Re,void 0,_f,si))],l4)),nk);ns(vU,hy!==Vp?Dl&-33:Dl),hy!==Vp&&!Br&&(ns(G.createExportDeclaration(void 0,!1,G.createNamedExports([G.createExportSpecifier(!1,hy,Vp)])),0),Qf=!1,_h=!1)}}}if(si.flags&384&&Y2(si,vl,Dl),si.flags&32&&(si.flags&4&&si.valueDeclaration&&ur(si.valueDeclaration.parent)&&fd(si.valueDeclaration.parent.right)?yU(si,av(si,vl),Dl):dF(si,av(si,vl),Dl)),(si.flags&1536&&(!Zf||H_(si))||fg)&&Yg(si,vl,Dl),si.flags&64&&!(si.flags&32)&&Kc(si,vl,Dl),si.flags&2097152&&yU(si,av(si,vl),Dl),si.flags&4&&si.escapedName==="export="&&xte(si),si.flags&8388608&&si.declarations)for(const _f of si.declarations){const Vp=B_(_f,_f.moduleSpecifier);Vp&&ns(G.createExportDeclaration(void 0,_f.isTypeOnly,void 0,G.createStringLiteral(La(Vp,Re))),0)}_h?ns(G.createExportAssignment(void 0,!1,G.createIdentifier(av(si,vl))),0):Qf&&ns(G.createExportDeclaration(void 0,!1,G.createNamedExports([G.createExportSpecifier(!1,av(si,vl),vl)])),0)}function Hr(si){if(Ft(si.declarations,Qk))return;j.assertIsDefined(mo[mo.length-1]),kte(Ws(si.escapedName),si);const Br=!!(si.flags&2097152)&&!Ft(si.declarations,bs=>!!Qi(bs,Ju)||jy(bs)||Wd(bs)&&!eC(bs.moduleReference));mo[Br?0:mo.length-1].set(Ba(si),si)}function xs(si){return Os(si)&&(Cp(si)||Eg(si))||Vh(si)&&!Ry(si)}function ns(si,Br){if(Fg(si)){let bs=0;const fs=Re.enclosingDeclaration&&(Ng(Re.enclosingDeclaration)?_n(Re.enclosingDeclaration):Re.enclosingDeclaration);Br&32&&fs&&(xs(fs)||rd(fs))&&eH(si)&&(bs|=32),_t&&!(bs&32)&&(!fs||!(fs.flags&33554432))&&(sD(si)||Lu(si)||Wu(si)||hd(si)||rd(si))&&(bs|=128),Br&2048&&(hd(si)||zf(si)||Wu(si))&&(bs|=2048),bs&&(si=G.replaceModifiers(si,bs|jh(si)))}$n.push(si)}function Fo(si,Br,bs){var fs;const Qr=Zht(si),Wc=Ys(si).typeParameters,Ea=qt(Wc,_h=>fa(_h,Re)),sa=(fs=si.declarations)==null?void 0:fs.find(Ng),ea=RW(sa?sa.comment||sa.parent.comment:void 0),Mc=ne(Re);Re.flags|=8388608;const vl=Re.enclosingDeclaration;Re.enclosingDeclaration=sa;const y_=sa&&sa.typeExpression&&o2(sa.typeExpression)&&L(Re,sa.typeExpression.type,Qr,void 0)||ge(Qr,Re);ns(e2(G.createTypeAliasDeclaration(void 0,av(si,Br),Ea,y_),ea?[{kind:3,text:`*
+ * `+ea.replace(/\n/g,`
+ * `)+`
+ `,pos:-1,end:-1,hasTrailingNewLine:!0}]:[]),bs),Mc(),Re.enclosingDeclaration=vl}function Kc(si,Br,bs){const fs=W_(si),Qr=y0(si),Wc=qt(Qr,Qf=>fa(Qf,Re)),Ea=Ll(fs),sa=P(Ea)?Wa(Ea):void 0,ea=Rr(Ac(fs),Qf=>Goi(Qf,sa)),Mc=J5e(0,fs,sa,179),vl=J5e(1,fs,sa,180),y_=Nyt(fs,sa),_h=P(Ea)?[G.createHeritageClause(96,es(Ea,Qf=>G5e(Qf,111551)))]:void 0;ns(G.createInterfaceDeclaration(void 0,av(si,Br),Wc,_h,[...y_,...vl,...Mc,...ea]),bs)}function Xf(si){let Br=as(__(si).values());const bs=wc(si);if(bs!==si){const fs=new Set(Br);for(const Qr of __(bs).values())Eh(Zu(Qr))&111551||fs.add(Qr);Br=as(fs)}return $t(Br,fs=>j_(fs)&&J_(fs.escapedName,99))}function H_(si){return Ce(Xf(si),Br=>!(Eh(Zu(Br))&111551))}function Yg(si,Br,bs){const fs=Xf(si),Qr=Cn(fs,sa=>sa.parent&&sa.parent===si?"real":"merged"),Wc=Qr.get("real")||w,Ea=Qr.get("merged")||w;if(P(Wc)){const sa=av(si,Br);uF(Wc,sa,bs,!!(si.flags&67108880))}if(P(Ea)){const sa=_n(Re.enclosingDeclaration),ea=av(si,Br),Mc=G.createModuleBlock([G.createExportDeclaration(void 0,!1,G.createNamedExports(es($t(Ea,vl=>vl.escapedName!=="export="),vl=>{var y_,_h;const Qf=Ws(vl.escapedName),Dl=av(vl,Qf),Zf=vl.declarations&&Dh(vl);if(sa&&(Zf?sa!==_n(Zf):!Ft(vl.declarations,Vp=>_n(Vp)===sa))){(_h=(y_=Re.tracker)==null?void 0:y_.reportNonlocalAugmentation)==null||_h.call(y_,sa,si,vl);return}const fg=Zf&&Ox(Zf,!0);Hr(fg||vl);const _f=fg?av(fg,Ws(fg.escapedName)):Dl;return G.createExportSpecifier(!1,Qf===_f?void 0:_f,Qf)})))]);ns(G.createModuleDeclaration(void 0,G.createIdentifier(ea),Mc,32),0)}}function Y2(si,Br,bs){ns(G.createEnumDeclaration(G.createModifiersFromModifierFlags(r5e(si)?4096:0),av(si,Br),qt($t(Ac(Yn(si)),fs=>!!(fs.flags&8)),fs=>{const Qr=fs.declarations&&fs.declarations[0]&&SS(fs.declarations[0])?F5e(fs.declarations[0]):void 0;return G.createEnumMember(Ws(fs.escapedName),Qr===void 0?void 0:typeof Qr=="string"?G.createStringLiteral(Qr):G.createNumericLiteral(Qr))})),bs)}function f1(si,Br,bs,fs){const Qr=ia(si,0);for(const Wc of Qr){const Ea=Qn(Wc,262,Re,{name:G.createIdentifier(bs)});ns(_(Re,Ea,rw(Wc)),fs)}if(!(Br.flags&1536&&Br.exports&&Br.exports.size)){const Wc=$t(Ac(si),j_);uF(Wc,bs,fs,!0)}}function rw(si){if(si.declaration&&si.declaration.parent){if(ur(si.declaration.parent)&&Bu(si.declaration.parent)===5)return si.declaration.parent;if(_s(si.declaration.parent)&&si.declaration.parent.parent)return si.declaration.parent.parent}return si.declaration}function uF(si,Br,bs,fs){if(P(si)){const Wc=Cn(si,Dl=>!P(Dl.declarations)||Ft(Dl.declarations,Zf=>_n(Zf)===_n(Re.enclosingDeclaration))?"local":"remote").get("local")||w;let Ea=l2.createModuleDeclaration(void 0,G.createIdentifier(Br),G.createModuleBlock([]),32);_c(Ea,Jn),Ea.locals=_a(si),Ea.symbol=si[0].parent;const sa=$n;$n=[];const ea=_t;_t=!1;const Mc={...Re,enclosingDeclaration:Ea},vl=Re;Re=Mc,Gi(_a(Wc),fs,!0),Re=vl,_t=ea;const y_=$n;$n=sa;const _h=qt(y_,Dl=>Il(Dl)&&!Dl.isExportEquals&&ot(Dl.expression)?G.createExportDeclaration(void 0,!1,G.createNamedExports([G.createExportSpecifier(!1,Dl.expression,G.createIdentifier("default"))])):Dl),Qf=Ce(_h,Dl=>Zr(Dl,32))?qt(_h,Gn):_h;Ea=G.updateModuleDeclaration(Ea,Ea.modifiers,Ea.name,G.createModuleBlock(Qf)),ns(Ea,bs)}}function j_(si){return!!(si.flags&2887656)||!(si.flags&4194304||si.escapedName==="prototype"||si.valueDeclaration&&pa(si.valueDeclaration)&&ss(si.valueDeclaration.parent))}function ik(si){const Br=es(si,bs=>{const fs=Re.enclosingDeclaration;Re.enclosingDeclaration=bs;let Qr=bs.expression;if(pl(Qr)){if(ot(Qr)&&Fr(Qr)==="")return Wc(void 0);let Ea;if({introducesError:Ea,node:Qr}=Bn(Qr,Re),Ea)return Wc(void 0)}return Wc(G.createExpressionWithTypeArguments(Qr,qt(bs.typeArguments,Ea=>L(Re,Ea,o(Re,Ea))||ge(o(Re,Ea),Re))));function Wc(Ea){return Re.enclosingDeclaration=fs,Ea}});if(Br.length===si.length)return Br}function dF(si,Br,bs){var fs,Qr;const Wc=(fs=si.declarations)==null?void 0:fs.find(ss),Ea=Re.enclosingDeclaration;Re.enclosingDeclaration=Wc||Ea;const sa=y0(si),ea=qt(sa,_y=>fa(_y,Re)),Mc=Wp(W_(si)),vl=Ll(Mc),y_=Wc&&i3(Wc),_h=y_&&ik(y_)||es(yc(Mc),Xoi),Qf=Yn(si),Dl=!!((Qr=Qf.symbol)!=null&&Qr.valueDeclaration)&&ss(Qf.symbol.valueDeclaration),Zf=Dl?ys(Qf):Je,fg=[...P(vl)?[G.createHeritageClause(96,qt(vl,_y=>Koi(_y,Zf,Br)))]:[],...P(_h)?[G.createHeritageClause(119,_h)]:[]],_f=Lri(Mc,vl,Ac(Mc)),Vp=$t(_f,_y=>{const fF=_y.valueDeclaration;return!!fF&&!(Bf(fF)&&Vs(fF.name))}),hy=Ft(_f,_y=>{const fF=_y.valueDeclaration;return!!fF&&Bf(fF)&&Vs(fF.name)})?[G.createPropertyDeclaration(void 0,G.createPrivateIdentifier("#private"),void 0,void 0,void 0)]:w,nk=Rr(Vp,_y=>un(_y,!1,vl[0])),rk=Rr($t(Ac(Qf),_y=>!(_y.flags&4194304)&&_y.escapedName!=="prototype"&&!j_(_y)),_y=>un(_y,!0,Zf)),Qoi=!Dl&&!!si.valueDeclaration&&nr(si.valueDeclaration)&&!Ft(ia(Qf,1))?[G.createConstructorDeclaration(G.createModifiersFromModifierFlags(2),[],void 0)]:J5e(1,Qf,Zf,176),Zoi=Nyt(Mc,vl[0]);Re.enclosingDeclaration=Ea,ns(_(Re,G.createClassDeclaration(void 0,Br,ea,fg,[...Zoi,...rk,...Qoi,...nk,...hy]),si.declarations&&$t(si.declarations,_y=>hd(_y)||fd(_y))[0]),bs)}function gU(si){return J(si,Br=>{if(l_(Br)||vh(Br))return tx(Br.propertyName||Br.name);if(ur(Br)||Il(Br)){const bs=Il(Br)?Br.expression:Br.right;if(Nr(bs))return Fr(bs.name)}if(Xp(Br)){const bs=No(Br);if(bs&&ot(bs))return Fr(bs)}})}function yU(si,Br,bs){var fs,Qr,Wc,Ea,sa;const ea=Dh(si);if(!ea)return j.fail();const Mc=wc(Ox(ea,!0));if(!Mc)return;let vl=QW(Mc)&&gU(si.declarations)||Ws(Mc.escapedName);vl==="export="&&Ie&&(vl="default");const y_=av(Mc,vl);switch(Hr(Mc),ea.kind){case 208:if(((Qr=(fs=ea.parent)==null?void 0:fs.parent)==null?void 0:Qr.kind)===260){const Dl=La(Mc.parent||Mc,Re),{propertyName:Zf}=ea;ns(G.createImportDeclaration(void 0,G.createImportClause(!1,void 0,G.createNamedImports([G.createImportSpecifier(!1,Zf&&ot(Zf)?G.createIdentifier(Fr(Zf)):void 0,G.createIdentifier(Br))])),G.createStringLiteral(Dl),void 0),0);break}j.failBadSyntaxKind(((Wc=ea.parent)==null?void 0:Wc.parent)||ea,"Unhandled binding element grandparent kind in declaration serialization");break;case 304:((sa=(Ea=ea.parent)==null?void 0:Ea.parent)==null?void 0:sa.kind)===226&&zN(Ws(si.escapedName),y_);break;case 260:if(Nr(ea.initializer)){const Dl=ea.initializer,Zf=G.createUniqueName(Br),fg=La(Mc.parent||Mc,Re);ns(G.createImportEqualsDeclaration(void 0,!1,Zf,G.createExternalModuleReference(G.createStringLiteral(fg))),0),ns(G.createImportEqualsDeclaration(void 0,!1,G.createIdentifier(Br),G.createQualifiedName(Zf,Dl.name)),bs);break}case 271:if(Mc.escapedName==="export="&&Ft(Mc.declarations,Dl=>Os(Dl)&&Eg(Dl))){xte(si);break}const _h=!(Mc.flags&512)&&!_s(ea);ns(G.createImportEqualsDeclaration(void 0,!1,G.createIdentifier(Br),_h?Ou(Mc,Re,-1,!1):G.createExternalModuleReference(G.createStringLiteral(La(Mc,Re)))),_h?bs:0);break;case 270:ns(G.createNamespaceExportDeclaration(Fr(ea.name)),0);break;case 273:{const Dl=La(Mc.parent||Mc,Re),Zf=Re.bundled?G.createStringLiteral(Dl):ea.parent.moduleSpecifier,fg=du(ea.parent)?ea.parent.attributes:void 0,_f=q1(ea.parent);ns(G.createImportDeclaration(void 0,G.createImportClause(_f,G.createIdentifier(Br),void 0),Zf,fg),0);break}case 274:{const Dl=La(Mc.parent||Mc,Re),Zf=Re.bundled?G.createStringLiteral(Dl):ea.parent.parent.moduleSpecifier,fg=q1(ea.parent.parent);ns(G.createImportDeclaration(void 0,G.createImportClause(fg,void 0,G.createNamespaceImport(G.createIdentifier(Br))),Zf,ea.parent.attributes),0);break}case 280:ns(G.createExportDeclaration(void 0,!1,G.createNamespaceExport(G.createIdentifier(Br)),G.createStringLiteral(La(Mc,Re))),0);break;case 276:{const Dl=La(Mc.parent||Mc,Re),Zf=Re.bundled?G.createStringLiteral(Dl):ea.parent.parent.parent.moduleSpecifier,fg=q1(ea.parent.parent.parent);ns(G.createImportDeclaration(void 0,G.createImportClause(fg,void 0,G.createNamedImports([G.createImportSpecifier(!1,Br!==vl?G.createIdentifier(vl):void 0,G.createIdentifier(Br))])),Zf,ea.parent.parent.parent.attributes),0);break}case 281:const Qf=ea.parent.parent.moduleSpecifier;if(Qf){const Dl=ea.propertyName;Dl&&My(Dl)&&(vl="default")}zN(Ws(si.escapedName),Qf?vl:y_,Qf&&Bc(Qf)?G.createStringLiteral(Qf.text):void 0);break;case 277:xte(si);break;case 226:case 211:case 212:si.escapedName==="default"||si.escapedName==="export="?xte(si):zN(Br,y_);break;default:return j.failBadSyntaxKind(ea,"Unhandled alias declaration kind in symbol serializer!")}}function zN(si,Br,bs){ns(G.createExportDeclaration(void 0,!1,G.createNamedExports([G.createExportSpecifier(!1,si!==Br?Br:void 0,si)]),bs),0)}function xte(si){var Br;if(si.flags&4194304)return!1;const bs=Ws(si.escapedName),fs=bs==="export=",Wc=fs||bs==="default",Ea=si.declarations&&Dh(si),sa=Ea&&Ox(Ea,!0);if(sa&&P(sa.declarations)&&Ft(sa.declarations,ea=>_n(ea)===_n(Jn))){const ea=Ea&&(Il(Ea)||ur(Ea)?Gae(Ea):VTe(Ea)),Mc=ea&&pl(ea)?$ri(ea):void 0,vl=Mc&&nu(Mc,-1,!0,!0,Jn);(vl||sa)&&Hr(vl||sa);const y_=Re.tracker.disableTrackSymbol;if(Re.tracker.disableTrackSymbol=!0,Wc)$n.push(G.createExportAssignment(void 0,fs,ul(sa,Re,-1)));else if(Mc===ea&&Mc)zN(bs,Fr(Mc));else if(ea&&fd(ea))zN(bs,av(sa,Eu(sa)));else{const _h=kte(bs,si);ns(G.createImportEqualsDeclaration(void 0,!1,G.createIdentifier(_h),Ou(sa,Re,-1,!1)),0),zN(bs,_h)}return Re.tracker.disableTrackSymbol=y_,!0}else{const ea=kte(bs,si),Mc=lp(Yn(wc(si)));if($5e(Mc,si))f1(Mc,si,ea,Wc?0:32);else{const vl=((Br=Re.enclosingDeclaration)==null?void 0:Br.kind)===267&&(!(si.flags&98304)||si.flags&65536)?1:2,y_=G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(ea,void 0,Z2(Re,void 0,Mc,si))],vl));ns(y_,sa&&sa.flags&4&&sa.escapedName==="export="?128:bs===ea?32:0)}return Wc?($n.push(G.createExportAssignment(void 0,fs,G.createIdentifier(ea))),!0):bs!==ea?(zN(bs,ea),!0):!1}}function $5e(si,Br){var bs;const fs=_n(Re.enclosingDeclaration);return Or(si)&48&&!Ft((bs=si.symbol)==null?void 0:bs.declarations,ws)&&!P(Ih(si))&&!vz(si)&&!!(P($t(Ac(si),j_))||P(ia(si,0)))&&!P(ia(si,1))&&!cF(Br,Jn)&&!(si.symbol&&Ft(si.symbol.declarations,Qr=>_n(Qr)!==fs))&&!Ft(Ac(si),Qr=>Tz(Qr.escapedName))&&!Ft(Ac(si),Qr=>Ft(Qr.declarations,Wc=>_n(Wc)!==fs))&&Ce(Ac(si),Qr=>J_(Eu(Qr),re)?Qr.flags&98304?Ux(Qr)===zx(Qr):!0:!1)}function Iyt(si,Br,bs){return function(Qr,Wc,Ea){var sa,ea,Mc,vl,y_;const _h=$m(Qr),Qf=!!(_h&2);if(Wc&&Qr.flags&2887656)return[];if(Qr.flags&4194304||Qr.escapedName==="constructor"||Ea&&Ta(Ea,Qr.escapedName)&&d1(Ta(Ea,Qr.escapedName))===d1(Qr)&&(Qr.flags&16777216)===(Ta(Ea,Qr.escapedName).flags&16777216)&&yb(Yn(Qr),Yu(Ea,Qr.escapedName)))return[];const Dl=_h&-1025|(Wc?256:0),Zf=ed(Qr,Re),fg=(sa=Qr.declarations)==null?void 0:sa.find(om(Lo,Qw,_s,O_,ur,Nr));if(Qr.flags&98304&&bs){const _f=[];if(Qr.flags&65536){const Vp=Qr.declarations&&O(Qr.declarations,hy=>{if(hy.kind===178)return hy;if(la(hy)&&vI(hy))return O(hy.arguments[2].properties,nk=>{const rk=No(nk);if(rk&&ot(rk)&&Fr(rk)==="set")return nk})});j.assert(!!Vp);const l4=Qc(Vp)?Dm(Vp).parameters[0]:void 0;_f.push(_(Re,G.createSetAccessorDeclaration(G.createModifiersFromModifierFlags(Dl),Zf,[G.createParameterDeclaration(void 0,void 0,l4?Ef(l4,Po(l4),Re):"value",void 0,Qf?void 0:Z2(Re,void 0,zx(Qr),Qr))],void 0),((ea=Qr.declarations)==null?void 0:ea.find(D1))||fg))}if(Qr.flags&32768){const Vp=_h&2;_f.push(_(Re,G.createGetAccessorDeclaration(G.createModifiersFromModifierFlags(Dl),Zf,[],Vp?void 0:Z2(Re,void 0,Yn(Qr),Qr),void 0),((Mc=Qr.declarations)==null?void 0:Mc.find(oS))||fg))}return _f}else if(Qr.flags&98311)return _(Re,si(G.createModifiersFromModifierFlags((d1(Qr)?8:0)|Dl),Zf,Qr.flags&16777216?G.createToken(58):void 0,Qf?void 0:Z2(Re,void 0,zx(Qr),Qr),void 0),((vl=Qr.declarations)==null?void 0:vl.find(om(Lo,_s)))||fg);if(Qr.flags&8208){const _f=Yn(Qr),Vp=ia(_f,0);if(Dl&2)return _(Re,si(G.createModifiersFromModifierFlags((d1(Qr)?8:0)|Dl),Zf,Qr.flags&16777216?G.createToken(58):void 0,void 0,void 0),((y_=Qr.declarations)==null?void 0:y_.find(Qc))||Vp[0]&&Vp[0].declaration||Qr.declarations&&Qr.declarations[0]);const l4=[];for(const hy of Vp){const nk=Qn(hy,Br,Re,{name:Zf,questionToken:Qr.flags&16777216?G.createToken(58):void 0,modifiers:Dl?G.createModifiersFromModifierFlags(Dl):void 0}),rk=hy.declaration&&vV(hy.declaration.parent)?hy.declaration.parent:hy.declaration;l4.push(_(Re,nk,rk))}return l4}return j.fail(`Unhandled class member kind! ${Qr.__debugFlags||Qr.flags}`)}}function Goi(si,Br){return _r(si,!1,Br)}function J5e(si,Br,bs,fs){const Qr=ia(Br,si);if(si===1){if(!bs&&Ce(Qr,sa=>P(sa.parameters)===0))return[];if(bs){const sa=ia(bs,1);if(!P(sa)&&Ce(Qr,ea=>P(ea.parameters)===0))return[];if(sa.length===Qr.length){let ea=!1;for(let Mc=0;Mc<sa.length;Mc++)if(!Eee(Qr[Mc],sa[Mc],!1,!1,!0,Bz)){ea=!0;break}if(!ea)return[]}}let Ea=0;for(const sa of Qr)sa.declaration&&(Ea|=bP(sa.declaration,6));if(Ea)return[_(Re,G.createConstructorDeclaration(G.createModifiersFromModifierFlags(Ea),[],void 0),Qr[0].declaration)]}const Wc=[];for(const Ea of Qr){const sa=Qn(Ea,fs,Re);Wc.push(_(Re,sa,Ea.declaration))}return Wc}function Nyt(si,Br){const bs=[];for(const fs of Ih(si)){if(Br){const Qr=pb(Br,fs.keyType);if(Qr&&yb(fs.type,Qr.type))continue}bs.push(qn(fs,Re,void 0))}return bs}function Koi(si,Br,bs){const fs=G5e(si,111551);if(fs)return fs;const Qr=kte(`${bs}_base`),Wc=G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(Qr,void 0,ge(Br,Re))],2));return ns(Wc,0),G.createExpressionWithTypeArguments(G.createIdentifier(Qr),void 0)}function G5e(si,Br){let bs,fs;if(si.target&&WA(si.target.symbol,Jn,Br)?(bs=qt(Pl(si),Qr=>ge(Qr,Re)),fs=ul(si.target.symbol,Re,788968)):si.symbol&&WA(si.symbol,Jn,Br)&&(fs=ul(si.symbol,Re,788968)),fs)return G.createExpressionWithTypeArguments(fs,bs)}function Xoi(si){const Br=G5e(si,788968);if(Br)return Br;if(si.symbol)return G.createExpressionWithTypeArguments(ul(si.symbol,Re,788968),void 0)}function kte(si,Br){var bs,fs;const Qr=Br?Ba(Br):void 0;if(Qr&&Re.remappedSymbolNames.has(Qr))return Re.remappedSymbolNames.get(Qr);Br&&(si=Lyt(Br,si));let Wc=0;const Ea=si;for(;(bs=Re.usedSymbolNames)!=null&&bs.has(si);)Wc++,si=`${Ea}_${Wc}`;return(fs=Re.usedSymbolNames)==null||fs.add(si),Qr&&Re.remappedSymbolNames.set(Qr,si),si}function Lyt(si,Br){if(Br==="default"||Br==="__class"||Br==="__function"){const bs=ne(Re);Re.flags|=16777216;const fs=Vx(si,Re);bs(),Br=fs.length>0&&_V(fs.charCodeAt(0))?zm(fs):fs}return Br==="default"?Br="_default":Br==="export="&&(Br="_exports"),Br=J_(Br,re)&&!gP(Br)?Br:"_"+Br.replace(/[^a-z0-9]/gi,"_"),Br}function av(si,Br){const bs=Ba(si);return Re.remappedSymbolNames.has(bs)?Re.remappedSymbolNames.get(bs):(Br=Lyt(si,Br),Re.remappedSymbolNames.set(bs,Br),Br)}}}function ty(o,_,y=16384,S){return S?D(S).getText():z6(D);function D(L){const B=IO(y)|70221824|512,K=We.typePredicateToTypePredicateNode(o,_,B),ne=_D(),ce=_&&_n(_);return ne.writeNode(4,K,ce,L),L}}function GY(o){const _=[];let y=0;for(let S=0;S<o.length;S++){const D=o[S];if(y|=D.flags,!(D.flags&98304)){if(D.flags&1568){const L=D.flags&512?fi:Jpe(D);if(L.flags&1048576){const B=L.types.length;if(S+B<=o.length&&Xh(o[S+B-1])===Xh(L.types[B-1])){_.push(L),S+=B-1;continue}}}_.push(D)}}return y&65536&&_.push(Qt),y&32768&&_.push(tt),_||o}function R5(o){return o===2?"private":o===4?"protected":"public"}function KY(o){if(o.symbol&&o.symbol.flags&2048&&o.symbol.declarations){const _=TV(o.symbol.declarations[0].parent);if(Mg(_))return xr(_)}}function yN(o){return o&&o.parent&&o.parent.kind===268&&BT(o.parent.parent)}function vN(o){return o.kind===307||Vh(o)}function bz(o,_){const y=Ys(o).nameType;if(y){if(y.flags&384){const S=""+y.value;return!J_(S,Ja(Q))&&!$v(S)?`"${Vy(S,34)}"`:$v(S)&&so(S,"-")?`[${S}]`:S}if(y.flags&8192)return`[${Vx(y.symbol,_)}]`}}function Vx(o,_){var y;if((y=_==null?void 0:_.remappedSymbolReferences)!=null&&y.has(Ba(o))&&(o=_.remappedSymbolReferences.get(Ba(o))),_&&o.escapedName==="default"&&!(_.flags&16384)&&(!(_.flags&16777216)||!o.declarations||_.enclosingDeclaration&&Qi(o.declarations[0],vN)!==Qi(_.enclosingDeclaration,vN)))return"default";if(o.declarations&&o.declarations.length){let D=J(o.declarations,B=>No(B)?B:void 0);const L=D&&No(D);if(D&&L){if(la(D)&&vI(D))return Eu(o);if(Ka(L)&&!(Iu(o)&4096)){const B=Ys(o).nameType;if(B&&B.flags&384){const K=bz(o,_);if(K!==void 0)return K}}return al(L)}if(D||(D=o.declarations[0]),D.parent&&D.parent.kind===260)return al(D.parent.name);switch(D.kind){case 231:case 218:case 219:return _&&!_.encounteredError&&!(_.flags&131072)&&(_.encounteredError=!0),D.kind===231?"(Anonymous class)":"(Anonymous function)"}}const S=bz(o,_);return S!==void 0?S:Eu(o)}function g0(o){if(o){const y=yr(o);return y.isVisible===void 0&&(y.isVisible=!!_()),y.isVisible}return!1;function _(){switch(o.kind){case 338:case 346:case 340:return!!(o.parent&&o.parent.parent&&o.parent.parent.parent&&Os(o.parent.parent.parent));case 208:return g0(o.parent.parent);case 260:if(ta(o.name)&&!o.name.elements.length)return!1;case 267:case 263:case 264:case 265:case 262:case 266:case 271:if(BT(o))return!0;const y=bN(o);return!(Vge(o)&32)&&!(o.kind!==271&&y.kind!==307&&y.flags&33554432)?cS(y):g0(y);case 172:case 171:case 177:case 178:case 174:case 173:if(xp(o,6))return!1;case 176:case 180:case 179:case 181:case 169:case 268:case 184:case 185:case 187:case 183:case 188:case 189:case 192:case 193:case 196:case 202:return g0(o.parent);case 273:case 274:case 276:return!1;case 168:case 307:case 270:return!0;case 277:return!1;default:return!1}}}function NO(o,_){let y;o.kind!==11&&o.parent&&o.parent.kind===277?y=_i(o,o,2998271,void 0,!1):o.parent.kind===281&&(y=Xy(o.parent,2998271));let S,D;return y&&(D=new Set,D.add(Ba(y)),L(y.declarations)),S;function L(B){O(B,K=>{const ne=Th(K)||K;if(_?yr(K).isVisible=!0:(S=S||[],mu(S,ne)),gI(K)){const ce=K.moduleReference,ge=K_(ce),je=_i(K,ge.escapedText,901119,void 0,!1);je&&D&&of(D,Ba(je))&&L(je.declarations)}})}}function Qy(o,_){const y=Hx(o,_);if(y>=0){const{length:S}=nn;for(let D=y;D<S;D++)Vn[D]=!1;return!1}return nn.push(o),Vn.push(!0),mn.push(_),!0}function Hx(o,_){for(let y=nn.length-1;y>=Pr;y--){if(Cz(nn[y],mn[y]))return-1;if(nn[y]===o&&mn[y]===_)return y}return-1}function Cz(o,_){switch(_){case 0:return!!Ys(o).type;case 2:return!!Ys(o).declaredType;case 1:return!!o.resolvedBaseConstructorType;case 3:return!!o.resolvedReturnType;case 4:return!!o.immediateBaseConstraint;case 5:return!!o.resolvedTypeArguments;case 6:return!!o.baseTypesResolved;case 7:return!!Ys(o).writeType;case 8:return yr(o).parameterInitializerContainsUndefined!==void 0}return j.assertNever(_)}function Zy(){return nn.pop(),mn.pop(),Vn.pop()}function bN(o){return Qi(A1(o),_=>{switch(_.kind){case 260:case 261:case 276:case 275:case 274:case 273:return!1;default:return!0}}).parent}function Sz(o){const _=gl(Qp(o));return _.typeParameters?wC(_,qt(_.typeParameters,y=>Je)):_}function Yu(o,_){const y=Ta(o,_);return y?Yn(y):void 0}function HA(o,_){var y;let S;return Yu(o,_)||(S=(y=UA(o,_))==null?void 0:y.type)&&Dd(S,!0,!0)}function Nc(o){return o&&(o.flags&1)!==0}function fe(o){return o===vt||!!(o.flags&1&&o.aliasSymbol)}function Ke(o,_){if(_!==0)return xm(o,!1,_);const y=xr(o);return y&&Ys(y).type||xm(o,!1,_)}function mt(o,_,y){if(o=ad(o,ne=>!(ne.flags&98304)),o.flags&131072)return Jo;if(o.flags&1048576)return eu(o,ne=>mt(ne,_,y));let S=is(qt(_,xC));const D=[],L=[];for(const ne of Ac(o)){const ce=$A(ne,8576);!Da(ce,S)&&!($m(ne)&6)&&ume(ne)?D.push(ne):L.push(ce)}if(EN(o)||IN(S)){if(L.length&&(S=is([S,...L])),S.flags&131072)return o;const ne=jKt();return ne?VO(ne,[o,S]):vt}const B=_a();for(const ne of D)B.set(ne.escapedName,h8e(ne,!1));const K=Xs(y,B,w,w,Ih(o));return K.objectFlags|=4194304,K}function Xt(o){return!!(o.flags&465829888)&&Au(Jf(o)||te,32768)}function Si(o){const _=dg(o,Xt)?eu(o,y=>y.flags&465829888?iv(y):y):o;return Qg(_,524288)}function an(o,_){const y=jr(o);return y?LC(y,_):_}function jr(o){const _=Hs(o);if(_&&wV(_)&&_.flowNode){const y=Cs(o);if(y){const S=Ht(l2.createStringLiteral(y),o),D=N_(_)?_:l2.createParenthesizedExpression(_),L=Ht(l2.createElementAccessExpression(D,S),o);return _c(S,L),_c(L,o),D!==_&&_c(D,L),L.flowNode=_.flowNode,L}}}function Hs(o){const _=o.parent.parent;switch(_.kind){case 208:case 303:return jr(_);case 209:return jr(o.parent);case 260:return _.initializer;case 226:return _.right}}function Cs(o){const _=o.parent;return o.kind===208&&_.kind===206?Ss(o.propertyName||o.name):o.kind===303||o.kind===304?Ss(o.name):""+_.elements.indexOf(o)}function Ss(o){const _=xC(o);return _.flags&384?""+_.value:void 0}function no(o){const _=o.dotDotDotToken?32:0,y=Ke(o.parent.parent,_);return y&&$c(o,y,!1)}function $c(o,_,y){if(Nc(_))return _;const S=o.parent;we&&o.flags&33554432&&Qk(o)?_=EC(_):we&&S.parent.initializer&&!l1(Hmt(S.parent.initializer),65536)&&(_=Qg(_,524288));const D=32|(y||i4(o)?16:0);let L;if(S.kind===206)if(o.dotDotDotToken){if(_=a1(_),_.flags&2||!$ee(_))return ft(o,k.Rest_types_may_only_be_created_from_object_types),vt;const B=[];for(const K of S.elements)K.dotDotDotToken||B.push(K.propertyName||K.name);L=mt(_,B,o.symbol)}else{const B=o.propertyName||o.name,K=xC(B),ne=ap(_,K,D,B);L=an(o,ne)}else{const B=iw(65|(o.dotDotDotToken?0:128),_,tt,S),K=S.elements.indexOf(o);if(o.dotDotDotToken){const ne=eu(_,ce=>ce.flags&58982400?iv(ce):ce);L=up(ne,Qa)?eu(ne,ce=>$5(ce,K)):hh(B)}else if(YS(_)){const ne=v0(K),ce=Gx(_,ne,D,o.name)||vt;L=an(o,ce)}else L=B}return o.initializer?dd(YL(o))?we&&!l1(eF(o,0),16777216)?Si(L):L:c5e(o,is([Si(L),eF(o,0)],2)):L}function Jc(o){const _=Bk(o);if(_)return Bs(_)}function dc(o){const _=Dc(o,!0);return _.kind===106||_.kind===80&&Lh(_)===et}function og(o){const _=Dc(o,!0);return _.kind===209&&_.elements.length===0}function Dd(o,_=!1,y=!0){return we&&y?Zx(o,_):o}function xm(o,_,y){if(_s(o)&&o.parent.parent.kind===249){const B=oy(E7e(uo(o.parent.parent.expression,y)));return B.flags&4456448?Spt(B):st}if(_s(o)&&o.parent.parent.kind===250){const B=o.parent.parent;return gte(B)||Je}if(ta(o.parent))return no(o);const S=Lo(o)&&!O1(o)||O_(o)||XEe(o),D=_&&g3(o),L=km(o);if(Cae(o))return L?Nc(L)||L===te?L:vt:se?te:Je;if(L)return Dd(L,S,D);if((De||nr(o))&&_s(o)&&!ta(o.name)&&!(Vge(o)&32)&&!(o.flags&33554432)){if(!(oE(o)&6)&&(!o.initializer||dc(o.initializer)))return Rt;if(o.initializer&&og(o.initializer))return Pc}if($s(o)){if(!o.symbol)return;const B=o.parent;if(B.kind===178&&RO(B)){const ce=ql(xr(o.parent),177);if(ce){const ge=Dm(ce),je=z5e(B);return je&&o===je?(j.assert(!je.type),Yn(ge.thisParameter)):Oc(ge)}}const K=uKt(B,o);if(K)return K;const ne=o.symbol.escapedName==="this"?h7e(B):ggt(o);if(ne)return Dd(ne,!1,D)}if(hI(o)&&o.initializer){if(nr(o)&&!$s(o)){const K=F5(o,xr(o),A8(o));if(K)return K}const B=c5e(o,eF(o,y));return Dd(B,S,D)}if(Lo(o)&&(De||nr(o)))if(bd(o)){const B=$t(o.parent.members,gu),K=B.length?gc(o.symbol,B):jh(o)&128?Sme(o.symbol):void 0;return K&&Dd(K,!0,D)}else{const B=nH(o.parent),K=B?gd(o.symbol,B):jh(o)&128?Sme(o.symbol):void 0;return K&&Dd(K,!0,D)}if(U1(o))return Pt;if(ta(o.name))return bi(o.name,!1,!0)}function bC(o){if(o.valueDeclaration&&ur(o.valueDeclaration)){const _=Ys(o);return _.isConstructorDeclaredProperty===void 0&&(_.isConstructorDeclaredProperty=!1,_.isConstructorDeclaredProperty=!!jx(o)&&Ce(o.declarations,y=>ur(y)&&Jme(y)&&(y.left.kind!==212||cm(y.left.argumentExpression))&&!Zp(void 0,y,o,y))),_.isConstructorDeclaredProperty}return!1}function hb(o){const _=o.valueDeclaration;return _&&Lo(_)&&!dd(_)&&!_.initializer&&(De||nr(_))}function jx(o){if(o.declarations)for(const _ of o.declarations){const y=Hh(_,!1,!1);if(y&&(y.kind===176||dy(y)))return y}}function XY(o){const _=_n(o.declarations[0]),y=Ws(o.escapedName),S=o.declarations.every(L=>nr(L)&&Sl(L)&&Wv(L.expression)),D=S?G.createPropertyAccessExpression(G.createPropertyAccessExpression(G.createIdentifier("module"),G.createIdentifier("exports")),y):G.createPropertyAccessExpression(G.createIdentifier("exports"),y);return S&&_c(D.expression.expression,D.expression),_c(D.expression,D),_c(D,_),D.flowNode=_.endFlowNode,LC(D,Rt,tt)}function gc(o,_){const y=so(o.escapedName,"__#")?G.createPrivateIdentifier(o.escapedName.split("@")[1]):Ws(o.escapedName);for(const S of _){const D=G.createPropertyAccessExpression(G.createThis(),y);_c(D.expression,D),_c(D,S),D.flowNode=S.returnFlowNode;const L=CC(D,o);if(De&&(L===Rt||L===Pc)&&ft(o.valueDeclaration,k.Member_0_implicitly_has_an_1_type,eo(o),Hn(L)),!up(L,Kee))return fU(L)}}function gd(o,_){const y=so(o.escapedName,"__#")?G.createPrivateIdentifier(o.escapedName.split("@")[1]):Ws(o.escapedName),S=G.createPropertyAccessExpression(G.createThis(),y);_c(S.expression,S),_c(S,_),S.flowNode=_.returnFlowNode;const D=CC(S,o);return De&&(D===Rt||D===Pc)&&ft(o.valueDeclaration,k.Member_0_implicitly_has_an_1_type,eo(o),Hn(D)),up(D,Kee)?void 0:fU(D)}function CC(o,_){const y=(_==null?void 0:_.valueDeclaration)&&(!hb(_)||jh(_.valueDeclaration)&128)&&Sme(_)||tt;return LC(o,Rt,y)}function HD(o,_){const y=dP(o.valueDeclaration);if(y){const K=nr(y)?Fk(y):void 0;return K&&K.typeExpression?Bs(K.typeExpression):o.valueDeclaration&&F5(o.valueDeclaration,o,y)||J2(ju(y))}let S,D=!1,L=!1;if(bC(o)&&(S=gd(o,jx(o))),!S){let K;if(o.declarations){let ne;for(const ce of o.declarations){const ge=ur(ce)||la(ce)?ce:Sl(ce)?ur(ce.parent)?ce.parent:ce:void 0;if(!ge)continue;const je=Sl(ge)?yV(ge):Bu(ge);(je===4||ur(ge)&&Jme(ge,je))&&(A(ge)?D=!0:L=!0),la(ge)||(ne=Zp(ne,ge,o,ce)),ne||(K||(K=[])).push(ur(ge)||la(ge)?W2(o,_,ge,je):Ai)}S=ne}if(!S){if(!P(K))return vt;let ne=D&&o.declarations?$(K,o.declarations):void 0;if(L){const ge=Sme(o);ge&&((ne||(ne=[])).push(ge),D=!0)}const ce=Ft(ne,ge=>!!(ge.flags&-98305))?ne:K;S=is(ce)}}const B=lp(Dd(S,!1,L&&!D));return o.valueDeclaration&&nr(o.valueDeclaration)&&ad(B,K=>!!(K.flags&-98305))===Ai?(G2(o.valueDeclaration,Je),Je):B}function F5(o,_,y){var S,D;if(!nr(o)||!y||!Aa(y)||y.properties.length)return;const L=_a();for(;ur(o)||Nr(o);){const ne=p_(o);(S=ne==null?void 0:ne.exports)!=null&&S.size&&Jg(L,ne.exports),o=ur(o)?o.parent:o.parent.parent}const B=p_(o);(D=B==null?void 0:B.exports)!=null&&D.size&&Jg(L,B.exports);const K=Xs(_,L,w,w,w);return K.objectFlags|=4096,K}function Zp(o,_,y,S){var D;const L=dd(_.parent);if(L){const B=lp(Bs(L));if(o)!fe(o)&&!fe(B)&&!yb(o,B)&&b1t(void 0,o,S,B);else return B}if((D=y.parent)!=null&&D.valueDeclaration){const B=RD(y.parent);if(B.valueDeclaration){const K=dd(B.valueDeclaration);if(K){const ne=Ta(Bs(K),y.escapedName);if(ne)return Ux(ne)}}}return o}function W2(o,_,y,S){if(la(y)){if(_)return Yn(_);const B=ju(y.arguments[2]),K=Yu(B,"value");if(K)return K;const ne=Yu(B,"get");if(ne){const ge=VN(ne);if(ge)return Oc(ge)}const ce=Yu(B,"set");if(ce){const ge=VN(ce);if(ge)return Q7e(ge)}return Je}if(ir(y.left,y.right))return Je;const D=S===1&&(Nr(y.left)||wl(y.left))&&(Wv(y.left.expression)||ot(y.left.expression)&&yI(y.left.expression)),L=_?Yn(_):D?Xh(ju(y.right)):J2(ju(y.right));if(L.flags&524288&&S===2&&o.escapedName==="export="){const B=o1(L),K=_a();DG(B.members,K);const ne=K.size;_&&!_.exports&&(_.exports=_a()),(_||o).exports.forEach((ge,je)=>{var Be;const kt=K.get(je);if(kt&&kt!==ge&&!(ge.flags&2097152))if(ge.flags&111551&&kt.flags&111551){if(ge.valueDeclaration&&kt.valueDeclaration&&_n(ge.valueDeclaration)!==_n(kt.valueDeclaration)){const Kt=Ws(ge.escapedName),Oi=((Be=Jr(kt.valueDeclaration,Bf))==null?void 0:Be.name)||kt.valueDeclaration;da(ft(ge.valueDeclaration,k.Duplicate_identifier_0,Kt),Kn(Oi,k._0_was_also_declared_here,Kt)),da(ft(Oi,k.Duplicate_identifier_0,Kt),Kn(ge.valueDeclaration,k._0_was_also_declared_here,Kt))}const Vt=$a(ge.flags|kt.flags,je);Vt.links.type=is([Yn(ge),Yn(kt)]),Vt.valueDeclaration=kt.valueDeclaration,Vt.declarations=Js(kt.declarations,ge.declarations),K.set(je,Vt)}else K.set(je,Y0(ge,kt));else K.set(je,ge)});const ce=Xs(ne!==K.size?void 0:B.symbol,K,B.callSignatures,B.constructSignatures,B.indexInfos);if(ne===K.size&&(L.aliasSymbol&&(ce.aliasSymbol=L.aliasSymbol,ce.aliasTypeArguments=L.aliasTypeArguments),Or(L)&4)){ce.aliasSymbol=L.symbol;const ge=Pl(L);ce.aliasTypeArguments=P(ge)?ge:void 0}return ce.objectFlags|=lee([L])|Or(L)&20608,ce.symbol&&ce.symbol.flags&32&&L===W_(ce.symbol)&&(ce.objectFlags|=16777216),ce}return xme(L)?(G2(y,Yc),Yc):L}function ir(o,_){return Nr(o)&&o.expression.kind===110&&QP(_,y=>Tf(o,y))}function A(o){const _=Hh(o,!1,!1);return _.kind===176||_.kind===262||_.kind===218&&!vV(_.parent)}function $(o,_){return j.assert(o.length===_.length),o.filter((y,S)=>{const D=_[S],L=ur(D)?D:ur(D.parent)?D.parent:void 0;return L&&A(L)})}function ie(o,_,y){if(o.initializer){const S=ta(o.name)?bi(o.name,!0,!1):te;return Dd($0t(o,eF(o,0,S)))}return ta(o.name)?bi(o.name,_,y):(y&&!Yy(o)&&G2(o,Je),_?ji:Je)}function Ee(o,_,y){const S=_a();let D,L=131200;O(o.elements,K=>{const ne=K.propertyName||K.name;if(K.dotDotDotToken){D=nv(st,Je,!1);return}const ce=xC(ne);if(!Jm(ce)){L|=512;return}const ge=Gm(ce),je=4|(K.initializer?16777216:0),Be=$a(je,ge);Be.links.type=ie(K,_,y),Be.links.bindingElement=K,S.set(Be.escapedName,Be)});const B=Xs(void 0,S,w,w,D?[D]:w);return B.objectFlags|=L,_&&(B.pattern=o,B.objectFlags|=131072),B}function ht(o,_,y){const S=o.elements,D=rl(S),L=D&&D.kind===208&&D.dotDotDotToken?D:void 0;if(S.length===0||S.length===1&&L)return re>=2?opt(Je):Yc;const B=qt(S,ge=>Bd(ge)?Je:ie(ge,_,y)),K=Mt(S,ge=>!(ge===L||Bd(ge)||i4(ge)),S.length-1)+1,ne=qt(S,(ge,je)=>ge===L?4:je>=K?2:1);let ce=rv(B,ne);return _&&(ce=B_t(ce),ce.pattern=o,ce.objectFlags|=131072),ce}function bi(o,_=!1,y=!1){_&&nb.push(o);const S=o.kind===206?Ee(o,_,y):ht(o,_,y);return _&&nb.pop(),S}function lr(o,_){return ag(xm(o,!0,0),o,_)}function xo(o){const _=yr(o);if(!_.resolvedType){const y=$a(4096,"__importAttributes"),S=_a();O(o.elements,L=>{const B=$a(4,sX(L));B.parent=y,B.links.type=Jri(L),B.links.target=B,S.set(B.escapedName,B)});const D=Xs(y,S,w,w,w);D.objectFlags|=262272,_.resolvedType=D}return _.resolvedType}function el(o){const _=p_(o),y=EKt(!1);return y&&_&&_===y}function ag(o,_,y){return o?(o.flags&4096&&el(_.parent)&&(o=_8e(_)),y&&Pme(_,o),o.flags&8192&&(ec(_)||!_.type)&&o.symbol!==xr(_)&&(o=wi),lp(o)):(o=$s(_)&&_.dotDotDotToken?Yc:Je,y&&(Yy(_)||G2(_,o)),o)}function Yy(o){const _=A1(o),y=_.kind===169?_.parent:_;return fte(y)}function km(o){const _=dd(o);if(_)return Bs(_)}function LO(o){let _=o.valueDeclaration;return _?(ec(_)&&(_=YL(_)),$s(_)?pme(_.parent):!1):!1}function dRe(o){const _=Ys(o);if(!_.type){const y=Vpe(o);return!_.type&&!LO(o)&&(_.type=y),y}return _.type}function Vpe(o){if(o.flags&4194304)return Sz(o);if(o===wt)return Je;if(o.flags&134217728&&o.valueDeclaration){const S=xr(_n(o.valueDeclaration)),D=$a(S.flags,"exports");D.declarations=S.declarations?S.declarations.slice():[],D.parent=o,D.links.target=S,S.valueDeclaration&&(D.valueDeclaration=S.valueDeclaration),S.members&&(D.members=new Map(S.members)),S.exports&&(D.exports=new Map(S.exports));const L=_a();return L.set("exports",D),Xs(o,L,w,w,w)}j.assertIsDefined(o.valueDeclaration);const _=o.valueDeclaration;if(Os(_)&&Eg(_))return _.statements.length?lp(J2(uo(_.statements[0].expression))):Jo;if(Qw(_))return wz(o);if(!Qy(o,0))return o.flags&512&&!(o.flags&67108864)?W5(o):PO(o);let y;if(_.kind===277)y=ag(km(_)||ju(_.expression),_);else if(ur(_)||nr(_)&&(la(_)||(Nr(_)||iK(_))&&ur(_.parent)))y=HD(o);else if(Nr(_)||wl(_)||ot(_)||Bc(_)||A_(_)||hd(_)||Wu(_)||Nu(_)&&!Ig(_)||W1(_)||Os(_)){if(o.flags&9136)return W5(o);y=ur(_.parent)?HD(o):km(_)||Je}else if(_d(_))y=km(_)||J0t(_);else if(U1(_))y=km(_)||Igt(_);else if(lh(_))y=km(_)||iF(_.name,0);else if(Ig(_))y=km(_)||G0t(_,0);else if($s(_)||Lo(_)||O_(_)||_s(_)||ec(_)||g8(_))y=lr(_,!0);else if(sD(_))y=W5(o);else if(SS(_))y=Upe(o);else return j.fail("Unhandled declaration kind! "+j.formatSyntaxKind(_.kind)+" for "+j.formatSymbol(o));return Zy()?y:o.flags&512&&!(o.flags&67108864)?W5(o):PO(o)}function CN(o){if(o)switch(o.kind){case 177:return wp(o);case 178:return YTe(o);case 172:return j.assert(O1(o)),dd(o)}}function B5(o){const _=CN(o);return _&&Bs(_)}function fRe(o){const _=z5e(o);return _&&_.symbol}function hRe(o){return j2(Dm(o))}function wz(o){const _=Ys(o);if(!_.type){if(!Qy(o,0))return vt;const y=ql(o,177),S=ql(o,178),D=Jr(ql(o,172),I_);let L=y&&nr(y)&&Jc(y)||B5(y)||B5(S)||B5(D)||y&&y.body&&dge(y)||D&&D.initializer&&lr(D,!0);L||(S&&!fte(S)?Z1(De,S,k.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation,eo(o)):y&&!fte(y)?Z1(De,y,k.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation,eo(o)):D&&!fte(D)&&Z1(De,D,k.Member_0_implicitly_has_an_1_type,eo(o),"any"),L=Je),Zy()||(CN(y)?ft(y,k._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,eo(o)):CN(S)||CN(D)?ft(S,k._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,eo(o)):y&&De&&ft(y,k._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,eo(o)),L=Je),_.type??(_.type=L)}return _.type}function Hpe(o){const _=Ys(o);if(!_.writeType){if(!Qy(o,7))return vt;const y=ql(o,178)??Jr(ql(o,172),I_);let S=B5(y);Zy()||(CN(y)&&ft(y,k._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,eo(o)),S=Je),_.writeType??(_.writeType=S||wz(o))}return _.writeType}function jpe(o){const _=ys(W_(o));return _.flags&8650752?_:_.flags&2097152?Fe(_.types,y=>!!(y.flags&8650752)):void 0}function W5(o){let _=Ys(o);const y=_;if(!_.type){const S=o.valueDeclaration&&lge(o.valueDeclaration,!1);if(S){const D=U7e(o,S);D&&(o=D,_=D.links)}y.type=_.type=zpe(o)}return _.type}function zpe(o){const _=o.valueDeclaration;if(o.flags&1536&&QW(o))return Je;if(_&&(_.kind===226||Sl(_)&&_.parent.kind===226))return HD(o);if(o.flags&512&&_&&Os(_)&&_.commonJsModuleIndicator){const S=sp(o);if(S!==o){if(!Qy(o,0))return vt;const D=wc(o.exports.get("export=")),L=HD(D,D===S?void 0:S);return Zy()?L:PO(o)}}const y=V(16,o);if(o.flags&32){const S=jpe(o);return S?Wa([y,S]):y}else return we&&o.flags&16777216?Zx(y,!0):y}function Upe(o){const _=Ys(o);return _.type||(_.type=t_t(o))}function jA(o){const _=Ys(o);if(!_.type){if(!Qy(o,0))return vt;const y=$f(o),S=o.declarations&&Ox(Dh(o),!0),D=J(S==null?void 0:S.declarations,L=>Il(L)?km(L):void 0);if(_.type??(_.type=S!=null&&S.declarations&&Nge(S.declarations)&&o.declarations.length?XY(S):Nge(o.declarations)?Rt:D||(Eh(y)&111551?Yn(y):vt)),!Zy())return PO(S??o),_.type??(_.type=vt)}return _.type}function qpe(o){const _=Ys(o);return _.type||(_.type=io(Yn(_.target),_.mapper))}function _Re(o){const _=Ys(o);return _.writeType||(_.writeType=io(zx(_.target),_.mapper))}function PO(o){const _=o.valueDeclaration;if(_){if(dd(_))return ft(o.valueDeclaration,k._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,eo(o)),vt;De&&(_.kind!==169||_.initializer)&&ft(o.valueDeclaration,k._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer,eo(o))}else if(o.flags&2097152){const y=Dh(o);y&&ft(y,k.Circular_definition_of_import_alias_0,eo(o))}return Je}function xz(o){const _=Ys(o);return _.type||(j.assertIsDefined(_.deferralParent),j.assertIsDefined(_.deferralConstituents),_.type=_.deferralParent.flags&1048576?is(_.deferralConstituents):Wa(_.deferralConstituents)),_.type}function pRe(o){const _=Ys(o);return!_.writeType&&_.deferralWriteConstituents&&(j.assertIsDefined(_.deferralParent),j.assertIsDefined(_.deferralConstituents),_.writeType=_.deferralParent.flags&1048576?is(_.deferralWriteConstituents):Wa(_.deferralWriteConstituents)),_.writeType}function zx(o){const _=Iu(o);return o.flags&4?_&2?_&65536?pRe(o)||xz(o):o.links.writeType||o.links.type:IC(Yn(o),!!(o.flags&16777216)):o.flags&98304?_&1?_Re(o):Hpe(o):Yn(o)}function Yn(o){const _=Iu(o);return _&65536?xz(o):_&1?qpe(o):_&262144?qGt(o):_&8192?lZt(o):o.flags&7?dRe(o):o.flags&9136?W5(o):o.flags&8?Upe(o):o.flags&98304?wz(o):o.flags&2097152?jA(o):vt}function Ux(o){return IC(Yn(o),!!(o.flags&16777216))}function $pe(o,_){if(o===void 0||!(Or(o)&4))return!1;for(const y of _)if(o.target===y)return!0;return!1}function iy(o,_){return o!==void 0&&_!==void 0&&(Or(o)&4)!==0&&o.target===_}function SN(o){return Or(o)&4?o.target:o}function AO(o,_){return y(o);function y(S){if(Or(S)&7){const D=SN(S);return D===_||Ft(Ll(D),y)}else if(S.flags&2097152)return Ft(S.types,y);return!1}}function QY(o,_){for(const y of _)o=n_(o,jD(xr(y)));return o}function OO(o,_){for(;;){if(o=o.parent,o&&ur(o)){const S=Bu(o);if(S===6||S===3){const D=xr(o.left);D&&D.parent&&!Qi(D.parent.valueDeclaration,L=>o===L)&&(o=D.parent.valueDeclaration)}}if(!o)return;const y=o.kind;switch(y){case 263:case 231:case 264:case 179:case 180:case 173:case 184:case 185:case 317:case 262:case 174:case 218:case 219:case 265:case 345:case 346:case 340:case 338:case 200:case 194:{const D=OO(o,_);if((y===218||y===219||Ig(o))&&Em(o)){const K=Ra(ia(Yn(xr(o)),0));if(K&&K.typeParameters)return[...D||w,...K.typeParameters]}if(y===200)return fn(D,jD(xr(o.typeParameter)));if(y===194)return Js(D,u8e(o));const L=QY(D,Jw(o)),B=_&&(y===263||y===231||y===264||dy(o))&&W_(xr(o)).thisType;return B?fn(L,B):L}case 341:const S=kV(o);S&&(o=S.valueDeclaration);break;case 320:{const D=OO(o,_);return o.tags?QY(D,Rr(o.tags,L=>Rg(L)?L.typeParameters:void 0)):D}}}}function ZY(o){var _;const y=o.flags&32||o.flags&16?o.valueDeclaration:(_=o.declarations)==null?void 0:_.find(S=>{if(S.kind===264)return!0;if(S.kind!==260)return!1;const D=S.initializer;return!!D&&(D.kind===218||D.kind===219)});return j.assert(!!y,"Class was missing valueDeclaration -OR- non-class had no interface declarations"),OO(y)}function y0(o){if(!o.declarations)return;let _;for(const y of o.declarations)(y.kind===264||y.kind===263||y.kind===231||dy(y)||SV(y))&&(_=QY(_,Jw(y)));return _}function mRe(o){return Js(ZY(o),y0(o))}function V2(o){const _=ia(o,1);if(_.length===1){const y=_[0];if(!y.typeParameters&&y.parameters.length===1&&Ch(y)){const S=rte(y.parameters[0]);return Nc(S)||Nee(S)===Je}}return!1}function gn(o){if(ia(o,1).length>0)return!0;if(o.flags&8650752){const _=Jf(o);return!!_&&V2(_)}return!1}function Ar(o){const _=Xb(o.symbol);return _&&L1(_)}function Vr(o,_,y){const S=P(_),D=nr(y);return $t(ia(o,1),L=>(D||S>=sy(L.typeParameters))&&S<=P(L.typeParameters))}function Ds(o,_,y){const S=Vr(o,_,y),D=qt(_,Bs);return Wr(S,L=>Ft(L.typeParameters)?Nz(L,D,nr(y)):L)}function ys(o){if(!o.resolvedBaseConstructorType){const _=Xb(o.symbol),y=_&&L1(_),S=Ar(o);if(!S)return o.resolvedBaseConstructorType=tt;if(!Qy(o,1))return vt;const D=uo(S.expression);if(y&&S!==y&&(j.assert(!y.typeArguments),uo(y.expression)),D.flags&2621440&&o1(D),!Zy())return ft(o.symbol.valueDeclaration,k._0_is_referenced_directly_or_indirectly_in_its_own_base_expression,eo(o.symbol)),o.resolvedBaseConstructorType??(o.resolvedBaseConstructorType=vt);if(!(D.flags&1)&&D!==lt&&!gn(D)){const L=ft(S.expression,k.Type_0_is_not_a_constructor_function_type,Hn(D));if(D.flags&262144){const B=z5(D);let K=te;if(B){const ne=ia(B,1);ne[0]&&(K=Oc(ne[0]))}D.symbol.declarations&&da(L,Kn(D.symbol.declarations[0],k.Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1,eo(D.symbol),Hn(K)))}return o.resolvedBaseConstructorType??(o.resolvedBaseConstructorType=vt)}o.resolvedBaseConstructorType??(o.resolvedBaseConstructorType=D)}return o.resolvedBaseConstructorType}function yc(o){let _=w;if(o.symbol.declarations)for(const y of o.symbol.declarations){const S=i3(y);if(S)for(const D of S){const L=Bs(D);fe(L)||(_===w?_=[L]:_.push(L))}}return _}function tl(o,_){ft(o,k.Type_0_recursively_references_itself_as_a_base_type,Hn(_,void 0,2))}function Ll(o){if(!o.baseTypesResolved){if(Qy(o,6)&&(o.objectFlags&8?o.resolvedBaseTypes=[ev(o)]:o.symbol.flags&96?(o.symbol.flags&32&&ny(o),o.symbol.flags&64&&kz(o)):j.fail("type must be class or interface"),!Zy()&&o.symbol.declarations))for(const _ of o.symbol.declarations)(_.kind===263||_.kind===264)&&tl(_,o);o.baseTypesResolved=!0}return o.resolvedBaseTypes}function ev(o){const _=Wr(o.typeParameters,(y,S)=>o.elementFlags[S]&8?ap(y,hi):y);return hh(is(_||w),o.readonly)}function ny(o){o.resolvedBaseTypes=dae;const _=Kh(ys(o));if(!(_.flags&2621441))return o.resolvedBaseTypes=w;const y=Ar(o);let S;const D=_.symbol?gl(_.symbol):void 0;if(_.symbol&&_.symbol.flags&32&&r1(D))S=W_t(y,_.symbol);else if(_.flags&1)S=_;else{const B=Ds(_,y.typeArguments,y);if(!B.length)return ft(y.expression,k.No_base_constructor_has_the_specified_number_of_type_arguments),o.resolvedBaseTypes=w;S=Oc(B[0])}if(fe(S))return o.resolvedBaseTypes=w;const L=a1(S);if(!ry(L)){const B=ERe(void 0,S),K=jo(B,k.Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members,Hn(L));return lc.add(Bv(_n(y.expression),y.expression,K)),o.resolvedBaseTypes=w}return o===L||AO(L,o)?(ft(o.symbol.valueDeclaration,k.Type_0_recursively_references_itself_as_a_base_type,Hn(o,void 0,2)),o.resolvedBaseTypes=w):(o.resolvedBaseTypes===dae&&(o.members=void 0),o.resolvedBaseTypes=[L])}function r1(o){const _=o.outerTypeParameters;if(_){const y=_.length-1,S=Pl(o);return _[y].symbol!==S[y].symbol}return!0}function ry(o){if(o.flags&262144){const _=Jf(o);if(_)return ry(_)}return!!(o.flags&67633153&&!op(o)||o.flags&2097152&&Ce(o.types,ry))}function kz(o){if(o.resolvedBaseTypes=o.resolvedBaseTypes||w,o.symbol.declarations){for(const _ of o.symbol.declarations)if(_.kind===264&&B8(_))for(const y of B8(_)){const S=a1(Bs(y));fe(S)||(ry(S)?o!==S&&!AO(S,o)?o.resolvedBaseTypes===w?o.resolvedBaseTypes=[S]:o.resolvedBaseTypes.push(S):tl(_,o):ft(y,k.An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members))}}}function MO(o){if(!o.declarations)return!0;for(const _ of o.declarations)if(_.kind===264){if(_.flags&256)return!1;const y=B8(_);if(y){for(const S of y)if(pl(S.expression)){const D=nu(S.expression,788968,!0);if(!D||!(D.flags&64)||W_(D).thisType)return!1}}}return!0}function W_(o){let _=Ys(o);const y=_;if(!_.declaredType){const S=o.flags&32?1:2,D=U7e(o,o.valueDeclaration&&gti(o.valueDeclaration));D&&(o=D,_=D.links);const L=y.declaredType=_.declaredType=V(S,o),B=ZY(o),K=y0(o);(B||K||S===1||!MO(o))&&(L.objectFlags|=4,L.typeParameters=Js(B,K),L.outerTypeParameters=B,L.localTypeParameters=K,L.instantiations=new Map,L.instantiations.set(Xg(L.typeParameters),L),L.target=L,L.resolvedTypeArguments=L.typeParameters,L.thisType=Ut(o),L.thisType.isThisType=!0,L.thisType.constraint=L)}return _.declaredType}function Zht(o){var _;const y=Ys(o);if(!y.declaredType){if(!Qy(o,2))return vt;const S=j.checkDefined((_=o.declarations)==null?void 0:_.find(SV),"Type alias symbol with no valid declaration found"),D=Ng(S)?S.typeExpression:S.type;let L=D?Bs(D):vt;if(Zy()){const B=y0(o);B&&(y.typeParameters=B,y.instantiations=new Map,y.instantiations.set(Xg(B),L)),L===gr&&o.escapedName==="BuiltinIteratorReturn"&&(L=GRe())}else L=vt,S.kind===340?ft(S.typeExpression.type,k.Type_alias_0_circularly_references_itself,eo(o)):ft(Bf(S)&&S.name||S,k.Type_alias_0_circularly_references_itself,eo(o));y.declaredType??(y.declaredType=L)}return y.declaredType}function Jpe(o){return o.flags&1056&&o.symbol.flags&8?gl(Qp(o.symbol)):o}function Yht(o){const _=Ys(o);if(!_.declaredType){const y=[];if(o.declarations){for(const D of o.declarations)if(D.kind===266){for(const L of D.members)if(RO(L)){const B=xr(L),K=jN(L).value,ne=XA(K!==void 0?UXt(K,Ba(o),B):e_t(B));Ys(B).declaredType=ne,y.push(Xh(ne))}}}const S=y.length?is(y,1,o,void 0):e_t(o);S.flags&1048576&&(S.flags|=1024,S.symbol=o),_.declaredType=S}return _.declaredType}function e_t(o){const _=Kg(32,o),y=Kg(32,o);return _.regularType=_,_.freshType=y,y.regularType=_,y.freshType=y,_}function t_t(o){const _=Ys(o);if(!_.declaredType){const y=Yht(Qp(o));_.declaredType||(_.declaredType=y)}return _.declaredType}function jD(o){const _=Ys(o);return _.declaredType||(_.declaredType=Ut(o))}function SGt(o){const _=Ys(o);return _.declaredType||(_.declaredType=gl($f(o)))}function gl(o){return i_t(o)||vt}function i_t(o){if(o.flags&96)return W_(o);if(o.flags&524288)return Zht(o);if(o.flags&262144)return jD(o);if(o.flags&384)return Yht(o);if(o.flags&8)return t_t(o);if(o.flags&2097152)return SGt(o)}function YY(o){switch(o.kind){case 133:case 159:case 154:case 150:case 163:case 136:case 155:case 151:case 116:case 157:case 146:case 201:return!0;case 188:return YY(o.elementType);case 183:return!o.typeArguments||o.typeArguments.every(YY)}return!1}function wGt(o){const _=R6(o);return!_||YY(_)}function n_t(o){const _=dd(o);return _?YY(_):!aS(o)}function xGt(o){const _=wp(o),y=Jw(o);return(o.kind===176||!!_&&YY(_))&&o.parameters.every(n_t)&&y.every(wGt)}function kGt(o){if(o.declarations&&o.declarations.length===1){const _=o.declarations[0];if(_)switch(_.kind){case 172:case 171:return n_t(_);case 174:case 173:case 176:case 177:case 178:return xGt(_)}}return!1}function r_t(o,_,y){const S=_a();for(const D of o)S.set(D.escapedName,y&&kGt(D)?D:y8e(D,_));return S}function s_t(o,_){for(const y of _){if(o_t(y))continue;const S=o.get(y.escapedName);(!S||S.valueDeclaration&&ur(S.valueDeclaration)&&!bC(S)&&!STe(S.valueDeclaration))&&(o.set(y.escapedName,y),o.set(y.escapedName,y))}}function o_t(o){return!!o.valueDeclaration&&Wh(o.valueDeclaration)&&pa(o.valueDeclaration)}function gRe(o){if(!o.declaredProperties){const _=o.symbol,y=qx(_);o.declaredProperties=gs(y),o.declaredCallSignatures=w,o.declaredConstructSignatures=w,o.declaredIndexInfos=w,o.declaredCallSignatures=$D(y.get("__call")),o.declaredConstructSignatures=$D(y.get("__new")),o.declaredIndexInfos=M_t(_)}return o}function Gpe(o){if(!Ka(o)&&!wl(o))return!1;const _=Ka(o)?o.expression:o.argumentExpression;return pl(_)&&Jm(Ka(o)?cy(o):ju(_))}function Tz(o){return o.charCodeAt(0)===95&&o.charCodeAt(1)===95&&o.charCodeAt(2)===64}function eee(o){const _=No(o);return!!_&&Gpe(_)}function RO(o){return!Jb(o)||eee(o)}function TGt(o){return lK(o)&&!Gpe(o)}function DGt(o,_,y){j.assert(!!(Iu(o)&4096),"Expected a late-bound symbol."),o.flags|=y,Ys(_.symbol).lateSymbol=o,o.declarations?_.symbol.isReplaceableByMethod||o.declarations.push(_):o.declarations=[_],y&111551&&(!o.valueDeclaration||o.valueDeclaration.kind!==_.kind)&&(o.valueDeclaration=_)}function a_t(o,_,y,S){j.assert(!!S.symbol,"The member is expected to have a symbol.");const D=yr(S);if(!D.resolvedSymbol){D.resolvedSymbol=S.symbol;const L=ur(S)?S.left:S.name,B=wl(L)?ju(L.argumentExpression):cy(L);if(Jm(B)){const K=Gm(B),ne=S.symbol.flags;let ce=y.get(K);ce||y.set(K,ce=$a(0,K,4096));const ge=_&&_.get(K);if(!(o.flags&32)&&ce.flags&L2(ne)){const je=ge?Js(ge.declarations,ce.declarations):ce.declarations,Be=!(B.flags&8192)&&Ws(K)||al(L);O(je,kt=>ft(No(kt)||kt,k.Property_0_was_also_declared_here,Be)),ft(L||S,k.Duplicate_property_0,Be),ce=$a(0,K,4096)}return ce.links.nameType=B,DGt(ce,S,ne),ce.parent?j.assert(ce.parent===o,"Existing symbol parent should match new one"):ce.parent=o,D.resolvedSymbol=ce}}return D.resolvedSymbol}function yRe(o,_){const y=Ys(o);if(!y[_]){const S=_==="resolvedExports",D=S?o.flags&1536?TO(o).exports:o.exports:o.members;y[_]=D||X;const L=_a();for(const ne of o.declarations||w){const ce=hTe(ne);if(ce)for(const ge of ce)S===bd(ge)&&eee(ge)&&a_t(o,D,L,ge)}const B=RD(o).assignmentDeclarationMembers;if(B){const ne=as(B.values());for(const ce of ne){const ge=Bu(ce),je=ge===3||ur(ce)&&Jme(ce,ge)||ge===9||ge===6;S===!je&&eee(ce)&&a_t(o,D,L,ce)}}let K=Nx(D,L);if(o.flags&33554432&&y.cjsExportMerged&&o.declarations)for(const ne of o.declarations){const ce=Ys(ne.symbol)[_];if(!K){K=ce;continue}ce&&ce.forEach((ge,je)=>{const Be=K.get(je);if(!Be)K.set(je,ge);else{if(Be===ge)return;K.set(je,Y0(Be,ge))}})}y[_]=K||X}return y[_]}function qx(o){return o.flags&6256?yRe(o,"resolvedMembers"):o.members||X}function Kpe(o){if(o.flags&106500&&o.escapedName==="__computed"){const _=Ys(o);if(!_.lateSymbol&&Ft(o.declarations,eee)){const y=wc(o.parent);Ft(o.declarations,bd)?__(y):qx(y)}return _.lateSymbol||(_.lateSymbol=o)}return o}function Wp(o,_,y){if(Or(o)&4){const S=o.target,D=Pl(o);return P(S.typeParameters)===P(D)?wC(S,Js(D,[_||S.thisType])):o}else if(o.flags&2097152){const S=Wr(o.types,D=>Wp(D,_,y));return S!==o.types?Wa(S):o}return y?Kh(o):o}function c_t(o,_,y,S){let D,L,B,K,ne;Vb(y,S,0,y.length)?(L=_.symbol?qx(_.symbol):_a(_.declaredProperties),B=_.declaredCallSignatures,K=_.declaredConstructSignatures,ne=_.declaredIndexInfos):(D=cp(y,S),L=r_t(_.declaredProperties,D,y.length===1),B=fme(_.declaredCallSignatures,D),K=fme(_.declaredConstructSignatures,D),ne=Wpt(_.declaredIndexInfos,D));const ce=Ll(_);if(ce.length){if(_.symbol&&L===qx(_.symbol)){const je=_a(_.declaredProperties),Be=FRe(_.symbol);Be&&je.set("__index",Be),L=je}co(o,L,B,K,ne);const ge=rl(S);for(const je of ce){const Be=ge?Wp(io(je,D),ge):je;s_t(L,Ac(Be)),B=Js(B,ia(Be,0)),K=Js(K,ia(Be,1));const kt=Be!==Je?Ih(Be):[nv(st,Je,!1)];ne=Js(ne,$t(kt,Vt=>!IRe(ne,Vt.keyType)))}}co(o,L,B,K,ne)}function EGt(o){c_t(o,gRe(o),w,w)}function IGt(o){const _=gRe(o.target),y=Js(_.typeParameters,[_.thisType]),S=Pl(o),D=S.length===y.length?S:Js(S,[o]);c_t(o,_,y,D)}function _b(o,_,y,S,D,L,B,K){const ne=new C(On,K);return ne.declaration=o,ne.typeParameters=_,ne.parameters=S,ne.thisParameter=y,ne.resolvedReturnType=D,ne.resolvedTypePredicate=L,ne.minArgumentCount=B,ne.resolvedMinArgumentCount=void 0,ne.target=void 0,ne.mapper=void 0,ne.compositeSignatures=void 0,ne.compositeKind=void 0,ne}function Dz(o){const _=_b(o.declaration,o.typeParameters,o.thisParameter,o.parameters,void 0,void 0,o.minArgumentCount,o.flags&167);return _.target=o.target,_.mapper=o.mapper,_.compositeSignatures=o.compositeSignatures,_.compositeKind=o.compositeKind,_}function l_t(o,_){const y=Dz(o);return y.compositeSignatures=_,y.compositeKind=1048576,y.target=void 0,y.mapper=void 0,y}function NGt(o,_){if((o.flags&24)===_)return o;o.optionalCallSignatureCache||(o.optionalCallSignatureCache={});const y=_===8?"inner":"outer";return o.optionalCallSignatureCache[y]||(o.optionalCallSignatureCache[y]=LGt(o,_))}function LGt(o,_){j.assert(_===8||_===16,"An optional call signature can either be for an inner call chain or an outer call chain, but not both.");const y=Dz(o);return y.flags|=_,y}function u_t(o,_){if(Ch(o)){const D=o.parameters.length-1,L=o.parameters[D],B=Yn(L);if(Qa(B))return[y(B,D,L)];if(!_&&B.flags&1048576&&Ce(B.types,Qa))return qt(B.types,K=>y(K,D,L))}return[o.parameters];function y(D,L,B){const K=Pl(D),ne=S(D,B),ce=qt(K,(ge,je)=>{const Be=ne&&ne[je]?ne[je]:Y5(o,L+je,D),kt=D.target.elementFlags[je],Vt=kt&12?32768:kt&2?16384:0,Kt=$a(1,Be,Vt);return Kt.links.type=kt&4?hh(ge):ge,Kt});return Js(o.parameters.slice(0,L),ce)}function S(D,L){const B=qt(D.target.labeledElementDeclarations,(K,ne)=>X7e(K,ne,D.target.elementFlags[ne],L));if(B){const K=[],ne=new Set;for(let ge=0;ge<B.length;ge++){const je=B[ge];of(ne,je)||K.push(ge)}const ce=new Map;for(const ge of K){let je=ce.get(B[ge])??1,Be;for(;!of(ne,Be=`${B[ge]}_${je}`);)je++;B[ge]=Be,ce.set(B[ge],je+1)}}return B}}function PGt(o){const _=ys(o),y=ia(_,1),S=Xb(o.symbol),D=!!S&&Zr(S,64);if(y.length===0)return[_b(void 0,o.localTypeParameters,void 0,w,o,void 0,0,D?4:0)];const L=Ar(o),B=nr(L),K=dee(L),ne=P(K),ce=[];for(const ge of y){const je=sy(ge.typeParameters),Be=P(ge.typeParameters);if(B||ne>=je&&ne<=Be){const kt=Be?Zpe(ge,$x(K,ge.typeParameters,je,B)):Dz(ge);kt.typeParameters=o.localTypeParameters,kt.resolvedReturnType=o,kt.flags=D?kt.flags|4:kt.flags&-5,ce.push(kt)}}return ce}function Xpe(o,_,y,S,D){for(const L of o)if(Eee(L,_,y,S,D,y?lQt:Bz))return L}function AGt(o,_,y){if(_.typeParameters){if(y>0)return;for(let D=1;D<o.length;D++)if(!Xpe(o[D],_,!1,!1,!1))return;return[_]}let S;for(let D=0;D<o.length;D++){const L=D===y?_:Xpe(o[D],_,!1,!1,!0)||Xpe(o[D],_,!0,!1,!0);if(!L)return;S=n_(S,L)}return S}function vRe(o){let _,y;for(let S=0;S<o.length;S++){if(o[S].length===0)return w;o[S].length>1&&(y=y===void 0?S:-1);for(const D of o[S])if(!_||!Xpe(_,D,!1,!1,!0)){const L=AGt(o,D,S);if(L){let B=D;if(L.length>1){let K=D.thisParameter;const ne=O(L,ce=>ce.thisParameter);if(ne){const ce=Wa(es(L,ge=>ge.thisParameter&&Yn(ge.thisParameter)));K=PN(ne,ce)}B=l_t(D,L),B.thisParameter=K}(_||(_=[])).push(B)}}}if(!P(_)&&y!==-1){const S=o[y!==void 0?y:0];let D=S.slice();for(const L of o)if(L!==S){const B=L[0];if(j.assert(!!B,"getUnionSignatures bails early on empty signature lists and should not have empty lists on second pass"),D=B.typeParameters&&Ft(D,K=>!!K.typeParameters&&!d_t(B.typeParameters,K.typeParameters))?void 0:qt(D,K=>RGt(K,B)),!D)break}_=D}return _||w}function d_t(o,_){if(P(o)!==P(_))return!1;if(!o||!_)return!0;const y=cp(_,o);for(let S=0;S<o.length;S++){const D=o[S],L=_[S];if(D!==L&&!yb(z5(D)||te,io(z5(L)||te,y)))return!1}return!0}function OGt(o,_,y){if(!o||!_)return o||_;const S=Wa([Yn(o),io(Yn(_),y)]);return PN(o,S)}function MGt(o,_,y){const S=dp(o),D=dp(_),L=S>=D?o:_,B=L===o?_:o,K=L===o?S:D,ne=ov(o)||ov(_),ce=ne&&!ov(L),ge=new Array(K+(ce?1:0));for(let je=0;je<K;je++){let Be=nE(L,je);L===_&&(Be=io(Be,y));let kt=nE(B,je)||te;B===_&&(kt=io(kt,y));const Vt=Wa([Be,kt]),Kt=ne&&!ce&&je===K-1,Oi=je>=fy(L)&&je>=fy(B),Ki=je>=S?void 0:Y5(o,je),qn=je>=D?void 0:Y5(_,je),Qn=Ki===qn?Ki:Ki?qn?void 0:Ki:qn,rn=$a(1|(Oi&&!Kt?16777216:0),Qn||`arg${je}`,Kt?32768:Oi?16384:0);rn.links.type=Kt?hh(Vt):Vt,ge[je]=rn}if(ce){const je=$a(1,"args",32768);je.links.type=hh(u1(B,K)),B===_&&(je.links.type=io(je.links.type,y)),ge[K]=je}return ge}function RGt(o,_){const y=o.typeParameters||_.typeParameters;let S;o.typeParameters&&_.typeParameters&&(S=cp(_.typeParameters,o.typeParameters));const D=o.declaration,L=MGt(o,_,S),B=OGt(o.thisParameter,_.thisParameter,S),K=Math.max(o.minArgumentCount,_.minArgumentCount),ne=_b(D,y,B,L,void 0,void 0,K,(o.flags|_.flags)&167);return ne.compositeKind=1048576,ne.compositeSignatures=Js(o.compositeKind!==2097152&&o.compositeSignatures||[o],[_]),S?ne.mapper=o.compositeKind!==2097152&&o.mapper&&o.compositeSignatures?ZD(o.mapper,S):S:o.compositeKind!==2097152&&o.mapper&&o.compositeSignatures&&(ne.mapper=o.mapper),ne}function f_t(o){const _=Ih(o[0]);if(_){const y=[];for(const S of _){const D=S.keyType;Ce(o,L=>!!pb(L,D))&&y.push(nv(D,is(qt(o,L=>H2(L,D))),Ft(o,L=>pb(L,D).isReadonly)))}return y}return w}function FGt(o){const _=vRe(qt(o.types,D=>D===kd?[Mi]:ia(D,0))),y=vRe(qt(o.types,D=>ia(D,1))),S=f_t(o.types);co(o,X,_,y,S)}function tee(o,_){return o?_?Wa([o,_]):o:_}function h_t(o){const _=$i(o,S=>ia(S,1).length>0),y=qt(o,V2);if(_>0&&_===$i(y,S=>S)){const S=y.indexOf(!0);y[S]=!1}return y}function BGt(o,_,y,S){const D=[];for(let L=0;L<_.length;L++)L===S?D.push(o):y[L]&&D.push(Oc(ia(_[L],1)[0]));return Wa(D)}function WGt(o){let _,y,S;const D=o.types,L=h_t(D),B=$i(L,K=>K);for(let K=0;K<D.length;K++){const ne=o.types[K];if(!L[K]){let ce=ia(ne,1);ce.length&&B>0&&(ce=qt(ce,ge=>{const je=Dz(ge);return je.resolvedReturnType=BGt(Oc(ge),D,L,K),je})),y=__t(y,ce)}_=__t(_,ia(ne,0)),S=oi(Ih(ne),(ce,ge)=>p_t(ce,ge,!1),S)}co(o,X,_||w,y||w,S||w)}function __t(o,_){for(const y of _)(!o||Ce(o,S=>!Eee(S,y,!1,!1,!1,Bz)))&&(o=fn(o,y));return o}function p_t(o,_,y){if(o)for(let S=0;S<o.length;S++){const D=o[S];if(D.keyType===_.keyType)return o[S]=nv(D.keyType,y?is([D.type,_.type]):Wa([D.type,_.type]),y?D.isReadonly||_.isReadonly:D.isReadonly&&_.isReadonly),o}return fn(o,_)}function VGt(o){if(o.target){co(o,X,w,w,w);const B=r_t(XS(o.target),o.mapper,!1),K=fme(ia(o.target,0),o.mapper),ne=fme(ia(o.target,1),o.mapper),ce=Wpt(Ih(o.target),o.mapper);co(o,B,K,ne,ce);return}const _=wc(o.symbol);if(_.flags&2048){co(o,X,w,w,w);const B=qx(_),K=$D(B.get("__call")),ne=$D(B.get("__new")),ce=M_t(_);co(o,B,K,ne,ce);return}let y=__(_),S;if(_===Me){const B=new Map;y.forEach(K=>{var ne;!(K.flags&418)&&!(K.flags&512&&((ne=K.declarations)!=null&&ne.length)&&Ce(K.declarations,Vh))&&B.set(K.escapedName,K)}),y=B}let D;if(co(o,y,w,w,w),_.flags&32){const B=W_(_),K=ys(B);K.flags&11272192?(y=_a(Co(y)),s_t(y,Ac(K))):K===Je&&(D=nv(st,Je,!1))}const L=Ype(y);if(L?S=BRe(L):(D&&(S=fn(S,D)),_.flags&384&&(gl(_).flags&32||Ft(o.properties,B=>!!(Yn(B).flags&296)))&&(S=fn(S,Xi))),co(o,y,w,w,S||w),_.flags&8208&&(o.callSignatures=$D(_)),_.flags&32){const B=W_(_);let K=_.members?$D(_.members.get("__constructor")):w;_.flags&16&&(K=Sr(K.slice(),es(o.callSignatures,ne=>dy(ne.declaration)?_b(ne.declaration,ne.typeParameters,ne.thisParameter,ne.parameters,B,void 0,ne.minArgumentCount,ne.flags&167):void 0))),K.length||(K=PGt(B)),o.constructSignatures=K}}function HGt(o,_,y){return io(o,cp([_.indexType,_.objectType],[v0(0),rv([y])]))}function jGt(o){const _=Tm(o.mappedType);if(!(_.flags&1048576||_.flags&2097152))return;const y=_.flags&1048576?_.origin:_;if(!y||!(y.flags&2097152))return;const S=Wa(y.types.filter(D=>D!==o.constraintType));return S!==Ai?S:void 0}function zGt(o){const _=pb(o.source,st),y=tv(o.mappedType),S=!(y&1),D=y&4?0:16777216,L=_?[nv(st,Ome(_.type,o.mappedType,o.constraintType)||te,S&&_.isReadonly)]:w,B=_a(),K=jGt(o);for(const ne of Ac(o.source)){if(K){const je=$A(ne,8576);if(!Da(je,K))continue}const ce=8192|(S&&d1(ne)?8:0),ge=$a(4|ne.flags&D,ne.escapedName,ce);if(ge.declarations=ne.declarations,ge.links.nameType=Ys(ne).nameType,ge.links.propertyType=Yn(ne),o.constraintType.type.flags&8388608&&o.constraintType.type.objectType.flags&262144&&o.constraintType.type.indexType.flags&262144){const je=o.constraintType.type.objectType,Be=HGt(o.mappedType,o.constraintType.type,je);ge.links.mappedType=Be,ge.links.constraintType=oy(je)}else ge.links.mappedType=o.mappedType,ge.links.constraintType=o.constraintType;B.set(ne.escapedName,ge)}co(o,B,w,w,L)}function iee(o){if(o.flags&4194304){const _=Kh(o.type);return Qx(_)?upt(_):oy(_)}if(o.flags&16777216){if(o.root.isDistributive){const _=o.checkType,y=iee(_);if(y!==_)return v8e(o,NN(o.root.checkType,y,o.mapper),!1)}return o}if(o.flags&1048576)return eu(o,iee,!0);if(o.flags&2097152){const _=o.types;return _.length===2&&_[0].flags&76&&_[1]===go?o:Wa(Wr(o.types,iee))}return o}function bRe(o){return Iu(o)&4096}function CRe(o,_,y,S){for(const D of Ac(o))S($A(D,_));if(o.flags&1)S(st);else for(const D of Ih(o))(!y||D.keyType.flags&134217732)&&S(D.keyType)}function UGt(o){const _=_a();let y;co(o,X,w,w,w);const S=s1(o),D=Tm(o),L=o.target||o,B=KS(L),K=nee(L)!==2,ne=SC(L),ce=Kh(zD(o)),ge=tv(o);FO(o)?CRe(ce,8576,!1,Be):RN(iee(D),Be),co(o,_,w,w,y||w);function Be(Vt){const Kt=B?io(B,Mz(o.mapper,S,Vt)):Vt;RN(Kt,Oi=>kt(Vt,Oi))}function kt(Vt,Kt){if(Jm(Kt)){const Oi=Gm(Kt),Ki=_.get(Oi);if(Ki)Ki.links.nameType=is([Ki.links.nameType,Kt]),Ki.links.keyType=is([Ki.links.keyType,Vt]);else{const qn=Jm(Vt)?Ta(ce,Gm(Vt)):void 0,Qn=!!(ge&4||!(ge&8)&&qn&&qn.flags&16777216),rn=!!(ge&1||!(ge&2)&&qn&&d1(qn)),Ui=we&&!Qn&&qn&&qn.flags&16777216,fr=qn?bRe(qn):0,Gr=$a(4|(Qn?16777216:0),Oi,fr|262144|(rn?8:0)|(Ui?524288:0));Gr.links.mappedType=o,Gr.links.nameType=Kt,Gr.links.keyType=Vt,qn&&(Gr.links.syntheticOrigin=qn,Gr.declarations=K?qn.declarations:void 0),_.set(Oi,Gr)}}else if(eme(Kt)||Kt.flags&33){const Oi=Kt.flags&5?st:Kt.flags&40?hi:Kt,Ki=io(ne,Mz(o.mapper,S,Vt)),qn=Ez(ce,Kt),Qn=!!(ge&1||!(ge&2)&&(qn!=null&&qn.isReadonly)),rn=nv(Oi,Ki,Qn);y=p_t(y,rn,!0)}}}function qGt(o){var _;if(!o.links.type){const y=o.links.mappedType;if(!Qy(o,0))return y.containsError=!0,vt;const S=SC(y.target||y),D=Mz(y.mapper,s1(y),o.links.keyType),L=io(S,D);let B=we&&o.flags&16777216&&!Au(L,49152)?Zx(L,!0):o.links.checkFlags&524288?Ime(L):L;Zy()||(ft(H,k.Type_of_property_0_circularly_references_itself_in_mapped_type_1,eo(o),Hn(y)),B=vt),(_=o.links).type??(_.type=B)}return o.links.type}function s1(o){return o.typeParameter||(o.typeParameter=jD(xr(o.declaration.typeParameter)))}function Tm(o){return o.constraintType||(o.constraintType=m_(s1(o))||vt)}function KS(o){return o.declaration.nameType?o.nameType||(o.nameType=io(Bs(o.declaration.nameType),o.mapper)):void 0}function SC(o){return o.templateType||(o.templateType=o.declaration.type?io(Dd(Bs(o.declaration.type),!0,!!(tv(o)&4)),o.mapper):vt)}function m_t(o){return R6(o.declaration.typeParameter)}function FO(o){const _=m_t(o);return _.kind===198&&_.operator===143}function zD(o){if(!o.modifiersType)if(FO(o))o.modifiersType=io(Bs(m_t(o).type),o.mapper);else{const _=c8e(o.declaration),y=Tm(_),S=y&&y.flags&262144?m_(y):y;o.modifiersType=S&&S.flags&4194304?io(S.type,o.mapper):te}return o.modifiersType}function tv(o){const _=o.declaration;return(_.readonlyToken?_.readonlyToken.kind===41?2:1:0)|(_.questionToken?_.questionToken.kind===41?8:4:0)}function g_t(o){const _=tv(o);return _&8?-1:_&4?1:0}function V5(o){if(Or(o)&32)return g_t(o)||V5(zD(o));if(o.flags&2097152){const _=V5(o.types[0]);return Ce(o.types,(y,S)=>S===0||V5(y)===_)?_:0}return 0}function $Gt(o){return!!(Or(o)&32&&tv(o)&4)}function op(o){if(Or(o)&32){const _=Tm(o);if(IN(_))return!0;const y=KS(o);if(y&&IN(io(y,QD(s1(o),_))))return!0}return!1}function nee(o){const _=KS(o);return _?Da(_,s1(o))?1:2:0}function o1(o){return o.members||(o.flags&524288?o.objectFlags&4?IGt(o):o.objectFlags&3?EGt(o):o.objectFlags&1024?zGt(o):o.objectFlags&16?VGt(o):o.objectFlags&32?UGt(o):j.fail("Unhandled object type "+j.formatObjectFlags(o.objectFlags)):o.flags&1048576?FGt(o):o.flags&2097152?WGt(o):j.fail("Unhandled type "+j.formatTypeFlags(o.flags))),o}function XS(o){return o.flags&524288?o1(o).properties:w}function UD(o,_){if(o.flags&524288){const S=o1(o).members.get(_);if(S&&Fp(S))return S}}function ree(o){if(!o.resolvedProperties){const _=_a();for(const y of o.types){for(const S of Ac(y))if(!_.has(S.escapedName)){const D=oee(o,S.escapedName,!!(o.flags&2097152));D&&_.set(S.escapedName,D)}if(o.flags&1048576&&Ih(y).length===0)break}o.resolvedProperties=gs(_)}return o.resolvedProperties}function Ac(o){return o=H5(o),o.flags&3145728?ree(o):XS(o)}function JGt(o,_){o=H5(o),o.flags&3670016&&o1(o).members.forEach((y,S)=>{ao(y,S)&&_(y,S)})}function GGt(o,_){return _.properties.some(S=>{const D=S.name&&(j0(S.name)?V_(iH(S.name)):xC(S.name)),L=D&&Jm(D)?Gm(D):void 0,B=L===void 0?void 0:Yu(o,L);return!!B&&Hz(B)&&!Da(o4(S),B)})}function KGt(o){const _=is(o);if(!(_.flags&1048576))return M5e(_);const y=_a();for(const S of o)for(const{escapedName:D}of M5e(S))if(!y.has(D)){const L=x_t(_,D);L&&y.set(D,L)}return as(y.values())}function wN(o){return o.flags&262144?m_(o):o.flags&8388608?QGt(o):o.flags&16777216?b_t(o):Jf(o)}function m_(o){return see(o)?z5(o):void 0}function XGt(o,_){const y=Rz(o);return!!y&&xN(y,_)}function xN(o,_=0){var y;return _<5&&!!(o&&(o.flags&262144&&Ft((y=o.symbol)==null?void 0:y.declarations,S=>Zr(S,4096))||o.flags&3145728&&Ft(o.types,S=>xN(S,_))||o.flags&8388608&&xN(o.objectType,_+1)||o.flags&16777216&&xN(b_t(o),_+1)||o.flags&33554432&&xN(o.baseType,_)||Or(o)&32&&XGt(o,_)||Qx(o)&&ct(GD(o),(S,D)=>!!(o.target.elementFlags[D]&8)&&xN(S,_))>=0))}function QGt(o){return see(o)?ZGt(o):void 0}function SRe(o){const _=kC(o,!1);return _!==o?_:wN(o)}function ZGt(o){if(TRe(o))return cme(o.objectType,o.indexType);const _=SRe(o.indexType);if(_&&_!==o.indexType){const S=Gx(o.objectType,_,o.accessFlags);if(S)return S}const y=SRe(o.objectType);if(y&&y!==o.objectType)return Gx(y,o.indexType,o.accessFlags)}function wRe(o){if(!o.resolvedDefaultConstraint){const _=WXt(o),y=U2(o);o.resolvedDefaultConstraint=Nc(_)?y:Nc(y)?_:is([_,y])}return o.resolvedDefaultConstraint}function y_t(o){if(o.resolvedConstraintOfDistributive!==void 0)return o.resolvedConstraintOfDistributive||void 0;if(o.root.isDistributive&&o.restrictiveInstantiation!==o){const _=kC(o.checkType,!1),y=_===o.checkType?wN(_):_;if(y&&y!==o.checkType){const S=v8e(o,NN(o.root.checkType,y,o.mapper),!0);if(!(S.flags&131072))return o.resolvedConstraintOfDistributive=S,S}}o.resolvedConstraintOfDistributive=!1}function v_t(o){return y_t(o)||wRe(o)}function b_t(o){return see(o)?v_t(o):void 0}function YGt(o,_){let y,S=!1;for(const D of o)if(D.flags&465829888){let L=wN(D);for(;L&&L.flags&21233664;)L=wN(L);L&&(y=fn(y,L),_&&(y=fn(y,D)))}else(D.flags&469892092||sv(D))&&(S=!0);if(y&&(_||S)){if(S)for(const D of o)(D.flags&469892092||sv(D))&&(y=fn(y,D));return kee(Wa(y,2),!1)}}function Jf(o){if(o.flags&464781312||Qx(o)){const _=xRe(o);return _!==ki&&_!==Gc?_:void 0}return o.flags&4194304?vi:void 0}function iv(o){return Jf(o)||o}function see(o){return xRe(o)!==Gc}function xRe(o){if(o.resolvedBaseConstraint)return o.resolvedBaseConstraint;const _=[];return o.resolvedBaseConstraint=y(o);function y(L){if(!L.immediateBaseConstraint){if(!Qy(L,4))return Gc;let B;const K=wme(L);if((_.length<10||_.length<50&&!Yt(_,K))&&(_.push(K),B=D(kC(L,!1)),_.pop()),!Zy()){if(L.flags&262144){const ne=tme(L);if(ne){const ce=ft(ne,k.Type_parameter_0_has_a_circular_constraint,Hn(L));H&&!UT(ne,H)&&!UT(H,ne)&&da(ce,Kn(H,k.Circularity_originates_in_type_at_this_location))}}B=Gc}L.immediateBaseConstraint??(L.immediateBaseConstraint=B||ki)}return L.immediateBaseConstraint}function S(L){const B=y(L);return B!==ki&&B!==Gc?B:void 0}function D(L){if(L.flags&262144){const B=z5(L);return L.isThisType||!B?B:S(B)}if(L.flags&3145728){const B=L.types,K=[];let ne=!1;for(const ce of B){const ge=S(ce);ge?(ge!==ce&&(ne=!0),K.push(ge)):ne=!0}return ne?L.flags&1048576&&K.length===B.length?is(K):L.flags&2097152&&K.length?Wa(K):void 0:L}if(L.flags&4194304)return vi;if(L.flags&134217728){const B=L.types,K=es(B,S);return K.length===B.length?TN(L.texts,K):st}if(L.flags&268435456){const B=S(L.type);return B&&B!==L.type?JA(L.symbol,B):st}if(L.flags&8388608){if(TRe(L))return S(cme(L.objectType,L.indexType));const B=S(L.objectType),K=S(L.indexType),ne=B&&K&&Gx(B,K,L.accessFlags);return ne&&S(ne)}if(L.flags&16777216){const B=v_t(L);return B&&S(B)}if(L.flags&33554432)return S(zRe(L));if(Qx(L)){const B=qt(GD(L),(K,ne)=>{const ce=K.flags&262144&&L.target.elementFlags[ne]&8&&S(K)||K;return ce!==K&&up(ce,ge=>$2(ge)&&!Qx(ge))?ce:K});return rv(B,L.target.elementFlags,L.target.readonly,L.target.labeledElementDeclarations)}return L}}function eKt(o,_){if(o===_)return o.resolvedApparentType||(o.resolvedApparentType=Wp(o,_,!0));const y=`I${kf(o)},${kf(_)}`;return Q0(y)??RS(y,Wp(o,_,!0))}function kRe(o){if(o.default)o.default===uh&&(o.default=Gc);else if(o.target){const _=kRe(o.target);o.default=_?io(_,o.mapper):ki}else{o.default=uh;const _=o.symbol&&O(o.symbol.declarations,S=>$l(S)&&S.default),y=_?Bs(_):ki;o.default===uh&&(o.default=y)}return o.default}function qD(o){const _=kRe(o);return _!==ki&&_!==Gc?_:void 0}function tKt(o){return kRe(o)!==Gc}function C_t(o){return!!(o.symbol&&O(o.symbol.declarations,_=>$l(_)&&_.default))}function S_t(o){return o.resolvedApparentType||(o.resolvedApparentType=iKt(o))}function iKt(o){const _=o.target??o,y=Rz(_);if(y&&!_.declaration.nameType){const S=zD(o),D=op(S)?S_t(S):Jf(S);if(D&&up(D,L=>$2(L)||w_t(L)))return io(_,NN(y,D,o.mapper))}return o}function w_t(o){return!!(o.flags&2097152)&&Ce(o.types,$2)}function TRe(o){let _;return!!(o.flags&8388608&&Or(_=o.objectType)&32&&!op(_)&&IN(o.indexType)&&!(tv(_)&8)&&!_.declaration.nameType)}function Kh(o){const _=o.flags&465829888?Jf(o)||te:o,y=Or(_);return y&32?S_t(_):y&4&&_!==o?Wp(_,o):_.flags&2097152?eKt(_,o):_.flags&402653316?po:_.flags&296?ic:_.flags&2112?zKt():_.flags&528?sc:_.flags&12288?Y_t():_.flags&67108864?Jo:_.flags&4194304?vi:_.flags&2&&!we?Jo:_}function H5(o){return a1(Kh(a1(o)))}function x_t(o,_,y){var S,D,L;let B,K,ne;const ce=o.flags&1048576;let ge,je=4,Be=ce?0:8,kt=!1;for(const Gr of o.types){const vs=Kh(Gr);if(!(fe(vs)||vs.flags&131072)){const Ur=Ta(vs,_,y),ga=Ur?$m(Ur):0;if(Ur){if(Ur.flags&106500&&(ge??(ge=ce?0:16777216),ce?ge|=Ur.flags&16777216:ge&=Ur.flags),!B)B=Ur;else if(Ur!==B)if((eM(Ur)||Ur)===(eM(B)||B)&&N8e(B,Ur,(Al,Po)=>Al===Po?-1:0)===-1)kt=!!B.parent&&!!P(y0(B.parent));else{K||(K=new Map,K.set(Ba(B),B));const Al=Ba(Ur);K.has(Al)||K.set(Al,Ur)}ce&&d1(Ur)?Be|=8:!ce&&!d1(Ur)&&(Be&=-9),Be|=(ga&6?0:256)|(ga&4?512:0)|(ga&2?1024:0)|(ga&256?2048:0),T7e(Ur)||(je=2)}else if(ce){const fa=!Tz(_)&&UA(vs,_);fa?(Be|=32|(fa.isReadonly?8:0),ne=fn(ne,Qa(vs)?Tme(vs)||tt:fa.type)):ew(vs)&&!(Or(vs)&2097152)?(Be|=32,ne=fn(ne,tt)):Be|=16}}}if(!B||ce&&(K||Be&48)&&Be&1536&&!(K&&nKt(K.values())))return;if(!K&&!(Be&16)&&!ne)if(kt){const Gr=(S=Jr(B,Rv))==null?void 0:S.links,vs=PN(B,Gr==null?void 0:Gr.type);return vs.parent=(L=(D=B.valueDeclaration)==null?void 0:D.symbol)==null?void 0:L.parent,vs.links.containingType=o,vs.links.mapper=Gr==null?void 0:Gr.mapper,vs.links.writeType=zx(B),vs}else return B;const Vt=K?as(K.values()):[B];let Kt,Oi,Ki;const qn=[];let Qn,rn,Ui=!1;for(const Gr of Vt){rn?Gr.valueDeclaration&&Gr.valueDeclaration!==rn&&(Ui=!0):rn=Gr.valueDeclaration,Kt=Sr(Kt,Gr.declarations);const vs=Yn(Gr);Oi||(Oi=vs,Ki=Ys(Gr).nameType);const Ur=zx(Gr);(Qn||Ur!==vs)&&(Qn=fn(Qn||qn.slice(),Ur)),vs!==Oi&&(Be|=64),(Hz(vs)||DN(vs))&&(Be|=128),vs.flags&131072&&vs!==Gu&&(Be|=131072),qn.push(vs)}Sr(qn,ne);const fr=$a(4|(ge??0),_,je|Be);return fr.links.containingType=o,!Ui&&rn&&(fr.valueDeclaration=rn,rn.symbol.parent&&(fr.parent=rn.symbol.parent)),fr.declarations=Kt,fr.links.nameType=Ki,qn.length>2?(fr.links.checkFlags|=65536,fr.links.deferralParent=o,fr.links.deferralConstituents=qn,fr.links.deferralWriteConstituents=Qn):(fr.links.type=ce?is(qn):Wa(qn),Qn&&(fr.links.writeType=ce?is(Qn):Wa(Qn))),fr}function k_t(o,_,y){var S,D,L;let B=y?(S=o.propertyCacheWithoutObjectFunctionPropertyAugment)==null?void 0:S.get(_):(D=o.propertyCache)==null?void 0:D.get(_);return B||(B=x_t(o,_,y),B&&((y?o.propertyCacheWithoutObjectFunctionPropertyAugment||(o.propertyCacheWithoutObjectFunctionPropertyAugment=_a()):o.propertyCache||(o.propertyCache=_a())).set(_,B),y&&!(Iu(B)&48)&&!((L=o.propertyCache)!=null&&L.get(_))&&(o.propertyCache||(o.propertyCache=_a())).set(_,B))),B}function nKt(o){let _;for(const y of o){if(!y.declarations)return;if(!_){_=new Set(y.declarations);continue}if(_.forEach(S=>{Yt(y.declarations,S)||_.delete(S)}),_.size===0)return}return _}function oee(o,_,y){const S=k_t(o,_,y);return S&&!(Iu(S)&16)?S:void 0}function a1(o){return o.flags&1048576&&o.objectFlags&16777216?o.resolvedReducedType||(o.resolvedReducedType=rKt(o)):o.flags&2097152?(o.objectFlags&16777216||(o.objectFlags|=16777216|(Ft(ree(o),sKt)?33554432:0)),o.objectFlags&33554432?Ai:o):o}function rKt(o){const _=Wr(o.types,a1);if(_===o.types)return o;const y=is(_);return y.flags&1048576&&(y.resolvedReducedType=y),y}function sKt(o){return T_t(o)||D_t(o)}function T_t(o){return!(o.flags&16777216)&&(Iu(o)&131264)===192&&!!(Yn(o).flags&131072)}function D_t(o){return!o.valueDeclaration&&!!(Iu(o)&1024)}function DRe(o){return!!(o.flags&1048576&&o.objectFlags&16777216&&Ft(o.types,DRe)||o.flags&2097152&&oKt(o))}function oKt(o){const _=o.uniqueLiteralFilledInstantiation||(o.uniqueLiteralFilledInstantiation=io(o,Zc));return a1(_)!==_}function ERe(o,_){if(_.flags&2097152&&Or(_)&33554432){const y=Fe(ree(_),T_t);if(y)return jo(o,k.The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents,Hn(_,void 0,536870912),eo(y));const S=Fe(ree(_),D_t);if(S)return jo(o,k.The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some,Hn(_,void 0,536870912),eo(S))}return o}function Ta(o,_,y,S){var D,L;if(o=H5(o),o.flags&524288){const B=o1(o),K=B.members.get(_);if(K&&!S&&((D=o.symbol)==null?void 0:D.flags)&512&&((L=Ys(o.symbol).typeOnlyExportStarMap)!=null&&L.has(_)))return;if(K&&Fp(K,S))return K;if(y)return;const ne=B===tc?kd:B.callSignatures.length?eg:B.constructSignatures.length?Ye:void 0;if(ne){const ce=UD(ne,_);if(ce)return ce}return UD(Qu,_)}if(o.flags&2097152){const B=oee(o,_,!0);return B||(y?void 0:oee(o,_,y))}if(o.flags&1048576)return oee(o,_,y)}function aee(o,_){if(o.flags&3670016){const y=o1(o);return _===0?y.callSignatures:y.constructSignatures}return w}function ia(o,_){const y=aee(H5(o),_);if(_===0&&!P(y)&&o.flags&1048576){if(o.arrayFallbackSignatures)return o.arrayFallbackSignatures;let S;if(up(o,D=>{var L;return!!((L=D.symbol)!=null&&L.parent)&&aKt(D.symbol.parent)&&(S?S===D.symbol.escapedName:(S=D.symbol.escapedName,!0))})){const D=eu(o,B=>ZS((E_t(B.symbol.parent)?En:li).typeParameters[0],B.mapper)),L=hh(D,dg(o,B=>E_t(B.symbol.parent)));return o.arrayFallbackSignatures=ia(Yu(L,S),_)}o.arrayFallbackSignatures=y}return y}function aKt(o){return!o||!li.symbol||!En.symbol?!1:!!Gg(o,li.symbol)||!!Gg(o,En.symbol)}function E_t(o){return!o||!En.symbol?!1:!!Gg(o,En.symbol)}function IRe(o,_){return Fe(o,y=>y.keyType===_)}function NRe(o,_){let y,S,D;for(const L of o)L.keyType===st?y=L:zA(_,L.keyType)&&(S?(D||(D=[S])).push(L):S=L);return D?nv(te,Wa(qt(D,L=>L.type)),oi(D,(L,B)=>L&&B.isReadonly,!0)):S||(y&&zA(_,st)?y:void 0)}function zA(o,_){return Da(o,_)||_===st&&Da(o,hi)||_===hi&&(o===$o||!!(o.flags&128)&&$v(o.value))}function LRe(o){return o.flags&3670016?o1(o).indexInfos:w}function Ih(o){return LRe(H5(o))}function pb(o,_){return IRe(Ih(o),_)}function H2(o,_){var y;return(y=pb(o,_))==null?void 0:y.type}function PRe(o,_){return Ih(o).filter(y=>zA(_,y.keyType))}function Ez(o,_){return NRe(Ih(o),_)}function UA(o,_){return Ez(o,Tz(_)?wi:V_(Ws(_)))}function I_t(o){var _;let y;for(const S of Jw(o))y=n_(y,jD(S.symbol));return y!=null&&y.length?y:Wu(o)?(_=j5(o))==null?void 0:_.typeParameters:void 0}function ARe(o){const _=[];return o.forEach((y,S)=>{Wi(S)||_.push(y)}),_}function N_t(o,_){if(Gd(o))return;const y=ff($e,'"'+o+'"',512);return y&&_?wc(y):y}function ORe(o){return _P(o)||tH(o)||$s(o)&&nX(o)}function cee(o){if(ORe(o))return!0;if(!$s(o))return!1;if(o.initializer){const y=Dm(o.parent),S=o.parent.parameters.indexOf(o);return j.assert(S>=0),S>=fy(y,3)}const _=VT(o.parent);return _?!o.type&&!o.dotDotDotToken&&o.parent.parameters.indexOf(o)>=age(_).length:!1}function cKt(o){return Lo(o)&&!O1(o)&&o.questionToken}function Iz(o,_,y,S){return{kind:o,parameterName:_,parameterIndex:y,type:S}}function sy(o){let _=0;if(o)for(let y=0;y<o.length;y++)C_t(o[y])||(_=y+1);return _}function $x(o,_,y,S){const D=P(_);if(!D)return[];const L=P(o);if(S||L>=y&&L<=D){const B=o?o.slice():[];for(let ne=L;ne<D;ne++)B[ne]=vt;const K=K8e(S);for(let ne=L;ne<D;ne++){let ce=qD(_[ne]);S&&ce&&(yb(ce,te)||yb(ce,Jo))&&(ce=Je),B[ne]=ce?io(ce,cp(_,B)):K}return B.length=_.length,B}return o&&o.slice()}function Dm(o){const _=yr(o);if(!_.resolvedSignature){const y=[];let S=0,D=0,L,B=nr(o)?cG(o):void 0,K=!1;const ne=VT(o),ce=e3(o);!ne&&nr(o)&&mP(o)&&!f2e(o)&&!Bk(o)&&(S|=32);for(let Vt=ce?1:0;Vt<o.parameters.length;Vt++){const Kt=o.parameters[Vt];if(nr(Kt)&&Tle(Kt)){B=Kt;continue}let Oi=Kt.symbol;const Ki=Qm(Kt)?Kt.typeExpression&&Kt.typeExpression.type:Kt.type;Oi&&Oi.flags&4&&!ta(Kt.name)&&(Oi=_i(Kt,Oi.escapedName,111551,void 0,!1)),Vt===0&&Oi.escapedName==="this"?(K=!0,L=Kt.symbol):y.push(Oi),Ki&&Ki.kind===201&&(S|=2),ORe(Kt)||$s(Kt)&&Kt.initializer||Oy(Kt)||ne&&y.length>ne.arguments.length&&!Ki||(D=y.length)}if((o.kind===177||o.kind===178)&&RO(o)&&(!K||!L)){const Vt=o.kind===177?178:177,Kt=ql(xr(o),Vt);Kt&&(L=fRe(Kt))}B&&B.typeExpression&&(L=PN($a(1,"this"),Bs(B.typeExpression)));const je=tC(o)?Gk(o):o,Be=je&&iu(je)?W_(wc(je.parent.symbol)):void 0,kt=Be?Be.localTypeParameters:I_t(o);(uae(o)||nr(o)&&lKt(o,y))&&(S|=1),(v3(o)&&Zr(o,64)||iu(o)&&Zr(o.parent,64))&&(S|=4),_.resolvedSignature=_b(o,kt,L,y,void 0,void 0,D,S)}return _.resolvedSignature}function lKt(o,_){if(tC(o)||!MRe(o))return!1;const y=rl(o.parameters),S=y?M6(y):Wk(o).filter(Qm),D=J(S,B=>B.typeExpression&&DX(B.typeExpression.type)?B.typeExpression.type:void 0),L=$a(3,"args",32768);return D?L.links.type=hh(Bs(D.type)):(L.links.checkFlags|=65536,L.links.deferralParent=Ai,L.links.deferralConstituents=[Yc],L.links.deferralWriteConstituents=[Yc]),D&&_.pop(),_.push(L),!0}function j5(o){if(!(nr(o)&&Qc(o)))return;const _=Fk(o);return(_==null?void 0:_.typeExpression)&&VN(Bs(_.typeExpression))}function uKt(o,_){const y=j5(o);if(!y)return;const S=o.parameters.indexOf(_);return _.dotDotDotToken?ste(y,S):u1(y,S)}function dKt(o){const _=j5(o);return _&&Oc(_)}function MRe(o){const _=yr(o);return _.containsArgumentsReference===void 0&&(_.flags&512?_.containsArgumentsReference=!0:_.containsArgumentsReference=y(o.body)),_.containsArgumentsReference;function y(S){if(!S)return!1;switch(S.kind){case 80:return S.escapedText===ut.escapedName&&pU(S)===ut;case 172:case 174:case 177:case 178:return S.name.kind===167&&y(S.name);case 211:case 212:return y(S.expression);case 303:return y(S.initializer);default:return!ece(S)&&!N1(S)&&!!Uo(S,y)}}}function $D(o){if(!o||!o.declarations)return w;const _=[];for(let y=0;y<o.declarations.length;y++){const S=o.declarations[y];if(Ho(S)){if(y>0&&S.body){const D=o.declarations[y-1];if(S.parent===D.parent&&S.kind===D.kind&&S.pos===D.end)continue}if(nr(S)&&S.jsDoc){const D=Uae(S);if(P(D)){for(const L of D){const B=L.typeExpression;B.type===void 0&&!iu(S)&&G2(B,Je),_.push(Dm(B))}continue}}_.push(!lx(S)&&!Ig(S)&&j5(S)||Dm(S))}}return _}function L_t(o){const _=B_(o,o);if(_){const y=sp(_);if(y)return Yn(y)}return Je}function j2(o){if(o.thisParameter)return Yn(o.thisParameter)}function cg(o){if(!o.resolvedTypePredicate){if(o.target){const _=cg(o.target);o.resolvedTypePredicate=_?YXt(_,o.mapper):Lt}else if(o.compositeSignatures)o.resolvedTypePredicate=_Xt(o.compositeSignatures,o.compositeKind)||Lt;else{const _=o.declaration&&wp(o.declaration);let y;if(!_){const S=j5(o.declaration);S&&o!==S&&(y=cg(S))}if(_||y)o.resolvedTypePredicate=_&&HP(_)?fKt(_,o):y||Lt;else if(o.declaration&&Qc(o.declaration)&&(!o.resolvedReturnType||o.resolvedReturnType.flags&16)&&dp(o)>0){const{declaration:S}=o;o.resolvedTypePredicate=Lt,o.resolvedTypePredicate=Kti(S)||Lt}else o.resolvedTypePredicate=Lt}j.assert(!!o.resolvedTypePredicate)}return o.resolvedTypePredicate===Lt?void 0:o.resolvedTypePredicate}function fKt(o,_){const y=o.parameterName,S=o.type&&Bs(o.type);return y.kind===197?Iz(o.assertsModifier?2:0,void 0,void 0,S):Iz(o.assertsModifier?3:1,y.escapedText,ct(_.parameters,D=>D.escapedName===y.escapedText),S)}function P_t(o,_,y){return _!==2097152?is(o,y):Wa(o)}function Oc(o){if(!o.resolvedReturnType){if(!Qy(o,3))return vt;let _=o.target?io(Oc(o.target),o.mapper):o.compositeSignatures?io(P_t(qt(o.compositeSignatures,Oc),o.compositeKind,2),o.mapper):BO(o.declaration)||(lu(o.declaration.body)?Je:dge(o.declaration));if(o.flags&8?_=gmt(_):o.flags&16&&(_=Zx(_)),!Zy()){if(o.declaration){const y=wp(o.declaration);if(y)ft(y,k.Return_type_annotation_circularly_references_itself);else if(De){const S=o.declaration,D=No(S);D?ft(D,k._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,al(D)):ft(S,k.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions)}}_=Je}o.resolvedReturnType??(o.resolvedReturnType=_)}return o.resolvedReturnType}function BO(o){if(o.kind===176)return W_(wc(o.parent.symbol));const _=wp(o);if(tC(o)){const y=t3(o);if(y&&iu(y.parent)&&!_)return W_(wc(y.parent.parent.symbol))}if(e3(o))return Bs(o.parameters[0].type);if(_)return Bs(_);if(o.kind===177&&RO(o)){const y=nr(o)&&Jc(o);if(y)return y;const S=ql(xr(o),178),D=B5(S);if(D)return D}return dKt(o)}function Qpe(o){return o.compositeSignatures&&Ft(o.compositeSignatures,Qpe)||!o.resolvedReturnType&&Hx(o,3)>=0}function hKt(o){return A_t(o)||Je}function A_t(o){if(Ch(o)){const _=Yn(o.parameters[o.parameters.length-1]),y=Qa(_)?Tme(_):_;return y&&H2(y,hi)}}function Nz(o,_,y,S){const D=RRe(o,$x(_,o.typeParameters,sy(o.typeParameters),y));if(S){const L=n0t(Oc(D));if(L){const B=Dz(L);B.typeParameters=S;const K=Dz(D);return K.resolvedReturnType=kN(B),K}}return D}function RRe(o,_){const y=o.instantiations||(o.instantiations=new Map),S=Xg(_);let D=y.get(S);return D||y.set(S,D=Zpe(o,_)),D}function Zpe(o,_){return QA(o,_Kt(o,_),!0)}function O_t(o){return Wr(o.typeParameters,_=>_.mapper?io(_,_.mapper):_)}function _Kt(o,_){return cp(O_t(o),_)}function Lz(o){return o.typeParameters?o.erasedSignatureCache||(o.erasedSignatureCache=pKt(o)):o}function pKt(o){return QA(o,Vpt(o.typeParameters),!0)}function mKt(o){return o.typeParameters?o.canonicalSignatureCache||(o.canonicalSignatureCache=gKt(o)):o}function gKt(o){return Nz(o,qt(o.typeParameters,_=>_.target&&!m_(_.target)?_.target:_),nr(o.declaration))}function yKt(o){return o.typeParameters?o.implementationSignatureCache||(o.implementationSignatureCache=vKt(o)):o}function vKt(o){return o.typeParameters?QA(o,cp([],[])):o}function bKt(o){const _=o.typeParameters;if(_){if(o.baseSignatureCache)return o.baseSignatureCache;const y=Vpt(_),S=cp(_,qt(_,L=>m_(L)||te));let D=qt(_,L=>io(L,S)||te);for(let L=0;L<_.length-1;L++)D=gb(D,S);return D=gb(D,y),o.baseSignatureCache=QA(o,cp(_,D),!0)}return o}function kN(o,_){var y;if(!o.isolatedSignatureType){const S=(y=o.declaration)==null?void 0:y.kind,D=S===void 0||S===176||S===180||S===185,L=V(134217744,$a(16,"__function"));o.declaration&&!cl(o.declaration)&&(L.symbol.declarations=[o.declaration],L.symbol.valueDeclaration=o.declaration),_||(_=o.declaration&&OO(o.declaration,!0)),L.outerTypeParameters=_,L.members=X,L.properties=w,L.callSignatures=D?w:[o],L.constructSignatures=D?[o]:w,L.indexInfos=w,o.isolatedSignatureType=L}return o.isolatedSignatureType}function FRe(o){return o.members?Ype(o.members):void 0}function Ype(o){return o.get("__index")}function nv(o,_,y,S){return{keyType:o,type:_,isReadonly:y,declaration:S}}function M_t(o){const _=FRe(o);return _?BRe(_):w}function BRe(o){if(o.declarations){const _=[];for(const y of o.declarations)if(y.parameters.length===1){const S=y.parameters[0];S.type&&RN(Bs(S.type),D=>{eme(D)&&!IRe(_,D)&&_.push(nv(D,y.type?Bs(y.type):Je,xp(y,8),y))})}return _}return w}function eme(o){return!!(o.flags&4108)||DN(o)||!!(o.flags&2097152)&&!GA(o)&&Ft(o.types,eme)}function tme(o){return es($t(o.symbol&&o.symbol.declarations,$l),R6)[0]}function R_t(o,_){var y;let S;if((y=o.symbol)!=null&&y.declarations){for(const D of o.symbol.declarations)if(D.parent.kind===195){const[L=D.parent,B]=BTe(D.parent.parent);if(B.kind===183&&!_){const K=B,ne=h5e(K);if(ne){const ce=K.typeArguments.indexOf(L);if(ce<ne.length){const ge=m_(ne[ce]);if(ge){const je=m8e(ne,ne.map((kt,Vt)=>()=>qii(K,ne,Vt))),Be=io(ge,je);Be!==o&&(S=fn(S,Be))}}}}else if(B.kind===169&&B.dotDotDotToken||B.kind===191||B.kind===202&&B.dotDotDotToken)S=fn(S,hh(te));else if(B.kind===204)S=fn(S,st);else if(B.kind===168&&B.parent.kind===200)S=fn(S,vi);else if(B.kind===200&&B.type&&Dc(B.type)===D.parent&&B.parent.kind===194&&B.parent.extendsType===B&&B.parent.checkType.kind===200&&B.parent.checkType.type){const K=B.parent.checkType,ne=Bs(K.type);S=fn(S,io(ne,QD(jD(xr(K.typeParameter)),K.typeParameter.constraint?Bs(K.typeParameter.constraint):vi)))}}}return S&&Wa(S)}function z5(o){if(!o.constraint)if(o.target){const _=m_(o.target);o.constraint=_?io(_,o.mapper):ki}else{const _=tme(o);if(!_)o.constraint=R_t(o)||ki;else{let y=Bs(_);y.flags&1&&!fe(y)&&(y=_.parent.parent.kind===200?vi:te),o.constraint=y}}return o.constraint===ki?void 0:o.constraint}function F_t(o){const _=ql(o.symbol,168),y=Rg(_.parent)?rK(_.parent):_.parent;return y&&p_(y)}function Xg(o){let _="";if(o){const y=o.length;let S=0;for(;S<y;){const D=o[S].id;let L=1;for(;S+L<y&&o[S+L].id===D+L;)L++;_.length&&(_+=","),_+=D,L>1&&(_+=":"+L),S+=L}}return _}function qA(o,_){return o?`@${Ba(o)}`+(_?`:${Xg(_)}`:""):""}function lee(o,_){let y=0;for(const S of o)(_===void 0||!(S.flags&_))&&(y|=Or(S));return y&458752}function WO(o,_){return Ft(_)&&o===oo?te:wC(o,_)}function wC(o,_){const y=Xg(_);let S=o.instantiations.get(y);return S||(S=V(4,o.symbol),o.instantiations.set(y,S),S.objectFlags|=_?lee(_):0,S.target=o,S.resolvedTypeArguments=_),S}function B_t(o){const _=Kg(o.flags,o.symbol);return _.objectFlags=o.objectFlags,_.target=o.target,_.resolvedTypeArguments=o.resolvedTypeArguments,_}function WRe(o,_,y,S,D){if(!S){S=KA(_);const B=zO(S);D=y?gb(B,y):B}const L=V(4,o.symbol);return L.target=o,L.node=_,L.mapper=y,L.aliasSymbol=S,L.aliasTypeArguments=D,L}function Pl(o){var _,y;if(!o.resolvedTypeArguments){if(!Qy(o,5))return Js(o.target.outerTypeParameters,(_=o.target.localTypeParameters)==null?void 0:_.map(()=>vt))||w;const S=o.node,D=S?S.kind===183?Js(o.target.outerTypeParameters,gge(S,o.target.localTypeParameters)):S.kind===188?[Bs(S.elementType)]:qt(S.elements,Bs):w;Zy()?o.resolvedTypeArguments??(o.resolvedTypeArguments=o.mapper?gb(D,o.mapper):D):(o.resolvedTypeArguments??(o.resolvedTypeArguments=Js(o.target.outerTypeParameters,((y=o.target.localTypeParameters)==null?void 0:y.map(()=>vt))||w)),ft(o.node||H,o.target.symbol?k.Type_arguments_for_0_circularly_reference_themselves:k.Tuple_type_arguments_circularly_reference_themselves,o.target.symbol&&eo(o.target.symbol)))}return o.resolvedTypeArguments}function QS(o){return P(o.target.typeParameters)}function W_t(o,_){const y=gl(wc(_)),S=y.localTypeParameters;if(S){const D=P(o.typeArguments),L=sy(S),B=nr(o);if(!(!De&&B)&&(D<L||D>S.length)){const ce=B&&Yb(o)&&!KP(o.parent),ge=L===S.length?ce?k.Expected_0_type_arguments_provide_these_with_an_extends_tag:k.Generic_type_0_requires_1_type_argument_s:ce?k.Expected_0_1_type_arguments_provide_these_with_an_extends_tag:k.Generic_type_0_requires_between_1_and_2_type_arguments,je=Hn(y,void 0,2);if(ft(o,ge,je,L,S.length),!B)return vt}if(o.kind===183&&cpt(o,P(o.typeArguments)!==S.length))return WRe(y,o,void 0);const ne=Js(y.outerTypeParameters,$x(dee(o),S,L,B));return wC(y,ne)}return JD(o,_)?y:vt}function VO(o,_,y,S){const D=gl(o);if(D===gr){const ce=Lue.get(o.escapedName);if(ce!==void 0&&_&&_.length===1)return ce===4?VRe(_[0]):JA(o,_[0])}const L=Ys(o),B=L.typeParameters,K=Xg(_)+qA(y,S);let ne=L.instantiations.get(K);return ne||L.instantiations.set(K,ne=zpt(D,cp(B,$x(_,B,sy(B),nr(o.valueDeclaration))),y,S)),ne}function CKt(o,_){if(Iu(_)&1048576){const D=dee(o),L=qA(_,D);let B=gt.get(L);return B||(B=Td(1,"error",void 0,`alias ${L}`),B.aliasSymbol=_,B.aliasTypeArguments=D,gt.set(L,B)),B}const y=gl(_),S=Ys(_).typeParameters;if(S){const D=P(o.typeArguments),L=sy(S);if(D<L||D>S.length)return ft(o,L===S.length?k.Generic_type_0_requires_1_type_argument_s:k.Generic_type_0_requires_between_1_and_2_type_arguments,eo(_),L,S.length),vt;const B=KA(o);let K=B&&(V_t(_)||!V_t(B))?B:void 0,ne;if(K)ne=zO(K);else if(xG(o)){const ce=U5(o,2097152,!0);if(ce&&ce!==pt){const ge=$f(ce);ge&&ge.flags&524288&&(K=ge,ne=dee(o)||(S?[]:void 0))}}return VO(_,dee(o),K,ne)}return JD(o,_)?y:vt}function V_t(o){var _;const y=(_=o.declarations)==null?void 0:_.find(SV);return!!(y&&Up(y))}function SKt(o){switch(o.kind){case 183:return o.typeName;case 233:const _=o.expression;if(pl(_))return _}}function H_t(o){return o.parent?`${H_t(o.parent)}.${o.escapedName}`:o.escapedName}function ime(o){const y=(o.kind===166?o.right:o.kind===211?o.name:o).escapedText;if(y){const S=o.kind===166?ime(o.left):o.kind===211?ime(o.expression):void 0,D=S?`${H_t(S)}.${y}`:y;let L=Ze.get(D);return L||(Ze.set(D,L=$a(524288,y,1048576)),L.parent=S,L.links.declaredType=Ni),L}return pt}function U5(o,_,y){const S=SKt(o);if(!S)return pt;const D=nu(S,_,y);return D&&D!==pt?D:y?pt:ime(S)}function nme(o,_){if(_===pt)return vt;if(_=hN(_)||_,_.flags&96)return W_t(o,_);if(_.flags&524288)return CKt(o,_);const y=i_t(_);if(y)return JD(o,_)?Xh(y):vt;if(_.flags&111551&&rme(o)){const S=wKt(o,_);return S||(U5(o,788968),Yn(_))}return vt}function wKt(o,_){const y=yr(o);if(!y.resolvedJSDocType){const S=Yn(_);let D=S;if(_.valueDeclaration){const L=o.kind===205&&o.qualifier;S.symbol&&S.symbol!==_&&L&&(D=nme(o,S.symbol))}y.resolvedJSDocType=D}return y.resolvedJSDocType}function VRe(o){return HRe(o)?j_t(o,te):o}function HRe(o){return!!(o.flags&3145728&&Ft(o.types,HRe)||o.flags&33554432&&!HO(o)&&HRe(o.baseType)||o.flags&524288&&!sv(o)||o.flags&432275456&&!DN(o))}function HO(o){return!!(o.flags&33554432&&o.constraint.flags&2)}function jRe(o,_){return _.flags&3||_===o||o.flags&1?o:j_t(o,_)}function j_t(o,_){const y=`${kf(o)}>${kf(_)}`,S=ma.get(y);if(S)return S;const D=t1(33554432);return D.baseType=o,D.constraint=_,ma.set(y,D),D}function zRe(o){return HO(o)?o.baseType:Wa([o.constraint,o.baseType])}function z_t(o){return o.kind===189&&o.elements.length===1}function U_t(o,_,y){return z_t(_)&&z_t(y)?U_t(o,_.elements[0],y.elements[0]):Kx(Bs(_))===Kx(o)?Bs(y):void 0}function xKt(o,_){let y,S=!0;for(;_&&!Ps(_)&&_.kind!==320;){const D=_.parent;if(D.kind===169&&(S=!S),(S||o.flags&8650752)&&D.kind===194&&_===D.trueType){const L=U_t(o,D.checkType,D.extendsType);L&&(y=fn(y,L))}else if(o.flags&262144&&D.kind===200&&!D.nameType&&_===D.type){const L=Bs(D);if(s1(L)===Kx(o)){const B=Rz(L);if(B){const K=m_(B);K&&up(K,$2)&&(y=fn(y,is([hi,$o])))}}}_=D}return y?jRe(o,Wa(y)):o}function rme(o){return!!(o.flags&16777216)&&(o.kind===183||o.kind===205)}function JD(o,_){return o.typeArguments?(ft(o,k.Type_0_is_not_generic,_?eo(_):o.typeName?al(o.typeName):Due),!1):!0}function q_t(o){if(ot(o.typeName)){const _=o.typeArguments;switch(o.typeName.escapedText){case"String":return JD(o),st;case"Number":return JD(o),hi;case"Boolean":return JD(o),fi;case"Void":return JD(o),Ri;case"Undefined":return JD(o),tt;case"Null":return JD(o),Qt;case"Function":case"function":return JD(o),kd;case"array":return(!_||!_.length)&&!De?Yc:void 0;case"promise":return(!_||!_.length)&&!De?ate(Je):void 0;case"Object":if(_&&_.length===2){if(eK(o)){const y=Bs(_[0]),S=Bs(_[1]),D=y===st||y===hi?[nv(y,S,!1)]:w;return Xs(void 0,X,w,w,D)}return Je}return JD(o),De?void 0:Je}}}function kKt(o){const _=Bs(o.type);return we?Lee(_,65536):_}function uee(o){const _=yr(o);if(!_.resolvedType){if(O0(o)&&Hk(o.parent))return _.resolvedSymbol=pt,_.resolvedType=ju(o.parent.expression);let y,S;const D=788968;rme(o)&&(S=q_t(o),S||(y=U5(o,D,!0),y===pt?y=U5(o,D|111551):U5(o,D),S=nme(o,y))),S||(y=U5(o,D),S=nme(o,y)),_.resolvedSymbol=y,_.resolvedType=S}return _.resolvedType}function dee(o){return qt(o.typeArguments,Bs)}function $_t(o){const _=yr(o);if(!_.resolvedType){const y=w0t(o);_.resolvedType=Xh(lp(y))}return _.resolvedType}function J_t(o,_){function y(D){const L=D.declarations;if(L)for(const B of L)switch(B.kind){case 263:case 264:case 266:return B}}if(!o)return _?oo:Jo;const S=gl(o);return S.flags&524288?P(S.typeParameters)!==_?(ft(y(o),k.Global_type_0_must_have_1_type_parameter_s,Eu(o),_),_?oo:Jo):S:(ft(y(o),k.Global_type_0_must_be_a_class_or_interface_type,Eu(o)),_?oo:Jo)}function URe(o,_){return jO(o,111551,_?k.Cannot_find_global_value_0:void 0)}function qRe(o,_){return jO(o,788968,_?k.Cannot_find_global_type_0:void 0)}function sme(o,_,y){const S=jO(o,788968,y?k.Cannot_find_global_type_0:void 0);if(S&&(gl(S),P(Ys(S).typeParameters)!==_)){const D=S.declarations&&Fe(S.declarations,Mg);ft(D,k.Global_type_0_must_have_1_type_parameter_s,Eu(S),_);return}return S}function jO(o,_,y){return _i(void 0,o,_,y,!1,!1)}function Su(o,_,y){const S=qRe(o,y);return S||y?J_t(S,_):void 0}function G_t(o,_){let y;for(const S of o)y=fn(y,Su(S,_,!1));return y??w}function TKt(){return ym||(ym=Su("TypedPropertyDescriptor",1,!0)||oo)}function DKt(){return Xe||(Xe=Su("TemplateStringsArray",0,!0)||Jo)}function K_t(){return Zt||(Zt=Su("ImportMeta",0,!0)||Jo)}function X_t(){if(!Nn){const o=$a(0,"ImportMetaExpression"),_=K_t(),y=$a(4,"meta",8);y.parent=o,y.links.type=_;const S=_a([y]);o.members=S,Nn=Xs(o,S,w,w,w)}return Nn}function Q_t(o){return Is||(Is=Su("ImportCallOptions",0,o))||Jo}function $Re(o){return Qo||(Qo=Su("ImportAttributes",0,o))||Jo}function Z_t(o){return Vg||(Vg=URe("Symbol",o))}function EKt(o){return Y_||(Y_=qRe("SymbolConstructor",o))}function Y_t(){return Jp||(Jp=Su("Symbol",0,!1))||Jo}function fee(o){return tg||(tg=Su("Promise",1,o))||oo}function ept(o){return Zv||(Zv=Su("PromiseLike",1,o))||oo}function JRe(o){return Hg||(Hg=URe("Promise",o))}function IKt(o){return F_||(F_=Su("PromiseConstructorLike",0,o))||Jo}function hee(o){return mi||(mi=Su("AsyncIterable",3,o))||oo}function NKt(o){return Ci||(Ci=Su("AsyncIterator",3,o))||oo}function tpt(o){return hn||(hn=Su("AsyncIterableIterator",3,o))||oo}function LKt(){return Lr??(Lr=G_t(["ReadableStreamAsyncIterator"],1))}function PKt(o){return ps||(ps=Su("AsyncIteratorObject",3,o))||oo}function AKt(o){return ee||(ee=Su("AsyncGenerator",3,o))||oo}function ome(o){return jd||(jd=Su("Iterable",3,o))||oo}function OKt(o){return lC||(lC=Su("Iterator",3,o))||oo}function ipt(o){return h_||(h_=Su("IterableIterator",3,o))||oo}function GRe(){return Te?tt:Je}function MKt(){return Wn??(Wn=G_t(["ArrayIterator","MapIterator","SetIterator","StringIterator"],1))}function RKt(o){return Yv||(Yv=Su("IteratorObject",3,o))||oo}function FKt(o){return vm||(vm=Su("Generator",3,o))||oo}function BKt(o){return ve||(ve=Su("IteratorYieldResult",1,o))||oo}function WKt(o){return Ot||(Ot=Su("IteratorReturnResult",1,o))||oo}function npt(o){return To||(To=Su("Disposable",0,o))||Jo}function VKt(o){return Zo||(Zo=Su("AsyncDisposable",0,o))||Jo}function rpt(o,_=0){const y=jO(o,788968,void 0);return y&&J_t(y,_)}function HKt(){return uc||(uc=sme("Extract",2,!0)||pt),uc===pt?void 0:uc}function jKt(){return Xa||(Xa=sme("Omit",2,!0)||pt),Xa===pt?void 0:Xa}function KRe(o){return Yl||(Yl=sme("Awaited",1,o)||(o?pt:void 0)),Yl===pt?void 0:Yl}function zKt(){return ig||(ig=Su("BigInt",0,!1))||Jo}function UKt(o){return eb??(eb=Su("ClassDecoratorContext",1,o))??oo}function qKt(o){return PS??(PS=Su("ClassMethodDecoratorContext",2,o))??oo}function $Kt(o){return tb??(tb=Su("ClassGetterDecoratorContext",2,o))??oo}function JKt(o){return ng??(ng=Su("ClassSetterDecoratorContext",2,o))??oo}function GKt(o){return rg??(rg=Su("ClassAccessorDecoratorContext",2,o))??oo}function KKt(o){return Vl??(Vl=Su("ClassAccessorDecoratorTarget",2,o))??oo}function XKt(o){return Gp??(Gp=Su("ClassAccessorDecoratorResult",2,o))??oo}function QKt(o){return ep??(ep=Su("ClassFieldDecoratorContext",2,o))??oo}function ZKt(){return h0||(h0=URe("NaN",!1))}function YKt(){return K0||(K0=sme("Record",2,!0)||pt),K0===pt?void 0:K0}function q5(o,_){return o!==oo?wC(o,_):Jo}function spt(o){return q5(TKt(),[o])}function opt(o){return q5(ome(!0),[o,Ri,tt])}function hh(o,_){return q5(_?En:li,[o])}function XRe(o){switch(o.kind){case 190:return 2;case 191:return apt(o);case 202:return o.questionToken?2:o.dotDotDotToken?apt(o):1;default:return 1}}function apt(o){return vee(o.type)?4:8}function eXt(o){const _=nXt(o.parent);if(vee(o))return _?En:li;const S=qt(o.elements,XRe);return QRe(S,_,qt(o.elements,tXt))}function tXt(o){return b3(o)||$s(o)?o:void 0}function cpt(o,_){return!!KA(o)||lpt(o)&&(o.kind===188?Jx(o.elementType):o.kind===189?Ft(o.elements,Jx):_||Ft(o.typeArguments,Jx))}function lpt(o){const _=o.parent;switch(_.kind){case 196:case 202:case 183:case 192:case 193:case 199:case 194:case 198:case 188:case 189:return lpt(_);case 265:return!0}return!1}function Jx(o){switch(o.kind){case 183:return rme(o)||!!(U5(o,788968).flags&524288);case 186:return!0;case 198:return o.operator!==158&&Jx(o.type);case 196:case 190:case 202:case 316:case 314:case 315:case 309:return Jx(o.type);case 191:return o.type.kind!==188||Jx(o.type.elementType);case 192:case 193:return Ft(o.types,Jx);case 199:return Jx(o.objectType)||Jx(o.indexType);case 194:return Jx(o.checkType)||Jx(o.extendsType)||Jx(o.trueType)||Jx(o.falseType)}return!1}function iXt(o){const _=yr(o);if(!_.resolvedType){const y=eXt(o);if(y===oo)_.resolvedType=Jo;else if(!(o.kind===189&&Ft(o.elements,S=>!!(XRe(S)&8)))&&cpt(o))_.resolvedType=o.kind===189&&o.elements.length===0?y:WRe(y,o,void 0);else{const S=o.kind===188?[Bs(o.elementType)]:qt(o.elements,Bs);_.resolvedType=ZRe(y,S)}}return _.resolvedType}function nXt(o){return t2(o)&&o.operator===148}function rv(o,_,y=!1,S=[]){const D=QRe(_||qt(o,L=>1),y,S);return D===oo?Jo:o.length?ZRe(D,o):D}function QRe(o,_,y){if(o.length===1&&o[0]&4)return _?En:li;const S=qt(o,L=>L&1?"#":L&2?"?":L&4?".":"*").join()+(_?"R":"")+(Ft(y,L=>!!L)?","+qt(y,L=>L?Sc(L):"_").join(","):"");let D=ls.get(S);return D||ls.set(S,D=rXt(o,_,y)),D}function rXt(o,_,y){const S=o.length,D=$i(o,je=>!!(je&9));let L;const B=[];let K=0;if(S){L=new Array(S);for(let je=0;je<S;je++){const Be=L[je]=Ut(),kt=o[je];if(K|=kt,!(K&12)){const Vt=$a(4|(kt&2?16777216:0),""+je,_?8:0);Vt.links.tupleLabelDeclaration=y==null?void 0:y[je],Vt.links.type=Be,B.push(Vt)}}}const ne=B.length,ce=$a(4,"length",_?8:0);if(K&12)ce.links.type=hi;else{const je=[];for(let Be=D;Be<=S;Be++)je.push(v0(Be));ce.links.type=is(je)}B.push(ce);const ge=V(12);return ge.typeParameters=L,ge.outerTypeParameters=void 0,ge.localTypeParameters=L,ge.instantiations=new Map,ge.instantiations.set(Xg(ge.typeParameters),ge),ge.target=ge,ge.resolvedTypeArguments=ge.typeParameters,ge.thisType=Ut(),ge.thisType.isThisType=!0,ge.thisType.constraint=ge,ge.declaredProperties=B,ge.declaredCallSignatures=w,ge.declaredConstructSignatures=w,ge.declaredIndexInfos=w,ge.elementFlags=o,ge.minLength=D,ge.fixedLength=ne,ge.hasRestElement=!!(K&12),ge.combinedFlags=K,ge.readonly=_,ge.labeledElementDeclarations=y,ge}function ZRe(o,_){return o.objectFlags&8?YRe(o,_):wC(o,_)}function YRe(o,_){var y,S,D,L;if(!(o.combinedFlags&14))return wC(o,_);if(o.combinedFlags&8){const Vt=ct(_,(Kt,Oi)=>!!(o.elementFlags[Oi]&8&&Kt.flags&1179648));if(Vt>=0)return pee(qt(_,(Kt,Oi)=>o.elementFlags[Oi]&8?Kt:te))?eu(_[Vt],Kt=>YRe(o,Fc(_,Vt,Kt))):vt}const B=[],K=[],ne=[];let ce=-1,ge=-1,je=-1;for(let Vt=0;Vt<_.length;Vt++){const Kt=_[Vt],Oi=o.elementFlags[Vt];if(Oi&8)if(Kt.flags&1)kt(Kt,4,(y=o.labeledElementDeclarations)==null?void 0:y[Vt]);else if(Kt.flags&58982400||op(Kt))kt(Kt,8,(S=o.labeledElementDeclarations)==null?void 0:S[Vt]);else if(Qa(Kt)){const Ki=GD(Kt);if(Ki.length+B.length>=1e4)return ft(H,N1(H)?k.Type_produces_a_tuple_type_that_is_too_large_to_represent:k.Expression_produces_a_tuple_type_that_is_too_large_to_represent),vt;O(Ki,(qn,Qn)=>{var rn;return kt(qn,Kt.target.elementFlags[Qn],(rn=Kt.target.labeledElementDeclarations)==null?void 0:rn[Qn])})}else kt(YS(Kt)&&H2(Kt,hi)||vt,4,(D=o.labeledElementDeclarations)==null?void 0:D[Vt]);else kt(Kt,Oi,(L=o.labeledElementDeclarations)==null?void 0:L[Vt])}for(let Vt=0;Vt<ce;Vt++)K[Vt]&2&&(K[Vt]=1);ge>=0&&ge<je&&(B[ge]=is(Wr(B.slice(ge,je+1),(Vt,Kt)=>K[ge+Kt]&8?ap(Vt,hi):Vt)),B.splice(ge+1,je-ge),K.splice(ge+1,je-ge),ne.splice(ge+1,je-ge));const Be=QRe(K,o.readonly,ne);return Be===oo?Jo:K.length?wC(Be,B):Be;function kt(Vt,Kt,Oi){Kt&1&&(ce=K.length),Kt&4&&ge<0&&(ge=K.length),Kt&6&&(je=K.length),B.push(Kt&2?Dd(Vt,!0):Vt),K.push(Kt),ne.push(Oi)}}function $5(o,_,y=0){const S=o.target,D=QS(o)-y;return _>S.fixedLength?UQt(o)||rv(w):rv(Pl(o).slice(_,D),S.elementFlags.slice(_,D),!1,S.labeledElementDeclarations&&S.labeledElementDeclarations.slice(_,D))}function upt(o){return is(fn(zc(o.target.fixedLength,_=>V_(""+_)),oy(o.target.readonly?En:li)))}function sXt(o,_){const y=ct(o.elementFlags,S=>!(S&_));return y>=0?y:o.elementFlags.length}function Pz(o,_){return o.elementFlags.length-Mt(o.elementFlags,y=>!(y&_))-1}function e8e(o){return o.fixedLength+Pz(o,3)}function GD(o){const _=Pl(o),y=QS(o);return _.length===y?_:_.slice(0,y)}function oXt(o){return Dd(Bs(o.type),!0)}function kf(o){return o.id}function mb(o,_){return Jt(o,_,kf,_l)>=0}function _ee(o,_){const y=Jt(o,_,kf,_l);return y<0?(o.splice(~y,0,_),!0):!1}function aXt(o,_,y){const S=y.flags;if(!(S&131072))if(_|=S&473694207,S&465829888&&(_|=33554432),S&2097152&&Or(y)&67108864&&(_|=536870912),y===Ct&&(_|=8388608),fe(y)&&(_|=1073741824),!we&&S&98304)Or(y)&65536||(_|=4194304);else{const D=o.length,L=D&&y.id>o[D-1].id?~D:Jt(o,y,kf,_l);L<0&&o.splice(~L,0,y)}return _}function dpt(o,_,y){let S;for(const D of y)D!==S&&(_=D.flags&1048576?dpt(o,_|(hXt(D)?1048576:0),D.types):aXt(o,_,D),S=D);return _}function cXt(o,_){var y;if(o.length<2)return o;const S=Xg(o),D=ka.get(S);if(D)return D;const L=_&&Ft(o,ce=>!!(ce.flags&524288)&&!op(ce)&&w8e(o1(ce))),B=o.length;let K=B,ne=0;for(;K>0;){K--;const ce=o[K];if(L||ce.flags&469499904){if(ce.flags&262144&&iv(ce).flags&1048576){ay(ce,is(qt(o,Be=>Be===ce?Ai:Be)),Cm)&&zw(o,K);continue}const ge=ce.flags&61603840?Fe(Ac(ce),Be=>c1(Yn(Be))):void 0,je=ge&&Xh(Yn(ge));for(const Be of o)if(ce!==Be){if(ne===1e5&&ne/(B-K)*B>1e6){(y=Zn)==null||y.instant(Zn.Phase.CheckTypes,"removeSubtypes_DepthLimit",{typeIds:o.map(Vt=>Vt.id)}),ft(H,k.Expression_produces_a_union_type_that_is_too_complex_to_represent);return}if(ne++,ge&&Be.flags&61603840){const kt=Yu(Be,ge.escapedName);if(kt&&c1(kt)&&Xh(kt)!==je)continue}if(ay(ce,Be,Cm)&&(!(Or(SN(ce))&1)||!(Or(SN(Be))&1)||q2(ce,Be))){zw(o,K);break}}}}return ka.set(S,o),o}function lXt(o,_,y){let S=o.length;for(;S>0;){S--;const D=o[S],L=D.flags;(L&402653312&&_&4||L&256&&_&8||L&2048&&_&64||L&8192&&_&4096||y&&L&32768&&_&16384||XD(D)&&mb(o,D.regularType))&&zw(o,S)}}function uXt(o){const _=$t(o,DN);if(_.length){let y=o.length;for(;y>0;){y--;const S=o[y];S.flags&128&&Ft(_,D=>dXt(S,D))&&zw(o,y)}}}function dXt(o,_){return _.flags&134217728?Rme(o,_):Mme(o,_)}function fXt(o){const _=[];for(const y of o)if(y.flags&2097152&&Or(y)&67108864){const S=y.types[0].flags&8650752?0:1;mu(_,y.types[S])}for(const y of _){const S=[];for(const L of o)if(L.flags&2097152&&Or(L)&67108864){const B=L.types[0].flags&8650752?0:1;L.types[B]===y&&_ee(S,L.types[1-B])}const D=Jf(y);if(up(D,L=>mb(S,L))){let L=o.length;for(;L>0;){L--;const B=o[L];if(B.flags&2097152&&Or(B)&67108864){const K=B.types[0].flags&8650752?0:1;B.types[K]===y&&mb(S,B.types[1-K])&&zw(o,L)}}_ee(o,y)}}}function hXt(o){return!!(o.flags&1048576&&(o.aliasSymbol||o.origin))}function fpt(o,_){for(const y of _)if(y.flags&1048576){const S=y.origin;y.aliasSymbol||S&&!(S.flags&1048576)?mu(o,y):S&&S.flags&1048576&&fpt(o,S.types)}}function t8e(o,_){const y=mN(o);return y.types=_,y}function is(o,_=1,y,S,D){if(o.length===0)return Ai;if(o.length===1)return o[0];if(o.length===2&&!D&&(o[0].flags&1048576||o[1].flags&1048576)){const L=_===0?"N":_===2?"S":"L",B=o[0].id<o[1].id?0:1,K=o[B].id+L+o[1-B].id+qA(y,S);let ne=Mn.get(K);return ne||(ne=hpt(o,_,y,S,void 0),Mn.set(K,ne)),ne}return hpt(o,_,y,S,D)}function hpt(o,_,y,S,D){let L=[];const B=dpt(L,0,o);if(_!==0){if(B&3)return B&1?B&8388608?Ct:B&1073741824?vt:Je:te;if(B&32768&&L.length>=2&&L[0]===tt&&L[1]===le&&zw(L,1),(B&402664352||B&16384&&B&32768)&&lXt(L,B,!!(_&2)),B&128&&B&402653184&&uXt(L),B&536870912&&fXt(L),_===2&&(L=cXt(L,!!(B&524288)),!L))return vt;if(L.length===0)return B&65536?B&4194304?Qt:lt:B&32768?B&4194304?tt:Gt:Ai}if(!D&&B&1048576){const ne=[];fpt(ne,o);const ce=[];for(const je of L)Ft(ne,Be=>mb(Be.types,je))||ce.push(je);if(!y&&ne.length===1&&ce.length===0)return ne[0];if(oi(ne,(je,Be)=>je+Be.types.length,0)+ce.length===L.length){for(const je of ne)_ee(ce,je);D=t8e(1048576,ce)}}const K=(B&36323331?0:32768)|(B&2097152?16777216:0);return n8e(L,K,y,S,D)}function _Xt(o,_){let y;const S=[];for(const L of o){const B=cg(L);if(B){if(B.kind!==0&&B.kind!==1||y&&!i8e(y,B))return;y=B,S.push(B.type)}else{const K=_!==2097152?Oc(L):void 0;if(K!==ln&&K!==Un)return}}if(!y)return;const D=P_t(S,_);return Iz(y.kind,y.parameterName,y.parameterIndex,D)}function i8e(o,_){return o.kind===_.kind&&o.parameterIndex===_.parameterIndex}function n8e(o,_,y,S,D){if(o.length===0)return Ai;if(o.length===1)return o[0];const B=(D?D.flags&1048576?`|${Xg(D.types)}`:D.flags&2097152?`&${Xg(D.types)}`:`#${D.type.id}|${Xg(o)}`:Xg(o))+qA(y,S);let K=Qs.get(B);return K||(K=t1(1048576),K.objectFlags=_|lee(o,98304),K.types=o,K.origin=D,K.aliasSymbol=y,K.aliasTypeArguments=S,o.length===2&&o[0].flags&512&&o[1].flags&512&&(K.flags|=16,K.intrinsicName="boolean"),Qs.set(B,K)),K}function pXt(o){const _=yr(o);if(!_.resolvedType){const y=KA(o);_.resolvedType=is(qt(o.types,Bs),1,y,zO(y))}return _.resolvedType}function mXt(o,_,y){const S=y.flags;return S&2097152?_pt(o,_,y.types):(sv(y)?_&16777216||(_|=16777216,o.set(y.id.toString(),y)):(S&3?(y===Ct&&(_|=8388608),fe(y)&&(_|=1073741824)):(we||!(S&98304))&&(y===le&&(_|=262144,y=tt),o.has(y.id.toString())||(y.flags&109472&&_&109472&&(_|=67108864),o.set(y.id.toString(),y))),_|=S&473694207),_)}function _pt(o,_,y){for(const S of y)_=mXt(o,_,Xh(S));return _}function gXt(o,_){let y=o.length;for(;y>0;){y--;const S=o[y];(S.flags&4&&_&402653312||S.flags&8&&_&256||S.flags&64&&_&2048||S.flags&4096&&_&8192||S.flags&16384&&_&32768||sv(S)&&_&470302716)&&zw(o,y)}}function yXt(o,_){for(const y of o)if(!mb(y.types,_)){if(_===le)return mb(y.types,tt);if(_===tt)return mb(y.types,le);const S=_.flags&128?st:_.flags&288?hi:_.flags&2048?vn:_.flags&8192?wi:void 0;if(!S||!mb(y.types,S))return!1}return!0}function vXt(o){let _=o.length;const y=$t(o,S=>!!(S.flags&128));for(;_>0;){_--;const S=o[_];if(S.flags&402653184){for(const D of y)if(YD(D,S)){zw(o,_);break}else if(DN(S))return!0}}return!1}function ppt(o,_){for(let y=0;y<o.length;y++)o[y]=ad(o[y],S=>!(S.flags&_))}function bXt(o){let _;const y=ct(o,B=>!!(Or(B)&32768));if(y<0)return!1;let S=y+1;for(;S<o.length;){const B=o[S];Or(B)&32768?((_||(_=[o[y]])).push(B),zw(o,S)):S++}if(!_)return!1;const D=[],L=[];for(const B of _)for(const K of B.types)if(_ee(D,K)&&yXt(_,K)){if(K===tt&&L.length&&L[0]===le)continue;if(K===le&&L.length&&L[0]===tt){L[0]=le;continue}_ee(L,K)}return o[y]=n8e(L,32768),!0}function CXt(o,_,y,S){const D=t1(2097152);return D.objectFlags=_|lee(o,98304),D.types=o,D.aliasSymbol=y,D.aliasTypeArguments=S,D}function Wa(o,_=0,y,S){const D=new Map,L=_pt(D,0,o),B=as(D.values());let K=0;if(L&131072)return Yt(B,Xn)?Xn:Ai;if(we&&L&98304&&L&84410368||L&67108864&&L&402783228||L&402653316&&L&67238776||L&296&&L&469891796||L&2112&&L&469889980||L&12288&&L&469879804||L&49152&&L&469842940||L&402653184&&L&128&&vXt(B))return Ai;if(L&1)return L&8388608?Ct:L&1073741824?vt:Je;if(!we&&L&98304)return L&16777216?Ai:L&32768?tt:Qt;if((L&4&&L&402653312||L&8&&L&256||L&64&&L&2048||L&4096&&L&8192||L&16384&&L&32768||L&16777216&&L&470302716)&&(_&1||gXt(B,L)),L&262144&&(B[B.indexOf(tt)]=le),B.length===0)return te;if(B.length===1)return B[0];if(B.length===2&&!(_&2)){const ge=B[0].flags&8650752?0:1,je=B[ge],Be=B[1-ge];if(je.flags&8650752&&(Be.flags&469893116&&!Tpt(Be)||L&16777216)){const kt=Jf(je);if(kt&&up(kt,Vt=>!!(Vt.flags&469893116)||sv(Vt))){if(See(kt,Be))return je;if(!(kt.flags&1048576&&dg(kt,Vt=>See(Vt,Be)))&&!See(Be,kt))return Ai;K=67108864}}}const ne=Xg(B)+(_&2?"*":qA(y,S));let ce=Zs.get(ne);if(!ce){if(L&1048576)if(bXt(B))ce=Wa(B,_,y,S);else if(Ce(B,ge=>!!(ge.flags&1048576&&ge.types[0].flags&32768))){const ge=Ft(B,zz)?le:tt;ppt(B,32768),ce=is([Wa(B,_),ge],1,y,S)}else if(Ce(B,ge=>!!(ge.flags&1048576&&(ge.types[0].flags&65536||ge.types[1].flags&65536))))ppt(B,65536),ce=is([Wa(B,_),Qt],1,y,S);else if(B.length>=3&&o.length>2){const ge=Math.floor(B.length/2);ce=Wa([Wa(B.slice(0,ge),_),Wa(B.slice(ge),_)],_,y,S)}else{if(!pee(B))return vt;const ge=SXt(B,_),je=Ft(ge,Be=>!!(Be.flags&2097152))&&r8e(ge)>r8e(B)?t8e(2097152,B):void 0;ce=is(ge,1,y,S,je)}else ce=CXt(B,K,y,S);Zs.set(ne,ce)}return ce}function mpt(o){return oi(o,(_,y)=>y.flags&1048576?_*y.types.length:y.flags&131072?0:_,1)}function pee(o){var _;const y=mpt(o);return y>=1e5?((_=Zn)==null||_.instant(Zn.Phase.CheckTypes,"checkCrossProductUnion_DepthLimit",{typeIds:o.map(S=>S.id),size:y}),ft(H,k.Expression_produces_a_union_type_that_is_too_complex_to_represent),!1):!0}function SXt(o,_){const y=mpt(o),S=[];for(let D=0;D<y;D++){const L=o.slice();let B=D;for(let ne=o.length-1;ne>=0;ne--)if(o[ne].flags&1048576){const ce=o[ne].types,ge=ce.length;L[ne]=ce[B%ge],B=Math.floor(B/ge)}const K=Wa(L,_);K.flags&131072||S.push(K)}return S}function gpt(o){return!(o.flags&3145728)||o.aliasSymbol?1:o.flags&1048576&&o.origin?gpt(o.origin):r8e(o.types)}function r8e(o){return oi(o,(_,y)=>_+gpt(y),0)}function wXt(o){const _=yr(o);if(!_.resolvedType){const y=KA(o),S=qt(o.types,Bs),D=S.length===2?S.indexOf(go):-1,L=D>=0?S[1-D]:te,B=!!(L.flags&76||L.flags&134217728&&DN(L));_.resolvedType=Wa(S,B?1:0,y,zO(y))}return _.resolvedType}function ypt(o,_){const y=t1(4194304);return y.type=o,y.indexFlags=_,y}function xXt(o){const _=mN(4194304);return _.type=o,_}function vpt(o,_){return _&1?o.resolvedStringIndexType||(o.resolvedStringIndexType=ypt(o,1)):o.resolvedIndexType||(o.resolvedIndexType=ypt(o,0))}function bpt(o,_){const y=s1(o),S=Tm(o),D=KS(o.target||o);if(!D&&!(_&2))return S;const L=[];if(IN(S)){if(FO(o))return vpt(o,_);RN(S,K)}else if(FO(o)){const ne=Kh(zD(o));CRe(ne,8576,!!(_&1),K)}else RN(iee(S),K);const B=_&2?ad(is(L),ne=>!(ne.flags&5)):is(L);if(B.flags&1048576&&S.flags&1048576&&Xg(B.types)===Xg(S.types))return S;return B;function K(ne){const ce=D?io(D,Mz(o.mapper,y,ne)):ne;L.push(ce===st?cn:ce)}}function kXt(o){const _=s1(o);return y(KS(o)||_);function y(S){return S.flags&470810623?!0:S.flags&16777216?S.root.isDistributive&&S.checkType===_:S.flags&137363456?Ce(S.types,y):S.flags&8388608?y(S.objectType)&&y(S.indexType):S.flags&33554432?y(S.baseType)&&y(S.constraint):S.flags&268435456?y(S.type):!1}}function xC(o){if(Vs(o))return Ai;if(A_(o))return Xh(uo(o));if(Ka(o))return Xh(cy(o));const _=CI(o);return _!==void 0?V_(Ws(_)):jt(o)?Xh(uo(o)):Ai}function $A(o,_,y){if(y||!($m(o)&6)){let S=Ys(Kpe(o)).nameType;if(!S){const D=No(o.valueDeclaration);S=o.escapedName==="default"?V_("default"):D&&xC(D)||(LV(o)?void 0:V_(Eu(o)))}if(S&&S.flags&_)return S}return Ai}function Cpt(o,_){return!!(o.flags&_||o.flags&2097152&&Ft(o.types,y=>Cpt(y,_)))}function TXt(o,_,y){const S=y&&(Or(o)&7||o.aliasSymbol)?xXt(o):void 0,D=qt(Ac(o),B=>$A(B,_)),L=qt(Ih(o),B=>B!==Xi&&Cpt(B.keyType,_)?B.keyType===st&&_&8?cn:B.keyType:Ai);return is(Js(D,L),1,void 0,void 0,S)}function s8e(o,_=0){return!!(o.flags&58982400||Qx(o)||op(o)&&(!kXt(o)||nee(o)===2)||o.flags&1048576&&!(_&4)&&DRe(o)||o.flags&2097152&&Au(o,465829888)&&Ft(o.types,sv))}function oy(o,_=0){return o=a1(o),HO(o)?VRe(oy(o.baseType,_)):s8e(o,_)?vpt(o,_):o.flags&1048576?Wa(qt(o.types,y=>oy(y,_))):o.flags&2097152?is(qt(o.types,y=>oy(y,_))):Or(o)&32?bpt(o,_):o===Ct?Ct:o.flags&2?Ai:o.flags&131073?vi:TXt(o,(_&2?128:402653316)|(_&1?0:12584),_===0)}function Spt(o){const _=HKt();return _?VO(_,[o,st]):st}function DXt(o){const _=Spt(oy(o));return _.flags&131072?st:_}function EXt(o){const _=yr(o);if(!_.resolvedType)switch(o.operator){case 143:_.resolvedType=oy(Bs(o.type));break;case 158:_.resolvedType=o.type.kind===155?_8e(TV(o.parent)):vt;break;case 148:_.resolvedType=Bs(o.type);break;default:j.assertNever(o.operator)}return _.resolvedType}function IXt(o){const _=yr(o);return _.resolvedType||(_.resolvedType=TN([o.head.text,...qt(o.templateSpans,y=>y.literal.text)],qt(o.templateSpans,y=>Bs(y.type)))),_.resolvedType}function TN(o,_){const y=ct(_,ce=>!!(ce.flags&1179648));if(y>=0)return pee(_)?eu(_[y],ce=>TN(o,Fc(_,y,ce))):vt;if(Yt(_,Ct))return Ct;const S=[],D=[];let L=o[0];if(!ne(o,_))return st;if(S.length===0)return V_(L);if(D.push(L),Ce(D,ce=>ce==="")){if(Ce(S,ce=>!!(ce.flags&4)))return st;if(S.length===1&&DN(S[0]))return S[0]}const B=`${Xg(S)}|${qt(D,ce=>ce.length).join(",")}|${D.join("")}`;let K=Xr.get(B);return K||Xr.set(B,K=LXt(D,S)),K;function ne(ce,ge){for(let je=0;je<ge.length;je++){const Be=ge[je];if(Be.flags&101248)L+=NXt(Be)||"",L+=ce[je+1];else if(Be.flags&134217728){if(L+=Be.texts[0],!ne(Be.texts,Be.types))return!1;L+=ce[je+1]}else if(IN(Be)||mee(Be))S.push(Be),D.push(L),L=ce[je+1];else return!1}return!0}}function NXt(o){return o.flags&128?o.value:o.flags&256?""+o.value:o.flags&2048?ZT(o.value):o.flags&98816?o.intrinsicName:void 0}function LXt(o,_){const y=t1(134217728);return y.texts=o,y.types=_,y}function JA(o,_){return _.flags&1179648?eu(_,y=>JA(o,y)):_.flags&128?V_(wpt(o,_.value)):_.flags&134217728?TN(...PXt(o,_.texts,_.types)):_.flags&268435456&&o===_.symbol?_:_.flags&268435461||IN(_)?xpt(o,_):mee(_)?xpt(o,TN(["",""],[_])):_}function wpt(o,_){switch(Lue.get(o.escapedName)){case 0:return _.toUpperCase();case 1:return _.toLowerCase();case 2:return _.charAt(0).toUpperCase()+_.slice(1);case 3:return _.charAt(0).toLowerCase()+_.slice(1)}return _}function PXt(o,_,y){switch(Lue.get(o.escapedName)){case 0:return[_.map(S=>S.toUpperCase()),y.map(S=>JA(o,S))];case 1:return[_.map(S=>S.toLowerCase()),y.map(S=>JA(o,S))];case 2:return[_[0]===""?_:[_[0].charAt(0).toUpperCase()+_[0].slice(1),..._.slice(1)],_[0]===""?[JA(o,y[0]),...y.slice(1)]:y];case 3:return[_[0]===""?_:[_[0].charAt(0).toLowerCase()+_[0].slice(1),..._.slice(1)],_[0]===""?[JA(o,y[0]),...y.slice(1)]:y]}return[_,y]}function xpt(o,_){const y=`${Ba(o)},${kf(_)}`;let S=Gs.get(y);return S||Gs.set(y,S=AXt(o,_)),S}function AXt(o,_){const y=Kg(268435456,o);return y.type=_,y}function OXt(o,_,y,S,D){const L=t1(8388608);return L.objectType=o,L.indexType=_,L.accessFlags=y,L.aliasSymbol=S,L.aliasTypeArguments=D,L}function Az(o){if(De)return!1;if(Or(o)&4096)return!0;if(o.flags&1048576)return Ce(o.types,Az);if(o.flags&2097152)return Ft(o.types,Az);if(o.flags&465829888){const _=xRe(o);return _!==o&&Az(_)}return!1}function ame(o,_){return Jm(o)?Gm(o):_&&id(_)?CI(_):void 0}function o8e(o,_){if(_.flags&8208){const y=Qi(o.parent,S=>!Sl(S))||o.parent;return MT(y)?T1(y)&&ot(o)&&Omt(y,o):Ce(_.declarations,S=>!Ho(S)||FS(S))}return!0}function kpt(o,_,y,S,D,L){const B=D&&D.kind===212?D:void 0,K=D&&Vs(D)?void 0:ame(y,D);if(K!==void 0){if(L&256)return K2(_,K)||Je;const ce=Ta(_,K);if(ce){if(L&64&&D&&ce.declarations&&_C(ce)&&o8e(D,ce)){const je=(B==null?void 0:B.argumentExpression)??(nD(D)?D.indexType:D);pC(je,ce.declarations,K)}if(B){if(Zee(ce,B,Qgt(B.expression,_.symbol)),B0t(B,ce,Kk(B))){ft(B.argumentExpression,k.Cannot_assign_to_0_because_it_is_a_read_only_property,eo(ce));return}if(L&8&&(yr(D).resolvedSymbol=ce),zgt(B,ce))return Rt}const ge=L&4?zx(ce):Yn(ce);return B&&Kk(B)!==1?LC(B,ge):D&&nD(D)&&zz(ge)?is([ge,tt]):ge}if(up(_,Qa)&&$v(K)){const ge=+K;if(D&&up(_,je=>!(je.target.combinedFlags&12))&&!(L&16)){const je=a8e(D);if(Qa(_)){if(ge<0)return ft(je,k.A_tuple_type_cannot_be_indexed_with_a_negative_value),tt;ft(je,k.Tuple_type_0_of_length_1_has_no_element_at_index_2,Hn(_),QS(_),Ws(K))}else ft(je,k.Property_0_does_not_exist_on_type_1,Ws(K),Hn(_))}if(ge>=0)return ne(pb(_,hi)),_mt(_,ge,L&1?le:void 0)}}if(!(y.flags&98304)&&Gf(y,402665900)){if(_.flags&131073)return _;const ce=Ez(_,y)||pb(_,st);if(ce){if(L&2&&ce.keyType!==hi){B&&(L&4?ft(B,k.Type_0_is_generic_and_can_only_be_indexed_for_reading,Hn(o)):ft(B,k.Type_0_cannot_be_used_to_index_type_1,Hn(y),Hn(o)));return}if(D&&ce.keyType===st&&!Gf(y,12)){const ge=a8e(D);return ft(ge,k.Type_0_cannot_be_used_as_an_index_type,Hn(y)),L&1?is([ce.type,le]):ce.type}return ne(ce),L&1&&!(_.symbol&&_.symbol.flags&384&&y.symbol&&y.flags&1024&&Qp(y.symbol)===_.symbol)?is([ce.type,le]):ce.type}if(y.flags&131072)return Ai;if(Az(_))return Je;if(B&&!_ge(_)){if(ew(_)){if(De&&y.flags&384)return lc.add(Kn(B,k.Property_0_does_not_exist_on_type_1,y.value,Hn(_))),tt;if(y.flags&12){const ge=qt(_.properties,je=>Yn(je));return is(fn(ge,tt))}}if(_.symbol===Me&&K!==void 0&&Me.exports.has(K)&&Me.exports.get(K).flags&418)ft(B,k.Property_0_does_not_exist_on_type_1,Ws(K),Hn(_));else if(De&&!(L&128))if(K!==void 0&&$gt(K,_)){const ge=Hn(_);ft(B,k.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead,K,ge,ge+"["+uu(B.argumentExpression)+"]")}else if(H2(_,hi))ft(B.argumentExpression,k.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number);else{let ge;if(K!==void 0&&(ge=Kgt(K,_)))ge!==void 0&&ft(B.argumentExpression,k.Property_0_does_not_exist_on_type_1_Did_you_mean_2,K,Hn(_),ge);else{const je=Rei(_,B,y);if(je!==void 0)ft(B,k.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1,Hn(_),je);else{let Be;if(y.flags&1024)Be=jo(void 0,k.Property_0_does_not_exist_on_type_1,"["+Hn(y)+"]",Hn(_));else if(y.flags&8192){const kt=qS(y.symbol,B);Be=jo(void 0,k.Property_0_does_not_exist_on_type_1,"["+kt+"]",Hn(_))}else y.flags&128||y.flags&256?Be=jo(void 0,k.Property_0_does_not_exist_on_type_1,y.value,Hn(_)):y.flags&12&&(Be=jo(void 0,k.No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1,Hn(y),Hn(_)));Be=jo(Be,k.Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1,Hn(S),Hn(_)),lc.add(Bv(_n(B),B,Be))}}}return}}if(L&16&&ew(_))return tt;if(Az(_))return Je;if(D){const ce=a8e(D);if(ce.kind!==10&&y.flags&384)ft(ce,k.Property_0_does_not_exist_on_type_1,""+y.value,Hn(_));else if(y.flags&12)ft(ce,k.Type_0_has_no_matching_index_signature_for_type_1,Hn(_),Hn(y));else{const ge=ce.kind===10?"bigint":Hn(y);ft(ce,k.Type_0_cannot_be_used_as_an_index_type,ge)}}if(Nc(y))return y;return;function ne(ce){ce&&ce.isReadonly&&B&&(fS(B)||$ae(B))&&ft(B,k.Index_signature_in_type_0_only_permits_reading,Hn(_))}}function a8e(o){return o.kind===212?o.argumentExpression:o.kind===199?o.indexType:o.kind===167?o.expression:o}function mee(o){if(o.flags&2097152){let _=!1;for(const y of o.types)if(y.flags&101248||mee(y))_=!0;else if(!(y.flags&524288))return!1;return _}return!!(o.flags&77)||DN(o)}function DN(o){return!!(o.flags&134217728)&&Ce(o.types,mee)||!!(o.flags&268435456)&&mee(o.type)}function Tpt(o){return!!(o.flags&402653184)&&!DN(o)}function GA(o){return!!Oz(o)}function EN(o){return!!(Oz(o)&4194304)}function IN(o){return!!(Oz(o)&8388608)}function Oz(o){return o.flags&3145728?(o.objectFlags&2097152||(o.objectFlags|=2097152|oi(o.types,(_,y)=>_|Oz(y),0)),o.objectFlags&12582912):o.flags&33554432?(o.objectFlags&2097152||(o.objectFlags|=2097152|Oz(o.baseType)|Oz(o.constraint)),o.objectFlags&12582912):(o.flags&58982400||op(o)||Qx(o)?4194304:0)|(o.flags&63176704||Tpt(o)?8388608:0)}function kC(o,_){return o.flags&8388608?RXt(o,_):o.flags&16777216?FXt(o,_):o}function Dpt(o,_,y){if(o.flags&1048576||o.flags&2097152&&!s8e(o)){const S=qt(o.types,D=>kC(ap(D,_),y));return o.flags&2097152||y?Wa(S):is(S)}}function MXt(o,_,y){if(_.flags&1048576){const S=qt(_.types,D=>kC(ap(o,D),y));return y?Wa(S):is(S)}}function RXt(o,_){const y=_?"simplifiedForWriting":"simplifiedForReading";if(o[y])return o[y]===Gc?o:o[y];o[y]=Gc;const S=kC(o.objectType,_),D=kC(o.indexType,_),L=MXt(S,D,_);if(L)return o[y]=L;if(!(D.flags&465829888)){const B=Dpt(S,D,_);if(B)return o[y]=B}if(Qx(S)&&D.flags&296){const B=K5(S,D.flags&8?0:S.target.fixedLength,0,_);if(B)return o[y]=B}return op(S)&&nee(S)!==2?o[y]=eu(cme(S,o.indexType),B=>kC(B,_)):o[y]=o}function FXt(o,_){const y=o.checkType,S=o.extendsType,D=z2(o),L=U2(o);if(L.flags&131072&&Kx(D)===Kx(y)){if(y.flags&1||Da(LN(y),LN(S)))return kC(D,_);if(Ept(y,S))return Ai}else if(D.flags&131072&&Kx(L)===Kx(y)){if(!(y.flags&1)&&Da(LN(y),LN(S)))return Ai;if(y.flags&1||Ept(y,S))return kC(L,_)}return o}function Ept(o,_){return!!(is([tee(o,_),Ai]).flags&131072)}function cme(o,_){const y=cp([s1(o)],[_]),S=ZD(o.mapper,y),D=io(SC(o.target||o),S),L=g_t(o)>0||(GA(o)?V5(zD(o))>0:BXt(o,_));return Dd(D,!0,L)}function BXt(o,_){const y=Jf(_);return!!y&&Ft(Ac(o),S=>!!(S.flags&16777216)&&Da($A(S,8576),y))}function ap(o,_,y=0,S,D,L){return Gx(o,_,y,S,D,L)||(S?vt:te)}function Ipt(o,_){return up(o,y=>{if(y.flags&384){const S=Gm(y);if($v(S)){const D=+S;return D>=0&&D<_}}return!1})}function Gx(o,_,y=0,S,D,L){if(o===Ct||_===Ct)return Ct;if(o=a1(o),Ypt(o)&&!(_.flags&98304)&&Gf(_,12)&&(_=st),Q.noUncheckedIndexedAccess&&y&32&&(y|=1),IN(_)||(S&&S.kind!==199?Qx(o)&&!Ipt(_,e8e(o.target)):EN(o)&&!(Qa(o)&&Ipt(_,e8e(o.target)))||DRe(o))){if(o.flags&3)return o;const K=y&1,ne=o.id+","+_.id+","+K+qA(D,L);let ce=us.get(ne);return ce||us.set(ne,ce=OXt(o,_,K,D,L)),ce}const B=H5(o);if(_.flags&1048576&&!(_.flags&16)){const K=[];let ne=!1;for(const ce of _.types){const ge=kpt(o,B,ce,_,S,y|(ne?128:0));if(ge)K.push(ge);else if(S)ne=!0;else return}return ne?void 0:y&4?Wa(K,0,D,L):is(K,1,D,L)}return kpt(o,B,_,_,S,y|8|64)}function Npt(o){const _=yr(o);if(!_.resolvedType){const y=Bs(o.objectType),S=Bs(o.indexType),D=KA(o);_.resolvedType=ap(y,S,0,o,D,zO(D))}return _.resolvedType}function c8e(o){const _=yr(o);if(!_.resolvedType){const y=V(32,o.symbol);y.declaration=o,y.aliasSymbol=KA(o),y.aliasTypeArguments=zO(y.aliasSymbol),_.resolvedType=y,Tm(y)}return _.resolvedType}function Kx(o){return o.flags&33554432?Kx(o.baseType):o.flags&8388608&&(o.objectType.flags&33554432||o.indexType.flags&33554432)?ap(Kx(o.objectType),Kx(o.indexType)):o}function Lpt(o){return jP(o)&&P(o.elements)>0&&!Ft(o.elements,_=>vX(_)||bX(_)||b3(_)&&!!(_.questionToken||_.dotDotDotToken))}function Ppt(o,_){return GA(o)||_&&Qa(o)&&Ft(GD(o),GA)}function l8e(o,_,y,S,D){let L,B,K=0;for(;;){if(K===1e3)return ft(H,k.Type_instantiation_is_excessively_deep_and_possibly_infinite),vt;const ce=io(Kx(o.checkType),_),ge=io(o.extendsType,_);if(ce===vt||ge===vt)return vt;if(ce===Ct||ge===Ct)return Ct;const je=M8(o.node.checkType),Be=M8(o.node.extendsType),kt=Lpt(je)&&Lpt(Be)&&P(je.elements)===P(Be.elements),Vt=Ppt(ce,kt);let Kt;if(o.inferTypeParameters){const Ki=qz(o.inferTypeParameters,void 0,0);_&&(Ki.nonFixingMapper=ZD(Ki.nonFixingMapper,_)),Vt||NC(Ki.inferences,ce,ge,1536),Kt=_?ZD(Ki.mapper,_):Ki.mapper}const Oi=Kt?io(o.extendsType,Kt):ge;if(!Vt&&!Ppt(Oi,kt)){if(!(Oi.flags&3)&&(ce.flags&1||!Da(Fz(ce),Fz(Oi)))){(ce.flags&1||y&&!(Oi.flags&131072)&&dg(Fz(Oi),qn=>Da(qn,Fz(ce))))&&(B||(B=[])).push(io(Bs(o.node.trueType),Kt||_));const Ki=Bs(o.node.falseType);if(Ki.flags&16777216){const qn=Ki.root;if(qn.node.parent===o.node&&(!qn.isDistributive||qn.checkType===o.checkType)){o=qn;continue}if(ne(Ki,_))continue}L=io(Ki,_);break}if(Oi.flags&3||Da(LN(ce),LN(Oi))){const Ki=Bs(o.node.trueType),qn=Kt||_;if(ne(Ki,qn))continue;L=io(Ki,qn);break}}L=t1(16777216),L.root=o,L.checkType=io(o.checkType,_),L.extendsType=io(o.extendsType,_),L.mapper=_,L.combinedMapper=Kt,L.aliasSymbol=S||o.aliasSymbol,L.aliasTypeArguments=S?D:gb(o.aliasTypeArguments,_);break}return B?is(fn(B,L)):L;function ne(ce,ge){if(ce.flags&16777216&&ge){const je=ce.root;if(je.outerTypeParameters){const Be=ZD(ce.mapper,ge),kt=qt(je.outerTypeParameters,Oi=>ZS(Oi,Be)),Vt=cp(je.outerTypeParameters,kt),Kt=je.isDistributive?ZS(je.checkType,Vt):void 0;if(!Kt||Kt===je.checkType||!(Kt.flags&1179648))return o=je,_=Vt,S=void 0,D=void 0,je.aliasSymbol&&K++,!0}}return!1}}function z2(o){return o.resolvedTrueType||(o.resolvedTrueType=io(Bs(o.root.node.trueType),o.mapper))}function U2(o){return o.resolvedFalseType||(o.resolvedFalseType=io(Bs(o.root.node.falseType),o.mapper))}function WXt(o){return o.resolvedInferredTrueType||(o.resolvedInferredTrueType=o.combinedMapper?io(Bs(o.root.node.trueType),o.combinedMapper):z2(o))}function u8e(o){let _;return o.locals&&o.locals.forEach(y=>{y.flags&262144&&(_=fn(_,gl(y)))}),_}function VXt(o){return o.isDistributive&&(Cee(o.checkType,o.node.trueType)||Cee(o.checkType,o.node.falseType))}function HXt(o){const _=yr(o);if(!_.resolvedType){const y=Bs(o.checkType),S=KA(o),D=zO(S),L=OO(o,!0),B=D?L:$t(L,ne=>Cee(ne,o)),K={node:o,checkType:y,extendsType:Bs(o.extendsType),isDistributive:!!(y.flags&262144),inferTypeParameters:u8e(o),outerTypeParameters:B,instantiations:void 0,aliasSymbol:S,aliasTypeArguments:D};_.resolvedType=l8e(K,void 0,!1),B&&(K.instantiations=new Map,K.instantiations.set(Xg(B),_.resolvedType))}return _.resolvedType}function jXt(o){const _=yr(o);return _.resolvedType||(_.resolvedType=jD(xr(o.typeParameter))),_.resolvedType}function Apt(o){return ot(o)?[o]:fn(Apt(o.left),o.right)}function Opt(o){var _;const y=yr(o);if(!y.resolvedType){if(!lS(o))return ft(o.argument,k.String_literal_expected),y.resolvedSymbol=pt,y.resolvedType=vt;const S=o.isTypeOf?111551:o.flags&16777216?900095:788968,D=B_(o,o.argument.literal);if(!D)return y.resolvedSymbol=pt,y.resolvedType=vt;const L=!!((_=D.exports)!=null&&_.get("export=")),B=sp(D,!1);if(lu(o.qualifier))if(B.flags&S)y.resolvedType=Mpt(o,y,B,S);else{const K=S===111551?k.Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here:k.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0;ft(o,K,o.argument.literal.text),y.resolvedSymbol=pt,y.resolvedType=vt}else{const K=Apt(o.qualifier);let ne=B,ce;for(;ce=K.shift();){const ge=K.length?1920:S,je=wc(Zu(ne)),Be=o.isTypeOf||nr(o)&&L?Ta(Yn(je),ce.escapedText,!1,!0):void 0,Vt=(o.isTypeOf?void 0:ff(__(je),ce.escapedText,ge))??Be;if(!Vt)return ft(ce,k.Namespace_0_has_no_exported_member_1,qS(ne),al(ce)),y.resolvedType=vt;yr(ce).resolvedSymbol=Vt,yr(ce.parent).resolvedSymbol=Vt,ne=Vt}y.resolvedType=Mpt(o,y,ne,S)}}return y.resolvedType}function Mpt(o,_,y,S){const D=Zu(y);return _.resolvedSymbol=D,S===111551?x0t(Yn(y),o):nme(o,D)}function Rpt(o){const _=yr(o);if(!_.resolvedType){const y=KA(o);if(qx(o.symbol).size===0&&!y)_.resolvedType=go;else{let S=V(16,o.symbol);S.aliasSymbol=y,S.aliasTypeArguments=zO(y),OI(o)&&o.isArrayType&&(S=hh(S)),_.resolvedType=S}}return _.resolvedType}function KA(o){let _=o.parent;for(;EI(_)||o2(_)||t2(_)&&_.operator===148;)_=_.parent;return SV(_)?xr(_):void 0}function zO(o){return o?y0(o):void 0}function lme(o){return!!(o.flags&524288)&&!op(o)}function d8e(o){return TC(o)||!!(o.flags&474058748)}function f8e(o,_){if(!(o.flags&1048576))return o;if(Ce(o.types,d8e))return Fe(o.types,TC)||Jo;const y=Fe(o.types,L=>!d8e(L));if(!y||Fe(o.types,L=>L!==y&&!d8e(L)))return o;return D(y);function D(L){const B=_a();for(const ne of Ac(L))if(!($m(ne)&6)){if(ume(ne)){const ce=ne.flags&65536&&!(ne.flags&32768),je=$a(16777220,ne.escapedName,bRe(ne)|(_?8:0));je.links.type=ce?tt:Dd(Yn(ne),!0),je.declarations=ne.declarations,je.links.nameType=Ys(ne).nameType,je.links.syntheticOrigin=ne,B.set(ne.escapedName,je)}}const K=Xs(L.symbol,B,w,w,Ih(L));return K.objectFlags|=131200,K}}function KD(o,_,y,S,D){if(o.flags&1||_.flags&1)return Je;if(o.flags&2||_.flags&2)return te;if(o.flags&131072)return _;if(_.flags&131072)return o;if(o=f8e(o,D),o.flags&1048576)return pee([o,_])?eu(o,ce=>KD(ce,_,y,S,D)):vt;if(_=f8e(_,D),_.flags&1048576)return pee([o,_])?eu(_,ce=>KD(o,ce,y,S,D)):vt;if(_.flags&473960444)return o;if(EN(o)||EN(_)){if(TC(o))return _;if(o.flags&2097152){const ce=o.types,ge=ce[ce.length-1];if(lme(ge)&&lme(_))return Wa(Js(ce.slice(0,ce.length-1),[KD(ge,_,y,S,D)]))}return Wa([o,_])}const L=_a(),B=new Set,K=o===Jo?Ih(_):f_t([o,_]);for(const ce of Ac(_))$m(ce)&6?B.add(ce.escapedName):ume(ce)&&L.set(ce.escapedName,h8e(ce,D));for(const ce of Ac(o))if(!(B.has(ce.escapedName)||!ume(ce)))if(L.has(ce.escapedName)){const ge=L.get(ce.escapedName),je=Yn(ge);if(ge.flags&16777216){const Be=Js(ce.declarations,ge.declarations),kt=4|ce.flags&16777216,Vt=$a(kt,ce.escapedName),Kt=Yn(ce),Oi=Ime(Kt),Ki=Ime(je);Vt.links.type=Oi===Ki?Kt:is([Kt,Ki],2),Vt.links.leftSpread=ce,Vt.links.rightSpread=ge,Vt.declarations=Be,Vt.links.nameType=Ys(ce).nameType,L.set(ce.escapedName,Vt)}}else L.set(ce.escapedName,h8e(ce,D));const ne=Xs(y,L,w,w,Wr(K,ce=>zXt(ce,D)));return ne.objectFlags|=2228352|S,ne}function ume(o){var _;return!Ft(o.declarations,Wh)&&(!(o.flags&106496)||!((_=o.declarations)!=null&&_.some(y=>ss(y.parent))))}function h8e(o,_){const y=o.flags&65536&&!(o.flags&32768);if(!y&&_===d1(o))return o;const S=4|o.flags&16777216,D=$a(S,o.escapedName,bRe(o)|(_?8:0));return D.links.type=y?tt:Yn(o),D.declarations=o.declarations,D.links.nameType=Ys(o).nameType,D.links.syntheticOrigin=o,D}function zXt(o,_){return o.isReadonly!==_?nv(o.keyType,o.type,_,o.declaration):o}function gee(o,_,y,S){const D=Kg(o,y);return D.value=_,D.regularType=S||D,D}function XA(o){if(o.flags&2976){if(!o.freshType){const _=gee(o.flags,o.value,o.symbol,o);_.freshType=_,o.freshType=_}return o.freshType}return o}function Xh(o){return o.flags&2976?o.regularType:o.flags&1048576?o.regularType||(o.regularType=eu(o,Xh)):o}function XD(o){return!!(o.flags&2976)&&o.freshType===o}function V_(o){let _;return at.get(o)||(at.set(o,_=gee(128,o)),_)}function v0(o){let _;return yi.get(o)||(yi.set(o,_=gee(256,o)),_)}function yee(o){let _;const y=ZT(o);return Sn.get(y)||(Sn.set(y,_=gee(2048,o)),_)}function UXt(o,_,y){let S;const D=`${_}${typeof o=="string"?"@":"#"}${o}`,L=1024|(typeof o=="string"?128:256);return dr.get(D)||(dr.set(D,S=gee(L,o,y)),S)}function qXt(o){if(o.literal.kind===106)return Qt;const _=yr(o);return _.resolvedType||(_.resolvedType=Xh(uo(o.literal))),_.resolvedType}function $Xt(o){const _=Kg(8192,o);return _.escapedName=`__@${_.symbol.escapedName}@${Ba(_.symbol)}`,_}function _8e(o){if(nr(o)&&o2(o)){const _=zT(o);_&&(o=pP(_)||_)}if(mTe(o)){const _=jG(o)?p_(o.left):p_(o);if(_){const y=Ys(_);return y.uniqueESSymbolType||(y.uniqueESSymbolType=$Xt(_))}}return wi}function JXt(o){const _=Hh(o,!1,!1),y=_&&_.parent;if(y&&(ss(y)||y.kind===264)&&!pa(_)&&(!iu(_)||UT(o,_.body)))return W_(xr(y)).thisType;if(y&&Aa(y)&&ur(y.parent)&&Bu(y.parent)===6)return W_(p_(y.parent.left).parent).thisType;const S=o.flags&16777216?Jk(o):void 0;return S&&ml(S)&&ur(S.parent)&&Bu(S.parent)===3?W_(p_(S.parent.left).parent).thisType:dy(_)&&UT(o,_.body)?W_(xr(_)).thisType:(ft(o,k.A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface),vt)}function p8e(o){const _=yr(o);return _.resolvedType||(_.resolvedType=JXt(o)),_.resolvedType}function Fpt(o){return Bs(vee(o.type)||o.type)}function vee(o){switch(o.kind){case 196:return vee(o.type);case 189:if(o.elements.length===1&&(o=o.elements[0],o.kind===191||o.kind===202&&o.dotDotDotToken))return vee(o.type);break;case 188:return o.elementType}}function GXt(o){const _=yr(o);return _.resolvedType||(_.resolvedType=o.dotDotDotToken?Fpt(o):Dd(Bs(o.type),!0,!!o.questionToken))}function Bs(o){return xKt(Bpt(o),o)}function Bpt(o){switch(o.kind){case 133:case 312:case 313:return Je;case 159:return te;case 154:return st;case 150:return hi;case 163:return vn;case 136:return fi;case 155:return wi;case 116:return Ri;case 157:return tt;case 106:return Qt;case 146:return Ai;case 151:return o.flags&524288&&!De?Je:zi;case 141:return gr;case 197:case 110:return p8e(o);case 201:return qXt(o);case 183:return uee(o);case 182:return o.assertsModifier?Ri:fi;case 233:return uee(o);case 186:return $_t(o);case 188:case 189:return iXt(o);case 190:return oXt(o);case 192:return pXt(o);case 193:return wXt(o);case 314:return kKt(o);case 316:return Dd(Bs(o.type));case 202:return GXt(o);case 196:case 315:case 309:return Bs(o.type);case 191:return Fpt(o);case 318:return nsi(o);case 184:case 185:case 187:case 322:case 317:case 323:return Rpt(o);case 198:return EXt(o);case 199:return Npt(o);case 200:return c8e(o);case 194:return HXt(o);case 195:return jXt(o);case 203:return IXt(o);case 205:return Opt(o);case 80:case 166:case 211:const _=Zg(o);return _?gl(_):vt;default:return vt}}function dme(o,_,y){if(o&&o.length)for(let S=0;S<o.length;S++){const D=o[S],L=y(D,_);if(D!==L){const B=S===0?[]:o.slice(0,S);for(B.push(L),S++;S<o.length;S++)B.push(y(o[S],_));return B}}return o}function gb(o,_){return dme(o,_,io)}function fme(o,_){return dme(o,_,QA)}function Wpt(o,_){return dme(o,_,aQt)}function cp(o,_){return o.length===1?QD(o[0],_?_[0]:Je):KXt(o,_)}function ZS(o,_){switch(_.kind){case 0:return o===_.source?_.target:o;case 1:{const S=_.sources,D=_.targets;for(let L=0;L<S.length;L++)if(o===S[L])return D?D[L]:Je;return o}case 2:{const S=_.sources,D=_.targets;for(let L=0;L<S.length;L++)if(o===S[L])return D[L]();return o}case 3:return _.func(o);case 4:case 5:const y=ZS(o,_.mapper1);return y!==o&&_.kind===4?io(y,_.mapper2):ZS(y,_.mapper2)}}function QD(o,_){return j.attachDebugPrototypeIfDebug({kind:0,source:o,target:_})}function KXt(o,_){return j.attachDebugPrototypeIfDebug({kind:1,sources:o,targets:_})}function bee(o,_){return j.attachDebugPrototypeIfDebug({kind:3,func:o,debugInfo:j.isDebugging?_:void 0})}function m8e(o,_){return j.attachDebugPrototypeIfDebug({kind:2,sources:o,targets:_})}function hme(o,_,y){return j.attachDebugPrototypeIfDebug({kind:o,mapper1:_,mapper2:y})}function Vpt(o){return cp(o,void 0)}function XXt(o,_){const y=o.inferences.slice(_);return cp(qt(y,S=>S.typeParameter),qt(y,()=>te))}function ZD(o,_){return o?hme(4,o,_):_}function QXt(o,_){return o?hme(5,o,_):_}function NN(o,_,y){return y?hme(5,QD(o,_),y):QD(o,_)}function Mz(o,_,y){return o?hme(5,o,QD(_,y)):QD(_,y)}function ZXt(o){return!o.constraint&&!tme(o)||o.constraint===ki?o:o.restrictiveInstantiation||(o.restrictiveInstantiation=Ut(o.symbol),o.restrictiveInstantiation.constraint=ki,o.restrictiveInstantiation)}function g8e(o){const _=Ut(o.symbol);return _.target=o,_}function YXt(o,_){return Iz(o.kind,o.parameterName,o.parameterIndex,io(o.type,_))}function QA(o,_,y){let S;if(o.typeParameters&&!y){S=qt(o.typeParameters,g8e),_=ZD(cp(o.typeParameters,S),_);for(const L of S)L.mapper=_}const D=_b(o.declaration,S,o.thisParameter&&y8e(o.thisParameter,_),dme(o.parameters,_,y8e),void 0,void 0,o.minArgumentCount,o.flags&167);return D.target=o,D.mapper=_,D}function y8e(o,_){const y=Ys(o);if(y.type&&!Yx(y.type)&&(!(o.flags&65536)||y.writeType&&!Yx(y.writeType)))return o;Iu(o)&1&&(o=y.target,_=ZD(y.mapper,_));const S=$a(o.flags,o.escapedName,1|Iu(o)&53256);return S.declarations=o.declarations,S.parent=o.parent,S.links.target=o,S.links.mapper=_,o.valueDeclaration&&(S.valueDeclaration=o.valueDeclaration),y.nameType&&(S.links.nameType=y.nameType),S}function eQt(o,_,y,S){const D=o.objectFlags&4||o.objectFlags&8388608?o.node:o.symbol.declarations[0],L=yr(D),B=o.objectFlags&4?L.resolvedType:o.objectFlags&64?o.target:o;let K=o.objectFlags&134217728?o.outerTypeParameters:L.outerTypeParameters;if(!K){let ne=OO(D,!0);if(dy(D)){const ge=I_t(D);ne=Sr(ne,ge)}K=ne||w;const ce=o.objectFlags&8388612?[D]:o.symbol.declarations;K=(B.objectFlags&8388612||B.symbol.flags&8192||B.symbol.flags&2048)&&!B.aliasTypeArguments?$t(K,ge=>Ft(ce,je=>Cee(ge,je))):K,L.outerTypeParameters=K}if(K.length){const ne=ZD(o.mapper,_),ce=qt(K,Vt=>ZS(Vt,ne)),ge=y||o.aliasSymbol,je=y?S:gb(o.aliasTypeArguments,_),Be=(o.objectFlags&134217728?"S":"")+Xg(ce)+qA(ge,je);B.instantiations||(B.instantiations=new Map,B.instantiations.set(Xg(K)+qA(B.aliasSymbol,B.aliasTypeArguments),B));let kt=B.instantiations.get(Be);if(!kt){if(o.objectFlags&134217728)return kt=_me(o,_),B.instantiations.set(Be,kt),kt;const Vt=cp(K,ce);kt=B.objectFlags&4?WRe(o.target,o.node,Vt,ge,je):B.objectFlags&32?iQt(B,Vt,ge,je):_me(B,Vt,ge,je),B.instantiations.set(Be,kt);const Kt=Or(kt);if(kt.flags&3899393&&!(Kt&524288)){const Oi=Ft(ce,Yx);Or(kt)&524288||(Kt&52?kt.objectFlags|=524288|(Oi?1048576:0):kt.objectFlags|=Oi?0:524288)}}return kt}return o}function tQt(o){return!(o.parent.kind===183&&o.parent.typeArguments&&o===o.parent.typeName||o.parent.kind===205&&o.parent.typeArguments&&o===o.parent.qualifier)}function Cee(o,_){if(o.symbol&&o.symbol.declarations&&o.symbol.declarations.length===1){const S=o.symbol.declarations[0].parent;for(let D=_;D!==S;D=D.parent)if(!D||D.kind===241||D.kind===194&&Uo(D.extendsType,y))return!0;return y(_)}return!0;function y(S){switch(S.kind){case 197:return!!o.isThisType;case 80:return!o.isThisType&&N1(S)&&tQt(S)&&Bpt(S)===o;case 186:const D=S.exprName,L=K_(D);if(!ix(L)){const B=Lh(L),K=o.symbol.declarations[0],ne=K.kind===168?K.parent:o.isThisType?K:void 0;if(B.declarations&&ne)return Ft(B.declarations,ce=>UT(ce,ne))||Ft(S.typeArguments,y)}return!0;case 174:case 173:return!S.type&&!!S.body||Ft(S.typeParameters,y)||Ft(S.parameters,y)||!!S.type&&y(S.type)}return!!Uo(S,y)}}function Rz(o){const _=Tm(o);if(_.flags&4194304){const y=Kx(_.type);if(y.flags&262144)return y}}function iQt(o,_,y,S){const D=Rz(o);if(D){const B=io(D,_);if(D!==B)return qmt(a1(B),L,y,S)}return io(Tm(o),_)===Ct?Ct:_me(o,_,y,S);function L(B){if(B.flags&61603843&&B!==Ct&&!fe(B)){if(!o.declaration.nameType){let K;if(ug(B)||B.flags&1&&Hx(D,4)<0&&(K=m_(D))&&up(K,$2))return rQt(B,o,NN(D,B,_));if(Qa(B))return nQt(B,o,D,_);if(w_t(B))return Wa(qt(B.types,L))}return _me(o,NN(D,B,_))}return B}}function Hpt(o,_){return _&1?!0:_&2?!1:o}function nQt(o,_,y,S){const D=o.target.elementFlags,L=o.target.fixedLength,B=L?NN(y,o,S):S,K=qt(GD(o),(je,Be)=>{const kt=D[Be];return Be<L?jpt(_,V_(""+Be),!!(kt&2),B):kt&8?io(_,NN(y,je,S)):Nee(io(_,NN(y,hh(je),S)))??te}),ne=tv(_),ce=ne&4?qt(D,je=>je&1?2:je):ne&8?qt(D,je=>je&2?1:je):D,ge=Hpt(o.target.readonly,tv(_));return Yt(K,vt)?vt:rv(K,ce,ge,o.target.labeledElementDeclarations)}function rQt(o,_,y){const S=jpt(_,hi,!0,y);return fe(S)?vt:hh(S,Hpt(J5(o),tv(_)))}function jpt(o,_,y,S){const D=Mz(S,s1(o),_),L=io(SC(o.target||o),D),B=tv(o);return we&&B&4&&!Au(L,49152)?Zx(L,!0):we&&B&8&&y?Qg(L,524288):L}function _me(o,_,y,S){j.assert(o.symbol,"anonymous type must have symbol to be instantiated");const D=V(o.objectFlags&-1572865|64,o.symbol);if(o.objectFlags&32){D.declaration=o.declaration;const L=s1(o),B=g8e(L);D.typeParameter=B,_=ZD(QD(L,B),_),B.mapper=_}return o.objectFlags&8388608&&(D.node=o.node),o.objectFlags&134217728&&(D.outerTypeParameters=o.outerTypeParameters),D.target=o,D.mapper=_,D.aliasSymbol=y||o.aliasSymbol,D.aliasTypeArguments=y?S:gb(o.aliasTypeArguments,_),D.objectFlags|=D.aliasTypeArguments?lee(D.aliasTypeArguments):0,D}function v8e(o,_,y,S,D){const L=o.root;if(L.outerTypeParameters){const B=qt(L.outerTypeParameters,ce=>ZS(ce,_)),K=(y?"C":"")+Xg(B)+qA(S,D);let ne=L.instantiations.get(K);if(!ne){const ce=cp(L.outerTypeParameters,B),ge=L.checkType,je=L.isDistributive?a1(ZS(ge,ce)):void 0;ne=je&&ge!==je&&je.flags&1179648?qmt(je,Be=>l8e(L,NN(ge,Be,ce),y),S,D):l8e(L,ce,y,S,D),L.instantiations.set(K,ne)}return ne}return o}function io(o,_){return o&&_?zpt(o,_,void 0,void 0):o}function zpt(o,_,y,S){var D;if(!Yx(o))return o;if(R===100||N>=5e6)return(D=Zn)==null||D.instant(Zn.Phase.CheckTypes,"instantiateType_DepthLimit",{typeId:o.id,instantiationDepth:R,instantiationCount:N}),ft(H,k.Type_instantiation_is_excessively_deep_and_possibly_infinite),vt;E++,N++,R++;const L=sQt(o,_,y,S);return R--,L}function sQt(o,_,y,S){const D=o.flags;if(D&262144)return ZS(o,_);if(D&524288){const L=o.objectFlags;if(L&52){if(L&4&&!o.node){const B=o.resolvedTypeArguments,K=gb(B,_);return K!==B?ZRe(o.target,K):o}return L&1024?oQt(o,_):eQt(o,_,y,S)}return o}if(D&3145728){const L=o.flags&1048576?o.origin:void 0,B=L&&L.flags&3145728?L.types:o.types,K=gb(B,_);if(K===B&&y===o.aliasSymbol)return o;const ne=y||o.aliasSymbol,ce=y?S:gb(o.aliasTypeArguments,_);return D&2097152||L&&L.flags&2097152?Wa(K,0,ne,ce):is(K,1,ne,ce)}if(D&4194304)return oy(io(o.type,_));if(D&134217728)return TN(o.texts,gb(o.types,_));if(D&268435456)return JA(o.symbol,io(o.type,_));if(D&8388608){const L=y||o.aliasSymbol,B=y?S:gb(o.aliasTypeArguments,_);return ap(io(o.objectType,_),io(o.indexType,_),o.accessFlags,void 0,L,B)}if(D&16777216)return v8e(o,ZD(o.mapper,_),!1,y,S);if(D&33554432){const L=io(o.baseType,_);if(HO(o))return VRe(L);const B=io(o.constraint,_);return L.flags&8650752&&GA(B)?jRe(L,B):B.flags&3||Da(LN(L),LN(B))?L:L.flags&8650752?jRe(L,B):Wa([B,L])}return o}function oQt(o,_){const y=io(o.mappedType,_);if(!(Or(y)&32))return o;const S=io(o.constraintType,_);if(!(S.flags&4194304))return o;const D=Smt(io(o.source,_),y,S);return D||o}function Fz(o){return o.flags&402915327?o:o.permissiveInstantiation||(o.permissiveInstantiation=io(o,vu))}function LN(o){return o.flags&402915327?o:(o.restrictiveInstantiation||(o.restrictiveInstantiation=io(o,Lc),o.restrictiveInstantiation.restrictiveInstantiation=o.restrictiveInstantiation),o.restrictiveInstantiation)}function aQt(o,_){return nv(o.keyType,io(o.type,_),o.isReadonly,o.declaration)}function Em(o){switch(j.assert(o.kind!==174||Ig(o)),o.kind){case 218:case 219:case 174:case 262:return Upt(o);case 210:return Ft(o.properties,Em);case 209:return Ft(o.elements,Em);case 227:return Em(o.whenTrue)||Em(o.whenFalse);case 226:return(o.operatorToken.kind===57||o.operatorToken.kind===61)&&(Em(o.left)||Em(o.right));case 303:return Em(o.initializer);case 217:return Em(o.expression);case 292:return Ft(o.properties,Em)||z1(o.parent)&&Ft(o.parent.parent.children,Em);case 291:{const{initializer:_}=o;return!!_&&Em(_)}case 294:{const{expression:_}=o;return!!_&&Em(_)}}return!1}function Upt(o){return eX(o)||cQt(o)}function cQt(o){return o.typeParameters||wp(o)||!o.body?!1:o.body.kind!==241?Em(o.body):!!uS(o.body,_=>!!_.expression&&Em(_.expression))}function pme(o){return(lx(o)||Ig(o))&&Upt(o)}function qpt(o){if(o.flags&524288){const _=o1(o);if(_.constructSignatures.length||_.callSignatures.length){const y=V(16,o.symbol);return y.members=_.members,y.properties=_.properties,y.callSignatures=w,y.constructSignatures=w,y.indexInfos=w,y}}else if(o.flags&2097152)return Wa(qt(o.types,qpt));return o}function yb(o,_){return ay(o,_,tp)}function Bz(o,_){return ay(o,_,tp)?-1:0}function b8e(o,_){return ay(o,_,Op)?-1:0}function lQt(o,_){return ay(o,_,ob)?-1:0}function YD(o,_){return ay(o,_,ob)}function See(o,_){return ay(o,_,Cm)}function Da(o,_){return ay(o,_,Op)}function q2(o,_){return o.flags&1048576?Ce(o.types,y=>q2(y,_)):_.flags&1048576?Ft(_.types,y=>q2(o,y)):o.flags&2097152?Ft(o.types,y=>q2(y,_)):o.flags&58982400?q2(Jf(o)||te,_):sv(_)?!!(o.flags&67633152):_===Qu?!!(o.flags&67633152)&&!sv(o):_===kd?!!(o.flags&524288)&&e7e(o):AO(o,SN(_))||ug(_)&&!J5(_)&&q2(o,En)}function mme(o,_){return ay(o,_,Mp)}function wee(o,_){return mme(o,_)||mme(_,o)}function Nh(o,_,y,S,D,L){return lg(o,_,Op,y,S,D,L)}function Xx(o,_,y,S,D,L){return C8e(o,_,Op,y,S,D,L,void 0)}function C8e(o,_,y,S,D,L,B,K){return ay(o,_,y)?!0:!S||!Wz(D,o,_,y,L,B,K)?lg(o,_,y,S,L,B,K):!1}function $pt(o){return!!(o.flags&16777216||o.flags&2097152&&Ft(o.types,$pt))}function Wz(o,_,y,S,D,L,B){if(!o||$pt(y))return!1;if(!lg(_,y,S,void 0)&&uQt(o,_,y,S,D,L,B))return!0;switch(o.kind){case 234:if(!Zce(o))break;case 294:case 217:return Wz(o.expression,_,y,S,D,L,B);case 226:switch(o.operatorToken.kind){case 64:case 28:return Wz(o.right,_,y,S,D,L,B)}break;case 210:return yQt(o,_,y,S,L,B);case 209:return mQt(o,_,y,S,L,B);case 292:return pQt(o,_,y,S,L,B);case 219:return dQt(o,_,y,S,L,B)}return!1}function uQt(o,_,y,S,D,L,B){const K=ia(_,0),ne=ia(_,1);for(const ce of[ne,K])if(Ft(ce,ge=>{const je=Oc(ge);return!(je.flags&131073)&&lg(je,y,S,void 0)})){const ge=B||{};Nh(_,y,o,D,L,ge);const je=ge.errors[ge.errors.length-1];return da(je,Kn(o,ce===ne?k.Did_you_mean_to_use_new_with_this_expression:k.Did_you_mean_to_call_this_expression)),!0}return!1}function dQt(o,_,y,S,D,L){if(Xo(o.body)||Ft(o.parameters,wG))return!1;const B=VN(_);if(!B)return!1;const K=ia(y,0);if(!P(K))return!1;const ne=o.body,ce=Oc(B),ge=is(qt(K,Oc));if(!lg(ce,ge,S,void 0)){const je=ne&&Wz(ne,ce,ge,S,void 0,D,L);if(je)return je;const Be=L||{};if(lg(ce,ge,S,ne,void 0,D,Be),Be.errors)return y.symbol&&P(y.symbol.declarations)&&da(Be.errors[Be.errors.length-1],Kn(y.symbol.declarations[0],k.The_expected_type_comes_from_the_return_type_of_this_signature)),!(nd(o)&2)&&!Yu(ce,"then")&&lg(ate(ce),ge,S,void 0)&&da(Be.errors[Be.errors.length-1],Kn(o,k.Did_you_mean_to_mark_this_function_as_async)),!0}return!1}function Jpt(o,_,y){const S=Gx(_,y);if(S)return S;if(_.flags&1048576){const D=imt(o,_);if(D)return Gx(D,y)}}function Gpt(o,_){qee(o,_,!1);const y=iF(o,1);return Xz(),y}function xee(o,_,y,S,D,L){let B=!1;for(const K of o){const{errorNode:ne,innerExpression:ce,nameType:ge,errorMessage:je}=K;let Be=Jpt(_,y,ge);if(!Be||Be.flags&8388608)continue;let kt=Gx(_,ge);if(!kt)continue;const Vt=ame(ge,void 0);if(!lg(kt,Be,S,void 0)){const Kt=ce&&Wz(ce,kt,Be,S,void 0,D,L);if(B=!0,!Kt){const Oi=L||{},Ki=ce?Gpt(ce,kt):kt;if(Ne&&yme(Ki,Be)){const qn=Kn(ne,k.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target,Hn(Ki),Hn(Be));lc.add(qn),Oi.errors=[qn]}else{const qn=!!(Vt&&(Ta(y,Vt)||pt).flags&16777216),Qn=!!(Vt&&(Ta(_,Vt)||pt).flags&16777216);Be=IC(Be,qn),kt=IC(kt,qn&&Qn),lg(Ki,Be,S,ne,je,D,Oi)&&Ki!==kt&&lg(kt,Be,S,ne,je,D,Oi)}if(Oi.errors){const qn=Oi.errors[Oi.errors.length-1],Qn=Jm(ge)?Gm(ge):void 0,rn=Qn!==void 0?Ta(y,Qn):void 0;let Ui=!1;if(!rn){const fr=Ez(y,ge);fr&&fr.declaration&&!_n(fr.declaration).hasNoDefaultLib&&(Ui=!0,da(qn,Kn(fr.declaration,k.The_expected_type_comes_from_this_index_signature)))}if(!Ui&&(rn&&P(rn.declarations)||y.symbol&&P(y.symbol.declarations))){const fr=rn&&P(rn.declarations)?rn.declarations[0]:y.symbol.declarations[0];_n(fr).hasNoDefaultLib||da(qn,Kn(fr,k.The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1,Qn&&!(ge.flags&8192)?Ws(Qn):Hn(ge),Hn(y)))}}}}}return B}function fQt(o,_,y,S,D,L){const B=ad(y,kme),K=ad(y,ge=>!kme(ge)),ne=K!==Ai?w5e(13,0,K,void 0):void 0;let ce=!1;for(let ge=o.next();!ge.done;ge=o.next()){const{errorNode:je,innerExpression:Be,nameType:kt,errorMessage:Vt}=ge.value;let Kt=ne;const Oi=B!==Ai?Jpt(_,B,kt):void 0;if(Oi&&!(Oi.flags&8388608)&&(Kt=ne?is([ne,Oi]):Oi),!Kt)continue;let Ki=Gx(_,kt);if(!Ki)continue;const qn=ame(kt,void 0);if(!lg(Ki,Kt,S,void 0)){const Qn=Be&&Wz(Be,Ki,Kt,S,void 0,D,L);if(ce=!0,!Qn){const rn=L||{},Ui=Be?Gpt(Be,Ki):Ki;if(Ne&&yme(Ui,Kt)){const fr=Kn(je,k.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target,Hn(Ui),Hn(Kt));lc.add(fr),rn.errors=[fr]}else{const fr=!!(qn&&(Ta(B,qn)||pt).flags&16777216),Gr=!!(qn&&(Ta(_,qn)||pt).flags&16777216);Kt=IC(Kt,fr),Ki=IC(Ki,fr&&Gr),lg(Ui,Kt,S,je,Vt,D,rn)&&Ui!==Ki&&lg(Ki,Kt,S,je,Vt,D,rn)}}}}return ce}function*hQt(o){if(P(o.properties))for(const _ of o.properties)GP(_)||S7e(iH(_.name))||(yield{errorNode:_.name,innerExpression:_.initializer,nameType:V_(iH(_.name))})}function*_Qt(o,_){if(!P(o.children))return;let y=0;for(let S=0;S<o.children.length;S++){const D=o.children[S],L=v0(S-y),B=Kpt(D,L,_);B?yield B:y++}}function Kpt(o,_,y){switch(o.kind){case 294:return{errorNode:o,innerExpression:o.expression,nameType:_};case 12:if(o.containsOnlyTriviaWhiteSpaces)break;return{errorNode:o,innerExpression:void 0,nameType:_,errorMessage:y()};case 284:case 285:case 288:return{errorNode:o,innerExpression:o,nameType:_};default:return j.assertNever(o,"Found invalid jsx child")}}function pQt(o,_,y,S,D,L){let B=xee(hQt(o),_,y,S,D,L),K;if(z1(o.parent)&&Gv(o.parent.parent)){const ce=o.parent.parent,ge=Jee(BN(o)),je=ge===void 0?"children":Ws(ge),Be=V_(je),kt=ap(y,Be),Vt=r3(ce.children);if(!P(Vt))return B;const Kt=P(Vt)>1;let Oi,Ki;if(ome(!1)!==oo){const Qn=opt(Je);Oi=ad(kt,rn=>Da(rn,Qn)),Ki=ad(kt,rn=>!Da(rn,Qn))}else Oi=ad(kt,kme),Ki=ad(kt,Qn=>!kme(Qn));if(Kt){if(Oi!==Ai){const Qn=rv(Zme(ce,0)),rn=_Qt(ce,ne);B=fQt(rn,Qn,Oi,S,D,L)||B}else if(!ay(ap(_,Be),kt,S)){B=!0;const Qn=ft(ce.openingElement.tagName,k.This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided,je,Hn(kt));L&&L.skipLogging&&(L.errors||(L.errors=[])).push(Qn)}}else if(Ki!==Ai){const Qn=Vt[0],rn=Kpt(Qn,Be,ne);rn&&(B=xee(function*(){yield rn}(),_,y,S,D,L)||B)}else if(!ay(ap(_,Be),kt,S)){B=!0;const Qn=ft(ce.openingElement.tagName,k.This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided,je,Hn(kt));L&&L.skipLogging&&(L.errors||(L.errors=[])).push(Qn)}}return B;function ne(){if(!K){const ce=uu(o.parent.tagName),ge=Jee(BN(o)),je=ge===void 0?"children":Ws(ge),Be=ap(y,V_(je)),kt=k._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2;K={...kt,key:"!!ALREADY FORMATTED!!",message:DP(kt,ce,je,Hn(Be))}}return K}}function*Xpt(o,_){const y=P(o.elements);if(y)for(let S=0;S<y;S++){if(G5(_)&&!Ta(_,""+S))continue;const D=o.elements[S];if(Bd(D))continue;const L=v0(S),B=oge(D);yield{errorNode:B,innerExpression:B,nameType:L}}}function mQt(o,_,y,S,D,L){if(y.flags&402915324)return!1;if(G5(_))return xee(Xpt(o,y),_,y,S,D,L);qee(o,y,!1);const B=Tgt(o,1,!0);return Xz(),G5(B)?xee(Xpt(o,y),B,y,S,D,L):!1}function*gQt(o){if(P(o.properties))for(const _ of o.properties){if(Kv(_))continue;const y=$A(xr(_),8576);if(!(!y||y.flags&131072))switch(_.kind){case 178:case 177:case 174:case 304:yield{errorNode:_.name,innerExpression:void 0,nameType:y};break;case 303:yield{errorNode:_.name,innerExpression:_.initializer,nameType:y,errorMessage:YW(_.name)?k.Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1:void 0};break;default:j.assertNever(_)}}}function yQt(o,_,y,S,D,L){return y.flags&402915324?!1:xee(gQt(o),_,y,S,D,L)}function Qpt(o,_,y,S,D){return lg(o,_,Mp,y,S,D)}function vQt(o,_,y){return S8e(o,_,4,!1,void 0,void 0,b8e,void 0)!==0}function gme(o){if(!o.typeParameters&&(!o.thisParameter||Nc(rte(o.thisParameter)))&&o.parameters.length===1&&Ch(o)){const _=rte(o.parameters[0]);return!!((ug(_)?Pl(_)[0]:_).flags&131073&&Oc(o).flags&3)}return!1}function S8e(o,_,y,S,D,L,B,K){if(o===_||!(y&16&&gme(o))&&gme(_))return-1;if(y&16&&gme(o)&&!gme(_))return 0;const ne=dp(_);if(!ov(_)&&(y&8?ov(o)||dp(o)>ne:fy(o)>ne))return S&&!(y&8)&&D(k.Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1,fy(o),ne),0;o.typeParameters&&o.typeParameters!==_.typeParameters&&(_=mKt(_),o=r0t(o,_,void 0,B));const ge=dp(o),je=tU(o),Be=tU(_);(je||Be)&&io(je||Be,K);const kt=_.declaration?_.declaration.kind:0,Vt=!(y&3)&&he&&kt!==174&&kt!==173&&kt!==176;let Kt=-1;const Oi=j2(o);if(Oi&&Oi!==Ri){const Qn=j2(_);if(Qn){const rn=!Vt&&B(Oi,Qn,!1)||B(Qn,Oi,S);if(!rn)return S&&D(k.The_this_types_of_each_signature_are_incompatible),0;Kt&=rn}}const Ki=je||Be?Math.min(ge,ne):Math.max(ge,ne),qn=je||Be?Ki-1:-1;for(let Qn=0;Qn<Ki;Qn++){const rn=Qn===qn?E0t(o,Qn):nE(o,Qn),Ui=Qn===qn?E0t(_,Qn):nE(_,Qn);if(rn&&Ui&&(rn!==Ui||y&8)){const fr=y&3||i0t(o,Qn)?void 0:VN(EC(rn)),Gr=y&3||i0t(_,Qn)?void 0:VN(EC(Ui));let Ur=fr&&Gr&&!cg(fr)&&!cg(Gr)&&qO(rn,50331648)===qO(Ui,50331648)?S8e(Gr,fr,y&8|(Vt?2:1),S,D,L,B,K):!(y&3)&&!Vt&&B(rn,Ui,!1)||B(Ui,rn,S);if(Ur&&y&8&&Qn>=fy(o)&&Qn<fy(_)&&B(rn,Ui,!1)&&(Ur=0),!Ur)return S&&D(k.Types_of_parameters_0_and_1_are_incompatible,Ws(Y5(o,Qn)),Ws(Y5(_,Qn))),0;Kt&=Ur}}if(!(y&4)){const Qn=Qpe(_)?Je:_.declaration&&dy(_.declaration)?W_(wc(_.declaration.symbol)):Oc(_);if(Qn===Ri||Qn===Je)return Kt;const rn=Qpe(o)?Je:o.declaration&&dy(o.declaration)?W_(wc(o.declaration.symbol)):Oc(o),Ui=cg(_);if(Ui){const fr=cg(o);if(fr)Kt&=bQt(fr,Ui,S,D,B);else if(yTe(Ui)||vTe(Ui))return S&&D(k.Signature_0_must_be_a_type_predicate,B2(o)),0}else Kt&=y&1&&B(Qn,rn,!1)||B(rn,Qn,S),!Kt&&S&&L&&L(rn,Qn)}return Kt}function bQt(o,_,y,S,D){if(o.kind!==_.kind)return y&&(S(k.A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard),S(k.Type_predicate_0_is_not_assignable_to_1,ty(o),ty(_))),0;if((o.kind===1||o.kind===3)&&o.parameterIndex!==_.parameterIndex)return y&&(S(k.Parameter_0_is_not_in_the_same_position_as_parameter_1,o.parameterName,_.parameterName),S(k.Type_predicate_0_is_not_assignable_to_1,ty(o),ty(_))),0;const L=o.type===_.type?-1:o.type&&_.type?D(o.type,_.type,y):0;return L===0&&y&&S(k.Type_predicate_0_is_not_assignable_to_1,ty(o),ty(_)),L}function CQt(o,_){const y=Lz(o),S=Lz(_),D=Oc(y),L=Oc(S);return L===Ri||ay(L,D,Op)||ay(D,L,Op)?vQt(y,S):!1}function w8e(o){return o!==tc&&o.properties.length===0&&o.callSignatures.length===0&&o.constructSignatures.length===0&&o.indexInfos.length===0}function TC(o){return o.flags&524288?!op(o)&&w8e(o1(o)):o.flags&67108864?!0:o.flags&1048576?Ft(o.types,TC):o.flags&2097152?Ce(o.types,TC):!1}function sv(o){return!!(Or(o)&16&&(o.members&&w8e(o)||o.symbol&&o.symbol.flags&2048&&qx(o.symbol).size===0))}function SQt(o){if(we&&o.flags&1048576){if(!(o.objectFlags&33554432)){const _=o.types;o.objectFlags|=33554432|(_.length>=3&&_[0].flags&32768&&_[1].flags&65536&&Ft(_,sv)?67108864:0)}return!!(o.objectFlags&67108864)}return!1}function UO(o){return!!((o.flags&1048576?o.types[0]:o).flags&32768)}function Zpt(o){const _=o.flags&1048576?o.types[0]:o;return!!(_.flags&32768)&&_!==le}function Ypt(o){return o.flags&524288&&!op(o)&&Ac(o).length===0&&Ih(o).length===1&&!!pb(o,st)||o.flags&3145728&&Ce(o.types,Ypt)||!1}function x8e(o,_,y){const S=o.flags&8?Qp(o):o,D=_.flags&8?Qp(_):_;if(S===D)return!0;if(S.escapedName!==D.escapedName||!(S.flags&256)||!(D.flags&256))return!1;const L=Ba(S)+","+Ba(D),B=Ix.get(L);if(B!==void 0&&!(B&2&&y))return!!(B&1);const K=Yn(D);for(const ne of Ac(Yn(S)))if(ne.flags&8){const ce=Ta(K,ne.escapedName);if(!ce||!(ce.flags&8))return y&&y(k.Property_0_is_missing_in_type_1,Eu(ne),Hn(gl(D),void 0,64)),Ix.set(L,2),!1;const ge=jN(ql(ne,306)).value,je=jN(ql(ce,306)).value;if(ge!==je){const Be=typeof ge=="string",kt=typeof je=="string";if(ge!==void 0&&je!==void 0){if(y){const Vt=Be?`"${Vy(ge)}"`:ge,Kt=kt?`"${Vy(je)}"`:je;y(k.Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given,Eu(D),Eu(ce),Kt,Vt)}return Ix.set(L,2),!1}if(Be||kt){if(y){const Vt=ge??je;j.assert(typeof Vt=="string");const Kt=`"${Vy(Vt)}"`;y(k.One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value,Eu(D),Eu(ce),Kt)}return Ix.set(L,2),!1}}}return Ix.set(L,1),!0}function Vz(o,_,y,S){const D=o.flags,L=_.flags;return L&1||D&131072||o===Ct||L&2&&!(y===Cm&&D&1)?!0:L&131072?!1:!!(D&402653316&&L&4||D&128&&D&1024&&L&128&&!(L&1024)&&o.value===_.value||D&296&&L&8||D&256&&D&1024&&L&256&&!(L&1024)&&o.value===_.value||D&2112&&L&64||D&528&&L&16||D&12288&&L&4096||D&32&&L&32&&o.symbol.escapedName===_.symbol.escapedName&&x8e(o.symbol,_.symbol,S)||D&1024&&L&1024&&(D&1048576&&L&1048576&&x8e(o.symbol,_.symbol,S)||D&2944&&L&2944&&o.value===_.value&&x8e(o.symbol,_.symbol,S))||D&32768&&(!we&&!(L&3145728)||L&49152)||D&65536&&(!we&&!(L&3145728)||L&65536)||D&524288&&L&67108864&&!(y===Cm&&sv(o)&&!(Or(o)&8192))||(y===Op||y===Mp)&&(D&1||D&8&&(L&32||L&256&&L&1024)||D&256&&!(D&1024)&&(L&32||L&256&&L&1024&&o.value===_.value)||SQt(_)))}function ay(o,_,y){if(XD(o)&&(o=o.regularType),XD(_)&&(_=_.regularType),o===_)return!0;if(y!==tp){if(y===Mp&&!(_.flags&131072)&&Vz(_,o,y)||Vz(o,_,y))return!0}else if(!((o.flags|_.flags)&61865984)){if(o.flags!==_.flags)return!1;if(o.flags&67358815)return!0}if(o.flags&524288&&_.flags&524288){const S=y.get(Cme(o,_,0,y,!1));if(S!==void 0)return!!(S&1)}return o.flags&469499904||_.flags&469499904?lg(o,_,y,void 0):!1}function emt(o,_){return Or(o)&2048&&S7e(_.escapedName)}function kee(o,_){for(;;){const y=XD(o)?o.regularType:Qx(o)?kQt(o,_):Or(o)&4?o.node?wC(o.target,Pl(o)):P8e(o)||o:o.flags&3145728?wQt(o,_):o.flags&33554432?_?o.baseType:zRe(o):o.flags&25165824?kC(o,_):o;if(y===o)return y;o=y}}function wQt(o,_){const y=a1(o);if(y!==o)return y;if(o.flags&2097152&&xQt(o)){const S=Wr(o.types,D=>kee(D,_));if(S!==o.types)return Wa(S)}return o}function xQt(o){let _=!1,y=!1;for(const S of o.types)if(_||(_=!!(S.flags&465829888)),y||(y=!!(S.flags&98304)||sv(S)),_&&y)return!0;return!1}function kQt(o,_){const y=GD(o),S=Wr(y,D=>D.flags&25165824?kC(D,_):D);return y!==S?YRe(o.target,S):o}function lg(o,_,y,S,D,L,B){var K;let ne,ce,ge,je,Be,kt,Vt=0,Kt=0,Oi=0,Ki=0,qn=!1,Qn=0,rn=0,Ui,fr,Gr=16e6-y.size>>3;j.assert(y!==tp||!S,"no error reporting in identity checking");const vs=or(o,_,3,!!S,D);if(fr&&Al(),qn){const _t=Cme(o,_,0,y,!1);y.set(_t,2|(Gr<=0?32:64)),(K=Zn)==null||K.instant(Zn.Phase.CheckTypes,"checkTypeRelatedTo_DepthLimit",{sourceId:o.id,targetId:_.id,depth:Kt,targetDepth:Oi});const xt=Gr<=0?k.Excessive_complexity_comparing_types_0_and_1:k.Excessive_stack_depth_comparing_types_0_and_1,ai=ft(S||H,xt,Hn(o),Hn(_));B&&(B.errors||(B.errors=[])).push(ai)}else if(ne){if(L){const ai=L();ai&&(TDe(ai,ne),ne=ai)}let _t;if(D&&S&&!vs&&o.symbol){const ai=Ys(o.symbol);if(ai.originatingImport&&!zp(ai.originatingImport)&&lg(Yn(ai.target),_,y,void 0)){const At=Kn(ai.originatingImport,k.Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead);_t=fn(_t,At)}}const xt=Bv(_n(S),S,ne,_t);ce&&da(xt,...ce),B&&(B.errors||(B.errors=[])).push(xt),(!B||!B.skipLogging)&&lc.add(xt)}return S&&B&&B.skipLogging&&vs===0&&j.assert(!!B.errors,"missed opportunity to interact with error."),vs!==0;function Ur(_t){ne=_t.errorInfo,Ui=_t.lastSkippedInfo,fr=_t.incompatibleStack,Qn=_t.overrideNextErrorInfo,rn=_t.skipParentCounter,ce=_t.relatedInfo}function ga(){return{errorInfo:ne,lastSkippedInfo:Ui,incompatibleStack:fr==null?void 0:fr.slice(),overrideNextErrorInfo:Qn,skipParentCounter:rn,relatedInfo:ce==null?void 0:ce.slice()}}function fa(_t,...xt){Qn++,Ui=void 0,(fr||(fr=[])).push([_t,...xt])}function Al(){const _t=fr||[];fr=void 0;const xt=Ui;if(Ui=void 0,_t.length===1){Po(..._t[0]),xt&&wu(void 0,...xt);return}let ai="";const qi=[];for(;_t.length;){const[At,...ui]=_t.pop();switch(At.code){case k.Types_of_property_0_are_incompatible.code:{ai.indexOf("new ")===0&&(ai=`(${ai})`);const yn=""+ui[0];ai.length===0?ai=`${yn}`:J_(yn,Ja(Q))?ai=`${ai}.${yn}`:yn[0]==="["&&yn[yn.length-1]==="]"?ai=`${ai}${yn}`:ai=`${ai}[${yn}]`;break}case k.Call_signature_return_types_0_and_1_are_incompatible.code:case k.Construct_signature_return_types_0_and_1_are_incompatible.code:case k.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code:case k.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code:{if(ai.length===0){let yn=At;At.code===k.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code?yn=k.Call_signature_return_types_0_and_1_are_incompatible:At.code===k.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code&&(yn=k.Construct_signature_return_types_0_and_1_are_incompatible),qi.unshift([yn,ui[0],ui[1]])}else{const yn=At.code===k.Construct_signature_return_types_0_and_1_are_incompatible.code||At.code===k.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code?"new ":"",ni=At.code===k.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code||At.code===k.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code?"":"...";ai=`${yn}${ai}(${ni})`}break}case k.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target.code:{qi.unshift([k.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target,ui[0],ui[1]]);break}case k.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target.code:{qi.unshift([k.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target,ui[0],ui[1],ui[2]]);break}default:return j.fail(`Unhandled Diagnostic: ${At.code}`)}}ai?Po(ai[ai.length-1]===")"?k.The_types_returned_by_0_are_incompatible_between_these_types:k.The_types_of_0_are_incompatible_between_these_types,ai):qi.shift();for(const[At,...ui]of qi){const yn=At.elidedInCompatabilityPyramid;At.elidedInCompatabilityPyramid=!1,Po(At,...ui),At.elidedInCompatabilityPyramid=yn}xt&&wu(void 0,...xt)}function Po(_t,...xt){j.assert(!!S),fr&&Al(),!_t.elidedInCompatabilityPyramid&&(rn===0?ne=jo(ne,_t,...xt):rn--)}function fu(_t,...xt){Po(_t,...xt),rn++}function Ef(_t){j.assert(!!ne),ce?ce.push(_t):ce=[_t]}function wu(_t,xt,ai){fr&&Al();const[qi,At]=O5(xt,ai);let ui=xt,yn=qi;if(Hz(xt)&&!k8e(ai)&&(ui=DC(xt),j.assert(!Da(ui,ai),"generalized source shouldn't be assignable"),yn=EO(ui)),(ai.flags&8388608&&!(xt.flags&8388608)?ai.objectType.flags:ai.flags)&262144&&ai!==Ve&&ai!==_e){const Yi=Jf(ai);let Gn;Yi&&(Da(ui,Yi)||(Gn=Da(xt,Yi)))?Po(k._0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2,Gn?qi:yn,At,Hn(Yi)):(ne=void 0,Po(k._0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1,At,yn))}if(_t)_t===k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1&&Ne&&tmt(xt,ai).length&&(_t=k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties);else if(y===Mp)_t=k.Type_0_is_not_comparable_to_type_1;else if(qi===At)_t=k.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated;else if(Ne&&tmt(xt,ai).length)_t=k.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties;else{if(xt.flags&128&&ai.flags&1048576){const Yi=Fei(xt,ai);if(Yi){Po(k.Type_0_is_not_assignable_to_type_1_Did_you_mean_2,yn,At,Hn(Yi));return}}_t=k.Type_0_is_not_assignable_to_type_1}Po(_t,yn,At)}function bn(_t,xt){const ai=Wx(_t.symbol)?Hn(_t,_t.symbol.valueDeclaration):Hn(_t),qi=Wx(xt.symbol)?Hn(xt,xt.symbol.valueDeclaration):Hn(xt);(po===_t&&st===xt||ic===_t&&hi===xt||sc===_t&&fi===xt||Y_t()===_t&&wi===xt)&&Po(k._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible,qi,ai)}function Fn(_t,xt,ai){return Qa(_t)?_t.target.readonly&&Iee(xt)?(ai&&Po(k.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1,Hn(_t),Hn(xt)),!1):$2(xt):J5(_t)&&Iee(xt)?(ai&&Po(k.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1,Hn(_t),Hn(xt)),!1):Qa(xt)?ug(_t):!0}function js(_t,xt,ai){return or(_t,xt,3,ai)}function or(_t,xt,ai=3,qi=!1,At,ui=0){if(_t===xt)return-1;if(_t.flags&524288&&xt.flags&402784252)return y===Mp&&!(xt.flags&131072)&&Vz(xt,_t,y)||Vz(_t,xt,y,qi?Po:void 0)?-1:(qi&&Do(_t,xt,_t,xt,At),0);const yn=kee(_t,!1);let ni=kee(xt,!0);if(yn===ni)return-1;if(y===tp)return yn.flags!==ni.flags?0:yn.flags&67358815?-1:(La(yn,ni),cF(yn,ni,!1,0,ai));if(yn.flags&262144&&wN(yn)===ni)return-1;if(yn.flags&470302716&&ni.flags&1048576){const Yi=ni.types,Gn=Yi.length===2&&Yi[0].flags&98304?Yi[1]:Yi.length===3&&Yi[0].flags&98304&&Yi[1].flags&98304?Yi[2]:void 0;if(Gn&&!(Gn.flags&98304)&&(ni=kee(Gn,!0),yn===ni))return-1}if(y===Mp&&!(ni.flags&131072)&&Vz(ni,yn,y)||Vz(yn,ni,y,qi?Po:void 0))return-1;if(yn.flags&469499904||ni.flags&469499904){if(!(ui&2)&&ew(yn)&&Or(yn)&8192&&xu(yn,ni,qi))return qi&&wu(At,yn,xt.aliasSymbol?xt:ni),0;const Gn=(y!==Mp||c1(yn))&&!(ui&2)&&yn.flags&405405692&&yn!==Qu&&ni.flags&2621440&&D8e(ni)&&(Ac(yn).length>0||Age(yn)),Gi=!!(Or(yn)&2048);if(Gn&&!DQt(yn,ni,Gi)){if(qi){const Hr=Hn(_t.aliasSymbol?_t:yn),xs=Hn(xt.aliasSymbol?xt:ni),ns=ia(yn,0),Fo=ia(yn,1);ns.length>0&&or(Oc(ns[0]),ni,1,!1)||Fo.length>0&&or(Oc(Fo[0]),ni,1,!1)?Po(k.Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it,Hr,xs):Po(k.Type_0_has_no_properties_in_common_with_type_1,Hr,xs)}return 0}La(yn,ni);const Ln=yn.flags&1048576&&yn.types.length<4&&!(ni.flags&1048576)||ni.flags&1048576&&ni.types.length<4&&!(yn.flags&469499904)?hf(yn,ni,qi,ui):cF(yn,ni,qi,ui,ai);if(Ln)return Ln}return qi&&Do(_t,xt,yn,ni,At),0}function Do(_t,xt,ai,qi,At){var ui,yn;const ni=!!P8e(_t),Yi=!!P8e(xt);ai=_t.aliasSymbol||ni?_t:ai,qi=xt.aliasSymbol||Yi?xt:qi;let Gn=Qn>0;if(Gn&&Qn--,ai.flags&524288&&qi.flags&524288){const Gi=ne;Fn(ai,qi,!0),ne!==Gi&&(Gn=!!ne)}if(ai.flags&524288&&qi.flags&402784252)bn(ai,qi);else if(ai.symbol&&ai.flags&524288&&Qu===ai)Po(k.The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead);else if(Or(ai)&2048&&qi.flags&2097152){const Gi=qi.types,zn=iE(hm.IntrinsicAttributes,S),Ln=iE(hm.IntrinsicClassAttributes,S);if(!fe(zn)&&!fe(Ln)&&(Yt(Gi,zn)||Yt(Gi,Ln)))return}else ne=ERe(ne,xt);if(!At&&Gn){const Gi=ga();wu(At,ai,qi);let zn;ne&&ne!==Gi.errorInfo&&(zn={code:ne.code,messageText:ne.messageText}),Ur(Gi),zn&&ne&&(ne.canonicalHead=zn),Ui=[ai,qi];return}if(wu(At,ai,qi),ai.flags&262144&&((yn=(ui=ai.symbol)==null?void 0:ui.declarations)!=null&&yn[0])&&!wN(ai)){const Gi=g8e(ai);if(Gi.constraint=io(qi,QD(ai,Gi)),see(Gi)){const zn=Hn(qi,ai.symbol.declarations[0]);Ef(Kn(ai.symbol.declarations[0],k.This_type_parameter_might_need_an_extends_0_constraint,zn))}}}function La(_t,xt){if(Zn&&_t.flags&3145728&&xt.flags&3145728){const ai=_t,qi=xt;if(ai.objectFlags&qi.objectFlags&32768)return;const At=ai.types.length,ui=qi.types.length;At*ui>1e6&&Zn.instant(Zn.Phase.CheckTypes,"traceUnionsOrIntersectionsTooLarge_DepthLimit",{sourceId:_t.id,sourceSize:At,targetId:xt.id,targetSize:ui,pos:S==null?void 0:S.pos,end:S==null?void 0:S.end})}}function Ol(_t,xt){return is(oi(_t,(qi,At)=>{var ui;At=Kh(At);const yn=At.flags&3145728?oee(At,xt):UD(At,xt),ni=yn&&Yn(yn)||((ui=UA(At,xt))==null?void 0:ui.type)||tt;return fn(qi,ni)},void 0)||w)}function xu(_t,xt,ai){var qi;if(!Zz(xt)||!De&&Or(xt)&4096)return!1;const At=!!(Or(_t)&2048);if((y===Op||y===Mp)&&(Q5(Qu,xt)||!At&&TC(xt)))return!1;let ui=xt,yn;xt.flags&1048576&&(ui=Eyt(_t,xt,or)||qoi(xt),yn=ui.flags&1048576?ui.types:[ui]);for(const ni of Ac(_t))if(nc(ni,_t.symbol)&&!emt(_t,ni)){if(!ege(ui,ni.escapedName,At)){if(ai){const Yi=ad(ui,Zz);if(!S)return j.fail();if(cD(S)||oh(S)||oh(S.parent)){ni.valueDeclaration&&U1(ni.valueDeclaration)&&_n(S)===_n(ni.valueDeclaration.name)&&(S=ni.valueDeclaration.name);const Gn=eo(ni),Gi=Ggt(Gn,Yi),zn=Gi?eo(Gi):void 0;zn?Po(k.Property_0_does_not_exist_on_type_1_Did_you_mean_2,Gn,Hn(Yi),zn):Po(k.Property_0_does_not_exist_on_type_1,Gn,Hn(Yi))}else{const Gn=((qi=_t.symbol)==null?void 0:qi.declarations)&&Ra(_t.symbol.declarations);let Gi;if(ni.valueDeclaration&&Qi(ni.valueDeclaration,zn=>zn===Gn)&&_n(Gn)===_n(S)){const zn=ni.valueDeclaration;j.assertNode(zn,Ub);const Ln=zn.name;S=Ln,ot(Ln)&&(Gi=Kgt(Ln,Yi))}Gi!==void 0?fu(k.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2,eo(ni),Hn(Yi),Gi):fu(k.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1,eo(ni),Hn(Yi))}}return!0}if(yn&&!or(Yn(ni),Ol(yn,ni.escapedName),3,ai))return ai&&fa(k.Types_of_property_0_are_incompatible,eo(ni)),!0}return!1}function nc(_t,xt){return _t.valueDeclaration&&xt.valueDeclaration&&_t.valueDeclaration.parent===xt.valueDeclaration}function hf(_t,xt,ai,qi){if(_t.flags&1048576){if(xt.flags&1048576){const At=_t.origin;if(At&&At.flags&2097152&&xt.aliasSymbol&&Yt(At.types,xt))return-1;const ui=xt.origin;if(ui&&ui.flags&1048576&&_t.aliasSymbol&&Yt(ui.types,_t))return-1}return y===Mp?zu(_t,xt,ai&&!(_t.flags&402784252),qi):nw(_t,xt,ai&&!(_t.flags&402784252),qi)}if(xt.flags&1048576)return ul(Uz(_t),xt,ai&&!(_t.flags&402784252)&&!(xt.flags&402784252),qi);if(xt.flags&2097152)return Im(_t,xt,ai,2);if(y===Mp&&xt.flags&402784252){const At=Wr(_t.types,ui=>ui.flags&465829888?Jf(ui)||te:ui);if(At!==_t.types){if(_t=Wa(At),_t.flags&131072)return 0;if(!(_t.flags&2097152))return or(_t,xt,1,!1)||or(xt,_t,1,!1)}}return zu(_t,xt,!1,1)}function Ou(_t,xt){let ai=-1;const qi=_t.types;for(const At of qi){const ui=ul(At,xt,!1,0);if(!ui)return 0;ai&=ui}return ai}function ul(_t,xt,ai,qi){const At=xt.types;if(xt.flags&1048576){if(mb(At,_t))return-1;if(y!==Mp&&Or(xt)&32768&&!(_t.flags&1024)&&(_t.flags&2688||(y===ob||y===Cm)&&_t.flags&256)){const yn=_t===_t.regularType?_t.freshType:_t.regularType,ni=_t.flags&128?st:_t.flags&256?hi:_t.flags&2048?vn:void 0;return ni&&mb(At,ni)||yn&&mb(At,yn)?-1:0}const ui=Pmt(xt,_t);if(ui){const yn=or(_t,ui,2,!1,void 0,qi);if(yn)return yn}}for(const ui of At){const yn=or(_t,ui,2,!1,void 0,qi);if(yn)return yn}if(ai){const ui=imt(_t,xt,or);ui&&or(_t,ui,2,!0,void 0,qi)}return 0}function Im(_t,xt,ai,qi){let At=-1;const ui=xt.types;for(const yn of ui){const ni=or(_t,yn,2,ai,void 0,qi);if(!ni)return 0;At&=ni}return At}function zu(_t,xt,ai,qi){const At=_t.types;if(_t.flags&1048576&&mb(At,xt))return-1;const ui=At.length;for(let yn=0;yn<ui;yn++){const ni=or(At[yn],xt,1,ai&&yn===ui-1,void 0,qi);if(ni)return ni}return 0}function ed(_t,xt){return _t.flags&1048576&&xt.flags&1048576&&!(_t.types[0].flags&32768)&&xt.types[0].flags&32768?Z5(xt,-32769):xt}function nw(_t,xt,ai,qi){let At=-1;const ui=_t.types,yn=ed(_t,xt);for(let ni=0;ni<ui.length;ni++){const Yi=ui[ni];if(yn.flags&1048576&&ui.length>=yn.types.length&&ui.length%yn.types.length===0){const Gi=or(Yi,yn.types[ni%yn.types.length],3,!1,void 0,qi);if(Gi){At&=Gi;continue}}const Gn=or(Yi,xt,1,ai,void 0,qi);if(!Gn)return 0;At&=Gn}return At}function tM(_t=w,xt=w,ai=w,qi,At){if(_t.length!==xt.length&&y===tp)return 0;const ui=_t.length<=xt.length?_t.length:xt.length;let yn=-1;for(let ni=0;ni<ui;ni++){const Yi=ni<ai.length?ai[ni]:1,Gn=Yi&7;if(Gn!==4){const Gi=_t[ni],zn=xt[ni];let Ln=-1;if(Yi&8?Ln=y===tp?or(Gi,zn,3,!1):Bz(Gi,zn):Gn===1?Ln=or(Gi,zn,3,qi,void 0,At):Gn===2?Ln=or(zn,Gi,3,qi,void 0,At):Gn===3?(Ln=or(zn,Gi,3,!1),Ln||(Ln=or(Gi,zn,3,qi,void 0,At))):(Ln=or(Gi,zn,3,qi,void 0,At),Ln&&(Ln&=or(zn,Gi,3,qi,void 0,At))),!Ln)return 0;yn&=Ln}}return yn}function cF(_t,xt,ai,qi,At){var ui,yn,ni;if(qn)return 0;const Yi=Cme(_t,xt,qi,y,!1),Gn=y.get(Yi);if(Gn!==void 0&&!(ai&&Gn&2&&!(Gn&96))){if(Ls){const Fo=Gn&24;Fo&8&&io(_t,wf),Fo&16&&io(_t,ja)}if(ai&&Gn&96){const Fo=Gn&32?k.Excessive_complexity_comparing_types_0_and_1:k.Excessive_stack_depth_comparing_types_0_and_1;Po(Fo,Hn(_t),Hn(xt)),Qn++}return Gn&1?-1:0}if(Gr<=0)return qn=!0,0;if(!ge)ge=[],je=new Set,Be=[],kt=[];else{if(je.has(Yi))return 3;const Fo=Yi.startsWith("*")?Cme(_t,xt,qi,y,!0):void 0;if(Fo&&je.has(Fo))return 3;if(Kt===100||Oi===100)return qn=!0,0}const Gi=Vt;ge[Vt]=Yi,je.add(Yi),Vt++;const zn=Ki;At&1&&(Be[Kt]=_t,Kt++,!(Ki&1)&&YA(_t,Be,Kt)&&(Ki|=1)),At&2&&(kt[Oi]=xt,Oi++,!(Ki&2)&&YA(xt,kt,Oi)&&(Ki|=2));let Ln,Hr=0;Ls&&(Ln=Ls,Ls=Fo=>(Hr|=Fo?16:8,Ln(Fo)));let xs;return Ki===3?((ui=Zn)==null||ui.instant(Zn.Phase.CheckTypes,"recursiveTypeRelatedTo_DepthLimit",{sourceId:_t.id,sourceIdStack:Be.map(Fo=>Fo.id),targetId:xt.id,targetIdStack:kt.map(Fo=>Fo.id),depth:Kt,targetDepth:Oi}),xs=3):((yn=Zn)==null||yn.push(Zn.Phase.CheckTypes,"structuredTypeRelatedTo",{sourceId:_t.id,targetId:xt.id}),xs=lF(_t,xt,ai,qi),(ni=Zn)==null||ni.pop()),Ls&&(Ls=Ln),At&1&&Kt--,At&2&&Oi--,Ki=zn,xs?(xs===-1||Kt===0&&Oi===0)&&ns(xs===-1||xs===3):(y.set(Yi,2|Hr),Gr--,ns(!1)),xs;function ns(Fo){for(let Kc=Gi;Kc<Vt;Kc++)je.delete(ge[Kc]),Fo&&(y.set(ge[Kc],1|Hr),Gr--);Vt=Gi}}function lF(_t,xt,ai,qi){const At=ga();let ui=Z2(_t,xt,ai,qi,At);if(y!==tp){if(!ui&&(_t.flags&2097152||_t.flags&262144&&xt.flags&1048576)){const yn=YGt(_t.flags&2097152?_t.types:[_t],!!(xt.flags&1048576));yn&&up(yn,ni=>ni!==_t)&&(ui=or(yn,xt,1,!1,void 0,qi))}ui&&!(qi&2)&&xt.flags&2097152&&!EN(xt)&&_t.flags&2621440?(ui&=Oa(_t,xt,ai,void 0,!1,0),ui&&ew(_t)&&Or(_t)&8192&&(ui&=Es(_t,xt,!1,ai,0))):ui&&lme(xt)&&!$2(xt)&&_t.flags&2097152&&Kh(_t).flags&3670016&&!Ft(_t.types,yn=>yn===xt||!!(Or(yn)&262144))&&(ui&=Oa(_t,xt,ai,void 0,!0,qi))}return ui&&Ur(At),ui}function Yp(_t,xt){const ai=Kh(zD(xt)),qi=[];return CRe(ai,8576,!1,At=>void qi.push(io(_t,Mz(xt.mapper,s1(xt),At)))),is(qi)}function Z2(_t,xt,ai,qi,At){let ui,yn,ni=!1,Yi=_t.flags;const Gn=xt.flags;if(y===tp){if(Yi&3145728){let Ln=Ou(_t,xt);return Ln&&(Ln&=Ou(xt,_t)),Ln}if(Yi&4194304)return or(_t.type,xt.type,3,!1);if(Yi&8388608&&(ui=or(_t.objectType,xt.objectType,3,!1))&&(ui&=or(_t.indexType,xt.indexType,3,!1))||Yi&16777216&&_t.root.isDistributive===xt.root.isDistributive&&(ui=or(_t.checkType,xt.checkType,3,!1))&&(ui&=or(_t.extendsType,xt.extendsType,3,!1))&&(ui&=or(z2(_t),z2(xt),3,!1))&&(ui&=or(U2(_t),U2(xt),3,!1))||Yi&33554432&&(ui=or(_t.baseType,xt.baseType,3,!1))&&(ui&=or(_t.constraint,xt.constraint,3,!1)))return ui;if(!(Yi&524288))return 0}else if(Yi&3145728||Gn&3145728){if(ui=hf(_t,xt,ai,qi))return ui;if(!(Yi&465829888||Yi&524288&&Gn&1048576||Yi&2097152&&Gn&467402752))return 0}if(Yi&17301504&&_t.aliasSymbol&&_t.aliasTypeArguments&&_t.aliasSymbol===xt.aliasSymbol&&!(vme(_t)||vme(xt))){const Ln=nmt(_t.aliasSymbol);if(Ln===w)return 1;const Hr=Ys(_t.aliasSymbol).typeParameters,xs=sy(Hr),ns=$x(_t.aliasTypeArguments,Hr,xs,nr(_t.aliasSymbol.valueDeclaration)),Fo=$x(xt.aliasTypeArguments,Hr,xs,nr(_t.aliasSymbol.valueDeclaration)),Kc=zn(ns,Fo,Ln,qi);if(Kc!==void 0)return Kc}if(hmt(_t)&&!_t.target.readonly&&(ui=or(Pl(_t)[0],xt,1))||hmt(xt)&&(xt.target.readonly||Iee(Jf(_t)||_t))&&(ui=or(_t,Pl(xt)[0],2)))return ui;if(Gn&262144){if(Or(_t)&32&&!_t.declaration.nameType&&or(oy(xt),Tm(_t),3)&&!(tv(_t)&4)){const Ln=SC(_t),Hr=ap(xt,s1(_t));if(ui=or(Ln,Hr,3,ai))return ui}if(y===Mp&&Yi&262144){let Ln=m_(_t);if(Ln)for(;Ln&&dg(Ln,Hr=>!!(Hr.flags&262144));){if(ui=or(Ln,xt,1,!1))return ui;Ln=m_(Ln)}return 0}}else if(Gn&4194304){const Ln=xt.type;if(Yi&4194304&&(ui=or(Ln,_t.type,3,!1)))return ui;if(Qa(Ln)){if(ui=or(_t,upt(Ln),2,ai))return ui}else{const Hr=SRe(Ln);if(Hr){if(or(_t,oy(Hr,xt.indexFlags|4),2,ai)===-1)return-1}else if(op(Ln)){const xs=KS(Ln),ns=Tm(Ln);let Fo;if(xs&&FO(Ln)){const Kc=Yp(xs,Ln);Fo=is([Kc,xs])}else Fo=xs||ns;if(or(_t,Fo,2,ai)===-1)return-1}}}else if(Gn&8388608){if(Yi&8388608){if((ui=or(_t.objectType,xt.objectType,3,ai))&&(ui&=or(_t.indexType,xt.indexType,3,ai)),ui)return ui;ai&&(yn=ne)}if(y===Op||y===Mp){const Ln=xt.objectType,Hr=xt.indexType,xs=Jf(Ln)||Ln,ns=Jf(Hr)||Hr;if(!EN(xs)&&!IN(ns)){const Fo=4|(xs!==Ln?2:0),Kc=Gx(xs,ns,Fo);if(Kc){if(ai&&yn&&Ur(At),ui=or(_t,Kc,2,ai,void 0,qi))return ui;ai&&yn&&ne&&(ne=Gi([yn])<=Gi([ne])?yn:ne)}}}ai&&(yn=void 0)}else if(op(xt)&&y!==tp){const Ln=!!xt.declaration.nameType,Hr=SC(xt),xs=tv(xt);if(!(xs&8)){if(!Ln&&Hr.flags&8388608&&Hr.objectType===_t&&Hr.indexType===s1(xt))return-1;if(!op(_t)){const ns=Ln?KS(xt):Tm(xt),Fo=oy(_t,2),Kc=xs&4,Xf=Kc?tee(ns,Fo):void 0;if(Kc?!(Xf.flags&131072):or(ns,Fo,3)){const H_=SC(xt),Yg=s1(xt),Y2=Z5(H_,-98305);if(!Ln&&Y2.flags&8388608&&Y2.indexType===Yg){if(ui=or(_t,Y2.objectType,2,ai))return ui}else{const f1=Ln?Xf||ns:Xf?Wa([Xf,Yg]):Yg,rw=ap(_t,f1);if(ui=or(rw,H_,3,ai))return ui}}yn=ne,Ur(At)}}}else if(Gn&16777216){if(YA(xt,kt,Oi,10))return 3;const Ln=xt;if(!Ln.root.inferTypeParameters&&!VXt(Ln.root)&&!(_t.flags&16777216&&_t.root===Ln.root)){const Hr=!Da(Fz(Ln.checkType),Fz(Ln.extendsType)),xs=!Hr&&Da(LN(Ln.checkType),LN(Ln.extendsType));if((ui=Hr?-1:or(_t,z2(Ln),2,!1,void 0,qi))&&(ui&=xs?-1:or(_t,U2(Ln),2,!1,void 0,qi),ui))return ui}}else if(Gn&134217728){if(Yi&134217728){if(y===Mp)return hZt(_t,xt)?0:-1;io(_t,ja)}if(Rme(_t,xt))return-1}else if(xt.flags&268435456&&!(_t.flags&268435456)&&Mme(_t,xt))return-1;if(Yi&8650752){if(!(Yi&8388608&&Gn&8388608)){const Ln=wN(_t)||te;if(ui=or(Ln,xt,1,!1,void 0,qi))return ui;if(ui=or(Wp(Ln,_t),xt,1,ai&&Ln!==te&&!(Gn&Yi&262144),void 0,qi))return ui;if(TRe(_t)){const Hr=wN(_t.indexType);if(Hr&&(ui=or(ap(_t.objectType,Hr),xt,1,ai)))return ui}}}else if(Yi&4194304){const Ln=s8e(_t.type,_t.indexFlags)&&Or(_t.type)&32;if(ui=or(vi,xt,1,ai&&!Ln))return ui;if(Ln){const Hr=_t.type,xs=KS(Hr),ns=xs&&FO(Hr)?Yp(xs,Hr):xs||Tm(Hr);if(ui=or(ns,xt,1,ai))return ui}}else if(Yi&134217728&&!(Gn&524288)){if(!(Gn&134217728)){const Ln=Jf(_t);if(Ln&&Ln!==_t&&(ui=or(Ln,xt,1,ai)))return ui}}else if(Yi&268435456)if(Gn&268435456){if(_t.symbol!==xt.symbol)return 0;if(ui=or(_t.type,xt.type,3,ai))return ui}else{const Ln=Jf(_t);if(Ln&&(ui=or(Ln,xt,1,ai)))return ui}else if(Yi&16777216){if(YA(_t,Be,Kt,10))return 3;if(Gn&16777216){const xs=_t.root.inferTypeParameters;let ns=_t.extendsType,Fo;if(xs){const Kc=qz(xs,void 0,0,js);NC(Kc.inferences,xt.extendsType,ns,1536),ns=io(ns,Kc.mapper),Fo=Kc.mapper}if(yb(ns,xt.extendsType)&&(or(_t.checkType,xt.checkType,3)||or(xt.checkType,_t.checkType,3))&&((ui=or(io(z2(_t),Fo),z2(xt),3,ai))&&(ui&=or(U2(_t),U2(xt),3,ai)),ui))return ui}const Ln=wRe(_t);if(Ln&&(ui=or(Ln,xt,1,ai)))return ui;const Hr=!(Gn&16777216)&&see(_t)?y_t(_t):void 0;if(Hr&&(Ur(At),ui=or(Hr,xt,1,ai)))return ui}else{if(y!==ob&&y!==Cm&&$Gt(xt)&&TC(_t))return-1;if(op(xt))return op(_t)&&(ui=di(_t,xt,ai))?ui:0;const Ln=!!(Yi&402784252);if(y!==tp)_t=Kh(_t),Yi=_t.flags;else if(op(_t))return 0;if(Or(_t)&4&&Or(xt)&4&&_t.target===xt.target&&!Qa(_t)&&!(vme(_t)||vme(xt))){if(xme(_t))return-1;const Hr=E8e(_t.target);if(Hr===w)return 1;const xs=zn(Pl(_t),Pl(xt),Hr,qi);if(xs!==void 0)return xs}else{if(J5(xt)?up(_t,$2):ug(xt)&&up(_t,Hr=>Qa(Hr)&&!Hr.target.readonly))return y!==tp?or(H2(_t,hi)||Je,H2(xt,hi)||Je,3,ai):0;if(Qx(_t)&&Qa(xt)&&!Qx(xt)){const Hr=iv(_t);if(Hr!==_t)return or(Hr,xt,1,ai)}else if((y===ob||y===Cm)&&TC(xt)&&Or(xt)&8192&&!TC(_t))return 0}if(Yi&2621440&&Gn&524288){const Hr=ai&&ne===At.errorInfo&&!Ln;if(ui=Oa(_t,xt,Hr,void 0,!1,qi),ui&&(ui&=yl(_t,xt,0,Hr,qi),ui&&(ui&=yl(_t,xt,1,Hr,qi),ui&&(ui&=Es(_t,xt,Ln,Hr,qi)))),ni&&ui)ne=yn||ne||At.errorInfo;else if(ui)return ui}if(Yi&2621440&&Gn&1048576){const Hr=Z5(xt,36175872);if(Hr.flags&1048576){const xs=Zi(_t,Hr);if(xs)return xs}}}return 0;function Gi(Ln){return Ln?oi(Ln,(Hr,xs)=>Hr+1+Gi(xs.next),0):0}function zn(Ln,Hr,xs,ns){if(ui=tM(Ln,Hr,xs,ai,ns))return ui;if(Ft(xs,Kc=>!!(Kc&24))){yn=void 0,Ur(At);return}const Fo=Hr&&EQt(Hr,xs);if(ni=!Fo,xs!==w&&!Fo){if(ni&&!(ai&&Ft(xs,Kc=>(Kc&7)===0)))return 0;yn=ne,Ur(At)}}}function di(_t,xt,ai){if(y===Mp||(y===tp?tv(_t)===tv(xt):V5(_t)<=V5(xt))){let At;const ui=Tm(xt),yn=io(Tm(_t),V5(_t)<0?wf:ja);if(At=or(ui,yn,3,ai)){const ni=cp([s1(_t)],[s1(xt)]);if(io(KS(_t),ni)===io(KS(xt),ni))return At&or(io(SC(_t),ni),SC(xt),3,ai)}}return 0}function Zi(_t,xt){var ai;const qi=Ac(_t),At=Lmt(qi,xt);if(!At)return 0;let ui=1;for(const zn of At)if(ui*=jZt(Ux(zn)),ui>25)return(ai=Zn)==null||ai.instant(Zn.Phase.CheckTypes,"typeRelatedToDiscriminatedType_DepthLimit",{sourceId:_t.id,targetId:xt.id,numCombinations:ui}),0;const yn=new Array(At.length),ni=new Set;for(let zn=0;zn<At.length;zn++){const Ln=At[zn],Hr=Ux(Ln);yn[zn]=Hr.flags&1048576?Hr.types:[Hr],ni.add(Ln.escapedName)}const Yi=vxe(yn),Gn=[];for(const zn of Yi){let Ln=!1;e:for(const Hr of xt.types){for(let xs=0;xs<At.length;xs++){const ns=At[xs],Fo=Ta(Hr,ns.escapedName);if(!Fo)continue e;if(ns===Fo)continue;if(!Er(_t,xt,ns,Fo,Xf=>zn[xs],!1,0,we||y===Mp))continue e}mu(Gn,Hr,Hw),Ln=!0}if(!Ln)return 0}let Gi=-1;for(const zn of Gn)if(Gi&=Oa(_t,zn,!1,ni,!1,0),Gi&&(Gi&=yl(_t,zn,0,!1,0),Gi&&(Gi&=yl(_t,zn,1,!1,0),Gi&&!(Qa(_t)&&Qa(zn))&&(Gi&=Es(_t,zn,!1,!1,0)))),!Gi)return Gi;return Gi}function Tn(_t,xt){if(!xt||_t.length===0)return _t;let ai;for(let qi=0;qi<_t.length;qi++)xt.has(_t[qi].escapedName)?ai||(ai=_t.slice(0,qi)):ai&&ai.push(_t[qi]);return ai||_t}function Bn(_t,xt,ai,qi,At){const ui=we&&!!(Iu(xt)&48),yn=Dd(Ux(xt),!1,ui),ni=ai(_t);return or(ni,yn,3,qi,void 0,At)}function Er(_t,xt,ai,qi,At,ui,yn,ni){const Yi=$m(ai),Gn=$m(qi);if(Yi&2||Gn&2){if(ai.valueDeclaration!==qi.valueDeclaration)return ui&&(Yi&2&&Gn&2?Po(k.Types_have_separate_declarations_of_a_private_property_0,eo(qi)):Po(k.Property_0_is_private_in_type_1_but_not_in_type_2,eo(qi),Hn(Yi&2?_t:xt),Hn(Yi&2?xt:_t))),0}else if(Gn&4){if(!AQt(ai,qi))return ui&&Po(k.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2,eo(qi),Hn(ZA(ai)||_t),Hn(ZA(qi)||xt)),0}else if(Yi&4)return ui&&Po(k.Property_0_is_protected_in_type_1_but_public_in_type_2,eo(qi),Hn(_t),Hn(xt)),0;if(y===Cm&&d1(ai)&&!d1(qi))return 0;const Gi=Bn(ai,qi,At,ui,yn);return Gi?!ni&&ai.flags&16777216&&qi.flags&106500&&!(qi.flags&16777216)?(ui&&Po(k.Property_0_is_optional_in_type_1_but_required_in_type_2,eo(qi),Hn(_t),Hn(xt)),0):Gi:(ui&&fa(k.Types_of_property_0_are_incompatible,eo(qi)),0)}function os(_t,xt,ai,qi){let At=!1;if(ai.valueDeclaration&&Bf(ai.valueDeclaration)&&Vs(ai.valueDeclaration.name)&&_t.symbol&&_t.symbol.flags&32){const yn=ai.valueDeclaration.name.escapedText,ni=NV(_t.symbol,yn);if(ni&&Ta(_t,ni)){const Yi=G.getDeclarationName(_t.symbol.valueDeclaration),Gn=G.getDeclarationName(xt.symbol.valueDeclaration);Po(k.Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2,sg(yn),sg(Yi.escapedText===""?Due:Yi),sg(Gn.escapedText===""?Due:Gn));return}}const ui=as(U8e(_t,xt,qi,!1));if((!D||D.code!==k.Class_0_incorrectly_implements_interface_1.code&&D.code!==k.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code)&&(At=!0),ui.length===1){const yn=eo(ai,void 0,0,20);Po(k.Property_0_is_missing_in_type_1_but_required_in_type_2,yn,...O5(_t,xt)),P(ai.declarations)&&Ef(Kn(ai.declarations[0],k._0_is_declared_here,yn)),At&&ne&&Qn++}else Fn(_t,xt,!1)&&(ui.length>5?Po(k.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more,Hn(_t),Hn(xt),qt(ui.slice(0,4),yn=>eo(yn)).join(", "),ui.length-4):Po(k.Type_0_is_missing_the_following_properties_from_type_1_Colon_2,Hn(_t),Hn(xt),qt(ui,yn=>eo(yn)).join(", ")),At&&ne&&Qn++)}function Oa(_t,xt,ai,qi,At,ui){if(y===tp)return Ua(_t,xt,qi);let yn=-1;if(Qa(xt)){if($2(_t)){if(!xt.target.readonly&&(J5(_t)||Qa(_t)&&_t.target.readonly))return 0;const zn=QS(_t),Ln=QS(xt),Hr=Qa(_t)?_t.target.combinedFlags&4:4,xs=!!(xt.target.combinedFlags&12),ns=Qa(_t)?_t.target.minLength:0,Fo=xt.target.minLength;if(!Hr&&zn<Fo)return ai&&Po(k.Source_has_0_element_s_but_target_requires_1,zn,Fo),0;if(!xs&&Ln<ns)return ai&&Po(k.Source_has_0_element_s_but_target_allows_only_1,ns,Ln),0;if(!xs&&(Hr||Ln<zn))return ai&&(ns<Fo?Po(k.Target_requires_0_element_s_but_source_may_have_fewer,Fo):Po(k.Target_allows_only_0_element_s_but_source_may_have_more,Ln)),0;const Kc=Pl(_t),Xf=Pl(xt),H_=sXt(xt.target,11),Yg=Pz(xt.target,11);let Y2=!!qi;for(let f1=0;f1<zn;f1++){const rw=Qa(_t)?_t.target.elementFlags[f1]:4,uF=zn-1-f1,j_=xs&&f1>=H_?Ln-1-Math.min(uF,Yg):f1,ik=xt.target.elementFlags[j_];if(ik&8&&!(rw&8))return ai&&Po(k.Source_provides_no_match_for_variadic_element_at_position_0_in_target,j_),0;if(rw&8&&!(ik&12))return ai&&Po(k.Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target,f1,j_),0;if(ik&1&&!(rw&1))return ai&&Po(k.Source_provides_no_match_for_required_element_at_position_0_in_target,j_),0;if(Y2&&((rw&12||ik&12)&&(Y2=!1),Y2&&(qi!=null&&qi.has(""+f1))))continue;const dF=IC(Kc[f1],!!(rw&ik&2)),gU=Xf[j_],yU=rw&8&&ik&4?hh(gU):IC(gU,!!(ik&2)),zN=or(dF,yU,3,ai,void 0,ui);if(!zN)return ai&&(Ln>1||zn>1)&&(xs&&f1>=H_&&uF>=Yg&&H_!==zn-Yg-1?fa(k.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target,H_,zn-Yg-1,j_):fa(k.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target,f1,j_)),0;yn&=zN}return yn}if(xt.target.combinedFlags&12)return 0}const ni=(y===ob||y===Cm)&&!ew(_t)&&!xme(_t)&&!Qa(_t),Yi=q8e(_t,xt,ni,!1);if(Yi)return ai&&Qe(_t,xt)&&os(_t,xt,Yi,ni),0;if(ew(xt)){for(const zn of Tn(Ac(_t),qi))if(!UD(xt,zn.escapedName)&&!(Yn(zn).flags&32768))return ai&&Po(k.Property_0_does_not_exist_on_type_1,eo(zn),Hn(xt)),0}const Gn=Ac(xt),Gi=Qa(_t)&&Qa(xt);for(const zn of Tn(Gn,qi)){const Ln=zn.escapedName;if(!(zn.flags&4194304)&&(!Gi||$v(Ln)||Ln==="length")&&(!At||zn.flags&16777216)){const Hr=Ta(_t,Ln);if(Hr&&Hr!==zn){const xs=Er(_t,xt,Hr,zn,Ux,ai,ui,y===Mp);if(!xs)return 0;yn&=xs}}}return yn}function Ua(_t,xt,ai){if(!(_t.flags&524288&&xt.flags&524288))return 0;const qi=Tn(XS(_t),ai),At=Tn(XS(xt),ai);if(qi.length!==At.length)return 0;let ui=-1;for(const yn of qi){const ni=UD(xt,yn.escapedName);if(!ni)return 0;const Yi=N8e(yn,ni,or);if(!Yi)return 0;ui&=Yi}return ui}function yl(_t,xt,ai,qi,At){var ui,yn;if(y===tp)return _r(_t,xt,ai);if(xt===tc||_t===tc)return-1;const ni=_t.symbol&&dy(_t.symbol.valueDeclaration),Yi=xt.symbol&&dy(xt.symbol.valueDeclaration),Gn=ia(_t,ni&&ai===1?0:ai),Gi=ia(xt,Yi&&ai===1?0:ai);if(ai===1&&Gn.length&&Gi.length){const ns=!!(Gn[0].flags&4),Fo=!!(Gi[0].flags&4);if(ns&&!Fo)return qi&&Po(k.Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type),0;if(!Yo(Gn[0],Gi[0],qi))return 0}let zn=-1;const Ln=ai===1?Ii:Re,Hr=Or(_t),xs=Or(xt);if(Hr&64&&xs&64&&_t.symbol===xt.symbol||Hr&4&&xs&4&&_t.target===xt.target){j.assertEqual(Gn.length,Gi.length);for(let ns=0;ns<Gi.length;ns++){const Fo=un(Gn[ns],Gi[ns],!0,qi,At,Ln(Gn[ns],Gi[ns]));if(!Fo)return 0;zn&=Fo}}else if(Gn.length===1&&Gi.length===1){const ns=y===Mp,Fo=ya(Gn),Kc=ya(Gi);if(zn=un(Fo,Kc,ns,qi,At,Ln(Fo,Kc)),!zn&&qi&&ai===1&&Hr&xs&&(((ui=Kc.declaration)==null?void 0:ui.kind)===176||((yn=Fo.declaration)==null?void 0:yn.kind)===176)){const Xf=H_=>B2(H_,void 0,262144,ai);return Po(k.Type_0_is_not_assignable_to_type_1,Xf(Fo),Xf(Kc)),Po(k.Types_of_construct_signatures_are_incompatible),zn}}else e:for(const ns of Gi){const Fo=ga();let Kc=qi;for(const Xf of Gn){const H_=un(Xf,ns,!0,Kc,At,Ln(Xf,ns));if(H_){zn&=H_,Ur(Fo);continue e}Kc=!1}return Kc&&Po(k.Type_0_provides_no_match_for_the_signature_1,Hn(_t),B2(ns,void 0,void 0,ai)),0}return zn}function Qe(_t,xt){const ai=aee(_t,0),qi=aee(_t,1),At=XS(_t);return(ai.length||qi.length)&&!At.length?!!(ia(xt,0).length&&ai.length||ia(xt,1).length&&qi.length):!0}function Re(_t,xt){return _t.parameters.length===0&&xt.parameters.length===0?(ai,qi)=>fa(k.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1,Hn(ai),Hn(qi)):(ai,qi)=>fa(k.Call_signature_return_types_0_and_1_are_incompatible,Hn(ai),Hn(qi))}function Ii(_t,xt){return _t.parameters.length===0&&xt.parameters.length===0?(ai,qi)=>fa(k.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1,Hn(ai),Hn(qi)):(ai,qi)=>fa(k.Construct_signature_return_types_0_and_1_are_incompatible,Hn(ai),Hn(qi))}function un(_t,xt,ai,qi,At,ui){const yn=y===ob?16:y===Cm?24:0;return S8e(ai?Lz(_t):_t,ai?Lz(xt):xt,yn,qi,Po,ui,ni,ja);function ni(Yi,Gn,Gi){return or(Yi,Gn,3,Gi,void 0,At)}}function _r(_t,xt,ai){const qi=ia(_t,ai),At=ia(xt,ai);if(qi.length!==At.length)return 0;let ui=-1;for(let yn=0;yn<qi.length;yn++){const ni=Eee(qi[yn],At[yn],!1,!1,!1,or);if(!ni)return 0;ui&=ni}return ui}function Jn(_t,xt,ai,qi){let At=-1;const ui=xt.keyType,yn=_t.flags&2097152?ree(_t):XS(_t);for(const ni of yn)if(!emt(_t,ni)&&zA($A(ni,8576),ui)){const Yi=Ux(ni),Gn=Ne||Yi.flags&32768||ui===hi||!(ni.flags&16777216)?Yi:Qg(Yi,524288),Gi=or(Gn,xt.type,3,ai,void 0,qi);if(!Gi)return ai&&Po(k.Property_0_is_incompatible_with_index_signature,eo(ni)),0;At&=Gi}for(const ni of Ih(_t))if(zA(ni.keyType,ui)){const Yi=$n(ni,xt,ai,qi);if(!Yi)return 0;At&=Yi}return At}function $n(_t,xt,ai,qi){const At=or(_t.type,xt.type,3,ai,void 0,qi);return!At&&ai&&(_t.keyType===xt.keyType?Po(k._0_index_signatures_are_incompatible,Hn(_t.keyType)):Po(k._0_and_1_index_signatures_are_incompatible,Hn(_t.keyType),Hn(xt.keyType))),At}function Es(_t,xt,ai,qi,At){if(y===tp)return Ro(_t,xt);const ui=Ih(xt),yn=Ft(ui,Yi=>Yi.keyType===st);let ni=-1;for(const Yi of ui){const Gn=y!==Cm&&!ai&&yn&&Yi.type.flags&1?-1:op(_t)&&yn?or(SC(_t),Yi.type,3,qi):mo(_t,Yi,qi,At);if(!Gn)return 0;ni&=Gn}return ni}function mo(_t,xt,ai,qi){const At=Ez(_t,xt.keyType);return At?$n(At,xt,ai,qi):!(qi&1)&&(y!==Cm||Or(_t)&8192)&&Nme(_t)?Jn(_t,xt,ai,qi):(ai&&Po(k.Index_signature_for_type_0_is_missing_in_type_1,Hn(xt.keyType),Hn(_t)),0)}function Ro(_t,xt){const ai=Ih(_t),qi=Ih(xt);if(ai.length!==qi.length)return 0;for(const At of qi){const ui=pb(_t,At.keyType);if(!(ui&&or(ui.type,At.type,3)&&ui.isReadonly===At.isReadonly))return 0}return-1}function Yo(_t,xt,ai){if(!_t.declaration||!xt.declaration)return!0;const qi=bP(_t.declaration,6),At=bP(xt.declaration,6);return At===2||At===4&&qi!==2||At!==4&&!qi?!0:(ai&&Po(k.Cannot_assign_a_0_constructor_type_to_a_1_constructor_type,R5(qi),R5(At)),!1)}}function k8e(o){if(o.flags&16)return!1;if(o.flags&3145728)return!!O(o.types,k8e);if(o.flags&465829888){const _=wN(o);if(_&&_!==o)return k8e(_)}return c1(o)||!!(o.flags&134217728)||!!(o.flags&268435456)}function tmt(o,_){return Qa(o)&&Qa(_)?w:Ac(_).filter(y=>yme(Yu(o,y.escapedName),Yn(y)))}function yme(o,_){return!!o&&!!_&&Au(o,32768)&&!!zz(_)}function TQt(o){return Ac(o).filter(_=>zz(Yn(_)))}function imt(o,_,y=b8e){return Eyt(o,_,y)||Hoi(o,_)||joi(o,_)||zoi(o,_)||Uoi(o,_)}function T8e(o,_,y){const S=o.types,D=S.map(B=>B.flags&402784252?0:-1);for(const[B,K]of _){let ne=!1;for(let ce=0;ce<S.length;ce++)if(D[ce]){const ge=HA(S[ce],K);ge&&dg(B(),je=>!!y(je,ge))?ne=!0:D[ce]=3}for(let ce=0;ce<S.length;ce++)D[ce]===3&&(D[ce]=ne?0:-1)}const L=Yt(D,0)?is(S.filter((B,K)=>D[K]),0):o;return L.flags&131072?o:L}function D8e(o){if(o.flags&524288){const _=o1(o);return _.callSignatures.length===0&&_.constructSignatures.length===0&&_.indexInfos.length===0&&_.properties.length>0&&Ce(_.properties,y=>!!(y.flags&16777216))}return o.flags&33554432?D8e(o.baseType):o.flags&2097152?Ce(o.types,D8e):!1}function DQt(o,_,y){for(const S of Ac(o))if(ege(_,S.escapedName,y))return!0;return!1}function E8e(o){return o===li||o===En||o.objectFlags&8?Z:rmt(o.symbol,o.typeParameters)}function nmt(o){return rmt(o,Ys(o).typeParameters)}function rmt(o,_=w){var y,S;const D=Ys(o);if(!D.variances){(y=Zn)==null||y.push(Zn.Phase.CheckTypes,"getVariancesWorker",{arity:_.length,id:kf(gl(o))});const L=ks,B=Pr;ks||(ks=!0,Pr=nn.length),D.variances=w;const K=[];for(const ne of _){const ce=I8e(ne);let ge=ce&16384?ce&8192?0:1:ce&8192?2:void 0;if(ge===void 0){let je=!1,Be=!1;const kt=Ls;Ls=Oi=>Oi?Be=!0:je=!0;const Vt=Tee(o,ne,sd),Kt=Tee(o,ne,Pp);ge=(Da(Kt,Vt)?1:0)|(Da(Vt,Kt)?2:0),ge===3&&Da(Tee(o,ne,Nl),Vt)&&(ge=4),Ls=kt,(je||Be)&&(je&&(ge|=8),Be&&(ge|=16))}K.push(ge)}L||(ks=!1,Pr=B),D.variances=K,(S=Zn)==null||S.pop({variances:K.map(j.formatVariance)})}return D.variances}function Tee(o,_,y){const S=QD(_,y),D=gl(o);if(fe(D))return D;const L=o.flags&524288?VO(o,gb(Ys(o).typeParameters,S)):wC(D,gb(D.typeParameters,S));return xe.add(kf(L)),L}function vme(o){return xe.has(kf(o))}function I8e(o){var _;return oi((_=o.symbol)==null?void 0:_.declarations,(y,S)=>y|jh(S),0)&28672}function EQt(o,_){for(let y=0;y<_.length;y++)if((_[y]&7)===1&&o[y].flags&16384)return!0;return!1}function IQt(o){return o.flags&262144&&!m_(o)}function NQt(o){return!!(Or(o)&4)&&!o.node}function bme(o){return NQt(o)&&Ft(Pl(o),_=>!!(_.flags&262144)||bme(_))}function LQt(o,_,y,S){const D=[];let L="";const B=ne(o,0),K=ne(_,0);return`${L}${B},${K}${y}`;function ne(ce,ge=0){let je=""+ce.target.id;for(const Be of Pl(ce)){if(Be.flags&262144){if(S||IQt(Be)){let kt=D.indexOf(Be);kt<0&&(kt=D.length,D.push(Be)),je+="="+kt;continue}L="*"}else if(ge<4&&bme(Be)){je+="<"+ne(Be,ge+1)+">";continue}je+="-"+Be.id}return je}}function Cme(o,_,y,S,D){if(S===tp&&o.id>_.id){const B=o;o=_,_=B}const L=y?":"+y:"";return bme(o)&&bme(_)?LQt(o,_,L,D):`${o.id},${_.id}${L}`}function Dee(o,_){if(Iu(o)&6){for(const y of o.links.containingType.types){const S=Ta(y,o.escapedName),D=S&&Dee(S,_);if(D)return D}return}return _(o)}function ZA(o){return o.parent&&o.parent.flags&32?gl(Qp(o)):void 0}function Sme(o){const _=ZA(o),y=_&&Ll(_)[0];return y&&Yu(y,o.escapedName)}function PQt(o,_){return Dee(o,y=>{const S=ZA(y);return S?AO(S,_):!1})}function AQt(o,_){return!Dee(_,y=>$m(y)&4?!PQt(o,ZA(y)):!1)}function smt(o,_,y){return Dee(_,S=>$m(S,y)&4?!AO(o,ZA(S)):!1)?void 0:o}function YA(o,_,y,S=3){if(y>=S){if((Or(o)&96)===96&&(o=omt(o)),o.flags&2097152)return Ft(o.types,K=>YA(K,_,y,S));const D=wme(o);let L=0,B=0;for(let K=0;K<y;K++){const ne=_[K];if(amt(ne,D)){if(ne.id>=B&&(L++,L>=S))return!0;B=ne.id}}}return!1}function omt(o){let _;for(;(Or(o)&96)===96&&(_=zD(o))&&(_.symbol||_.flags&2097152&&Ft(_.types,y=>!!y.symbol));)o=_;return o}function amt(o,_){return(Or(o)&96)===96&&(o=omt(o)),o.flags&2097152?Ft(o.types,y=>amt(y,_)):wme(o)===_}function wme(o){if(o.flags&524288&&!J8e(o)){if(Or(o)&4&&o.node)return o.node;if(o.symbol&&!(Or(o)&16&&o.symbol.flags&32))return o.symbol;if(Qa(o))return o.target}if(o.flags&262144)return o.symbol;if(o.flags&8388608){do o=o.objectType;while(o.flags&8388608);return o}return o.flags&16777216?o.root:o}function OQt(o,_){return N8e(o,_,Bz)!==0}function N8e(o,_,y){if(o===_)return-1;const S=$m(o)&6,D=$m(_)&6;if(S!==D)return 0;if(S){if(eM(o)!==eM(_))return 0}else if((o.flags&16777216)!==(_.flags&16777216))return 0;return d1(o)!==d1(_)?0:y(Yn(o),Yn(_))}function MQt(o,_,y){const S=dp(o),D=dp(_),L=fy(o),B=fy(_),K=ov(o),ne=ov(_);return!!(S===D&&L===B&&K===ne||y&&L<=B)}function Eee(o,_,y,S,D,L){if(o===_)return-1;if(!MQt(o,_,y)||P(o.typeParameters)!==P(_.typeParameters))return 0;if(_.typeParameters){const ne=cp(o.typeParameters,_.typeParameters);for(let ce=0;ce<_.typeParameters.length;ce++){const ge=o.typeParameters[ce],je=_.typeParameters[ce];if(!(ge===je||L(io(z5(ge),ne)||te,z5(je)||te)&&L(io(qD(ge),ne)||te,qD(je)||te)))return 0}o=QA(o,ne,!0)}let B=-1;if(!S){const ne=j2(o);if(ne){const ce=j2(_);if(ce){const ge=L(ne,ce);if(!ge)return 0;B&=ge}}}const K=dp(_);for(let ne=0;ne<K;ne++){const ce=u1(o,ne),ge=u1(_,ne),je=L(ge,ce);if(!je)return 0;B&=je}if(!D){const ne=cg(o),ce=cg(_);B&=ne||ce?RQt(ne,ce,L):L(Oc(o),Oc(_))}return B}function RQt(o,_,y){return o&&_&&i8e(o,_)?o.type===_.type?-1:o.type&&_.type?y(o.type,_.type):0:0}function FQt(o){let _;for(const y of o)if(!(y.flags&131072)){const S=DC(y);if(_??(_=S),S===y||S!==_)return!1}return!0}function cmt(o){return oi(o,(_,y)=>_|(y.flags&1048576?cmt(y.types):y.flags),0)}function BQt(o){if(o.length===1)return o[0];const _=we?Wr(o,S=>ad(S,D=>!(D.flags&98304))):o,y=FQt(_)?is(_):oi(_,(S,D)=>YD(S,D)?D:S);return _===o?y:Lee(y,cmt(o)&98304)}function WQt(o){return oi(o,(_,y)=>YD(y,_)?y:_)}function ug(o){return!!(Or(o)&4)&&(o.target===li||o.target===En)}function J5(o){return!!(Or(o)&4)&&o.target===En}function $2(o){return ug(o)||Qa(o)}function Iee(o){return ug(o)&&!J5(o)||Qa(o)&&!o.target.readonly}function Nee(o){return ug(o)?Pl(o)[0]:void 0}function YS(o){return ug(o)||!(o.flags&98304)&&Da(o,od)}function L8e(o){return Iee(o)||!(o.flags&98305)&&Da(o,Yc)}function P8e(o){if(!(Or(o)&4)||!(Or(o.target)&3))return;if(Or(o)&33554432)return Or(o)&67108864?o.cachedEquivalentBaseType:void 0;o.objectFlags|=33554432;const _=o.target;if(Or(_)&1){const D=Ar(_);if(D&&D.expression.kind!==80&&D.expression.kind!==211)return}const y=Ll(_);if(y.length!==1||qx(o.symbol).size)return;let S=P(_.typeParameters)?io(y[0],cp(_.typeParameters,Pl(o).slice(0,_.typeParameters.length))):y[0];return P(Pl(o))>P(_.typeParameters)&&(S=Wp(S,va(Pl(o)))),o.objectFlags|=67108864,o.cachedEquivalentBaseType=S}function lmt(o){return we?o===Di:o===Gt}function xme(o){const _=Nee(o);return!!_&&lmt(_)}function G5(o){let _;return Qa(o)||!!Ta(o,"0")||YS(o)&&!!(_=Yu(o,"length"))&&up(_,y=>!!(y.flags&256))}function kme(o){return YS(o)||G5(o)}function umt(o,_){const y=Yu(o,""+_);if(y)return y;if(up(o,Qa))return _mt(o,_,Q.noUncheckedIndexedAccess?tt:void 0)}function VQt(o){return!(o.flags&240544)}function c1(o){return!!(o.flags&109472)}function dmt(o){const _=iv(o);return _.flags&2097152?Ft(_.types,c1):c1(_)}function HQt(o){return o.flags&2097152&&Fe(o.types,c1)||o}function Hz(o){return o.flags&16?!0:o.flags&1048576?o.flags&1024?!0:Ce(o.types,c1):c1(o)}function DC(o){return o.flags&1056?Jpe(o):o.flags&402653312?st:o.flags&256?hi:o.flags&2048?vn:o.flags&512?fi:o.flags&1048576?jQt(o):o}function jQt(o){const _=`B${kf(o)}`;return Q0(_)??RS(_,eu(o,DC))}function A8e(o){return o.flags&402653312?st:o.flags&288?hi:o.flags&2048?vn:o.flags&512?fi:o.flags&1048576?eu(o,A8e):o}function J2(o){return o.flags&1056&&XD(o)?Jpe(o):o.flags&128&&XD(o)?st:o.flags&256&&XD(o)?hi:o.flags&2048&&XD(o)?vn:o.flags&512&&XD(o)?fi:o.flags&1048576?eu(o,J2):o}function fmt(o){return o.flags&8192?wi:o.flags&1048576?eu(o,fmt):o}function O8e(o,_){return pge(o,_)||(o=fmt(J2(o))),Xh(o)}function zQt(o,_,y){if(o&&c1(o)){const S=_?y?aU(_):_:void 0;o=O8e(o,S)}return o}function M8e(o,_,y,S){if(o&&c1(o)){const D=_?rE(y,_,S):void 0;o=O8e(o,D)}return o}function Qa(o){return!!(Or(o)&4&&o.target.objectFlags&8)}function Qx(o){return Qa(o)&&!!(o.target.combinedFlags&8)}function hmt(o){return Qx(o)&&o.target.elementFlags.length===1}function Tme(o){return K5(o,o.target.fixedLength)}function _mt(o,_,y){return eu(o,S=>{const D=S,L=Tme(D);return L?y&&_>=e8e(D.target)?is([L,y]):L:tt})}function UQt(o){const _=Tme(o);return _&&hh(_)}function K5(o,_,y=0,S=!1,D=!1){const L=QS(o)-y;if(_<L){const B=Pl(o),K=[];for(let ne=_;ne<L;ne++){const ce=B[ne];K.push(o.target.elementFlags[ne]&8?ap(ce,hi):ce)}return S?Wa(K):is(K,D?0:1)}}function qQt(o,_){return QS(o)===QS(_)&&Ce(o.target.elementFlags,(y,S)=>(y&12)===(_.target.elementFlags[S]&12))}function pmt({value:o}){return o.base10Value==="0"}function mmt(o){return ad(o,_=>l1(_,4194304))}function $Qt(o){return eu(o,JQt)}function JQt(o){return o.flags&4?yt:o.flags&8?ei:o.flags&64?Pi:o===Un||o===ln||o.flags&114691||o.flags&128&&o.value===""||o.flags&256&&o.value===0||o.flags&2048&&pmt(o)?o:Ai}function Lee(o,_){const y=_&~o.flags&98304;return y===0?o:is(y===32768?[o,tt]:y===65536?[o,Qt]:[o,tt,Qt])}function Zx(o,_=!1){j.assert(we);const y=_?Ue:tt;return o===y||o.flags&1048576&&o.types[0]===y?o:is([o,y])}function GQt(o){return Ap||(Ap=jO("NonNullable",524288,void 0)||pt),Ap!==pt?VO(Ap,[o]):Wa([o,Jo])}function EC(o){return we?MN(o,2097152):o}function gmt(o){return we?is([o,be]):o}function Dme(o){return we?Bme(o,be):o}function Eme(o,_,y){return y?p8(_)?Zx(o):gmt(o):o}function jz(o,_){return fG(_)?EC(o):gh(_)?Dme(o):o}function IC(o,_){return Ne&&_?Bme(o,le):o}function zz(o){return o===le||!!(o.flags&1048576)&&o.types[0]===le}function Ime(o){return Ne?Bme(o,le):Qg(o,524288)}function KQt(o,_){return(o.flags&524)!==0&&(_.flags&28)!==0}function Nme(o){const _=Or(o);return o.flags&2097152?Ce(o.types,Nme):!!(o.symbol&&o.symbol.flags&7040&&!(o.symbol.flags&32)&&!Age(o))||!!(_&4194304)||!!(_&1024&&Nme(o.source))}function PN(o,_){const y=$a(o.flags,o.escapedName,Iu(o)&8);y.declarations=o.declarations,y.parent=o.parent,y.links.type=_,y.links.target=o,o.valueDeclaration&&(y.valueDeclaration=o.valueDeclaration);const S=Ys(o).nameType;return S&&(y.links.nameType=S),y}function XQt(o,_){const y=_a();for(const S of XS(o)){const D=Yn(S),L=_(D);y.set(S.escapedName,L===D?S:PN(S,L))}return y}function Uz(o){if(!(ew(o)&&Or(o)&8192))return o;const _=o.regularType;if(_)return _;const y=o,S=XQt(o,Uz),D=Xs(y.symbol,S,y.callSignatures,y.constructSignatures,y.indexInfos);return D.flags=y.flags,D.objectFlags|=y.objectFlags&-8193,o.regularType=D,D}function ymt(o,_,y){return{parent:o,propertyName:_,siblings:y,resolvedProperties:void 0}}function vmt(o){if(!o.siblings){const _=[];for(const y of vmt(o.parent))if(ew(y)){const S=UD(y,o.propertyName);S&&RN(Yn(S),D=>{_.push(D)})}o.siblings=_}return o.siblings}function QQt(o){if(!o.resolvedProperties){const _=new Map;for(const y of vmt(o))if(ew(y)&&!(Or(y)&2097152))for(const S of Ac(y))_.set(S.escapedName,S);o.resolvedProperties=as(_.values())}return o.resolvedProperties}function ZQt(o,_){if(!(o.flags&4))return o;const y=Yn(o),S=_&&ymt(_,o.escapedName,void 0),D=R8e(y,S);return D===y?o:PN(o,D)}function YQt(o){const _=ri.get(o.escapedName);if(_)return _;const y=PN(o,Ue);return y.flags|=16777216,ri.set(o.escapedName,y),y}function eZt(o,_){const y=_a();for(const D of XS(o))y.set(D.escapedName,ZQt(D,_));if(_)for(const D of QQt(_))y.has(D.escapedName)||y.set(D.escapedName,YQt(D));const S=Xs(o.symbol,y,w,w,Wr(Ih(o),D=>nv(D.keyType,lp(D.type),D.isReadonly)));return S.objectFlags|=Or(o)&266240,S}function lp(o){return R8e(o,void 0)}function R8e(o,_){if(Or(o)&196608){if(_===void 0&&o.widened)return o.widened;let y;if(o.flags&98305)y=Je;else if(ew(o))y=eZt(o,_);else if(o.flags&1048576){const S=_||ymt(void 0,void 0,o.types),D=Wr(o.types,L=>L.flags&98304?L:R8e(L,S));y=is(D,Ft(D,TC)?2:1)}else o.flags&2097152?y=Wa(Wr(o.types,lp)):$2(o)&&(y=wC(o.target,Wr(Pl(o),lp)));return y&&_===void 0&&(o.widened=y),y||o}return o}function Lme(o){var _;let y=!1;if(Or(o)&65536){if(o.flags&1048576)if(Ft(o.types,TC))y=!0;else for(const S of o.types)y||(y=Lme(S));else if($2(o))for(const S of Pl(o))y||(y=Lme(S));else if(ew(o))for(const S of XS(o)){const D=Yn(S);if(Or(D)&65536&&(y=Lme(D),!y)){const L=(_=S.declarations)==null?void 0:_.find(B=>{var K;return((K=B.symbol.valueDeclaration)==null?void 0:K.parent)===o.symbol.valueDeclaration});L&&(ft(L,k.Object_literal_s_property_0_implicitly_has_an_1_type,eo(S),Hn(lp(D))),y=!0)}}}return y}function G2(o,_,y){const S=Hn(lp(_));if(nr(o)&&!n7(_n(o),Q))return;let D;switch(o.kind){case 226:case 172:case 171:D=De?k.Member_0_implicitly_has_an_1_type:k.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;break;case 169:const L=o;if(ot(L.name)){const B=aI(L.name);if((VP(L.parent)||W1(L.parent)||Hy(L.parent))&&L.parent.parameters.includes(L)&&(_i(L,L.name.escapedText,788968,void 0,!0)||B&&Tce(B))){const K="arg"+L.parent.parameters.indexOf(L),ne=al(L.name)+(L.dotDotDotToken?"[]":"");Z1(De,o,k.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1,K,ne);return}}D=o.dotDotDotToken?De?k.Rest_parameter_0_implicitly_has_an_any_type:k.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage:De?k.Parameter_0_implicitly_has_an_1_type:k.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;break;case 208:if(D=k.Binding_element_0_implicitly_has_an_1_type,!De)return;break;case 317:ft(o,k.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,S);return;case 323:De&&D3(o.parent)&&ft(o.parent.tagName,k.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation,S);return;case 262:case 174:case 173:case 177:case 178:case 218:case 219:if(De&&!o.name){y===3?ft(o,k.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation,S):ft(o,k.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,S);return}D=De?y===3?k._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type:k._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:k._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage;break;case 200:De&&ft(o,k.Mapped_object_type_implicitly_has_an_any_template_type);return;default:D=De?k.Variable_0_implicitly_has_an_1_type:k.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage}Z1(De,o,D,al(No(o)),S)}function Pme(o,_,y){a(()=>{De&&Or(_)&65536&&(!y||!b7e(o))&&(Lme(_)||G2(o,_,y))})}function F8e(o,_,y){const S=dp(o),D=dp(_),L=eU(o),B=eU(_),K=B?D-1:D,ne=L?K:Math.min(S,K),ce=j2(o);if(ce){const ge=j2(_);ge&&y(ce,ge)}for(let ge=0;ge<ne;ge++)y(u1(o,ge),u1(_,ge));B&&y(ste(o,ne,xN(B)&&!dg(B,L8e)),B)}function B8e(o,_,y){const S=cg(_);if(S){const L=cg(o);if(L&&i8e(L,S)&&L.type&&S.type){y(L.type,S.type);return}}const D=Oc(_);Yx(D)&&y(Oc(o),D)}function qz(o,_,y,S){return W8e(o.map(H8e),_,y,S||b8e)}function tZt(o,_=0){return o&&W8e(qt(o.inferences,bmt),o.signature,o.flags|_,o.compareTypes)}function W8e(o,_,y,S){const D={inferences:o,signature:_,flags:y,compareTypes:S,mapper:wf,nonFixingMapper:wf};return D.mapper=iZt(D),D.nonFixingMapper=nZt(D),D}function iZt(o){return m8e(qt(o.inferences,_=>_.typeParameter),qt(o.inferences,(_,y)=>()=>(_.isFixed||(rZt(o),Ame(o.inferences),_.isFixed=!0),G8e(o,y))))}function nZt(o){return m8e(qt(o.inferences,_=>_.typeParameter),qt(o.inferences,(_,y)=>()=>G8e(o,y)))}function Ame(o){for(const _ of o)_.isFixed||(_.inferredType=void 0)}function V8e(o,_,y){(o.intraExpressionInferenceSites??(o.intraExpressionInferenceSites=[])).push({node:_,type:y})}function rZt(o){if(o.intraExpressionInferenceSites){for(const{node:_,type:y}of o.intraExpressionInferenceSites){const S=_.kind===174?Cgt(_,2):g_(_,2);S&&NC(o.inferences,y,S)}o.intraExpressionInferenceSites=void 0}}function H8e(o){return{typeParameter:o,candidates:void 0,contraCandidates:void 0,inferredType:void 0,priority:void 0,topLevel:!0,isFixed:!1,impliedArity:void 0}}function bmt(o){return{typeParameter:o.typeParameter,candidates:o.candidates&&o.candidates.slice(),contraCandidates:o.contraCandidates&&o.contraCandidates.slice(),inferredType:o.inferredType,priority:o.priority,topLevel:o.topLevel,isFixed:o.isFixed,impliedArity:o.impliedArity}}function sZt(o){const _=$t(o.inferences,YO);return _.length?W8e(qt(_,bmt),o.signature,o.flags,o.compareTypes):void 0}function j8e(o){return o&&o.mapper}function Yx(o){const _=Or(o);if(_&524288)return!!(_&1048576);const y=!!(o.flags&465829888||o.flags&524288&&!Cmt(o)&&(_&4&&(o.node||Ft(Pl(o),Yx))||_&134217728&&P(o.outerTypeParameters)||_&16&&o.symbol&&o.symbol.flags&14384&&o.symbol.declarations||_&12583968)||o.flags&3145728&&!(o.flags&1024)&&!Cmt(o)&&Ft(o.types,Yx));return o.flags&3899393&&(o.objectFlags|=524288|(y?1048576:0)),y}function Cmt(o){if(o.aliasSymbol&&!o.aliasTypeArguments){const _=ql(o.aliasSymbol,265);return!!(_&&Qi(_.parent,y=>y.kind===307?!0:y.kind===267?!1:"quit"))}return!1}function $z(o,_,y=0){return!!(o===_||o.flags&3145728&&Ft(o.types,S=>$z(S,_,y))||y<3&&o.flags&16777216&&($z(z2(o),_,y+1)||$z(U2(o),_,y+1)))}function oZt(o,_){const y=cg(o);return y?!!y.type&&$z(y.type,_):$z(Oc(o),_)}function aZt(o){const _=_a();RN(o,S=>{if(!(S.flags&128))return;const D=cu(S.value),L=$a(4,D);L.links.type=Je,S.symbol&&(L.declarations=S.symbol.declarations,L.valueDeclaration=S.symbol.valueDeclaration),_.set(D,L)});const y=o.flags&4?[nv(st,Jo,!1)]:w;return Xs(void 0,_,w,w,y)}function Smt(o,_,y){const S=o.id+","+_.id+","+y.id;if(Xu.has(S))return Xu.get(S);const D=cZt(o,_,y);return Xu.set(S,D),D}function z8e(o){return!(Or(o)&262144)||ew(o)&&Ft(Ac(o),_=>z8e(Yn(_)))||Qa(o)&&Ft(GD(o),z8e)}function cZt(o,_,y){if(!(pb(o,st)||Ac(o).length!==0&&z8e(o)))return;if(ug(o)){const D=Ome(Pl(o)[0],_,y);return D?hh(D,J5(o)):void 0}if(Qa(o)){const D=qt(GD(o),B=>Ome(B,_,y));if(!Ce(D,B=>!!B))return;const L=tv(_)&4?Wr(o.target.elementFlags,B=>B&2?1:B):o.target.elementFlags;return rv(D,L,o.target.readonly,o.target.labeledElementDeclarations)}const S=V(1040,void 0);return S.source=o,S.mappedType=_,S.constraintType=y,S}function lZt(o){const _=Ys(o);return _.type||(_.type=Ome(o.links.propertyType,o.links.mappedType,o.links.constraintType)||te),_.type}function uZt(o,_,y){const S=ap(y.type,s1(_)),D=SC(_),L=H8e(S);return NC([L],o,D),wmt(L)||te}function Ome(o,_,y){const S=o.id+","+_.id+","+y.id;if(Ku.has(S))return Ku.get(S)||te;Ex.push(o),ZI.push(_);const D=D2;YA(o,Ex,Ex.length,2)&&(D2|=1),YA(_,ZI,ZI.length,2)&&(D2|=2);let L;return D2!==3&&(L=uZt(o,_,y)),Ex.pop(),ZI.pop(),D2=D,Ku.set(S,L),L}function*U8e(o,_,y,S){const D=Ac(_);for(const L of D)if(!o_t(L)&&(y||!(L.flags&16777216||Iu(L)&48))){const B=Ta(o,L.escapedName);if(!B)yield L;else if(S){const K=Yn(L);if(K.flags&109472){const ne=Yn(B);ne.flags&1||Xh(ne)===Xh(K)||(yield L)}}}}function q8e(o,_,y,S){return k_(U8e(o,_,y,S))}function dZt(o,_){return!(_.target.combinedFlags&8)&&_.target.minLength>o.target.minLength||!(_.target.combinedFlags&12)&&(!!(o.target.combinedFlags&12)||_.target.fixedLength<o.target.fixedLength)}function fZt(o,_){return Qa(o)&&Qa(_)?dZt(o,_):!!q8e(o,_,!1,!0)&&!!q8e(_,o,!1,!1)}function wmt(o){return o.candidates?is(o.candidates,2):o.contraCandidates?Wa(o.contraCandidates):void 0}function $8e(o){return!!yr(o).skipDirectInference}function xmt(o){return!!(o.symbol&&Ft(o.symbol.declarations,$8e))}function hZt(o,_){const y=o.texts[0],S=_.texts[0],D=o.texts[o.texts.length-1],L=_.texts[_.texts.length-1],B=Math.min(y.length,S.length),K=Math.min(D.length,L.length);return y.slice(0,B)!==S.slice(0,B)||D.slice(D.length-K)!==L.slice(L.length-K)}function kmt(o,_){if(o==="")return!1;const y=+o;return isFinite(y)&&(!_||""+y===o)}function _Zt(o){return yee(qce(o))}function Mme(o,_){if(_.flags&1)return!0;if(_.flags&134217732)return Da(o,_);if(_.flags&268435456){const y=[];for(;_.flags&268435456;)y.unshift(_.symbol),_=_.type;return oi(y,(D,L)=>JA(L,D),o)===o&&Mme(o,_)}return!1}function Tmt(o,_){if(_.flags&2097152)return Ce(_.types,y=>y===go||Tmt(o,y));if(_.flags&4||Da(o,_))return!0;if(o.flags&128){const y=o.value;return!!(_.flags&8&&kmt(y,!1)||_.flags&64&&YK(y,!1)||_.flags&98816&&y===_.intrinsicName||_.flags&268435456&&Mme(V_(y),_)||_.flags&134217728&&Rme(o,_))}if(o.flags&134217728){const y=o.texts;return y.length===2&&y[0]===""&&y[1]===""&&Da(o.types[0],_)}return!1}function Dmt(o,_){return o.flags&128?Emt([o.value],w,_):o.flags&134217728?i_(o.texts,_.texts)?qt(o.types,(y,S)=>Da(iv(y),iv(_.types[S]))?y:pZt(y)):Emt(o.texts,o.types,_):void 0}function Rme(o,_){const y=Dmt(o,_);return!!y&&Ce(y,(S,D)=>Tmt(S,_.types[D]))}function pZt(o){return o.flags&402653317?o:TN(["",""],[o])}function Emt(o,_,y){const S=o.length-1,D=o[0],L=o[S],B=y.texts,K=B.length-1,ne=B[0],ce=B[K];if(S===0&&D.length<ne.length+ce.length||!D.startsWith(ne)||!L.endsWith(ce))return;const ge=L.slice(0,L.length-ce.length),je=[];let Be=0,kt=ne.length;for(let Oi=1;Oi<K;Oi++){const Ki=B[Oi];if(Ki.length>0){let qn=Be,Qn=kt;for(;Qn=Vt(qn).indexOf(Ki,Qn),!(Qn>=0);){if(qn++,qn===o.length)return;Qn=0}Kt(qn,Qn),kt+=Ki.length}else if(kt<Vt(Be).length)Kt(Be,kt+1);else if(Be<S)Kt(Be+1,0);else return}return Kt(S,Vt(S).length),je;function Vt(Oi){return Oi<S?o[Oi]:ge}function Kt(Oi,Ki){const qn=Oi===Be?V_(Vt(Oi).slice(kt,Ki)):TN([o[Be].slice(kt),...o.slice(Be+1,Oi),Vt(Oi).slice(0,Ki)],_.slice(Be,Oi));je.push(qn),Be=Oi,kt=Ki}}function mZt(o,_){return Qa(_)&&umt(_,0)===ap(o,v0(0))&&!Yu(_,"1")}function NC(o,_,y,S=0,D=!1){let L=!1,B,K=2048,ne,ce,ge,je=0;Be(_,y);function Be(bn,Fn){if(!(!Yx(Fn)||HO(Fn))){if(bn===Ct||bn===ii){const js=B;B=bn,Be(Fn,Fn),B=js;return}if(bn.aliasSymbol&&bn.aliasSymbol===Fn.aliasSymbol){if(bn.aliasTypeArguments){const js=Ys(bn.aliasSymbol).typeParameters,or=sy(js),Do=$x(bn.aliasTypeArguments,js,or,nr(bn.aliasSymbol.valueDeclaration)),La=$x(Fn.aliasTypeArguments,js,or,nr(bn.aliasSymbol.valueDeclaration));qn(Do,La,nmt(bn.aliasSymbol))}return}if(bn===Fn&&bn.flags&3145728){for(const js of bn.types)Be(js,js);return}if(Fn.flags&1048576){const[js,or]=Ki(bn.flags&1048576?bn.types:[bn],Fn.types,gZt),[Do,La]=Ki(js,or,yZt);if(La.length===0)return;if(Fn=is(La),Do.length===0){kt(bn,Fn,1);return}bn=is(Do)}else if(Fn.flags&2097152&&!Ce(Fn.types,lme)&&!(bn.flags&1048576)){const[js,or]=Ki(bn.flags&2097152?bn.types:[bn],Fn.types,yb);if(js.length===0||or.length===0)return;bn=Wa(js),Fn=Wa(or)}if(Fn.flags&41943040){if(HO(Fn))return;Fn=Kx(Fn)}if(Fn.flags&8650752){if(xmt(bn))return;const js=Ui(Fn);if(js){if(Or(bn)&262144||bn===ji)return;if(!js.isFixed){const Do=B||bn;if(Do===ii)return;if((js.priority===void 0||S<js.priority)&&(js.candidates=void 0,js.contraCandidates=void 0,js.topLevel=!0,js.priority=S),S===js.priority){if(mZt(js.typeParameter,Do))return;D&&!L?Yt(js.contraCandidates,Do)||(js.contraCandidates=fn(js.contraCandidates,Do),Ame(o)):Yt(js.candidates,Do)||(js.candidates=fn(js.candidates,Do),Ame(o))}!(S&128)&&Fn.flags&262144&&js.topLevel&&!$z(y,Fn)&&(js.topLevel=!1,Ame(o))}K=Math.min(K,S);return}const or=kC(Fn,!1);if(or!==Fn)Be(bn,or);else if(Fn.flags&8388608){const Do=kC(Fn.indexType,!1);if(Do.flags&465829888){const La=Dpt(kC(Fn.objectType,!1),Do,!1);La&&La!==Fn&&Be(bn,La)}}}if(Or(bn)&4&&Or(Fn)&4&&(bn.target===Fn.target||ug(bn)&&ug(Fn))&&!(bn.node&&Fn.node))qn(Pl(bn),Pl(Fn),E8e(bn.target));else if(bn.flags&4194304&&Fn.flags&4194304)Qn(bn.type,Fn.type);else if((Hz(bn)||bn.flags&4)&&Fn.flags&4194304){const js=aZt(bn);Vt(js,Fn.type,256)}else if(bn.flags&8388608&&Fn.flags&8388608)Be(bn.objectType,Fn.objectType),Be(bn.indexType,Fn.indexType);else if(bn.flags&268435456&&Fn.flags&268435456)bn.symbol===Fn.symbol&&Be(bn.type,Fn.type);else if(bn.flags&33554432)Be(bn.baseType,Fn),kt(zRe(bn),Fn,4);else if(Fn.flags&16777216)Oi(bn,Fn,Ur);else if(Fn.flags&3145728)Gr(bn,Fn.types,Fn.flags);else if(bn.flags&1048576){const js=bn.types;for(const or of js)Be(or,Fn)}else if(Fn.flags&134217728)ga(bn,Fn);else{if(bn=a1(bn),op(bn)&&op(Fn)&&Oi(bn,Fn,fa),!(S&512&&bn.flags&467927040)){const js=Kh(bn);if(js!==bn&&!(js.flags&2621440))return Be(js,Fn);bn=js}bn.flags&2621440&&Oi(bn,Fn,Al)}}}function kt(bn,Fn,js){const or=S;S|=js,Be(bn,Fn),S=or}function Vt(bn,Fn,js){const or=S;S|=js,Qn(bn,Fn),S=or}function Kt(bn,Fn,js,or){const Do=S;S|=or,Gr(bn,Fn,js),S=Do}function Oi(bn,Fn,js){const or=bn.id+","+Fn.id,Do=ne&&ne.get(or);if(Do!==void 0){K=Math.min(K,Do);return}(ne||(ne=new Map)).set(or,-1);const La=K;K=2048;const Ol=je;(ce??(ce=[])).push(bn),(ge??(ge=[])).push(Fn),YA(bn,ce,ce.length,2)&&(je|=1),YA(Fn,ge,ge.length,2)&&(je|=2),je!==3?js(bn,Fn):K=-1,ge.pop(),ce.pop(),je=Ol,ne.set(or,K),K=Math.min(K,La)}function Ki(bn,Fn,js){let or,Do;for(const La of Fn)for(const Ol of bn)js(Ol,La)&&(Be(Ol,La),or=n_(or,Ol),Do=n_(Do,La));return[or?$t(bn,La=>!Yt(or,La)):bn,Do?$t(Fn,La=>!Yt(Do,La)):Fn]}function qn(bn,Fn,js){const or=bn.length<Fn.length?bn.length:Fn.length;for(let Do=0;Do<or;Do++)Do<js.length&&(js[Do]&7)===2?Qn(bn[Do],Fn[Do]):Be(bn[Do],Fn[Do])}function Qn(bn,Fn){D=!D,Be(bn,Fn),D=!D}function rn(bn,Fn){he||S&1024?Qn(bn,Fn):Be(bn,Fn)}function Ui(bn){if(bn.flags&8650752){for(const Fn of o)if(bn===Fn.typeParameter)return Fn}}function fr(bn){let Fn;for(const js of bn){const or=js.flags&2097152&&Fe(js.types,Do=>!!Ui(Do));if(!or||Fn&&or!==Fn)return;Fn=or}return Fn}function Gr(bn,Fn,js){let or=0;if(js&1048576){let Do;const La=bn.flags&1048576?bn.types:[bn],Ol=new Array(La.length);let xu=!1;for(const nc of Fn)if(Ui(nc))Do=nc,or++;else for(let hf=0;hf<La.length;hf++){const Ou=K;K=2048,Be(La[hf],nc),K===S&&(Ol[hf]=!0),xu=xu||K===-1,K=Math.min(K,Ou)}if(or===0){const nc=fr(Fn);nc&&kt(bn,nc,1);return}if(or===1&&!xu){const nc=Rr(La,(hf,Ou)=>Ol[Ou]?void 0:hf);if(nc.length){Be(is(nc),Do);return}}}else for(const Do of Fn)Ui(Do)?or++:Be(bn,Do);if(js&2097152?or===1:or>0)for(const Do of Fn)Ui(Do)&&kt(bn,Do,1)}function vs(bn,Fn,js){if(js.flags&1048576||js.flags&2097152){let or=!1;for(const Do of js.types)or=vs(bn,Fn,Do)||or;return or}if(js.flags&4194304){const or=Ui(js.type);if(or&&!or.isFixed&&!xmt(bn)){const Do=Smt(bn,Fn,js);Do&&kt(Do,or.typeParameter,Or(bn)&262144?16:8)}return!0}if(js.flags&262144){kt(oy(bn,bn.pattern?2:0),js,32);const or=wN(js);if(or&&vs(bn,Fn,or))return!0;const Do=qt(Ac(bn),Yn),La=qt(Ih(bn),Ol=>Ol!==Xi?Ol.type:Ai);return Be(is(Js(Do,La)),SC(Fn)),!0}return!1}function Ur(bn,Fn){if(bn.flags&16777216)Be(bn.checkType,Fn.checkType),Be(bn.extendsType,Fn.extendsType),Be(z2(bn),z2(Fn)),Be(U2(bn),U2(Fn));else{const js=[z2(Fn),U2(Fn)];Kt(bn,js,Fn.flags,D?64:0)}}function ga(bn,Fn){const js=Dmt(bn,Fn),or=Fn.types;if(js||Ce(Fn.texts,Do=>Do.length===0))for(let Do=0;Do<or.length;Do++){const La=js?js[Do]:Ai,Ol=or[Do];if(La.flags&128&&Ol.flags&8650752){const xu=Ui(Ol),nc=xu?Jf(xu.typeParameter):void 0;if(nc&&!Nc(nc)){const hf=nc.flags&1048576?nc.types:[nc];let Ou=oi(hf,(ul,Im)=>ul|Im.flags,0);if(!(Ou&4)){const ul=La.value;Ou&296&&!kmt(ul,!0)&&(Ou&=-297),Ou&2112&&!YK(ul,!0)&&(Ou&=-2113);const Im=oi(hf,(zu,ed)=>ed.flags&Ou?zu.flags&4?zu:ed.flags&4?La:zu.flags&134217728?zu:ed.flags&134217728&&Rme(La,ed)?La:zu.flags&268435456?zu:ed.flags&268435456&&ul===wpt(ed.symbol,ul)?La:zu.flags&128?zu:ed.flags&128&&ed.value===ul?ed:zu.flags&8?zu:ed.flags&8?v0(+ul):zu.flags&32?zu:ed.flags&32?v0(+ul):zu.flags&256?zu:ed.flags&256&&ed.value===+ul?ed:zu.flags&64?zu:ed.flags&64?_Zt(ul):zu.flags&2048?zu:ed.flags&2048&&ZT(ed.value)===ul?ed:zu.flags&16?zu:ed.flags&16?ul==="true"?Pt:ul==="false"?ln:fi:zu.flags&512?zu:ed.flags&512&&ed.intrinsicName===ul?ed:zu.flags&32768?zu:ed.flags&32768&&ed.intrinsicName===ul?ed:zu.flags&65536?zu:ed.flags&65536&&ed.intrinsicName===ul?ed:zu:zu,Ai);if(!(Im.flags&131072)){Be(Im,Ol);continue}}}}Be(La,Ol)}}function fa(bn,Fn){Be(Tm(bn),Tm(Fn)),Be(SC(bn),SC(Fn));const js=KS(bn),or=KS(Fn);js&&or&&Be(js,or)}function Al(bn,Fn){var js,or;if(Or(bn)&4&&Or(Fn)&4&&(bn.target===Fn.target||ug(bn)&&ug(Fn))){qn(Pl(bn),Pl(Fn),E8e(bn.target));return}if(op(bn)&&op(Fn)&&fa(bn,Fn),Or(Fn)&32&&!Fn.declaration.nameType){const Do=Tm(Fn);if(vs(bn,Fn,Do))return}if(!fZt(bn,Fn)){if($2(bn)){if(Qa(Fn)){const Do=QS(bn),La=QS(Fn),Ol=Pl(Fn),xu=Fn.target.elementFlags;if(Qa(bn)&&qQt(bn,Fn)){for(let Ou=0;Ou<La;Ou++)Be(Pl(bn)[Ou],Ol[Ou]);return}const nc=Qa(bn)?Math.min(bn.target.fixedLength,Fn.target.fixedLength):0,hf=Math.min(Qa(bn)?Pz(bn.target,3):0,Fn.target.combinedFlags&12?Pz(Fn.target,3):0);for(let Ou=0;Ou<nc;Ou++)Be(Pl(bn)[Ou],Ol[Ou]);if(!Qa(bn)||Do-nc-hf===1&&bn.target.elementFlags[nc]&4){const Ou=Pl(bn)[nc];for(let ul=nc;ul<La-hf;ul++)Be(xu[ul]&8?hh(Ou):Ou,Ol[ul])}else{const Ou=La-nc-hf;if(Ou===2){if(xu[nc]&xu[nc+1]&8){const ul=Ui(Ol[nc]);ul&&ul.impliedArity!==void 0&&(Be($5(bn,nc,hf+Do-ul.impliedArity),Ol[nc]),Be($5(bn,nc+ul.impliedArity,hf),Ol[nc+1]))}else if(xu[nc]&8&&xu[nc+1]&4){const ul=(js=Ui(Ol[nc]))==null?void 0:js.typeParameter,Im=ul&&Jf(ul);if(Im&&Qa(Im)&&!(Im.target.combinedFlags&12)){const zu=Im.target.fixedLength;Be($5(bn,nc,Do-(nc+zu)),Ol[nc]),Be(K5(bn,nc+zu,hf),Ol[nc+1])}}else if(xu[nc]&4&&xu[nc+1]&8){const ul=(or=Ui(Ol[nc+1]))==null?void 0:or.typeParameter,Im=ul&&Jf(ul);if(Im&&Qa(Im)&&!(Im.target.combinedFlags&12)){const zu=Im.target.fixedLength,ed=Do-Pz(Fn.target,3),nw=ed-zu,tM=rv(Pl(bn).slice(nw,ed),bn.target.elementFlags.slice(nw,ed),!1,bn.target.labeledElementDeclarations&&bn.target.labeledElementDeclarations.slice(nw,ed));Be(K5(bn,nc,hf+zu),Ol[nc]),Be(tM,Ol[nc+1])}}}else if(Ou===1&&xu[nc]&8){const ul=Fn.target.elementFlags[La-1]&2,Im=$5(bn,nc,hf);kt(Im,Ol[nc],ul?2:0)}else if(Ou===1&&xu[nc]&4){const ul=K5(bn,nc,hf);ul&&Be(ul,Ol[nc])}}for(let Ou=0;Ou<hf;Ou++)Be(Pl(bn)[Do-Ou-1],Ol[La-Ou-1]);return}if(ug(Fn)){wu(bn,Fn);return}}Po(bn,Fn),fu(bn,Fn,0),fu(bn,Fn,1),wu(bn,Fn)}}function Po(bn,Fn){const js=XS(Fn);for(const or of js){const Do=Ta(bn,or.escapedName);Do&&!Ft(Do.declarations,$8e)&&Be(IC(Yn(Do),!!(Do.flags&16777216)),IC(Yn(or),!!(or.flags&16777216)))}}function fu(bn,Fn,js){const or=ia(bn,js),Do=or.length;if(Do>0){const La=ia(Fn,js),Ol=La.length;for(let xu=0;xu<Ol;xu++){const nc=Math.max(Do-Ol+xu,0);Ef(bKt(or[nc]),Lz(La[xu]))}}}function Ef(bn,Fn){if(!(bn.flags&64)){const js=L,or=Fn.declaration?Fn.declaration.kind:0;L=L||or===174||or===173||or===176,F8e(bn,Fn,rn),L=js}B8e(bn,Fn,Be)}function wu(bn,Fn){const js=Or(bn)&Or(Fn)&32?8:0,or=Ih(Fn);if(Nme(bn))for(const Do of or){const La=[];for(const Ol of Ac(bn))if(zA($A(Ol,8576),Do.keyType)){const xu=Yn(Ol);La.push(Ol.flags&16777216?Ime(xu):xu)}for(const Ol of Ih(bn))zA(Ol.keyType,Do.keyType)&&La.push(Ol.type);La.length&&kt(is(La),Do.type,js)}for(const Do of or){const La=Ez(bn,Do.keyType);La&&kt(La.type,Do.type,js)}}}function gZt(o,_){return _===le?o===_:yb(o,_)||!!(_.flags&4&&o.flags&128||_.flags&8&&o.flags&256)}function yZt(o,_){return!!(o.flags&524288&&_.flags&524288&&o.symbol&&o.symbol===_.symbol||o.aliasSymbol&&o.aliasTypeArguments&&o.aliasSymbol===_.aliasSymbol)}function vZt(o){const _=m_(o);return!!_&&Au(_.flags&16777216?wRe(_):_,406978556)}function ew(o){return!!(Or(o)&128)}function J8e(o){return!!(Or(o)&16512)}function bZt(o){if(o.length>1){const _=$t(o,J8e);if(_.length){const y=is(_,2);return Js($t(o,S=>!J8e(S)),[y])}}return o}function CZt(o){return o.priority&416?Wa(o.contraCandidates):WQt(o.contraCandidates)}function SZt(o,_){const y=bZt(o.candidates),S=vZt(o.typeParameter)||xN(o.typeParameter),D=!S&&o.topLevel&&(o.isFixed||!oZt(_,o.typeParameter)),L=S?Wr(y,Xh):D?Wr(y,J2):y,B=o.priority&416?is(L,2):BQt(L);return lp(B)}function G8e(o,_){const y=o.inferences[_];if(!y.inferredType){let S,D;if(o.signature){const B=y.candidates?SZt(y,o.signature):void 0,K=y.contraCandidates?CZt(y):void 0;if(B||K){const ne=B&&(!K||!(B.flags&131073)&&Ft(y.contraCandidates,ce=>Da(B,ce))&&Ce(o.inferences,ce=>ce!==y&&m_(ce.typeParameter)!==y.typeParameter||Ce(ce.candidates,ge=>Da(ge,B))));S=ne?B:K,D=ne?K:B}else if(o.flags&1)S=Xn;else{const ne=qD(y.typeParameter);ne&&(S=io(ne,QXt(XXt(o,_),o.nonFixingMapper)))}}else S=wmt(y);y.inferredType=S||K8e(!!(o.flags&2));const L=m_(y.typeParameter);if(L){const B=io(L,o.nonFixingMapper);(!S||!o.compareTypes(S,Wp(B,S)))&&(y.inferredType=D&&o.compareTypes(D,Wp(B,D))?D:B)}}return y.inferredType}function K8e(o){return o?Je:te}function X8e(o){const _=[];for(let y=0;y<o.inferences.length;y++)_.push(G8e(o,y));return _}function Imt(o){switch(o.escapedText){case"document":case"console":return k.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom;case"$":return Q.types?k.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig:k.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery;case"describe":case"suite":case"it":case"test":return Q.types?k.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig:k.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha;case"process":case"require":case"Buffer":case"module":return Q.types?k.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig:k.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode;case"Bun":return Q.types?k.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig:k.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun;case"Map":case"Set":case"Promise":case"Symbol":case"WeakMap":case"WeakSet":case"Iterator":case"AsyncIterator":case"SharedArrayBuffer":case"Atomics":case"AsyncIterable":case"AsyncIterableIterator":case"AsyncGenerator":case"AsyncGeneratorFunction":case"BigInt":case"Reflect":case"BigInt64Array":case"BigUint64Array":return k.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later;case"await":if(la(o.parent))return k.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function;default:return o.parent.kind===304?k.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer:k.Cannot_find_name_0}}function Lh(o){const _=yr(o);return _.resolvedSymbol||(_.resolvedSymbol=!lu(o)&&_i(o,o,1160127,Imt(o),!EK(o),!1)||pt),_.resolvedSymbol}function Q8e(o){return!!(o.flags&33554432||Qi(o,_=>zf(_)||Mg(_)||a_(_)))}function Pee(o,_,y,S){switch(o.kind){case 80:if(!GT(o)){const B=Lh(o);return B!==pt?`${S?Sc(S):"-1"}|${kf(_)}|${kf(y)}|${Ba(B)}`:void 0}case 110:return`0|${S?Sc(S):"-1"}|${kf(_)}|${kf(y)}`;case 235:case 217:return Pee(o.expression,_,y,S);case 166:const D=Pee(o.left,_,y,S);return D&&`${D}.${o.right.escapedText}`;case 211:case 212:const L=AN(o);if(L!==void 0){const B=Pee(o.expression,_,y,S);return B&&`${B}.${L}`}if(wl(o)&&ot(o.argumentExpression)){const B=Lh(o.argumentExpression);if(e4(B)||Kz(B)&&!Hee(B)){const K=Pee(o.expression,_,y,S);return K&&`${K}.@${Ba(B)}`}}break;case 206:case 207:case 262:case 218:case 219:case 174:return`${Sc(o)}#${kf(_)}`}}function Tf(o,_){switch(_.kind){case 217:case 235:return Tf(o,_.expression);case 226:return lf(_)&&Tf(o,_.left)||ur(_)&&_.operatorToken.kind===28&&Tf(o,_.right)}switch(o.kind){case 236:return _.kind===236&&o.keywordToken===_.keywordToken&&o.name.escapedText===_.name.escapedText;case 80:case 81:return GT(o)?_.kind===110:_.kind===80&&Lh(o)===Lh(_)||(_s(_)||ec(_))&&Rp(Lh(o))===xr(_);case 110:return _.kind===110;case 108:return _.kind===108;case 235:case 217:return Tf(o.expression,_);case 211:case 212:const y=AN(o);if(y!==void 0){const S=Sl(_)?AN(_):void 0;if(S!==void 0)return S===y&&Tf(o.expression,_.expression)}if(wl(o)&&wl(_)&&ot(o.argumentExpression)&&ot(_.argumentExpression)){const S=Lh(o.argumentExpression);if(S===Lh(_.argumentExpression)&&(e4(S)||Kz(S)&&!Hee(S)))return Tf(o.expression,_.expression)}break;case 166:return Sl(_)&&o.right.escapedText===AN(_)&&Tf(o.left,_.expression);case 226:return ur(o)&&o.operatorToken.kind===28&&Tf(o.right,_)}return!1}function AN(o){if(Nr(o))return o.name.escapedText;if(wl(o))return wZt(o);if(ec(o)){const _=Cs(o);return _?cu(_):void 0}if($s(o))return""+o.parent.parameters.indexOf(o)}function Z8e(o){return o.flags&8192?o.escapedName:o.flags&384?cu(""+o.value):void 0}function wZt(o){return cm(o.argumentExpression)?cu(o.argumentExpression.text):pl(o.argumentExpression)?xZt(o.argumentExpression):void 0}function xZt(o){const _=nu(o,111551,!0);if(!_||!(e4(_)||_.flags&8))return;const y=_.valueDeclaration;if(y===void 0)return;const S=km(y);if(S){const D=Z8e(S);if(D!==void 0)return D}if(hI(y)&&VS(y,o)){const D=pV(y);if(D){const L=ta(y.parent)?no(y):Kf(D);return L&&Z8e(L)}if(SS(y))return lP(y.name)}}function Nmt(o,_){for(;Sl(o);)if(o=o.expression,Tf(o,_))return!0;return!1}function ON(o,_){for(;gh(o);)if(o=o.expression,Tf(o,_))return!0;return!1}function X5(o,_){if(o&&o.flags&1048576){const y=k_t(o,_);if(y&&Iu(y)&2)return y.links.isDiscriminantProperty===void 0&&(y.links.isDiscriminantProperty=(y.links.checkFlags&192)===192&&!GA(Yn(y))),!!y.links.isDiscriminantProperty}return!1}function Lmt(o,_){let y;for(const S of o)if(X5(_,S.escapedName)){if(y){y.push(S);continue}y=[S]}return y}function kZt(o,_){const y=new Map;let S=0;for(const D of o)if(D.flags&61603840){const L=Yu(D,_);if(L){if(!Hz(L))return;let B=!1;RN(L,K=>{const ne=kf(Xh(K)),ce=y.get(ne);ce?ce!==te&&(y.set(ne,te),B=!0):y.set(ne,D)}),B||S++}}return S>=10&&S*2>=o.length?y:void 0}function Aee(o){const _=o.types;if(!(_.length<10||Or(o)&32768||$i(_,y=>!!(y.flags&59506688))<10)){if(o.keyPropertyName===void 0){const y=O(_,D=>D.flags&59506688?O(Ac(D),L=>c1(Yn(L))?L.escapedName:void 0):void 0),S=y&&kZt(_,y);o.keyPropertyName=S?y:"",o.constituentMap=S}return o.keyPropertyName.length?o.keyPropertyName:void 0}}function Oee(o,_){var y;const S=(y=o.constituentMap)==null?void 0:y.get(kf(Xh(_)));return S!==te?S:void 0}function Pmt(o,_){const y=Aee(o),S=y&&Yu(_,y);return S&&Oee(o,S)}function TZt(o,_){const y=Aee(o),S=y&&Fe(_.properties,L=>L.symbol&&L.kind===303&&L.symbol.escapedName===y&&Uee(L.initializer)),D=S&&dte(S.initializer);return D&&Oee(o,D)}function Amt(o,_){return Tf(o,_)||Nmt(o,_)}function Omt(o,_){if(o.arguments){for(const y of o.arguments)if(Amt(_,y)||ON(y,_))return!0}return!!(o.expression.kind===211&&Amt(_,o.expression.expression))}function Y8e(o){return o.id<=0&&(o.id=YYe,YYe++),o.id}function DZt(o,_){if(!(o.flags&1048576))return Da(o,_);for(const y of o.types)if(Da(y,_))return!0;return!1}function EZt(o,_){if(o===_)return o;if(_.flags&131072)return _;const y=`A${kf(o)},${kf(_)}`;return Q0(y)??RS(y,IZt(o,_))}function IZt(o,_){const y=ad(o,D=>DZt(_,D)),S=_.flags&512&&XD(_)?eu(y,XA):y;return Da(_,S)?S:o}function e7e(o){if(Or(o)&256)return!1;const _=o1(o);return!!(_.callSignatures.length||_.constructSignatures.length||_.members.get("bind")&&YD(o,kd))}function qO(o,_){return t7e(o,_)&_}function l1(o,_){return qO(o,_)!==0}function t7e(o,_){o.flags&467927040&&(o=Jf(o)||te);const y=o.flags;if(y&268435460)return we?16317953:16776705;if(y&134217856){const S=y&128&&o.value==="";return we?S?12123649:7929345:S?12582401:16776705}if(y&40)return we?16317698:16776450;if(y&256){const S=o.value===0;return we?S?12123394:7929090:S?12582146:16776450}if(y&64)return we?16317188:16775940;if(y&2048){const S=pmt(o);return we?S?12122884:7928580:S?12581636:16775940}return y&16?we?16316168:16774920:y&528?we?o===ln||o===Un?12121864:7927560:o===ln||o===Un?12580616:16774920:y&524288?_&(we?83427327:83886079)?Or(o)&16&&TC(o)?we?83427327:83886079:e7e(o)?we?7880640:16728e3:we?7888800:16736160:0:y&16384?9830144:y&32768?26607360:y&65536?42917664:y&12288?we?7925520:16772880:y&67108864?we?7888800:16736160:y&131072?0:y&1048576?oi(o.types,(S,D)=>S|t7e(D,_),0):y&2097152?NZt(o,_):83886079}function NZt(o,_){const y=Au(o,402784252);let S=0,D=134217727;for(const L of o.types)if(!(y&&L.flags&524288)){const B=t7e(L,_);S|=B,D&=B}return S&8256|D&134209471}function Qg(o,_){return ad(o,y=>l1(y,_))}function MN(o,_){const y=Rmt(Qg(we&&o.flags&2?mc:o,_));if(we)switch(_){case 524288:return Mmt(y,65536,131072,33554432,Qt);case 1048576:return Mmt(y,131072,65536,16777216,tt);case 2097152:case 4194304:return eu(y,S=>l1(S,262144)?GQt(S):S)}return y}function Mmt(o,_,y,S,D){const L=qO(o,50528256);if(!(L&_))return o;const B=is([Jo,D]);return eu(o,K=>l1(K,_)?Wa([K,!(L&S)&&l1(K,y)?B:Jo]):K)}function Rmt(o){return o===mc?te:o}function i7e(o,_){return _?is([Si(o),Kf(_)]):o}function Fmt(o,_){var y;const S=xC(_);if(!Jm(S))return vt;const D=Gm(S);return Yu(o,D)||Jz((y=UA(o,D))==null?void 0:y.type)||vt}function Bmt(o,_){return up(o,G5)&&umt(o,_)||Jz(iw(65,o,tt,void 0))||vt}function Jz(o){return o&&(Q.noUncheckedIndexedAccess?is([o,le]):o)}function Wmt(o){return hh(iw(65,o,tt,void 0)||vt)}function LZt(o){return o.parent.kind===209&&n7e(o.parent)||o.parent.kind===303&&n7e(o.parent.parent)?i7e(Mee(o),o.right):Kf(o.right)}function n7e(o){return o.parent.kind===226&&o.parent.left===o||o.parent.kind===250&&o.parent.initializer===o}function PZt(o,_){return Bmt(Mee(o),o.elements.indexOf(_))}function AZt(o){return Wmt(Mee(o.parent))}function Vmt(o){return Fmt(Mee(o.parent),o.name)}function OZt(o){return i7e(Vmt(o),o.objectAssignmentInitializer)}function Mee(o){const{parent:_}=o;switch(_.kind){case 249:return st;case 250:return gte(_)||vt;case 226:return LZt(_);case 220:return tt;case 209:return PZt(_,o);case 230:return AZt(_);case 303:return Vmt(_);case 304:return OZt(_)}return vt}function MZt(o){const _=o.parent,y=jmt(_.parent),S=_.kind===206?Fmt(y,o.propertyName||o.name):o.dotDotDotToken?Wmt(y):Bmt(y,_.elements.indexOf(o));return i7e(S,o.initializer)}function Hmt(o){return yr(o).resolvedType||Kf(o)}function RZt(o){return o.initializer?Hmt(o.initializer):o.parent.parent.kind===249?st:o.parent.parent.kind===250&&gte(o.parent.parent)||vt}function jmt(o){return o.kind===260?RZt(o):MZt(o)}function FZt(o){return o.kind===260&&o.initializer&&og(o.initializer)||o.kind!==208&&o.parent.kind===226&&og(o.parent.right)}function eE(o){switch(o.kind){case 217:return eE(o.expression);case 226:switch(o.operatorToken.kind){case 64:case 76:case 77:case 78:return eE(o.left);case 28:return eE(o.right)}}return o}function zmt(o){const{parent:_}=o;return _.kind===217||_.kind===226&&_.operatorToken.kind===64&&_.left===o||_.kind===226&&_.operatorToken.kind===28&&_.right===o?zmt(_):o}function BZt(o){return o.kind===296?Xh(Kf(o.expression)):Ai}function Fme(o){const _=yr(o);if(!_.switchTypes){_.switchTypes=[];for(const y of o.caseBlock.clauses)_.switchTypes.push(BZt(y))}return _.switchTypes}function Umt(o){if(Ft(o.caseBlock.clauses,y=>y.kind===296&&!Bc(y.expression)))return;const _=[];for(const y of o.caseBlock.clauses){const S=y.kind===296?y.expression.text:void 0;_.push(S&&!Yt(_,S)?S:void 0)}return _}function WZt(o,_){return o.flags&1048576?!O(o.types,y=>!Yt(_,y)):Yt(_,o)}function Q5(o,_){return!!(o===_||o.flags&131072||_.flags&1048576&&VZt(o,_))}function VZt(o,_){if(o.flags&1048576){for(const y of o.types)if(!mb(_.types,y))return!1;return!0}return o.flags&1056&&Jpe(o)===_?!0:mb(_.types,o)}function RN(o,_){return o.flags&1048576?O(o.types,_):_(o)}function dg(o,_){return o.flags&1048576?Ft(o.types,_):_(o)}function up(o,_){return o.flags&1048576?Ce(o.types,_):_(o)}function HZt(o,_){return o.flags&3145728?Ce(o.types,_):_(o)}function ad(o,_){if(o.flags&1048576){const y=o.types,S=$t(y,_);if(S===y)return o;const D=o.origin;let L;if(D&&D.flags&1048576){const B=D.types,K=$t(B,ne=>!!(ne.flags&1048576)||_(ne));if(B.length-K.length===y.length-S.length){if(K.length===1)return K[0];L=t8e(1048576,K)}}return n8e(S,o.objectFlags&16809984,void 0,void 0,L)}return o.flags&131072||_(o)?o:Ai}function Bme(o,_){return ad(o,y=>y!==_)}function jZt(o){return o.flags&1048576?o.types.length:1}function eu(o,_,y){if(o.flags&131072)return o;if(!(o.flags&1048576))return _(o);const S=o.origin,D=S&&S.flags&1048576?S.types:o.types;let L,B=!1;for(const K of D){const ne=K.flags&1048576?eu(K,_,y):_(K);B||(B=K!==ne),ne&&(L?L.push(ne):L=[ne])}return B?L&&is(L,y?0:1):o}function qmt(o,_,y,S){return o.flags&1048576&&y?is(qt(o.types,_),1,y,S):eu(o,_)}function Z5(o,_){return ad(o,y=>(y.flags&_)!==0)}function $mt(o,_){return Au(o,134217804)&&Au(_,402655616)?eu(o,y=>y.flags&4?Z5(_,402653316):DN(y)&&!Au(_,402653188)?Z5(_,128):y.flags&8?Z5(_,264):y.flags&64?Z5(_,2112):y):o}function $O(o){return o.flags===0}function FN(o){return o.flags===0?o.type:o}function JO(o,_){return _?{flags:0,type:o.flags&131072?Xn:o}:o}function zZt(o){const _=V(256);return _.elementType=o,_}function r7e(o){return St[o.id]||(St[o.id]=zZt(o))}function Jmt(o,_){const y=Uz(DC(dte(_)));return Q5(y,o.elementType)?o:r7e(is([o.elementType,y]))}function UZt(o){return o.flags&131072?Pc:hh(o.flags&1048576?is(o.types,2):o)}function qZt(o){return o.finalArrayType||(o.finalArrayType=UZt(o.elementType))}function Ree(o){return Or(o)&256?qZt(o):o}function $Zt(o){return Or(o)&256?o.elementType:Ai}function JZt(o){let _=!1;for(const y of o)if(!(y.flags&131072)){if(!(Or(y)&256))return!1;_=!0}return _}function Gmt(o){const _=zmt(o),y=_.parent,S=Nr(y)&&(y.name.escapedText==="length"||y.parent.kind===213&&ot(y.name)&&Yae(y.name)),D=y.kind===212&&y.expression===_&&y.parent.kind===226&&y.parent.operatorToken.kind===64&&y.parent.left===y&&!fS(y.parent)&&Gf(Kf(y.argumentExpression),296);return S||D}function GZt(o){return(_s(o)||Lo(o)||O_(o)||$s(o))&&!!(dd(o)||nr(o)&&aS(o)&&o.initializer&&lx(o.initializer)&&wp(o.initializer))}function Wme(o,_){if(o=Zu(o),o.flags&8752)return Yn(o);if(o.flags&7){if(Iu(o)&262144){const S=o.links.syntheticOrigin;if(S&&Wme(S))return Yn(o)}const y=o.valueDeclaration;if(y){if(GZt(y))return Yn(o);if(_s(y)&&y.parent.parent.kind===250){const S=y.parent.parent,D=Fee(S.expression,void 0);if(D){const L=S.awaitModifier?15:13;return iw(L,D,tt,void 0)}}_&&da(_,Kn(y,k._0_needs_an_explicit_type_annotation,eo(o)))}}}function Fee(o,_){if(!(o.flags&67108864))switch(o.kind){case 80:const y=Rp(Lh(o));return Wme(y,_);case 110:return pYt(o);case 108:return qme(o);case 211:{const S=Fee(o.expression,_);if(S){const D=o.name;let L;if(Vs(D)){if(!S.symbol)return;L=Ta(S,NV(S.symbol,D.escapedText))}else L=Ta(S,D.escapedText);return L&&Wme(L,_)}return}case 217:return Fee(o.expression,_)}}function Bee(o){const _=yr(o);let y=_.effectsSignature;if(y===void 0){let S;if(ur(o)){const B=KO(o.right);S=s5e(B)}else o.parent.kind===244?S=Fee(o.expression,void 0):o.expression.kind!==108&&(gh(o)?S=ly(jz(uo(o.expression),o.expression),o.expression):S=KO(o.expression));const D=ia(S&&Kh(S)||te,0),L=D.length===1&&!D[0].typeParameters?D[0]:Ft(D,Kmt)?QO(o):void 0;y=_.effectsSignature=L&&Kmt(L)?L:Mi}return y===Mi?void 0:y}function Kmt(o){return!!(cg(o)||o.declaration&&(BO(o.declaration)||te).flags&131072)}function KZt(o,_){if(o.kind===1||o.kind===3)return _.arguments[o.parameterIndex];const y=Dc(_.expression);return Sl(y)?Dc(y.expression):void 0}function XZt(o){const _=Qi(o,iae),y=_n(o),S=E1(y,_.statements.pos);lc.add(Md(y,S.start,S.length,k.The_containing_function_or_module_body_is_too_large_for_control_flow_analysis))}function Wee(o){const _=Vme(o,!1);return zg=o,x2=_,_}function Vee(o){const _=Dc(o,!0);return _.kind===97||_.kind===226&&(_.operatorToken.kind===56&&(Vee(_.left)||Vee(_.right))||_.operatorToken.kind===57&&Vee(_.left)&&Vee(_.right))}function Vme(o,_){for(;;){if(o===zg)return x2;const y=o.flags;if(y&4096){if(!_){const S=Y8e(o),D=kx[S];return D!==void 0?D:kx[S]=Vme(o,!0)}_=!1}if(y&368)o=o.antecedent;else if(y&512){const S=Bee(o.node);if(S){const D=cg(S);if(D&&D.kind===3&&!D.type){const L=o.node.arguments[D.parameterIndex];if(L&&Vee(L))return!1}if(Oc(S).flags&131072)return!1}o=o.antecedent}else{if(y&4)return Ft(o.antecedent,S=>Vme(S,!1));if(y&8){const S=o.antecedent;if(S===void 0||S.length===0)return!1;o=S[0]}else if(y&128){const S=o.node;if(S.clauseStart===S.clauseEnd&&M0t(S.switchStatement))return!1;o=o.antecedent}else if(y&1024){zg=void 0;const S=o.node.target,D=S.antecedent;S.antecedent=o.node.antecedents;const L=Vme(o.antecedent,!1);return S.antecedent=D,L}else return!(y&1)}}}function Hme(o,_){for(;;){const y=o.flags;if(y&4096){if(!_){const S=Y8e(o),D=rb[S];return D!==void 0?D:rb[S]=Hme(o,!0)}_=!1}if(y&496)o=o.antecedent;else if(y&512){if(o.node.expression.kind===108)return!0;o=o.antecedent}else{if(y&4)return Ce(o.antecedent,S=>Hme(S,!1));if(y&8)o=o.antecedent[0];else if(y&1024){const S=o.node.target,D=S.antecedent;S.antecedent=o.node.antecedents;const L=Hme(o.antecedent,!1);return S.antecedent=D,L}else return!!(y&1)}}}function s7e(o){switch(o.kind){case 110:return!0;case 80:if(!GT(o)){const y=Lh(o);return e4(y)||Kz(y)&&!Hee(y)||!!y.valueDeclaration&&ml(y.valueDeclaration)}break;case 211:case 212:return s7e(o.expression)&&d1(yr(o).resolvedSymbol||pt);case 206:case 207:const _=A1(o.parent);return $s(_)||YDe(_)?!o7e(_):_s(_)&&mU(_)}return!1}function LC(o,_,y=_,S,D=(L=>(L=Jr(o,wV))==null?void 0:L.flowNode)()){let L,B=!1,K=0;if(uC)return vt;if(!D)return _;AS++;const ne=$y,ce=FN(Be(D));$y=ne;const ge=Or(ce)&256&&Gmt(o)?Pc:Ree(ce);if(ge===on||o.parent&&o.parent.kind===235&&!(ge.flags&131072)&&Qg(ge,2097152).flags&131072)return _;return ge;function je(){return B?L:(B=!0,L=Pee(o,_,y,S))}function Be(di){var Zi;if(K===2e3)return(Zi=Zn)==null||Zi.instant(Zn.Phase.CheckTypes,"getTypeAtFlowNode_DepthLimit",{flowId:di.id}),uC=!0,XZt(o),vt;K++;let Tn;for(;;){const Bn=di.flags;if(Bn&4096){for(let os=ne;os<$y;os++)if(Jh[os]===di)return K--,DD[os];Tn=di}let Er;if(Bn&16){if(Er=Vt(di),!Er){di=di.antecedent;continue}}else if(Bn&512){if(Er=Oi(di),!Er){di=di.antecedent;continue}}else if(Bn&96)Er=qn(di);else if(Bn&128)Er=Qn(di);else if(Bn&12){if(di.antecedent.length===1){di=di.antecedent[0];continue}Er=Bn&4?rn(di):Ui(di)}else if(Bn&256){if(Er=Ki(di),!Er){di=di.antecedent;continue}}else if(Bn&1024){const os=di.node.target,Oa=os.antecedent;os.antecedent=di.node.antecedents,Er=Be(di.antecedent),os.antecedent=Oa}else if(Bn&2){const os=di.node;if(os&&os!==S&&o.kind!==211&&o.kind!==212&&!(o.kind===110&&os.kind!==219)){di=os.flowNode;continue}Er=y}else Er=fU(_);return Tn&&(Jh[$y]=Tn,DD[$y]=Er,$y++),K--,Er}}function kt(di){const Zi=di.node;return a7e(Zi.kind===260||Zi.kind===208?jmt(Zi):Mee(Zi),o)}function Vt(di){const Zi=di.node;if(Tf(o,Zi)){if(!Wee(di))return on;if(Kk(Zi)===2){const Bn=Be(di.antecedent);return JO(DC(FN(Bn)),$O(Bn))}if(_===Rt||_===Pc){if(FZt(Zi))return r7e(Ai);const Bn=J2(kt(di));return Da(Bn,_)?Bn:Yc}const Tn=qae(Zi)?DC(_):_;return Tn.flags&1048576?EZt(Tn,kt(di)):Tn}if(Nmt(o,Zi)){if(!Wee(di))return on;if(_s(Zi)&&(nr(Zi)||mU(Zi))){const Tn=A8(Zi);if(Tn&&(Tn.kind===218||Tn.kind===219))return Be(di.antecedent)}return _}if(_s(Zi)&&Zi.parent.parent.kind===249&&(Tf(o,Zi.parent.parent.expression)||ON(Zi.parent.parent.expression,o)))return E7e(Ree(FN(Be(di.antecedent))))}function Kt(di,Zi){const Tn=Dc(Zi,!0);if(Tn.kind===97)return on;if(Tn.kind===226){if(Tn.operatorToken.kind===56)return Kt(Kt(di,Tn.left),Tn.right);if(Tn.operatorToken.kind===57)return is([Kt(di,Tn.left),Kt(di,Tn.right)])}return Yp(di,Tn,!0)}function Oi(di){const Zi=Bee(di.node);if(Zi){const Tn=cg(Zi);if(Tn&&(Tn.kind===2||Tn.kind===3)){const Bn=Be(di.antecedent),Er=Ree(FN(Bn)),os=Tn.type?lF(Er,Tn,di.node,!0):Tn.kind===3&&Tn.parameterIndex>=0&&Tn.parameterIndex<di.node.arguments.length?Kt(Er,di.node.arguments[Tn.parameterIndex]):Er;return os===Er?Bn:JO(os,$O(Bn))}if(Oc(Zi).flags&131072)return on}}function Ki(di){if(_===Rt||_===Pc){const Zi=di.node,Tn=Zi.kind===213?Zi.expression.expression:Zi.left.expression;if(Tf(o,eE(Tn))){const Bn=Be(di.antecedent),Er=FN(Bn);if(Or(Er)&256){let os=Er;if(Zi.kind===213)for(const Oa of Zi.arguments)os=Jmt(os,Oa);else{const Oa=dte(Zi.left.argumentExpression);Gf(Oa,296)&&(os=Jmt(os,Zi.right))}return os===Er?Bn:JO(os,$O(Bn))}return Bn}}}function qn(di){const Zi=Be(di.antecedent),Tn=FN(Zi);if(Tn.flags&131072)return Zi;const Bn=(di.flags&32)!==0,Er=Ree(Tn),os=Yp(Er,di.node,Bn);return os===Er?Zi:JO(os,$O(Zi))}function Qn(di){const Zi=Dc(di.node.switchStatement.expression),Tn=Be(di.antecedent);let Bn=FN(Tn);if(Tf(o,Zi))Bn=Ol(Bn,di.node);else if(Zi.kind===221&&Tf(o,Zi.expression))Bn=hf(Bn,di.node);else if(Zi.kind===112)Bn=Ou(Bn,di.node);else{we&&(ON(Zi,o)?Bn=La(Bn,di.node,os=>!(os.flags&163840)):Zi.kind===221&&ON(Zi.expression,o)&&(Bn=La(Bn,di.node,os=>!(os.flags&131072||os.flags&128&&os.value==="undefined"))));const Er=vs(Zi,Bn);Er&&(Bn=fa(Bn,Er,di.node))}return JO(Bn,$O(Tn))}function rn(di){const Zi=[];let Tn=!1,Bn=!1,Er;for(const os of di.antecedent){if(!Er&&os.flags&128&&os.node.clauseStart===os.node.clauseEnd){Er=os;continue}const Oa=Be(os),Ua=FN(Oa);if(Ua===_&&_===y)return Ua;mu(Zi,Ua),Q5(Ua,y)||(Tn=!0),$O(Oa)&&(Bn=!0)}if(Er){const os=Be(Er),Oa=FN(os);if(!(Oa.flags&131072)&&!Yt(Zi,Oa)&&!M0t(Er.node.switchStatement)){if(Oa===_&&_===y)return Oa;Zi.push(Oa),Q5(Oa,y)||(Tn=!0),$O(os)&&(Bn=!0)}}return JO(fr(Zi,Tn?2:1),Bn)}function Ui(di){const Zi=Y8e(di),Tn=qh[Zi]||(qh[Zi]=new Map),Bn=je();if(!Bn)return _;const Er=Tn.get(Bn);if(Er)return Er;for(let Qe=ib;Qe<jg;Qe++)if(qg[Qe]===di&&$h[Qe]===Bn&&$g[Qe].length)return JO(fr($g[Qe],1),!0);const os=[];let Oa=!1,Ua;for(const Qe of di.antecedent){let Re;if(!Ua)Re=Ua=Be(Qe);else{qg[jg]=di,$h[jg]=Bn,$g[jg]=os,jg++;const un=bm;bm=void 0,Re=Be(Qe),bm=un,jg--;const _r=Tn.get(Bn);if(_r)return _r}const Ii=FN(Re);if(mu(os,Ii),Q5(Ii,y)||(Oa=!0),Ii===_)break}const yl=fr(os,Oa?2:1);return $O(Ua)?JO(yl,!0):(Tn.set(Bn,yl),yl)}function fr(di,Zi){if(JZt(di))return r7e(is(qt(di,$Zt)));const Tn=Rmt(is(Wr(di,Ree),Zi));return Tn!==_&&Tn.flags&_.flags&1048576&&i_(Tn.types,_.types)?_:Tn}function Gr(di){if(ta(o)||lx(o)||Ig(o)){if(ot(di)){const Tn=Lh(di).valueDeclaration;if(Tn&&(ec(Tn)||$s(Tn))&&o===Tn.parent&&!Tn.initializer&&!Tn.dotDotDotToken)return Tn}}else if(Sl(di)){if(Tf(o,di.expression))return di}else if(ot(di)){const Zi=Lh(di);if(e4(Zi)){const Tn=Zi.valueDeclaration;if(_s(Tn)&&!Tn.type&&Tn.initializer&&Sl(Tn.initializer)&&Tf(o,Tn.initializer.expression))return Tn.initializer;if(ec(Tn)&&!Tn.initializer){const Bn=Tn.parent.parent;if(_s(Bn)&&!Bn.type&&Bn.initializer&&(ot(Bn.initializer)||Sl(Bn.initializer))&&Tf(o,Bn.initializer))return Tn}}}}function vs(di,Zi){if(_.flags&1048576||Zi.flags&1048576){const Tn=Gr(di);if(Tn){const Bn=AN(Tn);if(Bn){const Er=_.flags&1048576&&Q5(Zi,_)?_:Zi;if(X5(Er,Bn))return Tn}}}}function Ur(di,Zi,Tn){const Bn=AN(Zi);if(Bn===void 0)return di;const Er=gh(Zi),os=we&&(Er||tEe(Zi))&&Au(di,98304);let Oa=Yu(os?Qg(di,2097152):di,Bn);if(!Oa)return di;Oa=os&&Er?Zx(Oa):Oa;const Ua=Tn(Oa);return ad(di,yl=>{const Qe=HA(yl,Bn)||te;return!(Qe.flags&131072)&&!(Ua.flags&131072)&&wee(Ua,Qe)})}function ga(di,Zi,Tn,Bn,Er){if((Tn===37||Tn===38)&&di.flags&1048576){const os=Aee(di);if(os&&os===AN(Zi)){const Oa=Oee(di,Kf(Bn));if(Oa)return Tn===(Er?37:38)?Oa:c1(Yu(Oa,os)||te)?Bme(di,Oa):di}}return Ur(di,Zi,os=>js(os,Tn,Bn,Er))}function fa(di,Zi,Tn){if(Tn.clauseStart<Tn.clauseEnd&&di.flags&1048576&&Aee(di)===AN(Zi)){const Bn=Fme(Tn.switchStatement).slice(Tn.clauseStart,Tn.clauseEnd),Er=is(qt(Bn,os=>Oee(di,os)||te));if(Er!==te)return Er}return Ur(di,Zi,Bn=>Ol(Bn,Tn))}function Al(di,Zi,Tn){if(Tf(o,Zi))return MN(di,Tn?4194304:8388608);we&&Tn&&ON(Zi,o)&&(di=MN(di,2097152));const Bn=vs(Zi,di);return Bn?Ur(di,Bn,Er=>Qg(Er,Tn?4194304:8388608)):di}function Po(di,Zi,Tn){const Bn=Ta(di,Zi);return Bn?!!(Bn.flags&16777216||Iu(Bn)&48)||Tn:!!UA(di,Zi)||!Tn}function fu(di,Zi,Tn){const Bn=Gm(Zi);if(dg(di,os=>Po(os,Bn,!0)))return ad(di,os=>Po(os,Bn,Tn));if(Tn){const os=YKt();if(os)return Wa([di,VO(os,[Zi,te])])}return di}function Ef(di,Zi,Tn,Bn,Er){return Er=Er!==(Tn.kind===112)!=(Bn!==38&&Bn!==36),Yp(di,Zi,Er)}function wu(di,Zi,Tn){switch(Zi.operatorToken.kind){case 64:case 76:case 77:case 78:return Al(Yp(di,Zi.right,Tn),Zi.left,Tn);case 35:case 36:case 37:case 38:const Bn=Zi.operatorToken.kind,Er=eE(Zi.left),os=eE(Zi.right);if(Er.kind===221&&Bc(os))return or(di,Er,Bn,os,Tn);if(os.kind===221&&Bc(Er))return or(di,os,Bn,Er,Tn);if(Tf(o,Er))return js(di,Bn,os,Tn);if(Tf(o,os))return js(di,Bn,Er,Tn);we&&(ON(Er,o)?di=Fn(di,Bn,os,Tn):ON(os,o)&&(di=Fn(di,Bn,Er,Tn)));const Oa=vs(Er,di);if(Oa)return ga(di,Oa,Bn,os,Tn);const Ua=vs(os,di);if(Ua)return ga(di,Ua,Bn,Er,Tn);if(ul(Er))return Im(di,Bn,os,Tn);if(ul(os))return Im(di,Bn,Er,Tn);if(C8(os)&&!Sl(Er))return Ef(di,Er,os,Bn,Tn);if(C8(Er)&&!Sl(os))return Ef(di,os,Er,Bn,Tn);break;case 104:return zu(di,Zi,Tn);case 103:if(Vs(Zi.left))return bn(di,Zi,Tn);const yl=eE(Zi.right);if(zz(di)&&Sl(o)&&Tf(o.expression,yl)){const Qe=Kf(Zi.left);if(Jm(Qe)&&AN(o)===Gm(Qe))return Qg(di,Tn?524288:65536)}if(Tf(o,yl)){const Qe=Kf(Zi.left);if(Jm(Qe))return fu(di,Qe,Tn)}break;case 28:return Yp(di,Zi.right,Tn);case 56:return Tn?Yp(Yp(di,Zi.left,!0),Zi.right,!0):is([Yp(di,Zi.left,!1),Yp(di,Zi.right,!1)]);case 57:return Tn?is([Yp(di,Zi.left,!0),Yp(di,Zi.right,!0)]):Yp(Yp(di,Zi.left,!1),Zi.right,!1)}return di}function bn(di,Zi,Tn){const Bn=eE(Zi.right);if(!Tf(o,Bn))return di;j.assertNode(Zi.left,Vs);const Er=ige(Zi.left);if(Er===void 0)return di;const os=Er.parent,Oa=bd(j.checkDefined(Er.valueDeclaration,"should always have a declaration"))?Yn(os):gl(os);return nw(di,Oa,Tn,!0)}function Fn(di,Zi,Tn,Bn){const Er=Zi===35||Zi===37,os=Zi===35||Zi===36?98304:32768,Oa=Kf(Tn);return Er!==Bn&&up(Oa,yl=>!!(yl.flags&os))||Er===Bn&&up(Oa,yl=>!(yl.flags&(3|os)))?MN(di,2097152):di}function js(di,Zi,Tn,Bn){if(di.flags&1)return di;(Zi===36||Zi===38)&&(Bn=!Bn);const Er=Kf(Tn),os=Zi===35||Zi===36;if(Er.flags&98304){if(!we)return di;const Oa=os?Bn?262144:2097152:Er.flags&65536?Bn?131072:1048576:Bn?65536:524288;return MN(di,Oa)}if(Bn){if(!os&&(di.flags&2||dg(di,sv))){if(Er.flags&469893116||sv(Er))return Er;if(Er.flags&524288)return zi}const Oa=ad(di,Ua=>wee(Ua,Er)||os&&KQt(Ua,Er));return $mt(Oa,Er)}return c1(Er)?ad(di,Oa=>!(dmt(Oa)&&wee(Oa,Er))):di}function or(di,Zi,Tn,Bn,Er){(Tn===36||Tn===38)&&(Er=!Er);const os=eE(Zi.expression);if(!Tf(o,os)){we&&ON(os,o)&&Er===(Bn.text!=="undefined")&&(di=MN(di,2097152));const Oa=vs(os,di);return Oa?Ur(di,Oa,Ua=>Do(Ua,Bn,Er)):di}return Do(di,Bn,Er)}function Do(di,Zi,Tn){return Tn?xu(di,Zi.text):MN(di,kNe.get(Zi.text)||32768)}function La(di,{switchStatement:Zi,clauseStart:Tn,clauseEnd:Bn},Er){return Tn!==Bn&&Ce(Fme(Zi).slice(Tn,Bn),Er)?Qg(di,2097152):di}function Ol(di,{switchStatement:Zi,clauseStart:Tn,clauseEnd:Bn}){const Er=Fme(Zi);if(!Er.length)return di;const os=Er.slice(Tn,Bn),Oa=Tn===Bn||Yt(os,Ai);if(di.flags&2&&!Oa){let Re;for(let Ii=0;Ii<os.length;Ii+=1){const un=os[Ii];if(un.flags&469893116)Re!==void 0&&Re.push(un);else if(un.flags&524288)Re===void 0&&(Re=os.slice(0,Ii)),Re.push(zi);else return di}return is(Re===void 0?os:Re)}const Ua=is(os),yl=Ua.flags&131072?Ai:$mt(ad(di,Re=>wee(Ua,Re)),Ua);if(!Oa)return yl;const Qe=ad(di,Re=>!(dmt(Re)&&Yt(Er,Re.flags&32768?tt:Xh(HQt(Re)))));return yl.flags&131072?Qe:is([yl,Qe])}function xu(di,Zi){switch(Zi){case"string":return nc(di,st,1);case"number":return nc(di,hi,2);case"bigint":return nc(di,vn,4);case"boolean":return nc(di,fi,8);case"symbol":return nc(di,wi,16);case"object":return di.flags&1?di:is([nc(di,zi,32),nc(di,Qt,131072)]);case"function":return di.flags&1?di:nc(di,kd,64);case"undefined":return nc(di,tt,65536)}return nc(di,zi,128)}function nc(di,Zi,Tn){return eu(di,Bn=>ay(Bn,Zi,Cm)?l1(Bn,Tn)?Bn:Ai:YD(Zi,Bn)?Zi:l1(Bn,Tn)?Wa([Bn,Zi]):Ai)}function hf(di,{switchStatement:Zi,clauseStart:Tn,clauseEnd:Bn}){const Er=Umt(Zi);if(!Er)return di;const os=ct(Zi.caseBlock.clauses,yl=>yl.kind===297);if(Tn===Bn||os>=Tn&&os<Bn){const yl=O0t(Tn,Bn,Er);return ad(di,Qe=>qO(Qe,yl)===yl)}const Ua=Er.slice(Tn,Bn);return is(qt(Ua,yl=>yl?xu(di,yl):Ai))}function Ou(di,{switchStatement:Zi,clauseStart:Tn,clauseEnd:Bn}){const Er=ct(Zi.caseBlock.clauses,Ua=>Ua.kind===297),os=Tn===Bn||Er>=Tn&&Er<Bn;for(let Ua=0;Ua<Tn;Ua++){const yl=Zi.caseBlock.clauses[Ua];yl.kind===296&&(di=Yp(di,yl.expression,!1))}if(os){for(let Ua=Bn;Ua<Zi.caseBlock.clauses.length;Ua++){const yl=Zi.caseBlock.clauses[Ua];yl.kind===296&&(di=Yp(di,yl.expression,!1))}return di}const Oa=Zi.caseBlock.clauses.slice(Tn,Bn);return is(qt(Oa,Ua=>Ua.kind===296?Yp(di,Ua.expression,!0):Ai))}function ul(di){return(Nr(di)&&Fr(di.name)==="constructor"||wl(di)&&Bc(di.argumentExpression)&&di.argumentExpression.text==="constructor")&&Tf(o,di.expression)}function Im(di,Zi,Tn,Bn){if(Bn?Zi!==35&&Zi!==37:Zi!==36&&Zi!==38)return di;const Er=Kf(Tn);if(!B5e(Er)&&!gn(Er))return di;const os=Ta(Er,"prototype");if(!os)return di;const Oa=Yn(os),Ua=Nc(Oa)?void 0:Oa;if(!Ua||Ua===Qu||Ua===kd)return di;if(Nc(di))return Ua;return ad(di,Qe=>yl(Qe,Ua));function yl(Qe,Re){return Qe.flags&524288&&Or(Qe)&1||Re.flags&524288&&Or(Re)&1?Qe.symbol===Re.symbol:YD(Qe,Re)}}function zu(di,Zi,Tn){const Bn=eE(Zi.left);if(!Tf(o,Bn))return Tn&&we&&ON(Bn,o)?MN(di,2097152):di;const Er=Zi.right,os=Kf(Er);if(!q2(os,Qu))return di;const Oa=Bee(Zi),Ua=Oa&&cg(Oa);if(Ua&&Ua.kind===1&&Ua.parameterIndex===0)return nw(di,Ua.type,Tn,!0);if(!q2(os,kd))return di;const yl=eu(os,ed);return Nc(di)&&(yl===Qu||yl===kd)||!Tn&&!(yl.flags&524288&&!sv(yl))?di:nw(di,yl,Tn,!0)}function ed(di){const Zi=Yu(di,"prototype");if(Zi&&!Nc(Zi))return Zi;const Tn=ia(di,1);return Tn.length?is(qt(Tn,Bn=>Oc(Lz(Bn)))):Jo}function nw(di,Zi,Tn,Bn){const Er=di.flags&1048576?`N${kf(di)},${kf(Zi)},${(Tn?1:0)|(Bn?2:0)}`:void 0;return Q0(Er)??RS(Er,tM(di,Zi,Tn,Bn))}function tM(di,Zi,Tn,Bn){if(!Tn){if(di===Zi)return Ai;if(Bn)return ad(di,yl=>!q2(yl,Zi));const Ua=nw(di,Zi,!0,!1);return ad(di,yl=>!Q5(yl,Ua))}if(di.flags&3||di===Zi)return Zi;const Er=Bn?q2:YD,os=di.flags&1048576?Aee(di):void 0,Oa=eu(Zi,Ua=>{const yl=os&&Yu(Ua,os),Qe=yl&&Oee(di,yl),Re=eu(Qe||di,Bn?Ii=>q2(Ii,Ua)?Ii:q2(Ua,Ii)?Ua:Ai:Ii=>See(Ii,Ua)?Ii:See(Ua,Ii)?Ua:YD(Ii,Ua)?Ii:YD(Ua,Ii)?Ua:Ai);return Re.flags&131072?eu(di,Ii=>Au(Ii,465829888)&&Er(Ua,Jf(Ii)||te)?Wa([Ii,Ua]):Ai):Re});return Oa.flags&131072?YD(Zi,di)?Zi:Da(di,Zi)?di:Da(Zi,di)?Zi:Wa([di,Zi]):Oa}function cF(di,Zi,Tn){if(Omt(Zi,o)){const Bn=Tn||!cI(Zi)?Bee(Zi):void 0,Er=Bn&&cg(Bn);if(Er&&(Er.kind===0||Er.kind===1))return lF(di,Er,Zi,Tn)}if(zz(di)&&Sl(o)&&Nr(Zi.expression)){const Bn=Zi.expression;if(Tf(o.expression,eE(Bn.expression))&&ot(Bn.name)&&Bn.name.escapedText==="hasOwnProperty"&&Zi.arguments.length===1){const Er=Zi.arguments[0];if(Bc(Er)&&AN(o)===cu(Er.text))return Qg(di,Tn?524288:65536)}}return di}function lF(di,Zi,Tn,Bn){if(Zi.type&&!(Nc(di)&&(Zi.type===Qu||Zi.type===kd))){const Er=KZt(Zi,Tn);if(Er){if(Tf(o,Er))return nw(di,Zi.type,Bn,!1);we&&ON(Er,o)&&(Bn&&!l1(Zi.type,65536)||!Bn&&up(Zi.type,Kee))&&(di=MN(di,2097152));const os=vs(Er,di);if(os)return Ur(di,os,Oa=>nw(Oa,Zi.type,Bn,!1))}}return di}function Yp(di,Zi,Tn){if(fG(Zi)||ur(Zi.parent)&&(Zi.parent.operatorToken.kind===61||Zi.parent.operatorToken.kind===78)&&Zi.parent.left===Zi)return Z2(di,Zi,Tn);switch(Zi.kind){case 80:if(!Tf(o,Zi)&&F<5){const Bn=Lh(Zi);if(e4(Bn)){const Er=Bn.valueDeclaration;if(Er&&_s(Er)&&!Er.type&&Er.initializer&&s7e(o)){F++;const os=Yp(di,Er.initializer,Tn);return F--,os}}}case 110:case 108:case 211:case 212:return Al(di,Zi,Tn);case 213:return cF(di,Zi,Tn);case 217:case 235:return Yp(di,Zi.expression,Tn);case 226:return wu(di,Zi,Tn);case 224:if(Zi.operator===54)return Yp(di,Zi.operand,!Tn);break}return di}function Z2(di,Zi,Tn){if(Tf(o,Zi))return MN(di,Tn?2097152:262144);const Bn=vs(Zi,di);return Bn?Ur(di,Bn,Er=>Qg(Er,Tn?2097152:262144)):di}}function QZt(o,_){if(o=Rp(o),(_.kind===80||_.kind===81)&&(q8(_)&&(_=_.parent),F0(_)&&(!fS(_)||wP(_)))){const y=Dme(wP(_)&&_.kind===211?tge(_,void 0,!0):Kf(_));if(Rp(yr(_).resolvedSymbol)===o)return y}return Wy(_)&&D1(_.parent)&&CN(_.parent)?Hpe(_.parent.symbol):gce(_)&&wP(_.parent)?zx(o):Ux(o)}function Gz(o){return Qi(o.parent,_=>Ho(_)&&!VT(_)||_.kind===268||_.kind===307||_.kind===172)}function Hee(o){return!Xmt(o,void 0)}function Xmt(o,_){const y=Qi(o.valueDeclaration,jme);if(!y)return!1;const S=yr(y);return S.flags&131072||(S.flags|=131072,ZZt(y)||Zmt(y)),!o.lastAssignmentPos||_&&o.lastAssignmentPos<_.pos}function o7e(o){return j.assert(_s(o)||$s(o)),Qmt(o.name)}function Qmt(o){return o.kind===80?Hee(xr(o.parent)):Ft(o.elements,_=>_.kind!==232&&Qmt(_.name))}function ZZt(o){return!!Qi(o.parent,_=>jme(_)&&!!(yr(_).flags&131072))}function jme(o){return Qc(o)||Os(o)}function Zmt(o){switch(o.kind){case 80:if(fS(o)){const S=Lh(o);if(Kz(S)&&S.lastAssignmentPos!==Number.MAX_VALUE){const D=Qi(o,jme),L=Qi(S.valueDeclaration,jme);S.lastAssignmentPos=D===L?YZt(o,S.valueDeclaration):Number.MAX_VALUE}}return;case 281:const _=o.parent.parent,y=o.propertyName||o.name;if(!o.isTypeOnly&&!_.isTypeOnly&&!_.moduleSpecifier&&y.kind!==11){const S=nu(y,111551,!0,!0);S&&Kz(S)&&(S.lastAssignmentPos=Number.MAX_VALUE)}return;case 264:case 265:case 266:return}ws(o)||Uo(o,Zmt)}function YZt(o,_){let y=o.pos;for(;o&&o.pos>_.pos;){switch(o.kind){case 243:case 244:case 245:case 246:case 247:case 248:case 249:case 250:case 254:case 255:case 258:case 263:y=o.end}o=o.parent}return y}function e4(o){return o.flags&3&&(k7e(o)&6)!==0}function Kz(o){const _=o.valueDeclaration&&A1(o.valueDeclaration);return!!_&&($s(_)||_s(_)&&(lD(_.parent)||eYt(_)))}function eYt(o){return!!(o.parent.flags&1)&&!(Rk(o)&32||o.parent.parent.kind===243&&cS(o.parent.parent.parent))}function tYt(o){const _=yr(o);if(_.parameterInitializerContainsUndefined===void 0){if(!Qy(o,8))return PO(o.symbol),!0;const y=!!l1(eF(o,0),16777216);if(!Zy())return PO(o.symbol),!0;_.parameterInitializerContainsUndefined??(_.parameterInitializerContainsUndefined=y)}return _.parameterInitializerContainsUndefined}function iYt(o,_){return we&&_.kind===169&&_.initializer&&l1(o,16777216)&&!tYt(_)?Qg(o,524288):o}function nYt(o,_){const y=_.parent;return y.kind===211||y.kind===166||y.kind===213&&y.expression===_||y.kind===214&&y.expression===_||y.kind===212&&y.expression===_&&!(dg(o,egt)&&IN(Kf(y.argumentExpression)))}function Ymt(o){return o.flags&2097152?Ft(o.types,Ymt):!!(o.flags&465829888&&iv(o).flags&1146880)}function egt(o){return o.flags&2097152?Ft(o.types,egt):!!(o.flags&465829888&&!Au(iv(o),98304))}function rYt(o,_){const y=(ot(o)||Nr(o)||wl(o))&&!((z1(o.parent)||PI(o.parent))&&o.parent.tagName===o)&&(_&&_&32?g_(o,8):g_(o,void 0));return y&&!GA(y)}function a7e(o,_,y){return HO(o)&&(o=o.baseType),!(y&&y&2)&&dg(o,Ymt)&&(nYt(o,_)||rYt(_,y))?eu(o,iv):o}function tgt(o){return!!Qi(o,_=>{const y=_.parent;return y===void 0?"quit":Il(y)?y.expression===_&&pl(_):vh(y)?y.name===_||y.propertyName===_:!1})}function t4(o,_,y,S){if(dt&&!(o.flags&33554432&&!O_(o)&&!Lo(o)))switch(_){case 1:return zme(o);case 2:return igt(o,y,S);case 3:return ngt(o);case 4:return c7e(o);case 5:return rgt(o);case 6:return sgt(o);case 7:return ogt(o);case 8:return agt(o);case 0:{if(ot(o)&&(F0(o)||lh(o.parent)||Wd(o.parent)&&o.parent.moduleReference===o)&&dgt(o)){if(zW(o.parent)&&(Nr(o.parent)?o.parent.expression:o.parent.left)!==o)return;zme(o);return}if(zW(o)){let D=o;for(;zW(D);){if(N1(D))return;D=D.parent}return igt(o)}return Il(o)?ngt(o):oh(o)||AI(o)?c7e(o):Wd(o)?gI(o)||Tge(o)?sgt(o):void 0:vh(o)?ogt(o):((Qc(o)||W1(o))&&rgt(o),!Q.emitDecoratorMetadata||!uD(o)||!lm(o)||!o.modifiers||!lV(pe,o,o.parent,o.parent.parent)?void 0:agt(o))}default:j.assertNever(_,`Unhandled reference hint: ${_}`)}}function zme(o){const _=Lh(o);_&&_!==ut&&_!==pt&&!GT(o)&&jee(_,o)}function igt(o,_,y){const S=Nr(o)?o.expression:o.left;if(ix(S)||!ot(S))return;const D=Lh(S);if(!D||D===pt)return;if(Ag(Q)||sx(Q)&&tgt(o)){jee(D,o);return}const L=y||ju(S);if(Nc(L)||L===Xn){jee(D,o);return}let B=_;if(!B&&!y){const K=Nr(o)?o.name:o.right,ne=Vs(K)&&Xee(K.escapedText,K),ce=Kk(o),ge=Kh(ce!==0||I7e(o)?lp(L):L);B=Vs(K)?ne&&nge(ge,ne)||void 0:Ta(ge,K.escapedText)}B&&(_U(B)||B.flags&8&&o.parent.kind===306)||jee(D,o)}function ngt(o){if(ot(o.expression)){const _=o.expression,y=Rp(nu(_,-1,!0,!0,o));y&&jee(y,_)}}function c7e(o){if(!w7e(o)){const _=lc&&Q.jsx===2?k.Cannot_find_name_0:void 0,y=Gy(o),S=oh(o)?o.tagName:o;let D;if(AI(o)&&y==="null"||(D=_i(S,y,111551,_,!0)),D&&(D.isReferenced=-1,dt&&D.flags&2097152&&!ey(D)&&Ume(D)),AI(o)){const L=_n(o),B=kA(L);B&&_i(S,B,111551,_,!0)}}}function rgt(o){if(re<2&&nd(o)&2){const _=wp(o);sYt(_)}}function sgt(o){Zr(o,32)&&cgt(o)}function ogt(o){if(!o.parent.parent.moduleSpecifier&&!o.isTypeOnly&&!o.parent.parent.isTypeOnly){const _=o.propertyName||o.name;if(_.kind===11)return;const y=_i(_,_.escapedText,2998271,void 0,!0);if(!(y&&(y===et||y===Me||y.declarations&&cS(bN(y.declarations[0]))))){const S=y&&(y.flags&2097152?$f(y):y);(!S||Eh(S)&111551)&&(cgt(o),zme(_))}return}}function agt(o){if(Q.emitDecoratorMetadata){const _=Fe(o.modifiers,Fd);if(!_)return;switch(zd(_,16),o.kind){case 263:const y=Vv(o);if(y)for(const B of y.parameters)GO(bge(B));break;case 177:case 178:const S=o.kind===177?178:177,D=ql(xr(o),S);GO(CN(o)||D&&CN(D));break;case 174:for(const B of o.parameters)GO(bge(B));GO(wp(o));break;case 172:GO(dd(o));break;case 169:GO(bge(o));const L=o.parent;for(const B of L.parameters)GO(bge(B));GO(wp(L));break}}}function jee(o,_){if(dt&&PD(o,111551)&&!vP(_)){const y=$f(o);Eh(o,!0)&1160127&&(Ag(Q)||sx(Q)&&tgt(_)||!_U(Rp(y)))&&Ume(o)}}function Ume(o){j.assert(dt);const _=Ys(o);if(!_.referenced){_.referenced=!0;const y=Dh(o);if(!y)return j.fail();if(gI(y)&&Eh(Zu(o))&111551){const S=K_(y.moduleReference);zme(S)}}}function cgt(o){const _=xr(o),y=$f(_);y&&(y===pt||Eh(_,!0)&111551&&!_U(y))&&Ume(_)}function lgt(o,_){if(!o)return;const y=K_(o),S=(o.kind===80?788968:1920)|2097152,D=_i(y,y.escapedText,S,void 0,!0);if(D&&D.flags&2097152){if(dt&&Fp(D)&&!_U($f(D))&&!ey(D))Ume(D);else if(_&&Ag(Q)&&zh(Q)>=5&&!Fp(D)&&!Ft(D.declarations,Kw)){const L=ft(o,k.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled),B=Fe(D.declarations||w,Xp);B&&da(L,Kn(B,k._0_was_imported_here,Fr(y)))}}}function sYt(o){lgt(o&&cV(o),!1)}function GO(o){const _=m5e(o);_&&E_(_)&&lgt(_,!0)}function oYt(o,_){var y;const S=Yn(o),D=o.valueDeclaration;if(D){if(ec(D)&&!D.initializer&&!D.dotDotDotToken&&D.parent.elements.length>=2){const L=D.parent.parent,B=A1(L);if(B.kind===260&&oE(B)&6||B.kind===169){const K=yr(L);if(!(K.flags&4194304)){K.flags|=4194304;const ne=Ke(L,0),ce=ne&&eu(ne,iv);if(K.flags&=-4194305,ce&&ce.flags&1048576&&!(B.kind===169&&o7e(B))){const ge=D.parent,je=LC(ge,ce,ce,void 0,_.flowNode);return je.flags&131072?Ai:$c(D,je,!0)}}}}if($s(D)&&!D.type&&!D.initializer&&!D.dotDotDotToken){const L=D.parent;if(L.parameters.length>=2&&pme(L)){const B=Qz(L);if(B&&B.parameters.length===1&&Ch(B)){const K=H5(io(Yn(B.parameters[0]),(y=tE(L))==null?void 0:y.nonFixingMapper));if(K.flags&1048576&&up(K,Qa)&&!Ft(L.parameters,o7e)){const ne=LC(L,K,K,void 0,_.flowNode),ce=L.parameters.indexOf(D)-($T(L)?1:0);return ap(ne,v0(ce))}}}}}return S}function ugt(o,_){if(GT(o))return;if(_===ut){if(P7e(o)){ft(o,k.arguments_cannot_be_referenced_in_property_initializers);return}let L=Up(o);if(L)for(re<2&&(L.kind===219?ft(o,k.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_function_expression):Zr(L,1024)&&ft(o,k.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method)),yr(L).flags|=512;L&&xl(L);)L=Up(L),L&&(yr(L).flags|=512);return}const y=Rp(_),S=I5e(y,o);_C(S)&&o8e(o,S)&&S.declarations&&pC(o,S.declarations,o.escapedText);const D=y.valueDeclaration;if(D&&y.flags&32&&ss(D)&&D.name!==o){let L=Hh(o,!1,!1);for(;L.kind!==307&&L.parent!==D;)L=Hh(L,!1,!1);L.kind!==307&&(yr(D).flags|=262144,yr(L).flags|=262144,yr(o).flags|=536870912)}dYt(o,_)}function aYt(o,_){if(GT(o))return zee(o);const y=Lh(o);if(y===pt)return vt;if(ugt(o,y),y===ut)return P7e(o)?vt:Yn(y);dgt(o)&&t4(o,1);const S=Rp(y);let D=S.valueDeclaration;if(D&&D.kind===208&&Yt(nb,D.parent)&&Qi(o,Qn=>Qn===D.parent))return ji;let L=oYt(S,o);const B=Kk(o);if(B){if(!(S.flags&3)&&!(nr(o)&&S.flags&512)){const Qn=S.flags&384?k.Cannot_assign_to_0_because_it_is_an_enum:S.flags&32?k.Cannot_assign_to_0_because_it_is_a_class:S.flags&1536?k.Cannot_assign_to_0_because_it_is_a_namespace:S.flags&16?k.Cannot_assign_to_0_because_it_is_a_function:S.flags&2097152?k.Cannot_assign_to_0_because_it_is_an_import:k.Cannot_assign_to_0_because_it_is_not_a_variable;return ft(o,Qn,eo(y)),vt}if(d1(S))return S.flags&3?ft(o,k.Cannot_assign_to_0_because_it_is_a_constant,eo(y)):ft(o,k.Cannot_assign_to_0_because_it_is_a_read_only_property,eo(y)),vt}const K=S.flags&2097152;if(S.flags&3){if(B===1)return qae(o)?DC(L):L}else if(K)D=Dh(y);else return L;if(!D)return L;L=a7e(L,o,_);const ne=A1(D).kind===169,ce=Gz(D);let ge=Gz(o);const je=ge!==ce,Be=o.parent&&o.parent.parent&&Kv(o.parent)&&n7e(o.parent.parent),kt=y.flags&134217728,Vt=L===Rt||L===Pc,Kt=Vt&&o.parent.kind===235;for(;ge!==ce&&(ge.kind===218||ge.kind===219||zG(ge))&&(e4(S)&&L!==Pc||Kz(S)&&Xmt(S,o));)ge=Gz(ge);const Oi=ne||K||je||Be||kt||cYt(o,D)||L!==Rt&&L!==Pc&&(!we||(L.flags&16387)!==0||vP(o)||Q8e(o)||o.parent.kind===281)||o.parent.kind===235||D.kind===260&&D.exclamationToken||D.flags&33554432,Ki=Kt?tt:Oi?ne?iYt(L,D):L:Vt?tt:Zx(L),qn=Kt?EC(LC(o,L,Ki,ge)):LC(o,L,Ki,ge);if(!Gmt(o)&&(L===Rt||L===Pc)){if(qn===Rt||qn===Pc)return De&&(ft(No(D),k.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined,eo(y),Hn(qn)),ft(o,k.Variable_0_implicitly_has_an_1_type,eo(y),Hn(qn))),fU(qn)}else if(!Oi&&!UO(L)&&UO(qn))return ft(o,k.Variable_0_is_used_before_being_assigned,eo(y)),L;return B?DC(qn):qn}function cYt(o,_){if(ec(_)){const y=Qi(o,ec);return y&&A1(y)===A1(_)}}function dgt(o){var _;const y=o.parent;if(y){if(Nr(y)&&y.expression===o||vh(y)&&y.isTypeOnly)return!1;const S=(_=y.parent)==null?void 0:_.parent;if(S&&Ju(S)&&S.isTypeOnly)return!1}return!0}function lYt(o,_){return!!Qi(o,y=>y===_?"quit":Ho(y)||y.parent&&Lo(y.parent)&&!bd(y.parent)&&y.parent.initializer===y)}function uYt(o,_){return Qi(o,y=>y===_?"quit":y===_.initializer||y===_.condition||y===_.incrementor||y===_.statement)}function l7e(o){return Qi(o,_=>!_||ece(_)?"quit":Zw(_,!1))}function dYt(o,_){if(re>=2||!(_.flags&34)||!_.valueDeclaration||Os(_.valueDeclaration)||_.valueDeclaration.parent.kind===299)return;const y=R0(_.valueDeclaration),S=lYt(o,y),D=l7e(y);if(D){if(S){let L=!0;if(s2(y)){const B=Xk(_.valueDeclaration,261);if(B&&B.parent===y){const K=uYt(o.parent,y);if(K){const ne=yr(K);ne.flags|=8192;const ce=ne.capturedBlockScopeBindings||(ne.capturedBlockScopeBindings=[]);mu(ce,_),K===y.initializer&&(L=!1)}}}L&&(yr(D).flags|=4096)}if(s2(y)){const L=Xk(_.valueDeclaration,261);L&&L.parent===y&&hYt(o,y)&&(yr(_.valueDeclaration).flags|=65536)}yr(_.valueDeclaration).flags|=32768}S&&(yr(_.valueDeclaration).flags|=16384)}function fYt(o,_){const y=yr(o);return!!y&&Yt(y.capturedBlockScopeBindings,xr(_))}function hYt(o,_){let y=o;for(;y.parent.kind===217;)y=y.parent;let S=!1;if(fS(y))S=!0;else if(y.parent.kind===224||y.parent.kind===225){const D=y.parent;S=D.operator===46||D.operator===47}return S?!!Qi(y,D=>D===_?"quit":D===_.statement):!1}function u7e(o,_){if(yr(o).flags|=2,_.kind===172||_.kind===176){const y=_.parent;yr(y).flags|=4}else yr(_).flags|=4}function fgt(o){return mI(o)?o:Ho(o)?void 0:Uo(o,fgt)}function d7e(o){const _=xr(o),y=gl(_);return ys(y)===lt}function hgt(o,_,y){const S=_.parent;qT(S)&&!d7e(S)&&wV(o)&&o.flowNode&&!Hme(o.flowNode,!1)&&ft(o,y)}function _Yt(o,_){Lo(_)&&bd(_)&&pe&&_.initializer&&NW(_.initializer,o.pos)&&lm(_.parent)&&ft(o,k.Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class)}function zee(o){const _=vP(o);let y=Hh(o,!0,!0),S=!1,D=!1;for(y.kind===176&&hgt(o,y,k.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class);;){if(y.kind===219&&(y=Hh(y,!1,!D),S=!0),y.kind===167){y=Hh(y,!S,!1),D=!0;continue}break}if(_Yt(o,y),D)ft(o,k.this_cannot_be_referenced_in_a_computed_property_name);else switch(y.kind){case 267:ft(o,k.this_cannot_be_referenced_in_a_module_or_namespace_body);break;case 266:ft(o,k.this_cannot_be_referenced_in_current_location);break}!_&&S&&re<2&&u7e(o,y);const L=f7e(o,!0,y);if(qe){const B=Yn(Me);if(L===B&&S)ft(o,k.The_containing_arrow_function_captures_the_global_value_of_this);else if(!L){const K=ft(o,k.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation);if(!Os(y)){const ne=f7e(y);ne&&ne!==B&&da(K,Kn(y,k.An_outer_value_of_this_is_shadowed_by_this_container))}}}return L||Je}function f7e(o,_=!0,y=Hh(o,!1,!1)){const S=nr(o);if(Ho(y)&&(!p7e(o)||$T(y))){let D=hRe(y)||S&&gYt(y);if(!D){const L=mYt(y);if(S&&L){const B=uo(L).symbol;B&&B.members&&B.flags&16&&(D=gl(B).thisType)}else dy(y)&&(D=gl(wc(y.symbol)).thisType);D||(D=h7e(y))}if(D)return LC(o,D)}if(ss(y.parent)){const D=xr(y.parent),L=pa(y)?Yn(D):gl(D).thisType;return LC(o,L)}if(Os(y))if(y.commonJsModuleIndicator){const D=xr(y);return D&&Yn(D)}else{if(y.externalModuleIndicator)return tt;if(_)return Yn(Me)}}function pYt(o){const _=Hh(o,!1,!1);if(Ho(_)){const y=Dm(_);if(y.thisParameter)return Wme(y.thisParameter)}if(ss(_.parent)){const y=xr(_.parent);return pa(_)?Yn(y):gl(y).thisType}}function mYt(o){if(o.kind===218&&ur(o.parent)&&Bu(o.parent)===3)return o.parent.left.expression.expression;if(o.kind===174&&o.parent.kind===210&&ur(o.parent.parent)&&Bu(o.parent.parent)===6)return o.parent.parent.left.expression;if(o.kind===218&&o.parent.kind===303&&o.parent.parent.kind===210&&ur(o.parent.parent.parent)&&Bu(o.parent.parent.parent)===6)return o.parent.parent.parent.left.expression;if(o.kind===218&&_d(o.parent)&&ot(o.parent.name)&&(o.parent.name.escapedText==="value"||o.parent.name.escapedText==="get"||o.parent.name.escapedText==="set")&&Aa(o.parent.parent)&&la(o.parent.parent.parent)&&o.parent.parent.parent.arguments[2]===o.parent.parent&&Bu(o.parent.parent.parent)===9)return o.parent.parent.parent.arguments[0].expression;if(Nu(o)&&ot(o.name)&&(o.name.escapedText==="value"||o.name.escapedText==="get"||o.name.escapedText==="set")&&Aa(o.parent)&&la(o.parent.parent)&&o.parent.parent.arguments[2]===o.parent&&Bu(o.parent.parent)===9)return o.parent.parent.arguments[0].expression}function gYt(o){const _=cG(o);if(_&&_.typeExpression)return Bs(_.typeExpression);const y=j5(o);if(y)return j2(y)}function yYt(o,_){return!!Qi(o,y=>Qc(y)?"quit":y.kind===169&&y.parent===_)}function qme(o){const _=o.parent.kind===213&&o.parent.expression===o,y=oV(o,!0);let S=y,D=!1,L=!1;if(!_){for(;S&&S.kind===219;)Zr(S,1024)&&(L=!0),S=oV(S,!0),D=re<2;S&&Zr(S,1024)&&(L=!0)}let B=0;if(!S||!ge(S)){const je=Qi(o,Be=>Be===S?"quit":Be.kind===167);return je&&je.kind===167?ft(o,k.super_cannot_be_referenced_in_a_computed_property_name):_?ft(o,k.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors):!S||!S.parent||!(ss(S.parent)||S.parent.kind===210)?ft(o,k.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions):ft(o,k.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class),vt}if(!_&&y.kind===176&&hgt(o,S,k.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class),pa(S)||_?(B=32,!_&&re>=2&&re<=8&&(Lo(S)||gu(S))&&rTe(o.parent,je=>{(!Os(je)||Cp(je))&&(yr(je).flags|=2097152)})):B=16,yr(o).flags|=B,S.kind===174&&L&&(G_(o.parent)&&fS(o.parent)?yr(S).flags|=256:yr(S).flags|=128),D&&u7e(o.parent,S),S.parent.kind===210)return re<2?(ft(o,k.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher),vt):Je;const K=S.parent;if(!qT(K))return ft(o,k.super_can_only_be_referenced_in_a_derived_class),vt;if(d7e(K))return _?vt:lt;const ne=gl(xr(K)),ce=ne&&Ll(ne)[0];if(!ce)return vt;if(S.kind===176&&yYt(o,S))return ft(o,k.super_cannot_be_referenced_in_constructor_arguments),vt;return B===32?ys(ne):Wp(ce,ne.thisType);function ge(je){return _?je.kind===176:ss(je.parent)||je.parent.kind===210?pa(je)?je.kind===174||je.kind===173||je.kind===177||je.kind===178||je.kind===172||je.kind===175:je.kind===174||je.kind===173||je.kind===177||je.kind===178||je.kind===172||je.kind===171||je.kind===176:!1}}function _gt(o){return(o.kind===174||o.kind===177||o.kind===178)&&o.parent.kind===210?o.parent:o.kind===218&&o.parent.kind===303?o.parent.parent:void 0}function pgt(o){return Or(o)&4&&o.target===Hd?Pl(o)[0]:void 0}function vYt(o){return eu(o,_=>_.flags&2097152?O(_.types,pgt):pgt(_))}function mgt(o,_){let y=o,S=_;for(;S;){const D=vYt(S);if(D)return D;if(y.parent.kind!==303)break;y=y.parent.parent,S=X2(y,void 0)}}function h7e(o){if(o.kind===219)return;if(pme(o)){const y=Qz(o);if(y){const S=y.thisParameter;if(S)return Yn(S)}}const _=nr(o);if(qe||_){const y=_gt(o);if(y){const D=X2(y,void 0),L=mgt(y,D);return L?io(L,j8e(tE(y))):lp(D?EC(D):ju(y))}const S=By(o.parent);if(lf(S)){const D=S.left;if(Sl(D)){const{expression:L}=D;if(_&&ot(L)){const B=_n(S);if(B.commonJsModuleIndicator&&Lh(L)===B.symbol)return}return lp(ju(L))}}}}function ggt(o){const _=o.parent;if(!pme(_))return;const y=VT(_);if(y&&y.arguments){const D=age(y),L=_.parameters.indexOf(o);if(o.dotDotDotToken)return V7e(D,L,D.length,Je,void 0,0);const B=yr(y),K=B.resolvedSignature;B.resolvedSignature=ci;const ne=L<D.length?J2(uo(D[L])):o.initializer?void 0:Gt;return B.resolvedSignature=K,ne}const S=Qz(_);if(S){const D=_.parameters.indexOf(o)-($T(_)?1:0);return o.dotDotDotToken&&rl(_.parameters)===o?ste(S,D):nE(S,D)}}function _7e(o,_){const y=dd(o)||(nr(o)?rX(o):void 0);if(y)return Bs(y);switch(o.kind){case 169:return ggt(o);case 208:return bYt(o,_);case 172:if(pa(o))return CYt(o,_)}}function bYt(o,_){const y=o.parent.parent,S=o.propertyName||o.name,D=_7e(y,_)||y.kind!==208&&y.initializer&&eF(y,o.dotDotDotToken?32:0);if(!D||ta(S)||YW(S))return;if(y.name.kind===207){const B=U6(o.parent.elements,o);return B<0?void 0:y7e(D,B)}const L=xC(S);if(Jm(L)){const B=Gm(L);return Yu(D,B)}}function CYt(o,_){const y=jt(o.parent)&&g_(o.parent,_);if(y)return K2(y,xr(o).escapedName)}function SYt(o,_){const y=o.parent;if(aS(y)&&o===y.initializer){const S=_7e(y,_);if(S)return S;if(!(_&8)&&ta(y.name)&&y.name.elements.length>0)return bi(y.name,!0,!1)}}function wYt(o,_){const y=Up(o);if(y){let S=$me(y,_);if(S){const D=nd(y);if(D&1){const L=(D&2)!==0;S.flags&1048576&&(S=ad(S,K=>!!rE(1,K,L)));const B=rE(1,S,(D&2)!==0);if(!B)return;S=B}if(D&2){const L=eu(S,tw);return L&&is([L,P0t(L)])}return S}}}function xYt(o,_){const y=g_(o,_);if(y){const S=tw(y);return S&&is([S,P0t(S)])}}function kYt(o,_){const y=Up(o);if(y){const S=nd(y);let D=$me(y,_);if(D){const L=(S&2)!==0;if(!o.asteriskToken&&D.flags&1048576&&(D=ad(D,B=>!!rE(1,B,L))),o.asteriskToken){const B=D5e(D,L),K=(B==null?void 0:B.yieldType)??Xn,ne=g_(o,_)??Xn,ce=(B==null?void 0:B.nextType)??te,ge=fge(K,ne,ce,!1);if(L){const je=fge(K,ne,ce,!0);return is([ge,je])}return ge}return rE(0,D,L)}}}function p7e(o){let _=!1;for(;o.parent&&!Ho(o.parent);){if($s(o.parent)&&(_||o.parent.initializer===o))return!0;ec(o.parent)&&o.parent.initializer===o&&(_=!0),o=o.parent}return!1}function ygt(o,_){const y=!!(nd(_)&2),S=$me(_,void 0);if(S)return rE(o,S,y)||void 0}function $me(o,_){const y=BO(o);if(y)return y;const S=b7e(o);if(S&&!Qpe(S)){const L=Oc(S),B=nd(o);return B&1?ad(L,K=>!!(K.flags&58998787)||d5e(K,B,void 0)):B&2?ad(L,K=>!!(K.flags&58998787)||!!nF(K)):L}const D=VT(o);if(D)return g_(D,_)}function vgt(o,_){const S=age(o).indexOf(_);return S===-1?void 0:m7e(o,S)}function m7e(o,_){if(zp(o))return _===0?st:_===1?Q_t(!1):Je;const y=yr(o).resolvedSignature===Rn?Rn:QO(o);if(oh(o)&&_===0)return Xme(y,o);const S=y.parameters.length-1;return Ch(y)&&_>=S?ap(Yn(y.parameters[S]),v0(_-S),256):u1(y,_)}function TYt(o){const _=e5e(o);return _?kN(_):void 0}function DYt(o,_){if(o.parent.kind===215)return vgt(o.parent,_)}function EYt(o,_){const y=o.parent,{left:S,operatorToken:D,right:L}=y;switch(D.kind){case 64:case 77:case 76:case 78:return o===L?NYt(y):void 0;case 57:case 61:const B=g_(y,_);return o===L&&(B&&B.pattern||!B&&!ETe(y))?Kf(S):B;case 56:case 28:return o===L?g_(y,_):void 0;default:return}}function IYt(o){if(M0(o)&&o.symbol)return o.symbol;if(ot(o))return Lh(o);if(Nr(o)){const y=Kf(o.expression);return Vs(o.name)?_(y,o.name):Ta(y,o.name.escapedText)}if(wl(o)){const y=ju(o.argumentExpression);if(!Jm(y))return;const S=Kf(o.expression);return Ta(S,Gm(y))}return;function _(y,S){const D=Xee(S.escapedText,S);return D&&nge(y,D)}}function NYt(o){var _,y;const S=Bu(o);switch(S){case 0:case 4:const D=IYt(o.left),L=D&&D.valueDeclaration;if(L&&(Lo(L)||O_(L))){const ne=dd(L);return ne&&io(Bs(ne),Ys(D).mapper)||(Lo(L)?L.initializer&&Kf(o.left):void 0)}return S===0?Kf(o.left):bgt(o);case 5:if(Jme(o,S))return bgt(o);if(!M0(o.left)||!o.left.symbol)return Kf(o.left);{const ne=o.left.symbol.valueDeclaration;if(!ne)return;const ce=ha(o.left,Sl),ge=dd(ne);if(ge)return Bs(ge);if(ot(ce.expression)){const je=ce.expression,Be=_i(je,je.escapedText,111551,void 0,!0);if(Be){const kt=Be.valueDeclaration&&dd(Be.valueDeclaration);if(kt){const Vt=$b(ce);if(Vt!==void 0)return K2(Bs(kt),Vt)}return}}return nr(ne)||ne===o.left?void 0:Kf(o.left)}case 1:case 6:case 3:case 2:let B;S!==2&&(B=M0(o.left)?(_=o.left.symbol)==null?void 0:_.valueDeclaration:void 0),B||(B=(y=o.symbol)==null?void 0:y.valueDeclaration);const K=B&&dd(B);return K?Bs(K):void 0;case 7:case 8:case 9:return j.fail("Does not apply");default:return j.assertNever(S)}}function Jme(o,_=Bu(o)){if(_===4)return!0;if(!nr(o)||_!==5||!ot(o.left.expression))return!1;const y=o.left.expression.escapedText,S=_i(o.left,y,111551,void 0,!0,!0);return GG(S==null?void 0:S.valueDeclaration)}function bgt(o){if(!o.symbol)return Kf(o.left);if(o.symbol.valueDeclaration){const D=dd(o.symbol.valueDeclaration);if(D){const L=Bs(D);if(L)return L}}const _=ha(o.left,Sl);if(!Ig(Hh(_.expression,!1,!1)))return;const y=zee(_.expression),S=$b(_);return S!==void 0&&K2(y,S)||void 0}function LYt(o){return!!(Iu(o)&262144&&!o.links.type&&Hx(o,0)>=0)}function K2(o,_,y){return eu(o,S=>{var D;if(op(S)&&nee(S)!==2){const L=Tm(S),B=Jf(L)||L,K=y||V_(Ws(_));if(Da(K,B))return cme(S,K)}else if(S.flags&3670016){const L=Ta(S,_);if(L)return LYt(L)?void 0:IC(Yn(L),!!(L.flags&16777216));if(Qa(S)&&$v(_)&&+_>=0){const B=K5(S,S.target.fixedLength,0,!1,!0);if(B)return B}return(D=NRe(LRe(S),y||V_(Ws(_))))==null?void 0:D.type}},!0)}function Cgt(o,_){if(j.assert(Ig(o)),!(o.flags&67108864))return g7e(o,_)}function g7e(o,_){const y=o.parent,S=_d(o)&&_7e(o,_);if(S)return S;const D=X2(y,_);if(D){if(RO(o)){const L=xr(o);return K2(D,L.escapedName,Ys(L).nameType)}if(Jb(o)){const L=No(o);if(L&&Ka(L)){const B=uo(L.expression),K=Jm(B)&&K2(D,Gm(B));if(K)return K}}if(o.name){const L=xC(o.name);return eu(D,B=>{var K;return(K=NRe(LRe(B),L))==null?void 0:K.type},!0)}}}function PYt(o){let _,y;for(let S=0;S<o.length;S++)Km(o[S])&&(_??(_=S),y=S);return{first:_,last:y}}function y7e(o,_,y,S,D){return o&&eu(o,L=>{if(Qa(L)){if((S===void 0||_<S)&&_<L.target.fixedLength)return IC(Pl(L)[_],!!L.target.elementFlags[_]);const B=y!==void 0&&(D===void 0||_>D)?y-_:0,K=B>0&&L.target.combinedFlags&12?Pz(L.target,3):0;return B>0&&B<=K?Pl(L)[QS(L)-B]:K5(L,S===void 0?L.target.fixedLength:Math.min(L.target.fixedLength,S),y===void 0||D===void 0?K:Math.min(K,y-D),!1,!0)}return(!S||_<S)&&K2(L,""+_)||S5e(1,L,tt,void 0,!1)},!0)}function AYt(o,_){const y=o.parent;return o===y.whenTrue||o===y.whenFalse?g_(y,_):void 0}function OYt(o,_,y){const S=X2(o.openingElement.attributes,y),D=Jee(BN(o));if(!(S&&!Nc(S)&&D&&D!==""))return;const L=r3(o.children),B=L.indexOf(_),K=K2(S,D);return K&&(L.length===1?K:eu(K,ne=>YS(ne)?ap(ne,v0(B)):ne,!0))}function MYt(o,_){const y=o.parent;return bG(y)?g_(o,_):Gv(y)?OYt(y,o,_):void 0}function Sgt(o,_){if(U1(o)){const y=X2(o.parent,_);return!y||Nc(y)?void 0:K2(y,u7(o.name))}else return g_(o.parent,_)}function Uee(o){switch(o.kind){case 11:case 9:case 10:case 15:case 228:case 112:case 97:case 106:case 80:case 157:return!0;case 211:case 217:return Uee(o.expression);case 294:return!o.expression||Uee(o.expression)}return!1}function RYt(o,_){const y=`D${Sc(o)},${kf(_)}`;return Q0(y)??RS(y,TZt(_,o)??T8e(_,Js(qt($t(o.properties,S=>S.symbol?S.kind===303?Uee(S.initializer)&&X5(_,S.symbol.escapedName):S.kind===304?X5(_,S.symbol.escapedName):!1:!1),S=>[()=>dte(S.kind===303?S.initializer:S.name),S.symbol.escapedName]),qt($t(Ac(_),S=>{var D;return!!(S.flags&16777216)&&!!((D=o==null?void 0:o.symbol)!=null&&D.members)&&!o.symbol.members.has(S.escapedName)&&X5(_,S.escapedName)}),S=>[()=>tt,S.escapedName])),Da))}function FYt(o,_){const y=`D${Sc(o)},${kf(_)}`,S=Q0(y);if(S)return S;const D=Jee(BN(o));return RS(y,T8e(_,Js(qt($t(o.properties,L=>!!L.symbol&&L.kind===291&&X5(_,L.symbol.escapedName)&&(!L.initializer||Uee(L.initializer))),L=>[L.initializer?()=>dte(L.initializer):()=>Pt,L.symbol.escapedName]),qt($t(Ac(_),L=>{var B;if(!(L.flags&16777216)||!((B=o==null?void 0:o.symbol)!=null&&B.members))return!1;const K=o.parent.parent;return L.escapedName===D&&Gv(K)&&r3(K.children).length?!1:!o.symbol.members.has(L.escapedName)&&X5(_,L.escapedName)}),L=>[()=>tt,L.escapedName])),Da))}function X2(o,_){const y=Ig(o)?Cgt(o,_):g_(o,_),S=Gme(y,o,_);if(S&&!(_&&_&2&&S.flags&8650752)){const D=eu(S,L=>Or(L)&32?L:Kh(L),!0);return D.flags&1048576&&Aa(o)?RYt(o,D):D.flags&1048576&&cD(o)?FYt(o,D):D}}function Gme(o,_,y){if(o&&Au(o,465829888)){const S=tE(_);if(S&&y&1&&Ft(S.inferences,kii))return Kme(o,S.nonFixingMapper);if(S!=null&&S.returnMapper){const D=Kme(o,S.returnMapper);return D.flags&1048576&&mb(D.types,Un)&&mb(D.types,Bt)?ad(D,L=>L!==Un&&L!==Bt):D}}return o}function Kme(o,_){return o.flags&465829888?io(o,_):o.flags&1048576?is(qt(o.types,y=>Kme(y,_)),0):o.flags&2097152?Wa(qt(o.types,y=>Kme(y,_))):o}function g_(o,_){var y;if(o.flags&67108864)return;const S=xgt(o,!_);if(S>=0)return dC[S];const{parent:D}=o;switch(D.kind){case 260:case 169:case 172:case 171:case 208:return SYt(o,_);case 219:case 253:return wYt(o,_);case 229:return kYt(D,_);case 223:return xYt(D,_);case 213:case 214:return vgt(D,o);case 170:return TYt(D);case 216:case 234:return O0(D.type)?g_(D,_):Bs(D.type);case 226:return EYt(o,_);case 303:case 304:return g7e(D,_);case 305:return g_(D.parent,_);case 209:{const L=D,B=X2(L,_),K=U6(L.elements,o),ne=(y=yr(L)).spreadIndices??(y.spreadIndices=PYt(L.elements));return y7e(B,K,L.elements.length,ne.first,ne.last)}case 227:return AYt(o,_);case 239:return j.assert(D.parent.kind===228),DYt(D.parent,o);case 217:{if(nr(D)){if(Kce(D))return Bs(Xce(D));const L=Fk(D);if(L&&!O0(L.typeExpression.type))return Bs(L.typeExpression.type)}return g_(D,_)}case 235:return g_(D,_);case 238:return Bs(D.type);case 277:return km(D);case 294:return MYt(D,_);case 291:case 293:return Sgt(D,_);case 286:case 285:return HYt(D,_);case 301:return VYt(D)}}function wgt(o){qee(o,g_(o,void 0),!0)}function qee(o,_,y){Ug[Jy]=o,dC[Jy]=_,k2[Jy]=y,Jy++}function Xz(){Jy--}function xgt(o,_){for(let y=Jy-1;y>=0;y--)if(o===Ug[y]&&(_||!k2[y]))return y;return-1}function BYt(o,_){T2[it]=o,xx[it]=_,it++}function WYt(){it--}function tE(o){for(let _=it-1;_>=0;_--)if(UT(o,T2[_]))return xx[_]}function VYt(o){return K2($Re(!1),sX(o))}function HYt(o,_){if(z1(o)&&_!==4){const y=xgt(o.parent,!_);if(y>=0)return dC[y]}return m7e(o,0)}function Xme(o,_){return a0t(_)!==0?jYt(o,_):qYt(o,_)}function jYt(o,_){let y=Z7e(o,te);y=kgt(_,BN(_),y);const S=iE(hm.IntrinsicAttributes,_);return fe(S)||(y=tee(S,y)),y}function zYt(o,_){if(o.compositeSignatures){const S=[];for(const D of o.compositeSignatures){const L=Oc(D);if(Nc(L))return L;const B=Yu(L,_);if(!B)return;S.push(B)}return Wa(S)}const y=Oc(o);return Nc(y)?y:Yu(y,_)}function UYt(o){if(n4(o.tagName)){const y=Ogt(o),S=cge(o,y);return kN(S)}const _=ju(o.tagName);if(_.flags&128){const y=Agt(_,o);if(!y)return vt;const S=cge(o,y);return kN(S)}return _}function kgt(o,_,y){const S=hei(_);if(S){const D=UYt(o),L=Fgt(S,nr(o),D,y);if(L)return L}return y}function qYt(o,_){const y=BN(_),S=pei(y);let D=S===void 0?Z7e(o,te):S===""?Oc(o):zYt(o,S);if(!D)return S&&P(_.attributes.properties)&&ft(_,k.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property,Ws(S)),te;if(D=kgt(_,y,D),Nc(D))return D;{let L=D;const B=iE(hm.IntrinsicClassAttributes,_);if(!fe(B)){const ne=y0(B.symbol),ce=Oc(o);let ge;if(ne){const je=$x([ce],ne,sy(ne),nr(_));ge=io(B,cp(ne,je))}else ge=B;L=tee(ge,L)}const K=iE(hm.IntrinsicAttributes,_);return fe(K)||(L=tee(K,L)),L}}function $Yt(o){return ah(Q,"noImplicitAny")?oi(o,(_,y)=>_===y||!_?_:d_t(_.typeParameters,y.typeParameters)?KYt(_,y):void 0):void 0}function JYt(o,_,y){if(!o||!_)return o||_;const S=is([Yn(o),io(Yn(_),y)]);return PN(o,S)}function GYt(o,_,y){const S=dp(o),D=dp(_),L=S>=D?o:_,B=L===o?_:o,K=L===o?S:D,ne=ov(o)||ov(_),ce=ne&&!ov(L),ge=new Array(K+(ce?1:0));for(let je=0;je<K;je++){let Be=nE(L,je);L===_&&(Be=io(Be,y));let kt=nE(B,je)||te;B===_&&(kt=io(kt,y));const Vt=is([Be,kt]),Kt=ne&&!ce&&je===K-1,Oi=je>=fy(L)&&je>=fy(B),Ki=je>=S?void 0:Y5(o,je),qn=je>=D?void 0:Y5(_,je),Qn=Ki===qn?Ki:Ki?qn?void 0:Ki:qn,rn=$a(1|(Oi&&!Kt?16777216:0),Qn||`arg${je}`);rn.links.type=Kt?hh(Vt):Vt,ge[je]=rn}if(ce){const je=$a(1,"args");je.links.type=hh(u1(B,K)),B===_&&(je.links.type=io(je.links.type,y)),ge[K]=je}return ge}function KYt(o,_){const y=o.typeParameters||_.typeParameters;let S;o.typeParameters&&_.typeParameters&&(S=cp(_.typeParameters,o.typeParameters));const D=o.declaration,L=GYt(o,_,S),B=JYt(o.thisParameter,_.thisParameter,S),K=Math.max(o.minArgumentCount,_.minArgumentCount),ne=_b(D,y,B,L,void 0,void 0,K,(o.flags|_.flags)&167);return ne.compositeKind=2097152,ne.compositeSignatures=Js(o.compositeKind===2097152&&o.compositeSignatures||[o],[_]),S&&(ne.mapper=o.compositeKind===2097152&&o.mapper&&o.compositeSignatures?ZD(o.mapper,S):S),ne}function v7e(o,_){const y=ia(o,0),S=$t(y,D=>!XYt(D,_));return S.length===1?S[0]:$Yt(S)}function XYt(o,_){let y=0;for(;y<_.parameters.length;y++){const S=_.parameters[y];if(S.initializer||S.questionToken||S.dotDotDotToken||nX(S))break}return _.parameters.length&&JT(_.parameters[0])&&y--,!ov(o)&&dp(o)<y}function b7e(o){return lx(o)||Ig(o)?Qz(o):void 0}function Qz(o){j.assert(o.kind!==174||Ig(o));const _=j5(o);if(_)return _;const y=X2(o,1);if(!y)return;if(!(y.flags&1048576))return v7e(y,o);let S;const D=y.types;for(const L of D){const B=v7e(L,o);if(B)if(!S)S=[B];else if(Eee(S[0],B,!1,!0,!0,Bz))S.push(B);else return}if(S)return S.length===1?S[0]:l_t(S[0],S)}function QYt(o){const _=_n(o);if(!tk(_)&&!o.isUnterminated){let y;h??(h=Ov(99,!0)),h.setScriptTarget(_.languageVersion),h.setLanguageVariant(_.languageVariant),h.setOnError((S,D,L)=>{const B=h.getTokenEnd();if(S.category===3&&y&&B===y.start&&D===y.length){const K=kP(_.fileName,_.text,B,D,S,L);da(y,K)}else(!y||B!==y.start)&&(y=Md(_,B,D,S,L),lc.add(y))}),h.setText(_.text,o.pos,o.end-o.pos);try{return h.scan(),j.assert(h.reScanSlashToken(!0)===14,"Expected scanner to rescan RegularExpressionLiteral"),!!y}finally{h.setText(""),h.setOnError(void 0)}}return!1}function ZYt(o){const _=yr(o);return _.flags&1||(_.flags|=1,a(()=>QYt(o))),Hu}function YYt(o,_){re<2&&zd(o,Q.downlevelIteration?1536:1024);const y=uo(o.expression,_);return iw(33,y,tt,o.expression)}function eei(o){return o.isSpread?ap(o.type,hi):o.type}function i4(o){return o.kind===208&&!!o.initializer||o.kind===303&&i4(o.initializer)||o.kind===304&&!!o.objectAssignmentInitializer||o.kind===226&&o.operatorToken.kind===64}function tei(o){const _=By(o.parent);return Km(_)&&T1(_.parent)}function Tgt(o,_,y){const S=o.elements,D=S.length,L=[],B=[];wgt(o);const K=fS(o),ne=tF(o),ce=X2(o,void 0),ge=tei(o)||!!ce&&dg(ce,Be=>G5(Be)||op(Be)&&!Be.nameType&&!!Rz(Be.target||Be));let je=!1;for(let Be=0;Be<D;Be++){const kt=S[Be];if(kt.kind===230){re<2&&zd(kt,Q.downlevelIteration?1536:1024);const Vt=uo(kt.expression,_,y);if(YS(Vt))L.push(Vt),B.push(8);else if(K){const Kt=H2(Vt,hi)||S5e(65,Vt,tt,void 0,!1)||te;L.push(Kt),B.push(4)}else L.push(iw(33,Vt,tt,kt.expression)),B.push(4)}else if(Ne&&kt.kind===232)je=!0,L.push(Ue),B.push(2);else{const Vt=iF(kt,_,y);if(L.push(Dd(Vt,!0,je)),B.push(je?2:1),ge&&_&&_&2&&!(_&4)&&Em(kt)){const Kt=tE(o);j.assert(Kt),V8e(Kt,kt,Vt)}}}return Xz(),K?rv(L,B):Dgt(y||ne||ge?rv(L,B,ne&&!(ce&&dg(ce,L8e))):hh(L.length?is(Wr(L,(Be,kt)=>B[kt]&8?Gx(Be,hi)||Je:Be),2):we?Di:Gt,ne))}function Dgt(o){if(!(Or(o)&4))return o;let _=o.literalType;return _||(_=o.literalType=B_t(o),_.objectFlags|=147456),_}function iei(o){switch(o.kind){case 167:return nei(o);case 80:return $v(o.escapedText);case 9:case 11:return $v(o.text);default:return!1}}function nei(o){return Gf(cy(o),296)}function cy(o){const _=yr(o.expression);if(!_.resolvedType){if((a_(o.parent.parent)||ss(o.parent.parent)||zf(o.parent.parent))&&ur(o.expression)&&o.expression.operatorToken.kind===103&&o.parent.kind!==177&&o.parent.kind!==178)return _.resolvedType=vt;if(_.resolvedType=uo(o.expression),Lo(o.parent)&&!bd(o.parent)&&fd(o.parent.parent)){const y=R0(o.parent.parent),S=l7e(y);S&&(yr(S).flags|=4096,yr(o).flags|=32768,yr(o.parent.parent).flags|=32768)}(_.resolvedType.flags&98304||!Gf(_.resolvedType,402665900)&&!Da(_.resolvedType,vi))&&ft(o,k.A_computed_property_name_must_be_of_type_string_number_symbol_or_any)}return _.resolvedType}function rei(o){var _;const y=(_=o.declarations)==null?void 0:_[0];return $v(o.escapedName)||y&&Bf(y)&&iei(y.name)}function Egt(o){var _;const y=(_=o.declarations)==null?void 0:_[0];return LV(o)||y&&Bf(y)&&Ka(y.name)&&Gf(cy(y.name),4096)}function C7e(o,_,y,S){const D=[];for(let B=_;B<y.length;B++){const K=y[B];(S===st&&!Egt(K)||S===hi&&rei(K)||S===wi&&Egt(K))&&D.push(Yn(y[B]))}const L=D.length?is(D,2):tt;return nv(S,L,tF(o))}function Qme(o){j.assert((o.flags&2097152)!==0,"Should only get Alias here.");const _=Ys(o);if(!_.immediateTarget){const y=Dh(o);if(!y)return j.fail();_.immediateTarget=Ox(y,!0)}return _.immediateTarget}function sei(o,_=0){const y=fS(o);moi(o,y);const S=we?_a():void 0;let D=_a(),L=[],B=Jo;wgt(o);const K=X2(o,void 0),ne=K&&K.pattern&&(K.pattern.kind===206||K.pattern.kind===210),ce=tF(o),ge=ce?8:0,je=nr(o)&&!ZG(o),Be=je?Joe(o):void 0,kt=!K&&je&&!Be;let Vt=8192,Kt=!1,Oi=!1,Ki=!1,qn=!1;for(const Ui of o.properties)Ui.name&&Ka(Ui.name)&&cy(Ui.name);let Qn=0;for(const Ui of o.properties){let fr=xr(Ui);const Gr=Ui.name&&Ui.name.kind===167?cy(Ui.name):void 0;if(Ui.kind===303||Ui.kind===304||Ig(Ui)){let vs=Ui.kind===303?J0t(Ui,_):Ui.kind===304?iF(!y&&Ui.objectAssignmentInitializer?Ui.objectAssignmentInitializer:Ui.name,_):G0t(Ui,_);if(je){const fa=Jc(Ui);fa?(Nh(vs,fa,Ui),vs=fa):Be&&Be.typeExpression&&Nh(vs,Bs(Be.typeExpression),Ui)}Vt|=Or(vs)&458752;const Ur=Gr&&Jm(Gr)?Gr:void 0,ga=Ur?$a(4|fr.flags,Gm(Ur),ge|4096):$a(4|fr.flags,fr.escapedName,ge);if(Ur&&(ga.links.nameType=Ur),y&&i4(Ui))ga.flags|=16777216;else if(ne&&!(Or(K)&512)){const fa=Ta(K,fr.escapedName);fa?ga.flags|=fa.flags&16777216:pb(K,st)||ft(Ui.name,k.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1,eo(fr),Hn(K))}if(ga.declarations=fr.declarations,ga.parent=fr.parent,fr.valueDeclaration&&(ga.valueDeclaration=fr.valueDeclaration),ga.links.type=vs,ga.links.target=fr,fr=ga,S==null||S.set(ga.escapedName,ga),K&&_&2&&!(_&4)&&(Ui.kind===303||Ui.kind===174)&&Em(Ui)){const fa=tE(o);j.assert(fa);const Al=Ui.kind===303?Ui.initializer:Ui;V8e(fa,Al,vs)}}else if(Ui.kind===305){re<2&&zd(Ui,2),L.length>0&&(B=KD(B,rn(),o.symbol,Vt,ce),L=[],D=_a(),Oi=!1,Ki=!1,qn=!1);const vs=a1(uo(Ui.expression,_&2));if($ee(vs)){const Ur=f8e(vs,ce);if(S&&Ngt(Ur,S,Ui),Qn=L.length,fe(B))continue;B=KD(B,Ur,o.symbol,Vt,ce)}else ft(Ui,k.Spread_types_may_only_be_created_from_object_types),B=vt;continue}else j.assert(Ui.kind===177||Ui.kind===178),s4(Ui);Gr&&!(Gr.flags&8576)?Da(Gr,vi)&&(Da(Gr,hi)?Ki=!0:Da(Gr,wi)?qn=!0:Oi=!0,y&&(Kt=!0)):D.set(fr.escapedName,fr),L.push(fr)}if(Xz(),fe(B))return vt;if(B!==Jo)return L.length>0&&(B=KD(B,rn(),o.symbol,Vt,ce),L=[],D=_a(),Oi=!1,Ki=!1),eu(B,Ui=>Ui===Jo?rn():Ui);return rn();function rn(){const Ui=[];Oi&&Ui.push(C7e(o,Qn,L,st)),Ki&&Ui.push(C7e(o,Qn,L,hi)),qn&&Ui.push(C7e(o,Qn,L,wi));const fr=Xs(o.symbol,D,w,w,Ui);return fr.objectFlags|=Vt|128|131072,kt&&(fr.objectFlags|=4096),Kt&&(fr.objectFlags|=512),y&&(fr.pattern=o),fr}}function $ee(o){const _=mmt(eu(o,iv));return!!(_.flags&126615553||_.flags&3145728&&Ce(_.types,$ee))}function oei(o){x7e(o)}function aei(o,_){return s4(o),Gee(o)||Je}function cei(o){x7e(o.openingElement),n4(o.closingElement.tagName)?Yme(o.closingElement):uo(o.closingElement.tagName),Zme(o)}function lei(o,_){return s4(o),Gee(o)||Je}function uei(o){x7e(o.openingFragment);const _=_n(o);return WK(Q)&&(Q.jsxFactory||_.pragmas.has("jsx"))&&!Q.jsxFragmentFactory&&!_.pragmas.has("jsxfrag")&&ft(o,Q.jsxFactory?k.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option:k.An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments),Zme(o),Gee(o)||Je}function S7e(o){return o.includes("-")}function n4(o){return ot(o)&&s3(o.escapedText)||j0(o)}function Igt(o,_){return o.initializer?iF(o.initializer,_):Pt}function dei(o,_=0){const y=o.attributes,S=g_(y,0),D=we?_a():void 0;let L=_a(),B=kh,K=!1,ne,ce=!1,ge=2048;const je=Jee(BN(o));for(const Vt of y.properties){const Kt=Vt.symbol;if(U1(Vt)){const Oi=Igt(Vt,_);ge|=Or(Oi)&458752;const Ki=$a(4|Kt.flags,Kt.escapedName);if(Ki.declarations=Kt.declarations,Ki.parent=Kt.parent,Kt.valueDeclaration&&(Ki.valueDeclaration=Kt.valueDeclaration),Ki.links.type=Oi,Ki.links.target=Kt,L.set(Ki.escapedName,Ki),D==null||D.set(Ki.escapedName,Ki),u7(Vt.name)===je&&(ce=!0),S){const qn=Ta(S,Kt.escapedName);qn&&qn.declarations&&_C(qn)&&ot(Vt.name)&&pC(Vt.name,qn.declarations,Vt.name.escapedText)}if(S&&_&2&&!(_&4)&&Em(Vt)){const qn=tE(y);j.assert(qn);const Qn=Vt.initializer.expression;V8e(qn,Qn,Oi)}}else{j.assert(Vt.kind===293),L.size>0&&(B=KD(B,kt(),y.symbol,ge,!1),L=_a());const Oi=a1(uo(Vt.expression,_&2));Nc(Oi)&&(K=!0),$ee(Oi)?(B=KD(B,Oi,y.symbol,ge,!1),D&&Ngt(Oi,D,Vt)):(ft(Vt.expression,k.Spread_types_may_only_be_created_from_object_types),ne=ne?Wa([ne,Oi]):Oi)}}K||L.size>0&&(B=KD(B,kt(),y.symbol,ge,!1));const Be=o.parent.kind===284?o.parent:void 0;if(Be&&Be.openingElement===o&&r3(Be.children).length>0){const Vt=Zme(Be,_);if(!K&&je&&je!==""){ce&&ft(y,k._0_are_specified_twice_The_attribute_named_0_will_be_overwritten,Ws(je));const Kt=X2(o.attributes,void 0),Oi=Kt&&K2(Kt,je),Ki=$a(4,je);Ki.links.type=Vt.length===1?Vt[0]:Oi&&dg(Oi,G5)?rv(Vt):hh(is(Vt)),Ki.valueDeclaration=G.createPropertySignature(void 0,Ws(je),void 0,void 0),_c(Ki.valueDeclaration,y),Ki.valueDeclaration.symbol=Ki;const qn=_a();qn.set(je,Ki),B=KD(B,Xs(y.symbol,qn,w,w,w),y.symbol,ge,!1)}}if(K)return Je;if(ne&&B!==kh)return Wa([ne,B]);return ne||(B===kh?kt():B);function kt(){ge|=8192;const Vt=Xs(y.symbol,L,w,w,w);return Vt.objectFlags|=ge|128|131072,Vt}}function Zme(o,_){const y=[];for(const S of o.children)if(S.kind===12)S.containsOnlyTriviaWhiteSpaces||y.push(st);else{if(S.kind===294&&!S.expression)continue;y.push(iF(S,_))}return y}function Ngt(o,_,y){for(const S of Ac(o))if(!(S.flags&16777216)){const D=_.get(S.escapedName);if(D){const L=ft(D.valueDeclaration,k._0_is_specified_more_than_once_so_this_usage_will_be_overwritten,Ws(D.escapedName));da(L,Kn(y,k.This_spread_always_overwrites_this_property))}}}function fei(o,_){return dei(o.parent,_)}function iE(o,_){const y=BN(_),S=y&&__(y),D=S&&ff(S,o,788968);return D?gl(D):vt}function Yme(o){const _=yr(o);if(!_.resolvedSymbol){const y=iE(hm.IntrinsicElements,o);if(fe(y))return De&&ft(o,k.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists,Ws(hm.IntrinsicElements)),_.resolvedSymbol=pt;{if(!ot(o.tagName)&&!j0(o.tagName))return j.fail();const S=j0(o.tagName)?LP(o.tagName):o.tagName.escapedText,D=Ta(y,S);if(D)return _.jsxFlags|=1,_.resolvedSymbol=D;const L=tyt(y,V_(Ws(S)));return L?(_.jsxFlags|=2,_.resolvedSymbol=L):HA(y,S)?(_.jsxFlags|=2,_.resolvedSymbol=y.symbol):(ft(o,k.Property_0_does_not_exist_on_type_1,Qce(o.tagName),"JSX."+hm.IntrinsicElements),_.resolvedSymbol=pt)}}return _.resolvedSymbol}function w7e(o){const _=o&&_n(o),y=_&&yr(_);if(y&&y.jsxImplicitImportContainer===!1)return;if(y&&y.jsxImplicitImportContainer)return y.jsxImplicitImportContainer;const S=HK(VK(Q,_),Q);if(!S)return;const L=yh(Q)===1?k.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option:k.Cannot_find_module_0_or_its_corresponding_type_declarations,B=$oi(_,S),K=OA(B||o,S,L,o),ne=K&&K!==pt?wc(Zu(K)):void 0;return y&&(y.jsxImplicitImportContainer=ne||!1),ne}function BN(o){const _=o&&yr(o);if(_&&_.jsxNamespace)return _.jsxNamespace;if(!_||_.jsxNamespace!==!1){let S=w7e(o);if(!S||S===pt){const D=Gy(o);S=_i(o,D,1920,void 0,!1)}if(S){const D=Zu(ff(__(Zu(S)),hm.JSX,1920));if(D&&D!==pt)return _&&(_.jsxNamespace=D),D}_&&(_.jsxNamespace=!1)}const y=Zu(jO(hm.JSX,1920,void 0));if(y!==pt)return y}function Lgt(o,_){const y=_&&ff(_.exports,o,788968),S=y&&gl(y),D=S&&Ac(S);if(D){if(D.length===0)return"";if(D.length===1)return D[0].escapedName;D.length>1&&y.declarations&&ft(y.declarations[0],k.The_global_type_JSX_0_may_not_have_more_than_one_property,Ws(o))}}function hei(o){return o&&ff(o.exports,hm.LibraryManagedAttributes,788968)}function _ei(o){return o&&ff(o.exports,hm.ElementType,788968)}function pei(o){return Lgt(hm.ElementAttributesPropertyNameContainer,o)}function Jee(o){return Lgt(hm.ElementChildrenAttributeNameContainer,o)}function Pgt(o,_){if(o.flags&4)return[ci];if(o.flags&128){const D=Agt(o,_);return D?[cge(_,D)]:(ft(_,k.Property_0_does_not_exist_on_type_1,o.value,"JSX."+hm.IntrinsicElements),w)}const y=Kh(o);let S=ia(y,1);return S.length===0&&(S=ia(y,0)),S.length===0&&y.flags&1048576&&(S=vRe(qt(y.types,D=>Pgt(D,_)))),S}function Agt(o,_){const y=iE(hm.IntrinsicElements,_);if(!fe(y)){const S=o.value,D=Ta(y,cu(S));if(D)return Yn(D);const L=H2(y,st);return L||void 0}return Je}function mei(o,_,y){if(o===1){const D=Rgt(y);D&&lg(_,D,Op,y.tagName,k.Its_return_type_0_is_not_a_valid_JSX_element,S)}else if(o===0){const D=Mgt(y);D&&lg(_,D,Op,y.tagName,k.Its_instance_type_0_is_not_a_valid_JSX_element,S)}else{const D=Rgt(y),L=Mgt(y);if(!D||!L)return;const B=is([D,L]);lg(_,B,Op,y.tagName,k.Its_element_type_0_is_not_a_valid_JSX_element,S)}function S(){const D=uu(y.tagName);return jo(void 0,k._0_cannot_be_used_as_a_JSX_component,D)}}function Ogt(o){var _;j.assert(n4(o.tagName));const y=yr(o);if(!y.resolvedJsxElementAttributesType){const S=Yme(o);if(y.jsxFlags&1)return y.resolvedJsxElementAttributesType=Yn(S)||vt;if(y.jsxFlags&2){const D=j0(o.tagName)?LP(o.tagName):o.tagName.escapedText;return y.resolvedJsxElementAttributesType=((_=UA(iE(hm.IntrinsicElements,o),D))==null?void 0:_.type)||vt}else return y.resolvedJsxElementAttributesType=vt}return y.resolvedJsxElementAttributesType}function Mgt(o){const _=iE(hm.ElementClass,o);if(!fe(_))return _}function Gee(o){return iE(hm.Element,o)}function Rgt(o){const _=Gee(o);if(_)return is([_,Qt])}function gei(o){const _=BN(o);if(!_)return;const y=_ei(_);if(!y)return;const S=Fgt(y,nr(o));if(!(!S||fe(S)))return S}function Fgt(o,_,...y){const S=gl(o);if(o.flags&524288){const D=Ys(o).typeParameters;if(P(D)>=y.length){const L=$x(y,D,y.length,_);return P(L)===0?S:VO(o,L)}}if(P(S.typeParameters)>=y.length){const D=$x(y,S.typeParameters,y.length,_);return wC(S,D)}}function yei(o){const _=iE(hm.IntrinsicElements,o);return _?Ac(_):w}function vei(o){(Q.jsx||0)===0&&ft(o,k.Cannot_use_JSX_unless_the_jsx_flag_is_provided),Gee(o)===void 0&&De&&ft(o,k.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist)}function x7e(o){const _=oh(o);if(_&&goi(o),vei(o),c7e(o),_){const y=o,S=QO(y);uge(S,o);const D=gei(y);if(D!==void 0){const L=y.tagName,B=n4(L)?V_(Qce(L)):uo(L);lg(B,D,Op,L,k.Its_type_0_is_not_a_valid_JSX_element_type,()=>{const K=uu(L);return jo(void 0,k._0_cannot_be_used_as_a_JSX_component,K)})}else mei(a0t(y),Oc(S),y)}}function ege(o,_,y){if(o.flags&524288&&(UD(o,_)||UA(o,_)||Tz(_)&&pb(o,st)||y&&S7e(_)))return!0;if(o.flags&33554432)return ege(o.baseType,_,y);if(o.flags&3145728&&Zz(o)){for(const S of o.types)if(ege(S,_,y))return!0}return!1}function Zz(o){return!!(o.flags&524288&&!(Or(o)&512)||o.flags&67108864||o.flags&33554432&&Zz(o.baseType)||o.flags&1048576&&Ft(o.types,Zz)||o.flags&2097152&&Ce(o.types,Zz))}function bei(o,_){if(voi(o),o.expression){const y=uo(o.expression,_);return o.dotDotDotToken&&y!==Je&&!ug(y)&&ft(o,k.JSX_spread_child_must_be_an_array_type),y}else return vt}function k7e(o){return o.valueDeclaration?oE(o.valueDeclaration):0}function T7e(o){if(o.flags&8192||Iu(o)&4)return!0;if(nr(o.valueDeclaration)){const _=o.valueDeclaration.parent;return _&&ur(_)&&Bu(_)===3}}function D7e(o,_,y,S,D,L=!0){const B=L?o.kind===166?o.right:o.kind===205?o:o.kind===208&&o.propertyName?o.propertyName:o.name:void 0;return Bgt(o,_,y,S,D,B)}function Bgt(o,_,y,S,D,L){var B;const K=$m(D,y);if(_){if(re<2&&Wgt(D))return L&&ft(L,k.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword),!1;if(K&64)return L&&ft(L,k.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression,eo(D),Hn(ZA(D))),!1;if(!(K&256)&&((B=D.declarations)!=null&&B.some(k2e)))return L&&ft(L,k.Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super,eo(D)),!1}if(K&64&&Wgt(D)&&(aV(o)||kTe(o)||dm(o.parent)&&GG(o.parent.parent))){const ce=Xb(Qp(D));if(ce&&hsi(o))return L&&ft(L,k.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor,eo(D),Lg(ce.name)),!1}if(!(K&6))return!0;if(K&2){const ce=Xb(Qp(D));return A5e(o,ce)?!0:(L&&ft(L,k.Property_0_is_private_and_only_accessible_within_class_1,eo(D),Hn(ZA(D))),!1)}if(_)return!0;let ne=Y1t(o,ce=>{const ge=gl(xr(ce));return smt(ge,D,y)});return!ne&&(ne=Cei(o),ne=ne&&smt(ne,D,y),K&256||!ne)?(L&&ft(L,k.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses,eo(D),Hn(ZA(D)||S)),!1):K&256?!0:(S.flags&262144&&(S=S.isThisType?m_(S):Jf(S)),!S||!AO(S,ne)?(L&&ft(L,k.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2,eo(D),Hn(ne),Hn(S)),!1):!0)}function Cei(o){const _=Sei(o);let y=(_==null?void 0:_.type)&&Bs(_.type);if(y)y.flags&262144&&(y=m_(y));else{const S=Hh(o,!1,!1);Ho(S)&&(y=h7e(S))}if(y&&Or(y)&7)return SN(y)}function Sei(o){const _=Hh(o,!1,!1);return _&&Ho(_)?$T(_):void 0}function Wgt(o){return!!Dee(o,_=>!(_.flags&8192))}function KO(o){return ly(uo(o),o)}function Kee(o){return l1(o,50331648)}function E7e(o){return Kee(o)?EC(o):o}function wei(o,_){const y=pl(o)?bp(o):void 0;if(o.kind===106){ft(o,k.The_value_0_cannot_be_used_here,"null");return}if(y!==void 0&&y.length<100){if(ot(o)&&y==="undefined"){ft(o,k.The_value_0_cannot_be_used_here,"undefined");return}ft(o,_&16777216?_&33554432?k._0_is_possibly_null_or_undefined:k._0_is_possibly_undefined:k._0_is_possibly_null,y)}else ft(o,_&16777216?_&33554432?k.Object_is_possibly_null_or_undefined:k.Object_is_possibly_undefined:k.Object_is_possibly_null)}function xei(o,_){ft(o,_&16777216?_&33554432?k.Cannot_invoke_an_object_which_is_possibly_null_or_undefined:k.Cannot_invoke_an_object_which_is_possibly_undefined:k.Cannot_invoke_an_object_which_is_possibly_null)}function Vgt(o,_,y){if(we&&o.flags&2){if(pl(_)){const D=bp(_);if(D.length<100)return ft(_,k._0_is_of_type_unknown,D),vt}return ft(_,k.Object_is_of_type_unknown),vt}const S=qO(o,50331648);if(S&50331648){y(_,S);const D=EC(o);return D.flags&229376?vt:D}return o}function ly(o,_){return Vgt(o,_,wei)}function Hgt(o,_){const y=ly(o,_);if(y.flags&16384){if(pl(_)){const S=bp(_);if(ot(_)&&S==="undefined")return ft(_,k.The_value_0_cannot_be_used_here,S),y;if(S.length<100)return ft(_,k._0_is_possibly_undefined,S),y}ft(_,k.Object_is_possibly_undefined)}return y}function tge(o,_,y){return o.flags&64?kei(o,_):N7e(o,o.expression,KO(o.expression),o.name,_,y)}function kei(o,_){const y=uo(o.expression),S=jz(y,o.expression);return Eme(N7e(o,o.expression,ly(S,o.expression),o.name,_),o,S!==y)}function jgt(o,_){const y=QG(o)&&ix(o.left)?ly(zee(o.left),o.left):KO(o.left);return N7e(o,o.left,y,o.right,_)}function I7e(o){for(;o.parent.kind===217;)o=o.parent;return T1(o.parent)&&o.parent.expression===o}function Xee(o,_){for(let y=$G(_);y;y=Cf(y)){const{symbol:S}=y,D=NV(S,o),L=S.members&&S.members.get(D)||S.exports&&S.exports.get(D);if(L)return L}}function Tei(o){if(!Cf(o))return sn(o,k.Private_identifiers_are_not_allowed_outside_class_bodies);if(!xX(o.parent)){if(!F0(o))return sn(o,k.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression);const _=ur(o.parent)&&o.parent.operatorToken.kind===103;if(!ige(o)&&!_)return sn(o,k.Cannot_find_name_0,Fr(o))}return!1}function Dei(o){Tei(o);const _=ige(o);return _&&Zee(_,void 0,!1),Je}function ige(o){if(!F0(o))return;const _=yr(o);return _.resolvedSymbol===void 0&&(_.resolvedSymbol=Xee(o.escapedText,o)),_.resolvedSymbol}function nge(o,_){return Ta(o,_.escapedName)}function Eei(o,_,y){let S;const D=Ac(o);D&&O(D,B=>{const K=B.valueDeclaration;if(K&&Bf(K)&&Vs(K.name)&&K.name.escapedText===_.escapedText)return S=B,!0});const L=sg(_);if(S){const B=j.checkDefined(S.valueDeclaration),K=j.checkDefined(Cf(B));if(y!=null&&y.valueDeclaration){const ne=y.valueDeclaration,ce=Cf(ne);if(j.assert(!!ce),Qi(ce,ge=>K===ge)){const ge=ft(_,k.The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling,L,Hn(o));return da(ge,Kn(ne,k.The_shadowing_declaration_of_0_is_defined_here,L),Kn(B,k.The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here,L)),!0}}return ft(_,k.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier,L,sg(K.name||Due)),!0}return!1}function zgt(o,_){return(bC(_)||aV(o)&&hb(_))&&Hh(o,!0,!1)===jx(_)}function N7e(o,_,y,S,D,L){const B=yr(_).resolvedSymbol,K=Kk(o),ne=Kh(K!==0||I7e(o)?lp(y):y),ce=Nc(ne)||ne===Xn;let ge;if(Vs(S)){(re<9||re<99||!de)&&(K!==0&&zd(o,1048576),K!==1&&zd(o,524288));const Be=Xee(S.escapedText,S);if(K&&Be&&Be.valueDeclaration&&Nu(Be.valueDeclaration)&&sn(S,k.Cannot_assign_to_private_method_0_Private_methods_are_not_writable,Fr(S)),ce){if(Be)return fe(ne)?vt:ne;if($G(S)===void 0)return sn(S,k.Private_identifiers_are_not_allowed_outside_class_bodies),Je}if(ge=Be&&nge(y,Be),ge===void 0){if(Eei(y,S,Be))return vt;const kt=$G(S);kt&&k8(_n(kt),Q.checkJs)&&sn(S,k.Private_field_0_must_be_declared_in_an_enclosing_class,Fr(S))}else ge.flags&65536&&!(ge.flags&32768)&&K!==1&&ft(o,k.Private_accessor_was_defined_without_a_getter)}else{if(ce)return ot(_)&&B&&t4(o,2,void 0,y),fe(ne)?vt:ne;ge=Ta(ne,S.escapedText,_ge(ne),o.kind===166)}t4(o,2,ge,y);let je;if(ge){const Be=I5e(ge,S);if(_C(Be)&&o8e(o,Be)&&Be.declarations&&pC(S,Be.declarations,S.escapedText),Iei(ge,o,S),Zee(ge,o,Qgt(_,B)),yr(o).resolvedSymbol=ge,D7e(o,_.kind===108,wP(o),ne,ge),B0t(o,ge,K))return ft(S,k.Cannot_assign_to_0_because_it_is_a_read_only_property,Fr(S)),vt;je=zgt(o,ge)?Rt:L||EK(o)?zx(ge):Yn(ge)}else{const Be=!Vs(S)&&(K===0||!EN(y)||l7(y))?UA(ne,S.escapedText):void 0;if(!(Be&&Be.type)){const kt=L7e(o,y.symbol,!0);return!kt&&Az(y)?Je:y.symbol===Me?(Me.exports.has(S.escapedText)&&Me.exports.get(S.escapedText).flags&418?ft(S,k.Property_0_does_not_exist_on_type_1,Ws(S.escapedText),Hn(y)):De&&ft(S,k.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature,Hn(y)),Je):(S.escapedText&&!iN(o)&&qgt(S,l7(y)?ne:y,kt),vt)}Be.isReadonly&&(fS(o)||$ae(o))&&ft(o,k.Index_signature_in_type_0_only_permits_reading,Hn(ne)),je=Be.type,Q.noUncheckedIndexedAccess&&Kk(o)!==1&&(je=is([je,le])),Q.noPropertyAccessFromIndexSignature&&Nr(o)&&ft(S,k.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0,Ws(S.escapedText)),Be.declaration&&FS(Be.declaration)&&pC(S,[Be.declaration],S.escapedText)}return Ugt(o,ge,je,S,D)}function L7e(o,_,y){var S;const D=_n(o);if(D&&Q.checkJs===void 0&&D.checkJsDirective===void 0&&(D.scriptKind===1||D.scriptKind===2)){const L=O(_==null?void 0:_.declarations,_n),B=!(_!=null&&_.valueDeclaration)||!ss(_.valueDeclaration)||((S=_.valueDeclaration.heritageClauses)==null?void 0:S.length)||dS(!1,_.valueDeclaration);return!(D!==L&&L&&cS(L))&&!(y&&_&&_.flags&32&&B)&&!(o&&y&&Nr(o)&&o.expression.kind===110&&B)}return!1}function Ugt(o,_,y,S,D){const L=Kk(o);if(L===1)return IC(y,!!(_&&_.flags&16777216));if(_&&!(_.flags&98311)&&!(_.flags&8192&&y.flags&1048576)&&!Nge(_.declarations))return y;if(y===Rt)return CC(o,_);y=a7e(y,o,D);let B=!1;if(we&&ke&&Sl(o)&&o.expression.kind===110){const ne=_&&_.valueDeclaration;if(ne&&V1t(ne)&&!pa(ne)){const ce=Gz(o);ce.kind===176&&ce.parent===ne.parent&&!(ne.flags&33554432)&&(B=!0)}}else we&&_&&_.valueDeclaration&&Nr(_.valueDeclaration)&&yV(_.valueDeclaration)&&Gz(o)===Gz(_.valueDeclaration)&&(B=!0);const K=LC(o,y,B?Zx(y):y);return B&&!UO(y)&&UO(K)?(ft(S,k.Property_0_is_used_before_being_assigned,eo(_)),y):L?DC(K):K}function Iei(o,_,y){const{valueDeclaration:S}=o;if(!S||_n(_).isDeclarationFile)return;let D;const L=Fr(y);P7e(_)&&!cKt(S)&&!(Sl(_)&&Sl(_.expression))&&!VS(S,y)&&!(Nu(S)&&Vge(S)&256)&&(de||!Nei(o))?D=ft(y,k.Property_0_is_used_before_its_initialization,L):S.kind===263&&_.parent.kind!==183&&!(S.flags&33554432)&&!VS(S,y)&&(D=ft(y,k.Class_0_used_before_its_declaration,L)),D&&da(D,Kn(S,k._0_is_declared_here,L))}function P7e(o){return!!Qi(o,_=>{switch(_.kind){case 172:return!0;case 303:case 174:case 177:case 178:case 305:case 167:case 239:case 294:case 291:case 292:case 293:case 286:case 233:case 298:return!1;case 219:case 244:return Xo(_.parent)&&gu(_.parent.parent)?!0:"quit";default:return F0(_)?!1:"quit"}})}function Nei(o){if(!(o.parent.flags&32))return!1;let _=Yn(o.parent);for(;;){if(_=_.symbol&&Lei(_),!_)return!1;const y=Ta(_,o.escapedName);if(y&&y.valueDeclaration)return!0}}function Lei(o){const _=Ll(o);if(_.length!==0)return Wa(_)}function qgt(o,_,y){let S,D;if(!Vs(o)&&_.flags&1048576&&!(_.flags&402784252)){for(const B of _.types)if(!Ta(B,o.escapedText)&&!UA(B,o.escapedText)){S=jo(S,k.Property_0_does_not_exist_on_type_1,al(o),Hn(B));break}}if($gt(o.escapedText,_)){const B=al(o),K=Hn(_);S=jo(S,k.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead,B,K,K+"."+B)}else{const B=aU(_);if(B&&Ta(B,o.escapedText))S=jo(S,k.Property_0_does_not_exist_on_type_1,al(o),Hn(_)),D=Kn(o,k.Did_you_forget_to_use_await);else{const K=al(o),ne=Hn(_),ce=Oei(K,_);if(ce!==void 0)S=jo(S,k.Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later,K,ne,ce);else{const ge=A7e(o,_);if(ge!==void 0){const je=Eu(ge),Be=y?k.Property_0_may_not_exist_on_type_1_Did_you_mean_2:k.Property_0_does_not_exist_on_type_1_Did_you_mean_2;S=jo(S,Be,K,ne,je),D=ge.valueDeclaration&&Kn(ge.valueDeclaration,k._0_is_declared_here,je)}else{const je=Pei(_)?k.Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom:k.Property_0_does_not_exist_on_type_1;S=jo(ERe(S,_),je,K,ne)}}}}const L=Bv(_n(o),o,S);D&&da(L,D),Z0(!y||S.code!==k.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code,L)}function Pei(o){return Q.lib&&!Q.lib.includes("dom")&&HZt(o,_=>_.symbol&&/^(?:EventTarget|Node|(?:HTML[a-zA-Z]*)?Element)$/.test(Ws(_.symbol.escapedName)))&&TC(o)}function $gt(o,_){const y=_.symbol&&Ta(Yn(_.symbol),o);return y!==void 0&&!!y.valueDeclaration&&pa(y.valueDeclaration)}function Aei(o){const _=sg(o),S=vae().get(_);return S&&D6(S.keys())}function Oei(o,_){const y=Kh(_).symbol;if(!y)return;const S=Eu(y),L=vae().get(S);if(L){for(const[B,K]of L)if(Yt(K,o))return B}}function Jgt(o,_){return Qee(o,Ac(_),106500)}function A7e(o,_){let y=Ac(_);if(typeof o!="string"){const S=o.parent;Nr(S)&&(y=$t(y,D=>Zgt(S,_,D))),o=Fr(o)}return Qee(o,y,111551)}function Ggt(o,_){const y=Oo(o)?o:Fr(o),S=Ac(_);return(y==="for"?Fe(S,L=>Eu(L)==="htmlFor"):y==="class"?Fe(S,L=>Eu(L)==="className"):void 0)??Qee(y,S,111551)}function Kgt(o,_){const y=A7e(o,_);return y&&Eu(y)}function Mei(o,_,y){const S=ff(o,_,y);if(S)return S;let D;return o===$e?D=es(["string","number","boolean","object","bigint","symbol"],B=>o.has(B.charAt(0).toUpperCase()+B.slice(1))?$a(524288,B):void 0).concat(as(o.values())):D=as(o.values()),Qee(Ws(_),D,y)}function Xgt(o,_,y){return j.assert(_!==void 0,"outername should always be defined"),Fi(o,_,y,void 0,!1,!1)}function O7e(o,_){return _.exports&&Qee(Fr(o),Fx(_),2623475)}function Rei(o,_,y){function S(B){const K=UD(o,B);if(K){const ne=VN(Yn(K));return!!ne&&fy(ne)>=1&&Da(y,u1(ne,0))}return!1}const D=fS(_)?"set":"get";if(!S(D))return;let L=jV(_.expression);return L===void 0?L=D:L+="."+D,L}function Fei(o,_){const y=_.types.filter(S=>!!(S.flags&128));return LT(o.value,y,S=>S.value)}function Qee(o,_,y){return LT(o,_,S);function S(D){const L=Eu(D);if(!so(L,'"')){if(D.flags&y)return L;if(D.flags&2097152){const B=xO(D);if(B&&B.flags&y)return L}}}}function Zee(o,_,y){const S=o&&o.flags&106500&&o.valueDeclaration;if(!S)return;const D=xp(S,2),L=o.valueDeclaration&&Bf(o.valueDeclaration)&&Vs(o.valueDeclaration.name);if(!(!D&&!L)&&!(_&&EK(_)&&!(o.flags&65536))){if(y){const B=Qi(_,Qc);if(B&&B.symbol===o)return}(Iu(o)&1?Ys(o).target:o).isReferenced=-1}}function Qgt(o,_){return o.kind===110||!!_&&pl(o)&&_===Lh(K_(o))}function Bei(o,_){switch(o.kind){case 211:return M7e(o,o.expression.kind===108,_,lp(uo(o.expression)));case 166:return M7e(o,!1,_,lp(uo(o.left)));case 205:return M7e(o,!1,_,Bs(o))}}function Zgt(o,_,y){return R7e(o,o.kind===211&&o.expression.kind===108,!1,_,y)}function M7e(o,_,y,S){if(Nc(S))return!0;const D=Ta(S,y);return!!D&&R7e(o,_,!1,S,D)}function R7e(o,_,y,S,D){if(Nc(S))return!0;if(D.valueDeclaration&&Wh(D.valueDeclaration)){const L=Cf(D.valueDeclaration);return!gh(o)&&!!Qi(o,B=>B===L)}return Bgt(o,_,y,S,D)}function Wei(o){const _=o.initializer;if(_.kind===261){const y=_.declarations[0];if(y&&!ta(y.name))return xr(y)}else if(_.kind===80)return Lh(_)}function Vei(o){return Ih(o).length===1&&!!pb(o,hi)}function Hei(o){const _=Dc(o);if(_.kind===80){const y=Lh(_);if(y.flags&3){let S=o,D=o.parent;for(;D;){if(D.kind===249&&S===D.statement&&Wei(D)===y&&Vei(Kf(D.expression)))return!0;S=D,D=D.parent}}}return!1}function jei(o,_){return o.flags&64?zei(o,_):Ygt(o,KO(o.expression),_)}function zei(o,_){const y=uo(o.expression),S=jz(y,o.expression);return Eme(Ygt(o,ly(S,o.expression),_),o,S!==y)}function Ygt(o,_,y){const S=Kk(o)!==0||I7e(o)?lp(_):_,D=o.argumentExpression,L=uo(D);if(fe(S)||S===Xn)return S;if(_ge(S)&&!Bc(D))return ft(D,k.A_const_enum_member_can_only_be_accessed_using_a_string_literal),vt;const B=Hei(D)?hi:L,K=Kk(o);let ne;K===0?ne=32:(ne=4|(EN(S)&&!l7(S)?2:0),K===2&&(ne|=32));const ce=Gx(S,B,ne,o)||vt;return a1t(Ugt(o,yr(o).resolvedSymbol,ce,D,y),o)}function e0t(o){return T1(o)||i2(o)||oh(o)}function WN(o){return e0t(o)&&O(o.typeArguments,za),o.kind===215?uo(o.template):oh(o)?uo(o.attributes):ur(o)?uo(o.left):T1(o)&&O(o.arguments,_=>{uo(_)}),ci}function uy(o){return WN(o),Mi}function Uei(o,_,y){let S,D,L=0,B,K=-1,ne;j.assert(!_.length);for(const ce of o){const ge=ce.declaration&&xr(ce.declaration),je=ce.declaration&&ce.declaration.parent;!D||ge===D?S&&je===S?B=B+1:(S=je,B=L):(B=L=_.length,S=je),D=ge,ret(ce)?(K++,ne=K,L++):ne=B,_.splice(ne,0,y?NGt(ce,y):ce)}}function rge(o){return!!o&&(o.kind===230||o.kind===237&&o.isSpread)}function F7e(o){return ct(o,rge)}function t0t(o){return!!(o.flags&16384)}function qei(o){return!!(o.flags&49155)}function sge(o,_,y,S=!1){let D,L=!1,B=dp(y),K=fy(y);if(o.kind===215)if(D=_.length,o.template.kind===228){const ne=va(o.template.templateSpans);L=lu(ne.literal)||!!ne.literal.isUnterminated}else{const ne=o.template;j.assert(ne.kind===15),L=!!ne.isUnterminated}else if(o.kind===170)D=l0t(o,y);else if(o.kind===226)D=1;else if(oh(o)){if(L=o.attributes.end===o.end,L)return!0;D=K===0?_.length:1,B=_.length===0?B:1,K=Math.min(K,1)}else if(o.arguments){D=S?_.length+1:_.length,L=o.arguments.end===o.end;const ne=F7e(_);if(ne>=0)return ne>=fy(y)&&(ov(y)||ne<dp(y))}else return j.assert(o.kind===214),fy(y)===0;if(!ov(y)&&D>B)return!1;if(L||D>=K)return!0;for(let ne=D;ne<K;ne++){const ce=u1(y,ne);if(ad(ce,nr(o)&&!we?qei:t0t).flags&131072)return!1}return!0}function B7e(o,_){const y=P(o.typeParameters),S=sy(o.typeParameters);return!Ft(_)||_.length>=S&&_.length<=y}function i0t(o,_){let y;return!!(o.target&&(y=nE(o.target,_))&&GA(y))}function VN(o){return Yz(o,0,!1)}function n0t(o){return Yz(o,0,!1)||Yz(o,1,!1)}function Yz(o,_,y){if(o.flags&524288){const S=o1(o);if(y||S.properties.length===0&&S.indexInfos.length===0){if(_===0&&S.callSignatures.length===1&&S.constructSignatures.length===0)return S.callSignatures[0];if(_===1&&S.constructSignatures.length===1&&S.callSignatures.length===0)return S.constructSignatures[0]}}}function r0t(o,_,y,S){const D=qz(O_t(o),o,0,S),L=eU(_),B=y&&(L&&L.flags&262144?y.nonFixingMapper:y.mapper),K=B?QA(_,B):_;return F8e(K,o,(ne,ce)=>{NC(D.inferences,ne,ce)}),y||B8e(_,o,(ne,ce)=>{NC(D.inferences,ne,ce,128)}),Nz(o,X8e(D),nr(_.declaration))}function $ei(o,_,y,S){const D=Xme(_,o),L=ZO(o.attributes,D,S,y);return NC(S.inferences,L,D),X8e(S)}function s0t(o){if(!o)return Ri;const _=uo(o);return lDe(o)?_:_8(o.parent)?EC(_):gh(o.parent)?Dme(_):_}function W7e(o,_,y,S,D){if(oh(o))return $ei(o,_,S,D);if(o.kind!==170&&o.kind!==226){const ne=Ce(_.typeParameters,ge=>!!qD(ge)),ce=g_(o,ne?8:0);if(ce){const ge=Oc(_);if(Yx(ge)){const je=tE(o);if(!(!ne&&g_(o,8)!==ce)){const Kt=j8e(tZt(je,1)),Oi=io(ce,Kt),Ki=VN(Oi),qn=Ki&&Ki.typeParameters?kN(RRe(Ki,Ki.typeParameters)):Oi;NC(D.inferences,qn,ge,128)}const kt=qz(_.typeParameters,_,D.flags),Vt=io(ce,je&&je.returnMapper);NC(kt.inferences,Vt,ge),D.returnMapper=Ft(kt.inferences,YO)?j8e(sZt(kt)):void 0}}}const L=tU(_),B=L?Math.min(dp(_)-1,y.length):y.length;if(L&&L.flags&262144){const ne=Fe(D.inferences,ce=>ce.typeParameter===L);ne&&(ne.impliedArity=ct(y,rge,B)<0?y.length-B:void 0)}const K=j2(_);if(K&&Yx(K)){const ne=c0t(o);NC(D.inferences,s0t(ne),K)}for(let ne=0;ne<B;ne++){const ce=y[ne];if(ce.kind!==232){const ge=u1(_,ne);if(Yx(ge)){const je=ZO(ce,ge,D,S);NC(D.inferences,je,ge)}}}if(L&&Yx(L)){const ne=V7e(y,B,y.length,L,D,S);NC(D.inferences,ne,L)}return X8e(D)}function o0t(o){return o.flags&1048576?eu(o,o0t):o.flags&1||Iee(Jf(o)||o)?o:Qa(o)?rv(GD(o),o.target.elementFlags,!1,o.target.labeledElementDeclarations):rv([o],[8])}function V7e(o,_,y,S,D,L){const B=xN(S);if(_>=y-1){const ge=o[y-1];if(rge(ge)){const je=ge.kind===237?ge.type:ZO(ge.expression,S,D,L);return YS(je)?o0t(je):hh(iw(33,je,tt,ge.kind===230?ge.expression:ge),B)}}const K=[],ne=[],ce=[];for(let ge=_;ge<y;ge++){const je=o[ge];if(rge(je)){const Be=je.kind===237?je.type:uo(je.expression);YS(Be)?(K.push(Be),ne.push(8)):(K.push(iw(33,Be,tt,je.kind===230?je.expression:je)),ne.push(4))}else{const Be=Qa(S)?y7e(S,ge-_,y-_)||te:ap(S,v0(ge-_),256),kt=ZO(je,Be,D,L),Vt=B||Au(Be,406978556);K.push(Vt?Xh(kt):J2(kt)),ne.push(1)}je.kind===237&&je.tupleNameSource?ce.push(je.tupleNameSource):ce.push(void 0)}return rv(K,ne,B&&!dg(S,L8e),ce)}function H7e(o,_,y,S){const D=nr(o.declaration),L=o.typeParameters,B=$x(qt(_,Bs),L,sy(L),D);let K;for(let ne=0;ne<_.length;ne++){j.assert(L[ne]!==void 0,"Should not call checkTypeArguments with too many type arguments");const ce=m_(L[ne]);if(ce){const ge=y&&S?()=>jo(void 0,k.Type_0_does_not_satisfy_the_constraint_1):void 0,je=S||k.Type_0_does_not_satisfy_the_constraint_1;K||(K=cp(L,B));const Be=B[ne];if(!Nh(Be,Wp(io(ce,K),Be),y?_[ne]:void 0,je,ge))return}}return B}function a0t(o){if(n4(o.tagName))return 2;const _=Kh(uo(o.tagName));return P(ia(_,1))?0:P(ia(_,0))?1:2}function Jei(o,_,y,S,D,L,B){const K=Xme(_,o),ne=ZO(o.attributes,K,void 0,S),ce=S&4?Uz(ne):ne;return ge()&&C8e(ce,K,y,D?o.tagName:void 0,o.attributes,void 0,L,B);function ge(){var je;if(w7e(o))return!0;const Be=(z1(o)||PI(o))&&!(n4(o.tagName)||j0(o.tagName))?uo(o.tagName):void 0;if(!Be)return!0;const kt=ia(Be,0);if(!P(kt))return!0;const Vt=hyt(o);if(!Vt)return!0;const Kt=nu(Vt,111551,!0,!1,o);if(!Kt)return!0;const Oi=Yn(Kt),Ki=ia(Oi,0);if(!P(Ki))return!0;let qn=!1,Qn=0;for(const Ui of Ki){const fr=u1(Ui,0),Gr=ia(fr,0);if(P(Gr))for(const vs of Gr){if(qn=!0,ov(vs))return!0;const Ur=dp(vs);Ur>Qn&&(Qn=Ur)}}if(!qn)return!0;let rn=1/0;for(const Ui of kt){const fr=fy(Ui);fr<rn&&(rn=fr)}if(rn<=Qn)return!0;if(D){const Ui=Kn(o.tagName,k.Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3,bp(o.tagName),rn,bp(Vt),Qn),fr=(je=Zg(o.tagName))==null?void 0:je.valueDeclaration;fr&&da(Ui,Kn(fr,k._0_is_declared_here,bp(o.tagName))),B&&B.skipLogging&&(B.errors||(B.errors=[])).push(Ui),B.skipLogging||lc.add(Ui)}return!1}}function oge(o){return o=Dc(o),wX(o)?Dc(o.expression):o}function Yee(o,_,y,S,D,L,B,K){const ne={errors:void 0,skipLogging:!0};if(oh(o))return Jei(o,y,S,D,L,B,ne)?void 0:(j.assert(!L||!!ne.errors,"jsx should have errors when reporting errors"),ne.errors||w);const ce=j2(y);if(ce&&ce!==Ri&&!(rD(o)||la(o)&&G_(o.expression))){const Vt=c0t(o),Kt=s0t(Vt),Oi=L?Vt||o:void 0,Ki=k.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1;if(!lg(Kt,ce,S,Oi,Ki,B,ne))return j.assert(!L||!!ne.errors,"this parameter should have errors when reporting errors"),ne.errors||w}const ge=k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1,je=tU(y),Be=je?Math.min(dp(y)-1,_.length):_.length;for(let Vt=0;Vt<Be;Vt++){const Kt=_[Vt];if(Kt.kind!==232){const Oi=u1(y,Vt),Ki=ZO(Kt,Oi,void 0,D),qn=D&4?Uz(Ki):Ki,Qn=K?io(qn,K.nonFixingMapper):qn,rn=oge(Kt);if(!C8e(Qn,Oi,S,L?rn:void 0,rn,ge,B,ne))return j.assert(!L||!!ne.errors,"parameter should have errors when reporting errors"),kt(Kt,Qn,Oi),ne.errors||w}}if(je){const Vt=V7e(_,Be,_.length,je,void 0,D),Kt=_.length-Be,Oi=L?Kt===0?o:Kt===1?oge(_[Be]):V0(ete(o,Vt),_[Be].pos,_[_.length-1].end):void 0;if(!lg(Vt,je,S,Oi,ge,void 0,ne))return j.assert(!L||!!ne.errors,"rest parameter should have errors when reporting errors"),kt(Oi,Vt,je),ne.errors||w}return;function kt(Vt,Kt,Oi){if(Vt&&L&&ne.errors&&ne.errors.length){if(nF(Oi))return;const Ki=nF(Kt);Ki&&ay(Ki,Oi,S)&&da(ne.errors[0],Kn(Vt,k.Did_you_forget_to_use_await))}}}function c0t(o){if(o.kind===226)return o.right;const _=o.kind===213?o.expression:o.kind===215?o.tag:o.kind===170&&!pe?o.expression:void 0;if(_){const y=Vu(_);if(Sl(y))return y.expression}}function ete(o,_,y,S){const D=l2.createSyntheticExpression(_,y,S);return Ht(D,o),_c(D,o),D}function age(o){if(o.kind===215){const S=o.template,D=[ete(S,DKt())];return S.kind===228&&O(S.templateSpans,L=>{D.push(L.expression)}),D}if(o.kind===170)return Gei(o);if(o.kind===226)return[o.left];if(oh(o))return o.attributes.properties.length>0||z1(o)&&o.parent.children.length>0?[o.attributes]:w;const _=o.arguments||w,y=F7e(_);if(y>=0){const S=_.slice(0,y);for(let D=y;D<_.length;D++){const L=_[D],B=L.kind===230&&(jg?uo(L.expression):ju(L.expression));B&&Qa(B)?O(GD(B),(K,ne)=>{var ce;const ge=B.target.elementFlags[ne],je=ete(L,ge&4?hh(K):K,!!(ge&12),(ce=B.target.labeledElementDeclarations)==null?void 0:ce[ne]);S.push(je)}):S.push(L)}return S}return _}function Gei(o){const _=o.expression,y=e5e(o);if(y){const S=[];for(const D of y.parameters){const L=Yn(D);S.push(ete(_,L))}return S}return j.fail()}function l0t(o,_){return Q.experimentalDecorators?Kei(o,_):Math.min(Math.max(dp(_),1),2)}function Kei(o,_){switch(o.parent.kind){case 263:case 231:return 1;case 172:return O1(o.parent)?3:2;case 174:case 177:case 178:return _.parameters.length<=2?2:3;case 169:return 3;default:return j.fail()}}function u0t(o){const _=_n(o),{start:y,length:S}=pI(_,Nr(o.expression)?o.expression.name:o.expression);return{start:y,length:S,sourceFile:_}}function tte(o,_,...y){if(la(o)){const{sourceFile:S,start:D,length:L}=u0t(o);return"message"in _?Md(S,D,L,_,...y):Nae(S,_)}else return"message"in _?Kn(o,_,...y):Bv(_n(o),o,_)}function Xei(o){return T1(o)?Nr(o.expression)?o.expression.name:o.expression:i2(o)?Nr(o.tag)?o.tag.name:o.tag:oh(o)?o.tagName:o}function Qei(o){if(!la(o)||!ot(o.expression))return!1;const _=_i(o.expression,o.expression.escapedText,111551,void 0,!1),y=_==null?void 0:_.valueDeclaration;if(!y||!$s(y)||!lx(y.parent)||!rD(y.parent.parent)||!ot(y.parent.parent.expression))return!1;const S=JRe(!1);return S?Zg(y.parent.parent.expression,!0)===S:!1}function d0t(o,_,y,S){var D;const L=F7e(y);if(L>-1)return Kn(y[L],k.A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter);let B=Number.POSITIVE_INFINITY,K=Number.NEGATIVE_INFINITY,ne=Number.NEGATIVE_INFINITY,ce=Number.POSITIVE_INFINITY,ge;for(const Kt of _){const Oi=fy(Kt),Ki=dp(Kt);Oi<B&&(B=Oi,ge=Kt),K=Math.max(K,Ki),Oi<y.length&&Oi>ne&&(ne=Oi),y.length<Ki&&Ki<ce&&(ce=Ki)}const je=Ft(_,ov),Be=je?B:B<K?B+"-"+K:B,kt=!je&&Be===1&&y.length===0&&Qei(o);if(kt&&nr(o))return tte(o,k.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments);const Vt=Fd(o)?je?k.The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0:k.The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0:je?k.Expected_at_least_0_arguments_but_got_1:kt?k.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise:k.Expected_0_arguments_but_got_1;if(B<y.length&&y.length<K){if(S){let Kt=jo(void 0,k.No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments,y.length,ne,ce);return Kt=jo(Kt,S),tte(o,Kt)}return tte(o,k.No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments,y.length,ne,ce)}else if(y.length<B){let Kt;if(S){let Ki=jo(void 0,Vt,Be,y.length);Ki=jo(Ki,S),Kt=tte(o,Ki)}else Kt=tte(o,Vt,Be,y.length);const Oi=(D=ge==null?void 0:ge.declaration)==null?void 0:D.parameters[ge.thisParameter?y.length+1:y.length];if(Oi){const Ki=ta(Oi.name)?[k.An_argument_matching_this_binding_pattern_was_not_provided]:Oy(Oi)?[k.Arguments_for_the_rest_parameter_0_were_not_provided,Fr(K_(Oi.name))]:[k.An_argument_for_0_was_not_provided,Oi.name?Fr(K_(Oi.name)):y.length],qn=Kn(Oi,...Ki);return da(Kt,qn)}return Kt}else{const Kt=G.createNodeArray(y.slice(K)),Oi=ya(Kt).pos;let Ki=va(Kt).end;if(Ki===Oi&&Ki++,V0(Kt,Oi,Ki),S){let qn=jo(void 0,Vt,Be,y.length);return qn=jo(qn,S),eV(_n(o),Kt,qn)}return q6(_n(o),Kt,Vt,Be,y.length)}}function Zei(o,_,y,S){const D=y.length;if(_.length===1){const K=_[0],ne=sy(K.typeParameters),ce=P(K.typeParameters);if(S){let ge=jo(void 0,k.Expected_0_type_arguments_but_got_1,ne<ce?ne+"-"+ce:ne,D);return ge=jo(ge,S),eV(_n(o),y,ge)}return q6(_n(o),y,k.Expected_0_type_arguments_but_got_1,ne<ce?ne+"-"+ce:ne,D)}let L=-1/0,B=1/0;for(const K of _){const ne=sy(K.typeParameters),ce=P(K.typeParameters);ne>D?B=Math.min(B,ne):ce<D&&(L=Math.max(L,ce))}if(L!==-1/0&&B!==1/0){if(S){let K=jo(void 0,k.No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments,D,L,B);return K=jo(K,S),eV(_n(o),y,K)}return q6(_n(o),y,k.No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments,D,L,B)}if(S){let K=jo(void 0,k.Expected_0_type_arguments_but_got_1,L===-1/0?B:L,D);return K=jo(K,S),eV(_n(o),y,K)}return q6(_n(o),y,k.Expected_0_type_arguments_but_got_1,L===-1/0?B:L,D)}function XO(o,_,y,S,D,L){const B=o.kind===215,K=o.kind===170,ne=oh(o),ce=o.kind===226,ge=!q&&!y;let je;!K&&!ce&&!mI(o)&&(je=o.typeArguments,(B||ne||o.expression.kind!==108)&&O(je,za));const Be=y||[];Uei(_,Be,D),j.assert(Be.length,"Revert #54442 and add a testcase with whatever triggered this");const kt=age(o),Vt=Be.length===1&&!Be[0].typeParameters;let Kt=!K&&!Vt&&Ft(kt,Em)?4:0,Oi,Ki,qn,Qn;const rn=!!(S&16)&&o.kind===213&&o.arguments.hasTrailingComma;if(Be.length>1&&(Qn=fr(Be,ob,Vt,rn)),Qn||(Qn=fr(Be,Op,Vt,rn)),Qn)return Qn;if(Qn=Yei(o,Be,kt,!!y,S),yr(o).resolvedSignature=Qn,ge)if(!L&&ce&&(L=k.The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method),Oi)if(Oi.length===1||Oi.length>3){const Gr=Oi[Oi.length-1];let vs;Oi.length>3&&(vs=jo(vs,k.The_last_overload_gave_the_following_error),vs=jo(vs,k.No_overload_matches_this_call)),L&&(vs=jo(vs,L));const Ur=Yee(o,kt,Gr,Op,0,!0,()=>vs,void 0);if(Ur)for(const ga of Ur)Gr.declaration&&Oi.length>3&&da(ga,Kn(Gr.declaration,k.The_last_overload_is_declared_here)),Ui(Gr,ga),lc.add(ga);else j.fail("No error for last overload signature")}else{const Gr=[];let vs=0,Ur=Number.MAX_VALUE,ga=0,fa=0;for(const wu of Oi){const Fn=Yee(o,kt,wu,Op,0,!0,()=>jo(void 0,k.Overload_0_of_1_2_gave_the_following_error,fa+1,Be.length,B2(wu)),void 0);Fn?(Fn.length<=Ur&&(Ur=Fn.length,ga=fa),vs=Math.max(vs,Fn.length),Gr.push(Fn)):j.fail("No error for 3 or fewer overload signatures"),fa++}const Al=vs>1?Gr[ga]:Dr(Gr);j.assert(Al.length>0,"No errors reported for 3 or fewer overload signatures");let Po=jo(qt(Al,aTe),k.No_overload_matches_this_call);L&&(Po=jo(Po,L));const fu=[...Rr(Al,wu=>wu.relatedInformation)];let Ef;if(Ce(Al,wu=>wu.start===Al[0].start&&wu.length===Al[0].length&&wu.file===Al[0].file)){const{file:wu,start:bn,length:Fn}=Al[0];Ef={file:wu,start:bn,length:Fn,code:Po.code,category:Po.category,messageText:Po,relatedInformation:fu}}else Ef=Bv(_n(o),Xei(o),Po,fu);Ui(Oi[0],Ef),lc.add(Ef)}else if(Ki)lc.add(d0t(o,[Ki],kt,L));else if(qn)H7e(qn,o.typeArguments,!0,L);else{const Gr=$t(_,vs=>B7e(vs,je));Gr.length===0?lc.add(Zei(o,_,je,L)):lc.add(d0t(o,Gr,kt,L))}return Qn;function Ui(Gr,vs){var Ur,ga;const fa=Oi,Al=Ki,Po=qn,fu=((ga=(Ur=Gr.declaration)==null?void 0:Ur.symbol)==null?void 0:ga.declarations)||w,wu=fu.length>1?Fe(fu,bn=>Qc(bn)&&Dg(bn.body)):void 0;if(wu){const bn=Dm(wu),Fn=!bn.typeParameters;fr([bn],Op,Fn)&&da(vs,Kn(wu,k.The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible))}Oi=fa,Ki=Al,qn=Po}function fr(Gr,vs,Ur,ga=!1){var fa,Al;if(Oi=void 0,Ki=void 0,qn=void 0,Ur){const Po=Gr[0];if(Ft(je)||!sge(o,kt,Po,ga))return;if(Yee(o,kt,Po,vs,0,!1,void 0,void 0)){Oi=[Po];return}return Po}for(let Po=0;Po<Gr.length;Po++){let fu=Gr[Po];if(!B7e(fu,je)||!sge(o,kt,fu,ga))continue;let Ef,wu;if(fu.typeParameters){const Fn=((Al=(fa=fu.typeParameters[0].symbol.declarations)==null?void 0:fa[0])==null?void 0:Al.parent)||(fu.declaration&&iu(fu.declaration)?fu.declaration.parent:fu.declaration);Fn&&Qi(o,or=>or===Fn)&&(fu=yKt(fu));let js;if(Ft(je)){if(js=H7e(fu,je,!1),!js){qn=fu;continue}}else wu=qz(fu.typeParameters,fu,nr(o)?2:0),js=gb(W7e(o,fu,kt,Kt|8,wu),wu.nonFixingMapper),Kt|=wu.flags&4?8:0;if(Ef=Nz(fu,js,nr(fu.declaration),wu&&wu.inferredTypeParameters),tU(fu)&&!sge(o,kt,Ef,ga)){Ki=Ef;continue}}else Ef=fu;if(Yee(o,kt,Ef,vs,Kt,!1,void 0,wu)){(Oi||(Oi=[])).push(Ef);continue}if(Kt){if(Kt=0,wu){const bn=gb(W7e(o,fu,kt,Kt,wu),wu.mapper);if(Ef=Nz(fu,bn,nr(fu.declaration),wu.inferredTypeParameters),tU(fu)&&!sge(o,kt,Ef,ga)){Ki=Ef;continue}}if(Yee(o,kt,Ef,vs,Kt,!1,void 0,wu)){(Oi||(Oi=[])).push(Ef);continue}}return Gr[Po]=Ef,Ef}}}function Yei(o,_,y,S,D){return j.assert(_.length>0),s4(o),S||_.length===1||_.some(L=>!!L.typeParameters)?iti(o,_,y,D):eti(_)}function eti(o){const _=es(o,ne=>ne.thisParameter);let y;_.length&&(y=f0t(_,_.map(rte)));const{min:S,max:D}=qDe(o,tti),L=[];for(let ne=0;ne<D;ne++){const ce=es(o,ge=>Ch(ge)?ne<ge.parameters.length-1?ge.parameters[ne]:va(ge.parameters):ne<ge.parameters.length?ge.parameters[ne]:void 0);j.assert(ce.length!==0),L.push(f0t(ce,es(o,ge=>nE(ge,ne))))}const B=es(o,ne=>Ch(ne)?va(ne.parameters):void 0);let K=128;if(B.length!==0){const ne=hh(is(es(o,A_t),2));L.push(h0t(B,ne)),K|=1}return o.some(ret)&&(K|=2),_b(o[0].declaration,void 0,y,L,Wa(o.map(Oc)),void 0,S,K)}function tti(o){const _=o.parameters.length;return Ch(o)?_-1:_}function f0t(o,_){return h0t(o,is(_,2))}function h0t(o,_){return PN(ya(o),_)}function iti(o,_,y,S){const D=sti(_,zt===void 0?y.length:zt),L=_[D],{typeParameters:B}=L;if(!B)return L;const K=e0t(o)?o.typeArguments:void 0,ne=K?Zpe(L,nti(K,B,nr(o))):rti(o,B,L,y,S);return _[D]=ne,ne}function nti(o,_,y){const S=o.map(o4);for(;S.length>_.length;)S.pop();for(;S.length<_.length;)S.push(qD(_[S.length])||m_(_[S.length])||K8e(y));return S}function rti(o,_,y,S,D){const L=qz(_,y,nr(o)?2:0),B=W7e(o,y,S,D|4|8,L);return Zpe(y,B)}function sti(o,_){let y=-1,S=-1;for(let D=0;D<o.length;D++){const L=o[D],B=dp(L);if(ov(L)||B>=_)return D;B>S&&(S=B,y=D)}return y}function oti(o,_,y){if(o.expression.kind===108){const ne=qme(o.expression);if(Nc(ne)){for(const ce of o.arguments)uo(ce);return ci}if(!fe(ne)){const ce=L1(Cf(o));if(ce){const ge=Ds(ne,ce.typeArguments,ce);return XO(o,ge,_,y,0)}}return WN(o)}let S,D=uo(o.expression);if(cI(o)){const ne=jz(D,o.expression);S=ne===D?0:p8(o)?16:8,D=ne}else S=0;if(D=Vgt(D,o.expression,xei),D===Xn)return Yr;const L=Kh(D);if(fe(L))return uy(o);const B=ia(L,0),K=ia(L,1).length;if(ite(D,L,B.length,K))return!fe(D)&&o.typeArguments&&ft(o,k.Untyped_function_calls_may_not_accept_type_arguments),WN(o);if(!B.length){if(K)ft(o,k.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new,Hn(D));else{let ne;if(o.arguments.length===1){const ce=_n(o).text;mh(ce.charCodeAt(Va(ce,o.expression.end,!0)-1))&&(ne=Kn(o.expression,k.Are_you_missing_a_semicolon))}z7e(o.expression,L,0,ne)}return uy(o)}return y&8&&!o.typeArguments&&B.some(ati)?(X0t(o,y),Rn):B.some(ne=>nr(ne.declaration)&&!!qoe(ne.declaration))?(ft(o,k.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new,Hn(D)),uy(o)):XO(o,B,_,y,S)}function ati(o){return!!(o.typeParameters&&B5e(Oc(o)))}function ite(o,_,y,S){return Nc(o)||Nc(_)&&!!(o.flags&262144)||!y&&!S&&!(_.flags&1048576)&&!(a1(_).flags&131072)&&Da(o,kd)}function cti(o,_,y){let S=KO(o.expression);if(S===Xn)return Yr;if(S=Kh(S),fe(S))return uy(o);if(Nc(S))return o.typeArguments&&ft(o,k.Untyped_function_calls_may_not_accept_type_arguments),WN(o);const D=ia(S,1);if(D.length){if(!lti(o,D[0]))return uy(o);if(_0t(D,K=>!!(K.flags&4)))return ft(o,k.Cannot_create_an_instance_of_an_abstract_class),uy(o);const B=S.symbol&&Xb(S.symbol);return B&&Zr(B,64)?(ft(o,k.Cannot_create_an_instance_of_an_abstract_class),uy(o)):XO(o,D,_,y,0)}const L=ia(S,0);if(L.length){const B=XO(o,L,_,y,0);return De||(B.declaration&&!dy(B.declaration)&&Oc(B)!==Ri&&ft(o,k.Only_a_void_function_can_be_called_with_the_new_keyword),j2(B)===Ri&&ft(o,k.A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void)),B}return z7e(o.expression,S,1),uy(o)}function _0t(o,_){return Ao(o)?Ft(o,y=>_0t(y,_)):o.compositeKind===1048576?Ft(o.compositeSignatures,_):_(o)}function j7e(o,_){const y=Ll(_);if(!P(y))return!1;const S=y[0];if(S.flags&2097152){const D=S.types,L=h_t(D);let B=0;for(const K of S.types){if(!L[B]&&Or(K)&3&&(K.symbol===o||j7e(o,K)))return!0;B++}return!1}return S.symbol===o?!0:j7e(o,S)}function lti(o,_){if(!_||!_.declaration)return!0;const y=_.declaration,S=bP(y,6);if(!S||y.kind!==176)return!0;const D=Xb(y.parent.symbol),L=gl(y.parent.symbol);if(!A5e(o,D)){const B=Cf(o);if(B&&S&4){const K=o4(B);if(j7e(y.parent.symbol,K))return!0}return S&2&&ft(o,k.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration,Hn(L)),S&4&&ft(o,k.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration,Hn(L)),!1}return!0}function p0t(o,_,y){let S;const D=y===0,L=r4(_),B=L&&ia(L,y).length>0;if(_.flags&1048576){const ne=_.types;let ce=!1;for(const ge of ne)if(ia(ge,y).length!==0){if(ce=!0,S)break}else if(S||(S=jo(S,D?k.Type_0_has_no_call_signatures:k.Type_0_has_no_construct_signatures,Hn(ge)),S=jo(S,D?k.Not_all_constituents_of_type_0_are_callable:k.Not_all_constituents_of_type_0_are_constructable,Hn(_))),ce)break;ce||(S=jo(void 0,D?k.No_constituent_of_type_0_is_callable:k.No_constituent_of_type_0_is_constructable,Hn(_))),S||(S=jo(S,D?k.Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other:k.Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other,Hn(_)))}else S=jo(S,D?k.Type_0_has_no_call_signatures:k.Type_0_has_no_construct_signatures,Hn(_));let K=D?k.This_expression_is_not_callable:k.This_expression_is_not_constructable;if(la(o.parent)&&o.parent.arguments.length===0){const{resolvedSymbol:ne}=yr(o);ne&&ne.flags&32768&&(K=k.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without)}return{messageChain:jo(S,K),relatedMessage:B?k.Did_you_forget_to_use_await:void 0}}function z7e(o,_,y,S){const{messageChain:D,relatedMessage:L}=p0t(o,_,y),B=Bv(_n(o),o,D);if(L&&da(B,Kn(o,L)),la(o.parent)){const{start:K,length:ne}=u0t(o.parent);B.start=K,B.length=ne}lc.add(B),m0t(_,y,S?da(B,S):B)}function m0t(o,_,y){if(!o.symbol)return;const S=Ys(o.symbol).originatingImport;if(S&&!zp(S)){const D=ia(Yn(Ys(o.symbol).target),_);if(!D||!D.length)return;da(y,Kn(S,k.Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead))}}function uti(o,_,y){const S=uo(o.tag),D=Kh(S);if(fe(D))return uy(o);const L=ia(D,0),B=ia(D,1).length;if(ite(S,D,L.length,B))return WN(o);if(!L.length){if(jf(o.parent)){const K=Kn(o.tag,k.It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked);return lc.add(K),uy(o)}return z7e(o.tag,D,0),uy(o)}return XO(o,L,_,y,0)}function dti(o){switch(o.parent.kind){case 263:case 231:return k.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression;case 169:return k.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression;case 172:return k.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression;case 174:case 177:case 178:return k.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression;default:return j.fail()}}function fti(o,_,y){const S=uo(o.expression),D=Kh(S);if(fe(D))return uy(o);const L=ia(D,0),B=ia(D,1).length;if(ite(S,D,L.length,B))return WN(o);if(pti(o,L)&&!c_(o.expression)){const ne=uu(o.expression,!1);return ft(o,k._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0,ne),uy(o)}const K=dti(o);if(!L.length){const ne=p0t(o.expression,D,0),ce=jo(ne.messageChain,K),ge=Bv(_n(o.expression),o.expression,ce);return ne.relatedMessage&&da(ge,Kn(o.expression,ne.relatedMessage)),lc.add(ge),m0t(D,0,ge),uy(o)}return XO(o,L,_,y,0,K)}function cge(o,_){const y=BN(o),S=y&&__(y),D=S&&ff(S,hm.Element,788968),L=D&&We.symbolToEntityName(D,788968,o),B=G.createFunctionTypeNode(void 0,[G.createParameterDeclaration(void 0,void 0,"props",void 0,We.typeToTypeNode(_,o))],L?G.createTypeReferenceNode(L,void 0):G.createKeywordTypeNode(133)),K=$a(1,"props");return K.links.type=_,_b(B,void 0,void 0,[K],D?gl(D):vt,void 0,1,0)}function hti(o,_,y){if(n4(o.tagName)){const B=Ogt(o),K=cge(o,B);return Xx(ZO(o.attributes,Xme(K,o),void 0,0),B,o.tagName,o.attributes),P(o.typeArguments)&&(O(o.typeArguments,za),lc.add(q6(_n(o),o.typeArguments,k.Expected_0_type_arguments_but_got_1,0,P(o.typeArguments)))),K}const S=uo(o.tagName),D=Kh(S);if(fe(D))return uy(o);const L=Pgt(S,o);return ite(S,D,L.length,0)?WN(o):L.length===0?(ft(o.tagName,k.JSX_element_type_0_does_not_have_any_construct_or_call_signatures,uu(o.tagName)),uy(o)):XO(o,L,_,y,0)}function _ti(o,_,y){const S=uo(o.right);if(!Nc(S)){const D=s5e(S);if(D){const L=Kh(D);if(fe(L))return uy(o);const B=ia(L,0),K=ia(L,1);if(ite(D,L,B.length,K.length))return WN(o);if(B.length)return XO(o,B,_,y,0)}else if(!(Age(S)||YD(S,kd)))return ft(o.right,k.The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method),uy(o)}return ci}function pti(o,_){return _.length&&Ce(_,y=>y.minArgumentCount===0&&!Ch(y)&&y.parameters.length<l0t(o,y))}function mti(o,_,y){switch(o.kind){case 213:return oti(o,_,y);case 214:return cti(o,_,y);case 215:return uti(o,_,y);case 170:return fti(o,_,y);case 286:case 285:return hti(o,_,y);case 226:return _ti(o,_,y)}j.assertNever(o,"Branch in 'resolveSignature' should be unreachable.")}function QO(o,_,y){const S=yr(o),D=S.resolvedSignature;if(D&&D!==Rn&&!_)return D;const L=Pr;D||(Pr=nn.length),S.resolvedSignature=Rn;let B=mti(o,_,y||0);return Pr=L,B!==Rn&&(S.resolvedSignature!==Rn&&(B=S.resolvedSignature),S.resolvedSignature=ib===jg?B:D),B}function dy(o){var _;if(!o||!nr(o))return!1;const y=Wu(o)||ml(o)?o:(_s(o)||_d(o))&&o.initializer&&ml(o.initializer)?o.initializer:void 0;if(y){if(qoe(o))return!0;if(_d(By(y.parent)))return!1;const S=xr(y);return!!((_=S==null?void 0:S.members)!=null&&_.size)}return!1}function U7e(o,_){var y,S;if(_){const D=Ys(_);if(!D.inferredClassSymbol||!D.inferredClassSymbol.has(Ba(o))){const L=Rv(o)?o:ab(o);return L.exports=L.exports||_a(),L.members=L.members||_a(),L.flags|=_.flags&32,(y=_.exports)!=null&&y.size&&Jg(L.exports,_.exports),(S=_.members)!=null&&S.size&&Jg(L.members,_.members),(D.inferredClassSymbol||(D.inferredClassSymbol=new Map)).set(Ba(L),L),L}return D.inferredClassSymbol.get(Ba(o))}}function gti(o){var _;const y=o&&lge(o,!0),S=(_=y==null?void 0:y.exports)==null?void 0:_.get("prototype"),D=(S==null?void 0:S.valueDeclaration)&&yti(S.valueDeclaration);return D?xr(D):void 0}function lge(o,_){if(!o.parent)return;let y,S;if(_s(o.parent)&&o.parent.initializer===o){if(!nr(o)&&!(mU(o.parent)&&Qc(o)))return;y=o.parent.name,S=o.parent}else if(ur(o.parent)){const D=o.parent,L=o.parent.operatorToken.kind;if(L===64&&(_||D.right===o))y=D.left,S=y;else if((L===57||L===61)&&(_s(D.parent)&&D.parent.initializer===D?(y=D.parent.name,S=D.parent):ur(D.parent)&&D.parent.operatorToken.kind===64&&(_||D.parent.right===D)&&(y=D.parent.left,S=y),!y||!bI(y)||!Q6(y,D.left)))return}else _&&Wu(o)&&(y=o.name,S=o);if(!(!S||!y||!_&&!$k(o,rx(y))))return p_(S)}function yti(o){if(!o.parent)return!1;let _=o.parent;for(;_&&_.kind===211;)_=_.parent;if(_&&ur(_)&&rx(_.left)&&_.operatorToken.kind===64){const y=Hae(_);return Aa(y)&&y}}function vti(o,_){var y,S,D;wte(o,o.typeArguments);const L=QO(o,void 0,_);if(L===Rn)return Xn;if(uge(L,o),o.expression.kind===108)return Ri;if(o.kind===214){const K=L.declaration;if(K&&K.kind!==176&&K.kind!==180&&K.kind!==185&&!(tC(K)&&((S=(y=t3(K))==null?void 0:y.parent)==null?void 0:S.kind)===176)&&!e3(K)&&!dy(K))return De&&ft(o,k.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type),Je}if(nr(o)&&b0t(o))return L_t(o.arguments[0]);const B=Oc(L);if(B.flags&12288&&g0t(o))return _8e(By(o.parent));if(o.kind===213&&!o.questionDotToken&&o.parent.kind===244&&B.flags&16384&&cg(L)){if(!VV(o.expression))ft(o.expression,k.Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name);else if(!Bee(o)){const K=ft(o.expression,k.Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation);Fee(o.expression,K)}}if(nr(o)){const K=lge(o,!1);if((D=K==null?void 0:K.exports)!=null&&D.size){const ne=Xs(K,K.exports,w,w,w);return ne.objectFlags|=4096,Wa([B,ne])}}return B}function uge(o,_){if(!(o.flags&128)&&o.declaration&&o.declaration.flags&536870912){const y=nte(_),S=jV(KG(_));DA(y,o.declaration,S,B2(o))}}function nte(o){switch(o=Dc(o),o.kind){case 213:case 170:case 214:return nte(o.expression);case 215:return nte(o.tag);case 286:case 285:return nte(o.tagName);case 212:return o.argumentExpression;case 211:return o.name;case 183:const _=o;return o_(_.typeName)?_.typeName.right:_;default:return o}}function g0t(o){if(!la(o))return!1;let _=o.expression;if(Nr(_)&&_.name.escapedText==="for"&&(_=_.expression),!ot(_)||_.escapedText!=="Symbol")return!1;const y=Z_t(!1);return y?y===_i(_,"Symbol",111551,void 0,!1):!1}function bti(o){if(Voi(o),o.arguments.length===0)return cte(o,Je);const _=o.arguments[0],y=ju(_),S=o.arguments.length>1?ju(o.arguments[1]):void 0;for(let L=2;L<o.arguments.length;++L)ju(o.arguments[L]);if((y.flags&32768||y.flags&65536||!Da(y,st))&&ft(_,k.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0,Hn(y)),S){const L=Q_t(!0);L!==Jo&&Nh(S,Lee(L,32768),o.arguments[1])}const D=B_(o,_);if(D){const L=Rx(D,_,!0,!1);if(L)return cte(o,y0t(Yn(L),L,D,_)||v0t(Yn(L),L,D,_))}return cte(o,Je)}function q7e(o,_,y){const S=_a(),D=$a(2097152,"default");return D.parent=_,D.links.nameType=V_("default"),D.links.aliasTarget=Zu(o),S.set("default",D),Xs(y,S,w,w,w)}function y0t(o,_,y,S){if(zS(S)&&o&&!fe(o)){const L=o;if(!L.defaultOnlyType){const B=q7e(_,y);L.defaultOnlyType=B}return L.defaultOnlyType}}function v0t(o,_,y,S){var D;if(Ie&&o&&!fe(o)){const L=o;if(!L.syntheticType){const B=(D=y.declarations)==null?void 0:D.find(Os);if(LD(B,y,!1,S)){const ne=$a(2048,"__type"),ce=q7e(_,y,ne);ne.links.type=ce,L.syntheticType=$ee(o)?KD(o,ce,ne,0,!1):ce}else L.syntheticType=o}return L.syntheticType}return o}function b0t(o){if(!L_(o,!0))return!1;if(!ot(o.expression))return j.fail();const _=_i(o.expression,o.expression.escapedText,111551,void 0,!0);if(_===wt)return!0;if(_.flags&2097152)return!1;const y=_.flags&16?262:_.flags&3?260:0;if(y!==0){const S=ql(_,y);return!!S&&!!(S.flags&33554432)}return!1}function Cti(o){hoi(o)||wte(o,o.typeArguments),re<2&&zd(o,262144);const _=QO(o);return uge(_,o),Oc(_)}function Sti(o,_){if(o.kind===216){const y=_n(o);y&&Ru(y.fileName,[".cts",".mts"])&&sn(o,k.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead)}return C0t(o,_)}function $7e(o){switch(o.kind){case 11:case 15:case 9:case 10:case 112:case 97:case 209:case 210:case 228:return!0;case 217:return $7e(o.expression);case 224:const _=o.operator,y=o.operand;return _===41&&(y.kind===9||y.kind===10)||_===40&&y.kind===9;case 211:case 212:const S=Dc(o.expression),D=pl(S)?nu(S,111551,!0):void 0;return!!(D&&D.flags&384)}return!1}function C0t(o,_){const{type:y,expression:S}=S0t(o),D=uo(S,_);if(O0(y))return $7e(S)||ft(S,k.A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals),Xh(D);const L=yr(o);return L.assertionExpressionType=D,za(y),s4(o),Bs(y)}function S0t(o){let _,y;switch(o.kind){case 234:case 216:_=o.type,y=o.expression;break;case 217:_=N7(o),y=o.expression;break}return{type:_,expression:y}}function wti(o){const{type:_}=S0t(o),y=c_(o)?_:o,S=yr(o);j.assertIsDefined(S.assertionExpressionType);const D=Uz(DC(S.assertionExpressionType)),L=Bs(_);fe(L)||a(()=>{const B=lp(D);mme(L,B)||Qpt(D,L,y,k.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first)})}function xti(o){const _=uo(o.expression),y=jz(_,o.expression);return Eme(EC(y),o,y!==_)}function kti(o){return o.flags&64?xti(o):EC(uo(o.expression))}function w0t(o){if(myt(o),O(o.typeArguments,za),o.kind===233){const y=By(o.parent);y.kind===226&&y.operatorToken.kind===104&&UT(o,y.right)&&ft(o,k.The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression)}const _=o.kind===233?uo(o.expression):ix(o.exprName)?zee(o.exprName):uo(o.exprName);return x0t(_,o)}function x0t(o,_){const y=_.typeArguments;if(o===Xn||fe(o)||!Ft(y))return o;let S=!1,D;const L=K(o),B=S?D:o;return B&&lc.add(q6(_n(_),y,k.Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable,Hn(B))),L;function K(ce){let ge=!1,je=!1;const Be=kt(ce);return S||(S=je),ge&&!je&&(D??(D=ce)),Be;function kt(Vt){if(Vt.flags&524288){const Kt=o1(Vt),Oi=ne(Kt.callSignatures),Ki=ne(Kt.constructSignatures);if(ge||(ge=Kt.callSignatures.length!==0||Kt.constructSignatures.length!==0),je||(je=Oi.length!==0||Ki.length!==0),Oi!==Kt.callSignatures||Ki!==Kt.constructSignatures){const qn=Xs($a(0,"__instantiationExpression"),Kt.members,Oi,Ki,Kt.indexInfos);return qn.objectFlags|=8388608,qn.node=_,qn}}else if(Vt.flags&58982400){const Kt=Jf(Vt);if(Kt){const Oi=kt(Kt);if(Oi!==Kt)return Oi}}else{if(Vt.flags&1048576)return eu(Vt,K);if(Vt.flags&2097152)return Wa(Wr(Vt.types,kt))}return Vt}}function ne(ce){const ge=$t(ce,je=>!!je.typeParameters&&B7e(je,y));return Wr(ge,je=>{const Be=H7e(je,y,!0);return Be?Nz(je,Be,nr(je.declaration)):je})}}function Tti(o){return za(o.type),J7e(o.expression,o.type)}function J7e(o,_,y){const S=uo(o,y),D=Bs(_);if(fe(D))return D;const L=Qi(_.parent,B=>B.kind===238||B.kind===350);return Xx(S,D,L,o,k.Type_0_does_not_satisfy_the_expected_type_1),S}function Dti(o){return Ioi(o),o.keywordToken===105?G7e(o):o.keywordToken===102?Eti(o):j.assertNever(o.keywordToken)}function k0t(o){switch(o.keywordToken){case 102:return X_t();case 105:const _=G7e(o);return fe(_)?vt:qti(_);default:j.assertNever(o.keywordToken)}}function G7e(o){const _=xTe(o);if(_)if(_.kind===176){const y=xr(_.parent);return Yn(y)}else{const y=xr(_);return Yn(y)}else return ft(o,k.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor,"new.target"),vt}function Eti(o){oe===100||oe===199?_n(o).impliedNodeFormat!==99&&ft(o,k.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output):oe<6&&oe!==4&&ft(o,k.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext);const _=_n(o);return j.assert(!!(_.flags&8388608),"Containing file is missing import meta node flag."),o.name.escapedText==="meta"?K_t():vt}function rte(o){const _=o.valueDeclaration;return Dd(Yn(o),!1,!!_&&(aS(_)||g3(_)))}function K7e(o,_,y){switch(o.name.kind){case 80:{const S=o.name.escapedText;return o.dotDotDotToken?y&12?S:`${S}_${_}`:y&3?S:`${S}_n`}case 207:{if(o.dotDotDotToken){const S=o.name.elements,D=Jr(rl(S),ec),L=S.length-(D!=null&&D.dotDotDotToken?1:0);if(_<L){const B=S[_];if(ec(B))return K7e(B,_,y)}else if(D!=null&&D.dotDotDotToken)return K7e(D,_-L,y)}break}}return`arg_${_}`}function X7e(o,_=0,y=3,S){if(!o){const D=Jr(S==null?void 0:S.valueDeclaration,$s);return D?K7e(D,_,y):`${(S==null?void 0:S.escapedName)??"arg"}_${_}`}return j.assert(ot(o.name)),o.name.escapedText}function Y5(o,_,y){var S;const D=o.parameters.length-(Ch(o)?1:0);if(_<D)return o.parameters[_].escapedName;const L=o.parameters[D]||pt,B=y||Yn(L);if(Qa(B)){const K=B.target,ne=_-D,ce=(S=K.labeledElementDeclarations)==null?void 0:S[ne],ge=K.elementFlags[ne];return X7e(ce,ne,ge,L)}return L.escapedName}function Iti(o,_){var y;if(((y=o.declaration)==null?void 0:y.kind)===317)return;const S=o.parameters.length-(Ch(o)?1:0);if(_<S){const K=o.parameters[_],ne=T0t(K);return ne?{parameter:ne,parameterName:K.escapedName,isRestParameter:!1}:void 0}const D=o.parameters[S]||pt,L=T0t(D);if(!L)return;const B=Yn(D);if(Qa(B)){const K=B.target.labeledElementDeclarations,ne=_-S,ce=K==null?void 0:K[ne],ge=!!(ce!=null&&ce.dotDotDotToken);return ce?(j.assert(ot(ce.name)),{parameter:ce.name,parameterName:ce.name.escapedText,isRestParameter:ge}):void 0}if(_===S)return{parameter:L,parameterName:D.escapedName,isRestParameter:!0}}function T0t(o){return o.valueDeclaration&&$s(o.valueDeclaration)&&ot(o.valueDeclaration.name)&&o.valueDeclaration.name}function D0t(o){return o.kind===202||$s(o)&&o.name&&ot(o.name)}function Nti(o,_){const y=o.parameters.length-(Ch(o)?1:0);if(_<y){const L=o.parameters[_].valueDeclaration;return L&&D0t(L)?L:void 0}const S=o.parameters[y]||pt,D=Yn(S);if(Qa(D)){const L=D.target.labeledElementDeclarations,B=_-y;return L&&L[B]}return S.valueDeclaration&&D0t(S.valueDeclaration)?S.valueDeclaration:void 0}function u1(o,_){return nE(o,_)||Je}function nE(o,_){const y=o.parameters.length-(Ch(o)?1:0);if(_<y)return rte(o.parameters[_]);if(Ch(o)){const S=Yn(o.parameters[y]),D=_-y;if(!Qa(S)||S.target.combinedFlags&12||D<S.target.fixedLength)return ap(S,v0(D))}}function ste(o,_,y){const S=dp(o),D=fy(o),L=eU(o);if(L&&_>=S-1)return _===S-1?L:hh(ap(L,hi));const B=[],K=[],ne=[];for(let ce=_;ce<S;ce++)!L||ce<S-1?(B.push(u1(o,ce)),K.push(ce<D?1:2)):(B.push(L),K.push(8)),ne.push(Nti(o,ce));return rv(B,K,y,ne)}function E0t(o,_){const y=ste(o,_),S=y&&Nee(y);return S&&Nc(S)?Je:y}function dp(o){const _=o.parameters.length;if(Ch(o)){const y=Yn(o.parameters[_-1]);if(Qa(y))return _+y.target.fixedLength-(y.target.combinedFlags&12?0:1)}return _}function fy(o,_){const y=_&1,S=_&2;if(S||o.resolvedMinArgumentCount===void 0){let D;if(Ch(o)){const L=Yn(o.parameters[o.parameters.length-1]);if(Qa(L)){const B=ct(L.target.elementFlags,ne=>!(ne&1)),K=B<0?L.target.fixedLength:B;K>0&&(D=o.parameters.length-1+K)}}if(D===void 0){if(!y&&o.flags&32)return 0;D=o.minArgumentCount}if(S)return D;for(let L=D-1;L>=0;L--){const B=u1(o,L);if(ad(B,t0t).flags&131072)break;D=L}o.resolvedMinArgumentCount=D}return o.resolvedMinArgumentCount}function ov(o){if(Ch(o)){const _=Yn(o.parameters[o.parameters.length-1]);return!Qa(_)||!!(_.target.combinedFlags&12)}return!1}function eU(o){if(Ch(o)){const _=Yn(o.parameters[o.parameters.length-1]);if(!Qa(_))return Nc(_)?Yc:_;if(_.target.combinedFlags&12)return $5(_,_.target.fixedLength)}}function tU(o){const _=eU(o);return _&&!ug(_)&&!Nc(_)?_:void 0}function Q7e(o){return Z7e(o,Ai)}function Z7e(o,_){return o.parameters.length>0?u1(o,0):_}function I0t(o,_,y){const S=o.parameters.length-(Ch(o)?1:0);for(let D=0;D<S;D++){const L=o.parameters[D].valueDeclaration,B=dd(L);if(B){const K=Dd(Bs(B),!1,g3(L)),ne=u1(_,D);NC(y.inferences,K,ne)}}}function Lti(o,_){if(_.typeParameters)if(!o.typeParameters)o.typeParameters=_.typeParameters;else return;if(_.thisParameter){const S=o.thisParameter;(!S||S.valueDeclaration&&!S.valueDeclaration.type)&&(S||(o.thisParameter=PN(_.thisParameter,void 0)),ote(o.thisParameter,Yn(_.thisParameter)))}const y=o.parameters.length-(Ch(o)?1:0);for(let S=0;S<y;S++){const D=o.parameters[S],L=D.valueDeclaration;if(!dd(L)){let B=nE(_,S);if(B&&L.initializer){let K=eF(L,0);!Da(K,B)&&Da(B,K=c5e(L,K))&&(B=K)}ote(D,B)}}if(Ch(o)){const S=va(o.parameters);if(S.valueDeclaration?!dd(S.valueDeclaration):Iu(S)&65536){const D=ste(_,y);ote(S,D)}}}function Pti(o){o.thisParameter&&ote(o.thisParameter);for(const _ of o.parameters)ote(_)}function ote(o,_){const y=Ys(o);if(y.type)_&&j.assertEqual(y.type,_,"Parameter symbol already has a cached type which differs from newly assigned type");else{const S=o.valueDeclaration;y.type=Dd(_||(S?lr(S,!0):Yn(o)),!1,!!S&&!S.initializer&&g3(S)),S&&S.name.kind!==80&&(y.type===te&&(y.type=bi(S.name)),N0t(S.name,y.type))}}function N0t(o,_){for(const y of o.elements)if(!Bd(y)){const S=$c(y,_,!1);y.name.kind===80?Ys(xr(y)).type=S:N0t(y.name,S)}}function Ati(o){return WO(UKt(!0),[o])}function Oti(o,_){return WO(qKt(!0),[o,_])}function Mti(o,_){return WO($Kt(!0),[o,_])}function Rti(o,_){return WO(JKt(!0),[o,_])}function Fti(o,_){return WO(GKt(!0),[o,_])}function Bti(o,_){return WO(QKt(!0),[o,_])}function Wti(o,_,y){const S=`${_?"p":"P"}${y?"s":"S"}${o.id}`;let D=Ji.get(S);if(!D){const L=_a();L.set("name",BS("name",o)),L.set("private",BS("private",_?Pt:ln)),L.set("static",BS("static",y?Pt:ln)),D=Xs(void 0,L,w,w,w),Ji.set(S,D)}return D}function L0t(o,_,y){const S=bd(o),D=Vs(o.name),L=D?V_(Fr(o.name)):xC(o.name),B=Nu(o)?Oti(_,y):um(o)?Mti(_,y):kp(o)?Rti(_,y):I_(o)?Fti(_,y):Lo(o)?Bti(_,y):j.failBadSyntaxKind(o),K=Wti(L,D,S);return Wa([B,K])}function Vti(o,_){return WO(KKt(!0),[o,_])}function Hti(o,_){return WO(XKt(!0),[o,_])}function jti(o,_){const y=p0("this",o),S=p0("value",_);return p5e(void 0,y,[S],_,void 0,1)}function Y7e(o,_,y){const S=p0("target",o),D=p0("context",_),L=is([y,Ri]);return lU(void 0,void 0,[S,D],L)}function zti(o){const{parent:_}=o,y=yr(_);if(!y.decoratorSignature)switch(y.decoratorSignature=ci,_.kind){case 263:case 231:{const D=Yn(xr(_)),L=Ati(D);y.decoratorSignature=Y7e(D,L,D);break}case 174:case 177:case 178:{const S=_;if(!ss(S.parent))break;const D=Nu(S)?kN(Dm(S)):o4(S),L=bd(S)?Yn(xr(S.parent)):W_(xr(S.parent)),B=um(S)?u1t(D):kp(S)?d1t(D):D,K=L0t(S,L,D),ne=um(S)?u1t(D):kp(S)?d1t(D):D;y.decoratorSignature=Y7e(B,K,ne);break}case 172:{const S=_;if(!ss(S.parent))break;const D=o4(S),L=bd(S)?Yn(xr(S.parent)):W_(xr(S.parent)),B=O1(S)?Vti(L,D):tt,K=L0t(S,L,D),ne=O1(S)?Hti(L,D):jti(L,D);y.decoratorSignature=Y7e(B,K,ne);break}}return y.decoratorSignature===ci?void 0:y.decoratorSignature}function Uti(o){const{parent:_}=o,y=yr(_);if(!y.decoratorSignature)switch(y.decoratorSignature=ci,_.kind){case 263:case 231:{const D=Yn(xr(_)),L=p0("target",D);y.decoratorSignature=lU(void 0,void 0,[L],is([D,Ri]));break}case 169:{const S=_;if(!iu(S.parent)&&!(Nu(S.parent)||kp(S.parent)&&ss(S.parent.parent))||$T(S.parent)===S)break;const D=$T(S.parent)?S.parent.parameters.indexOf(S)-1:S.parent.parameters.indexOf(S);j.assert(D>=0);const L=iu(S.parent)?Yn(xr(S.parent.parent)):iyt(S.parent),B=iu(S.parent)?tt:nyt(S.parent),K=v0(D),ne=p0("target",L),ce=p0("propertyKey",B),ge=p0("parameterIndex",K);y.decoratorSignature=lU(void 0,void 0,[ne,ce,ge],Ri);break}case 174:case 177:case 178:case 172:{const S=_;if(!ss(S.parent))break;const D=iyt(S),L=p0("target",D),B=nyt(S),K=p0("propertyKey",B),ne=Lo(S)?Ri:spt(o4(S));if(!Lo(_)||O1(_)){const ge=spt(o4(S)),je=p0("descriptor",ge);y.decoratorSignature=lU(void 0,void 0,[L,K,je],is([ne,Ri]))}else y.decoratorSignature=lU(void 0,void 0,[L,K],is([ne,Ri]));break}}return y.decoratorSignature===ci?void 0:y.decoratorSignature}function e5e(o){return pe?Uti(o):zti(o)}function ate(o){const _=fee(!0);return _!==oo?(o=tw(rF(o))||te,wC(_,[o])):te}function P0t(o){const _=ept(!0);return _!==oo?(o=tw(rF(o))||te,wC(_,[o])):te}function cte(o,_){const y=ate(_);return y===te?(ft(o,zp(o)?k.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:k.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option),vt):(JRe(!0)||ft(o,zp(o)?k.A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:k.An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option),y)}function qti(o){const _=$a(0,"NewTargetExpression"),y=$a(4,"target",8);y.parent=_,y.links.type=o;const S=_a([y]);return _.members=S,Xs(_,S,w,w,w)}function dge(o,_){if(!o.body)return vt;const y=nd(o),S=(y&2)!==0,D=(y&1)!==0;let L,B,K,ne=Ri;if(o.body.kind!==241)L=ju(o.body,_&&_&-9),S&&(L=rF(cU(L,!1,o,k.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)));else if(D){const ce=R0t(o,_);ce?ce.length>0&&(L=is(ce,2)):ne=Ai;const{yieldTypes:ge,nextTypes:je}=$ti(o,_);B=Ft(ge)?is(ge,2):void 0,K=Ft(je)?Wa(je):void 0}else{const ce=R0t(o,_);if(!ce)return y&2?cte(o,Ai):Ai;if(ce.length===0){const ge=$me(o,void 0),je=ge&&(yte(ge,y)||Ri).flags&32768?tt:Ri;return y&2?cte(o,je):je}L=is(ce,2)}if(L||B||K){if(B&&Pme(o,B,3),L&&Pme(o,L,1),K&&Pme(o,K,2),L&&c1(L)||B&&c1(B)||K&&c1(K)){const ce=b7e(o),ge=ce?ce===Dm(o)?D?void 0:L:Gme(Oc(ce),o,void 0):void 0;D?(B=M8e(B,ge,0,S),L=M8e(L,ge,1,S),K=M8e(K,ge,2,S)):L=zQt(L,ge,S)}B&&(B=lp(B)),L&&(L=lp(L)),K&&(K=lp(K))}return D?fge(B||Ai,L||ne,K||ygt(2,o)||te,S):S?ate(L||ne):L||ne}function fge(o,_,y,S){const D=S?Ic:Gl,L=D.getGlobalGeneratorType(!1);if(o=D.resolveIterationType(o,void 0)||te,_=D.resolveIterationType(_,void 0)||te,L===oo){const B=D.getGlobalIterableIteratorType(!1);return B!==oo?q5(B,[o,_,y]):(D.getGlobalIterableIteratorType(!0),Jo)}return q5(L,[o,_,y])}function $ti(o,_){const y=[],S=[],D=(nd(o)&2)!==0;return fTe(o.body,L=>{const B=L.expression?uo(L.expression,_):Gt;mu(y,A0t(L,B,Je,D));let K;if(L.asteriskToken){const ne=xge(B,D?19:17,L.expression);K=ne&&ne.nextType}else K=g_(L,void 0);K&&mu(S,K)}),{yieldTypes:y,nextTypes:S}}function A0t(o,_,y,S){const D=o.expression||o,L=o.asteriskToken?iw(S?19:17,_,y,D):_;return S?r4(L,D,o.asteriskToken?k.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:k.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member):L}function O0t(o,_,y){let S=0;for(let D=0;D<y.length;D++){const L=D<o||D>=_?y[D]:void 0;S|=L!==void 0?kNe.get(L)||32768:0}return S}function M0t(o){const _=yr(o);if(_.isExhaustive===void 0){_.isExhaustive=0;const y=Jti(o);_.isExhaustive===0&&(_.isExhaustive=y)}else _.isExhaustive===0&&(_.isExhaustive=!1);return _.isExhaustive}function Jti(o){if(o.expression.kind===221){const S=Umt(o);if(!S)return!1;const D=iv(ju(o.expression.expression)),L=O0t(0,0,S);return D.flags&3?(556800&L)===556800:!dg(D,B=>qO(B,L)===L)}const _=ju(o.expression);if(!Hz(_))return!1;const y=Fme(o);return!y.length||Ft(y,VQt)?!1:WZt(eu(_,Xh),y)}function t5e(o){return o.endFlowNode&&Wee(o.endFlowNode)}function R0t(o,_){const y=nd(o),S=[];let D=t5e(o),L=!1;if(uS(o.body,B=>{let K=B.expression;if(K){if(K=Dc(K,!0),y&2&&K.kind===223&&(K=Dc(K.expression,!0)),K.kind===213&&K.expression.kind===80&&ju(K.expression).symbol===wc(o.symbol)&&(!lx(o.symbol.valueDeclaration)||s7e(K.expression))){L=!0;return}let ne=ju(K,_&&_&-9);y&2&&(ne=rF(cU(ne,!1,o,k.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member))),ne.flags&131072&&(L=!0),mu(S,ne)}else D=!0}),!(S.length===0&&!D&&(L||Gti(o))))return we&&S.length&&D&&!(dy(o)&&S.some(B=>B.symbol===o.symbol))&&mu(S,tt),S}function Gti(o){switch(o.kind){case 218:case 219:return!0;case 174:return o.parent.kind===210;default:return!1}}function Kti(o){switch(o.kind){case 176:case 177:case 178:return}if(nd(o)!==0)return;let y;if(o.body&&o.body.kind!==241)y=o.body;else if(uS(o.body,D=>{if(y||!D.expression)return!0;y=D.expression})||!y||t5e(o))return;return Xti(o,y)}function Xti(o,_){if(_=Dc(_,!0),!!(ju(_).flags&16))return O(o.parameters,(S,D)=>{const L=Yn(S.symbol);if(!L||L.flags&16||!ot(S.name)||Hee(S.symbol)||Oy(S))return;const B=Qti(o,_,S,L);if(B)return Iz(1,Ws(S.name.escapedText),D,B)})}function Qti(o,_,y,S){const D=_.flowNode||_.parent.kind===253&&_.parent.flowNode||zy(2,void 0,void 0),L=zy(32,_,D),B=LC(y.name,S,S,o,L);if(B===S)return;const K=zy(64,_,D);return LC(y.name,S,B,o,K).flags&131072?B:void 0}function i5e(o,_){a(y);return;function y(){const S=nd(o),D=_&&yte(_,S);if(D&&(Au(D,16384)||D.flags&32769)||o.kind===173||lu(o.body)||o.body.kind!==241||!t5e(o))return;const L=o.flags&1024,B=wp(o)||o;if(D&&D.flags&131072)ft(B,k.A_function_returning_never_cannot_have_a_reachable_end_point);else if(D&&!L)ft(B,k.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value);else if(D&&we&&!Da(tt,D))ft(B,k.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined);else if(Q.noImplicitReturns){if(!D){if(!L)return;const K=Oc(Dm(o));if(N1t(o,K))return}ft(B,k.Not_all_code_paths_return_a_value)}}}function F0t(o,_){if(j.assert(o.kind!==174||Ig(o)),s4(o),ml(o)&&sF(o,o.name),_&&_&4&&Em(o)){if(!wp(o)&&!eX(o)){const S=Qz(o);if(S&&Yx(Oc(S))){const D=yr(o);if(D.contextFreeType)return D.contextFreeType;const L=dge(o,_),B=_b(void 0,void 0,void 0,w,L,void 0,0,64),K=Xs(o.symbol,X,[B],w,w);return K.objectFlags|=262144,D.contextFreeType=K}}return tc}return!Bge(o)&&o.kind===218&&H5e(o),Zti(o,_),Yn(xr(o))}function Zti(o,_){const y=yr(o);if(!(y.flags&64)){const S=Qz(o);if(!(y.flags&64)){y.flags|=64;const D=Ra(ia(Yn(xr(o)),0));if(!D)return;if(Em(o))if(S){const L=tE(o);let B;if(_&&_&2){I0t(D,S,L);const K=eU(S);K&&K.flags&262144&&(B=QA(S,L.nonFixingMapper))}B||(B=L?QA(S,L.mapper):S),Lti(D,B)}else Pti(D);else if(S&&!o.typeParameters&&S.parameters.length>o.parameters.length){const L=tE(o);_&&_&2&&I0t(D,S,L)}if(S&&!BO(o)&&!D.resolvedReturnType){const L=dge(o,_);D.resolvedReturnType||(D.resolvedReturnType=L)}rU(o)}}}function Yti(o){j.assert(o.kind!==174||Ig(o));const _=nd(o),y=BO(o);if(i5e(o,y),o.body)if(wp(o)||Oc(Dm(o)),o.body.kind===241)za(o.body);else{const S=uo(o.body),D=y&&yte(y,_);if(D){const L=oge(o.body);if((_&3)===2){const B=cU(S,!1,L,k.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);Xx(B,D,L,L)}else Xx(S,D,L,L)}}}function hge(o,_,y,S=!1){if(!Da(_,qo)){const D=S&&nF(_);return N2(o,!!D&&Da(D,qo),y),!1}return!0}function eii(o){if(!la(o)||!vI(o))return!1;const _=ju(o.arguments[2]);if(Yu(_,"value")){const D=Ta(_,"writable"),L=D&&Yn(D);if(!L||L===ln||L===Un)return!0;if(D&&D.valueDeclaration&&_d(D.valueDeclaration)){const B=D.valueDeclaration.initializer,K=uo(B);if(K===ln||K===Un)return!0}return!1}return!Ta(_,"set")}function d1(o){return!!(Iu(o)&8||o.flags&4&&$m(o)&8||o.flags&3&&k7e(o)&6||o.flags&98304&&!(o.flags&65536)||o.flags&8||Ft(o.declarations,eii))}function B0t(o,_,y){var S,D;if(y===0)return!1;if(d1(_)){if(_.flags&4&&Sl(o)&&o.expression.kind===110){const L=Up(o);if(!(L&&(L.kind===176||dy(L))))return!0;if(_.valueDeclaration){const B=ur(_.valueDeclaration),K=L.parent===_.valueDeclaration.parent,ne=L===_.valueDeclaration.parent,ce=B&&((S=_.parent)==null?void 0:S.valueDeclaration)===L.parent,ge=B&&((D=_.parent)==null?void 0:D.valueDeclaration)===L;return!(K||ne||ce||ge)}}return!0}if(Sl(o)){const L=Dc(o.expression);if(L.kind===80){const B=yr(L).resolvedSymbol;if(B.flags&2097152){const K=Dh(B);return!!K&&K.kind===274}}}return!1}function iU(o,_,y){const S=Vu(o,7);return S.kind!==80&&!Sl(S)?(ft(o,_),!1):S.flags&64?(ft(o,y),!1):!0}function tii(o){uo(o.expression);const _=Dc(o.expression);if(!Sl(_))return ft(_,k.The_operand_of_a_delete_operator_must_be_a_property_reference),fi;Nr(_)&&Vs(_.name)&&ft(_,k.The_operand_of_a_delete_operator_cannot_be_a_private_identifier);const y=yr(_),S=Rp(y.resolvedSymbol);return S&&(d1(S)?ft(_,k.The_operand_of_a_delete_operator_cannot_be_a_read_only_property):iii(_,S)),fi}function iii(o,_){const y=Yn(_);we&&!(y.flags&131075)&&!(Ne?_.flags&16777216:l1(y,16777216))&&ft(o,k.The_operand_of_a_delete_operator_must_be_optional)}function nii(o){return uo(o.expression),YI}function rii(o){return s4(o),Gt}function W0t(o){let _=!1;const y=qG(o);if(y&&gu(y)){const S=hx(o)?k.await_expression_cannot_be_used_inside_a_class_static_block:k.await_using_statements_cannot_be_used_inside_a_class_static_block;ft(o,S),_=!0}else if(!(o.flags&65536))if(JG(o)){const S=_n(o);if(!tk(S)){let D;if(!aP(S,Q)){D??(D=E1(S,o.pos));const L=hx(o)?k.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:k.await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module,B=Md(S,D.start,D.length,L);lc.add(B),_=!0}switch(oe){case 100:case 199:if(S.impliedNodeFormat===1){D??(D=E1(S,o.pos)),lc.add(Md(S,D.start,D.length,k.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level)),_=!0;break}case 7:case 99:case 200:case 4:if(re>=4)break;default:D??(D=E1(S,o.pos));const L=hx(o)?k.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:k.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher;lc.add(Md(S,D.start,D.length,L)),_=!0;break}}}else{const S=_n(o);if(!tk(S)){const D=E1(S,o.pos),L=hx(o)?k.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:k.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules,B=Md(S,D.start,D.length,L);if(y&&y.kind!==176&&!(nd(y)&2)){const K=Kn(y,k.Did_you_mean_to_mark_this_function_as_async);da(B,K)}lc.add(B),_=!0}}return hx(o)&&p7e(o)&&(ft(o,k.await_expressions_cannot_be_used_in_a_parameter_initializer),_=!0),_}function sii(o){a(()=>W0t(o));const _=uo(o.expression),y=cU(_,!0,o,k.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);return y===_&&!fe(y)&&!(_.flags&3)&&Z0(!1,Kn(o,k.await_has_no_effect_on_the_type_of_this_expression)),y}function oii(o){const _=uo(o.operand);if(_===Xn)return Xn;switch(o.operand.kind){case 9:switch(o.operator){case 41:return XA(v0(-o.operand.text));case 40:return XA(v0(+o.operand.text))}break;case 10:if(o.operator===41)return XA(yee({negative:!0,base10Value:s7(o.operand.text)}))}switch(o.operator){case 40:case 41:case 55:return ly(_,o.operand),lte(_,12288)&&ft(o.operand,k.The_0_operator_cannot_be_applied_to_type_symbol,xa(o.operator)),o.operator===40?(lte(_,2112)&&ft(o.operand,k.Operator_0_cannot_be_applied_to_type_1,xa(o.operator),Hn(DC(_))),hi):n5e(_);case 54:b5e(_,o.operand);const y=qO(_,12582912);return y===4194304?ln:y===8388608?Pt:fi;case 46:case 47:return hge(o.operand,ly(_,o.operand),k.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type)&&iU(o.operand,k.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access,k.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access),n5e(_)}return vt}function aii(o){const _=uo(o.operand);return _===Xn?Xn:(hge(o.operand,ly(_,o.operand),k.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type)&&iU(o.operand,k.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access,k.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access),n5e(_))}function n5e(o){return Au(o,2112)?Gf(o,3)||Au(o,296)?qo:vn:hi}function lte(o,_){if(Au(o,_))return!0;const y=iv(o);return!!y&&Au(y,_)}function Au(o,_){if(o.flags&_)return!0;if(o.flags&3145728){const y=o.types;for(const S of y)if(Au(S,_))return!0}return!1}function Gf(o,_,y){return o.flags&_?!0:y&&o.flags&114691?!1:!!(_&296)&&Da(o,hi)||!!(_&2112)&&Da(o,vn)||!!(_&402653316)&&Da(o,st)||!!(_&528)&&Da(o,fi)||!!(_&16384)&&Da(o,Ri)||!!(_&131072)&&Da(o,Ai)||!!(_&65536)&&Da(o,Qt)||!!(_&32768)&&Da(o,tt)||!!(_&4096)&&Da(o,wi)||!!(_&67108864)&&Da(o,zi)}function nU(o,_,y){return o.flags&1048576?Ce(o.types,S=>nU(S,_,y)):Gf(o,_,y)}function _ge(o){return!!(Or(o)&16)&&!!o.symbol&&r5e(o.symbol)}function r5e(o){return(o.flags&128)!==0}function s5e(o){const _=T1t("hasInstance");if(nU(o,67108864)){const y=Ta(o,_);if(y){const S=Yn(y);if(S&&ia(S,0).length!==0)return S}}}function cii(o,_,y,S,D){if(y===Xn||S===Xn)return Xn;!Nc(y)&&nU(y,402784252)&&ft(o,k.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter),j.assert(wK(o.parent));const L=QO(o.parent,void 0,D);if(L===Rn)return Xn;const B=Oc(L);return Nh(B,fi,_,k.An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression),fi}function lii(o){return dg(o,_=>_===pc||!!(_.flags&2097152)&&sv(iv(_)))}function uii(o,_,y,S){if(y===Xn||S===Xn)return Xn;if(Vs(o)){if((re<9||re<99||!de)&&zd(o,2097152),!yr(o).resolvedSymbol&&Cf(o)){const D=L7e(o,S.symbol,!0);qgt(o,S,D)}}else Nh(ly(y,o),vi,o);return Nh(ly(S,_),zi,_)&&lii(S)&&ft(_,k.Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator,Hn(S)),fi}function dii(o,_,y){const S=o.properties;if(we&&S.length===0)return ly(_,o);for(let D=0;D<S.length;D++)V0t(o,_,D,S,y);return _}function V0t(o,_,y,S,D=!1){const L=o.properties,B=L[y];if(B.kind===303||B.kind===304){const K=B.name,ne=xC(K);if(Jm(ne)){const je=Gm(ne),Be=Ta(_,je);Be&&(Zee(Be,B,D),D7e(B,!1,!0,_,Be))}const ce=ap(_,ne,32|(i4(B)?16:0),K),ge=an(B,ce);return HN(B.kind===304?B:B.initializer,ge)}else if(B.kind===305)if(y<L.length-1)ft(B,k.A_rest_element_must_be_last_in_a_destructuring_pattern);else{re<5&&zd(B,4);const K=[];if(S)for(const ce of S)Kv(ce)||K.push(ce.name);const ne=mt(_,K,_.symbol);return c4(S,k.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma),HN(B.expression,ne)}else ft(B,k.Property_assignment_expected)}function fii(o,_,y){const S=o.elements;re<2&&Q.downlevelIteration&&zd(o,512);const D=iw(193,_,tt,o)||vt;let L=Q.noUncheckedIndexedAccess?void 0:D;for(let B=0;B<S.length;B++){let K=D;o.elements[B].kind===230&&(K=L=L??(iw(65,_,tt,o)||vt)),H0t(o,_,B,K,y)}return _}function H0t(o,_,y,S,D){const L=o.elements,B=L[y];if(B.kind!==232){if(B.kind!==230){const K=v0(y);if(YS(_)){const ne=32|(i4(B)?16:0),ce=Gx(_,K,ne,ete(B,K))||vt,ge=i4(B)?Qg(ce,524288):ce,je=an(B,ge);return HN(B,je,D)}return HN(B,S,D)}if(y<L.length-1)ft(B,k.A_rest_element_must_be_last_in_a_destructuring_pattern);else{const K=B.expression;if(K.kind===226&&K.operatorToken.kind===64)ft(K.operatorToken,k.A_rest_element_cannot_have_an_initializer);else{c4(o.elements,k.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma);const ne=up(_,Qa)?eu(_,ce=>$5(ce,y)):hh(S);return HN(K,ne,D)}}}}function HN(o,_,y,S){let D;if(o.kind===304){const L=o;L.objectAssignmentInitializer&&(we&&!l1(uo(L.objectAssignmentInitializer),16777216)&&(_=Qg(_,524288)),mii(L.name,L.equalsToken,L.objectAssignmentInitializer,y)),D=o.name}else D=o;return D.kind===226&&D.operatorToken.kind===64&&(He(D,y),D=D.left,we&&(_=Qg(_,524288))),D.kind===210?dii(D,_,S):D.kind===209?fii(D,_,y):hii(D,_,y)}function hii(o,_,y){const S=uo(o,y),D=o.parent.kind===305?k.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access:k.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access,L=o.parent.kind===305?k.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access:k.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access;return iU(o,D,L)&&Xx(_,S,o,o),F6(o)&&zd(o.parent,1048576),_}function ute(o){switch(o=Dc(o),o.kind){case 80:case 11:case 14:case 215:case 228:case 15:case 9:case 10:case 112:case 97:case 106:case 157:case 218:case 231:case 219:case 209:case 210:case 221:case 235:case 285:case 284:return!0;case 227:return ute(o.whenTrue)&&ute(o.whenFalse);case 226:return Gb(o.operatorToken.kind)?!1:ute(o.left)&&ute(o.right);case 224:case 225:switch(o.operator){case 54:case 40:case 41:case 55:return!0}return!1;case 222:case 216:case 234:default:return!1}}function o5e(o,_){return(_.flags&98304)!==0||mme(o,_)}function _ii(){const o=BX(_,y,S,D,L,B);return(Be,kt)=>{const Vt=o(Be,kt);return j.assertIsDefined(Vt),Vt};function _(Be,kt,Vt){return kt?(kt.stackIndex++,kt.skip=!1,ce(kt,void 0),je(kt,void 0)):kt={checkMode:Vt,skip:!1,stackIndex:0,typeStack:[void 0,void 0]},nr(Be)&&dP(Be)?(kt.skip=!0,je(kt,uo(Be.right,Vt)),kt):(pii(Be),Be.operatorToken.kind===64&&(Be.left.kind===210||Be.left.kind===209)&&(kt.skip=!0,je(kt,HN(Be.left,uo(Be.right,Vt),Vt,Be.right.kind===110))),kt)}function y(Be,kt,Vt){if(!kt.skip)return K(kt,Be)}function S(Be,kt,Vt){if(!kt.skip){const Kt=ge(kt);j.assertIsDefined(Kt),ce(kt,Kt),je(kt,void 0);const Oi=Be.kind;if(CK(Oi)){let Ki=Vt.parent;for(;Ki.kind===217||WV(Ki);)Ki=Ki.parent;(Oi===56||r2(Ki))&&v5e(Vt.left,Kt,r2(Ki)?Ki.thenStatement:void 0),BV(Oi)&&b5e(Kt,Vt.left)}}}function D(Be,kt,Vt){if(!kt.skip)return K(kt,Be)}function L(Be,kt){let Vt;if(kt.skip)Vt=ge(kt);else{const Kt=ne(kt);j.assertIsDefined(Kt);const Oi=ge(kt);j.assertIsDefined(Oi),Vt=j0t(Be.left,Be.operatorToken,Be.right,Kt,Oi,kt.checkMode,Be)}return kt.skip=!1,ce(kt,void 0),je(kt,void 0),kt.stackIndex--,Vt}function B(Be,kt,Vt){return je(Be,kt),Be}function K(Be,kt){if(ur(kt))return kt;je(Be,uo(kt,Be.checkMode))}function ne(Be){return Be.typeStack[Be.stackIndex]}function ce(Be,kt){Be.typeStack[Be.stackIndex]=kt}function ge(Be){return Be.typeStack[Be.stackIndex+1]}function je(Be,kt){Be.typeStack[Be.stackIndex+1]=kt}}function pii(o){const{left:_,operatorToken:y,right:S}=o;if(y.kind===61){ur(_)&&(_.operatorToken.kind===57||_.operatorToken.kind===56)&&sn(_,k._0_and_1_operations_cannot_be_mixed_without_parentheses,xa(_.operatorToken.kind),xa(y.kind)),ur(S)&&(S.operatorToken.kind===57||S.operatorToken.kind===56)&&sn(S,k._0_and_1_operations_cannot_be_mixed_without_parentheses,xa(S.operatorToken.kind),xa(y.kind));const D=Vu(_,31),L=a5e(D);L!==3&&(o.parent.kind===226?ft(D,k.This_binary_expression_is_never_nullish_Are_you_missing_parentheses):L===1?ft(D,k.This_expression_is_always_nullish):ft(D,k.Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish))}}function a5e(o){switch(o=Vu(o),o.kind){case 223:case 213:case 212:case 214:case 211:case 229:case 110:return 3;case 226:switch(o.operatorToken.kind){case 64:case 61:case 78:case 57:case 76:case 56:case 77:return 3}return 2;case 227:return a5e(o.whenTrue)|a5e(o.whenFalse);case 106:return 1;case 80:return Lh(o)===et?1:3}return 2}function mii(o,_,y,S,D){const L=_.kind;if(L===64&&(o.kind===210||o.kind===209))return HN(o,uo(y,S),S,y.kind===110);let B;BV(L)?B=hU(o,S):B=uo(o,S);const K=uo(y,S);return j0t(o,_,y,B,K,S,D)}function j0t(o,_,y,S,D,L,B){const K=_.kind;switch(K){case 42:case 43:case 67:case 68:case 44:case 69:case 45:case 70:case 41:case 66:case 48:case 71:case 49:case 72:case 50:case 73:case 52:case 75:case 53:case 79:case 51:case 74:if(S===Xn||D===Xn)return Xn;S=ly(S,o),D=ly(D,y);let rn;if(S.flags&528&&D.flags&528&&(rn=Be(_.kind))!==void 0)return ft(B||_,k.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead,xa(_.kind),xa(rn)),hi;{const Gr=hge(o,S,k.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type,!0),vs=hge(y,D,k.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type,!0);let Ur;if(Gf(S,3)&&Gf(D,3)||!(Au(S,2112)||Au(D,2112)))Ur=hi;else if(ne(S,D)){switch(K){case 50:case 73:Oi();break;case 43:case 68:re<3&&ft(B,k.Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later)}Ur=vn}else Oi(ne),Ur=vt;if(Gr&&vs)switch(kt(Ur),K){case 48:case 71:case 49:case 72:case 50:case 73:const ga=Nt(y);typeof ga.value=="number"&&Math.abs(ga.value)>=32&&Z1(SS(By(y.parent.parent)),B||_,k.This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2,uu(o),xa(K),ga.value%32);break}return Ur}case 40:case 65:if(S===Xn||D===Xn)return Xn;!Gf(S,402653316)&&!Gf(D,402653316)&&(S=ly(S,o),D=ly(D,y));let Ui;return Gf(S,296,!0)&&Gf(D,296,!0)?Ui=hi:Gf(S,2112,!0)&&Gf(D,2112,!0)?Ui=vn:Gf(S,402653316,!0)||Gf(D,402653316,!0)?Ui=st:(Nc(S)||Nc(D))&&(Ui=fe(S)||fe(D)?vt:Je),Ui&&!je(K)?Ui:Ui?(K===65&&kt(Ui),Ui):(Oi((vs,Ur)=>Gf(vs,402655727)&&Gf(Ur,402655727)),Je);case 30:case 32:case 33:case 34:return je(K)&&(S=A8e(ly(S,o)),D=A8e(ly(D,y)),Kt((Gr,vs)=>{if(Nc(Gr)||Nc(vs))return!0;const Ur=Da(Gr,qo),ga=Da(vs,qo);return Ur&&ga||!Ur&&!ga&&wee(Gr,vs)})),fi;case 35:case 36:case 37:case 38:if(!(L&&L&64)){if((Yoe(o)||Yoe(y))&&(!nr(o)||K===37||K===38)){const Gr=K===35||K===37;ft(B,k.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value,Gr?"false":"true")}qn(B,K,o,y),Kt((Gr,vs)=>o5e(Gr,vs)||o5e(vs,Gr))}return fi;case 104:return cii(o,y,S,D,L);case 103:return uii(o,y,S,D);case 56:case 77:{const Gr=l1(S,4194304)?is([$Qt(we?S:DC(D)),D]):S;return K===77&&kt(D),Gr}case 57:case 76:{const Gr=l1(S,8388608)?is([EC(mmt(S)),D],2):S;return K===76&&kt(D),Gr}case 61:case 78:{const Gr=l1(S,262144)?is([EC(S),D],2):S;return K===78&&kt(D),Gr}case 64:const fr=ur(o.parent)?Bu(o.parent):0;return ce(fr,D),Vt(fr)?((!(D.flags&524288)||fr!==2&&fr!==6&&!TC(D)&&!e7e(D)&&!(Or(D)&1))&&kt(D),S):(kt(D),D);case 28:if(!Q.allowUnreachableCode&&ute(o)&&!ge(o.parent)){const Gr=_n(o),vs=Gr.text,Ur=Va(vs,o.pos);Gr.parseDiagnostics.some(fa=>fa.code!==k.JSX_expressions_must_have_one_parent_element.code?!1:Woe(fa,Ur))||ft(o,k.Left_side_of_comma_operator_is_unused_and_has_no_side_effects)}return D;default:return j.fail()}function ne(rn,Ui){return Gf(rn,2112)&&Gf(Ui,2112)}function ce(rn,Ui){if(rn===2)for(const fr of XS(Ui)){const Gr=Yn(fr);if(Gr.symbol&&Gr.symbol.flags&32){const vs=fr.escapedName,Ur=_i(fr.valueDeclaration,vs,788968,void 0,!1);Ur!=null&&Ur.declarations&&Ur.declarations.some(MI)&&(Ky(Ur,k.Duplicate_identifier_0,Ws(vs),fr),Ky(fr,k.Duplicate_identifier_0,Ws(vs),Ur))}}}function ge(rn){return rn.parent.kind===217&&A_(rn.left)&&rn.left.text==="0"&&(la(rn.parent.parent)&&rn.parent.parent.expression===rn.parent||rn.parent.parent.kind===215)&&(Sl(rn.right)||ot(rn.right)&&rn.right.escapedText==="eval")}function je(rn){const Ui=lte(S,12288)?o:lte(D,12288)?y:void 0;return Ui?(ft(Ui,k.The_0_operator_cannot_be_applied_to_type_symbol,xa(rn)),!1):!0}function Be(rn){switch(rn){case 52:case 75:return 57;case 53:case 79:return 38;case 51:case 74:return 56;default:return}}function kt(rn){Gb(K)&&a(Ui);function Ui(){let fr=S;if(z7(_.kind)&&o.kind===211&&(fr=tge(o,void 0,!0)),iU(o,k.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access,k.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access)){let Gr;if(Ne&&Nr(o)&&Au(rn,32768)){const vs=Yu(Kf(o.expression),o.name.escapedText);yme(rn,vs)&&(Gr=k.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target)}Xx(rn,fr,o,y,Gr)}}}function Vt(rn){var Ui;switch(rn){case 2:return!0;case 1:case 5:case 6:case 3:case 4:const fr=p_(o),Gr=dP(y);return!!Gr&&Aa(Gr)&&!!((Ui=fr==null?void 0:fr.exports)!=null&&Ui.size);default:return!1}}function Kt(rn){return rn(S,D)?!1:(Oi(rn),!0)}function Oi(rn){let Ui=!1;const fr=B||_;if(rn){const fa=tw(S),Al=tw(D);Ui=!(fa===S&&Al===D)&&!!(fa&&Al)&&rn(fa,Al)}let Gr=S,vs=D;!Ui&&rn&&([Gr,vs]=gii(S,D,rn));const[Ur,ga]=O5(Gr,vs);Ki(fr,Ui,Ur,ga)||N2(fr,Ui,k.Operator_0_cannot_be_applied_to_types_1_and_2,xa(_.kind),Ur,ga)}function Ki(rn,Ui,fr,Gr){switch(_.kind){case 37:case 35:case 38:case 36:return N2(rn,Ui,k.This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap,fr,Gr);default:return}}function qn(rn,Ui,fr,Gr){const vs=Qn(Dc(fr)),Ur=Qn(Dc(Gr));if(vs||Ur){const ga=ft(rn,k.This_condition_will_always_return_0,xa(Ui===37||Ui===35?97:112));if(vs&&Ur)return;const fa=Ui===38||Ui===36?xa(54):"",Al=vs?Gr:fr,Po=Dc(Al);da(ga,Kn(Al,k.Did_you_mean_0,`${fa}Number.isNaN(${pl(Po)?bp(Po):"..."})`))}}function Qn(rn){if(ot(rn)&&rn.escapedText==="NaN"){const Ui=ZKt();return!!Ui&&Ui===Lh(rn)}return!1}}function gii(o,_,y){let S=o,D=_;const L=DC(o),B=DC(_);return y(L,B)||(S=L,D=B),[S,D]}function yii(o){a(je);const _=Up(o);if(!_)return Je;const y=nd(_);if(!(y&1))return Je;const S=(y&2)!==0;o.asteriskToken&&(S&&re<5&&zd(o,26624),!S&&re<2&&Q.downlevelIteration&&zd(o,256));let D=BO(_);D&&D.flags&1048576&&(D=ad(D,Be=>d5e(Be,y,void 0)));const L=D&&D5e(D,S),B=L&&L.yieldType||Je,K=L&&L.nextType||Je,ne=o.expression?uo(o.expression):Gt,ce=A0t(o,ne,K,S);if(D&&ce&&Xx(ce,B,o.expression||o,o.expression),o.asteriskToken)return w5e(S?19:17,1,ne,o.expression)||Je;if(D)return rE(2,D,S)||Je;let ge=ygt(2,_);return ge||(ge=Je,a(()=>{if(De&&!QDe(o)){const Be=g_(o,void 0);(!Be||Nc(Be))&&ft(o,k.yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation)}})),ge;function je(){o.flags&16384||Df(o,k.A_yield_expression_is_only_allowed_in_a_generator_body),p7e(o)&&ft(o,k.yield_expressions_cannot_be_used_in_a_parameter_initializer)}}function vii(o,_){const y=hU(o.condition,_);v5e(o.condition,y,o.whenTrue);const S=uo(o.whenTrue,_),D=uo(o.whenFalse,_);return is([S,D],2)}function z0t(o){const _=o.parent;return c_(_)&&z0t(_)||wl(_)&&_.argumentExpression===o}function bii(o){const _=[o.head.text],y=[];for(const D of o.templateSpans){const L=uo(D.expression);lte(L,12288)&&ft(D.expression,k.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String),_.push(D.literal.text),y.push(Da(L,Wo)?L:st)}const S=o.parent.kind!==215&&Nt(o).value;return S?XA(V_(S)):tF(o)||z0t(o)||dg(g_(o,void 0)||te,Cii)?TN(_,y):st}function Cii(o){return!!(o.flags&134217856||o.flags&58982400&&Au(Jf(o)||te,402653316))}function Sii(o){return cD(o)&&!PI(o.parent)?o.parent.parent:o}function ZO(o,_,y,S){const D=Sii(o);qee(D,_,!1),BYt(D,y);const L=uo(o,S|1|(y?2:0));y&&y.intraExpressionInferenceSites&&(y.intraExpressionInferenceSites=void 0);const B=Au(L,2944)&&pge(L,Gme(_,o,void 0))?Xh(L):L;return WYt(),Xz(),B}function ju(o,_){if(_)return uo(o,_);const y=yr(o);if(!y.resolvedType){const S=ib,D=bm;ib=jg,bm=void 0,y.resolvedType=uo(o,_),bm=D,ib=S}return y.resolvedType}function U0t(o){return o=Dc(o,!0),o.kind===216||o.kind===234||FI(o)}function eF(o,_,y){const S=pV(o);if(nr(o)){const L=rX(o);if(L)return J7e(S,L,_)}const D=u5e(S)||(y?ZO(S,y,void 0,_||0):ju(S,_));if($s(ec(o)?YL(o):o)){if(o.name.kind===206&&ew(D))return wii(D,o.name);if(o.name.kind===207&&Qa(D))return xii(D,o.name)}return D}function wii(o,_){let y;for(const L of _.elements)if(L.initializer){const B=q0t(L);B&&!Ta(o,B)&&(y=fn(y,L))}if(!y)return o;const S=_a();for(const L of XS(o))S.set(L.escapedName,L);for(const L of y){const B=$a(16777220,q0t(L));B.links.type=ie(L,!1,!1),S.set(B.escapedName,B)}const D=Xs(o.symbol,S,w,w,Ih(o));return D.objectFlags=o.objectFlags,D}function q0t(o){const _=xC(o.propertyName||o.name);return Jm(_)?Gm(_):void 0}function xii(o,_){if(o.target.combinedFlags&12||QS(o)>=_.elements.length)return o;const y=_.elements,S=GD(o).slice(),D=o.target.elementFlags.slice();for(let L=QS(o);L<y.length;L++){const B=y[L];(L<y.length-1||!(B.kind===208&&B.dotDotDotToken))&&(S.push(!Bd(B)&&i4(B)?ie(B,!1,!1):Je),D.push(2),!Bd(B)&&!i4(B)&&G2(B,Je))}return rv(S,D,o.target.readonly)}function c5e(o,_){const y=$0t(o,_);if(nr(o)){if(lmt(y))return G2(o,Je),Je;if(xme(y))return G2(o,Yc),Yc}return y}function $0t(o,_){return oE(o)&6||tV(o)?_:J2(_)}function pge(o,_){if(_){if(_.flags&3145728){const y=_.types;return Ft(y,S=>pge(o,S))}if(_.flags&58982400){const y=Jf(_)||te;return Au(y,4)&&Au(o,128)||Au(y,8)&&Au(o,256)||Au(y,64)&&Au(o,2048)||Au(y,4096)&&Au(o,8192)||pge(o,y)}return!!(_.flags&406847616&&Au(o,128)||_.flags&256&&Au(o,256)||_.flags&2048&&Au(o,2048)||_.flags&512&&Au(o,512)||_.flags&8192&&Au(o,8192))}return!1}function tF(o){const _=o.parent;return Hk(_)&&O0(_.type)||FI(_)&&O0(N7(_))||$7e(o)&&xN(g_(o,0))||(c_(_)||jf(_)||Km(_))&&tF(_)||(_d(_)||lh(_)||w3(_))&&tF(_.parent)}function iF(o,_,y){const S=uo(o,_,y);return tF(o)||pTe(o)?Xh(S):U0t(o)?S:O8e(S,Gme(g_(o,void 0),o,void 0))}function J0t(o,_){return o.name.kind===167&&cy(o.name),iF(o.initializer,_)}function G0t(o,_){vyt(o),o.name.kind===167&&cy(o.name);const y=F0t(o,_);return K0t(o,y,_)}function K0t(o,_,y){if(y&&y&10){const S=Yz(_,0,!0),D=Yz(_,1,!0),L=S||D;if(L&&L.typeParameters){const B=X2(o,2);if(B){const K=Yz(EC(B),S?0:1,!1);if(K&&!K.typeParameters){if(y&8)return X0t(o,y),tc;const ne=tE(o),ce=ne.signature&&Oc(ne.signature),ge=ce&&n0t(ce);if(ge&&!ge.typeParameters&&!Ce(ne.inferences,YO)){const je=Eii(ne,L.typeParameters),Be=RRe(L,je),kt=qt(ne.inferences,Vt=>H8e(Vt.typeParameter));if(F8e(Be,K,(Vt,Kt)=>{NC(kt,Vt,Kt,0,!0)}),Ft(kt,YO)&&(B8e(Be,K,(Vt,Kt)=>{NC(kt,Vt,Kt)}),!Tii(ne.inferences,kt)))return Dii(ne.inferences,kt),ne.inferredTypeParameters=Js(ne.inferredTypeParameters,je),kN(Be)}return kN(r0t(L,K,ne),Rr(xx,je=>je&&qt(je.inferences,Be=>Be.typeParameter)).slice())}}}}return _}function X0t(o,_){if(_&2){const y=tE(o);y.flags|=4}}function YO(o){return!!(o.candidates||o.contraCandidates)}function kii(o){return!!(o.candidates||o.contraCandidates||C_t(o.typeParameter))}function Tii(o,_){for(let y=0;y<o.length;y++)if(YO(o[y])&&YO(_[y]))return!0;return!1}function Dii(o,_){for(let y=0;y<o.length;y++)!YO(o[y])&&YO(_[y])&&(o[y]=_[y])}function Eii(o,_){const y=[];let S,D;for(const L of _){const B=L.symbol.escapedName;if(l5e(o.inferredTypeParameters,B)||l5e(y,B)){const K=Iii(Js(o.inferredTypeParameters,y),B),ne=$a(262144,K),ce=Ut(ne);ce.target=L,S=fn(S,L),D=fn(D,ce),y.push(ce)}else y.push(L)}if(D){const L=cp(S,D);for(const B of D)B.mapper=L}return y}function l5e(o,_){return Ft(o,y=>y.symbol.escapedName===_)}function Iii(o,_){let y=_.length;for(;y>1&&_.charCodeAt(y-1)>=48&&_.charCodeAt(y-1)<=57;)y--;const S=_.slice(0,y);for(let D=1;;D++){const L=S+D;if(!l5e(o,L))return L}}function Q0t(o){const _=VN(o);if(_&&!_.typeParameters)return Oc(_)}function Nii(o){const _=uo(o.expression),y=jz(_,o.expression),S=Q0t(_);return S&&Eme(S,o,y!==_)}function Kf(o){const _=u5e(o);if(_)return _;if(o.flags&268435456&&bm){const D=bm[Sc(o)];if(D)return D}const y=AS,S=uo(o,64);if(AS!==y){const D=bm||(bm=[]);D[Sc(o)]=S,XDe(o,o.flags|268435456)}return S}function u5e(o){let _=Dc(o,!0);if(FI(_)){const y=N7(_);if(!O0(y))return Bs(y)}if(_=Dc(o),hx(_)){const y=u5e(_.expression);return y?r4(y):void 0}if(la(_)&&_.expression.kind!==108&&!L_(_,!0)&&!g0t(_))return cI(_)?Nii(_):Q0t(KO(_.expression));if(Hk(_)&&!O0(_.type))return Bs(_.type);if(lI(o)||C8(o))return uo(o)}function dte(o){const _=yr(o);if(_.contextFreeType)return _.contextFreeType;qee(o,Je,!1);const y=_.contextFreeType=uo(o,4);return Xz(),y}function uo(o,_,y){var S,D;(S=Zn)==null||S.push(Zn.Phase.Check,"checkExpression",{kind:o.kind,pos:o.pos,end:o.end,path:o.tracingPath});const L=H;H=o,N=0;const B=Aii(o,_,y),K=K0t(o,B,_);return _ge(K)&&Lii(o,K),H=L,(D=Zn)==null||D.pop(),K}function Lii(o,_){const y=o.parent.kind===211&&o.parent.expression===o||o.parent.kind===212&&o.parent.expression===o||(o.kind===80||o.kind===166)&&Lge(o)||o.parent.kind===186&&o.parent.exprName===o||o.parent.kind===281;if(y||ft(o,k.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query),Q.isolatedModules||Q.verbatimModuleSyntax&&y&&!_i(o,K_(o),2097152,void 0,!1,!0)){j.assert(!!(_.symbol.flags&128));const S=_.symbol.valueDeclaration,D=t.getRedirectReferenceForResolutionFromSourceOfProject(_n(S).resolvedPath);S.flags&33554432&&!Yk(o)&&(!D||!sx(D.commandLine.options))&&ft(o,k.Cannot_access_ambient_const_enums_when_0_is_enabled,Et)}}function Pii(o,_){if(jp(o)){if(Kce(o))return J7e(o.expression,Xce(o),_);if(FI(o))return C0t(o,_)}return uo(o.expression,_)}function Aii(o,_,y){const S=o.kind;if(u)switch(S){case 231:case 218:case 219:u.throwIfCancellationRequested()}switch(S){case 80:return aYt(o,_);case 81:return Dei(o);case 110:return zee(o);case 108:return qme(o);case 106:return lt;case 15:case 11:return $8e(o)?ii:XA(V_(o.text));case 9:return Tyt(o),XA(v0(+o.text));case 10:return Roi(o),XA(yee({negative:!1,base10Value:s7(o.text)}));case 112:return Pt;case 97:return ln;case 228:return bii(o);case 14:return ZYt(o);case 209:return Tgt(o,_,y);case 210:return sei(o,_);case 211:return tge(o,_);case 166:return jgt(o,_);case 212:return jei(o,_);case 213:if(o.expression.kind===102)return bti(o);case 214:return vti(o,_);case 215:return Cti(o);case 217:return Pii(o,_);case 231:return wri(o);case 218:case 219:return F0t(o,_);case 221:return nii(o);case 216:case 234:return Sti(o,_);case 235:return kti(o);case 233:return w0t(o);case 238:return Tti(o);case 236:return Dti(o);case 220:return tii(o);case 222:return rii(o);case 223:return sii(o);case 224:return oii(o);case 225:return aii(o);case 226:return He(o,_);case 227:return vii(o,_);case 230:return YYt(o,_);case 232:return Gt;case 229:return yii(o);case 237:return eei(o);case 294:return bei(o,_);case 284:return lei(o);case 285:return aei(o);case 288:return uei(o);case 292:return fei(o,_);case 286:j.fail("Shouldn't ever directly check a JsxOpeningElement")}return vt}function Z0t(o){bb(o),o.expression&&Df(o.expression,k.Type_expected),za(o.constraint),za(o.default);const _=jD(xr(o));Jf(_),tKt(_)||ft(o.default,k.Type_parameter_0_has_a_circular_default,Hn(_));const y=m_(_),S=qD(_);y&&S&&Nh(S,Wp(io(y,QD(_,S)),S),o.default,k.Type_0_does_not_satisfy_the_constraint_1),s4(o),a(()=>oF(o.name,k.Type_parameter_name_cannot_be_0))}function Oii(o){var _,y;if(zf(o.parent)||ss(o.parent)||Mg(o.parent)){const S=jD(xr(o)),D=I8e(S)&24576;if(D){const L=xr(o.parent);if(Mg(o.parent)&&!(Or(gl(L))&52))ft(o,k.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types);else if(D===8192||D===16384){(_=Zn)==null||_.push(Zn.Phase.CheckTypes,"checkTypeParameterDeferred",{parent:kf(gl(L)),id:kf(S)});const B=Tee(L,S,D===16384?_e:Ve),K=Tee(L,S,D===16384?Ve:_e),ne=S;U=S,Nh(B,K,o,k.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation),U=ne,(y=Zn)==null||y.pop()}}}}function Y0t(o){bb(o),mte(o);const _=Up(o);Zr(o,31)&&(_.kind===176&&Dg(_.body)||ft(o,k.A_parameter_property_is_only_allowed_in_a_constructor_implementation),_.kind===176&&ot(o.name)&&o.name.escapedText==="constructor"&&ft(o.name,k.constructor_cannot_be_used_as_a_parameter_property_name)),!o.initializer&&g3(o)&&ta(o.name)&&_.body&&ft(o,k.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature),o.name&&ot(o.name)&&(o.name.escapedText==="this"||o.name.escapedText==="new")&&(_.parameters.indexOf(o)!==0&&ft(o,k.A_0_parameter_must_be_the_first_parameter,o.name.escapedText),(_.kind===176||_.kind===180||_.kind===185)&&ft(o,k.A_constructor_cannot_have_a_this_parameter),_.kind===219&&ft(o,k.An_arrow_function_cannot_have_a_this_parameter),(_.kind===177||_.kind===178)&&ft(o,k.get_and_set_accessors_cannot_declare_this_parameters)),o.dotDotDotToken&&!ta(o.name)&&!Da(a1(Yn(o.symbol)),od)&&ft(o,k.A_rest_parameter_must_be_of_an_array_type)}function Mii(o){const _=Rii(o);if(!_){ft(o,k.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);return}const y=Dm(_),S=cg(y);if(!S)return;za(o.type);const{parameterName:D}=o;if(S.kind!==0&&S.kind!==2){if(S.parameterIndex>=0){if(Ch(y)&&S.parameterIndex===y.parameters.length-1)ft(D,k.A_type_predicate_cannot_reference_a_rest_parameter);else if(S.type){const L=()=>jo(void 0,k.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type);Nh(S.type,Yn(y.parameters[S.parameterIndex]),o.type,void 0,L)}}else if(D){let L=!1;for(const{name:B}of _.parameters)if(ta(B)&&e1t(B,D,S.parameterName)){L=!0;break}L||ft(o.parameterName,k.Cannot_find_parameter_0,S.parameterName)}}}function Rii(o){switch(o.parent.kind){case 219:case 179:case 262:case 218:case 184:case 174:case 173:const _=o.parent;if(o===_.type)return _}}function e1t(o,_,y){for(const S of o.elements){if(Bd(S))continue;const D=S.name;if(D.kind===80&&D.escapedText===y)return ft(_,k.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern,y),!0;if((D.kind===207||D.kind===206)&&e1t(D,_,y))return!0}}function rU(o){o.kind===181?doi(o):(o.kind===184||o.kind===262||o.kind===185||o.kind===179||o.kind===176||o.kind===180)&&Bge(o);const _=nd(o);_&4||((_&3)===3&&re<5&&zd(o,6144),(_&3)===2&&re<4&&zd(o,64),_&3&&re<2&&zd(o,128)),vte(Jw(o)),bri(o),O(o.parameters,Y0t),o.type&&za(o.type),a(y);function y(){Mni(o);let S=wp(o),D=S;if(nr(o)){const L=Fk(o);if(L&&L.typeExpression&&qp(L.typeExpression.type)){const B=VN(Bs(L.typeExpression));B&&B.declaration&&(S=wp(B.declaration),D=L.typeExpression.type)}}if(De&&!S)switch(o.kind){case 180:ft(o,k.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);break;case 179:ft(o,k.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);break}if(S&&D){const L=nd(o);if((L&5)===1){const B=Bs(S);B===Ri?ft(D,k.A_generator_cannot_have_a_void_type_annotation):d5e(B,L,D)}else(L&3)===2&&hni(o,S,D)}o.kind!==181&&o.kind!==317&&ek(o)}}function d5e(o,_,y){const S=rE(0,o,(_&2)!==0)||Je,D=rE(1,o,(_&2)!==0)||S,L=rE(2,o,(_&2)!==0)||te,B=fge(S,D,L,!!(_&2));return Nh(B,o,y)}function Fii(o){const _=new Map,y=new Map,S=new Map;for(const L of o.members)if(L.kind===176)for(const B of L.parameters)vp(B,L)&&!ta(B.name)&&D(_,B.name,B.name.escapedText,3);else{const B=pa(L),K=L.name;if(!K)continue;const ne=Vs(K),ce=ne&&B?16:0,ge=ne?S:B?y:_,je=K&&q5e(K);if(je)switch(L.kind){case 177:D(ge,K,je,1|ce);break;case 178:D(ge,K,je,2|ce);break;case 172:D(ge,K,je,3|ce);break;case 174:D(ge,K,je,8|ce);break}}function D(L,B,K,ne){const ce=L.get(K);if(ce)if((ce&16)!==(ne&16))ft(B,k.Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name,uu(B));else{const ge=!!(ce&8),je=!!(ne&8);ge||je?ge!==je&&ft(B,k.Duplicate_identifier_0,uu(B)):ce&ne&-17?ft(B,k.Duplicate_identifier_0,uu(B)):L.set(K,ce|ne)}else L.set(K,ne)}}function Bii(o){for(const _ of o.members){const y=_.name;if(pa(_)&&y){const D=q5e(y);switch(D){case"name":case"length":case"caller":case"arguments":if(de)break;case"prototype":const L=k.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1,B=Vx(xr(o));ft(y,L,D,B);break}}}}function t1t(o){const _=new Map;for(const y of o.members)if(y.kind===171){let S;const D=y.name;switch(D.kind){case 11:case 9:S=D.text;break;case 80:S=Fr(D);break;default:continue}_.get(S)?(ft(No(y.symbol.valueDeclaration),k.Duplicate_identifier_0,S),ft(y.name,k.Duplicate_identifier_0,S)):_.set(S,!0)}}function f5e(o){if(o.kind===264){const y=xr(o);if(y.declarations&&y.declarations.length>0&&y.declarations[0]!==o)return}const _=FRe(xr(o));if(_!=null&&_.declarations){const y=new Map;for(const S of _.declarations)S.parameters.length===1&&S.parameters[0].type&&RN(Bs(S.parameters[0].type),D=>{const L=y.get(kf(D));L?L.declarations.push(S):y.set(kf(D),{type:D,declarations:[S]})});y.forEach(S=>{if(S.declarations.length>1)for(const D of S.declarations)ft(D,k.Duplicate_index_signature_for_type_0,Hn(S.type))})}}function i1t(o){!bb(o)&&!Aoi(o)&&Wge(o.name),mte(o),mge(o),Zr(o,64)&&o.kind===172&&o.initializer&&ft(o,k.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract,al(o.name))}function Wii(o){return Vs(o.name)&&ft(o,k.Private_identifiers_are_not_allowed_outside_class_bodies),i1t(o)}function Vii(o){vyt(o)||Wge(o.name),Nu(o)&&o.asteriskToken&&ot(o.name)&&Fr(o.name)==="constructor"&&ft(o.name,k.Class_constructor_may_not_be_a_generator),_1t(o),Zr(o,64)&&o.kind===174&&o.body&&ft(o,k.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract,al(o.name)),Vs(o.name)&&!Cf(o)&&ft(o,k.Private_identifiers_are_not_allowed_outside_class_bodies),mge(o)}function mge(o){if(Vs(o.name)&&(re<9||re<99||!de)){for(let _=R0(o);_;_=R0(_))yr(_).flags|=1048576;if(fd(o.parent)){const _=l7e(o.parent);_&&(yr(o.name).flags|=32768,yr(_).flags|=4096)}}}function Hii(o){bb(o),Uo(o,za)}function jii(o){rU(o),Loi(o)||Poi(o),za(o.body);const _=xr(o),y=ql(_,o.kind);if(o===y&&yge(_),lu(o.body))return;a(D);return;function S(L){return Wh(L)?!0:L.kind===172&&!pa(L)&&!!L.initializer}function D(){const L=o.parent;if(qT(L)){u7e(o.parent,L);const B=d7e(L),K=fgt(o.body);if(K){if(B&&ft(K,k.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null),!ue&&(Ft(o.parent.members,S)||Ft(o.parameters,ce=>Zr(ce,31))))if(!zii(K,o.body))ft(K,k.A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers);else{let ce;for(const ge of o.body.statements){if(uf(ge)&&mI(Vu(ge.expression))){ce=ge;break}if(n1t(ge))break}ce===void 0&&ft(o,k.A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers)}}else B||ft(o,k.Constructors_for_derived_classes_must_contain_a_super_call)}}}function zii(o,_){const y=By(o.parent);return uf(y)&&y.parent===_}function n1t(o){return o.kind===108||o.kind===110?!0:wTe(o)?!1:!!Uo(o,n1t)}function r1t(o){ot(o.name)&&Fr(o.name)==="constructor"&&ss(o.parent)&&ft(o.name,k.Class_constructor_may_not_be_an_accessor),a(_),za(o.body),mge(o);function _(){if(!Bge(o)&&!boi(o)&&Wge(o.name),hte(o),rU(o),o.kind===177&&!(o.flags&33554432)&&Dg(o.body)&&o.flags&512&&(o.flags&1024||ft(o.name,k.A_get_accessor_must_return_a_value)),o.name.kind===167&&cy(o.name),RO(o)){const S=xr(o),D=ql(S,177),L=ql(S,178);if(D&&L&&!(a4(D)&1)){yr(D).flags|=1;const B=jh(D),K=jh(L);(B&64)!==(K&64)&&(ft(D.name,k.Accessors_must_both_be_abstract_or_non_abstract),ft(L.name,k.Accessors_must_both_be_abstract_or_non_abstract)),(B&4&&!(K&6)||B&2&&!(K&2))&&(ft(D.name,k.A_get_accessor_must_be_at_least_as_accessible_as_the_setter),ft(L.name,k.A_get_accessor_must_be_at_least_as_accessible_as_the_setter))}}const y=wz(xr(o));o.kind===177&&i5e(o,y)}}function Uii(o){hte(o)}function qii(o,_,y){return o.typeArguments&&y<o.typeArguments.length?Bs(o.typeArguments[y]):gge(o,_)[y]}function gge(o,_){return $x(qt(o.typeArguments,Bs),_,sy(_),nr(o))}function s1t(o,_){let y,S,D=!0;for(let L=0;L<_.length;L++){const B=m_(_[L]);B&&(y||(y=gge(o,_),S=cp(_,y)),D=D&&Nh(y[L],io(B,S),o.typeArguments[L],k.Type_0_does_not_satisfy_the_constraint_1))}return D}function $ii(o,_){if(!fe(o))return _.flags&524288&&Ys(_).typeParameters||(Or(o)&4?o.target.localTypeParameters:void 0)}function h5e(o){const _=Bs(o);if(!fe(_)){const y=yr(o).resolvedSymbol;if(y)return $ii(_,y)}}function _5e(o){if(wte(o,o.typeArguments),o.kind===183&&!nr(o)&&!dV(o)&&o.typeArguments&&o.typeName.end!==o.typeArguments.pos){const _=_n(o);uTe(_,o.typeName.end)===25&&sE(o,Va(_.text,o.typeName.end),1,k.JSDoc_types_can_only_be_used_inside_documentation_comments)}O(o.typeArguments,za),o1t(o)}function o1t(o){const _=Bs(o);if(!fe(_)){o.typeArguments&&a(()=>{const S=h5e(o);S&&s1t(o,S)});const y=yr(o).resolvedSymbol;y&&Ft(y.declarations,S=>NP(S)&&!!(S.flags&536870912))&&pC(nte(o),y.declarations,y.escapedName)}}function Jii(o){const _=Jr(o.parent,xG);if(!_)return;const y=h5e(_);if(!y)return;const S=m_(y[_.typeArguments.indexOf(o)]);return S&&io(S,cp(y,gge(_,y)))}function Gii(o){$_t(o)}function Kii(o){O(o.members,za),a(_);function _(){const y=Rpt(o);kge(y,y.symbol),f5e(o),t1t(o)}}function Xii(o){za(o.elementType)}function Qii(o){let _=!1,y=!1;for(const S of o.elements){let D=XRe(S);if(D&8){const L=Bs(S.type);if(!YS(L)){ft(S,k.A_rest_element_type_must_be_an_array_type);break}(ug(L)||Qa(L)&&L.target.combinedFlags&4)&&(D|=4)}if(D&4){if(y){sn(S,k.A_rest_element_cannot_follow_another_rest_element);break}y=!0}else if(D&2){if(y){sn(S,k.An_optional_element_cannot_follow_a_rest_element);break}_=!0}else if(D&1&&_){sn(S,k.A_required_element_cannot_follow_an_optional_element);break}}O(o.elements,za),Bs(o)}function Zii(o){O(o.types,za),Bs(o)}function a1t(o,_){if(!(o.flags&8388608))return o;const y=o.objectType,S=o.indexType,D=op(y)&&nee(y)===2?bpt(y,0):oy(y,0),L=!!pb(y,hi);if(up(S,B=>Da(B,D)||L&&zA(B,hi)))return _.kind===212&&fS(_)&&Or(y)&32&&tv(y)&1&&ft(_,k.Index_signature_in_type_0_only_permits_reading,Hn(y)),o;if(EN(y)){const B=ame(S,_);if(B){const K=RN(Kh(y),ne=>Ta(ne,B));if(K&&$m(K)&6)return ft(_,k.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter,Ws(B)),vt}}return ft(_,k.Type_0_cannot_be_used_to_index_type_1,Hn(S),Hn(y)),vt}function Yii(o){za(o.objectType),za(o.indexType),a1t(Npt(o),o)}function eni(o){tni(o),za(o.typeParameter),za(o.nameType),za(o.type),o.type||G2(o,Je);const _=c8e(o),y=KS(_);if(y)Nh(y,vi,o.nameType);else{const S=Tm(_);Nh(S,vi,R6(o.typeParameter))}}function tni(o){var _;if((_=o.members)!=null&&_.length)return sn(o.members[0],k.A_mapped_type_may_not_declare_properties_or_methods)}function ini(o){p8e(o)}function nni(o){Soi(o),za(o.type)}function rni(o){Uo(o,za)}function sni(o){Qi(o,y=>y.parent&&y.parent.kind===194&&y.parent.extendsType===y)||sn(o,k.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type),za(o.typeParameter);const _=xr(o.typeParameter);if(_.declarations&&_.declarations.length>1){const y=Ys(_);if(!y.typeParametersChecked){y.typeParametersChecked=!0;const S=jD(_),D=H2e(_,168);if(!A1t(D,[S],L=>[L])){const L=eo(_);for(const B of D)ft(B.name,k.All_declarations_of_0_must_have_identical_constraints,L)}}}ek(o)}function oni(o){for(const _ of o.templateSpans){za(_.type);const y=Bs(_.type);Nh(y,Wo,_.type)}Bs(o)}function ani(o){za(o.argument),o.attributes&&z3(o.attributes,sn),o1t(o)}function cni(o){o.dotDotDotToken&&o.questionToken&&sn(o,k.A_tuple_member_cannot_be_both_optional_and_rest),o.type.kind===190&&sn(o.type,k.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type),o.type.kind===191&&sn(o.type,k.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type),za(o.type),Bs(o)}function fte(o){return(xp(o,2)||Wh(o))&&!!(o.flags&33554432)}function sU(o,_){let y=Vge(o);if(o.parent.kind!==264&&o.parent.kind!==263&&o.parent.kind!==231&&o.flags&33554432){const S=FG(o);S&&S.flags&128&&!(y&128)&&!(H1(o.parent)&&rd(o.parent.parent)&&Ry(o.parent.parent))&&(y|=32),y|=128}return y&_}function yge(o){a(()=>lni(o))}function lni(o){function _(rn,Ui){return Ui!==void 0&&Ui.parent===rn[0].parent?Ui:rn[0]}function y(rn,Ui,fr,Gr,vs){if((Gr^vs)!==0){const ga=sU(_(rn,Ui),fr);qs(rn,fa=>_n(fa).fileName).forEach(fa=>{const Al=sU(_(fa,Ui),fr);for(const Po of fa){const fu=sU(Po,fr)^ga,Ef=sU(Po,fr)^Al;Ef&32?ft(No(Po),k.Overload_signatures_must_all_be_exported_or_non_exported):Ef&128?ft(No(Po),k.Overload_signatures_must_all_be_ambient_or_non_ambient):fu&6?ft(No(Po)||Po,k.Overload_signatures_must_all_be_public_private_or_protected):fu&64&&ft(No(Po),k.Overload_signatures_must_all_be_abstract_or_non_abstract)}})}}function S(rn,Ui,fr,Gr){if(fr!==Gr){const vs=_P(_(rn,Ui));O(rn,Ur=>{_P(Ur)!==vs&&ft(No(Ur),k.Overload_signatures_must_all_be_optional_or_required)})}}const D=230;let L=0,B=D,K=!1,ne=!0,ce=!1,ge,je,Be;const kt=o.declarations,Vt=(o.flags&16384)!==0;function Kt(rn){if(rn.name&&lu(rn.name))return;let Ui=!1;const fr=Uo(rn.parent,vs=>{if(Ui)return vs;Ui=vs===rn});if(fr&&fr.pos===rn.end&&fr.kind===rn.kind){const vs=fr.name||fr,Ur=fr.name;if(rn.name&&Ur&&(Vs(rn.name)&&Vs(Ur)&&rn.name.escapedText===Ur.escapedText||Ka(rn.name)&&Ka(Ur)&&yb(cy(rn.name),cy(Ur))||P1(rn.name)&&P1(Ur)&&V8(rn.name)===V8(Ur))){if((rn.kind===174||rn.kind===173)&&pa(rn)!==pa(fr)){const fa=pa(rn)?k.Function_overload_must_be_static:k.Function_overload_must_not_be_static;ft(vs,fa)}return}if(Dg(fr.body)){ft(vs,k.Function_implementation_name_must_be_0,al(rn.name));return}}const Gr=rn.name||rn;Vt?ft(Gr,k.Constructor_implementation_is_missing):Zr(rn,64)?ft(Gr,k.All_declarations_of_an_abstract_method_must_be_consecutive):ft(Gr,k.Function_implementation_is_missing_or_not_immediately_following_the_declaration)}let Oi=!1,Ki=!1,qn=!1;const Qn=[];if(kt)for(const rn of kt){const Ui=rn,fr=Ui.flags&33554432,Gr=Ui.parent&&(Ui.parent.kind===264||Ui.parent.kind===187)||fr;if(Gr&&(Be=void 0),(Ui.kind===263||Ui.kind===231)&&!fr&&(qn=!0),Ui.kind===262||Ui.kind===174||Ui.kind===173||Ui.kind===176){Qn.push(Ui);const vs=sU(Ui,D);L|=vs,B&=vs,K=K||_P(Ui),ne=ne&&_P(Ui);const Ur=Dg(Ui.body);Ur&&ge?Vt?Ki=!0:Oi=!0:(Be==null?void 0:Be.parent)===Ui.parent&&Be.end!==Ui.pos&&Kt(Be),Ur?ge||(ge=Ui):ce=!0,Be=Ui,Gr||(je=Ui)}nr(rn)&&Ho(rn)&&rn.jsDoc&&(ce=P(Uae(rn))>0)}if(Ki&&O(Qn,rn=>{ft(rn,k.Multiple_constructor_implementations_are_not_allowed)}),Oi&&O(Qn,rn=>{ft(No(rn)||rn,k.Duplicate_function_implementation)}),qn&&!Vt&&o.flags&16&&kt){const rn=$t(kt,Ui=>Ui.kind===263).map(Ui=>Kn(Ui,k.Consider_adding_a_declare_modifier_to_this_class));O(kt,Ui=>{const fr=Ui.kind===263?k.Class_declaration_cannot_implement_overload_list_for_0:Ui.kind===262?k.Function_with_bodies_can_only_merge_with_classes_that_are_ambient:void 0;fr&&da(ft(No(Ui)||Ui,fr,Eu(o)),...rn)})}if(je&&!je.body&&!Zr(je,64)&&!je.questionToken&&Kt(je),ce&&(kt&&(y(kt,ge,D,L,B),S(kt,ge,K,ne)),ge)){const rn=$D(o),Ui=Dm(ge);for(const fr of rn)if(!CQt(Ui,fr)){const Gr=fr.declaration&&tC(fr.declaration)?fr.declaration.parent.tagName:fr.declaration;da(ft(Gr,k.This_overload_signature_is_not_compatible_with_its_implementation_signature),Kn(ge,k.The_implementation_signature_is_declared_here));break}}}function oU(o){a(()=>uni(o))}function uni(o){let _=o.localSymbol;if(!_&&(_=xr(o),!_.exportSymbol)||ql(_,o.kind)!==o)return;let y=0,S=0,D=0;for(const ce of _.declarations){const ge=ne(ce),je=sU(ce,2080);je&32?je&2048?D|=ge:y|=ge:S|=ge}const L=y|S,B=y&S,K=D&L;if(B||K)for(const ce of _.declarations){const ge=ne(ce),je=No(ce);ge&K?ft(je,k.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead,al(je)):ge&B&&ft(je,k.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local,al(je))}function ne(ce){let ge=ce;switch(ge.kind){case 264:case 265:case 346:case 338:case 340:return 2;case 267:return Vh(ge)||nC(ge)!==0?5:4;case 263:case 266:case 306:return 3;case 307:return 7;case 277:case 226:const je=ge,Be=Il(je)?je.expression:je.right;if(!pl(Be))return 1;ge=Be;case 271:case 274:case 273:let kt=0;const Vt=$f(xr(ge));return O(Vt.declarations,Kt=>{kt|=ne(Kt)}),kt;case 260:case 208:case 262:case 276:case 80:return 1;case 173:case 171:return 2;default:return j.failBadSyntaxKind(ge)}}}function nF(o,_,y,...S){const D=aU(o,_);return D&&r4(D,_,y,...S)}function aU(o,_,y){if(Nc(o))return;const S=o;if(S.promisedTypeOfPromise)return S.promisedTypeOfPromise;if(iy(o,fee(!1)))return S.promisedTypeOfPromise=Pl(o)[0];if(nU(iv(o),402915324))return;const D=Yu(o,"then");if(Nc(D))return;const L=D?ia(D,0):w;if(L.length===0){_&&ft(_,k.A_promise_must_have_a_then_method);return}let B,K;for(const ge of L){const je=j2(ge);je&&je!==Ri&&!ay(o,je,ob)?B=je:K=fn(K,ge)}if(!K){j.assertIsDefined(B),y&&(y.value=B),_&&ft(_,k.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1,Hn(o),Hn(B));return}const ne=Qg(is(qt(K,Q7e)),2097152);if(Nc(ne))return;const ce=ia(ne,0);if(ce.length===0){_&&ft(_,k.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback);return}return S.promisedTypeOfPromise=is(qt(ce,Q7e),2)}function cU(o,_,y,S,...D){return(_?r4(o,y,S,...D):tw(o,y,S,...D))||vt}function c1t(o){if(nU(iv(o),402915324))return!1;const _=Yu(o,"then");return!!_&&ia(Qg(_,2097152),0).length>0}function vge(o){var _;if(o.flags&16777216){const y=KRe(!1);return!!y&&o.aliasSymbol===y&&((_=o.aliasTypeArguments)==null?void 0:_.length)===1}return!1}function rF(o){return o.flags&1048576?eu(o,rF):vge(o)?o.aliasTypeArguments[0]:o}function l1t(o){if(Nc(o)||vge(o))return!1;if(EN(o)){const _=Jf(o);if(_?_.flags&3||TC(_)||dg(_,c1t):Au(o,8650752))return!0}return!1}function dni(o){const _=KRe(!0);if(_)return VO(_,[rF(o)])}function fni(o){return l1t(o)?dni(o)??o:(j.assert(vge(o)||aU(o)===void 0,"type provided should not be a non-generic 'promise'-like."),o)}function r4(o,_,y,...S){const D=tw(o,_,y,...S);return D&&fni(D)}function tw(o,_,y,...S){if(Nc(o)||vge(o))return o;const D=o;if(D.awaitedTypeOfType)return D.awaitedTypeOfType;if(o.flags&1048576){if(Dx.lastIndexOf(o.id)>=0){_&&ft(_,k.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method);return}const K=_?ce=>tw(ce,_,y,...S):tw;Dx.push(o.id);const ne=eu(o,K);return Dx.pop(),D.awaitedTypeOfType=ne}if(l1t(o))return D.awaitedTypeOfType=o;const L={value:void 0},B=aU(o,void 0,L);if(B){if(o.id===B.id||Dx.lastIndexOf(B.id)>=0){_&&ft(_,k.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method);return}Dx.push(o.id);const K=tw(B,_,y,...S);return Dx.pop(),K?D.awaitedTypeOfType=K:void 0}if(c1t(o)){if(_){j.assertIsDefined(y);let K;L.value&&(K=jo(K,k.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1,Hn(o),Hn(L.value))),K=jo(K,y,...S),lc.add(Bv(_n(_),_,K))}return}return D.awaitedTypeOfType=o}function hni(o,_,y){const S=Bs(_);if(re>=2){if(fe(S))return;const L=fee(!0);if(L!==oo&&!iy(S,L)){D(k.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0,_,y,Hn(tw(S)||Ri));return}}else{if(t4(o,5),fe(S))return;const L=cV(_);if(L===void 0){D(k.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,_,y,Hn(S));return}const B=nu(L,111551,!0),K=B?Yn(B):vt;if(fe(K)){L.kind===80&&L.escapedText==="Promise"&&SN(S)===fee(!1)?ft(y,k.An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option):D(k.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,_,y,bp(L));return}const ne=IKt(!0);if(ne===Jo){D(k.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,_,y,bp(L));return}const ce=k.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value;if(!Nh(K,ne,y,ce,()=>_===y?void 0:jo(void 0,k.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type)))return;const je=L&&K_(L),Be=ff(o.locals,je.escapedText,111551);if(Be){ft(Be.valueDeclaration,k.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions,Fr(je),bp(L));return}}cU(S,!1,o,k.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);function D(L,B,K,ne){if(B===K)ft(K,L,ne);else{const ce=ft(K,k.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type);da(ce,Kn(B,L,ne))}}}function _ni(o){const _=_n(o);if(!tk(_)){let y=o.expression;if(c_(y))return!1;let S=!0,D;for(;;){if(Yb(y)||$P(y)){y=y.expression;continue}if(la(y)){S||(D=y),y.questionDotToken&&(D=y.questionDotToken),y=y.expression,S=!1;continue}if(Nr(y)){y.questionDotToken&&(D=y.questionDotToken),y=y.expression,S=!1;continue}ot(y)||(D=y);break}if(D)return da(ft(o.expression,k.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator),Kn(D,k.Invalid_syntax_in_decorator)),!0}return!1}function pni(o){_ni(o);const _=QO(o);uge(_,o);const y=Oc(_);if(y.flags&1)return;const S=e5e(o);if(!(S!=null&&S.resolvedReturnType))return;let D;const L=S.resolvedReturnType;switch(o.parent.kind){case 263:case 231:D=k.Decorator_function_return_type_0_is_not_assignable_to_type_1;break;case 172:if(!pe){D=k.Decorator_function_return_type_0_is_not_assignable_to_type_1;break}case 169:D=k.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any;break;case 174:case 177:case 178:D=k.Decorator_function_return_type_0_is_not_assignable_to_type_1;break;default:return j.failBadSyntaxKind(o.parent)}Nh(y,L,o.expression,D)}function lU(o,_,y,S,D,L=y.length,B=0){const K=G.createFunctionTypeNode(void 0,w,G.createKeywordTypeNode(133));return _b(K,o,_,y,S,D,L,B)}function p5e(o,_,y,S,D,L,B){const K=lU(o,_,y,S,D,L,B);return kN(K)}function u1t(o){return p5e(void 0,void 0,w,o)}function d1t(o){const _=p0("value",o);return p5e(void 0,void 0,[_],Ri)}function m5e(o){if(o)switch(o.kind){case 193:case 192:return f1t(o.types);case 194:return f1t([o.trueType,o.falseType]);case 196:case 202:return m5e(o.type);case 183:return o.typeName}}function f1t(o){let _;for(let y of o){for(;y.kind===196||y.kind===202;)y=y.type;if(y.kind===146||!we&&(y.kind===201&&y.literal.kind===106||y.kind===157))continue;const S=m5e(y);if(!S)return;if(_){if(!ot(_)||!ot(S)||_.escapedText!==S.escapedText)return}else _=S}return _}function bge(o){const _=dd(o);return Oy(o)?Aae(_):_}function hte(o){if(!uD(o)||!lm(o)||!o.modifiers||!lV(pe,o,o.parent,o.parent.parent))return;const _=Fe(o.modifiers,Fd);if(_){pe?(zd(_,8),o.kind===169&&zd(_,32)):re<99&&(zd(_,8),hd(o)?o.name?O1t(o)&&zd(_,4194304):zd(_,4194304):fd(o)||(Vs(o.name)&&(Nu(o)||Qw(o)||I_(o))&&zd(_,4194304),Ka(o.name)&&zd(_,8388608))),t4(o,8);for(const y of o.modifiers)Fd(y)&&pni(y)}}function mni(o){a(_);function _(){_1t(o),H5e(o),sF(o,o.name)}}function gni(o){o.typeExpression||ft(o.name,k.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags),o.name&&oF(o.name,k.Type_alias_name_cannot_be_0),za(o.typeExpression),vte(Jw(o))}function yni(o){za(o.constraint);for(const _ of o.typeParameters)za(_)}function vni(o){za(o.typeExpression)}function bni(o){za(o.typeExpression);const _=Gk(o);if(_){const y=uG(_,LX);if(P(y)>1)for(let S=1;S<P(y);S++){const D=y[S].tagName;ft(D,k._0_tag_already_specified,Fr(D))}}}function Cni(o){o.name&&Cte(o.name,!0)}function Sni(o){za(o.typeExpression)}function wni(o){za(o.typeExpression)}function xni(o){a(_),rU(o);function _(){!o.type&&!e3(o)&&G2(o,Je)}}function kni(o){const _=Gk(o);_&&xl(_)&&ft(o.tagName,k.An_arrow_function_cannot_have_a_this_parameter)}function Tni(o){N5e(o)}function Dni(o){const _=Gk(o);(!_||!hd(_)&&!fd(_))&&ft(_,k.JSDoc_0_is_not_attached_to_a_class,Fr(o.tagName))}function Eni(o){const _=Gk(o);if(!_||!hd(_)&&!fd(_)){ft(_,k.JSDoc_0_is_not_attached_to_a_class,Fr(o.tagName));return}const y=Wk(_).filter(KP);j.assert(y.length>0),y.length>1&&ft(y[1],k.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag);const S=h1t(o.class.expression),D=qT(_);if(D){const L=h1t(D.expression);L&&S.escapedText!==L.escapedText&&ft(S,k.JSDoc_0_1_does_not_match_the_extends_2_clause,Fr(o.tagName),Fr(S),Fr(L))}}function Ini(o){const _=zT(o);_&&Wh(_)&&ft(o,k.An_accessibility_modifier_cannot_be_used_with_a_private_identifier)}function h1t(o){switch(o.kind){case 80:return o;case 211:return o.name;default:return}}function _1t(o){var _;hte(o),rU(o);const y=nd(o);if(o.name&&o.name.kind===167&&cy(o.name),RO(o)){const L=xr(o),B=o.localSymbol||L,K=(_=B.declarations)==null?void 0:_.find(ne=>ne.kind===o.kind&&!(ne.flags&524288));o===K&&yge(B),L.parent&&yge(L)}const S=o.kind===173?void 0:o.body;if(za(S),i5e(o,BO(o)),a(D),nr(o)){const L=Fk(o);L&&L.typeExpression&&!v7e(Bs(L.typeExpression),o)&&ft(L.typeExpression.type,k.The_type_of_a_function_declaration_must_match_the_function_s_signature)}function D(){wp(o)||(lu(S)&&!fte(o)&&G2(o,Je),y&1&&Dg(S)&&Oc(Dm(o)))}}function ek(o){a(_);function _(){const y=_n(o);let S=X0.get(y.path);S||(S=[],X0.set(y.path,S)),S.push(o)}}function p1t(o,_){for(const y of o)switch(y.kind){case 263:case 231:Nni(y,_),g5e(y,_);break;case 307:case 267:case 241:case 269:case 248:case 249:case 250:y1t(y,_);break;case 176:case 218:case 262:case 219:case 174:case 177:case 178:y.body&&y1t(y,_),g5e(y,_);break;case 173:case 179:case 180:case 184:case 185:case 265:case 264:g5e(y,_);break;case 195:Lni(y,_);break;default:j.assertNever(y,"Node should not have been registered for unused identifiers check")}}function m1t(o,_,y){const S=No(o)||o,D=NP(o)?k._0_is_declared_but_never_used:k._0_is_declared_but_its_value_is_never_read;y(o,0,Kn(S,D,_))}function uU(o){return ot(o)&&Fr(o).charCodeAt(0)===95}function Nni(o,_){for(const y of o.members)switch(y.kind){case 174:case 172:case 177:case 178:if(y.kind===178&&y.symbol.flags&32768)break;const S=xr(y);!S.isReferenced&&(xp(y,2)||Bf(y)&&Vs(y.name))&&!(y.flags&33554432)&&_(y,0,Kn(y.name,k._0_is_declared_but_its_value_is_never_read,eo(S)));break;case 176:for(const D of y.parameters)!D.symbol.isReferenced&&Zr(D,2)&&_(D,0,Kn(D.name,k.Property_0_is_declared_but_its_value_is_never_read,Eu(D.symbol)));break;case 181:case 240:case 175:break;default:j.fail("Unexpected class member")}}function Lni(o,_){const{typeParameter:y}=o;y5e(y)&&_(o,1,Kn(o,k._0_is_declared_but_its_value_is_never_read,Fr(y.name)))}function g5e(o,_){const y=xr(o).declarations;if(!y||va(y)!==o)return;const S=Jw(o),D=new Set;for(const L of S){if(!y5e(L))continue;const B=Fr(L.name),{parent:K}=L;if(K.kind!==195&&K.typeParameters.every(y5e)){if(of(D,K)){const ne=_n(K),ce=Rg(K)?zce(K):Uce(ne,K.typeParameters),je=K.typeParameters.length===1?[k._0_is_declared_but_its_value_is_never_read,B]:[k.All_type_parameters_are_unused];_(L,1,Md(ne,ce.pos,ce.end-ce.pos,...je))}}else _(L,1,Kn(L,k._0_is_declared_but_its_value_is_never_read,B))}}function y5e(o){return!(wc(o.symbol).isReferenced&262144)&&!uU(o.name)}function _te(o,_,y,S){const D=String(S(_)),L=o.get(D);L?L[1].push(y):o.set(D,[_,[y]])}function g1t(o){return Jr(A1(o),$s)}function Pni(o){return ec(o)?dm(o.parent)?!!(o.propertyName&&uU(o.name)):uU(o.name):Vh(o)||(_s(o)&&fI(o.parent.parent)||v1t(o))&&uU(o.name)}function y1t(o,_){const y=new Map,S=new Map,D=new Map;o.locals.forEach(L=>{if(!(L.flags&262144?!(L.flags&3&&!(L.isReferenced&3)):L.isReferenced||L.exportSymbol)&&L.declarations){for(const B of L.declarations)if(!Pni(B))if(v1t(B))_te(y,Oni(B),B,Sc);else if(ec(B)&&dm(B.parent)){const K=va(B.parent.elements);(B===K||!va(B.parent.elements).dotDotDotToken)&&_te(S,B.parent,B,Sc)}else if(_s(B)){const K=oE(B)&7,ne=No(B);(K!==4&&K!==6||!ne||!uU(ne))&&_te(D,B.parent,B,Sc)}else{const K=L.valueDeclaration&&g1t(L.valueDeclaration),ne=L.valueDeclaration&&No(L.valueDeclaration);K&&ne?!vp(K,K.parent)&&!JT(K)&&!uU(ne)&&(ec(B)&&CS(B.parent)?_te(S,B.parent,B,Sc):_(K,1,Kn(ne,k._0_is_declared_but_its_value_is_never_read,Eu(L)))):m1t(B,Eu(L),_)}}}),y.forEach(([L,B])=>{const K=L.parent;if((L.name?1:0)+(L.namedBindings?L.namedBindings.kind===274?1:L.namedBindings.elements.length:0)===B.length)_(K,0,B.length===1?Kn(K,k._0_is_declared_but_its_value_is_never_read,Fr(ya(B).name)):Kn(K,k.All_imports_in_import_declaration_are_unused));else for(const ce of B)m1t(ce,Fr(ce.name),_)}),S.forEach(([L,B])=>{const K=g1t(L.parent)?1:0;if(L.elements.length===B.length)B.length===1&&L.parent.kind===260&&L.parent.parent.kind===261?_te(D,L.parent.parent,L.parent,Sc):_(L,K,B.length===1?Kn(L,k._0_is_declared_but_its_value_is_never_read,pte(ya(B).name)):Kn(L,k.All_destructured_elements_are_unused));else for(const ne of B)_(ne,K,Kn(ne,k._0_is_declared_but_its_value_is_never_read,pte(ne.name)))}),D.forEach(([L,B])=>{if(L.declarations.length===B.length)_(L,0,B.length===1?Kn(ya(B).name,k._0_is_declared_but_its_value_is_never_read,pte(ya(B).name)):Kn(L.parent.kind===243?L.parent:L,k.All_variables_are_unused));else for(const K of B)_(K,0,Kn(K,k._0_is_declared_but_its_value_is_never_read,pte(K.name)))})}function Ani(){var o;for(const _ of Tx)if(!((o=xr(_))!=null&&o.isReferenced)){const y=YL(_);j.assert(Qk(y),"Only parameter declaration should be checked here");const S=Kn(_.name,k._0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation,al(_.name),al(_.propertyName));y.type||da(S,Md(_n(y),y.end,0,k.We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here,al(_.propertyName))),lc.add(S)}}function pte(o){switch(o.kind){case 80:return Fr(o);case 207:case 206:return pte(ha(ya(o.elements),ec).name);default:return j.assertNever(o)}}function v1t(o){return o.kind===273||o.kind===276||o.kind===274}function Oni(o){return o.kind===273?o:o.kind===274?o.parent:o.parent.parent}function Cge(o){if(o.kind===241&&PC(o),iae(o)){const _=uC;O(o.statements,za),uC=_}else O(o.statements,za);o.locals&&ek(o)}function Mni(o){re>=2||!uae(o)||o.flags&33554432||lu(o.body)||O(o.parameters,_=>{_.name&&!ta(_.name)&&_.name.escapedText===ut.escapedName&&I2("noEmit",_,k.Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters)})}function dU(o,_,y){if((_==null?void 0:_.escapedText)!==y||o.kind===172||o.kind===171||o.kind===174||o.kind===173||o.kind===177||o.kind===178||o.kind===303||o.flags&33554432||(H0(o)||Wd(o)||l_(o))&&Kw(o))return!1;const S=A1(o);return!($s(S)&&lu(S.parent.body))}function Rni(o){Qi(o,_=>a4(_)&4?(o.kind!==80?ft(No(o),k.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference):ft(o,k.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference),!0):!1)}function Fni(o){Qi(o,_=>a4(_)&8?(o.kind!==80?ft(No(o),k.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference):ft(o,k.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference),!0):!1)}function Bni(o,_){if(t.getEmitModuleFormatOfFile(_n(o))>=5||!_||!dU(o,_,"require")&&!dU(o,_,"exports")||rd(o)&&nC(o)!==1)return;const y=bN(o);y.kind===307&&Cp(y)&&I2("noEmit",_,k.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module,al(_),al(_))}function Wni(o,_){if(!_||re>=4||!dU(o,_,"Promise")||rd(o)&&nC(o)!==1)return;const y=bN(o);y.kind===307&&Cp(y)&&y.flags&4096&&I2("noEmit",_,k.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions,al(_),al(_))}function Vni(o,_){re<=8&&(dU(o,_,"WeakMap")||dU(o,_,"WeakSet"))&&_0.push(o)}function Hni(o){const _=R0(o);a4(_)&1048576&&(j.assert(Bf(o)&&ot(o.name)&&typeof o.name.escapedText=="string","The target of a WeakMap/WeakSet collision check should be an identifier"),I2("noEmit",o,k.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel,o.name.escapedText))}function jni(o,_){_&&re>=2&&re<=8&&dU(o,_,"Reflect")&&MS.push(o)}function zni(o){let _=!1;if(fd(o)){for(const y of o.members)if(a4(y)&2097152){_=!0;break}}else if(ml(o))a4(o)&2097152&&(_=!0);else{const y=R0(o);y&&a4(y)&2097152&&(_=!0)}_&&(j.assert(Bf(o)&&ot(o.name),"The target of a Reflect collision check should be an identifier"),I2("noEmit",o,k.Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers,al(o.name),"Reflect"))}function sF(o,_){_&&(Bni(o,_),Wni(o,_),Vni(o,_),jni(o,_),ss(o)?(oF(_,k.Class_name_cannot_be_0),o.flags&33554432||vri(_)):sD(o)&&oF(_,k.Enum_name_cannot_be_0))}function Uni(o){if(oE(o)&7||Qk(o))return;const _=xr(o);if(_.flags&1){if(!ot(o.name))return j.fail();const y=_i(o,o.name.escapedText,3,void 0,!1);if(y&&y!==_&&y.flags&2&&k7e(y)&7){const S=Xk(y.valueDeclaration,261),D=S.parent.kind===243&&S.parent.parent?S.parent.parent:void 0;if(!(D&&(D.kind===241&&Ho(D.parent)||D.kind===268||D.kind===267||D.kind===307))){const B=eo(y);ft(o,k.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1,B,B)}}}}function fU(o){return o===Rt?Je:o===Pc?Yc:o}function mte(o){var _;if(hte(o),ec(o)||za(o.type),!o.name)return;if(o.name.kind===167&&(cy(o.name),hI(o)&&o.initializer&&ju(o.initializer)),ec(o)){if(o.propertyName&&ot(o.name)&&Qk(o)&&lu(Up(o).body)){Tx.push(o);return}dm(o.parent)&&o.dotDotDotToken&&re<5&&zd(o,4),o.propertyName&&o.propertyName.kind===167&&cy(o.propertyName);const D=o.parent.parent,L=o.dotDotDotToken?32:0,B=Ke(D,L),K=o.propertyName||o.name;if(B&&!ta(K)){const ne=xC(K);if(Jm(ne)){const ce=Gm(ne),ge=Ta(B,ce);ge&&(Zee(ge,void 0,!1),D7e(o,!!D.initializer&&D.initializer.kind===108,!1,B,ge))}}}if(ta(o.name)&&(o.name.kind===207&&re<2&&Q.downlevelIteration&&zd(o,512),O(o.name.elements,za)),o.initializer&&Qk(o)&&lu(Up(o).body)){ft(o,k.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation);return}if(ta(o.name)){if(Q8e(o))return;const D=hI(o)&&o.initializer&&o.parent.parent.kind!==249,L=!Ft(o.name.elements,zJ(Bd));if(D||L){const B=lr(o);if(D){const K=ju(o.initializer);we&&L?Hgt(K,o):Xx(K,lr(o),o,o.initializer)}L&&(CS(o.name)?iw(65,B,tt,o):we&&Hgt(B,o))}return}const y=xr(o);if(y.flags&2097152&&(HT(o)||DTe(o))){Ege(o);return}o.name.kind===10&&ft(o.name,k.A_bigint_literal_cannot_be_used_as_a_property_name);const S=fU(Yn(y));if(o===y.valueDeclaration){const D=hI(o)&&pV(o);if(D&&!(nr(o)&&Aa(D)&&(D.properties.length===0||rx(o.name))&&!!((_=y.exports)!=null&&_.size))&&o.parent.parent.kind!==249){const B=ju(D);Xx(B,S,o,D,void 0);const K=oE(o)&7;if(K===6){const ne=VKt(!0),ce=npt(!0);if(ne!==Jo&&ce!==Jo){const ge=is([ne,ce,Qt,tt]);Nh(ag(B,o),ge,D,k.The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined)}}else if(K===4){const ne=npt(!0);if(ne!==Jo){const ce=is([ne,Qt,tt]);Nh(ag(B,o),ce,D,k.The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined)}}}y.declarations&&y.declarations.length>1&&Ft(y.declarations,L=>L!==o&&uP(L)&&!C1t(L,o))&&ft(o.name,k.All_declarations_of_0_must_have_identical_modifiers,al(o.name))}else{const D=fU(lr(o));!fe(S)&&!fe(D)&&!yb(S,D)&&!(y.flags&67108864)&&b1t(y.valueDeclaration,S,o,D),hI(o)&&o.initializer&&Xx(ju(o.initializer),D,o,o.initializer,void 0),y.valueDeclaration&&!C1t(o,y.valueDeclaration)&&ft(o.name,k.All_declarations_of_0_must_have_identical_modifiers,al(o.name))}o.kind!==172&&o.kind!==171&&(oU(o),(o.kind===260||o.kind===208)&&Uni(o),sF(o,o.name))}function b1t(o,_,y,S){const D=No(y),L=y.kind===172||y.kind===171?k.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:k.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2,B=al(D),K=ft(D,L,B,Hn(_),Hn(S));o&&da(K,Kn(o,k._0_was_also_declared_here,B))}function C1t(o,_){if(o.kind===169&&_.kind===260||o.kind===260&&_.kind===169)return!0;if(_P(o)!==_P(_))return!1;const y=1358;return bP(o,y)===bP(_,y)}function qni(o){var _,y;(_=Zn)==null||_.push(Zn.Phase.Check,"checkVariableDeclaration",{kind:o.kind,pos:o.pos,end:o.end,path:o.tracingPath}),Doi(o),mte(o),(y=Zn)==null||y.pop()}function $ni(o){return xoi(o),mte(o)}function Sge(o){const _=zb(o)&7;(_===4||_===6)&&re<99&&zd(o,16777216),O(o.declarations,za)}function Jni(o){!bb(o)&&!U5e(o.declarationList)&&Eoi(o),Sge(o.declarationList)}function Gni(o){PC(o),uo(o.expression)}function Kni(o){PC(o);const _=hU(o.expression);v5e(o.expression,_,o.thenStatement),za(o.thenStatement),o.thenStatement.kind===242&&ft(o.thenStatement,k.The_body_of_an_if_statement_cannot_be_the_empty_statement),za(o.elseStatement)}function v5e(o,_,y){if(!we)return;S(o,y);function S(L,B){for(L=Dc(L),D(L,B);ur(L)&&(L.operatorToken.kind===57||L.operatorToken.kind===61);)L=Dc(L.left),D(L,B)}function D(L,B){const K=WV(L)?Dc(L.right):L;if(Wv(K))return;if(WV(K)){S(K,B);return}const ne=K===L?_:uo(K);if(ne.flags&1024&&Nr(K)&&(yr(K.expression).resolvedSymbol??pt).flags&384){ft(K,k.This_condition_will_always_return_0,ne.value?"true":"false");return}const ce=Nr(K)&&U0t(K.expression);if(!l1(ne,4194304)||ce)return;const ge=ia(ne,0),je=!!nF(ne);if(ge.length===0&&!je)return;const Be=ot(K)?K:Nr(K)?K.name:void 0,kt=Be&&Zg(Be);if(!kt&&!je)return;kt&&ur(L.parent)&&Qni(L.parent,kt)||kt&&B&&Xni(L,B,Be,kt)||(je?N2(K,!0,k.This_condition_will_always_return_true_since_this_0_is_always_defined,EO(ne)):ft(K,k.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead))}}function Xni(o,_,y,S){return!!Uo(_,function D(L){if(ot(L)){const B=Zg(L);if(B&&B===S){if(ot(o)||ot(y)&&ur(y.parent))return!0;let K=y.parent,ne=L.parent;for(;K&&ne;){if(ot(K)&&ot(ne)||K.kind===110&&ne.kind===110)return Zg(K)===Zg(ne);if(Nr(K)&&Nr(ne)){if(Zg(K.name)!==Zg(ne.name))return!1;ne=ne.expression,K=K.expression}else if(la(K)&&la(ne))ne=ne.expression,K=K.expression;else return!1}}}return Uo(L,D)})}function Qni(o,_){for(;ur(o)&&o.operatorToken.kind===56;){if(Uo(o.right,function S(D){if(ot(D)){const L=Zg(D);if(L&&L===_)return!0}return Uo(D,S)}))return!0;o=o.parent}return!1}function Zni(o){PC(o),za(o.statement),hU(o.expression)}function Yni(o){PC(o),hU(o.expression),za(o.statement)}function b5e(o,_){if(o.flags&16384)ft(_,k.An_expression_of_type_void_cannot_be_tested_for_truthiness);else{const y=C5e(_);y!==3&&ft(_,y===1?k.This_kind_of_expression_is_always_truthy:k.This_kind_of_expression_is_always_falsy)}return o}function C5e(o){switch(o=Vu(o),o.kind){case 9:return o.text==="0"||o.text==="1"?3:1;case 209:case 219:case 10:case 231:case 218:case 284:case 285:case 210:case 14:return 1;case 222:case 106:return 2;case 15:case 11:return o.text?1:2;case 227:return C5e(o.whenTrue)|C5e(o.whenFalse);case 80:return Lh(o)===et?2:3}return 3}function hU(o,_){return b5e(uo(o,_),o)}function eri(o){PC(o)||o.initializer&&o.initializer.kind===261&&U5e(o.initializer),o.initializer&&(o.initializer.kind===261?Sge(o.initializer):uo(o.initializer)),o.condition&&hU(o.condition),o.incrementor&&uo(o.incrementor),za(o.statement),o.locals&&ek(o)}function tri(o){yyt(o);const _=qG(o);if(o.awaitModifier?_&&gu(_)?sn(o.awaitModifier,k.for_await_loops_cannot_be_used_inside_a_class_static_block):(nd(_)&6)===2&&re<5&&zd(o,16384):Q.downlevelIteration&&re<2&&zd(o,256),o.initializer.kind===261)Sge(o.initializer);else{const y=o.initializer,S=gte(o);if(y.kind===209||y.kind===210)HN(y,S||vt);else{const D=uo(y);iU(y,k.The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access,k.The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access),S&&Xx(S,D,y,o.expression)}}za(o.statement),o.locals&&ek(o)}function iri(o){yyt(o);const _=E7e(uo(o.expression));if(o.initializer.kind===261){const y=o.initializer.declarations[0];y&&ta(y.name)&&ft(y.name,k.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern),Sge(o.initializer)}else{const y=o.initializer,S=uo(y);y.kind===209||y.kind===210?ft(y,k.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern):Da(DXt(_),S)?iU(y,k.The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access,k.The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access):ft(y,k.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any)}(_===Ai||!Gf(_,126091264))&&ft(o.expression,k.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0,Hn(_)),za(o.statement),o.locals&&ek(o)}function gte(o){const _=o.awaitModifier?15:13;return iw(_,KO(o.expression),tt,o.expression)}function iw(o,_,y,S){return Nc(_)?_:S5e(o,_,y,S,!0)||Je}function S5e(o,_,y,S,D){const L=(o&2)!==0;if(_===Ai){S&&k5e(S,_,L);return}const B=re>=2,K=!B&&Q.downlevelIteration,ne=Q.noUncheckedIndexedAccess&&!!(o&128);if(B||K||L){const kt=xge(_,o,B?S:void 0);if(D&&kt){const Vt=o&8?k.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0:o&32?k.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0:o&64?k.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0:o&16?k.Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0:void 0;Vt&&Nh(y,kt.nextType,S,Vt)}if(kt||B)return ne?Jz(kt&&kt.yieldType):kt&&kt.yieldType}let ce=_,ge=!1;if(o&4){if(ce.flags&1048576){const kt=_.types,Vt=$t(kt,Kt=>!(Kt.flags&402653316));Vt!==kt&&(ce=is(Vt,2))}else ce.flags&402653316&&(ce=Ai);if(ge=ce!==_,ge&&ce.flags&131072)return ne?Jz(st):st}if(!YS(ce)){if(S){const kt=!!(o&4)&&!ge,[Vt,Kt]=Be(kt,K);N2(S,Kt&&!!nF(ce),Vt,Hn(ce))}return ge?ne?Jz(st):st:void 0}const je=H2(ce,hi);if(ge&&je)return je.flags&402653316&&!Q.noUncheckedIndexedAccess?st:is(ne?[je,st,tt]:[je,st],2);return o&128?Jz(je):je;function Be(kt,Vt){var Kt;return Vt?kt?[k.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator,!0]:[k.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator,!0]:w5e(o,0,_,void 0)?[k.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher,!1]:nri((Kt=_.symbol)==null?void 0:Kt.escapedName)?[k.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher,!0]:kt?[k.Type_0_is_not_an_array_type_or_a_string_type,!0]:[k.Type_0_is_not_an_array_type,!0]}}function nri(o){switch(o){case"Float32Array":case"Float64Array":case"Int16Array":case"Int32Array":case"Int8Array":case"NodeList":case"Uint16Array":case"Uint32Array":case"Uint8Array":case"Uint8ClampedArray":return!0}return!1}function w5e(o,_,y,S){if(Nc(y))return;const D=xge(y,o,S);return D&&D[net(_)]}function Q2(o=Ai,_=Ai,y=te){if(o.flags&67359327&&_.flags&180227&&y.flags&180227){const S=Xg([o,_,y]);let D=Mr.get(S);return D||(D={yieldType:o,returnType:_,nextType:y},Mr.set(S,D)),D}return{yieldType:o,returnType:_,nextType:y}}function S1t(o){let _,y,S;for(const D of o)if(!(D===void 0||D===ds)){if(D===Ks)return Ks;_=fn(_,D.yieldType),y=fn(y,D.returnType),S=fn(S,D.nextType)}return _||y||S?Q2(_&&is(_),y&&is(y),S&&Wa(S)):ds}function wge(o,_){return o[_]}function vb(o,_,y){return o[_]=y}function xge(o,_,y){var S,D;if(Nc(o))return Ks;if(!(o.flags&1048576)){const ce=y?{errors:void 0}:void 0,ge=w1t(o,_,y,ce);if(ge===ds){if(y){const je=k5e(y,o,!!(_&2));ce!=null&&ce.errors&&da(je,...ce.errors)}return}else if((S=ce==null?void 0:ce.errors)!=null&&S.length)for(const je of ce.errors)lc.add(je);return ge}const L=_&2?"iterationTypesOfAsyncIterable":"iterationTypesOfIterable",B=wge(o,L);if(B)return B===ds?void 0:B;let K;for(const ce of o.types){const ge=y?{errors:void 0}:void 0,je=w1t(ce,_,y,ge);if(je===ds){if(y){const Be=k5e(y,o,!!(_&2));ge!=null&&ge.errors&&da(Be,...ge.errors)}vb(o,L,ds);return}else if((D=ge==null?void 0:ge.errors)!=null&&D.length)for(const Be of ge.errors)lc.add(Be);K=fn(K,je)}const ne=K?S1t(K):ds;return vb(o,L,ne),ne===ds?void 0:ne}function x5e(o,_){if(o===ds)return ds;if(o===Ks)return Ks;const{yieldType:y,returnType:S,nextType:D}=o;return _&&KRe(!0),Q2(r4(y,_)||Je,r4(S,_)||Je,D)}function w1t(o,_,y,S){if(Nc(o))return Ks;let D=!1;if(_&2){const L=x1t(o,Ic)||k1t(o,Ic);if(L)if(L===ds&&y)D=!0;else return _&8?x5e(L,y):L}if(_&1){let L=x1t(o,Gl)||k1t(o,Gl);if(L)if(L===ds&&y)D=!0;else if(_&2){if(L!==ds)return L=x5e(L,y),D?L:vb(o,"iterationTypesOfAsyncIterable",L)}else return L}if(_&2){const L=D1t(o,Ic,y,S,D);if(L!==ds)return L}if(_&1){let L=D1t(o,Gl,y,S,D);if(L!==ds)return _&2?(L=x5e(L,y),D?L:vb(o,"iterationTypesOfAsyncIterable",L)):L}return ds}function x1t(o,_){return wge(o,_.iterableCacheKey)}function k1t(o,_){if(iy(o,_.getGlobalIterableType(!1))||iy(o,_.getGlobalIteratorObjectType(!1))||iy(o,_.getGlobalIterableIteratorType(!1))||iy(o,_.getGlobalGeneratorType(!1))){const[y,S,D]=Pl(o);return vb(o,_.iterableCacheKey,Q2(_.resolveIterationType(y,void 0)||y,_.resolveIterationType(S,void 0)||S,D))}if($pe(o,_.getGlobalBuiltinIteratorTypes())){const[y]=Pl(o),S=GRe(),D=te;return vb(o,_.iterableCacheKey,Q2(_.resolveIterationType(y,void 0)||y,_.resolveIterationType(S,void 0)||S,D))}}function T1t(o){const _=Z_t(!1),y=_&&Yu(Yn(_),cu(o));return y&&Jm(y)?Gm(y):`__@${o}`}function D1t(o,_,y,S,D){const L=Ta(o,T1t(_.iteratorSymbolName)),B=L&&!(L.flags&16777216)?Yn(L):void 0;if(Nc(B))return D?Ks:vb(o,_.iterableCacheKey,Ks);const K=B?ia(B,0):void 0;if(!Ft(K))return D?ds:vb(o,_.iterableCacheKey,ds);const ne=Wa(qt(K,Oc)),ce=E1t(ne,_,y,S,D)??ds;return D?ce:vb(o,_.iterableCacheKey,ce)}function k5e(o,_,y){const S=y?k.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:k.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator,D=!!nF(_)||!y&&_H(o.parent)&&o.parent.expression===o&&hee(!1)!==oo&&Da(_,q5(hee(!1),[Je,Je,Je]));return N2(o,D,S,Hn(_))}function rri(o,_,y,S){return E1t(o,_,y,S,!1)}function E1t(o,_,y,S,D){if(Nc(o))return Ks;let L=sri(o,_)||ori(o,_);return L===ds&&y&&(L=void 0,D=!0),L??(L=uri(o,_,y,S,D)),L===ds?void 0:L}function sri(o,_){return wge(o,_.iteratorCacheKey)}function ori(o,_){if(iy(o,_.getGlobalIterableIteratorType(!1))||iy(o,_.getGlobalIteratorType(!1))||iy(o,_.getGlobalIteratorObjectType(!1))||iy(o,_.getGlobalGeneratorType(!1))){const[y,S,D]=Pl(o);return vb(o,_.iteratorCacheKey,Q2(y,S,D))}if($pe(o,_.getGlobalBuiltinIteratorTypes())){const[y]=Pl(o),S=GRe(),D=te;return vb(o,_.iteratorCacheKey,Q2(y,S,D))}}function I1t(o,_){const y=Yu(o,"done")||ln;return Da(_===0?ln:Pt,y)}function ari(o){return I1t(o,0)}function cri(o){return I1t(o,1)}function lri(o){if(Nc(o))return Ks;const _=wge(o,"iterationTypesOfIteratorResult");if(_)return _;if(iy(o,BKt(!1))){const B=Pl(o)[0];return vb(o,"iterationTypesOfIteratorResult",Q2(B,void 0,void 0))}if(iy(o,WKt(!1))){const B=Pl(o)[0];return vb(o,"iterationTypesOfIteratorResult",Q2(void 0,B,void 0))}const y=ad(o,ari),S=y!==Ai?Yu(y,"value"):void 0,D=ad(o,cri),L=D!==Ai?Yu(D,"value"):void 0;return!S&&!L?vb(o,"iterationTypesOfIteratorResult",ds):vb(o,"iterationTypesOfIteratorResult",Q2(S,L||Ri,void 0))}function T5e(o,_,y,S,D){var L,B,K,ne;const ce=Ta(o,y);if(!ce&&y!=="next")return;const ge=ce&&!(y==="next"&&ce.flags&16777216)?y==="next"?Yn(ce):Qg(Yn(ce),2097152):void 0;if(Nc(ge))return Ks;const je=ge?ia(ge,0):w;if(je.length===0){if(S){const rn=y==="next"?_.mustHaveANextMethodDiagnostic:_.mustBeAMethodDiagnostic;D?(D.errors??(D.errors=[]),D.errors.push(Kn(S,rn,y))):ft(S,rn,y)}return y==="next"?ds:void 0}if(ge!=null&&ge.symbol&&je.length===1){const rn=_.getGlobalGeneratorType(!1),Ui=_.getGlobalIteratorType(!1),fr=((B=(L=rn.symbol)==null?void 0:L.members)==null?void 0:B.get(y))===ge.symbol,Gr=!fr&&((ne=(K=Ui.symbol)==null?void 0:K.members)==null?void 0:ne.get(y))===ge.symbol;if(fr||Gr){const vs=fr?rn:Ui,{mapper:Ur}=ge;return Q2(ZS(vs.typeParameters[0],Ur),ZS(vs.typeParameters[1],Ur),y==="next"?ZS(vs.typeParameters[2],Ur):void 0)}}let Be,kt;for(const rn of je)y!=="throw"&&Ft(rn.parameters)&&(Be=fn(Be,u1(rn,0))),kt=fn(kt,Oc(rn));let Vt,Kt;if(y!=="throw"){const rn=Be?is(Be):te;if(y==="next")Kt=rn;else if(y==="return"){const Ui=_.resolveIterationType(rn,S)||Je;Vt=fn(Vt,Ui)}}let Oi;const Ki=kt?Wa(kt):Ai,qn=_.resolveIterationType(Ki,S)||Je,Qn=lri(qn);return Qn===ds?(S&&(D?(D.errors??(D.errors=[]),D.errors.push(Kn(S,_.mustHaveAValueDiagnostic,y))):ft(S,_.mustHaveAValueDiagnostic,y)),Oi=Je,Vt=fn(Vt,Je)):(Oi=Qn.yieldType,Vt=fn(Vt,Qn.returnType)),Q2(Oi,is(Vt),Kt)}function uri(o,_,y,S,D){const L=S1t([T5e(o,_,"next",y,S),T5e(o,_,"return",y,S),T5e(o,_,"throw",y,S)]);return D?L:vb(o,_.iteratorCacheKey,L)}function rE(o,_,y){if(Nc(_))return;const S=D5e(_,y);return S&&S[net(o)]}function D5e(o,_){if(Nc(o))return Ks;const y=_?2:1,S=_?Ic:Gl;return xge(o,y,void 0)||rri(o,S,void 0,void 0)}function dri(o){PC(o)||woi(o)}function yte(o,_){const y=!!(_&1),S=!!(_&2);if(y){const D=rE(1,o,S);return D?S?tw(rF(D)):D:vt}return S?tw(o)||vt:o}function N1t(o,_){const y=yte(_,nd(o));return!!(y&&(Au(y,16384)||y.flags&32769))}function fri(o){if(PC(o))return;const _=qG(o);if(_&&gu(_)){Df(o,k.A_return_statement_cannot_be_used_inside_a_class_static_block);return}if(!_){Df(o,k.A_return_statement_can_only_be_used_within_a_function_body);return}const y=Dm(_),S=Oc(y),D=nd(_);if(we||o.expression||S.flags&131072){const L=o.expression?ju(o.expression):tt;if(_.kind===178)o.expression&&ft(o,k.Setters_cannot_return_a_value);else if(_.kind===176)o.expression&&!Xx(L,S,o,o.expression)&&ft(o,k.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);else if(BO(_)){const B=yte(S,D)??S,K=D&2?cU(L,!1,o,k.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member):L;B&&Xx(K,B,o,o.expression)}}else _.kind!==176&&Q.noImplicitReturns&&!N1t(_,S)&&ft(o,k.Not_all_code_paths_return_a_value)}function hri(o){PC(o)||o.flags&65536&&Df(o,k.with_statements_are_not_allowed_in_an_async_function_block),uo(o.expression);const _=_n(o);if(!tk(_)){const y=E1(_,o.pos).start,S=o.statement.pos;sE(_,y,S-y,k.The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any)}}function _ri(o){PC(o);let _,y=!1;const S=uo(o.expression);O(o.caseBlock.clauses,D=>{D.kind===297&&!y&&(_===void 0?_=D:(sn(D,k.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement),y=!0)),D.kind===296&&a(L(D)),O(D.statements,za),Q.noFallthroughCasesInSwitch&&D.fallthroughFlowNode&&Wee(D.fallthroughFlowNode)&&ft(D,k.Fallthrough_case_in_switch);function L(B){return()=>{const K=uo(B.expression);o5e(S,K)||Qpt(K,S,B.expression,void 0)}}}),o.caseBlock.locals&&ek(o.caseBlock)}function pri(o){PC(o)||Qi(o.parent,_=>Ho(_)?"quit":_.kind===256&&_.label.escapedText===o.label.escapedText?(sn(o.label,k.Duplicate_label_0,uu(o.label)),!0):!1),za(o.statement)}function mri(o){PC(o)||ot(o.expression)&&!o.expression.escapedText&&Foi(o,k.Line_break_not_permitted_here),o.expression&&uo(o.expression)}function gri(o){PC(o),Cge(o.tryBlock);const _=o.catchClause;if(_){if(_.variableDeclaration){const y=_.variableDeclaration;mte(y);const S=dd(y);if(S){const D=Bs(S);D&&!(D.flags&3)&&Df(S,k.Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified)}else if(y.initializer)Df(y.initializer,k.Catch_clause_variable_cannot_have_an_initializer);else{const D=_.block.locals;D&&qb(_.locals,L=>{const B=D.get(L);B!=null&&B.valueDeclaration&&B.flags&2&&sn(B.valueDeclaration,k.Cannot_redeclare_identifier_0_in_catch_clause,Ws(L))})}}Cge(_.block)}o.finallyBlock&&Cge(o.finallyBlock)}function kge(o,_,y){const S=Ih(o);if(S.length===0)return;for(const L of XS(o))y&&L.flags&4194304||L1t(o,L,$A(L,8576,!0),Ux(L));const D=_.valueDeclaration;if(D&&ss(D)){for(const L of D.members)if(!pa(L)&&!RO(L)){const B=xr(L);L1t(o,B,Kf(L.name.expression),Ux(B))}}if(S.length>1)for(const L of S)yri(o,L)}function L1t(o,_,y,S){const D=_.valueDeclaration,L=No(D);if(L&&Vs(L))return;const B=PRe(o,y),K=Or(o)&2?ql(o.symbol,264):void 0,ne=D&&D.kind===226||L&&L.kind===167?D:void 0,ce=Qp(_)===o.symbol?D:void 0;for(const ge of B){const je=ge.declaration&&Qp(xr(ge.declaration))===o.symbol?ge.declaration:void 0,Be=ce||je||(K&&!Ft(Ll(o),kt=>!!UD(kt,_.escapedName)&&!!H2(kt,ge.keyType))?K:void 0);if(Be&&!Da(S,ge.type)){const kt=Q1(Be,k.Property_0_of_type_1_is_not_assignable_to_2_index_type_3,eo(_),Hn(S),Hn(ge.keyType),Hn(ge.type));ne&&Be!==ne&&da(kt,Kn(ne,k._0_is_declared_here,eo(_))),lc.add(kt)}}}function yri(o,_){const y=_.declaration,S=PRe(o,_.keyType),D=Or(o)&2?ql(o.symbol,264):void 0,L=y&&Qp(xr(y))===o.symbol?y:void 0;for(const B of S){if(B===_)continue;const K=B.declaration&&Qp(xr(B.declaration))===o.symbol?B.declaration:void 0,ne=L||K||(D&&!Ft(Ll(o),ce=>!!pb(ce,_.keyType)&&!!H2(ce,B.keyType))?D:void 0);ne&&!Da(_.type,B.type)&&ft(ne,k._0_index_type_1_is_not_assignable_to_2_index_type_3,Hn(_.keyType),Hn(_.type),Hn(B.keyType),Hn(B.type))}}function oF(o,_){switch(o.escapedText){case"any":case"unknown":case"never":case"number":case"bigint":case"boolean":case"string":case"symbol":case"void":case"object":case"undefined":ft(o,_,o.escapedText)}}function vri(o){re>=1&&o.escapedText==="Object"&&t.getEmitModuleFormatOfFile(_n(o))<5&&ft(o,k.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0,bW[oe])}function bri(o){const _=$t(Wk(o),Qm);if(!P(_))return;const y=nr(o),S=new Set,D=new Set;if(O(o.parameters,({name:B},K)=>{ot(B)&&S.add(B.escapedText),ta(B)&&D.add(K)}),MRe(o)){const B=_.length-1,K=_[B];y&&K&&ot(K.name)&&K.typeExpression&&K.typeExpression.type&&!S.has(K.name.escapedText)&&!D.has(B)&&!ug(Bs(K.typeExpression.type))&&ft(K.name,k.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type,Fr(K.name))}else O(_,({name:B,isNameFirst:K},ne)=>{D.has(ne)||ot(B)&&S.has(B.escapedText)||(o_(B)?y&&ft(B,k.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1,bp(B),bp(B.left)):K||Z1(y,B,k.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name,Fr(B)))})}function vte(o){let _=!1;if(o)for(let S=0;S<o.length;S++){const D=o[S];Z0t(D),a(y(D,S))}function y(S,D){return()=>{S.default?(_=!0,Cri(S.default,o,D)):_&&ft(S,k.Required_type_parameters_may_not_follow_optional_type_parameters);for(let L=0;L<D;L++)o[L].symbol===S.symbol&&ft(S.name,k.Duplicate_identifier_0,al(S.name))}}}function Cri(o,_,y){S(o);function S(D){if(D.kind===183){const L=uee(D);if(L.flags&262144)for(let B=y;B<_.length;B++)L.symbol===xr(_[B])&&ft(D,k.Type_parameter_defaults_can_only_reference_previously_declared_type_parameters)}Uo(D,S)}}function P1t(o){if(o.declarations&&o.declarations.length===1)return;const _=Ys(o);if(!_.typeParametersChecked){_.typeParametersChecked=!0;const y=Iri(o);if(!y||y.length<=1)return;const S=gl(o);if(!A1t(y,S.localTypeParameters,Jw)){const D=eo(o);for(const L of y)ft(L.name,k.All_declarations_of_0_must_have_identical_type_parameters,D)}}}function A1t(o,_,y){const S=P(_),D=sy(_);for(const L of o){const B=y(L),K=B.length;if(K<D||K>S)return!1;for(let ne=0;ne<K;ne++){const ce=B[ne],ge=_[ne];if(ce.name.escapedText!==ge.symbol.escapedName)return!1;const je=R6(ce),Be=je&&Bs(je),kt=m_(ge);if(Be&&kt&&!yb(Be,kt))return!1;const Vt=ce.default&&Bs(ce.default),Kt=qD(ge);if(Vt&&Kt&&!yb(Vt,Kt))return!1}}return!0}function O1t(o){const _=!pe&&re<99&&dS(!1,o),y=re<9||re<99,S=!ue;if(_||y)for(const D of o.members){if(_&&Mae(!1,D,o))return Ra($w(o))??o;if(y){if(gu(D))return D;if(pa(D)&&(Wh(D)||S&&HH(D)))return D}}}function Sri(o){if(o.name)return;const _=sIe(o);if(!Zae(_))return;const y=!pe&&re<99;let S;y&&dS(!1,o)?S=Ra($w(o))??o:S=O1t(o),S&&(zd(S,4194304),(_d(_)||Lo(_)||ec(_))&&Ka(_.name)&&zd(S,8388608))}function wri(o){return M1t(o),s4(o),Sri(o),Yn(xr(o))}function xri(o){O(o.members,za),ek(o)}function kri(o){const _=Fe(o.modifiers,Fd);pe&&_&&Ft(o.members,y=>bd(y)&&Wh(y))&&sn(_,k.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator),!o.name&&!Zr(o,2048)&&Df(o,k.A_class_declaration_without_the_default_modifier_must_have_a_name),M1t(o),O(o.members,za),ek(o)}function M1t(o){coi(o),hte(o),sF(o,o.name),vte(Jw(o)),oU(o);const _=xr(o),y=gl(_),S=Wp(y),D=Yn(_);P1t(_),yge(_),Fii(o),!!(o.flags&33554432)||Bii(o);const B=L1(o);if(B){O(B.typeArguments,za),re<2&&zd(B.parent,1);const ce=qT(o);ce&&ce!==B&&uo(ce.expression);const ge=Ll(y);ge.length&&a(()=>{const je=ge[0],Be=ys(y),kt=Kh(Be);if(Dri(kt,B),za(B.expression),Ft(B.typeArguments)){O(B.typeArguments,za);for(const Kt of Vr(kt,B.typeArguments,B))if(!s1t(B,Kt.typeParameters))break}const Vt=Wp(je,y.thisType);if(Nh(S,Vt,void 0)?Nh(D,qpt(kt),o.name||o,k.Class_static_side_0_incorrectly_extends_base_class_static_side_1):B1t(o,S,Vt,k.Class_0_incorrectly_extends_base_class_1),Be.flags&8650752&&(V2(D)?ia(Be,1).some(Oi=>Oi.flags&4)&&!Zr(o,64)&&ft(o.name||o,k.A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract):ft(o.name||o,k.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any)),!(kt.symbol&&kt.symbol.flags&32)&&!(Be.flags&8650752)){const Kt=Ds(kt,B.typeArguments,B);O(Kt,Oi=>!dy(Oi.declaration)&&!yb(Oc(Oi),je))&&ft(B.expression,k.Base_constructors_must_all_have_the_same_return_type)}Nri(y,je)})}Tri(o,y,S,D);const K=i3(o);if(K)for(const ce of K)(!pl(ce.expression)||gh(ce.expression))&&ft(ce.expression,k.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments),_5e(ce),a(ne(ce));a(()=>{kge(y,_),kge(D,_,!0),f5e(o),Ari(o)});function ne(ce){return()=>{const ge=a1(Bs(ce));if(!fe(ge))if(ry(ge)){const je=ge.symbol&&ge.symbol.flags&32?k.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass:k.Class_0_incorrectly_implements_interface_1,Be=Wp(ge,y.thisType);Nh(S,Be,void 0)||B1t(o,S,Be,je)}else ft(ce,k.A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members)}}}function Tri(o,_,y,S){const L=L1(o)&&Ll(_),B=L!=null&&L.length?Wp(ya(L),_.thisType):void 0,K=ys(_);for(const ne of o.members)fce(ne)||(iu(ne)&&O(ne.parameters,ce=>{vp(ce,ne)&&R1t(o,S,K,B,_,y,ce,!0)}),R1t(o,S,K,B,_,y,ne,!1))}function R1t(o,_,y,S,D,L,B,K,ne=!0){const ce=B.name&&Zg(B.name)||Zg(B);return ce?F1t(o,_,y,S,D,L,bK(B),KT(B),pa(B),K,ce,ne?B:void 0):0}function F1t(o,_,y,S,D,L,B,K,ne,ce,ge,je){const Be=nr(o),kt=!!(o.flags&33554432);if(S&&(B||Q.noImplicitOverride)){const Vt=ne?_:L,Kt=ne?y:S,Oi=Ta(Vt,ge.escapedName),Ki=Ta(Kt,ge.escapedName),qn=Hn(S);if(Oi&&!Ki&&B){if(je){const Qn=Jgt(Eu(ge),Kt);Qn?ft(je,Be?k.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:k.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1,qn,eo(Qn)):ft(je,Be?k.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0:k.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0,qn)}return 2}else if(Oi&&(Ki!=null&&Ki.declarations)&&Q.noImplicitOverride&&!kt){const Qn=Ft(Ki.declarations,KT);if(B)return 0;if(Qn){if(K&&Qn)return je&&ft(je,k.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0,qn),1}else{if(je){const rn=ce?Be?k.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:k.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0:Be?k.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:k.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0;ft(je,rn,qn)}return 1}}}else if(B){if(je){const Vt=Hn(D);ft(je,Be?k.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class:k.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class,Vt)}return 2}return 0}function B1t(o,_,y,S){let D=!1;for(const L of o.members){if(pa(L))continue;const B=L.name&&Zg(L.name)||Zg(L);if(B){const K=Ta(_,B.escapedName),ne=Ta(y,B.escapedName);if(K&&ne){const ce=()=>jo(void 0,k.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2,eo(B),Hn(_),Hn(y));Nh(Yn(K),Yn(ne),L.name||L,void 0,ce)||(D=!0)}}}D||Nh(_,y,o.name||o,S)}function Dri(o,_){const y=ia(o,1);if(y.length){const S=y[0].declaration;if(S&&xp(S,2)){const D=Xb(o.symbol);A5e(_,D)||ft(_,k.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private,qS(o.symbol))}}}function Eri(o,_,y){if(!_.name)return 0;const S=xr(o),D=gl(S),L=Wp(D),B=Yn(S),ne=L1(o)&&Ll(D),ce=ne!=null&&ne.length?Wp(ya(ne),D.thisType):void 0,ge=ys(D),je=_.parent?bK(_):Zr(_,16);return F1t(o,B,ge,ce,D,L,je,KT(_),pa(_),!1,y)}function eM(o){return Iu(o)&1?o.links.target:o}function Iri(o){return $t(o.declarations,_=>_.kind===263||_.kind===264)}function Nri(o,_){var y,S,D,L,B;const K=Ac(_),ne=new Map;e:for(const ce of K){const ge=eM(ce);if(ge.flags&4194304)continue;const je=UD(o,ge.escapedName);if(!je)continue;const Be=eM(je),kt=$m(ge);if(j.assert(!!Be,"derived should point to something, even if it is the base class' declaration."),Be===ge){const Vt=Xb(o.symbol);if(kt&64&&(!Vt||!Zr(Vt,64))){for(const Qn of Ll(o)){if(Qn===_)continue;const rn=UD(Qn,ge.escapedName),Ui=rn&&eM(rn);if(Ui&&Ui!==ge)continue e}const Kt=Hn(_),Oi=Hn(o),Ki=eo(ce),qn=fn((y=ne.get(Vt))==null?void 0:y.missedProperties,Ki);ne.set(Vt,{baseTypeName:Kt,typeName:Oi,missedProperties:qn})}}else{const Vt=$m(Be);if(kt&2||Vt&2)continue;let Kt;const Oi=ge.flags&98308,Ki=Be.flags&98308;if(Oi&&Ki){if((Iu(ge)&6?(S=ge.declarations)!=null&&S.some(rn=>W1t(rn,kt)):(D=ge.declarations)!=null&&D.every(rn=>W1t(rn,kt)))||Iu(ge)&262144||Be.valueDeclaration&&ur(Be.valueDeclaration))continue;const qn=Oi!==4&&Ki===4;if(qn||Oi===4&&Ki!==4){const rn=qn?k._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property:k._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor;ft(No(Be.valueDeclaration)||Be.valueDeclaration,rn,eo(ge),Hn(_),Hn(o))}else if(de){const rn=(L=Be.declarations)==null?void 0:L.find(Ui=>Ui.kind===172&&!Ui.initializer);if(rn&&!(Be.flags&33554432)&&!(kt&64)&&!(Vt&64)&&!((B=Be.declarations)!=null&&B.some(Ui=>!!(Ui.flags&33554432)))){const Ui=nH(Xb(o.symbol)),fr=rn.name;if(rn.exclamationToken||!Ui||!ot(fr)||!we||!H1t(fr,o,Ui)){const Gr=k.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration;ft(No(Be.valueDeclaration)||Be.valueDeclaration,Gr,eo(ge),Hn(_))}}}continue}else if(T7e(ge)){if(T7e(Be)||Be.flags&4)continue;j.assert(!!(Be.flags&98304)),Kt=k.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor}else ge.flags&98304?Kt=k.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function:Kt=k.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function;ft(No(Be.valueDeclaration)||Be.valueDeclaration,Kt,Hn(_),eo(ge),Hn(o))}}for(const[ce,ge]of ne)if(P(ge.missedProperties)===1)fd(ce)?ft(ce,k.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1,ya(ge.missedProperties),ge.baseTypeName):ft(ce,k.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2,ge.typeName,ya(ge.missedProperties),ge.baseTypeName);else if(P(ge.missedProperties)>5){const je=qt(ge.missedProperties.slice(0,4),kt=>`'${kt}'`).join(", "),Be=P(ge.missedProperties)-4;fd(ce)?ft(ce,k.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more,ge.baseTypeName,je,Be):ft(ce,k.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more,ge.typeName,ge.baseTypeName,je,Be)}else{const je=qt(ge.missedProperties,Be=>`'${Be}'`).join(", ");fd(ce)?ft(ce,k.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1,ge.baseTypeName,je):ft(ce,k.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2,ge.typeName,ge.baseTypeName,je)}}function W1t(o,_){return _&64&&(!Lo(o)||!o.initializer)||zf(o.parent)}function Lri(o,_,y){if(!P(_))return y;const S=new Map;O(y,D=>{S.set(D.escapedName,D)});for(const D of _){const L=Ac(Wp(D,o.thisType));for(const B of L){const K=S.get(B.escapedName);K&&B.parent===K.parent&&S.delete(B.escapedName)}}return as(S.values())}function Pri(o,_){const y=Ll(o);if(y.length<2)return!0;const S=new Map;O(gRe(o).declaredProperties,L=>{S.set(L.escapedName,{prop:L,containingType:o})});let D=!0;for(const L of y){const B=Ac(Wp(L,o.thisType));for(const K of B){const ne=S.get(K.escapedName);if(!ne)S.set(K.escapedName,{prop:K,containingType:L});else if(ne.containingType!==o&&!OQt(ne.prop,K)){D=!1;const ge=Hn(ne.containingType),je=Hn(L);let Be=jo(void 0,k.Named_property_0_of_types_1_and_2_are_not_identical,eo(K),ge,je);Be=jo(Be,k.Interface_0_cannot_simultaneously_extend_types_1_and_2,Hn(o),ge,je),lc.add(Bv(_n(_),_,Be))}}}return D}function Ari(o){if(!we||!ke||o.flags&33554432)return;const _=nH(o);for(const y of o.members)if(!(jh(y)&128)&&!pa(y)&&V1t(y)){const S=y.name;if(ot(S)||Vs(S)||Ka(S)){const D=Yn(xr(y));D.flags&3||UO(D)||(!_||!H1t(S,D,_))&&ft(y.name,k.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor,al(S))}}}function V1t(o){return o.kind===172&&!KT(o)&&!o.exclamationToken&&!o.initializer}function Ori(o,_,y,S,D){for(const L of y)if(L.pos>=S&&L.pos<=D){const B=G.createPropertyAccessExpression(G.createThis(),o);_c(B.expression,B),_c(B,L),B.flowNode=L.returnFlowNode;const K=LC(B,_,Zx(_));if(!UO(K))return!0}return!1}function H1t(o,_,y){const S=Ka(o)?G.createElementAccessExpression(G.createThis(),o.expression):G.createPropertyAccessExpression(G.createThis(),o);_c(S.expression,S),_c(S,y),S.flowNode=y.returnFlowNode;const D=LC(S,_,Zx(_));return!UO(D)}function Mri(o){bb(o)||poi(o),vte(o.typeParameters),a(()=>{oF(o.name,k.Interface_name_cannot_be_0),oU(o);const _=xr(o);P1t(_);const y=ql(_,264);if(o===y){const S=gl(_),D=Wp(S);if(Pri(S,o.name)){for(const L of Ll(S))Nh(D,Wp(L,S.thisType),o.name,k.Interface_0_incorrectly_extends_interface_1);kge(S,_)}}t1t(o)}),O(B8(o),_=>{(!pl(_.expression)||gh(_.expression))&&ft(_.expression,k.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments),_5e(_)}),O(o.members,za),a(()=>{f5e(o),ek(o)})}function Rri(o){if(bb(o),oF(o.name,k.Type_alias_name_cannot_be_0),oU(o),vte(o.typeParameters),o.type.kind===141){const _=P(o.typeParameters);(_===0?o.name.escapedText==="BuiltinIteratorReturn":_===1&&Lue.has(o.name.escapedText))||ft(o.type,k.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types)}else za(o.type),ek(o)}function j1t(o){const _=yr(o);if(!(_.flags&1024)){_.flags|=1024;let y=0,S;for(const D of o.members){const L=Fri(D,y,S);yr(D).enumMemberValue=L,y=typeof L.value=="number"?L.value+1:void 0,S=D}}}function Fri(o,_,y){if(YW(o.name))ft(o.name,k.Computed_property_names_are_not_allowed_in_enums);else{const S=lP(o.name);$v(S)&&!c7(S)&&ft(o.name,k.An_enum_member_cannot_have_a_numeric_name)}if(o.initializer)return Bri(o);if(o.parent.flags&33554432&&!Uk(o.parent))return Rd(void 0);if(_===void 0)return ft(o.name,k.Enum_member_must_have_initializer),Rd(void 0);if(Ag(Q)&&(y!=null&&y.initializer)){const S=jN(y);typeof S.value=="number"&&!S.resolvedOtherFiles||ft(o.name,k.Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled)}return Rd(_)}function Bri(o){const _=Uk(o.parent),y=o.initializer,S=Nt(y,o);return S.value!==void 0?_&&typeof S.value=="number"&&!isFinite(S.value)?ft(y,isNaN(S.value)?k.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN:k.const_enum_member_initializer_was_evaluated_to_a_non_finite_value):Ag(Q)&&typeof S.value=="string"&&!S.isSyntacticallyString&&ft(y,k._0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is_enabled,`${Fr(o.parent.name)}.${lP(o.name)}`):_?ft(y,k.const_enum_member_initializers_must_be_constant_expressions):o.parent.flags&33554432?ft(y,k.In_ambient_enum_declarations_member_initializer_must_be_constant_expression):Nh(uo(y),hi,y,k.Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values),S}function z1t(o,_){const y=nu(o,111551,!0);if(!y)return Rd(void 0);if(o.kind===80){const S=o;if(c7(S.escapedText)&&y===jO(S.escapedText,111551,void 0))return Rd(+S.escapedText,!1)}if(y.flags&8)return _?U1t(o,y,_):jN(y.valueDeclaration);if(e4(y)){const S=y.valueDeclaration;if(S&&_s(S)&&!S.type&&S.initializer&&(!_||S!==_&&VS(S,_))){const D=Nt(S.initializer,S);return _&&_n(_)!==_n(S)?Rd(D.value,!1,!0,!0):Rd(D.value,D.isSyntacticallyString,D.resolvedOtherFiles,!0)}}return Rd(void 0)}function Wri(o,_){const y=o.expression;if(pl(y)&&Bc(o.argumentExpression)){const S=nu(y,111551,!0);if(S&&S.flags&384){const D=cu(o.argumentExpression.text),L=S.exports.get(D);if(L)return j.assert(_n(L.valueDeclaration)===_n(S.valueDeclaration)),_?U1t(o,L,_):jN(L.valueDeclaration)}}return Rd(void 0)}function U1t(o,_,y){const S=_.valueDeclaration;if(!S||S===y)return ft(o,k.Property_0_is_used_before_being_assigned,eo(_)),Rd(void 0);if(!VS(S,y))return ft(o,k.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums),Rd(0);const D=jN(S);return y.parent!==S.parent?Rd(D.value,D.isSyntacticallyString,D.resolvedOtherFiles,!0):D}function Vri(o){a(()=>Hri(o))}function Hri(o){bb(o),sF(o,o.name),oU(o),o.members.forEach(jri),j1t(o);const _=xr(o),y=ql(_,o.kind);if(o===y){if(_.declarations&&_.declarations.length>1){const D=Uk(o);O(_.declarations,L=>{sD(L)&&Uk(L)!==D&&ft(No(L),k.Enum_declarations_must_all_be_const_or_non_const)})}let S=!1;O(_.declarations,D=>{if(D.kind!==266)return!1;const L=D;if(!L.members.length)return!1;const B=L.members[0];B.initializer||(S?ft(B.name,k.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element):S=!0)})}}function jri(o){Vs(o.name)&&ft(o,k.An_enum_member_cannot_be_named_with_a_private_identifier),o.initializer&&uo(o.initializer)}function zri(o){const _=o.declarations;if(_){for(const y of _)if((y.kind===263||y.kind===262&&Dg(y.body))&&!(y.flags&33554432))return y}}function Uri(o,_){const y=R0(o),S=R0(_);return cS(y)?cS(S):cS(S)?!1:y===S}function qri(o){o.body&&(za(o.body),Ry(o)||ek(o)),a(_);function _(){var y,S;const D=Ry(o),L=o.flags&33554432;D&&!L&&ft(o.name,k.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context);const B=Vh(o),K=B?k.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:k.A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module;if(bte(o,K))return;if(bb(o)||!L&&o.name.kind===11&&sn(o.name,k.Only_ambient_modules_can_use_quoted_names),ot(o.name)&&(sF(o,o.name),!(o.flags&2080))){const ce=_n(o),ge=K2e(o),je=E1(ce,ge);ED.add(Md(ce,je.start,je.length,k.A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead))}oU(o);const ne=xr(o);if(ne.flags&512&&!L&&Pue(o,sx(Q))){if(Ag(Q)&&!_n(o).externalModuleIndicator&&ft(o.name,k.Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement,Et),((y=ne.declarations)==null?void 0:y.length)>1){const ce=zri(ne);ce&&(_n(o)!==_n(ce)?ft(o.name,k.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged):o.pos<ce.pos&&ft(o.name,k.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged));const ge=ql(ne,263);ge&&Uri(o,ge)&&(yr(o).flags|=2048)}if(Q.verbatimModuleSyntax&&o.parent.kind===307&&t.getEmitModuleFormatOfFile(o.parent)===1){const ce=(S=o.modifiers)==null?void 0:S.find(ge=>ge.kind===95);ce&&ft(ce,k.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled)}}if(B)if(BT(o)){if((D||xr(o).flags&33554432)&&o.body)for(const ge of o.body.statements)E5e(ge,D)}else cS(o.parent)?D?ft(o.name,k.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations):Gd(Lg(o.name))&&ft(o.name,k.Ambient_module_declaration_cannot_specify_relative_module_name):D?ft(o.name,k.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations):ft(o.name,k.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces)}}function E5e(o,_){switch(o.kind){case 243:for(const S of o.declarationList.declarations)E5e(S,_);break;case 277:case 278:Df(o,k.Exports_and_export_assignments_are_not_permitted_in_module_augmentations);break;case 271:if(gI(o))break;case 272:Df(o,k.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module);break;case 208:case 260:const y=o.name;if(ta(y)){for(const S of y.elements)E5e(S,_);break}case 263:case 266:case 262:case 264:case 267:case 265:if(_)return;break}}function $ri(o){switch(o.kind){case 80:return o;case 166:do o=o.left;while(o.kind!==80);return o;case 211:do{if(Wv(o.expression)&&!Vs(o.name))return o.name;o=o.expression}while(o.kind!==80);return o}}function Tge(o){const _=fP(o);if(!_||lu(_))return!1;if(!Ha(_))return ft(_,k.String_literal_expected),!1;const y=o.parent.kind===268&&Vh(o.parent.parent);if(o.parent.kind!==307&&!y)return ft(_,o.kind===278?k.Export_declarations_are_not_permitted_in_a_namespace:k.Import_declarations_in_a_namespace_cannot_reference_a_module),!1;if(y&&Gd(_.text)&&!yN(o))return ft(o,k.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name),!1;if(!Wd(o)&&o.attributes){const S=o.attributes.token===118?k.Import_attribute_values_must_be_string_literal_expressions:k.Import_assertion_values_must_be_string_literal_expressions;let D=!1;for(const L of o.attributes.elements)Ha(L.value)||(D=!0,ft(L.value,S));return!D}return!0}function Dge(o,_=!0){o===void 0||o.kind!==11||(_?(oe===5||oe===6)&&sn(o,k.String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es2020):sn(o,k.Identifier_expected))}function Ege(o){var _,y,S,D;let L=xr(o);const B=$f(L);if(B!==pt){if(L=wc(L.exportSymbol||L),nr(o)&&!(B.flags&111551)&&!Kw(o)){const ce=Vk(o)?o.propertyName||o.name:Bf(o)?o.name:o;if(j.assert(o.kind!==280),o.kind===281){const ge=ft(ce,k.Types_cannot_appear_in_export_declarations_in_JavaScript_files),je=(y=(_=_n(o).symbol)==null?void 0:_.exports)==null?void 0:y.get(FT(o.propertyName||o.name));if(je===B){const Be=(S=je.declarations)==null?void 0:S.find(W6);Be&&da(ge,Kn(Be,k._0_is_automatically_exported_here,Ws(je.escapedName)))}}else{j.assert(o.kind!==260);const ge=Qi(o,om(du,Wd)),je=(ge&&((D=Z6(ge))==null?void 0:D.text))??"...",Be=Ws(ot(ce)?ce.escapedText:L.escapedName);ft(ce,k._0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation,Be,`import("${je}").${Be}`)}return}const K=Eh(B),ne=(L.flags&1160127?111551:0)|(L.flags&788968?788968:0)|(L.flags&1920?1920:0);if(K&ne){const ce=o.kind===281?k.Export_declaration_conflicts_with_exported_declaration_of_0:k.Import_declaration_conflicts_with_local_declaration_of_0;ft(o,ce,eo(L))}else o.kind!==281&&Q.isolatedModules&&!Qi(o,Kw)&&L.flags&1160127&&ft(o,k.Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled,eo(L),Et);if(Ag(Q)&&!Kw(o)&&!(o.flags&33554432)){const ce=ey(L),ge=!(K&111551);if(ge||ce)switch(o.kind){case 273:case 276:case 271:{if(Q.verbatimModuleSyntax){j.assertIsDefined(o.name,"An ImportClause with a symbol should have a name");const je=Q.verbatimModuleSyntax&&gI(o)?k.An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled:ge?k._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:k._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled,Be=tx(o.kind===276&&o.propertyName||o.name);ID(ft(o,je,Be),ge?void 0:ce,Be)}ge&&o.kind===271&&xp(o,32)&&ft(o,k.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled,Et);break}case 281:if(Q.verbatimModuleSyntax||_n(ce)!==_n(o)){const je=tx(o.propertyName||o.name),Be=ge?ft(o,k.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type,Et):ft(o,k._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled,je,Et);ID(Be,ge?void 0:ce,je);break}}if(Q.verbatimModuleSyntax&&o.kind!==271&&!nr(o)&&t.getEmitModuleFormatOfFile(_n(o))===1?ft(o,k.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled):oe===200&&o.kind!==271&&o.kind!==260&&t.getEmitModuleFormatOfFile(_n(o))===1&&ft(o,k.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve),Q.verbatimModuleSyntax&&!Kw(o)&&!(o.flags&33554432)&&K&128){const je=B.valueDeclaration,Be=t.getRedirectReferenceForResolutionFromSourceOfProject(_n(je).resolvedPath);je.flags&33554432&&(!Be||!sx(Be.commandLine.options))&&ft(o,k.Cannot_access_ambient_const_enums_when_0_is_enabled,Et)}}if(l_(o)){const ce=I5e(L,o);_C(ce)&&ce.declarations&&pC(o,ce.declarations,ce.escapedName)}}}function I5e(o,_){if(!(o.flags&2097152)||_C(o)||!Dh(o))return o;const y=$f(o);if(y===pt)return y;for(;o.flags&2097152;){const S=Qme(o);if(S){if(S===y)break;if(S.declarations&&P(S.declarations))if(_C(S)){pC(_,S.declarations,S.escapedName);break}else{if(o===y)break;o=S}}else break}return y}function Ige(o){sF(o,o.name),Ege(o),o.kind===276&&(Dge(o.propertyName),My(o.propertyName||o.name)&&zv(Q)&&t.getEmitModuleFormatOfFile(_n(o))<4&&zd(o,131072))}function N5e(o){var _;const y=o.attributes;if(y){const S=$Re(!0);S!==Jo&&Nh(xo(y),Lee(S,32768),y);const D=_de(o),L=z3(y,D?sn:void 0),B=o.attributes.token===118;if(D&&L)return;if((oe===199&&o.moduleSpecifier&&Sm(o.moduleSpecifier))!==99&&oe!==99&&oe!==200){const ce=B?oe===199?k.Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:k.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve:oe===199?k.Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:k.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve;return sn(y,ce)}if(q1(o)||(du(o)?(_=o.importClause)==null?void 0:_.isTypeOnly:o.isTypeOnly))return sn(y,B?k.Import_attributes_cannot_be_used_with_type_only_imports_or_exports:k.Import_assertions_cannot_be_used_with_type_only_imports_or_exports);if(L)return sn(y,k.resolution_mode_can_only_be_set_for_type_only_imports)}}function Jri(o){return Xh(ju(o.value))}function Gri(o){if(!bte(o,nr(o)?k.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:k.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)){if(!bb(o)&&o.modifiers&&Df(o,k.An_import_declaration_cannot_have_modifiers),Tge(o)){const _=o.importClause;_&&!Woi(_)?(_.name&&Ige(_),_.namedBindings&&(_.namedBindings.kind===274?(Ige(_.namedBindings),t.getEmitModuleFormatOfFile(_n(o))<4&&zv(Q)&&zd(o,65536)):B_(o,o.moduleSpecifier)&&O(_.namedBindings.elements,Ige))):Oe&&!_&&B_(o,o.moduleSpecifier)}N5e(o)}}function Kri(o){if(!bte(o,nr(o)?k.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:k.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)&&(bb(o),gI(o)||Tge(o)))if(Ige(o),t4(o,6),o.moduleReference.kind!==283){const _=$f(xr(o));if(_!==pt){const y=Eh(_);if(y&111551){const S=K_(o.moduleReference);nu(S,112575).flags&1920||ft(S,k.Module_0_is_hidden_by_a_local_declaration_with_the_same_name,al(S))}y&788968&&oF(o.name,k.Import_name_cannot_be_0)}o.isTypeOnly&&sn(o,k.An_import_alias_cannot_use_import_type)}else 5<=oe&&oe<=99&&!o.isTypeOnly&&!(o.flags&33554432)&&sn(o,k.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead)}function Xri(o){if(!bte(o,nr(o)?k.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module:k.An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)){if(!bb(o)&&iDe(o)&&Df(o,k.An_export_declaration_cannot_have_modifiers),Qri(o),!o.moduleSpecifier||Tge(o))if(o.exportClause&&!jy(o.exportClause)){O(o.exportClause.elements,Zri);const _=o.parent.kind===268&&Vh(o.parent.parent),y=!_&&o.parent.kind===268&&!o.moduleSpecifier&&o.flags&33554432;o.parent.kind!==307&&!_&&!y&&ft(o,k.Export_declarations_are_not_permitted_in_a_namespace)}else{const _=B_(o,o.moduleSpecifier);_&&_N(_)?ft(o.moduleSpecifier,k.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk,eo(_)):o.exportClause&&(Ege(o.exportClause),Dge(o.exportClause.name)),t.getEmitModuleFormatOfFile(_n(o))<4&&(o.exportClause?zv(Q)&&zd(o,65536):zd(o,32768))}N5e(o)}}function Qri(o){var _;return o.isTypeOnly&&((_=o.exportClause)==null?void 0:_.kind)===279?Dyt(o.exportClause):!1}function bte(o,_){const y=o.parent.kind===307||o.parent.kind===268||o.parent.kind===267;return y||Df(o,_),!y}function Zri(o){Ege(o);const _=o.parent.parent.moduleSpecifier!==void 0;if(Dge(o.propertyName,_),Dge(o.name),Q_(Q)&&NO(o.propertyName||o.name,!0),_)zv(Q)&&t.getEmitModuleFormatOfFile(_n(o))<4&&My(o.propertyName||o.name)&&zd(o,131072);else{const y=o.propertyName||o.name;if(y.kind===11)return;const S=_i(y,y.escapedText,2998271,void 0,!0);S&&(S===et||S===Me||S.declarations&&cS(bN(S.declarations[0])))?ft(y,k.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module,Fr(y)):t4(o,7)}}function Yri(o){const _=o.isExportEquals?k.An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration:k.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration;if(bte(o,_))return;const y=o.parent.kind===307?o.parent:o.parent.parent;if(y.kind===267&&!Vh(y)){o.isExportEquals?ft(o,k.An_export_assignment_cannot_be_used_in_a_namespace):ft(o,k.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);return}!bb(o)&&dce(o)&&Df(o,k.An_export_assignment_cannot_have_modifiers);const S=dd(o);S&&Nh(ju(o.expression),Bs(S),o.expression);const D=!o.isExportEquals&&!(o.flags&33554432)&&Q.verbatimModuleSyntax&&t.getEmitModuleFormatOfFile(_n(o))===1;if(o.expression.kind===80){const L=o.expression,B=Rp(nu(L,-1,!0,!0,o));if(B){t4(o,3);const K=ey(B,111551);if(Eh(B)&111551?(ju(L),!D&&!(o.flags&33554432)&&Q.verbatimModuleSyntax&&K&&ft(L,o.isExportEquals?k.An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:k.An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration,Fr(L))):!D&&!(o.flags&33554432)&&Q.verbatimModuleSyntax&&ft(L,o.isExportEquals?k.An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:k.An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type,Fr(L)),!D&&!(o.flags&33554432)&&Ag(Q)&&!(B.flags&111551)){const ne=Eh(B,!1,!0);B.flags&2097152&&ne&788968&&!(ne&111551)&&(!K||_n(K)!==_n(o))?ft(L,o.isExportEquals?k._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:k._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,Fr(L),Et):K&&_n(K)!==_n(o)&&ID(ft(L,o.isExportEquals?k._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:k._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,Fr(L),Et),K,Fr(L))}}else ju(L);Q_(Q)&&NO(L,!0)}else ju(o.expression);D&&ft(o,k.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled),q1t(y),o.flags&33554432&&!pl(o.expression)&&sn(o.expression,k.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context),o.isExportEquals&&(oe>=5&&oe!==200&&(o.flags&33554432&&t.getImpliedNodeFormatForEmit(_n(o))===99||!(o.flags&33554432)&&t.getImpliedNodeFormatForEmit(_n(o))!==1)?sn(o,k.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead):oe===4&&!(o.flags&33554432)&&sn(o,k.Export_assignment_is_not_supported_when_module_flag_is_system))}function esi(o){return cf(o.exports,(_,y)=>y!=="export=")}function q1t(o){const _=xr(o),y=Ys(_);if(!y.exportsChecked){const S=_.exports.get("export=");if(S&&esi(_)){const L=Dh(S)||S.valueDeclaration;L&&!yN(L)&&!nr(L)&&ft(L,k.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements)}const D=ub(_);D&&D.forEach(({declarations:L,flags:B},K)=>{if(K==="__export"||B&1920)return;const ne=$i(L,jJ(VMt,zJ(zf)));if(!(B&524288&&ne<=2)&&ne>1&&!Nge(L))for(const ce of L)tet(ce)&&lc.add(Kn(ce,k.Cannot_redeclare_exported_variable_0,Ws(K)))}),y.exportsChecked=!0}}function Nge(o){return o&&o.length>1&&o.every(_=>nr(_)&&Sl(_)&&(yI(_.expression)||Wv(_.expression)))}function za(o){if(o){const _=H;H=o,N=0,tsi(o),H=_}}function tsi(o){if(a4(o)&8388608)return;xV(o)&&O(o.jsDoc,({comment:y,tags:S})=>{$1t(y),O(S,D=>{$1t(D.comment),nr(o)&&za(D)})});const _=o.kind;if(u)switch(_){case 267:case 263:case 264:case 262:u.throwIfCancellationRequested()}switch(_>=243&&_<=259&&wV(o)&&o.flowNode&&!Wee(o.flowNode)&&Z1(Q.allowUnreachableCode===!1,o,k.Unreachable_code_detected),_){case 168:return Z0t(o);case 169:return Y0t(o);case 172:return i1t(o);case 171:return Wii(o);case 185:case 184:case 179:case 180:case 181:return rU(o);case 174:case 173:return Vii(o);case 175:return Hii(o);case 176:return jii(o);case 177:case 178:return r1t(o);case 183:return _5e(o);case 182:return Mii(o);case 186:return Gii(o);case 187:return Kii(o);case 188:return Xii(o);case 189:return Qii(o);case 192:case 193:return Zii(o);case 196:case 190:case 191:return za(o.type);case 197:return ini(o);case 198:return nni(o);case 194:return rni(o);case 195:return sni(o);case 203:return oni(o);case 205:return ani(o);case 202:return cni(o);case 328:return Eni(o);case 329:return Dni(o);case 346:case 338:case 340:return gni(o);case 345:return yni(o);case 344:return vni(o);case 324:case 325:case 326:return Cni(o);case 341:return Sni(o);case 348:return wni(o);case 317:xni(o);case 315:case 314:case 312:case 313:case 322:J1t(o),Uo(o,za);return;case 318:isi(o);return;case 309:return za(o.type);case 333:case 335:case 334:return Ini(o);case 350:return bni(o);case 343:return kni(o);case 351:return Tni(o);case 199:return Yii(o);case 200:return eni(o);case 262:return mni(o);case 241:case 268:return Cge(o);case 243:return Jni(o);case 244:return Gni(o);case 245:return Kni(o);case 246:return Zni(o);case 247:return Yni(o);case 248:return eri(o);case 249:return iri(o);case 250:return tri(o);case 251:case 252:return dri(o);case 253:return fri(o);case 254:return hri(o);case 255:return _ri(o);case 256:return pri(o);case 257:return mri(o);case 258:return gri(o);case 260:return qni(o);case 208:return $ni(o);case 263:return kri(o);case 264:return Mri(o);case 265:return Rri(o);case 266:return Vri(o);case 267:return qri(o);case 272:return Gri(o);case 271:return Kri(o);case 278:return Xri(o);case 277:return Yri(o);case 242:case 259:PC(o);return;case 282:return Uii(o)}}function $1t(o){Ao(o)&&O(o,_=>{rP(_)&&za(_)})}function J1t(o){if(!nr(o))if(TX(o)||k3(o)){const _=xa(TX(o)?54:58),y=o.postfix?k._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:k._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1,S=o.type,D=Bs(S);sn(o,y,_,Hn(k3(o)&&!(D===Ai||D===Ri)?is(fn([D,tt],o.postfix?void 0:Qt)):D))}else sn(o,k.JSDoc_types_can_only_be_used_inside_documentation_comments)}function isi(o){J1t(o),za(o.type);const{parent:_}=o;if($s(_)&&T3(_.parent)){va(_.parent.parameters)!==_&&ft(o,k.A_rest_parameter_must_be_last_in_a_parameter_list);return}o2(_)||ft(o,k.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature);const y=o.parent.parent;if(!Qm(y)){ft(o,k.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature);return}const S=kV(y);if(!S)return;const D=Jk(y);(!D||va(D.parameters).symbol!==S)&&ft(o,k.A_rest_parameter_must_be_last_in_a_parameter_list)}function nsi(o){const _=Bs(o.type),{parent:y}=o,S=o.parent.parent;if(o2(o.parent)&&Qm(S)){const D=Jk(S),L=ble(S.parent.parent);if(D||L){const B=rl(L?S.parent.parent.typeExpression.parameters:D.parameters),K=kV(S);if(!B||K&&B.symbol===K&&Oy(B))return hh(_)}}return $s(y)&&T3(y.parent)?hh(_):Dd(_)}function s4(o){const _=_n(o),y=yr(_);y.flags&1?j.assert(!y.deferredNodes,"A type-checked file should have no deferred nodes."):(y.deferredNodes||(y.deferredNodes=new Set),y.deferredNodes.add(o))}function G1t(o){const _=yr(o);_.deferredNodes&&_.deferredNodes.forEach(rsi),_.deferredNodes=void 0}function rsi(o){var _,y;(_=Zn)==null||_.push(Zn.Phase.Check,"checkDeferredNode",{kind:o.kind,pos:o.pos,end:o.end,path:o.tracingPath});const S=H;switch(H=o,N=0,o.kind){case 213:case 214:case 215:case 170:case 286:WN(o);break;case 218:case 219:case 174:case 173:Yti(o);break;case 177:case 178:r1t(o);break;case 231:xri(o);break;case 168:Oii(o);break;case 285:oei(o);break;case 284:cei(o);break;case 216:case 234:case 217:wti(o);break;case 222:uo(o.expression);break;case 226:wK(o)&&WN(o);break}H=S,(y=Zn)==null||y.pop()}function ssi(o,_){var y,S;(y=Zn)==null||y.push(Zn.Phase.Check,_?"checkSourceFileNodes":"checkSourceFile",{path:o.path},!0);const D=_?"beforeCheckNodes":"beforeCheck",L=_?"afterCheckNodes":"afterCheck";ou(D),_?asi(o,_):osi(o),ou(L),Wm("Check",D,L),(S=Zn)==null||S.pop()}function K1t(o,_){if(_)return!1;switch(o){case 0:return!!Q.noUnusedLocals;case 1:return!!Q.noUnusedParameters;default:return j.assertNever(o)}}function X1t(o){return X0.get(o.path)||w}function osi(o){const _=yr(o);if(!(_.flags&1)){if(p3(o,Q,t))return;kyt(o),An(fC),An(OS),An(_0),An(MS),An(Tx),_.flags&8388608&&(fC=_.potentialThisCollisions,OS=_.potentialNewTargetCollisions,_0=_.potentialWeakMapSetCollisions,MS=_.potentialReflectCollisions,Tx=_.potentialUnusedRenamedBindingElementsInTypes),O(o.statements,za),za(o.endOfFileToken),G1t(o),Cp(o)&&ek(o),a(()=>{!o.isDeclarationFile&&(Q.noUnusedLocals||Q.noUnusedParameters)&&p1t(X1t(o),(y,S,D)=>{!oP(y)&&K1t(S,!!(y.flags&33554432))&&lc.add(D)}),o.isDeclarationFile||Ani()}),Cp(o)&&q1t(o),fC.length&&(O(fC,Rni),An(fC)),OS.length&&(O(OS,Fni),An(OS)),_0.length&&(O(_0,Hni),An(_0)),MS.length&&(O(MS,zni),An(MS)),_.flags|=1}}function asi(o,_){const y=yr(o);if(!(y.flags&1)){if(p3(o,Q,t))return;kyt(o),An(fC),An(OS),An(_0),An(MS),An(Tx),O(_,za),G1t(o),(y.potentialThisCollisions||(y.potentialThisCollisions=[])).push(...fC),(y.potentialNewTargetCollisions||(y.potentialNewTargetCollisions=[])).push(...OS),(y.potentialWeakMapSetCollisions||(y.potentialWeakMapSetCollisions=[])).push(..._0),(y.potentialReflectCollisions||(y.potentialReflectCollisions=[])).push(...MS),(y.potentialUnusedRenamedBindingElementsInTypes||(y.potentialUnusedRenamedBindingElementsInTypes=[])).push(...Tx),y.flags|=8388608;for(const S of _){const D=yr(S);D.flags|=8388608}}}function Q1t(o,_,y){try{return u=_,csi(o,y)}finally{u=void 0}}function L5e(){for(const o of r)o();r=[]}function P5e(o,_){L5e();const y=a;a=S=>S(),ssi(o,_),a=y}function csi(o,_){if(o){L5e();const y=lc.getGlobalDiagnostics(),S=y.length;P5e(o,_);const D=lc.getDiagnostics(o.fileName);if(_)return D;const L=lc.getGlobalDiagnostics();if(L!==y){const B=T6(y,L,Z8);return Js(B,D)}else if(S===0&&L.length>0)return Js(L,D);return D}return O(t.getSourceFiles(),y=>P5e(y)),lc.getDiagnostics()}function lsi(){return L5e(),lc.getGlobalDiagnostics()}function usi(o,_){if(o.flags&67108864)return[];const y=_a();let S=!1;return D(),y.delete("this"),ARe(y);function D(){for(;o;){switch(Ay(o)&&o.locals&&!cS(o)&&B(o.locals,_),o.kind){case 307:if(!wd(o))break;case 267:K(xr(o).exports,_&2623475);break;case 266:B(xr(o).exports,_&8);break;case 231:o.name&&L(o.symbol,_);case 263:case 264:S||B(qx(xr(o)),_&788968);break;case 218:o.name&&L(o.symbol,_);break}gTe(o)&&L(ut,_),S=pa(o),o=o.parent}B($e,_)}function L(ne,ce){if(l3(ne)&ce){const ge=ne.escapedName;y.has(ge)||y.set(ge,ne)}}function B(ne,ce){ce&&ne.forEach(ge=>{L(ge,ce)})}function K(ne,ce){ce&&ne.forEach(ge=>{!ql(ge,281)&&!ql(ge,280)&&ge.escapedName!=="default"&&L(ge,ce)})}}function dsi(o){return o.kind===80&&NP(o.parent)&&No(o.parent)===o}function Z1t(o){for(;o.parent.kind===166;)o=o.parent;return o.parent.kind===183}function fsi(o){for(;o.parent.kind===211;)o=o.parent;return o.parent.kind===233}function Y1t(o,_){let y,S=Cf(o);for(;S&&!(y=_(S));)S=Cf(S);return y}function hsi(o){return!!Qi(o,_=>iu(_)&&Dg(_.body)||Lo(_)?!0:ss(_)||Qc(_)?"quit":!1)}function A5e(o,_){return!!Y1t(o,y=>y===_)}function _si(o){for(;o.parent.kind===166;)o=o.parent;if(o.parent.kind===271)return o.parent.moduleReference===o?o.parent:void 0;if(o.parent.kind===277)return o.parent.expression===o?o.parent:void 0}function Lge(o){return _si(o)!==void 0}function psi(o){switch(Bu(o.parent.parent)){case 1:case 3:return p_(o.parent);case 5:if(Nr(o.parent)&&u3(o.parent)===o)return;case 4:case 2:return xr(o.parent.parent)}}function msi(o){let _=o.parent;for(;o_(_);)o=_,_=_.parent;if(_&&_.kind===205&&_.qualifier===o)return _}function gsi(o){if(o.expression.kind===110){const _=Hh(o,!1,!1);if(Ho(_)){const y=_gt(_);if(y){const S=X2(y,void 0),D=mgt(y,S);return D&&!Nc(D)}}}}function eyt(o){if(Wy(o))return p_(o.parent);if(nr(o)&&o.parent.kind===211&&o.parent===o.parent.parent.left&&!Vs(o)&&!a2(o)&&!gsi(o.parent)){const _=psi(o);if(_)return _}if(o.parent.kind===277&&pl(o)){const _=nu(o,2998271,!0);if(_&&_!==pt)return _}else if(E_(o)&&Lge(o)){const _=Xk(o,271);return j.assert(_!==void 0),PA(o,!0)}if(E_(o)){const _=msi(o);if(_){Bs(_);const y=yr(o).resolvedSymbol;return y===pt?void 0:y}}for(;cDe(o);)o=o.parent;if(fsi(o)){let _=0;o.parent.kind===233?(_=N1(o)?788968:111551,SK(o.parent)&&(_|=111551)):_=1920,_|=2097152;const y=pl(o)?nu(o,_,!0):void 0;if(y)return y}if(o.parent.kind===341)return kV(o.parent);if(o.parent.kind===168&&o.parent.parent.kind===345){j.assert(!nr(o));const _=OTe(o.parent);return _&&_.symbol}if(F0(o)){if(lu(o))return;const _=Qi(o,om(rP,T7,a2)),y=_?901119:111551;if(o.kind===80){if(X6(o)&&n4(o)){const D=Yme(o.parent);return D===pt?void 0:D}const S=nu(o,y,!0,!0,Jk(o));if(!S&&_){const D=Qi(o,om(ss,zf));if(D)return Cte(o,!0,xr(D))}if(S&&_){const D=zT(o);if(D&&SS(D)&&D===S.valueDeclaration)return nu(o,y,!0,!0,_n(D))||S}return S}else{if(Vs(o))return ige(o);if(o.kind===211||o.kind===166){const S=yr(o);return S.resolvedSymbol?S.resolvedSymbol:(o.kind===211?(tge(o,0),S.resolvedSymbol||(S.resolvedSymbol=tyt(ju(o.expression),xC(o.name)))):jgt(o,0),!S.resolvedSymbol&&_&&o_(o)?Cte(o):S.resolvedSymbol)}else if(a2(o))return Cte(o)}}else if(Z1t(o)){const _=o.parent.kind===183?788968:1920,y=nu(o,_,!1,!0);return y&&y!==pt?y:ime(o)}if(o.parent.kind===182)return nu(o,1)}function tyt(o,_){const y=PRe(o,_);if(y.length&&o.members){const S=Ype(o1(o).members);if(y===Ih(o))return S;if(S){const D=Ys(S),L=es(y,K=>K.declaration),B=qt(L,Sc).join(",");if(D.filteredIndexSymbolCache||(D.filteredIndexSymbolCache=new Map),D.filteredIndexSymbolCache.has(B))return D.filteredIndexSymbolCache.get(B);{const K=$a(131072,"__index");return K.declarations=es(y,ne=>ne.declaration),K.parent=o.aliasSymbol?o.aliasSymbol:o.symbol?o.symbol:Zg(K.declarations[0].parent),D.filteredIndexSymbolCache.set(B,K),K}}}}function Cte(o,_,y){if(E_(o)){let B=nu(o,901119,_,!0,Jk(o));if(!B&&ot(o)&&y&&(B=wc(ff(__(y),o.escapedText,901119))),B)return B}const S=ot(o)?y:Cte(o.left,_,y),D=ot(o)?o.escapedText:o.right.escapedText;if(S){const L=S.flags&111551&&Ta(Yn(S),"prototype"),B=L?Yn(L):gl(S);return Ta(B,D)}}function Zg(o,_){if(Os(o))return wd(o)?wc(o.symbol):void 0;const{parent:y}=o,S=y.parent;if(!(o.flags&67108864)){if(iet(o)){const D=xr(y);return Vk(o.parent)&&o.parent.propertyName===o?Qme(D):D}else if(DV(o))return xr(y.parent);if(o.kind===80){if(Lge(o))return eyt(o);if(y.kind===208&&S.kind===206&&o===y.propertyName){const D=o4(S),L=Ta(D,o.escapedText);if(L)return L}else if(b7(y)&&y.name===o)return y.keywordToken===105&&Fr(o)==="target"?G7e(y).symbol:y.keywordToken===102&&Fr(o)==="meta"?X_t().members.get("meta"):void 0}switch(o.kind){case 80:case 81:case 211:case 166:if(!GT(o))return eyt(o);case 110:const D=Hh(o,!1,!1);if(Ho(D)){const K=Dm(D);if(K.thisParameter)return K.thisParameter}if(XG(o))return uo(o).symbol;case 197:return p8e(o).symbol;case 108:return uo(o).symbol;case 137:const L=o.parent;return L&&L.kind===176?L.parent.symbol:void 0;case 11:case 15:if(qk(o.parent.parent)&&L8(o.parent.parent)===o||(o.parent.kind===272||o.parent.kind===278)&&o.parent.moduleSpecifier===o||nr(o)&&q1(o.parent)&&o.parent.moduleSpecifier===o||nr(o)&&L_(o.parent,!1)||zp(o.parent)||bS(o.parent)&&lS(o.parent.parent)&&o.parent.parent.argument===o.parent)return B_(o,o,_);if(la(y)&&vI(y)&&y.arguments[1]===o)return xr(y);case 9:const B=wl(y)?y.argumentExpression===o?Kf(y.expression):void 0:bS(y)&&nD(S)?Bs(S.objectType):void 0;return B&&Ta(B,cu(o.text));case 90:case 100:case 39:case 86:return p_(o.parent);case 205:return lS(o)?Zg(o.argument.literal,_):void 0;case 95:return Il(o.parent)?j.checkDefined(o.parent.symbol):void 0;case 102:case 105:return b7(o.parent)?k0t(o.parent).symbol:void 0;case 104:if(ur(o.parent)){const K=Kf(o.parent.right),ne=s5e(K);return(ne==null?void 0:ne.symbol)??K.symbol}return;case 236:return uo(o).symbol;case 295:if(X6(o)&&n4(o)){const K=Yme(o.parent);return K===pt?void 0:K}default:return}}}function ysi(o){if(ot(o)&&Nr(o.parent)&&o.parent.name===o){const _=xC(o),y=Kf(o.parent.expression),S=y.flags&1048576?y.types:[y];return Rr(S,D=>$t(Ih(D),L=>zA(_,L.keyType)))}}function vsi(o){if(o&&o.kind===304)return nu(o.name,2208703)}function bsi(o){if(vh(o)){const _=o.propertyName||o.name;return o.parent.parent.moduleSpecifier?lb(o.parent.parent,o):_.kind===11?void 0:nu(_,2998271)}else return nu(o,2998271)}function o4(o){if(Os(o)&&!wd(o)||o.flags&67108864)return vt;const _=mce(o),y=_&&W_(xr(_.class));if(N1(o)){const S=Bs(o);return y?Wp(S,y.thisType):S}if(F0(o))return O5e(o);if(y&&!_.isImplements){const S=Ra(Ll(y));return S?Wp(S,y.thisType):vt}if(NP(o)){const S=xr(o);return gl(S)}if(dsi(o)){const S=Zg(o);return S?gl(S):vt}if(ec(o))return xm(o,!0,0)||vt;if(Wf(o)){const S=xr(o);return S?Yn(S):vt}if(iet(o)){const S=Zg(o);return S?Yn(S):vt}if(ta(o))return xm(o.parent,!0,0)||vt;if(Lge(o)){const S=Zg(o);if(S){const D=gl(S);return fe(D)?Yn(S):D}}return b7(o.parent)&&o.parent.keywordToken===o.kind?k0t(o.parent):LI(o)?$Re(!1):vt}function Pge(o){if(j.assert(o.kind===210||o.kind===209),o.parent.kind===250){const D=gte(o.parent);return HN(o,D||vt)}if(o.parent.kind===226){const D=Kf(o.parent.right);return HN(o,D||vt)}if(o.parent.kind===303){const D=ha(o.parent.parent,Aa),L=Pge(D)||vt,B=U6(D.properties,o.parent);return V0t(D,L,B)}const _=ha(o.parent,jf),y=Pge(_)||vt,S=iw(65,y,tt,o.parent)||vt;return H0t(_,y,_.elements.indexOf(o),S)}function Csi(o){const _=Pge(ha(o.parent.parent,S8));return _&&Ta(_,o.escapedText)}function O5e(o){return q8(o)&&(o=o.parent),Xh(Kf(o))}function iyt(o){const _=p_(o.parent);return pa(o)?Yn(_):gl(_)}function nyt(o){const _=o.name;switch(_.kind){case 80:return V_(Fr(_));case 9:case 11:return V_(_.text);case 167:const y=cy(_);return Gf(y,12288)?y:st;default:return j.fail("Unsupported property name.")}}function M5e(o){o=Kh(o);const _=_a(Ac(o)),y=ia(o,0).length?eg:ia(o,1).length?Ye:void 0;return y&&O(Ac(y),S=>{_.has(S.escapedName)||_.set(S.escapedName,S)}),gs(_)}function Age(o){return ia(o,0).length!==0||ia(o,1).length!==0}function ryt(o){const _=Ssi(o);return _?Rr(_,ryt):[o]}function Ssi(o){if(Iu(o)&6)return es(Ys(o).containingType.types,_=>Ta(_,o.escapedName));if(o.flags&33554432){const{links:{leftSpread:_,rightSpread:y,syntheticOrigin:S}}=o;return _?[_,y]:S?[S]:KL(wsi(o))}}function wsi(o){let _,y=o;for(;y=Ys(y).target;)_=y;return _}function xsi(o){if(zl(o))return!1;const _=Mo(o,ot);if(!_)return!1;const y=_.parent;return y?!((Nr(y)||_d(y))&&y.name===_)&&pU(_)===ut:!1}function ksi(o){return qW(o.parent)&&o===o.parent.name}function Tsi(o,_){var y;const S=Mo(o,ot);if(S){let D=pU(S,ksi(S));if(D){if(D.flags&1048576){const B=wc(D.exportSymbol);if(!_&&B.flags&944&&!(B.flags&3))return;D=B}const L=Qp(D);if(L){if(L.flags&512&&((y=L.valueDeclaration)==null?void 0:y.kind)===307){const B=L.valueDeclaration,K=_n(S);return B!==K?void 0:B}return Qi(S.parent,B=>qW(B)&&xr(B)===L)}}}}function Dsi(o){const _=SEe(o);if(_)return _;const y=Mo(o,ot);if(y){const S=zsi(y);if(PD(S,111551)&&!ey(S,111551))return Dh(S)}}function Esi(o){return o.valueDeclaration&&ec(o.valueDeclaration)&&YL(o.valueDeclaration).parent.kind===299}function syt(o){if(o.flags&418&&o.valueDeclaration&&!Os(o.valueDeclaration)){const _=Ys(o);if(_.isDeclarationWithCollidingName===void 0){const y=R0(o.valueDeclaration);if($2e(y)||Esi(o))if(_i(y.parent,o.escapedName,111551,void 0,!1))_.isDeclarationWithCollidingName=!0;else if(R5e(o.valueDeclaration,16384)){const S=R5e(o.valueDeclaration,32768),D=Zw(y,!1),L=y.kind===241&&Zw(y.parent,!1);_.isDeclarationWithCollidingName=!eTe(y)&&(!S||!D&&!L)}else _.isDeclarationWithCollidingName=!1}return _.isDeclarationWithCollidingName}return!1}function Isi(o){if(!zl(o)){const _=Mo(o,ot);if(_){const y=pU(_);if(y&&syt(y))return y.valueDeclaration}}}function Nsi(o){const _=Mo(o,Wf);if(_){const y=xr(_);if(y)return syt(y)}return!1}function oyt(o){switch(j.assert(dt),o.kind){case 271:return Oge(xr(o));case 273:case 274:case 276:case 281:const _=xr(o);return!!_&&Oge(_,!0);case 278:const y=o.exportClause;return!!y&&(jy(y)||Ft(y.elements,oyt));case 277:return o.expression&&o.expression.kind===80?Oge(xr(o),!0):!0}return!1}function Lsi(o){const _=Mo(o,Wd);return _===void 0||_.parent.kind!==307||!gI(_)?!1:Oge(xr(_))&&_.moduleReference&&!lu(_.moduleReference)}function Oge(o,_){if(!o)return!1;const y=_n(o.valueDeclaration),S=y&&xr(y);sp(S);const D=Rp($f(o));return D===pt?!_||!ey(o):!!(Eh(o,_,!0)&111551)&&(sx(Q)||!_U(D))}function _U(o){return r5e(o)||!!o.constEnumOnlyModule}function ayt(o,_){if(j.assert(dt),Xp(o)){const y=xr(o),S=y&&Ys(y);if(S!=null&&S.referenced)return!0;const D=Ys(y).aliasTarget;if(D&&jh(o)&32&&Eh(D)&111551&&(sx(Q)||!_U(D)))return!0}return _?!!Uo(o,y=>ayt(y,_)):!1}function cyt(o){if(Dg(o.body)){if(oS(o)||D1(o))return!1;const _=xr(o),y=$D(_);return y.length>1||y.length===1&&y[0].declaration!==o}return!1}function Psi(o){const _=Rge(o);if(!_)return!1;const y=Bs(_);return UO(y)}function Mge(o,_){return(Asi(o,_)||Osi(o))&&!Psi(o)}function Asi(o,_){return!we||cee(o)||Qm(o)||!o.initializer?!1:Zr(o,31)?!!_&&Qc(_):!0}function Osi(o){return we&&cee(o)&&(Qm(o)||!o.initializer)&&Zr(o,31)}function lyt(o){const _=Mo(o,S=>Wu(S)||_s(S));if(!_)return!1;let y;if(_s(_)){if(_.type||!nr(_)&&!mU(_))return!1;const S=A8(_);if(!S||!M0(S))return!1;y=xr(S)}else y=xr(_);return!y||!(y.flags&16|3)?!1:!!cf(__(y),S=>S.flags&111551&&PP(S.valueDeclaration))}function Msi(o){const _=Mo(o,Wu);if(!_)return w;const y=xr(_);return y&&Ac(Yn(y))||w}function a4(o){var _;const y=o.id||0;return y<0||y>=ll.length?0:((_=ll[y])==null?void 0:_.flags)||0}function R5e(o,_){return Rsi(o,_),!!(a4(o)&_)}function Rsi(o,_){if(!Q.noCheck&&r7(_n(o),Q)||yr(o).calculatedFlags&_)return;switch(_){case 16:case 32:return B(o);case 128:case 256:case 2097152:return L(o);case 512:case 8192:case 65536:case 262144:return ne(o);case 536870912:return ge(o);case 4096:case 32768:case 16384:return Be(o);default:return j.assertNever(_,`Unhandled node check flag calculation: ${j.formatNodeCheckFlags(_)}`)}function S(Vt,Kt){const Oi=Kt(Vt,Vt.parent);if(Oi!=="skip")return Oi||QP(Vt,Kt)}function D(Vt){const Kt=yr(Vt);if(Kt.calculatedFlags&_)return"skip";Kt.calculatedFlags|=2097536,B(Vt)}function L(Vt){S(Vt,D)}function B(Vt){const Kt=yr(Vt);Kt.calculatedFlags|=48,Vt.kind===108&&qme(Vt)}function K(Vt){const Kt=yr(Vt);if(Kt.calculatedFlags&_)return"skip";Kt.calculatedFlags|=336384,ge(Vt)}function ne(Vt){S(Vt,K)}function ce(Vt){return F0(Vt)||lh(Vt.parent)&&(Vt.parent.objectAssignmentInitializer??Vt.parent.name)===Vt}function ge(Vt){const Kt=yr(Vt);if(Kt.calculatedFlags|=536870912,ot(Vt)&&(Kt.calculatedFlags|=49152,ce(Vt)&&!(Nr(Vt.parent)&&Vt.parent.name===Vt))){const Oi=Lh(Vt);Oi&&Oi!==pt&&ugt(Vt,Oi)}}function je(Vt){const Kt=yr(Vt);if(Kt.calculatedFlags&_)return"skip";Kt.calculatedFlags|=53248,kt(Vt)}function Be(Vt){const Kt=R0(Wy(Vt)?Vt.parent:Vt);S(Kt,je)}function kt(Vt){ge(Vt),Ka(Vt)&&cy(Vt),Vs(Vt)&&Od(Vt.parent)&&mge(Vt.parent)}}function jN(o){return j1t(o.parent),yr(o).enumMemberValue??Rd(void 0)}function uyt(o){switch(o.kind){case 306:case 211:case 212:return!0}return!1}function F5e(o){if(o.kind===306)return jN(o).value;yr(o).resolvedSymbol||ju(o);const _=yr(o).resolvedSymbol||(pl(o)?nu(o,111551,!0):void 0);if(_&&_.flags&8){const y=_.valueDeclaration;if(Uk(y.parent))return jN(y).value}}function B5e(o){return!!(o.flags&524288)&&ia(o,0).length>0}function Fsi(o,_){var y;const S=Mo(o,E_);if(!S||_&&(_=Mo(_),!_))return 0;let D=!1;if(o_(S)){const ge=nu(K_(S),111551,!0,!0,_);D=!!((y=ge==null?void 0:ge.declarations)!=null&&y.every(Kw))}const L=nu(S,111551,!0,!0,_),B=L&&L.flags&2097152?$f(L):L;D||(D=!!(L&&ey(L,111551)));const K=nu(S,788968,!0,!0,_),ne=K&&K.flags&2097152?$f(K):K;if(L||D||(D=!!(K&&ey(K,788968))),B&&B===ne){const ge=JRe(!1);if(ge&&B===ge)return 9;const je=Yn(B);if(je&&gn(je))return D?10:1}if(!ne)return D?11:0;const ce=gl(ne);return fe(ce)?D?11:0:ce.flags&3?11:Gf(ce,245760)?2:Gf(ce,528)?6:Gf(ce,296)?3:Gf(ce,2112)?4:Gf(ce,402653316)?5:Qa(ce)?7:Gf(ce,12288)?8:B5e(ce)?10:ug(ce)?7:11}function Bsi(o,_,y,S,D){const L=Mo(o,_Te);if(!L)return G.createToken(133);const B=xr(L),K=B&&!(B.flags&133120)?J2(Yn(B)):vt;return We.serializeTypeForDeclaration(L,K,B,_,y|1024,S,D)}function Wsi(o){return Ho(o)||Il(o)||uP(o)}function Ste(o){o=Mo(o,FW);const _=o.kind===178?177:178,y=ql(xr(o),_),S=y&&y.pos<o.pos?y:o,D=y&&y.pos<o.pos?o:y,L=o.kind===178?o:y,B=o.kind===177?o:y;return{firstAccessor:S,secondAccessor:D,setAccessor:L,getAccessor:B}}function dyt(o){return Ho(o)&&!D1(o)?fyt(o):Il(o)?o.expression:o.initializer?o.initializer:$s(o)&&D1(o.parent)?fyt(Ste(o.parent).getAccessor):void 0}function fyt(o){let _;if(o&&!lu(o.body)){if(nd(o)&3)return;const y=o.body;y&&Xo(y)?uS(y,S=>{if(!_)_=S.expression;else return _=void 0,!0}):_=y}return _}function Vsi(o,_,y,S,D){const L=Mo(o,Ho);return L?We.serializeReturnTypeForSignature(Dm(L),_,y|1024,S,D):G.createToken(133)}function Hsi(o,_,y,S,D){const L=Mo(o,jt);if(!L)return G.createToken(133);const B=lp(O5e(L));return We.expressionOrTypeToTypeNode(L,B,void 0,_,y|1024,S,D)}function jsi(o){return $e.has(cu(o))}function pU(o,_){const y=yr(o).resolvedSymbol;if(y)return y;let S=o;if(_){const D=o.parent;Wf(D)&&o===D.name&&(S=bN(D))}return _i(S,o.escapedText,3257279,void 0,!0)}function zsi(o){const _=yr(o).resolvedSymbol;return _&&_!==pt?_:_i(o,o.escapedText,3257279,void 0,!0,void 0)}function Usi(o){if(!zl(o)){const _=Mo(o,ot);if(_){const y=pU(_);if(y)return Rp(y).valueDeclaration}}}function qsi(o){if(!zl(o)){const _=Mo(o,ot);if(_){const y=pU(_);if(y)return $t(Rp(y).declarations,S=>{switch(S.kind){case 260:case 169:case 208:case 172:case 303:case 304:case 306:case 210:case 262:case 218:case 219:case 263:case 231:case 266:case 174:case 177:case 178:case 267:return!0}return!1})}}}function $si(o){return tV(o)||_s(o)&&mU(o)?XD(Yn(xr(o))):!1}function Jsi(o,_,y){const S=o.flags&1056?We.symbolToExpression(o.symbol,111551,_,void 0,void 0,y):o===Pt?G.createTrue():o===ln&&G.createFalse();if(S)return S;const D=o.value;return typeof D=="object"?G.createBigIntLiteral(D):typeof D=="string"?G.createStringLiteral(D):D<0?G.createPrefixUnaryExpression(41,G.createNumericLiteral(-D)):G.createNumericLiteral(D)}function Gsi(o,_){const y=Yn(xr(o));return Jsi(y,o,_)}function hyt(o){return o?(Gy(o),_n(o).localJsxFactory||sb):sb}function W5e(o){if(o){const _=_n(o);if(_){if(_.localJsxFragmentFactory)return _.localJsxFragmentFactory;const y=_.pragmas.get("jsxfrag"),S=Ao(y)?y[0]:y;if(S)return _.localJsxFragmentFactory=YP(S.arguments.factory,re),_.localJsxFragmentFactory}}if(Q.jsxFragmentFactory)return YP(Q.jsxFragmentFactory,re)}function Rge(o){const _=dd(o);if(_)return _;if(o.kind===169&&o.parent.kind===178){const y=Ste(o.parent).getAccessor;if(y)return wp(y)}}function Ksi(o){const _=wp(o);if(_)return _;if(o.kind===177){const y=Ste(o).setAccessor;if(y){const S=a3(y);if(S)return dd(S)}}}function Xsi(){return{getReferencedExportContainer:Tsi,getReferencedImportDeclaration:Dsi,getReferencedDeclarationWithCollidingName:Isi,isDeclarationWithCollidingName:Nsi,isValueAliasDeclaration:_=>{const y=Mo(_);return y&&dt?oyt(y):!0},hasGlobalName:jsi,isReferencedAliasDeclaration:(_,y)=>{const S=Mo(_);return S&&dt?ayt(S,y):!0},hasNodeCheckFlag:(_,y)=>{const S=Mo(_);return S?R5e(S,y):!1},isTopLevelValueImportEqualsWithEntityName:Lsi,isDeclarationVisible:g0,isImplementationOfOverload:cyt,requiresAddingImplicitUndefined:Mge,isExpandoFunctionDeclaration:lyt,getPropertiesOfContainerFunction:Msi,createTypeOfDeclaration:Bsi,createReturnTypeOfSignatureDeclaration:Vsi,createTypeOfExpression:Hsi,createLiteralConstValue:Gsi,isSymbolAccessible:n1,isEntityNameVisible:yz,getConstantValue:_=>{const y=Mo(_,uyt);return y?F5e(y):void 0},getEnumMemberValue:_=>{const y=Mo(_,SS);return y?jN(y):void 0},collectLinkedAliases:NO,markLinkedReferences:_=>{const y=Mo(_);return y&&t4(y,0)},getReferencedValueDeclaration:Usi,getReferencedValueDeclarations:qsi,getTypeReferenceSerializationKind:Fsi,isOptionalParameter:cee,isArgumentsLocalBinding:xsi,getExternalModuleFileFromDeclaration:_=>{const y=Mo(_,nTe);return y&&V5e(y)},isLiteralConstDeclaration:$si,isLateBound:_=>{const y=Mo(_,Wf),S=y&&xr(y);return!!(S&&Iu(S)&4096)},getJsxFactoryEntity:hyt,getJsxFragmentFactoryEntity:W5e,isBindingCapturedByNode:(_,y)=>{const S=Mo(_),D=Mo(y);return!!S&&!!D&&(_s(D)||ec(D))&&fYt(S,D)},getDeclarationStatementsForSourceFile:(_,y,S,D)=>{const L=Mo(_);j.assert(L&&L.kind===307,"Non-sourcefile node passed into getDeclarationsForSourceFile");const B=xr(_);return B?(sp(B),B.exports?We.symbolTableToDeclarationStatements(B.exports,_,y,S,D):[]):_.locals?We.symbolTableToDeclarationStatements(_.locals,_,y,S,D):[]},isImportRequiredByAugmentation:o,isDefinitelyReferenceToGlobalSymbolObject:Xd};function o(_){const y=_n(_);if(!y.symbol)return!1;const S=V5e(_);if(!S||S===y)return!1;const D=ub(y.symbol);for(const L of as(D.values()))if(L.mergeId){const B=wc(L);if(B.declarations){for(const K of B.declarations)if(_n(K)===S)return!0}}return!1}}function V5e(o){const _=o.kind===267?Jr(o.name,Ha):fP(o),y=AD(_,_,void 0);if(y)return ql(y,307)}function Qsi(){for(const _ of t.getSourceFiles())vNe(_,Q);Pu=new Map;let o;for(const _ of t.getSourceFiles())if(!_.redirectInfo){if(!Cp(_)){const y=_.locals.get("globalThis");if(y!=null&&y.declarations)for(const S of y.declarations)lc.add(Kn(S,k.Declaration_name_conflicts_with_built_in_global_identifier_0,"globalThis"));Jg($e,_.locals)}_.jsGlobalAugmentations&&Jg($e,_.jsGlobalAugmentations),_.patternAmbientModules&&_.patternAmbientModules.length&&(Cu=Js(Cu,_.patternAmbientModules)),_.moduleAugmentations.length&&(o||(o=[])).push(_.moduleAugmentations),_.symbol&&_.symbol.globalExports&&_.symbol.globalExports.forEach((S,D)=>{$e.has(D)||$e.set(D,S)})}if(o)for(const _ of o)for(const y of _)Ry(y.parent)&&IA(y);if(WS(),Ys(et).type=Gt,Ys(ut).type=Su("IArguments",0,!0),Ys(pt).type=vt,Ys(Me).type=V(16,Me),li=Su("Array",1,!0),Qu=Su("Object",0,!0),kd=Su("Function",0,!0),eg=Ae&&Su("CallableFunction",0,!0)||kd,Ye=Ae&&Su("NewableFunction",0,!0)||kd,po=Su("String",0,!0),ic=Su("Number",0,!0),sc=Su("Boolean",0,!0),Hu=Su("RegExp",0,!0),Yc=hh(Je),Pc=hh(Rt),Pc===Jo&&(Pc=Xs(void 0,X,w,w,w)),En=rpt("ReadonlyArray",1)||li,od=En?q5(En,[Je]):Yc,Hd=rpt("ThisType",1),o)for(const _ of o)for(const y of _)Ry(y.parent)||IA(y);Pu.forEach(({firstFile:_,secondFile:y,conflictingSymbols:S})=>{if(S.size<8)S.forEach(({isBlockScoped:D,firstFileLocations:L,secondFileLocations:B},K)=>{const ne=D?k.Cannot_redeclare_block_scoped_variable_0:k.Duplicate_identifier_0;for(const ce of L)EA(ce,ne,K,B);for(const ce of B)EA(ce,ne,K,L)});else{const D=as(S.keys()).join(", ");lc.add(da(Kn(_,k.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0,D),Kn(y,k.Conflicts_are_in_this_file))),lc.add(da(Kn(y,k.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0,D),Kn(_,k.Conflicts_are_in_this_file)))}}),Pu=void 0}function zd(o,_){if(Q.importHelpers){const y=_n(o);if(aP(y,Q)&&!(o.flags&33554432)){const S=Ysi(y,o);if(S!==pt){const D=Ys(S);if(D.requestedExternalEmitHelpers??(D.requestedExternalEmitHelpers=0),(D.requestedExternalEmitHelpers&_)!==_){const L=_&~D.requestedExternalEmitHelpers;for(let B=1;B<=16777216;B<<=1)if(L&B)for(const K of Zsi(B)){const ne=Zu(ff(ub(S),cu(K),111551));ne?B&524288?Ft($D(ne),ce=>dp(ce)>3)||ft(o,k.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0,jk,K,4):B&1048576?Ft($D(ne),ce=>dp(ce)>4)||ft(o,k.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0,jk,K,5):B&1024&&(Ft($D(ne),ce=>dp(ce)>2)||ft(o,k.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0,jk,K,3)):ft(o,k.This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0,jk,K)}}D.requestedExternalEmitHelpers|=_}}}}function Zsi(o){switch(o){case 1:return["__extends"];case 2:return["__assign"];case 4:return["__rest"];case 8:return pe?["__decorate"]:["__esDecorate","__runInitializers"];case 16:return["__metadata"];case 32:return["__param"];case 64:return["__awaiter"];case 128:return["__generator"];case 256:return["__values"];case 512:return["__read"];case 1024:return["__spreadArray"];case 2048:return["__await"];case 4096:return["__asyncGenerator"];case 8192:return["__asyncDelegator"];case 16384:return["__asyncValues"];case 32768:return["__exportStar"];case 65536:return["__importStar"];case 131072:return["__importDefault"];case 262144:return["__makeTemplateObject"];case 524288:return["__classPrivateFieldGet"];case 1048576:return["__classPrivateFieldSet"];case 2097152:return["__classPrivateFieldIn"];case 4194304:return["__setFunctionName"];case 8388608:return["__propKey"];case 16777216:return["__addDisposableResource","__disposeResources"];default:return j.fail("Unrecognized helper")}}function Ysi(o,_){const y=yr(o);return y.externalHelpersModule||(y.externalHelpersModule=OA(Joi(o),jk,k.This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found,_)||pt),y.externalHelpersModule}function bb(o){var _;const y=ioi(o)||eoi(o);if(y!==void 0)return y;if($s(o)&&JT(o))return Df(o,k.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters);const S=Lu(o)?o.declarationList.flags&7:0;let D,L,B,K,ne,ce=0,ge=!1,je=!1;for(const Be of o.modifiers)if(Fd(Be)){if(lV(pe,o,o.parent,o.parent.parent)){if(pe&&(o.kind===177||o.kind===178)){const kt=Ste(o);if(lm(kt.firstAccessor)&&o===kt.secondAccessor)return Df(o,k.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name)}}else return o.kind===174&&!Dg(o.body)?Df(o,k.A_decorator_can_only_decorate_a_method_implementation_not_an_overload):Df(o,k.Decorators_are_not_valid_here);if(ce&-34849)return sn(Be,k.Decorators_are_not_valid_here);if(je&&ce&98303){j.assertIsDefined(ne);const kt=_n(Be);return tk(kt)?!1:(da(ft(Be,k.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export),Kn(ne,k.Decorator_used_before_export_here)),!0)}ce|=32768,ce&98303?ce&32&&(ge=!0):je=!0,ne??(ne=Be)}else{if(Be.kind!==148){if(o.kind===171||o.kind===173)return sn(Be,k._0_modifier_cannot_appear_on_a_type_member,xa(Be.kind));if(o.kind===181&&(Be.kind!==126||!ss(o.parent)))return sn(Be,k._0_modifier_cannot_appear_on_an_index_signature,xa(Be.kind))}if(Be.kind!==103&&Be.kind!==147&&Be.kind!==87&&o.kind===168)return sn(Be,k._0_modifier_cannot_appear_on_a_type_parameter,xa(Be.kind));switch(Be.kind){case 87:{if(o.kind!==266&&o.kind!==168)return sn(o,k.A_class_member_cannot_have_the_0_keyword,xa(87));const Kt=Rg(o.parent)&&Gk(o.parent)||o.parent;if(o.kind===168&&!(Qc(Kt)||ss(Kt)||Hy(Kt)||v3(Kt)||VP(Kt)||fH(Kt)||W1(Kt)))return sn(Be,k._0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class,xa(Be.kind));break}case 164:if(ce&16)return sn(Be,k._0_modifier_already_seen,"override");if(ce&128)return sn(Be,k._0_modifier_cannot_be_used_with_1_modifier,"override","declare");if(ce&8)return sn(Be,k._0_modifier_must_precede_1_modifier,"override","readonly");if(ce&512)return sn(Be,k._0_modifier_must_precede_1_modifier,"override","accessor");if(ce&1024)return sn(Be,k._0_modifier_must_precede_1_modifier,"override","async");ce|=16,K=Be;break;case 125:case 124:case 123:const kt=R5(CP(Be.kind));if(ce&7)return sn(Be,k.Accessibility_modifier_already_seen);if(ce&16)return sn(Be,k._0_modifier_must_precede_1_modifier,kt,"override");if(ce&256)return sn(Be,k._0_modifier_must_precede_1_modifier,kt,"static");if(ce&512)return sn(Be,k._0_modifier_must_precede_1_modifier,kt,"accessor");if(ce&8)return sn(Be,k._0_modifier_must_precede_1_modifier,kt,"readonly");if(ce&1024)return sn(Be,k._0_modifier_must_precede_1_modifier,kt,"async");if(o.parent.kind===268||o.parent.kind===307)return sn(Be,k._0_modifier_cannot_appear_on_a_module_or_namespace_element,kt);if(ce&64)return Be.kind===123?sn(Be,k._0_modifier_cannot_be_used_with_1_modifier,kt,"abstract"):sn(Be,k._0_modifier_must_precede_1_modifier,kt,"abstract");if(Wh(o))return sn(Be,k.An_accessibility_modifier_cannot_be_used_with_a_private_identifier);ce|=CP(Be.kind);break;case 126:if(ce&256)return sn(Be,k._0_modifier_already_seen,"static");if(ce&8)return sn(Be,k._0_modifier_must_precede_1_modifier,"static","readonly");if(ce&1024)return sn(Be,k._0_modifier_must_precede_1_modifier,"static","async");if(ce&512)return sn(Be,k._0_modifier_must_precede_1_modifier,"static","accessor");if(o.parent.kind===268||o.parent.kind===307)return sn(Be,k._0_modifier_cannot_appear_on_a_module_or_namespace_element,"static");if(o.kind===169)return sn(Be,k._0_modifier_cannot_appear_on_a_parameter,"static");if(ce&64)return sn(Be,k._0_modifier_cannot_be_used_with_1_modifier,"static","abstract");if(ce&16)return sn(Be,k._0_modifier_must_precede_1_modifier,"static","override");ce|=256,D=Be;break;case 129:if(ce&512)return sn(Be,k._0_modifier_already_seen,"accessor");if(ce&8)return sn(Be,k._0_modifier_cannot_be_used_with_1_modifier,"accessor","readonly");if(ce&128)return sn(Be,k._0_modifier_cannot_be_used_with_1_modifier,"accessor","declare");if(o.kind!==172)return sn(Be,k.accessor_modifier_can_only_appear_on_a_property_declaration);ce|=512;break;case 148:if(ce&8)return sn(Be,k._0_modifier_already_seen,"readonly");if(o.kind!==172&&o.kind!==171&&o.kind!==181&&o.kind!==169)return sn(Be,k.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature);if(ce&512)return sn(Be,k._0_modifier_cannot_be_used_with_1_modifier,"readonly","accessor");ce|=8;break;case 95:if(Q.verbatimModuleSyntax&&!(o.flags&33554432)&&o.kind!==265&&o.kind!==264&&o.kind!==267&&o.parent.kind===307&&t.getEmitModuleFormatOfFile(_n(o))===1)return sn(Be,k.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);if(ce&32)return sn(Be,k._0_modifier_already_seen,"export");if(ce&128)return sn(Be,k._0_modifier_must_precede_1_modifier,"export","declare");if(ce&64)return sn(Be,k._0_modifier_must_precede_1_modifier,"export","abstract");if(ce&1024)return sn(Be,k._0_modifier_must_precede_1_modifier,"export","async");if(ss(o.parent))return sn(Be,k._0_modifier_cannot_appear_on_class_elements_of_this_kind,"export");if(o.kind===169)return sn(Be,k._0_modifier_cannot_appear_on_a_parameter,"export");if(S===4)return sn(Be,k._0_modifier_cannot_appear_on_a_using_declaration,"export");if(S===6)return sn(Be,k._0_modifier_cannot_appear_on_an_await_using_declaration,"export");ce|=32;break;case 90:const Vt=o.parent.kind===307?o.parent:o.parent.parent;if(Vt.kind===267&&!Vh(Vt))return sn(Be,k.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);if(S===4)return sn(Be,k._0_modifier_cannot_appear_on_a_using_declaration,"default");if(S===6)return sn(Be,k._0_modifier_cannot_appear_on_an_await_using_declaration,"default");if(ce&32){if(ge)return sn(ne,k.Decorators_are_not_valid_here)}else return sn(Be,k._0_modifier_must_precede_1_modifier,"export","default");ce|=2048;break;case 138:if(ce&128)return sn(Be,k._0_modifier_already_seen,"declare");if(ce&1024)return sn(Be,k._0_modifier_cannot_be_used_in_an_ambient_context,"async");if(ce&16)return sn(Be,k._0_modifier_cannot_be_used_in_an_ambient_context,"override");if(ss(o.parent)&&!Lo(o))return sn(Be,k._0_modifier_cannot_appear_on_class_elements_of_this_kind,"declare");if(o.kind===169)return sn(Be,k._0_modifier_cannot_appear_on_a_parameter,"declare");if(S===4)return sn(Be,k._0_modifier_cannot_appear_on_a_using_declaration,"declare");if(S===6)return sn(Be,k._0_modifier_cannot_appear_on_an_await_using_declaration,"declare");if(o.parent.flags&33554432&&o.parent.kind===268)return sn(Be,k.A_declare_modifier_cannot_be_used_in_an_already_ambient_context);if(Wh(o))return sn(Be,k._0_modifier_cannot_be_used_with_a_private_identifier,"declare");if(ce&512)return sn(Be,k._0_modifier_cannot_be_used_with_1_modifier,"declare","accessor");ce|=128,L=Be;break;case 128:if(ce&64)return sn(Be,k._0_modifier_already_seen,"abstract");if(o.kind!==263&&o.kind!==185){if(o.kind!==174&&o.kind!==172&&o.kind!==177&&o.kind!==178)return sn(Be,k.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration);if(!(o.parent.kind===263&&Zr(o.parent,64))){const Kt=o.kind===172?k.Abstract_properties_can_only_appear_within_an_abstract_class:k.Abstract_methods_can_only_appear_within_an_abstract_class;return sn(Be,Kt)}if(ce&256)return sn(Be,k._0_modifier_cannot_be_used_with_1_modifier,"static","abstract");if(ce&2)return sn(Be,k._0_modifier_cannot_be_used_with_1_modifier,"private","abstract");if(ce&1024&&B)return sn(B,k._0_modifier_cannot_be_used_with_1_modifier,"async","abstract");if(ce&16)return sn(Be,k._0_modifier_must_precede_1_modifier,"abstract","override");if(ce&512)return sn(Be,k._0_modifier_must_precede_1_modifier,"abstract","accessor")}if(Bf(o)&&o.name.kind===81)return sn(Be,k._0_modifier_cannot_be_used_with_a_private_identifier,"abstract");ce|=64;break;case 134:if(ce&1024)return sn(Be,k._0_modifier_already_seen,"async");if(ce&128||o.parent.flags&33554432)return sn(Be,k._0_modifier_cannot_be_used_in_an_ambient_context,"async");if(o.kind===169)return sn(Be,k._0_modifier_cannot_appear_on_a_parameter,"async");if(ce&64)return sn(Be,k._0_modifier_cannot_be_used_with_1_modifier,"async","abstract");ce|=1024,B=Be;break;case 103:case 147:{const Kt=Be.kind===103?8192:16384,Oi=Be.kind===103?"in":"out",Ki=Rg(o.parent)&&(Gk(o.parent)||Fe((_=t3(o.parent))==null?void 0:_.tags,MI))||o.parent;if(o.kind!==168||Ki&&!(zf(Ki)||ss(Ki)||Mg(Ki)||MI(Ki)))return sn(Be,k._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias,Oi);if(ce&Kt)return sn(Be,k._0_modifier_already_seen,Oi);if(Kt&8192&&ce&16384)return sn(Be,k._0_modifier_must_precede_1_modifier,"in","out");ce|=Kt;break}}}return o.kind===176?ce&256?sn(D,k._0_modifier_cannot_appear_on_a_constructor_declaration,"static"):ce&16?sn(K,k._0_modifier_cannot_appear_on_a_constructor_declaration,"override"):ce&1024?sn(B,k._0_modifier_cannot_appear_on_a_constructor_declaration,"async"):!1:(o.kind===272||o.kind===271)&&ce&128?sn(L,k.A_0_modifier_cannot_be_used_with_an_import_declaration,"declare"):o.kind===169&&ce&31&&ta(o.name)?sn(o,k.A_parameter_property_may_not_be_declared_using_a_binding_pattern):o.kind===169&&ce&31&&o.dotDotDotToken?sn(o,k.A_parameter_property_cannot_be_declared_using_a_rest_parameter):ce&1024?roi(o,B):!1}function eoi(o){if(!o.modifiers)return!1;const _=toi(o);return _&&Df(_,k.Modifiers_cannot_appear_here)}function Fge(o,_){const y=Fe(o.modifiers,Fa);return y&&y.kind!==_?y:void 0}function toi(o){switch(o.kind){case 177:case 178:case 176:case 172:case 171:case 174:case 173:case 181:case 267:case 272:case 271:case 278:case 277:case 218:case 219:case 169:case 168:return;case 175:case 303:case 304:case 270:case 282:return Fe(o.modifiers,Fa);default:if(o.parent.kind===268||o.parent.kind===307)return;switch(o.kind){case 262:return Fge(o,134);case 263:case 185:return Fge(o,128);case 231:case 264:case 265:return Fe(o.modifiers,Fa);case 243:return o.declarationList.flags&4?Fge(o,135):Fe(o.modifiers,Fa);case 266:return Fge(o,87);default:j.assertNever(o)}}}function ioi(o){const _=noi(o);return _&&Df(_,k.Decorators_are_not_valid_here)}function noi(o){return Fle(o)?Fe(o.modifiers,Fd):void 0}function roi(o,_){switch(o.kind){case 174:case 262:case 218:case 219:return!1}return sn(_,k._0_modifier_cannot_be_used_here,"async")}function c4(o,_=k.Trailing_comma_not_allowed){return o&&o.hasTrailingComma?sE(o[0],o.end-1,1,_):!1}function _yt(o,_){if(o&&o.length===0){const y=o.pos-1,S=Va(_.text,o.end)+1;return sE(_,y,S-y,k.Type_parameter_list_cannot_be_empty)}return!1}function soi(o){let _=!1;const y=o.length;for(let S=0;S<y;S++){const D=o[S];if(D.dotDotDotToken){if(S!==y-1)return sn(D.dotDotDotToken,k.A_rest_parameter_must_be_last_in_a_parameter_list);if(D.flags&33554432||c4(o,k.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma),D.questionToken)return sn(D.questionToken,k.A_rest_parameter_cannot_be_optional);if(D.initializer)return sn(D.name,k.A_rest_parameter_cannot_have_an_initializer)}else if(ORe(D)){if(_=!0,D.questionToken&&D.initializer)return sn(D.name,k.Parameter_cannot_have_question_mark_and_initializer)}else if(_&&!D.initializer)return sn(D.name,k.A_required_parameter_cannot_follow_an_optional_parameter)}}function ooi(o){return $t(o,_=>!!_.initializer||ta(_.name)||Oy(_))}function aoi(o){if(re>=3){const _=o.body&&Xo(o.body)&&Ale(o.body.statements);if(_){const y=ooi(o.parameters);if(P(y)){O(y,D=>{da(ft(D,k.This_parameter_is_not_allowed_with_use_strict_directive),Kn(_,k.use_strict_directive_used_here))});const S=y.map((D,L)=>L===0?Kn(D,k.Non_simple_parameter_declared_here):Kn(D,k.and_here));return da(ft(_,k.use_strict_directive_cannot_be_used_with_non_simple_parameter_list),...S),!0}}}return!1}function Bge(o){const _=_n(o);return bb(o)||_yt(o.typeParameters,_)||soi(o.parameters)||loi(o,_)||Qc(o)&&aoi(o)}function coi(o){const _=_n(o);return _oi(o)||_yt(o.typeParameters,_)}function loi(o,_){if(!xl(o))return!1;o.typeParameters&&!(P(o.typeParameters)>1||o.typeParameters.hasTrailingComma||o.typeParameters[0].constraint)&&_&&Ru(_.fileName,[".mts",".cts"])&&sn(o.typeParameters[0],k.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint);const{equalsGreaterThanToken:y}=o,S=Ia(_,y.pos).line,D=Ia(_,y.end).line;return S!==D&&sn(y,k.Line_terminator_not_permitted_before_arrow)}function uoi(o){const _=o.parameters[0];if(o.parameters.length!==1)return sn(_?_.name:o,k.An_index_signature_must_have_exactly_one_parameter);if(c4(o.parameters,k.An_index_signature_cannot_have_a_trailing_comma),_.dotDotDotToken)return sn(_.dotDotDotToken,k.An_index_signature_cannot_have_a_rest_parameter);if(dce(_))return sn(_.name,k.An_index_signature_parameter_cannot_have_an_accessibility_modifier);if(_.questionToken)return sn(_.questionToken,k.An_index_signature_parameter_cannot_have_a_question_mark);if(_.initializer)return sn(_.name,k.An_index_signature_parameter_cannot_have_an_initializer);if(!_.type)return sn(_.name,k.An_index_signature_parameter_must_have_a_type_annotation);const y=Bs(_.type);return dg(y,S=>!!(S.flags&8576))||GA(y)?sn(_.name,k.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead):up(y,eme)?o.type?!1:sn(o,k.An_index_signature_must_have_a_type_annotation):sn(_.name,k.An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type)}function doi(o){return bb(o)||uoi(o)}function foi(o,_){if(_&&_.length===0){const y=_n(o),S=_.pos-1,D=Va(y.text,_.end)+1;return sE(y,S,D-S,k.Type_argument_list_cannot_be_empty)}return!1}function wte(o,_){return c4(_)||foi(o,_)}function hoi(o){return o.questionDotToken||o.flags&64?sn(o.template,k.Tagged_template_expressions_are_not_permitted_in_an_optional_chain):!1}function pyt(o){const _=o.types;if(c4(_))return!0;if(_&&_.length===0){const y=xa(o.token);return sE(o,_.pos,0,k._0_list_cannot_be_empty,y)}return Ft(_,myt)}function myt(o){return Yb(o)&&y7(o.expression)&&o.typeArguments?sn(o,k.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments):wte(o,o.typeArguments)}function _oi(o){let _=!1,y=!1;if(!bb(o)&&o.heritageClauses)for(const S of o.heritageClauses){if(S.token===96){if(_)return Df(S,k.extends_clause_already_seen);if(y)return Df(S,k.extends_clause_must_precede_implements_clause);if(S.types.length>1)return Df(S.types[1],k.Classes_can_only_extend_a_single_class);_=!0}else{if(j.assert(S.token===119),y)return Df(S,k.implements_clause_already_seen);y=!0}pyt(S)}}function poi(o){let _=!1;if(o.heritageClauses)for(const y of o.heritageClauses){if(y.token===96){if(_)return Df(y,k.extends_clause_already_seen);_=!0}else return j.assert(y.token===119),Df(y,k.Interface_declaration_cannot_have_implements_clause);pyt(y)}return!1}function Wge(o){if(o.kind!==167)return!1;const _=o;return _.expression.kind===226&&_.expression.operatorToken.kind===28?sn(_.expression,k.A_comma_expression_is_not_allowed_in_a_computed_property_name):!1}function H5e(o){if(o.asteriskToken){if(j.assert(o.kind===262||o.kind===218||o.kind===174),o.flags&33554432)return sn(o.asteriskToken,k.Generators_are_not_allowed_in_an_ambient_context);if(!o.body)return sn(o.asteriskToken,k.An_overload_signature_cannot_be_declared_as_a_generator)}}function j5e(o,_){return!!o&&sn(o,_)}function gyt(o,_){return!!o&&sn(o,_)}function moi(o,_){const y=new Map;for(const S of o.properties){if(S.kind===305){if(_){const B=Dc(S.expression);if(jf(B)||Aa(B))return sn(S.expression,k.A_rest_element_cannot_contain_a_binding_pattern)}continue}const D=S.name;if(D.kind===167&&Wge(D),S.kind===304&&!_&&S.objectAssignmentInitializer&&sn(S.equalsToken,k.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern),D.kind===81&&sn(D,k.Private_identifiers_are_not_allowed_outside_class_bodies),Fg(S)&&S.modifiers)for(const B of S.modifiers)Fa(B)&&(B.kind!==134||S.kind!==174)&&sn(B,k._0_modifier_cannot_be_used_here,uu(B));else if(cIe(S)&&S.modifiers)for(const B of S.modifiers)Fa(B)&&sn(B,k._0_modifier_cannot_be_used_here,uu(B));let L;switch(S.kind){case 304:case 303:gyt(S.exclamationToken,k.A_definite_assignment_assertion_is_not_permitted_in_this_context),j5e(S.questionToken,k.An_object_member_cannot_be_declared_optional),D.kind===9&&Tyt(D),D.kind===10&&Z0(!0,Kn(D,k.A_bigint_literal_cannot_be_used_as_a_property_name)),L=4;break;case 174:L=8;break;case 177:L=1;break;case 178:L=2;break;default:j.assertNever(S,"Unexpected syntax kind:"+S.kind)}if(!_){const B=q5e(D);if(B===void 0)continue;const K=y.get(B);if(!K)y.set(B,L);else if(L&8&&K&8)sn(D,k.Duplicate_identifier_0,uu(D));else if(L&4&&K&4)sn(D,k.An_object_literal_cannot_have_multiple_properties_with_the_same_name,uu(D));else if(L&3&&K&3)if(K!==3&&L!==K)y.set(B,L|K);else return sn(D,k.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name);else return sn(D,k.An_object_literal_cannot_have_property_and_accessor_with_the_same_name)}}}function goi(o){yoi(o.tagName),wte(o,o.typeArguments);const _=new Map;for(const y of o.attributes.properties){if(y.kind===293)continue;const{name:S,initializer:D}=y,L=u7(S);if(!_.get(L))_.set(L,!0);else return sn(S,k.JSX_elements_cannot_have_multiple_attributes_with_the_same_name);if(D&&D.kind===294&&!D.expression)return sn(D,k.JSX_attributes_must_only_be_assigned_a_non_empty_expression)}}function yoi(o){if(Nr(o)&&j0(o.expression))return sn(o.expression,k.JSX_property_access_expressions_cannot_include_JSX_namespace_names);if(j0(o)&&WK(Q)&&!s3(o.namespace.escapedText))return sn(o,k.React_components_cannot_include_JSX_namespace_names)}function voi(o){if(o.expression&&I7(o.expression))return sn(o.expression,k.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array)}function yyt(o){if(PC(o))return!0;if(o.kind===250&&o.awaitModifier&&!(o.flags&65536)){const _=_n(o);if(JG(o)){if(!tk(_))switch(aP(_,Q)||lc.add(Kn(o.awaitModifier,k.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module)),oe){case 100:case 199:if(_.impliedNodeFormat===1){lc.add(Kn(o.awaitModifier,k.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level));break}case 7:case 99:case 200:case 4:if(re>=4)break;default:lc.add(Kn(o.awaitModifier,k.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher));break}}else if(!tk(_)){const y=Kn(o.awaitModifier,k.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules),S=Up(o);if(S&&S.kind!==176){j.assert((nd(S)&2)===0,"Enclosing function should never be an async function.");const D=Kn(S,k.Did_you_mean_to_mark_this_function_as_async);da(y,D)}return lc.add(y),!0}}if(_H(o)&&!(o.flags&65536)&&ot(o.initializer)&&o.initializer.escapedText==="async")return sn(o.initializer,k.The_left_hand_side_of_a_for_of_statement_may_not_be_async),!1;if(o.initializer.kind===261){const _=o.initializer;if(!U5e(_)){const y=_.declarations;if(!y.length)return!1;if(y.length>1){const D=o.kind===249?k.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:k.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement;return Df(_.declarations[1],D)}const S=y[0];if(S.initializer){const D=o.kind===249?k.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:k.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer;return sn(S.name,D)}if(S.type){const D=o.kind===249?k.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:k.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation;return sn(S,D)}}}return!1}function boi(o){if(!(o.flags&33554432)&&o.parent.kind!==187&&o.parent.kind!==264){if(re<2&&Vs(o.name))return sn(o.name,k.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(o.body===void 0&&!Zr(o,64))return sE(o,o.end-1,1,k._0_expected,"{")}if(o.body){if(Zr(o,64))return sn(o,k.An_abstract_accessor_cannot_have_an_implementation);if(o.parent.kind===187||o.parent.kind===264)return sn(o.body,k.An_implementation_cannot_be_declared_in_ambient_contexts)}if(o.typeParameters)return sn(o.name,k.An_accessor_cannot_have_type_parameters);if(!Coi(o))return sn(o.name,o.kind===177?k.A_get_accessor_cannot_have_parameters:k.A_set_accessor_must_have_exactly_one_parameter);if(o.kind===178){if(o.type)return sn(o.name,k.A_set_accessor_cannot_have_a_return_type_annotation);const _=j.checkDefined(a3(o),"Return value does not match parameter count assertion.");if(_.dotDotDotToken)return sn(_.dotDotDotToken,k.A_set_accessor_cannot_have_rest_parameter);if(_.questionToken)return sn(_.questionToken,k.A_set_accessor_cannot_have_an_optional_parameter);if(_.initializer)return sn(o.name,k.A_set_accessor_parameter_cannot_have_an_initializer)}return!1}function Coi(o){return z5e(o)||o.parameters.length===(o.kind===177?0:1)}function z5e(o){if(o.parameters.length===(o.kind===177?1:2))return $T(o)}function Soi(o){if(o.operator===158){if(o.type.kind!==155)return sn(o.type,k._0_expected,xa(155));let _=TV(o.parent);if(nr(_)&&o2(_)){const y=zT(_);y&&(_=pP(y)||y)}switch(_.kind){case 260:const y=_;if(y.name.kind!==80)return sn(o,k.unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name);if(!E8(y))return sn(o,k.unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement);if(!(y.parent.flags&2))return sn(_.name,k.A_variable_whose_type_is_a_unique_symbol_type_must_be_const);break;case 172:if(!pa(_)||!z8(_))return sn(_.name,k.A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly);break;case 171:if(!Zr(_,8))return sn(_.name,k.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly);break;default:return sn(o,k.unique_symbol_types_are_not_allowed_here)}}else if(o.operator===148&&o.type.kind!==188&&o.type.kind!==189)return Df(o,k.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types,xa(155))}function aF(o,_){if(TGt(o))return sn(o,_)}function vyt(o){if(Bge(o))return!0;if(o.kind===174){if(o.parent.kind===210){if(o.modifiers&&!(o.modifiers.length===1&&ya(o.modifiers).kind===134))return Df(o,k.Modifiers_cannot_appear_here);if(j5e(o.questionToken,k.An_object_member_cannot_be_declared_optional))return!0;if(gyt(o.exclamationToken,k.A_definite_assignment_assertion_is_not_permitted_in_this_context))return!0;if(o.body===void 0)return sE(o,o.end-1,1,k._0_expected,"{")}if(H5e(o))return!0}if(ss(o.parent)){if(re<2&&Vs(o.name))return sn(o.name,k.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(o.flags&33554432)return aF(o.name,k.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(o.kind===174&&!o.body)return aF(o.name,k.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}else{if(o.parent.kind===264)return aF(o.name,k.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(o.parent.kind===187)return aF(o.name,k.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}}function woi(o){let _=o;for(;_;){if(B6(_))return sn(o,k.Jump_target_cannot_cross_function_boundary);switch(_.kind){case 256:if(o.label&&_.label.escapedText===o.label.escapedText)return o.kind===251&&!Zw(_.statement,!0)?sn(o,k.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement):!1;break;case 255:if(o.kind===252&&!o.label)return!1;break;default:if(Zw(_,!1)&&!o.label)return!1;break}_=_.parent}if(o.label){const y=o.kind===252?k.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:k.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement;return sn(o,y)}else{const y=o.kind===252?k.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:k.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement;return sn(o,y)}}function xoi(o){if(o.dotDotDotToken){const _=o.parent.elements;if(o!==va(_))return sn(o,k.A_rest_element_must_be_last_in_a_destructuring_pattern);if(c4(_,k.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma),o.propertyName)return sn(o.name,k.A_rest_element_cannot_have_a_property_name)}if(o.dotDotDotToken&&o.initializer)return sE(o,o.initializer.pos-1,1,k.A_rest_element_cannot_have_an_initializer)}function byt(o){return cm(o)||o.kind===224&&o.operator===41&&o.operand.kind===9}function koi(o){return o.kind===10||o.kind===224&&o.operator===41&&o.operand.kind===10}function Toi(o){if((Nr(o)||wl(o)&&byt(o.argumentExpression))&&pl(o.expression))return!!(ju(o).flags&1056)}function Cyt(o){const _=o.initializer;if(_){const y=!(byt(_)||Toi(_)||_.kind===112||_.kind===97||koi(_));if((tV(o)||_s(o)&&mU(o))&&!o.type){if(y)return sn(_,k.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference)}else return sn(_,k.Initializers_are_not_allowed_in_ambient_contexts)}}function Doi(o){const _=oE(o),y=_&7;if(ta(o.name))switch(y){case 6:return sn(o,k._0_declarations_may_not_have_binding_patterns,"await using");case 4:return sn(o,k._0_declarations_may_not_have_binding_patterns,"using")}if(o.parent.parent.kind!==249&&o.parent.parent.kind!==250){if(_&33554432)Cyt(o);else if(!o.initializer){if(ta(o.name)&&!ta(o.parent))return sn(o,k.A_destructuring_declaration_must_have_an_initializer);switch(y){case 6:return sn(o,k._0_declarations_must_be_initialized,"await using");case 4:return sn(o,k._0_declarations_must_be_initialized,"using");case 2:return sn(o,k._0_declarations_must_be_initialized,"const")}}}if(o.exclamationToken&&(o.parent.parent.kind!==243||!o.type||o.initializer||_&33554432)){const S=o.initializer?k.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions:o.type?k.A_definite_assignment_assertion_is_not_permitted_in_this_context:k.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations;return sn(o.exclamationToken,S)}return t.getEmitModuleFormatOfFile(_n(o))<4&&!(o.parent.parent.flags&33554432)&&Zr(o.parent.parent,32)&&Syt(o.name),!!y&&wyt(o.name)}function Syt(o){if(o.kind===80){if(Fr(o)==="__esModule")return Noi("noEmit",o,k.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules)}else{const _=o.elements;for(const y of _)if(!Bd(y))return Syt(y.name)}return!1}function wyt(o){if(o.kind===80){if(o.escapedText==="let")return sn(o,k.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations)}else{const _=o.elements;for(const y of _)Bd(y)||wyt(y.name)}return!1}function U5e(o){const _=o.declarations;if(c4(o.declarations))return!0;if(!o.declarations.length)return sE(o,_.pos,_.end-_.pos,k.Variable_declaration_list_cannot_be_empty);const y=o.flags&7;return(y===4||y===6)&&xX(o.parent)?sn(o,y===4?k.The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration:k.The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration):y===6?W0t(o):!1}function xyt(o){switch(o.kind){case 245:case 246:case 247:case 254:case 248:case 249:case 250:return!1;case 256:return xyt(o.parent)}return!0}function Eoi(o){if(!xyt(o.parent)){const _=oE(o.declarationList)&7;if(_){const y=_===1?"let":_===2?"const":_===4?"using":_===6?"await using":j.fail("Unknown BlockScope flag");return sn(o,k._0_declarations_can_only_be_declared_inside_a_block,y)}}}function Ioi(o){const _=o.name.escapedText;switch(o.keywordToken){case 105:if(_!=="target")return sn(o.name,k._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2,Ws(o.name.escapedText),xa(o.keywordToken),"target");break;case 102:if(_!=="meta")return sn(o.name,k._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2,Ws(o.name.escapedText),xa(o.keywordToken),"meta");break}}function tk(o){return o.parseDiagnostics.length>0}function Df(o,_,...y){const S=_n(o);if(!tk(S)){const D=E1(S,o.pos);return lc.add(Md(S,D.start,D.length,_,...y)),!0}return!1}function sE(o,_,y,S,...D){const L=_n(o);return tk(L)?!1:(lc.add(Md(L,_,y,S,...D)),!0)}function Noi(o,_,y,...S){const D=_n(_);return tk(D)?!1:(I2(o,_,y,...S),!0)}function sn(o,_,...y){const S=_n(o);return tk(S)?!1:(lc.add(Kn(o,_,...y)),!0)}function Loi(o){const _=nr(o)?vK(o):void 0,y=o.typeParameters||_&&Ra(_);if(y){const S=y.pos===y.end?y.pos:Va(_n(o).text,y.pos);return sE(o,S,y.end-S,k.Type_parameters_cannot_appear_on_a_constructor_declaration)}}function Poi(o){const _=o.type||wp(o);if(_)return sn(_,k.Type_annotation_cannot_appear_on_a_constructor_declaration)}function Aoi(o){if(Ka(o.name)&&ur(o.name.expression)&&o.name.expression.operatorToken.kind===103)return sn(o.parent.members[0],k.A_mapped_type_may_not_declare_properties_or_methods);if(ss(o.parent)){if(Ha(o.name)&&o.name.text==="constructor")return sn(o.name,k.Classes_may_not_have_a_field_named_constructor);if(aF(o.name,k.A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type))return!0;if(re<2&&Vs(o.name))return sn(o.name,k.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(re<2&&I_(o))return sn(o.name,k.Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(I_(o)&&j5e(o.questionToken,k.An_accessor_property_cannot_be_declared_optional))return!0}else if(o.parent.kind===264){if(aF(o.name,k.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type))return!0;if(j.assertNode(o,O_),o.initializer)return sn(o.initializer,k.An_interface_property_cannot_have_an_initializer)}else if(a_(o.parent)){if(aF(o.name,k.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type))return!0;if(j.assertNode(o,O_),o.initializer)return sn(o.initializer,k.A_type_literal_property_cannot_have_an_initializer)}if(o.flags&33554432&&Cyt(o),Lo(o)&&o.exclamationToken&&(!ss(o.parent)||!o.type||o.initializer||o.flags&33554432||pa(o)||KT(o))){const _=o.initializer?k.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions:o.type?k.A_definite_assignment_assertion_is_not_permitted_in_this_context:k.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations;return sn(o.exclamationToken,_)}}function Ooi(o){return o.kind===264||o.kind===265||o.kind===272||o.kind===271||o.kind===278||o.kind===277||o.kind===270||Zr(o,2208)?!1:Df(o,k.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier)}function Moi(o){for(const _ of o.statements)if((Wf(_)||_.kind===243)&&Ooi(_))return!0;return!1}function kyt(o){return!!(o.flags&33554432)&&Moi(o)}function PC(o){if(o.flags&33554432){if(!yr(o).hasReportedStatementInAmbientContext&&(Ho(o.parent)||Qw(o.parent)))return yr(o).hasReportedStatementInAmbientContext=Df(o,k.An_implementation_cannot_be_declared_in_ambient_contexts);if(o.parent.kind===241||o.parent.kind===268||o.parent.kind===307){const y=yr(o.parent);if(!y.hasReportedStatementInAmbientContext)return y.hasReportedStatementInAmbientContext=Df(o,k.Statements_are_not_allowed_in_ambient_contexts)}}return!1}function Tyt(o){const _=uu(o).includes("."),y=o.numericLiteralFlags&16;_||y||+o.text<=2**53-1||Z0(!1,Kn(o,k.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers))}function Roi(o){return!!(!(bS(o.parent)||n2(o.parent)&&bS(o.parent.parent))&&re<7&&sn(o,k.BigInt_literals_are_not_available_when_targeting_lower_than_ES2020))}function Foi(o,_,...y){const S=_n(o);if(!tk(S)){const D=E1(S,o.pos);return lc.add(Md(S,au(D),0,_,...y)),!0}return!1}function Boi(){return Wl||(Wl=[],$e.forEach((o,_)=>{xNe.test(_)&&Wl.push(o)})),Wl}function Woi(o){var _;return o.isTypeOnly&&o.name&&o.namedBindings?sn(o,k.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both):o.isTypeOnly&&((_=o.namedBindings)==null?void 0:_.kind)===275?Dyt(o.namedBindings):!1}function Dyt(o){return!!O(o.elements,_=>{if(_.isTypeOnly)return Df(_,_.kind===276?k.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement:k.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement)})}function Voi(o){if(Q.verbatimModuleSyntax&&oe===1)return sn(o,k.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);if(oe===5)return sn(o,k.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext);if(o.typeArguments)return sn(o,k.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments);const _=o.arguments;if(oe!==99&&oe!==199&&oe!==100&&oe!==200&&(c4(_),_.length>1)){const S=_[1];return sn(S,k.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_nodenext_or_preserve)}if(_.length===0||_.length>2)return sn(o,k.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments);const y=Fe(_,Km);return y?sn(y,k.Argument_of_dynamic_import_cannot_be_spread_element):!1}function Hoi(o,_){const y=Or(o);if(y&20&&_.flags&1048576)return Fe(_.types,S=>{if(S.flags&524288){const D=y&Or(S);if(D&4)return o.target===S.target;if(D&16)return!!o.aliasSymbol&&o.aliasSymbol===S.aliasSymbol}return!1})}function joi(o,_){if(Or(o)&128&&dg(_,YS))return Fe(_.types,y=>!YS(y))}function zoi(o,_){let y=0;if(ia(o,y).length>0||(y=1,ia(o,y).length>0))return Fe(_.types,D=>ia(D,y).length>0)}function Uoi(o,_){let y;if(!(o.flags&406978556)){let S=0;for(const D of _.types)if(!(D.flags&406978556)){const L=Wa([oy(o),oy(D)]);if(L.flags&4194304)return D;if(c1(L)||L.flags&1048576){const B=L.flags&1048576?$i(L.types,c1):1;B>=S&&(y=D,S=B)}}}return y}function qoi(o){if(Au(o,67108864)){const _=ad(o,y=>!(y.flags&402784252));if(!(_.flags&131072))return _}return o}function Eyt(o,_,y){if(_.flags&1048576&&o.flags&2621440){const S=Pmt(_,o);if(S)return S;const D=Ac(o);if(D){const L=Lmt(D,_);if(L){const B=T8e(_,qt(L,K=>[()=>Yn(K),K.escapedName]),y);if(B!==_)return B}}}}function q5e(o){const _=CI(o);return _||(Ka(o)?Z8e(Kf(o.expression)):void 0)}function Vge(o){return xn===o||(xn=o,Pn=Rk(o)),Pn}function oE(o){return Ei===o||(Ei=o,tn=zb(o)),tn}function mU(o){const _=oE(o)&7;return _===2||_===4||_===6}function $oi(o,_){const y=Q.importHelpers?1:0,S=o==null?void 0:o.imports[y];return S&&j.assert(cl(S)&&S.text===_,`Expected sourceFile.imports[${y}] to be the synthesized JSX runtime import`),S}function Joi(o){j.assert(Q.importHelpers,"Expected importHelpers to be enabled");const _=o.imports[0];return j.assert(_&&cl(_)&&_.text==="tslib","Expected sourceFile.imports[0] to be the synthesized tslib import"),_}}function jMt(t){return!Qw(t)}function tet(t){return t.kind!==262&&t.kind!==174||!!t.body}function iet(t){switch(t.parent.kind){case 276:case 281:return ot(t)||t.kind===11;default:return Wy(t)}}var hm;(t=>{t.JSX="JSX",t.IntrinsicElements="IntrinsicElements",t.ElementClass="ElementClass",t.ElementAttributesPropertyNameContainer="ElementAttributesProperty",t.ElementChildrenAttributeNameContainer="ElementChildrenAttribute",t.Element="Element",t.ElementType="ElementType",t.IntrinsicAttributes="IntrinsicAttributes",t.IntrinsicClassAttributes="IntrinsicClassAttributes",t.LibraryManagedAttributes="LibraryManagedAttributes"})(hm||(hm={}));function net(t){switch(t){case 0:return"yieldType";case 1:return"returnType";case 2:return"nextType"}}function Ch(t){return!!(t.flags&1)}function ret(t){return!!(t.flags&2)}function zMt(t){return{getCommonSourceDirectory:t.getCommonSourceDirectory?()=>t.getCommonSourceDirectory():()=>"",getCurrentDirectory:()=>t.getCurrentDirectory(),getSymlinkCache:to(t,t.getSymlinkCache),getPackageJsonInfoCache:()=>{var r;return(r=t.getPackageJsonInfoCache)==null?void 0:r.call(t)},useCaseSensitiveFileNames:to(t,t.useCaseSensitiveFileNames),redirectTargetsMap:t.redirectTargetsMap,getProjectReferenceRedirect:r=>t.getProjectReferenceRedirect(r),isSourceOfProjectReferenceRedirect:r=>t.isSourceOfProjectReferenceRedirect(r),fileExists:r=>t.fileExists(r),getFileIncludeReasons:()=>t.getFileIncludeReasons(),readFile:t.readFile?r=>t.readFile(r):void 0,getDefaultResolutionModeForFile:r=>t.getDefaultResolutionModeForFile(r),getModeForResolutionAtIndex:(r,a)=>t.getModeForResolutionAtIndex(r,a)}}var DNe=class aAt{constructor(r,a,u){this.moduleResolverHost=void 0,this.inner=void 0,this.disableTrackSymbol=!1;for(var h;a instanceof aAt;)a=a.inner;this.inner=a,this.moduleResolverHost=u,this.context=r,this.canTrackSymbol=!!((h=this.inner)!=null&&h.trackSymbol)}trackSymbol(r,a,u){var h,p;if((h=this.inner)!=null&&h.trackSymbol&&!this.disableTrackSymbol){if(this.inner.trackSymbol(r,a,u))return this.onDiagnosticReported(),!0;r.flags&262144||((p=this.context).trackedSymbols??(p.trackedSymbols=[])).push([r,a,u])}return!1}reportInaccessibleThisError(){var r;(r=this.inner)!=null&&r.reportInaccessibleThisError&&(this.onDiagnosticReported(),this.inner.reportInaccessibleThisError())}reportPrivateInBaseOfClassExpression(r){var a;(a=this.inner)!=null&&a.reportPrivateInBaseOfClassExpression&&(this.onDiagnosticReported(),this.inner.reportPrivateInBaseOfClassExpression(r))}reportInaccessibleUniqueSymbolError(){var r;(r=this.inner)!=null&&r.reportInaccessibleUniqueSymbolError&&(this.onDiagnosticReported(),this.inner.reportInaccessibleUniqueSymbolError())}reportCyclicStructureError(){var r;(r=this.inner)!=null&&r.reportCyclicStructureError&&(this.onDiagnosticReported(),this.inner.reportCyclicStructureError())}reportLikelyUnsafeImportRequiredError(r){var a;(a=this.inner)!=null&&a.reportLikelyUnsafeImportRequiredError&&(this.onDiagnosticReported(),this.inner.reportLikelyUnsafeImportRequiredError(r))}reportTruncationError(){var r;(r=this.inner)!=null&&r.reportTruncationError&&(this.onDiagnosticReported(),this.inner.reportTruncationError())}reportNonlocalAugmentation(r,a,u){var h;(h=this.inner)!=null&&h.reportNonlocalAugmentation&&(this.onDiagnosticReported(),this.inner.reportNonlocalAugmentation(r,a,u))}reportNonSerializableProperty(r){var a;(a=this.inner)!=null&&a.reportNonSerializableProperty&&(this.onDiagnosticReported(),this.inner.reportNonSerializableProperty(r))}onDiagnosticReported(){this.context.reportedDiagnostic=!0}reportInferenceFallback(r){var a;(a=this.inner)!=null&&a.reportInferenceFallback&&this.inner.reportInferenceFallback(r)}};function bt(t,r,a,u){if(t===void 0)return t;const h=r(t);let p;if(h!==void 0)return Ao(h)?p=(u||KMt)(h):p=h,j.assertNode(p,a),p}function Dn(t,r,a,u,h){if(t===void 0)return t;const p=t.length;(u===void 0||u<0)&&(u=0),(h===void 0||h>p-u)&&(h=p-u);let g,C=-1,b=-1;u>0||h<p?g=t.hasTrailingComma&&u+h===p:(C=t.pos,b=t.end,g=t.hasTrailingComma);const T=set(t,r,a,u,h);if(T!==t){const E=G.createNodeArray(T,g);return V0(E,C,b),E}return t}function VH(t,r,a,u,h){if(t===void 0)return t;const p=t.length;return(u===void 0||u<0)&&(u=0),(h===void 0||h>p-u)&&(h=p-u),set(t,r,a,u,h)}function set(t,r,a,u,h){let p;const g=t.length;(u>0||h<g)&&(p=[]);for(let C=0;C<h;C++){const b=t[C+u],T=b!==void 0?r?r(b):b:void 0;if((p!==void 0||T===void 0||T!==b)&&(p===void 0&&(p=t.slice(0,C),j.assertEachNode(p,a)),T))if(Ao(T))for(const E of T)j.assertNode(E,a),p.push(E);else j.assertNode(T,a),p.push(T)}return p||(j.assertEachNode(t,a),t)}function Aue(t,r,a,u,h,p=Dn){return a.startLexicalEnvironment(),t=p(t,r,Ps,u),h&&(t=a.factory.ensureUseStrict(t)),G.mergeLexicalEnvironment(t,a.endLexicalEnvironment())}function yu(t,r,a,u=Dn){let h;return a.startLexicalEnvironment(),t&&(a.setLexicalEnvironmentFlags(1,!0),h=u(t,r,$s),a.getLexicalEnvironmentFlags()&2&&Ja(a.getCompilerOptions())>=2&&(h=UMt(h,a)),a.setLexicalEnvironmentFlags(1,!1)),a.suspendLexicalEnvironment(),h}function UMt(t,r){let a;for(let u=0;u<t.length;u++){const h=t[u],p=qMt(h,r);(a||p!==h)&&(a||(a=t.slice(0,u)),a[u]=p)}return a?Ht(r.factory.createNodeArray(a,t.hasTrailingComma),t):t}function qMt(t,r){return t.dotDotDotToken?t:ta(t.name)?$Mt(t,r):t.initializer?JMt(t,t.name,t.initializer,r):t}function $Mt(t,r){const{factory:a}=r;return r.addInitializationStatement(a.createVariableStatement(void 0,a.createVariableDeclarationList([a.createVariableDeclaration(t.name,void 0,t.type,t.initializer?a.createConditionalExpression(a.createStrictEquality(a.getGeneratedNameForNode(t),a.createVoidZero()),void 0,t.initializer,void 0,a.getGeneratedNameForNode(t)):a.getGeneratedNameForNode(t))]))),a.updateParameterDeclaration(t,t.modifiers,t.dotDotDotToken,a.getGeneratedNameForNode(t),t.questionToken,t.type,void 0)}function JMt(t,r,a,u){const h=u.factory;return u.addInitializationStatement(h.createIfStatement(h.createTypeCheck(h.cloneNode(r),"undefined"),tr(Ht(h.createBlock([h.createExpressionStatement(tr(Ht(h.createAssignment(tr(h.cloneNode(r),96),tr(a,96|Ya(a)|3072)),t),3072))]),t),3905))),h.updateParameterDeclaration(t,t.modifiers,t.dotDotDotToken,t.name,t.questionToken,t.type,void 0)}function _m(t,r,a,u=bt){a.resumeLexicalEnvironment();const h=u(t,r,vG),p=a.endLexicalEnvironment();if(Ft(p)){if(!h)return a.factory.createBlock(p);const g=a.factory.converters.convertToFunctionBlock(h),C=G.mergeLexicalEnvironment(g.statements,p);return a.factory.updateBlock(g,C)}return h}function u_(t,r,a,u=bt){a.startBlockScope();const h=u(t,r,Ps,a.factory.liftToBlock);j.assert(h);const p=a.endBlockScope();return Ft(p)?Xo(h)?(p.push(...h.statements),a.factory.updateBlock(h,p)):(p.push(h),a.factory.createBlock(p)):h}function mQ(t,r,a=r){if(a===r||t.length<=1)return Dn(t,r,jt);let u=0;const h=t.length;return Dn(t,p=>{const g=u<h-1;return u++,g?a(p):r(p)},jt)}function dn(t,r,a=JH,u=Dn,h,p=bt){if(t===void 0)return;const g=GMt[t.kind];return g===void 0?t:g(t,r,a,u,p,h)}var GMt={166:function(r,a,u,h,p,g){return u.factory.updateQualifiedName(r,j.checkDefined(p(r.left,a,E_)),j.checkDefined(p(r.right,a,ot)))},167:function(r,a,u,h,p,g){return u.factory.updateComputedPropertyName(r,j.checkDefined(p(r.expression,a,jt)))},168:function(r,a,u,h,p,g){return u.factory.updateTypeParameterDeclaration(r,h(r.modifiers,a,Fa),j.checkDefined(p(r.name,a,ot)),p(r.constraint,a,ws),p(r.default,a,ws))},169:function(r,a,u,h,p,g){return u.factory.updateParameterDeclaration(r,h(r.modifiers,a,Ul),g?p(r.dotDotDotToken,g,mX):r.dotDotDotToken,j.checkDefined(p(r.name,a,dI)),g?p(r.questionToken,g,dx):r.questionToken,p(r.type,a,ws),p(r.initializer,a,jt))},170:function(r,a,u,h,p,g){return u.factory.updateDecorator(r,j.checkDefined(p(r.expression,a,jt)))},171:function(r,a,u,h,p,g){return u.factory.updatePropertySignature(r,h(r.modifiers,a,Fa),j.checkDefined(p(r.name,a,id)),g?p(r.questionToken,g,dx):r.questionToken,p(r.type,a,ws))},172:function(r,a,u,h,p,g){return u.factory.updatePropertyDeclaration(r,h(r.modifiers,a,Ul),j.checkDefined(p(r.name,a,id)),g?p(r.questionToken??r.exclamationToken,g,lIe):r.questionToken??r.exclamationToken,p(r.type,a,ws),p(r.initializer,a,jt))},173:function(r,a,u,h,p,g){return u.factory.updateMethodSignature(r,h(r.modifiers,a,Fa),j.checkDefined(p(r.name,a,id)),g?p(r.questionToken,g,dx):r.questionToken,h(r.typeParameters,a,$l),h(r.parameters,a,$s),p(r.type,a,ws))},174:function(r,a,u,h,p,g){return u.factory.updateMethodDeclaration(r,h(r.modifiers,a,Ul),g?p(r.asteriskToken,g,uH):r.asteriskToken,j.checkDefined(p(r.name,a,id)),g?p(r.questionToken,g,dx):r.questionToken,h(r.typeParameters,a,$l),yu(r.parameters,a,u,h),p(r.type,a,ws),_m(r.body,a,u,p))},176:function(r,a,u,h,p,g){return u.factory.updateConstructorDeclaration(r,h(r.modifiers,a,Ul),yu(r.parameters,a,u,h),_m(r.body,a,u,p))},177:function(r,a,u,h,p,g){return u.factory.updateGetAccessorDeclaration(r,h(r.modifiers,a,Ul),j.checkDefined(p(r.name,a,id)),yu(r.parameters,a,u,h),p(r.type,a,ws),_m(r.body,a,u,p))},178:function(r,a,u,h,p,g){return u.factory.updateSetAccessorDeclaration(r,h(r.modifiers,a,Ul),j.checkDefined(p(r.name,a,id)),yu(r.parameters,a,u,h),_m(r.body,a,u,p))},175:function(r,a,u,h,p,g){return u.startLexicalEnvironment(),u.suspendLexicalEnvironment(),u.factory.updateClassStaticBlockDeclaration(r,_m(r.body,a,u,p))},179:function(r,a,u,h,p,g){return u.factory.updateCallSignature(r,h(r.typeParameters,a,$l),h(r.parameters,a,$s),p(r.type,a,ws))},180:function(r,a,u,h,p,g){return u.factory.updateConstructSignature(r,h(r.typeParameters,a,$l),h(r.parameters,a,$s),p(r.type,a,ws))},181:function(r,a,u,h,p,g){return u.factory.updateIndexSignature(r,h(r.modifiers,a,Ul),h(r.parameters,a,$s),j.checkDefined(p(r.type,a,ws)))},182:function(r,a,u,h,p,g){return u.factory.updateTypePredicateNode(r,p(r.assertsModifier,a,NEe),j.checkDefined(p(r.parameterName,a,uIe)),p(r.type,a,ws))},183:function(r,a,u,h,p,g){return u.factory.updateTypeReferenceNode(r,j.checkDefined(p(r.typeName,a,E_)),h(r.typeArguments,a,ws))},184:function(r,a,u,h,p,g){return u.factory.updateFunctionTypeNode(r,h(r.typeParameters,a,$l),h(r.parameters,a,$s),j.checkDefined(p(r.type,a,ws)))},185:function(r,a,u,h,p,g){return u.factory.updateConstructorTypeNode(r,h(r.modifiers,a,Fa),h(r.typeParameters,a,$l),h(r.parameters,a,$s),j.checkDefined(p(r.type,a,ws)))},186:function(r,a,u,h,p,g){return u.factory.updateTypeQueryNode(r,j.checkDefined(p(r.exprName,a,E_)),h(r.typeArguments,a,ws))},187:function(r,a,u,h,p,g){return u.factory.updateTypeLiteralNode(r,h(r.members,a,OT))},188:function(r,a,u,h,p,g){return u.factory.updateArrayTypeNode(r,j.checkDefined(p(r.elementType,a,ws)))},189:function(r,a,u,h,p,g){return u.factory.updateTupleTypeNode(r,h(r.elements,a,ws))},190:function(r,a,u,h,p,g){return u.factory.updateOptionalTypeNode(r,j.checkDefined(p(r.type,a,ws)))},191:function(r,a,u,h,p,g){return u.factory.updateRestTypeNode(r,j.checkDefined(p(r.type,a,ws)))},192:function(r,a,u,h,p,g){return u.factory.updateUnionTypeNode(r,h(r.types,a,ws))},193:function(r,a,u,h,p,g){return u.factory.updateIntersectionTypeNode(r,h(r.types,a,ws))},194:function(r,a,u,h,p,g){return u.factory.updateConditionalTypeNode(r,j.checkDefined(p(r.checkType,a,ws)),j.checkDefined(p(r.extendsType,a,ws)),j.checkDefined(p(r.trueType,a,ws)),j.checkDefined(p(r.falseType,a,ws)))},195:function(r,a,u,h,p,g){return u.factory.updateInferTypeNode(r,j.checkDefined(p(r.typeParameter,a,$l)))},205:function(r,a,u,h,p,g){return u.factory.updateImportTypeNode(r,j.checkDefined(p(r.argument,a,ws)),p(r.attributes,a,LI),p(r.qualifier,a,E_),h(r.typeArguments,a,ws),r.isTypeOf)},302:function(r,a,u,h,p,g){return u.factory.updateImportTypeAssertionContainer(r,j.checkDefined(p(r.assertClause,a,VEe)),r.multiLine)},202:function(r,a,u,h,p,g){return u.factory.updateNamedTupleMember(r,g?p(r.dotDotDotToken,g,mX):r.dotDotDotToken,j.checkDefined(p(r.name,a,ot)),g?p(r.questionToken,g,dx):r.questionToken,j.checkDefined(p(r.type,a,ws)))},196:function(r,a,u,h,p,g){return u.factory.updateParenthesizedType(r,j.checkDefined(p(r.type,a,ws)))},198:function(r,a,u,h,p,g){return u.factory.updateTypeOperatorNode(r,j.checkDefined(p(r.type,a,ws)))},199:function(r,a,u,h,p,g){return u.factory.updateIndexedAccessTypeNode(r,j.checkDefined(p(r.objectType,a,ws)),j.checkDefined(p(r.indexType,a,ws)))},200:function(r,a,u,h,p,g){return u.factory.updateMappedTypeNode(r,g?p(r.readonlyToken,g,dIe):r.readonlyToken,j.checkDefined(p(r.typeParameter,a,$l)),p(r.nameType,a,ws),g?p(r.questionToken,g,fIe):r.questionToken,p(r.type,a,ws),h(r.members,a,OT))},201:function(r,a,u,h,p,g){return u.factory.updateLiteralTypeNode(r,j.checkDefined(p(r.literal,a,N2e)))},203:function(r,a,u,h,p,g){return u.factory.updateTemplateLiteralType(r,j.checkDefined(p(r.head,a,FP)),h(r.templateSpans,a,fle))},204:function(r,a,u,h,p,g){return u.factory.updateTemplateLiteralTypeSpan(r,j.checkDefined(p(r.type,a,ws)),j.checkDefined(p(r.literal,a,pG)))},206:function(r,a,u,h,p,g){return u.factory.updateObjectBindingPattern(r,h(r.elements,a,ec))},207:function(r,a,u,h,p,g){return u.factory.updateArrayBindingPattern(r,h(r.elements,a,gG))},208:function(r,a,u,h,p,g){return u.factory.updateBindingElement(r,g?p(r.dotDotDotToken,g,mX):r.dotDotDotToken,p(r.propertyName,a,id),j.checkDefined(p(r.name,a,dI)),p(r.initializer,a,jt))},209:function(r,a,u,h,p,g){return u.factory.updateArrayLiteralExpression(r,h(r.elements,a,jt))},210:function(r,a,u,h,p,g){return u.factory.updateObjectLiteralExpression(r,h(r.properties,a,Ub))},211:function(r,a,u,h,p,g){return dG(r)?u.factory.updatePropertyAccessChain(r,j.checkDefined(p(r.expression,a,jt)),g?p(r.questionDotToken,g,gX):r.questionDotToken,j.checkDefined(p(r.name,a,Mv))):u.factory.updatePropertyAccessExpression(r,j.checkDefined(p(r.expression,a,jt)),j.checkDefined(p(r.name,a,Mv)))},212:function(r,a,u,h,p,g){return Koe(r)?u.factory.updateElementAccessChain(r,j.checkDefined(p(r.expression,a,jt)),g?p(r.questionDotToken,g,gX):r.questionDotToken,j.checkDefined(p(r.argumentExpression,a,jt))):u.factory.updateElementAccessExpression(r,j.checkDefined(p(r.expression,a,jt)),j.checkDefined(p(r.argumentExpression,a,jt)))},213:function(r,a,u,h,p,g){return cI(r)?u.factory.updateCallChain(r,j.checkDefined(p(r.expression,a,jt)),g?p(r.questionDotToken,g,gX):r.questionDotToken,h(r.typeArguments,a,ws),h(r.arguments,a,jt)):u.factory.updateCallExpression(r,j.checkDefined(p(r.expression,a,jt)),h(r.typeArguments,a,ws),h(r.arguments,a,jt))},214:function(r,a,u,h,p,g){return u.factory.updateNewExpression(r,j.checkDefined(p(r.expression,a,jt)),h(r.typeArguments,a,ws),h(r.arguments,a,jt))},215:function(r,a,u,h,p,g){return u.factory.updateTaggedTemplateExpression(r,j.checkDefined(p(r.tag,a,jt)),h(r.typeArguments,a,ws),j.checkDefined(p(r.template,a,nP)))},216:function(r,a,u,h,p,g){return u.factory.updateTypeAssertion(r,j.checkDefined(p(r.type,a,ws)),j.checkDefined(p(r.expression,a,jt)))},217:function(r,a,u,h,p,g){return u.factory.updateParenthesizedExpression(r,j.checkDefined(p(r.expression,a,jt)))},218:function(r,a,u,h,p,g){return u.factory.updateFunctionExpression(r,h(r.modifiers,a,Fa),g?p(r.asteriskToken,g,uH):r.asteriskToken,p(r.name,a,ot),h(r.typeParameters,a,$l),yu(r.parameters,a,u,h),p(r.type,a,ws),_m(r.body,a,u,p))},219:function(r,a,u,h,p,g){return u.factory.updateArrowFunction(r,h(r.modifiers,a,Fa),h(r.typeParameters,a,$l),yu(r.parameters,a,u,h),p(r.type,a,ws),g?j.checkDefined(p(r.equalsGreaterThanToken,g,IEe)):r.equalsGreaterThanToken,_m(r.body,a,u,p))},220:function(r,a,u,h,p,g){return u.factory.updateDeleteExpression(r,j.checkDefined(p(r.expression,a,jt)))},221:function(r,a,u,h,p,g){return u.factory.updateTypeOfExpression(r,j.checkDefined(p(r.expression,a,jt)))},222:function(r,a,u,h,p,g){return u.factory.updateVoidExpression(r,j.checkDefined(p(r.expression,a,jt)))},223:function(r,a,u,h,p,g){return u.factory.updateAwaitExpression(r,j.checkDefined(p(r.expression,a,jt)))},224:function(r,a,u,h,p,g){return u.factory.updatePrefixUnaryExpression(r,j.checkDefined(p(r.operand,a,jt)))},225:function(r,a,u,h,p,g){return u.factory.updatePostfixUnaryExpression(r,j.checkDefined(p(r.operand,a,jt)))},226:function(r,a,u,h,p,g){return u.factory.updateBinaryExpression(r,j.checkDefined(p(r.left,a,jt)),g?j.checkDefined(p(r.operatorToken,g,_Ie)):r.operatorToken,j.checkDefined(p(r.right,a,jt)))},227:function(r,a,u,h,p,g){return u.factory.updateConditionalExpression(r,j.checkDefined(p(r.condition,a,jt)),g?j.checkDefined(p(r.questionToken,g,dx)):r.questionToken,j.checkDefined(p(r.whenTrue,a,jt)),g?j.checkDefined(p(r.colonToken,g,EEe)):r.colonToken,j.checkDefined(p(r.whenFalse,a,jt)))},228:function(r,a,u,h,p,g){return u.factory.updateTemplateExpression(r,j.checkDefined(p(r.head,a,FP)),h(r.templateSpans,a,w3))},229:function(r,a,u,h,p,g){return u.factory.updateYieldExpression(r,g?p(r.asteriskToken,g,uH):r.asteriskToken,p(r.expression,a,jt))},230:function(r,a,u,h,p,g){return u.factory.updateSpreadElement(r,j.checkDefined(p(r.expression,a,jt)))},231:function(r,a,u,h,p,g){return u.factory.updateClassExpression(r,h(r.modifiers,a,Ul),p(r.name,a,ot),h(r.typeParameters,a,$l),h(r.heritageClauses,a,Tp),h(r.members,a,Od))},233:function(r,a,u,h,p,g){return u.factory.updateExpressionWithTypeArguments(r,j.checkDefined(p(r.expression,a,jt)),h(r.typeArguments,a,ws))},234:function(r,a,u,h,p,g){return u.factory.updateAsExpression(r,j.checkDefined(p(r.expression,a,jt)),j.checkDefined(p(r.type,a,ws)))},238:function(r,a,u,h,p,g){return u.factory.updateSatisfiesExpression(r,j.checkDefined(p(r.expression,a,jt)),j.checkDefined(p(r.type,a,ws)))},235:function(r,a,u,h,p,g){return gh(r)?u.factory.updateNonNullChain(r,j.checkDefined(p(r.expression,a,jt))):u.factory.updateNonNullExpression(r,j.checkDefined(p(r.expression,a,jt)))},236:function(r,a,u,h,p,g){return u.factory.updateMetaProperty(r,j.checkDefined(p(r.name,a,ot)))},239:function(r,a,u,h,p,g){return u.factory.updateTemplateSpan(r,j.checkDefined(p(r.expression,a,jt)),j.checkDefined(p(r.literal,a,pG)))},241:function(r,a,u,h,p,g){return u.factory.updateBlock(r,h(r.statements,a,Ps))},243:function(r,a,u,h,p,g){return u.factory.updateVariableStatement(r,h(r.modifiers,a,Ul),j.checkDefined(p(r.declarationList,a,Sf)))},244:function(r,a,u,h,p,g){return u.factory.updateExpressionStatement(r,j.checkDefined(p(r.expression,a,jt)))},245:function(r,a,u,h,p,g){return u.factory.updateIfStatement(r,j.checkDefined(p(r.expression,a,jt)),j.checkDefined(p(r.thenStatement,a,Ps,u.factory.liftToBlock)),p(r.elseStatement,a,Ps,u.factory.liftToBlock))},246:function(r,a,u,h,p,g){return u.factory.updateDoStatement(r,u_(r.statement,a,u,p),j.checkDefined(p(r.expression,a,jt)))},247:function(r,a,u,h,p,g){return u.factory.updateWhileStatement(r,j.checkDefined(p(r.expression,a,jt)),u_(r.statement,a,u,p))},248:function(r,a,u,h,p,g){return u.factory.updateForStatement(r,p(r.initializer,a,Hm),p(r.condition,a,jt),p(r.incrementor,a,jt),u_(r.statement,a,u,p))},249:function(r,a,u,h,p,g){return u.factory.updateForInStatement(r,j.checkDefined(p(r.initializer,a,Hm)),j.checkDefined(p(r.expression,a,jt)),u_(r.statement,a,u,p))},250:function(r,a,u,h,p,g){return u.factory.updateForOfStatement(r,g?p(r.awaitModifier,g,dle):r.awaitModifier,j.checkDefined(p(r.initializer,a,Hm)),j.checkDefined(p(r.expression,a,jt)),u_(r.statement,a,u,p))},251:function(r,a,u,h,p,g){return u.factory.updateContinueStatement(r,p(r.label,a,ot))},252:function(r,a,u,h,p,g){return u.factory.updateBreakStatement(r,p(r.label,a,ot))},253:function(r,a,u,h,p,g){return u.factory.updateReturnStatement(r,p(r.expression,a,jt))},254:function(r,a,u,h,p,g){return u.factory.updateWithStatement(r,j.checkDefined(p(r.expression,a,jt)),j.checkDefined(p(r.statement,a,Ps,u.factory.liftToBlock)))},255:function(r,a,u,h,p,g){return u.factory.updateSwitchStatement(r,j.checkDefined(p(r.expression,a,jt)),j.checkDefined(p(r.caseBlock,a,w7)))},256:function(r,a,u,h,p,g){return u.factory.updateLabeledStatement(r,j.checkDefined(p(r.label,a,ot)),j.checkDefined(p(r.statement,a,Ps,u.factory.liftToBlock)))},257:function(r,a,u,h,p,g){return u.factory.updateThrowStatement(r,j.checkDefined(p(r.expression,a,jt)))},258:function(r,a,u,h,p,g){return u.factory.updateTryStatement(r,j.checkDefined(p(r.tryBlock,a,Xo)),p(r.catchClause,a,lD),p(r.finallyBlock,a,Xo))},260:function(r,a,u,h,p,g){return u.factory.updateVariableDeclaration(r,j.checkDefined(p(r.name,a,dI)),g?p(r.exclamationToken,g,dH):r.exclamationToken,p(r.type,a,ws),p(r.initializer,a,jt))},261:function(r,a,u,h,p,g){return u.factory.updateVariableDeclarationList(r,h(r.declarations,a,_s))},262:function(r,a,u,h,p,g){return u.factory.updateFunctionDeclaration(r,h(r.modifiers,a,Fa),g?p(r.asteriskToken,g,uH):r.asteriskToken,p(r.name,a,ot),h(r.typeParameters,a,$l),yu(r.parameters,a,u,h),p(r.type,a,ws),_m(r.body,a,u,p))},263:function(r,a,u,h,p,g){return u.factory.updateClassDeclaration(r,h(r.modifiers,a,Ul),p(r.name,a,ot),h(r.typeParameters,a,$l),h(r.heritageClauses,a,Tp),h(r.members,a,Od))},264:function(r,a,u,h,p,g){return u.factory.updateInterfaceDeclaration(r,h(r.modifiers,a,Ul),j.checkDefined(p(r.name,a,ot)),h(r.typeParameters,a,$l),h(r.heritageClauses,a,Tp),h(r.members,a,OT))},265:function(r,a,u,h,p,g){return u.factory.updateTypeAliasDeclaration(r,h(r.modifiers,a,Ul),j.checkDefined(p(r.name,a,ot)),h(r.typeParameters,a,$l),j.checkDefined(p(r.type,a,ws)))},266:function(r,a,u,h,p,g){return u.factory.updateEnumDeclaration(r,h(r.modifiers,a,Ul),j.checkDefined(p(r.name,a,ot)),h(r.members,a,SS))},267:function(r,a,u,h,p,g){return u.factory.updateModuleDeclaration(r,h(r.modifiers,a,Ul),j.checkDefined(p(r.name,a,hIe)),p(r.body,a,P2e))},268:function(r,a,u,h,p,g){return u.factory.updateModuleBlock(r,h(r.statements,a,Ps))},269:function(r,a,u,h,p,g){return u.factory.updateCaseBlock(r,h(r.clauses,a,CG))},270:function(r,a,u,h,p,g){return u.factory.updateNamespaceExportDeclaration(r,j.checkDefined(p(r.name,a,ot)))},271:function(r,a,u,h,p,g){return u.factory.updateImportEqualsDeclaration(r,h(r.modifiers,a,Ul),r.isTypeOnly,j.checkDefined(p(r.name,a,ot)),j.checkDefined(p(r.moduleReference,a,F2e)))},272:function(r,a,u,h,p,g){return u.factory.updateImportDeclaration(r,h(r.modifiers,a,Ul),p(r.importClause,a,H0),j.checkDefined(p(r.moduleSpecifier,a,jt)),p(r.attributes,a,LI))},300:function(r,a,u,h,p,g){return u.factory.updateImportAttributes(r,h(r.elements,a,HEe),r.multiLine)},301:function(r,a,u,h,p,g){return u.factory.updateImportAttribute(r,j.checkDefined(p(r.name,a,x2e)),j.checkDefined(p(r.value,a,jt)))},273:function(r,a,u,h,p,g){return u.factory.updateImportClause(r,r.isTypeOnly,p(r.name,a,ot),p(r.namedBindings,a,cae))},274:function(r,a,u,h,p,g){return u.factory.updateNamespaceImport(r,j.checkDefined(p(r.name,a,ot)))},280:function(r,a,u,h,p,g){return u.factory.updateNamespaceExport(r,j.checkDefined(p(r.name,a,ot)))},275:function(r,a,u,h,p,g){return u.factory.updateNamedImports(r,h(r.elements,a,l_))},276:function(r,a,u,h,p,g){return u.factory.updateImportSpecifier(r,r.isTypeOnly,p(r.propertyName,a,kX),j.checkDefined(p(r.name,a,ot)))},277:function(r,a,u,h,p,g){return u.factory.updateExportAssignment(r,h(r.modifiers,a,Ul),j.checkDefined(p(r.expression,a,jt)))},278:function(r,a,u,h,p,g){return u.factory.updateExportDeclaration(r,h(r.modifiers,a,Ul),r.isTypeOnly,p(r.exportClause,a,Qoe),p(r.moduleSpecifier,a,jt),p(r.attributes,a,LI))},279:function(r,a,u,h,p,g){return u.factory.updateNamedExports(r,h(r.elements,a,vh))},281:function(r,a,u,h,p,g){return u.factory.updateExportSpecifier(r,r.isTypeOnly,p(r.propertyName,a,kX),j.checkDefined(p(r.name,a,kX)))},283:function(r,a,u,h,p,g){return u.factory.updateExternalModuleReference(r,j.checkDefined(p(r.expression,a,jt)))},284:function(r,a,u,h,p,g){return u.factory.updateJsxElement(r,j.checkDefined(p(r.openingElement,a,z1)),h(r.children,a,JW),j.checkDefined(p(r.closingElement,a,oD)))},285:function(r,a,u,h,p,g){return u.factory.updateJsxSelfClosingElement(r,j.checkDefined(p(r.tagName,a,w8)),h(r.typeArguments,a,ws),j.checkDefined(p(r.attributes,a,cD)))},286:function(r,a,u,h,p,g){return u.factory.updateJsxOpeningElement(r,j.checkDefined(p(r.tagName,a,w8)),h(r.typeArguments,a,ws),j.checkDefined(p(r.attributes,a,cD)))},287:function(r,a,u,h,p,g){return u.factory.updateJsxClosingElement(r,j.checkDefined(p(r.tagName,a,w8)))},295:function(r,a,u,h,p,g){return u.factory.updateJsxNamespacedName(r,j.checkDefined(p(r.namespace,a,ot)),j.checkDefined(p(r.name,a,ot)))},288:function(r,a,u,h,p,g){return u.factory.updateJsxFragment(r,j.checkDefined(p(r.openingFragment,a,AI)),h(r.children,a,JW),j.checkDefined(p(r.closingFragment,a,zEe)))},291:function(r,a,u,h,p,g){return u.factory.updateJsxAttribute(r,j.checkDefined(p(r.name,a,iEe)),p(r.initializer,a,B2e))},292:function(r,a,u,h,p,g){return u.factory.updateJsxAttributes(r,h(r.properties,a,bG))},293:function(r,a,u,h,p,g){return u.factory.updateJsxSpreadAttribute(r,j.checkDefined(p(r.expression,a,jt)))},294:function(r,a,u,h,p,g){return u.factory.updateJsxExpression(r,p(r.expression,a,jt))},296:function(r,a,u,h,p,g){return u.factory.updateCaseClause(r,j.checkDefined(p(r.expression,a,jt)),h(r.statements,a,Ps))},297:function(r,a,u,h,p,g){return u.factory.updateDefaultClause(r,h(r.statements,a,Ps))},298:function(r,a,u,h,p,g){return u.factory.updateHeritageClause(r,h(r.types,a,Yb))},299:function(r,a,u,h,p,g){return u.factory.updateCatchClause(r,p(r.variableDeclaration,a,_s),j.checkDefined(p(r.block,a,Xo)))},303:function(r,a,u,h,p,g){return u.factory.updatePropertyAssignment(r,j.checkDefined(p(r.name,a,id)),j.checkDefined(p(r.initializer,a,jt)))},304:function(r,a,u,h,p,g){return u.factory.updateShorthandPropertyAssignment(r,j.checkDefined(p(r.name,a,ot)),p(r.objectAssignmentInitializer,a,jt))},305:function(r,a,u,h,p,g){return u.factory.updateSpreadAssignment(r,j.checkDefined(p(r.expression,a,jt)))},306:function(r,a,u,h,p,g){return u.factory.updateEnumMember(r,j.checkDefined(p(r.name,a,id)),p(r.initializer,a,jt))},307:function(r,a,u,h,p,g){return u.factory.updateSourceFile(r,Aue(r.statements,a,u))},354:function(r,a,u,h,p,g){return u.factory.updatePartiallyEmittedExpression(r,j.checkDefined(p(r.expression,a,jt)))},355:function(r,a,u,h,p,g){return u.factory.updateCommaListExpression(r,h(r.elements,a,jt))}};function KMt(t){return j.assert(t.length<=1,"Too many nodes written to output."),Bm(t)}function ENe(t,r,a,u,h){var{enter:p,exit:g}=h.extendedDiagnostics?ooe("Source Map","beforeSourcemap","afterSourcemap"):Dxe,C=[],b=[],T=new Map,E,N=[],R,F=[],H="",U=0,q=0,X=0,Z=0,Q=0,re=0,oe=!1,pe=0,de=0,ue=0,Ie=0,we=0,he=0,Ae=!1,ke=!1,Te=!1;return{getSources:()=>C,addSource:De,setSourceContent:qe,addName:se,addMapping:He,appendSourceMap:Pe,toJSON:et,toString:()=>JSON.stringify(et())};function De(ut){p();const wt=QL(u,ut,t.getCurrentDirectory(),t.getCanonicalFileName,!0);let Et=T.get(wt);return Et===void 0&&(Et=b.length,b.push(wt),C.push(ut),T.set(wt,Et)),g(),Et}function qe(ut,wt){if(p(),wt!==null){for(E||(E=[]);E.length<ut;)E.push(null);E[ut]=wt}g()}function se(ut){p(),R||(R=new Map);let wt=R.get(ut);return wt===void 0&&(wt=N.length,N.push(ut),R.set(ut,wt)),g(),wt}function Ne(ut,wt){return!Ae||pe!==ut||de!==wt}function Oe(ut,wt,Et){return ut!==void 0&&wt!==void 0&&Et!==void 0&&ue===ut&&(Ie>wt||Ie===wt&&we>Et)}function He(ut,wt,Et,dt,zt,Ei){j.assert(ut>=pe,"generatedLine cannot backtrack"),j.assert(wt>=0,"generatedCharacter cannot be negative"),j.assert(Et===void 0||Et>=0,"sourceIndex cannot be negative"),j.assert(dt===void 0||dt>=0,"sourceLine cannot be negative"),j.assert(zt===void 0||zt>=0,"sourceCharacter cannot be negative"),p(),(Ne(ut,wt)||Oe(Et,dt,zt))&&(Nt(),pe=ut,de=wt,ke=!1,Te=!1,Ae=!0),Et!==void 0&&dt!==void 0&&zt!==void 0&&(ue=Et,Ie=dt,we=zt,ke=!0,Ei!==void 0&&(he=Ei,Te=!0)),g()}function Pe(ut,wt,Et,dt,zt,Ei){j.assert(ut>=pe,"generatedLine cannot backtrack"),j.assert(wt>=0,"generatedCharacter cannot be negative"),p();const tn=[];let xn;const Pn=Fue(Et.mappings);for(const _i of Pn){if(Ei&&(_i.generatedLine>Ei.line||_i.generatedLine===Ei.line&&_i.generatedCharacter>Ei.character))break;if(zt&&(_i.generatedLine<zt.line||zt.line===_i.generatedLine&&_i.generatedCharacter<zt.character))continue;let Fi,On,pn,qr;if(_i.sourceIndex!==void 0){if(Fi=tn[_i.sourceIndex],Fi===void 0){const Mn=Et.sources[_i.sourceIndex],Zs=Et.sourceRoot?zr(Et.sourceRoot,Mn):Mn,at=zr(ts(dt),Zs);tn[_i.sourceIndex]=Fi=De(at),Et.sourcesContent&&typeof Et.sourcesContent[_i.sourceIndex]=="string"&&qe(Fi,Et.sourcesContent[_i.sourceIndex])}On=_i.sourceLine,pn=_i.sourceCharacter,Et.names&&_i.nameIndex!==void 0&&(xn||(xn=[]),qr=xn[_i.nameIndex],qr===void 0&&(xn[_i.nameIndex]=qr=se(Et.names[_i.nameIndex])))}const Fs=_i.generatedLine-(zt?zt.line:0),ko=Fs+ut,ls=zt&&zt.line===_i.generatedLine?_i.generatedCharacter-zt.character:_i.generatedCharacter,Qs=Fs===0?ls+wt:ls;He(ko,Qs,Fi,On,pn,qr)}g()}function We(){return!oe||U!==pe||q!==de||X!==ue||Z!==Ie||Q!==we||re!==he}function ze(ut){F.push(ut),F.length>=1024&&$e()}function Nt(){if(!(!Ae||!We())){if(p(),U<pe){do ze(59),U++;while(U<pe);q=0}else j.assertEqual(U,pe,"generatedLine cannot backtrack"),oe&&ze(44);Me(de-q),q=de,ke&&(Me(ue-X),X=ue,Me(Ie-Z),Z=Ie,Me(we-Q),Q=we,Te&&(Me(he-re),re=he)),oe=!0,g()}}function $e(){F.length>0&&(H+=String.fromCharCode.apply(void 0,F),F.length=0)}function et(){return Nt(),$e(),{version:3,file:r,sourceRoot:a,sources:b,names:N,mappings:H,sourcesContent:E}}function Me(ut){ut<0?ut=(-ut<<1)+1:ut=ut<<1;do{let wt=ut&31;ut=ut>>5,ut>0&&(wt=wt|32),ze(ZMt(wt))}while(ut>0)}}var INe=/\/\/[@#] source[M]appingURL=(.+)\r?\n?$/,Oue=/^\/\/[@#] source[M]appingURL=(.+)\r?\n?$/,Mue=/^\s*(\/\/[@#] .*)?$/;function Rue(t,r){return{getLineCount:()=>r.length,getLineText:a=>t.substring(r[a],r[a+1])}}function NNe(t){for(let r=t.getLineCount()-1;r>=0;r--){const a=t.getLineText(r),u=Oue.exec(a);if(u)return u[1].trimEnd();if(!a.match(Mue))break}}function XMt(t){return typeof t=="string"||t===null}function QMt(t){return t!==null&&typeof t=="object"&&t.version===3&&typeof t.file=="string"&&typeof t.mappings=="string"&&Ao(t.sources)&&Ce(t.sources,Oo)&&(t.sourceRoot===void 0||t.sourceRoot===null||typeof t.sourceRoot=="string")&&(t.sourcesContent===void 0||t.sourcesContent===null||Ao(t.sourcesContent)&&Ce(t.sourcesContent,XMt))&&(t.names===void 0||t.names===null||Ao(t.names)&&Ce(t.names,Oo))}function LNe(t){try{const r=JSON.parse(t);if(QMt(r))return r}catch{}}function Fue(t){let r=!1,a=0,u=0,h=0,p=0,g=0,C=0,b=0,T;return{get pos(){return a},get error(){return T},get state(){return E(!0,!0)},next(){for(;!r&&a<t.length;){const X=t.charCodeAt(a);if(X===59){u++,h=0,a++;continue}if(X===44){a++;continue}let Z=!1,Q=!1;if(h+=q(),H())return N();if(h<0)return F("Invalid generatedCharacter found");if(!U()){if(Z=!0,p+=q(),H())return N();if(p<0)return F("Invalid sourceIndex found");if(U())return F("Unsupported Format: No entries after sourceIndex");if(g+=q(),H())return N();if(g<0)return F("Invalid sourceLine found");if(U())return F("Unsupported Format: No entries after sourceLine");if(C+=q(),H())return N();if(C<0)return F("Invalid sourceCharacter found");if(!U()){if(Q=!0,b+=q(),H())return N();if(b<0)return F("Invalid nameIndex found");if(!U())return F("Unsupported Error Format: Entries after nameIndex")}}return{value:E(Z,Q),done:r}}return N()},[Symbol.iterator](){return this}};function E(X,Z){return{generatedLine:u,generatedCharacter:h,sourceIndex:X?p:void 0,sourceLine:X?g:void 0,sourceCharacter:X?C:void 0,nameIndex:Z?b:void 0}}function N(){return r=!0,{value:void 0,done:!0}}function R(X){T===void 0&&(T=X)}function F(X){return R(X),N()}function H(){return T!==void 0}function U(){return a===t.length||t.charCodeAt(a)===44||t.charCodeAt(a)===59}function q(){let X=!0,Z=0,Q=0;for(;X;a++){if(a>=t.length)return R("Error in decoding base64VLQFormatDecode, past the mapping string"),-1;const re=YMt(t.charCodeAt(a));if(re===-1)return R("Invalid character in VLQ"),-1;X=(re&32)!==0,Q=Q|(re&31)<<Z,Z+=5}return Q&1?(Q=Q>>1,Q=-Q):Q=Q>>1,Q}}function oet(t,r){return t===r||t.generatedLine===r.generatedLine&&t.generatedCharacter===r.generatedCharacter&&t.sourceIndex===r.sourceIndex&&t.sourceLine===r.sourceLine&&t.sourceCharacter===r.sourceCharacter&&t.nameIndex===r.nameIndex}function PNe(t){return t.sourceIndex!==void 0&&t.sourceLine!==void 0&&t.sourceCharacter!==void 0}function ZMt(t){return t>=0&&t<26?65+t:t>=26&&t<52?97+t-26:t>=52&&t<62?48+t-52:t===62?43:t===63?47:j.fail(`${t}: not a base64 value`)}function YMt(t){return t>=65&&t<=90?t-65:t>=97&&t<=122?t-97+26:t>=48&&t<=57?t-48+52:t===43?62:t===47?63:-1}function aet(t){return t.sourceIndex!==void 0&&t.sourcePosition!==void 0}function cet(t,r){return t.generatedPosition===r.generatedPosition&&t.sourceIndex===r.sourceIndex&&t.sourcePosition===r.sourcePosition}function eRt(t,r){return j.assert(t.sourceIndex===r.sourceIndex),_l(t.sourcePosition,r.sourcePosition)}function tRt(t,r){return _l(t.generatedPosition,r.generatedPosition)}function iRt(t){return t.sourcePosition}function nRt(t){return t.generatedPosition}function ANe(t,r,a){const u=ts(a),h=r.sourceRoot?wo(r.sourceRoot,u):u,p=wo(r.file,u),g=t.getSourceFileLike(p),C=r.sources.map(Z=>wo(Z,h)),b=new Map(C.map((Z,Q)=>[t.getCanonicalFileName(Z),Q]));let T,E,N;return{getSourcePosition:X,getGeneratedPosition:q};function R(Z){const Q=g!==void 0?xW(g,Z.generatedLine,Z.generatedCharacter,!0):-1;let re,oe;if(PNe(Z)){const pe=t.getSourceFileLike(C[Z.sourceIndex]);re=r.sources[Z.sourceIndex],oe=pe!==void 0?xW(pe,Z.sourceLine,Z.sourceCharacter,!0):-1}return{generatedPosition:Q,source:re,sourceIndex:Z.sourceIndex,sourcePosition:oe,nameIndex:Z.nameIndex}}function F(){if(T===void 0){const Z=Fue(r.mappings),Q=as(Z,R);Z.error!==void 0?(t.log&&t.log(`Encountered error while decoding sourcemap: ${Z.error}`),T=w):T=Q}return T}function H(Z){if(N===void 0){const Q=[];for(const re of F()){if(!aet(re))continue;let oe=Q[re.sourceIndex];oe||(Q[re.sourceIndex]=oe=[]),oe.push(re)}N=Q.map(re=>Iy(re,eRt,cet))}return N[Z]}function U(){if(E===void 0){const Z=[];for(const Q of F())Z.push(Q);E=Iy(Z,tRt,cet)}return E}function q(Z){const Q=b.get(t.getCanonicalFileName(Z.fileName));if(Q===void 0)return Z;const re=H(Q);if(!Ft(re))return Z;let oe=ti(re,Z.pos,iRt,_l);oe<0&&(oe=~oe);const pe=re[oe];return pe===void 0||pe.sourceIndex!==Q?Z:{fileName:p,pos:pe.generatedPosition}}function X(Z){const Q=U();if(!Ft(Q))return Z;let re=ti(Q,Z.pos,nRt,_l);re<0&&(re=~re);const oe=Q[re];return oe===void 0||!aet(oe)?Z:{fileName:C[oe.sourceIndex],pos:oe.sourcePosition}}}var Bue={getSourcePosition:hl,getGeneratedPosition:hl};function d_(t){return t=Ql(t),t?Sc(t):0}function uet(t){return!t||!j1(t)&&!Xm(t)?!1:Ft(t.elements,det)}function det(t){return My(t.propertyName||t.name)}function q0(t,r){return a;function a(h){return h.kind===307?r(h):u(h)}function u(h){return t.factory.createBundle(qt(h.sourceFiles,r))}}function ONe(t){return!!Y6(t)}function gQ(t){if(Y6(t))return!0;const r=t.importClause&&t.importClause.namedBindings;if(!r||!j1(r))return!1;let a=0;for(const u of r.elements)det(u)&&a++;return a>0&&a!==r.elements.length||!!(r.elements.length-a)&&hP(t)}function Wue(t){return!gQ(t)&&(hP(t)||!!t.importClause&&j1(t.importClause.namedBindings)&&uet(t.importClause.namedBindings))}function Vue(t,r){const a=t.getEmitResolver(),u=t.getCompilerOptions(),h=[],p=new rRt,g=[],C=new Map,b=new Set;let T,E=!1,N,R=!1,F=!1,H=!1;for(const Z of r.statements)switch(Z.kind){case 272:h.push(Z),!F&&gQ(Z)&&(F=!0),!H&&Wue(Z)&&(H=!0);break;case 271:Z.moduleReference.kind===283&&h.push(Z);break;case 278:if(Z.moduleSpecifier)if(!Z.exportClause)h.push(Z),R=!0;else if(h.push(Z),Xm(Z.exportClause))q(Z),H||(H=uet(Z.exportClause));else{const Q=Z.exportClause.name,re=tx(Q);C.get(re)||(j7(g,d_(Z),Q),C.set(re,!0),T=fn(T,Q)),F=!0}else q(Z);break;case 277:Z.isExportEquals&&!N&&(N=Z);break;case 243:if(Zr(Z,32))for(const Q of Z.declarationList.declarations)T=fet(Q,C,T,g);break;case 262:Zr(Z,32)&&X(Z,void 0,Zr(Z,2048));break;case 263:if(Zr(Z,32))if(Zr(Z,2048))E||(j7(g,d_(Z),t.factory.getDeclarationName(Z)),E=!0);else{const Q=Z.name;Q&&!C.get(Fr(Q))&&(j7(g,d_(Z),Q),C.set(Fr(Q),!0),T=fn(T,Q))}break}const U=Ole(t.factory,t.getEmitHelperFactory(),r,u,R,F,H);return U&&h.unshift(U),{externalImports:h,exportSpecifiers:p,exportEquals:N,hasExportStarsToExportValues:R,exportedBindings:g,exportedNames:T,exportedFunctions:b,externalHelpersImportDeclaration:U};function q(Z){for(const Q of ha(Z.exportClause,Xm).elements){const re=tx(Q.name);if(!C.get(re)){const oe=Q.propertyName||Q.name;if(oe.kind!==11){Z.moduleSpecifier||p.add(oe,Q);const pe=a.getReferencedImportDeclaration(oe)||a.getReferencedValueDeclaration(oe);if(pe){if(pe.kind===262){X(pe,Q.name,My(Q.name));continue}j7(g,d_(pe),Q.name)}}C.set(re,!0),T=fn(T,Q.name)}}}function X(Z,Q,re){if(b.add(Ql(Z,Wu)),re)E||(j7(g,d_(Z),Q??t.factory.getDeclarationName(Z)),E=!0);else{Q??(Q=Z.name);const oe=tx(Q);C.get(oe)||(j7(g,d_(Z),Q),C.set(oe,!0))}}}function fet(t,r,a,u){if(ta(t.name))for(const h of t.name.elements)Bd(h)||(a=fet(h,r,a,u));else if(!zl(t.name)){const h=Fr(t.name);r.get(h)||(r.set(h,!0),a=fn(a,t.name),iC(t.name)&&j7(u,d_(t),t.name))}return a}function j7(t,r,a){let u=t[r];return u?u.push(a):t[r]=u=[a],u}var V3=class hM{constructor(){this._map=new Map}get size(){return this._map.size}has(r){return this._map.has(hM.toKey(r))}get(r){return this._map.get(hM.toKey(r))}set(r,a){return this._map.set(hM.toKey(r),a),this}delete(r){var a;return((a=this._map)==null?void 0:a.delete(hM.toKey(r)))??!1}clear(){this._map.clear()}values(){return this._map.values()}static toKey(r){if(uI(r)||zl(r)){const a=r.emitNode.autoGenerate;if((a.flags&7)===4){const u=wH(r),h=Mv(u)&&u!==r?hM.toKey(u):`(generated@${Sc(u)})`;return c2(!1,a.prefix,h,a.suffix,hM.toKey)}else{const u=`(auto@${a.id})`;return c2(!1,a.prefix,u,a.suffix,hM.toKey)}}return Vs(r)?Fr(r).slice(1):Fr(r)}},rRt=class extends V3{add(t,r){let a=this.get(t);return a?a.push(r):this.set(t,a=[r]),a}remove(t,r){const a=this.get(t);a&&(GL(a,r),a.length||this.delete(t))}};function fD(t){return Bc(t)||t.kind===9||P_(t.kind)||ot(t)}function Uy(t){return!ot(t)&&fD(t)}function z7(t){return t>=65&&t<=79}function U7(t){switch(t){case 65:return 40;case 66:return 41;case 67:return 42;case 68:return 43;case 69:return 44;case 70:return 45;case 71:return 48;case 72:return 49;case 73:return 50;case 74:return 51;case 75:return 52;case 79:return 53;case 76:return 57;case 77:return 56;case 78:return 61}}function yQ(t){if(!uf(t))return;const r=Dc(t.expression);return mI(r)?r:void 0}function het(t,r,a){for(let u=r;u<t.length;u+=1){const h=t[u];if(yQ(h))return a.unshift(u),!0;if(NI(h)&&het(h.tryBlock.statements,0,a))return a.unshift(u),!0}return!1}function vQ(t,r){const a=[];return het(t,r,a),a}function Hue(t,r,a){return $t(t.members,u=>oRt(u,r,a))}function sRt(t){return aRt(t)||gu(t)}function bQ(t){return $t(t.members,sRt)}function oRt(t,r,a){return Lo(t)&&(!!t.initializer||!r)&&bd(t)===a}function aRt(t){return Lo(t)&&bd(t)}function HH(t){return t.kind===172&&t.initializer!==void 0}function MNe(t){return!pa(t)&&(iP(t)||I_(t))&&Vs(t.name)}function RNe(t){let r;if(t){const a=t.parameters,u=a.length>0&&JT(a[0]),h=u?1:0,p=u?a.length-1:a.length;for(let g=0;g<p;g++){const C=a[g+h];(r||lm(C))&&(r||(r=new Array(p)),r[g]=$w(C))}}return r}function jue(t){const r=$w(t),a=RNe(Vv(t));if(!(!Ft(r)&&!Ft(a)))return{decorators:r,parameters:a}}function CQ(t,r,a){switch(t.kind){case 177:case 178:return a?cRt(t,r):_et(t);case 174:return _et(t);case 172:return lRt(t);default:return}}function cRt(t,r){if(!t.body)return;const{firstAccessor:a,secondAccessor:u,getAccessor:h,setAccessor:p}=nx(r.members,t),g=lm(a)?a:u&&lm(u)?u:void 0;if(!g||t!==g)return;const C=$w(g),b=RNe(p);if(!(!Ft(C)&&!Ft(b)))return{decorators:C,parameters:b,getDecorators:h&&$w(h),setDecorators:p&&$w(p)}}function _et(t){if(!t.body)return;const r=$w(t),a=RNe(t);if(!(!Ft(r)&&!Ft(a)))return{decorators:r,parameters:a}}function lRt(t){const r=$w(t);if(Ft(r))return{decorators:r}}function uRt(t,r){for(;t;){const a=r(t);if(a!==void 0)return a;t=t.previous}}function FNe(t){return{data:t}}function zue(t,r){var a,u;return uI(r)?(a=t==null?void 0:t.generatedIdentifiers)==null?void 0:a.get(wH(r)):(u=t==null?void 0:t.identifiers)==null?void 0:u.get(r.escapedText)}function VI(t,r,a){uI(r)?(t.generatedIdentifiers??(t.generatedIdentifiers=new Map),t.generatedIdentifiers.set(wH(r),a)):(t.identifiers??(t.identifiers=new Map),t.identifiers.set(r.escapedText,a))}function BNe(t,r){return uRt(t,a=>zue(a.privateEnv,r))}function dRt(t){return!t.initializer&&ot(t.name)}function jH(t){return Ce(t,dRt)}var WNe=(t=>(t[t.All=0]="All",t[t.ObjectRest=1]="ObjectRest",t))(WNe||{});function HI(t,r,a,u,h,p){let g=t,C;if(pS(t))for(C=t.right;uDe(t.left)||yce(t.left);)if(pS(C))g=t=C,C=t.right;else return j.checkDefined(bt(C,r,jt));let b;const T={context:a,level:u,downlevelIteration:!!a.getCompilerOptions().downlevelIteration,hoistTempVariables:!0,emitExpression:E,emitBindingOrAssignment:N,createArrayBindingOrAssignmentPattern:R=>vRt(a.factory,R),createObjectBindingOrAssignmentPattern:R=>CRt(a.factory,R),createArrayBindingOrAssignmentElement:wRt,visitor:r};if(C&&(C=bt(C,r,jt),j.assert(C),ot(C)&&VNe(t,C.escapedText)||HNe(t)?C=rA(T,C,!1,g):h?C=rA(T,C,!0,g):cl(t)&&(g=C)),q7(T,t,C,g,pS(t)),C&&h){if(!Ft(b))return C;b.push(C)}return a.factory.inlineExpressions(b)||a.factory.createOmittedExpression();function E(R){b=fn(b,R)}function N(R,F,H,U){j.assertNode(R,p?ot:jt);const q=p?p(R,F,H):Ht(a.factory.createAssignment(j.checkDefined(bt(R,r,jt)),F),H);q.original=U,E(q)}}function VNe(t,r){const a=px(t);return VW(a)?fRt(a,r):ot(a)?a.escapedText===r:!1}function fRt(t,r){const a=N3(t);for(const u of a)if(VNe(u,r))return!0;return!1}function HNe(t){const r=FX(t);if(r&&Ka(r)&&!lI(r.expression))return!0;const a=px(t);return!!a&&VW(a)&&hRt(a)}function hRt(t){return!!O(N3(t),HNe)}function hD(t,r,a,u,h,p=!1,g){let C;const b=[],T=[],E={context:a,level:u,downlevelIteration:!!a.getCompilerOptions().downlevelIteration,hoistTempVariables:p,emitExpression:N,emitBindingOrAssignment:R,createArrayBindingOrAssignmentPattern:F=>yRt(a.factory,F),createObjectBindingOrAssignmentPattern:F=>bRt(a.factory,F),createArrayBindingOrAssignmentElement:F=>SRt(a.factory,F),visitor:r};if(_s(t)){let F=CH(t);F&&(ot(F)&&VNe(t,F.escapedText)||HNe(t))&&(F=rA(E,j.checkDefined(bt(F,E.visitor,jt)),!1,F),t=a.factory.updateVariableDeclaration(t,t.name,void 0,void 0,F))}if(q7(E,t,h,t,g),C){const F=a.factory.createTempVariable(void 0);if(p){const H=a.factory.inlineExpressions(C);C=void 0,R(F,H,void 0,void 0)}else{a.hoistVariableDeclaration(F);const H=va(b);H.pendingExpressions=fn(H.pendingExpressions,a.factory.createAssignment(F,H.value)),Sr(H.pendingExpressions,C),H.value=F}}for(const{pendingExpressions:F,name:H,value:U,location:q,original:X}of b){const Z=a.factory.createVariableDeclaration(H,void 0,void 0,F?a.factory.inlineExpressions(fn(F,U)):U);Z.original=X,Ht(Z,q),T.push(Z)}return T;function N(F){C=fn(C,F)}function R(F,H,U,q){j.assertNode(F,dI),C&&(H=a.factory.inlineExpressions(fn(C,H)),C=void 0),b.push({pendingExpressions:C,name:F,value:H,location:U,original:q})}}function q7(t,r,a,u,h){const p=px(r);if(!h){const g=bt(CH(r),t.visitor,jt);g?a?(a=mRt(t,a,g,u),!Uy(g)&&VW(p)&&(a=rA(t,a,!0,u))):a=g:a||(a=t.context.factory.createVoidZero())}nae(p)?_Rt(t,r,p,a,u):rae(p)?pRt(t,r,p,a,u):t.emitBindingOrAssignment(p,a,u,r)}function _Rt(t,r,a,u,h){const p=N3(a),g=p.length;if(g!==1){const T=!WW(r)||g!==0;u=rA(t,u,T,h)}let C,b;for(let T=0;T<g;T++){const E=p[T];if(RX(E)){if(T===g-1){C&&(t.emitBindingOrAssignment(t.createObjectBindingOrAssignmentPattern(C),u,h,a),C=void 0);const N=t.context.getEmitHelperFactory().createRestHelper(u,p,b,a);q7(t,E,N,E)}}else{const N=Mle(E);if(t.level>=1&&!(E.transformFlags&98304)&&!(px(E).transformFlags&98304)&&!Ka(N))C=fn(C,bt(E,t.visitor,D2e));else{C&&(t.emitBindingOrAssignment(t.createObjectBindingOrAssignmentPattern(C),u,h,a),C=void 0);const R=gRt(t,u,N);Ka(N)&&(b=fn(b,R.argumentExpression)),q7(t,E,R,E)}}}C&&t.emitBindingOrAssignment(t.createObjectBindingOrAssignmentPattern(C),u,h,a)}function pRt(t,r,a,u,h){const p=N3(a),g=p.length;if(t.level<1&&t.downlevelIteration)u=rA(t,Ht(t.context.getEmitHelperFactory().createReadHelper(u,g>0&&RX(p[g-1])?void 0:g),h),!1,h);else if(g!==1&&(t.level<1||g===0)||Ce(p,Bd)){const T=!WW(r)||g!==0;u=rA(t,u,T,h)}let C,b;for(let T=0;T<g;T++){const E=p[T];if(t.level>=1)if(E.transformFlags&65536||t.hasTransformedPriorElement&&!pet(E)){t.hasTransformedPriorElement=!0;const N=t.context.factory.createTempVariable(void 0);t.hoistTempVariables&&t.context.hoistVariableDeclaration(N),b=fn(b,[N,E]),C=fn(C,t.createArrayBindingOrAssignmentElement(N))}else C=fn(C,E);else{if(Bd(E))continue;if(RX(E)){if(T===g-1){const N=t.context.factory.createArraySliceCall(u,T);q7(t,E,N,E)}}else{const N=t.context.factory.createElementAccessExpression(u,T);q7(t,E,N,E)}}}if(C&&t.emitBindingOrAssignment(t.createArrayBindingOrAssignmentPattern(C),u,h,a),b)for(const[T,E]of b)q7(t,E,T,E)}function pet(t){const r=px(t);if(!r||Bd(r))return!0;const a=FX(t);if(a&&!P1(a))return!1;const u=CH(t);return u&&!Uy(u)?!1:VW(r)?Ce(N3(r),pet):ot(r)}function mRt(t,r,a,u){return r=rA(t,r,!0,u),t.context.factory.createConditionalExpression(t.context.factory.createTypeCheck(r,"undefined"),void 0,a,void 0,r)}function gRt(t,r,a){const{factory:u}=t.context;if(Ka(a)){const h=rA(t,j.checkDefined(bt(a.expression,t.visitor,jt)),!1,a);return t.context.factory.createElementAccessExpression(r,h)}else if(cm(a)||p7(a)){const h=u.cloneNode(a);return t.context.factory.createElementAccessExpression(r,h)}else{const h=t.context.factory.createIdentifier(Fr(a));return t.context.factory.createPropertyAccessExpression(r,h)}}function rA(t,r,a,u){if(ot(r)&&a)return r;{const h=t.context.factory.createTempVariable(void 0);return t.hoistTempVariables?(t.context.hoistVariableDeclaration(h),t.emitExpression(Ht(t.context.factory.createAssignment(h,r),u))):t.emitBindingOrAssignment(h,r,u,void 0),h}}function yRt(t,r){return j.assertEachNode(r,gG),t.createArrayBindingPattern(r)}function vRt(t,r){return j.assertEachNode(r,jW),t.createArrayLiteralExpression(qt(r,t.converters.convertToArrayAssignmentElement))}function bRt(t,r){return j.assertEachNode(r,ec),t.createObjectBindingPattern(r)}function CRt(t,r){return j.assertEachNode(r,HW),t.createObjectLiteralExpression(qt(r,t.converters.convertToObjectAssignmentElement))}function SRt(t,r){return t.createBindingElement(void 0,void 0,r)}function wRt(t){return t}function xRt(t,r,a=t.createThis()){const u=t.createAssignment(r,a),h=t.createExpressionStatement(u),p=t.createBlock([h],!1),g=t.createClassStaticBlockDeclaration(p);return ch(g).classThis=r,g}function $7(t){var r;if(!gu(t)||t.body.statements.length!==1)return!1;const a=t.body.statements[0];return uf(a)&&lf(a.expression,!0)&&ot(a.expression.left)&&((r=t.emitNode)==null?void 0:r.classThis)===a.expression.left&&a.expression.right.kind===110}function Uue(t){var r;return!!((r=t.emitNode)!=null&&r.classThis)&&Ft(t.members,$7)}function jNe(t,r,a,u){if(Uue(r))return r;const h=xRt(t,a,u);r.name&&Ga(h.body.statements[0],r.name);const p=t.createNodeArray([h,...r.members]);Ht(p,r.members);const g=hd(r)?t.updateClassDeclaration(r,r.modifiers,r.name,r.typeParameters,r.heritageClauses,p):t.updateClassExpression(r,r.modifiers,r.name,r.typeParameters,r.heritageClauses,p);return ch(g).classThis=a,g}function SQ(t,r,a){const u=Ql(Vu(a));return(hd(u)||Wu(u))&&!u.name&&Zr(u,2048)?t.createStringLiteral("default"):t.createStringLiteralFromNode(r)}function met(t,r,a){const{factory:u}=t;if(a!==void 0)return{assignedName:u.createStringLiteral(a),name:r};if(P1(r)||Vs(r))return{assignedName:u.createStringLiteralFromNode(r),name:r};if(P1(r.expression)&&!ot(r.expression))return{assignedName:u.createStringLiteralFromNode(r.expression),name:r};const h=u.getGeneratedNameForNode(r);t.hoistVariableDeclaration(h);const p=t.getEmitHelperFactory().createPropKeyHelper(r.expression),g=u.createAssignment(h,p),C=u.updateComputedPropertyName(r,g);return{assignedName:h,name:C}}function kRt(t,r,a=t.factory.createThis()){const{factory:u}=t,h=t.getEmitHelperFactory().createSetFunctionNameHelper(a,r),p=u.createExpressionStatement(h),g=u.createBlock([p],!1),C=u.createClassStaticBlockDeclaration(g);return ch(C).assignedName=r,C}function sA(t){var r;if(!gu(t)||t.body.statements.length!==1)return!1;const a=t.body.statements[0];return uf(a)&&_7(a.expression,"___setFunctionName")&&a.expression.arguments.length>=2&&a.expression.arguments[1]===((r=t.emitNode)==null?void 0:r.assignedName)}function wQ(t){var r;return!!((r=t.emitNode)!=null&&r.assignedName)&&Ft(t.members,sA)}function que(t){return!!t.name||wQ(t)}function xQ(t,r,a,u){if(wQ(r))return r;const{factory:h}=t,p=kRt(t,a,u);r.name&&Ga(p.body.statements[0],r.name);const g=ct(r.members,$7)+1,C=r.members.slice(0,g),b=r.members.slice(g),T=h.createNodeArray([...C,p,...b]);return Ht(T,r.members),r=hd(r)?h.updateClassDeclaration(r,r.modifiers,r.name,r.typeParameters,r.heritageClauses,T):h.updateClassExpression(r,r.modifiers,r.name,r.typeParameters,r.heritageClauses,T),ch(r).assignedName=a,r}function H3(t,r,a,u){if(u&&Ha(a)&&Rae(a))return r;const{factory:h}=t,p=Vu(r),g=fd(p)?ha(xQ(t,p,a),fd):t.getEmitHelperFactory().createSetFunctionNameHelper(p,a);return h.restoreOuterExpressions(r,g)}function TRt(t,r,a,u){const{factory:h}=t,{assignedName:p,name:g}=met(t,r.name,u),C=H3(t,r.initializer,p,a);return h.updatePropertyAssignment(r,g,C)}function DRt(t,r,a,u){const{factory:h}=t,p=u!==void 0?h.createStringLiteral(u):SQ(h,r.name,r.objectAssignmentInitializer),g=H3(t,r.objectAssignmentInitializer,p,a);return h.updateShorthandPropertyAssignment(r,r.name,g)}function ERt(t,r,a,u){const{factory:h}=t,p=u!==void 0?h.createStringLiteral(u):SQ(h,r.name,r.initializer),g=H3(t,r.initializer,p,a);return h.updateVariableDeclaration(r,r.name,r.exclamationToken,r.type,g)}function IRt(t,r,a,u){const{factory:h}=t,p=u!==void 0?h.createStringLiteral(u):SQ(h,r.name,r.initializer),g=H3(t,r.initializer,p,a);return h.updateParameterDeclaration(r,r.modifiers,r.dotDotDotToken,r.name,r.questionToken,r.type,g)}function NRt(t,r,a,u){const{factory:h}=t,p=u!==void 0?h.createStringLiteral(u):SQ(h,r.name,r.initializer),g=H3(t,r.initializer,p,a);return h.updateBindingElement(r,r.dotDotDotToken,r.propertyName,r.name,g)}function LRt(t,r,a,u){const{factory:h}=t,{assignedName:p,name:g}=met(t,r.name,u),C=H3(t,r.initializer,p,a);return h.updatePropertyDeclaration(r,r.modifiers,g,r.questionToken??r.exclamationToken,r.type,C)}function PRt(t,r,a,u){const{factory:h}=t,p=u!==void 0?h.createStringLiteral(u):SQ(h,r.left,r.right),g=H3(t,r.right,p,a);return h.updateBinaryExpression(r,r.left,r.operatorToken,g)}function ARt(t,r,a,u){const{factory:h}=t,p=u!==void 0?h.createStringLiteral(u):h.createStringLiteral(r.isExportEquals?"":"default"),g=H3(t,r.expression,p,a);return h.updateExportAssignment(r,r.modifiers,g)}function Dp(t,r,a,u){switch(r.kind){case 303:return TRt(t,r,a,u);case 304:return DRt(t,r,a,u);case 260:return ERt(t,r,a,u);case 169:return IRt(t,r,a,u);case 208:return NRt(t,r,a,u);case 172:return LRt(t,r,a,u);case 226:return PRt(t,r,a,u);case 277:return ARt(t,r,a,u)}}var zNe=(t=>(t[t.LiftRestriction=0]="LiftRestriction",t[t.All=1]="All",t))(zNe||{});function $ue(t,r,a,u,h,p){const g=bt(r.tag,a,jt);j.assert(g);const C=[void 0],b=[],T=[],E=r.template;if(p===0&&!rce(E))return dn(r,a,t);const{factory:N}=t;if(TI(E))b.push(UNe(N,E)),T.push(qNe(N,E,u));else{b.push(UNe(N,E.head)),T.push(qNe(N,E.head,u));for(const F of E.templateSpans)b.push(UNe(N,F.literal)),T.push(qNe(N,F.literal,u)),C.push(j.checkDefined(bt(F.expression,a,jt)))}const R=t.getEmitHelperFactory().createTemplateObjectHelper(N.createArrayLiteralExpression(b),N.createArrayLiteralExpression(T));if(wd(u)){const F=N.createUniqueName("templateObject");h(F),C[0]=N.createLogicalOr(F,N.createAssignment(F,R))}else C[0]=R;return N.createCallExpression(g,void 0,C)}function UNe(t,r){return r.templateFlags&26656?t.createVoidZero():t.createStringLiteral(r.text)}function qNe(t,r,a){let u=r.rawText;if(u===void 0){j.assertIsDefined(a,"Template literal node is missing 'rawText' and does not have a source file. Possibly bad transform."),u=RT(a,r);const h=r.kind===15||r.kind===18;u=u.substring(1,u.length-(h?1:2))}return u=u.replace(/\r\n?/g,`
+`),Ht(t.createStringLiteral(u),r)}function $Ne(t){const{factory:r,getEmitHelperFactory:a,startLexicalEnvironment:u,resumeLexicalEnvironment:h,endLexicalEnvironment:p,hoistVariableDeclaration:g}=t,C=t.getEmitResolver(),b=t.getCompilerOptions(),T=Ja(b),E=zh(b),N=!!b.experimentalDecorators,R=b.emitDecoratorMetadata?GNe(t):void 0,F=t.onEmitNode,H=t.onSubstituteNode;t.onEmitNode=md,t.onSubstituteNode=go,t.enableSubstitution(211),t.enableSubstitution(212);let U,q,X,Z,Q,re,oe;return pe;function pe(Ve){return Ve.kind===308?de(Ve):ue(Ve)}function de(Ve){return r.createBundle(Ve.sourceFiles.map(ue))}function ue(Ve){if(Ve.isDeclarationFile)return Ve;U=Ve;const _e=Ie(Ve,Me);return Zb(_e,t.readEmitHelpers()),U=void 0,_e}function Ie(Ve,_e){const Lt=Z,ci=Q;we(Ve);const Mi=_e(Ve);return Z!==Lt&&(Q=ci),Z=Lt,Mi}function we(Ve){switch(Ve.kind){case 307:case 269:case 268:case 241:Z=Ve,Q=void 0;break;case 263:case 262:if(Zr(Ve,128))break;Ve.name?le(Ve):j.assert(Ve.kind===263||Zr(Ve,2048));break}}function he(Ve){return Ie(Ve,Ae)}function Ae(Ve){return Ve.transformFlags&1?et(Ve):Ve}function ke(Ve){return Ie(Ve,Te)}function Te(Ve){switch(Ve.kind){case 272:case 271:case 277:case 278:return qe(Ve);default:return Ae(Ve)}}function De(Ve){const _e=Mo(Ve);if(_e===Ve||Il(Ve))return!1;if(!_e||_e.kind!==Ve.kind)return!0;switch(Ve.kind){case 272:if(j.assertNode(_e,du),Ve.importClause!==_e.importClause||Ve.attributes!==_e.attributes)return!0;break;case 271:if(j.assertNode(_e,Wd),Ve.name!==_e.name||Ve.isTypeOnly!==_e.isTypeOnly||Ve.moduleReference!==_e.moduleReference&&(E_(Ve.moduleReference)||E_(_e.moduleReference)))return!0;break;case 278:if(j.assertNode(_e,Ju),Ve.exportClause!==_e.exportClause||Ve.attributes!==_e.attributes)return!0;break}return!1}function qe(Ve){if(De(Ve))return Ve.transformFlags&1?dn(Ve,he,t):Ve;switch(Ve.kind){case 272:return vn(Ve);case 271:return on(Ve);case 277:return Bt(Ve);case 278:return fi(Ve);default:j.fail("Unhandled ellided statement")}}function se(Ve){return Ie(Ve,Ne)}function Ne(Ve){if(!(Ve.kind===278||Ve.kind===272||Ve.kind===273||Ve.kind===271&&Ve.moduleReference.kind===283))return Ve.transformFlags&1||Zr(Ve,32)?et(Ve):Ve}function Oe(Ve){return _e=>Ie(_e,Lt=>He(Lt,Ve))}function He(Ve,_e){switch(Ve.kind){case 176:return at(Ve);case 172:return Zs(Ve,_e);case 177:return Gs(Ve,_e);case 178:return ma(Ve,_e);case 174:return us(Ve,_e);case 175:return dn(Ve,he,t);case 240:return Ve;case 181:return;default:return j.failBadSyntaxKind(Ve)}}function Pe(Ve){return _e=>Ie(_e,Lt=>We(Lt,Ve))}function We(Ve,_e){switch(Ve.kind){case 303:case 304:case 305:return he(Ve);case 177:return Gs(Ve,_e);case 178:return ma(Ve,_e);case 174:return us(Ve,_e);default:return j.failBadSyntaxKind(Ve)}}function ze(Ve){return Fd(Ve)?void 0:he(Ve)}function Nt(Ve){return Fa(Ve)?void 0:he(Ve)}function $e(Ve){if(!Fd(Ve)&&!(CP(Ve.kind)&28895)&&!(q&&Ve.kind===95))return Ve}function et(Ve){if(Ps(Ve)&&Zr(Ve,128))return r.createNotEmittedStatement(Ve);switch(Ve.kind){case 95:case 90:return q?void 0:Ve;case 125:case 123:case 124:case 128:case 164:case 87:case 138:case 148:case 103:case 147:case 188:case 189:case 190:case 191:case 187:case 182:case 168:case 133:case 159:case 136:case 154:case 150:case 146:case 116:case 155:case 185:case 184:case 186:case 183:case 192:case 193:case 194:case 196:case 197:case 198:case 199:case 200:case 201:case 181:return;case 265:return r.createNotEmittedStatement(Ve);case 270:return;case 264:return r.createNotEmittedStatement(Ve);case 263:return zt(Ve);case 231:return Ei(Ve);case 298:return ls(Ve);case 233:return Qs(Ve);case 210:return ut(Ve);case 176:case 172:case 174:case 177:case 178:case 175:return j.fail("Class and object literal elements must be visited with their respective visitors");case 262:return ka(Ve);case 218:return Ji(Ve);case 219:return ac(Ve);case 169:return St(Ve);case 217:return Se(Ve);case 216:case 234:return Ze(Ve);case 238:return Dt(Ve);case 213:return Je(Ve);case 214:return Rt(Ve);case 215:return Ct(Ve);case 235:return gt(Ve);case 266:return ji(Ve);case 243:return ri(Ve);case 260:return pt(Ve);case 267:return lt(Ve);case 271:return on(Ve);case 285:return ii(Ve);case 286:return vt(Ve);default:return dn(Ve,he,t)}}function Me(Ve){const _e=ah(b,"alwaysStrict")&&!(wd(Ve)&&E>=5)&&!Eg(Ve);return r.updateSourceFile(Ve,Aue(Ve.statements,ke,t,0,_e))}function ut(Ve){return r.updateObjectLiteralExpression(Ve,Dn(Ve.properties,Pe(Ve),Ub))}function wt(Ve){let _e=0;Ft(Hue(Ve,!0,!0))&&(_e|=1);const Lt=L1(Ve);return Lt&&Vu(Lt.expression).kind!==106&&(_e|=64),dS(N,Ve)&&(_e|=2),N8(N,Ve)&&(_e|=4),zi(Ve)?_e|=8:qo(Ve)?_e|=32:vi(Ve)&&(_e|=16),_e}function Et(Ve){return!!(Ve.transformFlags&8192)}function dt(Ve){return lm(Ve)||Ft(Ve.typeParameters)||Ft(Ve.heritageClauses,Et)||Ft(Ve.members,Et)}function zt(Ve){const _e=wt(Ve),Lt=T<=1&&!!(_e&7);if(!dt(Ve)&&!dS(N,Ve)&&!zi(Ve))return r.updateClassDeclaration(Ve,Dn(Ve.modifiers,$e,Fa),Ve.name,void 0,Dn(Ve.heritageClauses,he,Tp),Dn(Ve.members,Oe(Ve),Od));Lt&&t.startLexicalEnvironment();const ci=Lt||_e&8;let Mi=ci?Dn(Ve.modifiers,Nt,Ul):Dn(Ve.modifiers,he,Ul);_e&2&&(Mi=xn(Mi,Ve));const Yr=ci&&!Ve.name||_e&4||_e&1?Ve.name??r.getGeneratedNameForNode(Ve):Ve.name,Xi=r.updateClassDeclaration(Ve,Mi,Yr,void 0,Dn(Ve.heritageClauses,he,Tp),tn(Ve));let Mr=Ya(Ve);_e&1&&(Mr|=64),tr(Xi,Mr);let ds;if(Lt){const Ks=[Xi],Ic=bce(Va(U.text,Ve.members.end),20),Gl=r.getInternalName(Ve),Pu=r.createPartiallyEmittedExpression(Gl);m3(Pu,Ic.end),tr(Pu,3072);const Ku=r.createReturnStatement(Pu);o7(Ku,Ic.pos),tr(Ku,3840),Ks.push(Ku),Fv(Ks,t.endLexicalEnvironment());const Xu=r.createImmediatelyInvokedArrowFunction(Ks);aH(Xu,1);const Wl=r.createVariableDeclaration(r.getLocalName(Ve,!1,!1),void 0,void 0,Xu);Ir(Wl,Ve);const Cu=r.createVariableStatement(void 0,r.createVariableDeclarationList([Wl],1));Ir(Cu,Ve),Sd(Cu,Ve),Ga(Cu,Kb(Ve)),bh(Cu),ds=Cu}else ds=Xi;if(ci){if(_e&8)return[ds,Wo(Ve)];if(_e&32)return[ds,r.createExportDefault(r.getLocalName(Ve,!1,!0))];if(_e&16)return[ds,r.createExternalModuleExport(r.getDeclarationName(Ve,!1,!0))]}return ds}function Ei(Ve){let _e=Dn(Ve.modifiers,Nt,Ul);return dS(N,Ve)&&(_e=xn(_e,Ve)),r.updateClassExpression(Ve,_e,Ve.name,void 0,Dn(Ve.heritageClauses,he,Tp),tn(Ve))}function tn(Ve){const _e=Dn(Ve.members,Oe(Ve),Od);let Lt;const ci=Vv(Ve),Mi=ci&&$t(ci.parameters,Rn=>vp(Rn,ci));if(Mi)for(const Rn of Mi){const Yr=r.createPropertyDeclaration(void 0,Rn.name,void 0,void 0,void 0);Ir(Yr,Rn),Lt=fn(Lt,Yr)}return Lt?(Lt=Sr(Lt,_e),Ht(r.createNodeArray(Lt),Ve.members)):_e}function xn(Ve,_e){const Lt=_i(_e,_e);if(Ft(Lt)){const ci=[];Sr(ci,roe(Ve,SH)),Sr(ci,$t(Ve,Fd)),Sr(ci,Lt),Sr(ci,$t(bxe(Ve,SH),Fa)),Ve=Ht(r.createNodeArray(ci),Ve)}return Ve}function Pn(Ve,_e,Lt){if(ss(Lt)&&Mae(N,_e,Lt)){const ci=_i(_e,Lt);if(Ft(ci)){const Mi=[];Sr(Mi,$t(Ve,Fd)),Sr(Mi,ci),Sr(Mi,$t(Ve,Fa)),Ve=Ht(r.createNodeArray(Mi),Ve)}}return Ve}function _i(Ve,_e){if(N)return Fi(Ve,_e)}function Fi(Ve,_e){if(R){let Lt;if(On(Ve)){const ci=a().createMetadataHelper("design:type",R.serializeTypeOfNode({currentLexicalScope:Z,currentNameScope:_e},Ve,_e));Lt=fn(Lt,r.createDecorator(ci))}if(qr(Ve)){const ci=a().createMetadataHelper("design:paramtypes",R.serializeParameterTypesOfNode({currentLexicalScope:Z,currentNameScope:_e},Ve,_e));Lt=fn(Lt,r.createDecorator(ci))}if(pn(Ve)){const ci=a().createMetadataHelper("design:returntype",R.serializeReturnTypeOfNode({currentLexicalScope:Z,currentNameScope:_e},Ve));Lt=fn(Lt,r.createDecorator(ci))}return Lt}}function On(Ve){const _e=Ve.kind;return _e===174||_e===177||_e===178||_e===172}function pn(Ve){return Ve.kind===174}function qr(Ve){switch(Ve.kind){case 263:case 231:return Vv(Ve)!==void 0;case 174:case 177:case 178:return!0}return!1}function Fs(Ve,_e){const Lt=Ve.name;return Vs(Lt)?r.createIdentifier(""):Ka(Lt)?Lt.expression:ot(Lt)?r.createStringLiteral(Fr(Lt)):r.cloneNode(Lt)}function ko(Ve){const _e=Ve.name;if(N&&Ka(_e)&&lm(Ve)){const Lt=bt(_e.expression,he,jt);j.assert(Lt);const ci=l0(Lt);if(!Uy(ci)){const Mi=r.getGeneratedNameForNode(_e);return g(Mi),r.updateComputedPropertyName(_e,r.createAssignment(Mi,Lt))}}return j.checkDefined(bt(_e,he,id))}function ls(Ve){if(Ve.token!==119)return dn(Ve,he,t)}function Qs(Ve){return r.updateExpressionWithTypeArguments(Ve,j.checkDefined(bt(Ve.expression,he,N_)),void 0)}function Mn(Ve){return!lu(Ve.body)}function Zs(Ve,_e){const Lt=Ve.flags&33554432||Zr(Ve,64);if(Lt&&!(N&&lm(Ve)))return;let ci=ss(_e)?Lt?Dn(Ve.modifiers,Nt,Ul):Dn(Ve.modifiers,he,Ul):Dn(Ve.modifiers,ze,Ul);return ci=Pn(ci,Ve,_e),Lt?r.updatePropertyDeclaration(Ve,Js(ci,r.createModifiersFromModifierFlags(128)),j.checkDefined(bt(Ve.name,he,id)),void 0,void 0,void 0):r.updatePropertyDeclaration(Ve,ci,ko(Ve),void 0,void 0,bt(Ve.initializer,he,jt))}function at(Ve){if(Mn(Ve))return r.updateConstructorDeclaration(Ve,void 0,yu(Ve.parameters,he,t),Sn(Ve.body,Ve))}function yi(Ve,_e,Lt,ci,Mi,Rn){const Yr=ci[Mi],Xi=_e[Yr];if(Sr(Ve,Dn(_e,he,Ps,Lt,Yr-Lt)),NI(Xi)){const Mr=[];yi(Mr,Xi.tryBlock.statements,0,ci,Mi+1,Rn);const ds=r.createNodeArray(Mr);Ht(ds,Xi.tryBlock.statements),Ve.push(r.updateTryStatement(Xi,r.updateBlock(Xi.tryBlock,Mr),bt(Xi.catchClause,he,lD),bt(Xi.finallyBlock,he,Xo)))}else Sr(Ve,Dn(_e,he,Ps,Yr,1)),Sr(Ve,Rn);Sr(Ve,Dn(_e,he,Ps,Yr+1))}function Sn(Ve,_e){const Lt=_e&&$t(_e.parameters,Mr=>vp(Mr,_e));if(!Ft(Lt))return _m(Ve,he,t);let ci=[];h();const Mi=r.copyPrologue(Ve.statements,ci,!1,he),Rn=vQ(Ve.statements,Mi),Yr=es(Lt,dr);Rn.length?yi(ci,Ve.statements,Mi,Rn,0,Yr):(Sr(ci,Yr),Sr(ci,Dn(Ve.statements,he,Ps,Mi))),ci=r.mergeLexicalEnvironment(ci,p());const Xi=r.createBlock(Ht(r.createNodeArray(ci),Ve.statements),!0);return Ht(Xi,Ve),Ir(Xi,Ve),Xi}function dr(Ve){const _e=Ve.name;if(!ot(_e))return;const Lt=_c(Ht(r.cloneNode(_e),_e),_e.parent);tr(Lt,3168);const ci=_c(Ht(r.cloneNode(_e),_e),_e.parent);return tr(ci,3072),bh(oH(Ht(Ir(r.createExpressionStatement(r.createAssignment(Ht(r.createPropertyAccessExpression(r.createThis(),Lt),Ve.name),ci)),Ve),Zk(Ve,-1))))}function us(Ve,_e){if(!(Ve.transformFlags&1))return Ve;if(!Mn(Ve))return;let Lt=ss(_e)?Dn(Ve.modifiers,he,Ul):Dn(Ve.modifiers,ze,Ul);return Lt=Pn(Lt,Ve,_e),r.updateMethodDeclaration(Ve,Lt,Ve.asteriskToken,ko(Ve),void 0,void 0,yu(Ve.parameters,he,t),void 0,_m(Ve.body,he,t))}function Xr(Ve){return!(lu(Ve.body)&&Zr(Ve,64))}function Gs(Ve,_e){if(!(Ve.transformFlags&1))return Ve;if(!Xr(Ve))return;let Lt=ss(_e)?Dn(Ve.modifiers,he,Ul):Dn(Ve.modifiers,ze,Ul);return Lt=Pn(Lt,Ve,_e),r.updateGetAccessorDeclaration(Ve,Lt,ko(Ve),yu(Ve.parameters,he,t),void 0,_m(Ve.body,he,t)||r.createBlock([]))}function ma(Ve,_e){if(!(Ve.transformFlags&1))return Ve;if(!Xr(Ve))return;let Lt=ss(_e)?Dn(Ve.modifiers,he,Ul):Dn(Ve.modifiers,ze,Ul);return Lt=Pn(Lt,Ve,_e),r.updateSetAccessorDeclaration(Ve,Lt,ko(Ve),yu(Ve.parameters,he,t),_m(Ve.body,he,t)||r.createBlock([]))}function ka(Ve){if(!Mn(Ve))return r.createNotEmittedStatement(Ve);const _e=r.updateFunctionDeclaration(Ve,Dn(Ve.modifiers,$e,Fa),Ve.asteriskToken,Ve.name,void 0,yu(Ve.parameters,he,t),void 0,_m(Ve.body,he,t)||r.createBlock([]));if(zi(Ve)){const Lt=[_e];return $o(Lt,Ve),Lt}return _e}function Ji(Ve){return Mn(Ve)?r.updateFunctionExpression(Ve,Dn(Ve.modifiers,$e,Fa),Ve.asteriskToken,Ve.name,void 0,yu(Ve.parameters,he,t),void 0,_m(Ve.body,he,t)||r.createBlock([])):r.createOmittedExpression()}function ac(Ve){return r.updateArrowFunction(Ve,Dn(Ve.modifiers,$e,Fa),void 0,yu(Ve.parameters,he,t),void 0,Ve.equalsGreaterThanToken,_m(Ve.body,he,t))}function St(Ve){if(JT(Ve))return;const _e=r.updateParameterDeclaration(Ve,Dn(Ve.modifiers,Lt=>Fd(Lt)?he(Lt):void 0,Ul),Ve.dotDotDotToken,j.checkDefined(bt(Ve.name,he,dI)),void 0,void 0,bt(Ve.initializer,he,jt));return _e!==Ve&&(Sd(_e,Ve),Ht(_e,R1(Ve)),Ga(_e,R1(Ve)),tr(_e.name,64)),_e}function ri(Ve){if(zi(Ve)){const _e=K8(Ve.declarationList);return _e.length===0?void 0:Ht(r.createExpressionStatement(r.inlineExpressions(qt(_e,xe))),Ve)}else return dn(Ve,he,t)}function xe(Ve){const _e=Ve.name;return ta(_e)?HI(Ve,he,t,0,!1,vu):Ht(r.createAssignment(Gu(_e),j.checkDefined(bt(Ve.initializer,he,jt))),Ve)}function pt(Ve){const _e=r.updateVariableDeclaration(Ve,j.checkDefined(bt(Ve.name,he,dI)),void 0,void 0,bt(Ve.initializer,he,jt));return Ve.type&&vEe(_e.name,Ve.type),_e}function Se(Ve){const _e=Vu(Ve.expression,-23);if(Hk(_e)||wX(_e)){const Lt=bt(Ve.expression,he,jt);return j.assert(Lt),r.createPartiallyEmittedExpression(Lt,Ve)}return dn(Ve,he,t)}function Ze(Ve){const _e=bt(Ve.expression,he,jt);return j.assert(_e),r.createPartiallyEmittedExpression(_e,Ve)}function gt(Ve){const _e=bt(Ve.expression,he,N_);return j.assert(_e),r.createPartiallyEmittedExpression(_e,Ve)}function Dt(Ve){const _e=bt(Ve.expression,he,jt);return j.assert(_e),r.createPartiallyEmittedExpression(_e,Ve)}function Je(Ve){return r.updateCallExpression(Ve,j.checkDefined(bt(Ve.expression,he,jt)),void 0,Dn(Ve.arguments,he,jt))}function Rt(Ve){return r.updateNewExpression(Ve,j.checkDefined(bt(Ve.expression,he,jt)),void 0,Dn(Ve.arguments,he,jt))}function Ct(Ve){return r.updateTaggedTemplateExpression(Ve,j.checkDefined(bt(Ve.tag,he,jt)),void 0,j.checkDefined(bt(Ve.template,he,nP)))}function ii(Ve){return r.updateJsxSelfClosingElement(Ve,j.checkDefined(bt(Ve.tagName,he,w8)),void 0,j.checkDefined(bt(Ve.attributes,he,cD)))}function vt(Ve){return r.updateJsxOpeningElement(Ve,j.checkDefined(bt(Ve.tagName,he,w8)),void 0,j.checkDefined(bt(Ve.attributes,he,cD)))}function Ni(Ve){return!Uk(Ve)||sx(b)}function ji(Ve){if(!Ni(Ve))return r.createNotEmittedStatement(Ve);const _e=[];let Lt=4;const ci=Qt(_e,Ve);ci&&(E!==4||Z!==U)&&(Lt|=1024);const Mi=Zc(Ve),Rn=Ls(Ve),Yr=zi(Ve)?r.getExternalModuleOrNamespaceExportName(X,Ve,!1,!0):r.getDeclarationName(Ve,!1,!0);let Xi=r.createLogicalOr(Yr,r.createAssignment(Yr,r.createObjectLiteralExpression()));if(zi(Ve)){const ds=r.getLocalName(Ve,!1,!0);Xi=r.createAssignment(ds,Xi)}const Mr=r.createExpressionStatement(r.createCallExpression(r.createFunctionExpression(void 0,void 0,void 0,void 0,[r.createParameterDeclaration(void 0,void 0,Mi)],void 0,gr(Ve,Rn)),void 0,[Xi]));return Ir(Mr,Ve),ci&&(e2(Mr,void 0),OP(Mr,void 0)),Ht(Mr,Ve),F1(Mr,Lt),_e.push(Mr),_e}function gr(Ve,_e){const Lt=X;X=_e;const ci=[];u();const Mi=qt(Ve.members,te);return Fv(ci,p()),Sr(ci,Mi),X=Lt,r.createBlock(Ht(r.createNodeArray(ci),Ve.members),!0)}function te(Ve){const _e=Fs(Ve),Lt=C.getEnumMemberValue(Ve),ci=tt(Ve,Lt==null?void 0:Lt.value),Mi=r.createAssignment(r.createElementAccessExpression(X,_e),ci),Rn=typeof(Lt==null?void 0:Lt.value)=="string"||Lt!=null&&Lt.isSyntacticallyString?Mi:r.createAssignment(r.createElementAccessExpression(X,Mi),_e);return Ht(r.createExpressionStatement(Ht(Rn,Ve)),Ve)}function tt(Ve,_e){return _e!==void 0?typeof _e=="string"?r.createStringLiteral(_e):_e<0?r.createPrefixUnaryExpression(41,r.createNumericLiteral(-_e)):r.createNumericLiteral(_e):(ja(),Ve.initializer?j.checkDefined(bt(Ve.initializer,he,jt)):r.createVoidZero())}function Gt(Ve){const _e=Mo(Ve,rd);return _e?Pue(_e,sx(b)):!0}function le(Ve){Q||(Q=new Map);const _e=be(Ve);Q.has(_e)||Q.set(_e,Ve)}function Ue(Ve){if(Q){const _e=be(Ve);return Q.get(_e)===Ve}return!0}function be(Ve){return j.assertNode(Ve.name,ot),Ve.name.escapedText}function Qt(Ve,_e){const Lt=r.createVariableDeclaration(r.getLocalName(_e,!1,!0)),ci=Z.kind===307?0:1,Mi=r.createVariableStatement(Dn(_e.modifiers,$e,Fa),r.createVariableDeclarationList([Lt],ci));return Ir(Lt,_e),e2(Lt,void 0),OP(Lt,void 0),Ir(Mi,_e),le(_e),Ue(_e)?(_e.kind===266?Ga(Mi.declarationList,_e):Ga(Mi,_e),Sd(Mi,_e),F1(Mi,2048),Ve.push(Mi),!0):!1}function lt(Ve){if(!Gt(Ve))return r.createNotEmittedStatement(Ve);j.assertNode(Ve.name,ot,"A TypeScript namespace should have an Identifier name."),wf();const _e=[];let Lt=4;const ci=Qt(_e,Ve);ci&&(E!==4||Z!==U)&&(Lt|=1024);const Mi=Zc(Ve),Rn=Ls(Ve),Yr=zi(Ve)?r.getExternalModuleOrNamespaceExportName(X,Ve,!1,!0):r.getDeclarationName(Ve,!1,!0);let Xi=r.createLogicalOr(Yr,r.createAssignment(Yr,r.createObjectLiteralExpression()));if(zi(Ve)){const ds=r.getLocalName(Ve,!1,!0);Xi=r.createAssignment(ds,Xi)}const Mr=r.createExpressionStatement(r.createCallExpression(r.createFunctionExpression(void 0,void 0,void 0,void 0,[r.createParameterDeclaration(void 0,void 0,Mi)],void 0,st(Ve,Rn)),void 0,[Xi]));return Ir(Mr,Ve),ci&&(e2(Mr,void 0),OP(Mr,void 0)),Ht(Mr,Ve),F1(Mr,Lt),_e.push(Mr),_e}function st(Ve,_e){const Lt=X,ci=q,Mi=Q;X=_e,q=Ve,Q=void 0;const Rn=[];u();let Yr,Xi;if(Ve.body)if(Ve.body.kind===268)Ie(Ve.body,ds=>Sr(Rn,Dn(ds.statements,se,Ps))),Yr=Ve.body.statements,Xi=Ve.body;else{const ds=lt(Ve.body);ds&&(Ao(ds)?Sr(Rn,ds):Rn.push(ds));const Ks=hi(Ve).body;Yr=Zk(Ks.statements,-1)}Fv(Rn,p()),X=Lt,q=ci,Q=Mi;const Mr=r.createBlock(Ht(r.createNodeArray(Rn),Yr),!0);return Ht(Mr,Xi),(!Ve.body||Ve.body.kind!==268)&&tr(Mr,Ya(Mr)|3072),Mr}function hi(Ve){if(Ve.body.kind===267)return hi(Ve.body)||Ve.body}function vn(Ve){if(!Ve.importClause)return Ve;if(Ve.importClause.isTypeOnly)return;const _e=bt(Ve.importClause,ln,H0);return _e?r.updateImportDeclaration(Ve,void 0,_e,Ve.moduleSpecifier,Ve.attributes):void 0}function ln(Ve){j.assert(!Ve.isTypeOnly);const _e=Nl(Ve)?Ve.name:void 0,Lt=bt(Ve.namedBindings,Un,cae);return _e||Lt?r.updateImportClause(Ve,!1,_e,Lt):void 0}function Un(Ve){if(Ve.kind===274)return Nl(Ve)?Ve:void 0;{const _e=b.verbatimModuleSyntax,Lt=Dn(Ve.elements,Pt,l_);return _e||Ft(Lt)?r.updateNamedImports(Ve,Lt):void 0}}function Pt(Ve){return!Ve.isTypeOnly&&Nl(Ve)?Ve:void 0}function Bt(Ve){return b.verbatimModuleSyntax||C.isValueAliasDeclaration(Ve)?dn(Ve,he,t):void 0}function fi(Ve){if(Ve.isTypeOnly)return;if(!Ve.exportClause||jy(Ve.exportClause))return Ve;const _e=!!b.verbatimModuleSyntax,Lt=bt(Ve.exportClause,ci=>Ai(ci,_e),Qoe);return Lt?r.updateExportDeclaration(Ve,void 0,Ve.isTypeOnly,Lt,Ve.moduleSpecifier,Ve.attributes):void 0}function wi(Ve,_e){const Lt=Dn(Ve.elements,Xn,vh);return _e||Ft(Lt)?r.updateNamedExports(Ve,Lt):void 0}function Ri(Ve){return r.updateNamespaceExport(Ve,j.checkDefined(bt(Ve.name,he,ot)))}function Ai(Ve,_e){return jy(Ve)?Ri(Ve):wi(Ve,_e)}function Xn(Ve){return!Ve.isTypeOnly&&(b.verbatimModuleSyntax||C.isValueAliasDeclaration(Ve))?Ve:void 0}function Di(Ve){return Nl(Ve)||!wd(U)&&C.isTopLevelValueImportEqualsWithEntityName(Ve)}function on(Ve){if(Ve.isTypeOnly)return;if(qk(Ve))return Nl(Ve)?dn(Ve,he,t):void 0;if(!Di(Ve))return;const _e=yH(r,Ve.moduleReference);return tr(_e,7168),vi(Ve)||!zi(Ve)?Ir(Ht(r.createVariableStatement(Dn(Ve.modifiers,$e,Fa),r.createVariableDeclarationList([Ir(r.createVariableDeclaration(Ve.name,void 0,void 0,_e),Ve)])),Ve),Ve):Ir(Lc(Ve.name,_e,Ve),Ve)}function zi(Ve){return q!==void 0&&Zr(Ve,32)}function cn(Ve){return q===void 0&&Zr(Ve,32)}function vi(Ve){return cn(Ve)&&!Zr(Ve,2048)}function qo(Ve){return cn(Ve)&&Zr(Ve,2048)}function Wo(Ve){const _e=r.createAssignment(r.getExternalModuleOrNamespaceExportName(X,Ve,!1,!0),r.getLocalName(Ve));Ga(_e,Um(Ve.name?Ve.name.pos:Ve.pos,Ve.end));const Lt=r.createExpressionStatement(_e);return Ga(Lt,Um(-1,Ve.end)),Lt}function $o(Ve,_e){Ve.push(Wo(_e))}function Lc(Ve,_e,Lt){return Ht(r.createExpressionStatement(r.createAssignment(r.getNamespaceMemberName(X,Ve,!1,!0),_e)),Lt)}function vu(Ve,_e,Lt){return Ht(r.createAssignment(Gu(Ve),_e),Lt)}function Gu(Ve){return r.getNamespaceMemberName(X,Ve,!1,!0)}function Zc(Ve){const _e=r.getGeneratedNameForNode(Ve);return Ga(_e,Ve.name),_e}function Ls(Ve){return r.getGeneratedNameForNode(Ve)}function ja(){re&8||(re|=8,t.enableSubstitution(80))}function wf(){re&2||(re|=2,t.enableSubstitution(80),t.enableSubstitution(304),t.enableEmitNotification(267))}function Jo(Ve){return Ql(Ve).kind===267}function kh(Ve){return Ql(Ve).kind===266}function md(Ve,_e,Lt){const ci=oe,Mi=U;Os(_e)&&(U=_e),re&2&&Jo(_e)&&(oe|=2),re&8&&kh(_e)&&(oe|=8),F(Ve,_e,Lt),oe=ci,U=Mi}function go(Ve,_e){return _e=H(Ve,_e),Ve===1?mc(_e):lh(_e)?pc(_e):_e}function pc(Ve){if(re&2){const _e=Ve.name,Lt=tc(_e);if(Lt){if(Ve.objectAssignmentInitializer){const ci=r.createAssignment(Lt,Ve.objectAssignmentInitializer);return Ht(r.createPropertyAssignment(_e,ci),Ve)}return Ht(r.createPropertyAssignment(_e,Lt),Ve)}}return Ve}function mc(Ve){switch(Ve.kind){case 80:return oo(Ve);case 211:return ki(Ve);case 212:return Gc(Ve)}return Ve}function oo(Ve){return tc(Ve)||Ve}function tc(Ve){if(re&oe&&!zl(Ve)&&!iC(Ve)){const _e=C.getReferencedExportContainer(Ve,!1);if(_e&&_e.kind!==307&&(oe&2&&_e.kind===267||oe&8&&_e.kind===266))return Ht(r.createPropertyAccessExpression(r.getGeneratedNameForNode(_e),Ve),Ve)}}function ki(Ve){return sd(Ve)}function Gc(Ve){return sd(Ve)}function uh(Ve){return Ve.replace(/\*\//g,"*_/")}function sd(Ve){const _e=Pp(Ve);if(_e!==void 0){gEe(Ve,_e);const Lt=typeof _e=="string"?r.createStringLiteral(_e):_e<0?r.createPrefixUnaryExpression(41,r.createNumericLiteral(-_e)):r.createNumericLiteral(_e);if(!b.removeComments){const ci=Ql(Ve,Sl);uX(Lt,3,` ${uh(uu(ci))} `)}return Lt}return Ve}function Pp(Ve){if(!Ag(b))return Nr(Ve)||wl(Ve)?C.getConstantValue(Ve):void 0}function Nl(Ve){return b.verbatimModuleSyntax||nr(Ve)||C.isReferencedAliasDeclaration(Ve)}}function JNe(t){const{factory:r,getEmitHelperFactory:a,hoistVariableDeclaration:u,endLexicalEnvironment:h,startLexicalEnvironment:p,resumeLexicalEnvironment:g,addBlockScopedVariable:C}=t,b=t.getEmitResolver(),T=t.getCompilerOptions(),E=Ja(T),N=GV(T),R=!!T.experimentalDecorators,F=!N,H=N&&E<9,U=F||H,q=E<9,X=E<99?-1:N?0:3,Z=E<9,Q=Z&&E>=2,re=U||q||X===-1,oe=t.onSubstituteNode;t.onSubstituteNode=uh;const pe=t.onEmitNode;t.onEmitNode=Gc;let de=!1,ue,Ie,we,he,Ae;const ke=new Map,Te=new Set;let De,qe,se=!1,Ne=!1;return q0(t,Oe);function Oe(_e){if(_e.isDeclarationFile||(Ae=void 0,de=!!(u0(_e)&32),!re&&!de))return _e;const Lt=dn(_e,Pe,t);return Zb(Lt,t.readEmitHelpers()),Lt}function He(_e){switch(_e.kind){case 129:return yi()?void 0:_e;default:return Jr(_e,Fa)}}function Pe(_e){if(!(_e.transformFlags&16777216)&&!(_e.transformFlags&134234112))return _e;switch(_e.kind){case 263:return ji(_e);case 231:return te(_e);case 175:case 172:return j.fail("Use `classElementVisitor` instead.");case 303:return dt(_e);case 243:return zt(_e);case 260:return Ei(_e);case 169:return tn(_e);case 208:return xn(_e);case 277:return Pn(_e);case 81:return wt(_e);case 211:return ma(_e);case 212:return ka(_e);case 224:case 225:return Ji(_e,!1);case 226:return gt(_e,!1);case 217:return Je(_e,!1);case 213:return xe(_e);case 244:return St(_e);case 215:return pt(_e);case 248:return ac(_e);case 110:return le(_e);case 262:case 218:return Fs(void 0,We,_e);case 176:case 174:case 177:case 178:return Fs(_e,We,_e);default:return We(_e)}}function We(_e){return dn(_e,Pe,t)}function ze(_e){switch(_e.kind){case 224:case 225:return Ji(_e,!0);case 226:return gt(_e,!0);case 355:return Dt(_e);case 217:return Je(_e,!0);default:return Pe(_e)}}function Nt(_e){switch(_e.kind){case 298:return dn(_e,Nt,t);case 233:return vt(_e);default:return Pe(_e)}}function $e(_e){switch(_e.kind){case 210:case 209:return ki(_e);default:return Pe(_e)}}function et(_e){switch(_e.kind){case 176:return Fs(_e,On,_e);case 177:case 178:case 174:return Fs(_e,qr,_e);case 172:return Fs(_e,Sn,_e);case 175:return Fs(_e,Gt,_e);case 167:return Fi(_e);case 240:return _e;default:return Ul(_e)?He(_e):Pe(_e)}}function Me(_e){switch(_e.kind){case 167:return Fi(_e);default:return Pe(_e)}}function ut(_e){switch(_e.kind){case 172:return at(_e);case 177:case 178:return et(_e);default:j.assertMissingNode(_e,"Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration");break}}function wt(_e){return!q||Ps(_e.parent)?_e:Ir(r.createIdentifier(""),_e)}function Et(_e){const Lt=ja(_e.left);if(Lt){const ci=bt(_e.right,Pe,jt);return Ir(a().createClassPrivateFieldInHelper(Lt.brandCheckIdentifier,ci),_e)}return dn(_e,Pe,t)}function dt(_e){return Sp(_e,Ze)&&(_e=Dp(t,_e)),dn(_e,Pe,t)}function zt(_e){const Lt=he;he=[];const ci=dn(_e,Pe,t),Mi=Ft(he)?[ci,...he]:ci;return he=Lt,Mi}function Ei(_e){return Sp(_e,Ze)&&(_e=Dp(t,_e)),dn(_e,Pe,t)}function tn(_e){return Sp(_e,Ze)&&(_e=Dp(t,_e)),dn(_e,Pe,t)}function xn(_e){return Sp(_e,Ze)&&(_e=Dp(t,_e)),dn(_e,Pe,t)}function Pn(_e){return Sp(_e,Ze)&&(_e=Dp(t,_e,!0,_e.isExportEquals?"":"default")),dn(_e,Pe,t)}function _i(_e){return Ft(we)&&(c_(_e)?(we.push(_e.expression),_e=r.updateParenthesizedExpression(_e,r.inlineExpressions(we))):(we.push(_e),_e=r.inlineExpressions(we)),we=void 0),_e}function Fi(_e){const Lt=bt(_e.expression,Pe,jt);return r.updateComputedPropertyName(_e,_i(Lt))}function On(_e){return De?Qt(_e,De):We(_e)}function pn(_e){return!!(q||bd(_e)&&u0(_e)&32)}function qr(_e){if(j.assert(!lm(_e)),!Wh(_e)||!pn(_e))return dn(_e,et,t);const Lt=ja(_e.name);if(j.assert(Lt,"Undeclared private name for property declaration."),!Lt.isValid)return _e;const ci=ko(_e);ci&&cn().push(r.createAssignment(ci,r.createFunctionExpression($t(_e.modifiers,Mi=>Fa(Mi)&&!WP(Mi)&&!OEe(Mi)),_e.asteriskToken,ci,void 0,yu(_e.parameters,Pe,t),void 0,_m(_e.body,Pe,t))))}function Fs(_e,Lt,ci){if(_e!==qe){const Mi=qe;qe=_e;const Rn=Lt(ci);return qe=Mi,Rn}return Lt(ci)}function ko(_e){j.assert(Vs(_e.name));const Lt=ja(_e.name);if(j.assert(Lt,"Undeclared private name for property declaration."),Lt.kind==="m")return Lt.methodName;if(Lt.kind==="a"){if(oS(_e))return Lt.getterName;if(D1(_e))return Lt.setterName}}function ls(){const _e=on();return _e.classThis??_e.classConstructor??(De==null?void 0:De.name)}function Qs(_e){const Lt=B1(_e),ci=yS(_e),Mi=_e.name;let Rn=Mi,Yr=Mi;if(Ka(Mi)&&!Uy(Mi.expression)){const Pu=WX(Mi);if(Pu)Rn=r.updateComputedPropertyName(Mi,bt(Mi.expression,Pe,jt)),Yr=r.updateComputedPropertyName(Mi,Pu.left);else{const Ku=r.createTempVariable(u);Ga(Ku,Mi.expression);const Xu=bt(Mi.expression,Pe,jt),Wl=r.createAssignment(Ku,Xu);Ga(Wl,Mi.expression),Rn=r.updateComputedPropertyName(Mi,Wl),Yr=r.updateComputedPropertyName(Mi,Ku)}}const Xi=Dn(_e.modifiers,He,Fa),Mr=Vle(r,_e,Xi,_e.initializer);Ir(Mr,_e),tr(Mr,3072),Ga(Mr,ci);const ds=pa(_e)?ls()??r.createThis():r.createThis(),Ks=mIe(r,_e,Xi,Rn,ds);Ir(Ks,_e),Sd(Ks,Lt),Ga(Ks,ci);const Ic=r.createModifiersFromModifierFlags(M1(Xi)),Gl=gIe(r,_e,Ic,Yr,ds);return Ir(Gl,_e),tr(Gl,3072),Ga(Gl,ci),VH([Mr,Ks,Gl],ut,Od)}function Mn(_e){if(pn(_e)){const Lt=ja(_e.name);if(j.assert(Lt,"Undeclared private name for property declaration."),!Lt.isValid)return _e;if(Lt.isStatic&&!q){const ci=vn(_e,r.createThis());if(ci)return r.createClassStaticBlockDeclaration(r.createBlock([ci],!0))}return}return F&&!pa(_e)&&(Ae!=null&&Ae.data)&&Ae.data.facts&16?r.updatePropertyDeclaration(_e,Dn(_e.modifiers,Pe,Ul),_e.name,void 0,void 0,void 0):(Sp(_e,Ze)&&(_e=Dp(t,_e)),r.updatePropertyDeclaration(_e,Dn(_e.modifiers,He,Fa),bt(_e.name,Me,id),void 0,void 0,bt(_e.initializer,Pe,jt)))}function Zs(_e){if(U&&!I_(_e)){const Lt=Ai(_e.name,!!_e.initializer||N);if(Lt&&cn().push(...yIe(Lt)),pa(_e)&&!q){const ci=vn(_e,r.createThis());if(ci){const Mi=r.createClassStaticBlockDeclaration(r.createBlock([ci]));return Ir(Mi,_e),Sd(Mi,_e),Sd(ci,{pos:-1,end:-1}),e2(ci,void 0),OP(ci,void 0),Mi}}return}return r.updatePropertyDeclaration(_e,Dn(_e.modifiers,He,Fa),bt(_e.name,Me,id),void 0,void 0,bt(_e.initializer,Pe,jt))}function at(_e){return j.assert(!lm(_e),"Decorators should already have been transformed and elided."),Wh(_e)?Mn(_e):Zs(_e)}function yi(){return X===-1||X===3&&!!(Ae!=null&&Ae.data)&&!!(Ae.data.facts&16)}function Sn(_e){return I_(_e)&&(yi()||bd(_e)&&u0(_e)&32)?Qs(_e):at(_e)}function dr(){return!!qe&&bd(qe)&&Qw(qe)&&I_(Ql(qe))}function us(_e){if(dr()){const Lt=Vu(_e);Lt.kind===110&&Te.add(Lt)}}function Xr(_e,Lt){return Lt=bt(Lt,Pe,jt),us(Lt),Gs(_e,Lt)}function Gs(_e,Lt){switch(Sd(Lt,Zk(Lt,-1)),_e.kind){case"a":return a().createClassPrivateFieldGetHelper(Lt,_e.brandCheckIdentifier,_e.kind,_e.getterName);case"m":return a().createClassPrivateFieldGetHelper(Lt,_e.brandCheckIdentifier,_e.kind,_e.methodName);case"f":return a().createClassPrivateFieldGetHelper(Lt,_e.brandCheckIdentifier,_e.kind,_e.isStatic?_e.variableName:void 0);case"untransformed":return j.fail("Access helpers should not be created for untransformed private elements");default:j.assertNever(_e,"Unknown private element type")}}function ma(_e){if(Vs(_e.name)){const Lt=ja(_e.name);if(Lt)return Ht(Ir(Xr(Lt,_e.expression),_e),_e)}if(Q&&qe&&G_(_e)&&ot(_e.name)&&J7(qe)&&(Ae!=null&&Ae.data)){const{classConstructor:Lt,superClassReference:ci,facts:Mi}=Ae.data;if(Mi&1)return Ri(_e);if(Lt&&ci){const Rn=r.createReflectGetCall(ci,r.createStringLiteralFromNode(_e.name),Lt);return Ir(Rn,_e.expression),Ht(Rn,_e.expression),Rn}}return dn(_e,Pe,t)}function ka(_e){if(Q&&qe&&G_(_e)&&J7(qe)&&(Ae!=null&&Ae.data)){const{classConstructor:Lt,superClassReference:ci,facts:Mi}=Ae.data;if(Mi&1)return Ri(_e);if(Lt&&ci){const Rn=r.createReflectGetCall(ci,bt(_e.argumentExpression,Pe,jt),Lt);return Ir(Rn,_e.expression),Ht(Rn,_e.expression),Rn}}return dn(_e,Pe,t)}function Ji(_e,Lt){if(_e.operator===46||_e.operator===47){const ci=Dc(_e.operand);if(F6(ci)){let Mi;if(Mi=ja(ci.name)){const Rn=bt(ci.expression,Pe,jt);us(Rn);const{readExpression:Yr,initializeExpression:Xi}=ri(Rn);let Mr=Xr(Mi,Yr);const ds=n2(_e)||Lt?void 0:r.createTempVariable(u);return Mr=PX(r,_e,Mr,u,ds),Mr=Rt(Mi,Xi||Yr,Mr,64),Ir(Mr,_e),Ht(Mr,_e),ds&&(Mr=r.createComma(Mr,ds),Ht(Mr,_e)),Mr}}else if(Q&&qe&&G_(ci)&&J7(qe)&&(Ae!=null&&Ae.data)){const{classConstructor:Mi,superClassReference:Rn,facts:Yr}=Ae.data;if(Yr&1){const Xi=Ri(ci);return n2(_e)?r.updatePrefixUnaryExpression(_e,Xi):r.updatePostfixUnaryExpression(_e,Xi)}if(Mi&&Rn){let Xi,Mr;if(Nr(ci)?ot(ci.name)&&(Mr=Xi=r.createStringLiteralFromNode(ci.name)):Uy(ci.argumentExpression)?Mr=Xi=ci.argumentExpression:(Mr=r.createTempVariable(u),Xi=r.createAssignment(Mr,bt(ci.argumentExpression,Pe,jt))),Xi&&Mr){let ds=r.createReflectGetCall(Rn,Mr,Mi);Ht(ds,ci);const Ks=Lt?void 0:r.createTempVariable(u);return ds=PX(r,_e,ds,u,Ks),ds=r.createReflectSetCall(Rn,Xi,ds,Mi),Ir(ds,_e),Ht(ds,_e),Ks&&(ds=r.createComma(ds,Ks),Ht(ds,_e)),ds}}}}return dn(_e,Pe,t)}function ac(_e){return r.updateForStatement(_e,bt(_e.initializer,ze,Hm),bt(_e.condition,Pe,jt),bt(_e.incrementor,ze,jt),u_(_e.statement,Pe,t))}function St(_e){return r.updateExpressionStatement(_e,bt(_e.expression,ze,jt))}function ri(_e){const Lt=cl(_e)?_e:r.cloneNode(_e);if(_e.kind===110&&Te.has(_e)&&Te.add(Lt),Uy(_e))return{readExpression:Lt,initializeExpression:void 0};const ci=r.createTempVariable(u),Mi=r.createAssignment(ci,Lt);return{readExpression:ci,initializeExpression:Mi}}function xe(_e){var Lt;if(F6(_e.expression)&&ja(_e.expression.name)){const{thisArg:ci,target:Mi}=r.createCallBinding(_e.expression,u,E);return cI(_e)?r.updateCallChain(_e,r.createPropertyAccessChain(bt(Mi,Pe,jt),_e.questionDotToken,"call"),void 0,void 0,[bt(ci,Pe,jt),...Dn(_e.arguments,Pe,jt)]):r.updateCallExpression(_e,r.createPropertyAccessExpression(bt(Mi,Pe,jt),"call"),void 0,[bt(ci,Pe,jt),...Dn(_e.arguments,Pe,jt)])}if(Q&&qe&&G_(_e.expression)&&J7(qe)&&((Lt=Ae==null?void 0:Ae.data)!=null&&Lt.classConstructor)){const ci=r.createFunctionCallCall(bt(_e.expression,Pe,jt),Ae.data.classConstructor,Dn(_e.arguments,Pe,jt));return Ir(ci,_e),Ht(ci,_e),ci}return dn(_e,Pe,t)}function pt(_e){var Lt;if(F6(_e.tag)&&ja(_e.tag.name)){const{thisArg:ci,target:Mi}=r.createCallBinding(_e.tag,u,E);return r.updateTaggedTemplateExpression(_e,r.createCallExpression(r.createPropertyAccessExpression(bt(Mi,Pe,jt),"bind"),void 0,[bt(ci,Pe,jt)]),void 0,bt(_e.template,Pe,nP))}if(Q&&qe&&G_(_e.tag)&&J7(qe)&&((Lt=Ae==null?void 0:Ae.data)!=null&&Lt.classConstructor)){const ci=r.createFunctionBindCall(bt(_e.tag,Pe,jt),Ae.data.classConstructor,[]);return Ir(ci,_e),Ht(ci,_e),r.updateTaggedTemplateExpression(_e,ci,void 0,bt(_e.template,Pe,nP))}return dn(_e,Pe,t)}function Se(_e){if(Ae&&ke.set(Ql(_e),Ae),q){if($7(_e)){const Mi=bt(_e.body.statements[0].expression,Pe,jt);return lf(Mi,!0)&&Mi.left===Mi.right?void 0:Mi}if(sA(_e))return bt(_e.body.statements[0].expression,Pe,jt);p();let Lt=Fs(_e,Mi=>Dn(Mi,Pe,Ps),_e.body.statements);Lt=r.mergeLexicalEnvironment(Lt,h());const ci=r.createImmediatelyInvokedArrowFunction(Lt);return Ir(Dc(ci.expression),_e),F1(Dc(ci.expression),4),Ir(ci,_e),Ht(ci,_e),ci}}function Ze(_e){if(fd(_e)&&!_e.name){const Lt=bQ(_e);return Ft(Lt,sA)?!1:(q||!!u0(_e))&&Ft(Lt,Mi=>gu(Mi)||Wh(Mi)||U&&HH(Mi))}return!1}function gt(_e,Lt){if(pS(_e)){const ci=we;we=void 0,_e=r.updateBinaryExpression(_e,bt(_e.left,$e,jt),_e.operatorToken,bt(_e.right,Pe,jt));const Mi=Ft(we)?r.inlineExpressions(Rw([...we,_e])):_e;return we=ci,Mi}if(lf(_e)){Sp(_e,Ze)&&(_e=Dp(t,_e),j.assertNode(_e,lf));const ci=Vu(_e.left,9);if(F6(ci)){const Mi=ja(ci.name);if(Mi)return Ht(Ir(Rt(Mi,ci.expression,_e.right,_e.operatorToken.kind),_e),_e)}else if(Q&&qe&&G_(_e.left)&&J7(qe)&&(Ae!=null&&Ae.data)){const{classConstructor:Mi,superClassReference:Rn,facts:Yr}=Ae.data;if(Yr&1)return r.updateBinaryExpression(_e,Ri(_e.left),_e.operatorToken,bt(_e.right,Pe,jt));if(Mi&&Rn){let Xi=wl(_e.left)?bt(_e.left.argumentExpression,Pe,jt):ot(_e.left.name)?r.createStringLiteralFromNode(_e.left.name):void 0;if(Xi){let Mr=bt(_e.right,Pe,jt);if(z7(_e.operatorToken.kind)){let Ks=Xi;Uy(Xi)||(Ks=r.createTempVariable(u),Xi=r.createAssignment(Ks,Xi));const Ic=r.createReflectGetCall(Rn,Ks,Mi);Ir(Ic,_e.left),Ht(Ic,_e.left),Mr=r.createBinaryExpression(Ic,U7(_e.operatorToken.kind),Mr),Ht(Mr,_e)}const ds=Lt?void 0:r.createTempVariable(u);return ds&&(Mr=r.createAssignment(ds,Mr),Ht(ds,_e)),Mr=r.createReflectSetCall(Rn,Xi,Mr,Mi),Ir(Mr,_e),Ht(Mr,_e),ds&&(Mr=r.createComma(Mr,ds),Ht(Mr,_e)),Mr}}}}return BRt(_e)?Et(_e):dn(_e,Pe,t)}function Dt(_e,Lt){const ci=mQ(_e.elements,ze);return r.updateCommaListExpression(_e,ci)}function Je(_e,Lt){const ci=Lt?ze:Pe,Mi=bt(_e.expression,ci,jt);return r.updateParenthesizedExpression(_e,Mi)}function Rt(_e,Lt,ci,Mi){if(Lt=bt(Lt,Pe,jt),ci=bt(ci,Pe,jt),us(Lt),z7(Mi)){const{readExpression:Rn,initializeExpression:Yr}=ri(Lt);Lt=Yr||Rn,ci=r.createBinaryExpression(Gs(_e,Rn),U7(Mi),ci)}switch(Sd(Lt,Zk(Lt,-1)),_e.kind){case"a":return a().createClassPrivateFieldSetHelper(Lt,_e.brandCheckIdentifier,ci,_e.kind,_e.setterName);case"m":return a().createClassPrivateFieldSetHelper(Lt,_e.brandCheckIdentifier,ci,_e.kind,void 0);case"f":return a().createClassPrivateFieldSetHelper(Lt,_e.brandCheckIdentifier,ci,_e.kind,_e.isStatic?_e.variableName:void 0);case"untransformed":return j.fail("Access helpers should not be created for untransformed private elements");default:j.assertNever(_e,"Unknown private element type")}}function Ct(_e){return $t(_e.members,MNe)}function ii(_e){var Lt;let ci=0;const Mi=Ql(_e);ss(Mi)&&dS(R,Mi)&&(ci|=1),q&&(Uue(_e)||wQ(_e))&&(ci|=2);let Rn=!1,Yr=!1,Xi=!1,Mr=!1;for(const Ks of _e.members)pa(Ks)?((Ks.name&&(Vs(Ks.name)||I_(Ks))&&q||I_(Ks)&&X===-1&&!_e.name&&!((Lt=_e.emitNode)!=null&&Lt.classThis))&&(ci|=2),(Lo(Ks)||gu(Ks))&&(Z&&Ks.transformFlags&16384&&(ci|=8,ci&1||(ci|=2)),Q&&Ks.transformFlags&134217728&&(ci&1||(ci|=6)))):KT(Ql(Ks))||(I_(Ks)?(Mr=!0,Xi||(Xi=Wh(Ks))):Wh(Ks)?(Xi=!0,b.hasNodeCheckFlag(Ks,262144)&&(ci|=2)):Lo(Ks)&&(Rn=!0,Yr||(Yr=!!Ks.initializer)));return(H&&Rn||F&&Yr||q&&Xi||q&&Mr&&X===-1)&&(ci|=16),ci}function vt(_e){var Lt;if((((Lt=Ae==null?void 0:Ae.data)==null?void 0:Lt.facts)||0)&4){const Mi=r.createTempVariable(u,!0);return on().superClassReference=Mi,r.updateExpressionWithTypeArguments(_e,r.createAssignment(Mi,bt(_e.expression,Pe,jt)),void 0)}return dn(_e,Pe,t)}function Ni(_e,Lt){var ci;const Mi=De,Rn=we,Yr=Ae;De=_e,we=void 0,Xn();const Xi=u0(_e)&32;if(q||Xi){const Ks=No(_e);if(Ks&&ot(Ks))zi().data.className=Ks;else if((ci=_e.emitNode)!=null&&ci.assignedName&&Ha(_e.emitNode.assignedName)){if(_e.emitNode.assignedName.textSourceNode&&ot(_e.emitNode.assignedName.textSourceNode))zi().data.className=_e.emitNode.assignedName.textSourceNode;else if(J_(_e.emitNode.assignedName.text,E)){const Ic=r.createIdentifier(_e.emitNode.assignedName.text);zi().data.className=Ic}}}if(q){const Ks=Ct(_e);Ft(Ks)&&(zi().data.weakSetName=Zc("instances",Ks[0].name))}const Mr=ii(_e);Mr&&(on().facts=Mr),Mr&8&&fi();const ds=Lt(_e,Mr);return Di(),j.assert(Ae===Yr),De=Mi,we=Rn,ds}function ji(_e){return Ni(_e,gr)}function gr(_e,Lt){var ci,Mi;let Rn;if(Lt&2)if(q&&((ci=_e.emitNode)!=null&&ci.classThis))on().classConstructor=_e.emitNode.classThis,Rn=r.createAssignment(_e.emitNode.classThis,r.getInternalName(_e));else{const Wl=r.createTempVariable(u,!0);on().classConstructor=r.cloneNode(Wl),Rn=r.createAssignment(Wl,r.getInternalName(_e))}(Mi=_e.emitNode)!=null&&Mi.classThis&&(on().classThis=_e.emitNode.classThis);const Yr=b.hasNodeCheckFlag(_e,262144),Xi=Zr(_e,32),Mr=Zr(_e,2048);let ds=Dn(_e.modifiers,He,Fa);const Ks=Dn(_e.heritageClauses,Nt,Tp),{members:Ic,prologue:Gl}=Ue(_e),Pu=[];if(Rn&&cn().unshift(Rn),Ft(we)&&Pu.push(r.createExpressionStatement(r.inlineExpressions(we))),F||q||u0(_e)&32){const Wl=bQ(_e);Ft(Wl)&&hi(Pu,Wl,r.getInternalName(_e))}Pu.length>0&&Xi&&Mr&&(ds=Dn(ds,Wl=>SH(Wl)?void 0:Wl,Fa),Pu.push(r.createExportAssignment(void 0,!1,r.getLocalName(_e,!1,!0))));const Ku=on().classConstructor;Yr&&Ku&&(Bt(),Ie[d_(_e)]=Ku);const Xu=r.updateClassDeclaration(_e,ds,_e.name,void 0,Ks,Ic);return Pu.unshift(Xu),Gl&&Pu.unshift(r.createExpressionStatement(Gl)),Pu}function te(_e){return Ni(_e,tt)}function tt(_e,Lt){var ci,Mi,Rn;const Yr=!!(Lt&1),Xi=bQ(_e),Mr=b.hasNodeCheckFlag(_e,262144),ds=b.hasNodeCheckFlag(_e,32768);let Ks;function Ic(){var Qu;if(q&&((Qu=_e.emitNode)!=null&&Qu.classThis))return on().classConstructor=_e.emitNode.classThis;const kd=r.createTempVariable(ds?C:u,!0);return on().classConstructor=r.cloneNode(kd),kd}(ci=_e.emitNode)!=null&&ci.classThis&&(on().classThis=_e.emitNode.classThis),Lt&2&&(Ks??(Ks=Ic()));const Gl=Dn(_e.modifiers,He,Fa),Pu=Dn(_e.heritageClauses,Nt,Tp),{members:Ku,prologue:Xu}=Ue(_e),Wl=r.updateClassExpression(_e,Gl,_e.name,void 0,Pu,Ku),Cu=[];if(Xu&&Cu.push(Xu),(q||u0(_e)&32)&&Ft(Xi,Qu=>gu(Qu)||Wh(Qu)||U&&HH(Qu))||Ft(we))if(Yr)j.assertIsDefined(he,"Decorated classes transformed by TypeScript are expected to be within a variable declaration."),Ft(we)&&Sr(he,qt(we,r.createExpressionStatement)),Ft(Xi)&&hi(he,Xi,((Mi=_e.emitNode)==null?void 0:Mi.classThis)??r.getInternalName(_e)),Ks?Cu.push(r.createAssignment(Ks,Wl)):q&&((Rn=_e.emitNode)!=null&&Rn.classThis)?Cu.push(r.createAssignment(_e.emitNode.classThis,Wl)):Cu.push(Wl);else{if(Ks??(Ks=Ic()),Mr){Bt();const Qu=r.cloneNode(Ks);Qu.emitNode.autoGenerate.flags&=-9,Ie[d_(_e)]=Qu}Cu.push(r.createAssignment(Ks,Wl)),Sr(Cu,we),Sr(Cu,ln(Xi,Ks)),Cu.push(r.cloneNode(Ks))}else Cu.push(Wl);return Cu.length>1&&(F1(Wl,131072),Cu.forEach(bh)),r.inlineExpressions(Cu)}function Gt(_e){if(!q)return dn(_e,Pe,t)}function le(_e){if(Z&&qe&&gu(qe)&&(Ae!=null&&Ae.data)){const{classThis:Lt,classConstructor:ci}=Ae.data;return Lt??ci??_e}return _e}function Ue(_e){const Lt=!!(u0(_e)&32);if(q||de){for(const Xi of _e.members)if(Wh(Xi))if(pn(Xi))Gu(Xi,Xi.name,vi);else{const Mr=zi();VI(Mr,Xi.name,{kind:"untransformed"})}if(q&&Ft(Ct(_e))&&be(),yi()){for(const Xi of _e.members)if(I_(Xi)){const Mr=r.getGeneratedPrivateNameForNode(Xi.name,void 0,"_accessor_storage");if(q||Lt&&bd(Xi))Gu(Xi,Mr,qo);else{const ds=zi();VI(ds,Mr,{kind:"untransformed"})}}}}let ci=Dn(_e.members,et,Od),Mi;Ft(ci,iu)||(Mi=Qt(void 0,_e));let Rn,Yr;if(!q&&Ft(we)){let Xi=r.createExpressionStatement(r.inlineExpressions(we));if(Xi.transformFlags&134234112){const ds=r.createTempVariable(u),Ks=r.createArrowFunction(void 0,void 0,[],void 0,void 0,r.createBlock([Xi]));Rn=r.createAssignment(ds,Ks),Xi=r.createExpressionStatement(r.createCallExpression(ds,void 0,[]))}const Mr=r.createBlock([Xi]);Yr=r.createClassStaticBlockDeclaration(Mr),we=void 0}if(Mi||Yr){let Xi;const Mr=Fe(ci,$7),ds=Fe(ci,sA);Xi=fn(Xi,Mr),Xi=fn(Xi,ds),Xi=fn(Xi,Mi),Xi=fn(Xi,Yr);const Ks=Mr||ds?$t(ci,Ic=>Ic!==Mr&&Ic!==ds):ci;Xi=Sr(Xi,Ks),ci=Ht(r.createNodeArray(Xi),_e.members)}return{members:ci,prologue:Rn}}function be(){const{weakSetName:_e}=zi().data;j.assert(_e,"weakSetName should be set in private identifier environment"),cn().push(r.createAssignment(_e,r.createNewExpression(r.createIdentifier("WeakSet"),void 0,[])))}function Qt(_e,Lt){if(_e=bt(_e,Pe,iu),!(Ae!=null&&Ae.data)||!(Ae.data.facts&16))return _e;const ci=L1(Lt),Mi=!!(ci&&Vu(ci.expression).kind!==106),Rn=yu(_e?_e.parameters:void 0,Pe,t),Yr=st(Lt,_e,Mi);return Yr?_e?(j.assert(Rn),r.updateConstructorDeclaration(_e,void 0,Rn,Yr)):bh(Ir(Ht(r.createConstructorDeclaration(void 0,Rn??[],Yr),_e||Lt),_e)):_e}function lt(_e,Lt,ci,Mi,Rn,Yr,Xi){const Mr=Mi[Rn],ds=Lt[Mr];if(Sr(_e,Dn(Lt,Pe,Ps,ci,Mr-ci)),ci=Mr+1,NI(ds)){const Ks=[];lt(Ks,ds.tryBlock.statements,0,Mi,Rn+1,Yr,Xi);const Ic=r.createNodeArray(Ks);Ht(Ic,ds.tryBlock.statements),_e.push(r.updateTryStatement(ds,r.updateBlock(ds.tryBlock,Ks),bt(ds.catchClause,Pe,lD),bt(ds.finallyBlock,Pe,Xo)))}else{for(Sr(_e,Dn(Lt,Pe,Ps,Mr,1));ci<Lt.length;){const Ks=Lt[ci];if(vp(Ql(Ks),Xi))ci++;else break}Sr(_e,Yr)}Sr(_e,Dn(Lt,Pe,Ps,ci))}function st(_e,Lt,ci){var Mi;const Rn=Hue(_e,!1,!1);let Yr=Rn;N||(Yr=$t(Yr,Xu=>!!Xu.initializer||Vs(Xu.name)||O1(Xu)));const Xi=Ct(_e),Mr=Ft(Yr)||Ft(Xi);if(!Lt&&!Mr)return _m(void 0,Pe,t);g();const ds=!Lt&&ci;let Ks=0,Ic=[];const Gl=[],Pu=r.createThis();if(wi(Gl,Xi,Pu),Lt){const Xu=$t(Rn,Cu=>vp(Ql(Cu),Lt)),Wl=$t(Yr,Cu=>!vp(Ql(Cu),Lt));hi(Gl,Xu,Pu),hi(Gl,Wl,Pu)}else hi(Gl,Yr,Pu);if(Lt!=null&&Lt.body){Ks=r.copyPrologue(Lt.body.statements,Ic,!1,Pe);const Xu=vQ(Lt.body.statements,Ks);if(Xu.length)lt(Ic,Lt.body.statements,Ks,Xu,0,Gl,Lt);else{for(;Ks<Lt.body.statements.length;){const Wl=Lt.body.statements[Ks];if(vp(Ql(Wl),Lt))Ks++;else break}Sr(Ic,Gl),Sr(Ic,Dn(Lt.body.statements,Pe,Ps,Ks))}}else ds&&Ic.push(r.createExpressionStatement(r.createCallExpression(r.createSuper(),void 0,[r.createSpreadElement(r.createIdentifier("arguments"))]))),Sr(Ic,Gl);if(Ic=r.mergeLexicalEnvironment(Ic,h()),Ic.length===0&&!Lt)return;const Ku=Lt!=null&&Lt.body&&Lt.body.statements.length>=Ic.length?Lt.body.multiLine??Ic.length>0:Ic.length>0;return Ht(r.createBlock(Ht(r.createNodeArray(Ic),((Mi=Lt==null?void 0:Lt.body)==null?void 0:Mi.statements)??_e.members),Ku),Lt==null?void 0:Lt.body)}function hi(_e,Lt,ci){for(const Mi of Lt){if(pa(Mi)&&!q)continue;const Rn=vn(Mi,ci);Rn&&_e.push(Rn)}}function vn(_e,Lt){const ci=gu(_e)?Fs(_e,Se,_e):Un(_e,Lt);if(!ci)return;const Mi=r.createExpressionStatement(ci);Ir(Mi,_e),F1(Mi,Ya(_e)&3072),Sd(Mi,_e);const Rn=Ql(_e);return $s(Rn)?(Ga(Mi,Rn),oH(Mi)):Ga(Mi,R1(_e)),e2(ci,void 0),OP(ci,void 0),O1(Rn)&&F1(Mi,3072),Mi}function ln(_e,Lt){const ci=[];for(const Mi of _e){const Rn=gu(Mi)?Fs(Mi,Se,Mi):Fs(Mi,()=>Un(Mi,Lt),void 0);Rn&&(bh(Rn),Ir(Rn,Mi),F1(Rn,Ya(Mi)&3072),Ga(Rn,R1(Mi)),Sd(Rn,Mi),ci.push(Rn))}return ci}function Un(_e,Lt){var ci;const Mi=qe,Rn=Pt(_e,Lt);return Rn&&bd(_e)&&((ci=Ae==null?void 0:Ae.data)!=null&&ci.facts)&&(Ir(Rn,_e),F1(Rn,4),Ga(Rn,yS(_e.name)),ke.set(Ql(_e),Ae)),qe=Mi,Rn}function Pt(_e,Lt){const ci=!N;Sp(_e,Ze)&&(_e=Dp(t,_e));const Mi=O1(_e)?r.getGeneratedPrivateNameForNode(_e.name):Ka(_e.name)&&!Uy(_e.name.expression)?r.updateComputedPropertyName(_e.name,r.getGeneratedNameForNode(_e.name)):_e.name;if(bd(_e)&&(qe=_e),Vs(Mi)&&pn(_e)){const Xi=ja(Mi);if(Xi)return Xi.kind==="f"?Xi.isStatic?ORt(r,Xi.variableName,bt(_e.initializer,Pe,jt)):MRt(r,Lt,bt(_e.initializer,Pe,jt),Xi.brandCheckIdentifier):void 0;j.fail("Undeclared private name for property declaration.")}if((Vs(Mi)||bd(_e))&&!_e.initializer)return;const Rn=Ql(_e);if(Zr(Rn,64))return;let Yr=bt(_e.initializer,Pe,jt);if(vp(Rn,Rn.parent)&&ot(Mi)){const Xi=r.cloneNode(Mi);Yr?(c_(Yr)&&vH(Yr.expression)&&_7(Yr.expression.left,"___runInitializers")&&UP(Yr.expression.right)&&A_(Yr.expression.right.expression)&&(Yr=Yr.expression.left),Yr=r.inlineExpressions([Yr,Xi])):Yr=Xi,tr(Mi,3168),Ga(Xi,Rn.name),tr(Xi,3072)}else Yr??(Yr=r.createVoidZero());if(ci||Vs(Mi)){const Xi=RI(r,Lt,Mi,Mi);return F1(Xi,1024),r.createAssignment(Xi,Yr)}else{const Xi=Ka(Mi)?Mi.expression:ot(Mi)?r.createStringLiteral(Ws(Mi.escapedText)):Mi,Mr=r.createPropertyDescriptor({value:Yr,configurable:!0,writable:!0,enumerable:!0});return r.createObjectDefinePropertyCall(Lt,Xi,Mr)}}function Bt(){ue&1||(ue|=1,t.enableSubstitution(80),Ie=[])}function fi(){ue&2||(ue|=2,t.enableSubstitution(110),t.enableEmitNotification(262),t.enableEmitNotification(218),t.enableEmitNotification(176),t.enableEmitNotification(177),t.enableEmitNotification(178),t.enableEmitNotification(174),t.enableEmitNotification(172),t.enableEmitNotification(167))}function wi(_e,Lt,ci){if(!q||!Ft(Lt))return;const{weakSetName:Mi}=zi().data;j.assert(Mi,"weakSetName should be set in private identifier environment"),_e.push(r.createExpressionStatement(RRt(r,ci,Mi)))}function Ri(_e){return Nr(_e)?r.updatePropertyAccessExpression(_e,r.createVoidZero(),_e.name):r.updateElementAccessExpression(_e,r.createVoidZero(),bt(_e.argumentExpression,Pe,jt))}function Ai(_e,Lt){if(Ka(_e)){const ci=WX(_e),Mi=bt(_e.expression,Pe,jt),Rn=l0(Mi),Yr=Uy(Rn);if(!(!!ci||lf(Rn)&&zl(Rn.left))&&!Yr&&Lt){const Mr=r.getGeneratedNameForNode(_e);return b.hasNodeCheckFlag(_e,32768)?C(Mr):u(Mr),r.createAssignment(Mr,Mi)}return Yr||ot(Rn)?void 0:Mi}}function Xn(){Ae={previous:Ae,data:void 0}}function Di(){Ae=Ae==null?void 0:Ae.previous}function on(){return j.assert(Ae),Ae.data??(Ae.data={facts:0,classConstructor:void 0,classThis:void 0,superClassReference:void 0})}function zi(){return j.assert(Ae),Ae.privateEnv??(Ae.privateEnv=FNe({className:void 0,weakSetName:void 0}))}function cn(){return we??(we=[])}function vi(_e,Lt,ci,Mi,Rn,Yr,Xi){I_(_e)?vu(_e,Lt,ci,Mi,Rn,Yr):Lo(_e)?qo(_e,Lt,ci,Mi,Rn,Yr):Nu(_e)?Wo(_e,Lt,ci,Mi,Rn,Yr):um(_e)?$o(_e,Lt,ci,Mi,Rn,Yr,Xi):kp(_e)&&Lc(_e,Lt,ci,Mi,Rn,Yr,Xi)}function qo(_e,Lt,ci,Mi,Rn,Yr,Xi){if(Rn){const Mr=j.checkDefined(ci.classThis??ci.classConstructor,"classConstructor should be set in private identifier environment"),ds=Ls(Lt);VI(Mi,Lt,{kind:"f",isStatic:!0,brandCheckIdentifier:Mr,variableName:ds,isValid:Yr})}else{const Mr=Ls(Lt);VI(Mi,Lt,{kind:"f",isStatic:!1,brandCheckIdentifier:Mr,isValid:Yr}),cn().push(r.createAssignment(Mr,r.createNewExpression(r.createIdentifier("WeakMap"),void 0,[])))}}function Wo(_e,Lt,ci,Mi,Rn,Yr,Xi){const Mr=Ls(Lt),ds=Rn?j.checkDefined(ci.classThis??ci.classConstructor,"classConstructor should be set in private identifier environment"):j.checkDefined(Mi.data.weakSetName,"weakSetName should be set in private identifier environment");VI(Mi,Lt,{kind:"m",methodName:Mr,brandCheckIdentifier:ds,isStatic:Rn,isValid:Yr})}function $o(_e,Lt,ci,Mi,Rn,Yr,Xi){const Mr=Ls(Lt,"_get"),ds=Rn?j.checkDefined(ci.classThis??ci.classConstructor,"classConstructor should be set in private identifier environment"):j.checkDefined(Mi.data.weakSetName,"weakSetName should be set in private identifier environment");(Xi==null?void 0:Xi.kind)==="a"&&Xi.isStatic===Rn&&!Xi.getterName?Xi.getterName=Mr:VI(Mi,Lt,{kind:"a",getterName:Mr,setterName:void 0,brandCheckIdentifier:ds,isStatic:Rn,isValid:Yr})}function Lc(_e,Lt,ci,Mi,Rn,Yr,Xi){const Mr=Ls(Lt,"_set"),ds=Rn?j.checkDefined(ci.classThis??ci.classConstructor,"classConstructor should be set in private identifier environment"):j.checkDefined(Mi.data.weakSetName,"weakSetName should be set in private identifier environment");(Xi==null?void 0:Xi.kind)==="a"&&Xi.isStatic===Rn&&!Xi.setterName?Xi.setterName=Mr:VI(Mi,Lt,{kind:"a",getterName:void 0,setterName:Mr,brandCheckIdentifier:ds,isStatic:Rn,isValid:Yr})}function vu(_e,Lt,ci,Mi,Rn,Yr,Xi){const Mr=Ls(Lt,"_get"),ds=Ls(Lt,"_set"),Ks=Rn?j.checkDefined(ci.classThis??ci.classConstructor,"classConstructor should be set in private identifier environment"):j.checkDefined(Mi.data.weakSetName,"weakSetName should be set in private identifier environment");VI(Mi,Lt,{kind:"a",getterName:Mr,setterName:ds,brandCheckIdentifier:Ks,isStatic:Rn,isValid:Yr})}function Gu(_e,Lt,ci){const Mi=on(),Rn=zi(),Yr=zue(Rn,Lt),Xi=bd(_e),Mr=!FRt(Lt)&&Yr===void 0;ci(_e,Lt,Mi,Rn,Xi,Mr,Yr)}function Zc(_e,Lt,ci){const{className:Mi}=zi().data,Rn=Mi?{prefix:"_",node:Mi,suffix:"_"}:"_",Yr=typeof _e=="object"?r.getGeneratedNameForNode(_e,24,Rn,ci):typeof _e=="string"?r.createUniqueName(_e,16,Rn,ci):r.createTempVariable(void 0,!0,Rn,ci);return b.hasNodeCheckFlag(Lt,32768)?C(Yr):u(Yr),Yr}function Ls(_e,Lt){const ci=D8(_e);return Zc((ci==null?void 0:ci.substring(1))??_e,_e,Lt)}function ja(_e){const Lt=BNe(Ae,_e);return(Lt==null?void 0:Lt.kind)==="untransformed"?void 0:Lt}function wf(_e){const Lt=r.getGeneratedNameForNode(_e),ci=ja(_e.name);if(!ci)return dn(_e,Pe,t);let Mi=_e.expression;return(aV(_e)||G_(_e)||!fD(_e.expression))&&(Mi=r.createTempVariable(u,!0),cn().push(r.createBinaryExpression(Mi,64,bt(_e.expression,Pe,jt)))),r.createAssignmentTargetWrapper(Lt,Rt(ci,Mi,Lt,64))}function Jo(_e){if(Aa(_e)||jf(_e))return ki(_e);if(F6(_e))return wf(_e);if(Q&&qe&&G_(_e)&&J7(qe)&&(Ae!=null&&Ae.data)){const{classConstructor:Lt,superClassReference:ci,facts:Mi}=Ae.data;if(Mi&1)return Ri(_e);if(Lt&&ci){const Rn=wl(_e)?bt(_e.argumentExpression,Pe,jt):ot(_e.name)?r.createStringLiteralFromNode(_e.name):void 0;if(Rn){const Yr=r.createTempVariable(void 0);return r.createAssignmentTargetWrapper(Yr,r.createReflectSetCall(ci,Rn,Yr,Lt))}}}return dn(_e,Pe,t)}function kh(_e){if(Sp(_e,Ze)&&(_e=Dp(t,_e)),lf(_e,!0)){const Lt=Jo(_e.left),ci=bt(_e.right,Pe,jt);return r.updateBinaryExpression(_e,Lt,_e.operatorToken,ci)}return Jo(_e)}function md(_e){if(N_(_e.expression)){const Lt=Jo(_e.expression);return r.updateSpreadElement(_e,Lt)}return dn(_e,Pe,t)}function go(_e){if(jW(_e)){if(Km(_e))return md(_e);if(!Bd(_e))return kh(_e)}return dn(_e,Pe,t)}function pc(_e){const Lt=bt(_e.name,Pe,id);if(lf(_e.initializer,!0)){const ci=kh(_e.initializer);return r.updatePropertyAssignment(_e,Lt,ci)}if(N_(_e.initializer)){const ci=Jo(_e.initializer);return r.updatePropertyAssignment(_e,Lt,ci)}return dn(_e,Pe,t)}function mc(_e){return Sp(_e,Ze)&&(_e=Dp(t,_e)),dn(_e,Pe,t)}function oo(_e){if(N_(_e.expression)){const Lt=Jo(_e.expression);return r.updateSpreadAssignment(_e,Lt)}return dn(_e,Pe,t)}function tc(_e){return j.assertNode(_e,HW),Kv(_e)?oo(_e):lh(_e)?mc(_e):_d(_e)?pc(_e):dn(_e,Pe,t)}function ki(_e){return jf(_e)?r.updateArrayLiteralExpression(_e,Dn(_e.elements,go,jt)):r.updateObjectLiteralExpression(_e,Dn(_e.properties,tc,Ub))}function Gc(_e,Lt,ci){const Mi=Ql(Lt),Rn=ke.get(Mi);if(Rn){const Yr=Ae,Xi=Ne;Ae=Rn,Ne=se,se=!gu(Mi)||!(u0(Mi)&32),pe(_e,Lt,ci),se=Ne,Ne=Xi,Ae=Yr;return}switch(Lt.kind){case 218:if(xl(Mi)||Ya(Lt)&524288)break;case 262:case 176:case 177:case 178:case 174:case 172:{const Yr=Ae,Xi=Ne;Ae=void 0,Ne=se,se=!1,pe(_e,Lt,ci),se=Ne,Ne=Xi,Ae=Yr;return}case 167:{const Yr=Ae,Xi=se;Ae=Ae==null?void 0:Ae.previous,se=Ne,pe(_e,Lt,ci),se=Xi,Ae=Yr;return}}pe(_e,Lt,ci)}function uh(_e,Lt){return Lt=oe(_e,Lt),_e===1?sd(Lt):Lt}function sd(_e){switch(_e.kind){case 80:return Nl(_e);case 110:return Pp(_e)}return _e}function Pp(_e){if(ue&2&&(Ae!=null&&Ae.data)&&!Te.has(_e)){const{facts:Lt,classConstructor:ci,classThis:Mi}=Ae.data,Rn=se?Mi??ci:ci;if(Rn)return Ht(Ir(r.cloneNode(Rn),_e),_e);if(Lt&1&&R)return r.createParenthesizedExpression(r.createVoidZero())}return _e}function Nl(_e){return Ve(_e)||_e}function Ve(_e){if(ue&1&&b.hasNodeCheckFlag(_e,536870912)){const Lt=b.getReferencedValueDeclaration(_e);if(Lt){const ci=Ie[Lt.id];if(ci){const Mi=r.cloneNode(ci);return Ga(Mi,_e),Sd(Mi,_e),Mi}}}}}function ORt(t,r,a){return t.createAssignment(r,t.createObjectLiteralExpression([t.createPropertyAssignment("value",a||t.createVoidZero())]))}function MRt(t,r,a,u){return t.createCallExpression(t.createPropertyAccessExpression(u,"set"),void 0,[r,a||t.createVoidZero()])}function RRt(t,r,a){return t.createCallExpression(t.createPropertyAccessExpression(a,"add"),void 0,[r])}function FRt(t){return!uI(t)&&t.escapedText==="#constructor"}function BRt(t){return Vs(t.left)&&t.operatorToken.kind===103}function WRt(t){return Lo(t)&&bd(t)}function J7(t){return gu(t)||WRt(t)}function GNe(t){const{factory:r,hoistVariableDeclaration:a}=t,u=t.getEmitResolver(),h=t.getCompilerOptions(),p=Ja(h),g=ah(h,"strictNullChecks");let C,b;return{serializeTypeNode:(we,he)=>T(we,U,he),serializeTypeOfNode:(we,he,Ae)=>T(we,N,he,Ae),serializeParameterTypesOfNode:(we,he,Ae)=>T(we,R,he,Ae),serializeReturnTypeOfNode:(we,he)=>T(we,H,he)};function T(we,he,Ae,ke){const Te=C,De=b;C=we.currentLexicalScope,b=we.currentNameScope;const qe=ke===void 0?he(Ae):he(Ae,ke);return C=Te,b=De,qe}function E(we,he){const Ae=nx(he.members,we);return Ae.setAccessor&&QTe(Ae.setAccessor)||Ae.getAccessor&&wp(Ae.getAccessor)}function N(we,he){switch(we.kind){case 172:case 169:return U(we.type);case 178:case 177:return U(E(we,he));case 263:case 231:case 174:return r.createIdentifier("Function");default:return r.createVoidZero()}}function R(we,he){const Ae=ss(we)?Vv(we):Ho(we)&&Dg(we.body)?we:void 0,ke=[];if(Ae){const Te=F(Ae,he),De=Te.length;for(let qe=0;qe<De;qe++){const se=Te[qe];qe===0&&ot(se.name)&&se.name.escapedText==="this"||(se.dotDotDotToken?ke.push(U(Aae(se.type))):ke.push(N(se,he)))}}return r.createArrayLiteralExpression(ke)}function F(we,he){if(he&&we.kind===177){const{setAccessor:Ae}=nx(he.members,we);if(Ae)return Ae.parameters}return we.parameters}function H(we){return Ho(we)&&we.type?U(we.type):W8(we)?r.createIdentifier("Promise"):r.createVoidZero()}function U(we){if(we===void 0)return r.createIdentifier("Object");switch(we=M8(we),we.kind){case 116:case 157:case 146:return r.createVoidZero();case 184:case 185:return r.createIdentifier("Function");case 188:case 189:return r.createIdentifier("Array");case 182:return we.assertsModifier?r.createVoidZero():r.createIdentifier("Boolean");case 136:return r.createIdentifier("Boolean");case 203:case 154:return r.createIdentifier("String");case 151:return r.createIdentifier("Object");case 201:return q(we.literal);case 150:return r.createIdentifier("Number");case 163:return Ie("BigInt",7);case 155:return Ie("Symbol",2);case 183:return Q(we);case 193:return X(we.types,!0);case 192:return X(we.types,!1);case 194:return X([we.trueType,we.falseType],!1);case 198:if(we.operator===148)return U(we.type);break;case 186:case 199:case 200:case 187:case 133:case 159:case 197:case 205:break;case 312:case 313:case 317:case 318:case 319:break;case 314:case 315:case 316:return U(we.type);default:return j.failBadSyntaxKind(we)}return r.createIdentifier("Object")}function q(we){switch(we.kind){case 11:case 15:return r.createIdentifier("String");case 224:{const he=we.operand;switch(he.kind){case 9:case 10:return q(he);default:return j.failBadSyntaxKind(he)}}case 9:return r.createIdentifier("Number");case 10:return Ie("BigInt",7);case 112:case 97:return r.createIdentifier("Boolean");case 106:return r.createVoidZero();default:return j.failBadSyntaxKind(we)}}function X(we,he){let Ae;for(let ke of we){if(ke=M8(ke),ke.kind===146){if(he)return r.createVoidZero();continue}if(ke.kind===159){if(!he)return r.createIdentifier("Object");continue}if(ke.kind===133)return r.createIdentifier("Object");if(!g&&(bS(ke)&&ke.literal.kind===106||ke.kind===157))continue;const Te=U(ke);if(ot(Te)&&Te.escapedText==="Object")return Te;if(Ae){if(!Z(Ae,Te))return r.createIdentifier("Object")}else Ae=Te}return Ae??r.createVoidZero()}function Z(we,he){return zl(we)?zl(he):ot(we)?ot(he)&&we.escapedText===he.escapedText:Nr(we)?Nr(he)&&Z(we.expression,he.expression)&&Z(we.name,he.name):UP(we)?UP(he)&&A_(we.expression)&&we.expression.text==="0"&&A_(he.expression)&&he.expression.text==="0":Ha(we)?Ha(he)&&we.text===he.text:S3(we)?S3(he)&&Z(we.expression,he.expression):c_(we)?c_(he)&&Z(we.expression,he.expression):qP(we)?qP(he)&&Z(we.condition,he.condition)&&Z(we.whenTrue,he.whenTrue)&&Z(we.whenFalse,he.whenFalse):ur(we)?ur(he)&&we.operatorToken.kind===he.operatorToken.kind&&Z(we.left,he.left)&&Z(we.right,he.right):!1}function Q(we){const he=u.getTypeReferenceSerializationKind(we.typeName,b??C);switch(he){case 0:if(Qi(we,Te=>Te.parent&&iD(Te.parent)&&(Te.parent.trueType===Te||Te.parent.falseType===Te)))return r.createIdentifier("Object");const Ae=oe(we.typeName),ke=r.createTempVariable(a);return r.createConditionalExpression(r.createTypeCheck(r.createAssignment(ke,Ae),"function"),void 0,ke,void 0,r.createIdentifier("Object"));case 1:return pe(we.typeName);case 2:return r.createVoidZero();case 4:return Ie("BigInt",7);case 6:return r.createIdentifier("Boolean");case 3:return r.createIdentifier("Number");case 5:return r.createIdentifier("String");case 7:return r.createIdentifier("Array");case 8:return Ie("Symbol",2);case 10:return r.createIdentifier("Function");case 9:return r.createIdentifier("Promise");case 11:return r.createIdentifier("Object");default:return j.assertNever(he)}}function re(we,he){return r.createLogicalAnd(r.createStrictInequality(r.createTypeOfExpression(we),r.createStringLiteral("undefined")),he)}function oe(we){if(we.kind===80){const ke=pe(we);return re(ke,ke)}if(we.left.kind===80)return re(pe(we.left),pe(we));const he=oe(we.left),Ae=r.createTempVariable(a);return r.createLogicalAnd(r.createLogicalAnd(he.left,r.createStrictInequality(r.createAssignment(Ae,he.right),r.createVoidZero())),r.createPropertyAccessExpression(Ae,we.right))}function pe(we){switch(we.kind){case 80:const he=_c(Ht(l2.cloneNode(we),we),we.parent);return he.original=void 0,_c(he,Mo(C)),he;case 166:return de(we)}}function de(we){return r.createPropertyAccessExpression(pe(we.left),we.right)}function ue(we){return r.createConditionalExpression(r.createTypeCheck(r.createIdentifier(we),"function"),void 0,r.createIdentifier(we),void 0,r.createIdentifier("Object"))}function Ie(we,he){return p<he?ue(we):r.createIdentifier(we)}}function KNe(t){const{factory:r,getEmitHelperFactory:a,hoistVariableDeclaration:u}=t,h=t.getEmitResolver(),p=t.getCompilerOptions(),g=Ja(p),C=t.onSubstituteNode;t.onSubstituteNode=Me;let b;return q0(t,T);function T(dt){const zt=dn(dt,N,t);return Zb(zt,t.readEmitHelpers()),zt}function E(dt){return Fd(dt)?void 0:dt}function N(dt){if(!(dt.transformFlags&33554432))return dt;switch(dt.kind){case 170:return;case 263:return R(dt);case 231:return Q(dt);case 176:return re(dt);case 174:return pe(dt);case 178:return ue(dt);case 177:return de(dt);case 172:return Ie(dt);case 169:return we(dt);default:return dn(dt,N,t)}}function R(dt){if(!(dS(!0,dt)||N8(!0,dt)))return dn(dt,N,t);const zt=dS(!0,dt)?Z(dt,dt.name):X(dt,dt.name);return Sg(zt)}function F(dt){return!!(dt.transformFlags&536870912)}function H(dt){return Ft(dt,F)}function U(dt){for(const zt of dt.members){if(!uD(zt))continue;const Ei=CQ(zt,dt,!0);if(Ft(Ei==null?void 0:Ei.decorators,F)||Ft(Ei==null?void 0:Ei.parameters,H))return!0}return!1}function q(dt,zt){let Ei=[];return ke(Ei,dt,!1),ke(Ei,dt,!0),U(dt)&&(zt=Ht(r.createNodeArray([...zt,r.createClassStaticBlockDeclaration(r.createBlock(Ei,!0))]),zt),Ei=void 0),{decorationStatements:Ei,members:zt}}function X(dt,zt){const Ei=Dn(dt.modifiers,E,Fa),tn=Dn(dt.heritageClauses,N,Tp);let xn=Dn(dt.members,N,Od),Pn=[];({members:xn,decorationStatements:Pn}=q(dt,xn));const _i=r.updateClassDeclaration(dt,Ei,zt,void 0,tn,xn);return Sr([_i],Pn)}function Z(dt,zt){const Ei=Zr(dt,32),tn=Zr(dt,2048),xn=Dn(dt.modifiers,yi=>SH(yi)||Fd(yi)?void 0:yi,Ul),Pn=R1(dt),_i=Nt(dt),Fi=g<2?r.getInternalName(dt,!1,!0):r.getLocalName(dt,!1,!0),On=Dn(dt.heritageClauses,N,Tp);let pn=Dn(dt.members,N,Od),qr=[];({members:pn,decorationStatements:qr}=q(dt,pn));const Fs=g>=9&&!!_i&&Ft(pn,yi=>Lo(yi)&&Zr(yi,256)||gu(yi));Fs&&(pn=Ht(r.createNodeArray([r.createClassStaticBlockDeclaration(r.createBlock([r.createExpressionStatement(r.createAssignment(_i,r.createThis()))])),...pn]),pn));const ko=r.createClassExpression(xn,zt&&zl(zt)?void 0:zt,void 0,On,pn);Ir(ko,dt),Ht(ko,Pn);const ls=_i&&!Fs?r.createAssignment(_i,ko):ko,Qs=r.createVariableDeclaration(Fi,void 0,void 0,ls);Ir(Qs,dt);const Mn=r.createVariableDeclarationList([Qs],1),Zs=r.createVariableStatement(void 0,Mn);Ir(Zs,dt),Ht(Zs,Pn),Sd(Zs,dt);const at=[Zs];if(Sr(at,qr),Ne(at,dt),Ei)if(tn){const yi=r.createExportDefault(Fi);at.push(yi)}else{const yi=r.createExternalModuleExport(r.getDeclarationName(dt));at.push(yi)}return at}function Q(dt){return r.updateClassExpression(dt,Dn(dt.modifiers,E,Fa),dt.name,void 0,Dn(dt.heritageClauses,N,Tp),Dn(dt.members,N,Od))}function re(dt){return r.updateConstructorDeclaration(dt,Dn(dt.modifiers,E,Fa),Dn(dt.parameters,N,$s),bt(dt.body,N,Xo))}function oe(dt,zt){return dt!==zt&&(Sd(dt,zt),Ga(dt,R1(zt))),dt}function pe(dt){return oe(r.updateMethodDeclaration(dt,Dn(dt.modifiers,E,Fa),dt.asteriskToken,j.checkDefined(bt(dt.name,N,id)),void 0,void 0,Dn(dt.parameters,N,$s),void 0,bt(dt.body,N,Xo)),dt)}function de(dt){return oe(r.updateGetAccessorDeclaration(dt,Dn(dt.modifiers,E,Fa),j.checkDefined(bt(dt.name,N,id)),Dn(dt.parameters,N,$s),void 0,bt(dt.body,N,Xo)),dt)}function ue(dt){return oe(r.updateSetAccessorDeclaration(dt,Dn(dt.modifiers,E,Fa),j.checkDefined(bt(dt.name,N,id)),Dn(dt.parameters,N,$s),bt(dt.body,N,Xo)),dt)}function Ie(dt){if(!(dt.flags&33554432||Zr(dt,128)))return oe(r.updatePropertyDeclaration(dt,Dn(dt.modifiers,E,Fa),j.checkDefined(bt(dt.name,N,id)),void 0,void 0,bt(dt.initializer,N,jt)),dt)}function we(dt){const zt=r.updateParameterDeclaration(dt,pIe(r,dt.modifiers),dt.dotDotDotToken,j.checkDefined(bt(dt.name,N,dI)),void 0,void 0,bt(dt.initializer,N,jt));return zt!==dt&&(Sd(zt,dt),Ht(zt,R1(dt)),Ga(zt,R1(dt)),tr(zt.name,64)),zt}function he(dt){return _7(dt.expression,"___metadata")}function Ae(dt){if(!dt)return;const{false:zt,true:Ei}=ra(dt.decorators,he),tn=[];return Sr(tn,qt(zt,He)),Sr(tn,Rr(dt.parameters,Pe)),Sr(tn,qt(Ei,He)),tn}function ke(dt,zt,Ei){Sr(dt,qt(qe(zt,Ei),tn=>r.createExpressionStatement(tn)))}function Te(dt,zt,Ei){return uV(!0,dt,Ei)&&zt===pa(dt)}function De(dt,zt){return $t(dt.members,Ei=>Te(Ei,zt,dt))}function qe(dt,zt){const Ei=De(dt,zt);let tn;for(const xn of Ei)tn=fn(tn,se(dt,xn));return tn}function se(dt,zt){const Ei=CQ(zt,dt,!0),tn=Ae(Ei);if(!tn)return;const xn=et(dt,zt),Pn=We(zt,!Zr(zt,128)),_i=Lo(zt)&&!O1(zt)?r.createVoidZero():r.createNull(),Fi=a().createDecorateHelper(tn,xn,Pn,_i);return tr(Fi,3072),Ga(Fi,R1(zt)),Fi}function Ne(dt,zt){const Ei=Oe(zt);Ei&&dt.push(Ir(r.createExpressionStatement(Ei),zt))}function Oe(dt){const zt=jue(dt),Ei=Ae(zt);if(!Ei)return;const tn=b&&b[d_(dt)],xn=g<2?r.getInternalName(dt,!1,!0):r.getDeclarationName(dt,!1,!0),Pn=a().createDecorateHelper(Ei,xn),_i=r.createAssignment(xn,tn?r.createAssignment(tn,Pn):Pn);return tr(_i,3072),Ga(_i,R1(dt)),_i}function He(dt){return j.checkDefined(bt(dt.expression,N,jt))}function Pe(dt,zt){let Ei;if(dt){Ei=[];for(const tn of dt){const xn=a().createParamHelper(He(tn),zt);Ht(xn,tn.expression),tr(xn,3072),Ei.push(xn)}}return Ei}function We(dt,zt){const Ei=dt.name;return Vs(Ei)?r.createIdentifier(""):Ka(Ei)?zt&&!Uy(Ei.expression)?r.getGeneratedNameForNode(Ei):Ei.expression:ot(Ei)?r.createStringLiteral(Fr(Ei)):r.cloneNode(Ei)}function ze(){b||(t.enableSubstitution(80),b=[])}function Nt(dt){if(h.hasNodeCheckFlag(dt,262144)){ze();const zt=r.createUniqueName(dt.name&&!zl(dt.name)?Fr(dt.name):"default");return b[d_(dt)]=zt,u(zt),zt}}function $e(dt){return r.createPropertyAccessExpression(r.getDeclarationName(dt),"prototype")}function et(dt,zt){return pa(zt)?r.getDeclarationName(dt):$e(dt)}function Me(dt,zt){return zt=C(dt,zt),dt===1?ut(zt):zt}function ut(dt){switch(dt.kind){case 80:return wt(dt)}return dt}function wt(dt){return Et(dt)??dt}function Et(dt){if(b&&h.hasNodeCheckFlag(dt,536870912)){const zt=h.getReferencedValueDeclaration(dt);if(zt){const Ei=b[zt.id];if(Ei){const tn=r.cloneNode(Ei);return Ga(tn,dt),Sd(tn,dt),tn}}}}}function XNe(t){const{factory:r,getEmitHelperFactory:a,startLexicalEnvironment:u,endLexicalEnvironment:h,hoistVariableDeclaration:p}=t,g=Ja(t.getCompilerOptions());let C,b,T,E,N,R;return q0(t,F);function F(le){C=void 0,R=!1;const Ue=dn(le,ue,t);return Zb(Ue,t.readEmitHelpers()),R&&(AP(Ue,32),R=!1),Ue}function H(){switch(b=void 0,T=void 0,E=void 0,C==null?void 0:C.kind){case"class":b=C.classInfo;break;case"class-element":b=C.next.classInfo,T=C.classThis,E=C.classSuper;break;case"name":const le=C.next.next.next;(le==null?void 0:le.kind)==="class-element"&&(b=le.next.classInfo,T=le.classThis,E=le.classSuper);break}}function U(le){C={kind:"class",next:C,classInfo:le,savedPendingExpressions:N},N=void 0,H()}function q(){j.assert((C==null?void 0:C.kind)==="class","Incorrect value for top.kind.",()=>`Expected top.kind to be 'class' but got '${C==null?void 0:C.kind}' instead.`),N=C.savedPendingExpressions,C=C.next,H()}function X(le){var Ue,be;j.assert((C==null?void 0:C.kind)==="class","Incorrect value for top.kind.",()=>`Expected top.kind to be 'class' but got '${C==null?void 0:C.kind}' instead.`),C={kind:"class-element",next:C},(gu(le)||Lo(le)&&bd(le))&&(C.classThis=(Ue=C.next.classInfo)==null?void 0:Ue.classThis,C.classSuper=(be=C.next.classInfo)==null?void 0:be.classSuper),H()}function Z(){var le;j.assert((C==null?void 0:C.kind)==="class-element","Incorrect value for top.kind.",()=>`Expected top.kind to be 'class-element' but got '${C==null?void 0:C.kind}' instead.`),j.assert(((le=C.next)==null?void 0:le.kind)==="class","Incorrect value for top.next.kind.",()=>{var Ue;return`Expected top.next.kind to be 'class' but got '${(Ue=C.next)==null?void 0:Ue.kind}' instead.`}),C=C.next,H()}function Q(){j.assert((C==null?void 0:C.kind)==="class-element","Incorrect value for top.kind.",()=>`Expected top.kind to be 'class-element' but got '${C==null?void 0:C.kind}' instead.`),C={kind:"name",next:C},H()}function re(){j.assert((C==null?void 0:C.kind)==="name","Incorrect value for top.kind.",()=>`Expected top.kind to be 'name' but got '${C==null?void 0:C.kind}' instead.`),C=C.next,H()}function oe(){(C==null?void 0:C.kind)==="other"?(j.assert(!N),C.depth++):(C={kind:"other",next:C,depth:0,savedPendingExpressions:N},N=void 0,H())}function pe(){j.assert((C==null?void 0:C.kind)==="other","Incorrect value for top.kind.",()=>`Expected top.kind to be 'other' but got '${C==null?void 0:C.kind}' instead.`),C.depth>0?(j.assert(!N),C.depth--):(N=C.savedPendingExpressions,C=C.next,H())}function de(le){return!!(le.transformFlags&33554432)||!!T&&!!(le.transformFlags&16384)||!!T&&!!E&&!!(le.transformFlags&134217728)}function ue(le){if(!de(le))return le;switch(le.kind){case 170:return j.fail("Use `modifierVisitor` instead.");case 263:return Oe(le);case 231:return He(le);case 176:case 172:case 175:return j.fail("Not supported outside of a class. Use 'classElementVisitor' instead.");case 169:return Pn(le);case 226:return qr(le,!1);case 303:return Zs(le);case 260:return at(le);case 208:return yi(le);case 277:return St(le);case 110:return dt(le);case 248:return On(le);case 244:return pn(le);case 355:return ko(le,!1);case 217:return ri(le,!1);case 354:return xe(le);case 213:return zt(le);case 215:return Ei(le);case 224:case 225:return Fs(le,!1);case 211:return tn(le);case 212:return xn(le);case 167:return Mn(le);case 174:case 178:case 177:case 218:case 262:{oe();const Ue=dn(le,Ie,t);return pe(),Ue}default:return dn(le,Ie,t)}}function Ie(le){switch(le.kind){case 170:return;default:return ue(le)}}function we(le){switch(le.kind){case 170:return;default:return le}}function he(le){switch(le.kind){case 176:return ze(le);case 174:return et(le);case 177:return Me(le);case 178:return ut(le);case 172:return Et(le);case 175:return wt(le);default:return ue(le)}}function Ae(le){switch(le.kind){case 224:case 225:return Fs(le,!0);case 226:return qr(le,!0);case 355:return ko(le,!0);case 217:return ri(le,!0);default:return ue(le)}}function ke(le){let Ue=le.name&&ot(le.name)&&!zl(le.name)?Fr(le.name):le.name&&Vs(le.name)&&!zl(le.name)?Fr(le.name).slice(1):le.name&&Ha(le.name)&&J_(le.name.text,99)?le.name.text:ss(le)?"class":"member";return oS(le)&&(Ue=`get_${Ue}`),D1(le)&&(Ue=`set_${Ue}`),le.name&&Vs(le.name)&&(Ue=`private_${Ue}`),pa(le)&&(Ue=`static_${Ue}`),"_"+Ue}function Te(le,Ue){return r.createUniqueName(`${ke(le)}_${Ue}`,24)}function De(le,Ue){return r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration(le,void 0,void 0,Ue)],1))}function qe(le){const Ue=r.createUniqueName("_metadata",48);let be,Qt,lt=!1,st=!1,hi=!1,vn,ln,Un;if(K6(!1,le)){const Pt=Ft(le.members,Bt=>(Wh(Bt)||I_(Bt))&&bd(Bt));vn=r.createUniqueName("_classThis",Pt?24:48)}for(const Pt of le.members){if(iP(Pt)&&uV(!1,Pt,le))if(bd(Pt)){if(!Qt){Qt=r.createUniqueName("_staticExtraInitializers",48);const Bt=a().createRunInitializersHelper(vn??r.createThis(),Qt);Ga(Bt,le.name??Kb(le)),ln??(ln=[]),ln.push(Bt)}}else{if(!be){be=r.createUniqueName("_instanceExtraInitializers",48);const Bt=a().createRunInitializersHelper(r.createThis(),be);Ga(Bt,le.name??Kb(le)),Un??(Un=[]),Un.push(Bt)}be??(be=r.createUniqueName("_instanceExtraInitializers",48))}if(gu(Pt)?sA(Pt)||(lt=!0):Lo(Pt)&&(bd(Pt)?lt||(lt=!!Pt.initializer||lm(Pt)):st||(st=!Tae(Pt))),(Wh(Pt)||I_(Pt))&&bd(Pt)&&(hi=!0),Qt&&be&&lt&&st&&hi)break}return{class:le,classThis:vn,metadataReference:Ue,instanceMethodExtraInitializersName:be,staticMethodExtraInitializersName:Qt,hasStaticInitializers:lt,hasNonAmbientInstanceFields:st,hasStaticPrivateClassElements:hi,pendingStaticInitializers:ln,pendingInstanceInitializers:Un}}function se(le){u(),!que(le)&&dS(!1,le)&&(le=xQ(t,le,r.createStringLiteral("")));const Ue=r.getLocalName(le,!1,!1,!0),be=qe(le),Qt=[];let lt,st,hi,vn,ln=!1;const Un=gt(jue(le));Un&&(be.classDecoratorsName=r.createUniqueName("_classDecorators",48),be.classDescriptorName=r.createUniqueName("_classDescriptor",48),be.classExtraInitializersName=r.createUniqueName("_classExtraInitializers",48),j.assertIsDefined(be.classThis),Qt.push(De(be.classDecoratorsName,r.createArrayLiteralExpression(Un)),De(be.classDescriptorName),De(be.classExtraInitializersName,r.createArrayLiteralExpression()),De(be.classThis)),be.hasStaticPrivateClassElements&&(ln=!0,R=!0));const Pt=IV(le.heritageClauses,96),Bt=Pt&&Ra(Pt.types),fi=Bt&&bt(Bt.expression,ue,jt);if(fi){be.classSuper=r.createUniqueName("_classSuper",48);const zi=Vu(fi),cn=fd(zi)&&!zi.name||ml(zi)&&!zi.name||xl(zi)?r.createComma(r.createNumericLiteral(0),fi):fi;Qt.push(De(be.classSuper,cn));const vi=r.updateExpressionWithTypeArguments(Bt,be.classSuper,void 0),qo=r.updateHeritageClause(Pt,[vi]);vn=r.createNodeArray([qo])}const wi=be.classThis??r.createThis();U(be),lt=fn(lt,te(be.metadataReference,be.classSuper));let Ri=le.members;if(Ri=Dn(Ri,zi=>iu(zi)?zi:he(zi),Od),Ri=Dn(Ri,zi=>iu(zi)?he(zi):zi,Od),N){let zi;for(let cn of N){cn=bt(cn,function qo(Wo){if(!(Wo.transformFlags&16384))return Wo;switch(Wo.kind){case 110:return zi||(zi=r.createUniqueName("_outerThis",16),Qt.unshift(De(zi,r.createThis()))),zi;default:return dn(Wo,qo,t)}},jt);const vi=r.createExpressionStatement(cn);lt=fn(lt,vi)}N=void 0}if(q(),Ft(be.pendingInstanceInitializers)&&!Vv(le)){const zi=Pe(le,be);if(zi){const cn=L1(le),vi=!!(cn&&Vu(cn.expression).kind!==106),qo=[];if(vi){const $o=r.createSpreadElement(r.createIdentifier("arguments")),Lc=r.createCallExpression(r.createSuper(),void 0,[$o]);qo.push(r.createExpressionStatement(Lc))}Sr(qo,zi);const Wo=r.createBlock(qo,!0);hi=r.createConstructorDeclaration(void 0,[],Wo)}}if(be.staticMethodExtraInitializersName&&Qt.push(De(be.staticMethodExtraInitializersName,r.createArrayLiteralExpression())),be.instanceMethodExtraInitializersName&&Qt.push(De(be.instanceMethodExtraInitializersName,r.createArrayLiteralExpression())),be.memberInfos&&cf(be.memberInfos,(zi,cn)=>{pa(cn)&&(Qt.push(De(zi.memberDecoratorsName)),zi.memberInitializersName&&Qt.push(De(zi.memberInitializersName,r.createArrayLiteralExpression())),zi.memberExtraInitializersName&&Qt.push(De(zi.memberExtraInitializersName,r.createArrayLiteralExpression())),zi.memberDescriptorName&&Qt.push(De(zi.memberDescriptorName)))}),be.memberInfos&&cf(be.memberInfos,(zi,cn)=>{pa(cn)||(Qt.push(De(zi.memberDecoratorsName)),zi.memberInitializersName&&Qt.push(De(zi.memberInitializersName,r.createArrayLiteralExpression())),zi.memberExtraInitializersName&&Qt.push(De(zi.memberExtraInitializersName,r.createArrayLiteralExpression())),zi.memberDescriptorName&&Qt.push(De(zi.memberDescriptorName)))}),lt=Sr(lt,be.staticNonFieldDecorationStatements),lt=Sr(lt,be.nonStaticNonFieldDecorationStatements),lt=Sr(lt,be.staticFieldDecorationStatements),lt=Sr(lt,be.nonStaticFieldDecorationStatements),be.classDescriptorName&&be.classDecoratorsName&&be.classExtraInitializersName&&be.classThis){lt??(lt=[]);const zi=r.createPropertyAssignment("value",wi),cn=r.createObjectLiteralExpression([zi]),vi=r.createAssignment(be.classDescriptorName,cn),qo=r.createPropertyAccessExpression(wi,"name"),Wo=a().createESDecorateHelper(r.createNull(),vi,be.classDecoratorsName,{kind:"class",name:qo,metadata:be.metadataReference},r.createNull(),be.classExtraInitializersName),$o=r.createExpressionStatement(Wo);Ga($o,Kb(le)),lt.push($o);const Lc=r.createPropertyAccessExpression(be.classDescriptorName,"value"),vu=r.createAssignment(be.classThis,Lc),Gu=r.createAssignment(Ue,vu);lt.push(r.createExpressionStatement(Gu))}if(lt.push(tt(wi,be.metadataReference)),Ft(be.pendingStaticInitializers)){for(const zi of be.pendingStaticInitializers){const cn=r.createExpressionStatement(zi);Ga(cn,yS(zi)),st=fn(st,cn)}be.pendingStaticInitializers=void 0}if(be.classExtraInitializersName){const zi=a().createRunInitializersHelper(wi,be.classExtraInitializersName),cn=r.createExpressionStatement(zi);Ga(cn,le.name??Kb(le)),st=fn(st,cn)}lt&&st&&!be.hasStaticInitializers&&(Sr(lt,st),st=void 0);const Ai=lt&&r.createClassStaticBlockDeclaration(r.createBlock(lt,!0));Ai&&ln&&aH(Ai,32);const Xn=st&&r.createClassStaticBlockDeclaration(r.createBlock(st,!0));if(Ai||hi||Xn){const zi=[],cn=Ri.findIndex(sA);Ai?(Sr(zi,Ri,0,cn+1),zi.push(Ai),Sr(zi,Ri,cn+1)):Sr(zi,Ri),hi&&zi.push(hi),Xn&&zi.push(Xn),Ri=Ht(r.createNodeArray(zi),Ri)}const Di=h();let on;if(Un){on=r.createClassExpression(void 0,void 0,void 0,vn,Ri),be.classThis&&(on=jNe(r,on,be.classThis));const zi=r.createVariableDeclaration(Ue,void 0,void 0,on),cn=r.createVariableDeclarationList([zi]),vi=be.classThis?r.createAssignment(Ue,be.classThis):Ue;Qt.push(r.createVariableStatement(void 0,cn),r.createReturnStatement(vi))}else on=r.createClassExpression(void 0,le.name,void 0,vn,Ri),Qt.push(r.createReturnStatement(on));if(ln){AP(on,32);for(const zi of on.members)(Wh(zi)||I_(zi))&&bd(zi)&&AP(zi,32)}return Ir(on,le),r.createImmediatelyInvokedArrowFunction(r.mergeLexicalEnvironment(Qt,Di))}function Ne(le){return dS(!1,le)||N8(!1,le)}function Oe(le){if(Ne(le)){const Ue=[],be=Ql(le,ss)??le,Qt=be.name?r.createStringLiteralFromNode(be.name):r.createStringLiteral("default"),lt=Zr(le,32),st=Zr(le,2048);if(le.name||(le=xQ(t,le,Qt)),lt&&st){const hi=se(le);if(le.name){const vn=r.createVariableDeclaration(r.getLocalName(le),void 0,void 0,hi);Ir(vn,le);const ln=r.createVariableDeclarationList([vn],1),Un=r.createVariableStatement(void 0,ln);Ue.push(Un);const Pt=r.createExportDefault(r.getDeclarationName(le));Ir(Pt,le),Sd(Pt,B1(le)),Ga(Pt,Kb(le)),Ue.push(Pt)}else{const vn=r.createExportDefault(hi);Ir(vn,le),Sd(vn,B1(le)),Ga(vn,Kb(le)),Ue.push(vn)}}else{j.assertIsDefined(le.name,"A class declaration that is not a default export must have a name.");const hi=se(le),vn=lt?wi=>BP(wi)?void 0:we(wi):we,ln=Dn(le.modifiers,vn,Fa),Un=r.getLocalName(le,!1,!0),Pt=r.createVariableDeclaration(Un,void 0,void 0,hi);Ir(Pt,le);const Bt=r.createVariableDeclarationList([Pt],1),fi=r.createVariableStatement(ln,Bt);if(Ir(fi,le),Sd(fi,B1(le)),Ue.push(fi),lt){const wi=r.createExternalModuleExport(Un);Ir(wi,le),Ue.push(wi)}}return Sg(Ue)}else{const Ue=Dn(le.modifiers,we,Fa),be=Dn(le.heritageClauses,ue,Tp);U(void 0);const Qt=Dn(le.members,he,Od);return q(),r.updateClassDeclaration(le,Ue,le.name,void 0,be,Qt)}}function He(le){if(Ne(le)){const Ue=se(le);return Ir(Ue,le),Ue}else{const Ue=Dn(le.modifiers,we,Fa),be=Dn(le.heritageClauses,ue,Tp);U(void 0);const Qt=Dn(le.members,he,Od);return q(),r.updateClassExpression(le,Ue,le.name,void 0,be,Qt)}}function Pe(le,Ue){if(Ft(Ue.pendingInstanceInitializers)){const be=[];return be.push(r.createExpressionStatement(r.inlineExpressions(Ue.pendingInstanceInitializers))),Ue.pendingInstanceInitializers=void 0,be}}function We(le,Ue,be,Qt,lt,st){const hi=Qt[lt],vn=Ue[hi];if(Sr(le,Dn(Ue,ue,Ps,be,hi-be)),NI(vn)){const ln=[];We(ln,vn.tryBlock.statements,0,Qt,lt+1,st);const Un=r.createNodeArray(ln);Ht(Un,vn.tryBlock.statements),le.push(r.updateTryStatement(vn,r.updateBlock(vn.tryBlock,ln),bt(vn.catchClause,ue,lD),bt(vn.finallyBlock,ue,Xo)))}else Sr(le,Dn(Ue,ue,Ps,hi,1)),Sr(le,st);Sr(le,Dn(Ue,ue,Ps,hi+1))}function ze(le){X(le);const Ue=Dn(le.modifiers,we,Fa),be=Dn(le.parameters,ue,$s);let Qt;if(le.body&&b){const lt=Pe(b.class,b);if(lt){const st=[],hi=r.copyPrologue(le.body.statements,st,!1,ue),vn=vQ(le.body.statements,hi);vn.length>0?We(st,le.body.statements,hi,vn,0,lt):(Sr(st,lt),Sr(st,Dn(le.body.statements,ue,Ps))),Qt=r.createBlock(st,!0),Ir(Qt,le.body),Ht(Qt,le.body)}}return Qt??(Qt=bt(le.body,ue,Xo)),Z(),r.updateConstructorDeclaration(le,Ue,be,Qt)}function Nt(le,Ue){return le!==Ue&&(Sd(le,Ue),Ga(le,Kb(Ue))),le}function $e(le,Ue,be){let Qt,lt,st,hi,vn,ln;if(!Ue){const Bt=Dn(le.modifiers,we,Fa);return Q(),lt=Qs(le.name),re(),{modifiers:Bt,referencedName:Qt,name:lt,initializersName:st,descriptorName:ln,thisArg:vn}}const Un=gt(CQ(le,Ue.class,!1)),Pt=Dn(le.modifiers,we,Fa);if(Un){const Bt=Te(le,"decorators"),fi=r.createArrayLiteralExpression(Un),wi=r.createAssignment(Bt,fi),Ri={memberDecoratorsName:Bt};Ue.memberInfos??(Ue.memberInfos=new Map),Ue.memberInfos.set(le,Ri),N??(N=[]),N.push(wi);const Ai=iP(le)||I_(le)?pa(le)?Ue.staticNonFieldDecorationStatements??(Ue.staticNonFieldDecorationStatements=[]):Ue.nonStaticNonFieldDecorationStatements??(Ue.nonStaticNonFieldDecorationStatements=[]):Lo(le)&&!I_(le)?pa(le)?Ue.staticFieldDecorationStatements??(Ue.staticFieldDecorationStatements=[]):Ue.nonStaticFieldDecorationStatements??(Ue.nonStaticFieldDecorationStatements=[]):j.fail(),Xn=um(le)?"getter":kp(le)?"setter":Nu(le)?"method":I_(le)?"accessor":Lo(le)?"field":j.fail();let Di;if(ot(le.name)||Vs(le.name))Di={computed:!1,name:le.name};else if(P1(le.name))Di={computed:!0,name:r.createStringLiteralFromNode(le.name)};else{const zi=le.name.expression;P1(zi)&&!ot(zi)?Di={computed:!0,name:r.createStringLiteralFromNode(zi)}:(Q(),{referencedName:Qt,name:lt}=ls(le.name),Di={computed:!0,name:Qt},re())}const on={kind:Xn,name:Di,static:pa(le),private:Vs(le.name),access:{get:Lo(le)||um(le)||Nu(le),set:Lo(le)||kp(le)},metadata:Ue.metadataReference};if(iP(le)){const zi=pa(le)?Ue.staticMethodExtraInitializersName:Ue.instanceMethodExtraInitializersName;j.assertIsDefined(zi);let cn;Wh(le)&&be&&(cn=be(le,Dn(Pt,Wo=>Jr(Wo,m7),Fa)),Ri.memberDescriptorName=ln=Te(le,"descriptor"),cn=r.createAssignment(ln,cn));const vi=a().createESDecorateHelper(r.createThis(),cn??r.createNull(),Bt,on,r.createNull(),zi),qo=r.createExpressionStatement(vi);Ga(qo,Kb(le)),Ai.push(qo)}else if(Lo(le)){st=Ri.memberInitializersName??(Ri.memberInitializersName=Te(le,"initializers")),hi=Ri.memberExtraInitializersName??(Ri.memberExtraInitializersName=Te(le,"extraInitializers")),pa(le)&&(vn=Ue.classThis);let zi;Wh(le)&&O1(le)&&be&&(zi=be(le,void 0),Ri.memberDescriptorName=ln=Te(le,"descriptor"),zi=r.createAssignment(ln,zi));const cn=a().createESDecorateHelper(I_(le)?r.createThis():r.createNull(),zi??r.createNull(),Bt,on,st,hi),vi=r.createExpressionStatement(cn);Ga(vi,Kb(le)),Ai.push(vi)}}return lt===void 0&&(Q(),lt=Qs(le.name),re()),!Ft(Pt)&&(Nu(le)||Lo(le))&&tr(lt,1024),{modifiers:Pt,referencedName:Qt,name:lt,initializersName:st,extraInitializersName:hi,descriptorName:ln,thisArg:vn}}function et(le){X(le);const{modifiers:Ue,name:be,descriptorName:Qt}=$e(le,b,Rt);if(Qt)return Z(),Nt(Ni(Ue,be,Qt),le);{const lt=Dn(le.parameters,ue,$s),st=bt(le.body,ue,Xo);return Z(),Nt(r.updateMethodDeclaration(le,Ue,le.asteriskToken,be,void 0,void 0,lt,void 0,st),le)}}function Me(le){X(le);const{modifiers:Ue,name:be,descriptorName:Qt}=$e(le,b,Ct);if(Qt)return Z(),Nt(ji(Ue,be,Qt),le);{const lt=Dn(le.parameters,ue,$s),st=bt(le.body,ue,Xo);return Z(),Nt(r.updateGetAccessorDeclaration(le,Ue,be,lt,void 0,st),le)}}function ut(le){X(le);const{modifiers:Ue,name:be,descriptorName:Qt}=$e(le,b,ii);if(Qt)return Z(),Nt(gr(Ue,be,Qt),le);{const lt=Dn(le.parameters,ue,$s),st=bt(le.body,ue,Xo);return Z(),Nt(r.updateSetAccessorDeclaration(le,Ue,be,lt,st),le)}}function wt(le){X(le);let Ue;if(sA(le))Ue=dn(le,ue,t);else if($7(le)){const be=T;T=void 0,Ue=dn(le,ue,t),T=be}else if(le=dn(le,ue,t),Ue=le,b&&(b.hasStaticInitializers=!0,Ft(b.pendingStaticInitializers))){const be=[];for(const st of b.pendingStaticInitializers){const hi=r.createExpressionStatement(st);Ga(hi,yS(st)),be.push(hi)}const Qt=r.createBlock(be,!0);Ue=[r.createClassStaticBlockDeclaration(Qt),Ue],b.pendingStaticInitializers=void 0}return Z(),Ue}function Et(le){Sp(le,_i)&&(le=Dp(t,le,Fi(le.initializer))),X(le),j.assert(!Tae(le),"Not yet implemented.");const{modifiers:Ue,name:be,initializersName:Qt,extraInitializersName:lt,descriptorName:st,thisArg:hi}=$e(le,b,O1(le)?vt:void 0);u();let vn=bt(le.initializer,ue,jt);Qt&&(vn=a().createRunInitializersHelper(hi??r.createThis(),Qt,vn??r.createVoidZero())),pa(le)&&b&&vn&&(b.hasStaticInitializers=!0);const ln=h();if(Ft(ln)&&(vn=r.createImmediatelyInvokedArrowFunction([...ln,r.createReturnStatement(vn)])),b&&(pa(le)?(vn=Ze(b,!0,vn),lt&&(b.pendingStaticInitializers??(b.pendingStaticInitializers=[]),b.pendingStaticInitializers.push(a().createRunInitializersHelper(b.classThis??r.createThis(),lt)))):(vn=Ze(b,!1,vn),lt&&(b.pendingInstanceInitializers??(b.pendingInstanceInitializers=[]),b.pendingInstanceInitializers.push(a().createRunInitializersHelper(r.createThis(),lt))))),Z(),O1(le)&&st){const Un=B1(le),Pt=yS(le),Bt=le.name;let fi=Bt,wi=Bt;if(Ka(Bt)&&!Uy(Bt.expression)){const on=WX(Bt);if(on)fi=r.updateComputedPropertyName(Bt,bt(Bt.expression,ue,jt)),wi=r.updateComputedPropertyName(Bt,on.left);else{const zi=r.createTempVariable(p);Ga(zi,Bt.expression);const cn=bt(Bt.expression,ue,jt),vi=r.createAssignment(zi,cn);Ga(vi,Bt.expression),fi=r.updateComputedPropertyName(Bt,vi),wi=r.updateComputedPropertyName(Bt,zi)}}const Ri=Dn(Ue,on=>on.kind!==129?on:void 0,Fa),Ai=Vle(r,le,Ri,vn);Ir(Ai,le),tr(Ai,3072),Ga(Ai,Pt),Ga(Ai.name,le.name);const Xn=ji(Ri,fi,st);Ir(Xn,le),Sd(Xn,Un),Ga(Xn,Pt);const Di=gr(Ri,wi,st);return Ir(Di,le),tr(Di,3072),Ga(Di,Pt),[Ai,Xn,Di]}return Nt(r.updatePropertyDeclaration(le,Ue,be,void 0,void 0,vn),le)}function dt(le){return T??le}function zt(le){if(G_(le.expression)&&T){const Ue=bt(le.expression,ue,jt),be=Dn(le.arguments,ue,jt),Qt=r.createFunctionCallCall(Ue,T,be);return Ir(Qt,le),Ht(Qt,le),Qt}return dn(le,ue,t)}function Ei(le){if(G_(le.tag)&&T){const Ue=bt(le.tag,ue,jt),be=r.createFunctionBindCall(Ue,T,[]);Ir(be,le),Ht(be,le);const Qt=bt(le.template,ue,nP);return r.updateTaggedTemplateExpression(le,be,void 0,Qt)}return dn(le,ue,t)}function tn(le){if(G_(le)&&ot(le.name)&&T&&E){const Ue=r.createStringLiteralFromNode(le.name),be=r.createReflectGetCall(E,Ue,T);return Ir(be,le.expression),Ht(be,le.expression),be}return dn(le,ue,t)}function xn(le){if(G_(le)&&T&&E){const Ue=bt(le.argumentExpression,ue,jt),be=r.createReflectGetCall(E,Ue,T);return Ir(be,le.expression),Ht(be,le.expression),be}return dn(le,ue,t)}function Pn(le){Sp(le,_i)&&(le=Dp(t,le,Fi(le.initializer)));const Ue=r.updateParameterDeclaration(le,void 0,le.dotDotDotToken,bt(le.name,ue,dI),void 0,void 0,bt(le.initializer,ue,jt));return Ue!==le&&(Sd(Ue,le),Ht(Ue,R1(le)),Ga(Ue,R1(le)),tr(Ue.name,64)),Ue}function _i(le){return fd(le)&&!le.name&&Ne(le)}function Fi(le){const Ue=Vu(le);return fd(Ue)&&!Ue.name&&!dS(!1,Ue)}function On(le){return r.updateForStatement(le,bt(le.initializer,Ae,Hm),bt(le.condition,ue,jt),bt(le.incrementor,Ae,jt),u_(le.statement,ue,t))}function pn(le){return dn(le,Ae,t)}function qr(le,Ue){if(pS(le)){const be=ac(le.left),Qt=bt(le.right,ue,jt);return r.updateBinaryExpression(le,be,le.operatorToken,Qt)}if(lf(le)){if(Sp(le,_i))return le=Dp(t,le,Fi(le.right)),dn(le,ue,t);if(G_(le.left)&&T&&E){let be=wl(le.left)?bt(le.left.argumentExpression,ue,jt):ot(le.left.name)?r.createStringLiteralFromNode(le.left.name):void 0;if(be){let Qt=bt(le.right,ue,jt);if(z7(le.operatorToken.kind)){let st=be;Uy(be)||(st=r.createTempVariable(p),be=r.createAssignment(st,be));const hi=r.createReflectGetCall(E,st,T);Ir(hi,le.left),Ht(hi,le.left),Qt=r.createBinaryExpression(hi,U7(le.operatorToken.kind),Qt),Ht(Qt,le)}const lt=Ue?void 0:r.createTempVariable(p);return lt&&(Qt=r.createAssignment(lt,Qt),Ht(lt,le)),Qt=r.createReflectSetCall(E,be,Qt,T),Ir(Qt,le),Ht(Qt,le),lt&&(Qt=r.createComma(Qt,lt),Ht(Qt,le)),Qt}}}if(le.operatorToken.kind===28){const be=bt(le.left,Ae,jt),Qt=bt(le.right,Ue?Ae:ue,jt);return r.updateBinaryExpression(le,be,le.operatorToken,Qt)}return dn(le,ue,t)}function Fs(le,Ue){if(le.operator===46||le.operator===47){const be=Dc(le.operand);if(G_(be)&&T&&E){let Qt=wl(be)?bt(be.argumentExpression,ue,jt):ot(be.name)?r.createStringLiteralFromNode(be.name):void 0;if(Qt){let lt=Qt;Uy(Qt)||(lt=r.createTempVariable(p),Qt=r.createAssignment(lt,Qt));let st=r.createReflectGetCall(E,lt,T);Ir(st,le),Ht(st,le);const hi=Ue?void 0:r.createTempVariable(p);return st=PX(r,le,st,p,hi),st=r.createReflectSetCall(E,Qt,st,T),Ir(st,le),Ht(st,le),hi&&(st=r.createComma(st,hi),Ht(st,le)),st}}}return dn(le,ue,t)}function ko(le,Ue){const be=Ue?mQ(le.elements,Ae):mQ(le.elements,ue,Ae);return r.updateCommaListExpression(le,be)}function ls(le){if(P1(le)||Vs(le)){const st=r.createStringLiteralFromNode(le),hi=bt(le,ue,id);return{referencedName:st,name:hi}}if(P1(le.expression)&&!ot(le.expression)){const st=r.createStringLiteralFromNode(le.expression),hi=bt(le,ue,id);return{referencedName:st,name:hi}}const Ue=r.getGeneratedNameForNode(le);p(Ue);const be=a().createPropKeyHelper(bt(le.expression,ue,jt)),Qt=r.createAssignment(Ue,be),lt=r.updateComputedPropertyName(le,Se(Qt));return{referencedName:Ue,name:lt}}function Qs(le){return Ka(le)?Mn(le):bt(le,ue,id)}function Mn(le){let Ue=bt(le.expression,ue,jt);return Uy(Ue)||(Ue=Se(Ue)),r.updateComputedPropertyName(le,Ue)}function Zs(le){return Sp(le,_i)&&(le=Dp(t,le,Fi(le.initializer))),dn(le,ue,t)}function at(le){return Sp(le,_i)&&(le=Dp(t,le,Fi(le.initializer))),dn(le,ue,t)}function yi(le){return Sp(le,_i)&&(le=Dp(t,le,Fi(le.initializer))),dn(le,ue,t)}function Sn(le){if(Aa(le)||jf(le))return ac(le);if(G_(le)&&T&&E){const Ue=wl(le)?bt(le.argumentExpression,ue,jt):ot(le.name)?r.createStringLiteralFromNode(le.name):void 0;if(Ue){const be=r.createTempVariable(void 0),Qt=r.createAssignmentTargetWrapper(be,r.createReflectSetCall(E,Ue,be,T));return Ir(Qt,le),Ht(Qt,le),Qt}}return dn(le,ue,t)}function dr(le){if(lf(le,!0)){Sp(le,_i)&&(le=Dp(t,le,Fi(le.right)));const Ue=Sn(le.left),be=bt(le.right,ue,jt);return r.updateBinaryExpression(le,Ue,le.operatorToken,be)}else return Sn(le)}function us(le){if(N_(le.expression)){const Ue=Sn(le.expression);return r.updateSpreadElement(le,Ue)}return dn(le,ue,t)}function Xr(le){return j.assertNode(le,jW),Km(le)?us(le):Bd(le)?dn(le,ue,t):dr(le)}function Gs(le){const Ue=bt(le.name,ue,id);if(lf(le.initializer,!0)){const be=dr(le.initializer);return r.updatePropertyAssignment(le,Ue,be)}if(N_(le.initializer)){const be=Sn(le.initializer);return r.updatePropertyAssignment(le,Ue,be)}return dn(le,ue,t)}function ma(le){return Sp(le,_i)&&(le=Dp(t,le,Fi(le.objectAssignmentInitializer))),dn(le,ue,t)}function ka(le){if(N_(le.expression)){const Ue=Sn(le.expression);return r.updateSpreadAssignment(le,Ue)}return dn(le,ue,t)}function Ji(le){return j.assertNode(le,HW),Kv(le)?ka(le):lh(le)?ma(le):_d(le)?Gs(le):dn(le,ue,t)}function ac(le){if(jf(le)){const Ue=Dn(le.elements,Xr,jt);return r.updateArrayLiteralExpression(le,Ue)}else{const Ue=Dn(le.properties,Ji,Ub);return r.updateObjectLiteralExpression(le,Ue)}}function St(le){return Sp(le,_i)&&(le=Dp(t,le,Fi(le.expression))),dn(le,ue,t)}function ri(le,Ue){const be=Ue?Ae:ue,Qt=bt(le.expression,be,jt);return r.updateParenthesizedExpression(le,Qt)}function xe(le,Ue){const be=ue,Qt=bt(le.expression,be,jt);return r.updatePartiallyEmittedExpression(le,Qt)}function pt(le,Ue){return Ft(le)&&(Ue?c_(Ue)?(le.push(Ue.expression),Ue=r.updateParenthesizedExpression(Ue,r.inlineExpressions(le))):(le.push(Ue),Ue=r.inlineExpressions(le)):Ue=r.inlineExpressions(le)),Ue}function Se(le){const Ue=pt(N,le);return j.assertIsDefined(Ue),Ue!==le&&(N=void 0),Ue}function Ze(le,Ue,be){const Qt=pt(Ue?le.pendingStaticInitializers:le.pendingInstanceInitializers,be);return Qt!==be&&(Ue?le.pendingStaticInitializers=void 0:le.pendingInstanceInitializers=void 0),Qt}function gt(le){if(!le)return;const Ue=[];return Sr(Ue,qt(le.decorators,Dt)),Ue}function Dt(le){const Ue=bt(le.expression,ue,jt);tr(Ue,3072);const be=Vu(Ue);if(Sl(be)){const{target:Qt,thisArg:lt}=r.createCallBinding(Ue,p,g,!0);return r.restoreOuterExpressions(Ue,r.createFunctionBindCall(Qt,lt,[]))}return Ue}function Je(le,Ue,be,Qt,lt,st,hi){const vn=r.createFunctionExpression(be,Qt,void 0,void 0,st,void 0,hi??r.createBlock([]));Ir(vn,le),Ga(vn,Kb(le)),tr(vn,3072);const ln=lt==="get"||lt==="set"?lt:void 0,Un=r.createStringLiteralFromNode(Ue,void 0),Pt=a().createSetFunctionNameHelper(vn,Un,ln),Bt=r.createPropertyAssignment(r.createIdentifier(lt),Pt);return Ir(Bt,le),Ga(Bt,Kb(le)),tr(Bt,3072),Bt}function Rt(le,Ue){return r.createObjectLiteralExpression([Je(le,le.name,Ue,le.asteriskToken,"value",Dn(le.parameters,ue,$s),bt(le.body,ue,Xo))])}function Ct(le,Ue){return r.createObjectLiteralExpression([Je(le,le.name,Ue,void 0,"get",[],bt(le.body,ue,Xo))])}function ii(le,Ue){return r.createObjectLiteralExpression([Je(le,le.name,Ue,void 0,"set",Dn(le.parameters,ue,$s),bt(le.body,ue,Xo))])}function vt(le,Ue){return r.createObjectLiteralExpression([Je(le,le.name,Ue,void 0,"get",[],r.createBlock([r.createReturnStatement(r.createPropertyAccessExpression(r.createThis(),r.getGeneratedPrivateNameForNode(le.name)))])),Je(le,le.name,Ue,void 0,"set",[r.createParameterDeclaration(void 0,void 0,"value")],r.createBlock([r.createExpressionStatement(r.createAssignment(r.createPropertyAccessExpression(r.createThis(),r.getGeneratedPrivateNameForNode(le.name)),r.createIdentifier("value")))]))])}function Ni(le,Ue,be){return le=Dn(le,Qt=>WP(Qt)?Qt:void 0,Fa),r.createGetAccessorDeclaration(le,Ue,[],void 0,r.createBlock([r.createReturnStatement(r.createPropertyAccessExpression(be,r.createIdentifier("value")))]))}function ji(le,Ue,be){return le=Dn(le,Qt=>WP(Qt)?Qt:void 0,Fa),r.createGetAccessorDeclaration(le,Ue,[],void 0,r.createBlock([r.createReturnStatement(r.createFunctionCallCall(r.createPropertyAccessExpression(be,r.createIdentifier("get")),r.createThis(),[]))]))}function gr(le,Ue,be){return le=Dn(le,Qt=>WP(Qt)?Qt:void 0,Fa),r.createSetAccessorDeclaration(le,Ue,[r.createParameterDeclaration(void 0,void 0,"value")],r.createBlock([r.createReturnStatement(r.createFunctionCallCall(r.createPropertyAccessExpression(be,r.createIdentifier("set")),r.createThis(),[r.createIdentifier("value")]))]))}function te(le,Ue){const be=r.createVariableDeclaration(le,void 0,void 0,r.createConditionalExpression(r.createLogicalAnd(r.createTypeCheck(r.createIdentifier("Symbol"),"function"),r.createPropertyAccessExpression(r.createIdentifier("Symbol"),"metadata")),r.createToken(58),r.createCallExpression(r.createPropertyAccessExpression(r.createIdentifier("Object"),"create"),void 0,[Ue?Gt(Ue):r.createNull()]),r.createToken(59),r.createVoidZero()));return r.createVariableStatement(void 0,r.createVariableDeclarationList([be],2))}function tt(le,Ue){const be=r.createObjectDefinePropertyCall(le,r.createPropertyAccessExpression(r.createIdentifier("Symbol"),"metadata"),r.createPropertyDescriptor({configurable:!0,writable:!0,enumerable:!0,value:Ue},!0));return tr(r.createIfStatement(Ue,r.createExpressionStatement(be)),1)}function Gt(le){return r.createBinaryExpression(r.createElementAccessExpression(le,r.createPropertyAccessExpression(r.createIdentifier("Symbol"),"metadata")),61,r.createNull())}}function QNe(t){const{factory:r,getEmitHelperFactory:a,resumeLexicalEnvironment:u,endLexicalEnvironment:h,hoistVariableDeclaration:p}=t,g=t.getEmitResolver(),C=t.getCompilerOptions(),b=Ja(C);let T,E=0,N,R,F,H;const U=[];let q=0;const X=t.onEmitNode,Z=t.onSubstituteNode;return t.onEmitNode=pn,t.onSubstituteNode=qr,q0(t,Q);function Q(at){if(at.isDeclarationFile)return at;re(1,!1),re(2,!kae(at,C));const yi=dn(at,he,t);return Zb(yi,t.readEmitHelpers()),yi}function re(at,yi){q=yi?q|at:q&~at}function oe(at){return(q&at)!==0}function pe(){return!oe(1)}function de(){return oe(2)}function ue(at,yi,Sn){const dr=at&~q;if(dr){re(dr,!0);const us=yi(Sn);return re(dr,!1),us}return yi(Sn)}function Ie(at){return dn(at,he,t)}function we(at){switch(at.kind){case 218:case 262:case 174:case 177:case 178:case 176:return at;case 169:case 208:case 260:break;case 80:if(H&&g.isArgumentsLocalBinding(at))return H;break}return dn(at,we,t)}function he(at){if(!(at.transformFlags&256))return H?we(at):at;switch(at.kind){case 134:return;case 223:return Ne(at);case 174:return ue(3,He,at);case 262:return ue(3,ze,at);case 218:return ue(3,Nt,at);case 219:return ue(1,$e,at);case 211:return R&&Nr(at)&&at.expression.kind===108&&R.add(at.name.escapedText),dn(at,he,t);case 212:return R&&at.expression.kind===108&&(F=!0),dn(at,he,t);case 177:return ue(3,Pe,at);case 178:return ue(3,We,at);case 176:return ue(3,Oe,at);case 263:case 231:return ue(3,Ie,at);default:return dn(at,he,t)}}function Ae(at){if(FTe(at))switch(at.kind){case 243:return Te(at);case 248:return se(at);case 249:return De(at);case 250:return qe(at);case 299:return ke(at);case 241:case 255:case 269:case 296:case 297:case 258:case 246:case 247:case 245:case 254:case 256:return dn(at,Ae,t);default:return j.assertNever(at,"Unhandled node.")}return he(at)}function ke(at){const yi=new Set;et(at.variableDeclaration,yi);let Sn;if(yi.forEach((dr,us)=>{N.has(us)&&(Sn||(Sn=new Set(N)),Sn.delete(us))}),Sn){const dr=N;N=Sn;const us=dn(at,Ae,t);return N=dr,us}else return dn(at,Ae,t)}function Te(at){if(Me(at.declarationList)){const yi=ut(at.declarationList,!1);return yi?r.createExpressionStatement(yi):void 0}return dn(at,he,t)}function De(at){return r.updateForInStatement(at,Me(at.initializer)?ut(at.initializer,!0):j.checkDefined(bt(at.initializer,he,Hm)),j.checkDefined(bt(at.expression,he,jt)),u_(at.statement,Ae,t))}function qe(at){return r.updateForOfStatement(at,bt(at.awaitModifier,he,dle),Me(at.initializer)?ut(at.initializer,!0):j.checkDefined(bt(at.initializer,he,Hm)),j.checkDefined(bt(at.expression,he,jt)),u_(at.statement,Ae,t))}function se(at){const yi=at.initializer;return r.updateForStatement(at,Me(yi)?ut(yi,!1):bt(at.initializer,he,Hm),bt(at.condition,he,jt),bt(at.incrementor,he,jt),u_(at.statement,Ae,t))}function Ne(at){return pe()?dn(at,he,t):Ir(Ht(r.createYieldExpression(void 0,bt(at.expression,he,jt)),at),at)}function Oe(at){const yi=H;H=void 0;const Sn=r.updateConstructorDeclaration(at,Dn(at.modifiers,he,Fa),yu(at.parameters,he,t),Ei(at));return H=yi,Sn}function He(at){let yi;const Sn=nd(at),dr=H;H=void 0;const us=r.updateMethodDeclaration(at,Dn(at.modifiers,he,Ul),at.asteriskToken,at.name,void 0,void 0,yi=Sn&2?xn(at):yu(at.parameters,he,t),void 0,Sn&2?Pn(at,yi):Ei(at));return H=dr,us}function Pe(at){const yi=H;H=void 0;const Sn=r.updateGetAccessorDeclaration(at,Dn(at.modifiers,he,Ul),at.name,yu(at.parameters,he,t),void 0,Ei(at));return H=yi,Sn}function We(at){const yi=H;H=void 0;const Sn=r.updateSetAccessorDeclaration(at,Dn(at.modifiers,he,Ul),at.name,yu(at.parameters,he,t),Ei(at));return H=yi,Sn}function ze(at){let yi;const Sn=H;H=void 0;const dr=nd(at),us=r.updateFunctionDeclaration(at,Dn(at.modifiers,he,Ul),at.asteriskToken,at.name,void 0,yi=dr&2?xn(at):yu(at.parameters,he,t),void 0,dr&2?Pn(at,yi):_m(at.body,he,t));return H=Sn,us}function Nt(at){let yi;const Sn=H;H=void 0;const dr=nd(at),us=r.updateFunctionExpression(at,Dn(at.modifiers,he,Fa),at.asteriskToken,at.name,void 0,yi=dr&2?xn(at):yu(at.parameters,he,t),void 0,dr&2?Pn(at,yi):_m(at.body,he,t));return H=Sn,us}function $e(at){let yi;const Sn=nd(at);return r.updateArrowFunction(at,Dn(at.modifiers,he,Fa),void 0,yi=Sn&2?xn(at):yu(at.parameters,he,t),void 0,at.equalsGreaterThanToken,Sn&2?Pn(at,yi):_m(at.body,he,t))}function et({name:at},yi){if(ot(at))yi.add(at.escapedText);else for(const Sn of at.elements)Bd(Sn)||et(Sn,yi)}function Me(at){return!!at&&Sf(at)&&!(at.flags&7)&&at.declarations.some(zt)}function ut(at,yi){wt(at);const Sn=K8(at);return Sn.length===0?yi?bt(r.converters.convertToAssignmentElementTarget(at.declarations[0].name),he,jt):void 0:r.inlineExpressions(qt(Sn,dt))}function wt(at){O(at.declarations,Et)}function Et({name:at}){if(ot(at))p(at);else for(const yi of at.elements)Bd(yi)||Et(yi)}function dt(at){const yi=Ga(r.createAssignment(r.converters.convertToAssignmentElementTarget(at.name),at.initializer),at);return j.checkDefined(bt(yi,he,jt))}function zt({name:at}){if(ot(at))return N.has(at.escapedText);for(const yi of at.elements)if(!Bd(yi)&&zt(yi))return!0;return!1}function Ei(at){j.assertIsDefined(at.body);const yi=R,Sn=F;R=new Set,F=!1;let dr=_m(at.body,he,t);const us=Ql(at,Qc);if(b>=2&&(g.hasNodeCheckFlag(at,256)||g.hasNodeCheckFlag(at,128))&&(nd(us)&3)!==3){if(On(),R.size){const Gs=kQ(r,g,at,R);U[Sc(Gs)]=!0;const ma=dr.statements.slice();Fv(ma,[Gs]),dr=r.updateBlock(dr,ma)}F&&(g.hasNodeCheckFlag(at,256)?MP(dr,_X):g.hasNodeCheckFlag(at,128)&&MP(dr,hX))}return R=yi,F=Sn,dr}function tn(){j.assert(H);const at=r.createVariableDeclaration(H,void 0,void 0,r.createIdentifier("arguments")),yi=r.createVariableStatement(void 0,[at]);return bh(yi),F1(yi,2097152),yi}function xn(at){if(jH(at.parameters))return yu(at.parameters,he,t);const yi=[];for(const dr of at.parameters){if(dr.initializer||dr.dotDotDotToken){if(at.kind===219){const Xr=r.createParameterDeclaration(void 0,r.createToken(26),r.createUniqueName("args",8));yi.push(Xr)}break}const us=r.createParameterDeclaration(void 0,void 0,r.getGeneratedNameForNode(dr.name,8));yi.push(us)}const Sn=r.createNodeArray(yi);return Ht(Sn,at.parameters),Sn}function Pn(at,yi){const Sn=jH(at.parameters)?void 0:yu(at.parameters,he,t);u();const us=Ql(at,Ho).type,Xr=b<2?Fi(us):void 0,Gs=at.kind===219,ma=H,Ji=g.hasNodeCheckFlag(at,512)&&!H;Ji&&(H=r.createUniqueName("arguments"));let ac;if(Sn)if(Gs){const gt=[];j.assert(yi.length<=at.parameters.length);for(let Dt=0;Dt<at.parameters.length;Dt++){j.assert(Dt<yi.length);const Je=at.parameters[Dt],Rt=yi[Dt];if(j.assertNode(Rt.name,ot),Je.initializer||Je.dotDotDotToken){j.assert(Dt===yi.length-1),gt.push(r.createSpreadElement(Rt.name));break}gt.push(Rt.name)}ac=r.createArrayLiteralExpression(gt)}else ac=r.createIdentifier("arguments");const St=N;N=new Set;for(const gt of at.parameters)et(gt,N);const ri=R,xe=F;Gs||(R=new Set,F=!1);const pt=de();let Se=_i(at.body);Se=r.updateBlock(Se,r.mergeLexicalEnvironment(Se.statements,h()));let Ze;if(Gs){if(Ze=a().createAwaiterHelper(pt,ac,Xr,Sn,Se),Ji){const gt=r.converters.convertToFunctionBlock(Ze);Ze=r.updateBlock(gt,r.mergeLexicalEnvironment(gt.statements,[tn()]))}}else{const gt=[];gt.push(r.createReturnStatement(a().createAwaiterHelper(pt,ac,Xr,Sn,Se)));const Dt=b>=2&&(g.hasNodeCheckFlag(at,256)||g.hasNodeCheckFlag(at,128));if(Dt&&(On(),R.size)){const Rt=kQ(r,g,at,R);U[Sc(Rt)]=!0,Fv(gt,[Rt])}Ji&&Fv(gt,[tn()]);const Je=r.createBlock(gt,!0);Ht(Je,at.body),Dt&&F&&(g.hasNodeCheckFlag(at,256)?MP(Je,_X):g.hasNodeCheckFlag(at,128)&&MP(Je,hX)),Ze=Je}return N=St,Gs||(R=ri,F=xe,H=ma),Ze}function _i(at,yi){return Xo(at)?r.updateBlock(at,Dn(at.statements,Ae,Ps,yi)):r.converters.convertToFunctionBlock(j.checkDefined(bt(at,Ae,vG)))}function Fi(at){const yi=at&&cV(at);if(yi&&E_(yi)){const Sn=g.getTypeReferenceSerializationKind(yi);if(Sn===1||Sn===0)return yi}}function On(){T&1||(T|=1,t.enableSubstitution(213),t.enableSubstitution(211),t.enableSubstitution(212),t.enableEmitNotification(263),t.enableEmitNotification(174),t.enableEmitNotification(177),t.enableEmitNotification(178),t.enableEmitNotification(176),t.enableEmitNotification(243))}function pn(at,yi,Sn){if(T&1&&Mn(yi)){const dr=(g.hasNodeCheckFlag(yi,128)?128:0)|(g.hasNodeCheckFlag(yi,256)?256:0);if(dr!==E){const us=E;E=dr,X(at,yi,Sn),E=us;return}}else if(T&&U[Sc(yi)]){const dr=E;E=0,X(at,yi,Sn),E=dr;return}X(at,yi,Sn)}function qr(at,yi){return yi=Z(at,yi),at===1&&E?Fs(yi):yi}function Fs(at){switch(at.kind){case 211:return ko(at);case 212:return ls(at);case 213:return Qs(at)}return at}function ko(at){return at.expression.kind===108?Ht(r.createPropertyAccessExpression(r.createUniqueName("_super",48),at.name),at):at}function ls(at){return at.expression.kind===108?Zs(at.argumentExpression,at):at}function Qs(at){const yi=at.expression;if(G_(yi)){const Sn=Nr(yi)?ko(yi):ls(yi);return r.createCallExpression(r.createPropertyAccessExpression(Sn,"call"),void 0,[r.createThis(),...at.arguments])}return at}function Mn(at){const yi=at.kind;return yi===263||yi===176||yi===174||yi===177||yi===178}function Zs(at,yi){return E&256?Ht(r.createPropertyAccessExpression(r.createCallExpression(r.createUniqueName("_superIndex",48),void 0,[at]),"value"),yi):Ht(r.createCallExpression(r.createUniqueName("_superIndex",48),void 0,[at]),yi)}}function kQ(t,r,a,u){const h=r.hasNodeCheckFlag(a,256),p=[];return u.forEach((g,C)=>{const b=Ws(C),T=[];T.push(t.createPropertyAssignment("get",t.createArrowFunction(void 0,void 0,[],void 0,void 0,tr(t.createPropertyAccessExpression(tr(t.createSuper(),8),b),8)))),h&&T.push(t.createPropertyAssignment("set",t.createArrowFunction(void 0,void 0,[t.createParameterDeclaration(void 0,void 0,"v",void 0,void 0,void 0)],void 0,void 0,t.createAssignment(tr(t.createPropertyAccessExpression(tr(t.createSuper(),8),b),8),t.createIdentifier("v"))))),p.push(t.createPropertyAssignment(b,t.createObjectLiteralExpression(T)))}),t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(t.createUniqueName("_super",48),void 0,void 0,t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Object"),"create"),void 0,[t.createNull(),t.createObjectLiteralExpression(p,!0)]))],2))}function ZNe(t){const{factory:r,getEmitHelperFactory:a,resumeLexicalEnvironment:u,endLexicalEnvironment:h,hoistVariableDeclaration:p}=t,g=t.getEmitResolver(),C=t.getCompilerOptions(),b=Ja(C),T=t.onEmitNode;t.onEmitNode=ma;const E=t.onSubstituteNode;t.onSubstituteNode=ka;let N=!1,R,F,H,U=0,q=0,X,Z,Q,re;const oe=[];return q0(t,we);function pe(Se,Ze){return q!==(q&~Se|Ze)}function de(Se,Ze){const gt=q;return q=(q&~Se|Ze)&3,gt}function ue(Se){q=Se}function Ie(Se){Z=fn(Z,r.createVariableDeclaration(Se))}function we(Se){if(Se.isDeclarationFile)return Se;X=Se;const Ze=$e(Se);return Zb(Ze,t.readEmitHelpers()),X=void 0,Z=void 0,Ze}function he(Se){return qe(Se,!1)}function Ae(Se){return qe(Se,!0)}function ke(Se){if(Se.kind!==134)return Se}function Te(Se,Ze,gt,Dt){if(pe(gt,Dt)){const Je=de(gt,Dt),Rt=Se(Ze);return ue(Je),Rt}return Se(Ze)}function De(Se){return dn(Se,he,t)}function qe(Se,Ze){if(!(Se.transformFlags&128))return Se;switch(Se.kind){case 223:return se(Se);case 229:return Ne(Se);case 253:return Oe(Se);case 256:return He(Se);case 210:return We(Se);case 226:return Me(Se,Ze);case 355:return ut(Se,Ze);case 299:return wt(Se);case 243:return Et(Se);case 260:return dt(Se);case 246:case 247:case 249:return Te(De,Se,0,2);case 250:return xn(Se,void 0);case 248:return Te(Ei,Se,0,2);case 222:return tn(Se);case 176:return Te(ko,Se,2,1);case 174:return Te(Mn,Se,2,1);case 177:return Te(ls,Se,2,1);case 178:return Te(Qs,Se,2,1);case 262:return Te(Zs,Se,2,1);case 218:return Te(yi,Se,2,1);case 219:return Te(at,Se,2,0);case 169:return qr(Se);case 244:return ze(Se);case 217:return Nt(Se,Ze);case 215:return et(Se);case 211:return Q&&Nr(Se)&&Se.expression.kind===108&&Q.add(Se.name.escapedText),dn(Se,he,t);case 212:return Q&&Se.expression.kind===108&&(re=!0),dn(Se,he,t);case 263:case 231:return Te(De,Se,2,1);default:return dn(Se,he,t)}}function se(Se){return F&2&&F&1?Ir(Ht(r.createYieldExpression(void 0,a().createAwaitHelper(bt(Se.expression,he,jt))),Se),Se):dn(Se,he,t)}function Ne(Se){if(F&2&&F&1){if(Se.asteriskToken){const Ze=bt(j.checkDefined(Se.expression),he,jt);return Ir(Ht(r.createYieldExpression(void 0,a().createAwaitHelper(r.updateYieldExpression(Se,Se.asteriskToken,Ht(a().createAsyncDelegatorHelper(Ht(a().createAsyncValuesHelper(Ze),Ze)),Ze)))),Se),Se)}return Ir(Ht(r.createYieldExpression(void 0,Fi(Se.expression?bt(Se.expression,he,jt):r.createVoidZero())),Se),Se)}return dn(Se,he,t)}function Oe(Se){return F&2&&F&1?r.updateReturnStatement(Se,Fi(Se.expression?bt(Se.expression,he,jt):r.createVoidZero())):dn(Se,he,t)}function He(Se){if(F&2){const Ze=Oae(Se);return Ze.kind===250&&Ze.awaitModifier?xn(Ze,Se):r.restoreEnclosingLabel(bt(Ze,he,Ps,r.liftToBlock),Se)}return dn(Se,he,t)}function Pe(Se){let Ze;const gt=[];for(const Dt of Se)if(Dt.kind===305){Ze&&(gt.push(r.createObjectLiteralExpression(Ze)),Ze=void 0);const Je=Dt.expression;gt.push(bt(Je,he,jt))}else Ze=fn(Ze,Dt.kind===303?r.createPropertyAssignment(Dt.name,bt(Dt.initializer,he,jt)):bt(Dt,he,Ub));return Ze&&gt.push(r.createObjectLiteralExpression(Ze)),gt}function We(Se){if(Se.transformFlags&65536){const Ze=Pe(Se.properties);Ze.length&&Ze[0].kind!==210&&Ze.unshift(r.createObjectLiteralExpression());let gt=Ze[0];if(Ze.length>1){for(let Dt=1;Dt<Ze.length;Dt++)gt=a().createAssignHelper([gt,Ze[Dt]]);return gt}else return a().createAssignHelper(Ze)}return dn(Se,he,t)}function ze(Se){return dn(Se,Ae,t)}function Nt(Se,Ze){return dn(Se,Ze?Ae:he,t)}function $e(Se){const Ze=de(2,kae(Se,C)?0:1);N=!1;const gt=dn(Se,he,t),Dt=Js(gt.statements,Z&&[r.createVariableStatement(void 0,r.createVariableDeclarationList(Z))]),Je=r.updateSourceFile(gt,Ht(r.createNodeArray(Dt),Se.statements));return ue(Ze),Je}function et(Se){return $ue(t,Se,he,X,Ie,0)}function Me(Se,Ze){return pS(Se)&&xH(Se.left)?HI(Se,he,t,1,!Ze):Se.operatorToken.kind===28?r.updateBinaryExpression(Se,bt(Se.left,Ae,jt),Se.operatorToken,bt(Se.right,Ze?Ae:he,jt)):dn(Se,he,t)}function ut(Se,Ze){if(Ze)return dn(Se,Ae,t);let gt;for(let Je=0;Je<Se.elements.length;Je++){const Rt=Se.elements[Je],Ct=bt(Rt,Je<Se.elements.length-1?Ae:he,jt);(gt||Ct!==Rt)&&(gt||(gt=Se.elements.slice(0,Je)),gt.push(Ct))}const Dt=gt?Ht(r.createNodeArray(gt),Se.elements):Se.elements;return r.updateCommaListExpression(Se,Dt)}function wt(Se){if(Se.variableDeclaration&&ta(Se.variableDeclaration.name)&&Se.variableDeclaration.name.transformFlags&65536){const Ze=r.getGeneratedNameForNode(Se.variableDeclaration.name),gt=r.updateVariableDeclaration(Se.variableDeclaration,Se.variableDeclaration.name,void 0,void 0,Ze),Dt=hD(gt,he,t,1);let Je=bt(Se.block,he,Xo);return Ft(Dt)&&(Je=r.updateBlock(Je,[r.createVariableStatement(void 0,Dt),...Je.statements])),r.updateCatchClause(Se,r.updateVariableDeclaration(Se.variableDeclaration,Ze,void 0,void 0,void 0),Je)}return dn(Se,he,t)}function Et(Se){if(Zr(Se,32)){const Ze=N;N=!0;const gt=dn(Se,he,t);return N=Ze,gt}return dn(Se,he,t)}function dt(Se){if(N){const Ze=N;N=!1;const gt=zt(Se,!0);return N=Ze,gt}return zt(Se,!1)}function zt(Se,Ze){return ta(Se.name)&&Se.name.transformFlags&65536?hD(Se,he,t,1,void 0,Ze):dn(Se,he,t)}function Ei(Se){return r.updateForStatement(Se,bt(Se.initializer,Ae,Hm),bt(Se.condition,he,jt),bt(Se.incrementor,Ae,jt),u_(Se.statement,he,t))}function tn(Se){return dn(Se,Ae,t)}function xn(Se,Ze){const gt=de(0,2);(Se.initializer.transformFlags&65536||S8(Se.initializer)&&xH(Se.initializer))&&(Se=Pn(Se));const Dt=Se.awaitModifier?On(Se,Ze,gt):r.restoreEnclosingLabel(dn(Se,he,t),Ze);return ue(gt),Dt}function Pn(Se){const Ze=Dc(Se.initializer);if(Sf(Ze)||S8(Ze)){let gt,Dt;const Je=r.createTempVariable(void 0),Rt=[Nle(r,Ze,Je)];return Xo(Se.statement)?(Sr(Rt,Se.statement.statements),gt=Se.statement,Dt=Se.statement.statements):Se.statement&&(fn(Rt,Se.statement),gt=Se.statement,Dt=Se.statement),r.updateForOfStatement(Se,Se.awaitModifier,Ht(r.createVariableDeclarationList([Ht(r.createVariableDeclaration(Je),Se.initializer)],1),Se.initializer),Se.expression,Ht(r.createBlock(Ht(r.createNodeArray(Rt),Dt),!0),gt))}return Se}function _i(Se,Ze,gt){const Dt=r.createTempVariable(p),Je=r.createAssignment(Dt,Ze),Rt=r.createExpressionStatement(Je);Ga(Rt,Se.expression);const Ct=r.createAssignment(gt,r.createFalse()),ii=r.createExpressionStatement(Ct);Ga(ii,Se.expression);const vt=[Rt,ii],Ni=Nle(r,Se.initializer,Dt);vt.push(bt(Ni,he,Ps));let ji,gr;const te=u_(Se.statement,he,t);return Xo(te)?(Sr(vt,te.statements),ji=te,gr=te.statements):vt.push(te),Ht(r.createBlock(Ht(r.createNodeArray(vt),gr),!0),ji)}function Fi(Se){return F&1?r.createYieldExpression(void 0,a().createAwaitHelper(Se)):r.createAwaitExpression(Se)}function On(Se,Ze,gt){const Dt=bt(Se.expression,he,jt),Je=ot(Dt)?r.getGeneratedNameForNode(Dt):r.createTempVariable(void 0),Rt=ot(Dt)?r.getGeneratedNameForNode(Je):r.createTempVariable(void 0),Ct=r.createTempVariable(void 0),ii=r.createTempVariable(p),vt=r.createUniqueName("e"),Ni=r.getGeneratedNameForNode(vt),ji=r.createTempVariable(void 0),gr=Ht(a().createAsyncValuesHelper(Dt),Se.expression),te=r.createCallExpression(r.createPropertyAccessExpression(Je,"next"),void 0,[]),tt=r.createPropertyAccessExpression(Rt,"done"),Gt=r.createPropertyAccessExpression(Rt,"value"),le=r.createFunctionCallCall(ji,Je,[]);p(vt),p(ji);const Ue=gt&2?r.inlineExpressions([r.createAssignment(vt,r.createVoidZero()),gr]):gr,be=tr(Ht(r.createForStatement(tr(Ht(r.createVariableDeclarationList([r.createVariableDeclaration(Ct,void 0,void 0,r.createTrue()),Ht(r.createVariableDeclaration(Je,void 0,void 0,Ue),Se.expression),r.createVariableDeclaration(Rt)]),Se.expression),4194304),r.inlineExpressions([r.createAssignment(Rt,Fi(te)),r.createAssignment(ii,tt),r.createLogicalNot(ii)]),r.createAssignment(Ct,r.createTrue()),_i(Se,Gt,Ct)),Se),512);return Ir(be,Se),r.createTryStatement(r.createBlock([r.restoreEnclosingLabel(be,Ze)]),r.createCatchClause(r.createVariableDeclaration(Ni),tr(r.createBlock([r.createExpressionStatement(r.createAssignment(vt,r.createObjectLiteralExpression([r.createPropertyAssignment("error",Ni)])))]),1)),r.createBlock([r.createTryStatement(r.createBlock([tr(r.createIfStatement(r.createLogicalAnd(r.createLogicalAnd(r.createLogicalNot(Ct),r.createLogicalNot(ii)),r.createAssignment(ji,r.createPropertyAccessExpression(Je,"return"))),r.createExpressionStatement(Fi(le))),1)]),void 0,tr(r.createBlock([tr(r.createIfStatement(vt,r.createThrowStatement(r.createPropertyAccessExpression(vt,"error"))),1)]),1))]))}function pn(Se){return j.assertNode(Se,$s),qr(Se)}function qr(Se){return H!=null&&H.has(Se)?r.updateParameterDeclaration(Se,void 0,Se.dotDotDotToken,ta(Se.name)?r.getGeneratedNameForNode(Se):Se.name,void 0,void 0,void 0):Se.transformFlags&65536?r.updateParameterDeclaration(Se,void 0,Se.dotDotDotToken,r.getGeneratedNameForNode(Se),void 0,void 0,bt(Se.initializer,he,jt)):dn(Se,he,t)}function Fs(Se){let Ze;for(const gt of Se.parameters)Ze?Ze.add(gt):gt.transformFlags&65536&&(Ze=new Set);return Ze}function ko(Se){const Ze=F,gt=H;F=nd(Se),H=Fs(Se);const Dt=r.updateConstructorDeclaration(Se,Se.modifiers,yu(Se.parameters,pn,t),us(Se));return F=Ze,H=gt,Dt}function ls(Se){const Ze=F,gt=H;F=nd(Se),H=Fs(Se);const Dt=r.updateGetAccessorDeclaration(Se,Se.modifiers,bt(Se.name,he,id),yu(Se.parameters,pn,t),void 0,us(Se));return F=Ze,H=gt,Dt}function Qs(Se){const Ze=F,gt=H;F=nd(Se),H=Fs(Se);const Dt=r.updateSetAccessorDeclaration(Se,Se.modifiers,bt(Se.name,he,id),yu(Se.parameters,pn,t),us(Se));return F=Ze,H=gt,Dt}function Mn(Se){const Ze=F,gt=H;F=nd(Se),H=Fs(Se);const Dt=r.updateMethodDeclaration(Se,F&1?Dn(Se.modifiers,ke,Ul):Se.modifiers,F&2?void 0:Se.asteriskToken,bt(Se.name,he,id),bt(void 0,he,dx),void 0,F&2&&F&1?Sn(Se):yu(Se.parameters,pn,t),void 0,F&2&&F&1?dr(Se):us(Se));return F=Ze,H=gt,Dt}function Zs(Se){const Ze=F,gt=H;F=nd(Se),H=Fs(Se);const Dt=r.updateFunctionDeclaration(Se,F&1?Dn(Se.modifiers,ke,Fa):Se.modifiers,F&2?void 0:Se.asteriskToken,Se.name,void 0,F&2&&F&1?Sn(Se):yu(Se.parameters,pn,t),void 0,F&2&&F&1?dr(Se):us(Se));return F=Ze,H=gt,Dt}function at(Se){const Ze=F,gt=H;F=nd(Se),H=Fs(Se);const Dt=r.updateArrowFunction(Se,Se.modifiers,void 0,yu(Se.parameters,pn,t),void 0,Se.equalsGreaterThanToken,us(Se));return F=Ze,H=gt,Dt}function yi(Se){const Ze=F,gt=H;F=nd(Se),H=Fs(Se);const Dt=r.updateFunctionExpression(Se,F&1?Dn(Se.modifiers,ke,Fa):Se.modifiers,F&2?void 0:Se.asteriskToken,Se.name,void 0,F&2&&F&1?Sn(Se):yu(Se.parameters,pn,t),void 0,F&2&&F&1?dr(Se):us(Se));return F=Ze,H=gt,Dt}function Sn(Se){if(jH(Se.parameters))return yu(Se.parameters,he,t);const Ze=[];for(const Dt of Se.parameters){if(Dt.initializer||Dt.dotDotDotToken)break;const Je=r.createParameterDeclaration(void 0,void 0,r.getGeneratedNameForNode(Dt.name,8));Ze.push(Je)}const gt=r.createNodeArray(Ze);return Ht(gt,Se.parameters),gt}function dr(Se){const Ze=jH(Se.parameters)?void 0:yu(Se.parameters,he,t);u();const gt=Q,Dt=re;Q=new Set,re=!1;const Je=[];let Rt=r.updateBlock(Se.body,Dn(Se.body.statements,he,Ps));Rt=r.updateBlock(Rt,r.mergeLexicalEnvironment(Rt.statements,Xr(h(),Se)));const Ct=r.createReturnStatement(a().createAsyncGeneratorHelper(r.createFunctionExpression(void 0,r.createToken(42),Se.name&&r.getGeneratedNameForNode(Se.name),void 0,Ze??[],void 0,Rt),!!(q&1))),ii=b>=2&&(g.hasNodeCheckFlag(Se,256)||g.hasNodeCheckFlag(Se,128));if(ii){Gs();const Ni=kQ(r,g,Se,Q);oe[Sc(Ni)]=!0,Fv(Je,[Ni])}Je.push(Ct);const vt=r.updateBlock(Se.body,Je);return ii&&re&&(g.hasNodeCheckFlag(Se,256)?MP(vt,_X):g.hasNodeCheckFlag(Se,128)&&MP(vt,hX)),Q=gt,re=Dt,vt}function us(Se){u();let Ze=0;const gt=[],Dt=bt(Se.body,he,vG)??r.createBlock([]);Xo(Dt)&&(Ze=r.copyPrologue(Dt.statements,gt,!1,he)),Sr(gt,Xr(void 0,Se));const Je=h();if(Ze>0||Ft(gt)||Ft(Je)){const Rt=r.converters.convertToFunctionBlock(Dt,!0);return Fv(gt,Je),Sr(gt,Rt.statements.slice(Ze)),r.updateBlock(Rt,Ht(r.createNodeArray(gt),Rt.statements))}return Dt}function Xr(Se,Ze){let gt=!1;for(const Dt of Ze.parameters)if(gt){if(ta(Dt.name)){if(Dt.name.elements.length>0){const Je=hD(Dt,he,t,0,r.getGeneratedNameForNode(Dt));if(Ft(Je)){const Rt=r.createVariableDeclarationList(Je),Ct=r.createVariableStatement(void 0,Rt);tr(Ct,2097152),Se=fn(Se,Ct)}}else if(Dt.initializer){const Je=r.getGeneratedNameForNode(Dt),Rt=bt(Dt.initializer,he,jt),Ct=r.createAssignment(Je,Rt),ii=r.createExpressionStatement(Ct);tr(ii,2097152),Se=fn(Se,ii)}}else if(Dt.initializer){const Je=r.cloneNode(Dt.name);Ht(Je,Dt.name),tr(Je,96);const Rt=bt(Dt.initializer,he,jt);F1(Rt,3168);const Ct=r.createAssignment(Je,Rt);Ht(Ct,Dt),tr(Ct,3072);const ii=r.createBlock([r.createExpressionStatement(Ct)]);Ht(ii,Dt),tr(ii,3905);const vt=r.createTypeCheck(r.cloneNode(Dt.name),"undefined"),Ni=r.createIfStatement(vt,ii);bh(Ni),Ht(Ni,Dt),tr(Ni,2101056),Se=fn(Se,Ni)}}else if(Dt.transformFlags&65536){gt=!0;const Je=hD(Dt,he,t,1,r.getGeneratedNameForNode(Dt),!1,!0);if(Ft(Je)){const Rt=r.createVariableDeclarationList(Je),Ct=r.createVariableStatement(void 0,Rt);tr(Ct,2097152),Se=fn(Se,Ct)}}return Se}function Gs(){R&1||(R|=1,t.enableSubstitution(213),t.enableSubstitution(211),t.enableSubstitution(212),t.enableEmitNotification(263),t.enableEmitNotification(174),t.enableEmitNotification(177),t.enableEmitNotification(178),t.enableEmitNotification(176),t.enableEmitNotification(243))}function ma(Se,Ze,gt){if(R&1&&xe(Ze)){const Dt=(g.hasNodeCheckFlag(Ze,128)?128:0)|(g.hasNodeCheckFlag(Ze,256)?256:0);if(Dt!==U){const Je=U;U=Dt,T(Se,Ze,gt),U=Je;return}}else if(R&&oe[Sc(Ze)]){const Dt=U;U=0,T(Se,Ze,gt),U=Dt;return}T(Se,Ze,gt)}function ka(Se,Ze){return Ze=E(Se,Ze),Se===1&&U?Ji(Ze):Ze}function Ji(Se){switch(Se.kind){case 211:return ac(Se);case 212:return St(Se);case 213:return ri(Se)}return Se}function ac(Se){return Se.expression.kind===108?Ht(r.createPropertyAccessExpression(r.createUniqueName("_super",48),Se.name),Se):Se}function St(Se){return Se.expression.kind===108?pt(Se.argumentExpression,Se):Se}function ri(Se){const Ze=Se.expression;if(G_(Ze)){const gt=Nr(Ze)?ac(Ze):St(Ze);return r.createCallExpression(r.createPropertyAccessExpression(gt,"call"),void 0,[r.createThis(),...Se.arguments])}return Se}function xe(Se){const Ze=Se.kind;return Ze===263||Ze===176||Ze===174||Ze===177||Ze===178}function pt(Se,Ze){return U&256?Ht(r.createPropertyAccessExpression(r.createCallExpression(r.createIdentifier("_superIndex"),void 0,[Se]),"value"),Ze):Ht(r.createCallExpression(r.createIdentifier("_superIndex"),void 0,[Se]),Ze)}}function YNe(t){const r=t.factory;return q0(t,a);function a(p){return p.isDeclarationFile?p:dn(p,u,t)}function u(p){if(!(p.transformFlags&64))return p;switch(p.kind){case 299:return h(p);default:return dn(p,u,t)}}function h(p){return p.variableDeclaration?dn(p,u,t):r.updateCatchClause(p,r.createVariableDeclaration(r.createTempVariable(void 0)),bt(p.block,u,Xo))}}function eLe(t){const{factory:r,hoistVariableDeclaration:a}=t;return q0(t,u);function u(H){return H.isDeclarationFile?H:dn(H,h,t)}function h(H){if(!(H.transformFlags&32))return H;switch(H.kind){case 213:{const U=b(H,!1);return j.assertNotNode(U,JP),U}case 211:case 212:if(gh(H)){const U=E(H,!1,!1);return j.assertNotNode(U,JP),U}return dn(H,h,t);case 226:return H.operatorToken.kind===61?R(H):dn(H,h,t);case 220:return F(H);default:return dn(H,h,t)}}function p(H){j.assertNotNode(H,hG);const U=[H];for(;!H.questionDotToken&&!i2(H);)H=ha(l0(H.expression),gh),j.assertNotNode(H,hG),U.unshift(H);return{expression:H.expression,chain:U}}function g(H,U,q){const X=T(H.expression,U,q);return JP(X)?r.createSyntheticReferenceExpression(r.updateParenthesizedExpression(H,X.expression),X.thisArg):r.updateParenthesizedExpression(H,X)}function C(H,U,q){if(gh(H))return E(H,U,q);let X=bt(H.expression,h,jt);j.assertNotNode(X,JP);let Z;return U&&(fD(X)?Z=X:(Z=r.createTempVariable(a),X=r.createAssignment(Z,X))),X=H.kind===211?r.updatePropertyAccessExpression(H,X,bt(H.name,h,ot)):r.updateElementAccessExpression(H,X,bt(H.argumentExpression,h,jt)),Z?r.createSyntheticReferenceExpression(X,Z):X}function b(H,U){if(gh(H))return E(H,U,!1);if(c_(H.expression)&&gh(Dc(H.expression))){const q=g(H.expression,!0,!1),X=Dn(H.arguments,h,jt);return JP(q)?Ht(r.createFunctionCallCall(q.expression,q.thisArg,X),H):r.updateCallExpression(H,q,void 0,X)}return dn(H,h,t)}function T(H,U,q){switch(H.kind){case 217:return g(H,U,q);case 211:case 212:return C(H,U,q);case 213:return b(H,U);default:return bt(H,h,jt)}}function E(H,U,q){const{expression:X,chain:Z}=p(H),Q=T(l0(X),cI(Z[0]),!1);let re=JP(Q)?Q.thisArg:void 0,oe=JP(Q)?Q.expression:Q,pe=r.restoreOuterExpressions(X,oe,8);fD(oe)||(oe=r.createTempVariable(a),pe=r.createAssignment(oe,pe));let de=oe,ue;for(let we=0;we<Z.length;we++){const he=Z[we];switch(he.kind){case 211:case 212:we===Z.length-1&&U&&(fD(de)?ue=de:(ue=r.createTempVariable(a),de=r.createAssignment(ue,de))),de=he.kind===211?r.createPropertyAccessExpression(de,bt(he.name,h,ot)):r.createElementAccessExpression(de,bt(he.argumentExpression,h,jt));break;case 213:we===0&&re?(zl(re)||(re=r.cloneNode(re),F1(re,3072)),de=r.createFunctionCallCall(de,re.kind===108?r.createThis():re,Dn(he.arguments,h,jt))):de=r.createCallExpression(de,void 0,Dn(he.arguments,h,jt));break}Ir(de,he)}const Ie=q?r.createConditionalExpression(N(pe,oe,!0),void 0,r.createTrue(),void 0,r.createDeleteExpression(de)):r.createConditionalExpression(N(pe,oe,!0),void 0,r.createVoidZero(),void 0,de);return Ht(Ie,H),ue?r.createSyntheticReferenceExpression(Ie,ue):Ie}function N(H,U,q){return r.createBinaryExpression(r.createBinaryExpression(H,r.createToken(q?37:38),r.createNull()),r.createToken(q?57:56),r.createBinaryExpression(U,r.createToken(q?37:38),r.createVoidZero()))}function R(H){let U=bt(H.left,h,jt),q=U;return fD(U)||(q=r.createTempVariable(a),U=r.createAssignment(q,U)),Ht(r.createConditionalExpression(N(U,q),void 0,q,void 0,bt(H.right,h,jt)),H)}function F(H){return gh(Dc(H.expression))?Ir(T(H.expression,!1,!0),H):r.updateDeleteExpression(H,bt(H.expression,h,jt))}}function tLe(t){const{hoistVariableDeclaration:r,factory:a}=t;return q0(t,u);function u(g){return g.isDeclarationFile?g:dn(g,h,t)}function h(g){return g.transformFlags&16?_ce(g)?p(g):dn(g,h,t):g}function p(g){const C=g.operatorToken,b=U7(C.kind);let T=Dc(bt(g.left,h,N_)),E=T;const N=Dc(bt(g.right,h,jt));if(Sl(T)){const R=fD(T.expression),F=R?T.expression:a.createTempVariable(r),H=R?T.expression:a.createAssignment(F,T.expression);if(Nr(T))E=a.createPropertyAccessExpression(F,T.name),T=a.createPropertyAccessExpression(H,T.name);else{const U=fD(T.argumentExpression),q=U?T.argumentExpression:a.createTempVariable(r);E=a.createElementAccessExpression(F,q),T=a.createElementAccessExpression(H,U?T.argumentExpression:a.createAssignment(q,T.argumentExpression))}}return a.createBinaryExpression(T,b,a.createParenthesizedExpression(a.createAssignment(E,N)))}}function iLe(t){const{factory:r,getEmitHelperFactory:a,hoistVariableDeclaration:u,startLexicalEnvironment:h,endLexicalEnvironment:p}=t;let g,C,b,T;return q0(t,E);function E(Te){if(Te.isDeclarationFile)return Te;const De=bt(Te,N,Os);return Zb(De,t.readEmitHelpers()),C=void 0,g=void 0,b=void 0,De}function N(Te){if(!(Te.transformFlags&4))return Te;switch(Te.kind){case 307:return R(Te);case 241:return F(Te);case 248:return H(Te);case 250:return U(Te);case 255:return X(Te);default:return dn(Te,N,t)}}function R(Te){const De=Jue(Te.statements);if(De){h(),g=new V3,C=[];const qe=get(Te.statements),se=[];Sr(se,VH(Te.statements,N,Ps,0,qe));let Ne=qe;for(;Ne<Te.statements.length;){const Pe=Te.statements[Ne];if(rLe(Pe)!==0){Ne>qe&&Sr(se,Dn(Te.statements,N,Ps,qe,Ne-qe));break}Ne++}j.assert(Ne<Te.statements.length,"Should have encountered at least one 'using' statement.");const Oe=Ae(),He=Z(Te.statements,Ne,Te.statements.length,Oe,se);return g.size&&fn(se,r.createExportDeclaration(void 0,!1,r.createNamedExports(as(g.values())))),Sr(se,p()),C.length&&se.push(r.createVariableStatement(r.createModifiersFromModifierFlags(32),r.createVariableDeclarationList(C,1))),Sr(se,ke(He,Oe,De===2)),T&&se.push(r.createExportAssignment(void 0,!0,T)),r.updateSourceFile(Te,se)}return dn(Te,N,t)}function F(Te){const De=Jue(Te.statements);if(De){const qe=get(Te.statements),se=Ae();return r.updateBlock(Te,[...VH(Te.statements,N,Ps,0,qe),...ke(Z(Te.statements,qe,Te.statements.length,se,void 0),se,De===2)])}return dn(Te,N,t)}function H(Te){return Te.initializer&&yet(Te.initializer)?bt(r.createBlock([r.createVariableStatement(void 0,Te.initializer),r.updateForStatement(Te,void 0,Te.condition,Te.incrementor,Te.statement)]),N,Ps):dn(Te,N,t)}function U(Te){if(yet(Te.initializer)){const De=Te.initializer,qe=Ra(De.declarations)||r.createVariableDeclaration(r.createTempVariable(void 0)),se=nLe(De)===2,Ne=r.getGeneratedNameForNode(qe.name),Oe=r.updateVariableDeclaration(qe,qe.name,void 0,void 0,Ne),He=r.createVariableDeclarationList([Oe],se?6:4),Pe=r.createVariableStatement(void 0,He);return bt(r.updateForOfStatement(Te,Te.awaitModifier,r.createVariableDeclarationList([r.createVariableDeclaration(Ne)],2),Te.expression,Xo(Te.statement)?r.updateBlock(Te.statement,[Pe,...Te.statement.statements]):r.createBlock([Pe,Te.statement],!0)),N,Ps)}return dn(Te,N,t)}function q(Te,De){return Jue(Te.statements)!==0?x3(Te)?r.updateCaseClause(Te,bt(Te.expression,N,jt),Z(Te.statements,0,Te.statements.length,De,void 0)):r.updateDefaultClause(Te,Z(Te.statements,0,Te.statements.length,De,void 0)):dn(Te,N,t)}function X(Te){const De=HRt(Te.caseBlock.clauses);if(De){const qe=Ae();return ke([r.updateSwitchStatement(Te,bt(Te.expression,N,jt),r.updateCaseBlock(Te.caseBlock,Te.caseBlock.clauses.map(se=>q(se,qe))))],qe,De===2)}return dn(Te,N,t)}function Z(Te,De,qe,se,Ne){const Oe=[];for(let We=De;We<qe;We++){const ze=Te[We],Nt=rLe(ze);if(Nt){j.assertNode(ze,Lu);const et=[];for(let Me of ze.declarationList.declarations){if(!ot(Me.name)){et.length=0;break}Sp(Me)&&(Me=Dp(t,Me));const ut=bt(Me.initializer,N,jt)??r.createVoidZero();et.push(r.updateVariableDeclaration(Me,Me.name,void 0,void 0,a().createAddDisposableResourceHelper(se,ut,Nt===2)))}if(et.length){const Me=r.createVariableDeclarationList(et,2);Ir(Me,ze.declarationList),Ht(Me,ze.declarationList),He(r.updateVariableStatement(ze,void 0,Me));continue}}const $e=N(ze);Ao($e)?$e.forEach(He):$e&&He($e)}return Oe;function He(We){j.assertNode(We,Ps),fn(Oe,Pe(We))}function Pe(We){if(!Ne)return We;switch(We.kind){case 272:case 271:case 278:case 262:return Q(We,Ne);case 277:return re(We);case 263:return de(We);case 243:return ue(We)}return We}}function Q(Te,De){De.push(Te)}function re(Te){return Te.isExportEquals?pe(Te):oe(Te)}function oe(Te){if(b)return Te;b=r.createUniqueName("_default",56),he(b,!0,"default",Te);let De=Te.expression,qe=Vu(De);Sp(qe)&&(qe=Dp(t,qe,!1,"default"),De=r.restoreOuterExpressions(De,qe));const se=r.createAssignment(b,De);return r.createExpressionStatement(se)}function pe(Te){if(T)return Te;T=r.createUniqueName("_default",56),u(T);const De=r.createAssignment(T,Te.expression);return r.createExpressionStatement(De)}function de(Te){if(!Te.name&&b)return Te;const De=Zr(Te,32),qe=Zr(Te,2048);let se=r.converters.convertToClassExpression(Te);return Te.name&&(he(r.getLocalName(Te),De&&!qe,void 0,Te),se=r.createAssignment(r.getDeclarationName(Te),se),Sp(se)&&(se=Dp(t,se,!1)),Ir(se,Te),Ga(se,Te),Sd(se,Te)),qe&&!b&&(b=r.createUniqueName("_default",56),he(b,!0,"default",Te),se=r.createAssignment(b,se),Sp(se)&&(se=Dp(t,se,!1,"default")),Ir(se,Te)),r.createExpressionStatement(se)}function ue(Te){let De;const qe=Zr(Te,32);for(const se of Te.declarationList.declarations)we(se,qe,se),se.initializer&&(De=fn(De,Ie(se)));if(De){const se=r.createExpressionStatement(r.inlineExpressions(De));return Ir(se,Te),Sd(se,Te),Ga(se,Te),se}}function Ie(Te){j.assertIsDefined(Te.initializer);let De;ot(Te.name)?(De=r.cloneNode(Te.name),tr(De,Ya(De)&-114689)):De=r.converters.convertToAssignmentPattern(Te.name);const qe=r.createAssignment(De,Te.initializer);return Ir(qe,Te),Sd(qe,Te),Ga(qe,Te),qe}function we(Te,De,qe){if(ta(Te.name))for(const se of Te.name.elements)Bd(se)||we(se,De,qe);else he(Te.name,De,void 0,qe)}function he(Te,De,qe,se){const Ne=zl(Te)?Te:r.cloneNode(Te);if(De){if(qe===void 0&&!iC(Ne)){const We=r.createVariableDeclaration(Ne);se&&Ir(We,se),C.push(We);return}const Oe=qe!==void 0?Ne:void 0,He=qe!==void 0?qe:Ne,Pe=r.createExportSpecifier(!1,Oe,He);se&&Ir(Pe,se),g.set(Ne,Pe)}u(Ne)}function Ae(){return r.createUniqueName("env")}function ke(Te,De,qe){const se=[],Ne=r.createObjectLiteralExpression([r.createPropertyAssignment("stack",r.createArrayLiteralExpression()),r.createPropertyAssignment("error",r.createVoidZero()),r.createPropertyAssignment("hasError",r.createFalse())]),Oe=r.createVariableDeclaration(De,void 0,void 0,Ne),He=r.createVariableDeclarationList([Oe],2),Pe=r.createVariableStatement(void 0,He);se.push(Pe);const We=r.createBlock(Te,!0),ze=r.createUniqueName("e"),Nt=r.createCatchClause(ze,r.createBlock([r.createExpressionStatement(r.createAssignment(r.createPropertyAccessExpression(De,"error"),ze)),r.createExpressionStatement(r.createAssignment(r.createPropertyAccessExpression(De,"hasError"),r.createTrue()))],!0));let $e;if(qe){const Me=r.createUniqueName("result");$e=r.createBlock([r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration(Me,void 0,void 0,a().createDisposeResourcesHelper(De))],2)),r.createIfStatement(Me,r.createExpressionStatement(r.createAwaitExpression(Me)))],!0)}else $e=r.createBlock([r.createExpressionStatement(a().createDisposeResourcesHelper(De))],!0);const et=r.createTryStatement(We,Nt,$e);return se.push(et),se}}function get(t){for(let r=0;r<t.length;r++)if(!I1(t[r])&&!rV(t[r]))return r;return 0}function yet(t){return Sf(t)&&nLe(t)!==0}function nLe(t){return(t.flags&7)===6?2:(t.flags&7)===4?1:0}function VRt(t){return nLe(t.declarationList)}function rLe(t){return Lu(t)?VRt(t):0}function Jue(t){let r=0;for(const a of t){const u=rLe(a);if(u===2)return 2;u>r&&(r=u)}return r}function HRt(t){let r=0;for(const a of t){const u=Jue(a.statements);if(u===2)return 2;u>r&&(r=u)}return r}function sLe(t){const{factory:r,getEmitHelperFactory:a}=t,u=t.getCompilerOptions();let h,p;return q0(t,N);function g(){if(p.filenameDeclaration)return p.filenameDeclaration.name;const et=r.createVariableDeclaration(r.createUniqueName("_jsxFileName",48),void 0,void 0,r.createStringLiteral(h.fileName));return p.filenameDeclaration=et,p.filenameDeclaration.name}function C(et){return u.jsx===5?"jsxDEV":et?"jsxs":"jsx"}function b(et){const Me=C(et);return E(Me)}function T(){return E("Fragment")}function E(et){var Me,ut;const wt=et==="createElement"?p.importSpecifier:HK(p.importSpecifier,u),Et=(ut=(Me=p.utilizedImplicitRuntimeImports)==null?void 0:Me.get(wt))==null?void 0:ut.get(et);if(Et)return Et.name;p.utilizedImplicitRuntimeImports||(p.utilizedImplicitRuntimeImports=new Map);let dt=p.utilizedImplicitRuntimeImports.get(wt);dt||(dt=new Map,p.utilizedImplicitRuntimeImports.set(wt,dt));const zt=r.createUniqueName(`_${et}`,112),Ei=r.createImportSpecifier(!1,r.createIdentifier(et),zt);return CEe(zt,Ei),dt.set(et,Ei),zt}function N(et){if(et.isDeclarationFile)return et;h=et,p={},p.importSpecifier=VK(u,et);let Me=dn(et,R,t);Zb(Me,t.readEmitHelpers());let ut=Me.statements;if(p.filenameDeclaration&&(ut=_I(ut.slice(),r.createVariableStatement(void 0,r.createVariableDeclarationList([p.filenameDeclaration],2)))),p.utilizedImplicitRuntimeImports){for(const[wt,Et]of as(p.utilizedImplicitRuntimeImports.entries()))if(wd(et)){const dt=r.createImportDeclaration(void 0,r.createImportClause(!1,void 0,r.createNamedImports(as(Et.values()))),r.createStringLiteral(wt),void 0);Qb(dt,!1),ut=_I(ut.slice(),dt)}else if(Cp(et)){const dt=r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration(r.createObjectBindingPattern(as(Et.values(),zt=>r.createBindingElement(void 0,zt.propertyName,zt.name))),void 0,void 0,r.createCallExpression(r.createIdentifier("require"),void 0,[r.createStringLiteral(wt)]))],2));Qb(dt,!1),ut=_I(ut.slice(),dt)}}return ut!==Me.statements&&(Me=r.updateSourceFile(Me,ut)),p=void 0,Me}function R(et){return et.transformFlags&2?F(et):et}function F(et){switch(et.kind){case 284:return Z(et,!1);case 285:return Q(et,!1);case 288:return re(et,!1);case 294:return $e(et);default:return dn(et,R,t)}}function H(et){switch(et.kind){case 12:return Ne(et);case 294:return $e(et);case 284:return Z(et,!0);case 285:return Q(et,!0);case 288:return re(et,!0);default:return j.failBadSyntaxKind(et)}}function U(et){return et.properties.some(Me=>_d(Me)&&(ot(Me.name)&&Fr(Me.name)==="__proto__"||Ha(Me.name)&&Me.name.text==="__proto__"))}function q(et){let Me=!1;for(const ut of et.attributes.properties)if(GP(ut)&&(!Aa(ut.expression)||ut.expression.properties.some(Kv)))Me=!0;else if(Me&&U1(ut)&&ot(ut.name)&&ut.name.escapedText==="key")return!0;return!1}function X(et){return p.importSpecifier===void 0||q(et)}function Z(et,Me){return(X(et.openingElement)?Ie:de)(et.openingElement,et.children,Me,et)}function Q(et,Me){return(X(et)?Ie:de)(et,void 0,Me,et)}function re(et,Me){return(p.importSpecifier===void 0?he:we)(et.openingFragment,et.children,Me,et)}function oe(et){const Me=pe(et);return Me&&r.createObjectLiteralExpression([Me])}function pe(et){const Me=r3(et);if(P(Me)===1&&!Me[0].dotDotDotToken){const wt=H(Me[0]);return wt&&r.createPropertyAssignment("children",wt)}const ut=es(et,H);return P(ut)?r.createPropertyAssignment("children",r.createArrayLiteralExpression(ut)):void 0}function de(et,Me,ut,wt){const Et=ze(et),dt=Me&&Me.length?pe(Me):void 0,zt=Fe(et.attributes.properties,xn=>!!xn.name&&ot(xn.name)&&xn.name.escapedText==="key"),Ei=zt?$t(et.attributes.properties,xn=>xn!==zt):et.attributes.properties,tn=P(Ei)?ke(Ei,dt):r.createObjectLiteralExpression(dt?[dt]:w);return ue(Et,tn,zt,Me||w,ut,wt)}function ue(et,Me,ut,wt,Et,dt){var zt;const Ei=r3(wt),tn=P(Ei)>1||!!((zt=Ei[0])!=null&&zt.dotDotDotToken),xn=[et,Me];if(ut&&xn.push(se(ut.initializer)),u.jsx===5){const _i=Ql(h);if(_i&&Os(_i)){ut===void 0&&xn.push(r.createVoidZero()),xn.push(tn?r.createTrue():r.createFalse());const Fi=Ia(_i,dt.pos);xn.push(r.createObjectLiteralExpression([r.createPropertyAssignment("fileName",g()),r.createPropertyAssignment("lineNumber",r.createNumericLiteral(Fi.line+1)),r.createPropertyAssignment("columnNumber",r.createNumericLiteral(Fi.character+1))])),xn.push(r.createThis())}}const Pn=Ht(r.createCallExpression(b(tn),void 0,xn),dt);return Et&&bh(Pn),Pn}function Ie(et,Me,ut,wt){const Et=ze(et),dt=et.attributes.properties,zt=P(dt)?ke(dt):r.createNull(),Ei=p.importSpecifier===void 0?Ile(r,t.getEmitResolver().getJsxFactoryEntity(h),u.reactNamespace,et):E("createElement"),tn=tIe(r,Ei,Et,zt,es(Me,H),wt);return ut&&bh(tn),tn}function we(et,Me,ut,wt){let Et;if(Me&&Me.length){const dt=oe(Me);dt&&(Et=dt)}return ue(T(),Et||r.createObjectLiteralExpression([]),void 0,Me,ut,wt)}function he(et,Me,ut,wt){const Et=iIe(r,t.getEmitResolver().getJsxFactoryEntity(h),t.getEmitResolver().getJsxFragmentFactoryEntity(h),u.reactNamespace,es(Me,H),et,wt);return ut&&bh(Et),Et}function Ae(et){return Aa(et.expression)&&!U(et.expression)?Wr(et.expression.properties,Me=>j.checkDefined(bt(Me,R,Ub))):r.createSpreadAssignment(j.checkDefined(bt(et.expression,R,jt)))}function ke(et,Me){const ut=Ja(u);return ut&&ut>=5?r.createObjectLiteralExpression(Te(et,Me)):De(et,Me)}function Te(et,Me){const ut=Dr(nm(et,GP,(wt,Et)=>Dr(qt(wt,dt=>Et?Ae(dt):qe(dt)))));return Me&&ut.push(Me),ut}function De(et,Me){const ut=[];let wt=[];for(const dt of et){if(GP(dt)){if(Aa(dt.expression)&&!U(dt.expression)){for(const zt of dt.expression.properties){if(Kv(zt)){Et(),ut.push(j.checkDefined(bt(zt.expression,R,jt)));continue}wt.push(j.checkDefined(bt(zt,R)))}continue}Et(),ut.push(j.checkDefined(bt(dt.expression,R,jt)));continue}wt.push(qe(dt))}return Me&&wt.push(Me),Et(),ut.length&&!Aa(ut[0])&&ut.unshift(r.createObjectLiteralExpression()),Bm(ut)||a().createAssignHelper(ut);function Et(){wt.length&&(ut.push(r.createObjectLiteralExpression(wt)),wt=[])}}function qe(et){const Me=Nt(et),ut=se(et.initializer);return r.createPropertyAssignment(Me,ut)}function se(et){if(et===void 0)return r.createTrue();if(et.kind===11){const Me=et.singleQuote!==void 0?et.singleQuote:!tK(et,h),ut=r.createStringLiteral(We(et.text)||et.text,Me);return Ht(ut,et)}return et.kind===294?et.expression===void 0?r.createTrue():j.checkDefined(bt(et.expression,R,jt)):Gv(et)?Z(et,!1):PI(et)?Q(et,!1):aD(et)?re(et,!1):j.failBadSyntaxKind(et)}function Ne(et){const Me=Oe(et.text);return Me===void 0?void 0:r.createStringLiteral(Me)}function Oe(et){let Me,ut=0,wt=-1;for(let Et=0;Et<et.length;Et++){const dt=et.charCodeAt(Et);mh(dt)?(ut!==-1&&wt!==-1&&(Me=He(Me,et.substr(ut,wt-ut+1))),ut=-1):k1(dt)||(wt=Et,ut===-1&&(ut=Et))}return ut!==-1?He(Me,et.substr(ut)):Me}function He(et,Me){const ut=Pe(Me);return et===void 0?ut:et+" "+ut}function Pe(et){return et.replace(/&((#((\d+)|x([\da-fA-F]+)))|(\w+));/g,(Me,ut,wt,Et,dt,zt,Ei)=>{if(dt)return d8(parseInt(dt,10));if(zt)return d8(parseInt(zt,16));{const tn=jRt.get(Ei);return tn?d8(tn):Me}})}function We(et){const Me=Pe(et);return Me===et?void 0:Me}function ze(et){if(et.kind===284)return ze(et.openingElement);{const Me=et.tagName;return ot(Me)&&s3(Me.escapedText)?r.createStringLiteral(Fr(Me)):j0(Me)?r.createStringLiteral(Fr(Me.namespace)+":"+Fr(Me.name)):yH(r,Me)}}function Nt(et){const Me=et.name;if(ot(Me)){const ut=Fr(Me);return/^[A-Z_]\w*$/i.test(ut)?Me:r.createStringLiteral(ut)}return r.createStringLiteral(Fr(Me.namespace)+":"+Fr(Me.name))}function $e(et){const Me=bt(et.expression,R,jt);return et.dotDotDotToken?r.createSpreadElement(Me):Me}}var jRt=new Map(Object.entries({quot:34,amp:38,apos:39,lt:60,gt:62,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,copy:169,ordf:170,laquo:171,not:172,shy:173,reg:174,macr:175,deg:176,plusmn:177,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,sup1:185,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,Agrave:192,Aacute:193,Acirc:194,Atilde:195,Auml:196,Aring:197,AElig:198,Ccedil:199,Egrave:200,Eacute:201,Ecirc:202,Euml:203,Igrave:204,Iacute:205,Icirc:206,Iuml:207,ETH:208,Ntilde:209,Ograve:210,Oacute:211,Ocirc:212,Otilde:213,Ouml:214,times:215,Oslash:216,Ugrave:217,Uacute:218,Ucirc:219,Uuml:220,Yacute:221,THORN:222,szlig:223,agrave:224,aacute:225,acirc:226,atilde:227,auml:228,aring:229,aelig:230,ccedil:231,egrave:232,eacute:233,ecirc:234,euml:235,igrave:236,iacute:237,icirc:238,iuml:239,eth:240,ntilde:241,ograve:242,oacute:243,ocirc:244,otilde:245,ouml:246,divide:247,oslash:248,ugrave:249,uacute:250,ucirc:251,uuml:252,yacute:253,thorn:254,yuml:255,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830}));function oLe(t){const{factory:r,hoistVariableDeclaration:a}=t;return q0(t,u);function u(b){return b.isDeclarationFile?b:dn(b,h,t)}function h(b){if(!(b.transformFlags&512))return b;switch(b.kind){case 226:return p(b);default:return dn(b,h,t)}}function p(b){switch(b.operatorToken.kind){case 68:return g(b);case 43:return C(b);default:return dn(b,h,t)}}function g(b){let T,E;const N=bt(b.left,h,jt),R=bt(b.right,h,jt);if(wl(N)){const F=r.createTempVariable(a),H=r.createTempVariable(a);T=Ht(r.createElementAccessExpression(Ht(r.createAssignment(F,N.expression),N.expression),Ht(r.createAssignment(H,N.argumentExpression),N.argumentExpression)),N),E=Ht(r.createElementAccessExpression(F,H),N)}else if(Nr(N)){const F=r.createTempVariable(a);T=Ht(r.createPropertyAccessExpression(Ht(r.createAssignment(F,N.expression),N.expression),N.name),N),E=Ht(r.createPropertyAccessExpression(F,N.name),N)}else T=N,E=N;return Ht(r.createAssignment(T,Ht(r.createGlobalMethodCall("Math","pow",[E,R]),b)),b)}function C(b){const T=bt(b.left,h,jt),E=bt(b.right,h,jt);return Ht(r.createGlobalMethodCall("Math","pow",[T,E]),b)}}function vet(t,r){return{kind:t,expression:r}}function aLe(t){const{factory:r,getEmitHelperFactory:a,startLexicalEnvironment:u,resumeLexicalEnvironment:h,endLexicalEnvironment:p,hoistVariableDeclaration:g}=t,C=t.getCompilerOptions(),b=t.getEmitResolver(),T=t.onSubstituteNode,E=t.onEmitNode;t.onEmitNode=Y_,t.onSubstituteNode=tg;let N,R,F,H;function U(ve){H=fn(H,r.createVariableDeclaration(ve))}let q,X;return q0(t,Z);function Z(ve){if(ve.isDeclarationFile)return ve;N=ve,R=ve.text;const Ot=ke(ve);return Zb(Ot,t.readEmitHelpers()),N=void 0,R=void 0,H=void 0,F=0,Ot}function Q(ve,Ot){const mi=F;return F=(F&~ve|Ot)&32767,mi}function re(ve,Ot,mi){F=(F&~Ot|mi)&-32768|ve}function oe(ve){return(F&8192)!==0&&ve.kind===253&&!ve.expression}function pe(ve){return ve.transformFlags&4194304&&(Og(ve)||r2(ve)||WEe(ve)||S7(ve)||w7(ve)||x3(ve)||k7(ve)||NI(ve)||lD(ve)||_x(ve)||Zw(ve,!1)||Xo(ve))}function de(ve){return(ve.transformFlags&1024)!==0||q!==void 0||F&8192&&pe(ve)||Zw(ve,!1)&&Ls(ve)||(u0(ve)&1)!==0}function ue(ve){return de(ve)?Ae(ve,!1):ve}function Ie(ve){return de(ve)?Ae(ve,!0):ve}function we(ve){if(de(ve)){const Ot=Ql(ve);if(Lo(Ot)&&bd(Ot)){const mi=Q(32670,16449),Ci=Ae(ve,!1);return re(mi,229376,0),Ci}return Ae(ve,!1)}return ve}function he(ve){return ve.kind===108?Ap(ve,!0):ue(ve)}function Ae(ve,Ot){switch(ve.kind){case 126:return;case 263:return ze(ve);case 231:return Nt(ve);case 169:return ka(ve);case 262:return ji(ve);case 219:return vt(ve);case 218:return Ni(ve);case 260:return Un(ve);case 80:return Pe(ve);case 261:return st(ve);case 255:return Te(ve);case 269:return De(ve);case 241:return tt(ve);case 252:case 251:return We(ve);case 256:return fi(ve);case 246:case 247:return Ai(ve,void 0);case 248:return Xn(ve,void 0);case 249:return on(ve,void 0);case 250:return zi(ve,void 0);case 244:return Gt(ve);case 210:return $o(ve);case 299:return ds(ve);case 304:return Pu(ve);case 167:return Ku(ve);case 209:return Wl(ve);case 213:return Cu(ve);case 214:return kd(ve);case 217:return le(ve,Ot);case 226:return Ue(ve,Ot);case 355:return be(ve,Ot);case 15:case 16:case 17:case 18:return sc(ve);case 11:return Hu(ve);case 9:return Hd(ve);case 215:return Yc(ve);case 228:return Pc(ve);case 229:return Xu(ve);case 230:return ic(ve);case 108:return Ap(ve,!1);case 110:return Oe(ve);case 236:return Vg(ve);case 174:return Ic(ve);case 177:case 178:return Gl(ve);case 243:return lt(ve);case 253:return Ne(ve);case 222:return He(ve);default:return dn(ve,ue,t)}}function ke(ve){const Ot=Q(8064,64),mi=[],Ci=[];u();const hn=r.copyPrologue(ve.statements,mi,!1,ue);return Sr(Ci,Dn(ve.statements,ue,Ps,hn)),H&&Ci.push(r.createVariableStatement(void 0,r.createVariableDeclarationList(H))),r.mergeLexicalEnvironment(mi,p()),Se(mi,ve),re(Ot,0,0),r.updateSourceFile(ve,Ht(r.createNodeArray(Js(mi,Ci)),ve.statements))}function Te(ve){if(q!==void 0){const Ot=q.allowedNonLabeledJumps;q.allowedNonLabeledJumps|=2;const mi=dn(ve,ue,t);return q.allowedNonLabeledJumps=Ot,mi}return dn(ve,ue,t)}function De(ve){const Ot=Q(7104,0),mi=dn(ve,ue,t);return re(Ot,0,0),mi}function qe(ve){return Ir(r.createReturnStatement(se()),ve)}function se(){return r.createUniqueName("_this",48)}function Ne(ve){return q?(q.nonLocalJumps|=8,oe(ve)&&(ve=qe(ve)),r.createReturnStatement(r.createObjectLiteralExpression([r.createPropertyAssignment(r.createIdentifier("value"),ve.expression?j.checkDefined(bt(ve.expression,ue,jt)):r.createVoidZero())]))):oe(ve)?qe(ve):dn(ve,ue,t)}function Oe(ve){return F|=65536,F&2&&!(F&16384)&&(F|=131072),q?F&2?(q.containsLexicalThis=!0,ve):q.thisName||(q.thisName=r.createUniqueName("this")):ve}function He(ve){return dn(ve,Ie,t)}function Pe(ve){return q&&b.isArgumentsLocalBinding(ve)?q.argumentsName||(q.argumentsName=r.createUniqueName("arguments")):ve.flags&256?Ir(Ht(r.createIdentifier(Ws(ve.escapedText)),ve),ve):ve}function We(ve){if(q){const Ot=ve.kind===252?2:4;if(!(ve.label&&q.labels&&q.labels.get(Fr(ve.label))||!ve.label&&q.allowedNonLabeledJumps&Ot)){let Ci;const hn=ve.label;hn?ve.kind===252?(Ci=`break-${hn.escapedText}`,Lt(q,!0,Fr(hn),Ci)):(Ci=`continue-${hn.escapedText}`,Lt(q,!1,Fr(hn),Ci)):ve.kind===252?(q.nonLocalJumps|=2,Ci="break"):(q.nonLocalJumps|=4,Ci="continue");let Wn=r.createStringLiteral(Ci);if(q.loopOutParameters.length){const Lr=q.loopOutParameters;let ps;for(let ee=0;ee<Lr.length;ee++){const Xe=Pp(Lr[ee],1);ee===0?ps=Xe:ps=r.createBinaryExpression(ps,28,Xe)}Wn=r.createBinaryExpression(ps,28,Wn)}return r.createReturnStatement(Wn)}}return dn(ve,ue,t)}function ze(ve){const Ot=r.createVariableDeclaration(r.getLocalName(ve,!0),void 0,void 0,$e(ve));Ir(Ot,ve);const mi=[],Ci=r.createVariableStatement(void 0,r.createVariableDeclarationList([Ot]));if(Ir(Ci,ve),Ht(Ci,ve),bh(Ci),mi.push(Ci),Zr(ve,32)){const hn=Zr(ve,2048)?r.createExportDefault(r.getLocalName(ve)):r.createExternalModuleExport(r.getLocalName(ve));Ir(hn,Ci),mi.push(hn)}return Sg(mi)}function Nt(ve){return $e(ve)}function $e(ve){ve.name&&Jp();const Ot=qT(ve),mi=r.createFunctionExpression(void 0,void 0,void 0,void 0,Ot?[r.createParameterDeclaration(void 0,void 0,od())]:[],void 0,et(ve,Ot));tr(mi,Ya(ve)&131072|1048576);const Ci=r.createPartiallyEmittedExpression(mi);m3(Ci,ve.end),tr(Ci,3072);const hn=r.createPartiallyEmittedExpression(Ci);m3(hn,Va(R,ve.pos)),tr(hn,3072);const Wn=r.createParenthesizedExpression(r.createCallExpression(hn,void 0,Ot?[j.checkDefined(bt(Ot.expression,ue,jt))]:[]));return h7(Wn,3,"* @class "),Wn}function et(ve,Ot){const mi=[],Ci=r.getInternalName(ve),hn=Qae(Ci)?r.getGeneratedNameForNode(Ci):Ci;u(),Me(mi,ve,Ot),ut(mi,ve,hn,Ot),Dt(mi,ve);const Wn=bce(Va(R,ve.members.end),20),Lr=r.createPartiallyEmittedExpression(hn);m3(Lr,Wn.end),tr(Lr,3072);const ps=r.createReturnStatement(Lr);o7(ps,Wn.pos),tr(ps,3840),mi.push(ps),Fv(mi,p());const ee=r.createBlock(Ht(r.createNodeArray(mi),ve.members),!0);return tr(ee,3072),ee}function Me(ve,Ot,mi){mi&&ve.push(Ht(r.createExpressionStatement(a().createExtendsHelper(r.getInternalName(Ot))),mi))}function ut(ve,Ot,mi,Ci){const hn=q;q=void 0;const Wn=Q(32662,73),Lr=Vv(Ot),ps=vm(Lr,Ci!==void 0),ee=r.createFunctionDeclaration(void 0,void 0,mi,void 0,wt(Lr,ps),void 0,Ei(Lr,Ot,Ci,ps));Ht(ee,Lr||Ot),Ci&&tr(ee,16),ve.push(ee),re(Wn,229376,0),q=hn}function wt(ve,Ot){return yu(ve&&!Ot?ve.parameters:void 0,ue,t)||[]}function Et(ve,Ot){const mi=[];h(),r.mergeLexicalEnvironment(mi,p()),Ot&&mi.push(r.createReturnStatement(ma()));const Ci=r.createNodeArray(mi);Ht(Ci,ve.members);const hn=r.createBlock(Ci,!0);return Ht(hn,ve),tr(hn,3072),hn}function dt(ve){return Lu(ve)&&Ce(ve.declarationList.declarations,Ot=>ot(Ot.name)&&!Ot.initializer)}function zt(ve){if(mI(ve))return!0;if(!(ve.transformFlags&134217728))return!1;switch(ve.kind){case 219:case 218:case 262:case 176:case 175:return!1;case 177:case 178:case 174:case 172:{const Ot=ve;return Ka(Ot.name)?!!Uo(Ot.name,zt):!1}}return!!Uo(ve,zt)}function Ei(ve,Ot,mi,Ci){const hn=!!mi&&Vu(mi.expression).kind!==106;if(!ve)return Et(Ot,hn);const Wn=[],Lr=[];h();const ps=r.copyStandardPrologue(ve.body.statements,Wn,0);(Ci||zt(ve.body))&&(F|=8192),Sr(Lr,Dn(ve.body.statements,ue,Ps,ps));const ee=hn||F&8192;ac(Wn,ve),pt(Wn,ve,Ci),gt(Wn,ve),ee?Ze(Wn,ve,Gs()):Se(Wn,ve),r.mergeLexicalEnvironment(Wn,p()),ee&&!Xr(ve.body)&&Lr.push(r.createReturnStatement(se()));const Xe=r.createBlock(Ht(r.createNodeArray([...Wn,...Lr]),ve.body.statements),!0);return Ht(Xe,ve.body),us(Xe,ve.body,Ci)}function tn(ve){return zl(ve)&&Fr(ve)==="_this"}function xn(ve){return zl(ve)&&Fr(ve)==="_super"}function Pn(ve){return Lu(ve)&&ve.declarationList.declarations.length===1&&_i(ve.declarationList.declarations[0])}function _i(ve){return _s(ve)&&tn(ve.name)&&!!ve.initializer}function Fi(ve){return lf(ve,!0)&&tn(ve.left)}function On(ve){return la(ve)&&Nr(ve.expression)&&xn(ve.expression.expression)&&ot(ve.expression.name)&&(Fr(ve.expression.name)==="call"||Fr(ve.expression.name)==="apply")&&ve.arguments.length>=1&&ve.arguments[0].kind===110}function pn(ve){return ur(ve)&&ve.operatorToken.kind===57&&ve.right.kind===110&&On(ve.left)}function qr(ve){return ur(ve)&&ve.operatorToken.kind===56&&ur(ve.left)&&ve.left.operatorToken.kind===38&&xn(ve.left.left)&&ve.left.right.kind===106&&On(ve.right)&&Fr(ve.right.expression.name)==="apply"}function Fs(ve){return ur(ve)&&ve.operatorToken.kind===57&&ve.right.kind===110&&qr(ve.left)}function ko(ve){return Fi(ve)&&pn(ve.right)}function ls(ve){return Fi(ve)&&Fs(ve.right)}function Qs(ve){return On(ve)||pn(ve)||ko(ve)||qr(ve)||Fs(ve)||ls(ve)}function Mn(ve){for(let Ot=0;Ot<ve.statements.length-1;Ot++){const mi=ve.statements[Ot];if(!Pn(mi))continue;const Ci=mi.declarationList.declarations[0];if(Ci.initializer.kind!==110)continue;const hn=Ot;let Wn=Ot+1;for(;Wn<ve.statements.length;){const Is=ve.statements[Wn];if(uf(Is)&&Qs(Vu(Is.expression)))break;if(dt(Is)){Wn++;continue}return ve}const Lr=ve.statements[Wn];let ps=Lr.expression;Fi(ps)&&(ps=ps.right);const ee=r.updateVariableDeclaration(Ci,Ci.name,void 0,void 0,ps),Xe=r.updateVariableDeclarationList(mi.declarationList,[ee]),Zt=r.createVariableStatement(mi.modifiers,Xe);Ir(Zt,Lr),Ht(Zt,Lr);const Nn=r.createNodeArray([...ve.statements.slice(0,hn),...ve.statements.slice(hn+1,Wn),Zt,...ve.statements.slice(Wn+1)]);return Ht(Nn,ve.statements),r.updateBlock(ve,Nn)}return ve}function Zs(ve,Ot){for(const Ci of Ot.statements)if(Ci.transformFlags&134217728&&!yQ(Ci))return ve;const mi=!(Ot.transformFlags&16384)&&!(F&65536)&&!(F&131072);for(let Ci=ve.statements.length-1;Ci>0;Ci--){const hn=ve.statements[Ci];if(Og(hn)&&hn.expression&&tn(hn.expression)){const Wn=ve.statements[Ci-1];let Lr;if(uf(Wn)&&ko(Vu(Wn.expression)))Lr=Wn.expression;else if(mi&&Pn(Wn)){const Xe=Wn.declarationList.declarations[0];Qs(Vu(Xe.initializer))&&(Lr=r.createAssignment(se(),Xe.initializer))}if(!Lr)break;const ps=r.createReturnStatement(Lr);Ir(ps,Wn),Ht(ps,Wn);const ee=r.createNodeArray([...ve.statements.slice(0,Ci-1),ps,...ve.statements.slice(Ci+1)]);return Ht(ee,ve.statements),r.updateBlock(ve,ee)}}return ve}function at(ve){if(Pn(ve)){if(ve.declarationList.declarations[0].initializer.kind===110)return}else if(Fi(ve))return r.createPartiallyEmittedExpression(ve.right,ve);switch(ve.kind){case 219:case 218:case 262:case 176:case 175:return ve;case 177:case 178:case 174:case 172:{const Ot=ve;return Ka(Ot.name)?r.replacePropertyName(Ot,dn(Ot.name,at,void 0)):ve}}return dn(ve,at,void 0)}function yi(ve,Ot){if(Ot.transformFlags&16384||F&65536||F&131072)return ve;for(const mi of Ot.statements)if(mi.transformFlags&134217728&&!yQ(mi))return ve;return r.updateBlock(ve,Dn(ve.statements,at,Ps))}function Sn(ve){if(On(ve)&&ve.arguments.length===2&&ot(ve.arguments[1])&&Fr(ve.arguments[1])==="arguments")return r.createLogicalAnd(r.createStrictInequality(od(),r.createNull()),ve);switch(ve.kind){case 219:case 218:case 262:case 176:case 175:return ve;case 177:case 178:case 174:case 172:{const Ot=ve;return Ka(Ot.name)?r.replacePropertyName(Ot,dn(Ot.name,Sn,void 0)):ve}}return dn(ve,Sn,void 0)}function dr(ve){return r.updateBlock(ve,Dn(ve.statements,Sn,Ps))}function us(ve,Ot,mi){const Ci=ve;return ve=Mn(ve),ve=Zs(ve,Ot),ve!==Ci&&(ve=yi(ve,Ot)),mi&&(ve=dr(ve)),ve}function Xr(ve){if(ve.kind===253)return!0;if(ve.kind===245){const Ot=ve;if(Ot.elseStatement)return Xr(Ot.thenStatement)&&Xr(Ot.elseStatement)}else if(ve.kind===241){const Ot=rl(ve.statements);if(Ot&&Xr(Ot))return!0}return!1}function Gs(){return tr(r.createThis(),8)}function ma(){return r.createLogicalOr(r.createLogicalAnd(r.createStrictInequality(od(),r.createNull()),r.createFunctionApplyCall(od(),Gs(),r.createIdentifier("arguments"))),Gs())}function ka(ve){if(!ve.dotDotDotToken)return ta(ve.name)?Ir(Ht(r.createParameterDeclaration(void 0,void 0,r.getGeneratedNameForNode(ve),void 0,void 0,void 0),ve),ve):ve.initializer?Ir(Ht(r.createParameterDeclaration(void 0,void 0,ve.name,void 0,void 0,void 0),ve),ve):ve}function Ji(ve){return ve.initializer!==void 0||ta(ve.name)}function ac(ve,Ot){if(!Ft(Ot.parameters,Ji))return!1;let mi=!1;for(const Ci of Ot.parameters){const{name:hn,initializer:Wn,dotDotDotToken:Lr}=Ci;Lr||(ta(hn)?mi=St(ve,Ci,hn,Wn)||mi:Wn&&(ri(ve,Ci,hn,Wn),mi=!0))}return mi}function St(ve,Ot,mi,Ci){return mi.elements.length>0?(_I(ve,tr(r.createVariableStatement(void 0,r.createVariableDeclarationList(hD(Ot,ue,t,0,r.getGeneratedNameForNode(Ot)))),2097152)),!0):Ci?(_I(ve,tr(r.createExpressionStatement(r.createAssignment(r.getGeneratedNameForNode(Ot),j.checkDefined(bt(Ci,ue,jt)))),2097152)),!0):!1}function ri(ve,Ot,mi,Ci){Ci=j.checkDefined(bt(Ci,ue,jt));const hn=r.createIfStatement(r.createTypeCheck(r.cloneNode(mi),"undefined"),tr(Ht(r.createBlock([r.createExpressionStatement(tr(Ht(r.createAssignment(tr(_c(Ht(r.cloneNode(mi),mi),mi.parent),96),tr(Ci,96|Ya(Ci)|3072)),Ot),3072))]),Ot),3905));bh(hn),Ht(hn,Ot),tr(hn,2101056),_I(ve,hn)}function xe(ve,Ot){return!!(ve&&ve.dotDotDotToken&&!Ot)}function pt(ve,Ot,mi){const Ci=[],hn=rl(Ot.parameters);if(!xe(hn,mi))return!1;const Wn=hn.name.kind===80?_c(Ht(r.cloneNode(hn.name),hn.name),hn.name.parent):r.createTempVariable(void 0);tr(Wn,96);const Lr=hn.name.kind===80?r.cloneNode(hn.name):Wn,ps=Ot.parameters.length-1,ee=r.createLoopVariable();Ci.push(tr(Ht(r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration(Wn,void 0,void 0,r.createArrayLiteralExpression([]))])),hn),2097152));const Xe=r.createForStatement(Ht(r.createVariableDeclarationList([r.createVariableDeclaration(ee,void 0,void 0,r.createNumericLiteral(ps))]),hn),Ht(r.createLessThan(ee,r.createPropertyAccessExpression(r.createIdentifier("arguments"),"length")),hn),Ht(r.createPostfixIncrement(ee),hn),r.createBlock([bh(Ht(r.createExpressionStatement(r.createAssignment(r.createElementAccessExpression(Lr,ps===0?ee:r.createSubtract(ee,r.createNumericLiteral(ps))),r.createElementAccessExpression(r.createIdentifier("arguments"),ee))),hn))]));return tr(Xe,2097152),bh(Xe),Ci.push(Xe),hn.name.kind!==80&&Ci.push(tr(Ht(r.createVariableStatement(void 0,r.createVariableDeclarationList(hD(hn,ue,t,0,Lr))),hn),2097152)),mae(ve,Ci),!0}function Se(ve,Ot){return F&131072&&Ot.kind!==219?(Ze(ve,Ot,r.createThis()),!0):!1}function Ze(ve,Ot,mi){ym();const Ci=r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration(se(),void 0,void 0,mi)]));tr(Ci,2100224),Ga(Ci,Ot),_I(ve,Ci)}function gt(ve,Ot){if(F&32768){let mi;switch(Ot.kind){case 219:return ve;case 174:case 177:case 178:mi=r.createVoidZero();break;case 176:mi=r.createPropertyAccessExpression(tr(r.createThis(),8),"constructor");break;case 262:case 218:mi=r.createConditionalExpression(r.createLogicalAnd(tr(r.createThis(),8),r.createBinaryExpression(tr(r.createThis(),8),104,r.getLocalName(Ot))),void 0,r.createPropertyAccessExpression(tr(r.createThis(),8),"constructor"),void 0,r.createVoidZero());break;default:return j.failBadSyntaxKind(Ot)}const Ci=r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration(r.createUniqueName("_newTarget",48),void 0,void 0,mi)]));tr(Ci,2100224),_I(ve,Ci)}return ve}function Dt(ve,Ot){for(const mi of Ot.members)switch(mi.kind){case 240:ve.push(Je(mi));break;case 174:ve.push(Rt(Yv(Ot,mi),mi,Ot));break;case 177:case 178:const Ci=nx(Ot.members,mi);mi===Ci.firstAccessor&&ve.push(Ct(Yv(Ot,mi),Ci,Ot));break;case 176:case 175:break;default:j.failBadSyntaxKind(mi,N&&N.fileName);break}}function Je(ve){return Ht(r.createEmptyStatement(),ve)}function Rt(ve,Ot,mi){const Ci=B1(Ot),hn=yS(Ot),Wn=gr(Ot,Ot,void 0,mi),Lr=bt(Ot.name,ue,id);j.assert(Lr);let ps;if(!Vs(Lr)&&GV(t.getCompilerOptions())){const Xe=Ka(Lr)?Lr.expression:ot(Lr)?r.createStringLiteral(Ws(Lr.escapedText)):Lr;ps=r.createObjectDefinePropertyCall(ve,Xe,r.createPropertyDescriptor({value:Wn,enumerable:!1,writable:!0,configurable:!0}))}else{const Xe=RI(r,ve,Lr,Ot.name);ps=r.createAssignment(Xe,Wn)}tr(Wn,3072),Ga(Wn,hn);const ee=Ht(r.createExpressionStatement(ps),Ot);return Ir(ee,Ot),Sd(ee,Ci),tr(ee,96),ee}function Ct(ve,Ot,mi){const Ci=r.createExpressionStatement(ii(ve,Ot,mi,!1));return tr(Ci,3072),Ga(Ci,yS(Ot.firstAccessor)),Ci}function ii(ve,{firstAccessor:Ot,getAccessor:mi,setAccessor:Ci},hn,Wn){const Lr=_c(Ht(r.cloneNode(ve),ve),ve.parent);tr(Lr,3136),Ga(Lr,Ot.name);const ps=bt(Ot.name,ue,id);if(j.assert(ps),Vs(ps))return j.failBadSyntaxKind(ps,"Encountered unhandled private identifier while transforming ES2015.");const ee=Lle(r,ps);tr(ee,3104),Ga(ee,Ot.name);const Xe=[];if(mi){const Nn=gr(mi,void 0,void 0,hn);Ga(Nn,yS(mi)),tr(Nn,1024);const Is=r.createPropertyAssignment("get",Nn);Sd(Is,B1(mi)),Xe.push(Is)}if(Ci){const Nn=gr(Ci,void 0,void 0,hn);Ga(Nn,yS(Ci)),tr(Nn,1024);const Is=r.createPropertyAssignment("set",Nn);Sd(Is,B1(Ci)),Xe.push(Is)}Xe.push(r.createPropertyAssignment("enumerable",mi||Ci?r.createFalse():r.createTrue()),r.createPropertyAssignment("configurable",r.createTrue()));const Zt=r.createCallExpression(r.createPropertyAccessExpression(r.createIdentifier("Object"),"defineProperty"),void 0,[Lr,ee,r.createObjectLiteralExpression(Xe,!0)]);return Wn&&bh(Zt),Zt}function vt(ve){ve.transformFlags&16384&&!(F&16384)&&(F|=131072);const Ot=q;q=void 0;const mi=Q(15232,66),Ci=r.createFunctionExpression(void 0,void 0,void 0,void 0,yu(ve.parameters,ue,t),void 0,te(ve));return Ht(Ci,ve),Ir(Ci,ve),tr(Ci,16),re(mi,0,0),q=Ot,Ci}function Ni(ve){const Ot=Ya(ve)&524288?Q(32662,69):Q(32670,65),mi=q;q=void 0;const Ci=yu(ve.parameters,ue,t),hn=te(ve),Wn=F&32768?r.getLocalName(ve):ve.name;return re(Ot,229376,0),q=mi,r.updateFunctionExpression(ve,void 0,ve.asteriskToken,Wn,void 0,Ci,void 0,hn)}function ji(ve){const Ot=q;q=void 0;const mi=Q(32670,65),Ci=yu(ve.parameters,ue,t),hn=te(ve),Wn=F&32768?r.getLocalName(ve):ve.name;return re(mi,229376,0),q=Ot,r.updateFunctionDeclaration(ve,Dn(ve.modifiers,ue,Fa),ve.asteriskToken,Wn,void 0,Ci,void 0,hn)}function gr(ve,Ot,mi,Ci){const hn=q;q=void 0;const Wn=Ci&&ss(Ci)&&!pa(ve)?Q(32670,73):Q(32670,65),Lr=yu(ve.parameters,ue,t),ps=te(ve);return F&32768&&!mi&&(ve.kind===262||ve.kind===218)&&(mi=r.getGeneratedNameForNode(ve)),re(Wn,229376,0),q=hn,Ir(Ht(r.createFunctionExpression(void 0,ve.asteriskToken,mi,void 0,Lr,void 0,ps),Ot),ve)}function te(ve){let Ot=!1,mi=!1,Ci,hn;const Wn=[],Lr=[],ps=ve.body;let ee;if(h(),Xo(ps)&&(ee=r.copyStandardPrologue(ps.statements,Wn,0,!1),ee=r.copyCustomPrologue(ps.statements,Lr,ee,ue,VG),ee=r.copyCustomPrologue(ps.statements,Lr,ee,ue,HG)),Ot=ac(Lr,ve)||Ot,Ot=pt(Lr,ve,!1)||Ot,Xo(ps))ee=r.copyCustomPrologue(ps.statements,Lr,ee,ue),Ci=ps.statements,Sr(Lr,Dn(ps.statements,ue,Ps,ee)),!Ot&&ps.multiLine&&(Ot=!0);else{j.assert(ve.kind===219),Ci=TK(ps,-1);const Zt=ve.equalsGreaterThanToken;!cl(Zt)&&!cl(ps)&&(zV(Zt,ps,N)?mi=!0:Ot=!0);const Nn=bt(ps,ue,jt),Is=r.createReturnStatement(Nn);Ht(Is,ps),pEe(Is,ps),tr(Is,2880),Lr.push(Is),hn=ps}if(r.mergeLexicalEnvironment(Wn,p()),gt(Wn,ve),Se(Wn,ve),Ft(Wn)&&(Ot=!0),Lr.unshift(...Wn),Xo(ps)&&i_(Lr,ps.statements))return ps;const Xe=r.createBlock(Ht(r.createNodeArray(Lr),Ci),Ot);return Ht(Xe,ve.body),!Ot&&mi&&tr(Xe,1),hn&&_Ee(Xe,20,hn),Ir(Xe,ve.body),Xe}function tt(ve,Ot){const mi=F&256?Q(7104,512):Q(6976,128),Ci=dn(ve,ue,t);return re(mi,0,0),Ci}function Gt(ve){return dn(ve,Ie,t)}function le(ve,Ot){return dn(ve,Ot?Ie:ue,t)}function Ue(ve,Ot){return pS(ve)?HI(ve,ue,t,0,!Ot):ve.operatorToken.kind===28?r.updateBinaryExpression(ve,j.checkDefined(bt(ve.left,Ie,jt)),ve.operatorToken,j.checkDefined(bt(ve.right,Ot?Ie:ue,jt))):dn(ve,ue,t)}function be(ve,Ot){if(Ot)return dn(ve,Ie,t);let mi;for(let hn=0;hn<ve.elements.length;hn++){const Wn=ve.elements[hn],Lr=bt(Wn,hn<ve.elements.length-1?Ie:ue,jt);(mi||Lr!==Wn)&&(mi||(mi=ve.elements.slice(0,hn)),j.assert(Lr),mi.push(Lr))}const Ci=mi?Ht(r.createNodeArray(mi),ve.elements):ve.elements;return r.updateCommaListExpression(ve,Ci)}function Qt(ve){return ve.declarationList.declarations.length===1&&!!ve.declarationList.declarations[0].initializer&&!!(u0(ve.declarationList.declarations[0].initializer)&1)}function lt(ve){const Ot=Q(0,Zr(ve,32)?32:0);let mi;if(q&&!(ve.declarationList.flags&7)&&!Qt(ve)){let Ci;for(const hn of ve.declarationList.declarations)if(wf(q,hn),hn.initializer){let Wn;ta(hn.name)?Wn=HI(hn,ue,t,0):(Wn=r.createBinaryExpression(hn.name,64,j.checkDefined(bt(hn.initializer,ue,jt))),Ht(Wn,hn)),Ci=fn(Ci,Wn)}Ci?mi=Ht(r.createExpressionStatement(r.inlineExpressions(Ci)),ve):mi=void 0}else mi=dn(ve,ue,t);return re(Ot,0,0),mi}function st(ve){if(ve.flags&7||ve.transformFlags&524288){ve.flags&7&&Jp();const Ot=Dn(ve.declarations,ve.flags&1?ln:Un,_s),mi=r.createVariableDeclarationList(Ot);return Ir(mi,ve),Ht(mi,ve),Sd(mi,ve),ve.transformFlags&524288&&(ta(ve.declarations[0].name)||ta(va(ve.declarations).name))&&Ga(mi,hi(Ot)),mi}return dn(ve,ue,t)}function hi(ve){let Ot=-1,mi=-1;for(const Ci of ve)Ot=Ot===-1?Ci.pos:Ci.pos===-1?Ot:Math.min(Ot,Ci.pos),mi=Math.max(mi,Ci.end);return Um(Ot,mi)}function vn(ve){const Ot=b.hasNodeCheckFlag(ve,16384),mi=b.hasNodeCheckFlag(ve,32768);return!((F&64)!==0||Ot&&mi&&(F&512)!==0)&&(F&4096)===0&&(!b.isDeclarationWithCollidingName(ve)||mi&&!Ot&&(F&6144)===0)}function ln(ve){const Ot=ve.name;return ta(Ot)?Un(ve):!ve.initializer&&vn(ve)?r.updateVariableDeclaration(ve,ve.name,void 0,void 0,r.createVoidZero()):dn(ve,ue,t)}function Un(ve){const Ot=Q(32,0);let mi;return ta(ve.name)?mi=hD(ve,ue,t,0,void 0,(Ot&32)!==0):mi=dn(ve,ue,t),re(Ot,0,0),mi}function Pt(ve){q.labels.set(Fr(ve.label),!0)}function Bt(ve){q.labels.set(Fr(ve.label),!1)}function fi(ve){q&&!q.labels&&(q.labels=new Map);const Ot=Oae(ve,q&&Pt);return Zw(Ot,!1)?wi(Ot,ve):r.restoreEnclosingLabel(bt(Ot,ue,Ps,r.liftToBlock)??Ht(r.createEmptyStatement(),Ot),ve,q&&Bt)}function wi(ve,Ot){switch(ve.kind){case 246:case 247:return Ai(ve,Ot);case 248:return Xn(ve,Ot);case 249:return on(ve,Ot);case 250:return zi(ve,Ot)}}function Ri(ve,Ot,mi,Ci,hn){const Wn=Q(ve,Ot),Lr=Jo(mi,Ci,Wn,hn);return re(Wn,0,0),Lr}function Ai(ve,Ot){return Ri(0,1280,ve,Ot)}function Xn(ve,Ot){return Ri(5056,3328,ve,Ot)}function Di(ve){return r.updateForStatement(ve,bt(ve.initializer,Ie,Hm),bt(ve.condition,ue,jt),bt(ve.incrementor,Ie,jt),j.checkDefined(bt(ve.statement,ue,Ps,r.liftToBlock)))}function on(ve,Ot){return Ri(3008,5376,ve,Ot)}function zi(ve,Ot){return Ri(3008,5376,ve,Ot,C.downlevelIteration?Wo:qo)}function cn(ve,Ot,mi){const Ci=[],hn=ve.initializer;if(Sf(hn)){ve.initializer.flags&7&&Jp();const Wn=Ra(hn.declarations);if(Wn&&ta(Wn.name)){const Lr=hD(Wn,ue,t,0,Ot),ps=Ht(r.createVariableDeclarationList(Lr),ve.initializer);Ir(ps,ve.initializer),Ga(ps,Um(Lr[0].pos,va(Lr).end)),Ci.push(r.createVariableStatement(void 0,ps))}else Ci.push(Ht(r.createVariableStatement(void 0,Ir(Ht(r.createVariableDeclarationList([r.createVariableDeclaration(Wn?Wn.name:r.createTempVariable(void 0),void 0,void 0,Ot)]),Zk(hn,-1)),hn)),TK(hn,-1)))}else{const Wn=r.createAssignment(hn,Ot);pS(Wn)?Ci.push(r.createExpressionStatement(Ue(Wn,!0))):(m3(Wn,hn.end),Ci.push(Ht(r.createExpressionStatement(j.checkDefined(bt(Wn,ue,jt))),TK(hn,-1))))}if(mi)return vi(Sr(Ci,mi));{const Wn=bt(ve.statement,ue,Ps,r.liftToBlock);return j.assert(Wn),Xo(Wn)?r.updateBlock(Wn,Ht(r.createNodeArray(Js(Ci,Wn.statements)),Wn.statements)):(Ci.push(Wn),vi(Ci))}}function vi(ve){return tr(r.createBlock(r.createNodeArray(ve),!0),864)}function qo(ve,Ot,mi){const Ci=bt(ve.expression,ue,jt);j.assert(Ci);const hn=r.createLoopVariable(),Wn=ot(Ci)?r.getGeneratedNameForNode(Ci):r.createTempVariable(void 0);tr(Ci,96|Ya(Ci));const Lr=Ht(r.createForStatement(tr(Ht(r.createVariableDeclarationList([Ht(r.createVariableDeclaration(hn,void 0,void 0,r.createNumericLiteral(0)),Zk(ve.expression,-1)),Ht(r.createVariableDeclaration(Wn,void 0,void 0,Ci),ve.expression)]),ve.expression),4194304),Ht(r.createLessThan(hn,r.createPropertyAccessExpression(Wn,"length")),ve.expression),Ht(r.createPostfixIncrement(hn),ve.expression),cn(ve,r.createElementAccessExpression(Wn,hn),mi)),ve);return tr(Lr,512),Ht(Lr,ve),r.restoreEnclosingLabel(Lr,Ot,q&&Bt)}function Wo(ve,Ot,mi,Ci){const hn=bt(ve.expression,ue,jt);j.assert(hn);const Wn=ot(hn)?r.getGeneratedNameForNode(hn):r.createTempVariable(void 0),Lr=ot(hn)?r.getGeneratedNameForNode(Wn):r.createTempVariable(void 0),ps=r.createUniqueName("e"),ee=r.getGeneratedNameForNode(ps),Xe=r.createTempVariable(void 0),Zt=Ht(a().createValuesHelper(hn),ve.expression),Nn=r.createCallExpression(r.createPropertyAccessExpression(Wn,"next"),void 0,[]);g(ps),g(Xe);const Is=Ci&1024?r.inlineExpressions([r.createAssignment(ps,r.createVoidZero()),Zt]):Zt,Qo=tr(Ht(r.createForStatement(tr(Ht(r.createVariableDeclarationList([Ht(r.createVariableDeclaration(Wn,void 0,void 0,Is),ve.expression),r.createVariableDeclaration(Lr,void 0,void 0,Nn)]),ve.expression),4194304),r.createLogicalNot(r.createPropertyAccessExpression(Lr,"done")),r.createAssignment(Lr,Nn),cn(ve,r.createPropertyAccessExpression(Lr,"value"),mi)),ve),512);return r.createTryStatement(r.createBlock([r.restoreEnclosingLabel(Qo,Ot,q&&Bt)]),r.createCatchClause(r.createVariableDeclaration(ee),tr(r.createBlock([r.createExpressionStatement(r.createAssignment(ps,r.createObjectLiteralExpression([r.createPropertyAssignment("error",ee)])))]),1)),r.createBlock([r.createTryStatement(r.createBlock([tr(r.createIfStatement(r.createLogicalAnd(r.createLogicalAnd(Lr,r.createLogicalNot(r.createPropertyAccessExpression(Lr,"done"))),r.createAssignment(Xe,r.createPropertyAccessExpression(Wn,"return"))),r.createExpressionStatement(r.createFunctionCallCall(Xe,Wn,[]))),1)]),void 0,tr(r.createBlock([tr(r.createIfStatement(ps,r.createThrowStatement(r.createPropertyAccessExpression(ps,"error"))),1)]),1))]))}function $o(ve){const Ot=ve.properties;let mi=-1,Ci=!1;for(let ps=0;ps<Ot.length;ps++){const ee=Ot[ps];if(ee.transformFlags&1048576&&F&4||(Ci=j.checkDefined(ee.name).kind===167)){mi=ps;break}}if(mi<0)return dn(ve,ue,t);const hn=r.createTempVariable(g),Wn=[],Lr=r.createAssignment(hn,tr(r.createObjectLiteralExpression(Dn(Ot,ue,Ub,0,mi),ve.multiLine),Ci?131072:0));return ve.multiLine&&bh(Lr),Wn.push(Lr),Rn(Wn,ve,hn,mi),Wn.push(ve.multiLine?bh(_c(Ht(r.cloneNode(hn),hn),hn.parent)):hn),r.inlineExpressions(Wn)}function Lc(ve){return b.hasNodeCheckFlag(ve,8192)}function vu(ve){return s2(ve)&&!!ve.initializer&&Lc(ve.initializer)}function Gu(ve){return s2(ve)&&!!ve.condition&&Lc(ve.condition)}function Zc(ve){return s2(ve)&&!!ve.incrementor&&Lc(ve.incrementor)}function Ls(ve){return ja(ve)||vu(ve)}function ja(ve){return b.hasNodeCheckFlag(ve,4096)}function wf(ve,Ot){ve.hoistedLocalVariables||(ve.hoistedLocalVariables=[]),mi(Ot.name);function mi(Ci){if(Ci.kind===80)ve.hoistedLocalVariables.push(Ci);else for(const hn of Ci.elements)Bd(hn)||mi(hn.name)}}function Jo(ve,Ot,mi,Ci){if(!Ls(ve)){let Zt;q&&(Zt=q.allowedNonLabeledJumps,q.allowedNonLabeledJumps=6);const Nn=Ci?Ci(ve,Ot,void 0,mi):r.restoreEnclosingLabel(s2(ve)?Di(ve):dn(ve,ue,t),Ot,q&&Bt);return q&&(q.allowedNonLabeledJumps=Zt),Nn}const hn=tc(ve),Wn=[],Lr=q;q=hn;const ps=vu(ve)?uh(ve,hn):void 0,ee=ja(ve)?sd(ve,hn,Lr):void 0;q=Lr,ps&&Wn.push(ps.functionDeclaration),ee&&Wn.push(ee.functionDeclaration),ki(Wn,hn,Lr),ps&&Wn.push(Ve(ps.functionName,ps.containsYield));let Xe;if(ee)if(Ci)Xe=Ci(ve,Ot,ee.part,mi);else{const Zt=kh(ve,ps,r.createBlock(ee.part,!0));Xe=r.restoreEnclosingLabel(Zt,Ot,q&&Bt)}else{const Zt=kh(ve,ps,j.checkDefined(bt(ve.statement,ue,Ps,r.liftToBlock)));Xe=r.restoreEnclosingLabel(Zt,Ot,q&&Bt)}return Wn.push(Xe),Wn}function kh(ve,Ot,mi){switch(ve.kind){case 248:return md(ve,Ot,mi);case 249:return pc(ve,mi);case 250:return go(ve,mi);case 246:return mc(ve,mi);case 247:return oo(ve,mi);default:return j.failBadSyntaxKind(ve,"IterationStatement expected")}}function md(ve,Ot,mi){const Ci=ve.condition&&Lc(ve.condition),hn=Ci||ve.incrementor&&Lc(ve.incrementor);return r.updateForStatement(ve,bt(Ot?Ot.part:ve.initializer,Ie,Hm),bt(Ci?void 0:ve.condition,ue,jt),bt(hn?void 0:ve.incrementor,Ie,jt),mi)}function go(ve,Ot){return r.updateForOfStatement(ve,void 0,j.checkDefined(bt(ve.initializer,ue,Hm)),j.checkDefined(bt(ve.expression,ue,jt)),Ot)}function pc(ve,Ot){return r.updateForInStatement(ve,j.checkDefined(bt(ve.initializer,ue,Hm)),j.checkDefined(bt(ve.expression,ue,jt)),Ot)}function mc(ve,Ot){return r.updateDoStatement(ve,Ot,j.checkDefined(bt(ve.expression,ue,jt)))}function oo(ve,Ot){return r.updateWhileStatement(ve,j.checkDefined(bt(ve.expression,ue,jt)),Ot)}function tc(ve){let Ot;switch(ve.kind){case 248:case 249:case 250:const Wn=ve.initializer;Wn&&Wn.kind===261&&(Ot=Wn);break}const mi=[],Ci=[];if(Ot&&zb(Ot)&7){const Wn=vu(ve)||Gu(ve)||Zc(ve);for(const Lr of Ot.declarations)Mi(ve,Lr,mi,Ci,Wn)}const hn={loopParameters:mi,loopOutParameters:Ci};return q&&(q.argumentsName&&(hn.argumentsName=q.argumentsName),q.thisName&&(hn.thisName=q.thisName),q.hoistedLocalVariables&&(hn.hoistedLocalVariables=q.hoistedLocalVariables)),hn}function ki(ve,Ot,mi){let Ci;if(Ot.argumentsName&&(mi?mi.argumentsName=Ot.argumentsName:(Ci||(Ci=[])).push(r.createVariableDeclaration(Ot.argumentsName,void 0,void 0,r.createIdentifier("arguments")))),Ot.thisName&&(mi?mi.thisName=Ot.thisName:(Ci||(Ci=[])).push(r.createVariableDeclaration(Ot.thisName,void 0,void 0,r.createIdentifier("this")))),Ot.hoistedLocalVariables)if(mi)mi.hoistedLocalVariables=Ot.hoistedLocalVariables;else{Ci||(Ci=[]);for(const hn of Ot.hoistedLocalVariables)Ci.push(r.createVariableDeclaration(hn))}if(Ot.loopOutParameters.length){Ci||(Ci=[]);for(const hn of Ot.loopOutParameters)Ci.push(r.createVariableDeclaration(hn.outParamName))}Ot.conditionVariable&&(Ci||(Ci=[]),Ci.push(r.createVariableDeclaration(Ot.conditionVariable,void 0,void 0,r.createFalse()))),Ci&&ve.push(r.createVariableStatement(void 0,r.createVariableDeclarationList(Ci)))}function Gc(ve){return r.createVariableDeclaration(ve.originalName,void 0,void 0,ve.outParamName)}function uh(ve,Ot){const mi=r.createUniqueName("_loop_init"),Ci=(ve.initializer.transformFlags&1048576)!==0;let hn=0;Ot.containsLexicalThis&&(hn|=16),Ci&&F&4&&(hn|=524288);const Wn=[];Wn.push(r.createVariableStatement(void 0,ve.initializer)),Nl(Ot.loopOutParameters,2,1,Wn);const Lr=r.createVariableStatement(void 0,tr(r.createVariableDeclarationList([r.createVariableDeclaration(mi,void 0,void 0,tr(r.createFunctionExpression(void 0,Ci?r.createToken(42):void 0,void 0,void 0,void 0,void 0,j.checkDefined(bt(r.createBlock(Wn,!0),ue,Xo))),hn))]),4194304)),ps=r.createVariableDeclarationList(qt(Ot.loopOutParameters,Gc));return{functionName:mi,containsYield:Ci,functionDeclaration:Lr,part:ps}}function sd(ve,Ot,mi){const Ci=r.createUniqueName("_loop");u();const hn=bt(ve.statement,ue,Ps,r.liftToBlock),Wn=p(),Lr=[];(Gu(ve)||Zc(ve))&&(Ot.conditionVariable=r.createUniqueName("inc"),ve.incrementor?Lr.push(r.createIfStatement(Ot.conditionVariable,r.createExpressionStatement(j.checkDefined(bt(ve.incrementor,ue,jt))),r.createExpressionStatement(r.createAssignment(Ot.conditionVariable,r.createTrue())))):Lr.push(r.createIfStatement(r.createLogicalNot(Ot.conditionVariable),r.createExpressionStatement(r.createAssignment(Ot.conditionVariable,r.createTrue())))),Gu(ve)&&Lr.push(r.createIfStatement(r.createPrefixUnaryExpression(54,j.checkDefined(bt(ve.condition,ue,jt))),j.checkDefined(bt(r.createBreakStatement(),ue,Ps))))),j.assert(hn),Xo(hn)?Sr(Lr,hn.statements):Lr.push(hn),Nl(Ot.loopOutParameters,1,1,Lr),Fv(Lr,Wn);const ps=r.createBlock(Lr,!0);Xo(hn)&&Ir(ps,hn);const ee=(ve.statement.transformFlags&1048576)!==0;let Xe=1048576;Ot.containsLexicalThis&&(Xe|=16),ee&&F&4&&(Xe|=524288);const Zt=r.createVariableStatement(void 0,tr(r.createVariableDeclarationList([r.createVariableDeclaration(Ci,void 0,void 0,tr(r.createFunctionExpression(void 0,ee?r.createToken(42):void 0,void 0,void 0,Ot.loopParameters,void 0,ps),Xe))]),4194304)),Nn=_e(Ci,Ot,mi,ee);return{functionName:Ci,containsYield:ee,functionDeclaration:Zt,part:Nn}}function Pp(ve,Ot){const mi=Ot===0?ve.outParamName:ve.originalName,Ci=Ot===0?ve.originalName:ve.outParamName;return r.createBinaryExpression(Ci,64,mi)}function Nl(ve,Ot,mi,Ci){for(const hn of ve)hn.flags&Ot&&Ci.push(r.createExpressionStatement(Pp(hn,mi)))}function Ve(ve,Ot){const mi=r.createCallExpression(ve,void 0,[]),Ci=Ot?r.createYieldExpression(r.createToken(42),tr(mi,8388608)):mi;return r.createExpressionStatement(Ci)}function _e(ve,Ot,mi,Ci){const hn=[],Wn=!(Ot.nonLocalJumps&-5)&&!Ot.labeledNonLocalBreaks&&!Ot.labeledNonLocalContinues,Lr=r.createCallExpression(ve,void 0,qt(Ot.loopParameters,ee=>ee.name)),ps=Ci?r.createYieldExpression(r.createToken(42),tr(Lr,8388608)):Lr;if(Wn)hn.push(r.createExpressionStatement(ps)),Nl(Ot.loopOutParameters,1,0,hn);else{const ee=r.createUniqueName("state"),Xe=r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration(ee,void 0,void 0,ps)]));if(hn.push(Xe),Nl(Ot.loopOutParameters,1,0,hn),Ot.nonLocalJumps&8){let Zt;mi?(mi.nonLocalJumps|=8,Zt=r.createReturnStatement(ee)):Zt=r.createReturnStatement(r.createPropertyAccessExpression(ee,"value")),hn.push(r.createIfStatement(r.createTypeCheck(ee,"object"),Zt))}if(Ot.nonLocalJumps&2&&hn.push(r.createIfStatement(r.createStrictEquality(ee,r.createStringLiteral("break")),r.createBreakStatement())),Ot.labeledNonLocalBreaks||Ot.labeledNonLocalContinues){const Zt=[];ci(Ot.labeledNonLocalBreaks,!0,ee,mi,Zt),ci(Ot.labeledNonLocalContinues,!1,ee,mi,Zt),hn.push(r.createSwitchStatement(ee,r.createCaseBlock(Zt)))}}return hn}function Lt(ve,Ot,mi,Ci){Ot?(ve.labeledNonLocalBreaks||(ve.labeledNonLocalBreaks=new Map),ve.labeledNonLocalBreaks.set(mi,Ci)):(ve.labeledNonLocalContinues||(ve.labeledNonLocalContinues=new Map),ve.labeledNonLocalContinues.set(mi,Ci))}function ci(ve,Ot,mi,Ci,hn){ve&&ve.forEach((Wn,Lr)=>{const ps=[];if(!Ci||Ci.labels&&Ci.labels.get(Lr)){const ee=r.createIdentifier(Lr);ps.push(Ot?r.createBreakStatement(ee):r.createContinueStatement(ee))}else Lt(Ci,Ot,Lr,Wn),ps.push(r.createReturnStatement(mi));hn.push(r.createCaseClause(r.createStringLiteral(Wn),ps))})}function Mi(ve,Ot,mi,Ci,hn){const Wn=Ot.name;if(ta(Wn))for(const Lr of Wn.elements)Bd(Lr)||Mi(ve,Lr,mi,Ci,hn);else{mi.push(r.createParameterDeclaration(void 0,void 0,Wn));const Lr=b.hasNodeCheckFlag(Ot,65536);if(Lr||hn){const ps=r.createUniqueName("out_"+Fr(Wn));let ee=0;Lr&&(ee|=1),s2(ve)&&(ve.initializer&&b.isBindingCapturedByNode(ve.initializer,Ot)&&(ee|=2),(ve.condition&&b.isBindingCapturedByNode(ve.condition,Ot)||ve.incrementor&&b.isBindingCapturedByNode(ve.incrementor,Ot))&&(ee|=1)),Ci.push({flags:ee,originalName:Wn,outParamName:ps})}}}function Rn(ve,Ot,mi,Ci){const hn=Ot.properties,Wn=hn.length;for(let Lr=Ci;Lr<Wn;Lr++){const ps=hn[Lr];switch(ps.kind){case 177:case 178:const ee=nx(Ot.properties,ps);ps===ee.firstAccessor&&ve.push(ii(mi,ee,Ot,!!Ot.multiLine));break;case 174:ve.push(Mr(ps,mi,Ot,Ot.multiLine));break;case 303:ve.push(Yr(ps,mi,Ot.multiLine));break;case 304:ve.push(Xi(ps,mi,Ot.multiLine));break;default:j.failBadSyntaxKind(Ot);break}}}function Yr(ve,Ot,mi){const Ci=r.createAssignment(RI(r,Ot,j.checkDefined(bt(ve.name,ue,id))),j.checkDefined(bt(ve.initializer,ue,jt)));return Ht(Ci,ve),mi&&bh(Ci),Ci}function Xi(ve,Ot,mi){const Ci=r.createAssignment(RI(r,Ot,j.checkDefined(bt(ve.name,ue,id))),r.cloneNode(ve.name));return Ht(Ci,ve),mi&&bh(Ci),Ci}function Mr(ve,Ot,mi,Ci){const hn=r.createAssignment(RI(r,Ot,j.checkDefined(bt(ve.name,ue,id))),gr(ve,ve,void 0,mi));return Ht(hn,ve),Ci&&bh(hn),hn}function ds(ve){const Ot=Q(7104,0);let mi;if(j.assert(!!ve.variableDeclaration,"Catch clause variable should always be present when downleveling ES2015."),ta(ve.variableDeclaration.name)){const Ci=r.createTempVariable(void 0),hn=r.createVariableDeclaration(Ci);Ht(hn,ve.variableDeclaration);const Wn=hD(ve.variableDeclaration,ue,t,0,Ci),Lr=r.createVariableDeclarationList(Wn);Ht(Lr,ve.variableDeclaration);const ps=r.createVariableStatement(void 0,Lr);mi=r.updateCatchClause(ve,hn,Ks(ve.block,ps))}else mi=dn(ve,ue,t);return re(Ot,0,0),mi}function Ks(ve,Ot){const mi=Dn(ve.statements,ue,Ps);return r.updateBlock(ve,[Ot,...mi])}function Ic(ve){j.assert(!Ka(ve.name));const Ot=gr(ve,Zk(ve,-1),void 0,void 0);return tr(Ot,1024|Ya(Ot)),Ht(r.createPropertyAssignment(ve.name,Ot),ve)}function Gl(ve){j.assert(!Ka(ve.name));const Ot=q;q=void 0;const mi=Q(32670,65);let Ci;const hn=yu(ve.parameters,ue,t),Wn=te(ve);return ve.kind===177?Ci=r.updateGetAccessorDeclaration(ve,ve.modifiers,ve.name,hn,ve.type,Wn):Ci=r.updateSetAccessorDeclaration(ve,ve.modifiers,ve.name,hn,Wn),re(mi,229376,0),q=Ot,Ci}function Pu(ve){return Ht(r.createPropertyAssignment(ve.name,Pe(r.cloneNode(ve.name))),ve)}function Ku(ve){return dn(ve,ue,t)}function Xu(ve){return dn(ve,ue,t)}function Wl(ve){return Ft(ve.elements,Km)?eg(ve.elements,!1,!!ve.multiLine,!!ve.elements.hasTrailingComma):dn(ve,ue,t)}function Cu(ve){if(u0(ve)&1)return gm(ve);const Ot=Vu(ve.expression);return Ot.kind===108||G_(Ot)||Ft(ve.arguments,Km)?Qu(ve):r.updateCallExpression(ve,j.checkDefined(bt(ve.expression,he,jt)),void 0,Dn(ve.arguments,ue,jt))}function gm(ve){const Ot=ha(ha(Vu(ve.expression),xl).body,Xo),mi=Yl=>Lu(Yl)&&!!ya(Yl.declarationList.declarations).initializer,Ci=q;q=void 0;const hn=Dn(Ot.statements,we,Ps);q=Ci;const Wn=$t(hn,mi),Lr=$t(hn,Yl=>!mi(Yl)),ee=ha(ya(Wn),Lu).declarationList.declarations[0],Xe=Vu(ee.initializer);let Zt=Jr(Xe,lf);!Zt&&ur(Xe)&&Xe.operatorToken.kind===28&&(Zt=Jr(Xe.left,lf));const Nn=ha(Zt?Vu(Zt.right):Xe,la),Is=ha(Vu(Nn.expression),ml),Qo=Is.body.statements;let To=0,Zo=-1;const uc=[];if(Zt){const Yl=Jr(Qo[To],uf);Yl&&(uc.push(Yl),To++),uc.push(Qo[To]),To++,uc.push(r.createExpressionStatement(r.createAssignment(Zt.left,ha(ee.name,ot))))}for(;!Og(sm(Qo,Zo));)Zo--;Sr(uc,Qo,To,Zo),Zo<-1&&Sr(uc,Qo,Zo+1);const Xa=Jr(sm(Qo,Zo),Og);for(const Yl of Lr)Og(Yl)&&(Xa!=null&&Xa.expression)&&!ot(Xa.expression)?uc.push(Xa):uc.push(Yl);return Sr(uc,Wn,1),r.restoreOuterExpressions(ve.expression,r.restoreOuterExpressions(ee.initializer,r.restoreOuterExpressions(Zt&&Zt.right,r.updateCallExpression(Nn,r.restoreOuterExpressions(Nn.expression,r.updateFunctionExpression(Is,void 0,void 0,void 0,void 0,Is.parameters,void 0,r.updateBlock(Is.body,uc))),void 0,Nn.arguments))))}function Qu(ve,Ot){if(ve.transformFlags&32768||ve.expression.kind===108||G_(Vu(ve.expression))){const{target:mi,thisArg:Ci}=r.createCallBinding(ve.expression,g);ve.expression.kind===108&&tr(Ci,8);let hn;if(ve.transformFlags&32768?hn=r.createFunctionApplyCall(j.checkDefined(bt(mi,he,jt)),ve.expression.kind===108?Ci:j.checkDefined(bt(Ci,ue,jt)),eg(ve.arguments,!0,!1,!1)):hn=Ht(r.createFunctionCallCall(j.checkDefined(bt(mi,he,jt)),ve.expression.kind===108?Ci:j.checkDefined(bt(Ci,ue,jt)),Dn(ve.arguments,ue,jt)),ve),ve.expression.kind===108){const Wn=r.createLogicalOr(hn,Gs());hn=r.createAssignment(se(),Wn)}return Ir(hn,ve)}return mI(ve)&&(F|=131072),dn(ve,ue,t)}function kd(ve){if(Ft(ve.arguments,Km)){const{target:Ot,thisArg:mi}=r.createCallBinding(r.createPropertyAccessExpression(ve.expression,"bind"),g);return r.createNewExpression(r.createFunctionApplyCall(j.checkDefined(bt(Ot,ue,jt)),mi,eg(r.createNodeArray([r.createVoidZero(),...ve.arguments]),!0,!1,!1)),void 0,[])}return dn(ve,ue,t)}function eg(ve,Ot,mi,Ci){const hn=ve.length,Wn=Dr(nm(ve,Ye,(Xe,Zt,Nn,Is)=>Zt(Xe,mi,Ci&&Is===hn)));if(Wn.length===1){const Xe=Wn[0];if(Ot&&!C.downlevelIteration||Jce(Xe.expression)||_7(Xe.expression,"___spreadArray"))return Xe.expression}const Lr=a(),ps=Wn[0].kind!==0;let ee=ps?r.createArrayLiteralExpression():Wn[0].expression;for(let Xe=ps?0:1;Xe<Wn.length;Xe++){const Zt=Wn[Xe];ee=Lr.createSpreadArrayHelper(ee,Zt.expression,Zt.kind===1&&!Ot)}return ee}function Ye(ve){return Km(ve)?li:po}function li(ve){return qt(ve,En)}function En(ve){j.assertNode(ve,Km);let Ot=bt(ve.expression,ue,jt);j.assert(Ot);const mi=_7(Ot,"___read");let Ci=mi||Jce(Ot)?2:1;return C.downlevelIteration&&Ci===1&&!jf(Ot)&&!mi&&(Ot=a().createReadHelper(Ot,void 0),Ci=2),vet(Ci,Ot)}function po(ve,Ot,mi){const Ci=r.createArrayLiteralExpression(Dn(r.createNodeArray(ve,mi),ue,jt),Ot);return vet(0,Ci)}function ic(ve){return bt(ve.expression,ue,jt)}function sc(ve){return Ht(r.createStringLiteral(ve.text),ve)}function Hu(ve){return ve.hasExtendedUnicodeEscape?Ht(r.createStringLiteral(ve.text),ve):ve}function Hd(ve){return ve.numericLiteralFlags&384?Ht(r.createNumericLiteral(ve.text),ve):ve}function Yc(ve){return $ue(t,ve,ue,N,U,1)}function Pc(ve){let Ot=r.createStringLiteral(ve.head.text);for(const mi of ve.templateSpans){const Ci=[j.checkDefined(bt(mi.expression,ue,jt))];mi.literal.text.length>0&&Ci.push(r.createStringLiteral(mi.literal.text)),Ot=r.createCallExpression(r.createPropertyAccessExpression(Ot,"concat"),void 0,Ci)}return Ht(Ot,ve)}function od(){return r.createUniqueName("_super",48)}function Ap(ve,Ot){const mi=F&8&&!Ot?r.createPropertyAccessExpression(Ir(od(),ve),"prototype"):od();return Ir(mi,ve),Sd(mi,ve),Ga(mi,ve),mi}function Vg(ve){return ve.keywordToken===105&&ve.name.escapedText==="target"?(F|=32768,r.createUniqueName("_newTarget",48)):ve}function Y_(ve,Ot,mi){if(X&1&&Ho(Ot)){const Ci=Q(32670,Ya(Ot)&16?81:65);E(ve,Ot,mi),re(Ci,0,0);return}E(ve,Ot,mi)}function Jp(){X&2||(X|=2,t.enableSubstitution(80))}function ym(){X&1||(X|=1,t.enableSubstitution(110),t.enableEmitNotification(176),t.enableEmitNotification(174),t.enableEmitNotification(177),t.enableEmitNotification(178),t.enableEmitNotification(219),t.enableEmitNotification(218),t.enableEmitNotification(262))}function tg(ve,Ot){return Ot=T(ve,Ot),ve===1?F_(Ot):ot(Ot)?Zv(Ot):Ot}function Zv(ve){if(X&2&&!Ple(ve)){const Ot=Mo(ve,ot);if(Ot&&Hg(Ot))return Ht(r.getGeneratedNameForNode(Ot),ve)}return ve}function Hg(ve){switch(ve.parent.kind){case 208:case 263:case 266:case 260:return ve.parent.name===ve&&b.isDeclarationWithCollidingName(ve.parent)}return!1}function F_(ve){switch(ve.kind){case 80:return jd(ve);case 110:return h_(ve)}return ve}function jd(ve){if(X&2&&!Ple(ve)){const Ot=b.getReferencedDeclarationWithCollidingName(ve);if(Ot&&!(ss(Ot)&&lC(Ot,ve)))return Ht(r.getGeneratedNameForNode(No(Ot)),ve)}return ve}function lC(ve,Ot){let mi=Mo(Ot);if(!mi||mi===ve||mi.end<=ve.pos||mi.pos>=ve.end)return!1;const Ci=R0(ve);for(;mi;){if(mi===Ci||mi===ve)return!1;if(Od(mi)&&mi.parent===ve)return!0;mi=mi.parent}return!1}function h_(ve){return X&1&&F&16?Ht(se(),ve):ve}function Yv(ve,Ot){return pa(Ot)?r.getInternalName(ve):r.createPropertyAccessExpression(r.getInternalName(ve),"prototype")}function vm(ve,Ot){if(!ve||!Ot||Ft(ve.parameters))return!1;const mi=Ra(ve.body.statements);if(!mi||!cl(mi)||mi.kind!==244)return!1;const Ci=mi.expression;if(!cl(Ci)||Ci.kind!==213)return!1;const hn=Ci.expression;if(!cl(hn)||hn.kind!==108)return!1;const Wn=Bm(Ci.arguments);if(!Wn||!cl(Wn)||Wn.kind!==230)return!1;const Lr=Wn.expression;return ot(Lr)&&Lr.escapedText==="arguments"}}function zRt(t){switch(t){case 2:return"return";case 3:return"break";case 4:return"yield";case 5:return"yield*";case 7:return"endfinally";default:return}}function cLe(t){const{factory:r,getEmitHelperFactory:a,resumeLexicalEnvironment:u,endLexicalEnvironment:h,hoistFunctionDeclaration:p,hoistVariableDeclaration:g}=t,C=t.getCompilerOptions(),b=Ja(C),T=t.getEmitResolver(),E=t.onSubstituteNode;t.onSubstituteNode=Gt;let N,R,F,H,U,q,X,Z,Q,re,oe=1,pe,de,ue,Ie,we=0,he=0,Ae,ke,Te,De,qe,se,Ne,Oe;return q0(t,He);function He(Ye){if(Ye.isDeclarationFile||!(Ye.transformFlags&2048))return Ye;const li=dn(Ye,Pe,t);return Zb(li,t.readEmitHelpers()),li}function Pe(Ye){const li=Ye.transformFlags;return H?We(Ye):F?ze(Ye):Qc(Ye)&&Ye.asteriskToken?$e(Ye):li&2048?dn(Ye,Pe,t):Ye}function We(Ye){switch(Ye.kind){case 246:return ma(Ye);case 247:return Ji(Ye);case 255:return ii(Ye);case 256:return Ni(Ye);default:return ze(Ye)}}function ze(Ye){switch(Ye.kind){case 262:return et(Ye);case 218:return Me(Ye);case 177:case 178:return ut(Ye);case 243:return Et(Ye);case 248:return St(Ye);case 249:return xe(Ye);case 252:return gt(Ye);case 251:return Se(Ye);case 253:return Je(Ye);default:return Ye.transformFlags&1048576?Nt(Ye):Ye.transformFlags&4196352?dn(Ye,Pe,t):Ye}}function Nt(Ye){switch(Ye.kind){case 226:return dt(Ye);case 355:return xn(Ye);case 227:return _i(Ye);case 229:return Fi(Ye);case 209:return On(Ye);case 210:return qr(Ye);case 212:return Fs(Ye);case 213:return ko(Ye);case 214:return ls(Ye);default:return dn(Ye,Pe,t)}}function $e(Ye){switch(Ye.kind){case 262:return et(Ye);case 218:return Me(Ye);default:return j.failBadSyntaxKind(Ye)}}function et(Ye){if(Ye.asteriskToken)Ye=Ir(Ht(r.createFunctionDeclaration(Ye.modifiers,void 0,Ye.name,void 0,yu(Ye.parameters,Pe,t),void 0,wt(Ye.body)),Ye),Ye);else{const li=F,En=H;F=!1,H=!1,Ye=dn(Ye,Pe,t),F=li,H=En}if(F){p(Ye);return}else return Ye}function Me(Ye){if(Ye.asteriskToken)Ye=Ir(Ht(r.createFunctionExpression(void 0,void 0,Ye.name,void 0,yu(Ye.parameters,Pe,t),void 0,wt(Ye.body)),Ye),Ye);else{const li=F,En=H;F=!1,H=!1,Ye=dn(Ye,Pe,t),F=li,H=En}return Ye}function ut(Ye){const li=F,En=H;return F=!1,H=!1,Ye=dn(Ye,Pe,t),F=li,H=En,Ye}function wt(Ye){const li=[],En=F,po=H,ic=U,sc=q,Hu=X,Hd=Z,Yc=Q,Pc=re,od=oe,Ap=pe,Vg=de,Y_=ue,Jp=Ie;F=!0,H=!1,U=void 0,q=void 0,X=void 0,Z=void 0,Q=void 0,re=void 0,oe=1,pe=void 0,de=void 0,ue=void 0,Ie=r.createTempVariable(void 0),u();const ym=r.copyPrologue(Ye.statements,li,!1,Pe);Qs(Ye.statements,ym);const tg=Lt();return Fv(li,h()),li.push(r.createReturnStatement(tg)),F=En,H=po,U=ic,q=sc,X=Hu,Z=Hd,Q=Yc,re=Pc,oe=od,pe=Ap,de=Vg,ue=Y_,Ie=Jp,Ht(r.createBlock(li,Ye.multiLine),Ye)}function Et(Ye){if(Ye.transformFlags&1048576){dr(Ye.declarationList);return}else{if(Ya(Ye)&2097152)return Ye;for(const En of Ye.declarationList.declarations)g(En.name);const li=K8(Ye.declarationList);return li.length===0?void 0:Ga(r.createExpressionStatement(r.inlineExpressions(qt(li,us))),Ye)}}function dt(Ye){const li=tce(Ye);switch(li){case 0:return Ei(Ye);case 1:return zt(Ye);default:return j.assertNever(li)}}function zt(Ye){const{left:li,right:En}=Ye;if(te(En)){let po;switch(li.kind){case 211:po=r.updatePropertyAccessExpression(li,be(j.checkDefined(bt(li.expression,Pe,N_))),li.name);break;case 212:po=r.updateElementAccessExpression(li,be(j.checkDefined(bt(li.expression,Pe,N_))),be(j.checkDefined(bt(li.argumentExpression,Pe,jt))));break;default:po=j.checkDefined(bt(li,Pe,jt));break}const ic=Ye.operatorToken.kind;return z7(ic)?Ht(r.createAssignment(po,Ht(r.createBinaryExpression(be(po),U7(ic),j.checkDefined(bt(En,Pe,jt))),Ye)),Ye):r.updateBinaryExpression(Ye,po,Ye.operatorToken,j.checkDefined(bt(En,Pe,jt)))}return dn(Ye,Pe,t)}function Ei(Ye){return te(Ye.right)?aDe(Ye.operatorToken.kind)?Pn(Ye):Ye.operatorToken.kind===28?tn(Ye):r.updateBinaryExpression(Ye,be(j.checkDefined(bt(Ye.left,Pe,jt))),Ye.operatorToken,j.checkDefined(bt(Ye.right,Pe,jt))):dn(Ye,Pe,t)}function tn(Ye){let li=[];return En(Ye.left),En(Ye.right),r.inlineExpressions(li);function En(po){ur(po)&&po.operatorToken.kind===28?(En(po.left),En(po.right)):(te(po)&&li.length>0&&(_e(1,[r.createExpressionStatement(r.inlineExpressions(li))]),li=[]),li.push(j.checkDefined(bt(po,Pe,jt))))}}function xn(Ye){let li=[];for(const En of Ye.elements)ur(En)&&En.operatorToken.kind===28?li.push(tn(En)):(te(En)&&li.length>0&&(_e(1,[r.createExpressionStatement(r.inlineExpressions(li))]),li=[]),li.push(j.checkDefined(bt(En,Pe,jt))));return r.inlineExpressions(li)}function Pn(Ye){const li=lt(),En=Qt();return oo(En,j.checkDefined(bt(Ye.left,Pe,jt)),Ye.left),Ye.operatorToken.kind===56?Gc(li,En,Ye.left):ki(li,En,Ye.left),oo(En,j.checkDefined(bt(Ye.right,Pe,jt)),Ye.right),st(li),En}function _i(Ye){if(te(Ye.whenTrue)||te(Ye.whenFalse)){const li=lt(),En=lt(),po=Qt();return Gc(li,j.checkDefined(bt(Ye.condition,Pe,jt)),Ye.condition),oo(po,j.checkDefined(bt(Ye.whenTrue,Pe,jt)),Ye.whenTrue),tc(En),st(li),oo(po,j.checkDefined(bt(Ye.whenFalse,Pe,jt)),Ye.whenFalse),st(En),po}return dn(Ye,Pe,t)}function Fi(Ye){const li=lt(),En=bt(Ye.expression,Pe,jt);if(Ye.asteriskToken){const po=Ya(Ye.expression)&8388608?En:Ht(a().createValuesHelper(En),Ye);uh(po,Ye)}else sd(En,Ye);return st(li),go(Ye)}function On(Ye){return pn(Ye.elements,void 0,void 0,Ye.multiLine)}function pn(Ye,li,En,po){const ic=tt(Ye);let sc;if(ic>0){sc=Qt();const Yc=Dn(Ye,Pe,jt,0,ic);oo(sc,r.createArrayLiteralExpression(li?[li,...Yc]:Yc)),li=void 0}const Hu=oi(Ye,Hd,[],ic);return sc?r.createArrayConcatCall(sc,[r.createArrayLiteralExpression(Hu,po)]):Ht(r.createArrayLiteralExpression(li?[li,...Hu]:Hu,po),En);function Hd(Yc,Pc){if(te(Pc)&&Yc.length>0){const od=sc!==void 0;sc||(sc=Qt()),oo(sc,od?r.createArrayConcatCall(sc,[r.createArrayLiteralExpression(Yc,po)]):r.createArrayLiteralExpression(li?[li,...Yc]:Yc,po)),li=void 0,Yc=[]}return Yc.push(j.checkDefined(bt(Pc,Pe,jt))),Yc}}function qr(Ye){const li=Ye.properties,En=Ye.multiLine,po=tt(li),ic=Qt();oo(ic,r.createObjectLiteralExpression(Dn(li,Pe,Ub,0,po),En));const sc=oi(li,Hu,[],po);return sc.push(En?bh(_c(Ht(r.cloneNode(ic),ic),ic.parent)):ic),r.inlineExpressions(sc);function Hu(Hd,Yc){te(Yc)&&Hd.length>0&&(mc(r.createExpressionStatement(r.inlineExpressions(Hd))),Hd=[]);const Pc=nIe(r,Ye,Yc,ic),od=bt(Pc,Pe,jt);return od&&(En&&bh(od),Hd.push(od)),Hd}}function Fs(Ye){return te(Ye.argumentExpression)?r.updateElementAccessExpression(Ye,be(j.checkDefined(bt(Ye.expression,Pe,N_))),j.checkDefined(bt(Ye.argumentExpression,Pe,jt))):dn(Ye,Pe,t)}function ko(Ye){if(!zp(Ye)&&O(Ye.arguments,te)){const{target:li,thisArg:En}=r.createCallBinding(Ye.expression,g,b,!0);return Ir(Ht(r.createFunctionApplyCall(be(j.checkDefined(bt(li,Pe,N_))),En,pn(Ye.arguments)),Ye),Ye)}return dn(Ye,Pe,t)}function ls(Ye){if(O(Ye.arguments,te)){const{target:li,thisArg:En}=r.createCallBinding(r.createPropertyAccessExpression(Ye.expression,"bind"),g);return Ir(Ht(r.createNewExpression(r.createFunctionApplyCall(be(j.checkDefined(bt(li,Pe,jt))),En,pn(Ye.arguments,r.createVoidZero())),void 0,[]),Ye),Ye)}return dn(Ye,Pe,t)}function Qs(Ye,li=0){const En=Ye.length;for(let po=li;po<En;po++)Zs(Ye[po])}function Mn(Ye){Xo(Ye)?Qs(Ye.statements):Zs(Ye)}function Zs(Ye){const li=H;H||(H=te(Ye)),at(Ye),H=li}function at(Ye){switch(Ye.kind){case 241:return yi(Ye);case 244:return Sn(Ye);case 245:return Xr(Ye);case 246:return Gs(Ye);case 247:return ka(Ye);case 248:return ac(Ye);case 249:return ri(Ye);case 251:return pt(Ye);case 252:return Ze(Ye);case 253:return Dt(Ye);case 254:return Rt(Ye);case 255:return Ct(Ye);case 256:return vt(Ye);case 257:return ji(Ye);case 258:return gr(Ye);default:return mc(bt(Ye,Pe,Ps))}}function yi(Ye){te(Ye)?Qs(Ye.statements):mc(bt(Ye,Pe,Ps))}function Sn(Ye){mc(bt(Ye,Pe,Ps))}function dr(Ye){for(const sc of Ye.declarations){const Hu=r.cloneNode(sc.name);Sd(Hu,sc.name),g(Hu)}const li=K8(Ye),En=li.length;let po=0,ic=[];for(;po<En;){for(let sc=po;sc<En;sc++){const Hu=li[sc];if(te(Hu.initializer)&&ic.length>0)break;ic.push(us(Hu))}ic.length&&(mc(r.createExpressionStatement(r.inlineExpressions(ic))),po+=ic.length,ic=[])}}function us(Ye){return Ga(r.createAssignment(Ga(r.cloneNode(Ye.name),Ye.name),j.checkDefined(bt(Ye.initializer,Pe,jt))),Ye)}function Xr(Ye){if(te(Ye))if(te(Ye.thenStatement)||te(Ye.elseStatement)){const li=lt(),En=Ye.elseStatement?lt():void 0;Gc(Ye.elseStatement?En:li,j.checkDefined(bt(Ye.expression,Pe,jt)),Ye.expression),Mn(Ye.thenStatement),Ye.elseStatement&&(tc(li),st(En),Mn(Ye.elseStatement)),st(li)}else mc(bt(Ye,Pe,Ps));else mc(bt(Ye,Pe,Ps))}function Gs(Ye){if(te(Ye)){const li=lt(),En=lt();Di(li),st(En),Mn(Ye.statement),st(li),ki(En,j.checkDefined(bt(Ye.expression,Pe,jt))),on()}else mc(bt(Ye,Pe,Ps))}function ma(Ye){return H?(Xn(),Ye=dn(Ye,Pe,t),on(),Ye):dn(Ye,Pe,t)}function ka(Ye){if(te(Ye)){const li=lt(),En=Di(li);st(li),Gc(En,j.checkDefined(bt(Ye.expression,Pe,jt))),Mn(Ye.statement),tc(li),on()}else mc(bt(Ye,Pe,Ps))}function Ji(Ye){return H?(Xn(),Ye=dn(Ye,Pe,t),on(),Ye):dn(Ye,Pe,t)}function ac(Ye){if(te(Ye)){const li=lt(),En=lt(),po=Di(En);if(Ye.initializer){const ic=Ye.initializer;Sf(ic)?dr(ic):mc(Ht(r.createExpressionStatement(j.checkDefined(bt(ic,Pe,jt))),ic))}st(li),Ye.condition&&Gc(po,j.checkDefined(bt(Ye.condition,Pe,jt))),Mn(Ye.statement),st(En),Ye.incrementor&&mc(Ht(r.createExpressionStatement(j.checkDefined(bt(Ye.incrementor,Pe,jt))),Ye.incrementor)),tc(li),on()}else mc(bt(Ye,Pe,Ps))}function St(Ye){H&&Xn();const li=Ye.initializer;if(li&&Sf(li)){for(const po of li.declarations)g(po.name);const En=K8(li);Ye=r.updateForStatement(Ye,En.length>0?r.inlineExpressions(qt(En,us)):void 0,bt(Ye.condition,Pe,jt),bt(Ye.incrementor,Pe,jt),u_(Ye.statement,Pe,t))}else Ye=dn(Ye,Pe,t);return H&&on(),Ye}function ri(Ye){if(te(Ye)){const li=Qt(),En=Qt(),po=Qt(),ic=r.createLoopVariable(),sc=Ye.initializer;g(ic),oo(li,j.checkDefined(bt(Ye.expression,Pe,jt))),oo(En,r.createArrayLiteralExpression()),mc(r.createForInStatement(po,li,r.createExpressionStatement(r.createCallExpression(r.createPropertyAccessExpression(En,"push"),void 0,[po])))),oo(ic,r.createNumericLiteral(0));const Hu=lt(),Hd=lt(),Yc=Di(Hd);st(Hu),Gc(Yc,r.createLessThan(ic,r.createPropertyAccessExpression(En,"length"))),oo(po,r.createElementAccessExpression(En,ic)),Gc(Hd,r.createBinaryExpression(po,103,li));let Pc;if(Sf(sc)){for(const od of sc.declarations)g(od.name);Pc=r.cloneNode(sc.declarations[0].name)}else Pc=j.checkDefined(bt(sc,Pe,jt)),j.assert(N_(Pc));oo(Pc,po),Mn(Ye.statement),st(Hd),mc(r.createExpressionStatement(r.createPostfixIncrement(ic))),tc(Hu),on()}else mc(bt(Ye,Pe,Ps))}function xe(Ye){H&&Xn();const li=Ye.initializer;if(Sf(li)){for(const En of li.declarations)g(En.name);Ye=r.updateForInStatement(Ye,li.declarations[0].name,j.checkDefined(bt(Ye.expression,Pe,jt)),j.checkDefined(bt(Ye.statement,Pe,Ps,r.liftToBlock)))}else Ye=dn(Ye,Pe,t);return H&&on(),Ye}function pt(Ye){const li=ja(Ye.label?Fr(Ye.label):void 0);li>0?tc(li,Ye):mc(Ye)}function Se(Ye){if(H){const li=ja(Ye.label&&Fr(Ye.label));if(li>0)return kh(li,Ye)}return dn(Ye,Pe,t)}function Ze(Ye){const li=Ls(Ye.label?Fr(Ye.label):void 0);li>0?tc(li,Ye):mc(Ye)}function gt(Ye){if(H){const li=Ls(Ye.label&&Fr(Ye.label));if(li>0)return kh(li,Ye)}return dn(Ye,Pe,t)}function Dt(Ye){Pp(bt(Ye.expression,Pe,jt),Ye)}function Je(Ye){return md(bt(Ye.expression,Pe,jt),Ye)}function Rt(Ye){te(Ye)?(Pt(be(j.checkDefined(bt(Ye.expression,Pe,jt)))),Mn(Ye.statement),Bt()):mc(bt(Ye,Pe,Ps))}function Ct(Ye){if(te(Ye.caseBlock)){const li=Ye.caseBlock,En=li.clauses.length,po=cn(),ic=be(j.checkDefined(bt(Ye.expression,Pe,jt))),sc=[];let Hu=-1;for(let Pc=0;Pc<En;Pc++){const od=li.clauses[Pc];sc.push(lt()),od.kind===297&&Hu===-1&&(Hu=Pc)}let Hd=0,Yc=[];for(;Hd<En;){let Pc=0;for(let od=Hd;od<En;od++){const Ap=li.clauses[od];if(Ap.kind===296){if(te(Ap.expression)&&Yc.length>0)break;Yc.push(r.createCaseClause(j.checkDefined(bt(Ap.expression,Pe,jt)),[kh(sc[od],Ap.expression)]))}else Pc++}Yc.length&&(mc(r.createSwitchStatement(ic,r.createCaseBlock(Yc))),Hd+=Yc.length,Yc=[]),Pc>0&&(Hd+=Pc,Pc=0)}Hu>=0?tc(sc[Hu]):tc(po);for(let Pc=0;Pc<En;Pc++)st(sc[Pc]),Qs(li.clauses[Pc].statements);vi()}else mc(bt(Ye,Pe,Ps))}function ii(Ye){return H&&zi(),Ye=dn(Ye,Pe,t),H&&vi(),Ye}function vt(Ye){te(Ye)?(Wo(Fr(Ye.label)),Mn(Ye.statement),$o()):mc(bt(Ye,Pe,Ps))}function Ni(Ye){return H&&qo(Fr(Ye.label)),Ye=dn(Ye,Pe,t),H&&$o(),Ye}function ji(Ye){Nl(j.checkDefined(bt(Ye.expression??r.createVoidZero(),Pe,jt)),Ye)}function gr(Ye){te(Ye)?(fi(),Mn(Ye.tryBlock),Ye.catchClause&&(wi(Ye.catchClause.variableDeclaration),Mn(Ye.catchClause.block)),Ye.finallyBlock&&(Ri(),Mn(Ye.finallyBlock)),Ai()):mc(dn(Ye,Pe,t))}function te(Ye){return!!Ye&&(Ye.transformFlags&1048576)!==0}function tt(Ye){const li=Ye.length;for(let En=0;En<li;En++)if(te(Ye[En]))return En;return-1}function Gt(Ye,li){return li=E(Ye,li),Ye===1?le(li):li}function le(Ye){return ot(Ye)?Ue(Ye):Ye}function Ue(Ye){if(!zl(Ye)&&N&&N.has(Fr(Ye))){const li=Ql(Ye);if(ot(li)&&li.parent){const En=T.getReferencedValueDeclaration(li);if(En){const po=R[d_(En)];if(po){const ic=_c(Ht(r.cloneNode(po),po),po.parent);return Ga(ic,Ye),Sd(ic,Ye),ic}}}}return Ye}function be(Ye){if(zl(Ye)||Ya(Ye)&8192)return Ye;const li=r.createTempVariable(g);return oo(li,Ye,Ye),li}function Qt(Ye){const li=Ye?r.createUniqueName(Ye):r.createTempVariable(void 0);return g(li),li}function lt(){Q||(Q=[]);const Ye=oe;return oe++,Q[Ye]=-1,Ye}function st(Ye){j.assert(Q!==void 0,"No labels were defined."),Q[Ye]=pe?pe.length:0}function hi(Ye){U||(U=[],X=[],q=[],Z=[]);const li=X.length;return X[li]=0,q[li]=pe?pe.length:0,U[li]=Ye,Z.push(Ye),li}function vn(){const Ye=ln();if(Ye===void 0)return j.fail("beginBlock was never called.");const li=X.length;return X[li]=1,q[li]=pe?pe.length:0,U[li]=Ye,Z.pop(),Ye}function ln(){return rl(Z)}function Un(){const Ye=ln();return Ye&&Ye.kind}function Pt(Ye){const li=lt(),En=lt();st(li),hi({kind:1,expression:Ye,startLabel:li,endLabel:En})}function Bt(){j.assert(Un()===1);const Ye=vn();st(Ye.endLabel)}function fi(){const Ye=lt(),li=lt();return st(Ye),hi({kind:0,state:0,startLabel:Ye,endLabel:li}),pc(),li}function wi(Ye){j.assert(Un()===0);let li;if(zl(Ye.name))li=Ye.name,g(Ye.name);else{const sc=Fr(Ye.name);li=Qt(sc),N||(N=new Map,R=[],t.enableSubstitution(80)),N.set(sc,!0),R[d_(Ye)]=li}const En=ln();j.assert(En.state<1);const po=En.endLabel;tc(po);const ic=lt();st(ic),En.state=1,En.catchVariable=li,En.catchLabel=ic,oo(li,r.createCallExpression(r.createPropertyAccessExpression(Ie,"sent"),void 0,[])),pc()}function Ri(){j.assert(Un()===0);const Ye=ln();j.assert(Ye.state<2);const li=Ye.endLabel;tc(li);const En=lt();st(En),Ye.state=2,Ye.finallyLabel=En}function Ai(){j.assert(Un()===0);const Ye=vn();Ye.state<2?tc(Ye.endLabel):Ve(),st(Ye.endLabel),pc(),Ye.state=3}function Xn(){hi({kind:3,isScript:!0,breakLabel:-1,continueLabel:-1})}function Di(Ye){const li=lt();return hi({kind:3,isScript:!1,breakLabel:li,continueLabel:Ye}),li}function on(){j.assert(Un()===3);const Ye=vn(),li=Ye.breakLabel;Ye.isScript||st(li)}function zi(){hi({kind:2,isScript:!0,breakLabel:-1})}function cn(){const Ye=lt();return hi({kind:2,isScript:!1,breakLabel:Ye}),Ye}function vi(){j.assert(Un()===2);const Ye=vn(),li=Ye.breakLabel;Ye.isScript||st(li)}function qo(Ye){hi({kind:4,isScript:!0,labelText:Ye,breakLabel:-1})}function Wo(Ye){const li=lt();hi({kind:4,isScript:!1,labelText:Ye,breakLabel:li})}function $o(){j.assert(Un()===4);const Ye=vn();Ye.isScript||st(Ye.breakLabel)}function Lc(Ye){return Ye.kind===2||Ye.kind===3}function vu(Ye){return Ye.kind===4}function Gu(Ye){return Ye.kind===3}function Zc(Ye,li){for(let En=li;En>=0;En--){const po=Z[En];if(vu(po)){if(po.labelText===Ye)return!0}else break}return!1}function Ls(Ye){if(Z)if(Ye)for(let li=Z.length-1;li>=0;li--){const En=Z[li];if(vu(En)&&En.labelText===Ye)return En.breakLabel;if(Lc(En)&&Zc(Ye,li-1))return En.breakLabel}else for(let li=Z.length-1;li>=0;li--){const En=Z[li];if(Lc(En))return En.breakLabel}return 0}function ja(Ye){if(Z)if(Ye)for(let li=Z.length-1;li>=0;li--){const En=Z[li];if(Gu(En)&&Zc(Ye,li-1))return En.continueLabel}else for(let li=Z.length-1;li>=0;li--){const En=Z[li];if(Gu(En))return En.continueLabel}return 0}function wf(Ye){if(Ye!==void 0&&Ye>0){re===void 0&&(re=[]);const li=r.createNumericLiteral(Number.MAX_SAFE_INTEGER);return re[Ye]===void 0?re[Ye]=[li]:re[Ye].push(li),li}return r.createOmittedExpression()}function Jo(Ye){const li=r.createNumericLiteral(Ye);return uX(li,3,zRt(Ye)),li}function kh(Ye,li){return j.assertLessThan(0,Ye,"Invalid label"),Ht(r.createReturnStatement(r.createArrayLiteralExpression([Jo(3),wf(Ye)])),li)}function md(Ye,li){return Ht(r.createReturnStatement(r.createArrayLiteralExpression(Ye?[Jo(2),Ye]:[Jo(2)])),li)}function go(Ye){return Ht(r.createCallExpression(r.createPropertyAccessExpression(Ie,"sent"),void 0,[]),Ye)}function pc(){_e(0)}function mc(Ye){Ye?_e(1,[Ye]):pc()}function oo(Ye,li,En){_e(2,[Ye,li],En)}function tc(Ye,li){_e(3,[Ye],li)}function ki(Ye,li,En){_e(4,[Ye,li],En)}function Gc(Ye,li,En){_e(5,[Ye,li],En)}function uh(Ye,li){_e(7,[Ye],li)}function sd(Ye,li){_e(6,[Ye],li)}function Pp(Ye,li){_e(8,[Ye],li)}function Nl(Ye,li){_e(9,[Ye],li)}function Ve(){_e(10)}function _e(Ye,li,En){pe===void 0&&(pe=[],de=[],ue=[]),Q===void 0&&st(lt());const po=pe.length;pe[po]=Ye,de[po]=li,ue[po]=En}function Lt(){we=0,he=0,Ae=void 0,ke=!1,Te=!1,De=void 0,qe=void 0,se=void 0,Ne=void 0,Oe=void 0;const Ye=ci();return a().createGeneratorHelper(tr(r.createFunctionExpression(void 0,void 0,void 0,void 0,[r.createParameterDeclaration(void 0,void 0,Ie)],void 0,r.createBlock(Ye,Ye.length>0)),1048576))}function ci(){if(pe){for(let Ye=0;Ye<pe.length;Ye++)Ic(Ye);Rn(pe.length)}else Rn(0);if(De){const Ye=r.createPropertyAccessExpression(Ie,"label"),li=r.createSwitchStatement(Ye,r.createCaseBlock(De));return[bh(li)]}return qe||[]}function Mi(){qe&&(Xi(!ke),ke=!1,Te=!1,he++)}function Rn(Ye){Yr(Ye)&&(Mr(Ye),Oe=void 0,Xu(void 0,void 0)),qe&&De&&Xi(!1),ds()}function Yr(Ye){if(!Te)return!0;if(!Q||!re)return!1;for(let li=0;li<Q.length;li++)if(Q[li]===Ye&&re[li])return!0;return!1}function Xi(Ye){if(De||(De=[]),qe){if(Oe)for(let li=Oe.length-1;li>=0;li--){const En=Oe[li];qe=[r.createWithStatement(En.expression,r.createBlock(qe))]}if(Ne){const{startLabel:li,catchLabel:En,finallyLabel:po,endLabel:ic}=Ne;qe.unshift(r.createExpressionStatement(r.createCallExpression(r.createPropertyAccessExpression(r.createPropertyAccessExpression(Ie,"trys"),"push"),void 0,[r.createArrayLiteralExpression([wf(li),wf(En),wf(po),wf(ic)])]))),Ne=void 0}Ye&&qe.push(r.createExpressionStatement(r.createAssignment(r.createPropertyAccessExpression(Ie,"label"),r.createNumericLiteral(he+1))))}De.push(r.createCaseClause(r.createNumericLiteral(he),qe||[])),qe=void 0}function Mr(Ye){if(Q)for(let li=0;li<Q.length;li++)Q[li]===Ye&&(Mi(),Ae===void 0&&(Ae=[]),Ae[he]===void 0?Ae[he]=[li]:Ae[he].push(li))}function ds(){if(re!==void 0&&Ae!==void 0)for(let Ye=0;Ye<Ae.length;Ye++){const li=Ae[Ye];if(li!==void 0)for(const En of li){const po=re[En];if(po!==void 0)for(const ic of po)ic.text=String(Ye)}}}function Ks(Ye){if(U)for(;we<X.length&&q[we]<=Ye;we++){const li=U[we],En=X[we];switch(li.kind){case 0:En===0?(se||(se=[]),qe||(qe=[]),se.push(Ne),Ne=li):En===1&&(Ne=se.pop());break;case 1:En===0?(Oe||(Oe=[]),Oe.push(li)):En===1&&Oe.pop();break}}}function Ic(Ye){if(Mr(Ye),Ks(Ye),ke)return;ke=!1,Te=!1;const li=pe[Ye];if(li===0)return;if(li===10)return eg();const En=de[Ye];if(li===1)return Gl(En[0]);const po=ue[Ye];switch(li){case 2:return Pu(En[0],En[1],po);case 3:return Wl(En[0],po);case 4:return Cu(En[0],En[1],po);case 5:return gm(En[0],En[1],po);case 6:return Qu(En[0],po);case 7:return kd(En[0],po);case 8:return Xu(En[0],po);case 9:return Ku(En[0],po)}}function Gl(Ye){Ye&&(qe?qe.push(Ye):qe=[Ye])}function Pu(Ye,li,En){Gl(Ht(r.createExpressionStatement(r.createAssignment(Ye,li)),En))}function Ku(Ye,li){ke=!0,Te=!0,Gl(Ht(r.createThrowStatement(Ye),li))}function Xu(Ye,li){ke=!0,Te=!0,Gl(tr(Ht(r.createReturnStatement(r.createArrayLiteralExpression(Ye?[Jo(2),Ye]:[Jo(2)])),li),768))}function Wl(Ye,li){ke=!0,Gl(tr(Ht(r.createReturnStatement(r.createArrayLiteralExpression([Jo(3),wf(Ye)])),li),768))}function Cu(Ye,li,En){Gl(tr(r.createIfStatement(li,tr(Ht(r.createReturnStatement(r.createArrayLiteralExpression([Jo(3),wf(Ye)])),En),768)),1))}function gm(Ye,li,En){Gl(tr(r.createIfStatement(r.createLogicalNot(li),tr(Ht(r.createReturnStatement(r.createArrayLiteralExpression([Jo(3),wf(Ye)])),En),768)),1))}function Qu(Ye,li){ke=!0,Gl(tr(Ht(r.createReturnStatement(r.createArrayLiteralExpression(Ye?[Jo(4),Ye]:[Jo(4)])),li),768))}function kd(Ye,li){ke=!0,Gl(tr(Ht(r.createReturnStatement(r.createArrayLiteralExpression([Jo(5),Ye])),li),768))}function eg(){ke=!0,Gl(r.createReturnStatement(r.createArrayLiteralExpression([Jo(7)])))}}function Gue(t){function r(te){switch(te){case 2:return pe;case 3:return de;default:return oe}}const{factory:a,getEmitHelperFactory:u,startLexicalEnvironment:h,endLexicalEnvironment:p,hoistVariableDeclaration:g}=t,C=t.getCompilerOptions(),b=t.getEmitResolver(),T=t.getEmitHost(),E=Ja(C),N=zh(C),R=t.onSubstituteNode,F=t.onEmitNode;t.onSubstituteNode=Je,t.onEmitNode=Dt,t.enableSubstitution(213),t.enableSubstitution(215),t.enableSubstitution(80),t.enableSubstitution(226),t.enableSubstitution(304),t.enableEmitNotification(307);const H=[];let U,q;const X=[];let Z;return q0(t,Q);function Q(te){if(te.isDeclarationFile||!(aP(te,C)||te.transformFlags&8388608||Eg(te)&&RK(C)&&C.outFile))return te;U=te,q=Vue(t,te),H[d_(te)]=q;const Gt=r(N)(te);return U=void 0,q=void 0,Z=!1,Gt}function re(){return Uv(U.fileName)&&U.commonJsModuleIndicator&&(!U.externalModuleIndicator||U.externalModuleIndicator===!0)?!1:!!(!q.exportEquals&&wd(U))}function oe(te){h();const tt=[],Gt=ah(C,"alwaysStrict")||wd(U),le=a.copyPrologue(te.statements,tt,Gt&&!Eg(te),Ae);if(re()&&fn(tt,pt()),Ft(q.exportedNames))for(let Qt=0;Qt<q.exportedNames.length;Qt+=50)fn(tt,a.createExpressionStatement(oi(q.exportedNames.slice(Qt,Qt+50),(lt,st)=>st.kind===11?a.createAssignment(a.createElementAccessExpression(a.createIdentifier("exports"),a.createStringLiteral(st.text)),lt):a.createAssignment(a.createPropertyAccessExpression(a.createIdentifier("exports"),a.createIdentifier(Fr(st))),lt),a.createVoidZero())));for(const be of q.exportedFunctions)St(tt,be);fn(tt,bt(q.externalHelpersImportDeclaration,Ae,Ps)),Sr(tt,Dn(te.statements,Ae,Ps,le)),he(tt,!1),Fv(tt,p());const Ue=a.updateSourceFile(te,Ht(a.createNodeArray(tt),te.statements));return Zb(Ue,t.readEmitHelpers()),Ue}function pe(te){const tt=a.createIdentifier("define"),Gt=bH(a,te,T,C),le=Eg(te)&&te,{aliasedModuleNames:Ue,unaliasedModuleNames:be,importAliasNames:Qt}=ue(te,!0),lt=a.updateSourceFile(te,Ht(a.createNodeArray([a.createExpressionStatement(a.createCallExpression(tt,void 0,[...Gt?[Gt]:[],a.createArrayLiteralExpression(le?w:[a.createStringLiteral("require"),a.createStringLiteral("exports"),...Ue,...be]),le?le.statements.length?le.statements[0].expression:a.createObjectLiteralExpression():a.createFunctionExpression(void 0,void 0,void 0,void 0,[a.createParameterDeclaration(void 0,void 0,"require"),a.createParameterDeclaration(void 0,void 0,"exports"),...Qt],void 0,we(te))]))]),te.statements));return Zb(lt,t.readEmitHelpers()),lt}function de(te){const{aliasedModuleNames:tt,unaliasedModuleNames:Gt,importAliasNames:le}=ue(te,!1),Ue=bH(a,te,T,C),be=a.createFunctionExpression(void 0,void 0,void 0,void 0,[a.createParameterDeclaration(void 0,void 0,"factory")],void 0,Ht(a.createBlock([a.createIfStatement(a.createLogicalAnd(a.createTypeCheck(a.createIdentifier("module"),"object"),a.createTypeCheck(a.createPropertyAccessExpression(a.createIdentifier("module"),"exports"),"object")),a.createBlock([a.createVariableStatement(void 0,[a.createVariableDeclaration("v",void 0,void 0,a.createCallExpression(a.createIdentifier("factory"),void 0,[a.createIdentifier("require"),a.createIdentifier("exports")]))]),tr(a.createIfStatement(a.createStrictInequality(a.createIdentifier("v"),a.createIdentifier("undefined")),a.createExpressionStatement(a.createAssignment(a.createPropertyAccessExpression(a.createIdentifier("module"),"exports"),a.createIdentifier("v")))),1)]),a.createIfStatement(a.createLogicalAnd(a.createTypeCheck(a.createIdentifier("define"),"function"),a.createPropertyAccessExpression(a.createIdentifier("define"),"amd")),a.createBlock([a.createExpressionStatement(a.createCallExpression(a.createIdentifier("define"),void 0,[...Ue?[Ue]:[],a.createArrayLiteralExpression([a.createStringLiteral("require"),a.createStringLiteral("exports"),...tt,...Gt]),a.createIdentifier("factory")]))])))],!0),void 0)),Qt=a.updateSourceFile(te,Ht(a.createNodeArray([a.createExpressionStatement(a.createCallExpression(be,void 0,[a.createFunctionExpression(void 0,void 0,void 0,void 0,[a.createParameterDeclaration(void 0,void 0,"require"),a.createParameterDeclaration(void 0,void 0,"exports"),...le],void 0,we(te))]))]),te.statements));return Zb(Qt,t.readEmitHelpers()),Qt}function ue(te,tt){const Gt=[],le=[],Ue=[];for(const be of te.amdDependencies)be.name?(Gt.push(a.createStringLiteral(be.path)),Ue.push(a.createParameterDeclaration(void 0,void 0,be.name))):le.push(a.createStringLiteral(be.path));for(const be of q.externalImports){const Qt=XP(a,be,U,T,b,C),lt=I3(a,be,U);Qt&&(tt&&lt?(tr(lt,8),Gt.push(Qt),Ue.push(a.createParameterDeclaration(void 0,void 0,lt))):le.push(Qt))}return{aliasedModuleNames:Gt,unaliasedModuleNames:le,importAliasNames:Ue}}function Ie(te){if(Wd(te)||Ju(te)||!XP(a,te,U,T,b,C))return;const tt=I3(a,te,U),Gt=ko(te,tt);if(Gt!==tt)return a.createExpressionStatement(a.createAssignment(tt,Gt))}function we(te){h();const tt=[],Gt=a.copyPrologue(te.statements,tt,!0,Ae);re()&&fn(tt,pt()),Ft(q.exportedNames)&&fn(tt,a.createExpressionStatement(oi(q.exportedNames,(Ue,be)=>be.kind===11?a.createAssignment(a.createElementAccessExpression(a.createIdentifier("exports"),a.createStringLiteral(be.text)),Ue):a.createAssignment(a.createPropertyAccessExpression(a.createIdentifier("exports"),a.createIdentifier(Fr(be))),Ue),a.createVoidZero())));for(const Ue of q.exportedFunctions)St(tt,Ue);fn(tt,bt(q.externalHelpersImportDeclaration,Ae,Ps)),N===2&&Sr(tt,es(q.externalImports,Ie)),Sr(tt,Dn(te.statements,Ae,Ps,Gt)),he(tt,!0),Fv(tt,p());const le=a.createBlock(tt,!0);return Z&&MP(le,URt),le}function he(te,tt){if(q.exportEquals){const Gt=bt(q.exportEquals.expression,De,jt);if(Gt)if(tt){const le=a.createReturnStatement(Gt);Ht(le,q.exportEquals),tr(le,3840),te.push(le)}else{const le=a.createExpressionStatement(a.createAssignment(a.createPropertyAccessExpression(a.createIdentifier("module"),"exports"),Gt));Ht(le,q.exportEquals),tr(le,3072),te.push(le)}}}function Ae(te){switch(te.kind){case 272:return ls(te);case 271:return Mn(te);case 278:return Zs(te);case 277:return at(te);default:return ke(te)}}function ke(te){switch(te.kind){case 243:return dr(te);case 262:return yi(te);case 263:return Sn(te);case 248:return Oe(te,!0);case 249:return He(te);case 250:return Pe(te);case 246:return We(te);case 247:return ze(te);case 256:return Nt(te);case 254:return $e(te);case 245:return et(te);case 255:return Me(te);case 269:return ut(te);case 296:return wt(te);case 297:return Et(te);case 258:return dt(te);case 299:return zt(te);case 241:return Ei(te);default:return De(te)}}function Te(te,tt){if(!(te.transformFlags&276828160))return te;switch(te.kind){case 248:return Oe(te,!1);case 244:return tn(te);case 217:return xn(te,tt);case 354:return Pn(te,tt);case 213:if(zp(te)&&T.shouldTransformImportCall(U))return Fi(te);break;case 226:if(pS(te))return Ne(te,tt);break;case 224:case 225:return _i(te,tt)}return dn(te,De,t)}function De(te){return Te(te,!1)}function qe(te){return Te(te,!0)}function se(te){if(Aa(te))for(const tt of te.properties)switch(tt.kind){case 303:if(se(tt.initializer))return!0;break;case 304:if(se(tt.name))return!0;break;case 305:if(se(tt.expression))return!0;break;case 174:case 177:case 178:return!1;default:j.assertNever(tt,"Unhandled object member kind")}else if(jf(te)){for(const tt of te.elements)if(Km(tt)){if(se(tt.expression))return!0}else if(se(tt))return!0}else if(ot(te))return P(gr(te))>(AX(te)?1:0);return!1}function Ne(te,tt){return se(te.left)?HI(te,De,t,0,!tt,us):dn(te,De,t)}function Oe(te,tt){if(tt&&te.initializer&&Sf(te.initializer)&&!(te.initializer.flags&7)){const Gt=Ji(void 0,te.initializer,!1);if(Gt){const le=[],Ue=bt(te.initializer,qe,Sf),be=a.createVariableStatement(void 0,Ue);le.push(be),Sr(le,Gt);const Qt=bt(te.condition,De,jt),lt=bt(te.incrementor,qe,jt),st=u_(te.statement,tt?ke:De,t);return le.push(a.updateForStatement(te,void 0,Qt,lt,st)),le}}return a.updateForStatement(te,bt(te.initializer,qe,Hm),bt(te.condition,De,jt),bt(te.incrementor,qe,jt),u_(te.statement,tt?ke:De,t))}function He(te){if(Sf(te.initializer)&&!(te.initializer.flags&7)){const tt=Ji(void 0,te.initializer,!0);if(Ft(tt)){const Gt=bt(te.initializer,qe,Hm),le=bt(te.expression,De,jt),Ue=u_(te.statement,ke,t),be=Xo(Ue)?a.updateBlock(Ue,[...tt,...Ue.statements]):a.createBlock([...tt,Ue],!0);return a.updateForInStatement(te,Gt,le,be)}}return a.updateForInStatement(te,bt(te.initializer,qe,Hm),bt(te.expression,De,jt),u_(te.statement,ke,t))}function Pe(te){if(Sf(te.initializer)&&!(te.initializer.flags&7)){const tt=Ji(void 0,te.initializer,!0),Gt=bt(te.initializer,qe,Hm),le=bt(te.expression,De,jt);let Ue=u_(te.statement,ke,t);return Ft(tt)&&(Ue=Xo(Ue)?a.updateBlock(Ue,[...tt,...Ue.statements]):a.createBlock([...tt,Ue],!0)),a.updateForOfStatement(te,te.awaitModifier,Gt,le,Ue)}return a.updateForOfStatement(te,te.awaitModifier,bt(te.initializer,qe,Hm),bt(te.expression,De,jt),u_(te.statement,ke,t))}function We(te){return a.updateDoStatement(te,u_(te.statement,ke,t),bt(te.expression,De,jt))}function ze(te){return a.updateWhileStatement(te,bt(te.expression,De,jt),u_(te.statement,ke,t))}function Nt(te){return a.updateLabeledStatement(te,te.label,bt(te.statement,ke,Ps,a.liftToBlock)??Ht(a.createEmptyStatement(),te.statement))}function $e(te){return a.updateWithStatement(te,bt(te.expression,De,jt),j.checkDefined(bt(te.statement,ke,Ps,a.liftToBlock)))}function et(te){return a.updateIfStatement(te,bt(te.expression,De,jt),bt(te.thenStatement,ke,Ps,a.liftToBlock)??a.createBlock([]),bt(te.elseStatement,ke,Ps,a.liftToBlock))}function Me(te){return a.updateSwitchStatement(te,bt(te.expression,De,jt),j.checkDefined(bt(te.caseBlock,ke,w7)))}function ut(te){return a.updateCaseBlock(te,Dn(te.clauses,ke,CG))}function wt(te){return a.updateCaseClause(te,bt(te.expression,De,jt),Dn(te.statements,ke,Ps))}function Et(te){return dn(te,ke,t)}function dt(te){return dn(te,ke,t)}function zt(te){return a.updateCatchClause(te,te.variableDeclaration,j.checkDefined(bt(te.block,ke,Xo)))}function Ei(te){return te=dn(te,ke,t),te}function tn(te){return a.updateExpressionStatement(te,bt(te.expression,qe,jt))}function xn(te,tt){return a.updateParenthesizedExpression(te,bt(te.expression,tt?qe:De,jt))}function Pn(te,tt){return a.updatePartiallyEmittedExpression(te,bt(te.expression,tt?qe:De,jt))}function _i(te,tt){if((te.operator===46||te.operator===47)&&ot(te.operand)&&!zl(te.operand)&&!iC(te.operand)&&!Sce(te.operand)){const Gt=gr(te.operand);if(Gt){let le,Ue=bt(te.operand,De,jt);n2(te)?Ue=a.updatePrefixUnaryExpression(te,Ue):(Ue=a.updatePostfixUnaryExpression(te,Ue),tt||(le=a.createTempVariable(g),Ue=a.createAssignment(le,Ue),Ht(Ue,te)),Ue=a.createComma(Ue,a.cloneNode(te.operand)),Ht(Ue,te));for(const be of Gt)X[Sc(Ue)]=!0,Ue=Ze(be,Ue),Ht(Ue,te);return le&&(X[Sc(Ue)]=!0,Ue=a.createComma(Ue,le),Ht(Ue,te)),Ue}}return dn(te,De,t)}function Fi(te){if(N===0&&E>=7)return dn(te,De,t);const tt=XP(a,te,U,T,b,C),Gt=bt(Ra(te.arguments),De,jt),le=tt&&(!Gt||!Ha(Gt)||Gt.text!==tt.text)?tt:Gt,Ue=!!(te.transformFlags&16384);switch(C.module){case 2:return pn(le,Ue);case 3:return On(le??a.createVoidZero(),Ue);case 1:default:return qr(le)}}function On(te,tt){if(Z=!0,fD(te)){const Gt=zl(te)?te:Ha(te)?a.createStringLiteralFromNode(te):tr(Ht(a.cloneNode(te),te),3072);return a.createConditionalExpression(a.createIdentifier("__syncRequire"),void 0,qr(te),void 0,pn(Gt,tt))}else{const Gt=a.createTempVariable(g);return a.createComma(a.createAssignment(Gt,te),a.createConditionalExpression(a.createIdentifier("__syncRequire"),void 0,qr(Gt,!0),void 0,pn(Gt,tt)))}}function pn(te,tt){const Gt=a.createUniqueName("resolve"),le=a.createUniqueName("reject"),Ue=[a.createParameterDeclaration(void 0,void 0,Gt),a.createParameterDeclaration(void 0,void 0,le)],be=a.createBlock([a.createExpressionStatement(a.createCallExpression(a.createIdentifier("require"),void 0,[a.createArrayLiteralExpression([te||a.createOmittedExpression()]),Gt,le]))]);let Qt;E>=2?Qt=a.createArrowFunction(void 0,void 0,Ue,void 0,void 0,be):(Qt=a.createFunctionExpression(void 0,void 0,void 0,void 0,Ue,void 0,be),tt&&tr(Qt,16));const lt=a.createNewExpression(a.createIdentifier("Promise"),void 0,[Qt]);return zv(C)?a.createCallExpression(a.createPropertyAccessExpression(lt,a.createIdentifier("then")),void 0,[u().createImportStarCallbackHelper()]):lt}function qr(te,tt){const Gt=te&&!Uy(te)&&!tt,le=a.createCallExpression(a.createPropertyAccessExpression(a.createIdentifier("Promise"),"resolve"),void 0,Gt?E>=2?[a.createTemplateExpression(a.createTemplateHead(""),[a.createTemplateSpan(te,a.createTemplateTail(""))])]:[a.createCallExpression(a.createPropertyAccessExpression(a.createStringLiteral(""),"concat"),void 0,[te])]:[]);let Ue=a.createCallExpression(a.createIdentifier("require"),void 0,Gt?[a.createIdentifier("s")]:te?[te]:[]);zv(C)&&(Ue=u().createImportStarHelper(Ue));const be=Gt?[a.createParameterDeclaration(void 0,void 0,"s")]:[];let Qt;return E>=2?Qt=a.createArrowFunction(void 0,void 0,be,void 0,void 0,Ue):Qt=a.createFunctionExpression(void 0,void 0,void 0,void 0,be,void 0,a.createBlock([a.createReturnStatement(Ue)])),a.createCallExpression(a.createPropertyAccessExpression(le,"then"),void 0,[Qt])}function Fs(te,tt){return!zv(C)||u0(te)&2?tt:ONe(te)?u().createImportStarHelper(tt):tt}function ko(te,tt){return!zv(C)||u0(te)&2?tt:gQ(te)?u().createImportStarHelper(tt):Wue(te)?u().createImportDefaultHelper(tt):tt}function ls(te){let tt;const Gt=Y6(te);if(N!==2)if(te.importClause){const le=[];Gt&&!hP(te)?le.push(a.createVariableDeclaration(a.cloneNode(Gt.name),void 0,void 0,ko(te,Qs(te)))):(le.push(a.createVariableDeclaration(a.getGeneratedNameForNode(te),void 0,void 0,ko(te,Qs(te)))),Gt&&hP(te)&&le.push(a.createVariableDeclaration(a.cloneNode(Gt.name),void 0,void 0,a.getGeneratedNameForNode(te)))),tt=fn(tt,Ir(Ht(a.createVariableStatement(void 0,a.createVariableDeclarationList(le,E>=2?2:0)),te),te))}else return Ir(Ht(a.createExpressionStatement(Qs(te)),te),te);else Gt&&hP(te)&&(tt=fn(tt,a.createVariableStatement(void 0,a.createVariableDeclarationList([Ir(Ht(a.createVariableDeclaration(a.cloneNode(Gt.name),void 0,void 0,a.getGeneratedNameForNode(te)),te),te)],E>=2?2:0))));return tt=Gs(tt,te),Sg(tt)}function Qs(te){const tt=XP(a,te,U,T,b,C),Gt=[];return tt&&Gt.push(tt),a.createCallExpression(a.createIdentifier("require"),void 0,Gt)}function Mn(te){j.assert(qk(te),"import= for internal module references should be handled in an earlier transformer.");let tt;return N!==2?Zr(te,32)?tt=fn(tt,Ir(Ht(a.createExpressionStatement(Ze(te.name,Qs(te))),te),te)):tt=fn(tt,Ir(Ht(a.createVariableStatement(void 0,a.createVariableDeclarationList([a.createVariableDeclaration(a.cloneNode(te.name),void 0,void 0,Qs(te))],E>=2?2:0)),te),te)):Zr(te,32)&&(tt=fn(tt,Ir(Ht(a.createExpressionStatement(Ze(a.getExportName(te),a.getLocalName(te))),te),te))),tt=ma(tt,te),Sg(tt)}function Zs(te){if(!te.moduleSpecifier)return;const tt=a.getGeneratedNameForNode(te);if(te.exportClause&&Xm(te.exportClause)){const Gt=[];N!==2&&Gt.push(Ir(Ht(a.createVariableStatement(void 0,a.createVariableDeclarationList([a.createVariableDeclaration(tt,void 0,void 0,Qs(te))])),te),te));for(const le of te.exportClause.elements){const Ue=le.propertyName||le.name,Qt=!!zv(C)&&!(u0(te)&2)&&My(Ue)?u().createImportDefaultHelper(tt):tt,lt=Ue.kind===11?a.createElementAccessExpression(Qt,Ue):a.createPropertyAccessExpression(Qt,Ue);Gt.push(Ir(Ht(a.createExpressionStatement(Ze(le.name.kind===11?a.cloneNode(le.name):a.getExportName(le),lt,void 0,!0)),le),le))}return Sg(Gt)}else if(te.exportClause){const Gt=[];return Gt.push(Ir(Ht(a.createExpressionStatement(Ze(a.cloneNode(te.exportClause.name),Fs(te,N!==2?Qs(te):OG(te)||te.exportClause.name.kind===11?tt:a.createIdentifier(Fr(te.exportClause.name))))),te),te)),Sg(Gt)}else return Ir(Ht(a.createExpressionStatement(u().createExportStarHelper(N!==2?Qs(te):tt)),te),te)}function at(te){if(!te.isExportEquals)return Se(a.createIdentifier("default"),bt(te.expression,De,jt),te,!0)}function yi(te){let tt;return Zr(te,32)?tt=fn(tt,Ir(Ht(a.createFunctionDeclaration(Dn(te.modifiers,gt,Fa),te.asteriskToken,a.getDeclarationName(te,!0,!0),void 0,Dn(te.parameters,De,$s),void 0,dn(te.body,De,t)),te),te)):tt=fn(tt,dn(te,De,t)),Sg(tt)}function Sn(te){let tt;return Zr(te,32)?tt=fn(tt,Ir(Ht(a.createClassDeclaration(Dn(te.modifiers,gt,Ul),a.getDeclarationName(te,!0,!0),void 0,Dn(te.heritageClauses,De,Tp),Dn(te.members,De,Od)),te),te)):tt=fn(tt,dn(te,De,t)),tt=St(tt,te),Sg(tt)}function dr(te){let tt,Gt,le;if(Zr(te,32)){let Ue,be=!1;for(const Qt of te.declarationList.declarations)if(ot(Qt.name)&&iC(Qt.name))if(Ue||(Ue=Dn(te.modifiers,gt,Fa)),Qt.initializer){const lt=a.updateVariableDeclaration(Qt,Qt.name,void 0,void 0,Ze(Qt.name,bt(Qt.initializer,De,jt)));Gt=fn(Gt,lt)}else Gt=fn(Gt,Qt);else if(Qt.initializer)if(!ta(Qt.name)&&(xl(Qt.initializer)||ml(Qt.initializer)||fd(Qt.initializer))){const lt=a.createAssignment(Ht(a.createPropertyAccessExpression(a.createIdentifier("exports"),Qt.name),Qt.name),a.createIdentifier(Lg(Qt.name))),st=a.createVariableDeclaration(Qt.name,Qt.exclamationToken,Qt.type,bt(Qt.initializer,De,jt));Gt=fn(Gt,st),le=fn(le,lt),be=!0}else le=fn(le,Xr(Qt));if(Gt&&(tt=fn(tt,a.updateVariableStatement(te,Ue,a.updateVariableDeclarationList(te.declarationList,Gt)))),le){const Qt=Ir(Ht(a.createExpressionStatement(a.inlineExpressions(le)),te),te);be&&oH(Qt),tt=fn(tt,Qt)}}else tt=fn(tt,dn(te,De,t));return tt=ka(tt,te),Sg(tt)}function us(te,tt,Gt){const le=gr(te);if(le){let Ue=AX(te)?tt:a.createAssignment(te,tt);for(const be of le)tr(Ue,8),Ue=Ze(be,Ue,Gt);return Ue}return a.createAssignment(te,tt)}function Xr(te){return ta(te.name)?HI(bt(te,De,UV),De,t,0,!1,us):a.createAssignment(Ht(a.createPropertyAccessExpression(a.createIdentifier("exports"),te.name),te.name),te.initializer?bt(te.initializer,De,jt):a.createVoidZero())}function Gs(te,tt){if(q.exportEquals)return te;const Gt=tt.importClause;if(!Gt)return te;const le=new V3;Gt.name&&(te=ri(te,le,Gt));const Ue=Gt.namedBindings;if(Ue)switch(Ue.kind){case 274:te=ri(te,le,Ue);break;case 275:for(const be of Ue.elements)te=ri(te,le,be,!0);break}return te}function ma(te,tt){return q.exportEquals?te:ri(te,new V3,tt)}function ka(te,tt){return Ji(te,tt.declarationList,!1)}function Ji(te,tt,Gt){if(q.exportEquals)return te;for(const le of tt.declarations)te=ac(te,le,Gt);return te}function ac(te,tt,Gt){if(q.exportEquals)return te;if(ta(tt.name))for(const le of tt.name.elements)Bd(le)||(te=ac(te,le,Gt));else!zl(tt.name)&&(!_s(tt)||tt.initializer||Gt)&&(te=ri(te,new V3,tt));return te}function St(te,tt){if(q.exportEquals)return te;const Gt=new V3;if(Zr(tt,32)){const le=Zr(tt,2048)?a.createIdentifier("default"):a.getDeclarationName(tt);te=xe(te,Gt,le,a.getLocalName(tt),tt)}return tt.name&&(te=ri(te,Gt,tt)),te}function ri(te,tt,Gt,le){const Ue=a.getDeclarationName(Gt),be=q.exportSpecifiers.get(Ue);if(be)for(const Qt of be)te=xe(te,tt,Qt.name,Ue,Qt.name,void 0,le);return te}function xe(te,tt,Gt,le,Ue,be,Qt){if(Gt.kind!==11){if(tt.has(Gt))return te;tt.set(Gt,!0)}return te=fn(te,Se(Gt,le,Ue,be,Qt)),te}function pt(){const te=a.createExpressionStatement(a.createCallExpression(a.createPropertyAccessExpression(a.createIdentifier("Object"),"defineProperty"),void 0,[a.createIdentifier("exports"),a.createStringLiteral("__esModule"),a.createObjectLiteralExpression([a.createPropertyAssignment("value",a.createTrue())])]));return tr(te,2097152),te}function Se(te,tt,Gt,le,Ue){const be=Ht(a.createExpressionStatement(Ze(te,tt,void 0,Ue)),Gt);return bh(be),le||tr(be,3072),be}function Ze(te,tt,Gt,le){return Ht(le?a.createCallExpression(a.createPropertyAccessExpression(a.createIdentifier("Object"),"defineProperty"),void 0,[a.createIdentifier("exports"),a.createStringLiteralFromNode(te),a.createObjectLiteralExpression([a.createPropertyAssignment("enumerable",a.createTrue()),a.createPropertyAssignment("get",a.createFunctionExpression(void 0,void 0,void 0,void 0,[],void 0,a.createBlock([a.createReturnStatement(tt)])))])]):a.createAssignment(te.kind===11?a.createElementAccessExpression(a.createIdentifier("exports"),a.cloneNode(te)):a.createPropertyAccessExpression(a.createIdentifier("exports"),a.cloneNode(te)),tt),Gt)}function gt(te){switch(te.kind){case 95:case 90:return}return te}function Dt(te,tt,Gt){tt.kind===307?(U=tt,q=H[d_(U)],F(te,tt,Gt),U=void 0,q=void 0):F(te,tt,Gt)}function Je(te,tt){return tt=R(te,tt),tt.id&&X[tt.id]?tt:te===1?Ct(tt):lh(tt)?Rt(tt):tt}function Rt(te){const tt=te.name,Gt=Ni(tt);if(Gt!==tt){if(te.objectAssignmentInitializer){const le=a.createAssignment(Gt,te.objectAssignmentInitializer);return Ht(a.createPropertyAssignment(tt,le),te)}return Ht(a.createPropertyAssignment(tt,Gt),te)}return te}function Ct(te){switch(te.kind){case 80:return Ni(te);case 213:return ii(te);case 215:return vt(te);case 226:return ji(te)}return te}function ii(te){if(ot(te.expression)){const tt=Ni(te.expression);if(X[Sc(tt)]=!0,!ot(tt)&&!(Ya(te.expression)&8192))return AP(a.updateCallExpression(te,tt,void 0,te.arguments),16)}return te}function vt(te){if(ot(te.tag)){const tt=Ni(te.tag);if(X[Sc(tt)]=!0,!ot(tt)&&!(Ya(te.tag)&8192))return AP(a.updateTaggedTemplateExpression(te,tt,void 0,te.template),16)}return te}function Ni(te){var tt,Gt;if(Ya(te)&8192){const le=MX(U);return le?a.createPropertyAccessExpression(le,te):te}else if(!(zl(te)&&!(te.emitNode.autoGenerate.flags&64))&&!iC(te)){const le=b.getReferencedExportContainer(te,AX(te));if(le&&le.kind===307)return Ht(a.createPropertyAccessExpression(a.createIdentifier("exports"),a.cloneNode(te)),te);const Ue=b.getReferencedImportDeclaration(te);if(Ue){if(H0(Ue))return Ht(a.createPropertyAccessExpression(a.getGeneratedNameForNode(Ue.parent),a.createIdentifier("default")),te);if(l_(Ue)){const be=Ue.propertyName||Ue.name,Qt=a.getGeneratedNameForNode(((Gt=(tt=Ue.parent)==null?void 0:tt.parent)==null?void 0:Gt.parent)||Ue);return Ht(be.kind===11?a.createElementAccessExpression(Qt,a.cloneNode(be)):a.createPropertyAccessExpression(Qt,a.cloneNode(be)),te)}}}return te}function ji(te){if(Gb(te.operatorToken.kind)&&ot(te.left)&&(!zl(te.left)||BW(te.left))&&!iC(te.left)){const tt=gr(te.left);if(tt){let Gt=te;for(const le of tt)X[Sc(Gt)]=!0,Gt=Ze(le,Gt,te);return Gt}}return te}function gr(te){if(zl(te)){if(BW(te)){const tt=q==null?void 0:q.exportSpecifiers.get(te);if(tt){const Gt=[];for(const le of tt)Gt.push(le.name);return Gt}}}else{const tt=b.getReferencedImportDeclaration(te);if(tt)return q==null?void 0:q.exportedBindings[d_(tt)];const Gt=new Set,le=b.getReferencedValueDeclarations(te);if(le){for(const Ue of le){const be=q==null?void 0:q.exportedBindings[d_(Ue)];if(be)for(const Qt of be)Gt.add(Qt)}if(Gt.size)return as(Gt)}}}}var URt={name:"typescript:dynamicimport-sync-require",scoped:!0,text:`
+ var __syncRequire = typeof module === "object" && typeof module.exports === "object";`};function lLe(t){const{factory:r,startLexicalEnvironment:a,endLexicalEnvironment:u,hoistVariableDeclaration:h}=t,p=t.getCompilerOptions(),g=t.getEmitResolver(),C=t.getEmitHost(),b=t.onSubstituteNode,T=t.onEmitNode;t.onSubstituteNode=Ze,t.onEmitNode=Se,t.enableSubstitution(80),t.enableSubstitution(304),t.enableSubstitution(226),t.enableSubstitution(236),t.enableEmitNotification(307);const E=[],N=[],R=[],F=[];let H,U,q,X,Z,Q,re;return q0(t,oe);function oe(te){if(te.isDeclarationFile||!(aP(te,p)||te.transformFlags&8388608))return te;const tt=d_(te);H=te,Q=te,U=E[tt]=Vue(t,te),q=r.createUniqueName("exports"),N[tt]=q,X=F[tt]=r.createUniqueName("context");const Gt=pe(U.externalImports),le=de(te,Gt),Ue=r.createFunctionExpression(void 0,void 0,void 0,void 0,[r.createParameterDeclaration(void 0,void 0,q),r.createParameterDeclaration(void 0,void 0,X)],void 0,le),be=bH(r,te,C,p),Qt=r.createArrayLiteralExpression(qt(Gt,st=>st.name)),lt=tr(r.updateSourceFile(te,Ht(r.createNodeArray([r.createExpressionStatement(r.createCallExpression(r.createPropertyAccessExpression(r.createIdentifier("System"),"register"),void 0,be?[be,Qt,Ue]:[Qt,Ue]))]),te.statements)),2048);return p.outFile||yEe(lt,le,st=>!st.scoped),re&&(R[tt]=re,re=void 0),H=void 0,U=void 0,q=void 0,X=void 0,Z=void 0,Q=void 0,lt}function pe(te){const tt=new Map,Gt=[];for(const le of te){const Ue=XP(r,le,H,C,g,p);if(Ue){const be=Ue.text,Qt=tt.get(be);Qt!==void 0?Gt[Qt].externalImports.push(le):(tt.set(be,Gt.length),Gt.push({name:Ue,externalImports:[le]}))}}return Gt}function de(te,tt){const Gt=[];a();const le=ah(p,"alwaysStrict")||wd(H),Ue=r.copyPrologue(te.statements,Gt,le,he);Gt.push(r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration("__moduleName",void 0,void 0,r.createLogicalAnd(X,r.createPropertyAccessExpression(X,"id")))]))),bt(U.externalHelpersImportDeclaration,he,Ps);const be=Dn(te.statements,he,Ps,Ue);Sr(Gt,Z),Fv(Gt,u());const Qt=ue(Gt),lt=te.transformFlags&2097152?r.createModifiersFromModifierFlags(1024):void 0,st=r.createObjectLiteralExpression([r.createPropertyAssignment("setters",we(Qt,tt)),r.createPropertyAssignment("execute",r.createFunctionExpression(lt,void 0,void 0,void 0,[],void 0,r.createBlock(be,!0)))],!0);return Gt.push(r.createReturnStatement(st)),r.createBlock(Gt,!0)}function ue(te){if(!U.hasExportStarsToExportValues)return;if(!Ft(U.exportedNames)&&U.exportedFunctions.size===0&&U.exportSpecifiers.size===0){let Ue=!1;for(const be of U.externalImports)if(be.kind===278&&be.exportClause){Ue=!0;break}if(!Ue){const be=Ie(void 0);return te.push(be),be.name}}const tt=[];if(U.exportedNames)for(const Ue of U.exportedNames)My(Ue)||tt.push(r.createPropertyAssignment(r.createStringLiteralFromNode(Ue),r.createTrue()));for(const Ue of U.exportedFunctions)Zr(Ue,2048)||(j.assert(!!Ue.name),tt.push(r.createPropertyAssignment(r.createStringLiteralFromNode(Ue.name),r.createTrue())));const Gt=r.createUniqueName("exportedNames");te.push(r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration(Gt,void 0,void 0,r.createObjectLiteralExpression(tt,!0))])));const le=Ie(Gt);return te.push(le),le.name}function Ie(te){const tt=r.createUniqueName("exportStar"),Gt=r.createIdentifier("m"),le=r.createIdentifier("n"),Ue=r.createIdentifier("exports");let be=r.createStrictInequality(le,r.createStringLiteral("default"));return te&&(be=r.createLogicalAnd(be,r.createLogicalNot(r.createCallExpression(r.createPropertyAccessExpression(te,"hasOwnProperty"),void 0,[le])))),r.createFunctionDeclaration(void 0,void 0,tt,void 0,[r.createParameterDeclaration(void 0,void 0,Gt)],void 0,r.createBlock([r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration(Ue,void 0,void 0,r.createObjectLiteralExpression([]))])),r.createForInStatement(r.createVariableDeclarationList([r.createVariableDeclaration(le)]),Gt,r.createBlock([tr(r.createIfStatement(be,r.createExpressionStatement(r.createAssignment(r.createElementAccessExpression(Ue,le),r.createElementAccessExpression(Gt,le)))),1)])),r.createExpressionStatement(r.createCallExpression(q,void 0,[Ue]))],!0))}function we(te,tt){const Gt=[];for(const le of tt){const Ue=O(le.externalImports,lt=>I3(r,lt,H)),be=Ue?r.getGeneratedNameForNode(Ue):r.createUniqueName(""),Qt=[];for(const lt of le.externalImports){const st=I3(r,lt,H);switch(lt.kind){case 272:if(!lt.importClause)break;case 271:j.assert(st!==void 0),Qt.push(r.createExpressionStatement(r.createAssignment(st,be))),Zr(lt,32)&&Qt.push(r.createExpressionStatement(r.createCallExpression(q,void 0,[r.createStringLiteral(Fr(st)),be])));break;case 278:if(j.assert(st!==void 0),lt.exportClause)if(Xm(lt.exportClause)){const hi=[];for(const vn of lt.exportClause.elements)hi.push(r.createPropertyAssignment(r.createStringLiteral(tx(vn.name)),r.createElementAccessExpression(be,r.createStringLiteral(tx(vn.propertyName||vn.name)))));Qt.push(r.createExpressionStatement(r.createCallExpression(q,void 0,[r.createObjectLiteralExpression(hi,!0)])))}else Qt.push(r.createExpressionStatement(r.createCallExpression(q,void 0,[r.createStringLiteral(tx(lt.exportClause.name)),be])));else Qt.push(r.createExpressionStatement(r.createCallExpression(te,void 0,[be])));break}}Gt.push(r.createFunctionExpression(void 0,void 0,void 0,void 0,[r.createParameterDeclaration(void 0,void 0,be)],void 0,r.createBlock(Qt,!0)))}return r.createArrayLiteralExpression(Gt,!0)}function he(te){switch(te.kind){case 272:return Ae(te);case 271:return Te(te);case 278:return ke(te);case 277:return De(te);default:return tn(te)}}function Ae(te){let tt;return te.importClause&&h(I3(r,te,H)),Sg($e(tt,te))}function ke(te){j.assertIsDefined(te)}function Te(te){j.assert(qk(te),"import= for internal module references should be handled in an earlier transformer.");let tt;return h(I3(r,te,H)),Sg(et(tt,te))}function De(te){if(te.isExportEquals)return;const tt=bt(te.expression,Xr,jt);return zt(r.createIdentifier("default"),tt,!0)}function qe(te){Zr(te,32)?Z=fn(Z,r.updateFunctionDeclaration(te,Dn(te.modifiers,pt,Ul),te.asteriskToken,r.getDeclarationName(te,!0,!0),void 0,Dn(te.parameters,Xr,$s),void 0,bt(te.body,Xr,Xo))):Z=fn(Z,dn(te,Xr,t)),Z=wt(Z,te)}function se(te){let tt;const Gt=r.getLocalName(te);return h(Gt),tt=fn(tt,Ht(r.createExpressionStatement(r.createAssignment(Gt,Ht(r.createClassExpression(Dn(te.modifiers,pt,Ul),te.name,void 0,Dn(te.heritageClauses,Xr,Tp),Dn(te.members,Xr,Od)),te))),te)),tt=wt(tt,te),Sg(tt)}function Ne(te){if(!He(te.declarationList))return bt(te,Xr,Ps);let tt;if(nV(te.declarationList)||iV(te.declarationList)){const Gt=Dn(te.modifiers,pt,Ul),le=[];for(const be of te.declarationList.declarations)le.push(r.updateVariableDeclaration(be,r.getGeneratedNameForNode(be.name),void 0,void 0,Pe(be,!1)));const Ue=r.updateVariableDeclarationList(te.declarationList,le);tt=fn(tt,r.updateVariableStatement(te,Gt,Ue))}else{let Gt;const le=Zr(te,32);for(const Ue of te.declarationList.declarations)Ue.initializer?Gt=fn(Gt,Pe(Ue,le)):Oe(Ue);Gt&&(tt=fn(tt,Ht(r.createExpressionStatement(r.inlineExpressions(Gt)),te)))}return tt=Me(tt,te,!1),Sg(tt)}function Oe(te){if(ta(te.name))for(const tt of te.name.elements)Bd(tt)||Oe(tt);else h(r.cloneNode(te.name))}function He(te){return(Ya(te)&4194304)===0&&(Q.kind===307||(Ql(te).flags&7)===0)}function Pe(te,tt){const Gt=tt?We:ze;return ta(te.name)?HI(te,Xr,t,0,!1,Gt):te.initializer?Gt(te.name,bt(te.initializer,Xr,jt)):te.name}function We(te,tt,Gt){return Nt(te,tt,Gt,!0)}function ze(te,tt,Gt){return Nt(te,tt,Gt,!1)}function Nt(te,tt,Gt,le){return h(r.cloneNode(te)),le?Ei(te,ji(Ht(r.createAssignment(te,tt),Gt))):ji(Ht(r.createAssignment(te,tt),Gt))}function $e(te,tt){if(U.exportEquals)return te;const Gt=tt.importClause;if(!Gt)return te;Gt.name&&(te=Et(te,Gt));const le=Gt.namedBindings;if(le)switch(le.kind){case 274:te=Et(te,le);break;case 275:for(const Ue of le.elements)te=Et(te,Ue);break}return te}function et(te,tt){return U.exportEquals?te:Et(te,tt)}function Me(te,tt,Gt){if(U.exportEquals)return te;for(const le of tt.declarationList.declarations)(le.initializer||Gt)&&(te=ut(te,le));return te}function ut(te,tt,Gt){if(U.exportEquals)return te;if(ta(tt.name))for(const le of tt.name.elements)Bd(le)||(te=ut(te,le));else zl(tt.name)||(te=Et(te,tt,void 0));return te}function wt(te,tt){if(U.exportEquals)return te;let Gt;if(Zr(tt,32)){const le=Zr(tt,2048)?r.createStringLiteral("default"):tt.name;te=dt(te,le,r.getLocalName(tt)),Gt=Lg(le)}return tt.name&&(te=Et(te,tt,Gt)),te}function Et(te,tt,Gt){if(U.exportEquals)return te;const le=r.getDeclarationName(tt),Ue=U.exportSpecifiers.get(le);if(Ue)for(const be of Ue)tx(be.name)!==Gt&&(te=dt(te,be.name,le));return te}function dt(te,tt,Gt,le){return te=fn(te,zt(tt,Gt,le)),te}function zt(te,tt,Gt){const le=r.createExpressionStatement(Ei(te,tt));return bh(le),Gt||tr(le,3072),le}function Ei(te,tt){const Gt=ot(te)?r.createStringLiteralFromNode(te):te;return tr(tt,Ya(tt)|3072),Sd(r.createCallExpression(q,void 0,[Gt,tt]),tt)}function tn(te){switch(te.kind){case 243:return Ne(te);case 262:return qe(te);case 263:return se(te);case 248:return xn(te,!0);case 249:return Pn(te);case 250:return _i(te);case 246:return pn(te);case 247:return qr(te);case 256:return Fs(te);case 254:return ko(te);case 245:return ls(te);case 255:return Qs(te);case 269:return Mn(te);case 296:return Zs(te);case 297:return at(te);case 258:return yi(te);case 299:return Sn(te);case 241:return dr(te);default:return Xr(te)}}function xn(te,tt){const Gt=Q;return Q=te,te=r.updateForStatement(te,bt(te.initializer,tt?On:Gs,Hm),bt(te.condition,Xr,jt),bt(te.incrementor,Gs,jt),u_(te.statement,tt?tn:Xr,t)),Q=Gt,te}function Pn(te){const tt=Q;return Q=te,te=r.updateForInStatement(te,On(te.initializer),bt(te.expression,Xr,jt),u_(te.statement,tn,t)),Q=tt,te}function _i(te){const tt=Q;return Q=te,te=r.updateForOfStatement(te,te.awaitModifier,On(te.initializer),bt(te.expression,Xr,jt),u_(te.statement,tn,t)),Q=tt,te}function Fi(te){return Sf(te)&&He(te)}function On(te){if(Fi(te)){let tt;for(const Gt of te.declarations)tt=fn(tt,Pe(Gt,!1)),Gt.initializer||Oe(Gt);return tt?r.inlineExpressions(tt):r.createOmittedExpression()}else return bt(te,Gs,Hm)}function pn(te){return r.updateDoStatement(te,u_(te.statement,tn,t),bt(te.expression,Xr,jt))}function qr(te){return r.updateWhileStatement(te,bt(te.expression,Xr,jt),u_(te.statement,tn,t))}function Fs(te){return r.updateLabeledStatement(te,te.label,bt(te.statement,tn,Ps,r.liftToBlock)??r.createExpressionStatement(r.createIdentifier("")))}function ko(te){return r.updateWithStatement(te,bt(te.expression,Xr,jt),j.checkDefined(bt(te.statement,tn,Ps,r.liftToBlock)))}function ls(te){return r.updateIfStatement(te,bt(te.expression,Xr,jt),bt(te.thenStatement,tn,Ps,r.liftToBlock)??r.createBlock([]),bt(te.elseStatement,tn,Ps,r.liftToBlock))}function Qs(te){return r.updateSwitchStatement(te,bt(te.expression,Xr,jt),j.checkDefined(bt(te.caseBlock,tn,w7)))}function Mn(te){const tt=Q;return Q=te,te=r.updateCaseBlock(te,Dn(te.clauses,tn,CG)),Q=tt,te}function Zs(te){return r.updateCaseClause(te,bt(te.expression,Xr,jt),Dn(te.statements,tn,Ps))}function at(te){return dn(te,tn,t)}function yi(te){return dn(te,tn,t)}function Sn(te){const tt=Q;return Q=te,te=r.updateCatchClause(te,te.variableDeclaration,j.checkDefined(bt(te.block,tn,Xo))),Q=tt,te}function dr(te){const tt=Q;return Q=te,te=dn(te,tn,t),Q=tt,te}function us(te,tt){if(!(te.transformFlags&276828160))return te;switch(te.kind){case 248:return xn(te,!1);case 244:return ma(te);case 217:return ka(te,tt);case 354:return Ji(te,tt);case 226:if(pS(te))return St(te,tt);break;case 213:if(zp(te))return ac(te);break;case 224:case 225:return xe(te,tt)}return dn(te,Xr,t)}function Xr(te){return us(te,!1)}function Gs(te){return us(te,!0)}function ma(te){return r.updateExpressionStatement(te,bt(te.expression,Gs,jt))}function ka(te,tt){return r.updateParenthesizedExpression(te,bt(te.expression,tt?Gs:Xr,jt))}function Ji(te,tt){return r.updatePartiallyEmittedExpression(te,bt(te.expression,tt?Gs:Xr,jt))}function ac(te){const tt=XP(r,te,H,C,g,p),Gt=bt(Ra(te.arguments),Xr,jt),le=tt&&(!Gt||!Ha(Gt)||Gt.text!==tt.text)?tt:Gt;return r.createCallExpression(r.createPropertyAccessExpression(X,r.createIdentifier("import")),void 0,le?[le]:[])}function St(te,tt){return ri(te.left)?HI(te,Xr,t,0,!tt):dn(te,Xr,t)}function ri(te){if(lf(te,!0))return ri(te.left);if(Km(te))return ri(te.expression);if(Aa(te))return Ft(te.properties,ri);if(jf(te))return Ft(te.elements,ri);if(lh(te))return ri(te.name);if(_d(te))return ri(te.initializer);if(ot(te)){const tt=g.getReferencedExportContainer(te);return tt!==void 0&&tt.kind===307}else return!1}function xe(te,tt){if((te.operator===46||te.operator===47)&&ot(te.operand)&&!zl(te.operand)&&!iC(te.operand)&&!Sce(te.operand)){const Gt=vt(te.operand);if(Gt){let le,Ue=bt(te.operand,Xr,jt);n2(te)?Ue=r.updatePrefixUnaryExpression(te,Ue):(Ue=r.updatePostfixUnaryExpression(te,Ue),tt||(le=r.createTempVariable(h),Ue=r.createAssignment(le,Ue),Ht(Ue,te)),Ue=r.createComma(Ue,r.cloneNode(te.operand)),Ht(Ue,te));for(const be of Gt)Ue=Ei(be,ji(Ue));return le&&(Ue=r.createComma(Ue,le),Ht(Ue,te)),Ue}}return dn(te,Xr,t)}function pt(te){switch(te.kind){case 95:case 90:return}return te}function Se(te,tt,Gt){if(tt.kind===307){const le=d_(tt);H=tt,U=E[le],q=N[le],re=R[le],X=F[le],re&&delete R[le],T(te,tt,Gt),H=void 0,U=void 0,q=void 0,X=void 0,re=void 0}else T(te,tt,Gt)}function Ze(te,tt){return tt=b(te,tt),gr(tt)?tt:te===1?Je(tt):te===4?gt(tt):tt}function gt(te){switch(te.kind){case 304:return Dt(te)}return te}function Dt(te){var tt,Gt;const le=te.name;if(!zl(le)&&!iC(le)){const Ue=g.getReferencedImportDeclaration(le);if(Ue){if(H0(Ue))return Ht(r.createPropertyAssignment(r.cloneNode(le),r.createPropertyAccessExpression(r.getGeneratedNameForNode(Ue.parent),r.createIdentifier("default"))),te);if(l_(Ue)){const be=Ue.propertyName||Ue.name,Qt=r.getGeneratedNameForNode(((Gt=(tt=Ue.parent)==null?void 0:tt.parent)==null?void 0:Gt.parent)||Ue);return Ht(r.createPropertyAssignment(r.cloneNode(le),be.kind===11?r.createElementAccessExpression(Qt,r.cloneNode(be)):r.createPropertyAccessExpression(Qt,r.cloneNode(be))),te)}}}return te}function Je(te){switch(te.kind){case 80:return Rt(te);case 226:return Ct(te);case 236:return ii(te)}return te}function Rt(te){var tt,Gt;if(Ya(te)&8192){const le=MX(H);return le?r.createPropertyAccessExpression(le,te):te}if(!zl(te)&&!iC(te)){const le=g.getReferencedImportDeclaration(te);if(le){if(H0(le))return Ht(r.createPropertyAccessExpression(r.getGeneratedNameForNode(le.parent),r.createIdentifier("default")),te);if(l_(le)){const Ue=le.propertyName||le.name,be=r.getGeneratedNameForNode(((Gt=(tt=le.parent)==null?void 0:tt.parent)==null?void 0:Gt.parent)||le);return Ht(Ue.kind===11?r.createElementAccessExpression(be,r.cloneNode(Ue)):r.createPropertyAccessExpression(be,r.cloneNode(Ue)),te)}}}return te}function Ct(te){if(Gb(te.operatorToken.kind)&&ot(te.left)&&(!zl(te.left)||BW(te.left))&&!iC(te.left)){const tt=vt(te.left);if(tt){let Gt=te;for(const le of tt)Gt=Ei(le,ji(Gt));return Gt}}return te}function ii(te){return J6(te)?r.createPropertyAccessExpression(X,r.createIdentifier("meta")):te}function vt(te){let tt;const Gt=Ni(te);if(Gt){const le=g.getReferencedExportContainer(te,!1);le&&le.kind===307&&(tt=fn(tt,r.getDeclarationName(Gt))),tt=Sr(tt,U==null?void 0:U.exportedBindings[d_(Gt)])}else if(zl(te)&&BW(te)){const le=U==null?void 0:U.exportSpecifiers.get(te);if(le){const Ue=[];for(const be of le)Ue.push(be.name);return Ue}}return tt}function Ni(te){if(!zl(te)){const tt=g.getReferencedImportDeclaration(te);if(tt)return tt;const Gt=g.getReferencedValueDeclaration(te);if(Gt&&(U!=null&&U.exportedBindings[d_(Gt)]))return Gt;const le=g.getReferencedValueDeclarations(te);if(le){for(const Ue of le)if(Ue!==Gt&&(U!=null&&U.exportedBindings[d_(Ue)]))return Ue}return Gt}}function ji(te){return re===void 0&&(re=[]),re[Sc(te)]=!0,te}function gr(te){return re&&te.id&&re[te.id]}}function Kue(t){const{factory:r,getEmitHelperFactory:a}=t,u=t.getEmitHost(),h=t.getEmitResolver(),p=t.getCompilerOptions(),g=Ja(p),C=t.onEmitNode,b=t.onSubstituteNode;t.onEmitNode=re,t.onSubstituteNode=oe,t.enableEmitNotification(307),t.enableSubstitution(80);let T,E,N;return q0(t,R);function R(de){if(de.isDeclarationFile)return de;if(wd(de)||Ag(p)){E=de,N=void 0;let ue=F(de);return E=void 0,N&&(ue=r.updateSourceFile(ue,Ht(r.createNodeArray(mae(ue.statements.slice(),N)),ue.statements))),!wd(de)||zh(p)===200||Ft(ue.statements,UW)?ue:r.updateSourceFile(ue,Ht(r.createNodeArray([...ue.statements,gH(r)]),ue.statements))}return de}function F(de){const ue=Ole(r,a(),de,p);if(ue){const Ie=[],we=r.copyPrologue(de.statements,Ie);return fn(Ie,ue),Sr(Ie,Dn(de.statements,H,Ps,we)),r.updateSourceFile(de,Ht(r.createNodeArray(Ie),de.statements))}else return dn(de,H,t)}function H(de){switch(de.kind){case 271:return zh(p)>=100?q(de):void 0;case 277:return Z(de);case 278:return Q(de)}return de}function U(de){const ue=XP(r,de,j.checkDefined(E),u,h,p),Ie=[];if(ue&&Ie.push(ue),zh(p)===200)return r.createCallExpression(r.createIdentifier("require"),void 0,Ie);if(!N){const he=r.createUniqueName("_createRequire",48),Ae=r.createImportDeclaration(void 0,r.createImportClause(!1,void 0,r.createNamedImports([r.createImportSpecifier(!1,r.createIdentifier("createRequire"),he)])),r.createStringLiteral("module"),void 0),ke=r.createUniqueName("__require",48),Te=r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration(ke,void 0,void 0,r.createCallExpression(r.cloneNode(he),void 0,[r.createPropertyAccessExpression(r.createMetaProperty(102,r.createIdentifier("meta")),r.createIdentifier("url"))]))],g>=2?2:0));N=[Ae,Te]}const we=N[1].declarationList.declarations[0].name;return j.assertNode(we,ot),r.createCallExpression(r.cloneNode(we),void 0,Ie)}function q(de){j.assert(qk(de),"import= for internal module references should be handled in an earlier transformer.");let ue;return ue=fn(ue,Ir(Ht(r.createVariableStatement(void 0,r.createVariableDeclarationList([r.createVariableDeclaration(r.cloneNode(de.name),void 0,void 0,U(de))],g>=2?2:0)),de),de)),ue=X(ue,de),Sg(ue)}function X(de,ue){return Zr(ue,32)&&(de=fn(de,r.createExportDeclaration(void 0,ue.isTypeOnly,r.createNamedExports([r.createExportSpecifier(!1,void 0,Fr(ue.name))])))),de}function Z(de){return de.isExportEquals?zh(p)===200?Ir(r.createExpressionStatement(r.createAssignment(r.createPropertyAccessExpression(r.createIdentifier("module"),"exports"),de.expression)),de):void 0:de}function Q(de){if(p.module!==void 0&&p.module>5||!de.exportClause||!jy(de.exportClause)||!de.moduleSpecifier)return de;const ue=de.exportClause.name,Ie=r.getGeneratedNameForNode(ue),we=r.createImportDeclaration(void 0,r.createImportClause(!1,void 0,r.createNamespaceImport(Ie)),de.moduleSpecifier,de.attributes);Ir(we,de.exportClause);const he=OG(de)?r.createExportDefault(Ie):r.createExportDeclaration(void 0,!1,r.createNamedExports([r.createExportSpecifier(!1,Ie,ue)]));return Ir(he,de),[we,he]}function re(de,ue,Ie){Os(ue)?((wd(ue)||Ag(p))&&p.importHelpers&&(T=new Map),C(de,ue,Ie),T=void 0):C(de,ue,Ie)}function oe(de,ue){return ue=b(de,ue),T&&ot(ue)&&Ya(ue)&8192?pe(ue):ue}function pe(de){const ue=Fr(de);let Ie=T.get(ue);return Ie||T.set(ue,Ie=r.createUniqueName(ue,48)),Ie}}function uLe(t){const r=t.onSubstituteNode,a=t.onEmitNode,u=Kue(t),h=t.onSubstituteNode,p=t.onEmitNode;t.onSubstituteNode=r,t.onEmitNode=a;const g=Gue(t),C=t.onSubstituteNode,b=t.onEmitNode,T=X=>t.getEmitHost().getEmitModuleFormatOfFile(X);t.onSubstituteNode=N,t.onEmitNode=R,t.enableSubstitution(307),t.enableEmitNotification(307);let E;return U;function N(X,Z){return Os(Z)?(E=Z,r(X,Z)):E?T(E)>=5?h(X,Z):C(X,Z):r(X,Z)}function R(X,Z,Q){return Os(Z)&&(E=Z),E?T(E)>=5?p(X,Z,Q):b(X,Z,Q):a(X,Z,Q)}function F(X){return T(X)>=5?u:g}function H(X){if(X.isDeclarationFile)return X;E=X;const Z=F(X)(X);return E=void 0,j.assert(Os(Z)),Z}function U(X){return X.kind===307?H(X):q(X)}function q(X){return t.factory.createBundle(qt(X.sourceFiles,H))}}function TQ(t){return _s(t)||Lo(t)||O_(t)||ec(t)||D1(t)||oS(t)||fH(t)||VP(t)||Nu(t)||W1(t)||Wu(t)||$s(t)||$l(t)||Yb(t)||Wd(t)||Mg(t)||iu(t)||eD(t)||Nr(t)||wl(t)||ur(t)||Ng(t)}function dLe(t){if(D1(t)||oS(t))return r;return W1(t)||Nu(t)?u:xS(t);function r(p){const g=a(p);return g!==void 0?{diagnosticMessage:g,errorNode:t,typeName:t.name}:void 0}function a(p){return pa(t)?p.errorModuleName?p.accessibility===2?k.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:k.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:t.parent.kind===263?p.errorModuleName?p.accessibility===2?k.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:k.Public_property_0_of_exported_class_has_or_is_using_private_name_1:p.errorModuleName?k.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:k.Property_0_of_exported_interface_has_or_is_using_private_name_1}function u(p){const g=h(p);return g!==void 0?{diagnosticMessage:g,errorNode:t,typeName:t.name}:void 0}function h(p){return pa(t)?p.errorModuleName?p.accessibility===2?k.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:k.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1:t.parent.kind===263?p.errorModuleName?p.accessibility===2?k.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:k.Public_method_0_of_exported_class_has_or_is_using_private_name_1:p.errorModuleName?k.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:k.Method_0_of_exported_interface_has_or_is_using_private_name_1}}function xS(t){if(_s(t)||Lo(t)||O_(t)||Nr(t)||wl(t)||ur(t)||ec(t)||iu(t))return a;return D1(t)||oS(t)?u:fH(t)||VP(t)||Nu(t)||W1(t)||Wu(t)||eD(t)?h:$s(t)?vp(t,t.parent)&&Zr(t.parent,2)?a:p:$l(t)?C:Yb(t)?b:Wd(t)?T:Mg(t)||Ng(t)?E:j.assertNever(t,`Attempted to set a declaration diagnostic context for unhandled node kind: ${j.formatSyntaxKind(t.kind)}`);function r(N){if(t.kind===260||t.kind===208)return N.errorModuleName?N.accessibility===2?k.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Exported_variable_0_has_or_is_using_name_1_from_private_module_2:k.Exported_variable_0_has_or_is_using_private_name_1;if(t.kind===172||t.kind===211||t.kind===212||t.kind===226||t.kind===171||t.kind===169&&Zr(t.parent,2))return pa(t)?N.errorModuleName?N.accessibility===2?k.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:k.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:t.parent.kind===263||t.kind===169?N.errorModuleName?N.accessibility===2?k.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:k.Public_property_0_of_exported_class_has_or_is_using_private_name_1:N.errorModuleName?k.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:k.Property_0_of_exported_interface_has_or_is_using_private_name_1}function a(N){const R=r(N);return R!==void 0?{diagnosticMessage:R,errorNode:t,typeName:t.name}:void 0}function u(N){let R;return t.kind===178?pa(t)?R=N.errorModuleName?k.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:k.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1:R=N.errorModuleName?k.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:k.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1:pa(t)?R=N.errorModuleName?N.accessibility===2?k.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:k.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1:R=N.errorModuleName?N.accessibility===2?k.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:k.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1,{diagnosticMessage:R,errorNode:t.name,typeName:t.name}}function h(N){let R;switch(t.kind){case 180:R=N.errorModuleName?k.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:k.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 179:R=N.errorModuleName?k.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:k.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 181:R=N.errorModuleName?k.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:k.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 174:case 173:pa(t)?R=N.errorModuleName?N.accessibility===2?k.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:k.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:k.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:t.parent.kind===263?R=N.errorModuleName?N.accessibility===2?k.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:k.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:k.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:R=N.errorModuleName?k.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:k.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0;break;case 262:R=N.errorModuleName?N.accessibility===2?k.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:k.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:k.Return_type_of_exported_function_has_or_is_using_private_name_0;break;default:return j.fail("This is unknown kind for signature: "+t.kind)}return{diagnosticMessage:R,errorNode:t.name||t}}function p(N){const R=g(N);return R!==void 0?{diagnosticMessage:R,errorNode:t,typeName:t.name}:void 0}function g(N){switch(t.parent.kind){case 176:return N.errorModuleName?N.accessibility===2?k.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:k.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1;case 180:case 185:return N.errorModuleName?k.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:k.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;case 179:return N.errorModuleName?k.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:k.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;case 181:return N.errorModuleName?k.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:k.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1;case 174:case 173:return pa(t.parent)?N.errorModuleName?N.accessibility===2?k.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:k.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:t.parent.parent.kind===263?N.errorModuleName?N.accessibility===2?k.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:k.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:N.errorModuleName?k.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:k.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;case 262:case 184:return N.errorModuleName?N.accessibility===2?k.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:k.Parameter_0_of_exported_function_has_or_is_using_private_name_1;case 178:case 177:return N.errorModuleName?N.accessibility===2?k.Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:k.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2:k.Parameter_0_of_accessor_has_or_is_using_private_name_1;default:return j.fail(`Unknown parent for parameter: ${j.formatSyntaxKind(t.parent.kind)}`)}}function C(){let N;switch(t.parent.kind){case 263:N=k.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1;break;case 264:N=k.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1;break;case 200:N=k.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1;break;case 185:case 180:N=k.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 179:N=k.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 174:case 173:pa(t.parent)?N=k.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:t.parent.parent.kind===263?N=k.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:N=k.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;break;case 184:case 262:N=k.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1;break;case 195:N=k.Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1;break;case 265:N=k.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1;break;default:return j.fail("This is unknown parent for type parameter: "+t.parent.kind)}return{diagnosticMessage:N,errorNode:t,typeName:t.name}}function b(){let N;return hd(t.parent.parent)?N=Tp(t.parent)&&t.parent.token===119?k.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:t.parent.parent.name?k.extends_clause_of_exported_class_0_has_or_is_using_private_name_1:k.extends_clause_of_exported_class_has_or_is_using_private_name_0:N=k.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1,{diagnosticMessage:N,errorNode:t,typeName:No(t.parent.parent)}}function T(){return{diagnosticMessage:k.Import_declaration_0_is_using_private_name_1,errorNode:t,typeName:t.name}}function E(N){return{diagnosticMessage:N.errorModuleName?k.Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2:k.Exported_type_alias_0_has_or_is_using_private_name_1,errorNode:Ng(t)?j.checkDefined(t.typeExpression):t.type,typeName:Ng(t)?No(t):t.name}}}function fLe(t){const r={219:k.Add_a_return_type_to_the_function_expression,218:k.Add_a_return_type_to_the_function_expression,174:k.Add_a_return_type_to_the_method,177:k.Add_a_return_type_to_the_get_accessor_declaration,178:k.Add_a_type_to_parameter_of_the_set_accessor_declaration,262:k.Add_a_return_type_to_the_function_declaration,180:k.Add_a_return_type_to_the_function_declaration,169:k.Add_a_type_annotation_to_the_parameter_0,260:k.Add_a_type_annotation_to_the_variable_0,172:k.Add_a_type_annotation_to_the_property_0,171:k.Add_a_type_annotation_to_the_property_0,277:k.Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it},a={218:k.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,262:k.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,219:k.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,174:k.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,180:k.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,177:k.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,178:k.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,169:k.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations,260:k.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations,172:k.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations,171:k.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations,167:k.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations,305:k.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations,304:k.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations,209:k.Only_const_arrays_can_be_inferred_with_isolatedDeclarations,277:k.Default_exports_can_t_be_inferred_with_isolatedDeclarations,230:k.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations};return u;function u(q){if(Qi(q,Tp))return Kn(q,k.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations);if((N1(q)||tD(q.parent))&&(E_(q)||pl(q)))return H(q);switch(j.type(q),q.kind){case 177:case 178:return p(q);case 167:case 304:case 305:return C(q);case 209:case 230:return b(q);case 174:case 180:case 218:case 219:case 262:return T(q);case 208:return E(q);case 172:case 260:return N(q);case 169:return R(q);case 303:return U(q.initializer);case 231:return F(q);default:return U(q)}}function h(q){const X=Qi(q,Z=>Il(Z)||Ps(Z)||_s(Z)||Lo(Z)||$s(Z));if(X)return Il(X)?X:Og(X)?Qi(X,Z=>Qc(Z)&&!iu(Z)):Ps(X)?void 0:X}function p(q){const{getAccessor:X,setAccessor:Z}=nx(q.symbol.declarations,q),Q=(D1(q)?q.parameters[0]:q)??q,re=Kn(Q,a[q.kind]);return Z&&da(re,Kn(Z,r[Z.kind])),X&&da(re,Kn(X,r[X.kind])),re}function g(q,X){const Z=h(q);if(Z){const Q=Il(Z)||!Z.name?"":uu(Z.name,!1);da(X,Kn(Z,r[Z.kind],Q))}return X}function C(q){const X=Kn(q,a[q.kind]);return g(q,X),X}function b(q){const X=Kn(q,a[q.kind]);return g(q,X),X}function T(q){const X=Kn(q,a[q.kind]);return g(q,X),da(X,Kn(q,r[q.kind])),X}function E(q){return Kn(q,k.Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations)}function N(q){const X=Kn(q,a[q.kind]),Z=uu(q.name,!1);return da(X,Kn(q,r[q.kind],Z)),X}function R(q){if(D1(q.parent))return p(q.parent);const X=t.requiresAddingImplicitUndefined(q,void 0);if(!X&&q.initializer)return U(q.initializer);const Z=X?k.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_supported_with_isolatedDeclarations:a[q.kind],Q=Kn(q,Z),re=uu(q.name,!1);return da(Q,Kn(q,r[q.kind],re)),Q}function F(q){return U(q,k.Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations)}function H(q){const X=Kn(q,k.Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations,uu(q,!1));return g(q,X),X}function U(q,X){const Z=h(q);let Q;if(Z){const re=Il(Z)||!Z.name?"":uu(Z.name,!1),oe=Qi(q.parent,pe=>Il(pe)||(Ps(pe)?"quit":!c_(pe)&&!hle(pe)&&!v7(pe)));Z===oe?(Q=Kn(q,X??a[Z.kind]),da(Q,Kn(Z,r[Z.kind],re))):(Q=Kn(q,X??k.Expression_type_can_t_be_inferred_with_isolatedDeclarations),da(Q,Kn(Z,r[Z.kind],re)),da(Q,Kn(q,k.Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit)))}else Q=Kn(q,X??k.Expression_type_can_t_be_inferred_with_isolatedDeclarations);return Q}}function hLe(t,r,a){const u=t.getCompilerOptions(),h=$t(mK(t,a),YG);return Yt(h,a)?$H(r,t,G,u,[a],[Xue],!1).diagnostics:void 0}var zH=531469,UH=8;function Xue(t){const r=()=>j.fail("Diagnostic emitted without context");let a=r,u=!0,h=!1,p=!1,g=!1,C=!1,b,T,E,N;const{factory:R}=t,F=t.getEmitHost(),H={trackSymbol:ke,reportInaccessibleThisError:Ne,reportInaccessibleUniqueSymbolError:qe,reportCyclicStructureError:se,reportPrivateInBaseOfClassExpression:Te,reportLikelyUnsafeImportRequiredError:Oe,reportTruncationError:He,moduleResolverHost:F,reportNonlocalAugmentation:Pe,reportNonSerializableProperty:We,reportInferenceFallback:he};let U,q,X,Z,Q,re;const oe=t.getEmitResolver(),pe=t.getCompilerOptions(),de=fLe(oe),{stripInternal:ue,isolatedDeclarations:Ie}=pe;return Nt;function we(xe){oe.getPropertiesOfContainerFunction(xe).forEach(pt=>{if(PP(pt.valueDeclaration)){const Se=ur(pt.valueDeclaration)?pt.valueDeclaration.left:pt.valueDeclaration;t.addDiagnostic(Kn(Se,k.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function))}})}function he(xe){!Ie||r_(X)||_n(xe)===X&&(_s(xe)&&oe.isExpandoFunctionDeclaration(xe)?we(xe):t.addDiagnostic(de(xe)))}function Ae(xe){if(xe.accessibility===0){if(xe.aliasesToMakeVisible)if(!T)T=xe.aliasesToMakeVisible;else for(const pt of xe.aliasesToMakeVisible)mu(T,pt)}else if(xe.accessibility!==3){const pt=a(xe);if(pt)return pt.typeName?t.addDiagnostic(Kn(xe.errorNode||pt.errorNode,pt.diagnosticMessage,uu(pt.typeName),xe.errorSymbolName,xe.errorModuleName)):t.addDiagnostic(Kn(xe.errorNode||pt.errorNode,pt.diagnosticMessage,xe.errorSymbolName,xe.errorModuleName)),!0}return!1}function ke(xe,pt,Se){return xe.flags&262144?!1:Ae(oe.isSymbolAccessible(xe,pt,Se,!0))}function Te(xe){(U||q)&&t.addDiagnostic(da(Kn(U||q,k.Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected,xe),..._s((U||q).parent)?[Kn(U||q,k.Add_a_type_annotation_to_the_variable_0,De())]:[]))}function De(){return U?al(U):q&&No(q)?al(No(q)):q&&Il(q)?q.isExportEquals?"export=":"default":"(Missing)"}function qe(){(U||q)&&t.addDiagnostic(Kn(U||q,k.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary,De(),"unique symbol"))}function se(){(U||q)&&t.addDiagnostic(Kn(U||q,k.The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary,De()))}function Ne(){(U||q)&&t.addDiagnostic(Kn(U||q,k.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary,De(),"this"))}function Oe(xe){(U||q)&&t.addDiagnostic(Kn(U||q,k.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary,De(),xe))}function He(){(U||q)&&t.addDiagnostic(Kn(U||q,k.The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed))}function Pe(xe,pt,Se){var Ze;const gt=(Ze=pt.declarations)==null?void 0:Ze.find(Je=>_n(Je)===xe),Dt=$t(Se.declarations,Je=>_n(Je)!==xe);if(gt&&Dt)for(const Je of Dt)t.addDiagnostic(da(Kn(Je,k.Declaration_augments_declaration_in_another_file_This_cannot_be_serialized),Kn(gt,k.This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file)))}function We(xe){(U||q)&&t.addDiagnostic(Kn(U||q,k.The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized,xe))}function ze(xe){const pt=a;a=Ze=>Ze.errorNode&&TQ(Ze.errorNode)?xS(Ze.errorNode)(Ze):{diagnosticMessage:Ze.errorModuleName?k.Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit:k.Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit,errorNode:Ze.errorNode||xe};const Se=oe.getDeclarationStatementsForSourceFile(xe,zH,UH,H);return a=pt,Se}function Nt(xe){if(xe.kind===307&&xe.isDeclarationFile)return xe;if(xe.kind===308){h=!0,Z=[],Q=[],re=[];let Ct=!1;const ii=R.createBundle(qt(xe.sourceFiles,Ni=>{if(Ni.isDeclarationFile)return;if(Ct=Ct||Ni.hasNoDefaultLib,X=Ni,b=Ni,T=void 0,N=!1,E=new Map,a=r,g=!1,C=!1,Ze(Ni),Cp(Ni)||Eg(Ni)){p=!1,u=!1;const gr=r_(Ni)?R.createNodeArray(ze(Ni)):Dn(Ni.statements,Mn,Ps);return R.updateSourceFile(Ni,[R.createModuleDeclaration([R.createModifier(138)],R.createStringLiteral(ace(t.getEmitHost(),Ni)),R.createModuleBlock(Ht(R.createNodeArray(ko(gr)),Ni.statements)))],!0,[],[],!1,[])}u=!0;const ji=r_(Ni)?R.createNodeArray(ze(Ni)):Dn(Ni.statements,Mn,Ps);return R.updateSourceFile(Ni,ko(ji),!0,[],[],!1,[])})),vt=ts(Rf(K7(xe,F,!0).declarationFilePath));return ii.syntheticFileReferences=Rt(vt),ii.syntheticTypeReferences=Dt(),ii.syntheticLibReferences=Je(),ii.hasNoDefaultLib=Ct,ii}u=!0,g=!1,C=!1,b=xe,X=xe,a=r,h=!1,p=!1,N=!1,T=void 0,E=new Map,Z=[],Q=[],re=[],Ze(X);let pt;if(r_(X))pt=R.createNodeArray(ze(xe));else{const Ct=Dn(xe.statements,Mn,Ps);pt=Ht(R.createNodeArray(ko(Ct)),xe.statements),wd(xe)&&(!p||g&&!C)&&(pt=Ht(R.createNodeArray([...pt,gH(R)]),pt))}const Se=ts(Rf(K7(xe,F,!0).declarationFilePath));return R.updateSourceFile(xe,pt,!0,Rt(Se),Dt(),xe.hasNoDefaultLib,Je());function Ze(Ct){Z=Js(Z,qt(Ct.referencedFiles,ii=>[Ct,ii])),Q=Js(Q,Ct.typeReferenceDirectives),re=Js(re,Ct.libReferenceDirectives)}function gt(Ct){const ii={...Ct};return ii.pos=-1,ii.end=-1,ii}function Dt(){return es(Q,Ct=>{if(Ct.preserve)return gt(Ct)})}function Je(){return es(re,Ct=>{if(Ct.preserve)return gt(Ct)})}function Rt(Ct){return es(Z,([ii,vt])=>{if(!vt.preserve)return;const Ni=F.getSourceFileFromReference(ii,vt);if(!Ni)return;let ji;if(Ni.isDeclarationFile)ji=Ni.fileName;else{if(h&&Yt(xe.sourceFiles,Ni))return;const tt=K7(Ni,F,!0);ji=tt.declarationFilePath||tt.jsFilePath||Ni.fileName}if(!ji)return;const gr=QL(Ct,ji,F.getCurrentDirectory(),F.getCanonicalFileName,!1),te=gt(vt);return te.fileName=gr,te})}}function $e(xe){if(xe.kind===80)return xe;return xe.kind===207?R.updateArrayBindingPattern(xe,Dn(xe.elements,pt,gG)):R.updateObjectBindingPattern(xe,Dn(xe.elements,pt,ec));function pt(Se){return Se.kind===232?Se:(Se.propertyName&&Ka(Se.propertyName)&&pl(Se.propertyName.expression)&&_i(Se.propertyName.expression,b),R.updateBindingElement(Se,Se.dotDotDotToken,Se.propertyName,$e(Se.name),void 0))}}function et(xe,pt,Se){let Ze;N||(Ze=a,a=xS(xe));const gt=R.updateParameterDeclaration(xe,$Rt(R,xe,pt),xe.dotDotDotToken,$e(xe.name),oe.isOptionalParameter(xe)?xe.questionToken||R.createToken(58):void 0,wt(xe,Se||xe.type,!0),ut(xe));return N||(a=Ze),gt}function Me(xe){return Cet(xe)&&!!xe.initializer&&oe.isLiteralConstDeclaration(Mo(xe))}function ut(xe){if(Me(xe)){const pt=oEe(xe.initializer);return oX(pt)||he(xe),oe.createLiteralConstValue(Mo(xe,Cet),H)}}function wt(xe,pt,Se){if(!Se&&xp(xe,2)||Me(xe))return;const Ze=xe.kind===169&&oe.requiresAddingImplicitUndefined(xe,b);if(pt&&!Ze)return bt(pt,ls,ws);U=xe.name;let gt;N||(gt=a,a=xS(xe));let Dt;switch(xe.kind){case 169:case 171:case 172:case 208:case 260:Dt=oe.createTypeOfDeclaration(xe,b,zH,UH,H);break;case 262:case 180:case 173:case 174:case 177:case 179:Dt=oe.createReturnTypeOfSignatureDeclaration(xe,b,zH,UH,H);break;default:j.assertNever(xe)}return U=void 0,N||(a=gt),Dt??R.createKeywordTypeNode(133)}function Et(xe){switch(xe=Mo(xe),xe.kind){case 262:case 267:case 264:case 263:case 265:case 266:return!oe.isDeclarationVisible(xe);case 260:return!zt(xe);case 271:case 272:case 278:case 277:return!1;case 175:return!0}return!1}function dt(xe){var pt;if(xe.body)return!0;const Se=(pt=xe.symbol.declarations)==null?void 0:pt.filter(Ze=>Wu(Ze)&&!Ze.body);return!Se||Se.indexOf(xe)===Se.length-1}function zt(xe){return Bd(xe)?!1:ta(xe.name)?Ft(xe.name.elements,zt):oe.isDeclarationVisible(xe)}function Ei(xe,pt,Se){if(xp(xe,2))return R.createNodeArray();const Ze=qt(pt,gt=>et(gt,Se));return Ze?R.createNodeArray(Ze,pt.hasTrailingComma):R.createNodeArray()}function tn(xe,pt){let Se;if(!pt){const Ze=$T(xe);Ze&&(Se=[et(Ze)])}if(kp(xe)){let Ze;if(!pt){const gt=a3(xe);if(gt){const Dt=St(xe,nx(Aa(xe.parent)?xe.parent.properties:xe.parent.members,xe));Ze=et(gt,void 0,Dt)}}Ze||(Ze=R.createParameterDeclaration(void 0,void 0,"value")),Se=fn(Se,Ze)}return R.createNodeArray(Se||w)}function xn(xe,pt){return xp(xe,2)?void 0:Dn(pt,ls,$l)}function Pn(xe){return Os(xe)||Mg(xe)||rd(xe)||hd(xe)||zf(xe)||Ho(xe)||eD(xe)||II(xe)}function _i(xe,pt){const Se=oe.isEntityNameVisible(xe,pt);Ae(Se)}function Fi(xe,pt){return jp(xe)&&jp(pt)&&(xe.jsDoc=pt.jsDoc),Sd(xe,B1(pt))}function On(xe,pt){if(pt){if(p=p||xe.kind!==267&&xe.kind!==205,Bc(pt)&&h){const Se=$Te(t.getEmitHost(),oe,xe);if(Se)return R.createStringLiteral(Se)}return pt}}function pn(xe){if(oe.isDeclarationVisible(xe))if(xe.moduleReference.kind===283){const pt=L8(xe);return R.updateImportEqualsDeclaration(xe,xe.modifiers,xe.isTypeOnly,xe.name,R.updateExternalModuleReference(xe.moduleReference,On(xe,pt)))}else{const pt=a;return a=xS(xe),_i(xe.moduleReference,b),a=pt,xe}}function qr(xe){if(!xe.importClause)return R.updateImportDeclaration(xe,xe.modifiers,xe.importClause,On(xe,xe.moduleSpecifier),Fs(xe.attributes));const pt=xe.importClause&&xe.importClause.name&&oe.isDeclarationVisible(xe.importClause)?xe.importClause.name:void 0;if(!xe.importClause.namedBindings)return pt&&R.updateImportDeclaration(xe,xe.modifiers,R.updateImportClause(xe.importClause,xe.importClause.isTypeOnly,pt,void 0),On(xe,xe.moduleSpecifier),Fs(xe.attributes));if(xe.importClause.namedBindings.kind===274){const Ze=oe.isDeclarationVisible(xe.importClause.namedBindings)?xe.importClause.namedBindings:void 0;return pt||Ze?R.updateImportDeclaration(xe,xe.modifiers,R.updateImportClause(xe.importClause,xe.importClause.isTypeOnly,pt,Ze),On(xe,xe.moduleSpecifier),Fs(xe.attributes)):void 0}const Se=es(xe.importClause.namedBindings.elements,Ze=>oe.isDeclarationVisible(Ze)?Ze:void 0);if(Se&&Se.length||pt)return R.updateImportDeclaration(xe,xe.modifiers,R.updateImportClause(xe.importClause,xe.importClause.isTypeOnly,pt,Se&&Se.length?R.updateNamedImports(xe.importClause.namedBindings,Se):void 0),On(xe,xe.moduleSpecifier),Fs(xe.attributes));if(oe.isImportRequiredByAugmentation(xe))return Ie&&t.addDiagnostic(Kn(xe,k.Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations)),R.updateImportDeclaration(xe,xe.modifiers,void 0,On(xe,xe.moduleSpecifier),Fs(xe.attributes))}function Fs(xe){const pt=z3(xe);return xe&&pt!==void 0?xe:void 0}function ko(xe){for(;P(T);){const Se=T.shift();if(!RG(Se))return j.fail(`Late replaced statement was found which is not handled by the declaration transformer!: ${j.formatSyntaxKind(Se.kind)}`);const Ze=u;u=Se.parent&&Os(Se.parent)&&!(wd(Se.parent)&&h);const gt=yi(Se);u=Ze,E.set(d_(Se),gt)}return Dn(xe,pt,Ps);function pt(Se){if(RG(Se)){const Ze=d_(Se);if(E.has(Ze)){const gt=E.get(Ze);return E.delete(Ze),gt&&((Ao(gt)?Ft(gt,yG):yG(gt))&&(g=!0),Os(Se.parent)&&(Ao(gt)?Ft(gt,UW):UW(gt))&&(p=!0)),gt}}return Se}}function ls(xe){if(Gs(xe))return;if(Wf(xe)){if(Et(xe))return;if(Jb(xe)){if(Ie){if(!oe.isDefinitelyReferenceToGlobalSymbolObject(xe.name.expression)){if(hd(xe.parent)||Aa(xe.parent)){t.addDiagnostic(Kn(xe,k.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations));return}else if((zf(xe.parent)||a_(xe.parent))&&!pl(xe.name.expression)){t.addDiagnostic(Kn(xe,k.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations));return}}}else if(!oe.isLateBound(Mo(xe))||!pl(xe.name.expression))return}}if(Ho(xe)&&oe.isImplementationOfOverload(xe)||BEe(xe))return;let pt;Pn(xe)&&(pt=b,b=xe);const Se=a,Ze=TQ(xe),gt=N;let Dt=(xe.kind===187||xe.kind===200)&&xe.parent.kind!==265;if((Nu(xe)||W1(xe))&&xp(xe,2))return xe.symbol&&xe.symbol.declarations&&xe.symbol.declarations[0]!==xe?void 0:Je(R.createPropertyDeclaration(Ji(xe),xe.name,void 0,void 0,void 0));if(Ze&&!N&&(a=xS(xe)),tD(xe)&&_i(xe.exprName,b),Dt&&(N=!0),GRt(xe))switch(xe.kind){case 233:{(E_(xe.expression)||pl(xe.expression))&&_i(xe.expression,b);const Rt=dn(xe,ls,t);return Je(R.updateExpressionWithTypeArguments(Rt,Rt.expression,Rt.typeArguments))}case 183:{_i(xe.typeName,b);const Rt=dn(xe,ls,t);return Je(R.updateTypeReferenceNode(Rt,Rt.typeName,Rt.typeArguments))}case 180:return Je(R.updateConstructSignature(xe,xn(xe,xe.typeParameters),Ei(xe,xe.parameters),wt(xe,xe.type)));case 176:{const Rt=R.createConstructorDeclaration(Ji(xe),Ei(xe,xe.parameters,0),void 0);return Je(Rt)}case 174:{if(Vs(xe.name))return Je(void 0);const Rt=R.createMethodDeclaration(Ji(xe),void 0,xe.name,xe.questionToken,xn(xe,xe.typeParameters),Ei(xe,xe.parameters),wt(xe,xe.type),void 0);return Je(Rt)}case 177:{if(Vs(xe.name))return Je(void 0);const Rt=St(xe,nx(Aa(xe.parent)?xe.parent.properties:xe.parent.members,xe));return Je(R.updateGetAccessorDeclaration(xe,Ji(xe),xe.name,tn(xe,xp(xe,2)),wt(xe,Rt),void 0))}case 178:return Vs(xe.name)?Je(void 0):Je(R.updateSetAccessorDeclaration(xe,Ji(xe),xe.name,tn(xe,xp(xe,2)),void 0));case 172:return Vs(xe.name)?Je(void 0):Je(R.updatePropertyDeclaration(xe,Ji(xe),xe.name,xe.questionToken,wt(xe,xe.type),ut(xe)));case 171:return Vs(xe.name)?Je(void 0):Je(R.updatePropertySignature(xe,Ji(xe),xe.name,xe.questionToken,wt(xe,xe.type)));case 173:return Vs(xe.name)?Je(void 0):Je(R.updateMethodSignature(xe,Ji(xe),xe.name,xe.questionToken,xn(xe,xe.typeParameters),Ei(xe,xe.parameters),wt(xe,xe.type)));case 179:return Je(R.updateCallSignature(xe,xn(xe,xe.typeParameters),Ei(xe,xe.parameters),wt(xe,xe.type)));case 181:return Je(R.updateIndexSignature(xe,Ji(xe),Ei(xe,xe.parameters),bt(xe.type,ls,ws)||R.createKeywordTypeNode(133)));case 260:return ta(xe.name)?dr(xe.name):(Dt=!0,N=!0,Je(R.updateVariableDeclaration(xe,xe.name,void 0,wt(xe,xe.type),ut(xe))));case 168:return Qs(xe)&&(xe.default||xe.constraint)?Je(R.updateTypeParameterDeclaration(xe,xe.modifiers,xe.name,void 0,void 0)):Je(dn(xe,ls,t));case 194:{const Rt=bt(xe.checkType,ls,ws),Ct=bt(xe.extendsType,ls,ws),ii=b;b=xe.trueType;const vt=bt(xe.trueType,ls,ws);b=ii;const Ni=bt(xe.falseType,ls,ws);return j.assert(Rt),j.assert(Ct),j.assert(vt),j.assert(Ni),Je(R.updateConditionalTypeNode(xe,Rt,Ct,vt,Ni))}case 184:return Je(R.updateFunctionTypeNode(xe,Dn(xe.typeParameters,ls,$l),Ei(xe,xe.parameters),j.checkDefined(bt(xe.type,ls,ws))));case 185:return Je(R.updateConstructorTypeNode(xe,Ji(xe),Dn(xe.typeParameters,ls,$l),Ei(xe,xe.parameters),j.checkDefined(bt(xe.type,ls,ws))));case 205:return lS(xe)?Je(R.updateImportTypeNode(xe,R.updateLiteralTypeNode(xe.argument,On(xe,xe.argument.literal)),xe.attributes,xe.qualifier,Dn(xe.typeArguments,ls,ws),xe.isTypeOf)):Je(xe);default:j.assertNever(xe,`Attempted to process unhandled node kind: ${j.formatSyntaxKind(xe.kind)}`)}return jP(xe)&&Ia(X,xe.pos).line===Ia(X,xe.end).line&&tr(xe,1),Je(dn(xe,ls,t));function Je(Rt){return Rt&&Ze&&Jb(xe)&&Xr(xe),Pn(xe)&&(b=pt),Ze&&!N&&(a=Se),Dt&&(N=gt),Rt===xe?Rt:Rt&&Ir(Fi(Rt,xe),xe)}}function Qs(xe){return xe.parent.kind===174&&xp(xe.parent,2)}function Mn(xe){if(!JRt(xe)||Gs(xe))return;switch(xe.kind){case 278:return Os(xe.parent)&&(p=!0),C=!0,R.updateExportDeclaration(xe,xe.modifiers,xe.isTypeOnly,xe.exportClause,On(xe,xe.moduleSpecifier),Fs(xe.attributes));case 277:{if(Os(xe.parent)&&(p=!0),C=!0,xe.expression.kind===80)return xe;{const Se=R.createUniqueName("_default",16);a=()=>({diagnosticMessage:k.Default_export_of_the_module_has_or_is_using_private_name_0,errorNode:xe}),q=xe;const Ze=R.createVariableDeclaration(Se,void 0,oe.createTypeOfExpression(xe.expression,xe,zH,UH,H),void 0);q=void 0;const gt=R.createVariableStatement(u?[R.createModifier(138)]:[],R.createVariableDeclarationList([Ze],2));return Fi(gt,xe),oH(xe),[gt,R.updateExportAssignment(xe,xe.modifiers,Se)]}}}const pt=yi(xe);return E.set(d_(xe),pt),xe}function Zs(xe){if(Wd(xe)||xp(xe,2048)||!Fg(xe))return xe;const pt=R.createModifiersFromModifierFlags(jh(xe)&131039);return R.replaceModifiers(xe,pt)}function at(xe,pt,Se,Ze){const gt=R.updateModuleDeclaration(xe,pt,Se,Ze);if(Vh(gt)||gt.flags&32)return gt;const Dt=R.createModuleDeclaration(gt.modifiers,gt.name,gt.body,gt.flags|32);return Ir(Dt,gt),Ht(Dt,gt),Dt}function yi(xe){if(T)for(;GR(T,xe););if(Gs(xe))return;switch(xe.kind){case 271:return pn(xe);case 272:return qr(xe)}if(Wf(xe)&&Et(xe)||q1(xe)||Ho(xe)&&oe.isImplementationOfOverload(xe))return;let pt;Pn(xe)&&(pt=b,b=xe);const Se=TQ(xe),Ze=a;Se&&(a=xS(xe));const gt=u;switch(xe.kind){case 265:{u=!1;const Je=Dt(R.updateTypeAliasDeclaration(xe,Ji(xe),xe.name,Dn(xe.typeParameters,ls,$l),j.checkDefined(bt(xe.type,ls,ws))));return u=gt,Je}case 264:return Dt(R.updateInterfaceDeclaration(xe,Ji(xe),xe.name,xn(xe,xe.typeParameters),ri(xe.heritageClauses),Dn(xe.members,ls,OT)));case 262:{const Je=Dt(R.updateFunctionDeclaration(xe,Ji(xe),void 0,xe.name,xn(xe,xe.typeParameters),Ei(xe,xe.parameters),wt(xe,xe.type),void 0));if(Je&&oe.isExpandoFunctionDeclaration(xe)&&dt(xe)){const Rt=oe.getPropertiesOfContainerFunction(xe);Ie&&we(xe);const Ct=l2.createModuleDeclaration(void 0,Je.name||R.createIdentifier("_default"),R.createModuleBlock([]),32);_c(Ct,b),Ct.locals=_a(Rt),Ct.symbol=Rt[0].parent;const ii=[];let vt=es(Rt,Gt=>{if(!PP(Gt.valueDeclaration))return;const le=Ws(Gt.escapedName);if(!J_(le,99))return;a=xS(Gt.valueDeclaration);const Ue=oe.createTypeOfDeclaration(Gt.valueDeclaration,Ct,zH,UH|2,H);a=Ze;const be=gP(le),Qt=be?R.getGeneratedNameForNode(Gt.valueDeclaration):R.createIdentifier(le);be&&ii.push([Qt,le]);const lt=R.createVariableDeclaration(Qt,void 0,Ue,void 0);return R.createVariableStatement(be?void 0:[R.createToken(95)],R.createVariableDeclarationList([lt]))});ii.length?vt.push(R.createExportDeclaration(void 0,!1,R.createNamedExports(qt(ii,([Gt,le])=>R.createExportSpecifier(!1,Gt,le))))):vt=es(vt,Gt=>R.replaceModifiers(Gt,0));const Ni=R.createModuleDeclaration(Ji(xe),xe.name,R.createModuleBlock(vt),32);if(!xp(Je,2048))return[Je,Ni];const ji=R.createModifiersFromModifierFlags(jh(Je)&-2081|128),gr=R.updateFunctionDeclaration(Je,ji,void 0,Je.name,Je.typeParameters,Je.parameters,Je.type,void 0),te=R.updateModuleDeclaration(Ni,ji,Ni.name,Ni.body),tt=R.createExportAssignment(void 0,!1,Ni.name);return Os(xe.parent)&&(p=!0),C=!0,[gr,te,tt]}else return Je}case 267:{u=!1;const Je=xe.body;if(Je&&Je.kind===268){const Rt=g,Ct=C;C=!1,g=!1;const ii=Dn(Je.statements,Mn,Ps);let vt=ko(ii);xe.flags&33554432&&(g=!1),!Ry(xe)&&!ka(vt)&&!C&&(g?vt=R.createNodeArray([...vt,gH(R)]):vt=Dn(vt,Zs,Ps));const Ni=R.updateModuleBlock(Je,vt);u=gt,g=Rt,C=Ct;const ji=Ji(xe);return Dt(at(xe,ji,BT(xe)?On(xe,xe.name):xe.name,Ni))}else{u=gt;const Rt=Ji(xe);u=!1,bt(Je,Mn);const Ct=d_(Je),ii=E.get(Ct);return E.delete(Ct),Dt(at(xe,Rt,xe.name,ii))}}case 263:{U=xe.name,q=xe;const Je=R.createNodeArray(Ji(xe)),Rt=xn(xe,xe.typeParameters),Ct=Vv(xe);let ii;if(Ct){const tt=a;ii=Rw(Rr(Ct.parameters,Gt=>{if(!Zr(Gt,31)||Gs(Gt))return;if(a=xS(Gt),Gt.name.kind===80)return Fi(R.createPropertyDeclaration(Ji(Gt),Gt.name,Gt.questionToken,wt(Gt,Gt.type),ut(Gt)),Gt);return le(Gt.name);function le(Ue){let be;for(const Qt of Ue.elements)Bd(Qt)||(ta(Qt.name)&&(be=Js(be,le(Qt.name))),be=be||[],be.push(R.createPropertyDeclaration(Ji(Gt),Qt.name,void 0,wt(Qt,void 0),void 0)));return be}})),a=tt}const Ni=Ft(xe.members,tt=>!!tt.name&&Vs(tt.name))?[R.createPropertyDeclaration(void 0,R.createPrivateIdentifier("#private"),void 0,void 0,void 0)]:void 0,ji=Js(Js(Ni,ii),Dn(xe.members,ls,Od)),gr=R.createNodeArray(ji),te=L1(xe);if(te&&!pl(te.expression)&&te.expression.kind!==106){const tt=xe.name?Ws(xe.name.escapedText):"default",Gt=R.createUniqueName(`${tt}_base`,16);a=()=>({diagnosticMessage:k.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,errorNode:te,typeName:xe.name});const le=R.createVariableDeclaration(Gt,void 0,oe.createTypeOfExpression(te.expression,xe,zH,UH,H),void 0),Ue=R.createVariableStatement(u?[R.createModifier(138)]:[],R.createVariableDeclarationList([le],2)),be=R.createNodeArray(qt(xe.heritageClauses,Qt=>{if(Qt.token===96){const lt=a;a=xS(Qt.types[0]);const st=R.updateHeritageClause(Qt,qt(Qt.types,hi=>R.updateExpressionWithTypeArguments(hi,Gt,Dn(hi.typeArguments,ls,ws))));return a=lt,st}return R.updateHeritageClause(Qt,Dn(R.createNodeArray($t(Qt.types,lt=>pl(lt.expression)||lt.expression.kind===106)),ls,Yb))}));return[Ue,Dt(R.updateClassDeclaration(xe,Je,xe.name,Rt,be,gr))]}else{const tt=ri(xe.heritageClauses);return Dt(R.updateClassDeclaration(xe,Je,xe.name,Rt,tt,gr))}}case 243:return Dt(Sn(xe));case 266:return Dt(R.updateEnumDeclaration(xe,R.createNodeArray(Ji(xe)),xe.name,R.createNodeArray(es(xe.members,Je=>{if(Gs(Je))return;const Rt=oe.getEnumMemberValue(Je),Ct=Rt==null?void 0:Rt.value;Ie&&Je.initializer&&(Rt!=null&&Rt.hasExternalReferences)&&!Ka(Je.name)&&t.addDiagnostic(Kn(Je,k.Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations));const ii=Ct===void 0?void 0:typeof Ct=="string"?R.createStringLiteral(Ct):Ct<0?R.createPrefixUnaryExpression(41,R.createNumericLiteral(-Ct)):R.createNumericLiteral(Ct);return Fi(R.updateEnumMember(Je,Je.name,ii),Je)}))))}return j.assertNever(xe,`Unhandled top-level node in declaration emit: ${j.formatSyntaxKind(xe.kind)}`);function Dt(Je){return Pn(xe)&&(b=pt),Se&&(a=Ze),xe.kind===267&&(u=gt),Je===xe?Je:(q=void 0,U=void 0,Je&&Ir(Fi(Je,xe),xe))}}function Sn(xe){if(!O(xe.declarationList.declarations,zt))return;const pt=Dn(xe.declarationList.declarations,ls,_s);if(!P(pt))return;const Se=R.createNodeArray(Ji(xe));let Ze;return nV(xe.declarationList)||iV(xe.declarationList)?(Ze=R.createVariableDeclarationList(pt,2),Ir(Ze,xe.declarationList),Ht(Ze,xe.declarationList),Sd(Ze,xe.declarationList)):Ze=R.updateVariableDeclarationList(xe.declarationList,pt),R.updateVariableStatement(xe,Se,Ze)}function dr(xe){return Dr(es(xe.elements,pt=>us(pt)))}function us(xe){if(xe.kind!==232&&xe.name)return zt(xe)?ta(xe.name)?dr(xe.name):R.createVariableDeclaration(xe.name,void 0,wt(xe,void 0),void 0):void 0}function Xr(xe){let pt;N||(pt=a,a=dLe(xe)),U=xe.name,j.assert(Jb(xe));const Ze=xe.name.expression;_i(Ze,b),N||(a=pt),U=void 0}function Gs(xe){return!!ue&&!!xe&&V2e(xe,X)}function ma(xe){return Il(xe)||Ju(xe)}function ka(xe){return Ft(xe,ma)}function Ji(xe){const pt=jh(xe),Se=ac(xe);return pt===Se?VH(xe.modifiers,Ze=>Jr(Ze,Fa),Fa):R.createModifiersFromModifierFlags(Se)}function ac(xe){let pt=130030,Se=u&&!qRt(xe)?128:0;const Ze=xe.parent.kind===307;return(!Ze||h&&Ze&&wd(xe.parent))&&(pt^=128,Se=0),bet(xe,pt,Se)}function St(xe,pt){let Se=_Le(xe);return!Se&&xe!==pt.firstAccessor&&(Se=_Le(pt.firstAccessor),a=xS(pt.firstAccessor)),!Se&&pt.secondAccessor&&xe!==pt.secondAccessor&&(Se=_Le(pt.secondAccessor),a=xS(pt.secondAccessor)),Se}function ri(xe){return R.createNodeArray($t(qt(xe,pt=>R.updateHeritageClause(pt,Dn(R.createNodeArray($t(pt.types,Se=>pl(Se.expression)||pt.token===96&&Se.expression.kind===106)),ls,Yb))),pt=>pt.types&&!!pt.types.length))}}function qRt(t){return t.kind===264}function $Rt(t,r,a,u){return t.createModifiersFromModifierFlags(bet(r,a,u))}function bet(t,r=131070,a=0){let u=jh(t)&r|a;return u&2048&&!(u&32)&&(u^=32),u&2048&&u&128&&(u^=128),u}function _Le(t){if(t)return t.kind===177?t.type:t.parameters.length>0?t.parameters[0].type:void 0}function Cet(t){switch(t.kind){case 172:case 171:return!xp(t,2);case 169:case 260:return!0}return!1}function JRt(t){switch(t.kind){case 262:case 267:case 271:case 264:case 263:case 265:case 266:case 243:case 272:case 278:case 277:return!0}return!1}function GRt(t){switch(t.kind){case 180:case 176:case 174:case 177:case 178:case 172:case 171:case 173:case 179:case 181:case 260:case 168:case 233:case 183:case 194:case 184:case 185:case 205:return!0}return!1}function KRt(t){switch(t){case 200:return Kue;case 99:case 7:case 6:case 5:case 100:case 199:case 1:return uLe;case 4:return lLe;default:return Gue}}var pLe={scriptTransformers:w,declarationTransformers:w};function mLe(t,r,a){return{scriptTransformers:XRt(t,r,a),declarationTransformers:QRt(r)}}function XRt(t,r,a){if(a)return w;const u=Ja(t),h=zh(t),p=GV(t),g=[];return Sr(g,r&&qt(r.before,xet)),g.push($Ne),t.experimentalDecorators&&g.push(KNe),WK(t)&&g.push(sLe),u<99&&g.push(iLe),!t.experimentalDecorators&&(u<99||!p)&&g.push(XNe),g.push(JNe),u<8&&g.push(tLe),u<7&&g.push(eLe),u<6&&g.push(YNe),u<5&&g.push(ZNe),u<4&&g.push(QNe),u<3&&g.push(oLe),u<2&&(g.push(aLe),g.push(cLe)),g.push(KRt(h)),Sr(g,r&&qt(r.after,xet)),g}function QRt(t){const r=[];return r.push(Xue),Sr(r,t&&qt(t.afterDeclarations,YRt)),r}function ZRt(t){return r=>UEe(r)?t.transformBundle(r):t.transformSourceFile(r)}function wet(t,r){return a=>{const u=t(a);return typeof u=="function"?r(a,u):ZRt(u)}}function xet(t){return wet(t,q0)}function YRt(t){return wet(t,(r,a)=>a)}function G7(t,r){return r}function qH(t,r,a){a(t,r)}function $H(t,r,a,u,h,p,g){var C,b;const T=new Array(357);let E,N,R,F=0,H=[],U=[],q=[],X=[],Z=0,Q=!1,re=[],oe=0,pe,de,ue=G7,Ie=qH,we=0;const he=[],Ae={factory:a,getCompilerOptions:()=>u,getEmitResolver:()=>t,getEmitHost:()=>r,getEmitHelperFactory:Bh(()=>xEe(Ae)),startLexicalEnvironment:et,suspendLexicalEnvironment:Me,resumeLexicalEnvironment:ut,endLexicalEnvironment:wt,setLexicalEnvironmentFlags:Et,getLexicalEnvironmentFlags:dt,hoistVariableDeclaration:ze,hoistFunctionDeclaration:Nt,addInitializationStatement:$e,startBlockScope:zt,endBlockScope:Ei,addBlockScopedVariable:tn,requestEmitHelper:xn,readEmitHelpers:Pn,enableSubstitution:se,enableEmitNotification:He,isSubstitutionEnabled:Ne,isEmitNotificationEnabled:Pe,get onSubstituteNode(){return ue},set onSubstituteNode(Fi){j.assert(we<1,"Cannot modify transformation hooks after initialization has completed."),j.assert(Fi!==void 0,"Value must not be 'undefined'"),ue=Fi},get onEmitNode(){return Ie},set onEmitNode(Fi){j.assert(we<1,"Cannot modify transformation hooks after initialization has completed."),j.assert(Fi!==void 0,"Value must not be 'undefined'"),Ie=Fi},addDiagnostic(Fi){he.push(Fi)}};for(const Fi of h)nle(_n(Mo(Fi)));ou("beforeTransform");const ke=p.map(Fi=>Fi(Ae)),Te=Fi=>{for(const On of ke)Fi=On(Fi);return Fi};we=1;const De=[];for(const Fi of h)(C=Zn)==null||C.push(Zn.Phase.Emit,"transformNodes",Fi.kind===307?{path:Fi.path}:{kind:Fi.kind,pos:Fi.pos,end:Fi.end}),De.push((g?Te:qe)(Fi)),(b=Zn)==null||b.pop();return we=2,ou("afterTransform"),Wm("transformTime","beforeTransform","afterTransform"),{transformed:De,substituteNode:Oe,emitNodeWithNotification:We,isEmitNotificationEnabled:Pe,dispose:_i,diagnostics:he};function qe(Fi){return Fi&&(!Os(Fi)||!Fi.isDeclarationFile)?Te(Fi):Fi}function se(Fi){j.assert(we<2,"Cannot modify the transformation context after transformation has completed."),T[Fi]|=1}function Ne(Fi){return(T[Fi.kind]&1)!==0&&(Ya(Fi)&8)===0}function Oe(Fi,On){return j.assert(we<3,"Cannot substitute a node after the result is disposed."),On&&Ne(On)&&ue(Fi,On)||On}function He(Fi){j.assert(we<2,"Cannot modify the transformation context after transformation has completed."),T[Fi]|=2}function Pe(Fi){return(T[Fi.kind]&2)!==0||(Ya(Fi)&4)!==0}function We(Fi,On,pn){j.assert(we<3,"Cannot invoke TransformationResult callbacks after the result is disposed."),On&&(Pe(On)?Ie(Fi,On,pn):pn(Fi,On))}function ze(Fi){j.assert(we>0,"Cannot modify the lexical environment during initialization."),j.assert(we<2,"Cannot modify the lexical environment after transformation has completed.");const On=tr(a.createVariableDeclaration(Fi),128);E?E.push(On):E=[On],F&1&&(F|=2)}function Nt(Fi){j.assert(we>0,"Cannot modify the lexical environment during initialization."),j.assert(we<2,"Cannot modify the lexical environment after transformation has completed."),tr(Fi,2097152),N?N.push(Fi):N=[Fi]}function $e(Fi){j.assert(we>0,"Cannot modify the lexical environment during initialization."),j.assert(we<2,"Cannot modify the lexical environment after transformation has completed."),tr(Fi,2097152),R?R.push(Fi):R=[Fi]}function et(){j.assert(we>0,"Cannot modify the lexical environment during initialization."),j.assert(we<2,"Cannot modify the lexical environment after transformation has completed."),j.assert(!Q,"Lexical environment is suspended."),H[Z]=E,U[Z]=N,q[Z]=R,X[Z]=F,Z++,E=void 0,N=void 0,R=void 0,F=0}function Me(){j.assert(we>0,"Cannot modify the lexical environment during initialization."),j.assert(we<2,"Cannot modify the lexical environment after transformation has completed."),j.assert(!Q,"Lexical environment is already suspended."),Q=!0}function ut(){j.assert(we>0,"Cannot modify the lexical environment during initialization."),j.assert(we<2,"Cannot modify the lexical environment after transformation has completed."),j.assert(Q,"Lexical environment is not suspended."),Q=!1}function wt(){j.assert(we>0,"Cannot modify the lexical environment during initialization."),j.assert(we<2,"Cannot modify the lexical environment after transformation has completed."),j.assert(!Q,"Lexical environment is suspended.");let Fi;if(E||N||R){if(N&&(Fi=[...N]),E){const On=a.createVariableStatement(void 0,a.createVariableDeclarationList(E));tr(On,2097152),Fi?Fi.push(On):Fi=[On]}R&&(Fi?Fi=[...Fi,...R]:Fi=[...R])}return Z--,E=H[Z],N=U[Z],R=q[Z],F=X[Z],Z===0&&(H=[],U=[],q=[],X=[]),Fi}function Et(Fi,On){F=On?F|Fi:F&~Fi}function dt(){return F}function zt(){j.assert(we>0,"Cannot start a block scope during initialization."),j.assert(we<2,"Cannot start a block scope after transformation has completed."),re[oe]=pe,oe++,pe=void 0}function Ei(){j.assert(we>0,"Cannot end a block scope during initialization."),j.assert(we<2,"Cannot end a block scope after transformation has completed.");const Fi=Ft(pe)?[a.createVariableStatement(void 0,a.createVariableDeclarationList(pe.map(On=>a.createVariableDeclaration(On)),1))]:void 0;return oe--,pe=re[oe],oe===0&&(re=[]),Fi}function tn(Fi){j.assert(oe>0,"Cannot add a block scoped variable outside of an iteration body."),(pe||(pe=[])).push(Fi)}function xn(Fi){if(j.assert(we>0,"Cannot modify the transformation context during initialization."),j.assert(we<2,"Cannot modify the transformation context after transformation has completed."),j.assert(!Fi.scoped,"Cannot request a scoped emit helper."),Fi.dependencies)for(const On of Fi.dependencies)xn(On);de=fn(de,Fi)}function Pn(){j.assert(we>0,"Cannot modify the transformation context during initialization."),j.assert(we<2,"Cannot modify the transformation context after transformation has completed.");const Fi=de;return de=void 0,Fi}function _i(){if(we<3){for(const Fi of h)nle(_n(Mo(Fi)));E=void 0,H=void 0,N=void 0,U=void 0,ue=void 0,Ie=void 0,de=void 0,we=3}}}var JH={factory:G,getCompilerOptions:()=>({}),getEmitResolver:wa,getEmitHost:wa,getEmitHelperFactory:wa,startLexicalEnvironment:Tc,resumeLexicalEnvironment:Tc,suspendLexicalEnvironment:Tc,endLexicalEnvironment:IT,setLexicalEnvironmentFlags:Tc,getLexicalEnvironmentFlags:()=>0,hoistVariableDeclaration:Tc,hoistFunctionDeclaration:Tc,addInitializationStatement:Tc,startBlockScope:Tc,endBlockScope:IT,addBlockScopedVariable:Tc,requestEmitHelper:Tc,readEmitHelpers:wa,enableSubstitution:Tc,enableEmitNotification:Tc,isSubstitutionEnabled:wa,isEmitNotificationEnabled:wa,onSubstituteNode:G7,onEmitNode:qH,addDiagnostic:Tc},ket=t8t();function gLe(t){return Xl(t,".tsbuildinfo")}function Que(t,r,a,u=!1,h,p){const g=Ao(a)?a:mK(t,a,u),C=t.getCompilerOptions();if(!h)if(C.outFile){if(g.length){const b=G.createBundle(g),T=r(K7(b,t,u),b);if(T)return T}}else for(const b of g){const T=r(K7(b,t,u),b);if(T)return T}if(p){const b=h2(C);if(b)return r({buildInfoPath:b},void 0)}}function h2(t){const r=t.configFilePath;if(!e8t(t))return;if(t.tsBuildInfoFile)return t.tsBuildInfoFile;const a=t.outFile;let u;if(a)u=s_(a);else{if(!r)return;const h=s_(r);u=t.outDir?t.rootDir?Ok(t.outDir,c0(t.rootDir,h,!0)):zr(t.outDir,ud(h)):h}return u+".tsbuildinfo"}function e8t(t){return QT(t)||!!t.tscBuild}function yLe(t,r){const a=t.outFile,u=t.emitDeclarationOnly?void 0:a,h=u&&Tet(u,t),p=r||Q_(t)?s_(a)+".d.ts":void 0,g=p&&MK(t)?p+".map":void 0;return{jsFilePath:u,sourceMapFilePath:h,declarationFilePath:p,declarationMapPath:g}}function K7(t,r,a){const u=r.getCompilerOptions();if(t.kind===308)return yLe(u,a);{const h=JTe(t.fileName,r,DQ(t.fileName,u)),p=Eg(t),g=p&&Hb(t.fileName,h,r.getCurrentDirectory(),!r.useCaseSensitiveFileNames())===0,C=u.emitDeclarationOnly||g?void 0:h,b=!C||Eg(t)?void 0:Tet(C,u),T=a||Q_(u)&&!p?GTe(t.fileName,r):void 0,E=T&&MK(u)?T+".map":void 0;return{jsFilePath:C,sourceMapFilePath:b,declarationFilePath:T,declarationMapPath:E}}}function Tet(t,r){return r.sourceMap&&!r.inlineSourceMap?t+".map":void 0}function DQ(t,r){return Xl(t,".json")?".json":r.jsx===1&&Ru(t,[".jsx",".tsx"])?".jsx":Ru(t,[".mts",".mjs"])?".mjs":Ru(t,[".cts",".cjs"])?".cjs":".js"}function Det(t,r,a,u){return a?Ok(a,c0(u(),t,r)):t}function j3(t,r,a,u=()=>oA(r,a)){return Zue(t,r.options,a,u)}function Zue(t,r,a,u){return cx(Det(t,a,r.declarationDir||r.outDir,u),_K(t))}function Eet(t,r,a,u=()=>oA(r,a)){if(r.options.emitDeclarationOnly)return;const h=Xl(t,".json"),p=Yue(t,r.options,a,u);return!h||Hb(t,p,j.checkDefined(r.options.configFilePath),a)!==0?p:void 0}function Yue(t,r,a,u){return cx(Det(t,a,r.outDir,u),DQ(t,r))}function Iet(){let t;return{addOutput:r,getOutputs:a};function r(u){u&&(t||(t=[])).push(u)}function a(){return t||w}}function Net(t,r){const{jsFilePath:a,sourceMapFilePath:u,declarationFilePath:h,declarationMapPath:p}=yLe(t.options,!1);r(a),r(u),r(h),r(p)}function Let(t,r,a,u,h){if(df(r))return;const p=Eet(r,t,a,h);if(u(p),!Xl(r,".json")&&(p&&t.options.sourceMap&&u(`${p}.map`),Q_(t.options))){const g=j3(r,t,a,h);u(g),t.options.declarationMap&&u(`${g}.map`)}}function X7(t,r,a,u,h){let p;return t.rootDir?(p=wo(t.rootDir,a),h==null||h(t.rootDir)):t.composite&&t.configFilePath?(p=ts(Rf(t.configFilePath)),h==null||h(p)):p=TLe(r(),a,u),p&&p[p.length-1]!==Kl&&(p+=Kl),p}function oA({options:t,fileNames:r},a){return X7(t,()=>$t(r,u=>!(t.noEmitForJsFiles&&Ru(u,h3))&&!df(u)),ts(Rf(j.checkDefined(t.configFilePath))),Mf(!a))}function EQ(t,r){const{addOutput:a,getOutputs:u}=Iet();if(t.options.outFile)Net(t,a);else{const h=Bh(()=>oA(t,r));for(const p of t.fileNames)Let(t,p,r,a,h)}return a(h2(t.options)),u()}function Pet(t,r,a){r=ca(r),j.assert(Yt(t.fileNames,r),"Expected fileName to be present in command line");const{addOutput:u,getOutputs:h}=Iet();return t.options.outFile?Net(t,u):Let(t,r,a,u),h()}function ede(t,r){if(t.options.outFile){const{jsFilePath:h,declarationFilePath:p}=yLe(t.options,!1);return j.checkDefined(h||p,`project ${t.options.configFilePath} expected to have at least one output`)}const a=Bh(()=>oA(t,r));for(const h of t.fileNames){if(df(h))continue;const p=Eet(h,t,r,a);if(p)return p;if(!Xl(h,".json")&&Q_(t.options))return j3(h,t,r,a)}const u=h2(t.options);return u||j.fail(`project ${t.options.configFilePath} expected to have at least one output`)}function tde(t,r){return!!r&&!!t}function ide(t,r,a,{scriptTransformers:u,declarationTransformers:h},p,g,C,b){var T=r.getCompilerOptions(),E=T.sourceMap||T.inlineSourceMap||MK(T)?[]:void 0,N=T.listEmittedFiles?[]:void 0,R=OV(),F=mS(T),H=FV(F),{enter:U,exit:q}=ooe("printTime","beforePrint","afterPrint"),X=!1;return U(),Que(r,Z,mK(r,a,C),C,g,!a&&!b),q(),{emitSkipped:X,diagnostics:R.getDiagnostics(),emittedFiles:N,sourceMaps:E};function Z({jsFilePath:ke,sourceMapFilePath:Te,declarationFilePath:De,declarationMapPath:qe,buildInfoPath:se},Ne){var Oe,He,Pe,We,ze,Nt;(Oe=Zn)==null||Oe.push(Zn.Phase.Emit,"emitJsFileOrBundle",{jsFilePath:ke}),re(Ne,ke,Te),(He=Zn)==null||He.pop(),(Pe=Zn)==null||Pe.push(Zn.Phase.Emit,"emitDeclarationFileOrBundle",{declarationFilePath:De}),oe(Ne,De,qe),(We=Zn)==null||We.pop(),(ze=Zn)==null||ze.push(Zn.Phase.Emit,"emitBuildInfo",{buildInfoPath:se}),Q(se),(Nt=Zn)==null||Nt.pop()}function Q(ke){if(!ke||a)return;if(r.isEmitBlocked(ke)){X=!0;return}const Te=r.getBuildInfo()||{version:v};yK(r,R,ke,vLe(Te),!1,void 0,{buildInfo:Te}),N==null||N.push(ke)}function re(ke,Te,De){if(!ke||p||!Te)return;if(r.isEmitBlocked(Te)||T.noEmit){X=!0;return}(Os(ke)?[ke]:$t(ke.sourceFiles,YG)).forEach(Oe=>{(T.noCheck||!r7(Oe,T))&&de(Oe)});const qe=$H(t,r,G,T,[ke],u,!1),se={removeComments:T.removeComments,newLine:T.newLine,noEmitHelpers:T.noEmitHelpers,module:zh(T),moduleResolution:yh(T),target:Ja(T),sourceMap:T.sourceMap,inlineSourceMap:T.inlineSourceMap,inlineSources:T.inlineSources,extendedDiagnostics:T.extendedDiagnostics},Ne=bx(se,{hasGlobalName:t.hasGlobalName,onEmitNode:qe.emitNodeWithNotification,isEmitNotificationEnabled:qe.isEmitNotificationEnabled,substituteNode:qe.substituteNode});j.assert(qe.transformed.length===1,"Should only see one output from the transform"),ue(Te,De,qe,Ne,T),qe.dispose(),N&&(N.push(Te),De&&N.push(De))}function oe(ke,Te,De){if(!ke||p===0)return;if(!Te){(p||T.emitDeclarationOnly)&&(X=!0);return}const qe=Os(ke)?[ke]:ke.sourceFiles,se=C?qe:$t(qe,YG),Ne=T.outFile?[G.createBundle(se)]:se;se.forEach(Pe=>{(p&&!Q_(T)||T.noCheck||tde(p,C)||!r7(Pe,T))&&pe(Pe)});const Oe=$H(t,r,G,T,Ne,h,!1);if(P(Oe.diagnostics))for(const Pe of Oe.diagnostics)R.add(Pe);const He=!!Oe.diagnostics&&!!Oe.diagnostics.length||!!r.isEmitBlocked(Te)||!!T.noEmit;if(X=X||He,!He||C){j.assert(Oe.transformed.length===1,"Should only see one output from the decl transform");const Pe={removeComments:T.removeComments,newLine:T.newLine,noEmitHelpers:!0,module:T.module,moduleResolution:T.moduleResolution,target:T.target,sourceMap:p!==2&&T.declarationMap,inlineSourceMap:T.inlineSourceMap,extendedDiagnostics:T.extendedDiagnostics,onlyPrintJsDocStyle:!0,omitBraceSourceMapPositions:!0},We=bx(Pe,{hasGlobalName:t.hasGlobalName,onEmitNode:Oe.emitNodeWithNotification,isEmitNotificationEnabled:Oe.isEmitNotificationEnabled,substituteNode:Oe.substituteNode}),ze=ue(Te,De,Oe,We,{sourceMap:Pe.sourceMap,sourceRoot:T.sourceRoot,mapRoot:T.mapRoot,extendedDiagnostics:T.extendedDiagnostics});N&&(ze&&N.push(Te),De&&N.push(De))}Oe.dispose()}function pe(ke){if(Il(ke)){ke.expression.kind===80&&t.collectLinkedAliases(ke.expression,!0);return}else if(vh(ke)){t.collectLinkedAliases(ke.propertyName||ke.name,!0);return}Uo(ke,pe)}function de(ke){r_(ke)||QP(ke,Te=>{if(Wd(Te)&&!(_S(Te)&32)||du(Te))return"skip";t.markLinkedReferences(Te)})}function ue(ke,Te,De,qe,se){const Ne=De.transformed[0],Oe=Ne.kind===308?Ne:void 0,He=Ne.kind===307?Ne:void 0,Pe=Oe?Oe.sourceFiles:[He];let We;Ie(se,Ne)&&(We=ENe(r,ud(Rf(ke)),we(se),he(se,ke,He),se)),Oe?qe.writeBundle(Oe,H,We):qe.writeFile(He,H,We);let ze;if(We){E&&E.push({inputSourceFileNames:We.getSources(),sourceMap:We.toJSON()});const et=Ae(se,We,ke,Te,He);if(et&&(H.isAtStartOfLine()||H.rawWrite(F),ze=H.getTextPos(),H.writeComment(`//# sourceMappingURL=${et}`)),Te){const Me=We.toString();yK(r,R,Te,Me,!1,Pe)}}else H.writeLine();const Nt=H.getText(),$e={sourceMapUrlPos:ze,diagnostics:De.diagnostics};return yK(r,R,ke,Nt,!!T.emitBOM,Pe,$e),H.clear(),!$e.skippedDtsWrite}function Ie(ke,Te){return(ke.sourceMap||ke.inlineSourceMap)&&(Te.kind!==307||!Xl(Te.fileName,".json"))}function we(ke){const Te=Rf(ke.sourceRoot||"");return Te&&Ad(Te)}function he(ke,Te,De){if(ke.sourceRoot)return r.getCommonSourceDirectory();if(ke.mapRoot){let qe=Rf(ke.mapRoot);return De&&(qe=ts(gK(De.fileName,r,qe))),Ly(qe)===0&&(qe=zr(r.getCommonSourceDirectory(),qe)),qe}return ts(ca(Te))}function Ae(ke,Te,De,qe,se){if(ke.inlineSourceMap){const Oe=Te.toString();return`data:application/json;base64,${fDe(Pd,Oe)}`}const Ne=ud(Rf(j.checkDefined(qe)));if(ke.mapRoot){let Oe=Rf(ke.mapRoot);return se&&(Oe=ts(gK(se.fileName,r,Oe))),Ly(Oe)===0?(Oe=zr(r.getCommonSourceDirectory(),Oe),encodeURI(QL(ts(ca(De)),zr(Oe,Ne),r.getCurrentDirectory(),r.getCanonicalFileName,!0))):encodeURI(zr(Oe,Ne))}return encodeURI(Ne)}}function vLe(t){return JSON.stringify(t)}function nde(t,r){return vce(t,r)}var bLe={hasGlobalName:wa,getReferencedExportContainer:wa,getReferencedImportDeclaration:wa,getReferencedDeclarationWithCollidingName:wa,isDeclarationWithCollidingName:wa,isValueAliasDeclaration:wa,isReferencedAliasDeclaration:wa,isTopLevelValueImportEqualsWithEntityName:wa,hasNodeCheckFlag:wa,isDeclarationVisible:wa,isLateBound:t=>!1,collectLinkedAliases:wa,markLinkedReferences:wa,isImplementationOfOverload:wa,requiresAddingImplicitUndefined:wa,isExpandoFunctionDeclaration:wa,getPropertiesOfContainerFunction:wa,createTypeOfDeclaration:wa,createReturnTypeOfSignatureDeclaration:wa,createTypeOfExpression:wa,createLiteralConstValue:wa,isSymbolAccessible:wa,isEntityNameVisible:wa,getConstantValue:wa,getEnumMemberValue:wa,getReferencedValueDeclaration:wa,getReferencedValueDeclarations:wa,getTypeReferenceSerializationKind:wa,isOptionalParameter:wa,isArgumentsLocalBinding:wa,getExternalModuleFileFromDeclaration:wa,isLiteralConstDeclaration:wa,getJsxFactoryEntity:wa,getJsxFragmentFactoryEntity:wa,isBindingCapturedByNode:wa,getDeclarationStatementsForSourceFile:wa,isImportRequiredByAugmentation:wa,isDefinitelyReferenceToGlobalSymbolObject:wa},CLe=Bh(()=>bx({})),_D=Bh(()=>bx({removeComments:!0})),SLe=Bh(()=>bx({removeComments:!0,neverAsciiEscape:!0})),rde=Bh(()=>bx({removeComments:!0,omitTrailingSemicolon:!0}));function bx(t={},r={}){var{hasGlobalName:a,onEmitNode:u=qH,isEmitNotificationEnabled:h,substituteNode:p=G7,onBeforeEmitNode:g,onAfterEmitNode:C,onBeforeEmitNodeArray:b,onAfterEmitNodeArray:T,onBeforeEmitToken:E,onAfterEmitToken:N}=r,R=!!t.extendedDiagnostics,F=!!t.omitBraceSourceMapPositions,H=mS(t),U=zh(t),q=new Map,X,Z,Q,re,oe,pe,de,ue,Ie,we,he,Ae,ke,Te,De,qe=t.preserveSourceNewlines,se,Ne,Oe,He=bO,Pe,We=!0,ze,Nt,$e=-1,et,Me=-1,ut=-1,wt=-1,Et=-1,dt,zt,Ei=!1,tn=!!t.removeComments,xn,Pn,{enter:_i,exit:Fi}=HKe(R,"commentTime","beforeComment","afterComment"),On=G.parenthesizer,pn={select:V=>V===0?On.parenthesizeLeadingTypeArgument:void 0},qr=Hd();return ma(),{printNode:Fs,printList:ko,printFile:Qs,printBundle:ls,writeNode:Mn,writeList:Zs,writeFile:yi,writeBundle:at};function Fs(V,Le,Ut){switch(V){case 0:j.assert(Os(Le),"Expected a SourceFile node.");break;case 2:j.assert(ot(Le),"Expected an Identifier node.");break;case 1:j.assert(jt(Le),"Expected an Expression node.");break}switch(Le.kind){case 307:return Qs(Le);case 308:return ls(Le)}return Mn(V,Le,Ut,Sn()),dr()}function ko(V,Le,Ut){return Zs(V,Le,Ut,Sn()),dr()}function ls(V){return at(V,Sn(),void 0),dr()}function Qs(V){return yi(V,Sn(),void 0),dr()}function Mn(V,Le,Ut,Wi){const gs=Ne;Gs(Wi,void 0),us(V,Le,Ut),ma(),Ne=gs}function Zs(V,Le,Ut,Wi){const gs=Ne;Gs(Wi,void 0),Ut&&Xr(Ut),Tl(void 0,Le,V),ma(),Ne=gs}function at(V,Le,Ut){Pe=!1;const Wi=Ne;Gs(Le,Ut),BS(V),p0(V),ji(V),N2(V);for(const gs of V.sourceFiles)us(0,gs,gs);ma(),Ne=Wi}function yi(V,Le,Ut){Pe=!0;const Wi=Ne;Gs(Le,Ut),BS(V),p0(V),us(0,V,V),ma(),Ne=Wi}function Sn(){return Oe||(Oe=FV(H))}function dr(){const V=Oe.getText();return Oe.clear(),V}function us(V,Le,Ut){Ut&&Xr(Ut),Se(V,Le,void 0)}function Xr(V){X=V,dt=void 0,zt=void 0,V&&mN(V)}function Gs(V,Le){V&&t.omitTrailingSemicolon&&(V=oce(V)),Ne=V,ze=Le,We=!Ne||!ze}function ma(){Z=[],Q=[],re=[],oe=new Set,pe=[],de=new Map,ue=[],Ie=0,we=[],he=0,Ae=[],ke=void 0,Te=[],De=void 0,X=void 0,dt=void 0,zt=void 0,Gs(void 0,void 0)}function ka(){return dt||(dt=Lv(j.checkDefined(X)))}function Ji(V,Le){V!==void 0&&Se(4,V,Le)}function ac(V){V!==void 0&&Se(2,V,void 0)}function St(V,Le){V!==void 0&&Se(1,V,Le)}function ri(V){Se(Ha(V)?6:4,V)}function xe(V){qe&&u0(V)&4&&(qe=!1)}function pt(V){qe=V}function Se(V,Le,Ut){Pn=Ut,Dt(0,V,Le)(V,Le),Pn=void 0}function Ze(V){return!tn&&!Os(V)}function gt(V){return!We&&!Os(V)&&!ZG(V)}function Dt(V,Le,Ut){switch(V){case 0:if(u!==qH&&(!h||h(Ut)))return Rt;case 1:if(p!==G7&&(xn=p(Le,Ut)||Ut)!==Ut)return Pn&&(xn=Pn(xn)),Ni;case 2:if(Ze(Ut))return AA;case 3:if(gt(Ut))return FD;case 4:return Ct;default:return j.assertNever(V)}}function Je(V,Le,Ut){return Dt(V+1,Le,Ut)}function Rt(V,Le){const Ut=Je(0,V,Le);u(V,Le,Ut)}function Ct(V,Le){if(g==null||g(Le),qe){const Ut=qe;xe(Le),ii(V,Le),pt(Ut)}else ii(V,Le);C==null||C(Le),Pn=void 0}function ii(V,Le,Ut=!0){if(Ut){const Wi=rle(Le);if(Wi)return Gt(V,Le,Wi)}if(V===0)return Z1(ha(Le,Os));if(V===2)return be(ha(Le,ot));if(V===6)return tt(ha(Le,Ha),!0);if(V===3)return vt(ha(Le,$l));if(V===7)return nn(ha(Le,LI));if(V===5)return j.assertNode(Le,mle),h_(!0);if(V===4){switch(Le.kind){case 16:case 17:case 18:return tt(Le,!1);case 80:return be(Le);case 81:return Qt(Le);case 166:return lt(Le);case 167:return hi(Le);case 168:return vn(Le);case 169:return ln(Le);case 170:return Un(Le);case 171:return Pt(Le);case 172:return Bt(Le);case 173:return fi(Le);case 174:return wi(Le);case 175:return Ri(Le);case 176:return Ai(Le);case 177:case 178:return Xn(Le);case 179:return Di(Le);case 180:return on(Le);case 181:return zi(Le);case 182:return qo(Le);case 183:return Wo(Le);case 184:return $o(Le);case 185:return wf(Le);case 186:return Jo(Le);case 187:return kh(Le);case 188:return md(Le);case 189:return pc(Le);case 190:return oo(Le);case 192:return tc(Le);case 193:return ki(Le);case 194:return Gc(Le);case 195:return uh(Le);case 196:return sd(Le);case 233:return Y_(Le);case 197:return Pp();case 198:return Nl(Le);case 199:return Ve(Le);case 200:return _e(Le);case 201:return Lt(Le);case 202:return mc(Le);case 203:return ci(Le);case 204:return cn(Le);case 205:return Mi(Le);case 206:return Rn(Le);case 207:return Yr(Le);case 208:return Xi(Le);case 239:return Hg(Le);case 240:return vi();case 241:return F_(Le);case 243:return lC(Le);case 242:return h_(!1);case 244:return Yv(Le);case 245:return vm(Le);case 246:return Ot(Le);case 247:return mi(Le);case 248:return Ci(Le);case 249:return hn(Le);case 250:return Wn(Le);case 251:return ps(Le);case 252:return ee(Le);case 253:return To(Le);case 254:return Zo(Le);case 255:return uc(Le);case 256:return Xa(Le);case 257:return Yl(Le);case 258:return ig(Le);case 259:return h0(Le);case 260:return K0(Le);case 261:return eb(Le);case 262:return PS(Le);case 263:return $y(Le);case 264:return AS(Le);case 265:return zg(Le);case 266:return x2(Le);case 267:return bm(Le);case 268:return Ug(Le);case 269:return dC(Le);case 270:return Pr(Le);case 271:return k2(Le);case 272:return nb(Le);case 273:return T2(Le);case 274:return xx(Le);case 280:return ks(Le);case 275:return it(Le);case 276:return yt(Le);case 277:return ei(Le);case 278:return Pi(Le);case 279:return ar(Le);case 281:return Ns(Le);case 300:return Vn(Le);case 301:return mn(Le);case 282:return;case 283:return ll(Le);case 12:return Jh(Le);case 286:case 289:return $g(Le);case 287:case 290:return DD(Le);case 291:return rb(Le);case 292:return kx(Le);case 293:return fC(Le);case 294:return Tx(Le);case 295:return Dx(Le);case 296:return ZI(Le);case 297:return D2(Le);case 298:return ED(Le);case 299:return YI(Le);case 303:return E2(Le);case 304:return sb(Le);case 305:return ob(Le);case 306:return Cm(Le);case 307:return Z1(Le);case 308:return j.fail("Bundles should be printed using printBundle");case 309:return Z0(Le);case 310:return vO(Le);case 312:return vr("*");case 313:return vr("?");case 314:return Zc(Le);case 315:return Ls(Le);case 316:return ja(Le);case 317:return Gu(Le);case 191:case 318:return go(Le);case 319:return;case 320:return Op(Le);case 322:return hC(Le);case 323:return ip(Le);case 327:case 332:case 337:return dh(Le);case 328:case 329:return Xd(Le);case 330:case 331:return;case 333:case 334:case 335:case 336:return;case 338:return Gy(Le);case 339:return kA(Le);case 341:case 348:return I2(Le);case 340:case 342:case 343:case 344:case 349:case 350:return Mp(Le);case 345:return Q0(Le);case 346:return RS(Le);case 347:return tp(Le);case 351:return Ix(Le);case 353:return}if(jt(Le)&&(V=1,p!==G7)){const Wi=p(V,Le)||Le;Wi!==Le&&(Le=Wi,Pn&&(Le=Pn(Le)))}}if(V===1)switch(Le.kind){case 9:case 10:return te(Le);case 11:case 14:case 15:return tt(Le,!1);case 80:return be(Le);case 81:return Qt(Le);case 209:return Mr(Le);case 210:return ds(Le);case 211:return Ks(Le);case 212:return Gl(Le);case 213:return Pu(Le);case 214:return Ku(Le);case 215:return Xu(Le);case 216:return Wl(Le);case 217:return Cu(Le);case 218:return gm(Le);case 219:return Qu(Le);case 220:return Ye(Le);case 221:return li(Le);case 222:return En(Le);case 223:return po(Le);case 224:return ic(Le);case 225:return Hu(Le);case 226:return qr(Le);case 227:return Yc(Le);case 228:return Pc(Le);case 229:return od(Le);case 230:return Ap(Le);case 231:return Vg(Le);case 232:return;case 234:return Jp(Le);case 235:return ym(Le);case 233:return Y_(Le);case 238:return tg(Le);case 236:return Zv(Le);case 237:return j.fail("SyntheticExpression should never be printed.");case 282:return;case 284:return qh(Le);case 285:return qg(Le);case 288:return $h(Le);case 352:return j.fail("SyntaxList should not be printed");case 353:return;case 354:return pC(Le);case 355:return DA(Le);case 356:return j.fail("SyntheticReferenceExpression should not be printed")}if(P_(Le.kind))return rN(Le,Vo);if(Zoe(Le.kind))return rN(Le,vr);j.fail(`Unhandled SyntaxKind: ${j.formatSyntaxKind(Le.kind)}.`)}function vt(V){Ji(V.name),rr(),Vo("in"),rr(),Ji(V.constraint)}function Ni(V,Le){const Ut=Je(1,V,Le);j.assertIsDefined(xn),Le=xn,xn=void 0,Ut(V,Le)}function ji(V){let Le=!1;const Ut=V.kind===308?V:void 0;if(Ut&&U===0)return;const Wi=Ut?Ut.sourceFiles.length:1;for(let gs=0;gs<Wi;gs++){const ao=Ut?Ut.sourceFiles[gs]:V,Co=Os(ao)?ao:X,co=t.noEmitHelpers||!!Co&&oIe(Co),Xs=Os(ao)&&!Pe,Gh=gr(ao);if(Gh)for(const xf of Gh){if(xf.scoped){if(Ut)continue}else{if(co)continue;if(Xs){if(q.get(xf.name))continue;q.set(xf.name,!0)}}typeof xf.text=="string"?Y1(xf.text):Y1(xf.text(LA)),Le=!0}}return Le}function gr(V){const Le=dX(V);return Le&&Mu(Le,kEe)}function te(V){tt(V,!1)}function tt(V,Le){const Ut=lb(V,void 0,t.neverAsciiEscape,Le);(t.sourceMap||t.inlineSourceMap)&&(V.kind===11||Gw(V.kind))?ND(Ut):iN(Ut)}function Gt(V,Le,Ut){switch(Ut.kind){case 1:le(V,Le,Ut);break;case 0:Ue(V,Le,Ut);break}}function le(V,Le,Ut){nN(`\${${Ut.order}:`),ii(V,Le,!1),nN("}")}function Ue(V,Le,Ut){j.assert(Le.kind===242,`A tab stop cannot be attached to a node of kind ${j.formatSyntaxKind(Le.kind)}.`),j.assert(V!==5,"A tab stop cannot be attached to an embedded statement."),nN(`$${Ut.order}`)}function be(V){(V.symbol?CO:He)(Ax(V,!1),V.symbol),Tl(V,kI(V),53776)}function Qt(V){He(Ax(V,!1))}function lt(V){st(V.left),vr("."),Ji(V.right)}function st(V){V.kind===80?St(V):Ji(V)}function hi(V){vr("["),St(V.expression,On.parenthesizeExpressionOfComputedPropertyName),vr("]")}function vn(V){ab(V,V.modifiers),Ji(V.name),V.constraint&&(rr(),Vo("extends"),rr(),Ji(V.constraint)),V.default&&(rr(),HS("="),rr(),Ji(V.default))}function ln(V){Kp(V,V.modifiers,!0),Ji(V.dotDotDotToken),L2(V.name,NA),Ji(V.questionToken),V.parent&&V.parent.kind===317&&!V.name?Ji(V.type):Y0(V.type),Ky(V.initializer,V.type?V.type.end:V.questionToken?V.questionToken.end:V.name?V.name.end:V.modifiers?V.modifiers.end:V.pos,V,On.parenthesizeExpressionForDisallowedComma)}function Un(V){vr("@"),St(V.expression,On.parenthesizeLeftSideOfAccess)}function Pt(V){ab(V,V.modifiers),L2(V.name,SO),Ji(V.questionToken),Y0(V.type),fh()}function Bt(V){Kp(V,V.modifiers,!0),Ji(V.name),Ji(V.questionToken),Ji(V.exclamationToken),Y0(V.type),Ky(V.initializer,V.type?V.type.end:V.questionToken?V.questionToken.end:V.name.end,V),fh()}function fi(V){ab(V,V.modifiers),Ji(V.name),Ji(V.questionToken),ng(V,Gp,Vl)}function wi(V){Kp(V,V.modifiers,!0),Ji(V.asteriskToken),Ji(V.name),Ji(V.questionToken),ng(V,Gp,rg)}function Ri(V){Vo("static"),yC(V),X0(V.body),m0(V)}function Ai(V){Kp(V,V.modifiers,!1),Vo("constructor"),ng(V,Gp,rg)}function Xn(V){const Le=Kp(V,V.modifiers,!0),Ut=V.kind===177?139:153;Xe(Ut,Le,Vo,V),rr(),Ji(V.name),ng(V,Gp,rg)}function Di(V){ng(V,Gp,Vl)}function on(V){Vo("new"),rr(),ng(V,Gp,Vl)}function zi(V){Kp(V,V.modifiers,!1),Lx(V,V.parameters),Y0(V.type),fh()}function cn(V){Ji(V.type),Ji(V.literal)}function vi(){fh()}function qo(V){V.assertsModifier&&(Ji(V.assertsModifier),rr()),Ji(V.parameterName),V.type&&(rr(),Vo("is"),rr(),Ji(V.type))}function Wo(V){Ji(V.typeName),yr(V,V.typeArguments)}function $o(V){ng(V,Lc,vu)}function Lc(V){ff(V,V.typeParameters),eN(V,V.parameters),rr(),vr("=>")}function vu(V){rr(),Ji(V.type)}function Gu(V){Vo("function"),mC(V,V.parameters),vr(":"),Ji(V.type)}function Zc(V){vr("?"),Ji(V.type)}function Ls(V){vr("!"),Ji(V.type)}function ja(V){Ji(V.type),vr("=")}function wf(V){ab(V,V.modifiers),Vo("new"),rr(),ng(V,Lc,vu)}function Jo(V){Vo("typeof"),rr(),Ji(V.exprName),yr(V,V.typeArguments)}function kh(V){yC(V),O(V.members,uN),vr("{");const Le=Ya(V)&1?768:32897;Tl(V,V.members,Le|524288),vr("}"),m0(V)}function md(V){Ji(V.elementType,On.parenthesizeNonArrayTypeOfPostfixType),vr("["),vr("]")}function go(V){vr("..."),Ji(V.type)}function pc(V){Xe(23,V.pos,vr,V);const Le=Ya(V)&1?528:657;Tl(V,V.elements,Le|524288,On.parenthesizeElementTypeOfTupleType),Xe(24,V.elements.end,vr,V)}function mc(V){Ji(V.dotDotDotToken),Ji(V.name),Ji(V.questionToken),Xe(59,V.name.end,vr,V),rr(),Ji(V.type)}function oo(V){Ji(V.type,On.parenthesizeTypeOfOptionalType),vr("?")}function tc(V){Tl(V,V.types,516,On.parenthesizeConstituentTypeOfUnionType)}function ki(V){Tl(V,V.types,520,On.parenthesizeConstituentTypeOfIntersectionType)}function Gc(V){Ji(V.checkType,On.parenthesizeCheckTypeOfConditionalType),rr(),Vo("extends"),rr(),Ji(V.extendsType,On.parenthesizeExtendsTypeOfConditionalType),rr(),vr("?"),rr(),Ji(V.trueType),rr(),vr(":"),rr(),Ji(V.falseType)}function uh(V){Vo("infer"),rr(),Ji(V.typeParameter)}function sd(V){vr("("),Ji(V.type),vr(")")}function Pp(){Vo("this")}function Nl(V){cb(V.operator,Vo),rr();const Le=V.operator===148?On.parenthesizeOperandOfReadonlyTypeOperator:On.parenthesizeOperandOfTypeOperator;Ji(V.type,Le)}function Ve(V){Ji(V.objectType,On.parenthesizeNonArrayTypeOfPostfixType),vr("["),Ji(V.indexType),vr("]")}function _e(V){const Le=Ya(V);vr("{"),Le&1?rr():(Th(),Dh()),V.readonlyToken&&(Ji(V.readonlyToken),V.readonlyToken.kind!==148&&Vo("readonly"),rr()),vr("["),Se(3,V.typeParameter),V.nameType&&(rr(),Vo("as"),rr(),Ji(V.nameType)),vr("]"),V.questionToken&&(Ji(V.questionToken),V.questionToken.kind!==58&&vr("?")),vr(":"),rr(),Ji(V.type),fh(),Le&1?rr():(Th(),Xp()),Tl(V,V.members,2),vr("}")}function Lt(V){St(V.literal)}function ci(V){Ji(V.head),Tl(V,V.templateSpans,262144)}function Mi(V){V.isTypeOf&&(Vo("typeof"),rr()),Vo("import"),vr("("),Ji(V.argument),V.attributes&&(vr(","),rr(),Se(7,V.attributes)),vr(")"),V.qualifier&&(vr("."),Ji(V.qualifier)),yr(V,V.typeArguments)}function Rn(V){vr("{"),Tl(V,V.elements,525136),vr("}")}function Yr(V){vr("["),Tl(V,V.elements,524880),vr("]")}function Xi(V){Ji(V.dotDotDotToken),V.propertyName&&(Ji(V.propertyName),vr(":"),rr()),Ji(V.name),Ky(V.initializer,V.name.end,V,On.parenthesizeExpressionForDisallowedComma)}function Mr(V){const Le=V.elements,Ut=V.multiLine?65536:0;gC(V,Le,8914|Ut,On.parenthesizeExpressionForDisallowedComma)}function ds(V){yC(V),O(V.properties,uN);const Le=Ya(V)&131072;Le&&Dh();const Ut=V.multiLine?65536:0,Wi=X&&X.languageVersion>=1&&!Eg(X)?64:0;Tl(V,V.properties,526226|Wi|Ut),Le&&Xp(),m0(V)}function Ks(V){St(V.expression,On.parenthesizeLeftSideOfAccess);const Le=V.questionDotToken||V0(G.createToken(25),V.expression.end,V.name.pos),Ut=e1(V,V.expression,Le),Wi=e1(V,Le,V.name);Sm(Ut,!1),Le.kind!==29&&Ic(V.expression)&&!Ne.hasTrailingComment()&&!Ne.hasTrailingWhitespace()&&vr("."),V.questionDotToken?Ji(Le):Xe(Le.kind,V.expression.end,vr,V),Sm(Wi,!1),Ji(V.name),jS(Ut,Wi)}function Ic(V){if(V=l0(V),A_(V)){const Le=lb(V,void 0,!0,!1);return!(V.numericLiteralFlags&448)&&!Le.includes(xa(25))&&!Le.includes("E")&&!Le.includes("e")}else if(Sl(V)){const Le=mEe(V);return typeof Le=="number"&&isFinite(Le)&&Le>=0&&Math.floor(Le)===Le}}function Gl(V){St(V.expression,On.parenthesizeLeftSideOfAccess),Ji(V.questionDotToken),Xe(23,V.expression.end,vr,V),St(V.argumentExpression),Xe(24,V.argumentExpression.end,vr,V)}function Pu(V){const Le=u0(V)&16;Le&&(vr("("),ND("0"),vr(","),rr()),St(V.expression,On.parenthesizeLeftSideOfAccess),Le&&vr(")"),Ji(V.questionDotToken),yr(V,V.typeArguments),gC(V,V.arguments,2576,On.parenthesizeExpressionForDisallowedComma)}function Ku(V){Xe(105,V.pos,Vo,V),rr(),St(V.expression,On.parenthesizeExpressionOfNew),yr(V,V.typeArguments),gC(V,V.arguments,18960,On.parenthesizeExpressionForDisallowedComma)}function Xu(V){const Le=u0(V)&16;Le&&(vr("("),ND("0"),vr(","),rr()),St(V.tag,On.parenthesizeLeftSideOfAccess),Le&&vr(")"),yr(V,V.typeArguments),rr(),St(V.template)}function Wl(V){vr("<"),Ji(V.type),vr(">"),St(V.expression,On.parenthesizeOperandOfPrefixUnary)}function Cu(V){const Le=Xe(21,V.pos,vr,V),Ut=oN(V.expression,V);St(V.expression,void 0),aN(V.expression,V),jS(Ut),Xe(22,V.expression?V.expression.end:Le,vr,V)}function gm(V){Xy(V.name),tb(V)}function Qu(V){ab(V,V.modifiers),ng(V,kd,eg)}function kd(V){ff(V,V.typeParameters),eN(V,V.parameters),Y0(V.type),rr(),Ji(V.equalsGreaterThanToken)}function eg(V){Xo(V.body)?X0(V.body):(rr(),St(V.body,On.parenthesizeConciseBodyOfArrowFunction))}function Ye(V){Xe(91,V.pos,Vo,V),rr(),St(V.expression,On.parenthesizeOperandOfPrefixUnary)}function li(V){Xe(114,V.pos,Vo,V),rr(),St(V.expression,On.parenthesizeOperandOfPrefixUnary)}function En(V){Xe(116,V.pos,Vo,V),rr(),St(V.expression,On.parenthesizeOperandOfPrefixUnary)}function po(V){Xe(135,V.pos,Vo,V),rr(),St(V.expression,On.parenthesizeOperandOfPrefixUnary)}function ic(V){cb(V.operator,HS),sc(V)&&rr(),St(V.operand,On.parenthesizeOperandOfPrefixUnary)}function sc(V){const Le=V.operand;return Le.kind===224&&(V.operator===40&&(Le.operator===40||Le.operator===46)||V.operator===41&&(Le.operator===41||Le.operator===47))}function Hu(V){St(V.operand,On.parenthesizeOperandOfPostfixUnary),cb(V.operator,HS)}function Hd(){return BX(V,Le,Ut,Wi,gs,void 0);function V(Co,co){if(co){co.stackIndex++,co.preserveSourceNewlinesStack[co.stackIndex]=qe,co.containerPosStack[co.stackIndex]=ut,co.containerEndStack[co.stackIndex]=wt,co.declarationListContainerEndStack[co.stackIndex]=Et;const Xs=co.shouldEmitCommentsStack[co.stackIndex]=Ze(Co),Gh=co.shouldEmitSourceMapsStack[co.stackIndex]=gt(Co);g==null||g(Co),Xs&&Mx(Co),Gh&&BD(Co),xe(Co)}else co={stackIndex:0,preserveSourceNewlinesStack:[void 0],containerPosStack:[-1],containerEndStack:[-1],declarationListContainerEndStack:[-1],shouldEmitCommentsStack:[!1],shouldEmitSourceMapsStack:[!1]};return co}function Le(Co,co,Xs){return ao(Co,Xs,"left")}function Ut(Co,co,Xs){const Gh=Co.kind!==28,xf=e1(Xs,Xs.left,Co),i1=e1(Xs,Co,Xs.right);Sm(xf,Gh),$S(Co.pos),rN(Co,Co.kind===103?Vo:HS),db(Co.end,!0),Sm(i1,!0)}function Wi(Co,co,Xs){return ao(Co,Xs,"right")}function gs(Co,co){const Xs=e1(Co,Co.left,Co.operatorToken),Gh=e1(Co,Co.operatorToken,Co.right);if(jS(Xs,Gh),co.stackIndex>0){const xf=co.preserveSourceNewlinesStack[co.stackIndex],i1=co.containerPosStack[co.stackIndex],JS=co.containerEndStack[co.stackIndex],Bp=co.declarationListContainerEndStack[co.stackIndex],WD=co.shouldEmitCommentsStack[co.stackIndex],F2=co.shouldEmitSourceMapsStack[co.stackIndex];pt(xf),F2&&Gg(Co),WD&&hN(Co,i1,JS,Bp),C==null||C(Co),co.stackIndex--}}function ao(Co,co,Xs){const Gh=Xs==="left"?On.getParenthesizeLeftSideOfBinaryForOperator(co.operatorToken.kind):On.getParenthesizeRightSideOfBinaryForOperator(co.operatorToken.kind);let xf=Dt(0,1,Co);if(xf===Ni&&(j.assertIsDefined(xn),Co=Gh(ha(xn,jt)),xf=Je(1,1,Co),xn=void 0),(xf===AA||xf===FD||xf===Ct)&&ur(Co))return Co;Pn=Gh,xf(1,Co)}}function Yc(V){const Le=e1(V,V.condition,V.questionToken),Ut=e1(V,V.questionToken,V.whenTrue),Wi=e1(V,V.whenTrue,V.colonToken),gs=e1(V,V.colonToken,V.whenFalse);St(V.condition,On.parenthesizeConditionOfConditionalExpression),Sm(Le,!0),Ji(V.questionToken),Sm(Ut,!0),St(V.whenTrue,On.parenthesizeBranchOfConditionalExpression),jS(Le,Ut),Sm(Wi,!0),Ji(V.colonToken),Sm(gs,!0),St(V.whenFalse,On.parenthesizeBranchOfConditionalExpression),jS(Wi,gs)}function Pc(V){Ji(V.head),Tl(V,V.templateSpans,262144)}function od(V){Xe(127,V.pos,Vo,V),Ji(V.asteriskToken),Jg(V.expression&&Is(V.expression),Qo)}function Ap(V){Xe(26,V.pos,vr,V),St(V.expression,On.parenthesizeExpressionForDisallowedComma)}function Vg(V){Xy(V.name),uC(V)}function Y_(V){St(V.expression,On.parenthesizeLeftSideOfAccess),yr(V,V.typeArguments)}function Jp(V){St(V.expression,void 0),V.type&&(rr(),Vo("as"),rr(),Ji(V.type))}function ym(V){St(V.expression,On.parenthesizeLeftSideOfAccess),HS("!")}function tg(V){St(V.expression,void 0),V.type&&(rr(),Vo("satisfies"),rr(),Ji(V.type))}function Zv(V){A2(V.keywordToken,V.pos,vr),vr("."),Ji(V.name)}function Hg(V){St(V.expression),Ji(V.literal)}function F_(V){jd(V,!V.multiLine&&wO(V))}function jd(V,Le){Xe(19,V.pos,vr,V);const Ut=Le||Ya(V)&1?768:129;Tl(V,V.statements,Ut),Xe(20,V.statements.end,vr,V,!!(Ut&1))}function lC(V){Kp(V,V.modifiers,!1),Ji(V.declarationList),fh()}function h_(V){V?vr(";"):fh()}function Yv(V){St(V.expression,On.parenthesizeExpressionOfExpressionStatement),(!X||!Eg(X)||cl(V.expression))&&fh()}function vm(V){const Le=Xe(101,V.pos,Vo,V);rr(),Xe(21,Le,vr,V),St(V.expression),Xe(22,V.expression.end,vr,V),WS(V,V.thenStatement),V.elseStatement&&(np(V,V.thenStatement,V.elseStatement),Xe(93,V.thenStatement.end,Vo,V),V.elseStatement.kind===245?(rr(),Ji(V.elseStatement)):WS(V,V.elseStatement))}function ve(V,Le){const Ut=Xe(117,Le,Vo,V);rr(),Xe(21,Ut,vr,V),St(V.expression),Xe(22,V.expression.end,vr,V)}function Ot(V){Xe(92,V.pos,Vo,V),WS(V,V.statement),Xo(V.statement)&&!qe?rr():np(V,V.statement,V.expression),ve(V,V.statement.end),fh()}function mi(V){ve(V,V.pos),WS(V,V.statement)}function Ci(V){const Le=Xe(99,V.pos,Vo,V);rr();let Ut=Xe(21,Le,vr,V);Lr(V.initializer),Ut=Xe(27,V.initializer?V.initializer.end:Ut,vr,V),Jg(V.condition),Ut=Xe(27,V.condition?V.condition.end:Ut,vr,V),Jg(V.incrementor),Xe(22,V.incrementor?V.incrementor.end:Ut,vr,V),WS(V,V.statement)}function hn(V){const Le=Xe(99,V.pos,Vo,V);rr(),Xe(21,Le,vr,V),Lr(V.initializer),rr(),Xe(103,V.initializer.end,Vo,V),rr(),St(V.expression),Xe(22,V.expression.end,vr,V),WS(V,V.statement)}function Wn(V){const Le=Xe(99,V.pos,Vo,V);rr(),IA(V.awaitModifier),Xe(21,Le,vr,V),Lr(V.initializer),rr(),Xe(165,V.initializer.end,Vo,V),rr(),St(V.expression),Xe(22,V.expression.end,vr,V),WS(V,V.statement)}function Lr(V){V!==void 0&&(V.kind===261?Ji(V):St(V))}function ps(V){Xe(88,V.pos,Vo,V),Nx(V.label),fh()}function ee(V){Xe(83,V.pos,Vo,V),Nx(V.label),fh()}function Xe(V,Le,Ut,Wi,gs){const ao=Mo(Wi),Co=ao&&ao.kind===Wi.kind,co=Le;if(Co&&X&&(Le=Va(X.text,Le)),Co&&Wi.pos!==co){const Xs=gs&&X&&!qm(co,Le,X);Xs&&Dh(),$S(co),Xs&&Xp()}if(!F&&(V===19||V===20)?Le=A2(V,Le,Ut,Wi):Le=cb(V,Ut,Le),Co&&Wi.end!==Le){const Xs=Wi.kind===294;db(Le,!Xs,Xs)}return Le}function Zt(V){return V.kind===2||!!V.hasTrailingNewLine}function Nn(V){if(!X)return!1;const Le=Av(X.text,V.pos);if(Le){const Ut=Mo(V);if(Ut&&c_(Ut.parent))return!0}return Ft(Le,Zt)||Ft(y3(V),Zt)?!0:ple(V)?V.pos!==V.expression.pos&&Ft(qw(X.text,V.expression.pos),Zt)?!0:Nn(V.expression):!1}function Is(V){if(!tn&&ple(V)&&Nn(V)){const Le=Mo(V);if(Le&&c_(Le)){const Ut=G.createParenthesizedExpression(V.expression);return Ir(Ut,V),Ht(Ut,Le),Ut}return G.createParenthesizedExpression(V)}return V}function Qo(V){return Is(On.parenthesizeExpressionForDisallowedComma(V))}function To(V){Xe(107,V.pos,Vo,V),Jg(V.expression&&Is(V.expression),Is),fh()}function Zo(V){const Le=Xe(118,V.pos,Vo,V);rr(),Xe(21,Le,vr,V),St(V.expression),Xe(22,V.expression.end,vr,V),WS(V,V.statement)}function uc(V){const Le=Xe(109,V.pos,Vo,V);rr(),Xe(21,Le,vr,V),St(V.expression),Xe(22,V.expression.end,vr,V),rr(),Ji(V.caseBlock)}function Xa(V){Ji(V.label),Xe(59,V.label.end,vr,V),rr(),Ji(V.statement)}function Yl(V){Xe(111,V.pos,Vo,V),Jg(Is(V.expression),Is),fh()}function ig(V){Xe(113,V.pos,Vo,V),rr(),Ji(V.tryBlock),V.catchClause&&(np(V,V.tryBlock,V.catchClause),Ji(V.catchClause)),V.finallyBlock&&(np(V,V.catchClause||V.tryBlock,V.finallyBlock),Xe(98,(V.catchClause||V.tryBlock).end,Vo,V),rr(),Ji(V.finallyBlock))}function h0(V){A2(89,V.pos,Vo),fh()}function K0(V){var Le,Ut,Wi;Ji(V.name),Ji(V.exclamationToken),Y0(V.type),Ky(V.initializer,((Le=V.type)==null?void 0:Le.end)??((Wi=(Ut=V.name.emitNode)==null?void 0:Ut.typeNode)==null?void 0:Wi.end)??V.name.end,V,On.parenthesizeExpressionForDisallowedComma)}function eb(V){if(iV(V))Vo("await"),rr(),Vo("using");else{const Le=WG(V)?"let":$6(V)?"const":nV(V)?"using":"var";Vo(Le)}rr(),Tl(V,V.declarations,528)}function PS(V){tb(V)}function tb(V){Kp(V,V.modifiers,!1),Vo("function"),Ji(V.asteriskToken),rr(),ac(V.name),ng(V,Gp,rg)}function ng(V,Le,Ut){const Wi=Ya(V)&131072;Wi&&Dh(),yC(V),O(V.parameters,Qd),Le(V),Ut(V),m0(V),Wi&&Xp()}function rg(V){const Le=V.body;Le?X0(Le):fh()}function Vl(V){fh()}function Gp(V){ff(V,V.typeParameters),mC(V,V.parameters),Y0(V.type)}function ep(V){if(Ya(V)&1)return!0;if(V.multiLine||!cl(V)&&X&&!wI(V,X)||zS(V,Ra(V.statements),2)||sN(V,rl(V.statements),2,V.statements))return!1;let Le;for(const Ut of V.statements){if(LD(Le,Ut,2)>0)return!1;Le=Ut}return!0}function X0(V){Qd(V),g==null||g(V),rr(),vr("{"),Dh();const Le=ep(V)?ib:jg;Rx(V,V.statements,Le),Xp(),A2(20,V.statements.end,vr,V),C==null||C(V)}function ib(V){jg(V,!0)}function jg(V,Le){const Ut=$a(V.statements),Wi=Ne.getTextPos();ji(V),Ut===0&&Wi===Ne.getTextPos()&&Le?(Xp(),Tl(V,V.statements,768),Dh()):Tl(V,V.statements,1,void 0,Ut)}function $y(V){uC(V)}function uC(V){Kp(V,V.modifiers,!0),Xe(86,R1(V).pos,Vo,V),V.name&&(rr(),ac(V.name));const Le=Ya(V)&131072;Le&&Dh(),ff(V,V.typeParameters),Tl(V,V.heritageClauses,0),rr(),vr("{"),yC(V),O(V.members,uN),Tl(V,V.members,129),m0(V),vr("}"),Le&&Xp()}function AS(V){Kp(V,V.modifiers,!1),Vo("interface"),rr(),Ji(V.name),ff(V,V.typeParameters),Tl(V,V.heritageClauses,512),rr(),vr("{"),yC(V),O(V.members,uN),Tl(V,V.members,129),m0(V),vr("}")}function zg(V){Kp(V,V.modifiers,!1),Vo("type"),rr(),Ji(V.name),ff(V,V.typeParameters),rr(),vr("="),rr(),Ji(V.type),fh()}function x2(V){Kp(V,V.modifiers,!1),Vo("enum"),rr(),Ji(V.name),rr(),vr("{"),Tl(V,V.members,145),vr("}")}function bm(V){Kp(V,V.modifiers,!1),~V.flags&2048&&(Vo(V.flags&32?"namespace":"module"),rr()),Ji(V.name);let Le=V.body;if(!Le)return fh();for(;Le&&rd(Le);)vr("."),Ji(Le.name),Le=Le.body;rr(),Ji(Le)}function Ug(V){yC(V),O(V.statements,Qd),jd(V,wO(V)),m0(V)}function dC(V){Xe(19,V.pos,vr,V),Tl(V,V.clauses,129),Xe(20,V.clauses.end,vr,V,!0)}function k2(V){Kp(V,V.modifiers,!1),Xe(102,V.modifiers?V.modifiers.end:V.pos,Vo,V),rr(),V.isTypeOnly&&(Xe(156,V.pos,Vo,V),rr()),Ji(V.name),rr(),Xe(64,V.name.end,vr,V),rr(),Jy(V.moduleReference),fh()}function Jy(V){V.kind===80?St(V):Ji(V)}function nb(V){Kp(V,V.modifiers,!1),Xe(102,V.modifiers?V.modifiers.end:V.pos,Vo,V),rr(),V.importClause&&(Ji(V.importClause),rr(),Xe(161,V.importClause.end,Vo,V),rr()),St(V.moduleSpecifier),V.attributes&&Nx(V.attributes),fh()}function T2(V){V.isTypeOnly&&(Xe(156,V.pos,Vo,V),rr()),Ji(V.name),V.name&&V.namedBindings&&(Xe(28,V.name.end,vr,V),rr()),Ji(V.namedBindings)}function xx(V){const Le=Xe(42,V.pos,vr,V);rr(),Xe(130,Le,Vo,V),rr(),Ji(V.name)}function it(V){cr(V)}function yt(V){Go(V)}function ei(V){const Le=Xe(95,V.pos,Vo,V);rr(),V.isExportEquals?Xe(64,Le,HS,V):Xe(90,Le,Vo,V),rr(),St(V.expression,V.isExportEquals?On.getParenthesizeRightSideOfBinaryForOperator(64):On.parenthesizeExpressionOfExportDefault),fh()}function Pi(V){Kp(V,V.modifiers,!1);let Le=Xe(95,V.pos,Vo,V);if(rr(),V.isTypeOnly&&(Le=Xe(156,Le,Vo,V),rr()),V.exportClause?Ji(V.exportClause):Le=Xe(42,Le,vr,V),V.moduleSpecifier){rr();const Ut=V.exportClause?V.exportClause.end:Le;Xe(161,Ut,Vo,V),rr(),St(V.moduleSpecifier)}V.attributes&&Nx(V.attributes),fh()}function nn(V){vr("{"),rr(),Vo(V.token===132?"assert":"with"),vr(":"),rr();const Le=V.elements;Tl(V,Le,526226),rr(),vr("}")}function Vn(V){Xe(V.token,V.pos,Vo,V),rr();const Le=V.elements;Tl(V,Le,526226)}function mn(V){Ji(V.name),vr(":"),rr();const Le=V.value;if(!(Ya(Le)&1024)){const Ut=B1(Le);db(Ut.pos)}Ji(Le)}function Pr(V){let Le=Xe(95,V.pos,Vo,V);rr(),Le=Xe(130,Le,Vo,V),rr(),Le=Xe(145,Le,Vo,V),rr(),Ji(V.name),fh()}function ks(V){const Le=Xe(42,V.pos,vr,V);rr(),Xe(130,Le,Vo,V),rr(),Ji(V.name)}function ar(V){cr(V)}function Ns(V){Go(V)}function cr(V){vr("{"),Tl(V,V.elements,525136),vr("}")}function Go(V){V.isTypeOnly&&(Vo("type"),rr()),V.propertyName&&(Ji(V.propertyName),rr(),Xe(130,V.propertyName.end,Vo,V),rr()),Ji(V.name)}function ll(V){Vo("require"),vr("("),St(V.expression),vr(")")}function qh(V){Ji(V.openingElement),Tl(V,V.children,262144),Ji(V.closingElement)}function qg(V){vr("<"),Ex(V.tagName),yr(V,V.typeArguments),rr(),Ji(V.attributes),vr("/>")}function $h(V){Ji(V.openingFragment),Tl(V,V.children,262144),Ji(V.closingFragment)}function $g(V){if(vr("<"),z1(V)){const Le=oN(V.tagName,V);Ex(V.tagName),yr(V,V.typeArguments),V.attributes.properties&&V.attributes.properties.length>0&&rr(),Ji(V.attributes),aN(V.attributes,V),jS(Le)}vr(">")}function Jh(V){Ne.writeLiteral(V.text)}function DD(V){vr("</"),oD(V)&&Ex(V.tagName),vr(">")}function kx(V){Tl(V,V.properties,262656)}function rb(V){Ji(V.name),EA("=",vr,V.initializer,ri)}function fC(V){vr("{..."),St(V.expression),vr("}")}function OS(V){let Le=!1;return DW((X==null?void 0:X.text)||"",V+1,()=>Le=!0),Le}function _0(V){let Le=!1;return TW((X==null?void 0:X.text)||"",V+1,()=>Le=!0),Le}function MS(V){return OS(V)||_0(V)}function Tx(V){var Le;if(V.expression||!tn&&!cl(V)&&MS(V.pos)){const Ut=X&&!cl(V)&&Ia(X,V.pos).line!==Ia(X,V.end).line;Ut&&Ne.increaseIndent();const Wi=Xe(19,V.pos,vr,V);Ji(V.dotDotDotToken),St(V.expression),Xe(20,((Le=V.expression)==null?void 0:Le.end)||Wi,vr,V),Ut&&Ne.decreaseIndent()}}function Dx(V){ac(V.namespace),vr(":"),ac(V.name)}function Ex(V){V.kind===80?St(V):Ji(V)}function ZI(V){Xe(84,V.pos,Vo,V),rr(),St(V.expression,On.parenthesizeExpressionForDisallowedComma),lc(V,V.statements,V.expression.end)}function D2(V){const Le=Xe(90,V.pos,Vo,V);lc(V,V.statements,Le)}function lc(V,Le,Ut){const Wi=Le.length===1&&(!X||cl(V)||cl(Le[0])||DK(V,Le[0],X));let gs=163969;Wi?(A2(59,Ut,vr,V),rr(),gs&=-130):Xe(59,Ut,vr,V),Tl(V,Le,gs)}function ED(V){rr(),cb(V.token,Vo),rr(),Tl(V,V.types,528)}function YI(V){const Le=Xe(85,V.pos,Vo,V);rr(),V.variableDeclaration&&(Xe(21,Le,vr,V),Ji(V.variableDeclaration),Xe(22,V.variableDeclaration.end,vr,V),rr()),Ji(V.block)}function E2(V){Ji(V.name),vr(":"),rr();const Le=V.initializer;if(!(Ya(Le)&1024)){const Ut=B1(Le);db(Ut.pos)}St(Le,On.parenthesizeExpressionForDisallowedComma)}function sb(V){Ji(V.name),V.objectAssignmentInitializer&&(rr(),vr("="),rr(),St(V.objectAssignmentInitializer,On.parenthesizeExpressionForDisallowedComma))}function ob(V){V.expression&&(Xe(26,V.pos,vr,V),St(V.expression,On.parenthesizeExpressionForDisallowedComma))}function Cm(V){Ji(V.name),Ky(V.initializer,V.name.end,V,On.parenthesizeExpressionForDisallowedComma)}function Op(V){if(He("/**"),V.comment){const Le=RW(V.comment);if(Le){const Ut=Le.split(/\r\n?|\n/);for(const Wi of Ut)Th(),rr(),vr("*"),rr(),He(Wi)}}V.tags&&(V.tags.length===1&&V.tags[0].kind===344&&!V.comment?(rr(),Ji(V.tags[0])):Tl(V,V.tags,33)),rr(),He("*/")}function Mp(V){Q1(V.tagName),Z0(V.typeExpression),ft(V.comment)}function tp(V){Q1(V.tagName),Ji(V.name),ft(V.comment)}function Ix(V){Q1(V.tagName),rr(),V.importClause&&(Ji(V.importClause),rr(),Xe(161,V.importClause.end,Vo,V),rr()),St(V.moduleSpecifier),V.attributes&&Nx(V.attributes),ft(V.comment)}function vO(V){rr(),vr("{"),Ji(V.name),vr("}")}function Xd(V){Q1(V.tagName),rr(),vr("{"),Ji(V.class),vr("}"),ft(V.comment)}function Q0(V){Q1(V.tagName),Z0(V.constraint),rr(),Tl(V,V.typeParameters,528),ft(V.comment)}function RS(V){Q1(V.tagName),V.typeExpression&&(V.typeExpression.kind===309?Z0(V.typeExpression):(rr(),vr("{"),He("Object"),V.typeExpression.isArrayType&&(vr("["),vr("]")),vr("}"))),V.fullName&&(rr(),Ji(V.fullName)),ft(V.comment),V.typeExpression&&V.typeExpression.kind===322&&hC(V.typeExpression)}function Gy(V){Q1(V.tagName),V.name&&(rr(),Ji(V.name)),ft(V.comment),ip(V.typeExpression)}function kA(V){ft(V.comment),ip(V.typeExpression)}function dh(V){Q1(V.tagName),ft(V.comment)}function hC(V){Tl(V,G.createNodeArray(V.jsDocPropertyTags),33)}function ip(V){V.typeParameters&&Tl(V,G.createNodeArray(V.typeParameters),33),V.parameters&&Tl(V,G.createNodeArray(V.parameters),33),V.type&&(Th(),rr(),vr("*"),rr(),Ji(V.type))}function I2(V){Q1(V.tagName),Z0(V.typeExpression),rr(),V.isBracketed&&vr("["),Ji(V.name),V.isBracketed&&vr("]"),ft(V.comment)}function Q1(V){vr("@"),Ji(V)}function ft(V){const Le=RW(V);Le&&(rr(),He(Le))}function Z0(V){V&&(rr(),vr("{"),Ji(V.type),vr("}"))}function Z1(V){Th();const Le=V.statements;if(Le.length===0||!I1(Le[0])||cl(Le[0])){Rx(V,Le,FS);return}FS(V)}function N2(V){_C(!!V.hasNoDefaultLib,V.syntheticFileReferences||[],V.syntheticTypeReferences||[],V.syntheticLibReferences||[])}function TA(V){V.isDeclarationFile&&_C(V.hasNoDefaultLib,V.referencedFiles,V.typeReferenceDirectives,V.libReferenceDirectives)}function _C(V,Le,Ut,Wi){if(V&&(P2('/// <reference no-default-lib="true"/>'),Th()),X&&X.moduleName&&(P2(`/// <amd-module name="${X.moduleName}" />`),Th()),X&&X.amdDependencies)for(const ao of X.amdDependencies)ao.name?P2(`/// <amd-dependency name="${ao.name}" path="${ao.path}" />`):P2(`/// <amd-dependency path="${ao.path}" />`),Th();function gs(ao,Co){for(const co of Co){const Xs=co.resolutionMode?`resolution-mode="${co.resolutionMode===99?"import":"require"}" `:"",Gh=co.preserve?'preserve="true" ':"";P2(`/// <reference ${ao}="${co.fileName}" ${Xs}${Gh}/>`),Th()}}gs("path",Le),gs("types",Ut),gs("lib",Wi)}function FS(V){const Le=V.statements;yC(V),O(V.statements,Qd),ji(V);const Ut=ct(Le,Wi=>!I1(Wi));TA(V),Tl(V,Le,1,void 0,Ut===-1?Le.length:Ut),m0(V)}function pC(V){const Le=Ya(V);!(Le&1024)&&V.pos!==V.expression.pos&&db(V.expression.pos),St(V.expression),!(Le&2048)&&V.end!==V.expression.end&&$S(V.expression.end)}function DA(V){gC(V,V.elements,528,void 0)}function $a(V,Le,Ut){let Wi=!!Le;for(let gs=0;gs<V.length;gs++){const ao=V[gs];if(I1(ao))(Ut?!Ut.has(ao.expression.text):!0)&&(Wi&&(Wi=!1,Xr(Le)),Th(),Ji(ao),Ut&&Ut.add(ao.expression.text));else return gs}return V.length}function p0(V){if(Os(V))$a(V.statements,V);else{const Le=new Set;for(const Ut of V.sourceFiles)$a(Ut.statements,Ut,Le);Xr(void 0)}}function BS(V){if(Os(V)){const Le=rG(V.text);if(Le)return P2(Le),Th(),!0}else for(const Le of V.sourceFiles)if(BS(Le))return!0}function L2(V,Le){if(!V)return;const Ut=He;He=Le,Ji(V),He=Ut}function Kp(V,Le,Ut){if(Le!=null&&Le.length){if(Ce(Le,Fa))return ab(V,Le);if(Ce(Le,Fd))return Ut?Ys(V,Le):V.pos;b==null||b(Le);let Wi,gs,ao=0,Co=0,co;for(;ao<Le.length;){for(;Co<Le.length;){if(co=Le[Co],gs=Fd(co)?"decorators":"modifiers",Wi===void 0)Wi=gs;else if(gs!==Wi)break;Co++}const Xs={pos:-1,end:-1};ao===0&&(Xs.pos=Le.pos),Co===Le.length-1&&(Xs.end=Le.end),(Wi==="modifiers"||Ut)&&sg(Ji,V,Le,Wi==="modifiers"?2359808:2146305,void 0,ao,Co-ao,!1,Xs),ao=Co,Wi=gs,Co++}if(T==null||T(Le),co&&!W0(co.end))return co.end}return V.pos}function ab(V,Le){Tl(V,Le,2359808);const Ut=rl(Le);return Ut&&!W0(Ut.end)?Ut.end:V.pos}function Y0(V){V&&(vr(":"),rr(),Ji(V))}function Ky(V,Le,Ut,Wi){V&&(rr(),Xe(64,Le,HS,Ut),rr(),St(V,Wi))}function EA(V,Le,Ut,Wi){Ut&&(Le(V),Wi(Ut))}function Nx(V){V&&(rr(),Ji(V))}function Jg(V,Le){V&&(rr(),St(V,Le))}function IA(V){V&&(Ji(V),rr())}function WS(V,Le){Xo(Le)||Ya(V)&1||qe&&!zS(V,Le,0)?(rr(),Ji(Le)):(Th(),Dh(),mle(Le)?Se(5,Le):Ji(Le),Xp())}function Ys(V,Le){Tl(V,Le,2146305);const Ut=rl(Le);return Ut&&!W0(Ut.end)?Ut.end:V.pos}function yr(V,Le){Tl(V,Le,53776,pn)}function ff(V,Le){if(Ho(V)&&V.typeArguments)return yr(V,V.typeArguments);Tl(V,Le,53776|(xl(V)?64:0))}function mC(V,Le){Tl(V,Le,2576)}function VS(V,Le){const Ut=Bm(Le);return Ut&&Ut.pos===V.pos&&xl(V)&&!V.type&&!Ft(V.modifiers)&&!Ft(V.typeParameters)&&!Ft(Ut.modifiers)&&!Ut.dotDotDotToken&&!Ut.questionToken&&!Ut.type&&!Ut.initializer&&ot(Ut.name)}function eN(V,Le){VS(V,Le)?Tl(V,Le,528):mC(V,Le)}function Lx(V,Le){Tl(V,Le,8848)}function tN(V){switch(V&60){case 0:break;case 16:vr(",");break;case 4:rr(),vr("|");break;case 32:rr(),vr("*"),rr();break;case 8:rr(),vr("&");break}}function Tl(V,Le,Ut,Wi,gs,ao){ID(Ji,V,Le,Ut|(V&&Ya(V)&2?65536:0),Wi,gs,ao)}function gC(V,Le,Ut,Wi,gs,ao){ID(St,V,Le,Ut,Wi,gs,ao)}function ID(V,Le,Ut,Wi,gs,ao=0,Co=Ut?Ut.length-ao:0){if(Ut===void 0&&Wi&16384)return;const Xs=Ut===void 0||ao>=Ut.length||Co===0;if(Xs&&Wi&32768){b==null||b(Ut),T==null||T(Ut);return}Wi&15360&&(vr(i8t(Wi)),Xs&&Ut&&db(Ut.pos,!0)),b==null||b(Ut),Xs?Wi&1&&!(qe&&(!Le||X&&wI(Le,X)))?Th():Wi&256&&!(Wi&524288)&&rr():sg(V,Le,Ut,Wi,gs,ao,Co,Ut.hasTrailingComma,Ut),T==null||T(Ut),Wi&15360&&(Xs&&Ut&&$S(Ut.end),vr(n8t(Wi)))}function sg(V,Le,Ut,Wi,gs,ao,Co,co,Xs){const Gh=(Wi&262144)===0;let xf=Gh;const i1=zS(Le,Ut[ao],Wi);i1?(Th(i1),xf=!1):Wi&256&&rr(),Wi&128&&Dh();const JS=a8t(V,gs);let Bp,WD=!1;for(let n1=0;n1<Co;n1++){const fb=Ut[ao+n1];if(Wi&32)Th(),tN(Wi);else if(Bp){Wi&60&&Bp.end!==(Le?Le.end:-1)&&(Ya(Bp)&2048||$S(Bp.end)),tN(Wi);const GS=LD(Bp,fb,Wi);if(GS>0){if(Wi&131||(Dh(),WD=!0),xf&&Wi&60&&!W0(fb.pos)){const VA=B1(fb);db(VA.pos,!!(Wi&512),!0)}Th(GS),xf=!1}else Bp&&Wi&512&&rr()}if(xf){const GS=B1(fb);db(GS.pos)}else xf=Gh;se=fb.pos,JS(fb,V,gs,n1),WD&&(Xp(),WD=!1),Bp=fb}const F2=Bp?Ya(Bp):0,VD=tn||!!(F2&2048),WA=co&&Wi&64&&Wi&16;WA&&(Bp&&!VD?Xe(28,Bp.end,vr,Bp):vr(",")),Bp&&(Le?Le.end:-1)!==Bp.end&&Wi&60&&!VD&&$S(WA&&(Xs!=null&&Xs.end)?Xs.end:Bp.end),Wi&128&&Xp();const gN=sN(Le,Ut[ao+Co-1],Wi,Xs);gN?Th(gN):Wi&2097408&&rr()}function ND(V){Ne.writeLiteral(V)}function iN(V){Ne.writeStringLiteral(V)}function bO(V){Ne.write(V)}function CO(V,Le){Ne.writeSymbol(V,Le)}function vr(V){Ne.writePunctuation(V)}function fh(){Ne.writeTrailingSemicolon(";")}function Vo(V){Ne.writeKeyword(V)}function HS(V){Ne.writeOperator(V)}function NA(V){Ne.writeParameter(V)}function P2(V){Ne.writeComment(V)}function rr(){Ne.writeSpace(" ")}function SO(V){Ne.writeProperty(V)}function nN(V){Ne.nonEscapingWrite?Ne.nonEscapingWrite(V):Ne.write(V)}function Th(V=1){for(let Le=0;Le<V;Le++)Ne.writeLine(Le>0)}function Dh(){Ne.increaseIndent()}function Xp(){Ne.decreaseIndent()}function A2(V,Le,Ut,Wi){return We?cb(V,Ut,Le):Kg(Wi,V,Ut,Le,cb)}function rN(V,Le){E&&E(V),Le(xa(V.kind)),N&&N(V)}function cb(V,Le,Ut){const Wi=xa(V);return Le(Wi),Ut<0?Ut:Ut+Wi.length}function np(V,Le,Ut){if(Ya(V)&1)rr();else if(qe){const Wi=e1(V,Le,Ut);Wi?Th(Wi):rr()}else Th()}function Y1(V){const Le=V.split(/\r\n?|\n/),Ut=W2e(Le);for(const Wi of Le){const gs=Ut?Wi.slice(Ut):Wi;gs.length&&(Th(),He(gs))}}function Sm(V,Le){V?(Dh(),Th(V)):Le&&rr()}function jS(V,Le){V&&Xp(),Le&&Xp()}function zS(V,Le,Ut){if(Ut&2||qe){if(Ut&65536)return 1;if(Le===void 0)return!V||X&&wI(V,X)?0:1;if(Le.pos===se||Le.kind===12)return 0;if(X&&V&&!W0(V.pos)&&!cl(Le)&&(!Le.parent||Ql(Le.parent)===Ql(V)))return qe?Px(Wi=>gDe(Le.pos,V.pos,X,Wi)):DK(V,Le,X)?0:1;if(cN(Le,Ut))return 1}return Ut&1?1:0}function LD(V,Le,Ut){if(Ut&2||qe){if(V===void 0||Le===void 0||Le.kind===12)return 0;if(X&&!cl(V)&&!cl(Le))return qe&&_N(V,Le)?Px(Wi=>Cce(V,Le,X,Wi)):!qe&&wm(V,Le)?zV(V,Le,X)?0:1:Ut&65536?1:0;if(cN(V,Ut)||cN(Le,Ut))return 1}else if(f7(Le))return 1;return Ut&1?1:0}function sN(V,Le,Ut,Wi){if(Ut&2||qe){if(Ut&65536)return 1;if(Le===void 0)return!V||X&&wI(V,X)?0:1;if(X&&V&&!W0(V.pos)&&!cl(Le)&&(!Le.parent||Le.parent===V)){if(qe){const gs=Wi&&!W0(Wi.end)?Wi.end:Le.end;return Px(ao=>yDe(gs,V.end,X,ao))}return _De(V,Le,X)?0:1}if(cN(Le,Ut))return 1}return Ut&1&&!(Ut&131072)?1:0}function Px(V){j.assert(!!qe);const Le=V(!0);return Le===0?V(!1):Le}function oN(V,Le){const Ut=qe&&zS(Le,V,0);return Ut&&Sm(Ut,!1),!!Ut}function aN(V,Le){const Ut=qe&&sN(Le,V,0,void 0);Ut&&Th(Ut)}function cN(V,Le){if(cl(V)){const Ut=f7(V);return Ut===void 0?(Le&65536)!==0:Ut}return(Le&65536)!==0}function e1(V,Le,Ut){return Ya(V)&262144?0:(V=O2(V),Le=O2(Le),Ut=O2(Ut),f7(Ut)?1:X&&!cl(V)&&!cl(Le)&&!cl(Ut)?qe?Px(Wi=>Cce(Le,Ut,X,Wi)):zV(Le,Ut,X)?0:1:0)}function wO(V){return V.statements.length===0&&(!X||zV(V,V,X))}function O2(V){for(;V.kind===217&&cl(V);)V=V.expression;return V}function Ax(V,Le){if(zl(V)||uI(V))return dN(V);if(Ha(V)&&V.textSourceNode)return Ax(V.textSourceNode,Le);const Ut=X,Wi=!!Ut&&!!V.parent&&!cl(V);if(Mv(V)){if(!Wi||_n(V)!==Ql(Ut))return Fr(V)}else if(j0(V)){if(!Wi||_n(V)!==Ql(Ut))return d7(V)}else if(j.assertNode(V,lI),!Wi)return V.text;return RT(Ut,V,Le)}function lb(V,Le=X,Ut,Wi){if(V.kind===11&&V.textSourceNode){const ao=V.textSourceNode;if(ot(ao)||Vs(ao)||A_(ao)||j0(ao)){const Co=A_(ao)?ao.text:Ax(ao);return Wi?`"${sce(Co)}"`:Ut||Ya(V)&16777216?`"${Vy(Co)}"`:`"${dK(Co)}"`}else return lb(ao,_n(ao),Ut,Wi)}const gs=(Ut?1:0)|(Wi?2:0)|(t.terminateUnterminatedLiterals?4:0)|(t.target&&t.target>=8?8:0);return Q2e(V,Le,gs)}function yC(V){ue.push(Ie),Ie=0,Te.push(De),!(V&&Ya(V)&1048576)&&(we.push(he),he=0,pe.push(de),de=void 0,Ae.push(ke))}function m0(V){Ie=ue.pop(),De=Te.pop(),!(V&&Ya(V)&1048576)&&(he=we.pop(),de=pe.pop(),ke=Ae.pop())}function US(V){(!ke||ke===rl(Ae))&&(ke=new Set),ke.add(V)}function lN(V){(!De||De===rl(Te))&&(De=new Set),De.add(V)}function Qd(V){if(V)switch(V.kind){case 241:O(V.statements,Qd);break;case 256:case 254:case 246:case 247:Qd(V.statement);break;case 245:Qd(V.thenStatement),Qd(V.elseStatement);break;case 248:case 250:case 249:Qd(V.initializer),Qd(V.statement);break;case 255:Qd(V.caseBlock);break;case 269:O(V.clauses,Qd);break;case 296:case 297:O(V.statements,Qd);break;case 258:Qd(V.tryBlock),Qd(V.catchClause),Qd(V.finallyBlock);break;case 299:Qd(V.variableDeclaration),Qd(V.block);break;case 243:Qd(V.declarationList);break;case 261:O(V.declarations,Qd);break;case 260:case 169:case 208:case 263:Xy(V.name);break;case 262:Xy(V.name),Ya(V)&1048576&&(O(V.parameters,Qd),Qd(V.body));break;case 206:case 207:O(V.elements,Qd);break;case 272:Qd(V.importClause);break;case 273:Xy(V.name),Qd(V.namedBindings);break;case 274:Xy(V.name);break;case 280:Xy(V.name);break;case 275:O(V.elements,Qd);break;case 276:Xy(V.propertyName||V.name);break}}function uN(V){if(V)switch(V.kind){case 303:case 304:case 172:case 171:case 174:case 173:case 177:case 178:Xy(V.name);break}}function Xy(V){V&&(zl(V)||uI(V)?dN(V):ta(V)&&Qd(V))}function dN(V){const Le=V.emitNode.autoGenerate;if((Le.flags&7)===4)return M2(wH(V),Vs(V),Le.flags,Le.prefix,Le.suffix);{const Ut=Le.id;return re[Ut]||(re[Ut]=kO(V))}}function M2(V,Le,Ut,Wi,gs){const ao=Sc(V),Co=Le?Q:Z;return Co[ao]||(Co[ao]=nu(V,Le,Ut??0,L3(Wi,dN),L3(gs)))}function vC(V,Le){return PD(V)&&!Ox(V,Le)&&!oe.has(V)}function Ox(V,Le){let Ut,Wi;if(Le?(Ut=De,Wi=Te):(Ut=ke,Wi=Ae),Ut!=null&&Ut.has(V))return!0;for(let gs=Wi.length-1;gs>=0;gs--)if(Ut!==Wi[gs]&&(Ut=Wi[gs],Ut!=null&&Ut.has(V)))return!0;return!1}function PD(V,Le){return X?PG(X,V,a):!0}function Zu(V,Le){for(let Ut=Le;Ut&&UT(Ut,Le);Ut=Ut.nextContainer)if(Ay(Ut)&&Ut.locals){const Wi=Ut.locals.get(cu(V));if(Wi&&Wi.flags&3257279)return!1}return!0}function $f(V){switch(V){case"":return he;case"#":return Ie;default:return(de==null?void 0:de.get(V))??0}}function xO(V,Le){switch(V){case"":he=Le;break;case"#":Ie=Le;break;default:de??(de=new Map),de.set(V,Le);break}}function Eh(V,Le,Ut,Wi,gs){Wi.length>0&&Wi.charCodeAt(0)===35&&(Wi=Wi.slice(1));const ao=c2(Ut,Wi,"",gs);let Co=$f(ao);if(V&&!(Co&V)){const Xs=c2(Ut,Wi,V===268435456?"_i":"_n",gs);if(vC(Xs,Ut))return Co|=V,Ut?lN(Xs):Le&&US(Xs),xO(ao,Co),Xs}for(;;){const co=Co&268435455;if(Co++,co!==8&&co!==13){const Xs=co<26?"_"+String.fromCharCode(97+co):"_"+(co-26),Gh=c2(Ut,Wi,Xs,gs);if(vC(Gh,Ut))return Ut?lN(Gh):Le&&US(Gh),xO(ao,Co),Gh}}}function rp(V,Le=vC,Ut,Wi,gs,ao,Co){if(V.length>0&&V.charCodeAt(0)===35&&(V=V.slice(1)),ao.length>0&&ao.charCodeAt(0)===35&&(ao=ao.slice(1)),Ut){const Xs=c2(gs,ao,V,Co);if(Le(Xs,gs))return gs?lN(Xs):Wi?US(Xs):oe.add(Xs),Xs}V.charCodeAt(V.length-1)!==95&&(V+="_");let co=1;for(;;){const Xs=c2(gs,ao,V+co,Co);if(Le(Xs,gs))return gs?lN(Xs):Wi?US(Xs):oe.add(Xs),Xs;co++}}function LA(V){return rp(V,PD,!0,!1,!1,"","")}function ey(V){const Le=Ax(V.name);return Zu(Le,Jr(V,Ay))?Le:rp(Le,vC,!1,!1,!1,"","")}function PA(V){const Le=fP(V),Ut=Ha(Le)?Y2e(Le.text):"module";return rp(Ut,vC,!1,!1,!1,"","")}function qS(){return rp("default",vC,!1,!1,!1,"","")}function fN(){return rp("class",vC,!1,!1,!1,"","")}function L5(V,Le,Ut,Wi){return ot(V.name)?M2(V.name,Le):Eh(0,!1,Le,Ut,Wi)}function nu(V,Le,Ut,Wi,gs){switch(V.kind){case 80:case 81:return rp(Ax(V),vC,!!(Ut&16),!!(Ut&8),Le,Wi,gs);case 267:case 266:return j.assert(!Wi&&!gs&&!Le),ey(V);case 272:case 278:return j.assert(!Wi&&!gs&&!Le),PA(V);case 262:case 263:{j.assert(!Wi&&!gs&&!Le);const ao=V.name;return ao&&!zl(ao)?nu(ao,!1,Ut,Wi,gs):qS()}case 277:return j.assert(!Wi&&!gs&&!Le),qS();case 231:return j.assert(!Wi&&!gs&&!Le),fN();case 174:case 177:case 178:return L5(V,Le,Wi,gs);case 167:return Eh(0,!0,Le,Wi,gs);default:return Eh(0,!1,Le,Wi,gs)}}function kO(V){const Le=V.emitNode.autoGenerate,Ut=L3(Le.prefix,dN),Wi=L3(Le.suffix);switch(Le.flags&7){case 1:return Eh(0,!!(Le.flags&8),Vs(V),Ut,Wi);case 2:return j.assertNode(V,ot),Eh(268435456,!!(Le.flags&8),!1,Ut,Wi);case 3:return rp(Fr(V),Le.flags&32?PD:vC,!!(Le.flags&16),!!(Le.flags&8),Vs(V),Ut,Wi)}return j.fail(`Unsupported GeneratedIdentifierKind: ${j.formatEnum(Le.flags&7,hoe,!0)}.`)}function AA(V,Le){const Ut=Je(2,V,Le),Wi=ut,gs=wt,ao=Et;Mx(Le),Ut(V,Le),hN(Le,Wi,gs,ao)}function Mx(V){const Le=Ya(V),Ut=B1(V);B_(V,Le,Ut.pos,Ut.end),Le&4096&&(tn=!0)}function hN(V,Le,Ut,Wi){const gs=Ya(V),ao=B1(V);gs&4096&&(tn=!1),AD(V,gs,ao.pos,ao.end,Le,Ut,Wi);const Co=bEe(V);Co&&AD(V,gs,Co.pos,Co.end,Le,Ut,Wi)}function B_(V,Le,Ut,Wi){_i(),Ei=!1;const gs=Ut<0||(Le&1024)!==0||V.kind===12,ao=Wi<0||(Le&2048)!==0||V.kind===12;(Ut>0||Wi>0)&&Ut!==Wi&&(gs||Fx(Ut,V.kind!==353),(!gs||Ut>=0&&Le&1024)&&(ut=Ut),(!ao||Wi>=0&&Le&2048)&&(wt=Wi,V.kind===261&&(Et=Wi))),O(y3(V),OA),Fi()}function AD(V,Le,Ut,Wi,gs,ao,Co){_i();const co=Wi<0||(Le&2048)!==0||V.kind===12;O(cH(V),OD),(Ut>0||Wi>0)&&Ut!==Wi&&(ut=gs,wt=ao,Et=Co,!co&&V.kind!==353&&__(Wi)),Fi()}function OA(V){(V.hasLeadingNewline||V.kind===2)&&Ne.writeLine(),sp(V),V.hasTrailingNewLine||V.kind===2?Ne.writeLine():Ne.writeSpace(" ")}function OD(V){Ne.isAtStartOfLine()||Ne.writeSpace(" "),sp(V),V.hasTrailingNewLine&&Ne.writeLine()}function sp(V){const Le=MA(V),Ut=V.kind===3?ZL(Le):void 0;c3(Le,Ut,Ne,0,Le.length,H)}function MA(V){return V.kind===3?`/*${V.text}*/`:`//${V.text}`}function Rx(V,Le,Ut){_i();const{pos:Wi,end:gs}=Le,ao=Ya(V),Co=Wi<0||(ao&1024)!==0,co=tn||gs<0||(ao&2048)!==0;Co||DO(Le),Fi(),ao&4096&&!tn?(tn=!0,Ut(V),tn=!1):Ut(V),_i(),co||(Fx(Le.end,!0),Ei&&!Ne.isAtStartOfLine()&&Ne.writeLine()),Fi()}function wm(V,Le){return V=Ql(V),V.parent&&V.parent===Ql(Le).parent}function _N(V,Le){if(Le.pos<V.end)return!1;V=Ql(V),Le=Ql(Le);const Ut=V.parent;if(!Ut||Ut!==Le.parent)return!1;const Wi=ZDe(V),gs=Wi==null?void 0:Wi.indexOf(V);return gs!==void 0&&gs>-1&&Wi.indexOf(Le)===gs+1}function Fx(V,Le){Ei=!1,Le?V===0&&(X!=null&&X.isDeclarationFile)?xr(V,MD):xr(V,RA):V===0&&xr(V,P5)}function P5(V,Le,Ut,Wi,gs){R2(V,Le)&&RA(V,Le,Ut,Wi,gs)}function MD(V,Le,Ut,Wi,gs){R2(V,Le)||RA(V,Le,Ut,Wi,gs)}function pN(V,Le){return t.onlyPrintJsDocStyle?Hle(V,Le)||AG(V,Le):!0}function RA(V,Le,Ut,Wi,gs){!X||!pN(X.text,V)||(Ei||(eDe(ka(),Ne,gs,V),Ei=!0),Fp(V),c3(X.text,ka(),Ne,V,Le,H),Fp(Le),Wi?Ne.writeLine():Ut===3&&Ne.writeSpace(" "))}function $S(V){tn||V===-1||Fx(V,!0)}function __(V){p_(V,ub)}function ub(V,Le,Ut,Wi){!X||!pN(X.text,V)||(Ne.isAtStartOfLine()||Ne.writeSpace(" "),Fp(V),c3(X.text,ka(),Ne,V,Le,H),Fp(Le),Wi&&Ne.writeLine())}function db(V,Le,Ut){tn||(_i(),p_(V,Le?ub:Ut?TO:wc),Fi())}function TO(V,Le,Ut){X&&(Fp(V),c3(X.text,ka(),Ne,V,Le,H),Fp(Le),Ut===2&&Ne.writeLine())}function wc(V,Le,Ut,Wi){X&&(Fp(V),c3(X.text,ka(),Ne,V,Le,H),Fp(Le),Wi?Ne.writeLine():Ne.writeSpace(" "))}function xr(V,Le){X&&(ut===-1||V!==ut)&&(Qp(V)?RD(Le):TW(X.text,V,Le,V))}function p_(V,Le){X&&(wt===-1||V!==wt&&V!==Et)&&DW(X.text,V,Le)}function Qp(V){return zt!==void 0&&va(zt).nodePos===V}function RD(V){if(!X)return;const Le=va(zt).detachedCommentEndPos;zt.length-1?zt.pop():zt=void 0,TW(X.text,Le,V,Le)}function DO(V){const Le=X&&tDe(X.text,ka(),Ne,FA,V,H,tn);Le&&(zt?zt.push(Le):zt=[Le])}function FA(V,Le,Ut,Wi,gs,ao){!X||!pN(X.text,Wi)||(Fp(Wi),c3(V,Le,Ut,Wi,gs,ao),Fp(gs))}function R2(V,Le){return!!X&&gae(X.text,V,Le)}function FD(V,Le){const Ut=Je(3,V,Le);BD(Le),Ut(V,Le),Gg(Le)}function BD(V){const Le=Ya(V),Ut=yS(V),Wi=Ut.source||Nt;V.kind!==353&&!(Le&32)&&Ut.pos>=0&&t1(Ut.source||Nt,Rp(Wi,Ut.pos)),Le&128&&(We=!0)}function Gg(V){const Le=Ya(V),Ut=yS(V);Le&128&&(We=!1),V.kind!==353&&!(Le&64)&&Ut.end>=0&&t1(Ut.source||Nt,Ut.end)}function Rp(V,Le){return V.skipTrivia?V.skipTrivia(Le):Va(V.text,Le)}function Fp(V){if(We||W0(V)||BA(Nt))return;const{line:Le,character:Ut}=Ia(Nt,V);ze.addMapping(Ne.getLine(),Ne.getColumn(),$e,Le,Ut,void 0)}function t1(V,Le){if(V!==Nt){const Ut=Nt,Wi=$e;mN(V),Fp(Le),Td(Ut,Wi)}else Fp(Le)}function Kg(V,Le,Ut,Wi,gs){if(We||V&&ZG(V))return gs(Le,Ut,Wi);const ao=V&&V.emitNode,Co=ao&&ao.flags||0,co=ao&&ao.tokenSourceMapRanges&&ao.tokenSourceMapRanges[Le],Xs=co&&co.source||Nt;return Wi=Rp(Xs,co?co.pos:Wi),!(Co&256)&&Wi>=0&&t1(Xs,Wi),Wi=gs(Le,Ut,Wi),co&&(Wi=co.end),!(Co&512)&&Wi>=0&&t1(Xs,Wi),Wi}function mN(V){if(!We){if(Nt=V,V===et){$e=Me;return}BA(V)||($e=ze.addSource(V.fileName),t.inlineSources&&ze.setSourceContent($e,V.text),et=V,Me=$e)}}function Td(V,Le){Nt=V,$e=Le}function BA(V){return Xl(V.fileName,".json")}}function t8t(){const t=[];return t[1024]=["{","}"],t[2048]=["(",")"],t[4096]=["<",">"],t[8192]=["[","]"],t}function i8t(t){return ket[t&15360][0]}function n8t(t){return ket[t&15360][1]}function r8t(t,r,a,u){r(t)}function s8t(t,r,a,u){r(t,a.select(u))}function o8t(t,r,a,u){r(t,a)}function a8t(t,r){return t.length===1?r8t:typeof r=="object"?s8t:o8t}function IQ(t,r,a){if(!t.getDirectories||!t.readDirectory)return;const u=new Map,h=Mf(a);return{useCaseSensitiveFileNames:a,fileExists:F,readFile:(ue,Ie)=>t.readFile(ue,Ie),directoryExists:t.directoryExists&&H,getDirectories:q,readDirectory:X,createDirectory:t.createDirectory&&U,writeFile:t.writeFile&&R,addOrDeleteFileOrDirectory:re,addOrDeleteFile:oe,clearCache:de,realpath:t.realpath&&Z};function p(ue){return ol(ue,r,h)}function g(ue){return u.get(Ad(ue))}function C(ue){const Ie=g(ts(ue));return Ie&&(Ie.sortedAndCanonicalizedFiles||(Ie.sortedAndCanonicalizedFiles=Ie.files.map(h).sort(),Ie.sortedAndCanonicalizedDirectories=Ie.directories.map(h).sort()),Ie)}function b(ue){return ud(ca(ue))}function T(ue,Ie){var we;if(!t.realpath||Ad(p(t.realpath(ue)))===Ie){const he={files:qt(t.readDirectory(ue,void 0,void 0,["*.*"]),b)||[],directories:t.getDirectories(ue)||[]};return u.set(Ad(Ie),he),he}if((we=t.directoryExists)!=null&&we.call(t,ue))return u.set(Ie,!1),!1}function E(ue,Ie){Ie=Ad(Ie);const we=g(Ie);if(we)return we;try{return T(ue,Ie)}catch{j.assert(!u.has(Ad(Ie)));return}}function N(ue,Ie){return Jt(ue,Ie,hl,sh)>=0}function R(ue,Ie,we){const he=p(ue),Ae=C(he);return Ae&&pe(Ae,b(ue),!0),t.writeFile(ue,Ie,we)}function F(ue){const Ie=p(ue),we=C(Ie);return we&&N(we.sortedAndCanonicalizedFiles,h(b(ue)))||t.fileExists(ue)}function H(ue){const Ie=p(ue);return u.has(Ad(Ie))||t.directoryExists(ue)}function U(ue){const Ie=p(ue),we=C(Ie);if(we){const he=b(ue),Ae=h(he),ke=we.sortedAndCanonicalizedDirectories;rm(ke,Ae,sh)&&we.directories.push(he)}t.createDirectory(ue)}function q(ue){const Ie=p(ue),we=E(ue,Ie);return we?we.directories.slice():t.getDirectories(ue)}function X(ue,Ie,we,he,Ae){const ke=p(ue),Te=E(ue,ke);let De;if(Te!==void 0)return Fce(ue,Ie,we,he,a,r,Ae,qe,Z);return t.readDirectory(ue,Ie,we,he,Ae);function qe(Ne){const Oe=p(Ne);if(Oe===ke)return Te||se(Ne,Oe);const He=E(Ne,Oe);return He!==void 0?He||se(Ne,Oe):Vce}function se(Ne,Oe){if(De&&Oe===ke)return De;const He={files:qt(t.readDirectory(Ne,void 0,void 0,["*.*"]),b)||w,directories:t.getDirectories(Ne)||w};return Oe===ke&&(De=He),He}}function Z(ue){return t.realpath?t.realpath(ue):ue}function Q(ue){kg(ts(ue),Ie=>u.delete(Ad(Ie))?!0:void 0)}function re(ue,Ie){if(g(Ie)!==void 0){de();return}const he=C(Ie);if(!he){Q(Ie);return}if(!t.directoryExists){de();return}const Ae=b(ue),ke={fileExists:t.fileExists(ue),directoryExists:t.directoryExists(ue)};return ke.directoryExists||N(he.sortedAndCanonicalizedDirectories,h(Ae))?de():pe(he,Ae,ke.fileExists),ke}function oe(ue,Ie,we){if(we===1)return;const he=C(Ie);he?pe(he,b(ue),we===0):Q(Ie)}function pe(ue,Ie,we){const he=ue.sortedAndCanonicalizedFiles,Ae=h(Ie);if(we)rm(he,Ae,sh)&&ue.files.push(Ie);else{const ke=Jt(he,Ae,hl,sh);if(ke>=0){he.splice(ke,1);const Te=ue.files.findIndex(De=>h(De)===Ae);ue.files.splice(Te,1)}}}function de(){u.clear()}}var wLe=(t=>(t[t.Update=0]="Update",t[t.RootNamesAndUpdate=1]="RootNamesAndUpdate",t[t.Full=2]="Full",t))(wLe||{});function NQ(t,r,a,u,h){var p;const g=Ld(((p=r==null?void 0:r.configFile)==null?void 0:p.extendedSourceFiles)||w,h);a.forEach((C,b)=>{g.has(b)||(C.projects.delete(t),C.close())}),g.forEach((C,b)=>{const T=a.get(b);T?T.projects.add(t):a.set(b,{projects:new Set([t]),watcher:u(C,b),close:()=>{const E=a.get(b);!E||E.projects.size!==0||(E.watcher.close(),a.delete(b))}})})}function sde(t,r){r.forEach(a=>{a.projects.delete(t)&&a.close()})}function LQ(t,r,a){t.delete(r)&&t.forEach(({extendedResult:u},h)=>{var p;(p=u.extendedSourceFiles)!=null&&p.some(g=>a(g)===r)&&LQ(t,h,a)})}function ode(t,r,a){Q8(r,t.getMissingFilePaths(),{createNewValue:a,onDeleteValue:d0})}function GH(t,r,a){r?Q8(t,new Map(Object.entries(r)),{createNewValue:u,onDeleteValue:Zm,onExistingValue:h}):X_(t,Zm);function u(p,g){return{watcher:a(p,g),flags:g}}function h(p,g,C){p.flags!==g&&(p.watcher.close(),t.set(C,u(C,g)))}}function KH({watchedDirPath:t,fileOrDirectory:r,fileOrDirectoryPath:a,configFileName:u,options:h,program:p,extraFileExtensions:g,currentDirectory:C,useCaseSensitiveFileNames:b,writeLog:T,toPath:E,getScriptKind:N}){const R=qQ(a);if(!R)return T(`Project: ${u} Detected ignored path: ${r}`),!0;if(a=R,a===t)return!1;if(N6(a)&&!(jDe(r,h,g)||X()))return T(`Project: ${u} Detected file add/remove of non supported extension: ${r}`),!0;if(qIe(r,h.configFile.configFileSpecs,wo(ts(u),C),b,C))return T(`Project: ${u} Detected excluded file: ${r}`),!0;if(!p||h.outFile||h.outDir)return!1;if(df(a)){if(h.declarationDir)return!1}else if(!Ru(a,h3))return!1;const F=s_(a),H=Ao(p)?void 0:Fde(p)?p.getProgramOrUndefined():p,U=!H&&!Ao(p)?p:void 0;if(q(F+".ts")||q(F+".tsx"))return T(`Project: ${u} Detected output file: ${r}`),!0;return!1;function q(Z){return H?!!H.getSourceFileByPath(Z):U?U.state.fileInfos.has(Z):!!Fe(p,Q=>E(Q)===Z)}function X(){if(!N)return!1;switch(N(r)){case 3:case 4:case 7:case 5:return!0;case 1:case 2:return ox(h);case 6:return XT(h);case 0:return!1}}}function xLe(t,r){return t?t.isEmittedFile(r):!1}var kLe=(t=>(t[t.None=0]="None",t[t.TriggerOnly=1]="TriggerOnly",t[t.Verbose=2]="Verbose",t))(kLe||{});function ade(t,r,a,u){Oke(r===2?a:Tc);const h={watchFile:(U,q,X,Z)=>t.watchFile(U,q,X,Z),watchDirectory:(U,q,X,Z)=>t.watchDirectory(U,q,(X&1)!==0,Z)},p=r!==0?{watchFile:F("watchFile"),watchDirectory:F("watchDirectory")}:void 0,g=r===2?{watchFile:N,watchDirectory:R}:p||h,C=r===2?E:i5;return{watchFile:b("watchFile"),watchDirectory:b("watchDirectory")};function b(U){return(q,X,Z,Q,re,oe)=>{var pe;return eQ(q,U==="watchFile"?Q==null?void 0:Q.excludeFiles:Q==null?void 0:Q.excludeDirectories,T(),((pe=t.getCurrentDirectory)==null?void 0:pe.call(t))||"")?C(q,Z,Q,re,oe):g[U].call(void 0,q,X,Z,Q,re,oe)}}function T(){return typeof t.useCaseSensitiveFileNames=="boolean"?t.useCaseSensitiveFileNames:t.useCaseSensitiveFileNames()}function E(U,q,X,Z,Q){return a(`ExcludeWatcher:: Added:: ${H(U,q,X,Z,Q,u)}`),{close:()=>a(`ExcludeWatcher:: Close:: ${H(U,q,X,Z,Q,u)}`)}}function N(U,q,X,Z,Q,re){a(`FileWatcher:: Added:: ${H(U,X,Z,Q,re,u)}`);const oe=p.watchFile(U,q,X,Z,Q,re);return{close:()=>{a(`FileWatcher:: Close:: ${H(U,X,Z,Q,re,u)}`),oe.close()}}}function R(U,q,X,Z,Q,re){const oe=`DirectoryWatcher:: Added:: ${H(U,X,Z,Q,re,u)}`;a(oe);const pe=sl(),de=p.watchDirectory(U,q,X,Z,Q,re),ue=sl()-pe;return a(`Elapsed:: ${ue}ms ${oe}`),{close:()=>{const Ie=`DirectoryWatcher:: Close:: ${H(U,X,Z,Q,re,u)}`;a(Ie);const we=sl();de.close();const he=sl()-we;a(`Elapsed:: ${he}ms ${Ie}`)}}}function F(U){return(q,X,Z,Q,re,oe)=>h[U].call(void 0,q,(...pe)=>{const de=`${U==="watchFile"?"FileWatcher":"DirectoryWatcher"}:: Triggered with ${pe[0]} ${pe[1]!==void 0?pe[1]:""}:: ${H(q,Z,Q,re,oe,u)}`;a(de);const ue=sl();X.call(void 0,...pe);const Ie=sl()-ue;a(`Elapsed:: ${Ie}ms ${de}`)},Z,Q,re,oe)}function H(U,q,X,Z,Q,re){return`WatchInfo: ${U} ${q} ${JSON.stringify(X)} ${re?re(Z,Q):Q===void 0?Z:`${Z} ${Q}`}`}}function XH(t){const r=t==null?void 0:t.fallbackPolling;return{watchFile:r!==void 0?r:1}}function Zm(t){t.watcher.close()}function cde(t,r,a="tsconfig.json"){return kg(t,u=>{const h=zr(u,a);return r(h)?h:void 0})}function lde(t,r){const a=ts(r),u=yp(t)?t:zr(a,t);return ca(u)}function TLe(t,r,a){let u;return O(t,p=>{const g=SW(p,r);if(g.pop(),!u){u=g;return}const C=Math.min(u.length,g.length);for(let b=0;b<C;b++)if(a(u[b])!==a(g[b])){if(b===0)return!0;u.length=b;break}g.length<u.length&&(u.length=g.length)})?"":u?sS(u):r}function DLe(t,r){return PQ(t,r)}function ude(t,r){return(a,u,h)=>{let p;try{ou("beforeIORead"),p=t(a),ou("afterIORead"),Wm("I/O Read","beforeIORead","afterIORead")}catch(g){h&&h(g.message),p=""}return p!==void 0?ZP(a,p,u,r):void 0}}function dde(t,r,a){return(u,h,p,g)=>{try{ou("beforeIOWrite"),lce(u,h,p,t,r,a),ou("afterIOWrite"),Wm("I/O Write","beforeIOWrite","afterIOWrite")}catch(C){g&&g(C.message)}}}function PQ(t,r,a=Pd){const u=new Map,h=Mf(a.useCaseSensitiveFileNames);function p(E){return u.has(E)?!0:(T.directoryExists||a.directoryExists)(E)?(u.set(E,!0),!0):!1}function g(){return ts(ca(a.getExecutingFilePath()))}const C=mS(t),b=a.realpath&&(E=>a.realpath(E)),T={getSourceFile:ude(E=>T.readFile(E),r),getDefaultLibLocation:g,getDefaultLibFileName:E=>zr(g(),IW(E)),writeFile:dde((E,N,R)=>a.writeFile(E,N,R),E=>(T.createDirectory||a.createDirectory)(E),E=>p(E)),getCurrentDirectory:Bh(()=>a.getCurrentDirectory()),useCaseSensitiveFileNames:()=>a.useCaseSensitiveFileNames,getCanonicalFileName:h,getNewLine:()=>C,fileExists:E=>a.fileExists(E),readFile:E=>a.readFile(E),trace:E=>a.write(E+C),directoryExists:E=>a.directoryExists(E),getEnvironmentVariable:E=>a.getEnvironmentVariable?a.getEnvironmentVariable(E):"",getDirectories:E=>a.getDirectories(E),realpath:b,readDirectory:(E,N,R,F,H)=>a.readDirectory(E,N,R,F,H),createDirectory:E=>a.createDirectory(E),createHash:to(a,a.createHash)};return T}function Q7(t,r,a){const u=t.readFile,h=t.fileExists,p=t.directoryExists,g=t.createDirectory,C=t.writeFile,b=new Map,T=new Map,E=new Map,N=new Map,R=U=>{const q=r(U),X=b.get(q);return X!==void 0?X!==!1?X:void 0:F(q,U)},F=(U,q)=>{const X=u.call(t,q);return b.set(U,X!==void 0?X:!1),X};t.readFile=U=>{const q=r(U),X=b.get(q);return X!==void 0?X!==!1?X:void 0:!Xl(U,".json")&&!gLe(U)?u.call(t,U):F(q,U)};const H=a?(U,q,X,Z)=>{const Q=r(U),re=typeof q=="object"?q.impliedNodeFormat:void 0,oe=N.get(re),pe=oe==null?void 0:oe.get(Q);if(pe)return pe;const de=a(U,q,X,Z);return de&&(df(U)||Xl(U,".json"))&&N.set(re,(oe||new Map).set(Q,de)),de}:void 0;return t.fileExists=U=>{const q=r(U),X=T.get(q);if(X!==void 0)return X;const Z=h.call(t,U);return T.set(q,!!Z),Z},C&&(t.writeFile=(U,q,...X)=>{const Z=r(U);T.delete(Z);const Q=b.get(Z);Q!==void 0&&Q!==q?(b.delete(Z),N.forEach(re=>re.delete(Z))):H&&N.forEach(re=>{const oe=re.get(Z);oe&&oe.text!==q&&re.delete(Z)}),C.call(t,U,q,...X)}),p&&(t.directoryExists=U=>{const q=r(U),X=E.get(q);if(X!==void 0)return X;const Z=p.call(t,U);return E.set(q,!!Z),Z},g&&(t.createDirectory=U=>{const q=r(U);E.delete(q),g.call(t,U)})),{originalReadFile:u,originalFileExists:h,originalDirectoryExists:p,originalCreateDirectory:g,originalWriteFile:C,getSourceFileWithCache:H,readFileWithCache:R}}function Aet(t,r,a){let u;return u=Sr(u,t.getConfigFileParsingDiagnostics()),u=Sr(u,t.getOptionsDiagnostics(a)),u=Sr(u,t.getSyntacticDiagnostics(r,a)),u=Sr(u,t.getGlobalDiagnostics(a)),u=Sr(u,t.getSemanticDiagnostics(r,a)),Q_(t.getCompilerOptions())&&(u=Sr(u,t.getDeclarationDiagnostics(r,a))),O6(u||w)}function Oet(t,r){let a="";for(const u of t)a+=fde(u,r);return a}function fde(t,r){const a=`${nI(t)} TS${t.code}: ${$1(t.messageText,r.getNewLine())}${r.getNewLine()}`;if(t.file){const{line:u,character:h}=Ia(t.file,t.start),p=t.file.fileName;return`${s8(p,r.getCurrentDirectory(),C=>r.getCanonicalFileName(C))}(${u+1},${h+1}): `+a}return a}var ELe=(t=>(t.Grey="\x1B[90m",t.Red="\x1B[91m",t.Yellow="\x1B[93m",t.Blue="\x1B[94m",t.Cyan="\x1B[96m",t))(ELe||{}),ILe="\x1B[7m",NLe=" ",Met="\x1B[0m",Ret="...",c8t=" ",Fet=" ";function Bet(t){switch(t){case 1:return"\x1B[91m";case 0:return"\x1B[93m";case 2:return j.fail("Should never get an Info diagnostic on the command line.");case 3:return"\x1B[94m"}}function pD(t,r){return r+t+Met}function Wet(t,r,a,u,h,p){const{line:g,character:C}=Ia(t,r),{line:b,character:T}=Ia(t,r+a),E=Ia(t,t.text.length).line,N=b-g>=4;let R=(b+1+"").length;N&&(R=Math.max(Ret.length,R));let F="";for(let H=g;H<=b;H++){F+=p.getNewLine(),N&&g+1<H&&H<b-1&&(F+=u+pD(Ret.padStart(R),ILe)+NLe+p.getNewLine(),H=b-1);const U=xW(t,H,0),q=H<E?xW(t,H+1,0):t.text.length;let X=t.text.slice(U,q);if(X=X.trimEnd(),X=X.replace(/\t/g," "),F+=u+pD((H+1+"").padStart(R),ILe)+NLe,F+=X+p.getNewLine(),F+=u+pD("".padStart(R),ILe)+NLe,F+=h,H===g){const Z=H===b?T:void 0;F+=X.slice(0,C).replace(/\S/g," "),F+=X.slice(C,Z).replace(/./g,"~")}else H===b?F+=X.slice(0,T).replace(/./g,"~"):F+=X.replace(/./g,"~");F+=Met}return F}function hde(t,r,a,u=pD){const{line:h,character:p}=Ia(t,r),g=a?s8(t.fileName,a.getCurrentDirectory(),b=>a.getCanonicalFileName(b)):t.fileName;let C="";return C+=u(g,"\x1B[96m"),C+=":",C+=u(`${h+1}`,"\x1B[93m"),C+=":",C+=u(`${p+1}`,"\x1B[93m"),C}function LLe(t,r){let a="";for(const u of t){if(u.file){const{file:h,start:p}=u;a+=hde(h,p,r),a+=" - "}if(a+=pD(nI(u),Bet(u.category)),a+=pD(` TS${u.code}: `,"\x1B[90m"),a+=$1(u.messageText,r.getNewLine()),u.file&&u.code!==k.File_appears_to_be_binary.code&&(a+=r.getNewLine(),a+=Wet(u.file,u.start,u.length,"",Bet(u.category),r)),u.relatedInformation){a+=r.getNewLine();for(const{file:h,start:p,length:g,messageText:C}of u.relatedInformation)h&&(a+=r.getNewLine(),a+=c8t+hde(h,p,r),a+=Wet(h,p,g,Fet,"\x1B[96m",r)),a+=r.getNewLine(),a+=Fet+$1(C,r.getNewLine())}a+=r.getNewLine()}return a}function $1(t,r,a=0){if(Oo(t))return t;if(t===void 0)return"";let u="";if(a){u+=r;for(let h=0;h<a;h++)u+=" "}if(u+=t.messageText,a++,t.next)for(const h of t.next)u+=$1(h,r,a);return u}function AQ(t,r){return(Oo(t)?r:t.resolutionMode)||r}function Vet(t,r,a){return mde(t,ej(t,r),a)}function _de(t){var r;return Ju(t)?t.isTypeOnly:!!((r=t.importClause)!=null&&r.isTypeOnly)}function pde(t,r,a){return mde(t,r,a)}function mde(t,r,a){if((du(r.parent)||Ju(r.parent)||q1(r.parent))&&_de(r.parent)){const h=z3(r.parent.attributes);if(h)return h}if(r.parent.parent&&V1(r.parent.parent)){const u=z3(r.parent.parent.attributes);if(u)return u}if(a&&Lce(a))return Het(t,r,a)}function Het(t,r,a){var u;if(!a)return;const h=(u=By(r.parent))==null?void 0:u.parent;if(h&&Wd(h)||L_(r.parent,!1))return 1;if(zp(By(r.parent)))return Jet(t,a)?1:99;const p=e5(t,a);return p===1?1:KV(p)||p===200?99:void 0}function z3(t,r){if(!t)return;if(P(t.elements)!==1){r==null||r(t,t.token===118?k.Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require:k.Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require);return}const a=t.elements[0];if(Bc(a.name)){if(a.name.text!=="resolution-mode"){r==null||r(a.name,t.token===118?k.resolution_mode_is_the_only_valid_key_for_type_import_attributes:k.resolution_mode_is_the_only_valid_key_for_type_import_assertions);return}if(Bc(a.value)){if(a.value.text!=="import"&&a.value.text!=="require"){r==null||r(a.value,k.resolution_mode_should_be_either_require_or_import);return}return a.value.text==="import"?99:1}}}var jet={resolvedModule:void 0,resolvedTypeReferenceDirective:void 0};function PLe(t){return t.text}var OQ={getName:PLe,getMode:(t,r,a)=>pde(r,t,a)};function gde(t,r,a,u,h){return{nameAndMode:OQ,resolve:(p,g)=>nA(p,t,a,u,h,r,g)}}function ALe(t){return Oo(t)?t:t.fileName}var zet={getName:ALe,getMode:(t,r,a)=>AQ(t,r&&WQ(r,a))};function MQ(t,r,a,u,h){return{nameAndMode:zet,resolve:(p,g)=>tNe(p,t,a,u,r,h,g)}}function QH(t,r,a,u,h,p,g,C){if(t.length===0)return w;const b=[],T=new Map,E=C(r,a,u,p,g);for(const N of t){const R=E.nameAndMode.getName(N),F=E.nameAndMode.getMode(N,h,(a==null?void 0:a.commandLine.options)||u),H=B7(R,F);let U=T.get(H);U||T.set(H,U=E.resolve(R,F)),b.push(U)}return b}function yde(t,r){return RQ(void 0,t,(a,u)=>a&&r(a,u))}function RQ(t,r,a,u){let h;return p(t,r,void 0);function p(g,C,b){if(u){const T=u(g,b);if(T)return T}return O(C,(T,E)=>{if(T&&(h!=null&&h.has(T.sourceFile.path)))return;const N=a(T,b,E);return N||!T?N:((h||(h=new Set)).add(T.sourceFile.path),p(T.commandLine.projectReferences,T.references,T))})}}var Z7="__inferred type names__.ts";function FQ(t,r,a){const u=t.configFilePath?ts(t.configFilePath):r;return zr(u,`__lib_node_modules_lookup_${a}__.ts`)}function vde(t){const r=t.split(".");let a=r[1],u=2;for(;r[u]&&r[u]!=="d";)a+=(u===2?"/":"-")+r[u],u++;return"@typescript/lib-"+a}function Uet(t){return Vw(t.fileName)}function qet(t){const r=Uet(t);return Jle.get(r)}function _2(t){switch(t==null?void 0:t.kind){case 3:case 4:case 5:case 7:return!0;default:return!1}}function U3(t){return t.pos!==void 0}function Y7(t,r){var a,u,h,p;const g=j.checkDefined(t.getSourceFileByPath(r.file)),{kind:C,index:b}=r;let T,E,N;switch(C){case 3:const R=ej(g,b);if(N=(u=(a=t.getResolvedModuleFromModuleSpecifier(R,g))==null?void 0:a.resolvedModule)==null?void 0:u.packageId,R.pos===-1)return{file:g,packageId:N,text:R.text};T=Va(g.text,R.pos),E=R.end;break;case 4:({pos:T,end:E}=g.referencedFiles[b]);break;case 5:({pos:T,end:E}=g.typeReferenceDirectives[b]),N=(p=(h=t.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(g.typeReferenceDirectives[b],g))==null?void 0:h.resolvedTypeReferenceDirective)==null?void 0:p.packageId;break;case 7:({pos:T,end:E}=g.libReferenceDirectives[b]);break;default:return j.assertNever(C)}return{file:g,pos:T,end:E,packageId:N}}function bde(t,r,a,u,h,p,g,C,b,T){if(!t||C!=null&&C()||!i_(t.getRootFileNames(),r))return!1;let E;if(!i_(t.getProjectReferences(),T,U)||t.getSourceFiles().some(F))return!1;const N=t.getMissingFilePaths();if(N&&cf(N,h))return!1;const R=t.getCompilerOptions();if(!xce(R,a)||t.resolvedLibReferences&&cf(t.resolvedLibReferences,(X,Z)=>g(Z)))return!1;if(R.configFile&&a.configFile)return R.configFile.text===a.configFile.text;return!0;function F(X){return!H(X)||p(X.path)}function H(X){return X.version===u(X.resolvedPath,X.fileName)}function U(X,Z,Q){return hae(X,Z)&&q(t.getResolvedProjectReferences()[Q],X)}function q(X,Z){if(X){if(Yt(E,X))return!0;const re=q3(Z),oe=b(re);return!oe||X.commandLine.options.configFile!==oe.options.configFile||!i_(X.commandLine.fileNames,oe.fileNames)?!1:((E||(E=[])).push(X),!O(X.references,(pe,de)=>!q(pe,X.commandLine.projectReferences[de])))}const Q=q3(Z);return!b(Q)}}function mD(t){return t.options.configFile?[...t.options.configFile.parseDiagnostics,...t.errors]:t.errors}function ZH(t,r,a,u){const h=BQ(t,r,a,u);return typeof h=="object"?h.impliedNodeFormat:h}function BQ(t,r,a,u){const h=yh(u),p=3<=h&&h<=99||yx(t);return Ru(t,[".d.mts",".mts",".mjs"])?99:Ru(t,[".d.cts",".cts",".cjs"])?1:p&&Ru(t,[".d.ts",".ts",".tsx",".js",".jsx"])?g():void 0;function g(){const C=W7(r,a,u),b=[];C.failedLookupLocations=b,C.affectingLocations=b;const T=V7(ts(t),C);return{impliedNodeFormat:(T==null?void 0:T.contents.packageJsonContent.type)==="module"?99:1,packageJsonLocations:b,packageJsonScope:T}}}var $et=new Set([k.Cannot_redeclare_block_scoped_variable_0.code,k.A_module_cannot_have_multiple_default_exports.code,k.Another_export_default_is_here.code,k.The_first_export_default_is_here.code,k.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module.code,k.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode.code,k.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here.code,k.constructor_is_a_reserved_word.code,k.delete_cannot_be_called_on_an_identifier_in_strict_mode.code,k.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode.code,k.Invalid_use_of_0_Modules_are_automatically_in_strict_mode.code,k.Invalid_use_of_0_in_strict_mode.code,k.A_label_is_not_allowed_here.code,k.with_statements_are_not_allowed_in_strict_mode.code,k.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement.code,k.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement.code,k.A_class_declaration_without_the_default_modifier_must_have_a_name.code,k.A_class_member_cannot_have_the_0_keyword.code,k.A_comma_expression_is_not_allowed_in_a_computed_property_name.code,k.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement.code,k.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement.code,k.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement.code,k.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement.code,k.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration.code,k.A_definite_assignment_assertion_is_not_permitted_in_this_context.code,k.A_destructuring_declaration_must_have_an_initializer.code,k.A_get_accessor_cannot_have_parameters.code,k.A_rest_element_cannot_contain_a_binding_pattern.code,k.A_rest_element_cannot_have_a_property_name.code,k.A_rest_element_cannot_have_an_initializer.code,k.A_rest_element_must_be_last_in_a_destructuring_pattern.code,k.A_rest_parameter_cannot_have_an_initializer.code,k.A_rest_parameter_must_be_last_in_a_parameter_list.code,k.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma.code,k.A_return_statement_cannot_be_used_inside_a_class_static_block.code,k.A_set_accessor_cannot_have_rest_parameter.code,k.A_set_accessor_must_have_exactly_one_parameter.code,k.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module.code,k.An_export_declaration_cannot_have_modifiers.code,k.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module.code,k.An_import_declaration_cannot_have_modifiers.code,k.An_object_member_cannot_be_declared_optional.code,k.Argument_of_dynamic_import_cannot_be_spread_element.code,k.Cannot_assign_to_private_method_0_Private_methods_are_not_writable.code,k.Cannot_redeclare_identifier_0_in_catch_clause.code,k.Catch_clause_variable_cannot_have_an_initializer.code,k.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator.code,k.Classes_can_only_extend_a_single_class.code,k.Classes_may_not_have_a_field_named_constructor.code,k.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code,k.Duplicate_label_0.code,k.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments.code,k.for_await_loops_cannot_be_used_inside_a_class_static_block.code,k.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code,k.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code,k.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array.code,k.JSX_property_access_expressions_cannot_include_JSX_namespace_names.code,k.Jump_target_cannot_cross_function_boundary.code,k.Line_terminator_not_permitted_before_arrow.code,k.Modifiers_cannot_appear_here.code,k.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement.code,k.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement.code,k.Private_identifiers_are_not_allowed_outside_class_bodies.code,k.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression.code,k.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier.code,k.Tagged_template_expressions_are_not_permitted_in_an_optional_chain.code,k.The_left_hand_side_of_a_for_of_statement_may_not_be_async.code,k.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer.code,k.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer.code,k.Trailing_comma_not_allowed.code,k.Variable_declaration_list_cannot_be_empty.code,k._0_and_1_operations_cannot_be_mixed_without_parentheses.code,k._0_expected.code,k._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2.code,k._0_list_cannot_be_empty.code,k._0_modifier_already_seen.code,k._0_modifier_cannot_appear_on_a_constructor_declaration.code,k._0_modifier_cannot_appear_on_a_module_or_namespace_element.code,k._0_modifier_cannot_appear_on_a_parameter.code,k._0_modifier_cannot_appear_on_class_elements_of_this_kind.code,k._0_modifier_cannot_be_used_here.code,k._0_modifier_must_precede_1_modifier.code,k._0_declarations_can_only_be_declared_inside_a_block.code,k._0_declarations_must_be_initialized.code,k.extends_clause_already_seen.code,k.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations.code,k.Class_constructor_may_not_be_a_generator.code,k.Class_constructor_may_not_be_an_accessor.code,k.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,k.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,k.Private_field_0_must_be_declared_in_an_enclosing_class.code,k.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value.code]);function l8t(t,r){return t?j6(t.getCompilerOptions(),r,Xle):!1}function u8t(t,r,a,u,h,p){return{rootNames:t,options:r,host:a,oldProgram:u,configFileParsingDiagnostics:h,typeScriptVersion:p}}function YH(t,r,a,u,h){var p,g,C,b,T,E,N,R,F,H,U,q,X,Z,Q,re;const oe=Ao(t)?u8t(t,r,a,u,h):t,{rootNames:pe,options:de,configFileParsingDiagnostics:ue,projectReferences:Ie,typeScriptVersion:we}=oe;let{oldProgram:he}=oe;for(const it of PIe)if(Li(de,it.name)&&typeof de[it.name]=="string")throw new Error(`${it.name} is a string value; tsconfig JSON must be parsed with parseJsonSourceFileConfigFileContent or getParsedCommandLineOfConfigFile before passing to createProgram`);const Ae=Bh(()=>Gp("ignoreDeprecations",k.Invalid_value_for_ignoreDeprecations));let ke,Te,De,qe,se,Ne,Oe,He=Of(),Pe,We,ze,Nt,$e,et,Me,ut,wt,Et,dt,zt,Ei,tn,xn;const Pn=typeof de.maxNodeModuleJsDepth=="number"?de.maxNodeModuleJsDepth:0;let _i=0;const Fi=new Map,On=new Map;(p=Zn)==null||p.push(Zn.Phase.Program,"createProgram",{configFilePath:de.configFilePath,rootDir:de.rootDir},!0),ou("beforeProgram");const pn=oe.host||DLe(de),qr=HQ(pn);let Fs=de.noLib;const ko=Bh(()=>pn.getDefaultLibFileName(de)),ls=pn.getDefaultLibLocation?pn.getDefaultLibLocation():ts(ko()),Qs=OV();let Mn=[];const Zs=pn.getCurrentDirectory(),at=e7(de),yi=QV(de,at),Sn=new Map;let dr,us,Xr,Gs;const ma=pn.hasInvalidatedResolutions||w1;pn.resolveModuleNameLiterals?(Gs=pn.resolveModuleNameLiterals.bind(pn),Xr=(g=pn.getModuleResolutionCache)==null?void 0:g.call(pn)):pn.resolveModuleNames?(Gs=(it,yt,ei,Pi,nn,Vn)=>pn.resolveModuleNames(it.map(PLe),yt,Vn==null?void 0:Vn.map(PLe),ei,Pi,nn).map(mn=>mn?mn.extension!==void 0?{resolvedModule:mn}:{resolvedModule:{...mn,extension:i7(mn.resolvedFileName)}}:jet),Xr=(C=pn.getModuleResolutionCache)==null?void 0:C.call(pn)):(Xr=R3(Zs,Lr,de),Gs=(it,yt,ei,Pi,nn)=>QH(it,yt,ei,Pi,nn,pn,Xr,gde));let ka;if(pn.resolveTypeReferenceDirectiveReferences)ka=pn.resolveTypeReferenceDirectiveReferences.bind(pn);else if(pn.resolveTypeReferenceDirectives)ka=(it,yt,ei,Pi,nn)=>pn.resolveTypeReferenceDirectives(it.map(ALe),yt,ei,Pi,nn==null?void 0:nn.impliedNodeFormat).map(Vn=>({resolvedTypeReferenceDirective:Vn}));else{const it=sQ(Zs,Lr,void 0,Xr==null?void 0:Xr.getPackageJsonInfoCache(),Xr==null?void 0:Xr.optionsToRedirectsKey);ka=(yt,ei,Pi,nn,Vn)=>QH(yt,ei,Pi,nn,Vn,pn,it,MQ)}const Ji=pn.hasInvalidatedLibResolutions||w1;let ac;if(pn.resolveLibrary)ac=pn.resolveLibrary.bind(pn);else{const it=R3(Zs,Lr,de,Xr==null?void 0:Xr.getPackageJsonInfoCache());ac=(yt,ei,Pi)=>oQ(yt,ei,Pi,pn,it)}const St=new Map;let ri=new Map,xe=Of(),pt=!1;const Se=new Map;let Ze=new Map;const gt=pn.useCaseSensitiveFileNames()?new Map:void 0;let Dt,Je,Rt,Ct;const ii=!!((b=pn.useSourceOfProjectReferenceRedirect)!=null&&b.call(pn))&&!de.disableSourceOfProjectReferenceRedirect,{onProgramCreateComplete:vt,fileExists:Ni,directoryExists:ji}=d8t({compilerHost:pn,getSymlinkCache:bm,useSourceOfProjectReferenceRedirect:ii,toPath:cn,getResolvedProjectReferences:wf,getSourceOfProjectReferenceRedirect:jd,forEachResolvedProjectReference:F_}),gr=pn.readFile.bind(pn);(T=Zn)==null||T.push(Zn.Phase.Program,"shouldProgramCreateNewSourceFiles",{hasOldProgram:!!he});const te=l8t(he,de);(E=Zn)==null||E.pop();let tt;if((N=Zn)==null||N.push(Zn.Phase.Program,"tryReuseStructureFromOldProgram",{}),tt=Gu(),(R=Zn)==null||R.pop(),tt!==2){if(ke=[],Te=[],Ie&&(Dt||(Dt=Ie.map(Xe)),pe.length&&(Dt==null||Dt.forEach((it,yt)=>{if(!it)return;const ei=it.commandLine.options.outFile;if(ii){if(ei||zh(it.commandLine.options)===0)for(const Pi of it.commandLine.fileNames)Hu(Pi,{kind:1,index:yt})}else if(ei)Hu(cx(ei,".d.ts"),{kind:2,index:yt});else if(zh(it.commandLine.options)===0){const Pi=Bh(()=>oA(it.commandLine,!pn.useCaseSensitiveFileNames()));for(const nn of it.commandLine.fileNames)!df(nn)&&!Xl(nn,".json")&&Hu(j3(nn,it.commandLine,!pn.useCaseSensitiveFileNames(),Pi),{kind:2,index:yt})}}))),(F=Zn)==null||F.push(Zn.Phase.Program,"processRootFiles",{count:pe.length}),O(pe,(it,yt)=>Qu(it,!1,!1,{kind:0,index:yt})),(H=Zn)==null||H.pop(),Me??(Me=pe.length?nQ(de,pn):w),ut=M3(),Me.length){(U=Zn)==null||U.push(Zn.Phase.Program,"processTypeReferences",{count:Me.length});const it=de.configFilePath?ts(de.configFilePath):Zs,yt=zr(it,Z7),ei=$o(Me,yt);for(let Pi=0;Pi<Me.length;Pi++)ut.set(Me[Pi],void 0,ei[Pi]),Ot(Me[Pi],void 0,ei[Pi],{kind:8,typeReference:Me[Pi],packageId:(X=(q=ei[Pi])==null?void 0:q.resolvedTypeReferenceDirective)==null?void 0:X.packageId});(Z=Zn)==null||Z.pop()}if(pe.length&&!Fs){const it=ko();!de.lib&&it?Qu(it,!0,!1,{kind:6}):O(de.lib,(yt,ei)=>{Qu(Ci(yt),!0,!1,{kind:6,index:ei})})}De=Mu(ke,on).concat(Te),ke=void 0,Te=void 0,Pe=void 0}if(he&&pn.onReleaseOldSourceFile){const it=he.getSourceFiles();for(const yt of it){const ei=ki(yt.resolvedPath);(te||!ei||ei.impliedNodeFormat!==yt.impliedNodeFormat||yt.resolvedPath===yt.path&&ei.resolvedPath!==yt.path)&&pn.onReleaseOldSourceFile(yt,he.getCompilerOptions(),!!ki(yt.path),ei)}pn.getParsedCommandLine||he.forEachResolvedProjectReference(yt=>{h_(yt.sourceFile.path)||pn.onReleaseOldSourceFile(yt.sourceFile,he.getCompilerOptions(),!1,void 0)})}he&&pn.onReleaseParsedCommandLine&&RQ(he.getProjectReferences(),he.getResolvedProjectReferences(),(it,yt,ei)=>{const Pi=(yt==null?void 0:yt.commandLine.projectReferences[ei])||he.getProjectReferences()[ei],nn=q3(Pi);Je!=null&&Je.has(cn(nn))||pn.onReleaseParsedCommandLine(nn,it,he.getCompilerOptions())}),he=void 0,Et=void 0,zt=void 0,tn=void 0;const Gt={getRootFileNames:()=>pe,getSourceFile:tc,getSourceFileByPath:ki,getSourceFiles:()=>De,getMissingFilePaths:()=>Ze,getModuleResolutionCache:()=>Xr,getFilesByNameMap:()=>Se,getCompilerOptions:()=>de,getSyntacticDiagnostics:uh,getOptionsDiagnostics:Xu,getGlobalDiagnostics:Cu,getSemanticDiagnostics:sd,getCachedSemanticDiagnostics:Pp,getSuggestionDiagnostics:ds,getDeclarationDiagnostics:_e,getBindAndCheckDiagnostics:Nl,getProgramDiagnostics:Ve,getTypeChecker:go,getClassifiableNames:qo,getCommonSourceDirectory:vi,emit:pc,getCurrentDirectory:()=>Zs,getNodeCount:()=>go().getNodeCount(),getIdentifierCount:()=>go().getIdentifierCount(),getSymbolCount:()=>go().getSymbolCount(),getTypeCount:()=>go().getTypeCount(),getInstantiationCount:()=>go().getInstantiationCount(),getRelationCacheSizes:()=>go().getRelationCacheSizes(),getFileProcessingDiagnostics:()=>et,getAutomaticTypeDirectiveNames:()=>Me,getAutomaticTypeDirectiveResolutions:()=>ut,isSourceFileFromExternalLibrary:kh,isSourceFileDefaultLibrary:md,getModeForUsageLocation:Ug,getEmitSyntaxForUsageLocation:dC,getModeForResolutionAtIndex:k2,getSourceFileFromReference:po,getLibFileFromReference:En,sourceFileToPackageName:ri,redirectTargetsMap:xe,usesUriStyleNodeCoreModules:pt,resolvedModules:dt,resolvedTypeReferenceDirectiveNames:Ei,resolvedLibReferences:wt,getResolvedModule:be,getResolvedModuleFromModuleSpecifier:Qt,getResolvedTypeReferenceDirective:lt,getResolvedTypeReferenceDirectiveFromTypeReferenceDirective:st,forEachResolvedModule:hi,forEachResolvedTypeReferenceDirective:vn,getCurrentPackagesMap:()=>xn,typesPackageExists:Pt,packageBundlesTypes:Bt,isEmittedFile:zg,getConfigFileParsingDiagnostics:gm,getProjectReferences:Jo,getResolvedProjectReferences:wf,getProjectReferenceRedirect:ym,getResolvedProjectReferenceToRedirect:Hg,getResolvedProjectReferenceByPath:h_,forEachResolvedProjectReference:F_,isSourceOfProjectReferenceRedirect:lC,getRedirectReferenceForResolutionFromSourceOfProject:Di,getCompilerOptionsForFile:ve,getDefaultResolutionModeForFile:Jy,getEmitModuleFormatOfFile:T2,getImpliedNodeFormatForEmit:nb,shouldTransformImportCall:xx,emitBuildInfo:ja,fileExists:Ni,readFile:gr,directoryExists:ji,getSymlinkCache:bm,realpath:(Q=pn.realpath)==null?void 0:Q.bind(pn),useCaseSensitiveFileNames:()=>pn.useCaseSensitiveFileNames(),getCanonicalFileName:Lr,getFileIncludeReasons:()=>He,structureIsReused:tt,writeFile:Ls};return vt(),Zt(),ou("afterProgram"),Wm("Program","beforeProgram","afterProgram"),(re=Zn)==null||re.pop(),Gt;function le(){return Mn&&(et==null||et.forEach(it=>{switch(it.kind){case 1:return Qs.add(Zo(it.file&&ki(it.file),it.fileProcessingReason,it.diagnostic,it.args||w));case 0:return Qs.add(Ue(it));case 2:return it.diagnostics.forEach(yt=>Qs.add(yt));default:j.assertNever(it)}}),Mn.forEach(({file:it,diagnostic:yt,args:ei})=>Qs.add(Zo(it,void 0,yt,ei))),Mn=void 0,We=void 0,ze=void 0),Qs}function Ue({reason:it}){const{file:yt,pos:ei,end:Pi}=Y7(Gt,it),nn=yt.libReferenceDirectives[it.index],Vn=Uet(nn),mn=I6(KR(Vn,"lib."),".d.ts"),Pr=LT(mn,HX,hl);return Md(yt,j.checkDefined(ei),j.checkDefined(Pi)-ei,Pr?k.Cannot_find_lib_definition_for_0_Did_you_mean_1:k.Cannot_find_lib_definition_for_0,Vn,Pr)}function be(it,yt,ei){var Pi;return(Pi=dt==null?void 0:dt.get(it.path))==null?void 0:Pi.get(yt,ei)}function Qt(it,yt){return yt??(yt=_n(it)),j.assertIsDefined(yt,"`moduleSpecifier` must have a `SourceFile` ancestor. Use `program.getResolvedModule` instead to provide the containing file and resolution mode."),be(yt,it.text,Ug(yt,it))}function lt(it,yt,ei){var Pi;return(Pi=Ei==null?void 0:Ei.get(it.path))==null?void 0:Pi.get(yt,ei)}function st(it,yt){return lt(yt,it.fileName,it.resolutionMode||yt.impliedNodeFormat)}function hi(it,yt){ln(dt,it,yt)}function vn(it,yt){ln(Ei,it,yt)}function ln(it,yt,ei){var Pi;ei?(Pi=it==null?void 0:it.get(ei.path))==null||Pi.forEach((nn,Vn,mn)=>yt(nn,Vn,mn,ei.path)):it==null||it.forEach((nn,Vn)=>nn.forEach((mn,Pr,ks)=>yt(mn,Pr,ks,Vn)))}function Un(){return xn||(xn=new Map,hi(({resolvedModule:it})=>{it!=null&&it.packageId&&xn.set(it.packageId.name,it.extension===".d.ts"||!!xn.get(it.packageId.name))}),xn)}function Pt(it){return Un().has(uQ(it))}function Bt(it){return!!Un().get(it)}function fi(it){var yt;(yt=it.resolutionDiagnostics)!=null&&yt.length&&(et??(et=[])).push({kind:2,diagnostics:it.resolutionDiagnostics})}function wi(it,yt,ei,Pi){if(pn.resolveModuleNameLiterals||!pn.resolveModuleNames)return fi(ei);if(!Xr||Gd(yt))return;const nn=wo(it.originalFileName,Zs),Vn=ts(nn),mn=Xn(it),Pr=Xr.getFromNonRelativeNameCache(yt,Pi,Vn,mn);Pr&&fi(Pr)}function Ri(it,yt,ei){var Pi,nn;const Vn=wo(yt.originalFileName,Zs),mn=Xn(yt);(Pi=Zn)==null||Pi.push(Zn.Phase.Program,"resolveModuleNamesWorker",{containingFileName:Vn}),ou("beforeResolveModule");const Pr=Gs(it,Vn,mn,de,yt,ei);return ou("afterResolveModule"),Wm("ResolveModule","beforeResolveModule","afterResolveModule"),(nn=Zn)==null||nn.pop(),Pr}function Ai(it,yt,ei){var Pi,nn;const Vn=Oo(yt)?void 0:yt,mn=Oo(yt)?yt:wo(yt.originalFileName,Zs),Pr=Vn&&Xn(Vn);(Pi=Zn)==null||Pi.push(Zn.Phase.Program,"resolveTypeReferenceDirectiveNamesWorker",{containingFileName:mn}),ou("beforeResolveTypeReference");const ks=ka(it,mn,Pr,de,Vn,ei);return ou("afterResolveTypeReference"),Wm("ResolveTypeReference","beforeResolveTypeReference","afterResolveTypeReference"),(nn=Zn)==null||nn.pop(),ks}function Xn(it){const yt=Hg(it.originalFileName);if(yt||!df(it.originalFileName))return yt;const ei=Di(it.path);if(ei)return ei;if(!pn.realpath||!de.preserveSymlinks||!it.originalFileName.includes(Xv))return;const Pi=cn(pn.realpath(it.originalFileName));return Pi===it.path?void 0:Di(Pi)}function Di(it){const yt=jd(it);if(Oo(yt))return Hg(yt);if(yt)return F_(ei=>{const Pi=ei.commandLine.options.outFile;if(Pi)return cn(Pi)===it?ei:void 0})}function on(it,yt){return _l(zi(it),zi(yt))}function zi(it){if(Vm(ls,it.fileName,!1)){const yt=ud(it.fileName);if(yt==="lib.d.ts"||yt==="lib.es6.d.ts")return 0;const ei=I6(KR(yt,"lib."),".d.ts"),Pi=HX.indexOf(ei);if(Pi!==-1)return Pi+1}return HX.length+2}function cn(it){return ol(it,Zs,Lr)}function vi(){if(se===void 0){const it=$t(De,yt=>SI(yt,Gt));se=X7(de,()=>es(it,yt=>yt.isDeclarationFile?void 0:yt.fileName),Zs,Lr,yt=>ee(it,yt))}return se}function qo(){var it;if(!Oe){go(),Oe=new Set;for(const yt of De)(it=yt.classifiableNames)==null||it.forEach(ei=>Oe.add(ei))}return Oe}function Wo(it,yt){return Lc({entries:it,containingFile:yt,containingSourceFile:yt,redirectedReference:Xn(yt),nameAndModeGetter:OQ,resolutionWorker:Ri,getResolutionFromOldProgram:(ei,Pi)=>he==null?void 0:he.getResolvedModule(yt,ei,Pi),getResolved:sP,canReuseResolutionsInFile:()=>yt===(he==null?void 0:he.getSourceFile(yt.fileName))&&!ma(yt.path),resolveToOwnAmbientModule:!0})}function $o(it,yt){const ei=Oo(yt)?void 0:yt;return Lc({entries:it,containingFile:yt,containingSourceFile:ei,redirectedReference:ei&&Xn(ei),nameAndModeGetter:zet,resolutionWorker:Ai,getResolutionFromOldProgram:(Pi,nn)=>{var Vn;return ei?he==null?void 0:he.getResolvedTypeReferenceDirective(ei,Pi,nn):(Vn=he==null?void 0:he.getAutomaticTypeDirectiveResolutions())==null?void 0:Vn.get(Pi,nn)},getResolved:EG,canReuseResolutionsInFile:()=>ei?ei===(he==null?void 0:he.getSourceFile(ei.fileName))&&!ma(ei.path):!ma(cn(yt))})}function Lc({entries:it,containingFile:yt,containingSourceFile:ei,redirectedReference:Pi,nameAndModeGetter:nn,resolutionWorker:Vn,getResolutionFromOldProgram:mn,getResolved:Pr,canReuseResolutionsInFile:ks,resolveToOwnAmbientModule:ar}){if(!it.length)return w;if(tt===0&&(!ar||!ei.ambientModuleNames.length))return Vn(it,yt,void 0);let Ns,cr,Go,ll;const qh=ks();for(let $h=0;$h<it.length;$h++){const $g=it[$h];if(qh){const Jh=nn.getName($g),DD=nn.getMode($g,ei,(Pi==null?void 0:Pi.commandLine.options)??de),kx=mn(Jh,DD),rb=kx&&Pr(kx);if(rb){mx(de,pn)&&bo(pn,Vn===Ri?rb.packageId?k.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:k.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:rb.packageId?k.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:k.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2,Jh,ei?wo(ei.originalFileName,Zs):yt,rb.resolvedFileName,rb.packageId&&zk(rb.packageId)),(Go??(Go=new Array(it.length)))[$h]=kx,(ll??(ll=[])).push($g);continue}}if(ar){const Jh=nn.getName($g);if(Yt(ei.ambientModuleNames,Jh)){mx(de,pn)&&bo(pn,k.Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1,Jh,wo(ei.originalFileName,Zs)),(Go??(Go=new Array(it.length)))[$h]=jet;continue}}(Ns??(Ns=[])).push($g),(cr??(cr=[])).push($h)}if(!Ns)return Go;const qg=Vn(Ns,yt,ll);return Go?(qg.forEach(($h,$g)=>Go[cr[$g]]=$h),Go):qg}function vu(){return!RQ(he.getProjectReferences(),he.getResolvedProjectReferences(),(it,yt,ei)=>{const Pi=(yt?yt.commandLine.projectReferences:Ie)[ei],nn=Xe(Pi);return it?!nn||nn.sourceFile!==it.sourceFile||!i_(it.commandLine.fileNames,nn.commandLine.fileNames):nn!==void 0},(it,yt)=>{const ei=yt?h_(yt.sourceFile.path).commandLine.projectReferences:Ie;return!i_(it,ei,hae)})}function Gu(){var it;if(!he)return 0;const yt=he.getCompilerOptions();if(TG(yt,de))return 0;const ei=he.getRootFileNames();if(!i_(ei,pe)||!vu())return 0;Ie&&(Dt=Ie.map(Xe));const Pi=[],nn=[];if(tt=2,cf(he.getMissingFilePaths(),ar=>pn.fileExists(ar)))return 0;const Vn=he.getSourceFiles();let mn;(ar=>{ar[ar.Exists=0]="Exists",ar[ar.Modified=1]="Modified"})(mn||(mn={}));const Pr=new Map;for(const ar of Vn){const Ns=od(ar.fileName,Xr,pn,de);let cr=pn.getSourceFileByPath?pn.getSourceFileByPath(ar.fileName,ar.resolvedPath,Ns,void 0,te):pn.getSourceFile(ar.fileName,Ns,void 0,te);if(!cr)return 0;cr.packageJsonLocations=(it=Ns.packageJsonLocations)!=null&&it.length?Ns.packageJsonLocations:void 0,cr.packageJsonScope=Ns.packageJsonScope,j.assert(!cr.redirectInfo,"Host should not return a redirect source file from `getSourceFile`");let Go;if(ar.redirectInfo){if(cr!==ar.redirectInfo.unredirected)return 0;Go=!1,cr=ar}else if(he.redirectTargetsMap.has(ar.path)){if(cr!==ar)return 0;Go=!1}else Go=cr!==ar;cr.path=ar.path,cr.originalFileName=ar.originalFileName,cr.resolvedPath=ar.resolvedPath,cr.fileName=ar.fileName;const ll=he.sourceFileToPackageName.get(ar.path);if(ll!==void 0){const qh=Pr.get(ll),qg=Go?1:0;if(qh!==void 0&&qg===1||qh===1)return 0;Pr.set(ll,qg)}Go?(ar.impliedNodeFormat!==cr.impliedNodeFormat?tt=1:i_(ar.libReferenceDirectives,cr.libReferenceDirectives,kd)?ar.hasNoDefaultLib!==cr.hasNoDefaultLib?tt=1:i_(ar.referencedFiles,cr.referencedFiles,kd)?(li(cr),i_(ar.imports,cr.imports,eg)&&i_(ar.moduleAugmentations,cr.moduleAugmentations,eg)?(ar.flags&12582912)!==(cr.flags&12582912)?tt=1:i_(ar.typeReferenceDirectives,cr.typeReferenceDirectives,kd)||(tt=1):tt=1):tt=1:tt=1,nn.push(cr)):ma(ar.path)&&(tt=1,nn.push(cr)),Pi.push(cr)}if(tt!==2)return tt;for(const ar of nn){const Ns=Get(ar),cr=Wo(Ns,ar);(zt??(zt=new Map)).set(ar.path,cr),pae(Ns,cr,$h=>he.getResolvedModule(ar,$h.text,Ug(ar,$h)),U2e)&&(tt=1);const ll=ar.typeReferenceDirectives,qh=$o(ll,ar);(tn??(tn=new Map)).set(ar.path,qh),pae(ll,qh,$h=>he.getResolvedTypeReferenceDirective(ar,ALe($h),AQ($h,ar.impliedNodeFormat)),q2e)&&(tt=1)}if(tt!==2)return tt;if(j2e(yt,de)||he.resolvedLibReferences&&cf(he.resolvedLibReferences,(ar,Ns)=>hn(Ns).actual!==ar.actual))return 1;if(pn.hasChangedAutomaticTypeDirectiveNames){if(pn.hasChangedAutomaticTypeDirectiveNames())return 1}else if(Me=nQ(de,pn),!i_(he.getAutomaticTypeDirectiveNames(),Me))return 1;Ze=he.getMissingFilePaths(),j.assert(Pi.length===he.getSourceFiles().length);for(const ar of Pi)Se.set(ar.path,ar);return he.getFilesByNameMap().forEach((ar,Ns)=>{if(!ar){Se.set(Ns,ar);return}if(ar.path===Ns){he.isSourceFileFromExternalLibrary(ar)&&On.set(ar.path,!0);return}Se.set(Ns,Se.get(ar.path))}),De=Pi,He=he.getFileIncludeReasons(),et=he.getFileProcessingDiagnostics(),Me=he.getAutomaticTypeDirectiveNames(),ut=he.getAutomaticTypeDirectiveResolutions(),ri=he.sourceFileToPackageName,xe=he.redirectTargetsMap,pt=he.usesUriStyleNodeCoreModules,dt=he.resolvedModules,Ei=he.resolvedTypeReferenceDirectiveNames,wt=he.resolvedLibReferences,xn=he.getCurrentPackagesMap(),2}function Zc(it){return{getCanonicalFileName:Lr,getCommonSourceDirectory:Gt.getCommonSourceDirectory,getCompilerOptions:Gt.getCompilerOptions,getCurrentDirectory:()=>Zs,getSourceFile:Gt.getSourceFile,getSourceFileByPath:Gt.getSourceFileByPath,getSourceFiles:Gt.getSourceFiles,isSourceFileFromExternalLibrary:kh,getResolvedProjectReferenceToRedirect:Hg,getProjectReferenceRedirect:ym,isSourceOfProjectReferenceRedirect:lC,getSymlinkCache:bm,writeFile:it||Ls,isEmitBlocked:mc,shouldTransformImportCall:xx,getEmitModuleFormatOfFile:T2,getDefaultResolutionModeForFile:Jy,getModeForResolutionAtIndex:k2,readFile:yt=>pn.readFile(yt),fileExists:yt=>{const ei=cn(yt);return ki(ei)?!0:Ze.has(ei)?!1:pn.fileExists(yt)},realpath:to(pn,pn.realpath),useCaseSensitiveFileNames:()=>pn.useCaseSensitiveFileNames(),getBuildInfo:()=>{var yt;return(yt=Gt.getBuildInfo)==null?void 0:yt.call(Gt)},getSourceFileFromReference:(yt,ei)=>Gt.getSourceFileFromReference(yt,ei),redirectTargetsMap:xe,getFileIncludeReasons:Gt.getFileIncludeReasons,createHash:to(pn,pn.createHash),getModuleResolutionCache:()=>Gt.getModuleResolutionCache(),trace:to(pn,pn.trace)}}function Ls(it,yt,ei,Pi,nn,Vn){pn.writeFile(it,yt,ei,Pi,nn,Vn)}function ja(it){var yt,ei;(yt=Zn)==null||yt.push(Zn.Phase.Emit,"emitBuildInfo",{},!0),ou("beforeEmit");const Pi=ide(bLe,Zc(it),void 0,pLe,!1,!0);return ou("afterEmit"),Wm("Emit","beforeEmit","afterEmit"),(ei=Zn)==null||ei.pop(),Pi}function wf(){return Dt}function Jo(){return Ie}function kh(it){return!!On.get(it.path)}function md(it){if(!it.isDeclarationFile)return!1;if(it.hasNoDefaultLib)return!0;if(de.noLib)return!1;const yt=pn.useCaseSensitiveFileNames()?NT:jw;return de.lib?Ft(de.lib,ei=>{const Pi=wt.get(ei);return!!Pi&&yt(it.fileName,Pi.actual)}):yt(it.fileName,ko())}function go(){return Ne||(Ne=TNe(Gt))}function pc(it,yt,ei,Pi,nn,Vn,mn){var Pr,ks;(Pr=Zn)==null||Pr.push(Zn.Phase.Emit,"emit",{path:it==null?void 0:it.path},!0);const ar=ci(()=>oo(Gt,it,yt,ei,Pi,nn,Vn,mn));return(ks=Zn)==null||ks.pop(),ar}function mc(it){return Sn.has(cn(it))}function oo(it,yt,ei,Pi,nn,Vn,mn,Pr){if(!mn){const cr=Sde(it,yt,ei,Pi);if(cr)return cr}const ks=go(),ar=ks.getEmitResolver(de.outFile?void 0:yt,Pi,tde(nn,mn));ou("beforeEmit");const Ns=ks.runWithCancellationToken(Pi,()=>ide(ar,Zc(ei),yt,mLe(de,Vn,nn),nn,!1,mn,Pr));return ou("afterEmit"),Wm("Emit","beforeEmit","afterEmit"),Ns}function tc(it){return ki(cn(it))}function ki(it){return Se.get(it)||void 0}function Gc(it,yt,ei){return O6(it?yt(it,ei):Rr(Gt.getSourceFiles(),Pi=>(ei&&ei.throwIfCancellationRequested(),yt(Pi,ei))))}function uh(it,yt){return Gc(it,Lt,yt)}function sd(it,yt,ei){return Gc(it,(Pi,nn)=>Mi(Pi,nn,ei),yt)}function Pp(it){return Nt==null?void 0:Nt.get(it.path)}function Nl(it,yt){return Rn(it,yt,void 0)}function Ve(it){var yt;if(p3(it,de,Gt))return w;const ei=le().getDiagnostics(it.fileName);return(yt=it.commentDirectives)!=null&&yt.length?Mr(it,it.commentDirectives,ei).diagnostics:ei}function _e(it,yt){return Gc(it,Ku,yt)}function Lt(it){return r_(it)?(it.additionalSyntacticDiagnostics||(it.additionalSyntacticDiagnostics=Ic(it)),Js(it.additionalSyntacticDiagnostics,it.parseDiagnostics)):it.parseDiagnostics}function ci(it){try{return it()}catch(yt){throw yt instanceof t8&&(Ne=void 0),yt}}function Mi(it,yt,ei){return Js(VQ(Rn(it,yt,ei),de),Ve(it))}function Rn(it,yt,ei){if(ei)return Yr(it,yt,ei);let Pi=Nt==null?void 0:Nt.get(it.path);return Pi||(Nt??(Nt=new Map)).set(it.path,Pi=Yr(it,yt)),Pi}function Yr(it,yt,ei){return ci(()=>{if(p3(it,de,Gt))return w;const Pi=go();j.assert(!!it.bindDiagnostics);const nn=it.scriptKind===1||it.scriptKind===2,Vn=k8(it,de.checkJs),mn=nn&&n7(it,de);let Pr=it.bindDiagnostics,ks=Pi.getDiagnostics(it,yt,ei);return Vn&&(Pr=$t(Pr,ar=>$et.has(ar.code)),ks=$t(ks,ar=>$et.has(ar.code))),Xi(it,!Vn,!!ei,Pr,ks,mn?it.jsDocDiagnostics:void 0)})}function Xi(it,yt,ei,...Pi){var nn;const Vn=Dr(Pi);if(!yt||!((nn=it.commentDirectives)!=null&&nn.length))return Vn;const{diagnostics:mn,directives:Pr}=Mr(it,it.commentDirectives,Vn);if(ei)return mn;for(const ks of Pr.getUnusedExpectations())mn.push(cTe(it,ks.range,k.Unused_ts_expect_error_directive));return mn}function Mr(it,yt,ei){const Pi=G2e(it,yt);return{diagnostics:ei.filter(Vn=>Ks(Vn,Pi)===-1),directives:Pi}}function ds(it,yt){return ci(()=>go().getSuggestionDiagnostics(it,yt))}function Ks(it,yt){const{file:ei,start:Pi}=it;if(!ei)return-1;const nn=Lv(ei);let Vn=P6(nn,Pi).line-1;for(;Vn>=0;){if(yt.markUsed(Vn))return Vn;const mn=ei.text.slice(nn[Vn],nn[Vn+1]).trim();if(mn!==""&&!/^\s*\/\/.*$/.test(mn))return-1;Vn--}return-1}function Ic(it){return ci(()=>{const yt=[];return ei(it,it),QP(it,ei,Pi),yt;function ei(Pr,ks){switch(ks.kind){case 169:case 172:case 174:if(ks.questionToken===Pr)return yt.push(mn(Pr,k.The_0_modifier_can_only_be_used_in_TypeScript_files,"?")),"skip";case 173:case 176:case 177:case 178:case 218:case 262:case 219:case 260:if(ks.type===Pr)return yt.push(mn(Pr,k.Type_annotations_can_only_be_used_in_TypeScript_files)),"skip"}switch(Pr.kind){case 273:if(Pr.isTypeOnly)return yt.push(mn(ks,k._0_declarations_can_only_be_used_in_TypeScript_files,"import type")),"skip";break;case 278:if(Pr.isTypeOnly)return yt.push(mn(Pr,k._0_declarations_can_only_be_used_in_TypeScript_files,"export type")),"skip";break;case 276:case 281:if(Pr.isTypeOnly)return yt.push(mn(Pr,k._0_declarations_can_only_be_used_in_TypeScript_files,l_(Pr)?"import...type":"export...type")),"skip";break;case 271:return yt.push(mn(Pr,k.import_can_only_be_used_in_TypeScript_files)),"skip";case 277:if(Pr.isExportEquals)return yt.push(mn(Pr,k.export_can_only_be_used_in_TypeScript_files)),"skip";break;case 298:if(Pr.token===119)return yt.push(mn(Pr,k.implements_clauses_can_only_be_used_in_TypeScript_files)),"skip";break;case 264:const Ns=xa(120);return j.assertIsDefined(Ns),yt.push(mn(Pr,k._0_declarations_can_only_be_used_in_TypeScript_files,Ns)),"skip";case 267:const cr=Pr.flags&32?xa(145):xa(144);return j.assertIsDefined(cr),yt.push(mn(Pr,k._0_declarations_can_only_be_used_in_TypeScript_files,cr)),"skip";case 265:return yt.push(mn(Pr,k.Type_aliases_can_only_be_used_in_TypeScript_files)),"skip";case 176:case 174:case 262:return Pr.body?void 0:(yt.push(mn(Pr,k.Signature_declarations_can_only_be_used_in_TypeScript_files)),"skip");case 266:const Go=j.checkDefined(xa(94));return yt.push(mn(Pr,k._0_declarations_can_only_be_used_in_TypeScript_files,Go)),"skip";case 235:return yt.push(mn(Pr,k.Non_null_assertions_can_only_be_used_in_TypeScript_files)),"skip";case 234:return yt.push(mn(Pr.type,k.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)),"skip";case 238:return yt.push(mn(Pr.type,k.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files)),"skip";case 216:j.fail()}}function Pi(Pr,ks){if(Fle(ks)){const ar=Fe(ks.modifiers,Fd);ar&&yt.push(mn(ar,k.Decorators_are_not_valid_here))}else if(uD(ks)&&ks.modifiers){const ar=ct(ks.modifiers,Fd);if(ar>=0){if($s(ks)&&!de.experimentalDecorators)yt.push(mn(ks.modifiers[ar],k.Decorators_are_not_valid_here));else if(hd(ks)){const Ns=ct(ks.modifiers,BP);if(Ns>=0){const cr=ct(ks.modifiers,yX);if(ar>Ns&&cr>=0&&ar<cr)yt.push(mn(ks.modifiers[ar],k.Decorators_are_not_valid_here));else if(Ns>=0&&ar<Ns){const Go=ct(ks.modifiers,Fd,Ns);Go>=0&&yt.push(da(mn(ks.modifiers[Go],k.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export),mn(ks.modifiers[ar],k.Decorator_used_before_export_here)))}}}}}switch(ks.kind){case 263:case 231:case 174:case 176:case 177:case 178:case 218:case 262:case 219:if(Pr===ks.typeParameters)return yt.push(Vn(Pr,k.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)),"skip";case 243:if(Pr===ks.modifiers)return nn(ks.modifiers,ks.kind===243),"skip";break;case 172:if(Pr===ks.modifiers){for(const ar of Pr)Fa(ar)&&ar.kind!==126&&ar.kind!==129&&yt.push(mn(ar,k.The_0_modifier_can_only_be_used_in_TypeScript_files,xa(ar.kind)));return"skip"}break;case 169:if(Pr===ks.modifiers&&Ft(Pr,Fa))return yt.push(Vn(Pr,k.Parameter_modifiers_can_only_be_used_in_TypeScript_files)),"skip";break;case 213:case 214:case 233:case 285:case 286:case 215:if(Pr===ks.typeArguments)return yt.push(Vn(Pr,k.Type_arguments_can_only_be_used_in_TypeScript_files)),"skip";break}}function nn(Pr,ks){for(const ar of Pr)switch(ar.kind){case 87:if(ks)continue;case 125:case 123:case 124:case 148:case 138:case 128:case 164:case 103:case 147:yt.push(mn(ar,k.The_0_modifier_can_only_be_used_in_TypeScript_files,xa(ar.kind)));break;case 126:case 95:case 90:case 129:}}function Vn(Pr,ks,...ar){const Ns=Pr.pos;return Md(it,Ns,Pr.end-Ns,ks,...ar)}function mn(Pr,ks,...ar){return jm(it,Pr,ks,...ar)}})}function Gl(it,yt){let ei=$e==null?void 0:$e.get(it.path);return ei||($e??($e=new Map)).set(it.path,ei=Pu(it,yt)),ei}function Pu(it,yt){return ci(()=>{const ei=go().getEmitResolver(it,yt);return hLe(Zc(Tc),ei,it)||w})}function Ku(it,yt){return it.isDeclarationFile?w:Gl(it,yt)}function Xu(){return O6(Js(le().getGlobalDiagnostics(),Wl()))}function Wl(){if(!de.configFile)return w;let it=le().getDiagnostics(de.configFile.fileName);return F_(yt=>{it=Js(it,le().getDiagnostics(yt.sourceFile.fileName))}),it}function Cu(){return pe.length?O6(go().getGlobalDiagnostics().slice()):w}function gm(){return ue||w}function Qu(it,yt,ei,Pi){sc(ca(it),yt,ei,void 0,Pi)}function kd(it,yt){return it.fileName===yt.fileName}function eg(it,yt){return it.kind===80?yt.kind===80&&it.escapedText===yt.escapedText:yt.kind===11&&it.text===yt.text}function Ye(it,yt){const ei=G.createStringLiteral(it),Pi=G.createImportDeclaration(void 0,void 0,ei);return AP(Pi,2),_c(ei,Pi),_c(Pi,yt),ei.flags&=-17,Pi.flags&=-17,ei}function li(it){if(it.imports)return;const yt=r_(it),ei=wd(it);let Pi,nn,Vn;if(yt||!it.isDeclarationFile&&(Ag(de)||wd(it))){de.importHelpers&&(Pi=[Ye(jk,it)]);const ar=HK(VK(de,it),de);ar&&(Pi||(Pi=[])).push(Ye(ar,it))}for(const ar of it.statements)mn(ar,!1);(it.flags&4194304||yt)&&Pr(it),it.imports=Pi||w,it.moduleAugmentations=nn||w,it.ambientModuleNames=Vn||w;return;function mn(ar,Ns){if(ZW(ar)){const cr=fP(ar);cr&&Ha(cr)&&cr.text&&(!Ns||!Gd(cr.text))&&(Qb(ar,!1),Pi=fn(Pi,cr),!pt&&_i===0&&!it.isDeclarationFile&&(pt=so(cr.text,"node:")))}else if(rd(ar)&&Vh(ar)&&(Ns||Zr(ar,128)||it.isDeclarationFile)){ar.name.parent=ar;const cr=Lg(ar.name);if(ei||Ns&&!Gd(cr))(nn||(nn=[])).push(ar.name);else if(!Ns){it.isDeclarationFile&&(Vn||(Vn=[])).push(cr);const Go=ar.body;if(Go)for(const ll of Go.statements)mn(ll,!0)}}}function Pr(ar){const Ns=/import|require/g;for(;Ns.exec(ar.text)!==null;){const cr=ks(ar,Ns.lastIndex);if(yt&&L_(cr,!0))Qb(cr,!1),Pi=fn(Pi,cr.arguments[0]);else if(zp(cr)&&cr.arguments.length>=1&&Bc(cr.arguments[0]))Qb(cr,!1),Pi=fn(Pi,cr.arguments[0]);else if(lS(cr))Qb(cr,!1),Pi=fn(Pi,cr.argument.literal);else if(yt&&q1(cr)){const Go=fP(cr);Go&&Ha(Go)&&Go.text&&(Qb(cr,!1),Pi=fn(Pi,Go))}}}function ks(ar,Ns){let cr=ar;const Go=ll=>{if(ll.pos<=Ns&&(Ns<ll.end||Ns===ll.end&&ll.kind===1))return ll};for(;;){const ll=yt&&jp(cr)&&O(cr.jsDoc,Go)||Uo(cr,Go);if(!ll)return cr;cr=ll}}}function En(it){var yt;const ei=qet(it),Pi=ei&&((yt=wt==null?void 0:wt.get(ei))==null?void 0:yt.actual);return Pi!==void 0?tc(Pi):void 0}function po(it,yt){return ic(lde(yt.fileName,it.fileName),tc)}function ic(it,yt,ei,Pi){if(N6(it)){const nn=pn.getCanonicalFileName(it);if(!de.allowNonTsExtensions&&!O(Dr(yi),mn=>Xl(nn,mn))){ei&&(Uv(nn)?ei(k.File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option,it):ei(k.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1,it,"'"+Dr(at).join("', '")+"'"));return}const Vn=yt(it);if(ei)if(Vn)_2(Pi)&&nn===pn.getCanonicalFileName(ki(Pi.file).fileName)&&ei(k.A_file_cannot_have_a_reference_to_itself);else{const mn=ym(it);mn?ei(k.Output_file_0_has_not_been_built_from_source_file_1,mn,it):ei(k.File_0_not_found,it)}return Vn}else{const nn=de.allowNonTsExtensions&&yt(it);if(nn)return nn;if(ei&&de.allowNonTsExtensions){ei(k.File_0_not_found,it);return}const Vn=O(at[0],mn=>yt(it+mn));return ei&&!Vn&&ei(k.Could_not_resolve_the_path_0_with_the_extensions_Colon_1,it,"'"+Dr(at).join("', '")+"'"),Vn}}function sc(it,yt,ei,Pi,nn){ic(it,Vn=>Pc(Vn,yt,ei,nn,Pi),(Vn,...mn)=>uc(void 0,nn,Vn,mn),nn)}function Hu(it,yt){return sc(it,!1,!1,void 0,yt)}function Hd(it,yt,ei){!_2(ei)&&Ft(He.get(yt.path),_2)?uc(yt,ei,k.Already_included_file_name_0_differs_from_file_name_1_only_in_casing,[yt.fileName,it]):uc(yt,ei,k.File_name_0_differs_from_already_included_file_name_1_only_in_casing,[it,yt.fileName])}function Yc(it,yt,ei,Pi,nn,Vn,mn){var Pr;const ks=l2.createRedirectedSourceFile({redirectTarget:it,unredirected:yt});return ks.fileName=ei,ks.path=Pi,ks.resolvedPath=nn,ks.originalFileName=Vn,ks.packageJsonLocations=(Pr=mn.packageJsonLocations)!=null&&Pr.length?mn.packageJsonLocations:void 0,ks.packageJsonScope=mn.packageJsonScope,On.set(Pi,_i>0),ks}function Pc(it,yt,ei,Pi,nn){var Vn,mn;(Vn=Zn)==null||Vn.push(Zn.Phase.Program,"findSourceFile",{fileName:it,isDefaultLib:yt||void 0,fileIncludeKind:_oe[Pi.kind]});const Pr=Ap(it,yt,ei,Pi,nn);return(mn=Zn)==null||mn.pop(),Pr}function od(it,yt,ei,Pi){const nn=BQ(wo(it,Zs),yt==null?void 0:yt.getPackageJsonInfoCache(),ei,Pi),Vn=Ja(Pi),mn=$V(Pi);return typeof nn=="object"?{...nn,languageVersion:Vn,setExternalModuleIndicator:mn,jsDocParsingMode:ei.jsDocParsingMode}:{languageVersion:Vn,impliedNodeFormat:nn,setExternalModuleIndicator:mn,jsDocParsingMode:ei.jsDocParsingMode}}function Ap(it,yt,ei,Pi,nn){var Vn;const mn=cn(it);if(ii){let cr=jd(mn);if(!cr&&pn.realpath&&de.preserveSymlinks&&df(it)&&it.includes(Xv)){const Go=cn(pn.realpath(it));Go!==mn&&(cr=jd(Go))}if(cr){const Go=Oo(cr)?Pc(cr,yt,ei,Pi,nn):void 0;return Go&&Y_(Go,mn,it,void 0),Go}}const Pr=it;if(Se.has(mn)){const cr=Se.get(mn),Go=Vg(cr||void 0,Pi,!0);if(cr&&Go&&de.forceConsistentCasingInFileNames!==!1){const ll=cr.fileName;cn(ll)!==cn(it)&&(it=ym(it)||it);const qg=Poe(ll,Zs),$h=Poe(it,Zs);qg!==$h&&Hd(it,cr,Pi)}return cr&&On.get(cr.path)&&_i===0?(On.set(cr.path,!1),de.noResolve||(Yv(cr,yt),vm(cr)),de.noLib||Wn(cr),Fi.set(cr.path,!1),ps(cr)):cr&&Fi.get(cr.path)&&_i<Pn&&(Fi.set(cr.path,!1),ps(cr)),cr||void 0}let ks;if(!ii){const cr=tg(it);if(cr){if(cr.commandLine.options.outFile)return;const Go=Zv(cr,it);it=Go,ks=cn(Go)}}const ar=od(it,Xr,pn,de),Ns=pn.getSourceFile(it,ar,cr=>uc(void 0,Pi,k.Cannot_read_file_0_Colon_1,[it,cr]),te);if(nn){const cr=zk(nn),Go=St.get(cr);if(Go){const ll=Yc(Go,Ns,it,mn,cn(it),Pr,ar);return xe.add(Go.path,it),Y_(ll,mn,it,ks),Vg(ll,Pi,!1),ri.set(mn,NG(nn)),Te.push(ll),ll}else Ns&&(St.set(cr,Ns),ri.set(mn,NG(nn)))}if(Y_(Ns,mn,it,ks),Ns){if(On.set(mn,_i>0),Ns.fileName=it,Ns.path=mn,Ns.resolvedPath=cn(it),Ns.originalFileName=Pr,Ns.packageJsonLocations=(Vn=ar.packageJsonLocations)!=null&&Vn.length?ar.packageJsonLocations:void 0,Ns.packageJsonScope=ar.packageJsonScope,Vg(Ns,Pi,!1),pn.useCaseSensitiveFileNames()){const cr=Vw(mn),Go=gt.get(cr);Go?Hd(it,Go,Pi):gt.set(cr,Ns)}Fs=Fs||Ns.hasNoDefaultLib&&!ei,de.noResolve||(Yv(Ns,yt),vm(Ns)),de.noLib||Wn(Ns),ps(Ns),yt?ke.push(Ns):Te.push(Ns),(Pe??(Pe=new Set)).add(Ns.path)}return Ns}function Vg(it,yt,ei){return it&&(!ei||!_2(yt)||!(Pe!=null&&Pe.has(yt.file)))?(He.add(it.path,yt),!0):!1}function Y_(it,yt,ei,Pi){Pi?(Jp(ei,Pi,it),Jp(ei,yt,it||!1)):Jp(ei,yt,it)}function Jp(it,yt,ei){Se.set(yt,ei),ei!==void 0?Ze.delete(yt):Ze.set(yt,it)}function ym(it){const yt=tg(it);return yt&&Zv(yt,it)}function tg(it){if(!(!Dt||!Dt.length||df(it)||Xl(it,".json")))return Hg(it)}function Zv(it,yt){const ei=it.commandLine.options.outFile;return ei?cx(ei,".d.ts"):j3(yt,it.commandLine,!pn.useCaseSensitiveFileNames())}function Hg(it){Rt===void 0&&(Rt=new Map,F_(ei=>{cn(de.configFilePath)!==ei.sourceFile.path&&ei.commandLine.fileNames.forEach(Pi=>Rt.set(cn(Pi),ei.sourceFile.path))}));const yt=Rt.get(cn(it));return yt&&h_(yt)}function F_(it){return yde(Dt,it)}function jd(it){if(df(it))return Ct===void 0&&(Ct=new Map,F_(yt=>{const ei=yt.commandLine.options.outFile;if(ei){const Pi=cx(ei,".d.ts");Ct.set(cn(Pi),!0)}else{const Pi=Bh(()=>oA(yt.commandLine,!pn.useCaseSensitiveFileNames()));O(yt.commandLine.fileNames,nn=>{if(!df(nn)&&!Xl(nn,".json")){const Vn=j3(nn,yt.commandLine,!pn.useCaseSensitiveFileNames(),Pi);Ct.set(cn(Vn),nn)}})}})),Ct.get(it)}function lC(it){return ii&&!!Hg(it)}function h_(it){if(Je)return Je.get(it)||void 0}function Yv(it,yt){O(it.referencedFiles,(ei,Pi)=>{sc(lde(ei.fileName,it.fileName),yt,!1,void 0,{kind:4,file:it.path,index:Pi})})}function vm(it){const yt=it.typeReferenceDirectives;if(!yt.length)return;const ei=(tn==null?void 0:tn.get(it.path))||$o(yt,it),Pi=M3();(Ei??(Ei=new Map)).set(it.path,Pi);for(let nn=0;nn<yt.length;nn++){const Vn=it.typeReferenceDirectives[nn],mn=ei[nn],Pr=Vn.fileName;Pi.set(Pr,AQ(Vn,it.impliedNodeFormat),mn);const ks=Vn.resolutionMode||Jy(it);Ot(Pr,ks,mn,{kind:5,file:it.path,index:nn})}}function ve(it){var yt;return((yt=Xn(it))==null?void 0:yt.commandLine.options)||de}function Ot(it,yt,ei,Pi){var nn,Vn;(nn=Zn)==null||nn.push(Zn.Phase.Program,"processTypeReferenceDirective",{directive:it,hasResolved:!!ei.resolvedTypeReferenceDirective,refKind:Pi.kind,refPath:_2(Pi)?Pi.file:void 0}),mi(it,yt,ei,Pi),(Vn=Zn)==null||Vn.pop()}function mi(it,yt,ei,Pi){fi(ei);const{resolvedTypeReferenceDirective:nn}=ei;nn?(nn.isExternalLibraryImport&&_i++,sc(nn.resolvedFileName,!1,!1,nn.packageId,Pi),nn.isExternalLibraryImport&&_i--):uc(void 0,Pi,k.Cannot_find_type_definition_file_for_0,[it])}function Ci(it){const yt=wt==null?void 0:wt.get(it);if(yt)return yt.actual;const ei=hn(it);return(wt??(wt=new Map)).set(it,ei),ei.actual}function hn(it){var yt,ei,Pi,nn,Vn;const mn=Et==null?void 0:Et.get(it);if(mn)return mn;if(tt!==0&&he&&!Ji(it)){const cr=(yt=he.resolvedLibReferences)==null?void 0:yt.get(it);if(cr){if(cr.resolution&&mx(de,pn)){const Go=vde(it),ll=FQ(de,Zs,it);bo(pn,cr.resolution.resolvedModule?cr.resolution.resolvedModule.packageId?k.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:k.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:k.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved,Go,wo(ll,Zs),(ei=cr.resolution.resolvedModule)==null?void 0:ei.resolvedFileName,((Pi=cr.resolution.resolvedModule)==null?void 0:Pi.packageId)&&zk(cr.resolution.resolvedModule.packageId))}return(Et??(Et=new Map)).set(it,cr),cr}}const Pr=vde(it),ks=FQ(de,Zs,it);(nn=Zn)==null||nn.push(Zn.Phase.Program,"resolveLibrary",{resolveFrom:ks}),ou("beforeResolveLibrary");const ar=ac(Pr,ks,de,it);ou("afterResolveLibrary"),Wm("ResolveLibrary","beforeResolveLibrary","afterResolveLibrary"),(Vn=Zn)==null||Vn.pop();const Ns={resolution:ar,actual:ar.resolvedModule?ar.resolvedModule.resolvedFileName:zr(ls,it)};return(Et??(Et=new Map)).set(it,Ns),Ns}function Wn(it){O(it.libReferenceDirectives,(yt,ei)=>{const Pi=qet(yt);Pi?Qu(Ci(Pi),!0,!0,{kind:7,file:it.path,index:ei}):(et||(et=[])).push({kind:0,reason:{kind:7,file:it.path,index:ei}})})}function Lr(it){return pn.getCanonicalFileName(it)}function ps(it){if(li(it),it.imports.length||it.moduleAugmentations.length){const yt=Get(it),ei=(zt==null?void 0:zt.get(it.path))||Wo(yt,it);j.assert(ei.length===yt.length);const Pi=ve(it),nn=M3();(dt??(dt=new Map)).set(it.path,nn);for(let Vn=0;Vn<yt.length;Vn++){const mn=ei[Vn].resolvedModule,Pr=yt[Vn].text,ks=mde(it,yt[Vn],Pi);if(nn.set(Pr,ks,ei[Vn]),wi(it,Pr,ei[Vn],ks),!mn)continue;const ar=mn.isExternalLibraryImport,Ns=!t7(mn.extension)&&!tg(mn.resolvedFileName),cr=ar&&Ns&&(!mn.originalPath||yx(mn.resolvedFileName)),Go=mn.resolvedFileName;ar&&_i++;const ll=cr&&_i>Pn,qh=Go&&!wde(Pi,mn,it)&&!Pi.noResolve&&Vn<it.imports.length&&!ll&&!(Ns&&!ox(Pi))&&(nr(it.imports[Vn])||!(it.imports[Vn].flags&16777216));ll?Fi.set(it.path,!0):qh&&Pc(Go,!1,!1,{kind:3,file:it.path,index:Vn},mn.packageId),ar&&_i--}}}function ee(it,yt){let ei=!0;const Pi=pn.getCanonicalFileName(wo(yt,Zs));for(const nn of it)nn.isDeclarationFile||pn.getCanonicalFileName(wo(nn.fileName,Zs)).indexOf(Pi)!==0&&(Xa(nn,k.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files,[nn.fileName,yt]),ei=!1);return ei}function Xe(it){Je||(Je=new Map);const yt=q3(it),ei=cn(yt),Pi=Je.get(ei);if(Pi!==void 0)return Pi||void 0;let nn,Vn;if(pn.getParsedCommandLine){if(nn=pn.getParsedCommandLine(yt),!nn){Y_(void 0,ei,yt,void 0),Je.set(ei,!1);return}Vn=j.checkDefined(nn.options.configFile),j.assert(!Vn.path||Vn.path===ei),Y_(Vn,ei,yt,void 0)}else{const Pr=wo(ts(yt),Zs);if(Vn=pn.getSourceFile(yt,100),Y_(Vn,ei,yt,void 0),Vn===void 0){Je.set(ei,!1);return}nn=PH(Vn,qr,Pr,void 0,yt)}Vn.fileName=yt,Vn.path=ei,Vn.resolvedPath=ei,Vn.originalFileName=yt;const mn={commandLine:nn,sourceFile:Vn};return Je.set(ei,mn),nn.projectReferences&&(mn.references=nn.projectReferences.map(Xe)),mn}function Zt(){de.strictPropertyInitialization&&!ah(de,"strictNullChecks")&&Vl(k.Option_0_cannot_be_specified_without_specifying_option_1,"strictPropertyInitialization","strictNullChecks"),de.exactOptionalPropertyTypes&&!ah(de,"strictNullChecks")&&Vl(k.Option_0_cannot_be_specified_without_specifying_option_1,"exactOptionalPropertyTypes","strictNullChecks"),(de.isolatedModules||de.verbatimModuleSyntax)&&de.outFile&&Vl(k.Option_0_cannot_be_specified_with_option_1,"outFile",de.verbatimModuleSyntax?"verbatimModuleSyntax":"isolatedModules"),de.isolatedDeclarations&&(ox(de)&&Vl(k.Option_0_cannot_be_specified_with_option_1,"allowJs","isolatedDeclarations"),Q_(de)||Vl(k.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"isolatedDeclarations","declaration","composite")),de.inlineSourceMap&&(de.sourceMap&&Vl(k.Option_0_cannot_be_specified_with_option_1,"sourceMap","inlineSourceMap"),de.mapRoot&&Vl(k.Option_0_cannot_be_specified_with_option_1,"mapRoot","inlineSourceMap")),de.composite&&(de.declaration===!1&&Vl(k.Composite_projects_may_not_disable_declaration_emit,"declaration"),de.incremental===!1&&Vl(k.Composite_projects_may_not_disable_incremental_compilation,"declaration"));const it=de.outFile;if(!de.tsBuildInfoFile&&de.incremental&&!it&&!de.configFilePath&&Qs.add(Zl(k.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)),Qo(),h0(),de.composite){const mn=new Set(pe.map(cn));for(const Pr of De)SI(Pr,Gt)&&!mn.has(Pr.path)&&Xa(Pr,k.File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern,[Pr.fileName,de.configFilePath||""])}if(de.paths){for(const mn in de.paths)if(Li(de.paths,mn))if(Ace(mn)||eb(!0,mn,k.Pattern_0_can_have_at_most_one_Asterisk_character,mn),Ao(de.paths[mn])){const Pr=de.paths[mn].length;Pr===0&&eb(!1,mn,k.Substitutions_for_pattern_0_shouldn_t_be_an_empty_array,mn);for(let ks=0;ks<Pr;ks++){const ar=de.paths[mn][ks],Ns=typeof ar;Ns==="string"?(Ace(ar)||K0(mn,ks,k.Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character,ar,mn),!de.baseUrl&&!am(ar)&&!r8(ar)&&K0(mn,ks,k.Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash)):K0(mn,ks,k.Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2,ar,mn,Ns)}}else eb(!1,mn,k.Substitutions_for_pattern_0_should_be_an_array,mn)}!de.sourceMap&&!de.inlineSourceMap&&(de.inlineSources&&Vl(k.Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided,"inlineSources"),de.sourceRoot&&Vl(k.Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided,"sourceRoot")),de.mapRoot&&!(de.sourceMap||de.declarationMap)&&Vl(k.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"mapRoot","sourceMap","declarationMap"),de.declarationDir&&(Q_(de)||Vl(k.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"declarationDir","declaration","composite"),it&&Vl(k.Option_0_cannot_be_specified_with_option_1,"declarationDir","outFile")),de.declarationMap&&!Q_(de)&&Vl(k.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"declarationMap","declaration","composite"),de.lib&&de.noLib&&Vl(k.Option_0_cannot_be_specified_with_option_1,"lib","noLib");const yt=Ja(de),ei=Fe(De,mn=>wd(mn)&&!mn.isDeclarationFile);if(de.isolatedModules||de.verbatimModuleSyntax)de.module===0&&yt<2&&de.isolatedModules&&Vl(k.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher,"isolatedModules","target"),de.preserveConstEnums===!1&&Vl(k.Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled,de.verbatimModuleSyntax?"verbatimModuleSyntax":"isolatedModules","preserveConstEnums");else if(ei&&yt<2&&de.module===0){const mn=pI(ei,typeof ei.externalModuleIndicator=="boolean"?ei:ei.externalModuleIndicator);Qs.add(Md(ei,mn.start,mn.length,k.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none))}if(it&&!de.emitDeclarationOnly){if(de.module&&!(de.module===2||de.module===4))Vl(k.Only_amd_and_system_modules_are_supported_alongside_0,"outFile","module");else if(de.module===void 0&&ei){const mn=pI(ei,typeof ei.externalModuleIndicator=="boolean"?ei:ei.externalModuleIndicator);Qs.add(Md(ei,mn.start,mn.length,k.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system,"outFile"))}}if(XT(de)&&(yh(de)===1?Vl(k.Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic,"resolveJsonModule"):RK(de)||Vl(k.Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd,"resolveJsonModule","module")),de.outDir||de.rootDir||de.sourceRoot||de.mapRoot||Q_(de)&&de.declarationDir){const mn=vi();de.outDir&&mn===""&&De.some(Pr=>Ly(Pr.fileName)>1)&&Vl(k.Cannot_find_the_common_subdirectory_path_for_the_input_files,"outDir")}de.checkJs&&!ox(de)&&Vl(k.Option_0_cannot_be_specified_without_specifying_option_1,"checkJs","allowJs"),de.emitDeclarationOnly&&(Q_(de)||Vl(k.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"emitDeclarationOnly","declaration","composite")),de.emitDecoratorMetadata&&!de.experimentalDecorators&&Vl(k.Option_0_cannot_be_specified_without_specifying_option_1,"emitDecoratorMetadata","experimentalDecorators"),de.jsxFactory?(de.reactNamespace&&Vl(k.Option_0_cannot_be_specified_with_option_1,"reactNamespace","jsxFactory"),(de.jsx===4||de.jsx===5)&&Vl(k.Option_0_cannot_be_specified_when_option_jsx_is_1,"jsxFactory",DH.get(""+de.jsx)),YP(de.jsxFactory,yt)||Gp("jsxFactory",k.Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name,de.jsxFactory)):de.reactNamespace&&!J_(de.reactNamespace,yt)&&Gp("reactNamespace",k.Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier,de.reactNamespace),de.jsxFragmentFactory&&(de.jsxFactory||Vl(k.Option_0_cannot_be_specified_without_specifying_option_1,"jsxFragmentFactory","jsxFactory"),(de.jsx===4||de.jsx===5)&&Vl(k.Option_0_cannot_be_specified_when_option_jsx_is_1,"jsxFragmentFactory",DH.get(""+de.jsx)),YP(de.jsxFragmentFactory,yt)||Gp("jsxFragmentFactory",k.Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name,de.jsxFragmentFactory)),de.reactNamespace&&(de.jsx===4||de.jsx===5)&&Vl(k.Option_0_cannot_be_specified_when_option_jsx_is_1,"reactNamespace",DH.get(""+de.jsx)),de.jsxImportSource&&de.jsx===2&&Vl(k.Option_0_cannot_be_specified_when_option_jsx_is_1,"jsxImportSource",DH.get(""+de.jsx));const Pi=zh(de);de.verbatimModuleSyntax&&(Pi===2||Pi===3||Pi===4)&&Vl(k.Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System,"verbatimModuleSyntax"),de.allowImportingTsExtensions&&!(de.noEmit||de.emitDeclarationOnly)&&Gp("allowImportingTsExtensions",k.Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set);const nn=yh(de);if(de.resolvePackageJsonExports&&!f3(nn)&&Vl(k.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler,"resolvePackageJsonExports"),de.resolvePackageJsonImports&&!f3(nn)&&Vl(k.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler,"resolvePackageJsonImports"),de.customConditions&&!f3(nn)&&Vl(k.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler,"customConditions"),nn===100&&!KV(Pi)&&Pi!==200&&Gp("moduleResolution",k.Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later,"bundler"),bW[Pi]&&100<=Pi&&Pi<=199&&!(3<=nn&&nn<=99)){const mn=bW[Pi];Gp("moduleResolution",k.Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1,mn,mn)}else if(i8[nn]&&3<=nn&&nn<=99&&!(100<=Pi&&Pi<=199)){const mn=i8[nn];Gp("module",k.Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1,mn,mn)}if(!de.noEmit&&!de.suppressOutputPathCheck){const mn=Zc(),Pr=new Set;Que(mn,ks=>{de.emitDeclarationOnly||Vn(ks.jsFilePath,Pr),Vn(ks.declarationFilePath,Pr)})}function Vn(mn,Pr){if(mn){const ks=cn(mn);if(Se.has(ks)){let Ns;de.configFilePath||(Ns=jo(void 0,k.Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig)),Ns=jo(Ns,k.Cannot_write_file_0_because_it_would_overwrite_input_file,mn),AS(mn,PK(Ns))}const ar=pn.useCaseSensitiveFileNames()?ks:Vw(ks);Pr.has(ar)?AS(mn,Zl(k.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files,mn)):Pr.add(ar)}}}function Nn(){const it=de.ignoreDeprecations;if(it){if(it==="5.0")return new P0(it);Ae()}return P0.zero}function Is(it,yt,ei,Pi){const nn=new P0(it),Vn=new P0(yt),mn=new P0(we||m),Pr=Nn(),ks=Vn.compareTo(mn)!==1,ar=!ks&&Pr.compareTo(nn)===-1;(ks||ar)&&Pi((Ns,cr,Go)=>{ks?cr===void 0?ei(Ns,cr,Go,k.Option_0_has_been_removed_Please_remove_it_from_your_configuration,Ns):ei(Ns,cr,Go,k.Option_0_1_has_been_removed_Please_remove_it_from_your_configuration,Ns,cr):cr===void 0?ei(Ns,cr,Go,k.Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error,Ns,yt,it):ei(Ns,cr,Go,k.Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error,Ns,cr,yt,it)})}function Qo(){function it(yt,ei,Pi,nn,...Vn){if(Pi){const mn=jo(void 0,k.Use_0_instead,Pi),Pr=jo(mn,nn,...Vn);X0(!ei,yt,void 0,Pr)}else X0(!ei,yt,void 0,nn,...Vn)}Is("5.0","5.5",it,yt=>{de.target===0&&yt("target","ES3"),de.noImplicitUseStrict&&yt("noImplicitUseStrict"),de.keyofStringsOnly&&yt("keyofStringsOnly"),de.suppressExcessPropertyErrors&&yt("suppressExcessPropertyErrors"),de.suppressImplicitAnyIndexErrors&&yt("suppressImplicitAnyIndexErrors"),de.noStrictGenericChecks&&yt("noStrictGenericChecks"),de.charset&&yt("charset"),de.out&&yt("out",void 0,"outFile"),de.importsNotUsedAsValues&&yt("importsNotUsedAsValues",void 0,"verbatimModuleSyntax"),de.preserveValueImports&&yt("preserveValueImports",void 0,"verbatimModuleSyntax")})}function To(it,yt,ei){function Pi(nn,Vn,mn,Pr,...ks){ep(yt,ei,Pr,...ks)}Is("5.0","5.5",Pi,nn=>{it.prepend&&nn("prepend")})}function Zo(it,yt,ei,Pi){let nn;const Vn=it&&He.get(it.path);let mn,Pr,ks=_2(yt)?yt:void 0,ar,Ns,cr=it&&(We==null?void 0:We.get(it.path)),Go;cr?(cr.fileIncludeReasonDetails?(nn=new Set(Vn),Vn==null||Vn.forEach($h)):Vn==null||Vn.forEach(qg),Ns=cr.redirectInfo):(Vn==null||Vn.forEach(qg),Ns=it&&Wde(it,ve(it))),yt&&qg(yt);const ll=(nn==null?void 0:nn.size)!==(Vn==null?void 0:Vn.length);ks&&(nn==null?void 0:nn.size)===1&&(nn=void 0),nn&&cr&&(cr.details&&!ll?Go=jo(cr.details,ei,...Pi||w):cr.fileIncludeReasonDetails&&(ll?$g()?mn=fn(cr.fileIncludeReasonDetails.next.slice(0,Vn.length),mn[0]):mn=[...cr.fileIncludeReasonDetails.next,mn[0]]:$g()?mn=cr.fileIncludeReasonDetails.next.slice(0,Vn.length):ar=cr.fileIncludeReasonDetails)),Go||(ar||(ar=nn&&jo(mn,k.The_file_is_in_the_program_because_Colon)),Go=jo(Ns?ar?[ar,...Ns]:Ns:ar,ei,...Pi||w)),it&&(cr?(!cr.fileIncludeReasonDetails||!ll&&ar)&&(cr.fileIncludeReasonDetails=ar):(We??(We=new Map)).set(it.path,cr={fileIncludeReasonDetails:ar,redirectInfo:Ns}),!cr.details&&!ll&&(cr.details=Go.next));const qh=ks&&Y7(Gt,ks);return qh&&U3(qh)?BG(qh.file,qh.pos,qh.end-qh.pos,Go,Pr):PK(Go,Pr);function qg(Jh){nn!=null&&nn.has(Jh)||((nn??(nn=new Set)).add(Jh),(mn??(mn=[])).push(jde(Gt,Jh)),$h(Jh))}function $h(Jh){!ks&&_2(Jh)?ks=Jh:ks!==Jh&&(Pr=fn(Pr,Yl(Jh)))}function $g(){var Jh;return((Jh=cr.fileIncludeReasonDetails.next)==null?void 0:Jh.length)!==(Vn==null?void 0:Vn.length)}}function uc(it,yt,ei,Pi){(et||(et=[])).push({kind:1,file:it&&it.path,fileProcessingReason:yt,diagnostic:ei,args:Pi})}function Xa(it,yt,ei){Mn.push({file:it,diagnostic:yt,args:ei})}function Yl(it){let yt=ze==null?void 0:ze.get(it);return yt===void 0&&(ze??(ze=new Map)).set(it,yt=ig(it)??!1),yt||void 0}function ig(it){if(_2(it)){const Pi=Y7(Gt,it);let nn;switch(it.kind){case 3:nn=k.File_is_included_via_import_here;break;case 4:nn=k.File_is_included_via_reference_here;break;case 5:nn=k.File_is_included_via_type_library_reference_here;break;case 7:nn=k.File_is_included_via_library_reference_here;break;default:j.assertNever(it)}return U3(Pi)?Md(Pi.file,Pi.pos,Pi.end-Pi.pos,nn):void 0}if(!de.configFile)return;let yt,ei;switch(it.kind){case 0:if(!de.configFile.configFileSpecs)return;const Pi=wo(pe[it.index],Zs),nn=Vde(Gt,Pi);if(nn){yt=UG(de.configFile,"files",nn),ei=k.File_is_matched_by_files_list_specified_here;break}const Vn=Hde(Gt,Pi);if(!Vn||!Oo(Vn))return;yt=UG(de.configFile,"include",Vn),ei=k.File_is_matched_by_include_pattern_specified_here;break;case 1:case 2:const mn=j.checkDefined(Dt==null?void 0:Dt[it.index]),Pr=RQ(Ie,Dt,(Go,ll,qh)=>Go===mn?{sourceFile:(ll==null?void 0:ll.sourceFile)||de.configFile,index:qh}:void 0);if(!Pr)return;const{sourceFile:ks,index:ar}=Pr,Ns=sV(ks,"references",Go=>jf(Go.initializer)?Go.initializer:void 0);return Ns&&Ns.elements.length>ar?jm(ks,Ns.elements[ar],it.kind===2?k.File_is_output_from_referenced_project_specified_here:k.File_is_source_from_referenced_project_specified_here):void 0;case 8:if(!de.types)return;yt=rg("types",it.typeReference),ei=k.File_is_entry_point_of_type_library_specified_here;break;case 6:if(it.index!==void 0){yt=rg("lib",de.lib[it.index]),ei=k.File_is_library_specified_here;break}const cr=FK(Ja(de));yt=cr?ng("target",cr):void 0,ei=k.File_is_default_library_for_target_specified_here;break;default:j.assertNever(it)}return yt&&jm(de.configFile,yt,ei)}function h0(){const it=de.suppressOutputPathCheck?void 0:h2(de);RQ(Ie,Dt,(yt,ei,Pi)=>{const nn=(ei?ei.commandLine.projectReferences:Ie)[Pi],Vn=ei&&ei.sourceFile;if(To(nn,Vn,Pi),!yt){ep(Vn,Pi,k.File_0_not_found,nn.path);return}const mn=yt.commandLine.options;(!mn.composite||mn.noEmit)&&(ei?ei.commandLine.fileNames:pe).length&&(mn.composite||ep(Vn,Pi,k.Referenced_project_0_must_have_setting_composite_Colon_true,nn.path),mn.noEmit&&ep(Vn,Pi,k.Referenced_project_0_may_not_disable_emit,nn.path)),!ei&&it&&it===h2(mn)&&(ep(Vn,Pi,k.Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1,it,nn.path),Sn.set(cn(it),!0))})}function K0(it,yt,ei,...Pi){let nn=!0;tb(Vn=>{Aa(Vn.initializer)&&G6(Vn.initializer,it,mn=>{const Pr=mn.initializer;jf(Pr)&&Pr.elements.length>yt&&(Qs.add(jm(de.configFile,Pr.elements[yt],ei,...Pi)),nn=!1)})}),nn&&ib(ei,...Pi)}function eb(it,yt,ei,...Pi){let nn=!0;tb(Vn=>{Aa(Vn.initializer)&&uC(Vn.initializer,it,yt,void 0,ei,...Pi)&&(nn=!1)}),nn&&ib(ei,...Pi)}function PS(it,yt){return G6(jg(),it,yt)}function tb(it){return PS("paths",it)}function ng(it,yt){return PS(it,ei=>Ha(ei.initializer)&&ei.initializer.text===yt?ei.initializer:void 0)}function rg(it,yt){const ei=jg();return ei&&bTe(ei,it,yt)}function Vl(it,yt,ei,Pi){X0(!0,yt,ei,it,yt,ei,Pi)}function Gp(it,yt,...ei){X0(!1,it,void 0,yt,...ei)}function ep(it,yt,ei,...Pi){const nn=sV(it||de.configFile,"references",Vn=>jf(Vn.initializer)?Vn.initializer:void 0);nn&&nn.elements.length>yt?Qs.add(jm(it||de.configFile,nn.elements[yt],ei,...Pi)):Qs.add(Zl(ei,...Pi))}function X0(it,yt,ei,Pi,...nn){const Vn=jg();(!Vn||!uC(Vn,it,yt,ei,Pi,...nn))&&ib(Pi,...nn)}function ib(it,...yt){const ei=$y();ei?"messageText"in it?Qs.add(Bv(de.configFile,ei.name,it)):Qs.add(jm(de.configFile,ei.name,it,...yt)):"messageText"in it?Qs.add(PK(it)):Qs.add(Zl(it,...yt))}function jg(){if(dr===void 0){const it=$y();dr=it&&Jr(it.initializer,Aa)||!1}return dr||void 0}function $y(){return us===void 0&&(us=G6(I8(de.configFile),"compilerOptions",hl)||!1),us||void 0}function uC(it,yt,ei,Pi,nn,...Vn){let mn=!1;return G6(it,ei,Pr=>{"messageText"in nn?Qs.add(Bv(de.configFile,yt?Pr.name:Pr.initializer,nn)):Qs.add(jm(de.configFile,yt?Pr.name:Pr.initializer,nn,...Vn)),mn=!0},Pi),mn}function AS(it,yt){Sn.set(cn(it),!0),Qs.add(yt)}function zg(it){if(de.noEmit)return!1;const yt=cn(it);if(ki(yt))return!1;const ei=de.outFile;if(ei)return x2(yt,ei)||x2(yt,s_(ei)+".d.ts");if(de.declarationDir&&Vm(de.declarationDir,yt,Zs,!pn.useCaseSensitiveFileNames()))return!0;if(de.outDir)return Vm(de.outDir,yt,Zs,!pn.useCaseSensitiveFileNames());if(Ru(yt,h3)||df(yt)){const Pi=s_(yt);return!!ki(Pi+".ts")||!!ki(Pi+".tsx")}return!1}function x2(it,yt){return Hb(it,yt,Zs,!pn.useCaseSensitiveFileNames())===0}function bm(){return pn.getSymlinkCache?pn.getSymlinkCache():(qe||(qe=Oce(Zs,Lr)),De&&!qe.hasProcessedResolutions()&&qe.setSymlinksFromResolutions(hi,vn,ut),qe)}function Ug(it,yt){return mde(it,yt,ve(it))}function dC(it,yt){return Het(it,yt,ve(it))}function k2(it,yt){return Ug(it,ej(it,yt))}function Jy(it){return WQ(it,ve(it))}function nb(it){return jI(it,ve(it))}function T2(it){return e5(it,ve(it))}function xx(it){return Jet(it,ve(it))}}function Jet(t,r){const a=zh(r);return 100<=a&&a<=199||a===200?!1:e5(t,r)<5}function e5(t,r){return jI(t,r)??zh(r)}function jI(t,r){var a,u;const h=zh(r);if(100<=h&&h<=199)return t.impliedNodeFormat;if(t.impliedNodeFormat===1&&(((a=t.packageJsonScope)==null?void 0:a.contents.packageJsonContent.type)==="commonjs"||Ru(t.fileName,[".cjs",".cts"])))return 1;if(t.impliedNodeFormat===99&&(((u=t.packageJsonScope)==null?void 0:u.contents.packageJsonContent.type)==="module"||Ru(t.fileName,[".mjs",".mts"])))return 99}function WQ(t,r){return Lce(r)?jI(t,r):void 0}function d8t(t){let r;const a=t.compilerHost.fileExists,u=t.compilerHost.directoryExists,h=t.compilerHost.getDirectories,p=t.compilerHost.realpath;if(!t.useSourceOfProjectReferenceRedirect)return{onProgramCreateComplete:Tc,fileExists:b};t.compilerHost.fileExists=b;let g;return u&&(g=t.compilerHost.directoryExists=F=>u.call(t.compilerHost,F)?(N(F),!0):t.getResolvedProjectReferences()?(r||(r=new Set,t.forEachResolvedProjectReference(H=>{const U=H.commandLine.options.outFile;if(U)r.add(ts(t.toPath(U)));else{const q=H.commandLine.options.declarationDir||H.commandLine.options.outDir;q&&r.add(t.toPath(q))}})),R(F,!1)):!1),h&&(t.compilerHost.getDirectories=F=>!t.getResolvedProjectReferences()||u&&u.call(t.compilerHost,F)?h.call(t.compilerHost,F):[]),p&&(t.compilerHost.realpath=F=>{var H;return((H=t.getSymlinkCache().getSymlinkedFiles())==null?void 0:H.get(t.toPath(F)))||p.call(t.compilerHost,F)}),{onProgramCreateComplete:C,fileExists:b,directoryExists:g};function C(){t.compilerHost.fileExists=a,t.compilerHost.directoryExists=u,t.compilerHost.getDirectories=h}function b(F){return a.call(t.compilerHost,F)?!0:!t.getResolvedProjectReferences()||!df(F)?!1:R(F,!0)}function T(F){const H=t.getSourceOfProjectReferenceRedirect(t.toPath(F));return H!==void 0?Oo(H)?a.call(t.compilerHost,H):!0:void 0}function E(F){const H=t.toPath(F),U=`${H}${Kl}`;return qb(r,q=>H===q||so(q,U)||so(H,`${q}/`))}function N(F){var H;if(!t.getResolvedProjectReferences()||a7(F)||!p||!F.includes(Xv))return;const U=t.getSymlinkCache(),q=Ad(t.toPath(F));if((H=U.getSymlinkedDirectories())!=null&&H.has(q))return;const X=ca(p.call(t.compilerHost,F));let Z;if(X===F||(Z=Ad(t.toPath(X)))===q){U.setSymlinkedDirectory(q,!1);return}U.setSymlinkedDirectory(F,{real:Ad(X),realPath:Z})}function R(F,H){var U;const q=H?oe=>T(oe):oe=>E(oe),X=q(F);if(X!==void 0)return X;const Z=t.getSymlinkCache(),Q=Z.getSymlinkedDirectories();if(!Q)return!1;const re=t.toPath(F);return re.includes(Xv)?H&&((U=Z.getSymlinkedFiles())!=null&&U.has(re))?!0:Y(Q.entries(),([oe,pe])=>{if(!pe||!so(re,oe))return;const de=q(re.replace(oe,pe.realPath));if(H&&de){const ue=wo(F,t.compilerHost.getCurrentDirectory());Z.setSymlinkedFile(re,`${pe.real}${ue.replace(new RegExp(oe,"i"),"")}`)}return de})||!1:!1}}var Cde={diagnostics:w,sourceMaps:void 0,emittedFiles:void 0,emitSkipped:!0};function Sde(t,r,a,u){const h=t.getCompilerOptions();if(h.noEmit)return r?Cde:t.emitBuildInfo(a,u);if(!h.noEmitOnError)return;let p=[...t.getOptionsDiagnostics(u),...t.getSyntacticDiagnostics(r,u),...t.getGlobalDiagnostics(u),...t.getSemanticDiagnostics(r,u)];if(p.length===0&&Q_(t.getCompilerOptions())&&(p=t.getDeclarationDiagnostics(void 0,u)),!p.length)return;let g;if(!r){const C=t.emitBuildInfo(a,u);C.diagnostics&&(p=[...p,...C.diagnostics]),g=C.emittedFiles}return{diagnostics:p,sourceMaps:void 0,emittedFiles:g,emitSkipped:!0}}function VQ(t,r){return $t(t,a=>!a.skippedOn||!r[a.skippedOn])}function HQ(t,r=t){return{fileExists:a=>r.fileExists(a),readDirectory(a,u,h,p,g){return j.assertIsDefined(r.readDirectory,"'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"),r.readDirectory(a,u,h,p,g)},readFile:a=>r.readFile(a),directoryExists:to(r,r.directoryExists),getDirectories:to(r,r.getDirectories),realpath:to(r,r.realpath),useCaseSensitiveFileNames:t.useCaseSensitiveFileNames(),getCurrentDirectory:()=>t.getCurrentDirectory(),onUnRecoverableConfigFileDiagnostic:t.onUnRecoverableConfigFileDiagnostic||IT,trace:t.trace?a=>t.trace(a):void 0}}function q3(t){return Qde(t.path)}function wde(t,{extension:r},{isDeclarationFile:a}){switch(r){case".ts":case".d.ts":case".mts":case".d.mts":case".cts":case".d.cts":return;case".tsx":return u();case".jsx":return u()||h();case".js":case".mjs":case".cjs":return h();case".json":return p();default:return g()}function u(){return t.jsx?void 0:k.Module_0_was_resolved_to_1_but_jsx_is_not_set}function h(){return ox(t)||!ah(t,"noImplicitAny")?void 0:k.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type}function p(){return XT(t)?void 0:k.Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used}function g(){return a||t.allowArbitraryExtensions?void 0:k.Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set}}function Get({imports:t,moduleAugmentations:r}){const a=t.map(u=>u);for(const u of r)u.kind===11&&a.push(u);return a}function ej({imports:t,moduleAugmentations:r},a){if(a<t.length)return t[a];let u=t.length;for(const h of r)if(h.kind===11){if(a===u)return h;u++}j.fail("should never ask for module name at index higher than possible module name")}function OLe(t,r,a,u,h,p){const g=[],{emitSkipped:C,diagnostics:b}=t.emit(r,T,u,a,h,p);return{outputFiles:g,emitSkipped:C,diagnostics:b};function T(E,N,R){g.push({name:E,writeByteOrderMark:R,text:N})}}var MLe=(t=>(t[t.ComputedDts=0]="ComputedDts",t[t.StoredSignatureAtEmit=1]="StoredSignatureAtEmit",t[t.UsedVersion=2]="UsedVersion",t))(MLe||{}),$0;(t=>{function r(){function we(he,Ae,ke){const Te={getKeys:De=>Ae.get(De),getValues:De=>he.get(De),keys:()=>he.keys(),size:()=>he.size,deleteKey:De=>{(ke||(ke=new Set)).add(De);const qe=he.get(De);return qe?(qe.forEach(se=>u(Ae,se,De)),he.delete(De),!0):!1},set:(De,qe)=>{ke==null||ke.delete(De);const se=he.get(De);return he.set(De,qe),se==null||se.forEach(Ne=>{qe.has(Ne)||u(Ae,Ne,De)}),qe.forEach(Ne=>{se!=null&&se.has(Ne)||a(Ae,Ne,De)}),Te}};return Te}return we(new Map,new Map,void 0)}t.createManyToManyPathMap=r;function a(we,he,Ae){let ke=we.get(he);ke||(ke=new Set,we.set(he,ke)),ke.add(Ae)}function u(we,he,Ae){const ke=we.get(he);return ke!=null&&ke.delete(Ae)?(ke.size||we.delete(he),!0):!1}function h(we){return es(we.declarations,he=>{var Ae;return(Ae=_n(he))==null?void 0:Ae.resolvedPath})}function p(we,he){const Ae=we.getSymbolAtLocation(he);return Ae&&h(Ae)}function g(we,he,Ae,ke){return ol(we.getProjectReferenceRedirect(he)||he,Ae,ke)}function C(we,he,Ae){let ke;if(he.imports&&he.imports.length>0){const se=we.getTypeChecker();for(const Ne of he.imports){const Oe=p(se,Ne);Oe==null||Oe.forEach(qe)}}const Te=ts(he.resolvedPath);if(he.referencedFiles&&he.referencedFiles.length>0)for(const se of he.referencedFiles){const Ne=g(we,se.fileName,Te,Ae);qe(Ne)}if(we.forEachResolvedTypeReferenceDirective(({resolvedTypeReferenceDirective:se})=>{if(!se)return;const Ne=se.resolvedFileName,Oe=g(we,Ne,Te,Ae);qe(Oe)},he),he.moduleAugmentations.length){const se=we.getTypeChecker();for(const Ne of he.moduleAugmentations){if(!Ha(Ne))continue;const Oe=se.getSymbolAtLocation(Ne);Oe&&De(Oe)}}for(const se of we.getTypeChecker().getAmbientModules())se.declarations&&se.declarations.length>1&&De(se);return ke;function De(se){if(se.declarations)for(const Ne of se.declarations){const Oe=_n(Ne);Oe&&Oe!==he&&qe(Oe.resolvedPath)}}function qe(se){(ke||(ke=new Set)).add(se)}}function b(we,he){return he&&!he.referencedMap==!we}t.canReuseOldState=b;function T(we){return we.module!==0&&!we.outFile?r():void 0}t.createReferencedMap=T;function E(we,he,Ae){var ke,Te;const De=new Map,qe=we.getCompilerOptions(),se=T(qe),Ne=b(se,he);we.getTypeChecker();for(const Oe of we.getSourceFiles()){const He=j.checkDefined(Oe.version,"Program intended to be used with Builder should have source files with versions set"),Pe=Ne?(ke=he.oldSignatures)==null?void 0:ke.get(Oe.resolvedPath):void 0,We=Pe===void 0?Ne?(Te=he.fileInfos.get(Oe.resolvedPath))==null?void 0:Te.signature:void 0:Pe||void 0;if(se){const ze=C(we,Oe,we.getCanonicalFileName);ze&&se.set(Oe.resolvedPath,ze)}De.set(Oe.resolvedPath,{version:He,signature:We,affectsGlobalScope:qe.outFile?void 0:pe(Oe)||void 0,impliedFormat:Oe.impliedNodeFormat})}return{fileInfos:De,referencedMap:se,useFileVersionAsSignature:!Ae&&!Ne}}t.create=E;function N(we){we.allFilesExcludingDefaultLibraryFile=void 0,we.allFileNames=void 0}t.releaseCache=N;function R(we,he,Ae,ke,Te){var De;const qe=F(we,he,Ae,ke,Te);return(De=we.oldSignatures)==null||De.clear(),qe}t.getFilesAffectedBy=R;function F(we,he,Ae,ke,Te){const De=he.getSourceFileByPath(Ae);return De?q(we,he,De,ke,Te)?(we.referencedMap?Ie:ue)(we,he,De,ke,Te):[De]:w}t.getFilesAffectedByWithOldState=F;function H(we,he,Ae){we.fileInfos.get(Ae).signature=he,(we.hasCalledUpdateShapeSignature||(we.hasCalledUpdateShapeSignature=new Set)).add(Ae)}t.updateSignatureOfFile=H;function U(we,he,Ae,ke,Te){we.emit(he,(De,qe,se,Ne,Oe,He)=>{j.assert(df(De),`File extension for signature expected to be dts: Got:: ${De}`),Te(Tde(we,he,qe,ke,He),Oe)},Ae,2,void 0,!0)}t.computeDtsSignature=U;function q(we,he,Ae,ke,Te,De=we.useFileVersionAsSignature){var qe;if((qe=we.hasCalledUpdateShapeSignature)!=null&&qe.has(Ae.resolvedPath))return!1;const se=we.fileInfos.get(Ae.resolvedPath),Ne=se.signature;let Oe;return!Ae.isDeclarationFile&&!De&&U(he,Ae,ke,Te,He=>{Oe=He,Te.storeSignatureInfo&&(we.signatureInfo??(we.signatureInfo=new Map)).set(Ae.resolvedPath,0)}),Oe===void 0&&(Oe=Ae.version,Te.storeSignatureInfo&&(we.signatureInfo??(we.signatureInfo=new Map)).set(Ae.resolvedPath,2)),(we.oldSignatures||(we.oldSignatures=new Map)).set(Ae.resolvedPath,Ne||!1),(we.hasCalledUpdateShapeSignature||(we.hasCalledUpdateShapeSignature=new Set)).add(Ae.resolvedPath),se.signature=Oe,Oe!==Ne}t.updateShapeSignature=q;function X(we,he,Ae){if(he.getCompilerOptions().outFile||!we.referencedMap||pe(Ae))return Z(we,he);const Te=new Set,De=[Ae.resolvedPath];for(;De.length;){const qe=De.pop();if(!Te.has(qe)){Te.add(qe);const se=we.referencedMap.getValues(qe);if(se)for(const Ne of se.keys())De.push(Ne)}}return as(ld(Te.keys(),qe=>{var se;return((se=he.getSourceFileByPath(qe))==null?void 0:se.fileName)??qe}))}t.getAllDependencies=X;function Z(we,he){if(!we.allFileNames){const Ae=he.getSourceFiles();we.allFileNames=Ae===w?w:Ae.map(ke=>ke.fileName)}return we.allFileNames}function Q(we,he){const Ae=we.referencedMap.getKeys(he);return Ae?as(Ae.keys()):[]}t.getReferencedByPaths=Q;function re(we){for(const he of we.statements)if(!MG(he))return!1;return!0}function oe(we){return Ft(we.moduleAugmentations,he=>Ry(he.parent))}function pe(we){return oe(we)||!Cp(we)&&!Eg(we)&&!re(we)}function de(we,he,Ae){if(we.allFilesExcludingDefaultLibraryFile)return we.allFilesExcludingDefaultLibraryFile;let ke;Ae&&Te(Ae);for(const De of he.getSourceFiles())De!==Ae&&Te(De);return we.allFilesExcludingDefaultLibraryFile=ke||w,we.allFilesExcludingDefaultLibraryFile;function Te(De){he.isSourceFileDefaultLibrary(De)||(ke||(ke=[])).push(De)}}t.getAllFilesExcludingDefaultLibraryFile=de;function ue(we,he,Ae){const ke=he.getCompilerOptions();return ke&&ke.outFile?[Ae]:de(we,he,Ae)}function Ie(we,he,Ae,ke,Te){if(pe(Ae))return de(we,he,Ae);const De=he.getCompilerOptions();if(De&&(Ag(De)||De.outFile))return[Ae];const qe=new Map;qe.set(Ae.resolvedPath,Ae);const se=Q(we,Ae.resolvedPath);for(;se.length>0;){const Ne=se.pop();if(!qe.has(Ne)){const Oe=he.getSourceFileByPath(Ne);qe.set(Ne,Oe),Oe&&q(we,he,Oe,ke,Te)&&se.push(...Q(we,Oe.resolvedPath))}}return as(ld(qe.values(),Ne=>Ne))}})($0||($0={}));var RLe=(t=>(t[t.None=0]="None",t[t.Js=1]="Js",t[t.JsMap=2]="JsMap",t[t.JsInlineMap=4]="JsInlineMap",t[t.DtsErrors=8]="DtsErrors",t[t.DtsEmit=16]="DtsEmit",t[t.DtsMap=32]="DtsMap",t[t.Dts=24]="Dts",t[t.AllJs=7]="AllJs",t[t.AllDtsEmit=48]="AllDtsEmit",t[t.AllDts=56]="AllDts",t[t.All=63]="All",t))(RLe||{});function $3(t){return t.program!==void 0}function f8t(t){return j.assert($3(t)),t}function Cx(t){let r=1;return t.sourceMap&&(r=r|2),t.inlineSourceMap&&(r=r|4),Q_(t)&&(r=r|24),t.declarationMap&&(r=r|32),t.emitDeclarationOnly&&(r=r&56),r}function jQ(t,r){const a=r&&(Ww(r)?r:Cx(r)),u=Ww(t)?t:Cx(t);if(a===u)return 0;if(!a||!u)return u;const h=a^u;let p=0;return h&7&&(p=u&7),h&8&&(p=p|u&8),h&48&&(p=p|u&48),p}function h8t(t,r){return t===r||t!==void 0&&r!==void 0&&t.size===r.size&&!qb(t,a=>!r.has(a))}function _8t(t,r){var a,u;const h=$0.create(t,r,!1);h.program=t;const p=t.getCompilerOptions();h.compilerOptions=p;const g=p.outFile;h.semanticDiagnosticsPerFile=new Map,g&&p.composite&&(r!=null&&r.outSignature)&&g===r.compilerOptions.outFile&&(h.outSignature=r.outSignature&&Ket(p,r.compilerOptions,r.outSignature)),h.changedFilesSet=new Set,h.latestChangedDtsFile=p.composite?r==null?void 0:r.latestChangedDtsFile:void 0,h.checkPending=h.compilerOptions.noCheck?!0:void 0;const C=$0.canReuseOldState(h.referencedMap,r),b=C?r.compilerOptions:void 0;let T=C&&!LDe(p,b);const E=p.composite&&(r==null?void 0:r.emitSignatures)&&!g&&!ADe(p,r.compilerOptions);let N=!0;C?((a=r.changedFilesSet)==null||a.forEach(X=>h.changedFilesSet.add(X)),!g&&((u=r.affectedFilesPendingEmit)!=null&&u.size)&&(h.affectedFilesPendingEmit=new Map(r.affectedFilesPendingEmit),h.seenAffectedFiles=new Set),h.programEmitPending=r.programEmitPending,g&&h.changedFilesSet.size&&(T=!1,N=!1),h.hasErrorsFromOldState=r.hasErrors):h.buildInfoEmitPending=QT(p);const R=h.referencedMap,F=C?r.referencedMap:void 0,H=T&&!p.skipLibCheck==!b.skipLibCheck,U=H&&!p.skipDefaultLibCheck==!b.skipDefaultLibCheck;if(h.fileInfos.forEach((X,Z)=>{var Q;let re,oe;if(!C||!(re=r.fileInfos.get(Z))||re.version!==X.version||re.impliedFormat!==X.impliedFormat||!h8t(oe=R&&R.getValues(Z),F&&F.getValues(Z))||oe&&qb(oe,pe=>!h.fileInfos.has(pe)&&r.fileInfos.has(pe)))q(Z);else{const pe=t.getSourceFileByPath(Z),de=N?(Q=r.emitDiagnosticsPerFile)==null?void 0:Q.get(Z):void 0;if(de&&(h.emitDiagnosticsPerFile??(h.emitDiagnosticsPerFile=new Map)).set(Z,r.hasReusableDiagnostic?Qet(de,Z,t):Xet(de,t)),T){if(pe.isDeclarationFile&&!H||pe.hasNoDefaultLib&&!U)return;const ue=r.semanticDiagnosticsPerFile.get(Z);ue&&(h.semanticDiagnosticsPerFile.set(Z,r.hasReusableDiagnostic?Qet(ue,Z,t):Xet(ue,t)),(h.semanticDiagnosticsFromOldState??(h.semanticDiagnosticsFromOldState=new Set)).add(Z))}}if(E){const pe=r.emitSignatures.get(Z);pe&&(h.emitSignatures??(h.emitSignatures=new Map)).set(Z,Ket(p,r.compilerOptions,pe))}}),C&&cf(r.fileInfos,(X,Z)=>h.fileInfos.has(Z)?!1:X.affectsGlobalScope?!0:(h.buildInfoEmitPending=!0,!!g)))$0.getAllFilesExcludingDefaultLibraryFile(h,t,void 0).forEach(X=>q(X.resolvedPath));else if(b){const X=PDe(p,b)?Cx(p):jQ(p,b);X!==0&&(g?h.changedFilesSet.size||(h.programEmitPending=h.programEmitPending?h.programEmitPending|X:X):(t.getSourceFiles().forEach(Z=>{h.changedFilesSet.has(Z.resolvedPath)||Ede(h,Z.resolvedPath,X)}),j.assert(!h.seenAffectedFiles||!h.seenAffectedFiles.size),h.seenAffectedFiles=h.seenAffectedFiles||new Set),h.buildInfoEmitPending=!0)}return C&&h.semanticDiagnosticsPerFile.size!==h.fileInfos.size&&r.checkPending!==h.checkPending&&(h.buildInfoEmitPending=!0),h;function q(X){h.changedFilesSet.add(X),g&&(T=!1,N=!1,h.semanticDiagnosticsFromOldState=void 0,h.semanticDiagnosticsPerFile.clear(),h.emitDiagnosticsPerFile=void 0),h.buildInfoEmitPending=!0,h.programEmitPending=void 0}}function Ket(t,r,a){return!!t.declarationMap==!!r.declarationMap?a:Oo(a)?[a]:a[0]}function Xet(t,r){return t.length?Wr(t,a=>{if(Oo(a.messageText))return a;const u=FLe(a.messageText,a.file,r,h=>{var p;return(p=h.repopulateInfo)==null?void 0:p.call(h)});return u===a.messageText?a:{...a,messageText:u}}):t}function FLe(t,r,a,u){const h=u(t);if(h===!0)return{..._ae(r),next:BLe(t.next,r,a,u)};if(h)return{...IG(r,a,h.moduleReference,h.mode,h.packageName||h.moduleReference),next:BLe(t.next,r,a,u)};const p=BLe(t.next,r,a,u);return p===t.next?t:{...t,next:p}}function BLe(t,r,a,u){return Wr(t,h=>FLe(h,r,a,u))}function Qet(t,r,a){if(!t.length)return w;let u;return t.map(p=>{const g=Zet(p,r,a,h);g.reportsUnnecessary=p.reportsUnnecessary,g.reportsDeprecated=p.reportDeprecated,g.source=p.source,g.skippedOn=p.skippedOn;const{relatedInformation:C}=p;return g.relatedInformation=C?C.length?C.map(b=>Zet(b,r,a,h)):[]:void 0,g});function h(p){return u??(u=ts(wo(h2(a.getCompilerOptions()),a.getCurrentDirectory()))),ol(p,u,a.getCanonicalFileName)}}function Zet(t,r,a,u){const{file:h}=t,p=h!==!1?a.getSourceFileByPath(h?u(h):r):void 0;return{...t,file:p,messageText:Oo(t.messageText)?t.messageText:FLe(t.messageText,p,a,g=>g.info)}}function p8t(t){$0.releaseCache(t),t.program=void 0}function WLe(t,r){j.assert(!r||!t.affectedFiles||t.affectedFiles[t.affectedFilesIndex-1]!==r||!t.semanticDiagnosticsPerFile.has(r.resolvedPath))}function Yet(t,r,a){for(var u;;){const{affectedFiles:h}=t;if(h){const C=t.seenAffectedFiles;let b=t.affectedFilesIndex;for(;b<h.length;){const T=h[b];if(!C.has(T.resolvedPath))return t.affectedFilesIndex=b,Ede(t,T.resolvedPath,Cx(t.compilerOptions)),y8t(t,T,r,a),T;b++}t.changedFilesSet.delete(t.currentChangedFilePath),t.currentChangedFilePath=void 0,(u=t.oldSignatures)==null||u.clear(),t.affectedFiles=void 0}const p=t.changedFilesSet.keys().next();if(p.done)return;if(t.program.getCompilerOptions().outFile)return t.program;t.affectedFiles=$0.getFilesAffectedByWithOldState(t,t.program,p.value,r,a),t.currentChangedFilePath=p.value,t.affectedFilesIndex=0,t.seenAffectedFiles||(t.seenAffectedFiles=new Set)}}function ett(t,r,a){var u,h;if(!(!((u=t.affectedFilesPendingEmit)!=null&&u.size)&&!t.programEmitPending)&&(!r&&!a&&(t.affectedFilesPendingEmit=void 0,t.programEmitPending=void 0),(h=t.affectedFilesPendingEmit)==null||h.forEach((p,g)=>{const C=a?p&55:p&7;C?t.affectedFilesPendingEmit.set(g,C):t.affectedFilesPendingEmit.delete(g)}),t.programEmitPending)){const p=a?t.programEmitPending&55:t.programEmitPending&7;p?t.programEmitPending=p:t.programEmitPending=void 0}}function zQ(t,r,a,u){let h=jQ(t,r);return a&&(h=h&56),u&&(h=h&8),h}function xde(t){return t?8:56}function m8t(t,r,a){var u;if((u=t.affectedFilesPendingEmit)!=null&&u.size)return cf(t.affectedFilesPendingEmit,(h,p)=>{var g;const C=t.program.getSourceFileByPath(p);if(!C||!SI(C,t.program)){t.affectedFilesPendingEmit.delete(p);return}const b=(g=t.seenEmittedFiles)==null?void 0:g.get(C.resolvedPath),T=zQ(h,b,r,a);if(T)return{affectedFile:C,emitKind:T}})}function g8t(t,r){var a;if((a=t.emitDiagnosticsPerFile)!=null&&a.size)return cf(t.emitDiagnosticsPerFile,(u,h)=>{var p;const g=t.program.getSourceFileByPath(h);if(!g||!SI(g,t.program)){t.emitDiagnosticsPerFile.delete(h);return}const C=((p=t.seenEmittedFiles)==null?void 0:p.get(g.resolvedPath))||0;if(!(C&xde(r)))return{affectedFile:g,diagnostics:u,seenKind:C}})}function ttt(t){if(!t.cleanedDiagnosticsOfLibFiles){t.cleanedDiagnosticsOfLibFiles=!0;const r=t.program.getCompilerOptions();O(t.program.getSourceFiles(),a=>t.program.isSourceFileDefaultLibrary(a)&&!$De(a,r,t.program)&&HLe(t,a.resolvedPath))}}function y8t(t,r,a,u){if(HLe(t,r.resolvedPath),t.allFilesExcludingDefaultLibraryFile===t.affectedFiles){ttt(t),$0.updateShapeSignature(t,t.program,r,a,u);return}t.compilerOptions.assumeChangesOnlyAffectDirectDependencies||v8t(t,r,a,u)}function VLe(t,r,a,u,h){if(HLe(t,r),!t.changedFilesSet.has(r)){const p=t.program.getSourceFileByPath(r);p&&($0.updateShapeSignature(t,t.program,p,u,h,!0),a?Ede(t,r,Cx(t.compilerOptions)):Q_(t.compilerOptions)&&Ede(t,r,t.compilerOptions.declarationMap?56:24))}}function HLe(t,r){return t.semanticDiagnosticsFromOldState?(t.semanticDiagnosticsFromOldState.delete(r),t.semanticDiagnosticsPerFile.delete(r),!t.semanticDiagnosticsFromOldState.size):!0}function itt(t,r){const a=j.checkDefined(t.oldSignatures).get(r)||void 0;return j.checkDefined(t.fileInfos.get(r)).signature!==a}function jLe(t,r,a,u,h){var p;return(p=t.fileInfos.get(r))!=null&&p.affectsGlobalScope?($0.getAllFilesExcludingDefaultLibraryFile(t,t.program,void 0).forEach(g=>VLe(t,g.resolvedPath,a,u,h)),ttt(t),!0):!1}function v8t(t,r,a,u){var h,p;if(!t.referencedMap||!t.changedFilesSet.has(r.resolvedPath)||!itt(t,r.resolvedPath))return;if(Ag(t.compilerOptions)){const b=new Map;b.set(r.resolvedPath,!0);const T=$0.getReferencedByPaths(t,r.resolvedPath);for(;T.length>0;){const E=T.pop();if(!b.has(E)){if(b.set(E,!0),jLe(t,E,!1,a,u))return;if(VLe(t,E,!1,a,u),itt(t,E)){const N=t.program.getSourceFileByPath(E);T.push(...$0.getReferencedByPaths(t,N.resolvedPath))}}}}const g=new Set,C=!!((h=r.symbol)!=null&&h.exports)&&!!cf(r.symbol.exports,b=>{if(b.flags&128)return!0;const T=Vf(b,t.program.getTypeChecker());return T===b?!1:(T.flags&128)!==0&&Ft(T.declarations,E=>_n(E)===r)});(p=t.referencedMap.getKeys(r.resolvedPath))==null||p.forEach(b=>{if(jLe(t,b,C,a,u))return!0;const T=t.referencedMap.getKeys(b);return T&&qb(T,E=>ntt(t,E,C,g,a,u))})}function ntt(t,r,a,u,h,p){var g;if(of(u,r)){if(jLe(t,r,a,h,p))return!0;VLe(t,r,a,h,p),(g=t.referencedMap.getKeys(r))==null||g.forEach(C=>ntt(t,C,a,u,h,p))}}function kde(t,r,a,u){return t.compilerOptions.noCheck?w:Js(b8t(t,r,a,u),t.program.getProgramDiagnostics(r))}function b8t(t,r,a,u){u??(u=t.semanticDiagnosticsPerFile);const h=r.resolvedPath,p=u.get(h);if(p)return VQ(p,t.compilerOptions);const g=t.program.getBindAndCheckDiagnostics(r,a);return u.set(h,g),t.buildInfoEmitPending=!0,VQ(g,t.compilerOptions)}function zLe(t){var r;return!!((r=t.options)!=null&&r.outFile)}function tj(t){return!!t.fileNames}function C8t(t){return!tj(t)&&!!t.root}function rtt(t){t.hasErrors===void 0&&(QT(t.compilerOptions)?t.hasErrors=!Ft(t.program.getSourceFiles(),r=>{var a,u;const h=t.semanticDiagnosticsPerFile.get(r.resolvedPath);return h===void 0||!!h.length||!!((u=(a=t.emitDiagnosticsPerFile)==null?void 0:a.get(r.resolvedPath))!=null&&u.length)})&&(stt(t)||Ft(t.program.getSourceFiles(),r=>!!t.program.getProgramDiagnostics(r).length)):t.hasErrors=Ft(t.program.getSourceFiles(),r=>{var a,u;const h=t.semanticDiagnosticsPerFile.get(r.resolvedPath);return!!(h!=null&&h.length)||!!((u=(a=t.emitDiagnosticsPerFile)==null?void 0:a.get(r.resolvedPath))!=null&&u.length)})||stt(t))}function stt(t){return!!t.program.getConfigFileParsingDiagnostics().length||!!t.program.getSyntacticDiagnostics().length||!!t.program.getOptionsDiagnostics().length||!!t.program.getGlobalDiagnostics().length}function ott(t){return rtt(t),t.buildInfoEmitPending??(t.buildInfoEmitPending=!!t.hasErrorsFromOldState!=!!t.hasErrors)}function S8t(t){var r,a;const u=t.program.getCurrentDirectory(),h=ts(wo(h2(t.compilerOptions),u)),p=t.latestChangedDtsFile?Z(t.latestChangedDtsFile):void 0,g=[],C=new Map,b=new Set(t.program.getRootFileNames().map(se=>ol(se,u,t.program.getCanonicalFileName)));if(rtt(t),!QT(t.compilerOptions))return{root:as(b,Ne=>Q(Ne)),errors:t.hasErrors?!0:void 0,checkPending:t.checkPending,version:v};const T=[];if(t.compilerOptions.outFile){const se=as(t.fileInfos.entries(),([Oe,He])=>{const Pe=re(Oe);return pe(Oe,Pe),He.impliedFormat?{version:He.version,impliedFormat:He.impliedFormat,signature:void 0,affectsGlobalScope:void 0}:He.version});return{fileNames:g,fileInfos:se,root:T,resolvedRoot:de(),options:ue(t.compilerOptions),semanticDiagnosticsPerFile:t.changedFilesSet.size?void 0:we(),emitDiagnosticsPerFile:he(),changeFileSet:qe(),outSignature:t.outSignature,latestChangedDtsFile:p,pendingEmit:t.programEmitPending?t.programEmitPending===Cx(t.compilerOptions)?!1:t.programEmitPending:void 0,errors:t.hasErrors?!0:void 0,checkPending:t.checkPending,version:v}}let E,N,R;const F=as(t.fileInfos.entries(),([se,Ne])=>{var Oe,He;const Pe=re(se);pe(se,Pe),j.assert(g[Pe-1]===Q(se));const We=(Oe=t.oldSignatures)==null?void 0:Oe.get(se),ze=We!==void 0?We||void 0:Ne.signature;if(t.compilerOptions.composite){const Nt=t.program.getSourceFileByPath(se);if(!Eg(Nt)&&SI(Nt,t.program)){const $e=(He=t.emitSignatures)==null?void 0:He.get(se);$e!==ze&&(R=fn(R,$e===void 0?Pe:[Pe,!Oo($e)&&$e[0]===ze?w:$e]))}}return Ne.version===ze?Ne.affectsGlobalScope||Ne.impliedFormat?{version:Ne.version,signature:void 0,affectsGlobalScope:Ne.affectsGlobalScope,impliedFormat:Ne.impliedFormat}:Ne.version:ze!==void 0?We===void 0?Ne:{version:Ne.version,signature:ze,affectsGlobalScope:Ne.affectsGlobalScope,impliedFormat:Ne.impliedFormat}:{version:Ne.version,signature:!1,affectsGlobalScope:Ne.affectsGlobalScope,impliedFormat:Ne.impliedFormat}});let H;(r=t.referencedMap)!=null&&r.size()&&(H=as(t.referencedMap.keys()).sort(sh).map(se=>[re(se),oe(t.referencedMap.getValues(se))]));const U=we();let q;if((a=t.affectedFilesPendingEmit)!=null&&a.size){const se=Cx(t.compilerOptions),Ne=new Set;for(const Oe of as(t.affectedFilesPendingEmit.keys()).sort(sh))if(of(Ne,Oe)){const He=t.program.getSourceFileByPath(Oe);if(!He||!SI(He,t.program))continue;const Pe=re(Oe),We=t.affectedFilesPendingEmit.get(Oe);q=fn(q,We===se?Pe:We===24?[Pe]:[Pe,We])}}return{fileNames:g,fileIdsList:E,fileInfos:F,root:T,resolvedRoot:de(),options:ue(t.compilerOptions),referencedMap:H,semanticDiagnosticsPerFile:U,emitDiagnosticsPerFile:he(),changeFileSet:qe(),affectedFilesPendingEmit:q,emitSignatures:R,latestChangedDtsFile:p,errors:t.hasErrors?!0:void 0,checkPending:t.checkPending,version:v};function Z(se){return Q(wo(se,u))}function Q(se){return sI(c0(h,se,t.program.getCanonicalFileName))}function re(se){let Ne=C.get(se);return Ne===void 0&&(g.push(Q(se)),C.set(se,Ne=g.length)),Ne}function oe(se){const Ne=as(se.keys(),re).sort(_l),Oe=Ne.join();let He=N==null?void 0:N.get(Oe);return He===void 0&&(E=fn(E,Ne),(N??(N=new Map)).set(Oe,He=E.length)),He}function pe(se,Ne){const Oe=t.program.getSourceFile(se);if(!t.program.getFileIncludeReasons().get(Oe.path).some(ze=>ze.kind===0))return;if(!T.length)return T.push(Ne);const He=T[T.length-1],Pe=Ao(He);if(Pe&&He[1]===Ne-1)return He[1]=Ne;if(Pe||T.length===1||He!==Ne-1)return T.push(Ne);const We=T[T.length-2];return!Ww(We)||We!==He-1?T.push(Ne):(T[T.length-2]=[We,Ne],T.length=T.length-1)}function de(){let se;return b.forEach(Ne=>{const Oe=t.program.getSourceFileByPath(Ne);Oe&&Ne!==Oe.resolvedPath&&(se=fn(se,[re(Oe.resolvedPath),re(Ne)]))}),se}function ue(se){let Ne;const{optionsNameMap:Oe}=A3();for(const He of wr(se).sort(sh)){const Pe=Oe.get(He.toLowerCase());Pe!=null&&Pe.affectsBuildInfo&&((Ne||(Ne={}))[He]=Ie(Pe,se[He]))}return Ne}function Ie(se,Ne){if(se){if(j.assert(se.type!=="listOrElement"),se.type==="list"){const Oe=Ne;if(se.element.isFilePath&&Oe.length)return Oe.map(Z)}else if(se.isFilePath)return Z(Ne)}return Ne}function we(){let se;return t.fileInfos.forEach((Ne,Oe)=>{const He=t.semanticDiagnosticsPerFile.get(Oe);He?He.length&&(se=fn(se,[re(Oe),Ae(He,Oe)])):t.changedFilesSet.has(Oe)||(se=fn(se,re(Oe)))}),se}function he(){var se;let Ne;if(!((se=t.emitDiagnosticsPerFile)!=null&&se.size))return Ne;for(const Oe of as(t.emitDiagnosticsPerFile.keys()).sort(sh)){const He=t.emitDiagnosticsPerFile.get(Oe);Ne=fn(Ne,[re(Oe),Ae(He,Oe)])}return Ne}function Ae(se,Ne){return j.assert(!!se.length),se.map(Oe=>{const He=ke(Oe,Ne);He.reportsUnnecessary=Oe.reportsUnnecessary,He.reportDeprecated=Oe.reportsDeprecated,He.source=Oe.source,He.skippedOn=Oe.skippedOn;const{relatedInformation:Pe}=Oe;return He.relatedInformation=Pe?Pe.length?Pe.map(We=>ke(We,Ne)):[]:void 0,He})}function ke(se,Ne){const{file:Oe}=se;return{...se,file:Oe?Oe.resolvedPath===Ne?void 0:Q(Oe.resolvedPath):!1,messageText:Oo(se.messageText)?se.messageText:Te(se.messageText)}}function Te(se){if(se.repopulateInfo)return{info:se.repopulateInfo(),next:De(se.next)};const Ne=De(se.next);return Ne===se.next?se:{...se,next:Ne}}function De(se){return se&&(O(se,(Ne,Oe)=>{const He=Te(Ne);if(Ne===He)return;const Pe=Oe>0?se.slice(0,Oe-1):[];Pe.push(He);for(let We=Oe+1;We<se.length;We++)Pe.push(Te(se[We]));return Pe})||se)}function qe(){let se;if(t.changedFilesSet.size)for(const Ne of as(t.changedFilesSet.keys()).sort(sh))se=fn(se,re(Ne));return se}}var ULe=(t=>(t[t.SemanticDiagnosticsBuilderProgram=0]="SemanticDiagnosticsBuilderProgram",t[t.EmitAndSemanticDiagnosticsBuilderProgram=1]="EmitAndSemanticDiagnosticsBuilderProgram",t))(ULe||{});function UQ(t,r,a,u,h,p){let g,C,b;return t===void 0?(j.assert(r===void 0),g=a,b=u,j.assert(!!b),C=b.getProgram()):Ao(t)?(b=u,C=YH({rootNames:t,options:r,host:a,oldProgram:b&&b.getProgramOrUndefined(),configFileParsingDiagnostics:h,projectReferences:p}),g=a):(C=t,g=r,b=a,h=u),{host:g,newProgram:C,oldProgram:b,configFileParsingDiagnostics:h||w}}function att(t,r){return(r==null?void 0:r.sourceMapUrlPos)!==void 0?t.substring(0,r.sourceMapUrlPos):t}function Tde(t,r,a,u,h){var p;a=att(a,h);let g;return(p=h==null?void 0:h.diagnostics)!=null&&p.length&&(a+=h.diagnostics.map(T=>`${b(T)}${JJ[T.category]}${T.code}: ${C(T.messageText)}`).join(`
+`)),(u.createHash??n8)(a);function C(T){return Oo(T)?T:T===void 0?"":T.next?T.messageText+T.next.map(C).join(`
+`):T.messageText}function b(T){return T.file.resolvedPath===r.resolvedPath?`(${T.start},${T.length})`:(g===void 0&&(g=ts(r.resolvedPath)),`${sI(c0(g,T.file.resolvedPath,t.getCanonicalFileName))}(${T.start},${T.length})`)}}function w8t(t,r,a){return(r.createHash??n8)(att(t,a))}function Dde(t,{newProgram:r,host:a,oldProgram:u,configFileParsingDiagnostics:h}){let p=u&&u.state;if(p&&r===p.program&&h===r.getConfigFileParsingDiagnostics())return r=void 0,p=void 0,u;const g=_8t(r,p);r.getBuildInfo=()=>S8t(f8t(g)),r=void 0,u=void 0,p=void 0;const C=Nde(g,h);return C.state=g,C.hasChangedEmitSignature=()=>!!g.hasChangedEmitSignature,C.getAllDependencies=Z=>$0.getAllDependencies(g,j.checkDefined(g.program),Z),C.getSemanticDiagnostics=X,C.getDeclarationDiagnostics=U,C.emit=F,C.releaseProgram=()=>p8t(g),t===0?C.getSemanticDiagnosticsOfNextAffectedFile=q:t===1?(C.getSemanticDiagnosticsOfNextAffectedFile=q,C.emitNextAffectedFile=N,C.emitBuildInfo=b):wa(),C;function b(Z,Q){if(j.assert($3(g)),ott(g)){const re=g.program.emitBuildInfo(Z||to(a,a.writeFile),Q);return g.buildInfoEmitPending=!1,re}return Cde}function T(Z,Q,re,oe,pe){var de,ue,Ie,we;j.assert($3(g));let he=Yet(g,Q,a);const Ae=Cx(g.compilerOptions);let ke=pe?8:re?Ae&56:Ae;if(!he){if(g.compilerOptions.outFile){if(g.programEmitPending&&(ke=zQ(g.programEmitPending,g.seenProgramEmit,re,pe),ke&&(he=g.program)),!he&&((de=g.emitDiagnosticsPerFile)!=null&&de.size)){const qe=g.seenProgramEmit||0;if(!(qe&xde(pe))){g.seenProgramEmit=xde(pe)|qe;const se=[];return g.emitDiagnosticsPerFile.forEach(Ne=>Sr(se,Ne)),{result:{emitSkipped:!0,diagnostics:se},affected:g.program}}}}else{const qe=m8t(g,re,pe);if(qe)({affectedFile:he,emitKind:ke}=qe);else{const se=g8t(g,pe);if(se)return(g.seenEmittedFiles??(g.seenEmittedFiles=new Map)).set(se.affectedFile.resolvedPath,se.seenKind|xde(pe)),{result:{emitSkipped:!0,diagnostics:se.diagnostics},affected:se.affectedFile}}}if(!he){if(pe||!ott(g))return;const qe=g.program,se=qe.emitBuildInfo(Z||to(a,a.writeFile),Q);return g.buildInfoEmitPending=!1,{result:se,affected:qe}}}let Te;ke&7&&(Te=0),ke&56&&(Te=Te===void 0?1:void 0);const De=pe?{emitSkipped:!0,diagnostics:g.program.getDeclarationDiagnostics(he===g.program?void 0:he,Q)}:g.program.emit(he===g.program?void 0:he,R(Z,oe),Q,Te,oe,void 0,!0);if(he!==g.program){const qe=he;g.seenAffectedFiles.add(qe.resolvedPath),g.affectedFilesIndex!==void 0&&g.affectedFilesIndex++,g.buildInfoEmitPending=!0;const se=((ue=g.seenEmittedFiles)==null?void 0:ue.get(qe.resolvedPath))||0;(g.seenEmittedFiles??(g.seenEmittedFiles=new Map)).set(qe.resolvedPath,ke|se);const Ne=((Ie=g.affectedFilesPendingEmit)==null?void 0:Ie.get(qe.resolvedPath))||Ae,Oe=jQ(Ne,ke|se);Oe?(g.affectedFilesPendingEmit??(g.affectedFilesPendingEmit=new Map)).set(qe.resolvedPath,Oe):(we=g.affectedFilesPendingEmit)==null||we.delete(qe.resolvedPath),De.diagnostics.length&&(g.emitDiagnosticsPerFile??(g.emitDiagnosticsPerFile=new Map)).set(qe.resolvedPath,De.diagnostics)}else g.changedFilesSet.clear(),g.programEmitPending=g.changedFilesSet.size?jQ(Ae,ke):g.programEmitPending?jQ(g.programEmitPending,ke):void 0,g.seenProgramEmit=ke|(g.seenProgramEmit||0),E(De.diagnostics),g.buildInfoEmitPending=!0;return{result:De,affected:he}}function E(Z){let Q;Z.forEach(re=>{if(!re.file)return;let oe=Q==null?void 0:Q.get(re.file.resolvedPath);oe||(Q??(Q=new Map)).set(re.file.resolvedPath,oe=[]),oe.push(re)}),Q&&(g.emitDiagnosticsPerFile=Q)}function N(Z,Q,re,oe){return T(Z,Q,re,oe,!1)}function R(Z,Q){return j.assert($3(g)),Q_(g.compilerOptions)?(re,oe,pe,de,ue,Ie)=>{var we,he,Ae;if(df(re))if(g.compilerOptions.outFile){if(g.compilerOptions.composite){const Te=ke(g.outSignature,void 0);if(!Te)return Ie.skippedDtsWrite=!0;g.outSignature=Te}}else{j.assert((ue==null?void 0:ue.length)===1);let Te;if(!Q){const De=ue[0],qe=g.fileInfos.get(De.resolvedPath);if(qe.signature===De.version){const se=Tde(g.program,De,oe,a,Ie);(we=Ie==null?void 0:Ie.diagnostics)!=null&&we.length||(Te=se),se!==De.version&&(a.storeSignatureInfo&&(g.signatureInfo??(g.signatureInfo=new Map)).set(De.resolvedPath,1),g.affectedFiles&&((he=g.oldSignatures)==null?void 0:he.get(De.resolvedPath))===void 0&&(g.oldSignatures??(g.oldSignatures=new Map)).set(De.resolvedPath,qe.signature||!1),qe.signature=se)}}if(g.compilerOptions.composite){const De=ue[0].resolvedPath;if(Te=ke((Ae=g.emitSignatures)==null?void 0:Ae.get(De),Te),!Te)return Ie.skippedDtsWrite=!0;(g.emitSignatures??(g.emitSignatures=new Map)).set(De,Te)}}Z?Z(re,oe,pe,de,ue,Ie):a.writeFile?a.writeFile(re,oe,pe,de,ue,Ie):g.program.writeFile(re,oe,pe,de,ue,Ie);function ke(Te,De){const qe=!Te||Oo(Te)?Te:Te[0];if(De??(De=w8t(oe,a,Ie)),De===qe){if(Te===qe)return;Ie?Ie.differsOnlyInMap=!0:Ie={differsOnlyInMap:!0}}else g.hasChangedEmitSignature=!0,g.latestChangedDtsFile=re;return De}}:Z||to(a,a.writeFile)}function F(Z,Q,re,oe,pe){j.assert($3(g)),t===1&&WLe(g,Z);const de=Sde(C,Z,Q,re);if(de)return de;if(!Z)if(t===1){let Ie=[],we=!1,he,Ae=[],ke;for(;ke=N(Q,re,oe,pe);)we=we||ke.result.emitSkipped,he=Sr(he,ke.result.diagnostics),Ae=Sr(Ae,ke.result.emittedFiles),Ie=Sr(Ie,ke.result.sourceMaps);return{emitSkipped:we,diagnostics:he||w,emittedFiles:Ae,sourceMaps:Ie}}else ett(g,oe,!1);const ue=g.program.emit(Z,R(Q,pe),re,oe,pe);return H(Z,oe,!1,ue.diagnostics),ue}function H(Z,Q,re,oe){!Z&&t!==1&&(ett(g,Q,re),E(oe))}function U(Z,Q){var re;if(j.assert($3(g)),t===1){WLe(g,Z);let oe,pe;for(;oe=T(void 0,Q,void 0,void 0,!0);)Z||(pe=Sr(pe,oe.result.diagnostics));return(Z?(re=g.emitDiagnosticsPerFile)==null?void 0:re.get(Z.resolvedPath):pe)||w}else{const oe=g.program.getDeclarationDiagnostics(Z,Q);return H(Z,void 0,!0,oe),oe}}function q(Z,Q){for(j.assert($3(g));;){const re=Yet(g,Z,a);let oe;if(re)if(re!==g.program){const pe=re;if((!Q||!Q(pe))&&(oe=kde(g,pe,Z)),g.seenAffectedFiles.add(pe.resolvedPath),g.affectedFilesIndex++,g.buildInfoEmitPending=!0,!oe)continue}else{let pe;const de=new Map;g.program.getSourceFiles().forEach(ue=>pe=Sr(pe,kde(g,ue,Z,de))),g.semanticDiagnosticsPerFile=de,oe=pe||w,g.changedFilesSet.clear(),g.programEmitPending=Cx(g.compilerOptions),g.compilerOptions.noCheck||(g.checkPending=void 0),g.buildInfoEmitPending=!0}else{g.checkPending&&!g.compilerOptions.noCheck&&(g.checkPending=void 0,g.buildInfoEmitPending=!0);return}return{result:oe,affected:re}}}function X(Z,Q){if(j.assert($3(g)),WLe(g,Z),Z)return kde(g,Z,Q);for(;;){const oe=q(Q);if(!oe)break;if(oe.affected===g.program)return oe.result}let re;for(const oe of g.program.getSourceFiles())re=Sr(re,kde(g,oe,Q));return g.checkPending&&!g.compilerOptions.noCheck&&(g.checkPending=void 0,g.buildInfoEmitPending=!0),re||w}}function Ede(t,r,a){var u,h;const p=((u=t.affectedFilesPendingEmit)==null?void 0:u.get(r))||0;(t.affectedFilesPendingEmit??(t.affectedFilesPendingEmit=new Map)).set(r,p|a),(h=t.emitDiagnosticsPerFile)==null||h.delete(r)}function qLe(t){return Oo(t)?{version:t,signature:t,affectsGlobalScope:void 0,impliedFormat:void 0}:Oo(t.signature)?t:{version:t.version,signature:t.signature===!1?void 0:t.version,affectsGlobalScope:t.affectsGlobalScope,impliedFormat:t.impliedFormat}}function $Le(t,r){return Ww(t)?r:t[1]||24}function JLe(t,r){return t||Cx(r||{})}function GLe(t,r,a){var u,h,p,g;const C=ts(wo(r,a.getCurrentDirectory())),b=Mf(a.useCaseSensitiveFileNames());let T;const E=(u=t.fileNames)==null?void 0:u.map(U);let N;const R=t.latestChangedDtsFile?q(t.latestChangedDtsFile):void 0,F=new Map,H=new Set(qt(t.changeFileSet,X));if(zLe(t))t.fileInfos.forEach((pe,de)=>{const ue=X(de+1);F.set(ue,Oo(pe)?{version:pe,signature:void 0,affectsGlobalScope:void 0,impliedFormat:void 0}:pe)}),T={fileInfos:F,compilerOptions:t.options?XX(t.options,q):{},semanticDiagnosticsPerFile:re(t.semanticDiagnosticsPerFile),emitDiagnosticsPerFile:oe(t.emitDiagnosticsPerFile),hasReusableDiagnostic:!0,changedFilesSet:H,latestChangedDtsFile:R,outSignature:t.outSignature,programEmitPending:t.pendingEmit===void 0?void 0:JLe(t.pendingEmit,t.options),hasErrors:t.errors,checkPending:t.checkPending};else{N=(h=t.fileIdsList)==null?void 0:h.map(ue=>new Set(ue.map(X)));const pe=(p=t.options)!=null&&p.composite&&!t.options.outFile?new Map:void 0;t.fileInfos.forEach((ue,Ie)=>{const we=X(Ie+1),he=qLe(ue);F.set(we,he),pe&&he.signature&&pe.set(we,he.signature)}),(g=t.emitSignatures)==null||g.forEach(ue=>{if(Ww(ue))pe.delete(X(ue));else{const Ie=X(ue[0]);pe.set(Ie,!Oo(ue[1])&&!ue[1].length?[pe.get(Ie)]:ue[1])}});const de=t.affectedFilesPendingEmit?Cx(t.options||{}):void 0;T={fileInfos:F,compilerOptions:t.options?XX(t.options,q):{},referencedMap:Q(t.referencedMap,t.options??{}),semanticDiagnosticsPerFile:re(t.semanticDiagnosticsPerFile),emitDiagnosticsPerFile:oe(t.emitDiagnosticsPerFile),hasReusableDiagnostic:!0,changedFilesSet:H,affectedFilesPendingEmit:t.affectedFilesPendingEmit&&Ld(t.affectedFilesPendingEmit,ue=>X(Ww(ue)?ue:ue[0]),ue=>$Le(ue,de)),latestChangedDtsFile:R,emitSignatures:pe!=null&&pe.size?pe:void 0,hasErrors:t.errors,checkPending:t.checkPending}}return{state:T,getProgram:wa,getProgramOrUndefined:IT,releaseProgram:Tc,getCompilerOptions:()=>T.compilerOptions,getSourceFile:wa,getSourceFiles:wa,getOptionsDiagnostics:wa,getGlobalDiagnostics:wa,getConfigFileParsingDiagnostics:wa,getSyntacticDiagnostics:wa,getDeclarationDiagnostics:wa,getSemanticDiagnostics:wa,emit:wa,getAllDependencies:wa,getCurrentDirectory:wa,emitNextAffectedFile:wa,getSemanticDiagnosticsOfNextAffectedFile:wa,emitBuildInfo:wa,close:Tc,hasChangedEmitSignature:w1};function U(pe){return ol(pe,C,b)}function q(pe){return wo(pe,C)}function X(pe){return E[pe-1]}function Z(pe){return N[pe-1]}function Q(pe,de){const ue=$0.createReferencedMap(de);return!ue||!pe||pe.forEach(([Ie,we])=>ue.set(X(Ie),Z(we))),ue}function re(pe){const de=new Map(ld(F.keys(),ue=>H.has(ue)?void 0:[ue,w]));return pe==null||pe.forEach(ue=>{Ww(ue)?de.delete(X(ue)):de.set(X(ue[0]),ue[1])}),de}function oe(pe){return pe&&Ld(pe,de=>X(de[0]),de=>de[1])}}function Ide(t,r,a){const u=ts(wo(r,a.getCurrentDirectory())),h=Mf(a.useCaseSensitiveFileNames()),p=new Map;let g=0;const C=new Map,b=new Map(t.resolvedRoot);return t.fileInfos.forEach((E,N)=>{const R=ol(t.fileNames[N],u,h),F=Oo(E)?E:E.version;if(p.set(R,F),g<t.root.length){const H=t.root[g],U=N+1;Ao(H)?H[0]<=U&&U<=H[1]&&(T(U,R),H[1]===U&&g++):H===U&&(T(U,R),g++)}}),{fileInfos:p,roots:C};function T(E,N){const R=b.get(E);R?C.set(ol(t.fileNames[R-1],u,h),N):C.set(N,void 0)}}function KLe(t,r,a){if(!C8t(t))return;const u=ts(wo(r,a.getCurrentDirectory())),h=Mf(a.useCaseSensitiveFileNames());return t.root.map(p=>ol(p,u,h))}function Nde(t,r){return{state:void 0,getProgram:a,getProgramOrUndefined:()=>t.program,releaseProgram:()=>t.program=void 0,getCompilerOptions:()=>t.compilerOptions,getSourceFile:u=>a().getSourceFile(u),getSourceFiles:()=>a().getSourceFiles(),getOptionsDiagnostics:u=>a().getOptionsDiagnostics(u),getGlobalDiagnostics:u=>a().getGlobalDiagnostics(u),getConfigFileParsingDiagnostics:()=>r,getSyntacticDiagnostics:(u,h)=>a().getSyntacticDiagnostics(u,h),getDeclarationDiagnostics:(u,h)=>a().getDeclarationDiagnostics(u,h),getSemanticDiagnostics:(u,h)=>a().getSemanticDiagnostics(u,h),emit:(u,h,p,g,C)=>a().emit(u,h,p,g,C),emitBuildInfo:(u,h)=>a().emitBuildInfo(u,h),getAllDependencies:wa,getCurrentDirectory:()=>a().getCurrentDirectory(),close:Tc};function a(){return j.checkDefined(t.program)}}function ctt(t,r,a,u,h,p){return Dde(0,UQ(t,r,a,u,h,p))}function Lde(t,r,a,u,h,p){return Dde(1,UQ(t,r,a,u,h,p))}function ltt(t,r,a,u,h,p){const{newProgram:g,configFileParsingDiagnostics:C}=UQ(t,r,a,u,h,p);return Nde({program:g,compilerOptions:g.getCompilerOptions()},C)}function qQ(t){return su(t,"/node_modules/.staging")?I6(t,"/.staging"):Ft(XJ,r=>t.includes(r))?void 0:t}function XLe(t,r){if(r<=1)return 1;let a=1,u=t[0].search(/[a-z]:/i)===0;if(t[0]!==Kl&&!u&&t[1].search(/[a-z]\$$/i)===0){if(r===2)return 2;a=2,u=!0}return u&&!t[a].match(/^users$/i)?a:t[a].match(/^workspaces$/i)?a+1:a+2}function $Q(t,r){if(r===void 0&&(r=t.length),r<=2)return!1;const a=XLe(t,r);return r>a+1}function QLe(t){return dtt(ts(t))}function utt(t,r){if(r.length<r.length)return!1;for(let a=0;a<t.length;a++)if(r[a]!==t[a])return!1;return!0}function dtt(t){return $Q(af(t))}function ZLe(t){return dtt(t)}function Pde(t,r,a,u,h,p,g){const C=af(r);t=yp(t)?ca(t):wo(t,p());const b=af(t),T=XLe(C,C.length);if(C.length<=T+1)return;const E=C.indexOf("node_modules");if(E!==-1&&E+1<=T+1)return;const N=C.lastIndexOf("node_modules");return utt(h,C)?C.length>h.length+1?YLe(b,C,Math.max(h.length+1,T+1),N):{dir:a,dirPath:u,nonRecursive:!0}:ftt(b,C,C.length-1,T,E,h,N,g)}function ftt(t,r,a,u,h,p,g,C){if(h!==-1)return YLe(t,r,h+1,g);let b=!0,T=a;if(!C){for(let E=0;E<a;E++)if(r[E]!==p[E]){b=!1,T=Math.max(E+1,u+1);break}}return YLe(t,r,T,g,b)}function YLe(t,r,a,u,h){let p;return u!==-1&&u+1>=a&&u+2<r.length&&(so(r[u+1],"@")?u+3<r.length&&(p=u+3):p=u+2),{dir:sS(t,a),dirPath:sS(r,a),nonRecursive:h,packageDir:p!==void 0?sS(t,p):void 0,packageDirPath:p!==void 0?sS(r,p):void 0}}function ePe(t,r,a,u,h,p,g){const C=af(r);if(utt(u,C))return a;t=yp(t)?ca(t):wo(t,h());const b=ftt(af(t),C,C.length,XLe(C,C.length),C.indexOf("node_modules"),u,C.lastIndexOf("node_modules"),p);return b&&g(b.dirPath)?b.dirPath:void 0}function tPe(t,r){const a=wo(t,r());return Noe(a)?a:Mk(a)}function JQ(t){var r;return((r=t.getCompilerHost)==null?void 0:r.call(t))||t}function iPe(t,r,a,u,h){return{nameAndMode:OQ,resolve:(p,g)=>x8t(u,h,p,t,a,r,g)}}function x8t(t,r,a,u,h,p,g){const C=JQ(t),b=nA(a,u,h,C,r,p,g);if(!t.getGlobalCache)return b;const T=t.getGlobalCache();if(T!==void 0&&!Gd(a)&&!(b.resolvedModule&&QK(b.resolvedModule.extension))){const{resolvedModule:E,failedLookupLocations:N,affectingLocations:R,resolutionDiagnostics:F}=pNe(j.checkDefined(t.globalCacheResolutionModuleName)(a),t.projectName,h,C,T,r);if(E)return b.resolvedModule=E,b.failedLookupLocations=O3(b.failedLookupLocations,N),b.affectingLocations=O3(b.affectingLocations,R),b.resolutionDiagnostics=O3(b.resolutionDiagnostics,F),b}return b}function Ade(t,r,a){let u,h,p;const g=new Set,C=new Set,b=new Set,T=new Map,E=new Map;let N=!1,R,F,H,U,q,X=!1;const Z=Bh(()=>t.getCurrentDirectory()),Q=t.getCachedDirectoryStructureHost(),re=new Map,oe=R3(Z(),t.getCanonicalFileName,t.getCompilationSettings()),pe=new Map,de=sQ(Z(),t.getCanonicalFileName,t.getCompilationSettings(),oe.getPackageJsonInfoCache(),oe.optionsToRedirectsKey),ue=new Map,Ie=R3(Z(),t.getCanonicalFileName,_ue(t.getCompilationSettings()),oe.getPackageJsonInfoCache()),we=new Map,he=new Map,Ae=tPe(r,Z),ke=t.toPath(Ae),Te=af(ke),De=new Map,qe=new Map,se=new Map,Ne=new Map;return{rootDirForResolution:r,resolvedModuleNames:re,resolvedTypeReferenceDirectives:pe,resolvedLibraries:ue,resolvedFileToResolution:T,resolutionsWithFailedLookups:C,resolutionsWithOnlyAffectingLocations:b,directoryWatchesOfFailedLookups:we,fileWatchesOfAffectingLocations:he,packageDirWatchers:qe,dirPathToSymlinkPackageRefCount:se,watchFailedLookupLocationsOfExternalModuleResolutions:_i,getModuleResolutionCache:()=>oe,startRecordingFilesWithChangedResolutions:Pe,finishRecordingFilesWithChangedResolutions:We,startCachingPerDirectoryResolution:$e,finishCachingPerDirectoryResolution:Me,resolveModuleNameLiterals:Ei,resolveTypeReferenceDirectiveReferences:zt,resolveLibrary:tn,resolveSingleModuleNameWithoutWatching:xn,removeResolutionsFromProjectReferenceRedirects:us,removeResolutionsOfFile:Xr,hasChangedAutomaticTypeDirectiveNames:()=>N,invalidateResolutionOfFile:ma,invalidateResolutionsOfFailedLookupLocations:St,setFilesWithInvalidatedNonRelativeUnresolvedImports:ka,createHasInvalidatedResolutions:Nt,isFileWithInvalidatedNonRelativeUnresolvedImports:ze,updateTypeRootsWatch:gt,closeTypeRootsWatch:Se,clear:Oe,onChangesAffectModuleResolution:He};function Oe(){X_(we,Zm),X_(he,Zm),De.clear(),qe.clear(),se.clear(),g.clear(),Se(),re.clear(),pe.clear(),T.clear(),C.clear(),b.clear(),H=void 0,U=void 0,q=void 0,F=void 0,R=void 0,X=!1,oe.clear(),de.clear(),oe.update(t.getCompilationSettings()),de.update(t.getCompilationSettings()),Ie.clear(),E.clear(),ue.clear(),N=!1}function He(){X=!0,oe.clearAllExceptPackageJsonInfoCache(),de.clearAllExceptPackageJsonInfoCache(),oe.update(t.getCompilationSettings()),de.update(t.getCompilationSettings())}function Pe(){u=[]}function We(){const Je=u;return u=void 0,Je}function ze(Je){if(!p)return!1;const Rt=p.get(Je);return!!Rt&&!!Rt.length}function Nt(Je,Rt){St();const Ct=h;return h=void 0,{hasInvalidatedResolutions:ii=>Je(ii)||X||!!(Ct!=null&&Ct.has(ii))||ze(ii),hasInvalidatedLibResolutions:ii=>{var vt;return Rt(ii)||!!((vt=ue==null?void 0:ue.get(ii))!=null&&vt.isInvalidated)}}}function $e(){oe.isReadonly=void 0,de.isReadonly=void 0,Ie.isReadonly=void 0,oe.getPackageJsonInfoCache().isReadonly=void 0,oe.clearAllExceptPackageJsonInfoCache(),de.clearAllExceptPackageJsonInfoCache(),Ie.clearAllExceptPackageJsonInfoCache(),ko(),De.clear()}function et(Je){ue.forEach((Rt,Ct)=>{var ii;(ii=Je==null?void 0:Je.resolvedLibReferences)!=null&&ii.has(Ct)||(at(Rt,t.toPath(FQ(t.getCompilationSettings(),Z(),Ct)),sP),ue.delete(Ct))})}function Me(Je,Rt){p=void 0,X=!1,ko(),Je!==Rt&&(et(Je),Je==null||Je.getSourceFiles().forEach(Ct=>{var ii;const vt=((ii=Ct.packageJsonLocations)==null?void 0:ii.length)??0,Ni=E.get(Ct.resolvedPath)??w;for(let ji=Ni.length;ji<vt;ji++)qr(Ct.packageJsonLocations[ji],!1);if(Ni.length>vt)for(let ji=vt;ji<Ni.length;ji++)he.get(Ni[ji]).files--;vt?E.set(Ct.resolvedPath,Ct.packageJsonLocations):E.delete(Ct.resolvedPath)}),E.forEach((Ct,ii)=>{const vt=Je==null?void 0:Je.getSourceFileByPath(ii);(!vt||vt.resolvedPath!==ii)&&(Ct.forEach(Ni=>he.get(Ni).files--),E.delete(ii))})),we.forEach(wt),he.forEach(Et),qe.forEach(ut),N=!1,oe.isReadonly=!0,de.isReadonly=!0,Ie.isReadonly=!0,oe.getPackageJsonInfoCache().isReadonly=!0,De.clear()}function ut(Je,Rt){Je.dirPathToWatcher.size===0&&qe.delete(Rt)}function wt(Je,Rt){Je.refCount===0&&(we.delete(Rt),Je.watcher.close())}function Et(Je,Rt){var Ct;Je.files===0&&Je.resolutions===0&&!((Ct=Je.symlinks)!=null&&Ct.size)&&(he.delete(Rt),Je.watcher.close())}function dt({entries:Je,containingFile:Rt,containingSourceFile:Ct,redirectedReference:ii,options:vt,perFileCache:Ni,reusedNames:ji,loader:gr,getResolutionWithResolvedFileName:te,deferWatchingNonRelativeResolution:tt,shouldRetryResolution:Gt,logChanges:le}){const Ue=t.toPath(Rt),be=Ni.get(Ue)||Ni.set(Ue,M3()).get(Ue),Qt=[],lt=le&&ze(Ue),st=t.getCurrentProgram(),hi=st&&st.getResolvedProjectReferenceToRedirect(Rt),vn=hi?!ii||ii.sourceFile.path!==hi.sourceFile.path:!!ii,ln=M3();for(const Pt of Je){const Bt=gr.nameAndMode.getName(Pt),fi=gr.nameAndMode.getMode(Pt,Ct,(ii==null?void 0:ii.commandLine.options)||vt);let wi=be.get(Bt,fi);if(!ln.has(Bt,fi)&&(X||vn||!wi||wi.isInvalidated||lt&&!Gd(Bt)&&Gt(wi))){const Ri=wi;wi=gr.resolve(Bt,fi),t.onDiscoveredSymlink&&k8t(wi)&&t.onDiscoveredSymlink(),be.set(Bt,fi,wi),wi!==Ri&&(_i(Bt,wi,Ue,te,tt),Ri&&at(Ri,Ue,te)),le&&u&&!Un(Ri,wi)&&(u.push(Ue),le=!1)}else{const Ri=JQ(t);if(mx(vt,Ri)&&!ln.has(Bt,fi)){const Ai=te(wi);bo(Ri,Ni===re?Ai!=null&&Ai.resolvedFileName?Ai.packageId?k.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:k.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:k.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved:Ai!=null&&Ai.resolvedFileName?Ai.packageId?k.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:k.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2:k.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved,Bt,Rt,Ai==null?void 0:Ai.resolvedFileName,(Ai==null?void 0:Ai.packageId)&&zk(Ai.packageId))}}j.assert(wi!==void 0&&!wi.isInvalidated),ln.set(Bt,fi,!0),Qt.push(wi)}return ji==null||ji.forEach(Pt=>ln.set(gr.nameAndMode.getName(Pt),gr.nameAndMode.getMode(Pt,Ct,(ii==null?void 0:ii.commandLine.options)||vt),!0)),be.size()!==ln.size()&&be.forEach((Pt,Bt,fi)=>{ln.has(Bt,fi)||(at(Pt,Ue,te),be.delete(Bt,fi))}),Qt;function Un(Pt,Bt){if(Pt===Bt)return!0;if(!Pt||!Bt)return!1;const fi=te(Pt),wi=te(Bt);return fi===wi?!0:!fi||!wi?!1:fi.resolvedFileName===wi.resolvedFileName}}function zt(Je,Rt,Ct,ii,vt,Ni){return dt({entries:Je,containingFile:Rt,containingSourceFile:vt,redirectedReference:Ct,options:ii,reusedNames:Ni,perFileCache:pe,loader:MQ(Rt,Ct,ii,JQ(t),de),getResolutionWithResolvedFileName:EG,shouldRetryResolution:ji=>ji.resolvedTypeReferenceDirective===void 0,deferWatchingNonRelativeResolution:!1})}function Ei(Je,Rt,Ct,ii,vt,Ni){return dt({entries:Je,containingFile:Rt,containingSourceFile:vt,redirectedReference:Ct,options:ii,reusedNames:Ni,perFileCache:re,loader:iPe(Rt,Ct,ii,t,oe),getResolutionWithResolvedFileName:sP,shouldRetryResolution:ji=>!ji.resolvedModule||!t7(ji.resolvedModule.extension),logChanges:a,deferWatchingNonRelativeResolution:!0})}function tn(Je,Rt,Ct,ii){const vt=JQ(t);let Ni=ue==null?void 0:ue.get(ii);if(!Ni||Ni.isInvalidated){const ji=Ni;Ni=oQ(Je,Rt,Ct,vt,Ie);const gr=t.toPath(Rt);_i(Je,Ni,gr,sP,!1),ue.set(ii,Ni),ji&&at(ji,gr,sP)}else if(mx(Ct,vt)){const ji=sP(Ni);bo(vt,ji!=null&&ji.resolvedFileName?ji.packageId?k.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:k.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:k.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved,Je,Rt,ji==null?void 0:ji.resolvedFileName,(ji==null?void 0:ji.packageId)&&zk(ji.packageId))}return Ni}function xn(Je,Rt){var Ct,ii;const vt=t.toPath(Rt),Ni=re.get(vt),ji=Ni==null?void 0:Ni.get(Je,void 0);if(ji&&!ji.isInvalidated)return ji;const gr=(Ct=t.beforeResolveSingleModuleNameWithoutWatching)==null?void 0:Ct.call(t,oe),te=JQ(t),tt=nA(Je,Rt,t.getCompilationSettings(),te,oe);return(ii=t.afterResolveSingleModuleNameWithoutWatching)==null||ii.call(t,oe,Je,Rt,tt,gr),tt}function Pn(Je){return su(Je,"/node_modules/@types")}function _i(Je,Rt,Ct,ii,vt){if((Rt.files??(Rt.files=new Set)).add(Ct),Rt.files.size!==1)return;!vt||Gd(Je)?On(Rt):g.add(Rt);const Ni=ii(Rt);if(Ni&&Ni.resolvedFileName){const ji=t.toPath(Ni.resolvedFileName);let gr=T.get(ji);gr||T.set(ji,gr=new Set),gr.add(Rt)}}function Fi(Je,Rt){const Ct=t.toPath(Je),ii=Pde(Je,Ct,Ae,ke,Te,Z,t.preferNonRecursiveWatch);if(ii){const{dir:vt,dirPath:Ni,nonRecursive:ji,packageDir:gr,packageDirPath:te}=ii;Ni===ke?(j.assert(ji),j.assert(!gr),Rt=!0):Qs(vt,Ni,gr,te,ji)}return Rt}function On(Je){var Rt;j.assert(!!((Rt=Je.files)!=null&&Rt.size));const{failedLookupLocations:Ct,affectingLocations:ii,alternateResult:vt}=Je;if(!(Ct!=null&&Ct.length)&&!(ii!=null&&ii.length)&&!vt)return;(Ct!=null&&Ct.length||vt)&&C.add(Je);let Ni=!1;if(Ct)for(const ji of Ct)Ni=Fi(ji,Ni);vt&&(Ni=Fi(vt,Ni)),Ni&&Qs(Ae,ke,void 0,void 0,!0),pn(Je,!(Ct!=null&&Ct.length)&&!vt)}function pn(Je,Rt){var Ct;j.assert(!!((Ct=Je.files)!=null&&Ct.size));const{affectingLocations:ii}=Je;if(ii!=null&&ii.length){Rt&&b.add(Je);for(const vt of ii)qr(vt,!0)}}function qr(Je,Rt){const Ct=he.get(Je);if(Ct){Rt?Ct.resolutions++:Ct.files++;return}let ii=Je,vt=!1,Ni;t.realpath&&(ii=t.realpath(Je),Je!==ii&&(vt=!0,Ni=he.get(ii)));const ji=Rt?1:0,gr=Rt?0:1;if(!vt||!Ni){const te={watcher:ZLe(t.toPath(ii))?t.watchAffectingFileLocation(ii,(tt,Gt)=>{Q==null||Q.addOrDeleteFile(tt,t.toPath(ii),Gt),Fs(ii,oe.getPackageJsonInfoCache().getInternalMap()),t.scheduleInvalidateResolutionsOfFailedLookupLocations()}):t5,resolutions:vt?0:ji,files:vt?0:gr,symlinks:void 0};he.set(ii,te),vt&&(Ni=te)}if(vt){j.assert(!!Ni);const te={watcher:{close:()=>{var tt;const Gt=he.get(ii);(tt=Gt==null?void 0:Gt.symlinks)!=null&&tt.delete(Je)&&!Gt.symlinks.size&&!Gt.resolutions&&!Gt.files&&(he.delete(ii),Gt.watcher.close())}},resolutions:ji,files:gr,symlinks:void 0};he.set(Je,te),(Ni.symlinks??(Ni.symlinks=new Set)).add(Je)}}function Fs(Je,Rt){var Ct;const ii=he.get(Je);ii!=null&&ii.resolutions&&(F??(F=new Set)).add(Je),ii!=null&&ii.files&&(R??(R=new Set)).add(Je),(Ct=ii==null?void 0:ii.symlinks)==null||Ct.forEach(vt=>Fs(vt,Rt)),Rt==null||Rt.delete(t.toPath(Je))}function ko(){g.forEach(On),g.clear()}function ls(Je,Rt,Ct,ii,vt){j.assert(!vt);let Ni=De.get(ii),ji=qe.get(ii);if(Ni===void 0){const tt=t.realpath(Ct);Ni=tt!==Ct&&t.toPath(tt)!==ii,De.set(ii,Ni),ji?ji.isSymlink!==Ni&&(ji.dirPathToWatcher.forEach(Gt=>{yi(ji.isSymlink?ii:Rt),Gt.watcher=te()}),ji.isSymlink=Ni):qe.set(ii,ji={dirPathToWatcher:new Map,isSymlink:Ni})}else j.assertIsDefined(ji),j.assert(Ni===ji.isSymlink);const gr=ji.dirPathToWatcher.get(Rt);gr?gr.refCount++:(ji.dirPathToWatcher.set(Rt,{watcher:te(),refCount:1}),Ni&&se.set(Rt,(se.get(Rt)??0)+1));function te(){return Ni?Mn(Ct,ii,vt):Mn(Je,Rt,vt)}}function Qs(Je,Rt,Ct,ii,vt){!ii||!t.realpath?Mn(Je,Rt,vt):ls(Je,Rt,Ct,ii,vt)}function Mn(Je,Rt,Ct){let ii=we.get(Rt);return ii?(j.assert(!!Ct==!!ii.nonRecursive),ii.refCount++):we.set(Rt,ii={watcher:Sn(Je,Rt,Ct),refCount:1,nonRecursive:Ct}),ii}function Zs(Je,Rt){const Ct=t.toPath(Je),ii=Pde(Je,Ct,Ae,ke,Te,Z,t.preferNonRecursiveWatch);if(ii){const{dirPath:vt,packageDirPath:Ni}=ii;if(vt===ke)Rt=!0;else if(Ni&&t.realpath){const ji=qe.get(Ni),gr=ji.dirPathToWatcher.get(vt);if(gr.refCount--,gr.refCount===0&&(yi(ji.isSymlink?Ni:vt),ji.dirPathToWatcher.delete(vt),ji.isSymlink)){const te=se.get(vt)-1;te===0?se.delete(vt):se.set(vt,te)}}else yi(vt)}return Rt}function at(Je,Rt,Ct){if(j.checkDefined(Je.files).delete(Rt),Je.files.size)return;Je.files=void 0;const ii=Ct(Je);if(ii&&ii.resolvedFileName){const gr=t.toPath(ii.resolvedFileName),te=T.get(gr);te!=null&&te.delete(Je)&&!te.size&&T.delete(gr)}const{failedLookupLocations:vt,affectingLocations:Ni,alternateResult:ji}=Je;if(C.delete(Je)){let gr=!1;if(vt)for(const te of vt)gr=Zs(te,gr);ji&&(gr=Zs(ji,gr)),gr&&yi(ke)}else Ni!=null&&Ni.length&&b.delete(Je);if(Ni)for(const gr of Ni){const te=he.get(gr);te.resolutions--}}function yi(Je){const Rt=we.get(Je);Rt.refCount--}function Sn(Je,Rt,Ct){return t.watchDirectoryOfFailedLookupLocation(Je,ii=>{const vt=t.toPath(ii);Q&&Q.addOrDeleteFileOrDirectory(ii,vt),Ji(vt,Rt===vt)},Ct?0:1)}function dr(Je,Rt,Ct){const ii=Je.get(Rt);ii&&(ii.forEach(vt=>at(vt,Rt,Ct)),Je.delete(Rt))}function us(Je){if(!Xl(Je,".json"))return;const Rt=t.getCurrentProgram();if(!Rt)return;const Ct=Rt.getResolvedProjectReferenceByPath(Je);Ct&&Ct.commandLine.fileNames.forEach(ii=>Xr(t.toPath(ii)))}function Xr(Je){dr(re,Je,sP),dr(pe,Je,EG)}function Gs(Je,Rt){if(!Je)return!1;let Ct=!1;return Je.forEach(ii=>{if(!(ii.isInvalidated||!Rt(ii))){ii.isInvalidated=Ct=!0;for(const vt of j.checkDefined(ii.files))(h??(h=new Set)).add(vt),N=N||su(vt,Z7)}}),Ct}function ma(Je){Xr(Je);const Rt=N;Gs(T.get(Je),Pk)&&N&&!Rt&&t.onChangedAutomaticTypeDirectiveNames()}function ka(Je){j.assert(p===Je||p===void 0),p=Je}function Ji(Je,Rt){if(Rt)(q||(q=new Set)).add(Je);else{const Ct=qQ(Je);if(!Ct||(Je=Ct,t.fileIsOpen(Je)))return!1;const ii=ts(Je);if(Pn(Je)||eG(Je)||Pn(ii)||eG(ii))(H||(H=new Set)).add(Je),(U||(U=new Set)).add(Je);else{if(xLe(t.getCurrentProgram(),Je)||Xl(Je,".map"))return!1;(H||(H=new Set)).add(Je);const vt=MH(Je,!0);vt&&(U||(U=new Set)).add(vt)}}t.scheduleInvalidateResolutionsOfFailedLookupLocations()}function ac(){const Je=oe.getPackageJsonInfoCache().getInternalMap();Je&&(H||U||q)&&Je.forEach((Rt,Ct)=>xe(Ct)?Je.delete(Ct):void 0)}function St(){var Je;if(X)return R=void 0,ac(),(H||U||q||F)&&Gs(ue,ri),H=void 0,U=void 0,q=void 0,F=void 0,!0;let Rt=!1;return R&&((Je=t.getCurrentProgram())==null||Je.getSourceFiles().forEach(Ct=>{Ft(Ct.packageJsonLocations,ii=>R.has(ii))&&((h??(h=new Set)).add(Ct.path),Rt=!0)}),R=void 0),!H&&!U&&!q&&!F||(Rt=Gs(C,ri)||Rt,ac(),H=void 0,U=void 0,q=void 0,Rt=Gs(b,pt)||Rt,F=void 0),Rt}function ri(Je){var Rt;return pt(Je)?!0:!H&&!U&&!q?!1:((Rt=Je.failedLookupLocations)==null?void 0:Rt.some(Ct=>xe(t.toPath(Ct))))||!!Je.alternateResult&&xe(t.toPath(Je.alternateResult))}function xe(Je){return(H==null?void 0:H.has(Je))||Y((U==null?void 0:U.keys())||[],Rt=>so(Je,Rt)?!0:void 0)||Y((q==null?void 0:q.keys())||[],Rt=>Je.length>Rt.length&&so(Je,Rt)&&(Noe(Rt)||Je[Rt.length]===Kl)?!0:void 0)}function pt(Je){var Rt;return!!F&&((Rt=Je.affectingLocations)==null?void 0:Rt.some(Ct=>F.has(Ct)))}function Se(){X_(Ne,d0)}function Ze(Je){return Dt(Je)?t.watchTypeRootsDirectory(Je,Rt=>{const Ct=t.toPath(Rt);Q&&Q.addOrDeleteFileOrDirectory(Rt,Ct),N=!0,t.onChangedAutomaticTypeDirectiveNames();const ii=ePe(Je,t.toPath(Je),ke,Te,Z,t.preferNonRecursiveWatch,vt=>we.has(vt)||se.has(vt));ii&&Ji(Ct,ii===Ct)},1):t5}function gt(){const Je=t.getCompilationSettings();if(Je.types){Se();return}const Rt=F7(Je,{getCurrentDirectory:Z});Rt?Q8(Ne,new Set(Rt),{createNewValue:Ze,onDeleteValue:d0}):Se()}function Dt(Je){return t.getCompilationSettings().typeRoots?!0:QLe(t.toPath(Je))}}function k8t(t){var r,a;return!!((r=t.resolvedModule)!=null&&r.originalPath||(a=t.resolvedTypeReferenceDirective)!=null&&a.originalPath)}var htt=Pd?{getCurrentDirectory:()=>Pd.getCurrentDirectory(),getNewLine:()=>Pd.newLine,getCanonicalFileName:Mf(Pd.useCaseSensitiveFileNames)}:void 0;function aA(t,r){const a=t===Pd&&htt?htt:{getCurrentDirectory:()=>t.getCurrentDirectory(),getNewLine:()=>t.newLine,getCanonicalFileName:Mf(t.useCaseSensitiveFileNames)};if(!r)return h=>t.write(fde(h,a));const u=new Array(1);return h=>{u[0]=h,t.write(LLe(u,a)+a.getNewLine()),u[0]=void 0}}function _tt(t,r,a){return t.clearScreen&&!a.preserveWatchOutput&&!a.extendedDiagnostics&&!a.diagnostics&&Yt(ptt,r.code)?(t.clearScreen(),!0):!1}var ptt=[k.Starting_compilation_in_watch_mode.code,k.File_change_detected_Starting_incremental_compilation.code];function T8t(t,r){return Yt(ptt,t.code)?r+r:r}function ij(t){return t.now?t.now().toLocaleTimeString("en-US",{timeZone:"UTC"}).replace(" "," "):new Date().toLocaleTimeString()}function Ode(t,r){return r?(a,u,h)=>{_tt(t,a,h);let p=`[${pD(ij(t),"\x1B[90m")}] `;p+=`${$1(a.messageText,t.newLine)}${u+u}`,t.write(p)}:(a,u,h)=>{let p="";_tt(t,a,h)||(p+=u),p+=`${ij(t)} - `,p+=`${$1(a.messageText,t.newLine)}${T8t(a,u)}`,t.write(p)}}function nPe(t,r,a,u,h,p){const g=h;g.onUnRecoverableConfigFileDiagnostic=b=>ytt(h,p,b);const C=IH(t,r,g,a,u);return g.onUnRecoverableConfigFileDiagnostic=void 0,C}function GQ(t){return $i(t,r=>r.category===1)}function KQ(t){return $t(t,a=>a.category===1).map(a=>{if(a.file!==void 0)return`${a.file.fileName}`}).map(a=>{if(a===void 0)return;const u=Fe(t,h=>h.file!==void 0&&h.file.fileName===a);if(u!==void 0){const{line:h}=Ia(u.file,u.start);return{fileName:a,line:h+1}}})}function Mde(t){return t===1?k.Found_1_error_Watching_for_file_changes:k.Found_0_errors_Watching_for_file_changes}function mtt(t,r){const a=pD(":"+t.line,"\x1B[90m");return r8(t.fileName)&&r8(r)?c0(r,t.fileName,!1)+a:t.fileName+a}function Rde(t,r,a,u){if(t===0)return"";const h=r.filter(E=>E!==void 0),p=h.map(E=>`${E.fileName}:${E.line}`).filter((E,N,R)=>R.indexOf(E)===N),g=h[0]&&mtt(h[0],u.getCurrentDirectory());let C;t===1?C=r[0]!==void 0?[k.Found_1_error_in_0,g]:[k.Found_1_error]:C=p.length===0?[k.Found_0_errors,t]:p.length===1?[k.Found_0_errors_in_the_same_file_starting_at_Colon_1,t,g]:[k.Found_0_errors_in_1_files,t,p.length];const b=Zl(...C),T=p.length>1?D8t(h,u):"";return`${a}${$1(b.messageText,a)}${a}${a}${T}`}function D8t(t,r){const a=t.filter((N,R,F)=>R===F.findIndex(H=>(H==null?void 0:H.fileName)===(N==null?void 0:N.fileName)));if(a.length===0)return"";const u=N=>Math.log(N)*Math.LOG10E+1,h=a.map(N=>[N,$i(t,R=>R.fileName===N.fileName)]),p=Qse(h,0,N=>N[1]),g=k.Errors_Files.message,C=g.split(" ")[0].length,b=Math.max(C,u(p)),T=Math.max(u(p)-C,0);let E="";return E+=" ".repeat(T)+g+`
+`,h.forEach(N=>{const[R,F]=N,H=Math.log(F)*Math.LOG10E+1|0,U=H<b?" ".repeat(b-H):"",q=mtt(R,r.getCurrentDirectory());E+=`${U}${F} ${q}
+`}),E}function Fde(t){return!!t.state}function E8t(t,r){const a=t.getCompilerOptions();a.explainFiles?Bde(Fde(t)?t.getProgram():t,r):(a.listFiles||a.listFilesOnly)&&O(t.getSourceFiles(),u=>{r(u.fileName)})}function Bde(t,r){var a,u;const h=t.getFileIncludeReasons(),p=g=>s8(g,t.getCurrentDirectory(),t.getCanonicalFileName);for(const g of t.getSourceFiles())r(`${J3(g,p)}`),(a=h.get(g.path))==null||a.forEach(C=>r(` ${jde(t,C,p).messageText}`)),(u=Wde(g,t.getCompilerOptionsForFile(g),p))==null||u.forEach(C=>r(` ${C.messageText}`))}function Wde(t,r,a){var u;let h;if(t.path!==t.resolvedPath&&(h??(h=[])).push(jo(void 0,k.File_is_output_of_project_reference_source_0,J3(t.originalFileName,a))),t.redirectInfo&&(h??(h=[])).push(jo(void 0,k.File_redirects_to_file_0,J3(t.redirectInfo.redirectTarget,a))),Cp(t))switch(jI(t,r)){case 99:t.packageJsonScope&&(h??(h=[])).push(jo(void 0,k.File_is_ECMAScript_module_because_0_has_field_type_with_value_module,J3(va(t.packageJsonLocations),a)));break;case 1:t.packageJsonScope?(h??(h=[])).push(jo(void 0,t.packageJsonScope.contents.packageJsonContent.type?k.File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module:k.File_is_CommonJS_module_because_0_does_not_have_field_type,J3(va(t.packageJsonLocations),a))):(u=t.packageJsonLocations)!=null&&u.length&&(h??(h=[])).push(jo(void 0,k.File_is_CommonJS_module_because_package_json_was_not_found));break}return h}function Vde(t,r){var a;const u=t.getCompilerOptions().configFile;if(!((a=u==null?void 0:u.configFileSpecs)!=null&&a.validatedFilesSpec))return;const h=t.getCanonicalFileName(r),p=ts(wo(u.fileName,t.getCurrentDirectory())),g=ct(u.configFileSpecs.validatedFilesSpec,C=>t.getCanonicalFileName(wo(C,p))===h);return g!==-1?u.configFileSpecs.validatedFilesSpecBeforeSubstitution[g]:void 0}function Hde(t,r){var a,u;const h=t.getCompilerOptions().configFile;if(!((a=h==null?void 0:h.configFileSpecs)!=null&&a.validatedIncludeSpecs))return;if(h.configFileSpecs.isDefaultIncludeSpec)return!0;const p=Xl(r,".json"),g=ts(wo(h.fileName,t.getCurrentDirectory())),C=t.useCaseSensitiveFileNames(),b=ct((u=h==null?void 0:h.configFileSpecs)==null?void 0:u.validatedIncludeSpecs,T=>{if(p&&!su(T,".json"))return!1;const E=FDe(T,g,"files");return!!E&&ax(`(${E})$`,C).test(r)});return b!==-1?h.configFileSpecs.validatedIncludeSpecsBeforeSubstitution[b]:void 0}function jde(t,r,a){var u,h;const p=t.getCompilerOptions();if(_2(r)){const g=Y7(t,r),C=U3(g)?g.file.text.substring(g.pos,g.end):`"${g.text}"`;let b;switch(j.assert(U3(g)||r.kind===3,"Only synthetic references are imports"),r.kind){case 3:U3(g)?b=g.packageId?k.Imported_via_0_from_file_1_with_packageId_2:k.Imported_via_0_from_file_1:g.text===jk?b=g.packageId?k.Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions:k.Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions:b=g.packageId?k.Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions:k.Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions;break;case 4:j.assert(!g.packageId),b=k.Referenced_via_0_from_file_1;break;case 5:b=g.packageId?k.Type_library_referenced_via_0_from_file_1_with_packageId_2:k.Type_library_referenced_via_0_from_file_1;break;case 7:j.assert(!g.packageId),b=k.Library_referenced_via_0_from_file_1;break;default:j.assertNever(r)}return jo(void 0,b,C,J3(g.file,a),g.packageId&&zk(g.packageId))}switch(r.kind){case 0:if(!((u=p.configFile)!=null&&u.configFileSpecs))return jo(void 0,k.Root_file_specified_for_compilation);const g=wo(t.getRootFileNames()[r.index],t.getCurrentDirectory());if(Vde(t,g))return jo(void 0,k.Part_of_files_list_in_tsconfig_json);const b=Hde(t,g);return Oo(b)?jo(void 0,k.Matched_by_include_pattern_0_in_1,b,J3(p.configFile,a)):jo(void 0,b?k.Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk:k.Root_file_specified_for_compilation);case 1:case 2:const T=r.kind===2,E=j.checkDefined((h=t.getResolvedProjectReferences())==null?void 0:h[r.index]);return jo(void 0,p.outFile?T?k.Output_from_referenced_project_0_included_because_1_specified:k.Source_from_referenced_project_0_included_because_1_specified:T?k.Output_from_referenced_project_0_included_because_module_is_specified_as_none:k.Source_from_referenced_project_0_included_because_module_is_specified_as_none,J3(E.sourceFile.fileName,a),p.outFile?"--outFile":"--out");case 8:{const N=p.types?r.packageId?[k.Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1,r.typeReference,zk(r.packageId)]:[k.Entry_point_of_type_library_0_specified_in_compilerOptions,r.typeReference]:r.packageId?[k.Entry_point_for_implicit_type_library_0_with_packageId_1,r.typeReference,zk(r.packageId)]:[k.Entry_point_for_implicit_type_library_0,r.typeReference];return jo(void 0,...N)}case 6:{if(r.index!==void 0)return jo(void 0,k.Library_0_specified_in_compilerOptions,p.lib[r.index]);const N=FK(Ja(p)),R=N?[k.Default_library_for_target_0,N]:[k.Default_library];return jo(void 0,...R)}default:j.assertNever(r)}}function J3(t,r){const a=Oo(t)?t:t.fileName;return r?r(a):a}function XQ(t,r,a,u,h,p,g,C){const b=t.getCompilerOptions(),T=t.getConfigFileParsingDiagnostics().slice(),E=T.length;Sr(T,t.getSyntacticDiagnostics(void 0,p)),T.length===E&&(Sr(T,t.getOptionsDiagnostics(p)),b.listFilesOnly||(Sr(T,t.getGlobalDiagnostics(p)),T.length===E&&Sr(T,t.getSemanticDiagnostics(void 0,p)),b.noEmit&&Q_(b)&&T.length===E&&Sr(T,t.getDeclarationDiagnostics(void 0,p))));const N=b.listFilesOnly?{emitSkipped:!0,diagnostics:w}:t.emit(void 0,h,p,g,C);Sr(T,N.diagnostics);const R=O6(T);if(R.forEach(r),a){const F=t.getCurrentDirectory();O(N.emittedFiles,H=>{const U=wo(H,F);a(`TSFILE: ${U}`)}),E8t(t,a)}return u&&u(GQ(R),KQ(R)),{emitResult:N,diagnostics:R}}function zde(t,r,a,u,h,p,g,C){const{emitResult:b,diagnostics:T}=XQ(t,r,a,u,h,p,g,C);return b.emitSkipped&&T.length>0?1:T.length>0?2:0}var t5={close:Tc},i5=()=>t5;function Ude(t=Pd,r){return{onWatchStatusChange:r||Ode(t),watchFile:to(t,t.watchFile)||i5,watchDirectory:to(t,t.watchDirectory)||i5,setTimeout:to(t,t.setTimeout)||Tc,clearTimeout:to(t,t.clearTimeout)||Tc,preferNonRecursiveWatch:t.preferNonRecursiveWatch}}var Kd={ConfigFile:"Config file",ExtendedConfigFile:"Extended config file",SourceFile:"Source file",MissingFile:"Missing file",WildcardDirectory:"Wild card directory",FailedLookupLocations:"Failed Lookup Locations",AffectingFileLocation:"File location affecting resolution",TypeRoots:"Type roots",ConfigFileOfReferencedProject:"Config file of referened project",ExtendedConfigOfReferencedProject:"Extended config file of referenced project",WildcardDirectoryOfReferencedProject:"Wild card directory of referenced project",PackageJson:"package.json file",ClosedScriptInfo:"Closed Script info",ConfigFileForInferredRoot:"Config file for the inferred project root",NodeModules:"node_modules for closed script infos and package.jsons affecting module specifier cache",MissingSourceMapFile:"Missing source map file",NoopConfigFileForInferredRoot:"Noop Config file for the inferred project root",MissingGeneratedFile:"Missing generated file",NodeModulesForModuleSpecifierCache:"node_modules for module specifier cache invalidation",TypingInstallerLocationFile:"File location for typing installer",TypingInstallerLocationDirectory:"Directory location for typing installer"};function qde(t,r){const a=t.trace?r.extendedDiagnostics?2:r.diagnostics?1:0:0,u=a!==0?p=>t.trace(p):Tc,h=ade(t,a,u);return h.writeLog=u,h}function $de(t,r,a=t){const u=t.useCaseSensitiveFileNames(),h={getSourceFile:ude((p,g)=>g?t.readFile(p,g):h.readFile(p),void 0),getDefaultLibLocation:to(t,t.getDefaultLibLocation),getDefaultLibFileName:p=>t.getDefaultLibFileName(p),writeFile:dde((p,g,C)=>t.writeFile(p,g,C),p=>t.createDirectory(p),p=>t.directoryExists(p)),getCurrentDirectory:Bh(()=>t.getCurrentDirectory()),useCaseSensitiveFileNames:()=>u,getCanonicalFileName:Mf(u),getNewLine:()=>mS(r()),fileExists:p=>t.fileExists(p),readFile:p=>t.readFile(p),trace:to(t,t.trace),directoryExists:to(a,a.directoryExists),getDirectories:to(a,a.getDirectories),realpath:to(t,t.realpath),getEnvironmentVariable:to(t,t.getEnvironmentVariable)||(()=>""),createHash:to(t,t.createHash),readDirectory:to(t,t.readDirectory),storeSignatureInfo:t.storeSignatureInfo,jsDocParsingMode:t.jsDocParsingMode};return h}function QQ(t,r){if(r.match(INe)){let a=r.length,u=a;for(let h=a-1;h>=0;h--){const p=r.charCodeAt(h);switch(p){case 10:h&&r.charCodeAt(h-1)===13&&h--;case 13:break;default:if(p<127||!mh(p)){u=h;continue}break}const g=r.substring(u,a);if(g.match(Oue)){r=r.substring(0,u);break}else if(!g.match(Mue))break;a=u}}return(t.createHash||n8)(r)}function ZQ(t){const r=t.getSourceFile;t.getSourceFile=(...a)=>{const u=r.call(t,...a);return u&&(u.version=QQ(t,u.text)),u}}function Jde(t,r){const a=Bh(()=>ts(ca(t.getExecutingFilePath())));return{useCaseSensitiveFileNames:()=>t.useCaseSensitiveFileNames,getNewLine:()=>t.newLine,getCurrentDirectory:Bh(()=>t.getCurrentDirectory()),getDefaultLibLocation:a,getDefaultLibFileName:u=>zr(a(),IW(u)),fileExists:u=>t.fileExists(u),readFile:(u,h)=>t.readFile(u,h),directoryExists:u=>t.directoryExists(u),getDirectories:u=>t.getDirectories(u),readDirectory:(u,h,p,g,C)=>t.readDirectory(u,h,p,g,C),realpath:to(t,t.realpath),getEnvironmentVariable:to(t,t.getEnvironmentVariable),trace:u=>t.write(u+t.newLine),createDirectory:u=>t.createDirectory(u),writeFile:(u,h,p)=>t.writeFile(u,h,p),createHash:to(t,t.createHash),createProgram:r||Lde,storeSignatureInfo:t.storeSignatureInfo,now:to(t,t.now)}}function gtt(t=Pd,r,a,u){const h=g=>t.write(g+t.newLine),p=Jde(t,r);return wg(p,Ude(t,u)),p.afterProgramCreate=g=>{const C=g.getCompilerOptions(),b=mS(C);XQ(g,a,h,T=>p.onWatchStatusChange(Zl(Mde(T),T),b,C,T))},p}function ytt(t,r,a){r(a),t.exit(1)}function Gde({configFileName:t,optionsToExtend:r,watchOptionsToExtend:a,extraFileExtensions:u,system:h,createProgram:p,reportDiagnostic:g,reportWatchStatus:C}){const b=g||aA(h),T=gtt(h,p,b,C);return T.onUnRecoverableConfigFileDiagnostic=E=>ytt(h,b,E),T.configFileName=t,T.optionsToExtend=r,T.watchOptionsToExtend=a,T.extraFileExtensions=u,T}function Kde({rootFiles:t,options:r,watchOptions:a,projectReferences:u,system:h,createProgram:p,reportDiagnostic:g,reportWatchStatus:C}){const b=gtt(h,p,g||aA(h),C);return b.rootFiles=t,b.options=r,b.watchOptions=a,b.projectReferences=u,b}function rPe(t){const r=t.system||Pd,a=t.host||(t.host=eZ(t.options,r)),u=sPe(t),h=zde(u,t.reportDiagnostic||aA(r),p=>a.trace&&a.trace(p),t.reportErrorSummary||t.options.pretty?(p,g)=>r.write(Rde(p,g,r.newLine,a)):void 0);return t.afterProgramEmitAndDiagnostics&&t.afterProgramEmitAndDiagnostics(u),h}function YQ(t,r){const a=h2(t);if(!a)return;let u;if(r.getBuildInfo)u=r.getBuildInfo(a,t.configFilePath);else{const h=r.readFile(a);if(!h)return;u=nde(a,h)}if(!(!u||u.version!==v||!tj(u)))return GLe(u,a,r)}function eZ(t,r=Pd){const a=PQ(t,void 0,r);return a.createHash=to(r,r.createHash),a.storeSignatureInfo=r.storeSignatureInfo,ZQ(a),Q7(a,u=>ol(u,a.getCurrentDirectory(),a.getCanonicalFileName)),a}function sPe({rootNames:t,options:r,configFileParsingDiagnostics:a,projectReferences:u,host:h,createProgram:p}){h=h||eZ(r),p=p||Lde;const g=YQ(r,h);return p(t,r,h,g,a,u)}function vtt(t,r,a,u,h,p,g,C){return Ao(t)?Kde({rootFiles:t,options:r,watchOptions:C,projectReferences:g,system:a,createProgram:u,reportDiagnostic:h,reportWatchStatus:p}):Gde({configFileName:t,optionsToExtend:r,watchOptionsToExtend:g,extraFileExtensions:C,system:a,createProgram:u,reportDiagnostic:h,reportWatchStatus:p})}function Xde(t){let r,a,u,h,p,g,C,b,T=t.extendedConfigCache,E=!1;const N=new Map;let R,F=!1;const H=t.useCaseSensitiveFileNames(),U=t.getCurrentDirectory(),{configFileName:q,optionsToExtend:X={},watchOptionsToExtend:Z,extraFileExtensions:Q,createProgram:re}=t;let{rootFiles:oe,options:pe,watchOptions:de,projectReferences:ue}=t,Ie,we,he=!1,Ae=!1;const ke=q===void 0?void 0:IQ(t,U,H),Te=ke||t,De=HQ(t,Te);let qe=xn();q&&t.configFileParsingResult&&(ka(t.configFileParsingResult),qe=xn()),ls(k.Starting_compilation_in_watch_mode),q&&!t.configFileParsingResult&&(qe=mS(X),j.assert(!oe),ma(),qe=xn()),j.assert(pe),j.assert(oe);const{watchFile:se,watchDirectory:Ne,writeLog:Oe}=qde(t,pe),He=Mf(H);Oe(`Current directory: ${U} CaseSensitiveFileNames: ${H}`);let Pe;q&&(Pe=se(q,Sn,2e3,de,Kd.ConfigFile));const We=$de(t,()=>pe,Te);ZQ(We);const ze=We.getSourceFile;We.getSourceFile=(Ct,...ii)=>pn(Ct,Pn(Ct),...ii),We.getSourceFileByPath=pn,We.getNewLine=()=>qe,We.fileExists=On,We.onReleaseOldSourceFile=ko,We.onReleaseParsedCommandLine=St,We.toPath=Pn,We.getCompilationSettings=()=>pe,We.useSourceOfProjectReferenceRedirect=to(t,t.useSourceOfProjectReferenceRedirect),We.preferNonRecursiveWatch=t.preferNonRecursiveWatch,We.watchDirectoryOfFailedLookupLocation=(Ct,ii,vt)=>Ne(Ct,ii,vt,de,Kd.FailedLookupLocations),We.watchAffectingFileLocation=(Ct,ii)=>se(Ct,ii,2e3,de,Kd.AffectingFileLocation),We.watchTypeRootsDirectory=(Ct,ii,vt)=>Ne(Ct,ii,vt,de,Kd.TypeRoots),We.getCachedDirectoryStructureHost=()=>ke,We.scheduleInvalidateResolutionsOfFailedLookupLocations=Zs,We.onInvalidatedResolution=yi,We.onChangedAutomaticTypeDirectiveNames=yi,We.fileIsOpen=w1,We.getCurrentProgram=dt,We.writeLog=Oe,We.getParsedCommandLine=Ji;const Nt=Ade(We,q?ts(wo(q,U)):U,!1);We.resolveModuleNameLiterals=to(t,t.resolveModuleNameLiterals),We.resolveModuleNames=to(t,t.resolveModuleNames),!We.resolveModuleNameLiterals&&!We.resolveModuleNames&&(We.resolveModuleNameLiterals=Nt.resolveModuleNameLiterals.bind(Nt)),We.resolveTypeReferenceDirectiveReferences=to(t,t.resolveTypeReferenceDirectiveReferences),We.resolveTypeReferenceDirectives=to(t,t.resolveTypeReferenceDirectives),!We.resolveTypeReferenceDirectiveReferences&&!We.resolveTypeReferenceDirectives&&(We.resolveTypeReferenceDirectiveReferences=Nt.resolveTypeReferenceDirectiveReferences.bind(Nt)),We.resolveLibrary=t.resolveLibrary?t.resolveLibrary.bind(t):Nt.resolveLibrary.bind(Nt),We.getModuleResolutionCache=t.resolveModuleNameLiterals||t.resolveModuleNames?to(t,t.getModuleResolutionCache):()=>Nt.getModuleResolutionCache();const et=!!t.resolveModuleNameLiterals||!!t.resolveTypeReferenceDirectiveReferences||!!t.resolveModuleNames||!!t.resolveTypeReferenceDirectives?to(t,t.hasInvalidatedResolutions)||Pk:w1,Me=t.resolveLibrary?to(t,t.hasInvalidatedLibResolutions)||Pk:w1;return r=YQ(pe,We),zt(),gt(),q&&Je(Pn(q),pe,de,Kd.ExtendedConfigFile),q?{getCurrentProgram:Et,getProgram:us,close:ut,getResolutionCache:wt}:{getCurrentProgram:Et,getProgram:us,updateRootFileNames:tn,close:ut,getResolutionCache:wt};function ut(){Mn(),Nt.clear(),X_(N,Ct=>{Ct&&Ct.fileWatcher&&(Ct.fileWatcher.close(),Ct.fileWatcher=void 0)}),Pe&&(Pe.close(),Pe=void 0),T==null||T.clear(),T=void 0,b&&(X_(b,Zm),b=void 0),h&&(X_(h,Zm),h=void 0),u&&(X_(u,d0),u=void 0),C&&(X_(C,Ct=>{var ii;(ii=Ct.watcher)==null||ii.close(),Ct.watcher=void 0,Ct.watchedDirectories&&X_(Ct.watchedDirectories,Zm),Ct.watchedDirectories=void 0}),C=void 0),r=void 0}function wt(){return Nt}function Et(){return r}function dt(){return r&&r.getProgramOrUndefined()}function zt(){Oe("Synchronizing program"),j.assert(pe),j.assert(oe),Mn();const Ct=Et();F&&(qe=xn(),Ct&&TG(Ct.getCompilerOptions(),pe)&&Nt.onChangesAffectModuleResolution());const{hasInvalidatedResolutions:ii,hasInvalidatedLibResolutions:vt}=Nt.createHasInvalidatedResolutions(et,Me),{originalReadFile:Ni,originalFileExists:ji,originalDirectoryExists:gr,originalCreateDirectory:te,originalWriteFile:tt,readFileWithCache:Gt}=Q7(We,Pn);return bde(dt(),oe,pe,le=>Fs(le,Gt),le=>We.fileExists(le),ii,vt,Qs,Ji,ue)?Ae&&(E&&ls(k.File_change_detected_Starting_incremental_compilation),r=re(void 0,void 0,We,r,we,ue),Ae=!1):(E&&ls(k.File_change_detected_Starting_incremental_compilation),Ei(ii,vt)),E=!1,t.afterProgramCreate&&Ct!==r&&t.afterProgramCreate(r),We.readFile=Ni,We.fileExists=ji,We.directoryExists=gr,We.createDirectory=te,We.writeFile=tt,r}function Ei(Ct,ii){Oe("CreatingProgramWith::"),Oe(` roots: ${JSON.stringify(oe)}`),Oe(` options: ${JSON.stringify(pe)}`),ue&&Oe(` projectReferences: ${JSON.stringify(ue)}`);const vt=F||!dt();F=!1,Ae=!1,Nt.startCachingPerDirectoryResolution(),We.hasInvalidatedResolutions=Ct,We.hasInvalidatedLibResolutions=ii,We.hasChangedAutomaticTypeDirectiveNames=Qs;const Ni=dt();if(r=re(oe,pe,We,r,we,ue),Nt.finishCachingPerDirectoryResolution(r.getProgram(),Ni),ode(r.getProgram(),u||(u=new Map),Se),vt&&Nt.updateTypeRootsWatch(),R){for(const ji of R)u.has(ji)||N.delete(ji);R=void 0}}function tn(Ct){j.assert(!q,"Cannot update root file names with config file watch mode"),oe=Ct,yi()}function xn(){return mS(pe||X)}function Pn(Ct){return ol(Ct,U,He)}function _i(Ct){return typeof Ct=="boolean"}function Fi(Ct){return typeof Ct.version=="boolean"}function On(Ct){const ii=Pn(Ct);return _i(N.get(ii))?!1:Te.fileExists(Ct)}function pn(Ct,ii,vt,Ni,ji){const gr=N.get(ii);if(_i(gr))return;const te=typeof vt=="object"?vt.impliedNodeFormat:void 0;if(gr===void 0||ji||Fi(gr)||gr.sourceFile.impliedNodeFormat!==te){const tt=ze(Ct,vt,Ni);if(gr)tt?(gr.sourceFile=tt,gr.version=tt.version,gr.fileWatcher||(gr.fileWatcher=ri(ii,Ct,xe,250,de,Kd.SourceFile))):(gr.fileWatcher&&gr.fileWatcher.close(),N.set(ii,!1));else if(tt){const Gt=ri(ii,Ct,xe,250,de,Kd.SourceFile);N.set(ii,{sourceFile:tt,version:tt.version,fileWatcher:Gt})}else N.set(ii,!1);return tt}return gr.sourceFile}function qr(Ct){const ii=N.get(Ct);ii!==void 0&&(_i(ii)?N.set(Ct,{version:!1}):ii.version=!1)}function Fs(Ct,ii){const vt=N.get(Ct);if(!vt)return;if(vt.version)return vt.version;const Ni=ii(Ct);return Ni!==void 0?QQ(We,Ni):void 0}function ko(Ct,ii,vt){const Ni=N.get(Ct.resolvedPath);Ni!==void 0&&(_i(Ni)?(R||(R=[])).push(Ct.path):Ni.sourceFile===Ct&&(Ni.fileWatcher&&Ni.fileWatcher.close(),N.delete(Ct.resolvedPath),vt||Nt.removeResolutionsOfFile(Ct.path)))}function ls(Ct){t.onWatchStatusChange&&t.onWatchStatusChange(Zl(Ct),qe,pe||X)}function Qs(){return Nt.hasChangedAutomaticTypeDirectiveNames()}function Mn(){return g?(t.clearTimeout(g),g=void 0,!0):!1}function Zs(){if(!t.setTimeout||!t.clearTimeout)return Nt.invalidateResolutionsOfFailedLookupLocations();const Ct=Mn();Oe(`Scheduling invalidateFailedLookup${Ct?", Cancelled earlier one":""}`),g=t.setTimeout(at,250,"timerToInvalidateFailedLookupResolutions")}function at(){g=void 0,Nt.invalidateResolutionsOfFailedLookupLocations()&&yi()}function yi(){!t.setTimeout||!t.clearTimeout||(p&&t.clearTimeout(p),Oe("Scheduling update"),p=t.setTimeout(dr,250,"timerToUpdateProgram"))}function Sn(){j.assert(!!q),a=2,yi()}function dr(){p=void 0,E=!0,us()}function us(){switch(a){case 1:Xr();break;case 2:Gs();break;default:zt();break}return Et()}function Xr(){Oe("Reloading new file names and options"),j.assert(pe),j.assert(q),a=0,oe=M7(pe.configFile.configFileSpecs,wo(ts(q),U),pe,De,Q),YX(oe,wo(q,U),pe.configFile.configFileSpecs,we,he)&&(Ae=!0),zt()}function Gs(){j.assert(q),Oe(`Reloading config file: ${q}`),a=0,ke&&ke.clearCache(),ma(),F=!0,zt(),gt(),Je(Pn(q),pe,de,Kd.ExtendedConfigFile)}function ma(){j.assert(q),ka(IH(q,X,De,T||(T=new Map),Z,Q))}function ka(Ct){oe=Ct.fileNames,pe=Ct.options,de=Ct.watchOptions,ue=Ct.projectReferences,Ie=Ct.wildcardDirectories,we=mD(Ct).slice(),he=O7(Ct.raw),Ae=!0}function Ji(Ct){const ii=Pn(Ct);let vt=C==null?void 0:C.get(ii);if(vt){if(!vt.updateLevel)return vt.parsedCommandLine;if(vt.parsedCommandLine&&vt.updateLevel===1&&!t.getParsedCommandLine){Oe("Reloading new file names and options"),j.assert(pe);const ji=M7(vt.parsedCommandLine.options.configFile.configFileSpecs,wo(ts(Ct),U),pe,De);return vt.parsedCommandLine={...vt.parsedCommandLine,fileNames:ji},vt.updateLevel=void 0,vt.parsedCommandLine}}Oe(`Loading config file: ${Ct}`);const Ni=t.getParsedCommandLine?t.getParsedCommandLine(Ct):ac(Ct);return vt?(vt.parsedCommandLine=Ni,vt.updateLevel=void 0):(C||(C=new Map)).set(ii,vt={parsedCommandLine:Ni}),Rt(Ct,ii,vt),Ni}function ac(Ct){const ii=De.onUnRecoverableConfigFileDiagnostic;De.onUnRecoverableConfigFileDiagnostic=Tc;const vt=IH(Ct,void 0,De,T||(T=new Map),Z);return De.onUnRecoverableConfigFileDiagnostic=ii,vt}function St(Ct){var ii;const vt=Pn(Ct),Ni=C==null?void 0:C.get(vt);Ni&&(C.delete(vt),Ni.watchedDirectories&&X_(Ni.watchedDirectories,Zm),(ii=Ni.watcher)==null||ii.close(),sde(vt,b))}function ri(Ct,ii,vt,Ni,ji,gr){return se(ii,(te,tt)=>vt(te,tt,Ct),Ni,ji,gr)}function xe(Ct,ii,vt){pt(Ct,vt,ii),ii===2&&N.has(vt)&&Nt.invalidateResolutionOfFile(vt),qr(vt),yi()}function pt(Ct,ii,vt){ke&&ke.addOrDeleteFile(Ct,ii,vt)}function Se(Ct,ii){return C!=null&&C.has(Ct)?t5:ri(Ct,ii,Ze,500,de,Kd.MissingFile)}function Ze(Ct,ii,vt){pt(Ct,vt,ii),ii===0&&u.has(vt)&&(u.get(vt).close(),u.delete(vt),qr(vt),yi())}function gt(){GH(h||(h=new Map),Ie,Dt)}function Dt(Ct,ii){return Ne(Ct,vt=>{j.assert(q),j.assert(pe);const Ni=Pn(vt);ke&&ke.addOrDeleteFileOrDirectory(vt,Ni),qr(Ni),!KH({watchedDirPath:Pn(Ct),fileOrDirectory:vt,fileOrDirectoryPath:Ni,configFileName:q,extraFileExtensions:Q,options:pe,program:Et()||oe,currentDirectory:U,useCaseSensitiveFileNames:H,writeLog:Oe,toPath:Pn})&&a!==2&&(a=1,yi())},ii,de,Kd.WildcardDirectory)}function Je(Ct,ii,vt,Ni){NQ(Ct,ii,b||(b=new Map),(ji,gr)=>se(ji,(te,tt)=>{var Gt;pt(ji,gr,tt),T&&LQ(T,gr,Pn);const le=(Gt=b.get(gr))==null?void 0:Gt.projects;le!=null&&le.size&&le.forEach(Ue=>{if(q&&Pn(q)===Ue)a=2;else{const be=C==null?void 0:C.get(Ue);be&&(be.updateLevel=2),Nt.removeResolutionsFromProjectReferenceRedirects(Ue)}yi()})},2e3,vt,Ni),Pn)}function Rt(Ct,ii,vt){var Ni,ji,gr,te;vt.watcher||(vt.watcher=se(Ct,(tt,Gt)=>{pt(Ct,ii,Gt);const le=C==null?void 0:C.get(ii);le&&(le.updateLevel=2),Nt.removeResolutionsFromProjectReferenceRedirects(ii),yi()},2e3,((Ni=vt.parsedCommandLine)==null?void 0:Ni.watchOptions)||de,Kd.ConfigFileOfReferencedProject)),GH(vt.watchedDirectories||(vt.watchedDirectories=new Map),(ji=vt.parsedCommandLine)==null?void 0:ji.wildcardDirectories,(tt,Gt)=>{var le;return Ne(tt,Ue=>{const be=Pn(Ue);ke&&ke.addOrDeleteFileOrDirectory(Ue,be),qr(be);const Qt=C==null?void 0:C.get(ii);Qt!=null&&Qt.parsedCommandLine&&(KH({watchedDirPath:Pn(tt),fileOrDirectory:Ue,fileOrDirectoryPath:be,configFileName:Ct,options:Qt.parsedCommandLine.options,program:Qt.parsedCommandLine.fileNames,currentDirectory:U,useCaseSensitiveFileNames:H,writeLog:Oe,toPath:Pn})||Qt.updateLevel!==2&&(Qt.updateLevel=1,yi()))},Gt,((le=vt.parsedCommandLine)==null?void 0:le.watchOptions)||de,Kd.WildcardDirectoryOfReferencedProject)}),Je(ii,(gr=vt.parsedCommandLine)==null?void 0:gr.options,((te=vt.parsedCommandLine)==null?void 0:te.watchOptions)||de,Kd.ExtendedConfigOfReferencedProject)}}var oPe=(t=>(t[t.Unbuildable=0]="Unbuildable",t[t.UpToDate=1]="UpToDate",t[t.UpToDateWithUpstreamTypes=2]="UpToDateWithUpstreamTypes",t[t.OutputMissing=3]="OutputMissing",t[t.ErrorReadingFile=4]="ErrorReadingFile",t[t.OutOfDateWithSelf=5]="OutOfDateWithSelf",t[t.OutOfDateWithUpstream=6]="OutOfDateWithUpstream",t[t.OutOfDateBuildInfoWithPendingEmit=7]="OutOfDateBuildInfoWithPendingEmit",t[t.OutOfDateBuildInfoWithErrors=8]="OutOfDateBuildInfoWithErrors",t[t.OutOfDateOptions=9]="OutOfDateOptions",t[t.OutOfDateRoots=10]="OutOfDateRoots",t[t.UpstreamOutOfDate=11]="UpstreamOutOfDate",t[t.UpstreamBlocked=12]="UpstreamBlocked",t[t.ComputingUpstream=13]="ComputingUpstream",t[t.TsVersionOutputOfDate=14]="TsVersionOutputOfDate",t[t.UpToDateWithInputFileText=15]="UpToDateWithInputFileText",t[t.ContainerOnly=16]="ContainerOnly",t[t.ForceBuild=17]="ForceBuild",t))(oPe||{});function Qde(t){return Xl(t,".json")?t:zr(t,"tsconfig.json")}var I8t=new Date(-864e13);function N8t(t,r,a){const u=t.get(r);let h;return u||(h=a(),t.set(r,h)),u||h}function aPe(t,r){return N8t(t,r,()=>new Map)}function Zde(t){return t.now?t.now():new Date}function cA(t){return!!t&&!!t.buildOrder}function nj(t){return cA(t)?t.buildOrder:t}function tZ(t,r){return a=>{let u=r?`[${pD(ij(t),"\x1B[90m")}] `:`${ij(t)} - `;u+=`${$1(a.messageText,t.newLine)}${t.newLine+t.newLine}`,t.write(u)}}function btt(t,r,a,u){const h=Jde(t,r);return h.getModifiedTime=t.getModifiedTime?p=>t.getModifiedTime(p):IT,h.setModifiedTime=t.setModifiedTime?(p,g)=>t.setModifiedTime(p,g):Tc,h.deleteFile=t.deleteFile?p=>t.deleteFile(p):Tc,h.reportDiagnostic=a||aA(t),h.reportSolutionBuilderStatus=u||tZ(t),h.now=to(t,t.now),h}function cPe(t=Pd,r,a,u,h){const p=btt(t,r,a,u);return p.reportErrorSummary=h,p}function lPe(t=Pd,r,a,u,h){const p=btt(t,r,a,u),g=Ude(t,h);return wg(p,g),p}function L8t(t){const r={};return jX.forEach(a=>{Li(t,a.name)&&(r[a.name]=t[a.name])}),r.tscBuild=!0,r}function uPe(t,r,a){return Htt(!1,t,r,a)}function dPe(t,r,a,u){return Htt(!0,t,r,a,u)}function P8t(t,r,a,u,h){const p=r,g=r,C=L8t(u),b=$de(p,()=>U.projectCompilerOptions);ZQ(b),b.getParsedCommandLine=q=>G3(U,q,qy(U,q)),b.resolveModuleNameLiterals=to(p,p.resolveModuleNameLiterals),b.resolveTypeReferenceDirectiveReferences=to(p,p.resolveTypeReferenceDirectiveReferences),b.resolveLibrary=to(p,p.resolveLibrary),b.resolveModuleNames=to(p,p.resolveModuleNames),b.resolveTypeReferenceDirectives=to(p,p.resolveTypeReferenceDirectives),b.getModuleResolutionCache=to(p,p.getModuleResolutionCache);let T,E;!b.resolveModuleNameLiterals&&!b.resolveModuleNames&&(T=R3(b.getCurrentDirectory(),b.getCanonicalFileName),b.resolveModuleNameLiterals=(q,X,Z,Q,re)=>QH(q,X,Z,Q,re,p,T,gde),b.getModuleResolutionCache=()=>T),!b.resolveTypeReferenceDirectiveReferences&&!b.resolveTypeReferenceDirectives&&(E=sQ(b.getCurrentDirectory(),b.getCanonicalFileName,void 0,T==null?void 0:T.getPackageJsonInfoCache(),T==null?void 0:T.optionsToRedirectsKey),b.resolveTypeReferenceDirectiveReferences=(q,X,Z,Q,re)=>QH(q,X,Z,Q,re,p,E,MQ));let N;b.resolveLibrary||(N=R3(b.getCurrentDirectory(),b.getCanonicalFileName,void 0,T==null?void 0:T.getPackageJsonInfoCache()),b.resolveLibrary=(q,X,Z)=>oQ(q,X,Z,p,N)),b.getBuildInfo=(q,X)=>Ptt(U,q,qy(U,X),void 0);const{watchFile:R,watchDirectory:F,writeLog:H}=qde(g,u),U={host:p,hostWithWatch:g,parseConfigFileHost:HQ(p),write:to(p,p.trace),options:u,baseCompilerOptions:C,rootNames:a,baseWatchOptions:h,resolvedConfigFilePaths:new Map,configFileCache:new Map,projectStatus:new Map,extendedConfigCache:new Map,buildInfoCache:new Map,outputTimeStamps:new Map,builderPrograms:new Map,diagnostics:new Map,projectPendingBuild:new Map,projectErrorsReported:new Map,compilerHost:b,moduleResolutionCache:T,typeReferenceDirectiveResolutionCache:E,libraryResolutionCache:N,buildOrder:void 0,readFileWithCache:q=>p.readFile(q),projectCompilerOptions:C,cache:void 0,allProjectBuildPending:!0,needsSummary:!0,watchAllProjectsPending:t,watch:t,allWatchedWildcardDirectories:new Map,allWatchedInputFiles:new Map,allWatchedConfigFiles:new Map,allWatchedExtendedConfigFiles:new Map,allWatchedPackageJsonFiles:new Map,filesWatched:new Map,lastCachedPackageJsonLookups:new Map,timerToBuildInvalidatedProject:void 0,reportFileChangeDetected:!1,watchFile:R,watchDirectory:F,writeLog:H};return U}function f0(t,r){return ol(r,t.compilerHost.getCurrentDirectory(),t.compilerHost.getCanonicalFileName)}function qy(t,r){const{resolvedConfigFilePaths:a}=t,u=a.get(r);if(u!==void 0)return u;const h=f0(t,r);return a.set(r,h),h}function Ctt(t){return!!t.options}function A8t(t,r){const a=t.configFileCache.get(r);return a&&Ctt(a)?a:void 0}function G3(t,r,a){const{configFileCache:u}=t,h=u.get(a);if(h)return Ctt(h)?h:void 0;ou("SolutionBuilder::beforeConfigFileParsing");let p;const{parseConfigFileHost:g,baseCompilerOptions:C,baseWatchOptions:b,extendedConfigCache:T,host:E}=t;let N;return E.getParsedCommandLine?(N=E.getParsedCommandLine(r),N||(p=Zl(k.File_0_not_found,r))):(g.onUnRecoverableConfigFileDiagnostic=R=>p=R,N=IH(r,C,g,T,b),g.onUnRecoverableConfigFileDiagnostic=Tc),u.set(a,N||p),ou("SolutionBuilder::afterConfigFileParsing"),Wm("SolutionBuilder::Config file parsing","SolutionBuilder::beforeConfigFileParsing","SolutionBuilder::afterConfigFileParsing"),N}function rj(t,r){return Qde(Ok(t.compilerHost.getCurrentDirectory(),r))}function Stt(t,r){const a=new Map,u=new Map,h=[];let p,g;for(const b of r)C(b);return g?{buildOrder:p||w,circularDiagnostics:g}:p||w;function C(b,T){const E=qy(t,b);if(u.has(E))return;if(a.has(E)){T||(g||(g=[])).push(Zl(k.Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0,h.join(`\r
+`)));return}a.set(E,!0),h.push(b);const N=G3(t,b,E);if(N&&N.projectReferences)for(const R of N.projectReferences){const F=rj(t,R.path);C(F,T||R.circular)}h.pop(),u.set(E,!0),(p||(p=[])).push(b)}}function iZ(t){return t.buildOrder||O8t(t)}function O8t(t){const r=Stt(t,t.rootNames.map(h=>rj(t,h)));t.resolvedConfigFilePaths.clear();const a=new Set(nj(r).map(h=>qy(t,h))),u={onDeleteValue:Tc};return Hv(t.configFileCache,a,u),Hv(t.projectStatus,a,u),Hv(t.builderPrograms,a,u),Hv(t.diagnostics,a,u),Hv(t.projectPendingBuild,a,u),Hv(t.projectErrorsReported,a,u),Hv(t.buildInfoCache,a,u),Hv(t.outputTimeStamps,a,u),Hv(t.lastCachedPackageJsonLookups,a,u),t.watch&&(Hv(t.allWatchedConfigFiles,a,{onDeleteValue:d0}),t.allWatchedExtendedConfigFiles.forEach(h=>{h.projects.forEach(p=>{a.has(p)||h.projects.delete(p)}),h.close()}),Hv(t.allWatchedWildcardDirectories,a,{onDeleteValue:h=>h.forEach(Zm)}),Hv(t.allWatchedInputFiles,a,{onDeleteValue:h=>h.forEach(d0)}),Hv(t.allWatchedPackageJsonFiles,a,{onDeleteValue:h=>h.forEach(d0)})),t.buildOrder=r}function wtt(t,r,a){const u=r&&rj(t,r),h=iZ(t);if(cA(h))return h;if(u){const g=qy(t,u);if(ct(h,b=>qy(t,b)===g)===-1)return}const p=u?Stt(t,[u]):h;return j.assert(!cA(p)),j.assert(!a||u!==void 0),j.assert(!a||p[p.length-1]===u),a?p.slice(0,p.length-1):p}function xtt(t){t.cache&&fPe(t);const{compilerHost:r,host:a}=t,u=t.readFileWithCache,h=r.getSourceFile,{originalReadFile:p,originalFileExists:g,originalDirectoryExists:C,originalCreateDirectory:b,originalWriteFile:T,getSourceFileWithCache:E,readFileWithCache:N}=Q7(a,R=>f0(t,R),(...R)=>h.call(r,...R));t.readFileWithCache=N,r.getSourceFile=E,t.cache={originalReadFile:p,originalFileExists:g,originalDirectoryExists:C,originalCreateDirectory:b,originalWriteFile:T,originalReadFileWithCache:u,originalGetSourceFile:h}}function fPe(t){if(!t.cache)return;const{cache:r,host:a,compilerHost:u,extendedConfigCache:h,moduleResolutionCache:p,typeReferenceDirectiveResolutionCache:g,libraryResolutionCache:C}=t;a.readFile=r.originalReadFile,a.fileExists=r.originalFileExists,a.directoryExists=r.originalDirectoryExists,a.createDirectory=r.originalCreateDirectory,a.writeFile=r.originalWriteFile,u.getSourceFile=r.originalGetSourceFile,t.readFileWithCache=r.originalReadFileWithCache,h.clear(),p==null||p.clear(),g==null||g.clear(),C==null||C.clear(),t.cache=void 0}function ktt(t,r){t.projectStatus.delete(r),t.diagnostics.delete(r)}function Ttt({projectPendingBuild:t},r,a){const u=t.get(r);(u===void 0||u<a)&&t.set(r,a)}function Dtt(t,r){if(!t.allProjectBuildPending)return;t.allProjectBuildPending=!1,t.options.watch&&CPe(t,k.Starting_compilation_in_watch_mode),xtt(t),nj(iZ(t)).forEach(u=>t.projectPendingBuild.set(qy(t,u),0)),r&&r.throwIfCancellationRequested()}var hPe=(t=>(t[t.Build=0]="Build",t[t.UpdateOutputFileStamps=1]="UpdateOutputFileStamps",t))(hPe||{});function Ett(t,r){return t.projectPendingBuild.delete(r),t.diagnostics.has(r)?1:0}function M8t(t,r,a,u,h){let p=!0;return{kind:1,project:r,projectPath:a,buildOrder:h,getCompilerOptions:()=>u.options,getCurrentDirectory:()=>t.compilerHost.getCurrentDirectory(),updateOutputFileStatmps:()=>{Ott(t,u,a),p=!1},done:()=>(p&&Ott(t,u,a),ou("SolutionBuilder::Timestamps only updates"),Ett(t,a))}}function R8t(t,r,a,u,h,p,g){let C=0,b,T;return{kind:0,project:r,projectPath:a,buildOrder:g,getCompilerOptions:()=>h.options,getCurrentDirectory:()=>t.compilerHost.getCurrentDirectory(),getBuilderProgram:()=>N(hl),getProgram:()=>N(q=>q.getProgramOrUndefined()),getSourceFile:q=>N(X=>X.getSourceFile(q)),getSourceFiles:()=>R(q=>q.getSourceFiles()),getOptionsDiagnostics:q=>R(X=>X.getOptionsDiagnostics(q)),getGlobalDiagnostics:q=>R(X=>X.getGlobalDiagnostics(q)),getConfigFileParsingDiagnostics:()=>R(q=>q.getConfigFileParsingDiagnostics()),getSyntacticDiagnostics:(q,X)=>R(Z=>Z.getSyntacticDiagnostics(q,X)),getAllDependencies:q=>R(X=>X.getAllDependencies(q)),getSemanticDiagnostics:(q,X)=>R(Z=>Z.getSemanticDiagnostics(q,X)),getSemanticDiagnosticsOfNextAffectedFile:(q,X)=>N(Z=>Z.getSemanticDiagnosticsOfNextAffectedFile&&Z.getSemanticDiagnosticsOfNextAffectedFile(q,X)),emit:(q,X,Z,Q,re)=>q||Q?N(oe=>{var pe,de;return oe.emit(q,X,Z,Q,re||((de=(pe=t.host).getCustomTransformers)==null?void 0:de.call(pe,r)))}):(U(0,Z),H(X,Z,re)),done:E};function E(q,X,Z){return U(3,q,X,Z),ou("SolutionBuilder::Projects built"),Ett(t,a)}function N(q){return U(0),b&&q(b)}function R(q){return N(q)||w}function F(){var q,X,Z;if(j.assert(b===void 0),t.options.dry){Ep(t,k.A_non_dry_build_would_build_project_0,r),T=1,C=2;return}if(t.options.verbose&&Ep(t,k.Building_project_0,r),h.fileNames.length===0){sj(t,a,mD(h)),T=0,C=2;return}const{host:Q,compilerHost:re}=t;if(t.projectCompilerOptions=h.options,(q=t.moduleResolutionCache)==null||q.update(h.options),(X=t.typeReferenceDirectiveResolutionCache)==null||X.update(h.options),b=Q.createProgram(h.fileNames,h.options,re,F8t(t,a,h),mD(h),h.projectReferences),t.watch){const oe=(Z=t.moduleResolutionCache)==null?void 0:Z.getPackageJsonInfoCache().getInternalMap();t.lastCachedPackageJsonLookups.set(a,oe&&new Set(as(oe.values(),pe=>t.host.realpath&&(rQ(pe)||pe.directoryExists)?t.host.realpath(zr(pe.packageDirectory,"package.json")):zr(pe.packageDirectory,"package.json")))),t.builderPrograms.set(a,b)}C++}function H(q,X,Z){var Q,re,oe;j.assertIsDefined(b),j.assert(C===1);const{host:pe,compilerHost:de}=t,ue=new Map,Ie=b.getCompilerOptions(),we=QT(Ie);let he,Ae;const{emitResult:ke,diagnostics:Te}=XQ(b,De=>pe.reportDiagnostic(De),t.write,void 0,(De,qe,se,Ne,Oe,He)=>{var Pe;const We=f0(t,De);if(ue.set(f0(t,De),De),He!=null&&He.buildInfo){Ae||(Ae=Zde(t.host));const Nt=(Pe=b.hasChangedEmitSignature)==null?void 0:Pe.call(b),$e=tfe(t,De,a);$e?($e.buildInfo=He.buildInfo,$e.modifiedTime=Ae,Nt&&($e.latestChangedDtsTime=Ae)):t.buildInfoCache.set(a,{path:f0(t,De),buildInfo:He.buildInfo,modifiedTime:Ae,latestChangedDtsTime:Nt?Ae:void 0})}const ze=He!=null&&He.differsOnlyInMap?XL(t.host,De):void 0;(q||de.writeFile)(De,qe,se,Ne,Oe,He),He!=null&&He.differsOnlyInMap?t.host.setModifiedTime(De,ze):!we&&t.watch&&(he||(he=pPe(t,a))).set(We,Ae||(Ae=Zde(t.host)))},X,void 0,Z||((re=(Q=t.host).getCustomTransformers)==null?void 0:re.call(Q,r)));return(!Ie.noEmitOnError||!Te.length)&&(ue.size||p.type!==8)&&Att(t,h,a,k.Updating_unchanged_output_timestamps_of_project_0,ue),t.projectErrorsReported.set(a,!0),T=(oe=b.hasChangedEmitSignature)!=null&&oe.call(b)?0:2,Te.length?(t.diagnostics.set(a,Te),t.projectStatus.set(a,{type:0,reason:"it had errors"}),T|=4):(t.diagnostics.delete(a),t.projectStatus.set(a,{type:1,oldestOutputFileName:k_(ue.values())??ede(h,!pe.useCaseSensitiveFileNames())})),B8t(t,b),C=2,ke}function U(q,X,Z,Q){for(;C<=q&&C<3;){const re=C;switch(C){case 0:F();break;case 1:H(Z,X,Q);break;case 2:j8t(t,r,a,u,h,g,j.checkDefined(T)),C++;break}j.assert(C>re)}}}function Itt(t,r,a){if(!t.projectPendingBuild.size||cA(r))return;const{options:u,projectPendingBuild:h}=t;for(let p=0;p<r.length;p++){const g=r[p],C=qy(t,g),b=t.projectPendingBuild.get(C);if(b===void 0)continue;a&&(a=!1,Utt(t,r));const T=G3(t,g,C);if(!T){jtt(t,C),h.delete(C);continue}b===2?(Btt(t,g,C,T),Wtt(t,C,T),Vtt(t,g,C,T),vPe(t,g,C,T),bPe(t,g,C,T)):b===1&&(T.fileNames=M7(T.options.configFile.configFileSpecs,ts(g),T.options,t.parseConfigFileHost),YX(T.fileNames,g,T.options.configFile.configFileSpecs,T.errors,O7(T.raw)),vPe(t,g,C,T),bPe(t,g,C,T));const E=gPe(t,T,C);if(!u.force){if(E.type===1){nfe(t,g,E),sj(t,C,mD(T)),h.delete(C),u.dry&&Ep(t,k.Project_0_is_up_to_date,g);continue}if(E.type===2||E.type===15)return sj(t,C,mD(T)),{kind:1,status:E,project:g,projectPath:C,projectIndex:p,config:T}}if(E.type===12){nfe(t,g,E),sj(t,C,mD(T)),h.delete(C),u.verbose&&Ep(t,E.upstreamProjectBlocked?k.Skipping_build_of_project_0_because_its_dependency_1_was_not_built:k.Skipping_build_of_project_0_because_its_dependency_1_has_errors,g,E.upstreamProjectName);continue}if(E.type===16){nfe(t,g,E),sj(t,C,mD(T)),h.delete(C);continue}return{kind:0,status:E,project:g,projectPath:C,projectIndex:p,config:T}}}function Ntt(t,r,a){return nfe(t,r.project,r.status),r.kind!==1?R8t(t,r.project,r.projectPath,r.projectIndex,r.config,r.status,a):M8t(t,r.project,r.projectPath,r.config,a)}function _Pe(t,r,a){const u=Itt(t,r,a);return u&&Ntt(t,u,r)}function F8t({options:t,builderPrograms:r,compilerHost:a},u,h){if(t.force)return;const p=r.get(u);return p||YQ(h.options,a)}function B8t(t,r){r&&(t.host.afterProgramEmitAndDiagnostics&&t.host.afterProgramEmitAndDiagnostics(r),r.releaseProgram()),t.projectCompilerOptions=t.baseCompilerOptions}function Yde(t){return!!t.watcher}function Ltt(t,r){const a=f0(t,r),u=t.filesWatched.get(a);if(t.watch&&u){if(!Yde(u))return u;if(u.modifiedTime)return u.modifiedTime}const h=XL(t.host,r);return t.watch&&(u?u.modifiedTime=h:t.filesWatched.set(a,h)),h}function efe(t,r,a,u,h,p,g){const C=f0(t,r),b=t.filesWatched.get(C);if(b&&Yde(b))b.callbacks.push(a);else{const T=t.watchFile(r,(E,N,R)=>{const F=j.checkDefined(t.filesWatched.get(C));j.assert(Yde(F)),F.modifiedTime=R,F.callbacks.forEach(H=>H(E,N,R))},u,h,p,g);t.filesWatched.set(C,{callbacks:[a],watcher:T,modifiedTime:b})}return{close:()=>{const T=j.checkDefined(t.filesWatched.get(C));j.assert(Yde(T)),T.callbacks.length===1?(t.filesWatched.delete(C),Zm(T)):GL(T.callbacks,a)}}}function pPe(t,r){if(!t.watch)return;let a=t.outputTimeStamps.get(r);return a||t.outputTimeStamps.set(r,a=new Map),a}function tfe(t,r,a){const u=f0(t,r),h=t.buildInfoCache.get(a);return(h==null?void 0:h.path)===u?h:void 0}function Ptt(t,r,a,u){const h=f0(t,r),p=t.buildInfoCache.get(a);if(p!==void 0&&p.path===h)return p.buildInfo||void 0;const g=t.readFileWithCache(r),C=g?nde(r,g):void 0;return t.buildInfoCache.set(a,{path:h,buildInfo:C||!1,modifiedTime:u||gp}),C}function mPe(t,r,a,u){const h=Ltt(t,r);if(a<h)return{type:5,outOfDateOutputFileName:u,newerInputFileName:r}}function W8t(t,r,a){var u,h,p,g,C;if(!r.fileNames.length&&!O7(r.raw))return{type:16};let b;const T=!!t.options.force;if(r.projectReferences){t.projectStatus.set(a,{type:13});for(const Te of r.projectReferences){const De=q3(Te),qe=qy(t,De),se=G3(t,De,qe),Ne=gPe(t,se,qe);if(!(Ne.type===13||Ne.type===16)){if(t.options.stopBuildOnErrors&&(Ne.type===0||Ne.type===12))return{type:12,upstreamProjectName:Te.path,upstreamProjectBlocked:Ne.type===12};T||(b||(b=[])).push({ref:Te,refStatus:Ne,resolvedRefPath:qe,resolvedConfig:se})}}}if(T)return{type:17};const{host:E}=t,N=h2(r.options),R=QT(r.options);let F=tfe(t,N,a);const H=(F==null?void 0:F.modifiedTime)||XL(E,N);if(H===gp)return F||t.buildInfoCache.set(a,{path:f0(t,N),buildInfo:!1,modifiedTime:H}),{type:3,missingOutputFileName:N};const U=Ptt(t,N,a,H);if(!U)return{type:4,fileName:N};const q=R&&tj(U)?U:void 0;if((q||!R)&&U.version!==v)return{type:14,version:U.version};if(!r.options.noCheck&&(U.errors||U.checkPending))return{type:8,buildInfoFile:N};if(q){if(!r.options.noCheck&&((u=q.changeFileSet)!=null&&u.length||(h=q.semanticDiagnosticsPerFile)!=null&&h.length||Q_(r.options)&&((p=q.emitDiagnosticsPerFile)!=null&&p.length)))return{type:8,buildInfoFile:N};if(!r.options.noEmit&&((g=q.changeFileSet)!=null&&g.length||(C=q.affectedFilesPendingEmit)!=null&&C.length||q.pendingEmit!==void 0))return{type:7,buildInfoFile:N};if((!r.options.noEmit||r.options.noEmit&&Q_(r.options))&&zQ(r.options,q.options||{},void 0,!!r.options.noEmit))return{type:9,buildInfoFile:N}}let X=H,Z=N,Q,re=I8t,oe=!1;const pe=new Set;let de;for(const Te of r.fileNames){const De=Ltt(t,Te);if(De===gp)return{type:0,reason:`${Te} does not exist`};const qe=f0(t,Te);if(H<De){let se,Ne;if(q){de||(de=Ide(q,N,E));const Oe=de.roots.get(qe);se=de.fileInfos.get(Oe??qe);const He=se?t.readFileWithCache(Oe??Te):void 0;Ne=He!==void 0?QQ(E,He):void 0,se&&se===Ne&&(oe=!0)}if(!se||se!==Ne)return{type:5,outOfDateOutputFileName:N,newerInputFileName:Te}}De>re&&(Q=Te,re=De),pe.add(qe)}let ue;if(q?(de||(de=Ide(q,N,E)),ue=cf(de.roots,(Te,De)=>pe.has(De)?void 0:De)):ue=O(KLe(U,N,E),Te=>pe.has(Te)?void 0:Te),ue)return{type:10,buildInfoFile:N,inputFile:ue};if(!R){const Te=EQ(r,!E.useCaseSensitiveFileNames()),De=pPe(t,a);for(const qe of Te){if(qe===N)continue;const se=f0(t,qe);let Ne=De==null?void 0:De.get(se);if(Ne||(Ne=XL(t.host,qe),De==null||De.set(se,Ne)),Ne===gp)return{type:3,missingOutputFileName:qe};if(Ne<re)return{type:5,outOfDateOutputFileName:qe,newerInputFileName:Q};Ne<X&&(X=Ne,Z=qe)}}let Ie=!1;if(b)for(const{ref:Te,refStatus:De,resolvedConfig:qe,resolvedRefPath:se}of b){if(De.newestInputFileTime&&De.newestInputFileTime<=X)continue;if(V8t(t,F??(F=t.buildInfoCache.get(a)),se))return{type:6,outOfDateOutputFileName:N,newerProjectName:Te.path};const Ne=H8t(t,qe.options,se);if(Ne&&Ne<=X){Ie=!0;continue}return j.assert(Z!==void 0,"Should have an oldest output filename here"),{type:6,outOfDateOutputFileName:Z,newerProjectName:Te.path}}const we=mPe(t,r.options.configFilePath,X,Z);if(we)return we;const he=O(r.options.configFile.extendedSourceFiles||w,Te=>mPe(t,Te,X,Z));if(he)return he;const Ae=t.lastCachedPackageJsonLookups.get(a),ke=Ae&&qb(Ae,Te=>mPe(t,Te,X,Z));return ke||{type:Ie?2:oe?15:1,newestInputFileTime:re,newestInputFileName:Q,oldestOutputFileName:Z}}function V8t(t,r,a){return t.buildInfoCache.get(a).path===r.path}function gPe(t,r,a){if(r===void 0)return{type:0,reason:"config file deleted mid-build"};const u=t.projectStatus.get(a);if(u!==void 0)return u;ou("SolutionBuilder::beforeUpToDateCheck");const h=W8t(t,r,a);return ou("SolutionBuilder::afterUpToDateCheck"),Wm("SolutionBuilder::Up-to-date check","SolutionBuilder::beforeUpToDateCheck","SolutionBuilder::afterUpToDateCheck"),t.projectStatus.set(a,h),h}function Att(t,r,a,u,h){if(r.options.noEmit)return;let p;const g=h2(r.options),C=QT(r.options);if(g&&C){h!=null&&h.has(f0(t,g))||(t.options.verbose&&Ep(t,u,r.options.configFilePath),t.host.setModifiedTime(g,p=Zde(t.host)),tfe(t,g,a).modifiedTime=p),t.outputTimeStamps.delete(a);return}const{host:b}=t,T=EQ(r,!b.useCaseSensitiveFileNames()),E=pPe(t,a),N=E?new Set:void 0;if(!h||T.length!==h.size){let R=!!t.options.verbose;for(const F of T){const H=f0(t,F);h!=null&&h.has(H)||(R&&(R=!1,Ep(t,u,r.options.configFilePath)),b.setModifiedTime(F,p||(p=Zde(t.host))),F===g?tfe(t,g,a).modifiedTime=p:E&&(E.set(H,p),N.add(H)))}}E==null||E.forEach((R,F)=>{!(h!=null&&h.has(F))&&!N.has(F)&&E.delete(F)})}function H8t(t,r,a){if(!r.composite)return;const u=j.checkDefined(t.buildInfoCache.get(a));if(u.latestChangedDtsTime!==void 0)return u.latestChangedDtsTime||void 0;const h=u.buildInfo&&tj(u.buildInfo)&&u.buildInfo.latestChangedDtsFile?t.host.getModifiedTime(wo(u.buildInfo.latestChangedDtsFile,ts(u.path))):void 0;return u.latestChangedDtsTime=h||!1,h}function Ott(t,r,a){if(t.options.dry)return Ep(t,k.A_non_dry_build_would_update_timestamps_for_output_of_project_0,r.options.configFilePath);Att(t,r,a,k.Updating_output_timestamps_of_project_0),t.projectStatus.set(a,{type:1,oldestOutputFileName:ede(r,!t.host.useCaseSensitiveFileNames())})}function j8t(t,r,a,u,h,p,g){if(!(t.options.stopBuildOnErrors&&g&4)&&h.options.composite)for(let C=u+1;C<p.length;C++){const b=p[C],T=qy(t,b);if(t.projectPendingBuild.has(T))continue;const E=G3(t,b,T);if(!(!E||!E.projectReferences))for(const N of E.projectReferences){const R=rj(t,N.path);if(qy(t,R)!==a)continue;const F=t.projectStatus.get(T);if(F)switch(F.type){case 1:if(g&2){F.type=2;break}case 15:case 2:g&2||t.projectStatus.set(T,{type:6,outOfDateOutputFileName:F.oldestOutputFileName,newerProjectName:r});break;case 12:qy(t,rj(t,F.upstreamProjectName))===a&&ktt(t,T);break}Ttt(t,T,0);break}}}function Mtt(t,r,a,u,h,p){ou("SolutionBuilder::beforeBuild");const g=z8t(t,r,a,u,h,p);return ou("SolutionBuilder::afterBuild"),Wm("SolutionBuilder::Build","SolutionBuilder::beforeBuild","SolutionBuilder::afterBuild"),g}function z8t(t,r,a,u,h,p){const g=wtt(t,r,p);if(!g)return 3;Dtt(t,a);let C=!0,b=0;for(;;){const T=_Pe(t,g,C);if(!T)break;C=!1,T.done(a,u,h==null?void 0:h(T.project)),t.diagnostics.has(T.projectPath)||b++}return fPe(t),ztt(t,g),J8t(t,g),cA(g)?4:g.some(T=>t.diagnostics.has(qy(t,T)))?b?2:1:0}function Rtt(t,r,a){ou("SolutionBuilder::beforeClean");const u=U8t(t,r,a);return ou("SolutionBuilder::afterClean"),Wm("SolutionBuilder::Clean","SolutionBuilder::beforeClean","SolutionBuilder::afterClean"),u}function U8t(t,r,a){const u=wtt(t,r,a);if(!u)return 3;if(cA(u))return ife(t,u.circularDiagnostics),4;const{options:h,host:p}=t,g=h.dry?[]:void 0;for(const C of u){const b=qy(t,C),T=G3(t,C,b);if(T===void 0){jtt(t,b);continue}const E=EQ(T,!p.useCaseSensitiveFileNames());if(!E.length)continue;const N=new Set(T.fileNames.map(R=>f0(t,R)));for(const R of E)N.has(f0(t,R))||p.fileExists(R)&&(g?g.push(R):(p.deleteFile(R),yPe(t,b,0)))}return g&&Ep(t,k.A_non_dry_build_would_delete_the_following_files_Colon_0,g.map(C=>`\r
+ * ${C}`).join("")),0}function yPe(t,r,a){t.host.getParsedCommandLine&&a===1&&(a=2),a===2&&(t.configFileCache.delete(r),t.buildOrder=void 0),t.needsSummary=!0,ktt(t,r),Ttt(t,r,a),xtt(t)}function nZ(t,r,a){t.reportFileChangeDetected=!0,yPe(t,r,a),Ftt(t,250,!0)}function Ftt(t,r,a){const{hostWithWatch:u}=t;!u.setTimeout||!u.clearTimeout||(t.timerToBuildInvalidatedProject&&u.clearTimeout(t.timerToBuildInvalidatedProject),t.timerToBuildInvalidatedProject=u.setTimeout(q8t,r,"timerToBuildInvalidatedProject",t,a))}function q8t(t,r,a){ou("SolutionBuilder::beforeBuild");const u=$8t(r,a);ou("SolutionBuilder::afterBuild"),Wm("SolutionBuilder::Build","SolutionBuilder::beforeBuild","SolutionBuilder::afterBuild"),u&&ztt(r,u)}function $8t(t,r){t.timerToBuildInvalidatedProject=void 0,t.reportFileChangeDetected&&(t.reportFileChangeDetected=!1,t.projectErrorsReported.clear(),CPe(t,k.File_change_detected_Starting_incremental_compilation));let a=0;const u=iZ(t),h=_Pe(t,u,!1);if(h)for(h.done(),a++;t.projectPendingBuild.size;){if(t.timerToBuildInvalidatedProject)return;const p=Itt(t,u,!1);if(!p)break;if(p.kind!==1&&(r||a===5)){Ftt(t,100,!1);return}Ntt(t,p,u).done(),p.kind!==1&&a++}return fPe(t),u}function Btt(t,r,a,u){!t.watch||t.allWatchedConfigFiles.has(a)||t.allWatchedConfigFiles.set(a,efe(t,r,()=>nZ(t,a,2),2e3,u==null?void 0:u.watchOptions,Kd.ConfigFile,r))}function Wtt(t,r,a){NQ(r,a==null?void 0:a.options,t.allWatchedExtendedConfigFiles,(u,h)=>efe(t,u,()=>{var p;return(p=t.allWatchedExtendedConfigFiles.get(h))==null?void 0:p.projects.forEach(g=>nZ(t,g,2))},2e3,a==null?void 0:a.watchOptions,Kd.ExtendedConfigFile),u=>f0(t,u))}function Vtt(t,r,a,u){t.watch&&GH(aPe(t.allWatchedWildcardDirectories,a),u.wildcardDirectories,(h,p)=>t.watchDirectory(h,g=>{var C;KH({watchedDirPath:f0(t,h),fileOrDirectory:g,fileOrDirectoryPath:f0(t,g),configFileName:r,currentDirectory:t.compilerHost.getCurrentDirectory(),options:u.options,program:t.builderPrograms.get(a)||((C=A8t(t,a))==null?void 0:C.fileNames),useCaseSensitiveFileNames:t.parseConfigFileHost.useCaseSensitiveFileNames,writeLog:b=>t.writeLog(b),toPath:b=>f0(t,b)})||nZ(t,a,1)},p,u==null?void 0:u.watchOptions,Kd.WildcardDirectory,r))}function vPe(t,r,a,u){t.watch&&Q8(aPe(t.allWatchedInputFiles,a),new Set(u.fileNames),{createNewValue:h=>efe(t,h,()=>nZ(t,a,0),250,u==null?void 0:u.watchOptions,Kd.SourceFile,r),onDeleteValue:d0})}function bPe(t,r,a,u){!t.watch||!t.lastCachedPackageJsonLookups||Q8(aPe(t.allWatchedPackageJsonFiles,a),t.lastCachedPackageJsonLookups.get(a),{createNewValue:h=>efe(t,h,()=>nZ(t,a,0),2e3,u==null?void 0:u.watchOptions,Kd.PackageJson,r),onDeleteValue:d0})}function J8t(t,r){if(t.watchAllProjectsPending){ou("SolutionBuilder::beforeWatcherCreation"),t.watchAllProjectsPending=!1;for(const a of nj(r)){const u=qy(t,a),h=G3(t,a,u);Btt(t,a,u,h),Wtt(t,u,h),h&&(Vtt(t,a,u,h),vPe(t,a,u,h),bPe(t,a,u,h))}ou("SolutionBuilder::afterWatcherCreation"),Wm("SolutionBuilder::Watcher creation","SolutionBuilder::beforeWatcherCreation","SolutionBuilder::afterWatcherCreation")}}function G8t(t){X_(t.allWatchedConfigFiles,d0),X_(t.allWatchedExtendedConfigFiles,Zm),X_(t.allWatchedWildcardDirectories,r=>X_(r,Zm)),X_(t.allWatchedInputFiles,r=>X_(r,d0)),X_(t.allWatchedPackageJsonFiles,r=>X_(r,d0))}function Htt(t,r,a,u,h){const p=P8t(t,r,a,u,h);return{build:(g,C,b,T)=>Mtt(p,g,C,b,T),clean:g=>Rtt(p,g),buildReferences:(g,C,b,T)=>Mtt(p,g,C,b,T,!0),cleanReferences:g=>Rtt(p,g,!0),getNextInvalidatedProject:g=>(Dtt(p,g),_Pe(p,iZ(p),!1)),getBuildOrder:()=>iZ(p),getUpToDateStatusOfProject:g=>{const C=rj(p,g),b=qy(p,C);return gPe(p,G3(p,C,b),b)},invalidateProject:(g,C)=>yPe(p,g,C||0),close:()=>G8t(p)}}function Uf(t,r){return s8(r,t.compilerHost.getCurrentDirectory(),t.compilerHost.getCanonicalFileName)}function Ep(t,r,...a){t.host.reportSolutionBuilderStatus(Zl(r,...a))}function CPe(t,r,...a){var u,h;(h=(u=t.hostWithWatch).onWatchStatusChange)==null||h.call(u,Zl(r,...a),t.host.getNewLine(),t.baseCompilerOptions)}function ife({host:t},r){r.forEach(a=>t.reportDiagnostic(a))}function sj(t,r,a){ife(t,a),t.projectErrorsReported.set(r,!0),a.length&&t.diagnostics.set(r,a)}function jtt(t,r){sj(t,r,[t.configFileCache.get(r)])}function ztt(t,r){if(!t.needsSummary)return;t.needsSummary=!1;const a=t.watch||!!t.host.reportErrorSummary,{diagnostics:u}=t;let h=0,p=[];cA(r)?(Utt(t,r.buildOrder),ife(t,r.circularDiagnostics),a&&(h+=GQ(r.circularDiagnostics)),a&&(p=[...p,...KQ(r.circularDiagnostics)])):(r.forEach(g=>{const C=qy(t,g);t.projectErrorsReported.has(C)||ife(t,u.get(C)||w)}),a&&u.forEach(g=>h+=GQ(g)),a&&u.forEach(g=>[...p,...KQ(g)])),t.watch?CPe(t,Mde(h),h):t.host.reportErrorSummary&&t.host.reportErrorSummary(h,p)}function Utt(t,r){t.options.verbose&&Ep(t,k.Projects_in_this_build_Colon_0,r.map(a=>`\r
+ * `+Uf(t,a)).join(""))}function K8t(t,r,a){switch(a.type){case 5:return Ep(t,k.Project_0_is_out_of_date_because_output_1_is_older_than_input_2,Uf(t,r),Uf(t,a.outOfDateOutputFileName),Uf(t,a.newerInputFileName));case 6:return Ep(t,k.Project_0_is_out_of_date_because_output_1_is_older_than_input_2,Uf(t,r),Uf(t,a.outOfDateOutputFileName),Uf(t,a.newerProjectName));case 3:return Ep(t,k.Project_0_is_out_of_date_because_output_file_1_does_not_exist,Uf(t,r),Uf(t,a.missingOutputFileName));case 4:return Ep(t,k.Project_0_is_out_of_date_because_there_was_error_reading_file_1,Uf(t,r),Uf(t,a.fileName));case 7:return Ep(t,k.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted,Uf(t,r),Uf(t,a.buildInfoFile));case 8:return Ep(t,k.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors,Uf(t,r),Uf(t,a.buildInfoFile));case 9:return Ep(t,k.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions,Uf(t,r),Uf(t,a.buildInfoFile));case 10:return Ep(t,k.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more,Uf(t,r),Uf(t,a.buildInfoFile),Uf(t,a.inputFile));case 1:if(a.newestInputFileTime!==void 0)return Ep(t,k.Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2,Uf(t,r),Uf(t,a.newestInputFileName||""),Uf(t,a.oldestOutputFileName||""));break;case 2:return Ep(t,k.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies,Uf(t,r));case 15:return Ep(t,k.Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files,Uf(t,r));case 11:return Ep(t,k.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date,Uf(t,r),Uf(t,a.upstreamProjectName));case 12:return Ep(t,a.upstreamProjectBlocked?k.Project_0_can_t_be_built_because_its_dependency_1_was_not_built:k.Project_0_can_t_be_built_because_its_dependency_1_has_errors,Uf(t,r),Uf(t,a.upstreamProjectName));case 0:return Ep(t,k.Project_0_is_out_of_date_because_1,Uf(t,r),a.reason);case 14:return Ep(t,k.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2,Uf(t,r),a.version,v);case 17:return Ep(t,k.Project_0_is_being_forcibly_rebuilt,Uf(t,r))}}function nfe(t,r,a){t.options.verbose&&K8t(t,r,a)}var SPe=(t=>(t[t.time=0]="time",t[t.count=1]="count",t[t.memory=2]="memory",t))(SPe||{});function X8t(t){const r=Q8t();return O(t.getSourceFiles(),a=>{const u=Z8t(t,a),h=Lv(a).length;r.set(u,r.get(u)+h)}),r}function Q8t(){const t=new Map;return t.set("Library",0),t.set("Definitions",0),t.set("TypeScript",0),t.set("JavaScript",0),t.set("JSON",0),t.set("Other",0),t}function Z8t(t,r){if(t.isSourceFileDefaultLibrary(r))return"Library";if(r.isDeclarationFile)return"Definitions";const a=r.path;return Ru(a,Bce)?"TypeScript":Ru(a,h3)?"JavaScript":Xl(a,".json")?"JSON":"Other"}function rfe(t,r,a){return rZ(t,a)?aA(t,!0):r}function qtt(t){return!!t.writeOutputIsTTY&&t.writeOutputIsTTY()&&!t.getEnvironmentVariable("NO_COLOR")}function rZ(t,r){return!r||typeof r.pretty>"u"?qtt(t):r.pretty}function $tt(t){return t.options.all?Mu(U0,(r,a)=>mW(r.name,a.name)):$t(U0.slice(),r=>!!r.showInSimplifiedHelpView)}function sfe(t){t.write(M_(k.Version_0,v)+t.newLine)}function ofe(t){if(!qtt(t))return{bold:E=>E,blue:E=>E,blueBackground:E=>E,brightWhite:E=>E};function a(E){return`\x1B[1m${E}\x1B[22m`}const u=t.getEnvironmentVariable("OS")&&t.getEnvironmentVariable("OS").toLowerCase().includes("windows"),h=t.getEnvironmentVariable("WT_SESSION"),p=t.getEnvironmentVariable("TERM_PROGRAM")&&t.getEnvironmentVariable("TERM_PROGRAM")==="vscode";function g(E){return u&&!h&&!p?T(E):`\x1B[94m${E}\x1B[39m`}const C=t.getEnvironmentVariable("COLORTERM")==="truecolor"||t.getEnvironmentVariable("TERM")==="xterm-256color";function b(E){return C?`\x1B[48;5;68m${E}\x1B[39;49m`:`\x1B[44m${E}\x1B[39;49m`}function T(E){return`\x1B[97m${E}\x1B[39m`}return{bold:a,blue:g,brightWhite:T,blueBackground:b}}function Jtt(t){return`--${t.name}${t.shortName?`, -${t.shortName}`:""}`}function Y8t(t,r,a,u){var h;const p=[],g=ofe(t),C=Jtt(r),b=H(r),T=typeof r.defaultValueDescription=="object"?M_(r.defaultValueDescription):N(r.defaultValueDescription,r.type==="list"||r.type==="listOrElement"?r.element.type:r.type),E=((h=t.getWidthOfTerminal)==null?void 0:h.call(t))??0;if(E>=80){let U="";r.description&&(U=M_(r.description)),p.push(...F(C,U,a,u,E,!0),t.newLine),R(b,r)&&(b&&p.push(...F(b.valueType,b.possibleValues,a,u,E,!1),t.newLine),T&&p.push(...F(M_(k.default_Colon),T,a,u,E,!1),t.newLine)),p.push(t.newLine)}else{if(p.push(g.blue(C),t.newLine),r.description){const U=M_(r.description);p.push(U)}if(p.push(t.newLine),R(b,r)){if(b&&p.push(`${b.valueType} ${b.possibleValues}`),T){b&&p.push(t.newLine);const U=M_(k.default_Colon);p.push(`${U} ${T}`)}p.push(t.newLine)}p.push(t.newLine)}return p;function N(U,q){return U!==void 0&&typeof q=="object"?as(q.entries()).filter(([,X])=>X===U).map(([X])=>X).join("/"):String(U)}function R(U,q){const X=["string"],Z=[void 0,"false","n/a"],Q=q.defaultValueDescription;return!(q.category===k.Command_line_Options||Yt(X,U==null?void 0:U.possibleValues)&&Yt(Z,Q))}function F(U,q,X,Z,Q,re){const oe=[];let pe=!0,de=q;const ue=Q-Z;for(;de.length>0;){let Ie="";pe?(Ie=U.padStart(X),Ie=Ie.padEnd(Z),Ie=re?g.blue(Ie):Ie):Ie="".padStart(Z);const we=de.substr(0,ue);de=de.slice(ue),oe.push(`${Ie}${we}`),pe=!1}return oe}function H(U){if(U.type==="object")return;return{valueType:q(U),possibleValues:X(U)};function q(Z){switch(j.assert(Z.type!=="listOrElement"),Z.type){case"string":case"number":case"boolean":return M_(k.type_Colon);case"list":return M_(k.one_or_more_Colon);default:return M_(k.one_of_Colon)}}function X(Z){let Q;switch(Z.type){case"string":case"number":case"boolean":Q=Z.type;break;case"list":case"listOrElement":Q=X(Z.element);break;case"object":Q="";break;default:const re={};return Z.type.forEach((oe,pe)=>{var de;(de=Z.deprecatedKeys)!=null&&de.has(pe)||(re[oe]||(re[oe]=[])).push(pe)}),Object.entries(re).map(([,oe])=>oe.join("/")).join(", ")}return Q}}}function Gtt(t,r){let a=0;for(const g of r){const C=Jtt(g).length;a=a>C?a:C}const u=a+2,h=u+2;let p=[];for(const g of r){const C=Y8t(t,g,u,h);p=[...p,...C]}return p[p.length-2]!==t.newLine&&p.push(t.newLine),p}function oj(t,r,a,u,h,p){let g=[];if(g.push(ofe(t).bold(r)+t.newLine+t.newLine),h&&g.push(h+t.newLine+t.newLine),!u)return g=[...g,...Gtt(t,a)],p&&g.push(p+t.newLine+t.newLine),g;const C=new Map;for(const b of a){if(!b.category)continue;const T=M_(b.category),E=C.get(T)??[];E.push(b),C.set(T,E)}return C.forEach((b,T)=>{g.push(`### ${T}${t.newLine}${t.newLine}`),g=[...g,...Gtt(t,b)]}),p&&g.push(p+t.newLine+t.newLine),g}function e7t(t,r){const a=ofe(t);let u=[...afe(t,`${M_(k.tsc_Colon_The_TypeScript_Compiler)} - ${M_(k.Version_0,v)}`)];u.push(a.bold(M_(k.COMMON_COMMANDS))+t.newLine+t.newLine),g("tsc",k.Compiles_the_current_project_tsconfig_json_in_the_working_directory),g("tsc app.ts util.ts",k.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options),g("tsc -b",k.Build_a_composite_project_in_the_working_directory),g("tsc --init",k.Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory),g("tsc -p ./path/to/tsconfig.json",k.Compiles_the_TypeScript_project_located_at_the_specified_path),g("tsc --help --all",k.An_expanded_version_of_this_information_showing_all_possible_compiler_options),g(["tsc --noEmit","tsc --target esnext"],k.Compiles_the_current_project_with_additional_settings);const h=r.filter(C=>C.isCommandLineOnly||C.category===k.Command_line_Options),p=r.filter(C=>!Yt(h,C));u=[...u,...oj(t,M_(k.COMMAND_LINE_FLAGS),h,!1,void 0,void 0),...oj(t,M_(k.COMMON_COMPILER_OPTIONS),p,!1,void 0,DP(k.You_can_learn_about_all_of_the_compiler_options_at_0,"https://aka.ms/tsc"))];for(const C of u)t.write(C);function g(C,b){const T=typeof C=="string"?[C]:C;for(const E of T)u.push(" "+a.blue(E)+t.newLine);u.push(" "+M_(b)+t.newLine+t.newLine)}}function t7t(t,r,a,u){let h=[...afe(t,`${M_(k.tsc_Colon_The_TypeScript_Compiler)} - ${M_(k.Version_0,v)}`)];h=[...h,...oj(t,M_(k.ALL_COMPILER_OPTIONS),r,!0,void 0,DP(k.You_can_learn_about_all_of_the_compiler_options_at_0,"https://aka.ms/tsc"))],h=[...h,...oj(t,M_(k.WATCH_OPTIONS),u,!1,M_(k.Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon))],h=[...h,...oj(t,M_(k.BUILD_OPTIONS),a,!1,DP(k.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0,"https://aka.ms/tsc-composite-builds"))];for(const p of h)t.write(p)}function Ktt(t,r){let a=[...afe(t,`${M_(k.tsc_Colon_The_TypeScript_Compiler)} - ${M_(k.Version_0,v)}`)];a=[...a,...oj(t,M_(k.BUILD_OPTIONS),r,!1,DP(k.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0,"https://aka.ms/tsc-composite-builds"))];for(const u of a)t.write(u)}function afe(t,r){var a;const u=ofe(t),h=[],p=((a=t.getWidthOfTerminal)==null?void 0:a.call(t))??0,g=5,C=u.blueBackground("".padStart(g)),b=u.blueBackground(u.brightWhite("TS ".padStart(g)));if(p>=r.length+g){const E=(p>120?120:p)-g;h.push(r.padEnd(E)+C+t.newLine),h.push("".padStart(E)+b+t.newLine)}else h.push(r+t.newLine),h.push(t.newLine);return h}function Xtt(t,r){r.options.all?t7t(t,$tt(r),Qle,eA):e7t(t,$tt(r))}function Qtt(t,r,a){let u=aA(t);if(a.options.build)return u(Zl(k.Option_build_must_be_the_first_command_line_argument)),t.exit(1);let h;if(a.options.locale&&zoe(a.options.locale,t,a.errors),a.errors.length>0)return a.errors.forEach(u),t.exit(1);if(a.options.init)return s7t(t,u,a.options,a.fileNames),t.exit(0);if(a.options.version)return sfe(t),t.exit(0);if(a.options.help||a.options.all)return Xtt(t,a),t.exit(0);if(a.options.watch&&a.options.listFilesOnly)return u(Zl(k.Options_0_and_1_cannot_be_combined,"watch","listFilesOnly")),t.exit(1);if(a.options.project){if(a.fileNames.length!==0)return u(Zl(k.Option_project_cannot_be_mixed_with_source_files_on_a_command_line)),t.exit(1);const C=ca(a.options.project);if(!C||t.directoryExists(C)){if(h=zr(C,"tsconfig.json"),!t.fileExists(h))return u(Zl(k.Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0,a.options.project)),t.exit(1)}else if(h=C,!t.fileExists(h))return u(Zl(k.The_specified_path_does_not_exist_Colon_0,a.options.project)),t.exit(1)}else if(a.fileNames.length===0){const C=ca(t.getCurrentDirectory());h=cde(C,b=>t.fileExists(b))}if(a.fileNames.length===0&&!h)return a.options.showConfig?u(Zl(k.Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0,ca(t.getCurrentDirectory()))):(sfe(t),Xtt(t,a)),t.exit(1);const p=t.getCurrentDirectory(),g=XX(a.options,C=>wo(C,p));if(h){const C=new Map,b=nPe(h,g,C,a.watchOptions,t,u);if(g.showConfig)return b.errors.length!==0?(u=rfe(t,u,b.options),b.errors.forEach(u),t.exit(1)):(t.write(JSON.stringify(sue(b,h,t),null,4)+t.newLine),t.exit(0));if(u=rfe(t,u,b.options),wce(b.options))return xPe(t,u)?void 0:i7t(t,r,u,b,g,a.watchOptions,C);QT(b.options)?tit(t,r,u,b):eit(t,r,u,b)}else{if(g.showConfig)return t.write(JSON.stringify(sue(a,zr(p,"tsconfig.json"),t),null,4)+t.newLine),t.exit(0);if(u=rfe(t,u,g),wce(g))return xPe(t,u)?void 0:n7t(t,r,u,a.fileNames,g,a.watchOptions);QT(g)?tit(t,r,u,{...a,options:g}):eit(t,r,u,{...a,options:g})}}function wPe(t){if(t.length>0&&t[0].charCodeAt(0)===45){const r=t[0].slice(t[0].charCodeAt(1)===45?2:1).toLowerCase();return r==="build"||r==="b"}return!1}function Ztt(t,r,a){if(wPe(a)){const{buildOptions:h,watchOptions:p,projects:g,errors:C}=BIe(a.slice(1));if(h.generateCpuProfile&&t.enableCPUProfiler)t.enableCPUProfiler(h.generateCpuProfile,()=>Ytt(t,r,h,p,g,C));else return Ytt(t,r,h,p,g,C)}const u=RIe(a,h=>t.readFile(h));if(u.options.generateCpuProfile&&t.enableCPUProfiler)t.enableCPUProfiler(u.options.generateCpuProfile,()=>Qtt(t,r,u));else return Qtt(t,r,u)}function xPe(t,r){return!t.watchFile||!t.watchDirectory?(r(Zl(k.The_current_host_does_not_support_the_0_option,"--watch")),t.exit(1),!0):!1}var sZ=2;function Ytt(t,r,a,u,h,p){const g=rfe(t,aA(t),a);if(a.locale&&zoe(a.locale,t,p),p.length>0)return p.forEach(g),t.exit(1);if(a.help||h.length===0)return sfe(t),Ktt(t,EH),t.exit(0);if(!t.getModifiedTime||!t.setModifiedTime||a.clean&&!t.deleteFile)return g(Zl(k.The_current_host_does_not_support_the_0_option,"--build")),t.exit(1);if(a.watch){if(xPe(t,g))return;const N=lPe(t,void 0,g,tZ(t,rZ(t,a)),TPe(t,a));N.jsDocParsingMode=sZ;const R=sit(t,a);iit(t,r,N,R);const F=N.onWatchStatusChange;let H=!1;N.onWatchStatusChange=(q,X,Z,Q)=>{F==null||F(q,X,Z,Q),H&&(q.code===k.Found_0_errors_Watching_for_file_changes.code||q.code===k.Found_1_error_Watching_for_file_changes.code)&&DPe(U,R)};const U=dPe(N,h,a,u);return U.build(),DPe(U,R),H=!0,U}const C=cPe(t,void 0,g,tZ(t,rZ(t,a)),kPe(t,a));C.jsDocParsingMode=sZ;const b=sit(t,a);iit(t,r,C,b);const T=uPe(C,h,a),E=a.clean?T.clean():T.build();return DPe(T,b),Lxe(),t.exit(E)}function kPe(t,r){return rZ(t,r)?(a,u)=>t.write(Rde(a,u,t.newLine,t)):void 0}function eit(t,r,a,u){const{fileNames:h,options:p,projectReferences:g}=u,C=PQ(p,void 0,t);C.jsDocParsingMode=sZ;const b=C.getCurrentDirectory(),T=Mf(C.useCaseSensitiveFileNames());Q7(C,F=>ol(F,b,T)),EPe(t,p,!1);const E={rootNames:h,options:p,projectReferences:g,host:C,configFileParsingDiagnostics:mD(u)},N=YH(E),R=zde(N,a,F=>t.write(F+t.newLine),kPe(t,p));return lfe(t,N,void 0),r(N),t.exit(R)}function tit(t,r,a,u){const{options:h,fileNames:p,projectReferences:g}=u;EPe(t,h,!1);const C=eZ(h,t);C.jsDocParsingMode=sZ;const b=rPe({host:C,system:t,rootNames:p,options:h,configFileParsingDiagnostics:mD(u),projectReferences:g,reportDiagnostic:a,reportErrorSummary:kPe(t,h),afterProgramEmitAndDiagnostics:T=>{lfe(t,T.getProgram(),void 0),r(T)}});return t.exit(b)}function iit(t,r,a,u){nit(t,a,!0),a.afterProgramEmitAndDiagnostics=h=>{lfe(t,h.getProgram(),u),r(h)}}function nit(t,r,a){const u=r.createProgram;r.createProgram=(h,p,g,C,b,T)=>(j.assert(h!==void 0||p===void 0&&!!C),p!==void 0&&EPe(t,p,a),u(h,p,g,C,b,T))}function rit(t,r,a){a.jsDocParsingMode=sZ,nit(t,a,!1);const u=a.afterProgramCreate;a.afterProgramCreate=h=>{u(h),lfe(t,h.getProgram(),void 0),r(h)}}function TPe(t,r){return Ode(t,rZ(t,r))}function i7t(t,r,a,u,h,p,g){const C=Gde({configFileName:u.options.configFilePath,optionsToExtend:h,watchOptionsToExtend:p,system:t,reportDiagnostic:a,reportWatchStatus:TPe(t,u.options)});return rit(t,r,C),C.configFileParsingResult=u,C.extendedConfigCache=g,Xde(C)}function n7t(t,r,a,u,h,p){const g=Kde({rootFiles:u,options:h,watchOptions:p,system:t,reportDiagnostic:a,reportWatchStatus:TPe(t,h)});return rit(t,r,g),Xde(g)}function sit(t,r){if(t===Pd&&r.extendedDiagnostics)return coe(),r7t()}function r7t(){let t;return{addAggregateStatistic:r,forEachAggregateStatistics:a,clear:u};function r(h){const p=t==null?void 0:t.get(h.name);p?p.type===2?p.value=Math.max(p.value,h.value):p.value+=h.value:(t??(t=new Map)).set(h.name,h)}function a(h){t==null||t.forEach(h)}function u(){t=void 0}}function DPe(t,r){if(!r)return;if(!Exe()){Pd.write(k.Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found.message+`
+`);return}const a=[];a.push({name:"Projects in scope",value:nj(t.getBuildOrder()).length,type:1}),u("SolutionBuilder::Projects built"),u("SolutionBuilder::Timestamps only updates"),u("SolutionBuilder::Bundles updated"),r.forEachAggregateStatistics(p=>{p.name=`Aggregate ${p.name}`,a.push(p)}),aoe((p,g)=>{cfe(p)&&a.push({name:`${h(p)} time`,value:g,type:0})}),Ixe(),coe(),r.clear(),cit(Pd,a);function u(p){const g=zKe(p);g&&a.push({name:h(p),value:g,type:1})}function h(p){return p.replace("SolutionBuilder::","")}}function oit(t,r){return t===Pd&&(r.diagnostics||r.extendedDiagnostics)}function ait(t,r){return t===Pd&&r.generateTrace}function EPe(t,r,a){oit(t,r)&&coe(t),ait(t,r)&&Nxe(a?"build":"project",r.generateTrace,r.configFilePath)}function cfe(t){return so(t,"SolutionBuilder::")}function lfe(t,r,a){var u;const h=r.getCompilerOptions();ait(t,h)&&((u=Zn)==null||u.stopTracing());let p;if(oit(t,h)){p=[];const T=t.getMemoryUsage?t.getMemoryUsage():-1;C("Files",r.getSourceFiles().length);const E=X8t(r);if(h.extendedDiagnostics)for(const[q,X]of E.entries())C("Lines of "+q,X);else C("Lines",ae(E.values(),(q,X)=>q+X,0));C("Identifiers",r.getIdentifierCount()),C("Symbols",r.getSymbolCount()),C("Types",r.getTypeCount()),C("Instantiations",r.getInstantiationCount()),T>=0&&g({name:"Memory used",value:T,type:2},!0);const N=Exe(),R=N?e8("Program"):0,F=N?e8("Bind"):0,H=N?e8("Check"):0,U=N?e8("Emit"):0;if(h.extendedDiagnostics){const q=r.getRelationCacheSizes();C("Assignability cache size",q.assignable),C("Identity cache size",q.identity),C("Subtype cache size",q.subtype),C("Strict subtype cache size",q.strictSubtype),N&&aoe((X,Z)=>{cfe(X)||b(`${X} time`,Z,!0)})}else N&&(b("I/O read",e8("I/O Read"),!0),b("I/O write",e8("I/O Write"),!0),b("Parse time",R,!0),b("Bind time",F,!0),b("Check time",H,!0),b("Emit time",U,!0));N&&b("Total time",R+F+H+U,!1),cit(t,p),N?a?(aoe(q=>{cfe(q)||qKe(q)}),UKe(q=>{cfe(q)||$Ke(q)})):Ixe():t.write(k.Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found.message+`
+`)}function g(T,E){p.push(T),E&&(a==null||a.addAggregateStatistic(T))}function C(T,E){g({name:T,value:E,type:1},!0)}function b(T,E,N){g({name:T,value:E,type:0},N)}}function cit(t,r){let a=0,u=0;for(const h of r){h.name.length>a&&(a=h.name.length);const p=lit(h);p.length>u&&(u=p.length)}for(const h of r)t.write(`${h.name}:`.padEnd(a+2)+lit(h).toString().padStart(u)+t.newLine)}function lit(t){switch(t.type){case 1:return""+t.value;case 0:return(t.value/1e3).toFixed(2)+"s";case 2:return Math.round(t.value/1e3)+"K";default:j.assertNever(t.type)}}function s7t(t,r,a,u){const h=t.getCurrentDirectory(),p=ca(zr(h,"tsconfig.json"));if(t.fileExists(p))r(Zl(k.A_tsconfig_json_file_is_already_defined_at_Colon_0,p));else{t.writeFile(p,zIe(a,u,t.newLine));const g=[t.newLine,...afe(t,"Created a new tsconfig.json with:")];g.push(jIe(a,t.newLine)+t.newLine+t.newLine),g.push("You can learn more at https://aka.ms/tsconfig"+t.newLine);for(const C of g)t.write(C)}}function IPe(t,r){const a=ah(t,"strictNullChecks");return{typeFromExpression:Z,serializeTypeOfDeclaration:p,serializeReturnTypeForSignature:g,serializeTypeOfExpression:h};function u(se,Ne){return se!==void 0&&(!Ne||se&&Te(se))?!0:void 0}function h(se,Ne,Oe,He){return Z(se,Ne,!1,Oe,He)??H(se,Ne)}function p(se,Ne){switch(se.kind){case 171:return u(dd(se));case 169:return N(se,Ne);case 260:return E(se,Ne);case 172:return R(se,Ne);case 208:return F(se,Ne);case 277:return h(se.expression,Ne,void 0,!0);case 211:case 212:case 226:return u(dd(se))||F(se,Ne);case 303:return Z(se.initializer,Ne)||F(se,Ne);default:j.assertNever(se,`Node needs to be an inferrable node, found ${j.formatSyntaxKind(se.kind)}`)}}function g(se,Ne){switch(se.kind){case 177:return T(se,Ne);case 174:case 262:case 180:case 173:case 179:case 176:case 178:case 181:case 184:case 185:case 218:case 219:case 317:case 323:return De(se,Ne);default:j.assertNever(se,`Node needs to be an inferrable node, found ${j.formatSyntaxKind(se.kind)}`)}}function C(se){if(se)return se.kind===177?wp(se):se.parameters.length>0?dd(se.parameters[0]):void 0}function b(se,Ne){let Oe=C(se);return!Oe&&se!==Ne.firstAccessor&&(Oe=C(Ne.firstAccessor)),!Oe&&Ne.secondAccessor&&se!==Ne.secondAccessor&&(Oe=C(Ne.secondAccessor)),Oe}function T(se,Ne){const Oe=r.getAllAccessorDeclarations(se),He=b(se,Oe);return He?u(He):Oe.getAccessor?De(Oe.getAccessor,Ne):!1}function E(se,Ne){const Oe=dd(se);if(Oe)return u(Oe);let He;return se.initializer&&(r.isExpandoFunctionDeclaration(se)||(He=Z(se.initializer,Ne,void 0,void 0,dTe(se)))),He??F(se,Ne)}function N(se,Ne){const Oe=se.parent;if(Oe.kind===178)return T(Oe,Ne);const He=dd(se),Pe=r.requiresAddingImplicitUndefined(se,Ne.enclosingDeclaration);let We;return He?We=u(He,Pe):se.initializer&&ot(se.name)&&(We=Z(se.initializer,Ne,void 0,Pe)),We??F(se,Ne)}function R(se,Ne){const Oe=dd(se);if(Oe)return u(Oe);let He;if(se.initializer){const Pe=tV(se);He=Z(se.initializer,Ne,void 0,void 0,Pe)}return He??F(se,Ne)}function F(se,Ne){return Ne.tracker.reportInferenceFallback(se),!1}function H(se,Ne){return Ne.tracker.reportInferenceFallback(se),!1}function U(se,Ne){return Ne.tracker.reportInferenceFallback(se),!1}function q(se,Ne,Oe){return se.kind===177?De(se,Oe):(Oe.tracker.reportInferenceFallback(se),!1)}function X(se,Ne,Oe,He){return O0(Ne)?Z(se,Oe,!0,He):(He&&!Te(Ne)&&Oe.tracker.reportInferenceFallback(Ne),u(Ne))}function Z(se,Ne,Oe=!1,He=!1,Pe=!1){switch(se.kind){case 217:return FI(se)?X(se.expression,N7(se),Ne,He):Z(se.expression,Ne,Oe,He);case 80:if(r.isUndefinedIdentifierExpression(se))return!0;break;case 106:return!0;case 219:case 218:return Q(se,Ne);case 216:case 234:const We=se;return X(We.expression,We.type,Ne,He);case 224:const ze=se;if(oX(ze)&&(ze.operand.kind===10||ze.operand.kind===9))return ke();break;case 9:return ke();case 228:if(!Oe&&!Pe)return!0;break;case 15:case 11:return ke();case 10:return ke();case 112:case 97:return ke();case 209:return oe(se,Ne,Oe);case 210:return de(se,Ne,Oe);case 231:return H(se,Ne)}}function Q(se,Ne){const Oe=u(se.type)??De(se,Ne),He=we(se.typeParameters),Pe=se.parameters.every(We=>Ie(We,Ne));return Oe&&He&&Pe}function re(se,Ne,Oe){if(!Oe)return Ne.tracker.reportInferenceFallback(se),!1;for(const He of se.elements)if(He.kind===230)return Ne.tracker.reportInferenceFallback(He),!1;return!0}function oe(se,Ne,Oe){if(!re(se,Ne,Oe))return!1;let He=!0;for(const Pe of se.elements)j.assert(Pe.kind!==230),Pe.kind!==232&&(He=(Z(Pe,Ne,Oe)??H(Pe,Ne))&&He);return!0}function pe(se,Ne){let Oe=!0;for(const He of se.properties){if(He.flags&262144){Oe=!1;break}if(He.kind===304||He.kind===305)Ne.tracker.reportInferenceFallback(He),Oe=!1;else if(He.name.flags&262144){Oe=!1;break}else if(He.name.kind===81)Oe=!1;else if(He.name.kind===167){const Pe=He.name.expression;!oX(Pe,!1)&&!r.isDefinitelyReferenceToGlobalSymbolObject(Pe)&&(Ne.tracker.reportInferenceFallback(He.name),Oe=!1)}}return Oe}function de(se,Ne,Oe){if(!pe(se,Ne))return!1;let He=!0;for(const Pe of se.properties){j.assert(!lh(Pe)&&!Kv(Pe));const We=Pe.name;switch(Pe.kind){case 174:He=!!he(Pe,We,Ne)&&He;break;case 303:He=!!ue(Pe,We,Ne,Oe)&&He;break;case 178:case 177:He=!!Ae(Pe,We,Ne)&&He;break}}return He}function ue(se,Ne,Oe,He){return Z(se.initializer,Oe,He)??F(se,Oe)}function Ie(se,Ne){return N(se,Ne)}function we(se){return(se==null?void 0:se.every(Ne=>u(Ne.constraint)&&u(Ne.default)))??!0}function he(se,Ne,Oe){const He=De(se,Oe),Pe=we(se.typeParameters),We=se.parameters.every(ze=>Ie(ze,Oe));return He&&Pe&&We}function Ae(se,Ne,Oe){const He=r.getAllAccessorDeclarations(se),Pe=He.getAccessor&&C(He.getAccessor),We=He.setAccessor&&C(He.setAccessor);if(Pe!==void 0&&We!==void 0){const ze=se.parameters.every(Nt=>Ie(Nt,Oe));return oS(se)?ze&&u(Pe):ze}else if(He.firstAccessor===se){const ze=Pe??We;return ze?u(ze):q(se,He,Oe)}return!1}function ke(){return!0}function Te(se){return!a||P_(se.kind)||se.kind===201||se.kind===184||se.kind===185||se.kind===188||se.kind===189||se.kind===187||se.kind===203||se.kind===197?!0:se.kind===196?Te(se.type):se.kind===192||se.kind===193?se.types.every(Te):!1}function De(se,Ne){let Oe;const He=wp(se);return He&&(Oe=u(He)),!Oe&&mP(se)&&(Oe=qe(se,Ne)),Oe??U(se,Ne)}function qe(se,Ne){let Oe;if(se&&!lu(se.body)){if(nd(se)&3)return;const He=se.body;He&&Xo(He)?uS(He,Pe=>{if(!Oe)Oe=Pe.expression;else return Oe=void 0,!0}):Oe=He}if(Oe)return Z(Oe,Ne)}}var J1={};c(J1,{NameValidationResult:()=>vit,discoverTypings:()=>l7t,isTypingUpToDate:()=>_it,loadSafeList:()=>a7t,loadTypesMap:()=>c7t,nodeCoreModuleList:()=>mit,nodeCoreModules:()=>git,nonRelativeModuleNameForTypingCache:()=>yit,renderPackageNameValidationFailure:()=>d7t,validatePackageName:()=>u7t});var oZ="action::set",aZ="action::invalidate",cZ="action::packageInstalled",ufe="event::typesRegistry",dfe="event::beginInstallTypes",ffe="event::endInstallTypes",NPe="event::initializationFailed",aj="action::watchTypingLocations",hfe;(t=>{t.GlobalCacheLocation="--globalTypingsCacheLocation",t.LogFile="--logFile",t.EnableTelemetry="--enableTelemetry",t.TypingSafeListLocation="--typingSafeListLocation",t.TypesMapLocation="--typesMapLocation",t.NpmLocation="--npmLocation",t.ValidateDefaultNpmLocation="--validateDefaultNpmLocation"})(hfe||(hfe={}));function uit(t){return Pd.args.includes(t)}function dit(t){const r=Pd.args.indexOf(t);return r>=0&&r<Pd.args.length-1?Pd.args[r+1]:void 0}function fit(){const t=new Date;return`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}:${t.getSeconds().toString().padStart(2,"0")}.${t.getMilliseconds().toString().padStart(3,"0")}`}var hit=`
+ `;function n5(t){return hit+t.replace(/\n/g,hit)}function p2(t){return n5(JSON.stringify(t,void 0,2))}function _it(t,r){return new P0(hr(r,`ts${m}`)||hr(r,"latest")).compareTo(t.version)<=0}var pit=["assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","https","http2","inspector","module","net","os","path","perf_hooks","process","punycode","querystring","readline","repl","stream","stream/promises","string_decoder","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib"],o7t=pit.map(t=>`node:${t}`),mit=[...pit,...o7t],git=new Set(mit);function yit(t){return git.has(t)?"node":t}function a7t(t,r){const a=NH(r,u=>t.readFile(u));return new Map(Object.entries(a.config))}function c7t(t,r){var a;const u=NH(r,h=>t.readFile(h));if((a=u.config)!=null&&a.simpleMap)return new Map(Object.entries(u.config.simpleMap))}function l7t(t,r,a,u,h,p,g,C,b,T){if(!g||!g.enable)return{cachedTypingPaths:[],newTypingNames:[],filesToWatch:[]};const E=new Map;a=es(a,re=>{const oe=ca(re);if(Uv(oe))return oe});const N=[];g.include&&X(g.include,"Explicitly included types");const R=g.exclude||[];if(!T.types){const re=new Set(a.map(ts));re.add(u),re.forEach(oe=>{Z(oe,"bower.json","bower_components",N),Z(oe,"package.json","node_modules",N)})}if(g.disableFilenameBasedTypeAcquisition||Q(a),C){const re=Wb(C.map(yit),NT,sh);X(re,"Inferred typings from unresolved imports")}for(const re of R)E.delete(re)&&r&&r(`Typing for ${re} is in exclude list, will be ignored.`);p.forEach((re,oe)=>{const pe=b.get(oe);E.get(oe)===!1&&pe!==void 0&&_it(re,pe)&&E.set(oe,re.typingLocation)});const F=[],H=[];E.forEach((re,oe)=>{re?H.push(re):F.push(oe)});const U={cachedTypingPaths:H,newTypingNames:F,filesToWatch:N};return r&&r(`Finished typings discovery:${p2(U)}`),U;function q(re){E.has(re)||E.set(re,!1)}function X(re,oe){r&&r(`${oe}: ${JSON.stringify(re)}`),O(re,q)}function Z(re,oe,pe,de){const ue=zr(re,oe);let Ie,we;t.fileExists(ue)&&(de.push(ue),Ie=NH(ue,Te=>t.readFile(Te)).config,we=Rr([Ie.dependencies,Ie.devDependencies,Ie.optionalDependencies,Ie.peerDependencies],wr),X(we,`Typing names in '${ue}' dependencies`));const he=zr(re,pe);if(de.push(he),!t.directoryExists(he))return;const Ae=[],ke=we?we.map(Te=>zr(he,Te,oe)):t.readDirectory(he,[".json"],void 0,void 0,3).filter(Te=>{if(ud(Te)!==oe)return!1;const De=af(ca(Te)),qe=De[De.length-3][0]==="@";return qe&&Vw(De[De.length-4])===pe||!qe&&Vw(De[De.length-3])===pe});r&&r(`Searching for typing names in ${he}; all files: ${JSON.stringify(ke)}`);for(const Te of ke){const De=ca(Te),se=NH(De,Oe=>t.readFile(Oe)).config;if(!se.name)continue;const Ne=se.types||se.typings;if(Ne){const Oe=wo(Ne,ts(De));t.fileExists(Oe)?(r&&r(` Package '${se.name}' provides its own types.`),E.set(se.name,Oe)):r&&r(` Package '${se.name}' provides its own types but they are missing.`)}else Ae.push(se.name)}X(Ae," Found package names")}function Q(re){const oe=es(re,de=>{if(!Uv(de))return;const ue=s_(Vw(ud(de))),Ie=toe(ue);return h.get(Ie)});oe.length&&X(oe,"Inferred typings from file names"),Ft(re,de=>Xl(de,".jsx"))&&(r&&r("Inferred 'react' typings due to presence of '.jsx' extension"),q("react"))}}var vit=(t=>(t[t.Ok=0]="Ok",t[t.EmptyName=1]="EmptyName",t[t.NameTooLong=2]="NameTooLong",t[t.NameStartsWithDot=3]="NameStartsWithDot",t[t.NameStartsWithUnderscore=4]="NameStartsWithUnderscore",t[t.NameContainsNonURISafeCharacters=5]="NameContainsNonURISafeCharacters",t))(vit||{}),bit=214;function u7t(t){return LPe(t,!0)}function LPe(t,r){if(!t)return 1;if(t.length>bit)return 2;if(t.charCodeAt(0)===46)return 3;if(t.charCodeAt(0)===95)return 4;if(r){const a=/^@([^/]+)\/([^/]+)$/.exec(t);if(a){const u=LPe(a[1],!1);if(u!==0)return{name:a[1],isScopeName:!0,result:u};const h=LPe(a[2],!1);return h!==0?{name:a[2],isScopeName:!1,result:h}:0}}return encodeURIComponent(t)!==t?5:0}function d7t(t,r){return typeof t=="object"?Cit(r,t.result,t.name,t.isScopeName):Cit(r,t,r,!1)}function Cit(t,r,a,u){const h=u?"Scope":"Package";switch(r){case 1:return`'${t}':: ${h} name '${a}' cannot be empty`;case 2:return`'${t}':: ${h} name '${a}' should be less than ${bit} characters`;case 3:return`'${t}':: ${h} name '${a}' cannot start with '.'`;case 4:return`'${t}':: ${h} name '${a}' cannot start with '_'`;case 5:return`'${t}':: ${h} name '${a}' contains non URI safe characters`;case 0:return j.fail();default:j.assertNever(r)}}var lZ;(t=>{class r{constructor(h){this.text=h}getText(h,p){return h===0&&p===this.text.length?this.text:this.text.substring(h,p)}getLength(){return this.text.length}getChangeRange(){}}function a(u){return new r(u)}t.fromString=a})(lZ||(lZ={}));var PPe=(t=>(t[t.Dependencies=1]="Dependencies",t[t.DevDependencies=2]="DevDependencies",t[t.PeerDependencies=4]="PeerDependencies",t[t.OptionalDependencies=8]="OptionalDependencies",t[t.All=15]="All",t))(PPe||{}),APe=(t=>(t[t.Off=0]="Off",t[t.On=1]="On",t[t.Auto=2]="Auto",t))(APe||{}),OPe=(t=>(t[t.Semantic=0]="Semantic",t[t.PartialSemantic=1]="PartialSemantic",t[t.Syntactic=2]="Syntactic",t))(OPe||{}),Bg={},MPe=(t=>(t.Original="original",t.TwentyTwenty="2020",t))(MPe||{}),_fe=(t=>(t.All="All",t.SortAndCombine="SortAndCombine",t.RemoveUnused="RemoveUnused",t))(_fe||{}),pfe=(t=>(t[t.Invoked=1]="Invoked",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.TriggerForIncompleteCompletions=3]="TriggerForIncompleteCompletions",t))(pfe||{}),RPe=(t=>(t.Type="Type",t.Parameter="Parameter",t.Enum="Enum",t))(RPe||{}),FPe=(t=>(t.none="none",t.definition="definition",t.reference="reference",t.writtenReference="writtenReference",t))(FPe||{}),BPe=(t=>(t[t.None=0]="None",t[t.Block=1]="Block",t[t.Smart=2]="Smart",t))(BPe||{}),mfe=(t=>(t.Ignore="ignore",t.Insert="insert",t.Remove="remove",t))(mfe||{});function uZ(t){return{indentSize:4,tabSize:4,newLineCharacter:t||`
+`,convertTabsToSpaces:!0,indentStyle:2,insertSpaceAfterConstructor:!1,insertSpaceAfterCommaDelimiter:!0,insertSpaceAfterSemicolonInForStatements:!0,insertSpaceBeforeAndAfterBinaryOperators:!0,insertSpaceAfterKeywordsInControlFlowStatements:!0,insertSpaceAfterFunctionKeywordForAnonymousFunctions:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces:!0,insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces:!1,insertSpaceBeforeFunctionParenthesis:!1,placeOpenBraceOnNewLineForFunctions:!1,placeOpenBraceOnNewLineForControlBlocks:!1,semicolons:"ignore",trimTrailingWhitespace:!0,indentSwitchCase:!0}}var Sit=uZ(`
+`),dZ=(t=>(t[t.aliasName=0]="aliasName",t[t.className=1]="className",t[t.enumName=2]="enumName",t[t.fieldName=3]="fieldName",t[t.interfaceName=4]="interfaceName",t[t.keyword=5]="keyword",t[t.lineBreak=6]="lineBreak",t[t.numericLiteral=7]="numericLiteral",t[t.stringLiteral=8]="stringLiteral",t[t.localName=9]="localName",t[t.methodName=10]="methodName",t[t.moduleName=11]="moduleName",t[t.operator=12]="operator",t[t.parameterName=13]="parameterName",t[t.propertyName=14]="propertyName",t[t.punctuation=15]="punctuation",t[t.space=16]="space",t[t.text=17]="text",t[t.typeParameterName=18]="typeParameterName",t[t.enumMemberName=19]="enumMemberName",t[t.functionName=20]="functionName",t[t.regularExpressionLiteral=21]="regularExpressionLiteral",t[t.link=22]="link",t[t.linkName=23]="linkName",t[t.linkText=24]="linkText",t))(dZ||{}),WPe=(t=>(t[t.None=0]="None",t[t.MayIncludeAutoImports=1]="MayIncludeAutoImports",t[t.IsImportStatementCompletion=2]="IsImportStatementCompletion",t[t.IsContinuation=4]="IsContinuation",t[t.ResolvedModuleSpecifiers=8]="ResolvedModuleSpecifiers",t[t.ResolvedModuleSpecifiersBeyondLimit=16]="ResolvedModuleSpecifiersBeyondLimit",t[t.MayIncludeMethodSnippets=32]="MayIncludeMethodSnippets",t))(WPe||{}),VPe=(t=>(t.Comment="comment",t.Region="region",t.Code="code",t.Imports="imports",t))(VPe||{}),HPe=(t=>(t[t.JavaScript=0]="JavaScript",t[t.SourceMap=1]="SourceMap",t[t.Declaration=2]="Declaration",t))(HPe||{}),jPe=(t=>(t[t.None=0]="None",t[t.InMultiLineCommentTrivia=1]="InMultiLineCommentTrivia",t[t.InSingleQuoteStringLiteral=2]="InSingleQuoteStringLiteral",t[t.InDoubleQuoteStringLiteral=3]="InDoubleQuoteStringLiteral",t[t.InTemplateHeadOrNoSubstitutionTemplate=4]="InTemplateHeadOrNoSubstitutionTemplate",t[t.InTemplateMiddleOrTail=5]="InTemplateMiddleOrTail",t[t.InTemplateSubstitutionPosition=6]="InTemplateSubstitutionPosition",t))(jPe||{}),zPe=(t=>(t[t.Punctuation=0]="Punctuation",t[t.Keyword=1]="Keyword",t[t.Operator=2]="Operator",t[t.Comment=3]="Comment",t[t.Whitespace=4]="Whitespace",t[t.Identifier=5]="Identifier",t[t.NumberLiteral=6]="NumberLiteral",t[t.BigIntLiteral=7]="BigIntLiteral",t[t.StringLiteral=8]="StringLiteral",t[t.RegExpLiteral=9]="RegExpLiteral",t))(zPe||{}),UPe=(t=>(t.unknown="",t.warning="warning",t.keyword="keyword",t.scriptElement="script",t.moduleElement="module",t.classElement="class",t.localClassElement="local class",t.interfaceElement="interface",t.typeElement="type",t.enumElement="enum",t.enumMemberElement="enum member",t.variableElement="var",t.localVariableElement="local var",t.variableUsingElement="using",t.variableAwaitUsingElement="await using",t.functionElement="function",t.localFunctionElement="local function",t.memberFunctionElement="method",t.memberGetAccessorElement="getter",t.memberSetAccessorElement="setter",t.memberVariableElement="property",t.memberAccessorVariableElement="accessor",t.constructorImplementationElement="constructor",t.callSignatureElement="call",t.indexSignatureElement="index",t.constructSignatureElement="construct",t.parameterElement="parameter",t.typeParameterElement="type parameter",t.primitiveType="primitive type",t.label="label",t.alias="alias",t.constElement="const",t.letElement="let",t.directory="directory",t.externalModuleName="external module name",t.jsxAttribute="JSX attribute",t.string="string",t.link="link",t.linkName="link name",t.linkText="link text",t))(UPe||{}),qPe=(t=>(t.none="",t.publicMemberModifier="public",t.privateMemberModifier="private",t.protectedMemberModifier="protected",t.exportedModifier="export",t.ambientModifier="declare",t.staticModifier="static",t.abstractModifier="abstract",t.optionalModifier="optional",t.deprecatedModifier="deprecated",t.dtsModifier=".d.ts",t.tsModifier=".ts",t.tsxModifier=".tsx",t.jsModifier=".js",t.jsxModifier=".jsx",t.jsonModifier=".json",t.dmtsModifier=".d.mts",t.mtsModifier=".mts",t.mjsModifier=".mjs",t.dctsModifier=".d.cts",t.ctsModifier=".cts",t.cjsModifier=".cjs",t))(qPe||{}),$Pe=(t=>(t.comment="comment",t.identifier="identifier",t.keyword="keyword",t.numericLiteral="number",t.bigintLiteral="bigint",t.operator="operator",t.stringLiteral="string",t.whiteSpace="whitespace",t.text="text",t.punctuation="punctuation",t.className="class name",t.enumName="enum name",t.interfaceName="interface name",t.moduleName="module name",t.typeParameterName="type parameter name",t.typeAliasName="type alias name",t.parameterName="parameter name",t.docCommentTagName="doc comment tag name",t.jsxOpenTagName="jsx open tag name",t.jsxCloseTagName="jsx close tag name",t.jsxSelfClosingTagName="jsx self closing tag name",t.jsxAttribute="jsx attribute",t.jsxText="jsx text",t.jsxAttributeStringLiteralValue="jsx attribute string literal value",t))($Pe||{}),gfe=(t=>(t[t.comment=1]="comment",t[t.identifier=2]="identifier",t[t.keyword=3]="keyword",t[t.numericLiteral=4]="numericLiteral",t[t.operator=5]="operator",t[t.stringLiteral=6]="stringLiteral",t[t.regularExpressionLiteral=7]="regularExpressionLiteral",t[t.whiteSpace=8]="whiteSpace",t[t.text=9]="text",t[t.punctuation=10]="punctuation",t[t.className=11]="className",t[t.enumName=12]="enumName",t[t.interfaceName=13]="interfaceName",t[t.moduleName=14]="moduleName",t[t.typeParameterName=15]="typeParameterName",t[t.typeAliasName=16]="typeAliasName",t[t.parameterName=17]="parameterName",t[t.docCommentTagName=18]="docCommentTagName",t[t.jsxOpenTagName=19]="jsxOpenTagName",t[t.jsxCloseTagName=20]="jsxCloseTagName",t[t.jsxSelfClosingTagName=21]="jsxSelfClosingTagName",t[t.jsxAttribute=22]="jsxAttribute",t[t.jsxText=23]="jsxText",t[t.jsxAttributeStringLiteralValue=24]="jsxAttributeStringLiteralValue",t[t.bigintLiteral=25]="bigintLiteral",t))(gfe||{}),Uh=Ov(99,!0),JPe=(t=>(t[t.None=0]="None",t[t.Value=1]="Value",t[t.Type=2]="Type",t[t.Namespace=4]="Namespace",t[t.All=7]="All",t))(JPe||{});function fZ(t){switch(t.kind){case 260:return nr(t)&&Joe(t)?7:1;case 169:case 208:case 172:case 171:case 303:case 304:case 174:case 173:case 176:case 177:case 178:case 262:case 218:case 219:case 299:case 291:return 1;case 168:case 264:case 265:case 187:return 2;case 346:return t.name===void 0?3:2;case 306:case 263:return 3;case 267:return Vh(t)||nC(t)===1?5:4;case 266:case 275:case 276:case 271:case 272:case 277:case 278:return 7;case 307:return 5}return 7}function zI(t){t=Lfe(t);const r=t.parent;return t.kind===307?1:Il(r)||vh(r)||eC(r)||l_(r)||H0(r)||Wd(r)&&t===r.name?7:hZ(t)?f7t(t):Wy(t)?fZ(r):E_(t)&&Qi(t,om(T7,rP,a2))?7:m7t(t)?2:h7t(t)?4:$l(r)?(j.assert(Rg(r.parent)),2):bS(r)?3:1}function f7t(t){const r=t.kind===166?t:o_(t.parent)&&t.parent.right===t?t.parent:void 0;return r&&r.parent.kind===271?7:4}function hZ(t){for(;t.parent.kind===166;)t=t.parent;return gI(t.parent)&&t.parent.moduleReference===t}function h7t(t){return _7t(t)||p7t(t)}function _7t(t){let r=t,a=!0;if(r.parent.kind===166){for(;r.parent&&r.parent.kind===166;)r=r.parent;a=r.right===t}return r.parent.kind===183&&!a}function p7t(t){let r=t,a=!0;if(r.parent.kind===211){for(;r.parent&&r.parent.kind===211;)r=r.parent;a=r.name===t}if(!a&&r.parent.kind===233&&r.parent.parent.kind===298){const u=r.parent.parent.parent;return u.kind===263&&r.parent.parent.token===119||u.kind===264&&r.parent.parent.token===96}return!1}function m7t(t){switch(q8(t)&&(t=t.parent),t.kind){case 110:return!F0(t);case 197:return!0}switch(t.parent.kind){case 183:return!0;case 205:return!t.parent.isTypeOf;case 233:return N1(t.parent)}return!1}function yfe(t,r=!1,a=!1){return cj(t,la,bfe,r,a)}function r5(t,r=!1,a=!1){return cj(t,rD,bfe,r,a)}function vfe(t,r=!1,a=!1){return cj(t,T1,bfe,r,a)}function GPe(t,r=!1,a=!1){return cj(t,i2,g7t,r,a)}function KPe(t,r=!1,a=!1){return cj(t,Fd,bfe,r,a)}function XPe(t,r=!1,a=!1){return cj(t,oh,y7t,r,a)}function bfe(t){return t.expression}function g7t(t){return t.tag}function y7t(t){return t.tagName}function cj(t,r,a,u,h){let p=u?v7t(t):_Z(t);return h&&(p=Vu(p)),!!p&&!!p.parent&&r(p.parent)&&a(p.parent)===p}function _Z(t){return K3(t)?t.parent:t}function v7t(t){return K3(t)||xfe(t)?t.parent:t}function pZ(t,r){for(;t;){if(t.kind===256&&t.label.escapedText===r)return t.label;t=t.parent}}function lj(t,r){return Nr(t.expression)?t.expression.name.text===r:!1}function uj(t){var r;return ot(t)&&((r=Jr(t.parent,m8))==null?void 0:r.label)===t}function Cfe(t){var r;return ot(t)&&((r=Jr(t.parent,_x))==null?void 0:r.label)===t}function Sfe(t){return Cfe(t)||uj(t)}function wfe(t){var r;return((r=Jr(t.parent,V6))==null?void 0:r.tagName)===t}function QPe(t){var r;return((r=Jr(t.parent,o_))==null?void 0:r.right)===t}function K3(t){var r;return((r=Jr(t.parent,Nr))==null?void 0:r.name)===t}function xfe(t){var r;return((r=Jr(t.parent,wl))==null?void 0:r.argumentExpression)===t}function kfe(t){var r;return((r=Jr(t.parent,rd))==null?void 0:r.name)===t}function Tfe(t){var r;return ot(t)&&((r=Jr(t.parent,Ho))==null?void 0:r.name)===t}function mZ(t){switch(t.parent.kind){case 172:case 171:case 303:case 306:case 174:case 173:case 177:case 178:case 267:return No(t.parent)===t;case 212:return t.parent.argumentExpression===t;case 167:return!0;case 201:return t.parent.parent.kind===199;default:return!1}}function ZPe(t){return qk(t.parent.parent)&&L8(t.parent.parent)===t}function UI(t){for(Ng(t)&&(t=t.parent.parent);;){if(t=t.parent,!t)return;switch(t.kind){case 307:case 174:case 173:case 262:case 218:case 177:case 178:case 263:case 264:case 266:case 267:return t}}}function gD(t){switch(t.kind){case 307:return wd(t)?"module":"script";case 267:return"module";case 263:case 231:return"class";case 264:return"interface";case 265:case 338:case 346:return"type";case 266:return"enum";case 260:return r(t);case 208:return r(A1(t));case 219:case 262:case 218:return"function";case 177:return"getter";case 178:return"setter";case 174:case 173:return"method";case 303:const{initializer:a}=t;return Ho(a)?"method":"property";case 172:case 171:case 304:case 305:return"property";case 181:return"index";case 180:return"construct";case 179:return"call";case 176:case 175:return"constructor";case 168:return"type parameter";case 306:return"enum member";case 169:return Zr(t,31)?"property":"parameter";case 271:case 276:case 281:case 274:case 280:return"alias";case 226:const u=Bu(t),{right:h}=t;switch(u){case 7:case 8:case 9:case 0:return"";case 1:case 2:const g=gD(h);return g===""?"const":g;case 3:return ml(h)?"method":"property";case 4:return"property";case 5:return ml(h)?"method":"property";case 6:return"local class";default:return""}case 80:return H0(t.parent)?"alias":"";case 277:const p=gD(t.expression);return p===""?"const":p;default:return""}function r(a){return $6(a)?"const":WG(a)?"let":"var"}}function X3(t){switch(t.kind){case 110:return!0;case 80:return uce(t)&&t.parent.kind===169;default:return!1}}var b7t=/^\/\/\/\s*</;function Wg(t,r){const a=Lv(r),u=r.getLineAndCharacterOfPosition(t).line;return a[u]}function Ip(t,r){return Dfe(t.pos,t.end,r)}function YPe(t,r){return dj(t,r.pos)&&dj(t,r.end)}function s5(t,r){return t.pos<=r&&r<=t.end}function dj(t,r){return t.pos<r&&r<t.end}function Dfe(t,r,a){return t<=a.pos&&r>=a.end}function fj(t,r,a){return t.pos<=r&&t.end>=a}function o5(t,r,a){return yZ(t.pos,t.end,r,a)}function gZ(t,r,a,u){return yZ(t.getStart(r),t.end,a,u)}function yZ(t,r,a,u){const h=Math.max(t,a),p=Math.min(r,u);return h<p}function Efe(t,r,a){return j.assert(t.pos<=r),r<t.end||!J0(t,a)}function J0(t,r){if(t===void 0||lu(t))return!1;switch(t.kind){case 263:case 264:case 266:case 210:case 206:case 187:case 241:case 268:case 269:case 275:case 279:return Ife(t,20,r);case 299:return J0(t.block,r);case 214:if(!t.arguments)return!0;case 213:case 217:case 196:return Ife(t,22,r);case 184:case 185:return J0(t.type,r);case 176:case 177:case 178:case 262:case 218:case 174:case 173:case 180:case 179:case 219:return t.body?J0(t.body,r):t.type?J0(t.type,r):Nfe(t,22,r);case 267:return!!t.body&&J0(t.body,r);case 245:return t.elseStatement?J0(t.elseStatement,r):J0(t.thenStatement,r);case 244:return J0(t.expression,r)||Nfe(t,27,r);case 209:case 207:case 212:case 167:case 189:return Ife(t,24,r);case 181:return t.type?J0(t.type,r):Nfe(t,24,r);case 296:case 297:return!1;case 248:case 249:case 250:case 247:return J0(t.statement,r);case 246:return Nfe(t,117,r)?Ife(t,22,r):J0(t.statement,r);case 186:return J0(t.exprName,r);case 221:case 220:case 222:case 229:case 230:return J0(t.expression,r);case 215:return J0(t.template,r);case 228:const u=rl(t.templateSpans);return J0(u,r);case 239:return Dg(t.literal);case 278:case 272:return Dg(t.moduleSpecifier);case 224:return J0(t.operand,r);case 226:return J0(t.right,r);case 227:return J0(t.whenFalse,r);default:return!0}}function Ife(t,r,a){const u=t.getChildren(a);if(u.length){const h=va(u);if(h.kind===r)return!0;if(h.kind===27&&u.length!==1)return u[u.length-2].kind===r}return!1}function eAe(t){const r=vZ(t);if(!r)return;const a=r.getChildren();return{listItemIndex:U6(a,t),list:r}}function Nfe(t,r,a){return!!Uc(t,r,a)}function Uc(t,r,a){return Fe(t.getChildren(a),u=>u.kind===r)}function vZ(t){const r=Fe(t.parent.getChildren(),a=>E3(a)&&Ip(a,t));return j.assert(!r||Yt(r.getChildren(),t)),r}function wit(t){return t.kind===90}function C7t(t){return t.kind===86}function S7t(t){return t.kind===100}function w7t(t){if(Bf(t))return t.name;if(hd(t)){const r=t.modifiers&&Fe(t.modifiers,wit);if(r)return r}if(fd(t)){const r=Fe(t.getChildren(),C7t);if(r)return r}}function x7t(t){if(Bf(t))return t.name;if(Wu(t)){const r=Fe(t.modifiers,wit);if(r)return r}if(ml(t)){const r=Fe(t.getChildren(),S7t);if(r)return r}}function k7t(t){let r;return Qi(t,a=>(ws(a)&&(r=a),!o_(a.parent)&&!ws(a.parent)&&!OT(a.parent))),r}function bZ(t,r){if(t.flags&16777216)return;const a=RZ(t,r);if(a)return a;const u=k7t(t);return u&&r.getTypeAtLocation(u)}function T7t(t,r){if(!r)switch(t.kind){case 263:case 231:return w7t(t);case 262:case 218:return x7t(t);case 176:return t}if(Bf(t))return t.name}function xit(t,r){if(t.importClause){if(t.importClause.name&&t.importClause.namedBindings)return;if(t.importClause.name)return t.importClause.name;if(t.importClause.namedBindings){if(j1(t.importClause.namedBindings)){const a=Bm(t.importClause.namedBindings.elements);return a?a.name:void 0}else if(Jv(t.importClause.namedBindings))return t.importClause.namedBindings.name}}if(!r)return t.moduleSpecifier}function kit(t,r){if(t.exportClause){if(Xm(t.exportClause))return Bm(t.exportClause.elements)?t.exportClause.elements[0].name:void 0;if(jy(t.exportClause))return t.exportClause.name}if(!r)return t.moduleSpecifier}function D7t(t){if(t.types.length===1)return t.types[0].expression}function Tit(t,r){const{parent:a}=t;if(Fa(t)&&(r||t.kind!==90)?Fg(a)&&Yt(a.modifiers,t):t.kind===86?hd(a)||fd(t):t.kind===100?Wu(a)||ml(t):t.kind===120?zf(a):t.kind===94?sD(a):t.kind===156?Mg(a):t.kind===145||t.kind===144?rd(a):t.kind===102?Wd(a):t.kind===139?um(a):t.kind===153&&kp(a)){const u=T7t(a,r);if(u)return u}if((t.kind===115||t.kind===87||t.kind===121)&&Sf(a)&&a.declarations.length===1){const u=a.declarations[0];if(ot(u.name))return u.name}if(t.kind===156){if(H0(a)&&a.isTypeOnly){const u=xit(a.parent,r);if(u)return u}if(Ju(a)&&a.isTypeOnly){const u=kit(a,r);if(u)return u}}if(t.kind===130){if(l_(a)&&a.propertyName||vh(a)&&a.propertyName||Jv(a)||jy(a))return a.name;if(Ju(a)&&a.exportClause&&jy(a.exportClause))return a.exportClause.name}if(t.kind===102&&du(a)){const u=xit(a,r);if(u)return u}if(t.kind===95){if(Ju(a)){const u=kit(a,r);if(u)return u}if(Il(a))return Vu(a.expression)}if(t.kind===149&&eC(a))return a.expression;if(t.kind===161&&(du(a)||Ju(a))&&a.moduleSpecifier)return a.moduleSpecifier;if((t.kind===96||t.kind===119)&&Tp(a)&&a.token===t.kind){const u=D7t(a);if(u)return u}if(t.kind===96){if($l(a)&&a.constraint&&qp(a.constraint))return a.constraint.typeName;if(iD(a)&&qp(a.extendsType))return a.extendsType.typeName}if(t.kind===140&&DI(a))return a.typeParameter.name;if(t.kind===103&&$l(a)&&II(a.parent))return a.name;if(t.kind===143&&t2(a)&&a.operator===143&&qp(a.type))return a.type.typeName;if(t.kind===148&&t2(a)&&a.operator===148&&hH(a.type)&&qp(a.type.elementType))return a.type.elementType.typeName;if(!r){if((t.kind===105&&rD(a)||t.kind===116&&UP(a)||t.kind===114&&S3(a)||t.kind===135&&hx(a)||t.kind===127&&SX(a)||t.kind===91&&FEe(a))&&a.expression)return Vu(a.expression);if((t.kind===103||t.kind===104)&&ur(a)&&a.operatorToken===t)return Vu(a.right);if(t.kind===130&&v7(a)&&qp(a.type))return a.type.typeName;if(t.kind===103&&xX(a)||t.kind===165&&_H(a))return Vu(a.expression)}return t}function Lfe(t){return Tit(t,!1)}function CZ(t){return Tit(t,!0)}function R_(t,r){return Q3(t,r,a=>P1(a)||P_(a.kind)||Vs(a))}function Q3(t,r,a){return Dit(t,r,!1,a,!1)}function Rs(t,r){return Dit(t,r,!0,void 0,!1)}function Dit(t,r,a,u,h){let p=t,g;e:for(;;){const b=p.getChildren(t),T=ti(b,r,(E,N)=>N,(E,N)=>{const R=b[E].getEnd();if(R<r)return-1;const F=a?b[E].getFullStart():b[E].getStart(t,!0);return F>r?1:C(b[E],F,R)?b[E-1]&&C(b[E-1])?1:0:u&&F===r&&b[E-1]&&b[E-1].getEnd()===r&&C(b[E-1])?1:-1});if(g)return g;if(T>=0&&b[T]){p=b[T];continue e}return p}function C(b,T,E){if(E??(E=b.getEnd()),E<r||(T??(T=a?b.getFullStart():b.getStart(t,!0)),T>r))return!1;if(r<E||r===E&&(b.kind===1||h))return!0;if(u&&E===r){const N=xd(r,t,b);if(N&&u(N))return g=N,!0}return!1}}function tAe(t,r){let a=Rs(t,r);for(;SZ(a);){const u=yD(a,a.parent,t);if(!u)return;a=u}return a}function hj(t,r){const a=Rs(t,r);return eP(a)&&r>a.getStart(t)&&r<a.getEnd()?a:xd(r,t)}function yD(t,r,a){return u(r);function u(h){return eP(h)&&h.pos===t.end?h:J(h.getChildren(a),p=>(p.pos<=t.pos&&p.end>t.end||p.pos===t.end)&&aAe(p,a)?u(p):void 0)}}function xd(t,r,a,u){const h=p(a||r);return j.assert(!(h&&SZ(h))),h;function p(g){if(Eit(g)&&g.kind!==1)return g;const C=g.getChildren(r),b=ti(C,t,(E,N)=>N,(E,N)=>t<C[E].end?!C[E-1]||t>=C[E-1].end?0:1:-1);if(b>=0&&C[b]){const E=C[b];if(t<E.end)if(E.getStart(r,!u)>=t||!aAe(E,r)||SZ(E)){const F=nAe(C,b,r,g.kind);return F?!u&&SG(F)&&F.getChildren(r).length?p(F):iAe(F,r):void 0}else return p(E)}j.assert(a!==void 0||g.kind===307||g.kind===1||SG(g));const T=nAe(C,C.length,r,g.kind);return T&&iAe(T,r)}}function Eit(t){return eP(t)&&!SZ(t)}function iAe(t,r){if(Eit(t))return t;const a=t.getChildren(r);if(a.length===0)return t;const u=nAe(a,a.length,r,t.kind);return u&&iAe(u,r)}function nAe(t,r,a,u){for(let h=r-1;h>=0;h--){const p=t[h];if(SZ(p))h===0&&(u===12||u===285)&&j.fail("`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`");else if(aAe(t[h],a))return t[h]}}function lA(t,r,a=xd(r,t)){if(a&&eae(a)){const u=a.getStart(t),h=a.getEnd();if(u<r&&r<h)return!0;if(r===h)return!!a.isUnterminated}return!1}function rAe(t,r){const a=Rs(t,r);return a?!!(a.kind===12||a.kind===30&&a.parent.kind===12||a.kind===30&&a.parent.kind===294||a&&a.kind===20&&a.parent.kind===294||a.kind===30&&a.parent.kind===287):!1}function SZ(t){return RP(t)&&t.containsOnlyTriviaWhiteSpaces}function Pfe(t,r){const a=Rs(t,r);return Gw(a.kind)&&r>a.getStart(t)}function sAe(t,r){const a=Rs(t,r);return!!(RP(a)||a.kind===19&&x7(a.parent)&&Gv(a.parent.parent)||a.kind===30&&oh(a.parent)&&Gv(a.parent.parent))}function wZ(t,r){function a(u){for(;u;)if(u.kind>=285&&u.kind<=294||u.kind===12||u.kind===30||u.kind===32||u.kind===80||u.kind===20||u.kind===19||u.kind===44)u=u.parent;else if(u.kind===284){if(r>u.getStart(t))return!0;u=u.parent}else return!1;return!1}return a(Rs(t,r))}function xZ(t,r,a){const u=xa(t.kind),h=xa(r),p=t.getFullStart(),g=a.text.lastIndexOf(h,p);if(g===-1)return;if(a.text.lastIndexOf(u,p-1)<g){const T=xd(g+1,a);if(T&&T.kind===r)return T}const C=t.kind;let b=0;for(;;){const T=xd(t.getFullStart(),a);if(!T)return;if(t=T,t.kind===r){if(b===0)return t;b--}else t.kind===C&&b++}}function E7t(t,r,a){return r?t.getNonNullableType():a?t.getNonOptionalType():t}function _j(t,r,a){const u=Ofe(t,r);return u!==void 0&&(N1(u.called)||Afe(u.called,u.nTypeArguments,a).length!==0||_j(u.called,r,a))}function Afe(t,r,a){let u=a.getTypeAtLocation(t);return gh(t.parent)&&(u=E7t(u,_8(t.parent),!0)),(rD(t.parent)?u.getConstructSignatures():u.getCallSignatures()).filter(p=>!!p.typeParameters&&p.typeParameters.length>=r)}function Ofe(t,r){if(r.text.lastIndexOf("<",t?t.pos:r.text.length)===-1)return;let a=t,u=0,h=0;for(;a;){switch(a.kind){case 30:if(a=xd(a.getFullStart(),r),a&&a.kind===29&&(a=xd(a.getFullStart(),r)),!a||!ot(a))return;if(!u)return Wy(a)?void 0:{called:a,nTypeArguments:h};u--;break;case 50:u=3;break;case 49:u=2;break;case 32:u++;break;case 20:if(a=xZ(a,19,r),!a)return;break;case 22:if(a=xZ(a,21,r),!a)return;break;case 24:if(a=xZ(a,23,r),!a)return;break;case 28:h++;break;case 39:case 80:case 11:case 9:case 10:case 112:case 97:case 114:case 96:case 143:case 25:case 52:case 58:case 59:break;default:if(ws(a))break;return}a=xd(a.getFullStart(),r)}}function kS(t,r,a){return pd.getRangeOfEnclosingComment(t,r,void 0,a)}function oAe(t,r){const a=Rs(t,r);return!!Qi(a,z0)}function aAe(t,r){return t.kind===1?!!t.jsDoc:t.getWidth(r)!==0}function a5(t,r=0){const a=[],u=Wf(t)?joe(t)&~r:0;return u&2&&a.push("private"),u&4&&a.push("protected"),u&1&&a.push("public"),(u&256||gu(t))&&a.push("static"),u&64&&a.push("abstract"),u&32&&a.push("export"),u&65536&&a.push("deprecated"),t.flags&33554432&&a.push("declare"),t.kind===277&&a.push("export"),a.length>0?a.join(","):""}function cAe(t){if(t.kind===183||t.kind===213)return t.typeArguments;if(Ho(t)||t.kind===263||t.kind===264)return t.typeParameters}function kZ(t){return t===2||t===3}function Mfe(t){return!!(t===11||t===14||Gw(t))}function Iit(t,r,a){return!!(r.flags&4)&&t.isEmptyAnonymousObjectType(a)}function lAe(t){if(!t.isIntersection())return!1;const{types:r,checker:a}=t;return r.length===2&&(Iit(a,r[0],r[1])||Iit(a,r[1],r[0]))}function pj(t,r,a){return Gw(t.kind)&&t.getStart(a)<r&&r<t.end||!!t.isUnterminated&&r===t.end}function Rfe(t){switch(t){case 125:case 123:case 124:return!0}return!1}function Ffe(t){const r=Jd(t);return aue(r,t&&t.configFile),r}function TS(t){return!!((t.kind===209||t.kind===210)&&(t.parent.kind===226&&t.parent.left===t&&t.parent.operatorToken.kind===64||t.parent.kind===250&&t.parent.initializer===t||TS(t.parent.kind===303?t.parent.parent:t.parent)))}function uAe(t,r){return Nit(t,r,!0)}function dAe(t,r){return Nit(t,r,!1)}function Nit(t,r,a){const u=kS(t,r,void 0);return!!u&&a===b7t.test(t.text.substring(u.pos,u.end))}function Bfe(t,r){if(t)switch(t.kind){case 11:case 15:return Wfe(t,r);default:return f_(t)}}function f_(t,r,a){return Fu(t.getStart(r),(a||t).getEnd())}function Wfe(t,r){let a=t.getEnd()-1;if(t.isUnterminated){if(t.getStart()===a)return;a=Math.min(r,t.getEnd())}return Fu(t.getStart()+1,a)}function Vfe(t,r){return Um(t.getStart(r),t.end)}function DS(t){return Fu(t.pos,t.end)}function TZ(t){return Um(t.start,t.start+t.length)}function DZ(t,r,a){return mj(Ff(t,r),a)}function mj(t,r){return{span:t,newText:r}}var Hfe=[133,131,163,136,97,140,143,146,106,150,151,148,154,155,114,112,116,157,158,159];function c5(t){return Yt(Hfe,t)}function Lit(t){return t.kind===156}function EZ(t){return Lit(t)||ot(t)&&t.text==="type"}function Z3(){const t=[];return r=>{const a=Sc(r);return!t[a]&&(t[a]=!0)}}function uA(t){return t.getText(0,t.getLength())}function gj(t,r){let a="";for(let u=0;u<r;u++)a+=t;return a}function jfe(t){return t.isTypeParameter()&&t.getConstraint()||t}function yj(t){return t.kind===167?cm(t.expression)?t.expression.text:void 0:Vs(t)?Fr(t):Lg(t)}function fAe(t){return t.getSourceFiles().some(r=>!r.isDeclarationFile&&!t.isSourceFileFromExternalLibrary(r)&&!!(r.externalModuleIndicator||r.commonJsModuleIndicator))}function hAe(t){return t.getSourceFiles().some(r=>!r.isDeclarationFile&&!t.isSourceFileFromExternalLibrary(r)&&!!r.externalModuleIndicator)}function zfe(t){return!!t.module||Ja(t)>=2||!!t.noEmit}function dA(t,r){return{fileExists:a=>t.fileExists(a),getCurrentDirectory:()=>r.getCurrentDirectory(),readFile:to(r,r.readFile),useCaseSensitiveFileNames:to(r,r.useCaseSensitiveFileNames),getSymlinkCache:to(r,r.getSymlinkCache)||t.getSymlinkCache,getModuleSpecifierCache:to(r,r.getModuleSpecifierCache),getPackageJsonInfoCache:()=>{var a;return(a=t.getModuleResolutionCache())==null?void 0:a.getPackageJsonInfoCache()},getGlobalTypingsCacheLocation:to(r,r.getGlobalTypingsCacheLocation),redirectTargetsMap:t.redirectTargetsMap,getProjectReferenceRedirect:a=>t.getProjectReferenceRedirect(a),isSourceOfProjectReferenceRedirect:a=>t.isSourceOfProjectReferenceRedirect(a),getNearestAncestorDirectoryWithPackageJson:to(r,r.getNearestAncestorDirectoryWithPackageJson),getFileIncludeReasons:()=>t.getFileIncludeReasons(),getCommonSourceDirectory:()=>t.getCommonSourceDirectory(),getDefaultResolutionModeForFile:a=>t.getDefaultResolutionModeForFile(a),getModeForResolutionAtIndex:(a,u)=>t.getModeForResolutionAtIndex(a,u)}}function Ufe(t,r){return{...dA(t,r),getCommonSourceDirectory:()=>t.getCommonSourceDirectory()}}function IZ(t){return t===2||t>=3&&t<=99||t===100}function Sx(t,r,a,u,h){return G.createImportDeclaration(void 0,t||r?G.createImportClause(!!h,t,r&&r.length?G.createNamedImports(r):void 0):void 0,typeof a=="string"?l5(a,u):a,void 0)}function l5(t,r){return G.createStringLiteral(t,r===0)}var _Ae=(t=>(t[t.Single=0]="Single",t[t.Double=1]="Double",t))(_Ae||{});function qfe(t,r){return tK(t,r)?1:0}function $p(t,r){if(r.quotePreference&&r.quotePreference!=="auto")return r.quotePreference==="single"?0:1;{const a=Fy(t)&&t.imports&&Fe(t.imports,u=>Ha(u)&&!cl(u.parent));return a?qfe(a,t):1}}function $fe(t){switch(t){case 0:return"'";case 1:return'"';default:return j.assertNever(t)}}function Jfe(t){const r=NZ(t);return r===void 0?void 0:Ws(r)}function NZ(t){return t.escapedName!=="default"?t.escapedName:J(t.declarations,r=>{const a=No(r);return a&&a.kind===80?a.escapedText:void 0})}function LZ(t){return Bc(t)&&(eC(t.parent)||du(t.parent)||q1(t.parent)||L_(t.parent,!1)&&t.parent.arguments[0]===t||zp(t.parent)&&t.parent.arguments[0]===t)}function vj(t){return ec(t)&&dm(t.parent)&&ot(t.name)&&!t.propertyName}function PZ(t,r){const a=t.getTypeAtLocation(r.parent);return a&&t.getPropertyOfType(a,r.name.text)}function bj(t,r,a){if(t)for(;t.parent;){if(Os(t.parent)||!I7t(a,t.parent,r))return t;t=t.parent}}function I7t(t,r,a){return Woe(t,r.getStart(a))&&r.getEnd()<=au(t)}function Y3(t,r){return Fg(t)?Fe(t.modifiers,a=>a.kind===r):void 0}function Gfe(t,r,a,u,h){var p;const C=(Ao(a)?a[0]:a).kind===243?hV:cP,b=$t(r.statements,C),{comparer:T,isSorted:E}=w2.getOrganizeImportsStringComparerWithDetection(b,h),N=Ao(a)?Mu(a,(R,F)=>w2.compareImportsOrRequireStatements(R,F,T)):[a];if(!(b!=null&&b.length)){if(Fy(r))t.insertNodesAtTopOfFile(r,N,u);else for(const R of N)t.insertStatementsInNewFile(r.fileName,[R],(p=Ql(R))==null?void 0:p.getSourceFile());return}if(j.assert(Fy(r)),b&&E)for(const R of N){const F=w2.getImportDeclarationInsertionIndex(b,R,T);if(F===0){const H=b[0]===r.statements[0]?{leadingTriviaOption:er.LeadingTriviaOption.Exclude}:{};t.insertNodeBefore(r,b[0],R,!1,H)}else{const H=b[F-1];t.insertNodeAfter(r,H,R)}}else{const R=rl(b);R?t.insertNodesAfter(r,R,N):t.insertNodesAtTopOfFile(r,N,u)}}function Kfe(t,r){return j.assert(t.isTypeOnly),ha(t.getChildAt(0,r),Lit)}function eO(t,r){return!!t&&!!r&&t.start===r.start&&t.length===r.length}function Xfe(t,r,a){return(a?NT:jw)(t.fileName,r.fileName)&&eO(t.textSpan,r.textSpan)}function Qfe(t){return(r,a)=>Xfe(r,a,t)}function Zfe(t,r){if(t){for(let a=0;a<t.length;a++)if(t.indexOf(t[a])===a){const u=r(t[a],a);if(u)return u}}}function pAe(t,r,a){for(let u=r;u<a;u++)if(!Pv(t.charCodeAt(u)))return!1;return!0}function u5(t,r,a){const u=r.tryGetSourcePosition(t);return u&&(!a||a(ca(u.fileName))?u:void 0)}function AZ(t,r,a){const{fileName:u,textSpan:h}=t,p=u5({fileName:u,pos:h.start},r,a);if(!p)return;const g=u5({fileName:u,pos:h.start+h.length},r,a),C=g?g.pos-p.pos:h.length;return{fileName:p.fileName,textSpan:{start:p.pos,length:C},originalFileName:t.fileName,originalTextSpan:t.textSpan,contextSpan:Yfe(t,r,a),originalContextSpan:t.contextSpan}}function Yfe(t,r,a){const u=t.contextSpan&&u5({fileName:t.fileName,pos:t.contextSpan.start},r,a),h=t.contextSpan&&u5({fileName:t.fileName,pos:t.contextSpan.start+t.contextSpan.length},r,a);return u&&h?{start:u.pos,length:h.pos-u.pos}:void 0}function ehe(t){const r=t.declarations?Ra(t.declarations):void 0;return!!Qi(r,a=>$s(a)?!0:ec(a)||dm(a)||CS(a)?!1:"quit")}var mAe=N7t();function N7t(){const t=x8*10;let r,a,u,h;E();const p=N=>C(N,17);return{displayParts:()=>{const N=r.length&&r[r.length-1].text;return h>t&&N&&N!=="..."&&(Pv(N.charCodeAt(N.length-1))||r.push(Z_(" ",16)),r.push(Z_("...",15))),r},writeKeyword:N=>C(N,5),writeOperator:N=>C(N,12),writePunctuation:N=>C(N,15),writeTrailingSemicolon:N=>C(N,15),writeSpace:N=>C(N,16),writeStringLiteral:N=>C(N,8),writeParameter:N=>C(N,13),writeProperty:N=>C(N,14),writeLiteral:N=>C(N,8),writeSymbol:b,writeLine:T,write:p,writeComment:p,getText:()=>"",getTextPos:()=>0,getColumn:()=>0,getLine:()=>0,isAtStartOfLine:()=>!1,hasTrailingWhitespace:()=>!1,hasTrailingComment:()=>!1,rawWrite:wa,getIndent:()=>u,increaseIndent:()=>{u++},decreaseIndent:()=>{u--},clear:E};function g(){if(!(h>t)&&a){const N=fK(u);N&&(h+=N.length,r.push(Z_(N,16))),a=!1}}function C(N,R){h>t||(g(),h+=N.length,r.push(Z_(N,R)))}function b(N,R){h>t||(g(),h+=N.length,r.push(L7t(N,R)))}function T(){h>t||(h+=1,r.push(tO()),a=!0)}function E(){r=[],a=!0,u=0,h=0}}function L7t(t,r){return Z_(t,a(r));function a(u){const h=u.flags;return h&3?ehe(u)?13:9:h&4||h&32768||h&65536?14:h&8?19:h&16?20:h&32?1:h&64?4:h&384?2:h&1536?11:h&8192?10:h&262144?18:h&524288||h&2097152?0:17}}function Z_(t,r){return{text:t,kind:dZ[r]}}function bu(){return Z_(" ",16)}function Np(t){return Z_(xa(t),5)}function Sh(t){return Z_(xa(t),15)}function d5(t){return Z_(xa(t),12)}function gAe(t){return Z_(t,13)}function yAe(t){return Z_(t,14)}function the(t){const r=oI(t);return r===void 0?pm(t):Np(r)}function pm(t){return Z_(t,17)}function vAe(t){return Z_(t,0)}function bAe(t){return Z_(t,18)}function CAe(t){return Z_(t,24)}function P7t(t,r){return{text:t,kind:dZ[23],target:{fileName:_n(r).fileName,textSpan:f_(r)}}}function Pit(t){return Z_(t,22)}function SAe(t,r){var a;const u=qEe(t)?"link":$Ee(t)?"linkcode":"linkplain",h=[Pit(`{@${u} `)];if(!t.name)t.text&&h.push(CAe(t.text));else{const p=r==null?void 0:r.getSymbolAtLocation(t.name),g=p&&r?rhe(p,r):void 0,C=O7t(t.text),b=uu(t.name)+t.text.slice(0,C),T=A7t(t.text.slice(C)),E=(g==null?void 0:g.valueDeclaration)||((a=g==null?void 0:g.declarations)==null?void 0:a[0]);if(E)h.push(P7t(b,E)),T&&h.push(CAe(T));else{const N=C===0||t.text.charCodeAt(C)===124&&b.charCodeAt(b.length-1)!==32?" ":"";h.push(CAe(b+N+T))}}return h.push(Pit("}")),h}function A7t(t){let r=0;if(t.charCodeAt(r++)===124){for(;r<t.length&&t.charCodeAt(r)===32;)r++;return t.slice(r)}return t}function O7t(t){let r=t.indexOf("://");if(r===0){for(;r<t.length&&t.charCodeAt(r)!==124;)r++;return r}if(t.indexOf("()")===0)return 2;if(t.charAt(0)==="<"){let a=0,u=0;for(;u<t.length;)if(t[u]==="<"&&a++,t[u]===">"&&a--,u++,!a)return u}return 0}var M7t=`
+`;function rC(t,r){var a;return(r==null?void 0:r.newLineCharacter)||((a=t.getNewLine)==null?void 0:a.call(t))||M7t}function tO(){return Z_(`
+`,6)}function m2(t){try{return t(mAe),mAe.displayParts()}finally{mAe.clear()}}function Cj(t,r,a,u=0){return m2(h=>{t.writeType(r,a,u|1024|16384,h)})}function f5(t,r,a,u,h=0){return m2(p=>{t.writeSymbol(r,a,u,h|8,p)})}function ihe(t,r,a,u=0){return u|=25632,m2(h=>{t.writeSignature(r,a,u,void 0,h)})}function wAe(t){return!!t.parent&&Vk(t.parent)&&t.parent.propertyName===t}function nhe(t,r){return qK(t,r.getScriptKind&&r.getScriptKind(t))}function rhe(t,r){let a=t;for(;R7t(a)||Rv(a)&&a.links.target;)Rv(a)&&a.links.target?a=a.links.target:a=Vf(a,r);return a}function R7t(t){return(t.flags&2097152)!==0}function xAe(t,r){return Ba(Vf(t,r))}function kAe(t,r){for(;Pv(t.charCodeAt(r));)r+=1;return r}function OZ(t,r){for(;r>-1&&k1(t.charCodeAt(r));)r-=1;return r+1}function Ec(t,r=!0){const a=t&&Ait(t);return a&&!r&&Lp(a),Qb(a,!1)}function Sj(t,r,a){let u=a(t);return u?Ir(u,t):u=Ait(t,a),u&&!r&&Lp(u),u}function Ait(t,r){const a=r?p=>Sj(p,!0,r):Ec,h=dn(t,a,void 0,r?p=>p&&she(p,!0,r):p=>p&&vD(p),a);if(h===t){const p=Ha(t)?Ir(G.createStringLiteralFromNode(t),t):A_(t)?Ir(G.createNumericLiteral(t.text,t.numericLiteralFlags),t):G.cloneNode(t);return Ht(p,t)}return h.parent=void 0,h}function vD(t,r=!0){if(t){const a=G.createNodeArray(t.map(u=>Ec(u,r)),t.hasTrailingComma);return Ht(a,t),a}return t}function she(t,r,a){return G.createNodeArray(t.map(u=>Sj(u,r,a)),t.hasTrailingComma)}function Lp(t){ohe(t),TAe(t)}function ohe(t){DAe(t,1024,B7t)}function TAe(t){DAe(t,2048,kce)}function qI(t,r){const a=t.getSourceFile(),u=a.text;F7t(t,u)?iO(t,r,a):xj(t,r,a),h5(t,r,a)}function F7t(t,r){const a=t.getFullStart(),u=t.getStart();for(let h=a;h<u;h++)if(r.charCodeAt(h)===10)return!0;return!1}function DAe(t,r,a){F1(t,r);const u=a(t);u&&DAe(u,r,a)}function B7t(t){return t.forEachChild(r=>r)}function $I(t,r){let a=t;for(let u=1;!PG(r,a);u++)a=`${t}_${u}`;return a}function wj(t,r,a,u){let h=0,p=-1;for(const{fileName:g,textChanges:C}of t){j.assert(g===r);for(const b of C){const{span:T,newText:E}=b,N=W7t(E,Vy(a));if(N!==-1&&(p=T.start+h+N,!u))return p;h+=E.length-T.length}}return j.assert(u),j.assert(p>=0),p}function iO(t,r,a,u,h){TW(a.text,t.pos,EAe(r,a,u,h,h7))}function h5(t,r,a,u,h){DW(a.text,t.end,EAe(r,a,u,h,uX))}function xj(t,r,a,u,h){DW(a.text,t.pos,EAe(r,a,u,h,h7))}function EAe(t,r,a,u,h){return(p,g,C,b)=>{C===3?(p+=2,g-=2):p+=2,h(t,a||C,r.text.slice(p,g),u!==void 0?u:b)}}function W7t(t,r){if(so(t,r))return 0;let a=t.indexOf(" "+r);return a===-1&&(a=t.indexOf("."+r)),a===-1&&(a=t.indexOf('"'+r)),a===-1?-1:a+1}function MZ(t){return ur(t)&&t.operatorToken.kind===28||Aa(t)||(v7(t)||wX(t))&&Aa(t.expression)}function RZ(t,r,a){const u=By(t.parent);switch(u.kind){case 214:return r.getContextualType(u,a);case 226:{const{left:h,operatorToken:p,right:g}=u;return FZ(p.kind)?r.getTypeAtLocation(t===g?h:g):r.getContextualType(t,a)}case 296:return che(u,r);default:return r.getContextualType(t,a)}}function _5(t,r,a){const u=$p(t,r),h=JSON.stringify(a);return u===0?`'${zm(h).replace(/'/g,()=>"\\'").replace(/\\"/g,'"')}'`:h}function FZ(t){switch(t){case 37:case 35:case 38:case 36:return!0;default:return!1}}function IAe(t){switch(t.kind){case 11:case 15:case 228:case 215:return!0;default:return!1}}function ahe(t){return!!t.getStringIndexType()||!!t.getNumberIndexType()}function che(t,r){return r.getTypeAtLocation(t.parent.parent.expression)}var lhe="anonymous function";function p5(t,r,a,u){const h=a.getTypeChecker();let p=!0;const g=()=>p=!1,C=h.typeToTypeNode(t,r,1,8,{trackSymbol:(b,T,E)=>(p=p&&h.isSymbolAccessible(b,T,E,!1).accessibility===0,!p),reportInaccessibleThisError:g,reportPrivateInBaseOfClassExpression:g,reportInaccessibleUniqueSymbolError:g,moduleResolverHost:Ufe(a,u)});return p?C:void 0}function NAe(t){return t===179||t===180||t===181||t===171||t===173}function Oit(t){return t===262||t===176||t===174||t===177||t===178}function Mit(t){return t===267}function LAe(t){return t===243||t===244||t===246||t===251||t===252||t===253||t===257||t===259||t===172||t===265||t===272||t===271||t===278||t===270||t===277}var V7t=om(NAe,Oit,Mit,LAe);function H7t(t,r){const a=t.getLastToken(r);if(a&&a.kind===27)return!1;if(NAe(t.kind)){if(a&&a.kind===28)return!1}else if(Mit(t.kind)){const C=va(t.getChildren(r));if(C&&H1(C))return!1}else if(Oit(t.kind)){const C=va(t.getChildren(r));if(C&&WT(C))return!1}else if(!LAe(t.kind))return!1;if(t.kind===246)return!0;const u=Qi(t,C=>!C.parent),h=yD(t,u,r);if(!h||h.kind===20)return!0;const p=r.getLineAndCharacterOfPosition(t.getEnd()).line,g=r.getLineAndCharacterOfPosition(h.getStart(r)).line;return p!==g}function BZ(t,r,a){const u=Qi(r,h=>h.end!==t?"quit":V7t(h.kind));return!!u&&H7t(u,a)}function kj(t){let r=0,a=0;const u=5;return Uo(t,function h(p){if(LAe(p.kind)){const g=p.getLastToken(t);(g==null?void 0:g.kind)===27?r++:a++}else if(NAe(p.kind)){const g=p.getLastToken(t);if((g==null?void 0:g.kind)===27)r++;else if(g&&g.kind!==28){const C=Ia(t,g.getStart(t)).line,b=Ia(t,E1(t,g.end).start).line;C!==b&&a++}}return r+a>=u?!0:Uo(p,h)}),r===0&&a<=1?!0:r/a>1/u}function WZ(t,r){return PAe(t,t.getDirectories,r)||[]}function uhe(t,r,a,u,h){return PAe(t,t.readDirectory,r,a,u,h)||w}function Tj(t,r){return PAe(t,t.fileExists,r)}function VZ(t,r){return HZ(()=>B0(r,t))||!1}function HZ(t){try{return t()}catch{return}}function PAe(t,r,...a){return HZ(()=>r&&r.apply(t,a))}function dhe(t,r,a){const u=[];return kg(t,h=>{if(h===a)return!0;const p=zr(h,"package.json");Tj(r,p)&&u.push(p)}),u}function AAe(t,r){let a;return kg(t,u=>{if(u==="node_modules"||(a=cde(u,h=>Tj(r,h),"package.json"),a))return!0}),a}function j7t(t,r){if(!r.fileExists)return[];const a=[];return kg(ts(t),u=>{const h=zr(u,"package.json");if(r.fileExists(h)){const p=fhe(h,r);p&&a.push(p)}}),a}function fhe(t,r){if(!r.readFile)return;const a=["dependencies","devDependencies","optionalDependencies","peerDependencies"],u=r.readFile(t)||"",h=kK(u),p={};if(h)for(const b of a){const T=h[b];if(!T)continue;const E=new Map;for(const N in T)E.set(N,T[N]);p[b]=E}const g=[[1,p.dependencies],[2,p.devDependencies],[8,p.optionalDependencies],[4,p.peerDependencies]];return{...p,parseable:!!h,fileName:t,get:C,has(b,T){return!!C(b,T)}};function C(b,T=15){for(const[E,N]of g)if(N&&T&E){const R=N.get(b);if(R!==void 0)return R}}}function nO(t,r,a){const u=(a.getPackageJsonsVisibleToFile&&a.getPackageJsonsVisibleToFile(t.fileName)||j7t(t.fileName,a)).filter(H=>H.parseable);let h,p,g;return{allowsImportingAmbientModule:b,getSourceFileInfo:T,allowsImportingSpecifier:E};function C(H){const U=F(H);for(const q of u)if(q.has(U)||q.has(uQ(U)))return!0;return!1}function b(H,U){if(!u.length||!H.valueDeclaration)return!0;if(!p)p=new Map;else{const re=p.get(H);if(re!==void 0)return re}const q=zm(H.getName());if(N(q))return p.set(H,!0),!0;const X=H.valueDeclaration.getSourceFile(),Z=R(X.fileName,U);if(typeof Z>"u")return p.set(H,!0),!0;const Q=C(Z)||C(q);return p.set(H,Q),Q}function T(H,U){if(!u.length)return{importable:!0,packageName:void 0};if(!g)g=new Map;else{const Q=g.get(H);if(Q!==void 0)return Q}const q=R(H.fileName,U);if(!q){const Q={importable:!0,packageName:q};return g.set(H,Q),Q}const Z={importable:C(q),packageName:q};return g.set(H,Z),Z}function E(H){return!u.length||N(H)||am(H)||yp(H)?!0:C(H)}function N(H){return!!(Fy(t)&&r_(t)&&J1.nodeCoreModules.has(H)&&(h===void 0&&(h=jZ(t)),h))}function R(H,U){if(!H.includes("node_modules"))return;const q=wS.getNodeModulesPackageName(a.getCompilationSettings(),t,H,U,r);if(q&&!am(q)&&!yp(q))return F(q)}function F(H){const U=af(H7(H)).slice(1);return so(U[0],"@")?`${U[0]}/${U[1]}`:U[0]}}function jZ(t){return Ft(t.imports,({text:r})=>J1.nodeCoreModules.has(r))}function Dj(t){return Yt(af(t),"node_modules")}function Rit(t){return t.file!==void 0&&t.start!==void 0&&t.length!==void 0}function OAe(t,r){const a=f_(t),u=ti(r,a,hl,VJ);if(u>=0){const h=r[u];return j.assertEqual(h.file,t.getSourceFile(),"Diagnostics proided to 'findDiagnosticForNode' must be from a single SourceFile"),ha(h,Rit)}}function MAe(t,r){var a;let u=ti(r,t.start,g=>g.start,_l);for(u<0&&(u=~u);((a=r[u-1])==null?void 0:a.start)===t.start;)u--;const h=[],p=au(t);for(;;){const g=Jr(r[u],Rit);if(!g||g.start>p)break;Kke(t,g)&&h.push(g),u++}return h}function fA({startPosition:t,endPosition:r}){return Fu(t,r===void 0?t:r)}function hhe(t,r){const a=Rs(t,r.start);return Qi(a,h=>h.getStart(t)<r.start||h.getEnd()>au(r)?"quit":jt(h)&&eO(r,f_(h,t)))}function _he(t,r,a=hl){return t?Ao(t)?a(qt(t,r)):r(t,0):void 0}function phe(t){return Ao(t)?ya(t):t}function zZ(t,r,a){return t.escapedName==="export="||t.escapedName==="default"?mhe(t)||Ej(z7t(t),r,!!a):t.name}function mhe(t){return J(t.declarations,r=>{var a,u,h;return Il(r)?(a=Jr(Vu(r.expression),ot))==null?void 0:a.text:vh(r)&&r.symbol.flags===2097152?(u=Jr(r.propertyName,ot))==null?void 0:u.text:(h=Jr(No(r),ot))==null?void 0:h.text})}function z7t(t){var r;return j.checkDefined(t.parent,`Symbol parent was undefined. Flags: ${j.formatSymbolFlags(t.flags)}. Declarations: ${(r=t.declarations)==null?void 0:r.map(a=>{const u=j.formatSyntaxKind(a.kind),h=nr(a),{expression:p}=a;return(h?"[JS]":"")+u+(p?` (expression: ${j.formatSyntaxKind(p.kind)})`:"")}).join(", ")}.`)}function Ej(t,r,a){return Ij(s_(zm(t.name)),r,a)}function Ij(t,r,a){const u=ud(I6(t,"/index"));let h="",p=!0;const g=u.charCodeAt(0);Py(g,r)?(h+=String.fromCharCode(g),a&&(h=h.toUpperCase())):p=!1;for(let C=1;C<u.length;C++){const b=u.charCodeAt(C),T=jb(b,r);if(T){let E=String.fromCharCode(b);p||(E=E.toUpperCase()),h+=E}p=T}return gP(h)?`_${h}`:h||"_"}function RAe(t,r,a){const u=r.length;if(u+a>t.length)return!1;for(let h=0;h<u;h++)if(r.charCodeAt(h)!==t.charCodeAt(h+a))return!1;return!0}function ghe(t){return t.charCodeAt(0)===95}function UZ(t){return!!(joe(t)&65536)}function qZ(t,r){return J(t.imports,u=>{if(J1.nodeCoreModules.has(u.text))return so(u.text,"node:")})??r.usesUriStyleNodeCoreModules}function Nj(t){return t===`
+`?1:0}function bD(t){return Ao(t)?jv(Bo(t[0]),t.slice(1)):Bo(t)}function $Z({options:t},r){const a=!t.semicolons||t.semicolons==="ignore",u=t.semicolons==="remove"||a&&!kj(r);return{...t,semicolons:u?"remove":"ignore"}}function yhe(t){return t===2||t===3}function rO(t,r){return t.isSourceFileFromExternalLibrary(r)||t.isSourceFileDefaultLibrary(r)}function JZ(t,r){const a=new Set,u=new Set,h=new Set;for(const C of r)if(!k7(C)){const b=Dc(C.expression);if(lI(b))switch(b.kind){case 15:case 11:a.add(b.text);break;case 9:u.add(parseInt(b.text));break;case 10:const T=JDe(su(b.text,"n")?b.text.slice(0,-1):b.text);T&&h.add(ZT(T));break}else{const T=t.getSymbolAtLocation(C.expression);if(T&&T.valueDeclaration&&SS(T.valueDeclaration)){const E=t.getConstantValue(T.valueDeclaration);E!==void 0&&p(E)}}}return{addValue:p,hasValue:g};function p(C){switch(typeof C){case"string":a.add(C);break;case"number":u.add(C)}}function g(C){switch(typeof C){case"string":return a.has(C);case"number":return u.has(C);case"object":return h.has(ZT(C))}}}function vhe(t,r,a,u){var h;const p=typeof t=="string"?t:t.fileName;if(!Uv(p))return!1;const g=typeof t=="string"?r.getCompilerOptions():r.getCompilerOptionsForFile(t),C=zh(g),b=typeof t=="string"?{fileName:t,impliedNodeFormat:ZH(ol(t,a.getCurrentDirectory(),hS(a)),(h=r.getPackageJsonInfoCache)==null?void 0:h.call(r),a,g)}:t,T=jI(b,g);if(T===99)return!1;if(T===1||g.verbatimModuleSyntax&&C===1)return!0;if(g.verbatimModuleSyntax&&KV(C))return!1;if(typeof t=="object"){if(t.commonJsModuleIndicator)return!0;if(t.externalModuleIndicator)return!1}return u}function hA(t){switch(t.kind){case 241:case 307:case 268:case 296:return!0;default:return!1}}function GZ(t,r,a,u){var h;const p=BQ(t,(h=a.getPackageJsonInfoCache)==null?void 0:h.call(a),u,a.getCompilerOptions());let g,C;return typeof p=="object"&&(g=p.impliedNodeFormat,C=p.packageJsonScope),{path:ol(t,a.getCurrentDirectory(),a.getCanonicalFileName),fileName:t,externalModuleIndicator:r===99?!0:void 0,commonJsModuleIndicator:r===1?!0:void 0,impliedNodeFormat:g,packageJsonScope:C,statements:w,imports:w}}var FAe=(t=>(t[t.Named=0]="Named",t[t.Default=1]="Default",t[t.Namespace=2]="Namespace",t[t.CommonJS=3]="CommonJS",t))(FAe||{}),BAe=(t=>(t[t.Named=0]="Named",t[t.Default=1]="Default",t[t.ExportEquals=2]="ExportEquals",t[t.UMD=3]="UMD",t))(BAe||{});function bhe(t){let r=1;const a=Of(),u=new Map,h=new Map;let p;const g={isUsableByFile:F=>F===p,isEmpty:()=>!a.size,clear:()=>{a.clear(),u.clear(),p=void 0},add:(F,H,U,q,X,Z,Q,re)=>{F!==p&&(g.clear(),p=F);let oe;if(X){const qe=iX(X.fileName);if(qe){const{topLevelNodeModulesIndex:se,topLevelPackageNameIndex:Ne,packageRootIndex:Oe}=qe;if(oe=FH(H7(X.fileName.substring(Ne+1,Oe))),so(F,X.path.substring(0,se))){const He=h.get(oe),Pe=X.fileName.substring(0,Ne+1);if(He){const We=He.indexOf(Xv);se>We&&h.set(oe,Pe)}else h.set(oe,Pe)}}}const de=Z===1&&$8(H)||H,ue=Z===0||H6(de)?Ws(U):q7t(de,re,void 0),Ie=typeof ue=="string"?ue:ue[0],we=typeof ue=="string"?void 0:ue[1],he=zm(q.name),Ae=r++,ke=Vf(H,re),Te=H.flags&33554432?void 0:H,De=q.flags&33554432?void 0:q;(!Te||!De)&&u.set(Ae,[H,q]),a.add(b(Ie,H,Gd(he)?void 0:he,re),{id:Ae,symbolTableKey:U,symbolName:Ie,capitalizedSymbolName:we,moduleName:he,moduleFile:X,moduleFileName:X==null?void 0:X.fileName,packageName:oe,exportKind:Z,targetFlags:ke.flags,isFromPackageJson:Q,symbol:Te,moduleSymbol:De})},get:(F,H)=>{if(F!==p)return;const U=a.get(H);return U==null?void 0:U.map(C)},search:(F,H,U,q)=>{if(F===p)return cf(a,(X,Z)=>{const{symbolName:Q,ambientModuleName:re}=T(Z),oe=H&&X[0].capitalizedSymbolName||Q;if(U(oe,X[0].targetFlags)){const de=X.map(C).filter((ue,Ie)=>R(ue,X[Ie].packageName));if(de.length){const ue=q(de,oe,!!re,Z);if(ue!==void 0)return ue}}})},releaseSymbols:()=>{u.clear()},onFileChanged:(F,H,U)=>E(F)&&E(H)?!1:p&&p!==H.path||U&&jZ(F)!==jZ(H)||!i_(F.moduleAugmentations,H.moduleAugmentations)||!N(F,H)?(g.clear(),!0):(p=H.path,!1)};return j.isDebugging&&Object.defineProperty(g,"__cache",{value:a}),g;function C(F){if(F.symbol&&F.moduleSymbol)return F;const{id:H,exportKind:U,targetFlags:q,isFromPackageJson:X,moduleFileName:Z}=F,[Q,re]=u.get(H)||w;if(Q&&re)return{symbol:Q,moduleSymbol:re,moduleFileName:Z,exportKind:U,targetFlags:q,isFromPackageJson:X};const oe=(X?t.getPackageJsonAutoImportProvider():t.getCurrentProgram()).getTypeChecker(),pe=F.moduleSymbol||re||j.checkDefined(F.moduleFile?oe.getMergedSymbol(F.moduleFile.symbol):oe.tryFindAmbientModule(F.moduleName)),de=F.symbol||Q||j.checkDefined(U===2?oe.resolveExternalModuleSymbol(pe):oe.tryGetMemberInModuleExportsAndProperties(Ws(F.symbolTableKey),pe),`Could not find symbol '${F.symbolName}' by key '${F.symbolTableKey}' in module ${pe.name}`);return u.set(H,[de,pe]),{symbol:de,moduleSymbol:pe,moduleFileName:Z,exportKind:U,targetFlags:q,isFromPackageJson:X}}function b(F,H,U,q){const X=U||"";return`${F.length} ${Ba(Vf(H,q))} ${F} ${X}`}function T(F){const H=F.indexOf(" "),U=F.indexOf(" ",H+1),q=parseInt(F.substring(0,H),10),X=F.substring(U+1),Z=X.substring(0,q),Q=X.substring(q+1);return{symbolName:Z,ambientModuleName:Q===""?void 0:Q}}function E(F){return!F.commonJsModuleIndicator&&!F.externalModuleIndicator&&!F.moduleAugmentations&&!F.ambientModuleNames}function N(F,H){if(!i_(F.ambientModuleNames,H.ambientModuleNames))return!1;let U=-1,q=-1;for(const X of H.ambientModuleNames){const Z=Q=>Sae(Q)&&Q.name.text===X;if(U=ct(F.statements,Z,U+1),q=ct(H.statements,Z,q+1),F.statements[U]!==H.statements[q])return!1}return!0}function R(F,H){if(!H||!F.moduleFileName)return!0;const U=t.getGlobalTypingsCacheLocation();if(U&&so(F.moduleFileName,U))return!0;const q=h.get(H);return!q||so(F.moduleFileName,q)}}function Che(t,r,a,u,h,p,g){var C;if(r===a)return!1;const b=g==null?void 0:g.get(r.path,a.path,u,{});if((b==null?void 0:b.isBlockedByPackageJsonDependencies)!==void 0)return!b.isBlockedByPackageJsonDependencies||!!b.packageName&&Lj(r,b.packageName);const T=hS(p),E=(C=p.getGlobalTypingsCacheLocation)==null?void 0:C.call(p),N=!!wS.forEachFileNameOfModule(r.fileName,a.fileName,p,!1,R=>{const F=t.getSourceFile(R);return(F===a||!F)&&U7t(r.fileName,R,T,E)});if(h){const R=N?h.getSourceFileInfo(a,p):void 0;return g==null||g.setBlockedByPackageJsonDependencies(r.path,a.path,u,{},R==null?void 0:R.packageName,!(R!=null&&R.importable)),!!(R!=null&&R.importable)||!!(R!=null&&R.packageName)&&Lj(r,R.packageName)}return N}function Lj(t,r){return t.imports&&t.imports.some(a=>a.text===r||a.text.startsWith(r+"/"))}function U7t(t,r,a,u){const h=kg(r,g=>ud(g)==="node_modules"?g:void 0),p=h&&ts(a(h));return p===void 0||so(a(t),p)||!!u&&so(a(u),p)}function She(t,r,a,u,h){var p,g;const C=yP(r),b=a.autoImportFileExcludePatterns&&Fit(a,C);Bit(t.getTypeChecker(),t.getSourceFiles(),b,r,(E,N)=>h(E,N,t,!1));const T=u&&((p=r.getPackageJsonAutoImportProvider)==null?void 0:p.call(r));if(T){const E=sl(),N=t.getTypeChecker();Bit(T.getTypeChecker(),T.getSourceFiles(),b,r,(R,F)=>{(F&&!t.getSourceFile(F.fileName)||!F&&!N.resolveName(R.name,void 0,1536,!1))&&h(R,F,T,!0)}),(g=r.log)==null||g.call(r,`forEachExternalModuleToImportFrom autoImportProvider: ${sl()-E}`)}}function Fit(t,r){return es(t.autoImportFileExcludePatterns,a=>{const u=zK(a,"","exclude");return u?ax(u,r):void 0})}function Bit(t,r,a,u,h){var p;const g=a&&Wit(a,u);for(const C of t.getAmbientModules())!C.name.includes("*")&&!(a&&((p=C.declarations)!=null&&p.every(b=>g(b.getSourceFile()))))&&h(C,void 0);for(const C of r)Cp(C)&&!(g!=null&&g(C))&&h(t.getMergedSymbol(C.symbol),C)}function Wit(t,r){var a;const u=(a=r.getSymlinkCache)==null?void 0:a.call(r).getSymlinkedDirectoriesByRealpath();return({fileName:h,path:p})=>{if(t.some(g=>g.test(h)))return!0;if(u!=null&&u.size&&yx(h)){let g=ts(h);return kg(ts(p),C=>{const b=u.get(Ad(C));if(b)return b.some(T=>t.some(E=>E.test(h.replace(g,T))));g=ts(g)})??!1}return!1}}function WAe(t,r){return r.autoImportFileExcludePatterns?Wit(Fit(r,yP(t)),t):()=>!1}function Pj(t,r,a,u,h){var p,g,C,b,T;const E=sl();(p=r.getPackageJsonAutoImportProvider)==null||p.call(r);const N=((g=r.getCachedExportInfoMap)==null?void 0:g.call(r))||bhe({getCurrentProgram:()=>a,getPackageJsonAutoImportProvider:()=>{var F;return(F=r.getPackageJsonAutoImportProvider)==null?void 0:F.call(r)},getGlobalTypingsCacheLocation:()=>{var F;return(F=r.getGlobalTypingsCacheLocation)==null?void 0:F.call(r)}});if(N.isUsableByFile(t.path))return(C=r.log)==null||C.call(r,"getExportInfoMap: cache hit"),N;(b=r.log)==null||b.call(r,"getExportInfoMap: cache miss or empty; calculating new results");let R=0;try{She(a,r,u,!0,(F,H,U,q)=>{++R%100===0&&(h==null||h.throwIfCancellationRequested());const X=new Map,Z=U.getTypeChecker(),Q=KZ(F,Z);Q&&Vit(Q.symbol,Z)&&N.add(t.path,Q.symbol,Q.exportKind===1?"default":"export=",F,H,Q.exportKind,q,Z),Z.forEachExportAndPropertyOfModule(F,(re,oe)=>{re!==(Q==null?void 0:Q.symbol)&&Vit(re,Z)&&Pg(X,oe)&&N.add(t.path,re,oe,F,H,0,q,Z)})})}catch(F){throw N.clear(),F}return(T=r.log)==null||T.call(r,`getExportInfoMap: done in ${sl()-E} ms`),N}function KZ(t,r){const a=r.resolveExternalModuleSymbol(t);if(a!==t)return{symbol:a,exportKind:2};const u=r.tryGetMemberInModuleExports("default",t);if(u)return{symbol:u,exportKind:1}}function Vit(t,r){return!r.isUndefinedSymbol(t)&&!r.isUnknownSymbol(t)&&!LV(t)&&!jTe(t)}function q7t(t,r,a){let u;return XZ(t,r,a,(h,p)=>(u=p?[h,p]:h,!0)),j.checkDefined(u)}function XZ(t,r,a,u){let h,p=t;const g=new Map;for(;p;){const C=mhe(p);if(C){const b=u(C);if(b)return b}if(p.escapedName!=="default"&&p.escapedName!=="export="){const b=u(p.name);if(b)return b}if(h=fn(h,p),!Pg(g,p))break;p=p.flags&2097152?r.getImmediateAliasedSymbol(p):void 0}for(const C of h??w)if(C.parent&&H6(C.parent)){const b=u(Ej(C.parent,a,!1),Ej(C.parent,a,!0));if(b)return b}}function Hit(){const t=Ov(99,!1);function r(u,h,p){return K7t(a(u,h,p),u)}function a(u,h,p){let g=0,C=0;const b=[],{prefix:T,pushTemplate:E}=Z7t(h);u=T+u;const N=T.length;E&&b.push(16),t.setText(u);let R=0;const F=[];let H=0;do{g=t.scan(),n3(g)||(U(),C=g);const q=t.getTokenEnd();if(G7t(t.getTokenStart(),q,N,t5t(g),F),q>=u.length){const X=J7t(t,g,rl(b));X!==void 0&&(R=X)}}while(g!==1);function U(){switch(g){case 44:case 69:!$7t[C]&&t.reScanSlashToken()===14&&(g=14);break;case 30:C===80&&H++;break;case 32:H>0&&H--;break;case 133:case 154:case 150:case 136:case 155:H>0&&!p&&(g=80);break;case 16:b.push(g);break;case 19:b.length>0&&b.push(g);break;case 20:if(b.length>0){const q=rl(b);q===16?(g=t.reScanTemplateToken(!1),g===18?b.pop():j.assertEqual(g,17,"Should have been a template middle.")):(j.assertEqual(q,19,"Should have been an open brace"),b.pop())}break;default:if(!P_(g))break;(C===25||P_(C)&&P_(g)&&!Q7t(C,g))&&(g=80)}}return{endOfLineState:R,spans:F}}return{getClassificationsForLine:r,getEncodedLexicalClassifications:a}}var $7t=Sa([80,11,9,10,14,110,46,47,22,24,20,112,97],t=>t,()=>!0);function J7t(t,r,a){switch(r){case 11:{if(!t.isUnterminated())return;const u=t.getTokenText(),h=u.length-1;let p=0;for(;u.charCodeAt(h-p)===92;)p++;return p&1?u.charCodeAt(0)===34?3:2:void 0}case 3:return t.isUnterminated()?1:void 0;default:if(Gw(r)){if(!t.isUnterminated())return;switch(r){case 18:return 5;case 15:return 4;default:return j.fail("Only 'NoSubstitutionTemplateLiteral's and 'TemplateTail's can be unterminated; got SyntaxKind #"+r)}}return a===16?6:void 0}}function G7t(t,r,a,u,h){if(u===8)return;t===0&&a>0&&(t+=a);const p=r-t;p>0&&h.push(t-a,p,u)}function K7t(t,r){const a=[],u=t.spans;let h=0;for(let g=0;g<u.length;g+=3){const C=u[g],b=u[g+1],T=u[g+2];if(h>=0){const E=C-h;E>0&&a.push({length:E,classification:4})}a.push({length:b,classification:X7t(T)}),h=C+b}const p=r.length-h;return p>0&&a.push({length:p,classification:4}),{entries:a,finalLexState:t.endOfLineState}}function X7t(t){switch(t){case 1:return 3;case 3:return 1;case 4:return 6;case 25:return 7;case 5:return 2;case 6:return 8;case 8:return 4;case 10:return 0;case 2:case 11:case 12:case 13:case 14:case 15:case 16:case 9:case 17:return 5;default:return}}function Q7t(t,r){if(!Rfe(t))return!0;switch(r){case 139:case 153:case 137:case 126:case 129:return!0;default:return!1}}function Z7t(t){switch(t){case 3:return{prefix:`"\\
+`};case 2:return{prefix:`'\\
+`};case 1:return{prefix:`/*
+`};case 4:return{prefix:"`\n"};case 5:return{prefix:`}
+`,pushTemplate:!0};case 6:return{prefix:"",pushTemplate:!0};case 0:return{prefix:""};default:return j.assertNever(t)}}function Y7t(t){switch(t){case 42:case 44:case 45:case 40:case 41:case 48:case 49:case 50:case 30:case 32:case 33:case 34:case 104:case 103:case 130:case 152:case 35:case 36:case 37:case 38:case 51:case 53:case 52:case 56:case 57:case 75:case 74:case 79:case 71:case 72:case 73:case 65:case 66:case 67:case 69:case 70:case 64:case 28:case 61:case 76:case 77:case 78:return!0;default:return!1}}function e5t(t){switch(t){case 40:case 41:case 55:case 54:case 46:case 47:return!0;default:return!1}}function t5t(t){if(P_(t))return 3;if(Y7t(t)||e5t(t))return 5;if(t>=19&&t<=79)return 10;switch(t){case 9:return 4;case 10:return 25;case 11:return 6;case 14:return 7;case 7:case 3:case 2:return 1;case 5:case 4:return 8;case 80:default:return Gw(t)?6:2}}function VAe(t,r,a,u,h){return Uit(whe(t,r,a,u,h))}function jit(t,r){switch(r){case 267:case 263:case 264:case 262:case 231:case 218:case 219:t.throwIfCancellationRequested()}}function whe(t,r,a,u,h){const p=[];return a.forEachChild(function C(b){if(!(!b||!LW(h,b.pos,b.getFullWidth()))){if(jit(r,b.kind),ot(b)&&!lu(b)&&u.has(b.escapedText)){const T=t.getSymbolAtLocation(b),E=T&&zit(T,zI(b),t);E&&g(b.getStart(a),b.getEnd(),E)}b.forEachChild(C)}}),{spans:p,endOfLineState:0};function g(C,b,T){const E=b-C;j.assert(E>0,`Classification had non-positive length of ${E}`),p.push(C),p.push(E),p.push(T)}}function zit(t,r,a){const u=t.getFlags();if(u&2885600)return u&32?11:u&384?12:u&524288?16:u&1536?r&4||r&1&&i5t(t)?14:void 0:u&2097152?zit(a.getAliasedSymbol(t),r,a):r&2?u&64?13:u&262144?15:void 0:void 0}function i5t(t){return Ft(t.declarations,r=>rd(r)&&nC(r)===1)}function n5t(t){switch(t){case 1:return"comment";case 2:return"identifier";case 3:return"keyword";case 4:return"number";case 25:return"bigint";case 5:return"operator";case 6:return"string";case 8:return"whitespace";case 9:return"text";case 10:return"punctuation";case 11:return"class name";case 12:return"enum name";case 13:return"interface name";case 14:return"module name";case 15:return"type parameter name";case 16:return"type alias name";case 17:return"parameter name";case 18:return"doc comment tag name";case 19:return"jsx open tag name";case 20:return"jsx close tag name";case 21:return"jsx self closing tag name";case 22:return"jsx attribute";case 23:return"jsx text";case 24:return"jsx attribute string literal value";default:return}}function Uit(t){j.assert(t.spans.length%3===0);const r=t.spans,a=[];for(let u=0;u<r.length;u+=3)a.push({textSpan:Ff(r[u],r[u+1]),classificationType:n5t(r[u+2])});return a}function HAe(t,r,a){return Uit(xhe(t,r,a))}function xhe(t,r,a){const u=a.start,h=a.length,p=Ov(99,!1,r.languageVariant,r.text),g=Ov(99,!1,r.languageVariant,r.text),C=[];return re(r),{spans:C,endOfLineState:0};function b(oe,pe,de){C.push(oe),C.push(pe),C.push(de)}function T(oe){for(p.resetTokenState(oe.pos);;){const pe=p.getTokenEnd();if(!Uke(r.text,pe))return pe;const de=p.scan(),ue=p.getTokenEnd(),Ie=ue-pe;if(!n3(de))return pe;switch(de){case 4:case 5:continue;case 2:case 3:E(oe,de,pe,Ie),p.resetTokenState(ue);continue;case 7:const we=r.text,he=we.charCodeAt(pe);if(he===60||he===62){b(pe,Ie,1);continue}j.assert(he===124||he===61),U(we,pe,ue);break;case 6:break;default:j.assertNever(de)}}}function E(oe,pe,de,ue){if(pe===3){const Ie=CIe(r.text,de,ue);if(Ie&&Ie.jsDoc){_c(Ie.jsDoc,oe),R(Ie.jsDoc);return}}else if(pe===2&&F(de,ue))return;N(de,ue)}function N(oe,pe){b(oe,pe,1)}function R(oe){var pe,de,ue,Ie,we,he,Ae,ke;let Te=oe.pos;if(oe.tags)for(const qe of oe.tags){qe.pos!==Te&&N(Te,qe.pos-Te),b(qe.pos,1,10),b(qe.tagName.pos,qe.tagName.end-qe.tagName.pos,18),Te=qe.tagName.end;let se=qe.tagName.end;switch(qe.kind){case 341:const Ne=qe;De(Ne),se=Ne.isNameFirst&&((pe=Ne.typeExpression)==null?void 0:pe.end)||Ne.name.end;break;case 348:const Oe=qe;se=Oe.isNameFirst&&((de=Oe.typeExpression)==null?void 0:de.end)||Oe.name.end;break;case 345:H(qe),Te=qe.end,se=qe.typeParameters.end;break;case 346:const He=qe;se=((ue=He.typeExpression)==null?void 0:ue.kind)===309&&((Ie=He.fullName)==null?void 0:Ie.end)||((we=He.typeExpression)==null?void 0:we.end)||se;break;case 338:se=qe.typeExpression.end;break;case 344:re(qe.typeExpression),Te=qe.end,se=qe.typeExpression.end;break;case 343:case 340:se=qe.typeExpression.end;break;case 342:re(qe.typeExpression),Te=qe.end,se=((he=qe.typeExpression)==null?void 0:he.end)||se;break;case 347:se=((Ae=qe.name)==null?void 0:Ae.end)||se;break;case 328:case 329:se=qe.class.end;break;case 349:re(qe.typeExpression),Te=qe.end,se=((ke=qe.typeExpression)==null?void 0:ke.end)||se;break}typeof qe.comment=="object"?N(qe.comment.pos,qe.comment.end-qe.comment.pos):typeof qe.comment=="string"&&N(se,qe.end-se)}Te!==oe.end&&N(Te,oe.end-Te);return;function De(qe){qe.isNameFirst&&(N(Te,qe.name.pos-Te),b(qe.name.pos,qe.name.end-qe.name.pos,17),Te=qe.name.end),qe.typeExpression&&(N(Te,qe.typeExpression.pos-Te),re(qe.typeExpression),Te=qe.typeExpression.end),qe.isNameFirst||(N(Te,qe.name.pos-Te),b(qe.name.pos,qe.name.end-qe.name.pos,17),Te=qe.name.end)}}function F(oe,pe){const de=/^(\/\/\/\s*)(<)(?:(\S+)((?:[^/]|\/[^>])*)(\/>)?)?/m,ue=/(\s)(\S+)(\s*)(=)(\s*)('[^']+'|"[^"]+")/g,Ie=r.text.substr(oe,pe),we=de.exec(Ie);if(!we||!we[3]||!(we[3]in GJ))return!1;let he=oe;N(he,we[1].length),he+=we[1].length,b(he,we[2].length,10),he+=we[2].length,b(he,we[3].length,21),he+=we[3].length;const Ae=we[4];let ke=he;for(;;){const De=ue.exec(Ae);if(!De)break;const qe=he+De.index+De[1].length;qe>ke&&(N(ke,qe-ke),ke=qe),b(ke,De[2].length,22),ke+=De[2].length,De[3].length&&(N(ke,De[3].length),ke+=De[3].length),b(ke,De[4].length,5),ke+=De[4].length,De[5].length&&(N(ke,De[5].length),ke+=De[5].length),b(ke,De[6].length,24),ke+=De[6].length}he+=we[4].length,he>ke&&N(ke,he-ke),we[5]&&(b(he,we[5].length,10),he+=we[5].length);const Te=oe+pe;return he<Te&&N(he,Te-he),!0}function H(oe){for(const pe of oe.getChildren())re(pe)}function U(oe,pe,de){let ue;for(ue=pe;ue<de&&!mh(oe.charCodeAt(ue));ue++);for(b(pe,ue-pe,1),g.resetTokenState(ue);g.getTokenEnd()<de;)q()}function q(){const oe=g.getTokenEnd(),pe=g.scan(),de=g.getTokenEnd(),ue=Q(pe);ue&&b(oe,de-oe,ue)}function X(oe){if(z0(oe)||lu(oe))return!0;const pe=Z(oe);if(!eP(oe)&&oe.kind!==12&&pe===void 0)return!1;const de=oe.kind===12?oe.pos:T(oe),ue=oe.end-de;if(j.assert(ue>=0),ue>0){const Ie=pe||Q(oe.kind,oe);Ie&&b(de,ue,Ie)}return!0}function Z(oe){switch(oe.parent&&oe.parent.kind){case 286:if(oe.parent.tagName===oe)return 19;break;case 287:if(oe.parent.tagName===oe)return 20;break;case 285:if(oe.parent.tagName===oe)return 21;break;case 291:if(oe.parent.name===oe)return 22;break}}function Q(oe,pe){if(P_(oe))return 3;if((oe===30||oe===32)&&pe&&cAe(pe.parent))return 10;if(Kae(oe)){if(pe){const de=pe.parent;if(oe===64&&(de.kind===260||de.kind===172||de.kind===169||de.kind===291)||de.kind===226||de.kind===224||de.kind===225||de.kind===227)return 5}return 10}else{if(oe===9)return 4;if(oe===10)return 25;if(oe===11)return pe&&pe.parent.kind===291?24:6;if(oe===14)return 6;if(Gw(oe))return 6;if(oe===12)return 23;if(oe===80){if(pe){switch(pe.parent.kind){case 263:return pe.parent.name===pe?11:void 0;case 168:return pe.parent.name===pe?15:void 0;case 264:return pe.parent.name===pe?13:void 0;case 266:return pe.parent.name===pe?12:void 0;case 267:return pe.parent.name===pe?14:void 0;case 169:return pe.parent.name===pe?ix(pe)?3:17:void 0}if(O0(pe.parent))return 3}return 2}}}function re(oe){if(oe&&PW(u,h,oe.pos,oe.getFullWidth())){jit(t,oe.kind);for(const pe of oe.getChildren(r))X(pe)||re(pe)}}}var QZ;(t=>{function r(he,Ae,ke,Te,De){const qe=R_(ke,Te);if(qe.parent&&(z1(qe.parent)&&qe.parent.tagName===qe||oD(qe.parent))){const{openingElement:se,closingElement:Ne}=qe.parent.parent,Oe=[se,Ne].map(({tagName:He})=>a(He,ke));return[{fileName:ke.fileName,highlightSpans:Oe}]}return u(Te,qe,he,Ae,De)||h(qe,ke)}t.getDocumentHighlights=r;function a(he,Ae){return{fileName:Ae.fileName,textSpan:f_(he,Ae),kind:"none"}}function u(he,Ae,ke,Te,De){const qe=new Set(De.map(He=>He.fileName)),se=kl.getReferenceEntriesForNode(he,Ae,ke,De,Te,void 0,qe);if(!se)return;const Ne=Cn(se.map(kl.toHighlightSpan),He=>He.fileName,He=>He.span),Oe=Mf(ke.useCaseSensitiveFileNames());return as(ld(Ne.entries(),([He,Pe])=>{if(!qe.has(He)){if(!ke.redirectTargetsMap.has(ol(He,ke.getCurrentDirectory(),Oe)))return;const We=ke.getSourceFile(He);He=Fe(De,Nt=>!!Nt.redirectInfo&&Nt.redirectInfo.redirectTarget===We).fileName,j.assert(qe.has(He))}return{fileName:He,highlightSpans:Pe}}))}function h(he,Ae){const ke=p(he,Ae);return ke&&[{fileName:Ae.fileName,highlightSpans:ke}]}function p(he,Ae){switch(he.kind){case 101:case 93:return r2(he.parent)?ue(he.parent,Ae):void 0;case 107:return Te(he.parent,Og,re);case 111:return Te(he.parent,yle,Q);case 113:case 85:case 98:const qe=he.kind===85?he.parent.parent:he.parent;return Te(qe,NI,Z);case 109:return Te(he.parent,S7,X);case 84:case 90:return k7(he.parent)||x3(he.parent)?Te(he.parent.parent.parent,S7,X):void 0;case 83:case 88:return Te(he.parent,m8,q);case 99:case 117:case 92:return Te(he.parent,se=>Zw(se,!0),U);case 137:return ke(iu,[137]);case 139:case 153:return ke(Qw,[139,153]);case 135:return Te(he.parent,hx,oe);case 134:return De(oe(he));case 127:return De(pe(he));case 103:case 147:return;default:return Xw(he.kind)&&(Wf(he.parent)||Lu(he.parent))?De(R(he.kind,he.parent)):void 0}function ke(qe,se){return Te(he.parent,qe,Ne=>{var Oe;return es((Oe=Jr(Ne,M0))==null?void 0:Oe.symbol.declarations,He=>qe(He)?Fe(He.getChildren(Ae),Pe=>Yt(se,Pe.kind)):void 0)})}function Te(qe,se,Ne){return se(qe)?De(Ne(qe,Ae)):void 0}function De(qe){return qe&&qe.map(se=>a(se,Ae))}}function g(he){return yle(he)?[he]:NI(he)?Js(he.catchClause?g(he.catchClause):he.tryBlock&&g(he.tryBlock),he.finallyBlock&&g(he.finallyBlock)):Ho(he)?void 0:T(he,g)}function C(he){let Ae=he;for(;Ae.parent;){const ke=Ae.parent;if(WT(ke)||ke.kind===307)return ke;if(NI(ke)&&ke.tryBlock===Ae&&ke.catchClause)return Ae;Ae=ke}}function b(he){return m8(he)?[he]:Ho(he)?void 0:T(he,b)}function T(he,Ae){const ke=[];return he.forEachChild(Te=>{const De=Ae(Te);De!==void 0&&ke.push(...JL(De))}),ke}function E(he,Ae){const ke=N(Ae);return!!ke&&ke===he}function N(he){return Qi(he,Ae=>{switch(Ae.kind){case 255:if(he.kind===251)return!1;case 248:case 249:case 250:case 247:case 246:return!he.label||we(Ae,he.label.escapedText);default:return Ho(Ae)&&"quit"}})}function R(he,Ae){return es(F(Ae,CP(he)),ke=>Y3(ke,he))}function F(he,Ae){const ke=he.parent;switch(ke.kind){case 268:case 307:case 241:case 296:case 297:return Ae&64&&hd(he)?[...he.members,he]:ke.statements;case 176:case 174:case 262:return[...ke.parameters,...ss(ke.parent)?ke.parent.members:[]];case 263:case 231:case 264:case 187:const Te=ke.members;if(Ae&15){const De=Fe(ke.members,iu);if(De)return[...Te,...De.parameters]}else if(Ae&64)return[...Te,ke];return Te;default:return}}function H(he,Ae,...ke){return Ae&&Yt(ke,Ae.kind)?(he.push(Ae),!0):!1}function U(he){const Ae=[];if(H(Ae,he.getFirstToken(),99,117,92)&&he.kind===246){const ke=he.getChildren();for(let Te=ke.length-1;Te>=0&&!H(Ae,ke[Te],117);Te--);}return O(b(he.statement),ke=>{E(he,ke)&&H(Ae,ke.getFirstToken(),83,88)}),Ae}function q(he){const Ae=N(he);if(Ae)switch(Ae.kind){case 248:case 249:case 250:case 246:case 247:return U(Ae);case 255:return X(Ae)}}function X(he){const Ae=[];return H(Ae,he.getFirstToken(),109),O(he.caseBlock.clauses,ke=>{H(Ae,ke.getFirstToken(),84,90),O(b(ke),Te=>{E(he,Te)&&H(Ae,Te.getFirstToken(),83)})}),Ae}function Z(he,Ae){const ke=[];if(H(ke,he.getFirstToken(),113),he.catchClause&&H(ke,he.catchClause.getFirstToken(),85),he.finallyBlock){const Te=Uc(he,98,Ae);H(ke,Te,98)}return ke}function Q(he,Ae){const ke=C(he);if(!ke)return;const Te=[];return O(g(ke),De=>{Te.push(Uc(De,111,Ae))}),WT(ke)&&uS(ke,De=>{Te.push(Uc(De,107,Ae))}),Te}function re(he,Ae){const ke=Up(he);if(!ke)return;const Te=[];return uS(ha(ke.body,Xo),De=>{Te.push(Uc(De,107,Ae))}),O(g(ke.body),De=>{Te.push(Uc(De,111,Ae))}),Te}function oe(he){const Ae=Up(he);if(!Ae)return;const ke=[];return Ae.modifiers&&Ae.modifiers.forEach(Te=>{H(ke,Te,134)}),Uo(Ae,Te=>{de(Te,De=>{hx(De)&&H(ke,De.getFirstToken(),135)})}),ke}function pe(he){const Ae=Up(he);if(!Ae)return;const ke=[];return Uo(Ae,Te=>{de(Te,De=>{SX(De)&&H(ke,De.getFirstToken(),127)})}),ke}function de(he,Ae){Ae(he),!Ho(he)&&!ss(he)&&!zf(he)&&!rd(he)&&!Mg(he)&&!ws(he)&&Uo(he,ke=>de(ke,Ae))}function ue(he,Ae){const ke=Ie(he,Ae),Te=[];for(let De=0;De<ke.length;De++){if(ke[De].kind===93&&De<ke.length-1){const qe=ke[De],se=ke[De+1];let Ne=!0;for(let Oe=se.getStart(Ae)-1;Oe>=qe.end;Oe--)if(!k1(Ae.text.charCodeAt(Oe))){Ne=!1;break}if(Ne){Te.push({fileName:Ae.fileName,textSpan:Fu(qe.getStart(),se.end),kind:"reference"}),De++;continue}}Te.push(a(ke[De],Ae))}return Te}function Ie(he,Ae){const ke=[];for(;r2(he.parent)&&he.parent.elseStatement===he;)he=he.parent;for(;;){const Te=he.getChildren(Ae);H(ke,Te[0],101);for(let De=Te.length-1;De>=0&&!H(ke,Te[De],93);De--);if(!he.elseStatement||!r2(he.elseStatement))break;he=he.elseStatement}return ke}function we(he,Ae){return!!Qi(he.parent,ke=>_x(ke)?ke.label.escapedText===Ae:"quit")}})(QZ||(QZ={}));function Aj(t){return!!t.sourceFile}function jAe(t,r,a){return khe(t,r,a)}function khe(t,r="",a,u){const h=new Map,p=Mf(!!t);function g(){const q=as(h.keys()).filter(X=>X&&X.charAt(0)==="_").map(X=>{const Z=h.get(X),Q=[];return Z.forEach((re,oe)=>{Aj(re)?Q.push({name:oe,scriptKind:re.sourceFile.scriptKind,refCount:re.languageServiceRefCount}):re.forEach((pe,de)=>Q.push({name:oe,scriptKind:de,refCount:pe.languageServiceRefCount}))}),Q.sort((re,oe)=>oe.refCount-re.refCount),{bucket:X,sourceFiles:Q}});return JSON.stringify(q,void 0,2)}function C(q){return typeof q.getCompilationSettings=="function"?q.getCompilationSettings():q}function b(q,X,Z,Q,re,oe){const pe=ol(q,r,p),de=The(C(X));return T(q,pe,X,de,Z,Q,re,oe)}function T(q,X,Z,Q,re,oe,pe,de){return F(q,X,Z,Q,re,oe,!0,pe,de)}function E(q,X,Z,Q,re,oe){const pe=ol(q,r,p),de=The(C(X));return N(q,pe,X,de,Z,Q,re,oe)}function N(q,X,Z,Q,re,oe,pe,de){return F(q,X,C(Z),Q,re,oe,!1,pe,de)}function R(q,X){const Z=Aj(q)?q:q.get(j.checkDefined(X,"If there are more than one scriptKind's for same document the scriptKind should be provided"));return j.assert(X===void 0||!Z||Z.sourceFile.scriptKind===X,`Script kind should match provided ScriptKind:${X} and sourceFile.scriptKind: ${Z==null?void 0:Z.sourceFile.scriptKind}, !entry: ${!Z}`),Z}function F(q,X,Z,Q,re,oe,pe,de,ue){var Ie,we,he,Ae;de=qK(q,de);const ke=C(Z),Te=Z===ke?void 0:Z,De=de===6?100:Ja(ke),qe=typeof ue=="object"?ue:{languageVersion:De,impliedNodeFormat:Te&&ZH(X,(Ae=(he=(we=(Ie=Te.getCompilerHost)==null?void 0:Ie.call(Te))==null?void 0:we.getModuleResolutionCache)==null?void 0:he.call(we))==null?void 0:Ae.getPackageJsonInfoCache(),Te,ke),setExternalModuleIndicator:$V(ke),jsDocParsingMode:a};qe.languageVersion=De,j.assertEqual(a,qe.jsDocParsingMode);const se=h.size,Ne=zAe(Q,qe.impliedNodeFormat),Oe=mp(h,Ne,()=>new Map);if(Zn){h.size>se&&Zn.instant(Zn.Phase.Session,"createdDocumentRegistryBucket",{configFilePath:ke.configFilePath,key:Ne});const ze=!df(X)&&cf(h,(Nt,$e)=>$e!==Ne&&Nt.has(X)&&$e);ze&&Zn.instant(Zn.Phase.Session,"documentRegistryBucketOverlap",{path:X,key1:ze,key2:Ne})}const He=Oe.get(X);let Pe=He&&R(He,de);if(!Pe&&u){const ze=u.getDocument(Ne,X);ze&&ze.scriptKind===de&&ze.text===uA(re)&&(j.assert(pe),Pe={sourceFile:ze,languageServiceRefCount:0},We())}if(Pe)Pe.sourceFile.version!==oe&&(Pe.sourceFile=r_e(Pe.sourceFile,re,oe,re.getChangeRange(Pe.sourceFile.scriptSnapshot)),u&&u.setDocument(Ne,X,Pe.sourceFile)),pe&&Pe.languageServiceRefCount++;else{const ze=hY(q,re,qe,oe,!1,de);u&&u.setDocument(Ne,X,ze),Pe={sourceFile:ze,languageServiceRefCount:1},We()}return j.assert(Pe.languageServiceRefCount!==0),Pe.sourceFile;function We(){if(!He)Oe.set(X,Pe);else if(Aj(He)){const ze=new Map;ze.set(He.sourceFile.scriptKind,He),ze.set(de,Pe),Oe.set(X,ze)}else He.set(de,Pe)}}function H(q,X,Z,Q){const re=ol(q,r,p),oe=The(X);return U(re,oe,Z,Q)}function U(q,X,Z,Q){const re=j.checkDefined(h.get(zAe(X,Q))),oe=re.get(q),pe=R(oe,Z);pe.languageServiceRefCount--,j.assert(pe.languageServiceRefCount>=0),pe.languageServiceRefCount===0&&(Aj(oe)?re.delete(q):(oe.delete(Z),oe.size===1&&re.set(q,Y(oe.values(),hl))))}return{acquireDocument:b,acquireDocumentWithKey:T,updateDocument:E,updateDocumentWithKey:N,releaseDocument:H,releaseDocumentWithKey:U,getKeyForCompilationSettings:The,getDocumentRegistryBucketKeyWithMode:zAe,reportStats:g,getBuckets:()=>h}}function The(t){return hue(t,Xle)}function zAe(t,r){return r?`${t}|${r}`:t}function UAe(t,r,a,u,h,p,g){const C=yP(u),b=Mf(C),T=Dhe(r,a,b,g),E=Dhe(a,r,b,g);return er.ChangeTracker.with({host:u,formatContext:h,preferences:p},N=>{s5t(t,N,T,r,a,u.getCurrentDirectory(),C),o5t(t,N,T,E,u,b)})}function Dhe(t,r,a,u){const h=a(t);return g=>{const C=u&&u.tryGetSourcePosition({fileName:g,pos:0}),b=p(C?C.fileName:g);return C?b===void 0?void 0:r5t(C.fileName,b,g,a):b};function p(g){if(a(g)===h)return r;const C=Mce(g,h,a);return C===void 0?void 0:r+"/"+C}}function r5t(t,r,a,u){const h=o8(t,r,u);return qAe(ts(a),h)}function s5t(t,r,a,u,h,p,g){const{configFile:C}=t.getCompilerOptions();if(!C)return;const b=ts(C.fileName),T=I8(C);if(!T)return;$Ae(T,(F,H)=>{switch(H){case"files":case"include":case"exclude":{if(E(F)||H!=="include"||!jf(F.initializer))return;const q=es(F.initializer.elements,Z=>Ha(Z)?Z.text:void 0);if(q.length===0)return;const X=UK(b,[],q,g,p);ax(j.checkDefined(X.includeFilePattern),g).test(u)&&!ax(j.checkDefined(X.includeFilePattern),g).test(h)&&r.insertNodeAfter(C,va(F.initializer.elements),G.createStringLiteral(R(h)));return}case"compilerOptions":$Ae(F.initializer,(U,q)=>{const X=eue(q);j.assert((X==null?void 0:X.type)!=="listOrElement"),X&&(X.isFilePath||X.type==="list"&&X.element.isFilePath)?E(U):q==="paths"&&$Ae(U.initializer,Z=>{if(jf(Z.initializer))for(const Q of Z.initializer.elements)N(Q)})});return}});function E(F){const H=jf(F.initializer)?F.initializer.elements:[F.initializer];let U=!1;for(const q of H)U=N(q)||U;return U}function N(F){if(!Ha(F))return!1;const H=qAe(b,F.text),U=a(H);return U!==void 0?(r.replaceRangeWithText(C,$it(F,C),R(U)),!0):!1}function R(F){return c0(b,F,!g)}}function o5t(t,r,a,u,h,p){const g=t.getSourceFiles();for(const C of g){const b=a(C.fileName),T=b??C.fileName,E=ts(T),N=u(C.fileName),R=N||C.fileName,F=ts(R),H=b!==void 0||N!==void 0;l5t(C,r,U=>{if(!am(U))return;const q=qAe(F,U),X=a(q);return X===void 0?void 0:sI(c0(E,X,p))},U=>{const q=t.getTypeChecker().getSymbolAtLocation(U);if(q!=null&&q.declarations&&q.declarations.some(Z=>Vh(Z)))return;const X=N!==void 0?qit(U,nA(U.text,R,t.getCompilerOptions(),h),a,g):c5t(q,U,C,t,h,a);return X!==void 0&&(X.updated||H&&am(U.text))?wS.updateModuleSpecifier(t.getCompilerOptions(),C,T,X.newFileName,dA(t,h),U.text):void 0})}}function a5t(t,r){return ca(zr(t,r))}function qAe(t,r){return sI(a5t(t,r))}function c5t(t,r,a,u,h,p){if(t){const g=Fe(t.declarations,Os).fileName,C=p(g);return C===void 0?{newFileName:g,updated:!1}:{newFileName:C,updated:!0}}else{const g=u.getModeForUsageLocation(a,r),C=h.resolveModuleNameLiterals||!h.resolveModuleNames?u.getResolvedModuleFromModuleSpecifier(r,a):h.getResolvedModuleWithFailedLookupLocationsFromCache&&h.getResolvedModuleWithFailedLookupLocationsFromCache(r.text,a.fileName,g);return qit(r,C,p,u.getSourceFiles())}}function qit(t,r,a,u){if(!r)return;if(r.resolvedModule){const b=C(r.resolvedModule.resolvedFileName);if(b)return b}const h=O(r.failedLookupLocations,p)||am(t.text)&&O(r.failedLookupLocations,g);if(h)return h;return r.resolvedModule&&{newFileName:r.resolvedModule.resolvedFileName,updated:!1};function p(b){const T=a(b);return T&&Fe(u,E=>E.fileName===T)?g(b):void 0}function g(b){return su(b,"/package.json")?void 0:C(b)}function C(b){const T=a(b);return T&&{newFileName:T,updated:!0}}}function l5t(t,r,a,u){for(const h of t.referencedFiles||w){const p=a(h.fileName);p!==void 0&&p!==t.text.slice(h.pos,h.end)&&r.replaceRangeWithText(t,h,p)}for(const h of t.imports){const p=u(h);p!==void 0&&p!==h.text&&r.replaceRangeWithText(t,$it(h,t),p)}}function $it(t,r){return Um(t.getStart(r)+1,t.end-1)}function $Ae(t,r){if(Aa(t))for(const a of t.properties)_d(a)&&Ha(a.name)&&r(a,a.name.text)}var Ehe=(t=>(t[t.exact=0]="exact",t[t.prefix=1]="prefix",t[t.substring=2]="substring",t[t.camelCase=3]="camelCase",t))(Ehe||{});function m5(t,r){return{kind:t,isCaseSensitive:r}}function JAe(t){const r=new Map,a=t.trim().split(".").map(u=>h5t(u.trim()));if(a.length===1&&a[0].totalTextChunk.text==="")return{getMatchForLastSegmentOfPattern:()=>m5(2,!0),getFullMatch:()=>m5(2,!0),patternContainsDots:!1};if(!a.some(u=>!u.subWordTextChunks.length))return{getFullMatch:(u,h)=>u5t(u,h,a,r),getMatchForLastSegmentOfPattern:u=>GAe(u,va(a),r),patternContainsDots:a.length>1}}function u5t(t,r,a,u){if(!GAe(r,va(a),u)||a.length-1>t.length)return;let p;for(let g=a.length-2,C=t.length-1;g>=0;g-=1,C-=1)p=Kit(p,GAe(t[C],a[g],u));return p}function Jit(t,r){let a=r.get(t);return a||r.set(t,a=e4e(t)),a}function Git(t,r,a){const u=_5t(t,r.textLowerCase);if(u===0)return m5(r.text.length===t.length?0:1,so(t,r.text));if(r.isLowerCase){if(u===-1)return;const h=Jit(t,a);for(const p of h)if(KAe(t,p,r.text,!0))return m5(2,KAe(t,p,r.text,!1));if(r.text.length<t.length&&sO(t.charCodeAt(u)))return m5(2,!1)}else{if(t.indexOf(r.text)>0)return m5(2,!0);if(r.characterSpans.length>0){const h=Jit(t,a),p=Xit(t,h,r,!1)?!0:Xit(t,h,r,!0)?!1:void 0;if(p!==void 0)return m5(3,p)}}}function GAe(t,r,a){if(Ihe(r.totalTextChunk.text,p=>p!==32&&p!==42)){const p=Git(t,r.totalTextChunk,a);if(p)return p}const u=r.subWordTextChunks;let h;for(const p of u)h=Kit(h,Git(t,p,a));return h}function Kit(t,r){return Zse([t,r],d5t)}function d5t(t,r){return t===void 0?1:r===void 0?-1:_l(t.kind,r.kind)||Ak(!t.isCaseSensitive,!r.isCaseSensitive)}function KAe(t,r,a,u,h={start:0,length:a.length}){return h.length<=r.length&&ent(0,h.length,p=>f5t(a.charCodeAt(h.start+p),t.charCodeAt(r.start+p),u))}function f5t(t,r,a){return a?XAe(t)===XAe(r):t===r}function Xit(t,r,a,u){const h=a.characterSpans;let p=0,g=0;for(;;){if(g===h.length)return!0;if(p===r.length)return!1;let C=r[p],b=!1;for(;g<h.length;g++){const T=h[g];if(b&&(!sO(a.text.charCodeAt(h[g-1].start))||!sO(a.text.charCodeAt(h[g].start)))||!KAe(t,C,a.text,u,T))break;b=!0,C=Ff(C.start+T.length,C.length-T.length)}p++}}function h5t(t){return{totalTextChunk:ZAe(t),subWordTextChunks:m5t(t)}}function sO(t){if(t>=65&&t<=90)return!0;if(t<127||!iG(t,99))return!1;const r=String.fromCharCode(t);return r===r.toUpperCase()}function Qit(t){if(t>=97&&t<=122)return!0;if(t<127||!iG(t,99))return!1;const r=String.fromCharCode(t);return r===r.toLowerCase()}function _5t(t,r){const a=t.length-r.length;for(let u=0;u<=a;u++)if(Ihe(r,(h,p)=>XAe(t.charCodeAt(p+u))===h))return u;return-1}function XAe(t){return t>=65&&t<=90?97+(t-65):t<127?t:String.fromCharCode(t).toLowerCase().charCodeAt(0)}function QAe(t){return t>=48&&t<=57}function p5t(t){return sO(t)||Qit(t)||QAe(t)||t===95||t===36}function m5t(t){const r=[];let a=0,u=0;for(let h=0;h<t.length;h++){const p=t.charCodeAt(h);p5t(p)?(u===0&&(a=h),u++):u>0&&(r.push(ZAe(t.substr(a,u))),u=0)}return u>0&&r.push(ZAe(t.substr(a,u))),r}function ZAe(t){const r=t.toLowerCase();return{text:t,textLowerCase:r,isLowerCase:t===r,characterSpans:YAe(t)}}function YAe(t){return Zit(t,!1)}function e4e(t){return Zit(t,!0)}function Zit(t,r){const a=[];let u=0;for(let h=1;h<t.length;h++){const p=QAe(t.charCodeAt(h-1)),g=QAe(t.charCodeAt(h)),C=y5t(t,r,h),b=r&&g5t(t,h,u);(t4e(t.charCodeAt(h-1))||t4e(t.charCodeAt(h))||p!==g||C||b)&&(Yit(t,u,h)||a.push(Ff(u,h-u)),u=h)}return Yit(t,u,t.length)||a.push(Ff(u,t.length-u)),a}function t4e(t){switch(t){case 33:case 34:case 35:case 37:case 38:case 39:case 40:case 41:case 42:case 44:case 45:case 46:case 47:case 58:case 59:case 63:case 64:case 91:case 92:case 93:case 95:case 123:case 125:return!0}return!1}function Yit(t,r,a){return Ihe(t,u=>t4e(u)&&u!==95,r,a)}function g5t(t,r,a){return r!==a&&r+1<t.length&&sO(t.charCodeAt(r))&&Qit(t.charCodeAt(r+1))&&Ihe(t,sO,a,r)}function y5t(t,r,a){const u=sO(t.charCodeAt(a-1));return sO(t.charCodeAt(a))&&(!r||!u)}function ent(t,r,a){for(let u=t;u<r;u++)if(!a(u))return!1;return!0}function Ihe(t,r,a=0,u=t.length){return ent(a,u,h=>r(t.charCodeAt(h),h))}function tnt(t,r=!0,a=!1){const u={languageVersion:1,pragmas:void 0,checkJsDirective:void 0,referencedFiles:[],typeReferenceDirectives:[],libReferenceDirectives:[],amdDependencies:[],hasNoDefaultLib:void 0,moduleName:void 0},h=[];let p,g,C,b=0,T=!1;function E(){return g=C,C=Uh.scan(),C===19?b++:C===20&&b--,C}function N(){const oe=Uh.getTokenValue(),pe=Uh.getTokenStart();return{fileName:oe,pos:pe,end:pe+oe.length}}function R(){p||(p=[]),p.push({ref:N(),depth:b})}function F(){h.push(N()),H()}function H(){b===0&&(T=!0)}function U(){let oe=Uh.getToken();return oe===138?(oe=E(),oe===144&&(oe=E(),oe===11&&R()),!0):!1}function q(){if(g===25)return!1;let oe=Uh.getToken();if(oe===102){if(oe=E(),oe===21){if(oe=E(),oe===11||oe===15)return F(),!0}else{if(oe===11)return F(),!0;if(oe===156&&Uh.lookAhead(()=>{const de=Uh.scan();return de!==161&&(de===42||de===19||de===80||P_(de))})&&(oe=E()),oe===80||P_(oe))if(oe=E(),oe===161){if(oe=E(),oe===11)return F(),!0}else if(oe===64){if(Z(!0))return!0}else if(oe===28)oe=E();else return!0;if(oe===19){for(oe=E();oe!==20&&oe!==1;)oe=E();oe===20&&(oe=E(),oe===161&&(oe=E(),oe===11&&F()))}else oe===42&&(oe=E(),oe===130&&(oe=E(),(oe===80||P_(oe))&&(oe=E(),oe===161&&(oe=E(),oe===11&&F()))))}return!0}return!1}function X(){let oe=Uh.getToken();if(oe===95){if(H(),oe=E(),oe===156&&Uh.lookAhead(()=>{const de=Uh.scan();return de===42||de===19})&&(oe=E()),oe===19){for(oe=E();oe!==20&&oe!==1;)oe=E();oe===20&&(oe=E(),oe===161&&(oe=E(),oe===11&&F()))}else if(oe===42)oe=E(),oe===161&&(oe=E(),oe===11&&F());else if(oe===102&&(oe=E(),oe===156&&Uh.lookAhead(()=>{const de=Uh.scan();return de===80||P_(de)})&&(oe=E()),(oe===80||P_(oe))&&(oe=E(),oe===64&&Z(!0))))return!0;return!0}return!1}function Z(oe,pe=!1){let de=oe?E():Uh.getToken();return de===149?(de=E(),de===21&&(de=E(),(de===11||pe&&de===15)&&F()),!0):!1}function Q(){let oe=Uh.getToken();if(oe===80&&Uh.getTokenValue()==="define"){if(oe=E(),oe!==21)return!0;if(oe=E(),oe===11||oe===15)if(oe=E(),oe===28)oe=E();else return!0;if(oe!==23)return!0;for(oe=E();oe!==24&&oe!==1;)(oe===11||oe===15)&&F(),oe=E();return!0}return!1}function re(){for(Uh.setText(t),E();Uh.getToken()!==1;){if(Uh.getToken()===16){const oe=[Uh.getToken()];e:for(;P(oe);){const pe=Uh.scan();switch(pe){case 1:break e;case 102:q();break;case 16:oe.push(pe);break;case 19:P(oe)&&oe.push(pe);break;case 20:P(oe)&&(rl(oe)===16?Uh.reScanTemplateToken(!1)===18&&oe.pop():oe.pop());break}}E()}U()||q()||X()||a&&(Z(!1,!0)||Q())||E()}Uh.setText(void 0)}if(r&&re(),qle(u,t),$le(u,Tc),T){if(p)for(const oe of p)h.push(oe.ref);return{referencedFiles:u.referencedFiles,typeReferenceDirectives:u.typeReferenceDirectives,libReferenceDirectives:u.libReferenceDirectives,importedFiles:h,isLibFile:!!u.hasNoDefaultLib,ambientExternalModules:void 0}}else{let oe;if(p)for(const pe of p)pe.depth===0?(oe||(oe=[]),oe.push(pe.ref.fileName)):h.push(pe.ref);return{referencedFiles:u.referencedFiles,typeReferenceDirectives:u.typeReferenceDirectives,libReferenceDirectives:u.libReferenceDirectives,importedFiles:h,isLibFile:!!u.hasNoDefaultLib,ambientExternalModules:oe}}}var v5t=/^data:(?:application\/json;charset=[uU][tT][fF]-8;base64,([A-Za-z0-9+/=]+)$)?/;function i4e(t){const r=Mf(t.useCaseSensitiveFileNames()),a=t.getCurrentDirectory(),u=new Map,h=new Map;return{tryGetSourcePosition:C,tryGetGeneratedPosition:b,toLineColumnOffset:R,clearCache:F,documentPositionMappers:h};function p(H){return ol(H,a,r)}function g(H,U){const q=p(H),X=h.get(q);if(X)return X;let Z;if(t.getDocumentPositionMapper)Z=t.getDocumentPositionMapper(H,U);else if(t.readFile){const Q=N(H);Z=Q&&Nhe({getSourceFileLike:N,getCanonicalFileName:r,log:re=>t.log(re)},H,Rue(Q.text,Lv(Q)),re=>!t.fileExists||t.fileExists(re)?t.readFile(re):void 0)}return h.set(q,Z||Bue),Z||Bue}function C(H){if(!df(H.fileName)||!T(H.fileName))return;const q=g(H.fileName).getSourcePosition(H);return!q||q===H?void 0:C(q)||q}function b(H){if(df(H.fileName))return;const U=T(H.fileName);if(!U)return;const q=t.getProgram();if(q.isSourceOfProjectReferenceRedirect(U.fileName))return;const Z=q.getCompilerOptions().outFile,Q=Z?s_(Z)+".d.ts":hK(H.fileName,q.getCompilerOptions(),q);if(Q===void 0)return;const re=g(Q,H.fileName).getGeneratedPosition(H);return re===H?void 0:re}function T(H){const U=t.getProgram();if(!U)return;const q=p(H),X=U.getSourceFileByPath(q);return X&&X.resolvedPath===q?X:void 0}function E(H){const U=p(H),q=u.get(U);if(q!==void 0)return q||void 0;if(!t.readFile||t.fileExists&&!t.fileExists(H)){u.set(U,!1);return}const X=t.readFile(H),Z=X?b5t(X):!1;return u.set(U,Z),Z||void 0}function N(H){return t.getSourceFileLike?t.getSourceFileLike(H):T(H)||E(H)}function R(H,U){return N(H).getLineAndCharacterOfPosition(U)}function F(){u.clear(),h.clear()}}function Nhe(t,r,a,u){let h=NNe(a);if(h){const C=v5t.exec(h);if(C){if(C[1]){const b=C[1];return int(t,hDe(Pd,b),r)}h=void 0}}const p=[];h&&p.push(h),p.push(r+".map");const g=h&&wo(h,ts(r));for(const C of p){const b=wo(C,ts(r)),T=u(b,g);if(Oo(T))return int(t,T,b);if(T!==void 0)return T||void 0}}function int(t,r,a){const u=LNe(r);if(!(!u||!u.sources||!u.file||!u.mappings)&&!(u.sourcesContent&&u.sourcesContent.some(Oo)))return ANe(t,u,a)}function b5t(t,r){return{text:t,lineMap:r,getLineAndCharacterOfPosition(a){return P6(Lv(this),a)}}}var n4e=new Map;function Lhe(t,r,a){var u;r.getSemanticDiagnostics(t,a);const h=[],p=r.getTypeChecker();!(r.getImpliedNodeFormatForEmit(t)===1||Ru(t.fileName,[".cts",".cjs"]))&&t.commonJsModuleIndicator&&(hAe(r)||zfe(r.getCompilerOptions()))&&C5t(t)&&h.push(Kn(k5t(t.commonJsModuleIndicator),k.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module));const C=r_(t);if(n4e.clear(),b(t),EP(r.getCompilerOptions()))for(const T of t.imports){const E=O8(T),N=S5t(E);if(!N)continue;const R=(u=r.getResolvedModuleFromModuleSpecifier(T,t))==null?void 0:u.resolvedModule,F=R&&r.getSourceFile(R.resolvedFileName);F&&F.externalModuleIndicator&&F.externalModuleIndicator!==!0&&Il(F.externalModuleIndicator)&&F.externalModuleIndicator.isExportEquals&&h.push(Kn(N,k.Import_may_be_converted_to_a_default_import))}return Sr(h,t.bindSuggestionDiagnostics),Sr(h,r.getSuggestionDiagnostics(t,a)),h.sort((T,E)=>T.start-E.start),h;function b(T){if(C)D5t(T,p)&&h.push(Kn(_s(T.parent)?T.parent.name:T,k.This_constructor_function_may_be_converted_to_a_class_declaration));else{if(Lu(T)&&T.parent===t&&T.declarationList.flags&2&&T.declarationList.declarations.length===1){const N=T.declarationList.declarations[0].initializer;N&&L_(N,!0)&&h.push(Kn(N,k.require_call_may_be_converted_to_an_import))}const E=wh.getJSDocTypedefNodes(T);for(const N of E)h.push(Kn(N,k.JSDoc_typedef_may_be_converted_to_TypeScript_type));wh.parameterShouldGetTypeFromJSDoc(T)&&h.push(Kn(T.name||T,k.JSDoc_types_may_be_moved_to_TypeScript_types))}Ohe(T)&&w5t(T,p,h),T.forEachChild(b)}}function C5t(t){return t.statements.some(r=>{switch(r.kind){case 243:return r.declarationList.declarations.some(a=>!!a.initializer&&L_(nnt(a.initializer),!0));case 244:{const{expression:a}=r;if(!ur(a))return L_(a,!0);const u=Bu(a);return u===1||u===2}default:return!1}})}function nnt(t){return Nr(t)?nnt(t.expression):t}function S5t(t){switch(t.kind){case 272:const{importClause:r,moduleSpecifier:a}=t;return r&&!r.name&&r.namedBindings&&r.namedBindings.kind===274&&Ha(a)?r.namedBindings.name:void 0;case 271:return t.name;default:return}}function w5t(t,r,a){x5t(t,r)&&!n4e.has(ant(t))&&a.push(Kn(!t.name&&_s(t.parent)&&ot(t.parent.name)?t.parent.name:t,k.This_may_be_converted_to_an_async_function))}function x5t(t,r){return!W8(t)&&t.body&&Xo(t.body)&&T5t(t.body,r)&&Phe(t,r)}function Phe(t,r){const a=r.getSignatureFromDeclaration(t),u=a?r.getReturnTypeOfSignature(a):void 0;return!!u&&!!r.getPromisedTypeOfPromise(u)}function k5t(t){return ur(t)?t.left:t}function T5t(t,r){return!!uS(t,a=>ZZ(a,r))}function ZZ(t,r){return Og(t)&&!!t.expression&&Ahe(t.expression,r)}function Ahe(t,r){if(!rnt(t)||!snt(t)||!t.arguments.every(u=>ont(u,r)))return!1;let a=t.expression.expression;for(;rnt(a)||Nr(a);)if(la(a)){if(!snt(a)||!a.arguments.every(u=>ont(u,r)))return!1;a=a.expression.expression}else a=a.expression;return!0}function rnt(t){return la(t)&&(lj(t,"then")||lj(t,"catch")||lj(t,"finally"))}function snt(t){const r=t.expression.name.text,a=r==="then"?2:r==="catch"||r==="finally"?1:0;return t.arguments.length>a?!1:t.arguments.length<a?!0:a===1||Ft(t.arguments,u=>u.kind===106||ot(u)&&u.text==="undefined")}function ont(t,r){switch(t.kind){case 262:case 218:if(nd(t)&1)return!1;case 219:n4e.set(ant(t),!0);case 106:return!0;case 80:case 211:{const u=r.getSymbolAtLocation(t);return u?r.isUndefinedSymbol(u)||Ft(Vf(u,r).declarations,h=>Ho(h)||aS(h)&&!!h.initializer&&Ho(h.initializer)):!1}default:return!1}}function ant(t){return`${t.pos.toString()}:${t.end.toString()}`}function D5t(t,r){var a,u,h,p;if(ml(t)){if(_s(t.parent)&&((a=t.symbol.members)!=null&&a.size))return!0;const g=r.getSymbolOfExpando(t,!1);return!!(g&&((u=g.exports)!=null&&u.size||(h=g.members)!=null&&h.size))}return Wu(t)?!!((p=t.symbol.members)!=null&&p.size):!1}function Ohe(t){switch(t.kind){case 262:case 174:case 218:case 219:return!0;default:return!1}}var E5t=new Set(["isolatedModules"]);function r4e(t,r){return lnt(t,r,!1)}function cnt(t,r){return lnt(t,r,!0)}var I5t=`/// <reference no-default-lib="true"/>
+interface Boolean {}
+interface Function {}
+interface CallableFunction {}
+interface NewableFunction {}
+interface IArguments {}
+interface Number {}
+interface Object {}
+interface RegExp {}
+interface String {}
+interface Array<T> { length: number; [n: number]: T; }
+interface SymbolConstructor {
+ (desc?: string | number): symbol;
+ for(name: string): symbol;
+ readonly toStringTag: symbol;
+}
+declare var Symbol: SymbolConstructor;
+interface Symbol {
+ readonly [Symbol.toStringTag]: string;
+}`,YZ="lib.d.ts",s4e;function lnt(t,r,a){s4e??(s4e=ZP(YZ,I5t,{languageVersion:99}));const u=[],h=r.compilerOptions?Mhe(r.compilerOptions,u):{},p=fY();for(const U in p)Li(p,U)&&h[U]===void 0&&(h[U]=p[U]);for(const U of LIe)h.verbatimModuleSyntax&&E5t.has(U.name)||(h[U.name]=U.transpileOptionValue);h.suppressOutputPathCheck=!0,h.allowNonTsExtensions=!0,a?(h.declaration=!0,h.emitDeclarationOnly=!0,h.isolatedDeclarations=!0):(h.declaration=!1,h.declarationMap=!1);const g=mS(h),C={getSourceFile:U=>U===ca(b)?T:U===ca(YZ)?s4e:void 0,writeFile:(U,q)=>{Xl(U,".map")?(j.assertEqual(N,void 0,"Unexpected multiple source map outputs, file:",U),N=q):(j.assertEqual(E,void 0,"Unexpected multiple outputs, file:",U),E=q)},getDefaultLibFileName:()=>YZ,useCaseSensitiveFileNames:()=>!1,getCanonicalFileName:U=>U,getCurrentDirectory:()=>"",getNewLine:()=>g,fileExists:U=>U===b||!!a&&U===YZ,readFile:()=>"",directoryExists:()=>!0,getDirectories:()=>[]},b=r.fileName||(r.compilerOptions&&r.compilerOptions.jsx?"module.tsx":"module.ts"),T=ZP(b,t,{languageVersion:Ja(h),impliedNodeFormat:ZH(ol(b,"",C.getCanonicalFileName),void 0,C,h),setExternalModuleIndicator:$V(h),jsDocParsingMode:r.jsDocParsingMode??0});r.moduleName&&(T.moduleName=r.moduleName),r.renamedDependencies&&(T.renamedDependencies=new Map(Object.entries(r.renamedDependencies)));let E,N;const F=YH(a?[b,YZ]:[b],h,C);r.reportDiagnostics&&(Sr(u,F.getSyntacticDiagnostics(T)),Sr(u,F.getOptionsDiagnostics()));const H=F.emit(void 0,void 0,void 0,a,r.transformers,a);return Sr(u,H.diagnostics),E===void 0?j.fail("Output generation failed"):{outputText:E,diagnostics:u,sourceMapText:N}}function unt(t,r,a,u,h){const p=r4e(t,{compilerOptions:r,fileName:a,reportDiagnostics:!!u,moduleName:h});return Sr(u,p.diagnostics),p.outputText}var o4e;function Mhe(t,r){o4e=o4e||$t(U0,a=>typeof a.type=="object"&&!cf(a.type,u=>typeof u!="number")),t=Ffe(t);for(const a of o4e){if(!Li(t,a.name))continue;const u=t[a.name];Oo(u)?t[a.name]=qX(a,u,r):cf(a.type,h=>h===u)||r.push(AIe(a))}return t}var a4e={};c(a4e,{getNavigateToItems:()=>dnt});function dnt(t,r,a,u,h,p,g){const C=JAe(u);if(!C)return w;const b=[],T=t.length===1?t[0]:void 0;for(const E of t)a.throwIfCancellationRequested(),!(p&&E.isDeclarationFile)&&(fnt(E,!!g,T)||E.getNamedDeclarations().forEach((N,R)=>{N5t(C,R,N,r,E.fileName,!!g,T,b)}));return b.sort(O5t),(h===void 0?b:b.slice(0,h)).map(M5t)}function fnt(t,r,a){return t!==a&&r&&(Dj(t.path)||t.hasNoDefaultLib)}function N5t(t,r,a,u,h,p,g,C){const b=t.getMatchForLastSegmentOfPattern(r);if(b){for(const T of a)if(L5t(T,u,p,g))if(t.patternContainsDots){const E=t.getFullMatch(A5t(T),r);E&&C.push({name:r,fileName:h,matchKind:E.kind,isCaseSensitive:E.isCaseSensitive,declaration:T})}else C.push({name:r,fileName:h,matchKind:b.kind,isCaseSensitive:b.isCaseSensitive,declaration:T})}}function L5t(t,r,a,u){var h;switch(t.kind){case 273:case 276:case 271:const p=r.getSymbolAtLocation(t.name),g=r.getAliasedSymbol(p);return p.escapedName!==g.escapedName&&!((h=g.declarations)!=null&&h.every(C=>fnt(C.getSourceFile(),a,u)));default:return!0}}function P5t(t,r){const a=No(t);return!!a&&(hnt(a,r)||a.kind===167&&c4e(a.expression,r))}function c4e(t,r){return hnt(t,r)||Nr(t)&&(r.push(t.name.text),!0)&&c4e(t.expression,r)}function hnt(t,r){return P1(t)&&(r.push(Lg(t)),!0)}function A5t(t){const r=[],a=No(t);if(a&&a.kind===167&&!c4e(a.expression,r))return w;r.shift();let u=UI(t);for(;u;){if(!P5t(u,r))return w;u=UI(u)}return r.reverse(),r}function O5t(t,r){return _l(t.matchKind,r.matchKind)||gW(t.name,r.name)}function M5t(t){const r=t.declaration,a=UI(r),u=a&&No(a);return{name:t.name,kind:gD(r),kindModifiers:a5(r),matchKind:Ehe[t.matchKind],isCaseSensitive:t.isCaseSensitive,fileName:t.fileName,textSpan:f_(r),containerName:u?u.text:"",containerKind:u?gD(a):""}}var l4e={};c(l4e,{getNavigationBarItems:()=>pnt,getNavigationTree:()=>mnt});var R5t=/\s+/g,u4e=150,Rhe,Oj,eY=[],ES,_nt=[],oO,d4e=[];function pnt(t,r){Rhe=r,Oj=t;try{return qt(H5t(vnt(t)),j5t)}finally{gnt()}}function mnt(t,r){Rhe=r,Oj=t;try{return Ent(vnt(t))}finally{gnt()}}function gnt(){Oj=void 0,Rhe=void 0,eY=[],ES=void 0,d4e=[]}function tY(t){return g5(t.getText(Oj))}function Fhe(t){return t.node.kind}function ynt(t,r){t.children?t.children.push(r):t.children=[r]}function vnt(t){j.assert(!eY.length);const r={node:t,name:void 0,additionalNodes:void 0,parent:void 0,children:void 0,indent:0};ES=r;for(const a of t.statements)_A(a);return g2(),j.assert(!ES&&!eY.length),r}function CD(t,r){ynt(ES,f4e(t,r))}function f4e(t,r){return{node:t,name:r||(Wf(t)||jt(t)?No(t):void 0),additionalNodes:void 0,parent:ES,children:void 0,indent:ES.indent+1}}function bnt(t){oO||(oO=new Map),oO.set(t,!0)}function Cnt(t){for(let r=0;r<t;r++)g2()}function Snt(t,r){const a=[];for(;!P1(r);){const u=gV(r),h=$b(r);r=r.expression,!(h==="prototype"||Vs(u))&&a.push(u)}a.push(r);for(let u=a.length-1;u>0;u--){const h=a[u];SD(t,h)}return[a.length-1,a[0]]}function SD(t,r){const a=f4e(t,r);ynt(ES,a),eY.push(ES),_nt.push(oO),oO=void 0,ES=a}function g2(){ES.children&&(Bhe(ES.children,ES),p4e(ES.children)),ES=eY.pop(),oO=_nt.pop()}function y2(t,r,a){SD(t,a),_A(r),g2()}function wnt(t){t.initializer&&U5t(t.initializer)?(SD(t),Uo(t.initializer,_A),g2()):y2(t,t.initializer)}function h4e(t){const r=No(t);if(r===void 0)return!1;if(Ka(r)){const a=r.expression;return pl(a)||A_(a)||cm(a)}return!!r}function _A(t){if(Rhe.throwIfCancellationRequested(),!(!t||eP(t)))switch(t.kind){case 176:const r=t;y2(r,r.body);for(const g of r.parameters)vp(g,r)&&CD(g);break;case 174:case 177:case 178:case 173:h4e(t)&&y2(t,t.body);break;case 172:h4e(t)&&wnt(t);break;case 171:h4e(t)&&CD(t);break;case 273:const a=t;a.name&&CD(a.name);const{namedBindings:u}=a;if(u)if(u.kind===274)CD(u);else for(const g of u.elements)CD(g);break;case 304:y2(t,t.name);break;case 305:const{expression:h}=t;ot(h)?CD(t,h):CD(t);break;case 208:case 303:case 260:{const g=t;ta(g.name)?_A(g.name):wnt(g);break}case 262:const p=t.name;p&&ot(p)&&bnt(p.text),y2(t,t.body);break;case 219:case 218:y2(t,t.body);break;case 266:SD(t);for(const g of t.members)z5t(g)||CD(g);g2();break;case 263:case 231:case 264:SD(t);for(const g of t.members)_A(g);g2();break;case 267:y2(t,Nnt(t).body);break;case 277:{const g=t.expression,C=Aa(g)||la(g)?g:xl(g)||ml(g)?g.body:void 0;C?(SD(t),_A(C),g2()):CD(t);break}case 281:case 271:case 181:case 179:case 180:case 265:CD(t);break;case 213:case 226:{const g=Bu(t);switch(g){case 1:case 2:y2(t,t.right);return;case 6:case 3:{const C=t,b=C.left,T=g===3?b.expression:b;let E=0,N;ot(T.expression)?(bnt(T.expression.text),N=T.expression):[E,N]=Snt(C,T.expression),g===6?Aa(C.right)&&C.right.properties.length>0&&(SD(C,N),Uo(C.right,_A),g2()):ml(C.right)||xl(C.right)?y2(t,C.right,N):(SD(C,N),y2(t,C.right,b.name),g2()),Cnt(E);return}case 7:case 9:{const C=t,b=g===7?C.arguments[0]:C.arguments[0].expression,T=C.arguments[1],[E,N]=Snt(t,b);SD(t,N),SD(t,Ht(G.createIdentifier(T.text),T)),_A(t.arguments[2]),g2(),g2(),Cnt(E);return}case 5:{const C=t,b=C.left,T=b.expression;if(ot(T)&&$b(b)!=="prototype"&&oO&&oO.has(T.text)){ml(C.right)||xl(C.right)?y2(t,C.right,T):jT(b)&&(SD(C,T),y2(C.left,C.right,gV(b)),g2());return}break}case 4:case 0:case 8:break;default:j.assertNever(g)}}default:jp(t)&&O(t.jsDoc,g=>{O(g.tags,C=>{Ng(C)&&CD(C)})}),Uo(t,_A)}}function Bhe(t,r){const a=new Map;Hi(t,(u,h)=>{const p=u.name||No(u.node),g=p&&tY(p);if(!g)return!0;const C=a.get(g);if(!C)return a.set(g,u),!0;if(C instanceof Array){for(const b of C)if(xnt(b,u,h,r))return!1;return C.push(u),!0}else{const b=C;return xnt(b,u,h,r)?!1:(a.set(g,[b,u]),!0)}})}var Mj={5:!0,3:!0,7:!0,9:!0,0:!1,1:!1,2:!1,8:!1,6:!0,4:!1};function F5t(t,r,a,u){function h(C){return ml(C)||Wu(C)||_s(C)}const p=ur(r.node)||la(r.node)?Bu(r.node):0,g=ur(t.node)||la(t.node)?Bu(t.node):0;if(Mj[p]&&Mj[g]||h(t.node)&&Mj[p]||h(r.node)&&Mj[g]||hd(t.node)&&_4e(t.node)&&Mj[p]||hd(r.node)&&Mj[g]||hd(t.node)&&_4e(t.node)&&h(r.node)||hd(r.node)&&h(t.node)&&_4e(t.node)){let C=t.additionalNodes&&rl(t.additionalNodes)||t.node;if(!hd(t.node)&&!hd(r.node)||h(t.node)||h(r.node)){const T=h(t.node)?t.node:h(r.node)?r.node:void 0;if(T!==void 0){const E=Ht(G.createConstructorDeclaration(void 0,[],void 0),T),N=f4e(E);N.indent=t.indent+1,N.children=t.node===T?t.children:r.children,t.children=t.node===T?Js([N],r.children||[r]):Js(t.children||[{...t}],[N])}else(t.children||r.children)&&(t.children=Js(t.children||[{...t}],r.children||[r]),t.children&&(Bhe(t.children,t),p4e(t.children)));C=t.node=Ht(G.createClassDeclaration(void 0,t.name||G.createIdentifier("__class__"),void 0,void 0,[]),t.node)}else t.children=Js(t.children,r.children),t.children&&Bhe(t.children,t);const b=r.node;return u.children[a-1].node.end===C.end?Ht(C,{pos:C.pos,end:b.end}):(t.additionalNodes||(t.additionalNodes=[]),t.additionalNodes.push(Ht(G.createClassDeclaration(void 0,t.name||G.createIdentifier("__class__"),void 0,void 0,[]),r.node))),!0}return p!==0}function xnt(t,r,a,u){return F5t(t,r,a,u)?!0:B5t(t.node,r.node,u)?(W5t(t,r),!0):!1}function B5t(t,r,a){if(t.kind!==r.kind||t.parent!==r.parent&&!(knt(t,a)&&knt(r,a)))return!1;switch(t.kind){case 172:case 174:case 177:case 178:return pa(t)===pa(r);case 267:return Tnt(t,r)&&y4e(t)===y4e(r);default:return!0}}function _4e(t){return!!(t.flags&16)}function knt(t,r){const a=H1(t.parent)?t.parent.parent:t.parent;return a===r.node||Yt(r.additionalNodes,a)}function Tnt(t,r){return!t.body||!r.body?t.body===r.body:t.body.kind===r.body.kind&&(t.body.kind!==267||Tnt(t.body,r.body))}function W5t(t,r){t.additionalNodes=t.additionalNodes||[],t.additionalNodes.push(r.node),r.additionalNodes&&t.additionalNodes.push(...r.additionalNodes),t.children=Js(t.children,r.children),t.children&&(Bhe(t.children,t),p4e(t.children))}function p4e(t){t.sort(V5t)}function V5t(t,r){return gW(Dnt(t.node),Dnt(r.node))||_l(Fhe(t),Fhe(r))}function Dnt(t){if(t.kind===267)return Int(t);const r=No(t);if(r&&id(r)){const a=CI(r);return a&&Ws(a)}switch(t.kind){case 218:case 219:case 231:return Pnt(t);default:return}}function m4e(t,r){if(t.kind===267)return g5(Int(t));if(r){const a=ot(r)?r.text:wl(r)?`[${tY(r.argumentExpression)}]`:tY(r);if(a.length>0)return g5(a)}switch(t.kind){case 307:const a=t;return wd(a)?`"${Vy(ud(s_(ca(a.fileName))))}"`:"<global>";case 277:return Il(t)&&t.isExportEquals?"export=":"default";case 219:case 262:case 218:case 263:case 231:return _S(t)&2048?"default":Pnt(t);case 176:return"constructor";case 180:return"new()";case 179:return"()";case 181:return"[]";default:return"<unknown>"}}function H5t(t){const r=[];function a(h){if(u(h)&&(r.push(h),h.children))for(const p of h.children)a(p)}return a(t),r;function u(h){if(h.children)return!0;switch(Fhe(h)){case 263:case 231:case 266:case 264:case 267:case 307:case 265:case 346:case 338:return!0;case 219:case 262:case 218:return p(h);default:return!1}function p(g){if(!g.node.body)return!1;switch(Fhe(g.parent)){case 268:case 307:case 174:case 176:return!0;default:return!1}}}}function Ent(t){return{text:m4e(t.node,t.name),kind:gD(t.node),kindModifiers:Lnt(t.node),spans:g4e(t),nameSpan:t.name&&v4e(t.name),childItems:qt(t.children,Ent)}}function j5t(t){return{text:m4e(t.node,t.name),kind:gD(t.node),kindModifiers:Lnt(t.node),spans:g4e(t),childItems:qt(t.children,r)||d4e,indent:t.indent,bolded:!1,grayed:!1};function r(a){return{text:m4e(a.node,a.name),kind:gD(a.node),kindModifiers:a5(a.node),spans:g4e(a),childItems:d4e,indent:0,bolded:!1,grayed:!1}}}function g4e(t){const r=[v4e(t.node)];if(t.additionalNodes)for(const a of t.additionalNodes)r.push(v4e(a));return r}function Int(t){return Vh(t)?uu(t.name):y4e(t)}function y4e(t){const r=[Lg(t.name)];for(;t.body&&t.body.kind===267;)t=t.body,r.push(Lg(t.name));return r.join(".")}function Nnt(t){return t.body&&rd(t.body)?Nnt(t.body):t}function z5t(t){return!t.name||t.name.kind===167}function v4e(t){return t.kind===307?DS(t):f_(t,Oj)}function Lnt(t){return t.parent&&t.parent.kind===260&&(t=t.parent),a5(t)}function Pnt(t){const{parent:r}=t;if(t.name&&GW(t.name)>0)return g5(al(t.name));if(_s(r))return g5(al(r.name));if(ur(r)&&r.operatorToken.kind===64)return tY(r.left).replace(R5t,"");if(_d(r))return tY(r.name);if(_S(t)&2048)return"default";if(ss(t))return"<class>";if(la(r)){let a=Ant(r.expression);if(a!==void 0){if(a=g5(a),a.length>u4e)return`${a} callback`;const u=g5(es(r.arguments,h=>Bc(h)||nP(h)?h.getText(Oj):void 0).join(", "));return`${a}(${u}) callback`}}return"<function>"}function Ant(t){if(ot(t))return t.text;if(Nr(t)){const r=Ant(t.expression),a=t.name.text;return r===void 0?a:`${r}.${a}`}else return}function U5t(t){switch(t.kind){case 219:case 218:case 231:return!0;default:return!1}}function g5(t){return t=t.length>u4e?t.substring(0,u4e)+"...":t,t.replace(/\\?(?:\r?\n|[\r\u2028\u2029])/g,"")}var pA={};c(pA,{addExportsInOldFile:()=>N4e,addImportsForMovedSymbols:()=>L4e,addNewFileToTsconfig:()=>I4e,addOrRemoveBracesToArrowFunction:()=>VFt,addTargetFileImports:()=>V4e,containsJsx:()=>O4e,convertArrowFunctionOrFunctionExpression:()=>qFt,convertParamsToDestructuredObject:()=>i9t,convertStringOrTemplateLiteral:()=>b9t,convertToOptionalChainExpression:()=>N9t,createNewFileName:()=>A4e,doChangeNamedToNamespaceOrDefault:()=>Wnt,extractSymbol:()=>Prt,generateGetAccessorAndSetAccessor:()=>hBt,getApplicableRefactors:()=>q5t,getEditsForRefactor:()=>$5t,getExistingLocals:()=>B4e,getIdentifierForNode:()=>W4e,getNewStatementsAndRemoveFromOldFile:()=>E4e,getStatementsToMove:()=>Rj,getUsageInfo:()=>iY,inferFunctionReturnType:()=>_Bt,isRefactorErrorInfo:()=>sC,refactorKindBeginsWith:()=>v2,registerRefactor:()=>Qv});var b4e=new Map;function Qv(t,r){b4e.set(t,r)}function q5t(t,r){return as($d(b4e.values(),a=>{var u;return t.cancellationToken&&t.cancellationToken.isCancellationRequested()||!((u=a.kinds)!=null&&u.some(h=>v2(h,t.kind)))?void 0:a.getAvailableActions(t,r)}))}function $5t(t,r,a,u){const h=b4e.get(r);return h&&h.getEditsForAction(t,a,u)}var C4e="Convert export",Whe={name:"Convert default export to named export",description:Bo(k.Convert_default_export_to_named_export),kind:"refactor.rewrite.export.named"},Vhe={name:"Convert named export to default export",description:Bo(k.Convert_named_export_to_default_export),kind:"refactor.rewrite.export.default"};Qv(C4e,{kinds:[Whe.kind,Vhe.kind],getAvailableActions:function(r){const a=Ont(r,r.triggerReason==="invoked");if(!a)return w;if(!sC(a)){const u=a.wasDefault?Whe:Vhe;return[{name:C4e,description:u.description,actions:[u]}]}return r.preferences.provideRefactorNotApplicableReason?[{name:C4e,description:Bo(k.Convert_default_export_to_named_export),actions:[{...Whe,notApplicableReason:a.error},{...Vhe,notApplicableReason:a.error}]}]:w},getEditsForAction:function(r,a){j.assert(a===Whe.name||a===Vhe.name,"Unexpected action name");const u=Ont(r);return j.assert(u&&!sC(u),"Expected applicable refactor info"),{edits:er.ChangeTracker.with(r,p=>J5t(r.file,r.program,u,p,r.cancellationToken)),renameFilename:void 0,renameLocation:void 0}}});function Ont(t,r=!0){const{file:a,program:u}=t,h=fA(t),p=Rs(a,h.start),g=p.parent&&_S(p.parent)&32&&r?p.parent:bj(p,a,h);if(!g||!Os(g.parent)&&!(H1(g.parent)&&Vh(g.parent.parent)))return{error:Bo(k.Could_not_find_export_statement)};const C=u.getTypeChecker(),b=Z5t(g.parent,C),T=_S(g)||(Il(g)&&!g.isExportEquals?2080:0),E=!!(T&2048);if(!(T&32)||!E&&b.exports.has("default"))return{error:Bo(k.This_file_already_has_a_default_export)};const N=R=>ot(R)&&C.getSymbolAtLocation(R)?void 0:{error:Bo(k.Can_only_convert_named_export)};switch(g.kind){case 262:case 263:case 264:case 266:case 265:case 267:{const R=g;return R.name?N(R.name)||{exportNode:R,exportName:R.name,wasDefault:E,exportingModuleSymbol:b}:void 0}case 243:{const R=g;if(!(R.declarationList.flags&2)||R.declarationList.declarations.length!==1)return;const F=ya(R.declarationList.declarations);return F.initializer?(j.assert(!E,"Can't have a default flag here"),N(F.name)||{exportNode:R,exportName:F.name,wasDefault:E,exportingModuleSymbol:b}):void 0}case 277:{const R=g;return R.isExportEquals?void 0:N(R.expression)||{exportNode:R,exportName:R.expression,wasDefault:E,exportingModuleSymbol:b}}default:return}}function J5t(t,r,a,u,h){G5t(t,a,u,r.getTypeChecker()),K5t(r,a,u,h)}function G5t(t,{wasDefault:r,exportNode:a,exportName:u},h,p){if(r)if(Il(a)&&!a.isExportEquals){const g=a.expression,C=Mnt(g.text,g.text);h.replaceNode(t,a,G.createExportDeclaration(void 0,!1,G.createNamedExports([C])))}else h.delete(t,j.checkDefined(Y3(a,90),"Should find a default keyword in modifier list"));else{const g=j.checkDefined(Y3(a,95),"Should find an export keyword in modifier list");switch(a.kind){case 262:case 263:case 264:h.insertNodeAfter(t,g,G.createToken(90));break;case 243:const C=ya(a.declarationList.declarations);if(!kl.Core.isSymbolReferencedInFile(u,p,t)&&!C.type){h.replaceNode(t,a,G.createExportDefault(j.checkDefined(C.initializer,"Initializer was previously known to be present")));break}case 266:case 265:case 267:h.deleteModifier(t,g),h.insertNodeAfter(t,a,G.createExportDefault(G.createIdentifier(u.text)));break;default:j.fail(`Unexpected exportNode kind ${a.kind}`)}}}function K5t(t,{wasDefault:r,exportName:a,exportingModuleSymbol:u},h,p){const g=t.getTypeChecker(),C=j.checkDefined(g.getSymbolAtLocation(a),"Export name should resolve to a symbol");kl.Core.eachExportReference(t.getSourceFiles(),g,p,C,u,a.text,r,b=>{if(a===b)return;const T=b.getSourceFile();r?X5t(T,b,h,a.text):Q5t(T,b,h)})}function X5t(t,r,a,u){const{parent:h}=r;switch(h.kind){case 211:a.replaceNode(t,r,G.createIdentifier(u));break;case 276:case 281:{const g=h;a.replaceNode(t,g,S4e(u,g.name.text));break}case 273:{const g=h;j.assert(g.name===r,"Import clause name should match provided ref");const C=S4e(u,r.text),{namedBindings:b}=g;if(!b)a.replaceNode(t,r,G.createNamedImports([C]));else if(b.kind===274){a.deleteRange(t,{pos:r.getStart(t),end:b.getStart(t)});const T=Ha(g.parent.moduleSpecifier)?qfe(g.parent.moduleSpecifier,t):1,E=Sx(void 0,[S4e(u,r.text)],g.parent.moduleSpecifier,T);a.insertNodeAfter(t,g.parent,E)}else a.delete(t,r),a.insertNodeAtEndOfList(t,b.elements,C);break}case 205:const p=h;a.replaceNode(t,h,G.createImportTypeNode(p.argument,p.attributes,G.createIdentifier(u),p.typeArguments,p.isTypeOf));break;default:j.failBadSyntaxKind(h)}}function Q5t(t,r,a){const u=r.parent;switch(u.kind){case 211:a.replaceNode(t,r,G.createIdentifier("default"));break;case 276:{const h=G.createIdentifier(u.name.text);u.parent.elements.length===1?a.replaceNode(t,u.parent,h):(a.delete(t,u),a.insertNodeBefore(t,u.parent,h));break}case 281:{a.replaceNode(t,u,Mnt("default",u.name.text));break}default:j.assertNever(u,`Unexpected parent kind ${u.kind}`)}}function S4e(t,r){return G.createImportSpecifier(!1,t===r?void 0:G.createIdentifier(t),G.createIdentifier(r))}function Mnt(t,r){return G.createExportSpecifier(!1,t===r?void 0:G.createIdentifier(t),G.createIdentifier(r))}function Z5t(t,r){if(Os(t))return t.symbol;const a=t.parent.symbol;return a.valueDeclaration&&BT(a.valueDeclaration)?r.getMergedSymbol(a):a}var w4e="Convert import",Hhe={0:{name:"Convert namespace import to named imports",description:Bo(k.Convert_namespace_import_to_named_imports),kind:"refactor.rewrite.import.named"},2:{name:"Convert named imports to namespace import",description:Bo(k.Convert_named_imports_to_namespace_import),kind:"refactor.rewrite.import.namespace"},1:{name:"Convert named imports to default import",description:Bo(k.Convert_named_imports_to_default_import),kind:"refactor.rewrite.import.default"}};Qv(w4e,{kinds:So(Hhe).map(t=>t.kind),getAvailableActions:function(r){const a=Rnt(r,r.triggerReason==="invoked");if(!a)return w;if(!sC(a)){const u=Hhe[a.convertTo];return[{name:w4e,description:u.description,actions:[u]}]}return r.preferences.provideRefactorNotApplicableReason?So(Hhe).map(u=>({name:w4e,description:u.description,actions:[{...u,notApplicableReason:a.error}]})):w},getEditsForAction:function(r,a){j.assert(Ft(So(Hhe),p=>p.name===a),"Unexpected action name");const u=Rnt(r);return j.assert(u&&!sC(u),"Expected applicable refactor info"),{edits:er.ChangeTracker.with(r,p=>Y5t(r.file,r.program,p,u)),renameFilename:void 0,renameLocation:void 0}}});function Rnt(t,r=!0){const{file:a}=t,u=fA(t),h=Rs(a,u.start),p=r?Qi(h,om(du,q1)):bj(h,a,u);if(p===void 0||!(du(p)||q1(p)))return{error:"Selection is not an import declaration."};const g=u.start+u.length,C=yD(p,p.parent,a);if(C&&g>C.getStart())return;const{importClause:b}=p;return b?b.namedBindings?b.namedBindings.kind===274?{convertTo:0,import:b.namedBindings}:Fnt(t.program,b)?{convertTo:1,import:b.namedBindings}:{convertTo:2,import:b.namedBindings}:{error:Bo(k.Could_not_find_namespace_import_or_named_imports)}:{error:Bo(k.Could_not_find_import_clause)}}function Fnt(t,r){return EP(t.getCompilerOptions())&&iFt(r.parent.moduleSpecifier,t.getTypeChecker())}function Y5t(t,r,a,u){const h=r.getTypeChecker();u.convertTo===0?eFt(t,h,a,u.import,EP(r.getCompilerOptions())):Wnt(t,r,a,u.import,u.convertTo===1)}function eFt(t,r,a,u,h){let p=!1;const g=[],C=new Map;kl.Core.eachSymbolReferenceInFile(u.name,r,t,N=>{if(!zW(N.parent))p=!0;else{const R=Bnt(N.parent).text;r.resolveName(R,N,-1,!0)&&C.set(R,!0),j.assert(tFt(N.parent)===N,"Parent expression should match id"),g.push(N.parent)}});const b=new Map;for(const N of g){const R=Bnt(N).text;let F=b.get(R);F===void 0&&b.set(R,F=C.has(R)?$I(R,t):R),a.replaceNode(t,N,G.createIdentifier(F))}const T=[];b.forEach((N,R)=>{T.push(G.createImportSpecifier(!1,N===R?void 0:G.createIdentifier(R),G.createIdentifier(N)))});const E=u.parent.parent;if(p&&!h&&du(E))a.insertNodeAfter(t,E,Vnt(E,void 0,T));else{const N=p?G.createIdentifier(u.name.text):void 0;a.replaceNode(t,u.parent,Hnt(N,T))}}function Bnt(t){return Nr(t)?t.name:t.right}function tFt(t){return Nr(t)?t.expression:t.left}function Wnt(t,r,a,u,h=Fnt(r,u.parent)){const p=r.getTypeChecker(),g=u.parent.parent,{moduleSpecifier:C}=g,b=new Set;u.elements.forEach(H=>{const U=p.getSymbolAtLocation(H.name);U&&b.add(U)});const T=C&&Ha(C)?Ij(C.text,99):"module";function E(H){return!!kl.Core.eachSymbolReferenceInFile(H.name,p,t,U=>{const q=p.resolveName(T,U,-1,!0);return q?b.has(q)?vh(U.parent):!0:!1})}const R=u.elements.some(E)?$I(T,t):T,F=new Set;for(const H of u.elements){const U=H.propertyName||H.name;kl.Core.eachSymbolReferenceInFile(H.name,p,t,q=>{const X=U.kind===11?G.createElementAccessExpression(G.createIdentifier(R),G.cloneNode(U)):G.createPropertyAccessExpression(G.createIdentifier(R),G.cloneNode(U));lh(q.parent)?a.replaceNode(t,q.parent,G.createPropertyAssignment(q.text,X)):vh(q.parent)?F.add(H):a.replaceNode(t,q,X)})}if(a.replaceNode(t,u,h?G.createIdentifier(R):G.createNamespaceImport(G.createIdentifier(R))),F.size&&du(g)){const H=as(F.values(),U=>G.createImportSpecifier(U.isTypeOnly,U.propertyName&&G.cloneNode(U.propertyName),G.cloneNode(U.name)));a.insertNodeAfter(t,u.parent.parent,Vnt(g,void 0,H))}}function iFt(t,r){const a=r.resolveExternalModuleName(t);if(!a)return!1;const u=r.resolveExternalModuleSymbol(a);return a!==u}function Vnt(t,r,a){return G.createImportDeclaration(void 0,Hnt(r,a),t.moduleSpecifier,void 0)}function Hnt(t,r){return G.createImportClause(!1,t,r&&r.length?G.createNamedImports(r):void 0)}var x4e="Extract type",jhe={name:"Extract to type alias",description:Bo(k.Extract_to_type_alias),kind:"refactor.extract.type"},zhe={name:"Extract to interface",description:Bo(k.Extract_to_interface),kind:"refactor.extract.interface"},Uhe={name:"Extract to typedef",description:Bo(k.Extract_to_typedef),kind:"refactor.extract.typedef"};Qv(x4e,{kinds:[jhe.kind,zhe.kind,Uhe.kind],getAvailableActions:function(r){const{info:a,affectedTextRange:u}=jnt(r,r.triggerReason==="invoked");return a?sC(a)?r.preferences.provideRefactorNotApplicableReason?[{name:x4e,description:Bo(k.Extract_type),actions:[{...Uhe,notApplicableReason:a.error},{...jhe,notApplicableReason:a.error},{...zhe,notApplicableReason:a.error}]}]:w:[{name:x4e,description:Bo(k.Extract_type),actions:a.isJS?[Uhe]:fn([jhe],a.typeElements&&zhe)}].map(p=>({...p,actions:p.actions.map(g=>({...g,range:u?{start:{line:Ia(r.file,u.pos).line,offset:Ia(r.file,u.pos).character},end:{line:Ia(r.file,u.end).line,offset:Ia(r.file,u.end).character}}:void 0}))})):w},getEditsForAction:function(r,a){const{file:u}=r,{info:h}=jnt(r);j.assert(h&&!sC(h),"Expected to find a range to extract");const p=$I("NewType",u),g=er.ChangeTracker.with(r,T=>{switch(a){case jhe.name:return j.assert(!h.isJS,"Invalid actionName/JS combo"),sFt(T,u,p,h);case Uhe.name:return j.assert(h.isJS,"Invalid actionName/JS combo"),aFt(T,r,u,p,h);case zhe.name:return j.assert(!h.isJS&&!!h.typeElements,"Invalid actionName/JS combo"),oFt(T,u,p,h);default:j.fail("Unexpected action name")}}),C=u.fileName,b=wj(g,C,p,!1);return{edits:g,renameFilename:C,renameLocation:b}}});function jnt(t,r=!0){const{file:a,startPosition:u}=t,h=r_(a),p=TZ(fA(t)),g=p.pos===p.end&&r,C=nFt(a,u,p,g);if(!C||!ws(C))return{info:{error:Bo(k.Selection_is_not_a_valid_type_node)},affectedTextRange:void 0};const b=t.program.getTypeChecker(),T=cFt(C,h);if(T===void 0)return{info:{error:Bo(k.No_type_could_be_extracted_from_this_type_node)},affectedTextRange:void 0};const E=lFt(C,T);if(!ws(E))return{info:{error:Bo(k.Selection_is_not_a_valid_type_node)},affectedTextRange:void 0};const N=[];(fx(E.parent)||zP(E.parent))&&p.end>C.end&&Sr(N,E.parent.types.filter(q=>gZ(q,a,p.pos,p.end)));const R=N.length>1?N:E,{typeParameters:F,affectedTextRange:H}=rFt(b,R,T,a);if(!F)return{info:{error:Bo(k.No_type_could_be_extracted_from_this_type_node)},affectedTextRange:void 0};const U=qhe(b,R);return{info:{isJS:h,selection:R,enclosingNode:T,typeParameters:F,typeElements:U},affectedTextRange:H}}function nFt(t,r,a,u){const h=[()=>Rs(t,r),()=>Q3(t,r,()=>!0)];for(const p of h){const g=p(),C=gZ(g,t,a.pos,a.end),b=Qi(g,T=>T.parent&&ws(T)&&!wD(a,T.parent,t)&&(u||C));if(b)return b}}function qhe(t,r){if(r){if(Ao(r)){const a=[];for(const u of r){const h=qhe(t,u);if(!h)return;Sr(a,h)}return a}if(zP(r)){const a=[],u=new Map;for(const h of r.types){const p=qhe(t,h);if(!p||!p.every(g=>g.name&&Pg(u,yj(g.name))))return;Sr(a,p)}return a}else{if(EI(r))return qhe(t,r.type);if(a_(r))return r.members}}}function wD(t,r,a){return fj(t,Va(a.text,r.pos),r.end)}function rFt(t,r,a,u){const h=[],p=JL(r),g={pos:p[0].getStart(u),end:p[p.length-1].end};for(const b of p)if(C(b))return{typeParameters:void 0,affectedTextRange:void 0};return{typeParameters:h,affectedTextRange:g};function C(b){if(qp(b)){if(ot(b.typeName)){const T=b.typeName,E=t.resolveName(T.text,T,262144,!0);for(const N of(E==null?void 0:E.declarations)||w)if($l(N)&&N.getSourceFile()===u){if(N.name.escapedText===T.escapedText&&wD(N,g,u))return!0;if(wD(a,N,u)&&!wD(g,N,u)){mu(h,N);break}}}}else if(DI(b)){const T=Qi(b,E=>iD(E)&&wD(E.extendsType,b,u));if(!T||!wD(g,T,u))return!0}else if(HP(b)||C3(b)){const T=Qi(b.parent,Ho);if(T&&T.type&&wD(T.type,b,u)&&!wD(g,T,u))return!0}else if(tD(b)){if(ot(b.exprName)){const T=t.resolveName(b.exprName.text,b.exprName,111551,!1);if(T!=null&&T.valueDeclaration&&wD(a,T.valueDeclaration,u)&&!wD(g,T.valueDeclaration,u))return!0}else if(ix(b.exprName.left)&&!wD(g,b.parent,u))return!0}return u&&jP(b)&&Ia(u,b.pos).line===Ia(u,b.end).line&&tr(b,1),Uo(b,C)}}function sFt(t,r,a,u){const{enclosingNode:h,typeParameters:p}=u,{firstTypeNode:g,lastTypeNode:C,newTypeNode:b}=k4e(u),T=G.createTypeAliasDeclaration(void 0,a,p.map(E=>G.updateTypeParameterDeclaration(E,E.modifiers,E.name,E.constraint,void 0)),b);t.insertNodeBefore(r,h,ole(T),!0),t.replaceNodeRange(r,g,C,G.createTypeReferenceNode(a,p.map(E=>G.createTypeReferenceNode(E.name,void 0))),{leadingTriviaOption:er.LeadingTriviaOption.Exclude,trailingTriviaOption:er.TrailingTriviaOption.ExcludeWhitespace})}function oFt(t,r,a,u){var h;const{enclosingNode:p,typeParameters:g,typeElements:C}=u,b=G.createInterfaceDeclaration(void 0,a,g,void 0,C);Ht(b,(h=C[0])==null?void 0:h.parent),t.insertNodeBefore(r,p,ole(b),!0);const{firstTypeNode:T,lastTypeNode:E}=k4e(u);t.replaceNodeRange(r,T,E,G.createTypeReferenceNode(a,g.map(N=>G.createTypeReferenceNode(N.name,void 0))),{leadingTriviaOption:er.LeadingTriviaOption.Exclude,trailingTriviaOption:er.TrailingTriviaOption.ExcludeWhitespace})}function aFt(t,r,a,u,h){var p;JL(h.selection).forEach(H=>{tr(H,7168)});const{enclosingNode:g,typeParameters:C}=h,{firstTypeNode:b,lastTypeNode:T,newTypeNode:E}=k4e(h),N=G.createJSDocTypedefTag(G.createIdentifier("typedef"),G.createJSDocTypeExpression(E),G.createIdentifier(u)),R=[];O(C,H=>{const U=R6(H),q=G.createTypeParameterDeclaration(void 0,H.name),X=G.createJSDocTemplateTag(G.createIdentifier("template"),U&&ha(U,o2),[q]);R.push(X)});const F=G.createJSDocComment(void 0,G.createNodeArray(Js(R,[N])));if(z0(g)){const H=g.getStart(a),U=rC(r.host,(p=r.formatContext)==null?void 0:p.options);t.insertNodeAt(a,g.getStart(a),F,{suffix:U+U+a.text.slice(OZ(a.text,H-1),H)})}else t.insertNodeBefore(a,g,F,!0);t.replaceNodeRange(a,b,T,G.createTypeReferenceNode(u,C.map(H=>G.createTypeReferenceNode(H.name,void 0))))}function k4e(t){return Ao(t.selection)?{firstTypeNode:t.selection[0],lastTypeNode:t.selection[t.selection.length-1],newTypeNode:fx(t.selection[0].parent)?G.createUnionTypeNode(t.selection):G.createIntersectionTypeNode(t.selection)}:{firstTypeNode:t.selection,lastTypeNode:t.selection,newTypeNode:t.selection}}function cFt(t,r){return Qi(t,Ps)||(r?Qi(t,z0):void 0)}function lFt(t,r){return Qi(t,a=>a===r?"quit":!!(fx(a.parent)||zP(a.parent)))??t}var $he="Move to file",T4e=Bo(k.Move_to_file),D4e={name:"Move to file",description:T4e,kind:"refactor.move.file"};Qv($he,{kinds:[D4e.kind],getAvailableActions:function(r,a){const u=r.file,h=Rj(r);if(!a)return w;if(r.triggerReason==="implicit"&&r.endPosition!==void 0){const p=Qi(Rs(u,r.startPosition),hA),g=Qi(Rs(u,r.endPosition),hA);if(p&&!Os(p)&&g&&!Os(g))return w}if(r.preferences.allowTextChangesInNewFiles&&h){const p={start:{line:Ia(u,h.all[0].getStart(u)).line,offset:Ia(u,h.all[0].getStart(u)).character},end:{line:Ia(u,va(h.all).end).line,offset:Ia(u,va(h.all).end).character}};return[{name:$he,description:T4e,actions:[{...D4e,range:p}]}]}return r.preferences.provideRefactorNotApplicableReason?[{name:$he,description:T4e,actions:[{...D4e,notApplicableReason:Bo(k.Selection_is_not_a_valid_statement_or_statements)}]}]:w},getEditsForAction:function(r,a,u){j.assert(a===$he,"Wrong refactor invoked");const h=j.checkDefined(Rj(r)),{host:p,program:g}=r;j.assert(u,"No interactive refactor arguments available");const C=u.targetFile;return Uv(C)||IP(C)?p.fileExists(C)&&g.getSourceFile(C)===void 0?znt(Bo(k.Cannot_move_statements_to_the_selected_file)):{edits:er.ChangeTracker.with(r,T=>uFt(r,r.file,u.targetFile,r.program,h,T,r.host,r.preferences)),renameFilename:void 0,renameLocation:void 0}:znt(Bo(k.Cannot_move_to_file_selected_file_is_invalid))}});function znt(t){return{edits:[],renameFilename:void 0,renameLocation:void 0,notApplicableReason:t}}function uFt(t,r,a,u,h,p,g,C){const b=u.getTypeChecker(),T=!g.fileExists(a),E=T?GZ(a,r.externalModuleIndicator?99:r.commonJsModuleIndicator?1:void 0,u,g):j.checkDefined(u.getSourceFile(a)),N=wh.createImportAdder(r,t.program,t.preferences,t.host),R=wh.createImportAdder(E,t.program,t.preferences,t.host);E4e(r,E,iY(r,h.all,b,T?void 0:B4e(E,h.all,b)),p,h,u,g,C,R,N),T&&I4e(u,p,r.fileName,a,hS(g))}function E4e(t,r,a,u,h,p,g,C,b,T){const E=p.getTypeChecker(),N=roe(t.statements,I1),R=!vhe(r.fileName,p,g,!!t.commonJsModuleIndicator),F=$p(t,C);L4e(a.oldFileImportsFromTargetFile,r.fileName,T,p),fFt(t,h.all,a.unusedImportsFromOldFile,T),T.writeFixes(u,F),dFt(t,h.ranges,u),hFt(u,p,g,t,a.movedSymbols,r.fileName,F),N4e(t,a.targetFileImportsFromOldFile,u,R),V4e(t,a.oldImportsNeededByTargetFile,a.targetFileImportsFromOldFile,E,p,b),!Fy(r)&&N.length&&u.insertStatementsInNewFile(r.fileName,N,t),b.writeFixes(u,F);const H=vFt(t,h.all,as(a.oldFileImportsFromTargetFile.keys()),R);Fy(r)&&r.statements.length>0?RFt(u,p,H,r,h):Fy(r)?u.insertNodesAtEndOfFile(r,H,!1):u.insertStatementsInNewFile(r.fileName,b.hasFixes()?[4,...H]:H,t)}function I4e(t,r,a,u,h){const p=t.getCompilerOptions().configFile;if(!p)return;const g=ca(zr(a,"..",u)),C=o8(p.fileName,g,h),b=p.statements[0]&&Jr(p.statements[0].expression,Aa),T=b&&Fe(b.properties,E=>_d(E)&&Ha(E.name)&&E.name.text==="files");T&&jf(T.initializer)&&r.insertNodeInListAfter(p,va(T.initializer.elements),G.createStringLiteral(C),T.initializer.elements)}function dFt(t,r,a){for(const{first:u,afterLast:h}of r)a.deleteNodeRangeExcludingEnd(t,u,h)}function fFt(t,r,a,u){for(const h of t.statements)Yt(r,h)||qnt(h,p=>{$nt(p,g=>{a.has(g.symbol)&&u.removeExistingImport(g)})})}function N4e(t,r,a,u){const h=Z3();r.forEach((p,g)=>{if(g.declarations)for(const C of g.declarations){if(!F4e(C))continue;const b=DFt(C);if(!b)continue;const T=Xnt(C);h(T)&&EFt(t,T,b,a,u)}})}function hFt(t,r,a,u,h,p,g){const C=r.getTypeChecker();for(const b of r.getSourceFiles())if(b!==u)for(const T of b.statements)qnt(T,E=>{if(C.getSymbolAtLocation(gFt(E))!==u.symbol)return;const N=q=>{const X=ec(q.parent)?PZ(C,q.parent):Vf(C.getSymbolAtLocation(q),C);return!!X&&h.has(X)};bFt(b,E,t,N);const R=Ok(ts(wo(u.fileName,r.getCurrentDirectory())),p);if(E6(!r.useCaseSensitiveFileNames())(R,b.fileName)===0)return;const F=wS.getModuleSpecifier(r.getCompilerOptions(),b,b.fileName,R,dA(r,a)),H=xFt(E,l5(F,g),N);H&&t.insertNodeAfter(b,T,H);const U=_Ft(E);U&&pFt(t,b,C,h,F,U,E,g)})}function _Ft(t){switch(t.kind){case 272:return t.importClause&&t.importClause.namedBindings&&t.importClause.namedBindings.kind===274?t.importClause.namedBindings.name:void 0;case 271:return t.name;case 260:return Jr(t.name,ot);default:return j.assertNever(t,`Unexpected node kind ${t.kind}`)}}function pFt(t,r,a,u,h,p,g,C){const b=Ij(h,99);let T=!1;const E=[];if(kl.Core.eachSymbolReferenceInFile(p,a,r,N=>{Nr(N.parent)&&(T=T||!!a.resolveName(b,N,-1,!0),u.has(a.getSymbolAtLocation(N.parent.name))&&E.push(N))}),E.length){const N=T?$I(b,r):b;for(const R of E)t.replaceNode(r,R,G.createIdentifier(N));t.insertNodeAfter(r,g,mFt(g,b,h,C))}}function mFt(t,r,a,u){const h=G.createIdentifier(r),p=l5(a,u);switch(t.kind){case 272:return G.createImportDeclaration(void 0,G.createImportClause(!1,void 0,G.createNamespaceImport(h)),p,void 0);case 271:return G.createImportEqualsDeclaration(void 0,!1,h,G.createExternalModuleReference(p));case 260:return G.createVariableDeclaration(h,void 0,void 0,Unt(p));default:return j.assertNever(t,`Unexpected node kind ${t.kind}`)}}function Unt(t){return G.createCallExpression(G.createIdentifier("require"),void 0,[t])}function gFt(t){return t.kind===272?t.moduleSpecifier:t.kind===271?t.moduleReference.expression:t.initializer.arguments[0]}function qnt(t,r){if(du(t))Ha(t.moduleSpecifier)&&r(t);else if(Wd(t))eC(t.moduleReference)&&Bc(t.moduleReference.expression)&&r(t);else if(Lu(t))for(const a of t.declarationList.declarations)a.initializer&&L_(a.initializer,!0)&&r(a)}function $nt(t,r){var a,u,h,p,g;if(t.kind===272){if((a=t.importClause)!=null&&a.name&&r(t.importClause),((h=(u=t.importClause)==null?void 0:u.namedBindings)==null?void 0:h.kind)===274&&r(t.importClause.namedBindings),((g=(p=t.importClause)==null?void 0:p.namedBindings)==null?void 0:g.kind)===275)for(const C of t.importClause.namedBindings.elements)r(C)}else if(t.kind===271)r(t);else if(t.kind===260){if(t.name.kind===80)r(t);else if(t.name.kind===206)for(const C of t.name.elements)ot(C.name)&&r(C)}}function L4e(t,r,a,u){for(const[h,p]of t){const g=zZ(h,Ja(u.getCompilerOptions())),C=h.name==="default"&&h.parent?1:0;a.addImportForNonExistentExport(g,r,C,h.flags,p)}}function yFt(t,r,a,u=2){return G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(t,void 0,r,a)],u))}function vFt(t,r,a,u){return Rr(r,h=>{if(Gnt(h)&&!Jnt(t,h,u)&&R4e(h,p=>{var g;return a.includes(j.checkDefined((g=Jr(p,M0))==null?void 0:g.symbol))})){const p=CFt(Ec(h),u);if(p)return p}return Ec(h)})}function Jnt(t,r,a,u){var h;return a?!uf(r)&&Zr(r,32)||!!(u&&t.symbol&&((h=t.symbol.exports)!=null&&h.has(u.escapedText))):!!t.symbol&&!!t.symbol.exports&&P4e(r).some(p=>t.symbol.exports.has(cu(p)))}function bFt(t,r,a,u){if(r.kind===272&&r.importClause){const{name:h,namedBindings:p}=r.importClause;if((!h||u(h))&&(!p||p.kind===275&&p.elements.length!==0&&p.elements.every(g=>u(g.name))))return a.delete(t,r)}$nt(r,h=>{h.name&&ot(h.name)&&u(h.name)&&a.delete(t,h)})}function Gnt(t){return j.assert(Os(t.parent),"Node parent should be a SourceFile"),ert(t)||Lu(t)}function CFt(t,r){return r?[SFt(t)]:wFt(t)}function SFt(t){const r=Fg(t)?Js([G.createModifier(95)],PT(t)):void 0;switch(t.kind){case 262:return G.updateFunctionDeclaration(t,r,t.asteriskToken,t.name,t.typeParameters,t.parameters,t.type,t.body);case 263:const a=uD(t)?$w(t):void 0;return G.updateClassDeclaration(t,Js(a,r),t.name,t.typeParameters,t.heritageClauses,t.members);case 243:return G.updateVariableStatement(t,r,t.declarationList);case 267:return G.updateModuleDeclaration(t,r,t.name,t.body);case 266:return G.updateEnumDeclaration(t,r,t.name,t.members);case 265:return G.updateTypeAliasDeclaration(t,r,t.name,t.typeParameters,t.type);case 264:return G.updateInterfaceDeclaration(t,r,t.name,t.typeParameters,t.heritageClauses,t.members);case 271:return G.updateImportEqualsDeclaration(t,r,t.isTypeOnly,t.name,t.moduleReference);case 244:return j.fail();default:return j.assertNever(t,`Unexpected declaration kind ${t.kind}`)}}function wFt(t){return[t,...P4e(t).map(Knt)]}function Knt(t){return G.createExpressionStatement(G.createBinaryExpression(G.createPropertyAccessExpression(G.createIdentifier("exports"),G.createIdentifier(t)),64,G.createIdentifier(t)))}function P4e(t){switch(t.kind){case 262:case 263:return[t.name.text];case 243:return es(t.declarationList.declarations,r=>ot(r.name)?r.name.text:void 0);case 267:case 266:case 265:case 264:case 271:return w;case 244:return j.fail("Can't export an ExpressionStatement");default:return j.assertNever(t,`Unexpected decl kind ${t.kind}`)}}function xFt(t,r,a){switch(t.kind){case 272:{const u=t.importClause;if(!u)return;const h=u.name&&a(u.name)?u.name:void 0,p=u.namedBindings&&kFt(u.namedBindings,a);return h||p?G.createImportDeclaration(void 0,G.createImportClause(u.isTypeOnly,h,p),Ec(r),void 0):void 0}case 271:return a(t.name)?t:void 0;case 260:{const u=TFt(t.name,a);return u?yFt(u,t.type,Unt(r),t.parent.flags):void 0}default:return j.assertNever(t,`Unexpected import kind ${t.kind}`)}}function kFt(t,r){if(t.kind===274)return r(t.name)?t:void 0;{const a=t.elements.filter(u=>r(u.name));return a.length?G.createNamedImports(a):void 0}}function TFt(t,r){switch(t.kind){case 80:return r(t)?t:void 0;case 207:return t;case 206:{const a=t.elements.filter(u=>u.propertyName||!ot(u.name)||r(u.name));return a.length?G.createObjectBindingPattern(a):void 0}}}function DFt(t){return uf(t)?Jr(t.expression.left.name,ot):Jr(t.name,ot)}function Xnt(t){switch(t.kind){case 260:return t.parent.parent;case 208:return Xnt(ha(t.parent.parent,r=>_s(r)||ec(r)));default:return t}}function EFt(t,r,a,u,h){if(!Jnt(t,r,h,a))if(h)uf(r)||u.insertExportModifier(t,r);else{const p=P4e(r);p.length!==0&&u.insertNodesAfter(t,r,p.map(Knt))}}function A4e(t,r,a,u){const h=r.getTypeChecker();if(u){const p=iY(t,u.all,h),g=ts(t.fileName),C=i7(t.fileName);return zr(g,AFt(OFt(p.oldFileImportsFromTargetFile,p.movedSymbols),C,g,a))+C}return""}function IFt(t){const{file:r}=t,a=TZ(fA(t)),{statements:u}=r;let h=ct(u,T=>T.end>a.pos);if(h===-1)return;const p=u[h],g=trt(r,p);g&&(h=g.start);let C=ct(u,T=>T.end>=a.end,h);C!==-1&&a.end<=u[C].getStart()&&C--;const b=trt(r,u[C]);return b&&(C=b.end),{toMove:u.slice(h,C===-1?u.length:C+1),afterLast:C===-1?void 0:u[C+1]}}function Rj(t){const r=IFt(t);if(r===void 0)return;const a=[],u=[],{toMove:h,afterLast:p}=r;return Ey(h,NFt,(g,C)=>{for(let b=g;b<C;b++)a.push(h[b]);u.push({first:h[g],afterLast:p})}),a.length===0?void 0:{all:a,ranges:u}}function O4e(t){return Fe(t,r=>!!(r.transformFlags&2))}function NFt(t){return!LFt(t)&&!I1(t)}function LFt(t){switch(t.kind){case 272:return!0;case 271:return!Zr(t,32);case 243:return t.declarationList.declarations.every(r=>!!r.initializer&&L_(r.initializer,!0));default:return!1}}function iY(t,r,a,u=new Set,h){var p;const g=new Set,C=new Map,b=new Map,T=R(O4e(r));T&&C.set(T,[!1,Jr((p=T.declarations)==null?void 0:p[0],F=>l_(F)||H0(F)||Jv(F)||Wd(F)||ec(F)||_s(F))]);for(const F of r)R4e(F,H=>{g.add(j.checkDefined(uf(H)?a.getSymbolAtLocation(H.expression.left):H.symbol,"Need a symbol here"))});const E=new Set;for(const F of r)M4e(F,a,h,(H,U)=>{if(!(!H.declarations||PFt(a,H))){if(u.has(Vf(H,a))){E.add(H);return}for(const q of H.declarations)if(Qnt(q)){const X=C.get(H);C.set(H,[(X===void 0||X)&&U,Jr(q,Z=>l_(Z)||H0(Z)||Jv(Z)||Wd(Z)||ec(Z)||_s(Z))])}else F4e(q)&&MFt(q)===t&&!g.has(H)&&b.set(H,U)}});for(const F of C.keys())E.add(F);const N=new Map;for(const F of t.statements)Yt(r,F)||(T&&F.transformFlags&2&&E.delete(T),M4e(F,a,h,(H,U)=>{g.has(H)&&N.set(H,U),E.delete(H)}));return{movedSymbols:g,targetFileImportsFromOldFile:b,oldFileImportsFromTargetFile:N,oldImportsNeededByTargetFile:C,unusedImportsFromOldFile:E};function R(F){if(F===void 0)return;const H=a.getJsxNamespace(F),U=a.resolveName(H,F,1920,!0);return U&&Ft(U.declarations,Qnt)?U:void 0}}function PFt(t,r){return!!t.resolveName(r.name,void 0,788968,!1)}function AFt(t,r,a,u){let h=t;for(let p=1;;p++){const g=zr(a,h+r);if(!u.fileExists(g))return h;h=`${t}.${p}`}}function OFt(t,r){return qb(t,Jfe)||qb(r,Jfe)||"newFile"}function M4e(t,r,a,u){t.forEachChild(function h(p){if(ot(p)&&!Wy(p)){if(a&&!Ip(a,p))return;const g=r.getSymbolAtLocation(p);g&&u(g,Yk(p))}else p.forEachChild(h)})}function R4e(t,r){switch(t.kind){case 262:case 263:case 267:case 266:case 265:case 264:case 271:return r(t);case 243:return J(t.declarationList.declarations,a=>Ynt(a.name,r));case 244:{const{expression:a}=t;return ur(a)&&Bu(a)===1?r(t):void 0}}}function Qnt(t){switch(t.kind){case 271:case 276:case 273:case 274:return!0;case 260:return Znt(t);case 208:return _s(t.parent.parent)&&Znt(t.parent.parent);default:return!1}}function Znt(t){return Os(t.parent.parent.parent)&&!!t.initializer&&L_(t.initializer,!0)}function F4e(t){return ert(t)&&Os(t.parent)||_s(t)&&Os(t.parent.parent.parent)}function MFt(t){return _s(t)?t.parent.parent.parent:t.parent}function Ynt(t,r){switch(t.kind){case 80:return r(ha(t.parent,a=>_s(a)||ec(a)));case 207:case 206:return J(t.elements,a=>Bd(a)?void 0:Ynt(a.name,r));default:return j.assertNever(t,`Unexpected name kind ${t.kind}`)}}function ert(t){switch(t.kind){case 262:case 263:case 267:case 266:case 265:case 264:case 271:return!0;default:return!1}}function RFt(t,r,a,u,h){var p;const g=new Set,C=(p=u.symbol)==null?void 0:p.exports;if(C){const T=r.getTypeChecker(),E=new Map;for(const N of h.all)Gnt(N)&&Zr(N,32)&&R4e(N,R=>{var F;const H=M0(R)?(F=C.get(R.symbol.escapedName))==null?void 0:F.declarations:void 0,U=J(H,q=>Ju(q)?q:vh(q)?Jr(q.parent.parent,Ju):void 0);U&&U.moduleSpecifier&&E.set(U,(E.get(U)||new Set).add(R))});for(const[N,R]of as(E))if(N.exportClause&&Xm(N.exportClause)&&P(N.exportClause.elements)){const F=N.exportClause.elements,H=$t(F,U=>Fe(Vf(U.symbol,T).declarations,q=>F4e(q)&&R.has(q))===void 0);if(P(H)===0){t.deleteNode(u,N),g.add(N);continue}P(H)<P(F)&&t.replaceNode(u,N,G.updateExportDeclaration(N,N.modifiers,N.isTypeOnly,G.updateNamedExports(N.exportClause,G.createNodeArray(H,F.hasTrailingComma)),N.moduleSpecifier,N.attributes))}}const b=rt(u.statements,T=>Ju(T)&&!!T.moduleSpecifier&&!g.has(T));b?t.insertNodesBefore(u,b,a,!0):t.insertNodesAfter(u,u.statements[u.statements.length-1],a)}function trt(t,r){if(Qc(r)){const a=r.symbol.declarations;if(a===void 0||P(a)<=1||!Yt(a,r))return;const u=a[0],h=a[P(a)-1],p=es(a,b=>_n(b)===t&&Ps(b)?b:void 0),g=ct(t.statements,b=>b.end>=h.end),C=ct(t.statements,b=>b.end>=u.end);return{toMove:p,start:C,end:g}}}function B4e(t,r,a){const u=new Set;for(const h of t.imports){const p=O8(h);if(du(p)&&p.importClause&&p.importClause.namedBindings&&j1(p.importClause.namedBindings))for(const g of p.importClause.namedBindings.elements){const C=a.getSymbolAtLocation(g.propertyName||g.name);C&&u.add(Vf(C,a))}if(fV(p.parent)&&dm(p.parent.name))for(const g of p.parent.name.elements){const C=a.getSymbolAtLocation(g.propertyName||g.name);C&&u.add(Vf(C,a))}}for(const h of r)M4e(h,a,void 0,p=>{const g=Vf(p,a);g.valueDeclaration&&_n(g.valueDeclaration).path===t.path&&u.add(g)});return u}function sC(t){return t.error!==void 0}function v2(t,r){return r?t.substr(0,r.length)===r:!0}function W4e(t,r,a,u){return Nr(t)&&!ss(r)&&!a.resolveName(t.name.text,t,111551,!1)&&!Vs(t.name)&&!aI(t.name)?t.name.text:$I(ss(r)?"newProperty":"newLocal",u)}function V4e(t,r,a,u,h,p){r.forEach(([g,C],b)=>{var T;const E=Vf(b,u);u.isUnknownSymbol(E)?p.addVerbatimImport(j.checkDefined(C??Qi((T=b.declarations)==null?void 0:T[0],iTe))):p.addImportFromExportedSymbol(E,g,C)}),L4e(a,t.fileName,p,h)}var nY="Inline variable",H4e=Bo(k.Inline_variable),j4e={name:nY,description:H4e,kind:"refactor.inline.variable"};Qv(nY,{kinds:[j4e.kind],getAvailableActions(t){const{file:r,program:a,preferences:u,startPosition:h,triggerReason:p}=t,g=irt(r,h,p==="invoked",a);return g?pA.isRefactorErrorInfo(g)?u.provideRefactorNotApplicableReason?[{name:nY,description:H4e,actions:[{...j4e,notApplicableReason:g.error}]}]:w:[{name:nY,description:H4e,actions:[j4e]}]:w},getEditsForAction(t,r){j.assert(r===nY,"Unexpected refactor invoked");const{file:a,program:u,startPosition:h}=t,p=irt(a,h,!0,u);if(!p||pA.isRefactorErrorInfo(p))return;const{references:g,declaration:C,replacement:b}=p;return{edits:er.ChangeTracker.with(t,E=>{for(const N of g){const R=Ha(b)&&ot(N)&&By(N.parent);R&&w3(R)&&!i2(R.parent.parent)?BFt(E,a,R,b):E.replaceNode(a,N,FFt(N,b))}E.delete(a,C)})}}});function irt(t,r,a,u){var h,p;const g=u.getTypeChecker(),C=R_(t,r),b=C.parent;if(ot(C)){if(UV(b)&&E8(b)&&ot(b.name)){if(((h=g.getMergedSymbol(b.symbol).declarations)==null?void 0:h.length)!==1)return{error:Bo(k.Variables_with_multiple_declarations_cannot_be_inlined)};if(nrt(b))return;const T=rrt(b,g,t);return T&&{references:T,declaration:b,replacement:b.initializer}}if(a){let T=g.resolveName(C.text,C,111551,!1);if(T=T&&g.getMergedSymbol(T),((p=T==null?void 0:T.declarations)==null?void 0:p.length)!==1)return{error:Bo(k.Variables_with_multiple_declarations_cannot_be_inlined)};const E=T.declarations[0];if(!UV(E)||!E8(E)||!ot(E.name)||nrt(E))return;const N=rrt(E,g,t);return N&&{references:N,declaration:E,replacement:E.initializer}}return{error:Bo(k.Could_not_find_variable_to_inline)}}}function nrt(t){const r=ha(t.parent.parent,Lu);return Ft(r.modifiers,BP)}function rrt(t,r,a){const u=[],h=kl.Core.eachSymbolReferenceInFile(t.name,r,a,p=>{if(kl.isWriteAccessForReference(p)&&!lh(p.parent)||vh(p.parent)||Il(p.parent)||tD(p.parent)||NW(t,p.pos))return!0;u.push(p)});return u.length===0||h?void 0:u}function FFt(t,r){r=Ec(r);const{parent:a}=t;return jt(a)&&(H8(r)<H8(a)||MZ(a))||Ho(r)&&(MT(a)||Nr(a))||Nr(a)&&(A_(r)||Aa(r))?G.createParenthesizedExpression(r):ot(t)&&lh(a)?G.createPropertyAssignment(t,r):r}function BFt(t,r,a,u){const h=a.parent,p=h.templateSpans.indexOf(a),g=p===0?h.head:h.templateSpans[p-1];t.replaceRangeWithText(r,{pos:g.getEnd()-2,end:a.literal.getStart()+1},u.text.replace(/\\/g,"\\\\").replace(/`/g,"\\`"))}var rY="Move to a new file",z4e=Bo(k.Move_to_a_new_file),U4e={name:rY,description:z4e,kind:"refactor.move.newFile"};Qv(rY,{kinds:[U4e.kind],getAvailableActions:function(r){const a=Rj(r),u=r.file;if(r.triggerReason==="implicit"&&r.endPosition!==void 0){const h=Qi(Rs(u,r.startPosition),hA),p=Qi(Rs(u,r.endPosition),hA);if(h&&!Os(h)&&p&&!Os(p))return w}if(r.preferences.allowTextChangesInNewFiles&&a){const h=r.file,p={start:{line:Ia(h,a.all[0].getStart(h)).line,offset:Ia(h,a.all[0].getStart(h)).character},end:{line:Ia(h,va(a.all).end).line,offset:Ia(h,va(a.all).end).character}};return[{name:rY,description:z4e,actions:[{...U4e,range:p}]}]}return r.preferences.provideRefactorNotApplicableReason?[{name:rY,description:z4e,actions:[{...U4e,notApplicableReason:Bo(k.Selection_is_not_a_valid_statement_or_statements)}]}]:w},getEditsForAction:function(r,a){j.assert(a===rY,"Wrong refactor invoked");const u=j.checkDefined(Rj(r));return{edits:er.ChangeTracker.with(r,p=>WFt(r.file,r.program,u,p,r.host,r,r.preferences)),renameFilename:void 0,renameLocation:void 0}}});function WFt(t,r,a,u,h,p,g){const C=r.getTypeChecker(),b=iY(t,a.all,C),T=A4e(t,r,h,a),E=GZ(T,t.externalModuleIndicator?99:t.commonJsModuleIndicator?1:void 0,r,h),N=wh.createImportAdder(t,p.program,p.preferences,p.host),R=wh.createImportAdder(E,p.program,p.preferences,p.host);E4e(t,E,b,u,a,r,h,g,R,N),I4e(r,u,t.fileName,T,hS(h))}var VFt={},q4e="Convert overload list to single signature",srt=Bo(k.Convert_overload_list_to_single_signature),ort={name:q4e,description:srt,kind:"refactor.rewrite.function.overloadList"};Qv(q4e,{kinds:[ort.kind],getEditsForAction:jFt,getAvailableActions:HFt});function HFt(t){const{file:r,startPosition:a,program:u}=t;return crt(r,a,u)?[{name:q4e,description:srt,actions:[ort]}]:w}function jFt(t){const{file:r,startPosition:a,program:u}=t,h=crt(r,a,u);if(!h)return;const p=u.getTypeChecker(),g=h[h.length-1];let C=g;switch(g.kind){case 173:{C=G.updateMethodSignature(g,g.modifiers,g.name,g.questionToken,g.typeParameters,T(h),g.type);break}case 174:{C=G.updateMethodDeclaration(g,g.modifiers,g.asteriskToken,g.name,g.questionToken,g.typeParameters,T(h),g.type,g.body);break}case 179:{C=G.updateCallSignature(g,g.typeParameters,T(h),g.type);break}case 176:{C=G.updateConstructorDeclaration(g,g.modifiers,T(h),g.body);break}case 180:{C=G.updateConstructSignature(g,g.typeParameters,T(h),g.type);break}case 262:{C=G.updateFunctionDeclaration(g,g.modifiers,g.asteriskToken,g.name,g.typeParameters,T(h),g.type,g.body);break}default:return j.failBadSyntaxKind(g,"Unhandled signature kind in overload list conversion refactoring")}if(C===g)return;return{renameFilename:void 0,renameLocation:void 0,edits:er.ChangeTracker.with(t,R=>{R.replaceNodeRange(r,h[0],h[h.length-1],C)})};function T(R){const F=R[R.length-1];return Qc(F)&&F.body&&(R=R.slice(0,R.length-1)),G.createNodeArray([G.createParameterDeclaration(void 0,G.createToken(26),"args",void 0,G.createUnionTypeNode(qt(R,E)))])}function E(R){const F=qt(R.parameters,N);return tr(G.createTupleTypeNode(F),Ft(F,H=>!!P(y3(H)))?0:1)}function N(R){j.assert(ot(R.name));const F=Ht(G.createNamedTupleMember(R.dotDotDotToken,R.name,R.questionToken,R.type||G.createKeywordTypeNode(133)),R),H=R.symbol&&R.symbol.getDocumentationComment(p);if(H){const U=Wj(H);U.length&&e2(F,[{text:`*
+${U.split(`
+`).map(q=>` * ${q}`).join(`
+`)}
+ `,kind:3,pos:-1,end:-1,hasTrailingNewLine:!0,hasLeadingNewline:!0}])}return F}}function art(t){switch(t.kind){case 173:case 174:case 179:case 176:case 180:case 262:return!0}return!1}function crt(t,r,a){const u=Rs(t,r),h=Qi(u,art);if(!h||Qc(h)&&h.body&&s5(h.body,r))return;const p=a.getTypeChecker(),g=h.symbol;if(!g)return;const C=g.declarations;if(P(C)<=1||!Ce(C,R=>_n(R)===t)||!art(C[0]))return;const b=C[0].kind;if(!Ce(C,R=>R.kind===b))return;const T=C;if(Ft(T,R=>!!R.typeParameters||Ft(R.parameters,F=>!!F.modifiers||!ot(F.name))))return;const E=es(T,R=>p.getSignatureFromDeclaration(R));if(P(E)!==P(C))return;const N=p.getReturnTypeOfSignature(E[0]);if(Ce(E,R=>p.getReturnTypeOfSignature(R)===N))return T}var $4e="Add or remove braces in an arrow function",lrt=Bo(k.Add_or_remove_braces_in_an_arrow_function),Jhe={name:"Add braces to arrow function",description:Bo(k.Add_braces_to_arrow_function),kind:"refactor.rewrite.arrow.braces.add"},sY={name:"Remove braces from arrow function",description:Bo(k.Remove_braces_from_arrow_function),kind:"refactor.rewrite.arrow.braces.remove"};Qv($4e,{kinds:[sY.kind],getEditsForAction:UFt,getAvailableActions:zFt});function zFt(t){const{file:r,startPosition:a,triggerReason:u}=t,h=urt(r,a,u==="invoked");return h?sC(h)?t.preferences.provideRefactorNotApplicableReason?[{name:$4e,description:lrt,actions:[{...Jhe,notApplicableReason:h.error},{...sY,notApplicableReason:h.error}]}]:w:[{name:$4e,description:lrt,actions:[h.addBraces?Jhe:sY]}]:w}function UFt(t,r){const{file:a,startPosition:u}=t,h=urt(a,u);j.assert(h&&!sC(h),"Expected applicable refactor info");const{expression:p,returnStatement:g,func:C}=h;let b;if(r===Jhe.name){const E=G.createReturnStatement(p);b=G.createBlock([E],!0),iO(p,E,a,3,!0)}else if(r===sY.name&&g){const E=p||G.createVoidZero();b=MZ(E)?G.createParenthesizedExpression(E):E,xj(g,b,a,3,!1),iO(g,b,a,3,!1),h5(g,b,a,3,!1)}else j.fail("invalid action");return{renameFilename:void 0,renameLocation:void 0,edits:er.ChangeTracker.with(t,E=>{E.replaceNode(a,C.body,b)})}}function urt(t,r,a=!0,u){const h=Rs(t,r),p=Up(h);if(!p)return{error:Bo(k.Could_not_find_a_containing_arrow_function)};if(!xl(p))return{error:Bo(k.Containing_function_is_not_an_arrow_function)};if(!(!Ip(p,h)||Ip(p.body,h)&&!a)){if(v2(Jhe.kind,u)&&jt(p.body))return{func:p,addBraces:!0,expression:p.body};if(v2(sY.kind,u)&&Xo(p.body)&&p.body.statements.length===1){const g=ya(p.body.statements);if(Og(g)){const C=g.expression&&Aa(d3(g.expression,!1))?G.createParenthesizedExpression(g.expression):g.expression;return{func:p,addBraces:!1,expression:C,returnStatement:g}}}}}var qFt={},drt="Convert arrow function or function expression",$Ft=Bo(k.Convert_arrow_function_or_function_expression),oY={name:"Convert to anonymous function",description:Bo(k.Convert_to_anonymous_function),kind:"refactor.rewrite.function.anonymous"},aY={name:"Convert to named function",description:Bo(k.Convert_to_named_function),kind:"refactor.rewrite.function.named"},cY={name:"Convert to arrow function",description:Bo(k.Convert_to_arrow_function),kind:"refactor.rewrite.function.arrow"};Qv(drt,{kinds:[oY.kind,aY.kind,cY.kind],getEditsForAction:GFt,getAvailableActions:JFt});function JFt(t){const{file:r,startPosition:a,program:u,kind:h}=t,p=hrt(r,a,u);if(!p)return w;const{selectedVariableDeclaration:g,func:C}=p,b=[],T=[];if(v2(aY.kind,h)){const E=g||xl(C)&&_s(C.parent)?void 0:Bo(k.Could_not_convert_to_named_function);E?T.push({...aY,notApplicableReason:E}):b.push(aY)}if(v2(oY.kind,h)){const E=!g&&xl(C)?void 0:Bo(k.Could_not_convert_to_anonymous_function);E?T.push({...oY,notApplicableReason:E}):b.push(oY)}if(v2(cY.kind,h)){const E=ml(C)?void 0:Bo(k.Could_not_convert_to_arrow_function);E?T.push({...cY,notApplicableReason:E}):b.push(cY)}return[{name:drt,description:$Ft,actions:b.length===0&&t.preferences.provideRefactorNotApplicableReason?T:b}]}function GFt(t,r){const{file:a,startPosition:u,program:h}=t,p=hrt(a,u,h);if(!p)return;const{func:g}=p,C=[];switch(r){case oY.name:C.push(...ZFt(t,g));break;case aY.name:const b=QFt(g);if(!b)return;C.push(...YFt(t,g,b));break;case cY.name:if(!ml(g))return;C.push(...e9t(t,g));break;default:return j.fail("invalid action")}return{renameFilename:void 0,renameLocation:void 0,edits:C}}function frt(t){let r=!1;return t.forEachChild(function a(u){if(X3(u)){r=!0;return}!ss(u)&&!Wu(u)&&!ml(u)&&Uo(u,a)}),r}function hrt(t,r,a){const u=Rs(t,r),h=a.getTypeChecker(),p=XFt(t,h,u.parent);if(p&&!frt(p.body)&&!h.containsArgumentsReference(p))return{selectedVariableDeclaration:!0,func:p};const g=Up(u);if(g&&(ml(g)||xl(g))&&!Ip(g.body,u)&&!frt(g.body)&&!h.containsArgumentsReference(g))return ml(g)&&prt(t,h,g)?void 0:{selectedVariableDeclaration:!1,func:g}}function KFt(t){return _s(t)||Sf(t)&&t.declarations.length===1}function XFt(t,r,a){if(!KFt(a))return;const h=(_s(a)?a:ya(a.declarations)).initializer;if(h&&(xl(h)||ml(h)&&!prt(t,r,h)))return h}function _rt(t){if(jt(t)){const r=G.createReturnStatement(t),a=t.getSourceFile();return Ht(r,t),Lp(r),xj(t,r,a,void 0,!0),G.createBlock([r],!0)}else return t}function QFt(t){const r=t.parent;if(!_s(r)||!E8(r))return;const a=r.parent,u=a.parent;if(!(!Sf(a)||!Lu(u)||!ot(r.name)))return{variableDeclaration:r,variableDeclarationList:a,statement:u,name:r.name}}function ZFt(t,r){const{file:a}=t,u=_rt(r.body),h=G.createFunctionExpression(r.modifiers,r.asteriskToken,void 0,r.typeParameters,r.parameters,r.type,u);return er.ChangeTracker.with(t,p=>p.replaceNode(a,r,h))}function YFt(t,r,a){const{file:u}=t,h=_rt(r.body),{variableDeclaration:p,variableDeclarationList:g,statement:C,name:b}=a;ohe(C);const T=Rk(p)&32|jh(r),E=G.createModifiersFromModifierFlags(T),N=G.createFunctionDeclaration(P(E)?E:void 0,r.asteriskToken,b,r.typeParameters,r.parameters,r.type,h);return g.declarations.length===1?er.ChangeTracker.with(t,R=>R.replaceNode(u,C,N)):er.ChangeTracker.with(t,R=>{R.delete(u,p),R.insertNodeAfter(u,C,N)})}function e9t(t,r){const{file:a}=t,h=r.body.statements[0];let p;t9t(r.body,h)?(p=h.expression,Lp(p),qI(h,p)):p=r.body;const g=G.createArrowFunction(r.modifiers,r.typeParameters,r.parameters,r.type,G.createToken(39),p);return er.ChangeTracker.with(t,C=>C.replaceNode(a,r,g))}function t9t(t,r){return t.statements.length===1&&Og(r)&&!!r.expression}function prt(t,r,a){return!!a.name&&kl.Core.isSymbolReferencedInFile(a.name,r,t)}var i9t={},Ghe="Convert parameters to destructured object",n9t=1,mrt=Bo(k.Convert_parameters_to_destructured_object),grt={name:Ghe,description:mrt,kind:"refactor.rewrite.parameters.toDestructured"};Qv(Ghe,{kinds:[grt.kind],getEditsForAction:s9t,getAvailableActions:r9t});function r9t(t){const{file:r,startPosition:a}=t;return r_(r)||!brt(r,a,t.program.getTypeChecker())?w:[{name:Ghe,description:mrt,actions:[grt]}]}function s9t(t,r){j.assert(r===Ghe,"Unexpected action name");const{file:a,startPosition:u,program:h,cancellationToken:p,host:g}=t,C=brt(a,u,h.getTypeChecker());if(!C||!p)return;const b=a9t(C,h,p);return b.valid?{renameFilename:void 0,renameLocation:void 0,edits:er.ChangeTracker.with(t,E=>o9t(a,h,g,E,C,b))}:{edits:[]}}function o9t(t,r,a,u,h,p){const g=p.signature,C=qt(xrt(h,r,a),E=>Ec(E));if(g){const E=qt(xrt(g,r,a),N=>Ec(N));T(g,E)}T(h,C);const b=Iy(p.functionCalls,(E,N)=>_l(E.pos,N.pos));for(const E of b)if(E.arguments&&E.arguments.length){const N=Ec(g9t(h,E.arguments),!0);u.replaceNodeRange(_n(E),ya(E.arguments),va(E.arguments),N,{leadingTriviaOption:er.LeadingTriviaOption.IncludeAll,trailingTriviaOption:er.TrailingTriviaOption.Include})}function T(E,N){u.replaceNodeRangeWithNodes(t,ya(E.parameters),va(E.parameters),N,{joiner:", ",indentation:0,leadingTriviaOption:er.LeadingTriviaOption.IncludeAll,trailingTriviaOption:er.TrailingTriviaOption.Include})}}function a9t(t,r,a){const u=v9t(t),h=iu(t)?y9t(t):[],p=Wb([...u,...h],Hw),g=r.getTypeChecker(),C=Rr(p,N=>kl.getReferenceEntriesForNode(-1,N,r,r.getSourceFiles(),a)),b=T(C);return Ce(b.declarations,N=>Yt(p,N))||(b.valid=!1),b;function T(N){const R={accessExpressions:[],typeUsages:[]},F={functionCalls:[],declarations:[],classReferences:R,valid:!0},H=qt(u,E),U=qt(h,E),q=iu(t),X=qt(u,Z=>J4e(Z,g));for(const Z of N){if(Z.kind===kl.EntryKind.Span){F.valid=!1;continue}if(Yt(X,E(Z.node))){if(d9t(Z.node.parent)){F.signature=Z.node.parent;continue}const re=vrt(Z);if(re){F.functionCalls.push(re);continue}}const Q=J4e(Z.node,g);if(Q&&Yt(X,Q)){const re=G4e(Z);if(re){F.declarations.push(re);continue}}if(Yt(H,E(Z.node))||r5(Z.node)){if(yrt(Z))continue;const oe=G4e(Z);if(oe){F.declarations.push(oe);continue}const pe=vrt(Z);if(pe){F.functionCalls.push(pe);continue}}if(q&&Yt(U,E(Z.node))){if(yrt(Z))continue;const oe=G4e(Z);if(oe){F.declarations.push(oe);continue}const pe=c9t(Z);if(pe){R.accessExpressions.push(pe);continue}if(hd(t.parent)){const de=l9t(Z);if(de){R.typeUsages.push(de);continue}}}F.valid=!1}return F}function E(N){const R=g.getSymbolAtLocation(N);return R&&rhe(R,g)}}function J4e(t,r){const a=Vj(t);if(a){const u=r.getContextualTypeForObjectLiteralElement(a),h=u==null?void 0:u.getSymbol();if(h&&!(Iu(h)&6))return h}}function yrt(t){const r=t.node;if(l_(r.parent)||H0(r.parent)||Wd(r.parent)||Jv(r.parent)||vh(r.parent)||Il(r.parent))return r}function G4e(t){if(Wf(t.node.parent))return t.node}function vrt(t){if(t.node.parent){const r=t.node,a=r.parent;switch(a.kind){case 213:case 214:const u=Jr(a,T1);if(u&&u.expression===r)return u;break;case 211:const h=Jr(a,Nr);if(h&&h.parent&&h.name===r){const g=Jr(h.parent,T1);if(g&&g.expression===h)return g}break;case 212:const p=Jr(a,wl);if(p&&p.parent&&p.argumentExpression===r){const g=Jr(p.parent,T1);if(g&&g.expression===p)return g}break}}}function c9t(t){if(t.node.parent){const r=t.node,a=r.parent;switch(a.kind){case 211:const u=Jr(a,Nr);if(u&&u.expression===r)return u;break;case 212:const h=Jr(a,wl);if(h&&h.expression===r)return h;break}}}function l9t(t){const r=t.node;if(zI(r)===2||SK(r.parent))return r}function brt(t,r,a){const u=Q3(t,r),h=CTe(u);if(!u9t(u)&&h&&f9t(h,a)&&Ip(h,u)&&!(h.body&&Ip(h.body,u)))return h}function u9t(t){const r=Qi(t,W6);if(r){const a=Qi(r,u=>!W6(u));return!!a&&Qc(a)}return!1}function d9t(t){return W1(t)&&(zf(t.parent)||a_(t.parent))}function f9t(t,r){var a;if(!h9t(t.parameters,r))return!1;switch(t.kind){case 262:return Crt(t)&&lY(t,r);case 174:if(Aa(t.parent)){const u=J4e(t.name,r);return((a=u==null?void 0:u.declarations)==null?void 0:a.length)===1&&lY(t,r)}return lY(t,r);case 176:return hd(t.parent)?Crt(t.parent)&&lY(t,r):Srt(t.parent.parent)&&lY(t,r);case 218:case 219:return Srt(t.parent)}return!1}function lY(t,r){return!!t.body&&!r.isImplementationOfOverload(t)}function Crt(t){return t.name?!0:!!Y3(t,90)}function h9t(t,r){return p9t(t)>=n9t&&Ce(t,a=>_9t(a,r))}function _9t(t,r){if(Oy(t)){const a=r.getTypeAtLocation(t);if(!r.isArrayType(a)&&!r.isTupleType(a))return!1}return!t.modifiers&&ot(t.name)}function Srt(t){return _s(t)&&$6(t)&&ot(t.name)&&!t.type}function K4e(t){return t.length>0&&X3(t[0].name)}function p9t(t){return K4e(t)?t.length-1:t.length}function wrt(t){return K4e(t)&&(t=G.createNodeArray(t.slice(1),t.hasTrailingComma)),t}function m9t(t,r){return ot(r)&&Lg(r)===t?G.createShorthandPropertyAssignment(t):G.createPropertyAssignment(t,r)}function g9t(t,r){const a=wrt(t.parameters),u=Oy(va(a)),h=u?r.slice(0,a.length-1):r,p=qt(h,(C,b)=>{const T=Khe(a[b]),E=m9t(T,C);return Lp(E.name),_d(E)&&Lp(E.initializer),qI(C,E),E});if(u&&r.length>=a.length){const C=r.slice(a.length-1),b=G.createPropertyAssignment(Khe(va(a)),G.createArrayLiteralExpression(C));p.push(b)}return G.createObjectLiteralExpression(p,!1)}function xrt(t,r,a){const u=r.getTypeChecker(),h=wrt(t.parameters),p=qt(h,E),g=G.createObjectBindingPattern(p),C=N(h);let b;Ce(h,H)&&(b=G.createObjectLiteralExpression());const T=G.createParameterDeclaration(void 0,void 0,g,void 0,C,b);if(K4e(t.parameters)){const U=t.parameters[0],q=G.createParameterDeclaration(void 0,void 0,U.name,void 0,U.type);return Lp(q.name),qI(U.name,q.name),U.type&&(Lp(q.type),qI(U.type,q.type)),G.createNodeArray([q,T])}return G.createNodeArray([T]);function E(U){const q=G.createBindingElement(void 0,void 0,Khe(U),Oy(U)&&H(U)?G.createArrayLiteralExpression():U.initializer);return Lp(q),U.initializer&&q.initializer&&qI(U.initializer,q.initializer),q}function N(U){const q=qt(U,R);return F1(G.createTypeLiteralNode(q),1)}function R(U){let q=U.type;!q&&(U.initializer||Oy(U))&&(q=F(U));const X=G.createPropertySignature(void 0,Khe(U),H(U)?G.createToken(58):U.questionToken,q);return Lp(X),qI(U.name,X.name),U.type&&X.type&&qI(U.type,X.type),X}function F(U){const q=u.getTypeAtLocation(U);return p5(q,U,r,a)}function H(U){if(Oy(U)){const q=u.getTypeAtLocation(U);return!u.isTupleType(q)}return u.isOptionalParameter(U)}}function Khe(t){return Lg(t.name)}function y9t(t){switch(t.parent.kind){case 263:const r=t.parent;return r.name?[r.name]:[j.checkDefined(Y3(r,90),"Nameless class declaration should be a default export")];case 231:const u=t.parent,h=t.parent.parent,p=u.name;return p?[p,h.name]:[h.name]}}function v9t(t){switch(t.kind){case 262:return t.name?[t.name]:[j.checkDefined(Y3(t,90),"Nameless function declaration should be a default export")];case 174:return[t.name];case 176:const a=j.checkDefined(Uc(t,137,t.getSourceFile()),"Constructor declaration should have constructor keyword");return t.parent.kind===231?[t.parent.parent.name,a]:[a];case 219:return[t.parent.name];case 218:return t.name?[t.name,t.parent.name]:[t.parent.name];default:return j.assertNever(t,`Unexpected function declaration kind ${t.kind}`)}}var b9t={},X4e="Convert to template string",Q4e=Bo(k.Convert_to_template_string),Z4e={name:X4e,description:Q4e,kind:"refactor.rewrite.string"};Qv(X4e,{kinds:[Z4e.kind],getEditsForAction:S9t,getAvailableActions:C9t});function C9t(t){const{file:r,startPosition:a}=t,u=krt(r,a),h=Y4e(u),p=Ha(h),g={name:X4e,description:Q4e,actions:[]};return p&&t.triggerReason!=="invoked"?w:F0(h)&&(p||ur(h)&&e6e(h).isValidConcatenation)?(g.actions.push(Z4e),[g]):t.preferences.provideRefactorNotApplicableReason?(g.actions.push({...Z4e,notApplicableReason:Bo(k.Can_only_convert_string_concatenations_and_string_literals)}),[g]):w}function krt(t,r){const a=Rs(t,r),u=Y4e(a);return!e6e(u).isValidConcatenation&&c_(u.parent)&&ur(u.parent.parent)?u.parent.parent:a}function S9t(t,r){const{file:a,startPosition:u}=t,h=krt(a,u);switch(r){case Q4e:return{edits:w9t(t,h)};default:return j.fail("invalid action")}}function w9t(t,r){const a=Y4e(r),u=t.file,h=E9t(e6e(a),u),p=qw(u.text,a.end);if(p){const g=p[p.length-1],C={pos:p[0].pos,end:g.end};return er.ChangeTracker.with(t,b=>{b.deleteRange(u,C),b.replaceNode(u,a,h)})}else return er.ChangeTracker.with(t,g=>g.replaceNode(u,a,h))}function x9t(t){return!(t.operatorToken.kind===64||t.operatorToken.kind===65)}function Y4e(t){return Qi(t.parent,a=>{switch(a.kind){case 211:case 212:return!1;case 228:case 226:return!(ur(a.parent)&&x9t(a.parent));default:return"quit"}})||t}function e6e(t){const r=g=>{if(!ur(g))return{nodes:[g],operators:[],validOperators:!0,hasString:Ha(g)||TI(g)};const{nodes:C,operators:b,hasString:T,validOperators:E}=r(g.left);if(!(T||Ha(g.right)||CX(g.right)))return{nodes:[g],operators:[],hasString:!1,validOperators:!0};const N=g.operatorToken.kind===40,R=E&&N;return C.push(g.right),b.push(g.operatorToken),{nodes:C,operators:b,hasString:!0,validOperators:R}},{nodes:a,operators:u,validOperators:h,hasString:p}=r(t);return{nodes:a,operators:u,isValidConcatenation:h&&p}}var k9t=(t,r)=>(a,u)=>{a<t.length&&h5(t[a],u,r,3,!1)},T9t=(t,r,a)=>(u,h)=>{for(;u.length>0;){const p=u.shift();h5(t[p],h,r,3,!1),a(p,h)}};function D9t(t){return t.replace(/\\.|[$`]/g,r=>r[0]==="\\"?r:"\\"+r)}function Trt(t){const r=FP(t)||cle(t)?-2:-1;return uu(t).slice(1,r)}function Drt(t,r){const a=[];let u="",h="";for(;t<r.length;){const p=r[t];if(Bc(p))u+=p.text,h+=D9t(uu(p).slice(1,-1)),a.push(t),t++;else if(CX(p)){u+=p.head.text,h+=Trt(p.head);break}else break}return[t,u,h,a]}function E9t({nodes:t,operators:r},a){const u=k9t(r,a),h=T9t(t,a,u),[p,g,C,b]=Drt(0,t);if(p===t.length){const N=G.createNoSubstitutionTemplateLiteral(g,C);return h(b,N),N}const T=[],E=G.createTemplateHead(g,C);h(b,E);for(let N=p;N<t.length;N++){const R=I9t(t[N]);u(N,R);const[F,H,U,q]=Drt(N+1,t);N=F-1;const X=N===t.length-1;if(CX(R)){const Z=qt(R.templateSpans,(Q,re)=>{Ert(Q);const oe=re===R.templateSpans.length-1,pe=Q.literal.text+(oe?H:""),de=Trt(Q.literal)+(oe?U:"");return G.createTemplateSpan(Q.expression,X&&oe?G.createTemplateTail(pe,de):G.createTemplateMiddle(pe,de))});T.push(...Z)}else{const Z=X?G.createTemplateTail(H,U):G.createTemplateMiddle(H,U);h(q,Z),T.push(G.createTemplateSpan(R,Z))}}return G.createTemplateExpression(E,T)}function Ert(t){const r=t.getSourceFile();h5(t,t.expression,r,3,!1),xj(t.expression,t.expression,r,3,!1)}function I9t(t){return c_(t)&&(Ert(t),t=t.expression),t}var N9t={},Xhe="Convert to optional chain expression",t6e=Bo(k.Convert_to_optional_chain_expression),i6e={name:Xhe,description:t6e,kind:"refactor.rewrite.expression.optionalChain"};Qv(Xhe,{kinds:[i6e.kind],getEditsForAction:P9t,getAvailableActions:L9t});function L9t(t){const r=Irt(t,t.triggerReason==="invoked");return r?sC(r)?t.preferences.provideRefactorNotApplicableReason?[{name:Xhe,description:t6e,actions:[{...i6e,notApplicableReason:r.error}]}]:w:[{name:Xhe,description:t6e,actions:[i6e]}]:w}function P9t(t,r){const a=Irt(t);return j.assert(a&&!sC(a),"Expected applicable refactor info"),{edits:er.ChangeTracker.with(t,h=>V9t(t.file,t.program.getTypeChecker(),h,a)),renameFilename:void 0,renameLocation:void 0}}function Qhe(t){return ur(t)||qP(t)}function A9t(t){return uf(t)||Og(t)||Lu(t)}function Zhe(t){return Qhe(t)||A9t(t)}function Irt(t,r=!0){const{file:a,program:u}=t,h=fA(t),p=h.length===0;if(p&&!r)return;const g=Rs(a,h.start),C=hj(a,h.start+h.length),b=Fu(g.pos,C&&C.end>=g.pos?C.getEnd():g.getEnd()),T=p?B9t(g):F9t(g,b),E=T&&Zhe(T)?W9t(T):void 0;if(!E)return{error:Bo(k.Could_not_find_convertible_access_expression)};const N=u.getTypeChecker();return qP(E)?O9t(E,N):M9t(E)}function O9t(t,r){const a=t.condition,u=r6e(t.whenTrue);if(!u||r.isNullableType(r.getTypeAtLocation(u)))return{error:Bo(k.Could_not_find_convertible_access_expression)};if((Nr(a)||ot(a))&&n6e(a,u.expression))return{finalExpression:u,occurrences:[a],expression:t};if(ur(a)){const h=Nrt(u.expression,a);return h?{finalExpression:u,occurrences:h,expression:t}:{error:Bo(k.Could_not_find_matching_access_expressions)}}}function M9t(t){if(t.operatorToken.kind!==56)return{error:Bo(k.Can_only_convert_logical_AND_access_chains)};const r=r6e(t.right);if(!r)return{error:Bo(k.Could_not_find_convertible_access_expression)};const a=Nrt(r.expression,t.left);return a?{finalExpression:r,occurrences:a,expression:t}:{error:Bo(k.Could_not_find_matching_access_expressions)}}function Nrt(t,r){const a=[];for(;ur(r)&&r.operatorToken.kind===56;){const h=n6e(Dc(t),Dc(r.right));if(!h)break;a.push(h),t=h,r=r.left}const u=n6e(t,r);return u&&a.push(u),a.length>0?a:void 0}function n6e(t,r){if(!(!ot(r)&&!Nr(r)&&!wl(r)))return R9t(t,r)?r:void 0}function R9t(t,r){for(;(la(t)||Nr(t)||wl(t))&&Fj(t)!==Fj(r);)t=t.expression;for(;Nr(t)&&Nr(r)||wl(t)&&wl(r);){if(Fj(t)!==Fj(r))return!1;t=t.expression,r=r.expression}return ot(t)&&ot(r)&&t.getText()===r.getText()}function Fj(t){if(ot(t)||cm(t))return t.getText();if(Nr(t))return Fj(t.name);if(wl(t))return Fj(t.argumentExpression)}function F9t(t,r){for(;t.parent;){if(Zhe(t)&&r.length!==0&&t.end>=r.start+r.length)return t;t=t.parent}}function B9t(t){for(;t.parent;){if(Zhe(t)&&!Zhe(t.parent))return t;t=t.parent}}function W9t(t){if(Qhe(t))return t;if(Lu(t)){const r=pP(t),a=r==null?void 0:r.initializer;return a&&Qhe(a)?a:void 0}return t.expression&&Qhe(t.expression)?t.expression:void 0}function r6e(t){if(t=Dc(t),ur(t))return r6e(t.left);if((Nr(t)||wl(t)||la(t))&&!gh(t))return t}function Lrt(t,r,a){if(Nr(r)||wl(r)||la(r)){const u=Lrt(t,r.expression,a),h=a.length>0?a[a.length-1]:void 0,p=(h==null?void 0:h.getText())===r.expression.getText();if(p&&a.pop(),la(r))return p?G.createCallChain(u,G.createToken(29),r.typeArguments,r.arguments):G.createCallChain(u,r.questionDotToken,r.typeArguments,r.arguments);if(Nr(r))return p?G.createPropertyAccessChain(u,G.createToken(29),r.name):G.createPropertyAccessChain(u,r.questionDotToken,r.name);if(wl(r))return p?G.createElementAccessChain(u,G.createToken(29),r.argumentExpression):G.createElementAccessChain(u,r.questionDotToken,r.argumentExpression)}return r}function V9t(t,r,a,u,h){const{finalExpression:p,occurrences:g,expression:C}=u,b=g[g.length-1],T=Lrt(r,p,g);T&&(Nr(T)||wl(T)||la(T))&&(ur(C)?a.replaceNodeRange(t,b,p,T):qP(C)&&a.replaceNode(t,C,G.createBinaryExpression(T,G.createToken(61),C.whenFalse)))}var Prt={};c(Prt,{Messages:()=>qf,RangeFacts:()=>Mrt,getRangeToExtract:()=>s6e,getRefactorActionsToExtractSymbol:()=>Art,getRefactorEditsToExtractSymbol:()=>Ort});var y5="Extract Symbol",v5={name:"Extract Constant",description:Bo(k.Extract_constant),kind:"refactor.extract.constant"},b5={name:"Extract Function",description:Bo(k.Extract_function),kind:"refactor.extract.function"};Qv(y5,{kinds:[v5.kind,b5.kind],getEditsForAction:Ort,getAvailableActions:Art});function Art(t){const r=t.kind,a=s6e(t.file,fA(t),t.triggerReason==="invoked"),u=a.targetRange;if(u===void 0){if(!a.errors||a.errors.length===0||!t.preferences.provideRefactorNotApplicableReason)return w;const U=[];return v2(b5.kind,r)&&U.push({name:y5,description:b5.description,actions:[{...b5,notApplicableReason:H(a.errors)}]}),v2(v5.kind,r)&&U.push({name:y5,description:v5.description,actions:[{...v5,notApplicableReason:H(a.errors)}]}),U}const{affectedTextRange:h,extractions:p}=$9t(u,t);if(p===void 0)return w;const g=[],C=new Map;let b;const T=[],E=new Map;let N,R=0;for(const{functionExtraction:U,constantExtraction:q}of p){if(v2(b5.kind,r)){const X=U.description;U.errors.length===0?C.has(X)||(C.set(X,!0),g.push({description:X,name:`function_scope_${R}`,kind:b5.kind,range:{start:{line:Ia(t.file,h.pos).line,offset:Ia(t.file,h.pos).character},end:{line:Ia(t.file,h.end).line,offset:Ia(t.file,h.end).character}}})):b||(b={description:X,name:`function_scope_${R}`,notApplicableReason:H(U.errors),kind:b5.kind})}if(v2(v5.kind,r)){const X=q.description;q.errors.length===0?E.has(X)||(E.set(X,!0),T.push({description:X,name:`constant_scope_${R}`,kind:v5.kind,range:{start:{line:Ia(t.file,h.pos).line,offset:Ia(t.file,h.pos).character},end:{line:Ia(t.file,h.end).line,offset:Ia(t.file,h.end).character}}})):N||(N={description:X,name:`constant_scope_${R}`,notApplicableReason:H(q.errors),kind:v5.kind})}R++}const F=[];return g.length?F.push({name:y5,description:Bo(k.Extract_function),actions:g}):t.preferences.provideRefactorNotApplicableReason&&b&&F.push({name:y5,description:Bo(k.Extract_function),actions:[b]}),T.length?F.push({name:y5,description:Bo(k.Extract_constant),actions:T}):t.preferences.provideRefactorNotApplicableReason&&N&&F.push({name:y5,description:Bo(k.Extract_constant),actions:[N]}),F.length?F:w;function H(U){let q=U[0].messageText;return typeof q!="string"&&(q=q.messageText),q}}function Ort(t,r){const u=s6e(t.file,fA(t)).targetRange,h=/^function_scope_(\d+)$/.exec(r);if(h){const g=+h[1];return j.assert(isFinite(g),"Expected to parse a finite number from the function scope index"),U9t(u,t,g)}const p=/^constant_scope_(\d+)$/.exec(r);if(p){const g=+p[1];return j.assert(isFinite(g),"Expected to parse a finite number from the constant scope index"),q9t(u,t,g)}j.fail("Unrecognized action name")}var qf;(t=>{function r(a){return{message:a,code:0,category:3,key:a}}t.cannotExtractRange=r("Cannot extract range."),t.cannotExtractImport=r("Cannot extract import statement."),t.cannotExtractSuper=r("Cannot extract super call."),t.cannotExtractJSDoc=r("Cannot extract JSDoc."),t.cannotExtractEmpty=r("Cannot extract empty range."),t.expressionExpected=r("expression expected."),t.uselessConstantType=r("No reason to extract constant of type."),t.statementOrExpressionExpected=r("Statement or expression expected."),t.cannotExtractRangeContainingConditionalBreakOrContinueStatements=r("Cannot extract range containing conditional break or continue statements."),t.cannotExtractRangeContainingConditionalReturnStatement=r("Cannot extract range containing conditional return statement."),t.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange=r("Cannot extract range containing labeled break or continue with target outside of the range."),t.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators=r("Cannot extract range containing writes to references located outside of the target range in generators."),t.typeWillNotBeVisibleInTheNewScope=r("Type will not visible in the new scope."),t.functionWillNotBeVisibleInTheNewScope=r("Function will not visible in the new scope."),t.cannotExtractIdentifier=r("Select more than a single identifier."),t.cannotExtractExportedEntity=r("Cannot extract exported declaration"),t.cannotWriteInExpression=r("Cannot write back side-effects when extracting an expression"),t.cannotExtractReadonlyPropertyInitializerOutsideConstructor=r("Cannot move initialization of read-only class property outside of the constructor"),t.cannotExtractAmbientBlock=r("Cannot extract code from ambient contexts"),t.cannotAccessVariablesFromNestedScopes=r("Cannot access variables from nested scopes"),t.cannotExtractToJSClass=r("Cannot extract constant to a class scope in JS"),t.cannotExtractToExpressionArrowFunction=r("Cannot extract constant to an arrow function without a block"),t.cannotExtractFunctionsContainingThisToMethod=r("Cannot extract functions containing this to method")})(qf||(qf={}));var Mrt=(t=>(t[t.None=0]="None",t[t.HasReturn=1]="HasReturn",t[t.IsGenerator=2]="IsGenerator",t[t.IsAsyncFunction=4]="IsAsyncFunction",t[t.UsesThis=8]="UsesThis",t[t.UsesThisInFunction=16]="UsesThisInFunction",t[t.InStaticRegion=32]="InStaticRegion",t))(Mrt||{});function s6e(t,r,a=!0){const{length:u}=r;if(u===0&&!a)return{errors:[Md(t,r.start,u,qf.cannotExtractEmpty)]};const h=u===0&&a,p=tAe(t,r.start),g=hj(t,au(r)),C=p&&g&&a?H9t(p,g,t):r,b=h?fBt(p):bj(p,t,C),T=h?b:bj(g,t,C);let E=0,N;if(!b||!T)return{errors:[Md(t,r.start,u,qf.cannotExtractRange)]};if(b.flags&16777216)return{errors:[Md(t,r.start,u,qf.cannotExtractJSDoc)]};if(b.parent!==T.parent)return{errors:[Md(t,r.start,u,qf.cannotExtractRange)]};if(b!==T){if(!hA(b.parent))return{errors:[Md(t,r.start,u,qf.cannotExtractRange)]};const Z=[];for(const Q of b.parent.statements){if(Q===b||Z.length){const re=X(Q);if(re)return{errors:re};Z.push(Q)}if(Q===T)break}return Z.length?{targetRange:{range:Z,facts:E,thisNode:N}}:{errors:[Md(t,r.start,u,qf.cannotExtractRange)]}}if(Og(b)&&!b.expression)return{errors:[Md(t,r.start,u,qf.cannotExtractRange)]};const R=H(b),F=U(R)||X(R);if(F)return{errors:F};return{targetRange:{range:j9t(R),facts:E,thisNode:N}};function H(Z){if(Og(Z)){if(Z.expression)return Z.expression}else if(Lu(Z)||Sf(Z)){const Q=Lu(Z)?Z.declarationList.declarations:Z.declarations;let re=0,oe;for(const pe of Q)pe.initializer&&(re++,oe=pe.initializer);if(re===1)return oe}else if(_s(Z)&&Z.initializer)return Z.initializer;return Z}function U(Z){if(ot(uf(Z)?Z.expression:Z))return[Kn(Z,qf.cannotExtractIdentifier)]}function q(Z,Q){let re=Z;for(;re!==Q;){if(re.kind===172){pa(re)&&(E|=32);break}else if(re.kind===169){Up(re).kind===176&&(E|=32);break}else re.kind===174&&pa(re)&&(E|=32);re=re.parent}}function X(Z){let Q;if((Ie=>{Ie[Ie.None=0]="None",Ie[Ie.Break=1]="Break",Ie[Ie.Continue=2]="Continue",Ie[Ie.Return=4]="Return"})(Q||(Q={})),j.assert(Z.pos<=Z.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (1)"),j.assert(!W0(Z.pos),"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (2)"),!Ps(Z)&&!(F0(Z)&&Rrt(Z))&&!u6e(Z))return[Kn(Z,qf.statementOrExpressionExpected)];if(Z.flags&33554432)return[Kn(Z,qf.cannotExtractAmbientBlock)];const re=Cf(Z);re&&q(Z,re);let oe,pe=4,de;if(ue(Z),E&8){const Ie=Hh(Z,!1,!1);(Ie.kind===262||Ie.kind===174&&Ie.parent.kind===210||Ie.kind===218)&&(E|=16)}return oe;function ue(Ie){if(oe)return!0;if(Wf(Ie)){const he=Ie.kind===260?Ie.parent.parent:Ie;if(Zr(he,32))return(oe||(oe=[])).push(Kn(Ie,qf.cannotExtractExportedEntity)),!0}switch(Ie.kind){case 272:return(oe||(oe=[])).push(Kn(Ie,qf.cannotExtractImport)),!0;case 277:return(oe||(oe=[])).push(Kn(Ie,qf.cannotExtractExportedEntity)),!0;case 108:if(Ie.parent.kind===213){const he=Cf(Ie);if(he===void 0||he.pos<r.start||he.end>=r.start+r.length)return(oe||(oe=[])).push(Kn(Ie,qf.cannotExtractSuper)),!0}else E|=8,N=Ie;break;case 219:Uo(Ie,function he(Ae){if(X3(Ae))E|=8,N=Ie;else{if(ss(Ae)||Ho(Ae)&&!xl(Ae))return!1;Uo(Ae,he)}});case 263:case 262:Os(Ie.parent)&&Ie.parent.externalModuleIndicator===void 0&&(oe||(oe=[])).push(Kn(Ie,qf.functionWillNotBeVisibleInTheNewScope));case 231:case 218:case 174:case 176:case 177:case 178:return!1}const we=pe;switch(Ie.kind){case 245:pe&=-5;break;case 258:pe=0;break;case 241:Ie.parent&&Ie.parent.kind===258&&Ie.parent.finallyBlock===Ie&&(pe=4);break;case 297:case 296:pe|=1;break;default:Zw(Ie,!1)&&(pe|=3);break}switch(Ie.kind){case 197:case 110:E|=8,N=Ie;break;case 256:{const he=Ie.label;(de||(de=[])).push(he.escapedText),Uo(Ie,ue),de.pop();break}case 252:case 251:{const he=Ie.label;he?Yt(de,he.escapedText)||(oe||(oe=[])).push(Kn(Ie,qf.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)):pe&(Ie.kind===252?1:2)||(oe||(oe=[])).push(Kn(Ie,qf.cannotExtractRangeContainingConditionalBreakOrContinueStatements));break}case 223:E|=4;break;case 229:E|=2;break;case 253:pe&4?E|=1:(oe||(oe=[])).push(Kn(Ie,qf.cannotExtractRangeContainingConditionalReturnStatement));break;default:Uo(Ie,ue);break}pe=we}}}function H9t(t,r,a){const u=t.getStart(a);let h=r.getEnd();return a.text.charCodeAt(h)===59&&h++,{start:u,length:h-u}}function j9t(t){if(Ps(t))return[t];if(F0(t))return uf(t.parent)?[t.parent]:t;if(u6e(t))return t}function o6e(t){return xl(t)?aae(t.body):Qc(t)||Os(t)||H1(t)||ss(t)}function z9t(t){let r=IS(t.range)?ya(t.range):t.range;if(t.facts&8&&!(t.facts&16)){const u=Cf(r);if(u){const h=Qi(r,Qc);return h?[h,u]:[u]}}const a=[];for(;;)if(r=r.parent,r.kind===169&&(r=Qi(r,u=>Qc(u)).parent),o6e(r)&&(a.push(r),r.kind===307))return a}function U9t(t,r,a){const{scopes:u,readsAndWrites:{target:h,usagesPerScope:p,functionErrorsPerScope:g,exposedVariableDeclarations:C}}=a6e(t,r);return j.assert(!g[a].length,"The extraction went missing? How?"),r.cancellationToken.throwIfCancellationRequested(),Z9t(h,u[a],p[a],C,t,r)}function q9t(t,r,a){const{scopes:u,readsAndWrites:{target:h,usagesPerScope:p,constantErrorsPerScope:g,exposedVariableDeclarations:C}}=a6e(t,r);j.assert(!g[a].length,"The extraction went missing? How?"),j.assert(C.length===0,"Extract constant accepted a range containing a variable declaration?"),r.cancellationToken.throwIfCancellationRequested();const b=jt(h)?h:h.statements[0].expression;return Y9t(b,u[a],p[a],t.facts,r)}function $9t(t,r){const{scopes:a,affectedTextRange:u,readsAndWrites:{functionErrorsPerScope:h,constantErrorsPerScope:p}}=a6e(t,r),g=a.map((C,b)=>{const T=J9t(C),E=G9t(C),N=Qc(C)?K9t(C):ss(C)?X9t(C):Q9t(C);let R,F;return N===1?(R=jv(Bo(k.Extract_to_0_in_1_scope),[T,"global"]),F=jv(Bo(k.Extract_to_0_in_1_scope),[E,"global"])):N===0?(R=jv(Bo(k.Extract_to_0_in_1_scope),[T,"module"]),F=jv(Bo(k.Extract_to_0_in_1_scope),[E,"module"])):(R=jv(Bo(k.Extract_to_0_in_1),[T,N]),F=jv(Bo(k.Extract_to_0_in_1),[E,N])),b===0&&!ss(C)&&(F=jv(Bo(k.Extract_to_0_in_enclosing_scope),[E])),{functionExtraction:{description:R,errors:h[b]},constantExtraction:{description:F,errors:p[b]}}});return{affectedTextRange:u,extractions:g}}function a6e(t,r){const{file:a}=r,u=z9t(t),h=uBt(t,a),p=dBt(t,u,h,a,r.program.getTypeChecker(),r.cancellationToken);return{scopes:u,affectedTextRange:h,readsAndWrites:p}}function J9t(t){return Qc(t)?"inner function":ss(t)?"method":"function"}function G9t(t){return ss(t)?"readonly field":"constant"}function K9t(t){switch(t.kind){case 176:return"constructor";case 218:case 262:return t.name?`function '${t.name.text}'`:lhe;case 219:return"arrow function";case 174:return`method '${t.name.getText()}'`;case 177:return`'get ${t.name.getText()}'`;case 178:return`'set ${t.name.getText()}'`;default:j.assertNever(t,`Unexpected scope kind ${t.kind}`)}}function X9t(t){return t.kind===263?t.name?`class '${t.name.text}'`:"anonymous class declaration":t.name?`class expression '${t.name.text}'`:"anonymous class expression"}function Q9t(t){return t.kind===268?`namespace '${t.parent.name.getText()}'`:t.externalModuleIndicator?0:1}function Z9t(t,r,{usages:a,typeParameterUsages:u,substitutions:h},p,g,C){const b=C.program.getTypeChecker(),T=Ja(C.program.getCompilerOptions()),E=wh.createImportAdder(C.file,C.program,C.preferences,C.host),N=r.getSourceFile(),R=$I(ss(r)?"newMethod":"newFunction",N),F=nr(r),H=G.createIdentifier(R);let U;const q=[],X=[];let Z;a.forEach((Pe,We)=>{let ze;if(!F){let $e=b.getTypeOfSymbolAtLocation(Pe.symbol,Pe.node);$e=b.getBaseTypeOfLiteralType($e),ze=wh.typeToAutoImportableTypeNode(b,E,$e,r,T,1,8)}const Nt=G.createParameterDeclaration(void 0,void 0,We,void 0,ze);q.push(Nt),Pe.usage===2&&(Z||(Z=[])).push(Pe),X.push(G.createIdentifier(We))});const Q=as(u.values(),Pe=>({type:Pe,declaration:tBt(Pe,C.startPosition)}));Q.sort(iBt);const re=Q.length===0?void 0:es(Q,({declaration:Pe})=>Pe),oe=re!==void 0?re.map(Pe=>G.createTypeReferenceNode(Pe.name,void 0)):void 0;if(jt(t)&&!F){const Pe=b.getContextualType(t);U=b.typeToTypeNode(Pe,r,1,8)}const{body:pe,returnValueProperty:de}=rBt(t,p,Z,h,!!(g.facts&1));Lp(pe);let ue;const Ie=!!(g.facts&16);if(ss(r)){const Pe=F?[]:[G.createModifier(123)];g.facts&32&&Pe.push(G.createModifier(126)),g.facts&4&&Pe.push(G.createModifier(134)),ue=G.createMethodDeclaration(Pe.length?Pe:void 0,g.facts&2?G.createToken(42):void 0,H,void 0,re,q,U,pe)}else Ie&&q.unshift(G.createParameterDeclaration(void 0,void 0,"this",void 0,b.typeToTypeNode(b.getTypeAtLocation(g.thisNode),r,1,8),void 0)),ue=G.createFunctionDeclaration(g.facts&4?[G.createToken(134)]:void 0,g.facts&2?G.createToken(42):void 0,H,re,q,U,pe);const we=er.ChangeTracker.fromContext(C),he=(IS(g.range)?va(g.range):g.range).end,Ae=aBt(he,r);Ae?we.insertNodeBefore(C.file,Ae,ue,!0):we.insertNodeAtEndOfScope(C.file,r,ue),E.writeFixes(we);const ke=[],Te=nBt(r,g,R);Ie&&X.unshift(G.createIdentifier("this"));let De=G.createCallExpression(Ie?G.createPropertyAccessExpression(Te,"call"):Te,oe,X);if(g.facts&2&&(De=G.createYieldExpression(G.createToken(42),De)),g.facts&4&&(De=G.createAwaitExpression(De)),l6e(t)&&(De=G.createJsxExpression(void 0,De)),p.length&&!Z)if(j.assert(!de,"Expected no returnValueProperty"),j.assert(!(g.facts&1),"Expected RangeFacts.HasReturn flag to be unset"),p.length===1){const Pe=p[0];ke.push(G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(Ec(Pe.name),void 0,Ec(Pe.type),De)],Pe.parent.flags)))}else{const Pe=[],We=[];let ze=p[0].parent.flags,Nt=!1;for(const et of p){Pe.push(G.createBindingElement(void 0,void 0,Ec(et.name)));const Me=b.typeToTypeNode(b.getBaseTypeOfLiteralType(b.getTypeAtLocation(et)),r,1,8);We.push(G.createPropertySignature(void 0,et.symbol.name,void 0,Me)),Nt=Nt||et.type!==void 0,ze=ze&et.parent.flags}const $e=Nt?G.createTypeLiteralNode(We):void 0;$e&&tr($e,1),ke.push(G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(G.createObjectBindingPattern(Pe),void 0,$e,De)],ze)))}else if(p.length||Z){if(p.length)for(const We of p){let ze=We.parent.flags;ze&2&&(ze=ze&-3|1),ke.push(G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(We.symbol.name,void 0,He(We.type))],ze)))}de&&ke.push(G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(de,void 0,He(U))],1)));const Pe=c6e(p,Z);de&&Pe.unshift(G.createShorthandPropertyAssignment(de)),Pe.length===1?(j.assert(!de,"Shouldn't have returnValueProperty here"),ke.push(G.createExpressionStatement(G.createAssignment(Pe[0].name,De))),g.facts&1&&ke.push(G.createReturnStatement())):(ke.push(G.createExpressionStatement(G.createAssignment(G.createObjectLiteralExpression(Pe),De))),de&&ke.push(G.createReturnStatement(G.createIdentifier(de))))}else g.facts&1?ke.push(G.createReturnStatement(De)):IS(g.range)?ke.push(G.createExpressionStatement(De)):ke.push(De);IS(g.range)?we.replaceNodeRangeWithNodes(C.file,ya(g.range),va(g.range),ke):we.replaceNodeWithNodes(C.file,g.range,ke);const qe=we.getChanges(),Ne=(IS(g.range)?ya(g.range):g.range).getSourceFile().fileName,Oe=wj(qe,Ne,R,!1);return{renameFilename:Ne,renameLocation:Oe,edits:qe};function He(Pe){if(Pe===void 0)return;const We=Ec(Pe);let ze=We;for(;EI(ze);)ze=ze.type;return fx(ze)&&Fe(ze.types,Nt=>Nt.kind===157)?We:G.createUnionTypeNode([We,G.createKeywordTypeNode(157)])}}function Y9t(t,r,{substitutions:a},u,h){const p=h.program.getTypeChecker(),g=r.getSourceFile(),C=W4e(t,r,p,g),b=nr(r);let T=b||!p.isContextSensitive(t)?void 0:p.typeToTypeNode(p.getContextualType(t),r,1,8),E=sBt(Dc(t),a);({variableType:T,initializer:E}=U(T,E)),Lp(E);const N=er.ChangeTracker.fromContext(h);if(ss(r)){j.assert(!b,"Cannot extract to a JS class");const q=[];q.push(G.createModifier(123)),u&32&&q.push(G.createModifier(126)),q.push(G.createModifier(148));const X=G.createPropertyDeclaration(q,C,void 0,T,E);let Z=G.createPropertyAccessExpression(u&32?G.createIdentifier(r.name.getText()):G.createThis(),G.createIdentifier(C));l6e(t)&&(Z=G.createJsxExpression(void 0,Z));const Q=t.pos,re=cBt(Q,r);N.insertNodeBefore(h.file,re,X,!0),N.replaceNode(h.file,t,Z)}else{const q=G.createVariableDeclaration(C,void 0,T,E),X=eBt(t,r);if(X){N.insertNodeBefore(h.file,X,q);const Z=G.createIdentifier(C);N.replaceNode(h.file,t,Z)}else if(t.parent.kind===244&&r===Qi(t,o6e)){const Z=G.createVariableStatement(void 0,G.createVariableDeclarationList([q],2));N.replaceNode(h.file,t.parent,Z)}else{const Z=G.createVariableStatement(void 0,G.createVariableDeclarationList([q],2)),Q=lBt(t,r);if(Q.pos===0?N.insertNodeAtTopOfFile(h.file,Z,!1):N.insertNodeBefore(h.file,Q,Z,!1),t.parent.kind===244)N.delete(h.file,t.parent);else{let re=G.createIdentifier(C);l6e(t)&&(re=G.createJsxExpression(void 0,re)),N.replaceNode(h.file,t,re)}}}const R=N.getChanges(),F=t.getSourceFile().fileName,H=wj(R,F,C,!0);return{renameFilename:F,renameLocation:H,edits:R};function U(q,X){if(q===void 0)return{variableType:q,initializer:X};if(!ml(X)&&!xl(X)||X.typeParameters)return{variableType:q,initializer:X};const Z=p.getTypeAtLocation(t),Q=Bm(p.getSignaturesOfType(Z,0));if(!Q)return{variableType:q,initializer:X};if(Q.getTypeParameters())return{variableType:q,initializer:X};const re=[];let oe=!1;for(const pe of X.parameters)if(pe.type)re.push(pe);else{const de=p.getTypeAtLocation(pe);de===p.getAnyType()&&(oe=!0),re.push(G.updateParameterDeclaration(pe,pe.modifiers,pe.dotDotDotToken,pe.name,pe.questionToken,pe.type||p.typeToTypeNode(de,r,1,8),pe.initializer))}if(oe)return{variableType:q,initializer:X};if(q=void 0,xl(X))X=G.updateArrowFunction(X,Fg(t)?PT(t):void 0,X.typeParameters,re,X.type||p.typeToTypeNode(Q.getReturnType(),r,1,8),X.equalsGreaterThanToken,X.body);else{if(Q&&Q.thisParameter){const pe=Ra(re);if(!pe||ot(pe.name)&&pe.name.escapedText!=="this"){const de=p.getTypeOfSymbolAtLocation(Q.thisParameter,t);re.splice(0,0,G.createParameterDeclaration(void 0,void 0,"this",void 0,p.typeToTypeNode(de,r,1,8)))}}X=G.updateFunctionExpression(X,Fg(t)?PT(t):void 0,X.asteriskToken,X.name,X.typeParameters,re,X.type||p.typeToTypeNode(Q.getReturnType(),r,1),X.body)}return{variableType:q,initializer:X}}}function eBt(t,r){let a;for(;t!==void 0&&t!==r;){if(_s(t)&&t.initializer===a&&Sf(t.parent)&&t.parent.declarations.length>1)return t;a=t,t=t.parent}}function tBt(t,r){let a;const u=t.symbol;if(u&&u.declarations)for(const h of u.declarations)(a===void 0||h.pos<a.pos)&&h.pos<r&&(a=h);return a}function iBt({type:t,declaration:r},{type:a,declaration:u}){return pxe(r,u,"pos",_l)||sh(t.symbol?t.symbol.getName():"",a.symbol?a.symbol.getName():"")||_l(t.id,a.id)}function nBt(t,r,a){const u=G.createIdentifier(a);if(ss(t)){const h=r.facts&32?G.createIdentifier(t.name.text):G.createThis();return G.createPropertyAccessExpression(h,u)}else return u}function rBt(t,r,a,u,h){const p=a!==void 0||r.length>0;if(Xo(t)&&!p&&u.size===0)return{body:G.createBlock(t.statements,!0),returnValueProperty:void 0};let g,C=!1;const b=G.createNodeArray(Xo(t)?t.statements.slice(0):[Ps(t)?t:G.createReturnStatement(Dc(t))]);if(p||u.size){const E=Dn(b,T,Ps).slice();if(p&&!h&&Ps(t)){const N=c6e(r,a);N.length===1?E.push(G.createReturnStatement(N[0].name)):E.push(G.createReturnStatement(G.createObjectLiteralExpression(N)))}return{body:G.createBlock(E,!0),returnValueProperty:g}}else return{body:G.createBlock(b,!0),returnValueProperty:void 0};function T(E){if(!C&&Og(E)&&p){const N=c6e(r,a);return E.expression&&(g||(g="__return"),N.unshift(G.createPropertyAssignment(g,bt(E.expression,T,jt)))),N.length===1?G.createReturnStatement(N[0].name):G.createReturnStatement(G.createObjectLiteralExpression(N))}else{const N=C;C=C||Qc(E)||ss(E);const R=u.get(Sc(E).toString()),F=R?Ec(R):dn(E,T,void 0);return C=N,F}}}function sBt(t,r){return r.size?a(t):t;function a(u){const h=r.get(Sc(u).toString());return h?Ec(h):dn(u,a,void 0)}}function oBt(t){if(Qc(t)){const r=t.body;if(Xo(r))return r.statements}else{if(H1(t)||Os(t))return t.statements;if(ss(t))return t.members}return w}function aBt(t,r){return Fe(oBt(r),a=>a.pos>=t&&Qc(a)&&!iu(a))}function cBt(t,r){const a=r.members;j.assert(a.length>0,"Found no members");let u,h=!0;for(const p of a){if(p.pos>t)return u||a[0];if(h&&!Lo(p)){if(u!==void 0)return p;h=!1}u=p}return u===void 0?j.fail():u}function lBt(t,r){j.assert(!ss(r));let a;for(let u=t;u!==r;u=u.parent)o6e(u)&&(a=u);for(let u=(a||t).parent;;u=u.parent){if(hA(u)){let h;for(const p of u.statements){if(p.pos>t.pos)break;h=p}return!h&&x3(u)?(j.assert(S7(u.parent.parent),"Grandparent isn't a switch statement"),u.parent.parent):j.checkDefined(h,"prevStatement failed to get set")}j.assert(u!==r,"Didn't encounter a block-like before encountering scope")}}function c6e(t,r){const a=qt(t,h=>G.createShorthandPropertyAssignment(h.symbol.name)),u=qt(r,h=>G.createShorthandPropertyAssignment(h.symbol.name));return a===void 0?u:u===void 0?a:a.concat(u)}function IS(t){return Ao(t)}function uBt(t,r){return IS(t.range)?{pos:ya(t.range).getStart(r),end:va(t.range).getEnd()}:t.range}function dBt(t,r,a,u,h,p){const g=new Map,C=[],b=[],T=[],E=[],N=[],R=new Map,F=[];let H;const U=IS(t.range)?t.range.length===1&&uf(t.range[0])?t.range[0].expression:void 0:t.range;let q;if(U===void 0){const ke=t.range,Te=ya(ke).getStart(),De=va(ke).end;q=Md(u,Te,De-Te,qf.expressionExpected)}else h.getTypeAtLocation(U).flags&147456&&(q=Kn(U,qf.uselessConstantType));for(const ke of r){C.push({usages:new Map,typeParameterUsages:new Map,substitutions:new Map}),b.push(new Map),T.push([]);const Te=[];q&&Te.push(q),ss(ke)&&nr(ke)&&Te.push(Kn(ke,qf.cannotExtractToJSClass)),xl(ke)&&!Xo(ke.body)&&Te.push(Kn(ke,qf.cannotExtractToExpressionArrowFunction)),E.push(Te)}const X=new Map,Z=IS(t.range)?G.createBlock(t.range):t.range,Q=IS(t.range)?ya(t.range):t.range,re=oe(Q);if(de(Z),re&&!IS(t.range)&&!U1(t.range)){const ke=h.getContextualType(t.range);pe(ke)}if(g.size>0){const ke=new Map;let Te=0;for(let De=Q;De!==void 0&&Te<r.length;De=De.parent)if(De===r[Te]&&(ke.forEach((qe,se)=>{C[Te].typeParameterUsages.set(se,qe)}),Te++),Eae(De))for(const qe of Jw(De)){const se=h.getTypeAtLocation(qe);g.has(se.id.toString())&&ke.set(se.id.toString(),se)}j.assert(Te===r.length,"Should have iterated all scopes")}if(N.length){const ke=Dae(r[0],r[0].parent)?r[0]:R0(r[0]);Uo(ke,we)}for(let ke=0;ke<r.length;ke++){const Te=C[ke];if(ke>0&&(Te.usages.size>0||Te.typeParameterUsages.size>0)){const se=IS(t.range)?t.range[0]:t.range;E[ke].push(Kn(se,qf.cannotAccessVariablesFromNestedScopes))}t.facts&16&&ss(r[ke])&&T[ke].push(Kn(t.thisNode,qf.cannotExtractFunctionsContainingThisToMethod));let De=!1,qe;if(C[ke].usages.forEach(se=>{se.usage===2&&(De=!0,se.symbol.flags&106500&&se.symbol.valueDeclaration&&xp(se.symbol.valueDeclaration,8)&&(qe=se.symbol.valueDeclaration))}),j.assert(IS(t.range)||F.length===0,"No variable declarations expected if something was extracted"),De&&!IS(t.range)){const se=Kn(t.range,qf.cannotWriteInExpression);T[ke].push(se),E[ke].push(se)}else if(qe&&ke>0){const se=Kn(qe,qf.cannotExtractReadonlyPropertyInitializerOutsideConstructor);T[ke].push(se),E[ke].push(se)}else if(H){const se=Kn(H,qf.cannotExtractExportedEntity);T[ke].push(se),E[ke].push(se)}}return{target:Z,usagesPerScope:C,functionErrorsPerScope:T,constantErrorsPerScope:E,exposedVariableDeclarations:F};function oe(ke){return!!Qi(ke,Te=>Eae(Te)&&Jw(Te).length!==0)}function pe(ke){const Te=h.getSymbolWalker(()=>(p.throwIfCancellationRequested(),!0)),{visitedTypes:De}=Te.walkType(ke);for(const qe of De)qe.isTypeParameter()&&g.set(qe.id.toString(),qe)}function de(ke,Te=1){if(re){const De=h.getTypeAtLocation(ke);pe(De)}if(Wf(ke)&&ke.symbol&&N.push(ke),lf(ke))de(ke.left,2),de(ke.right);else if(I2e(ke))de(ke.operand,2);else if(Nr(ke)||wl(ke))Uo(ke,de);else if(ot(ke)){if(!ke.parent||o_(ke.parent)&&ke!==ke.parent.left||Nr(ke.parent)&&ke!==ke.parent.expression)return;ue(ke,Te,N1(ke))}else Uo(ke,de)}function ue(ke,Te,De){const qe=Ie(ke,Te,De);if(qe)for(let se=0;se<r.length;se++){const Ne=b[se].get(qe);Ne&&C[se].substitutions.set(Sc(ke).toString(),Ne)}}function Ie(ke,Te,De){const qe=he(ke);if(!qe)return;const se=Ba(qe).toString(),Ne=X.get(se);if(Ne&&Ne>=Te)return se;if(X.set(se,Te),Ne){for(const Pe of C)Pe.usages.get(ke.text)&&Pe.usages.set(ke.text,{usage:Te,symbol:qe,node:ke});return se}const Oe=qe.getDeclarations(),He=Oe&&Fe(Oe,Pe=>Pe.getSourceFile()===u);if(He&&!fj(a,He.getStart(),He.end)){if(t.facts&2&&Te===2){const Pe=Kn(ke,qf.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators);for(const We of T)We.push(Pe);for(const We of E)We.push(Pe)}for(let Pe=0;Pe<r.length;Pe++){const We=r[Pe];if(h.resolveName(qe.name,We,qe.flags,!1)!==qe&&!b[Pe].has(se)){const Nt=Ae(qe.exportSymbol||qe,We,De);if(Nt)b[Pe].set(se,Nt);else if(De){if(!(qe.flags&262144)){const $e=Kn(ke,qf.typeWillNotBeVisibleInTheNewScope);T[Pe].push($e),E[Pe].push($e)}}else C[Pe].usages.set(ke.text,{usage:Te,symbol:qe,node:ke})}}return se}}function we(ke){if(ke===t.range||IS(t.range)&&t.range.includes(ke))return;const Te=ot(ke)?he(ke):h.getSymbolAtLocation(ke);if(Te){const De=Fe(N,qe=>qe.symbol===Te);if(De)if(_s(De)){const qe=De.symbol.id.toString();R.has(qe)||(F.push(De),R.set(qe,!0))}else H=H||De}Uo(ke,we)}function he(ke){return ke.parent&&lh(ke.parent)&&ke.parent.name===ke?h.getShorthandAssignmentValueSymbol(ke.parent):h.getSymbolAtLocation(ke)}function Ae(ke,Te,De){if(!ke)return;const qe=ke.getDeclarations();if(qe&&qe.some(Ne=>Ne.parent===Te))return G.createIdentifier(ke.name);const se=Ae(ke.parent,Te,De);if(se!==void 0)return De?G.createQualifiedName(se,G.createIdentifier(ke.name)):G.createPropertyAccessExpression(se,ke.name)}}function fBt(t){return Qi(t,r=>r.parent&&Rrt(r)&&!ur(r.parent))}function Rrt(t){const{parent:r}=t;switch(r.kind){case 306:return!1}switch(t.kind){case 11:return r.kind!==272&&r.kind!==276;case 230:case 206:case 208:return!1;case 80:return r.kind!==208&&r.kind!==276&&r.kind!==281}return!0}function l6e(t){return u6e(t)||(Gv(t)||PI(t)||aD(t))&&(Gv(t.parent)||aD(t.parent))}function u6e(t){return Ha(t)&&t.parent&&U1(t.parent)}var hBt={},Yhe="Generate 'get' and 'set' accessors",d6e=Bo(k.Generate_get_and_set_accessors),f6e={name:Yhe,description:d6e,kind:"refactor.rewrite.property.generateAccessors"};Qv(Yhe,{kinds:[f6e.kind],getEditsForAction:function(r,a){if(!r.endPosition)return;const u=wh.getAccessorConvertiblePropertyAtPosition(r.file,r.program,r.startPosition,r.endPosition);j.assert(u&&!sC(u),"Expected applicable refactor info");const h=wh.generateAccessorFromProperty(r.file,r.program,r.startPosition,r.endPosition,r,a);if(!h)return;const p=r.file.fileName,g=u.renameAccessor?u.accessorName:u.fieldName,b=(ot(g)?0:-1)+wj(h,p,g.text,$s(u.declaration));return{renameFilename:p,renameLocation:b,edits:h}},getAvailableActions(t){if(!t.endPosition)return w;const r=wh.getAccessorConvertiblePropertyAtPosition(t.file,t.program,t.startPosition,t.endPosition,t.triggerReason==="invoked");return r?sC(r)?t.preferences.provideRefactorNotApplicableReason?[{name:Yhe,description:d6e,actions:[{...f6e,notApplicableReason:r.error}]}]:w:[{name:Yhe,description:d6e,actions:[f6e]}]:w}});var _Bt={},e_e="Infer function return type",h6e=Bo(k.Infer_function_return_type),t_e={name:e_e,description:h6e,kind:"refactor.rewrite.function.returnType"};Qv(e_e,{kinds:[t_e.kind],getEditsForAction:pBt,getAvailableActions:mBt});function pBt(t){const r=Frt(t);if(r&&!sC(r))return{renameFilename:void 0,renameLocation:void 0,edits:er.ChangeTracker.with(t,u=>gBt(t.file,u,r.declaration,r.returnTypeNode))}}function mBt(t){const r=Frt(t);return r?sC(r)?t.preferences.provideRefactorNotApplicableReason?[{name:e_e,description:h6e,actions:[{...t_e,notApplicableReason:r.error}]}]:w:[{name:e_e,description:h6e,actions:[t_e]}]:w}function gBt(t,r,a,u){const h=Uc(a,22,t),p=xl(a)&&h===void 0,g=p?ya(a.parameters):h;g&&(p&&(r.insertNodeBefore(t,g,G.createToken(21)),r.insertNodeAfter(t,g,G.createToken(22))),r.insertNodeAt(t,g.end,u,{prefix:": "}))}function Frt(t){if(nr(t.file)||!v2(t_e.kind,t.kind))return;const r=R_(t.file,t.startPosition),a=Qi(r,g=>Xo(g)||g.parent&&xl(g.parent)&&(g.kind===39||g.parent.body===g)?"quit":yBt(g));if(!a||!a.body||a.type)return{error:Bo(k.Return_type_must_be_inferred_from_a_function)};const u=t.program.getTypeChecker();let h;if(u.isImplementationOfOverload(a)){const g=u.getTypeAtLocation(a).getCallSignatures();g.length>1&&(h=u.getUnionType(es(g,C=>C.getReturnType())))}if(!h){const g=u.getSignatureFromDeclaration(a);if(g){const C=u.getTypePredicateOfSignature(g);if(C&&C.type){const b=u.typePredicateToTypePredicateNode(C,a,1,8);if(b)return{declaration:a,returnTypeNode:b}}else h=u.getReturnTypeOfSignature(g)}}if(!h)return{error:Bo(k.Could_not_determine_function_return_type)};const p=u.typeToTypeNode(h,a,1,8);if(p)return{declaration:a,returnTypeNode:p}}function yBt(t){switch(t.kind){case 262:case 218:case 219:case 174:return!0;default:return!1}}var Brt=(t=>(t[t.typeOffset=8]="typeOffset",t[t.modifierMask=255]="modifierMask",t))(Brt||{}),Wrt=(t=>(t[t.class=0]="class",t[t.enum=1]="enum",t[t.interface=2]="interface",t[t.namespace=3]="namespace",t[t.typeParameter=4]="typeParameter",t[t.type=5]="type",t[t.parameter=6]="parameter",t[t.variable=7]="variable",t[t.enumMember=8]="enumMember",t[t.property=9]="property",t[t.function=10]="function",t[t.member=11]="member",t))(Wrt||{}),Vrt=(t=>(t[t.declaration=0]="declaration",t[t.static=1]="static",t[t.async=2]="async",t[t.readonly=3]="readonly",t[t.defaultLibrary=4]="defaultLibrary",t[t.local=5]="local",t))(Vrt||{});function Hrt(t,r,a,u){const h=_6e(t,r,a,u);j.assert(h.spans.length%3===0);const p=h.spans,g=[];for(let C=0;C<p.length;C+=3)g.push({textSpan:Ff(p[C],p[C+1]),classificationType:p[C+2]});return g}function _6e(t,r,a,u){return{spans:vBt(t,a,u,r),endOfLineState:0}}function vBt(t,r,a,u){const h=[];return t&&r&&bBt(t,r,a,(g,C,b)=>{h.push(g.getStart(r),g.getWidth(r),(C+1<<8)+b)},u),h}function bBt(t,r,a,u,h){const p=t.getTypeChecker();let g=!1;function C(b){switch(b.kind){case 267:case 263:case 264:case 262:case 231:case 218:case 219:h.throwIfCancellationRequested()}if(!b||!LW(a,b.pos,b.getFullWidth())||b.getFullWidth()===0)return;const T=g;if((Gv(b)||PI(b))&&(g=!0),x7(b)&&(g=!1),ot(b)&&!g&&!xBt(b)&&!c7(b.escapedText)){let E=p.getSymbolAtLocation(b);if(E){E.flags&2097152&&(E=p.getAliasedSymbol(E));let N=CBt(E,zI(b));if(N!==void 0){let R=0;b.parent&&(ec(b.parent)||Urt.get(b.parent.kind)===N)&&b.parent.name===b&&(R=1),N===6&&zrt(b)&&(N=9),N=SBt(p,b,N);const F=E.valueDeclaration;if(F){const H=Rk(F),U=zb(F);H&256&&(R|=2),H&1024&&(R|=4),N!==0&&N!==2&&(H&8||U&2||E.getFlags()&8)&&(R|=8),(N===7||N===10)&&wBt(F,r)&&(R|=32),t.isSourceFileDefaultLibrary(F.getSourceFile())&&(R|=16)}else E.declarations&&E.declarations.some(H=>t.isSourceFileDefaultLibrary(H.getSourceFile()))&&(R|=16);u(b,N,R)}}}Uo(b,C),g=T}C(r)}function CBt(t,r){const a=t.getFlags();if(a&32)return 0;if(a&384)return 1;if(a&524288)return 5;if(a&64){if(r&2)return 2}else if(a&262144)return 4;let u=t.valueDeclaration||t.declarations&&t.declarations[0];return u&&ec(u)&&(u=jrt(u)),u&&Urt.get(u.kind)}function SBt(t,r,a){if(a===7||a===9||a===6){const u=t.getTypeAtLocation(r);if(u){const h=p=>p(u)||u.isUnion()&&u.types.some(p);if(a!==6&&h(p=>p.getConstructSignatures().length>0))return 0;if(h(p=>p.getCallSignatures().length>0)&&!h(p=>p.getProperties().length>0)||kBt(r))return a===9?11:10}}return a}function wBt(t,r){return ec(t)&&(t=jrt(t)),_s(t)?(!Os(t.parent.parent.parent)||lD(t.parent))&&t.getSourceFile()===r:Wu(t)?!Os(t.parent)&&t.getSourceFile()===r:!1}function jrt(t){for(;;)if(ec(t.parent.parent))t=t.parent.parent;else return t.parent.parent}function xBt(t){const r=t.parent;return r&&(H0(r)||l_(r)||Jv(r))}function kBt(t){for(;zrt(t);)t=t.parent;return la(t.parent)&&t.parent.expression===t}function zrt(t){return o_(t.parent)&&t.parent.right===t||Nr(t.parent)&&t.parent.name===t}var Urt=new Map([[260,7],[169,6],[172,9],[267,3],[266,1],[306,8],[263,0],[174,11],[262,10],[218,10],[173,11],[177,9],[178,9],[171,9],[264,2],[265,5],[168,4],[303,9],[304,9]]),qrt="0.8";function $rt(t,r,a,u){const h=_G(t)?new p6e(t,r,a):t===80?new Grt(80,r,a):t===81?new Krt(81,r,a):new Jrt(t,r,a);return h.parent=u,h.flags=u.flags&101441536,h}var p6e=class{constructor(t,r,a){this.pos=r,this.end=a,this.kind=t,this.id=0,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}assertHasRealPosition(t){j.assert(!W0(this.pos)&&!W0(this.end),t||"Node must have a real position for this operation")}getSourceFile(){return _n(this)}getStart(t,r){return this.assertHasRealPosition(),ex(this,t,r)}getFullStart(){return this.assertHasRealPosition(),this.pos}getEnd(){return this.assertHasRealPosition(),this.end}getWidth(t){return this.assertHasRealPosition(),this.getEnd()-this.getStart(t)}getFullWidth(){return this.assertHasRealPosition(),this.end-this.pos}getLeadingTriviaWidth(t){return this.assertHasRealPosition(),this.getStart(t)-this.pos}getFullText(t){return this.assertHasRealPosition(),(t||this.getSourceFile()).text.substring(this.pos,this.end)}getText(t){return this.assertHasRealPosition(),t||(t=this.getSourceFile()),t.text.substring(this.getStart(t),this.getEnd())}getChildCount(t){return this.getChildren(t).length}getChildAt(t,r){return this.getChildren(r)[t]}getChildren(t=_n(this)){return this.assertHasRealPosition("Node without a real position cannot be scanned and thus has no token nodes - use forEachChild and collect the result if that's fine"),Dle(this,t)??QEe(this,t,TBt(this,t))}getFirstToken(t){this.assertHasRealPosition();const r=this.getChildren(t);if(!r.length)return;const a=Fe(r,u=>u.kind<309||u.kind>351);return a.kind<166?a:a.getFirstToken(t)}getLastToken(t){this.assertHasRealPosition();const r=this.getChildren(t),a=rl(r);if(a)return a.kind<166?a:a.getLastToken(t)}forEachChild(t,r){return Uo(this,t,r)}};function TBt(t,r){const a=[];if(SG(t))return t.forEachChild(g=>{a.push(g)}),a;Uh.setText((r||t.getSourceFile()).text);let u=t.pos;const h=g=>{uY(a,u,g.pos,t),a.push(g),u=g.end},p=g=>{uY(a,u,g.pos,t),a.push(DBt(g,t)),u=g.end};return O(t.jsDoc,h),u=t.pos,t.forEachChild(h,p),uY(a,u,t.end,t),Uh.setText(void 0),a}function uY(t,r,a,u){for(Uh.resetTokenState(r);r<a;){const h=Uh.scan(),p=Uh.getTokenEnd();if(p<=a){if(h===80){if(eEe(u))continue;j.fail(`Did not expect ${j.formatSyntaxKind(u.kind)} to have an Identifier in its trivia`)}t.push($rt(h,r,p,u))}if(r=p,h===1)break}}function DBt(t,r){const a=$rt(352,t.pos,t.end,r),u=[];let h=t.pos;for(const p of t)uY(u,h,p.pos,r),u.push(p),h=p.end;return uY(u,h,t.end,r),a._children=u,a}var m6e=class{constructor(t,r,a){this.pos=r,this.end=a,this.kind=t,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.emitNode=void 0}getSourceFile(){return _n(this)}getStart(t,r){return ex(this,t,r)}getFullStart(){return this.pos}getEnd(){return this.end}getWidth(t){return this.getEnd()-this.getStart(t)}getFullWidth(){return this.end-this.pos}getLeadingTriviaWidth(t){return this.getStart(t)-this.pos}getFullText(t){return(t||this.getSourceFile()).text.substring(this.pos,this.end)}getText(t){return t||(t=this.getSourceFile()),t.text.substring(this.getStart(t),this.getEnd())}getChildCount(){return this.getChildren().length}getChildAt(t){return this.getChildren()[t]}getChildren(){return this.kind===1&&this.jsDoc||w}getFirstToken(){}getLastToken(){}forEachChild(){}},EBt=class{constructor(t,r){this.flags=t,this.escapedName=r,this.declarations=void 0,this.valueDeclaration=void 0,this.id=0,this.mergeId=0,this.parent=void 0,this.members=void 0,this.exports=void 0,this.exportSymbol=void 0,this.constEnumOnlyModule=void 0,this.isReferenced=void 0,this.lastAssignmentPos=void 0,this.links=void 0}getFlags(){return this.flags}get name(){return Eu(this)}getEscapedName(){return this.escapedName}getName(){return this.name}getDeclarations(){return this.declarations}getDocumentationComment(t){if(!this.documentationComment)if(this.documentationComment=w,!this.declarations&&Rv(this)&&this.links.target&&Rv(this.links.target)&&this.links.target.links.tupleLabelDeclaration){const r=this.links.target.links.tupleLabelDeclaration;this.documentationComment=dY([r],t)}else this.documentationComment=dY(this.declarations,t);return this.documentationComment}getContextualDocumentationComment(t,r){if(t){if(oS(t)&&(this.contextualGetAccessorDocumentationComment||(this.contextualGetAccessorDocumentationComment=dY($t(this.declarations,oS),r)),P(this.contextualGetAccessorDocumentationComment)))return this.contextualGetAccessorDocumentationComment;if(D1(t)&&(this.contextualSetAccessorDocumentationComment||(this.contextualSetAccessorDocumentationComment=dY($t(this.declarations,D1),r)),P(this.contextualSetAccessorDocumentationComment)))return this.contextualSetAccessorDocumentationComment}return this.getDocumentationComment(r)}getJsDocTags(t){return this.tags===void 0&&(this.tags=w,this.tags=i_e(this.declarations,t)),this.tags}getContextualJsDocTags(t,r){if(t){if(oS(t)&&(this.contextualGetAccessorTags||(this.contextualGetAccessorTags=i_e($t(this.declarations,oS),r)),P(this.contextualGetAccessorTags)))return this.contextualGetAccessorTags;if(D1(t)&&(this.contextualSetAccessorTags||(this.contextualSetAccessorTags=i_e($t(this.declarations,D1),r)),P(this.contextualSetAccessorTags)))return this.contextualSetAccessorTags}return this.getJsDocTags(r)}},Jrt=class extends m6e{constructor(t,r,a){super(t,r,a)}},Grt=class extends m6e{constructor(t,r,a){super(t,r,a)}get text(){return Fr(this)}},Krt=class extends m6e{constructor(t,r,a){super(t,r,a)}get text(){return Fr(this)}},IBt=class{constructor(t,r){this.flags=r,this.checker=t}getFlags(){return this.flags}getSymbol(){return this.symbol}getProperties(){return this.checker.getPropertiesOfType(this)}getProperty(t){return this.checker.getPropertyOfType(this,t)}getApparentProperties(){return this.checker.getAugmentedPropertiesOfType(this)}getCallSignatures(){return this.checker.getSignaturesOfType(this,0)}getConstructSignatures(){return this.checker.getSignaturesOfType(this,1)}getStringIndexType(){return this.checker.getIndexTypeOfType(this,0)}getNumberIndexType(){return this.checker.getIndexTypeOfType(this,1)}getBaseTypes(){return this.isClassOrInterface()?this.checker.getBaseTypes(this):void 0}isNullableType(){return this.checker.isNullableType(this)}getNonNullableType(){return this.checker.getNonNullableType(this)}getNonOptionalType(){return this.checker.getNonOptionalType(this)}getConstraint(){return this.checker.getBaseConstraintOfType(this)}getDefault(){return this.checker.getDefaultFromTypeParameter(this)}isUnion(){return!!(this.flags&1048576)}isIntersection(){return!!(this.flags&2097152)}isUnionOrIntersection(){return!!(this.flags&3145728)}isLiteral(){return!!(this.flags&2432)}isStringLiteral(){return!!(this.flags&128)}isNumberLiteral(){return!!(this.flags&256)}isTypeParameter(){return!!(this.flags&262144)}isClassOrInterface(){return!!(Or(this)&3)}isClass(){return!!(Or(this)&1)}isIndexType(){return!!(this.flags&4194304)}get typeArguments(){if(Or(this)&4)return this.checker.getTypeArguments(this)}},NBt=class{constructor(t,r){this.flags=r,this.checker=t}getDeclaration(){return this.declaration}getTypeParameters(){return this.typeParameters}getParameters(){return this.parameters}getReturnType(){return this.checker.getReturnTypeOfSignature(this)}getTypeParameterAtPosition(t){const r=this.checker.getParameterType(this,t);if(r.isIndexType()&&l7(r.type)){const a=r.type.getConstraint();if(a)return this.checker.getIndexType(a)}return r}getDocumentationComment(){return this.documentationComment||(this.documentationComment=dY(KL(this.declaration),this.checker))}getJsDocTags(){return this.jsDocTags||(this.jsDocTags=i_e(KL(this.declaration),this.checker))}};function Xrt(t){return Wk(t).some(r=>r.tagName.text==="inheritDoc"||r.tagName.text==="inheritdoc")}function i_e(t,r){if(!t)return w;let a=S2.getJsDocTagsFromDeclarations(t,r);if(r&&(a.length===0||t.some(Xrt))){const u=new Set;for(const h of t){const p=Qrt(r,h,g=>{var C;if(!u.has(g))return u.add(g),h.kind===177||h.kind===178?g.getContextualJsDocTags(h,r):((C=g.declarations)==null?void 0:C.length)===1?g.getJsDocTags(r):void 0});p&&(a=[...p,...a])}}return a}function dY(t,r){if(!t)return w;let a=S2.getJsDocCommentsFromDeclarations(t,r);if(r&&(a.length===0||t.some(Xrt))){const u=new Set;for(const h of t){const p=Qrt(r,h,g=>{if(!u.has(g))return u.add(g),h.kind===177||h.kind===178?g.getContextualDocumentationComment(h,r):g.getDocumentationComment(r)});p&&(a=a.length===0?p.slice():p.concat(tO(),a))}}return a}function Qrt(t,r,a){var u;const h=((u=r.parent)==null?void 0:u.kind)===176?r.parent.parent:r.parent;if(!h)return;const p=bd(r);return J(F8(h),g=>{const C=t.getTypeAtLocation(g),b=p&&C.symbol?t.getTypeOfSymbol(C.symbol):C,T=t.getPropertyOfType(b,r.symbol.name);return T?a(T):void 0})}var LBt=class extends p6e{constructor(t,r,a){super(t,r,a)}update(t,r){return jle(this,t,r)}getLineAndCharacterOfPosition(t){return Ia(this,t)}getLineStarts(){return Lv(this)}getPositionOfLineAndCharacter(t,r,a){return nG(Lv(this),t,r,this.text,a)}getLineEndOfPosition(t){const{line:r}=this.getLineAndCharacterOfPosition(t),a=this.getLineStarts();let u;r+1>=a.length&&(u=this.getEnd()),u||(u=a[r+1]-1);const h=this.getFullText();return h[u]===`
+`&&h[u-1]==="\r"?u-1:u}getNamedDeclarations(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations}computeNamedDeclarations(){const t=Of();return this.forEachChild(h),t;function r(p){const g=u(p);g&&t.add(g,p)}function a(p){let g=t.get(p);return g||t.set(p,g=[]),g}function u(p){const g=oG(p);return g&&(Ka(g)&&Nr(g.expression)?g.expression.name.text:id(g)?yj(g):void 0)}function h(p){switch(p.kind){case 262:case 218:case 174:case 173:const g=p,C=u(g);if(C){const E=a(C),N=rl(E);N&&g.parent===N.parent&&g.symbol===N.symbol?g.body&&!N.body&&(E[E.length-1]=g):E.push(g)}Uo(p,h);break;case 263:case 231:case 264:case 265:case 266:case 267:case 271:case 281:case 276:case 273:case 274:case 177:case 178:case 187:r(p),Uo(p,h);break;case 169:if(!Zr(p,31))break;case 260:case 208:{const E=p;if(ta(E.name)){Uo(E.name,h);break}E.initializer&&h(E.initializer)}case 306:case 172:case 171:r(p);break;case 278:const b=p;b.exportClause&&(Xm(b.exportClause)?O(b.exportClause.elements,h):h(b.exportClause.name));break;case 272:const T=p.importClause;T&&(T.name&&r(T.name),T.namedBindings&&(T.namedBindings.kind===274?r(T.namedBindings):O(T.namedBindings.elements,h)));break;case 226:Bu(p)!==0&&r(p);default:Uo(p,h)}}}},PBt=class{constructor(t,r,a){this.fileName=t,this.text=r,this.skipTrivia=a||(u=>u)}getLineAndCharacterOfPosition(t){return Ia(this,t)}};function ABt(){return{getNodeConstructor:()=>p6e,getTokenConstructor:()=>Jrt,getIdentifierConstructor:()=>Grt,getPrivateIdentifierConstructor:()=>Krt,getSourceFileConstructor:()=>LBt,getSymbolConstructor:()=>EBt,getTypeConstructor:()=>IBt,getSignatureConstructor:()=>NBt,getSourceMapSourceConstructor:()=>PBt}}function Bj(t){let r=!0;for(const u in t)if(Li(t,u)&&!Zrt(u)){r=!1;break}if(r)return t;const a={};for(const u in t)if(Li(t,u)){const h=Zrt(u)?u:u.charAt(0).toLowerCase()+u.substr(1);a[h]=t[u]}return a}function Zrt(t){return!t.length||t.charAt(0)===t.charAt(0).toLowerCase()}function Wj(t){return t?qt(t,r=>r.text).join(""):""}function fY(){return{target:1,jsx:1}}function n_e(){return wh.getSupportedErrorCodes()}var OBt=class{constructor(t){this.host=t}getCurrentSourceFile(t){var r,a,u,h,p,g,C,b;const T=this.host.getScriptSnapshot(t);if(!T)throw new Error("Could not find file: '"+t+"'.");const E=nhe(t,this.host),N=this.host.getScriptVersion(t);let R;if(this.currentFileName!==t){const F={languageVersion:99,impliedNodeFormat:ZH(ol(t,this.host.getCurrentDirectory(),((u=(a=(r=this.host).getCompilerHost)==null?void 0:a.call(r))==null?void 0:u.getCanonicalFileName)||hS(this.host)),(b=(C=(g=(p=(h=this.host).getCompilerHost)==null?void 0:p.call(h))==null?void 0:g.getModuleResolutionCache)==null?void 0:C.call(g))==null?void 0:b.getPackageJsonInfoCache(),this.host,this.host.getCompilationSettings()),setExternalModuleIndicator:$V(this.host.getCompilationSettings()),jsDocParsingMode:0};R=hY(t,T,F,N,!0,E)}else if(this.currentFileVersion!==N){const F=T.getChangeRange(this.currentFileScriptSnapshot);R=r_e(this.currentSourceFile,T,N,F)}return R&&(this.currentFileVersion=N,this.currentFileName=t,this.currentFileScriptSnapshot=T,this.currentSourceFile=R),this.currentSourceFile}};function Yrt(t,r,a){t.version=a,t.scriptSnapshot=r}function hY(t,r,a,u,h,p){const g=ZP(t,uA(r),a,h,p);return Yrt(g,r,u),g}function r_e(t,r,a,u,h){if(u&&a!==t.version){let g;const C=u.span.start!==0?t.text.substr(0,u.span.start):"",b=au(u.span)!==t.text.length?t.text.substr(au(u.span)):"";if(u.newLength===0)g=C&&b?C+b:C||b;else{const E=r.getText(u.span.start,u.span.start+u.newLength);g=C&&b?C+E+b:C?C+E:E+b}const T=jle(t,g,u,h);return Yrt(T,r,a),T.nameTable=void 0,t!==T&&t.scriptSnapshot&&(t.scriptSnapshot.dispose&&t.scriptSnapshot.dispose(),t.scriptSnapshot=void 0),T}const p={languageVersion:t.languageVersion,impliedNodeFormat:t.impliedNodeFormat,setExternalModuleIndicator:t.setExternalModuleIndicator,jsDocParsingMode:t.jsDocParsingMode};return hY(t.fileName,r,p,a,!0,t.scriptKind)}var MBt={isCancellationRequested:w1,throwIfCancellationRequested:Tc},RBt=class{constructor(t){this.cancellationToken=t}isCancellationRequested(){return this.cancellationToken.isCancellationRequested()}throwIfCancellationRequested(){var t;if(this.isCancellationRequested())throw(t=Zn)==null||t.instant(Zn.Phase.Session,"cancellationThrown",{kind:"CancellationTokenObject"}),new t8}},g6e=class{constructor(t,r=20){this.hostCancellationToken=t,this.throttleWaitMilliseconds=r,this.lastCancellationCheckTime=0}isCancellationRequested(){const t=sl();return Math.abs(t-this.lastCancellationCheckTime)>=this.throttleWaitMilliseconds?(this.lastCancellationCheckTime=t,this.hostCancellationToken.isCancellationRequested()):!1}throwIfCancellationRequested(){var t;if(this.isCancellationRequested())throw(t=Zn)==null||t.instant(Zn.Phase.Session,"cancellationThrown",{kind:"ThrottledCancellationToken"}),new t8}},est=["getSemanticDiagnostics","getSuggestionDiagnostics","getCompilerOptionsDiagnostics","getSemanticClassifications","getEncodedSemanticClassifications","getCodeFixesAtPosition","getCombinedCodeFix","applyCodeActionCommand","organizeImports","getEditsForFileRename","getEmitOutput","getApplicableRefactors","getEditsForRefactor","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","provideInlayHints","getSupportedCodeFixes","getPasteEdits"],FBt=[...est,"getCompletionsAtPosition","getCompletionEntryDetails","getCompletionEntrySymbol","getSignatureHelpItems","getQuickInfoAtPosition","getDefinitionAtPosition","getDefinitionAndBoundSpan","getImplementationAtPosition","getTypeDefinitionAtPosition","getReferencesAtPosition","findReferences","getDocumentHighlights","getNavigateToItems","getRenameInfo","findRenameLocations","getApplicableRefactors"];function y6e(t,r=jAe(t.useCaseSensitiveFileNames&&t.useCaseSensitiveFileNames(),t.getCurrentDirectory(),t.jsDocParsingMode),a){var u;let h;a===void 0?h=0:typeof a=="boolean"?h=a?2:0:h=a;const p=new OBt(t);let g,C,b=0;const T=t.getCancellationToken?new RBt(t.getCancellationToken()):MBt,E=t.getCurrentDirectory();kDe((u=t.getLocalizedDiagnosticMessages)==null?void 0:u.bind(t));function N(Pt){t.log&&t.log(Pt)}const R=yP(t),F=Mf(R),H=i4e({useCaseSensitiveFileNames:()=>R,getCurrentDirectory:()=>E,getProgram:Z,fileExists:to(t,t.fileExists),readFile:to(t,t.readFile),getDocumentPositionMapper:to(t,t.getDocumentPositionMapper),getSourceFileLike:to(t,t.getSourceFileLike),log:N});function U(Pt){const Bt=g.getSourceFile(Pt);if(!Bt){const fi=new Error(`Could not find source file: '${Pt}'.`);throw fi.ProgramFiles=g.getSourceFiles().map(wi=>wi.fileName),fi}return Bt}function q(){t.updateFromProject&&!t.updateFromProjectInProgress?t.updateFromProject():X()}function X(){var Pt,Bt,fi;if(j.assert(h!==2),t.getProjectVersion){const go=t.getProjectVersion();if(go){if(C===go&&!((Pt=t.hasChangedAutomaticTypeDirectiveNames)!=null&&Pt.call(t)))return;C=go}}const wi=t.getTypeRootsVersion?t.getTypeRootsVersion():0;b!==wi&&(N("TypeRoots version has changed; provide new program"),g=void 0,b=wi);const Ri=t.getScriptFileNames().slice(),Ai=t.getCompilationSettings()||fY(),Xn=t.hasInvalidatedResolutions||w1,Di=to(t,t.hasInvalidatedLibResolutions)||w1,on=to(t,t.hasChangedAutomaticTypeDirectiveNames),zi=(Bt=t.getProjectReferences)==null?void 0:Bt.call(t);let cn,vi={getSourceFile:kh,getSourceFileByPath:md,getCancellationToken:()=>T,getCanonicalFileName:F,useCaseSensitiveFileNames:()=>R,getNewLine:()=>mS(Ai),getDefaultLibFileName:go=>t.getDefaultLibFileName(go),writeFile:Tc,getCurrentDirectory:()=>E,fileExists:go=>t.fileExists(go),readFile:go=>t.readFile&&t.readFile(go),getSymlinkCache:to(t,t.getSymlinkCache),realpath:to(t,t.realpath),directoryExists:go=>B0(go,t),getDirectories:go=>t.getDirectories?t.getDirectories(go):[],readDirectory:(go,pc,mc,oo,tc)=>(j.checkDefined(t.readDirectory,"'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"),t.readDirectory(go,pc,mc,oo,tc)),onReleaseOldSourceFile:Jo,onReleaseParsedCommandLine:ja,hasInvalidatedResolutions:Xn,hasInvalidatedLibResolutions:Di,hasChangedAutomaticTypeDirectiveNames:on,trace:to(t,t.trace),resolveModuleNames:to(t,t.resolveModuleNames),getModuleResolutionCache:to(t,t.getModuleResolutionCache),createHash:to(t,t.createHash),resolveTypeReferenceDirectives:to(t,t.resolveTypeReferenceDirectives),resolveModuleNameLiterals:to(t,t.resolveModuleNameLiterals),resolveTypeReferenceDirectiveReferences:to(t,t.resolveTypeReferenceDirectiveReferences),resolveLibrary:to(t,t.resolveLibrary),useSourceOfProjectReferenceRedirect:to(t,t.useSourceOfProjectReferenceRedirect),getParsedCommandLine:Zc,jsDocParsingMode:t.jsDocParsingMode};const qo=vi.getSourceFile,{getSourceFileWithCache:Wo}=Q7(vi,go=>ol(go,E,F),(...go)=>qo.call(vi,...go));vi.getSourceFile=Wo,(fi=t.setCompilerHost)==null||fi.call(t,vi);const $o={useCaseSensitiveFileNames:R,fileExists:go=>vi.fileExists(go),readFile:go=>vi.readFile(go),directoryExists:go=>vi.directoryExists(go),getDirectories:go=>vi.getDirectories(go),realpath:vi.realpath,readDirectory:(...go)=>vi.readDirectory(...go),trace:vi.trace,getCurrentDirectory:vi.getCurrentDirectory,onUnRecoverableConfigFileDiagnostic:Tc},Lc=r.getKeyForCompilationSettings(Ai);let vu=new Set;if(bde(g,Ri,Ai,(go,pc)=>t.getScriptVersion(pc),go=>vi.fileExists(go),Xn,Di,on,Zc,zi)){vi=void 0,cn=void 0,vu=void 0;return}g=YH({rootNames:Ri,options:Ai,host:vi,oldProgram:g,projectReferences:zi}),vi=void 0,cn=void 0,vu=void 0,H.clearCache(),g.getTypeChecker();return;function Zc(go){const pc=ol(go,E,F),mc=cn==null?void 0:cn.get(pc);if(mc!==void 0)return mc||void 0;const oo=t.getParsedCommandLine?t.getParsedCommandLine(go):Ls(go);return(cn||(cn=new Map)).set(pc,oo||!1),oo}function Ls(go){const pc=kh(go,100);if(pc)return pc.path=ol(go,E,F),pc.resolvedPath=pc.path,pc.originalFileName=pc.fileName,PH(pc,$o,wo(ts(go),E),void 0,wo(go,E))}function ja(go,pc,mc){var oo;t.getParsedCommandLine?(oo=t.onReleaseParsedCommandLine)==null||oo.call(t,go,pc,mc):pc&&wf(pc.sourceFile,mc)}function wf(go,pc){const mc=r.getKeyForCompilationSettings(pc);r.releaseDocumentWithKey(go.resolvedPath,mc,go.scriptKind,go.impliedNodeFormat)}function Jo(go,pc,mc,oo){var tc;wf(go,pc),(tc=t.onReleaseOldSourceFile)==null||tc.call(t,go,pc,mc,oo)}function kh(go,pc,mc,oo){return md(go,ol(go,E,F),pc,mc,oo)}function md(go,pc,mc,oo,tc){j.assert(vi,"getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");const ki=t.getScriptSnapshot(go);if(!ki)return;const Gc=nhe(go,t),uh=t.getScriptVersion(go);if(!tc){const sd=g&&g.getSourceFileByPath(pc);if(sd){if(Gc===sd.scriptKind||vu.has(sd.resolvedPath))return r.updateDocumentWithKey(go,pc,t,Lc,ki,uh,Gc,mc);r.releaseDocumentWithKey(sd.resolvedPath,r.getKeyForCompilationSettings(g.getCompilerOptions()),sd.scriptKind,sd.impliedNodeFormat),vu.add(sd.resolvedPath)}}return r.acquireDocumentWithKey(go,pc,t,Lc,ki,uh,Gc,mc)}}function Z(){if(h===2){j.assert(g===void 0);return}return q(),g}function Q(){var Pt;return(Pt=t.getPackageJsonAutoImportProvider)==null?void 0:Pt.call(t)}function re(Pt,Bt){const fi=g.getTypeChecker(),wi=Ri();if(!wi)return!1;for(const Xn of Pt)for(const Di of Xn.references){const on=Ai(Di);if(j.assertIsDefined(on),Bt.has(Di)||kl.isDeclarationOfSymbol(on,wi)){Bt.add(Di),Di.isDefinition=!0;const zi=AZ(Di,H,to(t,t.fileExists));zi&&Bt.add(zi)}else Di.isDefinition=!1}return!0;function Ri(){for(const Xn of Pt)for(const Di of Xn.references){if(Bt.has(Di)){const zi=Ai(Di);return j.assertIsDefined(zi),fi.getSymbolAtLocation(zi)}const on=AZ(Di,H,to(t,t.fileExists));if(on&&Bt.has(on)){const zi=Ai(on);if(zi)return fi.getSymbolAtLocation(zi)}}}function Ai(Xn){const Di=g.getSourceFile(Xn.fileName);if(!Di)return;const on=R_(Di,Xn.textSpan.start);return kl.Core.getAdjustedNode(on,{use:kl.FindReferencesUse.References})}}function oe(){if(g){const Pt=r.getKeyForCompilationSettings(g.getCompilerOptions());O(g.getSourceFiles(),Bt=>r.releaseDocumentWithKey(Bt.resolvedPath,Pt,Bt.scriptKind,Bt.impliedNodeFormat)),g=void 0}}function pe(){oe(),t=void 0}function de(Pt){return q(),g.getSyntacticDiagnostics(U(Pt),T).slice()}function ue(Pt){q();const Bt=U(Pt),fi=g.getSemanticDiagnostics(Bt,T);if(!Q_(g.getCompilerOptions()))return fi.slice();const wi=g.getDeclarationDiagnostics(Bt,T);return[...fi,...wi]}function Ie(Pt,Bt){q();const fi=U(Pt),wi=g.getCompilerOptions();if(p3(fi,wi,g)||!r7(fi,wi)||g.getCachedSemanticDiagnostics(fi))return;const Ri=we(fi,Bt);if(!Ri)return;const Ai=Hoe(Ri.map(Di=>Fu(Di.getFullStart(),Di.getEnd())));return{diagnostics:g.getSemanticDiagnostics(fi,T,Ri).slice(),spans:Ai}}function we(Pt,Bt){const fi=[],wi=Hoe(Bt.map(Ri=>DS(Ri)));for(const Ri of wi){const Ai=he(Pt,Ri);if(!Ai)return;fi.push(...Ai)}if(fi.length)return fi}function he(Pt,Bt){if(Voe(Bt,Pt))return;const fi=hj(Pt,au(Bt))||Pt,wi=Qi(fi,Ai=>Xke(Ai,Bt)),Ri=[];if(Ae(Bt,wi,Ri),Pt.end===Bt.start+Bt.length&&Ri.push(Pt.endOfFileToken),!Ft(Ri,Os))return Ri}function Ae(Pt,Bt,fi){return ke(Bt,Pt)?Voe(Pt,Bt)?(Te(Bt,fi),!0):hA(Bt)?De(Pt,Bt,fi):ss(Bt)?qe(Pt,Bt,fi):(Te(Bt,fi),!0):!1}function ke(Pt,Bt){const fi=Bt.start+Bt.length;return Pt.pos<fi&&Pt.end>Bt.start}function Te(Pt,Bt){for(;Pt.parent&&!rEe(Pt);)Pt=Pt.parent;Bt.push(Pt)}function De(Pt,Bt,fi){const wi=[];return Bt.statements.filter(Ai=>Ae(Pt,Ai,wi)).length===Bt.statements.length?(Te(Bt,fi),!0):(fi.push(...wi),!1)}function qe(Pt,Bt,fi){var wi,Ri,Ai;const Xn=zi=>e2e(zi,Pt);if((wi=Bt.modifiers)!=null&&wi.some(Xn)||Bt.name&&Xn(Bt.name)||(Ri=Bt.typeParameters)!=null&&Ri.some(Xn)||(Ai=Bt.heritageClauses)!=null&&Ai.some(Xn))return Te(Bt,fi),!0;const Di=[];return Bt.members.filter(zi=>Ae(Pt,zi,Di)).length===Bt.members.length?(Te(Bt,fi),!0):(fi.push(...Di),!1)}function se(Pt){return q(),Lhe(U(Pt),g,T)}function Ne(){return q(),[...g.getOptionsDiagnostics(T),...g.getGlobalDiagnostics(T)]}function Oe(Pt,Bt,fi=Bg,wi){const Ri={...fi,includeCompletionsForModuleExports:fi.includeCompletionsForModuleExports||fi.includeExternalModuleExports,includeCompletionsWithInsertText:fi.includeCompletionsWithInsertText||fi.includeInsertTextCompletions};return q(),CA.getCompletionsAtPosition(t,g,N,U(Pt),Bt,Ri,fi.triggerCharacter,fi.triggerKind,T,wi&&pd.getFormatContext(wi,t),fi.includeSymbol)}function He(Pt,Bt,fi,wi,Ri,Ai=Bg,Xn){return q(),CA.getCompletionEntryDetails(g,N,U(Pt),Bt,{name:fi,source:Ri,data:Xn},t,wi&&pd.getFormatContext(wi,t),Ai,T)}function Pe(Pt,Bt,fi,wi,Ri=Bg){return q(),CA.getCompletionEntrySymbol(g,N,U(Pt),Bt,{name:fi,source:wi},t,Ri)}function We(Pt,Bt){q();const fi=U(Pt),wi=R_(fi,Bt);if(wi===fi)return;const Ri=g.getTypeChecker(),Ai=Nt(wi),Xn=HBt(Ai,Ri);if(!Xn||Ri.isUnknownSymbol(Xn)){const vi=$e(fi,Ai,Bt)?Ri.getTypeAtLocation(Ai):void 0;return vi&&{kind:"",kindModifiers:"",textSpan:f_(Ai,fi),displayParts:Ri.runWithCancellationToken(T,qo=>Cj(qo,vi,UI(Ai))),documentation:vi.symbol?vi.symbol.getDocumentationComment(Ri):void 0,tags:vi.symbol?vi.symbol.getJsDocTags(Ri):void 0}}const{symbolKind:Di,displayParts:on,documentation:zi,tags:cn}=Ri.runWithCancellationToken(T,vi=>NS.getSymbolDisplayPartsDocumentationAndSymbolKind(vi,Xn,fi,UI(Ai),Ai));return{kind:Di,kindModifiers:NS.getSymbolModifiers(Ri,Xn),textSpan:f_(Ai,fi),displayParts:on,documentation:zi,tags:cn}}function ze(Pt,Bt){return q(),_pe.pasteEditsProvider(U(Pt.targetFile),Pt.pastedText,Pt.pasteLocations,Pt.copiedFrom?{file:U(Pt.copiedFrom.file),range:Pt.copiedFrom.range}:void 0,t,Pt.preferences,pd.getFormatContext(Bt,t),T)}function Nt(Pt){return rD(Pt.parent)&&Pt.pos===Pt.parent.pos?Pt.parent.expression:b3(Pt.parent)&&Pt.pos===Pt.parent.pos||J6(Pt.parent)&&Pt.parent.name===Pt||j0(Pt.parent)?Pt.parent:Pt}function $e(Pt,Bt,fi){switch(Bt.kind){case 80:return Bt.flags&16777216&&!nr(Bt)&&(Bt.parent.kind===171&&Bt.parent.name===Bt||Qi(Bt,wi=>wi.kind===169))?!1:!Sfe(Bt)&&!wfe(Bt)&&!O0(Bt.parent);case 211:case 166:return!kS(Pt,fi);case 110:case 197:case 108:case 202:return!0;case 236:return J6(Bt);default:return!1}}function et(Pt,Bt,fi,wi){return q(),uO.getDefinitionAtPosition(g,U(Pt),Bt,fi,wi)}function Me(Pt,Bt){return q(),uO.getDefinitionAndBoundSpan(g,U(Pt),Bt)}function ut(Pt,Bt){return q(),uO.getTypeDefinitionAtPosition(g.getTypeChecker(),U(Pt),Bt)}function wt(Pt,Bt){return q(),kl.getImplementationsAtPosition(g,T,g.getSourceFiles(),U(Pt),Bt)}function Et(Pt,Bt,fi){const wi=ca(Pt);j.assert(fi.some(Xn=>ca(Xn)===wi)),q();const Ri=es(fi,Xn=>g.getSourceFile(Xn)),Ai=U(Pt);return QZ.getDocumentHighlights(g,T,Ai,Bt,Ri)}function dt(Pt,Bt,fi,wi,Ri){q();const Ai=U(Pt),Xn=CZ(R_(Ai,Bt));if(RY.nodeIsEligibleForRename(Xn))if(ot(Xn)&&(z1(Xn.parent)||oD(Xn.parent))&&s3(Xn.escapedText)){const{openingElement:Di,closingElement:on}=Xn.parent.parent;return[Di,on].map(zi=>{const cn=f_(zi.tagName,Ai);return{fileName:Ai.fileName,textSpan:cn,...kl.toContextSpan(cn,Ai,zi.parent)}})}else{const Di=$p(Ai,Ri??Bg),on=typeof Ri=="boolean"?Ri:Ri==null?void 0:Ri.providePrefixAndSuffixTextForRename;return Ei(Xn,Bt,{findInStrings:fi,findInComments:wi,providePrefixAndSuffixTextForRename:on,use:kl.FindReferencesUse.Rename},(zi,cn,vi)=>kl.toRenameLocation(zi,cn,vi,on||!1,Di))}}function zt(Pt,Bt){return q(),Ei(R_(U(Pt),Bt),Bt,{use:kl.FindReferencesUse.References},kl.toReferenceEntry)}function Ei(Pt,Bt,fi,wi){q();const Ri=fi&&fi.use===kl.FindReferencesUse.Rename?g.getSourceFiles().filter(Ai=>!g.isSourceFileDefaultLibrary(Ai)):g.getSourceFiles();return kl.findReferenceOrRenameEntries(g,T,Ri,Pt,Bt,fi,wi)}function tn(Pt,Bt){return q(),kl.findReferencedSymbols(g,T,g.getSourceFiles(),U(Pt),Bt)}function xn(Pt){return q(),kl.Core.getReferencesForFileName(Pt,g,g.getSourceFiles()).map(kl.toReferenceEntry)}function Pn(Pt,Bt,fi,wi=!1,Ri=!1){q();const Ai=fi?[U(fi)]:g.getSourceFiles();return dnt(Ai,g.getTypeChecker(),T,Pt,Bt,wi,Ri)}function _i(Pt,Bt,fi){q();const wi=U(Pt),Ri=t.getCustomTransformers&&t.getCustomTransformers();return OLe(g,wi,!!Bt,T,Ri,fi)}function Fi(Pt,Bt,{triggerReason:fi}=Bg){q();const wi=U(Pt);return ez.getSignatureHelpItems(g,wi,Bt,fi,T)}function On(Pt){return p.getCurrentSourceFile(Pt)}function pn(Pt,Bt,fi){const wi=p.getCurrentSourceFile(Pt),Ri=R_(wi,Bt);if(Ri===wi)return;switch(Ri.kind){case 211:case 166:case 11:case 97:case 112:case 106:case 108:case 110:case 197:case 80:break;default:return}let Ai=Ri;for(;;)if(K3(Ai)||QPe(Ai))Ai=Ai.parent;else if(kfe(Ai))if(Ai.parent.parent.kind===267&&Ai.parent.parent.body===Ai.parent)Ai=Ai.parent.parent.name;else break;else break;return Fu(Ai.getStart(),Ri.getEnd())}function qr(Pt,Bt){const fi=p.getCurrentSourceFile(Pt);return o_e.spanInSourceFileAtLocation(fi,Bt)}function Fs(Pt){return pnt(p.getCurrentSourceFile(Pt),T)}function ko(Pt){return mnt(p.getCurrentSourceFile(Pt),T)}function ls(Pt,Bt,fi){return q(),(fi||"original")==="2020"?Hrt(g,T,U(Pt),Bt):VAe(g.getTypeChecker(),T,U(Pt),g.getClassifiableNames(),Bt)}function Qs(Pt,Bt,fi){return q(),(fi||"original")==="original"?whe(g.getTypeChecker(),T,U(Pt),g.getClassifiableNames(),Bt):_6e(g,T,U(Pt),Bt)}function Mn(Pt,Bt){return HAe(T,p.getCurrentSourceFile(Pt),Bt)}function Zs(Pt,Bt){return xhe(T,p.getCurrentSourceFile(Pt),Bt)}function at(Pt){const Bt=p.getCurrentSourceFile(Pt);return Y_e.collectElements(Bt,T)}const yi=new Map(Object.entries({19:20,21:22,23:24,32:30}));yi.forEach((Pt,Bt)=>yi.set(Pt.toString(),Number(Bt)));function Sn(Pt,Bt){const fi=p.getCurrentSourceFile(Pt),wi=Q3(fi,Bt),Ri=wi.getStart(fi)===Bt?yi.get(wi.kind.toString()):void 0,Ai=Ri&&Uc(wi.parent,Ri,fi);return Ai?[f_(wi,fi),f_(Ai,fi)].sort((Xn,Di)=>Xn.start-Di.start):w}function dr(Pt,Bt,fi){let wi=sl();const Ri=Bj(fi),Ai=p.getCurrentSourceFile(Pt);N("getIndentationAtPosition: getCurrentSourceFile: "+(sl()-wi)),wi=sl();const Xn=pd.SmartIndenter.getIndentation(Bt,Ai,Ri);return N("getIndentationAtPosition: computeIndentation : "+(sl()-wi)),Xn}function us(Pt,Bt,fi,wi){const Ri=p.getCurrentSourceFile(Pt);return pd.formatSelection(Bt,fi,Ri,pd.getFormatContext(Bj(wi),t))}function Xr(Pt,Bt){return pd.formatDocument(p.getCurrentSourceFile(Pt),pd.getFormatContext(Bj(Bt),t))}function Gs(Pt,Bt,fi,wi){const Ri=p.getCurrentSourceFile(Pt),Ai=pd.getFormatContext(Bj(wi),t);if(!kS(Ri,Bt))switch(fi){case"{":return pd.formatOnOpeningCurly(Bt,Ri,Ai);case"}":return pd.formatOnClosingCurly(Bt,Ri,Ai);case";":return pd.formatOnSemicolon(Bt,Ri,Ai);case`
+`:return pd.formatOnEnter(Bt,Ri,Ai)}return[]}function ma(Pt,Bt,fi,wi,Ri,Ai=Bg){q();const Xn=U(Pt),Di=Fu(Bt,fi),on=pd.getFormatContext(Ri,t);return Rr(Wb(wi,Hw,_l),zi=>(T.throwIfCancellationRequested(),wh.getFixes({errorCode:zi,sourceFile:Xn,span:Di,program:g,host:t,cancellationToken:T,formatContext:on,preferences:Ai})))}function ka(Pt,Bt,fi,wi=Bg){q(),j.assert(Pt.type==="file");const Ri=U(Pt.fileName),Ai=pd.getFormatContext(fi,t);return wh.getAllFixes({fixId:Bt,sourceFile:Ri,program:g,host:t,cancellationToken:T,formatContext:Ai,preferences:wi})}function Ji(Pt,Bt,fi=Bg){q(),j.assert(Pt.type==="file");const wi=U(Pt.fileName);if(oP(wi))return w;const Ri=pd.getFormatContext(Bt,t),Ai=Pt.mode??(Pt.skipDestructiveCodeActions?"SortAndCombine":"All");return w2.organizeImports(wi,Ri,t,g,fi,Ai)}function ac(Pt,Bt,fi,wi=Bg){return UAe(Z(),Pt,Bt,t,pd.getFormatContext(fi,t),wi,H)}function St(Pt,Bt){const fi=typeof Pt=="string"?Bt:Pt;return Ao(fi)?Promise.all(fi.map(wi=>ri(wi))):ri(fi)}function ri(Pt){const Bt=fi=>ol(fi,E,F);return j.assertEqual(Pt.type,"install package"),t.installPackage?t.installPackage({fileName:Bt(Pt.file),packageName:Pt.packageName}):Promise.reject("Host does not implement `installPackage`")}function xe(Pt,Bt,fi,wi){const Ri=wi?pd.getFormatContext(wi,t).options:void 0;return S2.getDocCommentTemplateAtPosition(rC(t,Ri),p.getCurrentSourceFile(Pt),Bt,fi)}function pt(Pt,Bt,fi){if(fi===60)return!1;const wi=p.getCurrentSourceFile(Pt);if(lA(wi,Bt))return!1;if(rAe(wi,Bt))return fi===123;if(Pfe(wi,Bt))return!1;switch(fi){case 39:case 34:case 96:return!kS(wi,Bt)}return!0}function Se(Pt,Bt){const fi=p.getCurrentSourceFile(Pt),wi=xd(Bt,fi);if(!wi)return;const Ri=wi.kind===32&&z1(wi.parent)?wi.parent.parent:RP(wi)&&Gv(wi.parent)?wi.parent:void 0;if(Ri&&ii(Ri))return{newText:`</${Ri.openingElement.tagName.getText(fi)}>`};const Ai=wi.kind===32&&AI(wi.parent)?wi.parent.parent:RP(wi)&&aD(wi.parent)?wi.parent:void 0;if(Ai&&vt(Ai))return{newText:"</>"}}function Ze(Pt,Bt){const fi=p.getCurrentSourceFile(Pt),wi=xd(Bt,fi);if(!wi||wi.parent.kind===307)return;const Ri="[a-zA-Z0-9:\\-\\._$]*";if(aD(wi.parent.parent)){const Ai=wi.parent.parent.openingFragment,Xn=wi.parent.parent.closingFragment;if(oP(Ai)||oP(Xn))return;const Di=Ai.getStart(fi)+1,on=Xn.getStart(fi)+2;return Bt!==Di&&Bt!==on?void 0:{ranges:[{start:Di,length:0},{start:on,length:0}],wordPattern:Ri}}else{const Ai=Qi(wi.parent,Wo=>!!(z1(Wo)||oD(Wo)));if(!Ai)return;j.assert(z1(Ai)||oD(Ai),"tag should be opening or closing element");const Xn=Ai.parent.openingElement,Di=Ai.parent.closingElement,on=Xn.tagName.getStart(fi),zi=Xn.tagName.end,cn=Di.tagName.getStart(fi),vi=Di.tagName.end;return on===Xn.getStart(fi)||cn===Di.getStart(fi)||zi===Xn.getEnd()||vi===Di.getEnd()||!(on<=Bt&&Bt<=zi||cn<=Bt&&Bt<=vi)||Xn.tagName.getText(fi)!==Di.tagName.getText(fi)?void 0:{ranges:[{start:on,length:zi-on},{start:cn,length:vi-cn}],wordPattern:Ri}}}function gt(Pt,Bt){return{lineStarts:Pt.getLineStarts(),firstLine:Pt.getLineAndCharacterOfPosition(Bt.pos).line,lastLine:Pt.getLineAndCharacterOfPosition(Bt.end).line}}function Dt(Pt,Bt,fi){const wi=p.getCurrentSourceFile(Pt),Ri=[],{lineStarts:Ai,firstLine:Xn,lastLine:Di}=gt(wi,Bt);let on=fi||!1,zi=Number.MAX_VALUE;const cn=new Map,vi=new RegExp(/\S/),qo=wZ(wi,Ai[Xn]),Wo=qo?"{/*":"//";for(let $o=Xn;$o<=Di;$o++){const Lc=wi.text.substring(Ai[$o],wi.getLineEndOfPosition(Ai[$o])),vu=vi.exec(Lc);vu&&(zi=Math.min(zi,vu.index),cn.set($o.toString(),vu.index),Lc.substr(vu.index,Wo.length)!==Wo&&(on=fi===void 0||fi))}for(let $o=Xn;$o<=Di;$o++){if(Xn!==Di&&Ai[$o]===Bt.end)continue;const Lc=cn.get($o.toString());Lc!==void 0&&(qo?Ri.push(...Je(Pt,{pos:Ai[$o]+zi,end:wi.getLineEndOfPosition(Ai[$o])},on,qo)):on?Ri.push({newText:Wo,span:{length:0,start:Ai[$o]+zi}}):wi.text.substr(Ai[$o]+Lc,Wo.length)===Wo&&Ri.push({newText:"",span:{length:Wo.length,start:Ai[$o]+Lc}}))}return Ri}function Je(Pt,Bt,fi,wi){var Ri;const Ai=p.getCurrentSourceFile(Pt),Xn=[],{text:Di}=Ai;let on=!1,zi=fi||!1;const cn=[];let{pos:vi}=Bt;const qo=wi!==void 0?wi:wZ(Ai,vi),Wo=qo?"{/*":"/*",$o=qo?"*/}":"*/",Lc=qo?"\\{\\/\\*":"\\/\\*",vu=qo?"\\*\\/\\}":"\\*\\/";for(;vi<=Bt.end;){const Gu=Di.substr(vi,Wo.length)===Wo?Wo.length:0,Zc=kS(Ai,vi+Gu);if(Zc)qo&&(Zc.pos--,Zc.end++),cn.push(Zc.pos),Zc.kind===3&&cn.push(Zc.end),on=!0,vi=Zc.end+1;else{const Ls=Di.substring(vi,Bt.end).search(`(${Lc})|(${vu})`);zi=fi!==void 0?fi:zi||!pAe(Di,vi,Ls===-1?Bt.end:vi+Ls),vi=Ls===-1?Bt.end+1:vi+Ls+$o.length}}if(zi||!on){((Ri=kS(Ai,Bt.pos))==null?void 0:Ri.kind)!==2&&rm(cn,Bt.pos,_l),rm(cn,Bt.end,_l);const Gu=cn[0];Di.substr(Gu,Wo.length)!==Wo&&Xn.push({newText:Wo,span:{length:0,start:Gu}});for(let Zc=1;Zc<cn.length-1;Zc++)Di.substr(cn[Zc]-$o.length,$o.length)!==$o&&Xn.push({newText:$o,span:{length:0,start:cn[Zc]}}),Di.substr(cn[Zc],Wo.length)!==Wo&&Xn.push({newText:Wo,span:{length:0,start:cn[Zc]}});Xn.length%2!==0&&Xn.push({newText:$o,span:{length:0,start:cn[cn.length-1]}})}else for(const Gu of cn){const Zc=Gu-$o.length>0?Gu-$o.length:0,Ls=Di.substr(Zc,$o.length)===$o?$o.length:0;Xn.push({newText:"",span:{length:Wo.length,start:Gu-Ls}})}return Xn}function Rt(Pt,Bt){const fi=p.getCurrentSourceFile(Pt),{firstLine:wi,lastLine:Ri}=gt(fi,Bt);return wi===Ri&&Bt.pos!==Bt.end?Je(Pt,Bt,!0):Dt(Pt,Bt,!0)}function Ct(Pt,Bt){const fi=p.getCurrentSourceFile(Pt),wi=[],{pos:Ri}=Bt;let{end:Ai}=Bt;Ri===Ai&&(Ai+=wZ(fi,Ri)?2:1);for(let Xn=Ri;Xn<=Ai;Xn++){const Di=kS(fi,Xn);if(Di){switch(Di.kind){case 2:wi.push(...Dt(Pt,{end:Di.end,pos:Di.pos+1},!1));break;case 3:wi.push(...Je(Pt,{end:Di.end,pos:Di.pos+1},!1))}Xn=Di.end+1}}return wi}function ii({openingElement:Pt,closingElement:Bt,parent:fi}){return!d2(Pt.tagName,Bt.tagName)||Gv(fi)&&d2(Pt.tagName,fi.openingElement.tagName)&&ii(fi)}function vt({closingFragment:Pt,parent:Bt}){return!!(Pt.flags&262144)||aD(Bt)&&vt(Bt)}function Ni(Pt,Bt,fi){const wi=p.getCurrentSourceFile(Pt),Ri=pd.getRangeOfEnclosingComment(wi,Bt);return Ri&&(!fi||Ri.kind===3)?DS(Ri):void 0}function ji(Pt,Bt){q();const fi=U(Pt);T.throwIfCancellationRequested();const wi=fi.text,Ri=[];if(Bt.length>0&&!on(fi.fileName)){const zi=Xn();let cn;for(;cn=zi.exec(wi);){T.throwIfCancellationRequested();const vi=3;j.assert(cn.length===Bt.length+vi);const qo=cn[1],Wo=cn.index+qo.length;if(!kS(fi,Wo))continue;let $o;for(let vu=0;vu<Bt.length;vu++)cn[vu+vi]&&($o=Bt[vu]);if($o===void 0)return j.fail();if(Di(wi.charCodeAt(Wo+$o.text.length)))continue;const Lc=cn[2];Ri.push({descriptor:$o,message:Lc,position:Wo})}}return Ri;function Ai(zi){return zi.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Xn(){const zi=/(?:\/{2,}\s*)/.source,cn=/(?:\/\*+\s*)/.source,qo="("+/(?:^(?:\s|\*)*)/.source+"|"+zi+"|"+cn+")",Wo="(?:"+qt(Bt,Zc=>"("+Ai(Zc.text)+")").join("|")+")",$o=/(?:$|\*\/)/.source,Lc=/(?:.*?)/.source,vu="("+Wo+Lc+")",Gu=qo+vu+$o;return new RegExp(Gu,"gim")}function Di(zi){return zi>=97&&zi<=122||zi>=65&&zi<=90||zi>=48&&zi<=57}function on(zi){return zi.includes("/node_modules/")}}function gr(Pt,Bt,fi){return q(),RY.getRenameInfo(g,U(Pt),Bt,fi||{})}function te(Pt,Bt,fi,wi,Ri,Ai){const[Xn,Di]=typeof Bt=="number"?[Bt,void 0]:[Bt.pos,Bt.end];return{file:Pt,startPosition:Xn,endPosition:Di,program:Z(),host:t,formatContext:pd.getFormatContext(wi,t),cancellationToken:T,preferences:fi,triggerReason:Ri,kind:Ai}}function tt(Pt,Bt,fi){return{file:Pt,program:Z(),host:t,span:Bt,preferences:fi,cancellationToken:T}}function Gt(Pt,Bt){return ipe.getSmartSelectionRange(Bt,p.getCurrentSourceFile(Pt))}function le(Pt,Bt,fi=Bg,wi,Ri,Ai){q();const Xn=U(Pt);return pA.getApplicableRefactors(te(Xn,Bt,fi,Bg,wi,Ri),Ai)}function Ue(Pt,Bt,fi=Bg){q();const wi=U(Pt),Ri=j.checkDefined(g.getSourceFiles()),Ai=i7(Pt),Xn=Rj(te(wi,Bt,fi,Bg)),Di=O4e(Xn==null?void 0:Xn.all),on=es(Ri,zi=>{const cn=i7(zi.fileName);return!(g!=null&&g.isSourceFileFromExternalLibrary(wi))&&!(wi===U(zi.fileName)||Ai===".ts"&&cn===".d.ts"||Ai===".d.ts"&&so(ud(zi.fileName),"lib.")&&cn===".d.ts")&&(Ai===cn||(Ai===".tsx"&&cn===".ts"||Ai===".jsx"&&cn===".js")&&!Di)?zi.fileName:void 0});return{newFileName:A4e(wi,g,t,Xn),files:on}}function be(Pt,Bt,fi,wi,Ri,Ai=Bg,Xn){q();const Di=U(Pt);return pA.getEditsForRefactor(te(Di,fi,Ai,Bt),wi,Ri,Xn)}function Qt(Pt,Bt){return Bt===0?{line:0,character:0}:H.toLineColumnOffset(Pt,Bt)}function lt(Pt,Bt){q();const fi=mA.resolveCallHierarchyDeclaration(g,R_(U(Pt),Bt));return fi&&_he(fi,wi=>mA.createCallHierarchyItem(g,wi))}function st(Pt,Bt){q();const fi=U(Pt),wi=phe(mA.resolveCallHierarchyDeclaration(g,Bt===0?fi:R_(fi,Bt)));return wi?mA.getIncomingCalls(g,wi,T):[]}function hi(Pt,Bt){q();const fi=U(Pt),wi=phe(mA.resolveCallHierarchyDeclaration(g,Bt===0?fi:R_(fi,Bt)));return wi?mA.getOutgoingCalls(g,wi):[]}function vn(Pt,Bt,fi=Bg){q();const wi=U(Pt);return X_e.provideInlayHints(tt(wi,Bt,fi))}function ln(Pt,Bt,fi,wi,Ri){return Q_e.mapCode(p.getCurrentSourceFile(Pt),Bt,fi,t,pd.getFormatContext(wi,t),Ri)}const Un={dispose:pe,cleanupSemanticCache:oe,getSyntacticDiagnostics:de,getSemanticDiagnostics:ue,getRegionSemanticDiagnostics:Ie,getSuggestionDiagnostics:se,getCompilerOptionsDiagnostics:Ne,getSyntacticClassifications:Mn,getSemanticClassifications:ls,getEncodedSyntacticClassifications:Zs,getEncodedSemanticClassifications:Qs,getCompletionsAtPosition:Oe,getCompletionEntryDetails:He,getCompletionEntrySymbol:Pe,getSignatureHelpItems:Fi,getQuickInfoAtPosition:We,getDefinitionAtPosition:et,getDefinitionAndBoundSpan:Me,getImplementationAtPosition:wt,getTypeDefinitionAtPosition:ut,getReferencesAtPosition:zt,findReferences:tn,getFileReferences:xn,getDocumentHighlights:Et,getNameOrDottedNameSpan:pn,getBreakpointStatementAtPosition:qr,getNavigateToItems:Pn,getRenameInfo:gr,getSmartSelectionRange:Gt,findRenameLocations:dt,getNavigationBarItems:Fs,getNavigationTree:ko,getOutliningSpans:at,getTodoComments:ji,getBraceMatchingAtPosition:Sn,getIndentationAtPosition:dr,getFormattingEditsForRange:us,getFormattingEditsForDocument:Xr,getFormattingEditsAfterKeystroke:Gs,getDocCommentTemplateAtPosition:xe,isValidBraceCompletionAtPosition:pt,getJsxClosingTagAtPosition:Se,getLinkedEditingRangeAtPosition:Ze,getSpanOfEnclosingComment:Ni,getCodeFixesAtPosition:ma,getCombinedCodeFix:ka,applyCodeActionCommand:St,organizeImports:Ji,getEditsForFileRename:ac,getEmitOutput:_i,getNonBoundSourceFile:On,getProgram:Z,getCurrentProgram:()=>g,getAutoImportProvider:Q,updateIsDefinitionOfReferencedSymbols:re,getApplicableRefactors:le,getEditsForRefactor:be,getMoveToRefactoringFileSuggestions:Ue,toLineColumnOffset:Qt,getSourceMapper:()=>H,clearSourceMapperCache:()=>H.clearCache(),prepareCallHierarchy:lt,provideCallHierarchyIncomingCalls:st,provideCallHierarchyOutgoingCalls:hi,toggleLineComment:Dt,toggleMultilineComment:Je,commentSelection:Rt,uncommentSelection:Ct,provideInlayHints:vn,getSupportedCodeFixes:n_e,getPasteEdits:ze,mapCode:ln};switch(h){case 0:break;case 1:est.forEach(Pt=>Un[Pt]=()=>{throw new Error(`LanguageService Operation: ${Pt} not allowed in LanguageServiceMode.PartialSemantic`)});break;case 2:FBt.forEach(Pt=>Un[Pt]=()=>{throw new Error(`LanguageService Operation: ${Pt} not allowed in LanguageServiceMode.Syntactic`)});break;default:j.assertNever(h)}return Un}function s_e(t){return t.nameTable||BBt(t),t.nameTable}function BBt(t){const r=t.nameTable=new Map;t.forEachChild(function a(u){if(ot(u)&&!wfe(u)&&u.escapedText||cm(u)&&WBt(u)){const h=V8(u);r.set(h,r.get(h)===void 0?u.pos:-1)}else if(Vs(u)){const h=u.escapedText;r.set(h,r.get(h)===void 0?u.pos:-1)}if(Uo(u,a),jp(u))for(const h of u.jsDoc)Uo(h,a)})}function WBt(t){return Wy(t)||t.parent.kind===283||jBt(t)||DV(t)}function Vj(t){const r=VBt(t);return r&&(Aa(r.parent)||cD(r.parent))?r:void 0}function VBt(t){switch(t.kind){case 11:case 15:case 9:if(t.parent.kind===167)return lae(t.parent.parent)?t.parent.parent:void 0;case 80:return lae(t.parent)&&(t.parent.parent.kind===210||t.parent.parent.kind===292)&&t.parent.name===t?t.parent:void 0}}function HBt(t,r){const a=Vj(t);if(a){const u=r.getContextualType(a.parent),h=u&&_Y(a,r,u,!1);if(h&&h.length===1)return ya(h)}return r.getSymbolAtLocation(t)}function _Y(t,r,a,u){const h=yj(t.name);if(!h)return w;if(!a.isUnion()){const C=a.getProperty(h);return C?[C]:w}const p=Aa(t.parent)||cD(t.parent)?$t(a.types,C=>!r.isTypeInvalidDueToUnionDiscriminant(C,t.parent)):a.types,g=es(p,C=>C.getProperty(h));if(u&&(g.length===0||g.length===a.types.length)){const C=a.getProperty(h);if(C)return[C]}return!p.length&&!g.length?es(a.types,C=>C.getProperty(h)):Wb(g,Hw)}function jBt(t){return t&&t.parent&&t.parent.kind===212&&t.parent.argumentExpression===t}function v6e(t){if(Pd)return zr(ts(ca(Pd.getExecutingFilePath())),IW(t));throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. ")}wDe(ABt());function tst(t,r,a){const u=[];a=Mhe(a,u);const h=Ao(t)?t:[t],p=$H(void 0,void 0,G,a,h,r,!0);return p.diagnostics=Js(p.diagnostics,u),p}var o_e={};c(o_e,{spanInSourceFileAtLocation:()=>zBt});function zBt(t,r){if(t.isDeclarationFile)return;let a=Rs(t,r);const u=t.getLineAndCharacterOfPosition(r).line;if(t.getLineAndCharacterOfPosition(a.getStart(t)).line>u){const N=xd(a.pos,t);if(!N||t.getLineAndCharacterOfPosition(N.getEnd()).line!==u)return;a=N}if(a.flags&33554432)return;return E(a);function h(N,R){const F=uD(N)?rt(N.modifiers,Fd):void 0,H=F?Va(t.text,F.end):N.getStart(t);return Fu(H,(R||N).getEnd())}function p(N,R){return h(N,yD(R,R.parent,t))}function g(N,R){return N&&u===t.getLineAndCharacterOfPosition(N.getStart(t)).line?E(N):E(R)}function C(N,R,F){if(N){const H=N.indexOf(R);if(H>=0){let U=H,q=H+1;for(;U>0&&F(N[U-1]);)U--;for(;q<N.length&&F(N[q]);)q++;return Fu(Va(t.text,N[U].pos),N[q-1].end)}}return h(R)}function b(N){return E(xd(N.pos,t))}function T(N){return E(yD(N,N.parent,t))}function E(N){if(N){const{parent:se}=N;switch(N.kind){case 243:return F(N.declarationList.declarations[0]);case 260:case 172:case 171:return F(N);case 169:return U(N);case 262:case 174:case 173:case 177:case 178:case 176:case 218:case 219:return X(N);case 241:if(WT(N))return Z(N);case 268:return Q(N);case 299:return Q(N.block);case 244:return h(N.expression);case 253:return h(N.getChildAt(0),N.expression);case 247:return p(N,N.expression);case 246:return E(N.statement);case 259:return h(N.getChildAt(0));case 245:return p(N,N.expression);case 256:return E(N.statement);case 252:case 251:return h(N.getChildAt(0),N.label);case 248:return oe(N);case 249:return p(N,N.expression);case 250:return re(N);case 255:return p(N,N.expression);case 296:case 297:return E(N.statements[0]);case 258:return Q(N.tryBlock);case 257:return h(N,N.expression);case 277:return h(N,N.expression);case 271:return h(N,N.moduleReference);case 272:return h(N,N.moduleSpecifier);case 278:return h(N,N.moduleSpecifier);case 267:if(nC(N)!==1)return;case 263:case 266:case 306:case 208:return h(N);case 254:return E(N.statement);case 170:return C(se.modifiers,N,Fd);case 206:case 207:return pe(N);case 264:case 265:return;case 27:case 1:return g(xd(N.pos,t));case 28:return b(N);case 19:return ue(N);case 20:return Ie(N);case 24:return we(N);case 21:return he(N);case 22:return Ae(N);case 59:return ke(N);case 32:case 30:return Te(N);case 117:return De(N);case 93:case 85:case 98:return T(N);case 165:return qe(N);default:if(TS(N))return de(N);if((N.kind===80||N.kind===230||N.kind===303||N.kind===304)&&TS(se))return h(N);if(N.kind===226){const{left:Ne,operatorToken:Oe}=N;if(TS(Ne))return de(Ne);if(Oe.kind===64&&TS(N.parent))return h(N);if(Oe.kind===28)return E(Ne)}if(F0(N))switch(se.kind){case 246:return b(N);case 170:return E(N.parent);case 248:case 250:return h(N);case 226:if(N.parent.operatorToken.kind===28)return h(N);break;case 219:if(N.parent.body===N)return h(N);break}switch(N.parent.kind){case 303:if(N.parent.name===N&&!TS(N.parent.parent))return E(N.parent.initializer);break;case 216:if(N.parent.type===N)return T(N.parent.type);break;case 260:case 169:{const{initializer:Ne,type:Oe}=N.parent;if(Ne===N||Oe===N||Gb(N.kind))return b(N);break}case 226:{const{left:Ne}=N.parent;if(TS(Ne)&&N!==Ne)return b(N);break}default:if(Ho(N.parent)&&N.parent.type===N)return b(N)}return E(N.parent)}}function R(se){return Sf(se.parent)&&se.parent.declarations[0]===se?h(xd(se.pos,t,se.parent),se):h(se)}function F(se){if(se.parent.parent.kind===249)return E(se.parent.parent);const Ne=se.parent;if(ta(se.name))return pe(se.name);if(hI(se)&&se.initializer||Zr(se,32)||Ne.parent.kind===250)return R(se);if(Sf(se.parent)&&se.parent.declarations[0]!==se)return E(xd(se.pos,t,se.parent))}function H(se){return!!se.initializer||se.dotDotDotToken!==void 0||Zr(se,3)}function U(se){if(ta(se.name))return pe(se.name);if(H(se))return h(se);{const Ne=se.parent,Oe=Ne.parameters.indexOf(se);return j.assert(Oe!==-1),Oe!==0?U(Ne.parameters[Oe-1]):E(Ne.body)}}function q(se){return Zr(se,32)||se.parent.kind===263&&se.kind!==176}function X(se){if(se.body)return q(se)?h(se):E(se.body)}function Z(se){const Ne=se.statements.length?se.statements[0]:se.getLastToken();return q(se.parent)?g(se.parent,Ne):E(Ne)}function Q(se){switch(se.parent.kind){case 267:if(nC(se.parent)!==1)return;case 247:case 245:case 249:return g(se.parent,se.statements[0]);case 248:case 250:return g(xd(se.pos,t,se.parent),se.statements[0])}return E(se.statements[0])}function re(se){if(se.initializer.kind===261){const Ne=se.initializer;if(Ne.declarations.length>0)return E(Ne.declarations[0])}else return E(se.initializer)}function oe(se){if(se.initializer)return re(se);if(se.condition)return h(se.condition);if(se.incrementor)return h(se.incrementor)}function pe(se){const Ne=O(se.elements,Oe=>Oe.kind!==232?Oe:void 0);return Ne?E(Ne):se.parent.kind===208?h(se.parent):R(se.parent)}function de(se){j.assert(se.kind!==207&&se.kind!==206);const Ne=se.kind===209?se.elements:se.properties,Oe=O(Ne,He=>He.kind!==232?He:void 0);return Oe?E(Oe):h(se.parent.kind===226?se.parent:se)}function ue(se){switch(se.parent.kind){case 266:const Ne=se.parent;return g(xd(se.pos,t,se.parent),Ne.members.length?Ne.members[0]:Ne.getLastToken(t));case 263:const Oe=se.parent;return g(xd(se.pos,t,se.parent),Oe.members.length?Oe.members[0]:Oe.getLastToken(t));case 269:return g(se.parent.parent,se.parent.clauses[0])}return E(se.parent)}function Ie(se){switch(se.parent.kind){case 268:if(nC(se.parent.parent)!==1)return;case 266:case 263:return h(se);case 241:if(WT(se.parent))return h(se);case 299:return E(rl(se.parent.statements));case 269:const Ne=se.parent,Oe=rl(Ne.clauses);return Oe?E(rl(Oe.statements)):void 0;case 206:const He=se.parent;return E(rl(He.elements)||He);default:if(TS(se.parent)){const Pe=se.parent;return h(rl(Pe.properties)||Pe)}return E(se.parent)}}function we(se){switch(se.parent.kind){case 207:const Ne=se.parent;return h(rl(Ne.elements)||Ne);default:if(TS(se.parent)){const Oe=se.parent;return h(rl(Oe.elements)||Oe)}return E(se.parent)}}function he(se){return se.parent.kind===246||se.parent.kind===213||se.parent.kind===214?b(se):se.parent.kind===217?T(se):E(se.parent)}function Ae(se){switch(se.parent.kind){case 218:case 262:case 219:case 174:case 173:case 177:case 178:case 176:case 247:case 246:case 248:case 250:case 213:case 214:case 217:return b(se);default:return E(se.parent)}}function ke(se){return Ho(se.parent)||se.parent.kind===303||se.parent.kind===169?b(se):E(se.parent)}function Te(se){return se.parent.kind===216?T(se):E(se.parent)}function De(se){return se.parent.kind===246?p(se,se.parent.expression):E(se.parent)}function qe(se){return se.parent.kind===250?T(se):E(se.parent)}}}var mA={};c(mA,{createCallHierarchyItem:()=>b6e,getIncomingCalls:()=>QBt,getOutgoingCalls:()=>aWt,resolveCallHierarchyDeclaration:()=>lst});function UBt(t){return(ml(t)||fd(t))&&Bf(t)}function ist(t){return Lo(t)||_s(t)}function Hj(t){return(ml(t)||xl(t)||fd(t))&&ist(t.parent)&&t===t.parent.initializer&&ot(t.parent.name)&&(!!(zb(t.parent)&2)||Lo(t.parent))}function nst(t){return Os(t)||rd(t)||Wu(t)||ml(t)||hd(t)||fd(t)||gu(t)||Nu(t)||W1(t)||um(t)||kp(t)}function aO(t){return Os(t)||rd(t)&&ot(t.name)||Wu(t)||hd(t)||gu(t)||Nu(t)||W1(t)||um(t)||kp(t)||UBt(t)||Hj(t)}function rst(t){return Os(t)?t:Bf(t)?t.name:Hj(t)?t.parent.name:j.checkDefined(t.modifiers&&Fe(t.modifiers,sst))}function sst(t){return t.kind===90}function ost(t,r){const a=rst(r);return a&&t.getSymbolAtLocation(a)}function qBt(t,r){if(Os(r))return{text:r.fileName,pos:0,end:0};if((Wu(r)||hd(r))&&!Bf(r)){const h=r.modifiers&&Fe(r.modifiers,sst);if(h)return{text:"default",pos:h.getStart(),end:h.getEnd()}}if(gu(r)){const h=r.getSourceFile(),p=Va(h.text,R1(r).pos),g=p+6,C=t.getTypeChecker(),b=C.getSymbolAtLocation(r.parent);return{text:`${b?`${C.symbolToString(b,r.parent)} `:""}static {}`,pos:p,end:g}}const a=Hj(r)?r.parent.name:j.checkDefined(No(r),"Expected call hierarchy item to have a name");let u=ot(a)?Fr(a):cm(a)?a.text:Ka(a)&&cm(a.expression)?a.expression.text:void 0;if(u===void 0){const h=t.getTypeChecker(),p=h.getSymbolAtLocation(a);p&&(u=h.symbolToString(p,r))}if(u===void 0){const h=rde();u=z6(p=>h.writeNode(4,r,r.getSourceFile(),p))}return{text:u,pos:a.getStart(),end:a.getEnd()}}function $Bt(t){var r,a,u,h;if(Hj(t))return Lo(t.parent)&&ss(t.parent.parent)?fd(t.parent.parent)?(r=aG(t.parent.parent))==null?void 0:r.getText():(a=t.parent.parent.name)==null?void 0:a.getText():H1(t.parent.parent.parent.parent)&&ot(t.parent.parent.parent.parent.parent.name)?t.parent.parent.parent.parent.parent.name.getText():void 0;switch(t.kind){case 177:case 178:case 174:return t.parent.kind===210?(u=aG(t.parent))==null?void 0:u.getText():(h=No(t.parent))==null?void 0:h.getText();case 262:case 263:case 267:if(H1(t.parent)&&ot(t.parent.parent.name))return t.parent.parent.name.getText()}}function ast(t,r){if(r.body)return r;if(iu(r))return Vv(r.parent);if(Wu(r)||Nu(r)){const a=ost(t,r);return a&&a.valueDeclaration&&Qc(a.valueDeclaration)&&a.valueDeclaration.body?a.valueDeclaration:void 0}return r}function cst(t,r){const a=ost(t,r);let u;if(a&&a.declarations){const h=Nk(a.declarations),p=qt(a.declarations,b=>({file:b.getSourceFile().fileName,pos:b.pos}));h.sort((b,T)=>sh(p[b].file,p[T].file)||p[b].pos-p[T].pos);const g=qt(h,b=>a.declarations[b]);let C;for(const b of g)aO(b)&&((!C||C.parent!==b.parent||C.end!==b.pos)&&(u=fn(u,b)),C=b)}return u}function a_e(t,r){return gu(r)?r:Qc(r)?ast(t,r)??cst(t,r)??r:cst(t,r)??r}function lst(t,r){const a=t.getTypeChecker();let u=!1;for(;;){if(aO(r))return a_e(a,r);if(nst(r)){const h=Qi(r,aO);return h&&a_e(a,h)}if(Wy(r)){if(aO(r.parent))return a_e(a,r.parent);if(nst(r.parent)){const h=Qi(r.parent,aO);return h&&a_e(a,h)}return ist(r.parent)&&r.parent.initializer&&Hj(r.parent.initializer)?r.parent.initializer:void 0}if(iu(r))return aO(r.parent)?r.parent:void 0;if(r.kind===126&&gu(r.parent)){r=r.parent;continue}if(_s(r)&&r.initializer&&Hj(r.initializer))return r.initializer;if(!u){let h=a.getSymbolAtLocation(r);if(h&&(h.flags&2097152&&(h=a.getAliasedSymbol(h)),h.valueDeclaration)){u=!0,r=h.valueDeclaration;continue}}return}}function b6e(t,r){const a=r.getSourceFile(),u=qBt(t,r),h=$Bt(r),p=gD(r),g=a5(r),C=Fu(Va(a.text,r.getFullStart(),!1,!0),r.getEnd()),b=Fu(u.pos,u.end);return{file:a.fileName,kind:p,kindModifiers:g,name:u.text,containerName:h,span:C,selectionSpan:b}}function JBt(t){return t!==void 0}function GBt(t){if(t.kind===kl.EntryKind.Node){const{node:r}=t;if(vfe(r,!0,!0)||GPe(r,!0,!0)||KPe(r,!0,!0)||XPe(r,!0,!0)||K3(r)||xfe(r)){const a=r.getSourceFile();return{declaration:Qi(r,aO)||a,range:Vfe(r,a)}}}}function ust(t){return Sc(t.declaration)}function KBt(t,r){return{from:t,fromSpans:r}}function XBt(t,r){return KBt(b6e(t,r[0].declaration),qt(r,a=>DS(a.range)))}function QBt(t,r,a){if(Os(r)||rd(r)||gu(r))return[];const u=rst(r),h=$t(kl.findReferenceOrRenameEntries(t,a,t.getSourceFiles(),u,0,{use:kl.FindReferencesUse.References},GBt),JBt);return h?qs(h,ust,p=>XBt(t,p)):[]}function ZBt(t,r){function a(h){const p=i2(h)?h.tag:oh(h)?h.tagName:Sl(h)||gu(h)?h:h.expression,g=lst(t,p);if(g){const C=Vfe(p,h.getSourceFile());if(Ao(g))for(const b of g)r.push({declaration:b,range:C});else r.push({declaration:g,range:C})}}function u(h){if(h&&!(h.flags&33554432)){if(aO(h)){if(ss(h))for(const p of h.members)p.name&&Ka(p.name)&&u(p.name.expression);return}switch(h.kind){case 80:case 271:case 272:case 278:case 264:case 265:return;case 175:a(h);return;case 216:case 234:u(h.expression);return;case 260:case 169:u(h.name),u(h.initializer);return;case 213:a(h),u(h.expression),O(h.arguments,u);return;case 214:a(h),u(h.expression),O(h.arguments,u);return;case 215:a(h),u(h.tag),u(h.template);return;case 286:case 285:a(h),u(h.tagName),u(h.attributes);return;case 170:a(h),u(h.expression);return;case 211:case 212:a(h),Uo(h,u);break;case 238:u(h.expression);return}N1(h)||Uo(h,u)}}return u}function YBt(t,r){O(t.statements,r)}function eWt(t,r){!Zr(t,128)&&t.body&&H1(t.body)&&O(t.body.statements,r)}function tWt(t,r,a){const u=ast(t,r);u&&(O(u.parameters,a),a(u.body))}function iWt(t,r){r(t.body)}function nWt(t,r){O(t.modifiers,r);const a=qT(t);a&&r(a.expression);for(const u of t.members)Fg(u)&&O(u.modifiers,r),Lo(u)?r(u.initializer):iu(u)&&u.body?(O(u.parameters,r),r(u.body)):gu(u)&&r(u)}function rWt(t,r){const a=[],u=ZBt(t,a);switch(r.kind){case 307:YBt(r,u);break;case 267:eWt(r,u);break;case 262:case 218:case 219:case 174:case 177:case 178:tWt(t.getTypeChecker(),r,u);break;case 263:case 231:nWt(r,u);break;case 175:iWt(r,u);break;default:j.assertNever(r)}return a}function sWt(t,r){return{to:t,fromSpans:r}}function oWt(t,r){return sWt(b6e(t,r[0].declaration),qt(r,a=>DS(a.range)))}function aWt(t,r){return r.flags&33554432||W1(r)?[]:qs(rWt(t,r),ust,a=>oWt(t,a))}var C6e={};c(C6e,{v2020:()=>dst});var dst={};c(dst,{TokenEncodingConsts:()=>Brt,TokenModifier:()=>Vrt,TokenType:()=>Wrt,getEncodedSemanticClassifications:()=>_6e,getSemanticClassifications:()=>Hrt});var wh={};c(wh,{PreserveOptionalFlags:()=>Slt,addNewNodeForMemberSymbol:()=>wlt,codeFixAll:()=>qc,createCodeFixAction:()=>ua,createCodeFixActionMaybeFixAll:()=>x6e,createCodeFixActionWithoutFixAll:()=>G0,createCombinedCodeActions:()=>gA,createFileTextChanges:()=>fst,createImportAdder:()=>kD,createImportSpecifierResolver:()=>mVt,createMissingMemberNodes:()=>z3e,createSignatureDeclarationFromCallExpression:()=>U3e,createSignatureDeclarationFromSignature:()=>O_e,createStubbedBody:()=>SY,eachDiagnostic:()=>yA,findAncestorMatchingSpan:()=>X3e,generateAccessorFromProperty:()=>Nlt,getAccessorConvertiblePropertyAtPosition:()=>Alt,getAllFixes:()=>dWt,getAllSupers:()=>Q3e,getFixes:()=>uWt,getImportCompletionAction:()=>gVt,getImportKind:()=>v_e,getJSDocTypedefNodes:()=>_Vt,getNoopSymbolTrackerWithResolver:()=>lO,getPromoteTypeOnlyCompletionAction:()=>yVt,getSupportedErrorCodes:()=>cWt,importFixName:()=>Pot,importSymbols:()=>JI,parameterShouldGetTypeFromJSDoc:()=>Hst,registerCodeFix:()=>Na,setJsonCompilerOptionValue:()=>G3e,setJsonCompilerOptionValues:()=>J3e,tryGetAutoImportableReferenceFromTypeNode:()=>TD,typePredicateToAutoImportableTypeNode:()=>klt,typeToAutoImportableTypeNode:()=>CY});var S6e=Of(),w6e=new Map;function G0(t,r,a){return k6e(t,bD(a),r,void 0,void 0)}function ua(t,r,a,u,h,p){return k6e(t,bD(a),r,u,bD(h),p)}function x6e(t,r,a,u,h,p){return k6e(t,bD(a),r,u,h&&bD(h),p)}function k6e(t,r,a,u,h,p){return{fixName:t,description:r,changes:a,fixId:u,fixAllDescription:h,commands:p?[p]:void 0}}function Na(t){for(const r of t.errorCodes)T6e=void 0,S6e.add(String(r),t);if(t.fixIds)for(const r of t.fixIds)j.assert(!w6e.has(r)),w6e.set(r,t)}var T6e;function cWt(){return T6e??(T6e=as(S6e.keys()))}function lWt(t,r){const{errorCodes:a}=t;let u=0;for(const p of r)if(Yt(a,p.code)&&u++,u>1)break;const h=u<2;return({fixId:p,fixAllDescription:g,...C})=>h?C:{...C,fixId:p,fixAllDescription:g}}function uWt(t){const r=hst(t),a=S6e.get(String(t.errorCode));return Rr(a,u=>qt(u.getCodeActions(t),lWt(u,r)))}function dWt(t){return w6e.get(ha(t.fixId,Oo)).getAllCodeActions(t)}function gA(t,r){return{changes:t,commands:r}}function fst(t,r){return{fileName:t,textChanges:r}}function qc(t,r,a){const u=[],h=er.ChangeTracker.with(t,p=>yA(t,r,g=>a(p,g,u)));return gA(h,u.length===0?void 0:u)}function yA(t,r,a){for(const u of hst(t))Yt(r,u.code)&&a(u)}function hst({program:t,sourceFile:r,cancellationToken:a}){const u=[...t.getSemanticDiagnostics(r,a),...t.getSyntacticDiagnostics(r,a),...Lhe(r,t,a)];return Q_(t.getCompilerOptions())&&u.push(...t.getDeclarationDiagnostics(r,a)),u}var D6e="addConvertToUnknownForNonOverlappingTypes",_st=[k.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first.code];Na({errorCodes:_st,getCodeActions:function(r){const a=mst(r.sourceFile,r.span.start);if(a===void 0)return;const u=er.ChangeTracker.with(r,h=>pst(h,r.sourceFile,a));return[ua(D6e,u,k.Add_unknown_conversion_for_non_overlapping_types,D6e,k.Add_unknown_to_all_conversions_of_non_overlapping_types)]},fixIds:[D6e],getAllCodeActions:t=>qc(t,_st,(r,a)=>{const u=mst(a.file,a.start);u&&pst(r,a.file,u)})});function pst(t,r,a){const u=v7(a)?G.createAsExpression(a.expression,G.createKeywordTypeNode(159)):G.createTypeAssertion(G.createKeywordTypeNode(159),a.expression);t.replaceNode(r,a.expression,u)}function mst(t,r){if(!nr(t))return Qi(Rs(t,r),a=>v7(a)||hle(a))}Na({errorCodes:[k.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code,k.await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code,k.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code],getCodeActions:function(r){const{sourceFile:a}=r,u=er.ChangeTracker.with(r,h=>{const p=G.createExportDeclaration(void 0,!1,G.createNamedExports([]),void 0);h.insertNodeAtEndOfScope(a,a,p)});return[G0("addEmptyExportDeclaration",u,k.Add_export_to_make_this_file_into_a_module)]}});var E6e="addMissingAsync",gst=[k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,k.Type_0_is_not_assignable_to_type_1.code,k.Type_0_is_not_comparable_to_type_1.code];Na({fixIds:[E6e],errorCodes:gst,getCodeActions:function(r){const{sourceFile:a,errorCode:u,cancellationToken:h,program:p,span:g}=r,C=Fe(p.getTypeChecker().getDiagnostics(a,h),hWt(g,u)),b=C&&C.relatedInformation&&Fe(C.relatedInformation,N=>N.code===k.Did_you_mean_to_mark_this_function_as_async.code),T=vst(a,b);return T?[yst(r,T,N=>er.ChangeTracker.with(r,N))]:void 0},getAllCodeActions:t=>{const{sourceFile:r}=t,a=new Set;return qc(t,gst,(u,h)=>{const p=h.relatedInformation&&Fe(h.relatedInformation,b=>b.code===k.Did_you_mean_to_mark_this_function_as_async.code),g=vst(r,p);return g?yst(t,g,b=>(b(u),[]),a):void 0})}});function yst(t,r,a,u){const h=a(p=>fWt(p,t.sourceFile,r,u));return ua(E6e,h,k.Add_async_modifier_to_containing_function,E6e,k.Add_all_missing_async_modifiers)}function fWt(t,r,a,u){if(u&&u.has(Sc(a)))return;u==null||u.add(Sc(a));const h=G.replaceModifiers(Ec(a,!0),G.createNodeArray(G.createModifiersFromModifierFlags(_S(a)|1024)));t.replaceNode(r,a,h)}function vst(t,r){if(!r)return;const a=Rs(t,r.start);return Qi(a,h=>h.getStart(t)<r.start||h.getEnd()>au(r)?"quit":(xl(h)||Nu(h)||ml(h)||Wu(h))&&eO(r,f_(h,t)))}function hWt(t,r){return({start:a,length:u,relatedInformation:h,code:p})=>Ww(a)&&Ww(u)&&eO({start:a,length:u},t)&&p===r&&!!h&&Ft(h,g=>g.code===k.Did_you_mean_to_mark_this_function_as_async.code)}var I6e="addMissingAwait",bst=k.Property_0_does_not_exist_on_type_1.code,Cst=[k.This_expression_is_not_callable.code,k.This_expression_is_not_constructable.code],N6e=[k.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type.code,k.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code,k.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code,k.Operator_0_cannot_be_applied_to_type_1.code,k.Operator_0_cannot_be_applied_to_types_1_and_2.code,k.This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap.code,k.This_condition_will_always_return_true_since_this_0_is_always_defined.code,k.Type_0_is_not_an_array_type.code,k.Type_0_is_not_an_array_type_or_a_string_type.code,k.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher.code,k.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code,k.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code,k.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator.code,k.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator.code,k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,bst,...Cst];Na({fixIds:[I6e],errorCodes:N6e,getCodeActions:function(r){const{sourceFile:a,errorCode:u,span:h,cancellationToken:p,program:g}=r,C=Sst(a,u,h,p,g);if(!C)return;const b=r.program.getTypeChecker(),T=E=>er.ChangeTracker.with(r,E);return Rw([wst(r,C,u,b,T),xst(r,C,u,b,T)])},getAllCodeActions:t=>{const{sourceFile:r,program:a,cancellationToken:u}=t,h=t.program.getTypeChecker(),p=new Set;return qc(t,N6e,(g,C)=>{const b=Sst(r,C.code,C,u,a);if(!b)return;const T=E=>(E(g),[]);return wst(t,b,C.code,h,T,p)||xst(t,b,C.code,h,T,p)})}});function Sst(t,r,a,u,h){const p=hhe(t,a);return p&&_Wt(t,r,a,u,h)&&kst(p)?p:void 0}function wst(t,r,a,u,h,p){const{sourceFile:g,program:C,cancellationToken:b}=t,T=pWt(r,g,b,C,u);if(T){const E=h(N=>{O(T.initializers,({expression:R})=>L6e(N,a,g,u,R,p)),p&&T.needsSecondPassForFixAll&&L6e(N,a,g,u,r,p)});return G0("addMissingAwaitToInitializer",E,T.initializers.length===1?[k.Add_await_to_initializer_for_0,T.initializers[0].declarationSymbol.name]:k.Add_await_to_initializers)}}function xst(t,r,a,u,h,p){const g=h(C=>L6e(C,a,t.sourceFile,u,r,p));return ua(I6e,g,k.Add_await,I6e,k.Fix_all_expressions_possibly_missing_await)}function _Wt(t,r,a,u,h){const g=h.getTypeChecker().getDiagnostics(t,u);return Ft(g,({start:C,length:b,relatedInformation:T,code:E})=>Ww(C)&&Ww(b)&&eO({start:C,length:b},a)&&E===r&&!!T&&Ft(T,N=>N.code===k.Did_you_forget_to_use_await.code))}function pWt(t,r,a,u,h){const p=mWt(t,h);if(!p)return;let g=p.isCompleteFix,C;for(const b of p.identifiers){const T=h.getSymbolAtLocation(b);if(!T)continue;const E=Jr(T.valueDeclaration,_s),N=E&&Jr(E.name,ot),R=Xk(E,243);if(!E||!R||E.type||!E.initializer||R.getSourceFile()!==r||Zr(R,32)||!N||!kst(E.initializer)){g=!1;continue}const F=u.getSemanticDiagnostics(r,a);if(kl.Core.eachSymbolReferenceInFile(N,h,r,U=>b!==U&&!gWt(U,F,r,h))){g=!1;continue}(C||(C=[])).push({expression:E.initializer,declarationSymbol:T})}return C&&{initializers:C,needsSecondPassForFixAll:!g}}function mWt(t,r){if(Nr(t.parent)&&ot(t.parent.expression))return{identifiers:[t.parent.expression],isCompleteFix:!0};if(ot(t))return{identifiers:[t],isCompleteFix:!0};if(ur(t)){let a,u=!0;for(const h of[t.left,t.right]){const p=r.getTypeAtLocation(h);if(r.getPromisedTypeOfPromise(p)){if(!ot(h)){u=!1;continue}(a||(a=[])).push(h)}}return a&&{identifiers:a,isCompleteFix:u}}}function gWt(t,r,a,u){const h=Nr(t.parent)?t.parent.name:ur(t.parent)?t.parent:t,p=Fe(r,g=>g.start===h.getStart(a)&&g.start+g.length===h.getEnd());return p&&Yt(N6e,p.code)||u.getTypeAtLocation(h).flags&1}function kst(t){return t.flags&65536||!!Qi(t,r=>r.parent&&xl(r.parent)&&r.parent.body===r||Xo(r)&&(r.parent.kind===262||r.parent.kind===218||r.parent.kind===219||r.parent.kind===174))}function L6e(t,r,a,u,h,p){if(_H(h.parent)&&!h.parent.awaitModifier){const g=u.getTypeAtLocation(h),C=u.getAnyAsyncIterableType();if(C&&u.isTypeAssignableTo(g,C)){const b=h.parent;t.replaceNode(a,b,G.updateForOfStatement(b,G.createToken(135),b.initializer,b.expression,b.statement));return}}if(ur(h))for(const g of[h.left,h.right]){if(p&&ot(g)){const T=u.getSymbolAtLocation(g);if(T&&p.has(Ba(T)))continue}const C=u.getTypeAtLocation(g),b=u.getPromisedTypeOfPromise(C)?G.createAwaitExpression(g):g;t.replaceNode(a,g,b)}else if(r===bst&&Nr(h.parent)){if(p&&ot(h.parent.expression)){const g=u.getSymbolAtLocation(h.parent.expression);if(g&&p.has(Ba(g)))return}t.replaceNode(a,h.parent.expression,G.createParenthesizedExpression(G.createAwaitExpression(h.parent.expression))),Tst(t,h.parent.expression,a)}else if(Yt(Cst,r)&&T1(h.parent)){if(p&&ot(h)){const g=u.getSymbolAtLocation(h);if(g&&p.has(Ba(g)))return}t.replaceNode(a,h,G.createParenthesizedExpression(G.createAwaitExpression(h))),Tst(t,h,a)}else{if(p&&_s(h.parent)&&ot(h.parent.name)){const g=u.getSymbolAtLocation(h.parent.name);if(g&&!of(p,Ba(g)))return}t.replaceNode(a,h,G.createAwaitExpression(h))}}function Tst(t,r,a){const u=xd(r.pos,a);u&&BZ(u.end,u.parent,a)&&t.insertText(a,r.getStart(a),";")}var P6e="addMissingConst",Dst=[k.Cannot_find_name_0.code,k.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code];Na({errorCodes:Dst,getCodeActions:function(r){const a=er.ChangeTracker.with(r,u=>Est(u,r.sourceFile,r.span.start,r.program));if(a.length>0)return[ua(P6e,a,k.Add_const_to_unresolved_variable,P6e,k.Add_const_to_all_unresolved_variables)]},fixIds:[P6e],getAllCodeActions:t=>{const r=new Set;return qc(t,Dst,(a,u)=>Est(a,u.file,u.start,t.program,r))}});function Est(t,r,a,u,h){const p=Rs(r,a),g=Qi(p,T=>fI(T.parent)?T.parent.initializer===T:yWt(T)?!1:"quit");if(g)return c_e(t,g,r,h);const C=p.parent;if(ur(C)&&C.operatorToken.kind===64&&uf(C.parent))return c_e(t,p,r,h);if(jf(C)){const T=u.getTypeChecker();return Ce(C.elements,E=>vWt(E,T))?c_e(t,C,r,h):void 0}const b=Qi(p,T=>uf(T.parent)?!0:bWt(T)?!1:"quit");if(b){const T=u.getTypeChecker();return Ist(b,T)?c_e(t,b,r,h):void 0}}function c_e(t,r,a,u){(!u||of(u,r))&&t.insertModifierBefore(a,87,r)}function yWt(t){switch(t.kind){case 80:case 209:case 210:case 303:case 304:return!0;default:return!1}}function vWt(t,r){const a=ot(t)?t:lf(t,!0)&&ot(t.left)?t.left:void 0;return!!a&&!r.getSymbolAtLocation(a)}function bWt(t){switch(t.kind){case 80:case 226:case 28:return!0;default:return!1}}function Ist(t,r){return ur(t)?t.operatorToken.kind===28?Ce([t.left,t.right],a=>Ist(a,r)):t.operatorToken.kind===64&&ot(t.left)&&!r.getSymbolAtLocation(t.left):!1}var A6e="addMissingDeclareProperty",Nst=[k.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration.code];Na({errorCodes:Nst,getCodeActions:function(r){const a=er.ChangeTracker.with(r,u=>Lst(u,r.sourceFile,r.span.start));if(a.length>0)return[ua(A6e,a,k.Prefix_with_declare,A6e,k.Prefix_all_incorrect_property_declarations_with_declare)]},fixIds:[A6e],getAllCodeActions:t=>{const r=new Set;return qc(t,Nst,(a,u)=>Lst(a,u.file,u.start,r))}});function Lst(t,r,a,u){const h=Rs(r,a);if(!ot(h))return;const p=h.parent;p.kind===172&&(!u||of(u,p))&&t.insertModifierBefore(r,138,p)}var O6e="addMissingInvocationForDecorator",Pst=[k._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0.code];Na({errorCodes:Pst,getCodeActions:function(r){const a=er.ChangeTracker.with(r,u=>Ast(u,r.sourceFile,r.span.start));return[ua(O6e,a,k.Call_decorator_expression,O6e,k.Add_to_all_uncalled_decorators)]},fixIds:[O6e],getAllCodeActions:t=>qc(t,Pst,(r,a)=>Ast(r,a.file,a.start))});function Ast(t,r,a){const u=Rs(r,a),h=Qi(u,Fd);j.assert(!!h,"Expected position to be owned by a decorator.");const p=G.createCallExpression(h.expression,void 0,void 0);t.replaceNode(r,h.expression,p)}var M6e="addNameToNamelessParameter",Ost=[k.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code];Na({errorCodes:Ost,getCodeActions:function(r){const a=er.ChangeTracker.with(r,u=>Mst(u,r.sourceFile,r.span.start));return[ua(M6e,a,k.Add_parameter_name,M6e,k.Add_names_to_all_parameters_without_names)]},fixIds:[M6e],getAllCodeActions:t=>qc(t,Ost,(r,a)=>Mst(r,a.file,a.start))});function Mst(t,r,a){const u=Rs(r,a),h=u.parent;if(!$s(h))return j.fail("Tried to add a parameter name to a non-parameter: "+j.formatSyntaxKind(u.kind));const p=h.parent.parameters.indexOf(h);j.assert(!h.type,"Tried to add a parameter name to a parameter that already had one."),j.assert(p>-1,"Parameter not found in parent parameter list.");let g=h.name.getEnd(),C=G.createTypeReferenceNode(h.name,void 0),b=Rst(r,h);for(;b;)C=G.createArrayTypeNode(C),g=b.getEnd(),b=Rst(r,b);const T=G.createParameterDeclaration(h.modifiers,h.dotDotDotToken,"arg"+p,h.questionToken,h.dotDotDotToken&&!hH(C)?G.createArrayTypeNode(C):C,h.initializer);t.replaceRange(r,Um(h.getStart(r),g),T)}function Rst(t,r){const a=yD(r.name,r.parent,t);if(a&&a.kind===23&&CS(a.parent)&&$s(a.parent.parent))return a.parent.parent}var Fst="addOptionalPropertyUndefined",CWt=[k.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target.code,k.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code,k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code];Na({errorCodes:CWt,getCodeActions(t){const r=t.program.getTypeChecker(),a=SWt(t.sourceFile,t.span,r);if(!a.length)return;const u=er.ChangeTracker.with(t,h=>xWt(h,a));return[G0(Fst,u,k.Add_undefined_to_optional_property_type)]},fixIds:[Fst]});function SWt(t,r,a){var u,h;const p=Bst(hhe(t,r),a);if(!p)return w;const{source:g,target:C}=p,b=wWt(g,C,a)?a.getTypeAtLocation(C.expression):a.getTypeAtLocation(C);return(h=(u=b.symbol)==null?void 0:u.declarations)!=null&&h.some(T=>_n(T).fileName.match(/\.d\.ts$/))?w:a.getExactOptionalProperties(b)}function wWt(t,r,a){return Nr(r)&&!!a.getExactOptionalProperties(a.getTypeAtLocation(r.expression)).length&&a.getTypeAtLocation(t)===a.getUndefinedType()}function Bst(t,r){var a;if(t){if(ur(t.parent)&&t.parent.operatorToken.kind===64)return{source:t.parent.right,target:t.parent.left};if(_s(t.parent)&&t.parent.initializer)return{source:t.parent.initializer,target:t.parent.name};if(la(t.parent)){const u=r.getSymbolAtLocation(t.parent.expression);if(!(u!=null&&u.valueDeclaration)||!tP(u.valueDeclaration.kind)||!jt(t))return;const h=t.parent.arguments.indexOf(t);if(h===-1)return;const p=u.valueDeclaration.parameters[h].name;if(ot(p))return{source:t,target:p}}else if(_d(t.parent)&&ot(t.parent.name)||lh(t.parent)){const u=Bst(t.parent.parent,r);if(!u)return;const h=r.getPropertyOfType(r.getTypeAtLocation(u.target),t.parent.name.text),p=(a=h==null?void 0:h.declarations)==null?void 0:a[0];return p?{source:_d(t.parent)?t.parent.initializer:t.parent.name,target:p}:void 0}}else return}function xWt(t,r){for(const a of r){const u=a.valueDeclaration;if(u&&(O_(u)||Lo(u))&&u.type){const h=G.createUnionTypeNode([...u.type.kind===192?u.type.types:[u.type],G.createTypeReferenceNode("undefined")]);t.replaceNode(u.getSourceFile(),u.type,h)}}}var R6e="annotateWithTypeFromJSDoc",Wst=[k.JSDoc_types_may_be_moved_to_TypeScript_types.code];Na({errorCodes:Wst,getCodeActions(t){const r=Vst(t.sourceFile,t.span.start);if(!r)return;const a=er.ChangeTracker.with(t,u=>zst(u,t.sourceFile,r));return[ua(R6e,a,k.Annotate_with_type_from_JSDoc,R6e,k.Annotate_everything_with_types_from_JSDoc)]},fixIds:[R6e],getAllCodeActions:t=>qc(t,Wst,(r,a)=>{const u=Vst(a.file,a.start);u&&zst(r,a.file,u)})});function Vst(t,r){const a=Rs(t,r);return Jr($s(a.parent)?a.parent.parent:a.parent,Hst)}function Hst(t){return kWt(t)&&jst(t)}function jst(t){return Qc(t)?t.parameters.some(jst)||!t.type&&!!MW(t):!t.type&&!!Bk(t)}function zst(t,r,a){if(Qc(a)&&(MW(a)||a.parameters.some(u=>!!Bk(u)))){if(!a.typeParameters){const h=vK(a);h.length&&t.insertTypeParameters(r,a,h)}const u=xl(a)&&!Uc(a,21,r);u&&t.insertNodeBefore(r,ya(a.parameters),G.createToken(21));for(const h of a.parameters)if(!h.type){const p=Bk(h);p&&t.tryInsertTypeAnnotation(r,h,bt(p,xD,ws))}if(u&&t.insertNodeAfter(r,va(a.parameters),G.createToken(22)),!a.type){const h=MW(a);h&&t.tryInsertTypeAnnotation(r,a,bt(h,xD,ws))}}else{const u=j.checkDefined(Bk(a),"A JSDocType for this declaration should exist");j.assert(!a.type,"The JSDocType decl should have a type"),t.tryInsertTypeAnnotation(r,a,bt(u,xD,ws))}}function kWt(t){return Qc(t)||t.kind===260||t.kind===171||t.kind===172}function xD(t){switch(t.kind){case 312:case 313:return G.createTypeReferenceNode("any",w);case 316:return DWt(t);case 315:return xD(t.type);case 314:return EWt(t);case 318:return IWt(t);case 317:return NWt(t);case 183:return PWt(t);case 322:return TWt(t);default:const r=dn(t,xD,void 0);return tr(r,1),r}}function TWt(t){const r=G.createTypeLiteralNode(qt(t.jsDocPropertyTags,a=>G.createPropertySignature(void 0,ot(a.name)?a.name:a.name.right,tH(a)?G.createToken(58):void 0,a.typeExpression&&bt(a.typeExpression.type,xD,ws)||G.createKeywordTypeNode(133))));return tr(r,1),r}function DWt(t){return G.createUnionTypeNode([bt(t.type,xD,ws),G.createTypeReferenceNode("undefined",w)])}function EWt(t){return G.createUnionTypeNode([bt(t.type,xD,ws),G.createTypeReferenceNode("null",w)])}function IWt(t){return G.createArrayTypeNode(bt(t.type,xD,ws))}function NWt(t){return G.createFunctionTypeNode(w,t.parameters.map(LWt),t.type??G.createKeywordTypeNode(133))}function LWt(t){const r=t.parent.parameters.indexOf(t),a=t.type.kind===318&&r===t.parent.parameters.length-1,u=t.name||(a?"rest":"arg"+r),h=a?G.createToken(26):t.dotDotDotToken;return G.createParameterDeclaration(t.modifiers,h,u,t.questionToken,bt(t.type,xD,ws),t.initializer)}function PWt(t){let r=t.typeName,a=t.typeArguments;if(ot(t.typeName)){if(eK(t))return AWt(t);let u=t.typeName.text;switch(t.typeName.text){case"String":case"Boolean":case"Object":case"Number":u=u.toLowerCase();break;case"array":case"date":case"promise":u=u[0].toUpperCase()+u.slice(1);break}r=G.createIdentifier(u),(u==="Array"||u==="Promise")&&!t.typeArguments?a=G.createNodeArray([G.createTypeReferenceNode("any",w)]):a=Dn(t.typeArguments,xD,ws)}return G.createTypeReferenceNode(r,a)}function AWt(t){const r=G.createParameterDeclaration(void 0,void 0,t.typeArguments[0].kind===150?"n":"s",void 0,G.createTypeReferenceNode(t.typeArguments[0].kind===150?"number":"string",[]),void 0),a=G.createTypeLiteralNode([G.createIndexSignature(void 0,[r],t.typeArguments[1])]);return tr(a,1),a}var F6e="convertFunctionToEs6Class",Ust=[k.This_constructor_function_may_be_converted_to_a_class_declaration.code];Na({errorCodes:Ust,getCodeActions(t){const r=er.ChangeTracker.with(t,a=>qst(a,t.sourceFile,t.span.start,t.program.getTypeChecker(),t.preferences,t.program.getCompilerOptions()));return[ua(F6e,r,k.Convert_function_to_an_ES2015_class,F6e,k.Convert_all_constructor_functions_to_classes)]},fixIds:[F6e],getAllCodeActions:t=>qc(t,Ust,(r,a)=>qst(r,a.file,a.start,t.program.getTypeChecker(),t.preferences,t.program.getCompilerOptions()))});function qst(t,r,a,u,h,p){const g=u.getSymbolAtLocation(Rs(r,a));if(!g||!g.valueDeclaration||!(g.flags&19))return;const C=g.valueDeclaration;if(Wu(C)||ml(C))t.replaceNode(r,C,E(C));else if(_s(C)){const N=T(C);if(!N)return;const R=C.parent.parent;Sf(C.parent)&&C.parent.declarations.length>1?(t.delete(r,C),t.insertNodeAfter(r,R,N)):t.replaceNode(r,R,N)}function b(N){const R=[];return N.exports&&N.exports.forEach(U=>{if(U.name==="prototype"&&U.declarations){const q=U.declarations[0];if(U.declarations.length===1&&Nr(q)&&ur(q.parent)&&q.parent.operatorToken.kind===64&&Aa(q.parent.right)){const X=q.parent.right;H(X.symbol,void 0,R)}}else H(U,[G.createToken(126)],R)}),N.members&&N.members.forEach((U,q)=>{var X,Z,Q,re;if(q==="constructor"&&U.valueDeclaration){const oe=(re=(Q=(Z=(X=N.exports)==null?void 0:X.get("prototype"))==null?void 0:Z.declarations)==null?void 0:Q[0])==null?void 0:re.parent;oe&&ur(oe)&&Aa(oe.right)&&Ft(oe.right.properties,u_e)||t.delete(r,U.valueDeclaration.parent);return}H(U,void 0,R)}),R;function F(U,q){return Sl(U)?Nr(U)&&u_e(U)?!0:Ho(q):Ce(U.properties,X=>!!(Nu(X)||FW(X)||_d(X)&&ml(X.initializer)&&X.name||u_e(X)))}function H(U,q,X){if(!(U.flags&8192)&&!(U.flags&4096))return;const Z=U.valueDeclaration,Q=Z.parent,re=Q.right;if(!F(Z,re)||Ft(X,Ie=>{const we=No(Ie);return!!(we&&ot(we)&&Fr(we)===Eu(U))}))return;const oe=Q.parent&&Q.parent.kind===244?Q.parent:Q;if(t.delete(r,oe),!re){X.push(G.createPropertyDeclaration(q,U.name,void 0,void 0,void 0));return}if(Sl(Z)&&(ml(re)||xl(re))){const Ie=$p(r,h),we=OWt(Z,p,Ie);we&&pe(X,re,we);return}else if(Aa(re)){O(re.properties,Ie=>{(Nu(Ie)||FW(Ie))&&X.push(Ie),_d(Ie)&&ml(Ie.initializer)&&pe(X,Ie.initializer,Ie.name),u_e(Ie)});return}else{if(r_(r)||!Nr(Z))return;const Ie=G.createPropertyDeclaration(q,Z.name,void 0,void 0,re);iO(Q.parent,Ie,r),X.push(Ie);return}function pe(Ie,we,he){return ml(we)?de(Ie,we,he):ue(Ie,we,he)}function de(Ie,we,he){const Ae=Js(q,l_e(we,134)),ke=G.createMethodDeclaration(Ae,void 0,he,void 0,void 0,we.parameters,void 0,we.body);iO(Q,ke,r),Ie.push(ke)}function ue(Ie,we,he){const Ae=we.body;let ke;Ae.kind===241?ke=Ae:ke=G.createBlock([G.createReturnStatement(Ae)]);const Te=Js(q,l_e(we,134)),De=G.createMethodDeclaration(Te,void 0,he,void 0,void 0,we.parameters,void 0,ke);iO(Q,De,r),Ie.push(De)}}}function T(N){const R=N.initializer;if(!R||!ml(R)||!ot(N.name))return;const F=b(N.symbol);R.body&&F.unshift(G.createConstructorDeclaration(void 0,R.parameters,R.body));const H=l_e(N.parent.parent,95);return G.createClassDeclaration(H,N.name,void 0,void 0,F)}function E(N){const R=b(g);N.body&&R.unshift(G.createConstructorDeclaration(void 0,N.parameters,N.body));const F=l_e(N,95);return G.createClassDeclaration(F,N.name,void 0,void 0,R)}}function l_e(t,r){return Fg(t)?$t(t.modifiers,a=>a.kind===r):void 0}function u_e(t){return t.name?!!(ot(t.name)&&t.name.text==="constructor"):!1}function OWt(t,r,a){if(Nr(t))return t.name;const u=t.argumentExpression;if(A_(u))return u;if(Bc(u))return J_(u.text,Ja(r))?G.createIdentifier(u.text):TI(u)?G.createStringLiteral(u.text,a===0):u}var B6e="convertToAsyncFunction",$st=[k.This_may_be_converted_to_an_async_function.code],d_e=!0;Na({errorCodes:$st,getCodeActions(t){d_e=!0;const r=er.ChangeTracker.with(t,a=>Jst(a,t.sourceFile,t.span.start,t.program.getTypeChecker()));return d_e?[ua(B6e,r,k.Convert_to_async_function,B6e,k.Convert_all_to_async_functions)]:[]},fixIds:[B6e],getAllCodeActions:t=>qc(t,$st,(r,a)=>Jst(r,a.file,a.start,t.program.getTypeChecker()))});function Jst(t,r,a,u){const h=Rs(r,a);let p;if(ot(h)&&_s(h.parent)&&h.parent.initializer&&Qc(h.parent.initializer)?p=h.parent.initializer:p=Jr(Up(Rs(r,a)),Ohe),!p)return;const g=new Map,C=nr(p),b=RWt(p,u),T=FWt(p,u,g);if(!Phe(T,u))return;const E=T.body&&Xo(T.body)?MWt(T.body,u):w,N={checker:u,synthNamesMap:g,setOfExpressionsToReturn:b,isInJSFile:C};if(!E.length)return;const R=Va(r.text,R1(p).pos);t.insertModifierAt(r,R,134,{suffix:" "});for(const F of E)if(Uo(F,function H(U){if(la(U)){const q=cO(U,U,N,!1);if(vA())return!0;t.replaceNodeWithNodes(r,F,q)}else if(!Ho(U)&&(Uo(U,H),vA()))return!0}),vA())return}function MWt(t,r){const a=[];return uS(t,u=>{ZZ(u,r)&&a.push(u)}),a}function RWt(t,r){if(!t.body)return new Set;const a=new Set;return Uo(t.body,function u(h){jj(h,r,"then")?(a.add(Sc(h)),O(h.arguments,u)):jj(h,r,"catch")||jj(h,r,"finally")?(a.add(Sc(h)),Uo(h,u)):Kst(h,r)?a.add(Sc(h)):Uo(h,u)}),a}function jj(t,r,a){if(!la(t))return!1;const h=lj(t,a)&&r.getTypeAtLocation(t);return!!(h&&r.getPromisedTypeOfPromise(h))}function Gst(t,r){return(Or(t)&4)!==0&&t.target===r}function f_e(t,r,a){if(t.expression.name.escapedText==="finally")return;const u=a.getTypeAtLocation(t.expression.expression);if(Gst(u,a.getPromiseType())||Gst(u,a.getPromiseLikeType()))if(t.expression.name.escapedText==="then"){if(r===sm(t.arguments,0))return sm(t.typeArguments,0);if(r===sm(t.arguments,1))return sm(t.typeArguments,1)}else return sm(t.typeArguments,0)}function Kst(t,r){return jt(t)?!!r.getPromisedTypeOfPromise(r.getTypeAtLocation(t)):!1}function FWt(t,r,a){const u=new Map,h=Of();return Uo(t,function p(g){if(!ot(g)){Uo(g,p);return}const C=r.getSymbolAtLocation(g);if(C){const b=r.getTypeAtLocation(g),T=tot(b,r),E=Ba(C).toString();if(T&&!$s(g.parent)&&!Qc(g.parent)&&!a.has(E)){const N=Ra(T.parameters),R=(N==null?void 0:N.valueDeclaration)&&$s(N.valueDeclaration)&&Jr(N.valueDeclaration.name,ot)||G.createUniqueName("result",16),F=Xst(R,h);a.set(E,F),h.add(R.text,C)}else if(g.parent&&($s(g.parent)||_s(g.parent)||ec(g.parent))){const N=g.text,R=h.get(N);if(R&&R.some(F=>F!==C)){const F=Xst(g,h);u.set(E,F.identifier),a.set(E,F),h.add(N,C)}else{const F=Ec(g);a.set(E,C5(F)),h.add(N,C)}}}}),Sj(t,!0,p=>{if(ec(p)&&ot(p.name)&&dm(p.parent)){const g=r.getSymbolAtLocation(p.name),C=g&&u.get(String(Ba(g)));if(C&&C.text!==(p.name||p.propertyName).getText())return G.createBindingElement(p.dotDotDotToken,p.propertyName||p.name,C,p.initializer)}else if(ot(p)){const g=r.getSymbolAtLocation(p),C=g&&u.get(String(Ba(g)));if(C)return G.createIdentifier(C.text)}})}function Xst(t,r){const a=(r.get(t.text)||w).length,u=a===0?t:G.createIdentifier(t.text+"_"+a);return C5(u)}function vA(){return!d_e}function b2(){return d_e=!1,w}function cO(t,r,a,u,h){if(jj(r,a.checker,"then"))return VWt(r,sm(r.arguments,0),sm(r.arguments,1),a,u,h);if(jj(r,a.checker,"catch"))return Yst(r,sm(r.arguments,0),a,u,h);if(jj(r,a.checker,"finally"))return WWt(r,sm(r.arguments,0),a,u,h);if(Nr(r))return cO(t,r.expression,a,u,h);const p=a.checker.getTypeAtLocation(r);return p&&a.checker.getPromisedTypeOfPromise(p)?(j.assertNode(Ql(r).parent,Nr),HWt(t,r,a,u,h)):b2()}function h_e({checker:t},r){if(r.kind===106)return!0;if(ot(r)&&!zl(r)&&Fr(r)==="undefined"){const a=t.getSymbolAtLocation(r);return!a||t.isUndefinedSymbol(a)}return!1}function BWt(t){const r=G.createUniqueName(t.identifier.text,16);return C5(r)}function Qst(t,r,a){let u;return a&&!Uj(t,r)&&(zj(a)?(u=a,r.synthNamesMap.forEach((h,p)=>{if(h.identifier.text===a.identifier.text){const g=BWt(a);r.synthNamesMap.set(p,g)}})):u=C5(G.createUniqueName("result",16),a.types),j6e(u)),u}function Zst(t,r,a,u,h){const p=[];let g;if(u&&!Uj(t,r)){g=Ec(j6e(u));const C=u.types,b=r.checker.getUnionType(C,2),T=r.isInJSFile?void 0:r.checker.typeToTypeNode(b,void 0,void 0),E=[G.createVariableDeclaration(g,void 0,T)],N=G.createVariableStatement(void 0,G.createVariableDeclarationList(E,1));p.push(N)}return p.push(a),h&&g&&UWt(h)&&p.push(G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(Ec(sot(h)),void 0,void 0,g)],2))),p}function WWt(t,r,a,u,h){if(!r||h_e(a,r))return cO(t,t.expression.expression,a,u,h);const p=Qst(t,a,h),g=cO(t,t.expression.expression,a,!0,p);if(vA())return b2();const C=V6e(r,u,void 0,void 0,t,a);if(vA())return b2();const b=G.createBlock(g),T=G.createBlock(C),E=G.createTryStatement(b,void 0,T);return Zst(t,a,E,p,h)}function Yst(t,r,a,u,h){if(!r||h_e(a,r))return cO(t,t.expression.expression,a,u,h);const p=not(r,a),g=Qst(t,a,h),C=cO(t,t.expression.expression,a,!0,g);if(vA())return b2();const b=V6e(r,u,g,p,t,a);if(vA())return b2();const T=G.createBlock(C),E=G.createCatchClause(p&&Ec(pY(p)),G.createBlock(b)),N=G.createTryStatement(T,E,void 0);return Zst(t,a,N,g,h)}function VWt(t,r,a,u,h,p){if(!r||h_e(u,r))return Yst(t,a,u,h,p);if(a&&!h_e(u,a))return b2();const g=not(r,u),C=cO(t.expression.expression,t.expression.expression,u,!0,g);if(vA())return b2();const b=V6e(r,h,p,g,t,u);return vA()?b2():Js(C,b)}function HWt(t,r,a,u,h){if(Uj(t,a)){let p=Ec(r);return u&&(p=G.createAwaitExpression(p)),[G.createReturnStatement(p)]}return __e(h,G.createAwaitExpression(r),void 0)}function __e(t,r,a){return!t||rot(t)?[G.createExpressionStatement(r)]:zj(t)&&t.hasBeenDeclared?[G.createExpressionStatement(G.createAssignment(Ec(H6e(t)),r))]:[G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(Ec(pY(t)),void 0,a,r)],2))]}function W6e(t,r){if(r&&t){const a=G.createUniqueName("result",16);return[...__e(C5(a),t,r),G.createReturnStatement(a)]}return[G.createReturnStatement(t)]}function V6e(t,r,a,u,h,p){var g;switch(t.kind){case 106:break;case 211:case 80:if(!u)break;const C=G.createCallExpression(Ec(t),void 0,zj(u)?[H6e(u)]:[]);if(Uj(h,p))return W6e(C,f_e(h,t,p.checker));const b=p.checker.getTypeAtLocation(t),T=p.checker.getSignaturesOfType(b,0);if(!T.length)return b2();const E=T[0].getReturnType(),N=__e(a,G.createAwaitExpression(C),f_e(h,t,p.checker));return a&&a.types.push(p.checker.getAwaitedType(E)||E),N;case 218:case 219:{const R=t.body,F=(g=tot(p.checker.getTypeAtLocation(t),p.checker))==null?void 0:g.getReturnType();if(Xo(R)){let H=[],U=!1;for(const q of R.statements)if(Og(q))if(U=!0,ZZ(q,p.checker))H=H.concat(iot(p,q,r,a));else{const X=F&&q.expression?eot(p.checker,F,q.expression):q.expression;H.push(...W6e(X,f_e(h,t,p.checker)))}else{if(r&&uS(q,Pk))return b2();H.push(q)}return Uj(h,p)?H.map(q=>Ec(q)):jWt(H,a,p,U)}else{const H=Ahe(R,p.checker)?iot(p,G.createReturnStatement(R),r,a):w;if(H.length>0)return H;if(F){const U=eot(p.checker,F,R);if(Uj(h,p))return W6e(U,f_e(h,t,p.checker));{const q=__e(a,U,void 0);return a&&a.types.push(p.checker.getAwaitedType(F)||F),q}}else return b2()}}default:return b2()}return w}function eot(t,r,a){const u=Ec(a);return t.getPromisedTypeOfPromise(r)?G.createAwaitExpression(u):u}function tot(t,r){const a=r.getSignaturesOfType(t,0);return rl(a)}function jWt(t,r,a,u){const h=[];for(const p of t)if(Og(p)){if(p.expression){const g=Kst(p.expression,a.checker)?G.createAwaitExpression(p.expression):p.expression;r===void 0?h.push(G.createExpressionStatement(g)):zj(r)&&r.hasBeenDeclared?h.push(G.createExpressionStatement(G.createAssignment(H6e(r),g))):h.push(G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(pY(r),void 0,void 0,g)],2)))}}else h.push(Ec(p));return!u&&r!==void 0&&h.push(G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(pY(r),void 0,void 0,G.createIdentifier("undefined"))],2))),h}function iot(t,r,a,u){let h=[];return Uo(r,function p(g){if(la(g)){const C=cO(g,g,t,a,u);if(h=h.concat(C),h.length>0)return}else Ho(g)||Uo(g,p)}),h}function not(t,r){const a=[];let u;if(Qc(t)){if(t.parameters.length>0){const b=t.parameters[0].name;u=h(b)}}else ot(t)?u=p(t):Nr(t)&&ot(t.name)&&(u=p(t.name));if(!u||"identifier"in u&&u.identifier.text==="undefined")return;return u;function h(b){if(ot(b))return p(b);const T=Rr(b.elements,E=>Bd(E)?[]:[h(E.name)]);return zWt(b,T)}function p(b){const T=C(b),E=g(T);return E&&r.synthNamesMap.get(Ba(E).toString())||C5(b,a)}function g(b){var T;return((T=Jr(b,M0))==null?void 0:T.symbol)??r.checker.getSymbolAtLocation(b)}function C(b){return b.original?b.original:b}}function rot(t){return t?zj(t)?!t.identifier.text:Ce(t.elements,rot):!0}function C5(t,r=[]){return{kind:0,identifier:t,types:r,hasBeenDeclared:!1,hasBeenReferenced:!1}}function zWt(t,r=w,a=[]){return{kind:1,bindingPattern:t,elements:r,types:a}}function H6e(t){return t.hasBeenReferenced=!0,t.identifier}function pY(t){return zj(t)?j6e(t):sot(t)}function sot(t){for(const r of t.elements)pY(r);return t.bindingPattern}function j6e(t){return t.hasBeenDeclared=!0,t.identifier}function zj(t){return t.kind===0}function UWt(t){return t.kind===1}function Uj(t,r){return!!t.original&&r.setOfExpressionsToReturn.has(Sc(t.original))}Na({errorCodes:[k.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module.code],getCodeActions(t){const{sourceFile:r,program:a,preferences:u}=t,h=er.ChangeTracker.with(t,p=>{if($Wt(r,a.getTypeChecker(),p,Ja(a.getCompilerOptions()),$p(r,u)))for(const C of a.getSourceFiles())qWt(C,r,a,p,$p(C,u))});return[G0("convertToEsModule",h,k.Convert_to_ES_module)]}});function qWt(t,r,a,u,h){var p;for(const g of t.imports){const C=(p=a.getResolvedModuleFromModuleSpecifier(g,t))==null?void 0:p.resolvedModule;if(!C||C.resolvedFileName!==r.fileName)continue;const b=O8(g);switch(b.kind){case 271:u.replaceNode(t,b,Sx(b.name,void 0,g,h));break;case 213:L_(b,!1)&&u.replaceNode(t,b,G.createPropertyAccessExpression(Ec(b),"default"));break}}}function $Wt(t,r,a,u,h){const p={original:sVt(t),additional:new Set},g=JWt(t,r,p);GWt(t,g,a);let C=!1,b;for(const T of $t(t.statements,Lu)){const E=aot(t,T,a,r,p,u,h);E&&DG(E,b??(b=new Map))}for(const T of $t(t.statements,E=>!Lu(E))){const E=KWt(t,T,r,a,p,u,g,b,h);C=C||E}return b==null||b.forEach((T,E)=>{a.replaceNode(t,E,T)}),C}function JWt(t,r,a){const u=new Map;return oot(t,h=>{const{text:p}=h.name;!u.has(p)&&(Qae(h.name)||r.resolveName(p,h,111551,!0))&&u.set(p,p_e(`_${p}`,a))}),u}function GWt(t,r,a){oot(t,(u,h)=>{if(h)return;const{text:p}=u.name;a.replaceNode(t,u,G.createIdentifier(r.get(p)||p))})}function oot(t,r){t.forEachChild(function a(u){if(Nr(u)&&dD(t,u.expression)&&ot(u.name)){const{parent:h}=u;r(u,ur(h)&&h.left===u&&h.operatorToken.kind===64)}u.forEachChild(a)})}function KWt(t,r,a,u,h,p,g,C,b){switch(r.kind){case 243:return aot(t,r,u,a,h,p,b),!1;case 244:{const{expression:T}=r;switch(T.kind){case 213:return L_(T,!0)&&u.replaceNode(t,r,Sx(void 0,void 0,T.arguments[0],b)),!1;case 226:{const{operatorToken:E}=T;return E.kind===64&&QWt(t,a,T,u,g,C)}}}default:return!1}}function aot(t,r,a,u,h,p,g){const{declarationList:C}=r;let b=!1;const T=qt(C.declarations,E=>{const{name:N,initializer:R}=E;if(R){if(dD(t,R))return b=!0,S5([]);if(L_(R,!0))return b=!0,nVt(N,R.arguments[0],u,h,p,g);if(Nr(R)&&L_(R.expression,!0))return b=!0,XWt(N,R.name.text,R.expression.arguments[0],h,g)}return S5([G.createVariableStatement(void 0,G.createVariableDeclarationList([E],C.flags))])});if(b){a.replaceNodeWithNodes(t,r,Rr(T,N=>N.newImports));let E;return O(T,N=>{N.useSitesToUnqualify&&DG(N.useSitesToUnqualify,E??(E=new Map))}),E}}function XWt(t,r,a,u,h){switch(t.kind){case 206:case 207:{const p=p_e(r,u);return S5([dot(p,r,a,h),m_e(void 0,t,G.createIdentifier(p))])}case 80:return S5([dot(t.text,r,a,h)]);default:return j.assertNever(t,`Convert to ES module got invalid syntax form ${t.kind}`)}}function QWt(t,r,a,u,h,p){const{left:g,right:C}=a;if(!Nr(g))return!1;if(dD(t,g))if(dD(t,C))u.delete(t,a.parent);else{const b=Aa(C)?ZWt(C,p):L_(C,!0)?eVt(C.arguments[0],r):void 0;return b?(u.replaceNodeWithNodes(t,a.parent,b[0]),b[1]):(u.replaceRangeWithText(t,Um(g.getStart(t),C.pos),"export default"),!0)}else dD(t,g.expression)&&YWt(t,a,u,h);return!1}function ZWt(t,r){const a=jl(t.properties,u=>{switch(u.kind){case 177:case 178:case 304:case 305:return;case 303:return ot(u.name)?iVt(u.name.text,u.initializer,r):void 0;case 174:return ot(u.name)?uot(u.name.text,[G.createToken(95)],u,r):void 0;default:j.assertNever(u,`Convert to ES6 got invalid prop kind ${u.kind}`)}});return a&&[a,!1]}function YWt(t,r,a,u){const{text:h}=r.left.name,p=u.get(h);if(p!==void 0){const g=[m_e(void 0,p,r.right),q6e([G.createExportSpecifier(!1,p,h)])];a.replaceNodeWithNodes(t,r.parent,g)}else tVt(r,t,a)}function eVt(t,r){const a=t.text,u=r.getSymbolAtLocation(t),h=u?u.exports:I;return h.has("export=")?[[z6e(a)],!0]:h.has("default")?h.size>1?[[cot(a),z6e(a)],!0]:[[z6e(a)],!0]:[[cot(a)],!1]}function cot(t){return q6e(void 0,t)}function z6e(t){return q6e([G.createExportSpecifier(!1,void 0,"default")],t)}function tVt({left:t,right:r,parent:a},u,h){const p=t.name.text;if((ml(r)||xl(r)||fd(r))&&(!r.name||r.name.text===p)){h.replaceRange(u,{pos:t.getStart(u),end:r.getStart(u)},G.createToken(95),{suffix:" "}),r.name||h.insertName(u,r,p);const g=Uc(a,27,u);g&&h.delete(u,g)}else h.replaceNodeRangeWithNodes(u,t.expression,Uc(t,25,u),[G.createToken(95),G.createToken(87)],{joiner:" ",suffix:" "})}function iVt(t,r,a){const u=[G.createToken(95)];switch(r.kind){case 218:{const{name:p}=r;if(p&&p.text!==t)return h()}case 219:return uot(t,u,r,a);case 231:return aVt(t,u,r,a);default:return h()}function h(){return m_e(u,G.createIdentifier(t),U6e(r,a))}}function U6e(t,r){if(!r||!Ft(as(r.keys()),u=>Ip(t,u)))return t;return Ao(t)?she(t,!0,a):Sj(t,!0,a);function a(u){if(u.kind===211){const h=r.get(u);return r.delete(u),h}}}function nVt(t,r,a,u,h,p){switch(t.kind){case 206:{const g=jl(t.elements,C=>C.dotDotDotToken||C.initializer||C.propertyName&&!ot(C.propertyName)||!ot(C.name)?void 0:fot(C.propertyName&&C.propertyName.text,C.name.text));if(g)return S5([Sx(void 0,g,r,p)])}case 207:{const g=p_e(Ij(r.text,h),u);return S5([Sx(G.createIdentifier(g),void 0,r,p),m_e(void 0,Ec(t),G.createIdentifier(g))])}case 80:return rVt(t,r,a,u,p);default:return j.assertNever(t,`Convert to ES module got invalid name kind ${t.kind}`)}}function rVt(t,r,a,u,h){const p=a.getSymbolAtLocation(t),g=new Map;let C=!1,b;for(const E of u.original.get(t.text)){if(a.getSymbolAtLocation(E)!==p||E===t)continue;const{parent:N}=E;if(Nr(N)){const{name:{text:R}}=N;if(R==="default"){C=!0;const F=E.getText();(b??(b=new Map)).set(N,G.createIdentifier(F))}else{j.assert(N.expression===E,"Didn't expect expression === use");let F=g.get(R);F===void 0&&(F=p_e(R,u),g.set(R,F)),(b??(b=new Map)).set(N,G.createIdentifier(F))}}else C=!0}const T=g.size===0?void 0:as(ms(g.entries(),([E,N])=>G.createImportSpecifier(!1,E===N?void 0:G.createIdentifier(E),G.createIdentifier(N))));return T||(C=!0),S5([Sx(C?Ec(t):void 0,T,r,h)],b)}function p_e(t,r){for(;r.original.has(t)||r.additional.has(t);)t=`_${t}`;return r.additional.add(t),t}function sVt(t){const r=Of();return lot(t,a=>r.add(a.text,a)),r}function lot(t,r){ot(t)&&oVt(t)&&r(t),t.forEachChild(a=>lot(a,r))}function oVt(t){const{parent:r}=t;switch(r.kind){case 211:return r.name!==t;case 208:return r.propertyName!==t;case 276:return r.propertyName!==t;default:return!0}}function uot(t,r,a,u){return G.createFunctionDeclaration(Js(r,vD(a.modifiers)),Ec(a.asteriskToken),t,vD(a.typeParameters),vD(a.parameters),Ec(a.type),G.converters.convertToFunctionBlock(U6e(a.body,u)))}function aVt(t,r,a,u){return G.createClassDeclaration(Js(r,vD(a.modifiers)),t,vD(a.typeParameters),vD(a.heritageClauses),U6e(a.members,u))}function dot(t,r,a,u){return r==="default"?Sx(G.createIdentifier(t),void 0,a,u):Sx(void 0,[fot(r,t)],a,u)}function fot(t,r){return G.createImportSpecifier(!1,t!==void 0&&t!==r?G.createIdentifier(t):void 0,G.createIdentifier(r))}function m_e(t,r,a){return G.createVariableStatement(t,G.createVariableDeclarationList([G.createVariableDeclaration(r,void 0,void 0,a)],2))}function q6e(t,r){return G.createExportDeclaration(void 0,!1,t&&G.createNamedExports(t),r===void 0?void 0:G.createStringLiteral(r))}function S5(t,r){return{newImports:t,useSitesToUnqualify:r}}var $6e="correctQualifiedNameToIndexedAccessType",hot=[k.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1.code];Na({errorCodes:hot,getCodeActions(t){const r=_ot(t.sourceFile,t.span.start);if(!r)return;const a=er.ChangeTracker.with(t,h=>pot(h,t.sourceFile,r)),u=`${r.left.text}["${r.right.text}"]`;return[ua($6e,a,[k.Rewrite_as_the_indexed_access_type_0,u],$6e,k.Rewrite_all_as_indexed_access_types)]},fixIds:[$6e],getAllCodeActions:t=>qc(t,hot,(r,a)=>{const u=_ot(a.file,a.start);u&&pot(r,a.file,u)})});function _ot(t,r){const a=Qi(Rs(t,r),o_);return j.assert(!!a,"Expected position to be owned by a qualified name."),ot(a.left)?a:void 0}function pot(t,r,a){const u=a.right.text,h=G.createIndexedAccessTypeNode(G.createTypeReferenceNode(a.left,void 0),G.createLiteralTypeNode(G.createStringLiteral(u)));t.replaceNode(r,a,h)}var J6e=[k.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type.code],G6e="convertToTypeOnlyExport";Na({errorCodes:J6e,getCodeActions:function(r){const a=er.ChangeTracker.with(r,u=>got(u,mot(r.span,r.sourceFile),r));if(a.length)return[ua(G6e,a,k.Convert_to_type_only_export,G6e,k.Convert_all_re_exported_types_to_type_only_exports)]},fixIds:[G6e],getAllCodeActions:function(r){const a=new Map;return qc(r,J6e,(u,h)=>{const p=mot(h,r.sourceFile);p&&Pg(a,Sc(p.parent.parent))&&got(u,p,r)})}});function mot(t,r){return Jr(Rs(r,t.start).parent,vh)}function got(t,r,a){if(!r)return;const u=r.parent,h=u.parent,p=cVt(r,a);if(p.length===u.elements.length)t.insertModifierBefore(a.sourceFile,156,u);else{const g=G.updateExportDeclaration(h,h.modifiers,!1,G.updateNamedExports(u,$t(u.elements,b=>!Yt(p,b))),h.moduleSpecifier,void 0),C=G.createExportDeclaration(void 0,!0,G.createNamedExports(p),h.moduleSpecifier,void 0);t.replaceNode(a.sourceFile,h,g,{leadingTriviaOption:er.LeadingTriviaOption.IncludeAll,trailingTriviaOption:er.TrailingTriviaOption.Exclude}),t.insertNodeAfter(a.sourceFile,h,C)}}function cVt(t,r){const a=t.parent;if(a.elements.length===1)return a.elements;const u=MAe(f_(a),r.program.getSemanticDiagnostics(r.sourceFile,r.cancellationToken));return $t(a.elements,h=>{var p;return h===t||((p=OAe(h,u))==null?void 0:p.code)===J6e[0]})}var yot=[k._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code,k._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code],g_e="convertToTypeOnlyImport";Na({errorCodes:yot,getCodeActions:function(r){var a;const u=vot(r.sourceFile,r.span.start);if(u){const h=er.ChangeTracker.with(r,C=>mY(C,r.sourceFile,u)),p=u.kind===276&&du(u.parent.parent.parent)&&bot(u,r.sourceFile,r.program)?er.ChangeTracker.with(r,C=>mY(C,r.sourceFile,u.parent.parent.parent)):void 0,g=ua(g_e,h,u.kind===276?[k.Use_type_0,((a=u.propertyName)==null?void 0:a.text)??u.name.text]:k.Use_import_type,g_e,k.Fix_all_with_type_only_imports);return Ft(p)?[G0(g_e,p,k.Use_import_type),g]:[g]}},fixIds:[g_e],getAllCodeActions:function(r){const a=new Set;return qc(r,yot,(u,h)=>{const p=vot(h.file,h.start);(p==null?void 0:p.kind)===272&&!a.has(p)?(mY(u,h.file,p),a.add(p)):(p==null?void 0:p.kind)===276&&du(p.parent.parent.parent)&&!a.has(p.parent.parent.parent)&&bot(p,h.file,r.program)?(mY(u,h.file,p.parent.parent.parent),a.add(p.parent.parent.parent)):(p==null?void 0:p.kind)===276&&mY(u,h.file,p)})}});function vot(t,r){const{parent:a}=Rs(t,r);return l_(a)||du(a)&&a.importClause?a:void 0}function bot(t,r,a){if(t.parent.parent.name)return!1;const u=t.parent.elements.filter(p=>!p.isTypeOnly);if(u.length===1)return!0;const h=a.getTypeChecker();for(const p of u)if(kl.Core.eachSymbolReferenceInFile(p.name,h,r,C=>{const b=h.getSymbolAtLocation(C);return!!b&&h.symbolIsValue(b)||!Yk(C)}))return!1;return!0}function mY(t,r,a){var u;if(l_(a))t.replaceNode(r,a,G.updateImportSpecifier(a,!0,a.propertyName,a.name));else{const h=a.importClause;if(h.name&&h.namedBindings)t.replaceNodeWithNodes(r,a,[G.createImportDeclaration(vD(a.modifiers,!0),G.createImportClause(!0,Ec(h.name,!0),void 0),Ec(a.moduleSpecifier,!0),Ec(a.attributes,!0)),G.createImportDeclaration(vD(a.modifiers,!0),G.createImportClause(!0,void 0,Ec(h.namedBindings,!0)),Ec(a.moduleSpecifier,!0),Ec(a.attributes,!0))]);else{const p=((u=h.namedBindings)==null?void 0:u.kind)===275?G.updateNamedImports(h.namedBindings,Wr(h.namedBindings.elements,C=>G.updateImportSpecifier(C,!1,C.propertyName,C.name))):h.namedBindings,g=G.updateImportDeclaration(a,a.modifiers,G.updateImportClause(h,!0,h.name,p),a.moduleSpecifier,a.attributes);t.replaceNode(r,a,g)}}}var K6e="convertTypedefToType",Cot=[k.JSDoc_typedef_may_be_converted_to_TypeScript_type.code];Na({fixIds:[K6e],errorCodes:Cot,getCodeActions(t){const r=rC(t.host,t.formatContext.options),a=Rs(t.sourceFile,t.span.start);if(!a)return;const u=er.ChangeTracker.with(t,h=>Sot(h,a,t.sourceFile,r));if(u.length>0)return[ua(K6e,u,k.Convert_typedef_to_TypeScript_type,K6e,k.Convert_all_typedef_to_TypeScript_types)]},getAllCodeActions:t=>qc(t,Cot,(r,a)=>{const u=rC(t.host,t.formatContext.options),h=Rs(a.file,a.start);h&&Sot(r,h,a.file,u,!0)})});function Sot(t,r,a,u,h=!1){if(!MI(r))return;const p=uVt(r);if(!p)return;const g=r.parent,{leftSibling:C,rightSibling:b}=lVt(r);let T=g.getStart(),E="";!C&&g.comment&&(T=wot(g,g.getStart(),r.getStart()),E=`${u} */${u}`),C&&(h&&MI(C)?(T=r.getStart(),E=""):(T=wot(g,C.getStart(),r.getStart()),E=`${u} */${u}`));let N=g.getEnd(),R="";b&&(h&&MI(b)?(N=b.getStart(),R=`${u}${u}`):(N=b.getStart(),R=`${u}/**${u} * `)),t.replaceRange(a,{pos:T,end:N},p,{prefix:E,suffix:R})}function lVt(t){const r=t.parent,a=r.getChildCount()-1,u=r.getChildren().findIndex(g=>g.getStart()===t.getStart()&&g.getEnd()===t.getEnd()),h=u>0?r.getChildAt(u-1):void 0,p=u<a?r.getChildAt(u+1):void 0;return{leftSibling:h,rightSibling:p}}function wot(t,r,a){const u=t.getText().substring(r-t.getStart(),a-t.getStart());for(let h=u.length;h>0;h--)if(!/[*/\s]/.test(u.substring(h-1,h)))return r+h;return a}function uVt(t){var r;const{typeExpression:a}=t;if(!a)return;const u=(r=t.name)==null?void 0:r.getText();if(u){if(a.kind===322)return dVt(u,a);if(a.kind===309)return fVt(u,a)}}function dVt(t,r){const a=xot(r);if(Ft(a))return G.createInterfaceDeclaration(void 0,t,void 0,void 0,a)}function fVt(t,r){const a=Ec(r.type);if(a)return G.createTypeAliasDeclaration(void 0,G.createIdentifier(t),void 0,a)}function xot(t){const r=t.jsDocPropertyTags;return Ft(r)?es(r,u=>{var h;const p=hVt(u),g=(h=u.typeExpression)==null?void 0:h.type,C=u.isBracketed;let b;if(g&&OI(g)){const T=xot(g);b=G.createTypeLiteralNode(T)}else g&&(b=Ec(g));if(b&&p){const T=C?G.createToken(58):void 0;return G.createPropertySignature(void 0,p,T,b)}}):void 0}function hVt(t){return t.name.kind===80?t.name.text:t.name.right.text}function _Vt(t){return jp(t)?Rr(t.jsDoc,r=>{var a;return(a=r.tags)==null?void 0:a.filter(u=>MI(u))}):[]}var X6e="convertLiteralTypeToMappedType",kot=[k._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0.code];Na({errorCodes:kot,getCodeActions:function(r){const{sourceFile:a,span:u}=r,h=Tot(a,u.start);if(!h)return;const{name:p,constraint:g}=h,C=er.ChangeTracker.with(r,b=>Dot(b,a,h));return[ua(X6e,C,[k.Convert_0_to_1_in_0,g,p],X6e,k.Convert_all_type_literals_to_mapped_type)]},fixIds:[X6e],getAllCodeActions:t=>qc(t,kot,(r,a)=>{const u=Tot(a.file,a.start);u&&Dot(r,a.file,u)})});function Tot(t,r){const a=Rs(t,r);if(ot(a)){const u=ha(a.parent.parent,O_),h=a.getText(t);return{container:ha(u.parent,a_),typeNode:u.type,constraint:h,name:h==="K"?"P":"K"}}}function Dot(t,r,{container:a,typeNode:u,constraint:h,name:p}){t.replaceNode(r,a,G.createMappedTypeNode(void 0,G.createTypeParameterDeclaration(void 0,p,G.createTypeReferenceNode(h)),void 0,void 0,u,void 0))}var Eot=[k.Class_0_incorrectly_implements_interface_1.code,k.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code],Q6e="fixClassIncorrectlyImplementsInterface";Na({errorCodes:Eot,getCodeActions(t){const{sourceFile:r,span:a}=t,u=Iot(r,a.start);return es(i3(u),h=>{const p=er.ChangeTracker.with(t,g=>Lot(t,h,r,u,g,t.preferences));return p.length===0?void 0:ua(Q6e,p,[k.Implement_interface_0,h.getText(r)],Q6e,k.Implement_all_unimplemented_interfaces)})},fixIds:[Q6e],getAllCodeActions(t){const r=new Map;return qc(t,Eot,(a,u)=>{const h=Iot(u.file,u.start);if(Pg(r,Sc(h)))for(const p of i3(h))Lot(t,p,u.file,h,a,t.preferences)})}});function Iot(t,r){return j.checkDefined(Cf(Rs(t,r)),"There should be a containing class")}function Not(t){return!t.valueDeclaration||!(jh(t.valueDeclaration)&2)}function Lot(t,r,a,u,h,p){const g=t.program.getTypeChecker(),C=pVt(u,g),b=g.getTypeAtLocation(r),E=g.getPropertiesOfType(b).filter(jJ(Not,q=>!C.has(q.escapedName))),N=g.getTypeAtLocation(u),R=Fe(u.members,q=>iu(q));N.getNumberIndexType()||H(b,1),N.getStringIndexType()||H(b,0);const F=kD(a,t.program,p,t.host);z3e(u,E,a,t,p,F,q=>U(a,u,q)),F.writeFixes(h);function H(q,X){const Z=g.getIndexInfoOfType(q,X);Z&&U(a,u,g.indexInfoToIndexSignatureDeclaration(Z,u,void 0,void 0,lO(t)))}function U(q,X,Z){R?h.insertNodeAfter(q,R,Z):h.insertMemberAtStart(q,X,Z)}}function pVt(t,r){const a=L1(t);if(!a)return _a();const u=r.getTypeAtLocation(a),h=r.getPropertiesOfType(u);return _a(h.filter(Not))}var Pot="import",Aot="fixMissingImport",Oot=[k.Cannot_find_name_0.code,k.Cannot_find_name_0_Did_you_mean_1.code,k.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,k.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,k.Cannot_find_namespace_0.code,k._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code,k._0_only_refers_to_a_type_but_is_being_used_as_a_value_here.code,k.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code,k._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code,k.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery.code,k.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later.code,k.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom.code,k.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig.code,k.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code,k.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig.code,k.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha.code,k.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode.code,k.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig.code,k.Cannot_find_namespace_0_Did_you_mean_1.code];Na({errorCodes:Oot,getCodeActions(t){const{errorCode:r,preferences:a,sourceFile:u,span:h,program:p}=t,g=Hot(t,r,h.start,!0);if(g)return g.map(({fix:C,symbolName:b,errorIdentifierText:T})=>Y6e(t,u,b,C,b!==T,p,a))},fixIds:[Aot],getAllCodeActions:t=>{const{sourceFile:r,program:a,preferences:u,host:h,cancellationToken:p}=t,g=Mot(r,a,!0,u,h,p);return yA(t,Oot,C=>g.addImportFromDiagnostic(C,t)),gA(er.ChangeTracker.with(t,g.writeFixes))}});function kD(t,r,a,u,h){return Mot(t,r,!1,a,u,h)}function Mot(t,r,a,u,h,p){const g=r.getCompilerOptions(),C=[],b=[],T=new Map,E=new Set,N=new Set,R=new Map;return{addImportFromDiagnostic:U,addImportFromExportedSymbol:q,writeFixes:re,hasFixes:pe,addImportForUnresolvedIdentifier:H,addImportForNonExistentExport:X,removeExistingImport:Z,addVerbatimImport:F};function F(de){N.add(de)}function H(de,ue,Ie){const we=TVt(de,ue,Ie);!we||!we.length||Q(ya(we))}function U(de,ue){const Ie=Hot(ue,de.code,de.start,a);!Ie||!Ie.length||Q(ya(Ie))}function q(de,ue,Ie){var we,he;const Ae=j.checkDefined(de.parent),ke=zZ(de,Ja(g)),Te=r.getTypeChecker(),De=Te.getMergedSymbol(Vf(de,Te)),qe=Bot(t,De,ke,Ae,!1,r,h,u,p);if(!qe){j.assert((we=u.autoImportFileExcludePatterns)==null?void 0:we.length);return}const se=yY(t,r);let Ne=Rot(t,qe,r,void 0,!!ue,se,h,u);if(Ne){const Oe=((he=Jr(Ie==null?void 0:Ie.name,ot))==null?void 0:he.text)??ke;Ie&&v8(Ie)&&(Ne.kind===3||Ne.kind===2)&&Ne.addAsTypeOnly===1&&(Ne={...Ne,addAsTypeOnly:2}),Q({fix:Ne,symbolName:Oe??ke,errorIdentifierText:void 0})}}function X(de,ue,Ie,we,he){const Ae=r.getSourceFile(ue),ke=yY(t,r);if(Ae&&Ae.symbol){const{fixes:Te}=gY([{exportKind:Ie,isFromPackageJson:!1,moduleFileName:ue,moduleSymbol:Ae.symbol,targetFlags:we}],void 0,he,ke,r,t,h,u);Te.length&&Q({fix:Te[0],symbolName:de,errorIdentifierText:de})}else{const Te=GZ(ue,99,r,h),De=wS.getLocalModuleSpecifierBetweenFileNames(t,ue,g,dA(r,h),u),qe=v_e(Te,Ie,r),se=y_e(he,!0,void 0,we,r.getTypeChecker(),g);Q({fix:{kind:3,moduleSpecifierKind:"relative",moduleSpecifier:De,importKind:qe,addAsTypeOnly:se,useRequire:ke},symbolName:de,errorIdentifierText:de})}}function Z(de){de.kind===273&&j.assertIsDefined(de.name,"ImportClause should have a name if it's being removed"),E.add(de)}function Q(de){var ue,Ie;const{fix:we,symbolName:he}=de;switch(we.kind){case 0:C.push(we);break;case 1:b.push(we);break;case 2:{const{importClauseOrBindingPattern:De,importKind:qe,addAsTypeOnly:se}=we;let Ne=T.get(De);if(Ne||T.set(De,Ne={importClauseOrBindingPattern:De,defaultImport:void 0,namedImports:new Map}),qe===0){const Oe=Ne==null?void 0:Ne.namedImports.get(he);Ne.namedImports.set(he,Ae(Oe,se))}else j.assert(Ne.defaultImport===void 0||Ne.defaultImport.name===he,"(Add to Existing) Default import should be missing or match symbolName"),Ne.defaultImport={name:he,addAsTypeOnly:Ae((ue=Ne.defaultImport)==null?void 0:ue.addAsTypeOnly,se)};break}case 3:{const{moduleSpecifier:De,importKind:qe,useRequire:se,addAsTypeOnly:Ne}=we,Oe=ke(De,qe,se,Ne);switch(j.assert(Oe.useRequire===se,"(Add new) Tried to add an `import` and a `require` for the same module"),qe){case 1:j.assert(Oe.defaultImport===void 0||Oe.defaultImport.name===he,"(Add new) Default import should be missing or match symbolName"),Oe.defaultImport={name:he,addAsTypeOnly:Ae((Ie=Oe.defaultImport)==null?void 0:Ie.addAsTypeOnly,Ne)};break;case 0:const He=(Oe.namedImports||(Oe.namedImports=new Map)).get(he);Oe.namedImports.set(he,Ae(He,Ne));break;case 3:if(g.verbatimModuleSyntax){const Pe=(Oe.namedImports||(Oe.namedImports=new Map)).get(he);Oe.namedImports.set(he,Ae(Pe,Ne))}else j.assert(Oe.namespaceLikeImport===void 0||Oe.namespaceLikeImport.name===he,"Namespacelike import shoudl be missing or match symbolName"),Oe.namespaceLikeImport={importKind:qe,name:he,addAsTypeOnly:Ne};break;case 2:j.assert(Oe.namespaceLikeImport===void 0||Oe.namespaceLikeImport.name===he,"Namespacelike import shoudl be missing or match symbolName"),Oe.namespaceLikeImport={importKind:qe,name:he,addAsTypeOnly:Ne};break}break}case 4:break;default:j.assertNever(we,`fix wasn't never - got kind ${we.kind}`)}function Ae(De,qe){return Math.max(De??0,qe)}function ke(De,qe,se,Ne){const Oe=Te(De,!0),He=Te(De,!1),Pe=R.get(Oe),We=R.get(He),ze={defaultImport:void 0,namedImports:void 0,namespaceLikeImport:void 0,useRequire:se};return qe===1&&Ne===2?Pe||(R.set(Oe,ze),ze):Ne===1&&(Pe||We)?Pe||We:We||(R.set(He,ze),ze)}function Te(De,qe){return`${qe?1:0}|${De}`}}function re(de,ue){var Ie,we;let he;Fy(t)&&t.imports.length===0&&ue!==void 0?he=ue:he=$p(t,u);for(const Te of C)e3e(de,t,Te);for(const Te of b)Xot(de,t,Te,he);let Ae;if(E.size){j.assert(Fy(t),"Cannot remove imports from a future source file");const Te=new Set(es([...E],Oe=>Qi(Oe,du))),De=new Set(es([...E],Oe=>Qi(Oe,fV))),qe=[...Te].filter(Oe=>{var He,Pe,We;return!T.has(Oe.importClause)&&(!((He=Oe.importClause)!=null&&He.name)||E.has(Oe.importClause))&&(!Jr((Pe=Oe.importClause)==null?void 0:Pe.namedBindings,Jv)||E.has(Oe.importClause.namedBindings))&&(!Jr((We=Oe.importClause)==null?void 0:We.namedBindings,j1)||Ce(Oe.importClause.namedBindings.elements,ze=>E.has(ze)))}),se=[...De].filter(Oe=>(Oe.name.kind!==206||!T.has(Oe.name))&&(Oe.name.kind!==206||Ce(Oe.name.elements,He=>E.has(He)))),Ne=[...Te].filter(Oe=>{var He,Pe;return((He=Oe.importClause)==null?void 0:He.namedBindings)&&qe.indexOf(Oe)===-1&&!((Pe=T.get(Oe.importClause))!=null&&Pe.namedImports)&&(Oe.importClause.namedBindings.kind===274||Ce(Oe.importClause.namedBindings.elements,We=>E.has(We)))});for(const Oe of[...qe,...se])de.delete(t,Oe);for(const Oe of Ne)de.replaceNode(t,Oe.importClause,G.updateImportClause(Oe.importClause,Oe.importClause.isTypeOnly,Oe.importClause.name,void 0));for(const Oe of E){const He=Qi(Oe,du);He&&qe.indexOf(He)===-1&&Ne.indexOf(He)===-1?Oe.kind===273?de.delete(t,Oe.name):(j.assert(Oe.kind===276,"NamespaceImport should have been handled earlier"),(Ie=T.get(He.importClause))!=null&&Ie.namedImports?(Ae??(Ae=new Set)).add(Oe):de.delete(t,Oe)):Oe.kind===208?(we=T.get(Oe.parent))!=null&&we.namedImports?(Ae??(Ae=new Set)).add(Oe):de.delete(t,Oe):Oe.kind===271&&de.delete(t,Oe)}}T.forEach(({importClauseOrBindingPattern:Te,defaultImport:De,namedImports:qe})=>{Kot(de,t,Te,De,as(qe.entries(),([se,Ne])=>({addAsTypeOnly:Ne,name:se})),Ae,u)});let ke;R.forEach(({useRequire:Te,defaultImport:De,namedImports:qe,namespaceLikeImport:se},Ne)=>{const Oe=Ne.slice(2),Pe=(Te?Yot:Zot)(Oe,he,De,qe&&as(qe.entries(),([We,ze])=>({addAsTypeOnly:ze,name:We})),se,g,u);ke=rS(ke,Pe)}),ke=rS(ke,oe()),ke&&Gfe(de,t,ke,!0,u)}function oe(){if(!N.size)return;const de=new Set(es([...N],Ie=>Qi(Ie,du))),ue=new Set(es([...N],Ie=>Qi(Ie,hV)));return[...es([...N],Ie=>Ie.kind===271?Ec(Ie,!0):void 0),...[...de].map(Ie=>{var we;return N.has(Ie)?Ec(Ie,!0):Ec(G.updateImportDeclaration(Ie,Ie.modifiers,Ie.importClause&&G.updateImportClause(Ie.importClause,Ie.importClause.isTypeOnly,N.has(Ie.importClause)?Ie.importClause.name:void 0,N.has(Ie.importClause.namedBindings)?Ie.importClause.namedBindings:(we=Jr(Ie.importClause.namedBindings,j1))!=null&&we.elements.some(he=>N.has(he))?G.updateNamedImports(Ie.importClause.namedBindings,Ie.importClause.namedBindings.elements.filter(he=>N.has(he))):void 0),Ie.moduleSpecifier,Ie.attributes),!0)}),...[...ue].map(Ie=>N.has(Ie)?Ec(Ie,!0):Ec(G.updateVariableStatement(Ie,Ie.modifiers,G.updateVariableDeclarationList(Ie.declarationList,es(Ie.declarationList.declarations,we=>N.has(we)?we:G.updateVariableDeclaration(we,we.name.kind===206?G.updateObjectBindingPattern(we.name,we.name.elements.filter(he=>N.has(he))):we.name,we.exclamationToken,we.type,we.initializer)))),!0))]}function pe(){return C.length>0||b.length>0||T.size>0||R.size>0||N.size>0||E.size>0}}function mVt(t,r,a,u){const h=nO(t,u,a),p=Wot(t,r);return{getModuleSpecifierForBestExportInfo:g};function g(C,b,T,E){const{fixes:N,computedWithoutCacheCount:R}=gY(C,b,T,!1,r,t,a,u,p,E),F=zot(N,t,r,h,a,u);return F&&{...F,computedWithoutCacheCount:R}}}function gVt(t,r,a,u,h,p,g,C,b,T,E,N){let R;a?(R=Pj(u,g,C,E,N).get(u.path,a),j.assertIsDefined(R,"Some exportInfo should match the specified exportMapKey")):(R=Loe(zm(r.name))?[vVt(t,h,r,C,g)]:Bot(u,t,h,r,p,C,g,E,N),j.assertIsDefined(R,"Some exportInfo should match the specified symbol / moduleSymbol"));const F=yY(u,C),H=Yk(Rs(u,T)),U=j.checkDefined(Rot(u,R,C,T,H,F,g,E));return{moduleSpecifier:U.moduleSpecifier,codeAction:Fot(Y6e({host:g,formatContext:b,preferences:E},u,h,U,!1,C,E))}}function yVt(t,r,a,u,h,p){const g=a.getCompilerOptions(),C=$L(Z6e(t,a.getTypeChecker(),r,g)),b=Jot(t,r,C,a),T=C!==r.text;return b&&Fot(Y6e({host:u,formatContext:h,preferences:p},t,C,b,T,a,p))}function Rot(t,r,a,u,h,p,g,C){const b=nO(t,C,g);return zot(gY(r,u,h,p,a,t,g,C).fixes,t,a,b,g,C)}function Fot({description:t,changes:r,commands:a}){return{description:t,changes:r,commands:a}}function Bot(t,r,a,u,h,p,g,C,b){const T=Vot(p,g),E=C.autoImportFileExcludePatterns&&WAe(g,C),N=p.getTypeChecker().getMergedSymbol(u),R=E&&N.declarations&&ql(N,307),F=R&&E(R);return Pj(t,g,p,C,b).search(t.path,h,H=>H===a,H=>{if(T(H[0].isFromPackageJson).getMergedSymbol(Vf(H[0].symbol,T(H[0].isFromPackageJson)))===r&&(F||H.some(U=>U.moduleSymbol===u||U.symbol.parent===u)))return H})}function vVt(t,r,a,u,h){var p,g;const C=T(u.getTypeChecker(),!1);if(C)return C;const b=(g=(p=h.getPackageJsonAutoImportProvider)==null?void 0:p.call(h))==null?void 0:g.getTypeChecker();return j.checkDefined(b&&T(b,!0),"Could not find symbol in specified module for code actions");function T(E,N){const R=KZ(a,E);if(R&&Vf(R.symbol,E)===t)return{symbol:R.symbol,moduleSymbol:a,moduleFileName:void 0,exportKind:R.exportKind,targetFlags:Vf(t,E).flags,isFromPackageJson:N};const F=E.tryGetMemberInModuleExportsAndProperties(r,a);if(F&&Vf(F,E)===t)return{symbol:F,moduleSymbol:a,moduleFileName:void 0,exportKind:0,targetFlags:Vf(t,E).flags,isFromPackageJson:N}}}function gY(t,r,a,u,h,p,g,C,b=Fy(p)?Wot(p,h):void 0,T){const E=h.getTypeChecker(),N=b?Rr(t,b.getImportsForExportInfo):w,R=r!==void 0&&bVt(N,r),F=SVt(N,a,E,h.getCompilerOptions());if(F)return{computedWithoutCacheCount:0,fixes:[...R?[R]:w,F]};const{fixes:H,computedWithoutCacheCount:U=0}=xVt(t,N,h,p,r,a,u,g,C,T);return{computedWithoutCacheCount:U,fixes:[...R?[R]:w,...H]}}function bVt(t,r){return J(t,({declaration:a,importKind:u})=>{var h;if(u!==0)return;const p=CVt(a),g=p&&((h=Z6(a))==null?void 0:h.text);if(g)return{kind:0,namespacePrefix:p,usagePosition:r,moduleSpecifierKind:void 0,moduleSpecifier:g}})}function CVt(t){var r,a,u;switch(t.kind){case 260:return(r=Jr(t.name,ot))==null?void 0:r.text;case 271:return t.name.text;case 351:case 272:return(u=Jr((a=t.importClause)==null?void 0:a.namedBindings,Jv))==null?void 0:u.name.text;default:return j.assertNever(t)}}function y_e(t,r,a,u,h,p){return t?a&&p.verbatimModuleSyntax&&(!(u&111551)||h.getTypeOnlyAliasDeclaration(a))?2:1:4}function SVt(t,r,a,u){let h;for(const g of t){const C=p(g);if(!C)continue;const b=v8(C.importClauseOrBindingPattern);if(C.addAsTypeOnly!==4&&b||C.addAsTypeOnly===4&&!b)return C;h??(h=C)}return h;function p({declaration:g,importKind:C,symbol:b,targetFlags:T}){if(C===3||C===2||g.kind===271)return;if(g.kind===260)return(C===0||C===1)&&g.name.kind===206?{kind:2,importClauseOrBindingPattern:g.name,importKind:C,moduleSpecifierKind:void 0,moduleSpecifier:g.initializer.arguments[0].text,addAsTypeOnly:4}:void 0;const{importClause:E}=g;if(!E||!Bc(g.moduleSpecifier))return;const{name:N,namedBindings:R}=E;if(E.isTypeOnly&&!(C===0&&R))return;const F=y_e(r,!1,b,T,a,u);if(!(C===1&&(N||F===2&&R))&&!(C===0&&(R==null?void 0:R.kind)===274))return{kind:2,importClauseOrBindingPattern:E,importKind:C,moduleSpecifierKind:void 0,moduleSpecifier:g.moduleSpecifier.text,addAsTypeOnly:F}}}function Wot(t,r){const a=r.getTypeChecker();let u;for(const h of t.imports){const p=O8(h);if(fV(p.parent)){const g=a.resolveExternalModuleName(h);g&&(u||(u=Of())).add(Ba(g),p.parent)}else if(p.kind===272||p.kind===271||p.kind===351){const g=a.getSymbolAtLocation(h);g&&(u||(u=Of())).add(Ba(g),p)}}return{getImportsForExportInfo:({moduleSymbol:h,exportKind:p,targetFlags:g,symbol:C})=>{const b=u==null?void 0:u.get(Ba(h));if(!b||r_(t)&&!(g&111551)&&!Ce(b,q1))return w;const T=v_e(t,p,r);return b.map(E=>({declaration:E,importKind:T,symbol:C,targetFlags:g}))}}}function yY(t,r){if(!Uv(t.fileName))return!1;if(t.commonJsModuleIndicator&&!t.externalModuleIndicator)return!0;if(t.externalModuleIndicator&&!t.commonJsModuleIndicator)return!1;const a=r.getCompilerOptions();if(a.configFile)return zh(a)<5;if(i3e(t,r)===1)return!0;if(i3e(t,r)===99)return!1;for(const u of r.getSourceFiles())if(!(u===t||!r_(u)||r.isSourceFileFromExternalLibrary(u))){if(u.commonJsModuleIndicator&&!u.externalModuleIndicator)return!0;if(u.externalModuleIndicator&&!u.commonJsModuleIndicator)return!1}return!0}function Vot(t,r){return x1(a=>a?r.getPackageJsonAutoImportProvider().getTypeChecker():t.getTypeChecker())}function wVt(t,r,a,u,h,p,g,C,b){const T=Uv(r.fileName),E=t.getCompilerOptions(),N=dA(t,g),R=Vot(t,g),F=yh(E),H=IZ(F),U=b?Z=>wS.tryGetModuleSpecifiersFromCache(Z.moduleSymbol,r,N,C):(Z,Q)=>wS.getModuleSpecifiersWithCacheInfo(Z.moduleSymbol,Q,E,r,N,C,void 0,!0);let q=0;const X=Rr(p,(Z,Q)=>{const re=R(Z.isFromPackageJson),{computedWithoutCache:oe,moduleSpecifiers:pe,kind:de}=U(Z,re)??{},ue=!!(Z.targetFlags&111551),Ie=y_e(u,!0,Z.symbol,Z.targetFlags,re,E);return q+=oe?1:0,es(pe,we=>{if(H&&yx(we))return;if(!ue&&T&&a!==void 0)return{kind:1,moduleSpecifierKind:de,moduleSpecifier:we,usagePosition:a,exportInfo:Z,isReExport:Q>0};const he=v_e(r,Z.exportKind,t);let Ae;if(a!==void 0&&he===3&&Z.exportKind===0){const ke=re.resolveExternalModuleSymbol(Z.moduleSymbol);let Te;ke!==Z.moduleSymbol&&(Te=XZ(ke,re,Ja(E),hl)),Te||(Te=Ej(Z.moduleSymbol,Ja(E),!1)),Ae={namespacePrefix:Te,usagePosition:a}}return{kind:3,moduleSpecifierKind:de,moduleSpecifier:we,importKind:he,useRequire:h,addAsTypeOnly:Ie,exportInfo:Z,isReExport:Q>0,qualification:Ae}})});return{computedWithoutCacheCount:q,fixes:X}}function xVt(t,r,a,u,h,p,g,C,b,T){const E=J(r,N=>kVt(N,p,g,a.getTypeChecker(),a.getCompilerOptions()));return E?{fixes:[E]}:wVt(a,u,h,p,g,t,C,b,T)}function kVt({declaration:t,importKind:r,symbol:a,targetFlags:u},h,p,g,C){var b;const T=(b=Z6(t))==null?void 0:b.text;if(T){const E=p?4:y_e(h,!0,a,u,g,C);return{kind:3,moduleSpecifierKind:void 0,moduleSpecifier:T,importKind:r,addAsTypeOnly:E,useRequire:p}}}function Hot(t,r,a,u){const h=Rs(t.sourceFile,a);let p;if(r===k._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code)p=NVt(t,h);else if(ot(h))if(r===k._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code){const C=$L(Z6e(t.sourceFile,t.program.getTypeChecker(),h,t.program.getCompilerOptions())),b=Jot(t.sourceFile,h,C,t.program);return b&&[{fix:b,symbolName:C,errorIdentifierText:h.text}]}else p=$ot(t,h,u);else return;const g=nO(t.sourceFile,t.preferences,t.host);return p&&jot(p,t.sourceFile,t.program,g,t.host,t.preferences)}function jot(t,r,a,u,h,p){const g=C=>ol(C,h.getCurrentDirectory(),hS(h));return Mu(t,(C,b)=>Ak(!!C.isJsxNamespaceFix,!!b.isJsxNamespaceFix)||_l(C.fix.kind,b.fix.kind)||Uot(C.fix,b.fix,r,a,p,u.allowsImportingSpecifier,g))}function TVt(t,r,a){const u=$ot(t,r,a),h=nO(t.sourceFile,t.preferences,t.host);return u&&jot(u,t.sourceFile,t.program,h,t.host,t.preferences)}function zot(t,r,a,u,h,p){if(Ft(t))return t[0].kind===0||t[0].kind===2?t[0]:t.reduce((g,C)=>Uot(C,g,r,a,p,u.allowsImportingSpecifier,b=>ol(b,h.getCurrentDirectory(),hS(h)))===-1?C:g)}function Uot(t,r,a,u,h,p,g){return t.kind!==0&&r.kind!==0?Ak(r.moduleSpecifierKind!=="node_modules"||p(r.moduleSpecifier),t.moduleSpecifierKind!=="node_modules"||p(t.moduleSpecifier))||DVt(t,r,h)||IVt(t.moduleSpecifier,r.moduleSpecifier,a,u)||Ak(qot(t,a.path,g),qot(r,a.path,g))||ZV(t.moduleSpecifier,r.moduleSpecifier):0}function DVt(t,r,a){return a.importModuleSpecifierPreference==="non-relative"||a.importModuleSpecifierPreference==="project-relative"?Ak(t.moduleSpecifierKind==="relative",r.moduleSpecifierKind==="relative"):0}function qot(t,r,a){var u;if(t.isReExport&&((u=t.exportInfo)!=null&&u.moduleFileName)&&EVt(t.exportInfo.moduleFileName)){const h=a(ts(t.exportInfo.moduleFileName));return so(r,h)}return!1}function EVt(t){return ud(t,[".js",".jsx",".d.ts",".ts",".tsx"],!0)==="index"}function IVt(t,r,a,u){return so(t,"node:")&&!so(r,"node:")?qZ(a,u)?-1:1:so(r,"node:")&&!so(t,"node:")?qZ(a,u)?1:-1:0}function NVt({sourceFile:t,program:r,host:a,preferences:u},h){const p=r.getTypeChecker(),g=LVt(h,p);if(!g)return;const C=p.getAliasedSymbol(g),b=g.name,T=[{symbol:g,moduleSymbol:C,moduleFileName:void 0,exportKind:3,targetFlags:C.flags,isFromPackageJson:!1}],E=yY(t,r);return gY(T,void 0,!1,E,r,t,a,u).fixes.map(R=>{var F;return{fix:R,symbolName:b,errorIdentifierText:(F=Jr(h,ot))==null?void 0:F.text}})}function LVt(t,r){const a=ot(t)?r.getSymbolAtLocation(t):void 0;if(IK(a))return a;const{parent:u}=t;if(oh(u)&&u.tagName===t||AI(u)){const h=r.resolveName(r.getJsxNamespace(u),oh(u)?t:u,111551,!1);if(IK(h))return h}}function v_e(t,r,a,u){if(a.getCompilerOptions().verbatimModuleSyntax&&BVt(t,a)===1)return 3;switch(r){case 0:return 0;case 1:return 1;case 2:return MVt(t,a.getCompilerOptions(),!!u);case 3:return PVt(t,a,!!u);default:return j.assertNever(r)}}function PVt(t,r,a){if(EP(r.getCompilerOptions()))return 1;const u=zh(r.getCompilerOptions());switch(u){case 2:case 1:case 3:return Uv(t.fileName)&&(t.externalModuleIndicator||a)?2:3;case 4:case 5:case 6:case 7:case 99:case 0:case 200:return 2;case 100:case 199:return i3e(t,r)===99?2:3;default:return j.assertNever(u,`Unexpected moduleKind ${u}`)}}function $ot({sourceFile:t,program:r,cancellationToken:a,host:u,preferences:h},p,g){const C=r.getTypeChecker(),b=r.getCompilerOptions();return Rr(Z6e(t,C,p,b),T=>{if(T==="default")return;const E=Yk(p),N=yY(t,r),R=OVt(T,X6(p),zI(p),a,t,r,g,u,h);return as($d(R.values(),F=>gY(F,p.getStart(t),E,N,r,t,u,h).fixes),F=>({fix:F,symbolName:T,errorIdentifierText:p.text,isJsxNamespaceFix:T!==p.text}))})}function Jot(t,r,a,u){const h=u.getTypeChecker(),p=h.resolveName(a,r,111551,!0);if(!p)return;const g=h.getTypeOnlyAliasDeclaration(p);if(!(!g||_n(g)!==t))return{kind:4,typeOnlyAliasDeclaration:g}}function Z6e(t,r,a,u){const h=a.parent;if((oh(h)||oD(h))&&h.tagName===a&&yhe(u.jsx)){const p=r.getJsxNamespace(t);if(AVt(p,a,r))return!s3(a.text)&&!r.resolveName(a.text,a,111551,!1)?[a.text,p]:[p]}return[a.text]}function AVt(t,r,a){if(s3(r.text))return!0;const u=a.resolveName(t,r,111551,!0);return!u||Ft(u.declarations,Kw)&&!(u.flags&111551)}function OVt(t,r,a,u,h,p,g,C,b){var T;const E=Of(),N=nO(h,b,C),R=(T=C.getModuleSpecifierCache)==null?void 0:T.call(C),F=x1(U=>dA(U?C.getPackageJsonAutoImportProvider():p,C));function H(U,q,X,Z,Q,re){const oe=F(re);if(q&&Che(Q,h,q,b,N,oe,R)||!q&&N.allowsImportingAmbientModule(U,oe)||Lj(h,zm(U.name))){const pe=Q.getTypeChecker();E.add(xAe(X,pe).toString(),{symbol:X,moduleSymbol:U,moduleFileName:q==null?void 0:q.fileName,exportKind:Z,targetFlags:Vf(X,pe).flags,isFromPackageJson:re})}}return She(p,C,b,g,(U,q,X,Z)=>{const Q=X.getTypeChecker();u.throwIfCancellationRequested();const re=X.getCompilerOptions(),oe=KZ(U,Q);oe&&tat(Q.getSymbolFlags(oe.symbol),a)&&XZ(oe.symbol,Q,Ja(re),(de,ue)=>(r?ue??de:de)===t)&&H(U,q,oe.symbol,oe.exportKind,X,Z);const pe=Q.tryGetMemberInModuleExportsAndProperties(t,U);pe&&tat(Q.getSymbolFlags(pe),a)&&H(U,q,pe,0,X,Z)}),E}function MVt(t,r,a){const u=EP(r),h=Uv(t.fileName);if(!h&&zh(r)>=5)return u?1:2;if(h)return t.externalModuleIndicator||a?u?1:2:3;for(const p of t.statements??w)if(Wd(p)&&!lu(p.moduleReference))return 3;return u?1:3}function Y6e(t,r,a,u,h,p,g){let C;const b=er.ChangeTracker.with(t,T=>{C=RVt(T,r,a,u,h,p,g)});return ua(Pot,b,C,Aot,k.Add_all_missing_imports)}function RVt(t,r,a,u,h,p,g){const C=$p(r,g);switch(u.kind){case 0:return e3e(t,r,u),[k.Change_0_to_1,a,`${u.namespacePrefix}.${a}`];case 1:return Xot(t,r,u,C),[k.Change_0_to_1,a,Qot(u.moduleSpecifier,C)+a];case 2:{const{importClauseOrBindingPattern:b,importKind:T,addAsTypeOnly:E,moduleSpecifier:N}=u;Kot(t,r,b,T===1?{name:a,addAsTypeOnly:E}:void 0,T===0?[{name:a,addAsTypeOnly:E}]:w,void 0,g);const R=zm(N);return h?[k.Import_0_from_1,a,R]:[k.Update_import_from_0,R]}case 3:{const{importKind:b,moduleSpecifier:T,addAsTypeOnly:E,useRequire:N,qualification:R}=u,F=N?Yot:Zot,H=b===1?{name:a,addAsTypeOnly:E}:void 0,U=b===0?[{name:a,addAsTypeOnly:E}]:void 0,q=b===2||b===3?{importKind:b,name:(R==null?void 0:R.namespacePrefix)||a,addAsTypeOnly:E}:void 0;return Gfe(t,r,F(T,C,H,U,q,p.getCompilerOptions(),g),!0,g),R&&e3e(t,r,R),h?[k.Import_0_from_1,a,T]:[k.Add_import_from_0,T]}case 4:{const{typeOnlyAliasDeclaration:b}=u,T=FVt(t,b,p,r,g);return T.kind===276?[k.Remove_type_from_import_of_0_from_1,a,Got(T.parent.parent)]:[k.Remove_type_from_import_declaration_from_0,Got(T)]}default:return j.assertNever(u,`Unexpected fix kind ${u.kind}`)}}function Got(t){var r,a;return t.kind===271?((a=Jr((r=Jr(t.moduleReference,eC))==null?void 0:r.expression,Bc))==null?void 0:a.text)||t.moduleReference.getText():ha(t.parent.moduleSpecifier,Ha).text}function FVt(t,r,a,u,h){const p=a.getCompilerOptions(),g=p.verbatimModuleSyntax;switch(r.kind){case 276:if(r.isTypeOnly){if(r.parent.elements.length>1){const b=G.updateImportSpecifier(r,!1,r.propertyName,r.name),{specifierComparer:T}=w2.getNamedImportSpecifierComparerWithDetection(r.parent.parent.parent,h,u),E=w2.getImportSpecifierInsertionIndex(r.parent.elements,b,T);if(E!==r.parent.elements.indexOf(r))return t.delete(u,r),t.insertImportSpecifierAtIndex(u,b,r.parent,E),r}return t.deleteRange(u,{pos:ex(r.getFirstToken()),end:ex(r.propertyName??r.name)}),r}else return j.assert(r.parent.parent.isTypeOnly),C(r.parent.parent),r.parent.parent;case 273:return C(r),r;case 274:return C(r.parent),r.parent;case 271:return t.deleteRange(u,r.getChildAt(1)),r;default:j.failBadSyntaxKind(r)}function C(b){var T;if(t.delete(u,Kfe(b,u)),!p.allowImportingTsExtensions){const E=Z6(b.parent),N=E&&((T=a.getResolvedModuleFromModuleSpecifier(E,u))==null?void 0:T.resolvedModule);if(N!=null&&N.resolvedUsingTsExtension){const R=wW(E.text,DQ(E.text,p));t.replaceNode(u,E,G.createStringLiteral(R))}}if(g){const E=Jr(b.namedBindings,j1);if(E&&E.elements.length>1){w2.getNamedImportSpecifierComparerWithDetection(b.parent,h,u).isSorted!==!1&&r.kind===276&&E.elements.indexOf(r)!==0&&(t.delete(u,r),t.insertImportSpecifierAtIndex(u,r,E,0));for(const R of E.elements)R!==r&&!R.isTypeOnly&&t.insertModifierBefore(u,156,R)}}}}function Kot(t,r,a,u,h,p,g){var C;if(a.kind===206){if(p&&a.elements.some(N=>p.has(N))){t.replaceNode(r,a,G.createObjectBindingPattern([...a.elements.filter(N=>!p.has(N)),...u?[G.createBindingElement(void 0,"default",u.name)]:w,...h.map(N=>G.createBindingElement(void 0,void 0,N.name))]));return}u&&E(a,u.name,"default");for(const N of h)E(a,N.name,void 0);return}const b=a.isTypeOnly&&Ft([u,...h],N=>(N==null?void 0:N.addAsTypeOnly)===4),T=a.namedBindings&&((C=Jr(a.namedBindings,j1))==null?void 0:C.elements);if(u&&(j.assert(!a.name,"Cannot add a default import to an import clause that already has one"),t.insertNodeAt(r,a.getStart(r),G.createIdentifier(u.name),{suffix:", "})),h.length){const{specifierComparer:N,isSorted:R}=w2.getNamedImportSpecifierComparerWithDetection(a.parent,g,r),F=Mu(h.map(H=>G.createImportSpecifier((!a.isTypeOnly||b)&&b_e(H,g),void 0,G.createIdentifier(H.name))),N);if(p)t.replaceNode(r,a.namedBindings,G.updateNamedImports(a.namedBindings,Mu([...T.filter(H=>!p.has(H)),...F],N)));else if(T!=null&&T.length&&R!==!1){const H=b&&T?G.updateNamedImports(a.namedBindings,Wr(T,U=>G.updateImportSpecifier(U,!0,U.propertyName,U.name))).elements:T;for(const U of F){const q=w2.getImportSpecifierInsertionIndex(H,U,N);t.insertImportSpecifierAtIndex(r,U,a.namedBindings,q)}}else if(T!=null&&T.length)for(const H of F)t.insertNodeInListAfter(r,va(T),H,T);else if(F.length){const H=G.createNamedImports(F);a.namedBindings?t.replaceNode(r,a.namedBindings,H):t.insertNodeAfter(r,j.checkDefined(a.name,"Import clause must have either named imports or a default import"),H)}}if(b&&(t.delete(r,Kfe(a,r)),T))for(const N of T)t.insertModifierBefore(r,156,N);function E(N,R,F){const H=G.createBindingElement(void 0,F,R);N.elements.length?t.insertNodeInListAfter(r,va(N.elements),H):t.replaceNode(r,N,G.createObjectBindingPattern([H]))}}function e3e(t,r,{namespacePrefix:a,usagePosition:u}){t.insertText(r,u,a+".")}function Xot(t,r,{moduleSpecifier:a,usagePosition:u},h){t.insertText(r,u,Qot(a,h))}function Qot(t,r){const a=$fe(r);return`import(${a}${t}${a}).`}function t3e({addAsTypeOnly:t}){return t===2}function b_e(t,r){return t3e(t)||!!r.preferTypeOnlyAutoImports&&t.addAsTypeOnly!==4}function Zot(t,r,a,u,h,p,g){const C=l5(t,r);let b;if(a!==void 0||u!=null&&u.length){const T=(!a||t3e(a))&&Ce(u,t3e)||(p.verbatimModuleSyntax||g.preferTypeOnlyAutoImports)&&(a==null?void 0:a.addAsTypeOnly)!==4&&!Ft(u,E=>E.addAsTypeOnly===4);b=rS(b,Sx(a&&G.createIdentifier(a.name),u==null?void 0:u.map(E=>G.createImportSpecifier(!T&&b_e(E,g),void 0,G.createIdentifier(E.name))),t,r,T))}if(h){const T=h.importKind===3?G.createImportEqualsDeclaration(void 0,b_e(h,g),G.createIdentifier(h.name),G.createExternalModuleReference(C)):G.createImportDeclaration(void 0,G.createImportClause(b_e(h,g),void 0,G.createNamespaceImport(G.createIdentifier(h.name))),C,void 0);b=rS(b,T)}return j.checkDefined(b)}function Yot(t,r,a,u,h){const p=l5(t,r);let g;if(a||u!=null&&u.length){const C=(u==null?void 0:u.map(({name:T})=>G.createBindingElement(void 0,void 0,T)))||[];a&&C.unshift(G.createBindingElement(void 0,"default",a.name));const b=eat(G.createObjectBindingPattern(C),p);g=rS(g,b)}if(h){const C=eat(h.name,p);g=rS(g,C)}return j.checkDefined(g)}function eat(t,r){return G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(typeof t=="string"?G.createIdentifier(t):t,void 0,void 0,G.createCallExpression(G.createIdentifier("require"),void 0,[r]))],2))}function tat(t,r){return r===7?!0:r&1?!!(t&111551):r&2?!!(t&788968):r&4?!!(t&1920):!1}function i3e(t,r){return Fy(t)?r.getImpliedNodeFormatForEmit(t):jI(t,r.getCompilerOptions())}function BVt(t,r){return Fy(t)?r.getEmitModuleFormatOfFile(t):e5(t,r.getCompilerOptions())}var n3e="addMissingConstraint",iat=[k.Type_0_is_not_comparable_to_type_1.code,k.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated.code,k.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code,k.Type_0_is_not_assignable_to_type_1.code,k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code,k.Property_0_is_incompatible_with_index_signature.code,k.Property_0_in_type_1_is_not_assignable_to_type_2.code,k.Type_0_does_not_satisfy_the_constraint_1.code];Na({errorCodes:iat,getCodeActions(t){const{sourceFile:r,span:a,program:u,preferences:h,host:p}=t,g=nat(u,r,a);if(g===void 0)return;const C=er.ChangeTracker.with(t,b=>rat(b,u,h,p,r,g));return[ua(n3e,C,k.Add_extends_constraint,n3e,k.Add_extends_constraint_to_all_type_parameters)]},fixIds:[n3e],getAllCodeActions:t=>{const{program:r,preferences:a,host:u}=t,h=new Map;return gA(er.ChangeTracker.with(t,p=>{yA(t,iat,g=>{const C=nat(r,g.file,Ff(g.start,g.length));if(C&&Pg(h,Sc(C.declaration)))return rat(p,r,a,u,g.file,C)})}))}});function nat(t,r,a){const u=Fe(t.getSemanticDiagnostics(r),g=>g.start===a.start&&g.length===a.length);if(u===void 0||u.relatedInformation===void 0)return;const h=Fe(u.relatedInformation,g=>g.code===k.This_type_parameter_might_need_an_extends_0_constraint.code);if(h===void 0||h.file===void 0||h.start===void 0||h.length===void 0)return;let p=X3e(h.file,Ff(h.start,h.length));if(p!==void 0&&(ot(p)&&$l(p.parent)&&(p=p.parent),$l(p))){if(II(p.parent))return;const g=Rs(r,a.start),C=t.getTypeChecker();return{constraint:VVt(C,g)||WVt(h.messageText),declaration:p,token:g}}}function rat(t,r,a,u,h,p){const{declaration:g,constraint:C}=p,b=r.getTypeChecker();if(Oo(C))t.insertText(h,g.name.end,` extends ${C}`);else{const T=Ja(r.getCompilerOptions()),E=lO({program:r,host:u}),N=kD(h,r,a,u),R=CY(b,N,C,void 0,T,void 0,void 0,E);R&&(t.replaceNode(h,g,G.updateTypeParameterDeclaration(g,void 0,g.name,R,g.default)),N.writeFixes(t))}}function WVt(t){const[,r]=$1(t,`
+`,0).match(/`extends (.*)`/)||[];return r}function VVt(t,r){return ws(r.parent)?t.getTypeArgumentConstraint(r.parent):(jt(r)?t.getContextualType(r):void 0)||t.getTypeAtLocation(r)}var sat="fixOverrideModifier",qj="fixAddOverrideModifier",vY="fixRemoveOverrideModifier",oat=[k.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code,k.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code,k.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code,k.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code,k.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code,k.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code,k.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code,k.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code,k.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code],aat={[k.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code]:{descriptions:k.Add_override_modifier,fixId:qj,fixAllDescriptions:k.Add_all_missing_override_modifiers},[k.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code]:{descriptions:k.Add_override_modifier,fixId:qj,fixAllDescriptions:k.Add_all_missing_override_modifiers},[k.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code]:{descriptions:k.Remove_override_modifier,fixId:vY,fixAllDescriptions:k.Remove_all_unnecessary_override_modifiers},[k.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code]:{descriptions:k.Remove_override_modifier,fixId:vY,fixAllDescriptions:k.Remove_override_modifier},[k.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code]:{descriptions:k.Add_override_modifier,fixId:qj,fixAllDescriptions:k.Add_all_missing_override_modifiers},[k.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code]:{descriptions:k.Add_override_modifier,fixId:qj,fixAllDescriptions:k.Add_all_missing_override_modifiers},[k.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code]:{descriptions:k.Add_override_modifier,fixId:qj,fixAllDescriptions:k.Remove_all_unnecessary_override_modifiers},[k.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code]:{descriptions:k.Remove_override_modifier,fixId:vY,fixAllDescriptions:k.Remove_all_unnecessary_override_modifiers},[k.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code]:{descriptions:k.Remove_override_modifier,fixId:vY,fixAllDescriptions:k.Remove_all_unnecessary_override_modifiers}};Na({errorCodes:oat,getCodeActions:function(r){const{errorCode:a,span:u}=r,h=aat[a];if(!h)return w;const{descriptions:p,fixId:g,fixAllDescriptions:C}=h,b=er.ChangeTracker.with(r,T=>cat(T,r,a,u.start));return[x6e(sat,b,p,g,C)]},fixIds:[sat,qj,vY],getAllCodeActions:t=>qc(t,oat,(r,a)=>{const{code:u,start:h}=a,p=aat[u];!p||p.fixId!==t.fixId||cat(r,t,u,h)})});function cat(t,r,a,u){switch(a){case k.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code:case k.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code:case k.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code:case k.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code:case k.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code:return HVt(t,r.sourceFile,u);case k.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code:case k.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code:case k.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code:case k.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code:return jVt(t,r.sourceFile,u);default:j.fail("Unexpected error code: "+a)}}function HVt(t,r,a){const u=uat(r,a);if(r_(r)){t.addJSDocTags(r,u,[G.createJSDocOverrideTag(G.createIdentifier("override"))]);return}const h=u.modifiers||w,p=Fe(h,WP),g=Fe(h,PEe),C=Fe(h,N=>Rfe(N.kind)),b=rt(h,Fd),T=g?g.end:p?p.end:C?C.end:b?Va(r.text,b.end):u.getStart(r),E=C||p||g?{prefix:" "}:{suffix:" "};t.insertModifierAt(r,T,164,E)}function jVt(t,r,a){const u=uat(r,a);if(r_(r)){t.filterJSDocTags(r,u,zJ(EX));return}const h=Fe(u.modifiers,AEe);j.assertIsDefined(h),t.deleteModifier(r,h)}function lat(t){switch(t.kind){case 176:case 172:case 174:case 177:case 178:return!0;case 169:return vp(t,t.parent);default:return!1}}function uat(t,r){const a=Rs(t,r),u=Qi(a,h=>ss(h)?"quit":lat(h));return j.assert(u&&lat(u)),u}var r3e="fixNoPropertyAccessFromIndexSignature",dat=[k.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0.code];Na({errorCodes:dat,fixIds:[r3e],getCodeActions(t){const{sourceFile:r,span:a,preferences:u}=t,h=hat(r,a.start),p=er.ChangeTracker.with(t,g=>fat(g,t.sourceFile,h,u));return[ua(r3e,p,[k.Use_element_access_for_0,h.name.text],r3e,k.Use_element_access_for_all_undeclared_properties)]},getAllCodeActions:t=>qc(t,dat,(r,a)=>fat(r,a.file,hat(a.file,a.start),t.preferences))});function fat(t,r,a,u){const h=$p(r,u),p=G.createStringLiteral(a.name.text,h===0);t.replaceNode(r,a,dG(a)?G.createElementAccessChain(a.expression,a.questionDotToken,p):G.createElementAccessExpression(a.expression,p))}function hat(t,r){return ha(Rs(t,r).parent,Nr)}var s3e="fixImplicitThis",_at=[k.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code];Na({errorCodes:_at,getCodeActions:function(r){const{sourceFile:a,program:u,span:h}=r;let p;const g=er.ChangeTracker.with(r,C=>{p=pat(C,a,h.start,u.getTypeChecker())});return p?[ua(s3e,g,p,s3e,k.Fix_all_implicit_this_errors)]:w},fixIds:[s3e],getAllCodeActions:t=>qc(t,_at,(r,a)=>{pat(r,a.file,a.start,t.program.getTypeChecker())})});function pat(t,r,a,u){const h=Rs(r,a);if(!X3(h))return;const p=Hh(h,!1,!1);if(!(!Wu(p)&&!ml(p))&&!Os(Hh(p,!1,!1))){const g=j.checkDefined(Uc(p,100,r)),{name:C}=p,b=j.checkDefined(p.body);return ml(p)?C&&kl.Core.isSymbolReferencedInFile(C,u,r,b)?void 0:(t.delete(r,g),C&&t.delete(r,C),t.insertText(r,b.pos," =>"),[k.Convert_function_expression_0_to_arrow_function,C?C.text:lhe]):(t.replaceNode(r,g,G.createToken(87)),t.insertText(r,C.end," = "),t.insertText(r,b.pos," =>"),[k.Convert_function_declaration_0_to_arrow_function,C.text])}}var o3e="fixImportNonExportedMember",mat=[k.Module_0_declares_1_locally_but_it_is_not_exported.code];Na({errorCodes:mat,fixIds:[o3e],getCodeActions(t){const{sourceFile:r,span:a,program:u}=t,h=gat(r,a.start,u);if(h===void 0)return;const p=er.ChangeTracker.with(t,g=>zVt(g,u,h));return[ua(o3e,p,[k.Export_0_from_module_1,h.exportName.node.text,h.moduleSpecifier],o3e,k.Export_all_referenced_locals)]},getAllCodeActions(t){const{program:r}=t;return gA(er.ChangeTracker.with(t,a=>{const u=new Map;yA(t,mat,h=>{const p=gat(h.file,h.start,r);if(p===void 0)return;const{exportName:g,node:C,moduleSourceFile:b}=p;if(C_e(b,g.isTypeOnly)===void 0&&eH(C))a.insertExportModifier(b,C);else{const T=u.get(b)||{typeOnlyExports:[],exports:[]};g.isTypeOnly?T.typeOnlyExports.push(g):T.exports.push(g),u.set(b,T)}}),u.forEach((h,p)=>{const g=C_e(p,!0);g&&g.isTypeOnly?(a3e(a,r,p,h.typeOnlyExports,g),a3e(a,r,p,h.exports,C_e(p,!1))):a3e(a,r,p,[...h.exports,...h.typeOnlyExports],g)})}))}});function gat(t,r,a){var u,h;const p=Rs(t,r);if(ot(p)){const g=Qi(p,du);if(g===void 0)return;const C=Ha(g.moduleSpecifier)?g.moduleSpecifier:void 0;if(C===void 0)return;const b=(u=a.getResolvedModuleFromModuleSpecifier(C,t))==null?void 0:u.resolvedModule;if(b===void 0)return;const T=a.getSourceFile(b.resolvedFileName);if(T===void 0||rO(a,T))return;const E=T.symbol,N=(h=Jr(E.valueDeclaration,Ay))==null?void 0:h.locals;if(N===void 0)return;const R=N.get(p.escapedText);if(R===void 0)return;const F=UVt(R);return F===void 0?void 0:{exportName:{node:p,isTypeOnly:NP(F)},node:F,moduleSourceFile:T,moduleSpecifier:C.text}}}function zVt(t,r,{exportName:a,node:u,moduleSourceFile:h}){const p=C_e(h,a.isTypeOnly);p?yat(t,r,h,p,[a]):eH(u)?t.insertExportModifier(h,u):vat(t,r,h,[a])}function a3e(t,r,a,u,h){P(u)&&(h?yat(t,r,a,h,u):vat(t,r,a,u))}function C_e(t,r){const a=u=>Ju(u)&&(r&&u.isTypeOnly||!u.isTypeOnly);return rt(t.statements,a)}function yat(t,r,a,u,h){const p=u.exportClause&&Xm(u.exportClause)?u.exportClause.elements:G.createNodeArray([]),g=!u.isTypeOnly&&!!(Ag(r.getCompilerOptions())||Fe(p,C=>C.isTypeOnly));t.replaceNode(a,u,G.updateExportDeclaration(u,u.modifiers,u.isTypeOnly,G.createNamedExports(G.createNodeArray([...p,...bat(h,g)],p.hasTrailingComma)),u.moduleSpecifier,u.attributes))}function vat(t,r,a,u){t.insertNodeAtEndOfScope(a,a,G.createExportDeclaration(void 0,!1,G.createNamedExports(bat(u,Ag(r.getCompilerOptions()))),void 0,void 0))}function bat(t,r){return G.createNodeArray(qt(t,a=>G.createExportSpecifier(r&&a.isTypeOnly,void 0,a.node)))}function UVt(t){if(t.valueDeclaration===void 0)return Ra(t.declarations);const r=t.valueDeclaration,a=_s(r)?Jr(r.parent.parent,Lu):void 0;return a&&P(a.declarationList.declarations)===1?a:r}var c3e="fixIncorrectNamedTupleSyntax",qVt=[k.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type.code,k.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type.code];Na({errorCodes:qVt,getCodeActions:function(r){const{sourceFile:a,span:u}=r,h=$Vt(a,u.start),p=er.ChangeTracker.with(r,g=>JVt(g,a,h));return[ua(c3e,p,k.Move_labeled_tuple_element_modifiers_to_labels,c3e,k.Move_labeled_tuple_element_modifiers_to_labels)]},fixIds:[c3e]});function $Vt(t,r){const a=Rs(t,r);return Qi(a,u=>u.kind===202)}function JVt(t,r,a){if(!a)return;let u=a.type,h=!1,p=!1;for(;u.kind===190||u.kind===191||u.kind===196;)u.kind===190?h=!0:u.kind===191&&(p=!0),u=u.type;const g=G.updateNamedTupleMember(a,a.dotDotDotToken||(p?G.createToken(26):void 0),a.name,a.questionToken||(h?G.createToken(58):void 0),u);g!==a&&t.replaceNode(r,a,g)}var Cat="fixSpelling",Sat=[k.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,k.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code,k.Cannot_find_name_0_Did_you_mean_1.code,k.Could_not_find_name_0_Did_you_mean_1.code,k.Cannot_find_namespace_0_Did_you_mean_1.code,k.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,k.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,k._0_has_no_exported_member_named_1_Did_you_mean_2.code,k.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1.code,k.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1.code,k.No_overload_matches_this_call.code,k.Type_0_is_not_assignable_to_type_1.code];Na({errorCodes:Sat,getCodeActions(t){const{sourceFile:r,errorCode:a}=t,u=wat(r,t.span.start,t,a);if(!u)return;const{node:h,suggestedSymbol:p}=u,g=Ja(t.host.getCompilationSettings()),C=er.ChangeTracker.with(t,b=>xat(b,r,h,p,g));return[ua("spelling",C,[k.Change_spelling_to_0,Eu(p)],Cat,k.Fix_all_detected_spelling_errors)]},fixIds:[Cat],getAllCodeActions:t=>qc(t,Sat,(r,a)=>{const u=wat(a.file,a.start,t,a.code),h=Ja(t.host.getCompilationSettings());u&&xat(r,t.sourceFile,u.node,u.suggestedSymbol,h)})});function wat(t,r,a,u){const h=Rs(t,r),p=h.parent;if((u===k.No_overload_matches_this_call.code||u===k.Type_0_is_not_assignable_to_type_1.code)&&!U1(p))return;const g=a.program.getTypeChecker();let C;if(Nr(p)&&p.name===h){j.assert(Mv(h),"Expected an identifier for spelling (property access)");let b=g.getTypeAtLocation(p.expression);p.flags&64&&(b=g.getNonNullableType(b)),C=g.getSuggestedSymbolForNonexistentProperty(h,b)}else if(ur(p)&&p.operatorToken.kind===103&&p.left===h&&Vs(h)){const b=g.getTypeAtLocation(p.right);C=g.getSuggestedSymbolForNonexistentProperty(h,b)}else if(o_(p)&&p.right===h){const b=g.getSymbolAtLocation(p.left);b&&b.flags&1536&&(C=g.getSuggestedSymbolForNonexistentModule(p.right,b))}else if(l_(p)&&p.name===h){j.assertNode(h,ot,"Expected an identifier for spelling (import)");const b=Qi(h,du),T=KVt(a,b,t);T&&T.symbol&&(C=g.getSuggestedSymbolForNonexistentModule(h,T.symbol))}else if(U1(p)&&p.name===h){j.assertNode(h,ot,"Expected an identifier for JSX attribute");const b=Qi(h,oh),T=g.getContextualTypeForArgumentAtIndex(b,0);C=g.getSuggestedSymbolForNonexistentJSXAttribute(h,T)}else if(bK(p)&&Od(p)&&p.name===h){const b=Qi(h,ss),T=b?L1(b):void 0,E=T?g.getTypeAtLocation(T):void 0;E&&(C=g.getSuggestedSymbolForNonexistentClassMember(uu(h),E))}else{const b=zI(h),T=uu(h);j.assert(T!==void 0,"name should be defined"),C=g.getSuggestedSymbolForNonexistentSymbol(h,T,GVt(b))}return C===void 0?void 0:{node:h,suggestedSymbol:C}}function xat(t,r,a,u,h){const p=Eu(u);if(!J_(p,h)&&Nr(a.parent)){const g=u.valueDeclaration;g&&Bf(g)&&Vs(g.name)?t.replaceNode(r,a,G.createIdentifier(p)):t.replaceNode(r,a.parent,G.createElementAccessExpression(a.parent.expression,G.createStringLiteral(p)))}else t.replaceNode(r,a,G.createIdentifier(p))}function GVt(t){let r=0;return t&4&&(r|=1920),t&2&&(r|=788968),t&1&&(r|=111551),r}function KVt(t,r,a){var u;if(!r||!Bc(r.moduleSpecifier))return;const h=(u=t.program.getResolvedModuleFromModuleSpecifier(r.moduleSpecifier,a))==null?void 0:u.resolvedModule;if(h)return t.program.getSourceFile(h.resolvedFileName)}var l3e="returnValueCorrect",u3e="fixAddReturnStatement",d3e="fixRemoveBracesFromArrowFunctionBody",f3e="fixWrapTheBlockWithParen",kat=[k.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value.code,k.Type_0_is_not_assignable_to_type_1.code,k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code];Na({errorCodes:kat,fixIds:[u3e,d3e,f3e],getCodeActions:function(r){const{program:a,sourceFile:u,span:{start:h},errorCode:p}=r,g=Dat(a.getTypeChecker(),u,h,p);if(g)return g.kind===0?fn([QVt(r,g.expression,g.statement)],xl(g.declaration)?ZVt(r,g.declaration,g.expression,g.commentSource):void 0):[YVt(r,g.declaration,g.expression)]},getAllCodeActions:t=>qc(t,kat,(r,a)=>{const u=Dat(t.program.getTypeChecker(),a.file,a.start,a.code);if(u)switch(t.fixId){case u3e:Eat(r,a.file,u.expression,u.statement);break;case d3e:if(!xl(u.declaration))return;Iat(r,a.file,u.declaration,u.expression,u.commentSource);break;case f3e:if(!xl(u.declaration))return;Nat(r,a.file,u.declaration,u.expression);break;default:j.fail(JSON.stringify(t.fixId))}})});function Tat(t,r,a){const u=t.createSymbol(4,r.escapedText);u.links.type=t.getTypeAtLocation(a);const h=_a([u]);return t.createAnonymousType(void 0,h,[],[],[])}function h3e(t,r,a,u){if(!r.body||!Xo(r.body)||P(r.body.statements)!==1)return;const h=ya(r.body.statements);if(uf(h)&&_3e(t,r,t.getTypeAtLocation(h.expression),a,u))return{declaration:r,kind:0,expression:h.expression,statement:h,commentSource:h.expression};if(_x(h)&&uf(h.statement)){const p=G.createObjectLiteralExpression([G.createPropertyAssignment(h.label,h.statement.expression)]),g=Tat(t,h.label,h.statement.expression);if(_3e(t,r,g,a,u))return xl(r)?{declaration:r,kind:1,expression:p,statement:h,commentSource:h.statement.expression}:{declaration:r,kind:0,expression:p,statement:h,commentSource:h.statement.expression}}else if(Xo(h)&&P(h.statements)===1){const p=ya(h.statements);if(_x(p)&&uf(p.statement)){const g=G.createObjectLiteralExpression([G.createPropertyAssignment(p.label,p.statement.expression)]),C=Tat(t,p.label,p.statement.expression);if(_3e(t,r,C,a,u))return{declaration:r,kind:0,expression:g,statement:h,commentSource:p}}}}function _3e(t,r,a,u,h){if(h){const p=t.getSignatureFromDeclaration(r);if(p){Zr(r,1024)&&(a=t.createPromiseType(a));const g=t.createSignature(r,p.typeParameters,p.thisParameter,p.parameters,a,void 0,p.minArgumentCount,p.flags);a=t.createAnonymousType(void 0,_a(),[g],[],[])}else a=t.getAnyType()}return t.isTypeAssignableTo(a,u)}function Dat(t,r,a,u){const h=Rs(r,a);if(!h.parent)return;const p=Qi(h.parent,Qc);switch(u){case k.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value.code:return!p||!p.body||!p.type||!Ip(p.type,h)?void 0:h3e(t,p,t.getTypeFromTypeNode(p.type),!1);case k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code:if(!p||!la(p.parent)||!p.body)return;const g=p.parent.arguments.indexOf(p);if(g===-1)return;const C=t.getContextualTypeForArgumentAtIndex(p.parent,g);return C?h3e(t,p,C,!0):void 0;case k.Type_0_is_not_assignable_to_type_1.code:if(!Wy(h)||!uP(h.parent)&&!U1(h.parent))return;const b=XVt(h.parent);return!b||!Qc(b)||!b.body?void 0:h3e(t,b,t.getTypeAtLocation(h.parent),!0)}}function XVt(t){switch(t.kind){case 260:case 169:case 208:case 172:case 303:return t.initializer;case 291:return t.initializer&&(x7(t.initializer)?t.initializer.expression:void 0);case 304:case 171:case 306:case 348:case 341:return}}function Eat(t,r,a,u){Lp(a);const h=kj(r);t.replaceNode(r,u,G.createReturnStatement(a),{leadingTriviaOption:er.LeadingTriviaOption.Exclude,trailingTriviaOption:er.TrailingTriviaOption.Exclude,suffix:h?";":void 0})}function Iat(t,r,a,u,h,p){const g=MZ(u)?G.createParenthesizedExpression(u):u;Lp(h),qI(h,g),t.replaceNode(r,a.body,g)}function Nat(t,r,a,u){t.replaceNode(r,a.body,G.createParenthesizedExpression(u))}function QVt(t,r,a){const u=er.ChangeTracker.with(t,h=>Eat(h,t.sourceFile,r,a));return ua(l3e,u,k.Add_a_return_statement,u3e,k.Add_all_missing_return_statement)}function ZVt(t,r,a,u){const h=er.ChangeTracker.with(t,p=>Iat(p,t.sourceFile,r,a,u));return ua(l3e,h,k.Remove_braces_from_arrow_function_body,d3e,k.Remove_braces_from_all_arrow_function_bodies_with_relevant_issues)}function YVt(t,r,a){const u=er.ChangeTracker.with(t,h=>Nat(h,t.sourceFile,r,a));return ua(l3e,u,k.Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal,f3e,k.Wrap_all_object_literal_with_parentheses)}var C2="fixMissingMember",S_e="fixMissingProperties",w_e="fixMissingAttributes",x_e="fixMissingFunctionDeclaration",Lat=[k.Property_0_does_not_exist_on_type_1.code,k.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,k.Property_0_is_missing_in_type_1_but_required_in_type_2.code,k.Type_0_is_missing_the_following_properties_from_type_1_Colon_2.code,k.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more.code,k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,k.Cannot_find_name_0.code];Na({errorCodes:Lat,getCodeActions(t){const r=t.program.getTypeChecker(),a=Pat(t.sourceFile,t.span.start,t.errorCode,r,t.program);if(a){if(a.kind===3){const u=er.ChangeTracker.with(t,h=>jat(h,t,a));return[ua(S_e,u,k.Add_missing_properties,S_e,k.Add_all_missing_properties)]}if(a.kind===4){const u=er.ChangeTracker.with(t,h=>Hat(h,t,a));return[ua(w_e,u,k.Add_missing_attributes,w_e,k.Add_all_missing_attributes)]}if(a.kind===2||a.kind===5){const u=er.ChangeTracker.with(t,h=>Vat(h,t,a));return[ua(x_e,u,[k.Add_missing_function_declaration_0,a.token.text],x_e,k.Add_all_missing_function_declarations)]}if(a.kind===1){const u=er.ChangeTracker.with(t,h=>Wat(h,t.program.getTypeChecker(),a));return[ua(C2,u,[k.Add_missing_enum_member_0,a.token.text],C2,k.Add_all_missing_members)]}return Js(rHt(t,a),eHt(t,a))}},fixIds:[C2,x_e,S_e,w_e],getAllCodeActions:t=>{const{program:r,fixId:a}=t,u=r.getTypeChecker(),h=new Map,p=new Map;return gA(er.ChangeTracker.with(t,g=>{yA(t,Lat,C=>{const b=Pat(C.file,C.start,C.code,u,t.program);if(!(!b||!Pg(h,Sc(b.parentDeclaration)+"#"+(b.kind===3?b.identifier:b.token.text)))){if(a===x_e&&(b.kind===2||b.kind===5))Vat(g,t,b);else if(a===S_e&&b.kind===3)jat(g,t,b);else if(a===w_e&&b.kind===4)Hat(g,t,b);else if(b.kind===1&&Wat(g,u,b),b.kind===0){const{parentDeclaration:T,token:E}=b,N=mp(p,T,()=>[]);N.some(R=>R.token.text===E.text)||N.push(b)}}}),p.forEach((C,b)=>{const T=a_(b)?void 0:Q3e(b,u);for(const E of C){if(T!=null&&T.some(X=>{const Z=p.get(X);return!!Z&&Z.some(({token:Q})=>Q.text===E.token.text)}))continue;const{parentDeclaration:N,declSourceFile:R,modifierFlags:F,token:H,call:U,isJSFile:q}=E;if(U&&!Vs(H))Bat(t,g,U,H,F&256,N,R);else if(q&&!zf(N)&&!a_(N))Aat(g,R,N,H,!!(F&256));else{const X=Mat(u,N,H);Rat(g,R,N,H.text,X,F&256)}}})}))}});function Pat(t,r,a,u,h){var p;const g=Rs(t,r),C=g.parent;if(a===k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code){if(!(g.kind===19&&Aa(C)&&la(C.parent)))return;const F=ct(C.parent.arguments,X=>X===C);if(F<0)return;const H=u.getResolvedSignature(C.parent);if(!(H&&H.declaration&&H.parameters[F]))return;const U=H.parameters[F].valueDeclaration;if(!(U&&$s(U)&&ot(U.name)))return;const q=as(u.getUnmatchedProperties(u.getTypeAtLocation(C),u.getParameterType(H,F),!1,!1));return P(q)?{kind:3,token:U.name,identifier:U.name.text,properties:q,parentDeclaration:C}:void 0}if(g.kind===19&&Aa(C)){const F=u.getContextualType(C)||u.getTypeAtLocation(C),H=as(u.getUnmatchedProperties(u.getTypeAtLocation(C),F,!1,!1));return P(H)?{kind:3,token:C,identifier:"",properties:H,parentDeclaration:C}:void 0}if(!Mv(g))return;if(ot(g)&&aS(C)&&C.initializer&&Aa(C.initializer)){const F=u.getContextualType(g)||u.getTypeAtLocation(g),H=as(u.getUnmatchedProperties(u.getTypeAtLocation(C.initializer),F,!1,!1));return P(H)?{kind:3,token:g,identifier:g.text,properties:H,parentDeclaration:C.initializer}:void 0}if(ot(g)&&oh(g.parent)){const F=Ja(h.getCompilerOptions()),H=oHt(u,F,g.parent);return P(H)?{kind:4,token:g,attributes:H,parentDeclaration:g.parent}:void 0}if(ot(g)){const F=(p=u.getContextualType(g))==null?void 0:p.getNonNullableType();if(F&&Or(F)&16){const H=Ra(u.getSignaturesOfType(F,0));return H===void 0?void 0:{kind:5,token:g,signature:H,sourceFile:t,parentDeclaration:zat(g)}}if(la(C)&&C.expression===g)return{kind:2,token:g,call:C,sourceFile:t,modifierFlags:0,parentDeclaration:zat(g)}}if(!Nr(C))return;const b=jfe(u.getTypeAtLocation(C.expression)),T=b.symbol;if(!T||!T.declarations)return;if(ot(g)&&la(C.parent)){const F=Fe(T.declarations,rd),H=F==null?void 0:F.getSourceFile();if(F&&H&&!rO(h,H))return{kind:2,token:g,call:C.parent,sourceFile:H,modifierFlags:32,parentDeclaration:F};const U=Fe(T.declarations,Os);if(t.commonJsModuleIndicator)return;if(U&&!rO(h,U))return{kind:2,token:g,call:C.parent,sourceFile:U,modifierFlags:32,parentDeclaration:U}}const E=Fe(T.declarations,ss);if(!E&&Vs(g))return;const N=E||Fe(T.declarations,F=>zf(F)||a_(F));if(N&&!rO(h,N.getSourceFile())){const F=!a_(N)&&(b.target||b)!==u.getDeclaredTypeOfSymbol(T);if(F&&(Vs(g)||zf(N)))return;const H=N.getSourceFile(),U=a_(N)?0:(F?256:0)|(ghe(g.text)?2:0),q=r_(H),X=Jr(C.parent,la);return{kind:0,token:g,call:X,modifierFlags:U,parentDeclaration:N,declSourceFile:H,isJSFile:q}}const R=Fe(T.declarations,sD);if(R&&!(b.flags&1056)&&!Vs(g)&&!rO(h,R.getSourceFile()))return{kind:1,token:g,parentDeclaration:R}}function eHt(t,r){return r.isJSFile?KL(tHt(t,r)):iHt(t,r)}function tHt(t,{parentDeclaration:r,declSourceFile:a,modifierFlags:u,token:h}){if(zf(r)||a_(r))return;const p=er.ChangeTracker.with(t,C=>Aat(C,a,r,h,!!(u&256)));if(p.length===0)return;const g=u&256?k.Initialize_static_property_0:Vs(h)?k.Declare_a_private_field_named_0:k.Initialize_property_0_in_the_constructor;return ua(C2,p,[g,h.text],C2,k.Add_all_missing_members)}function Aat(t,r,a,u,h){const p=u.text;if(h){if(a.kind===231)return;const g=a.name.getText(),C=Oat(G.createIdentifier(g),p);t.insertNodeAfter(r,a,C)}else if(Vs(u)){const g=G.createPropertyDeclaration(void 0,p,void 0,void 0,void 0),C=Fat(a);C?t.insertNodeAfter(r,C,g):t.insertMemberAtStart(r,a,g)}else{const g=Vv(a);if(!g)return;const C=Oat(G.createThis(),p);t.insertNodeAtConstructorEnd(r,g,C)}}function Oat(t,r){return G.createExpressionStatement(G.createAssignment(G.createPropertyAccessExpression(t,r),bA()))}function iHt(t,{parentDeclaration:r,declSourceFile:a,modifierFlags:u,token:h}){const p=h.text,g=u&256,C=Mat(t.program.getTypeChecker(),r,h),b=E=>er.ChangeTracker.with(t,N=>Rat(N,a,r,p,C,E)),T=[ua(C2,b(u&256),[g?k.Declare_static_property_0:k.Declare_property_0,p],C2,k.Add_all_missing_members)];return g||Vs(h)||(u&2&&T.unshift(G0(C2,b(2),[k.Declare_private_property_0,p])),T.push(nHt(t,a,r,h.text,C))),T}function Mat(t,r,a){let u;if(a.parent.parent.kind===226){const h=a.parent.parent,p=a.parent===h.left?h.right:h.left,g=t.getWidenedType(t.getBaseTypeOfLiteralType(t.getTypeAtLocation(p)));u=t.typeToTypeNode(g,r,1,8)}else{const h=t.getContextualType(a.parent);u=h?t.typeToTypeNode(h,void 0,1,8):void 0}return u||G.createKeywordTypeNode(133)}function Rat(t,r,a,u,h,p){const g=p?G.createNodeArray(G.createModifiersFromModifierFlags(p)):void 0,C=ss(a)?G.createPropertyDeclaration(g,u,void 0,h,void 0):G.createPropertySignature(void 0,u,void 0,h),b=Fat(a);b?t.insertNodeAfter(r,b,C):t.insertMemberAtStart(r,a,C)}function Fat(t){let r;for(const a of t.members){if(!Lo(a))break;r=a}return r}function nHt(t,r,a,u,h){const p=G.createKeywordTypeNode(154),g=G.createParameterDeclaration(void 0,void 0,"x",void 0,p,void 0),C=G.createIndexSignature(void 0,[g],h),b=er.ChangeTracker.with(t,T=>T.insertMemberAtStart(r,a,C));return G0(C2,b,[k.Add_index_signature_for_property_0,u])}function rHt(t,r){const{parentDeclaration:a,declSourceFile:u,modifierFlags:h,token:p,call:g}=r;if(g===void 0)return;const C=p.text,b=E=>er.ChangeTracker.with(t,N=>Bat(t,N,g,p,E,a,u)),T=[ua(C2,b(h&256),[h&256?k.Declare_static_method_0:k.Declare_method_0,C],C2,k.Add_all_missing_members)];return h&2&&T.unshift(G0(C2,b(2),[k.Declare_private_method_0,C])),T}function Bat(t,r,a,u,h,p,g){const C=kD(g,t.program,t.preferences,t.host),b=ss(p)?174:173,T=U3e(b,t,C,a,u,h,p),E=aHt(p,a);E?r.insertNodeAfter(g,E,T):r.insertMemberAtStart(g,p,T),C.writeFixes(r)}function Wat(t,r,{token:a,parentDeclaration:u}){const h=Ft(u.members,b=>{const T=r.getTypeAtLocation(b);return!!(T&&T.flags&402653316)}),p=u.getSourceFile(),g=G.createEnumMember(a,h?G.createStringLiteral(a.text):void 0),C=rl(u.members);C?t.insertNodeInListAfter(p,C,g,u.members):t.insertMemberAtStart(p,u,g)}function Vat(t,r,a){const u=$p(r.sourceFile,r.preferences),h=kD(r.sourceFile,r.program,r.preferences,r.host),p=a.kind===2?U3e(262,r,h,a.call,Fr(a.token),a.modifierFlags,a.parentDeclaration):O_e(262,r,u,a.signature,SY(k.Function_not_implemented.message,u),a.token,void 0,void 0,void 0,h);p===void 0&&j.fail("fixMissingFunctionDeclaration codefix got unexpected error."),Og(a.parentDeclaration)?t.insertNodeBefore(a.sourceFile,a.parentDeclaration,p,!0):t.insertNodeAtEndOfScope(a.sourceFile,a.parentDeclaration,p),h.writeFixes(t)}function Hat(t,r,a){const u=kD(r.sourceFile,r.program,r.preferences,r.host),h=$p(r.sourceFile,r.preferences),p=r.program.getTypeChecker(),g=a.parentDeclaration.attributes,C=Ft(g.properties,GP),b=qt(a.attributes,N=>{const R=k_e(r,p,u,h,p.getTypeOfSymbol(N),a.parentDeclaration),F=G.createIdentifier(N.name),H=G.createJsxAttribute(F,G.createJsxExpression(void 0,R));return _c(F,H),H}),T=G.createJsxAttributes(C?[...b,...g.properties]:[...g.properties,...b]),E={prefix:g.pos===g.end?" ":void 0};t.replaceNode(r.sourceFile,g,T,E),u.writeFixes(t)}function jat(t,r,a){const u=kD(r.sourceFile,r.program,r.preferences,r.host),h=$p(r.sourceFile,r.preferences),p=Ja(r.program.getCompilerOptions()),g=r.program.getTypeChecker(),C=qt(a.properties,T=>{const E=k_e(r,g,u,h,g.getTypeOfSymbol(T),a.parentDeclaration);return G.createPropertyAssignment(cHt(T,p,h,g),E)}),b={leadingTriviaOption:er.LeadingTriviaOption.Exclude,trailingTriviaOption:er.TrailingTriviaOption.Exclude,indentation:a.indentation};t.replaceNode(r.sourceFile,a.parentDeclaration,G.createObjectLiteralExpression([...a.parentDeclaration.properties,...C],!0),b),u.writeFixes(t)}function k_e(t,r,a,u,h,p){if(h.flags&3)return bA();if(h.flags&134217732)return G.createStringLiteral("",u===0);if(h.flags&8)return G.createNumericLiteral(0);if(h.flags&64)return G.createBigIntLiteral("0n");if(h.flags&16)return G.createFalse();if(h.flags&1056){const g=h.symbol.exports?k_(h.symbol.exports.values()):h.symbol,C=r.symbolToExpression(h.symbol.parent?h.symbol.parent:h.symbol,111551,void 0,64);return g===void 0||C===void 0?G.createNumericLiteral(0):G.createPropertyAccessExpression(C,r.symbolToString(g))}if(h.flags&256)return G.createNumericLiteral(h.value);if(h.flags&2048)return G.createBigIntLiteral(h.value);if(h.flags&128)return G.createStringLiteral(h.value,u===0);if(h.flags&512)return h===r.getFalseType()||h===r.getFalseType(!0)?G.createFalse():G.createTrue();if(h.flags&65536)return G.createNull();if(h.flags&1048576)return J(h.types,C=>k_e(t,r,a,u,C,p))??bA();if(r.isArrayLikeType(h))return G.createArrayLiteralExpression();if(sHt(h)){const g=qt(r.getPropertiesOfType(h),C=>{const b=k_e(t,r,a,u,r.getTypeOfSymbol(C),p);return G.createPropertyAssignment(C.name,b)});return G.createObjectLiteralExpression(g,!0)}if(Or(h)&16){if(Fe(h.symbol.declarations||w,om(Hy,W1,Nu))===void 0)return bA();const C=r.getSignaturesOfType(h,0);return C===void 0?bA():O_e(218,t,u,C[0],SY(k.Function_not_implemented.message,u),void 0,void 0,void 0,p,a)??bA()}if(Or(h)&1){const g=Xb(h.symbol);if(g===void 0||KT(g))return bA();const C=Vv(g);return C&&P(C.parameters)?bA():G.createNewExpression(G.createIdentifier(h.symbol.name),void 0,void 0)}return bA()}function bA(){return G.createIdentifier("undefined")}function sHt(t){return t.flags&524288&&(Or(t)&128||t.symbol&&Jr(Bm(t.symbol.declarations),a_))}function oHt(t,r,a){const u=t.getContextualType(a.attributes);if(u===void 0)return w;const h=u.getProperties();if(!P(h))return w;const p=new Set;for(const g of a.attributes.properties)if(U1(g)&&p.add(u7(g.name)),GP(g)){const C=t.getTypeAtLocation(g.expression);for(const b of C.getProperties())p.add(b.escapedName)}return $t(h,g=>J_(g.name,r,1)&&!(g.flags&16777216||Iu(g)&48||p.has(g.escapedName)))}function aHt(t,r){if(a_(t))return;const a=Qi(r,u=>Nu(u)||iu(u));return a&&a.parent===t?a:void 0}function cHt(t,r,a,u){if(Rv(t)){const h=u.symbolToNode(t,111551,void 0,void 0,1);if(h&&Ka(h))return h}return tX(t.name,r,a===0,!1,!1)}function zat(t){if(Qi(t,x7)){const r=Qi(t.parent,Og);if(r)return r}return _n(t)}var p3e="addMissingNewOperator",Uat=[k.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new.code];Na({errorCodes:Uat,getCodeActions(t){const{sourceFile:r,span:a}=t,u=er.ChangeTracker.with(t,h=>qat(h,r,a));return[ua(p3e,u,k.Add_missing_new_operator_to_call,p3e,k.Add_missing_new_operator_to_all_calls)]},fixIds:[p3e],getAllCodeActions:t=>qc(t,Uat,(r,a)=>qat(r,t.sourceFile,a))});function qat(t,r,a){const u=ha(lHt(r,a),la),h=G.createNewExpression(u.expression,u.typeArguments,u.arguments);t.replaceNode(r,u,h)}function lHt(t,r){let a=Rs(t,r.start);const u=au(r);for(;a.end<u;)a=a.parent;return a}var T_e="addMissingParam",D_e="addOptionalParam",$at=[k.Expected_0_arguments_but_got_1.code];Na({errorCodes:$at,fixIds:[T_e,D_e],getCodeActions(t){const r=Jat(t.sourceFile,t.program,t.span.start);if(r===void 0)return;const{name:a,declarations:u,newParameters:h,newOptionalParameters:p}=r,g=[];return P(h)&&fn(g,ua(T_e,er.ChangeTracker.with(t,C=>E_e(C,t.program,t.preferences,t.host,u,h)),[P(h)>1?k.Add_missing_parameters_to_0:k.Add_missing_parameter_to_0,a],T_e,k.Add_all_missing_parameters)),P(p)&&fn(g,ua(D_e,er.ChangeTracker.with(t,C=>E_e(C,t.program,t.preferences,t.host,u,p)),[P(p)>1?k.Add_optional_parameters_to_0:k.Add_optional_parameter_to_0,a],D_e,k.Add_all_optional_parameters)),g},getAllCodeActions:t=>qc(t,$at,(r,a)=>{const u=Jat(t.sourceFile,t.program,a.start);if(u){const{declarations:h,newParameters:p,newOptionalParameters:g}=u;t.fixId===T_e&&E_e(r,t.program,t.preferences,t.host,h,p),t.fixId===D_e&&E_e(r,t.program,t.preferences,t.host,h,g)}})});function Jat(t,r,a){const u=Rs(t,a),h=Qi(u,la);if(h===void 0||P(h.arguments)===0)return;const p=r.getTypeChecker(),g=p.getTypeAtLocation(h.expression),C=$t(g.symbol.declarations,Gat);if(C===void 0)return;const b=rl(C);if(b===void 0||b.body===void 0||rO(r,b.getSourceFile()))return;const T=uHt(b);if(T===void 0)return;const E=[],N=[],R=P(b.parameters),F=P(h.arguments);if(R>F)return;const H=[b,...fHt(b,C)];for(let U=0,q=0,X=0;U<F;U++){const Z=h.arguments[U],Q=Sl(Z)?Dce(Z):Z,re=p.getWidenedType(p.getBaseTypeOfLiteralType(p.getTypeAtLocation(Z))),oe=q<R?b.parameters[q]:void 0;if(oe&&p.isTypeAssignableTo(re,p.getTypeAtLocation(oe))){q++;continue}const pe=Q&&ot(Q)?Q.text:`p${X++}`,de=dHt(p,re,b);fn(E,{pos:U,declaration:Xat(pe,de,void 0)}),!_Ht(H,q)&&fn(N,{pos:U,declaration:Xat(pe,de,G.createToken(58))})}return{newParameters:E,newOptionalParameters:N,name:al(T),declarations:H}}function uHt(t){const r=No(t);if(r)return r;if(_s(t.parent)&&ot(t.parent.name)||Lo(t.parent)||$s(t.parent))return t.parent.name}function dHt(t,r,a){return t.typeToTypeNode(t.getWidenedType(r),a,1,8)??G.createKeywordTypeNode(159)}function E_e(t,r,a,u,h,p){const g=Ja(r.getCompilerOptions());O(h,C=>{const b=_n(C),T=kD(b,r,a,u);P(C.parameters)?t.replaceNodeRangeWithNodes(b,ya(C.parameters),va(C.parameters),Kat(T,g,C,p),{joiner:", ",indentation:0,leadingTriviaOption:er.LeadingTriviaOption.IncludeAll,trailingTriviaOption:er.TrailingTriviaOption.Include}):O(Kat(T,g,C,p),(E,N)=>{P(C.parameters)===0&&N===0?t.insertNodeAt(b,C.parameters.end,E):t.insertNodeAtEndOfList(b,C.parameters,E)}),T.writeFixes(t)})}function Gat(t){switch(t.kind){case 262:case 218:case 174:case 219:return!0;default:return!1}}function Kat(t,r,a,u){const h=qt(a.parameters,p=>G.createParameterDeclaration(p.modifiers,p.dotDotDotToken,p.name,p.questionToken,p.type,p.initializer));for(const{pos:p,declaration:g}of u){const C=p>0?h[p-1]:void 0;h.splice(p,0,G.updateParameterDeclaration(g,g.modifiers,g.dotDotDotToken,g.name,C&&C.questionToken?G.createToken(58):g.questionToken,pHt(t,g.type,r),g.initializer))}return h}function fHt(t,r){const a=[];for(const u of r)if(hHt(u)){if(P(u.parameters)===P(t.parameters)){a.push(u);continue}if(P(u.parameters)>P(t.parameters))return[]}return a}function hHt(t){return Gat(t)&&t.body===void 0}function Xat(t,r,a){return G.createParameterDeclaration(void 0,void 0,t,a,r,void 0)}function _Ht(t,r){return P(t)&&Ft(t,a=>r<P(a.parameters)&&!!a.parameters[r]&&a.parameters[r].questionToken===void 0)}function pHt(t,r,a){const u=TD(r,a);return u?(JI(t,u.symbols),u.typeNode):r}var mHt="fixCannotFindModule",m3e="installTypesPackage",Qat=k.Cannot_find_module_0_or_its_corresponding_type_declarations.code,Zat=[Qat,k.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type.code];Na({errorCodes:Zat,getCodeActions:function(r){const{host:a,sourceFile:u,span:{start:h}}=r,p=ect(u,h);if(p===void 0)return;const g=tct(p,a,r.errorCode);return g===void 0?[]:[ua(mHt,[],[k.Install_0,g],m3e,k.Install_all_missing_types_packages,Yat(u.fileName,g))]},fixIds:[m3e],getAllCodeActions:t=>qc(t,Zat,(r,a,u)=>{const h=ect(a.file,a.start);if(h!==void 0)switch(t.fixId){case m3e:{const p=tct(h,t.host,a.code);p&&u.push(Yat(a.file.fileName,p));break}default:j.fail(`Bad fixId: ${t.fixId}`)}})});function Yat(t,r){return{type:"install package",file:t,packageName:r}}function ect(t,r){const a=Jr(Rs(t,r),Ha);if(!a)return;const u=a.text,{packageName:h}=cQ(u);return Gd(h)?void 0:h}function tct(t,r,a){var u;return a===Qat?J1.nodeCoreModules.has(t)?"@types/node":void 0:(u=r.isKnownTypesPackageName)!=null&&u.call(r,t)?uQ(t):void 0}var ict=[k.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code,k.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2.code,k.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more.code,k.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1.code,k.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1.code,k.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more.code],g3e="fixClassDoesntImplementInheritedAbstractMember";Na({errorCodes:ict,getCodeActions:function(r){const{sourceFile:a,span:u}=r,h=er.ChangeTracker.with(r,p=>rct(nct(a,u.start),a,r,p,r.preferences));return h.length===0?void 0:[ua(g3e,h,k.Implement_inherited_abstract_class,g3e,k.Implement_all_inherited_abstract_classes)]},fixIds:[g3e],getAllCodeActions:function(r){const a=new Map;return qc(r,ict,(u,h)=>{const p=nct(h.file,h.start);Pg(a,Sc(p))&&rct(p,r.sourceFile,r,u,r.preferences)})}});function nct(t,r){const a=Rs(t,r);return ha(a.parent,ss)}function rct(t,r,a,u,h){const p=L1(t),g=a.program.getTypeChecker(),C=g.getTypeAtLocation(p),b=g.getPropertiesOfType(C).filter(gHt),T=kD(r,a.program,h,a.host);z3e(t,b,r,a,h,T,E=>u.insertMemberAtStart(r,t,E)),T.writeFixes(u)}function gHt(t){const r=_S(ya(t.getDeclarations()));return!(r&2)&&!!(r&64)}var y3e="classSuperMustPrecedeThisAccess",sct=[k.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class.code];Na({errorCodes:sct,getCodeActions(t){const{sourceFile:r,span:a}=t,u=act(r,a.start);if(!u)return;const{constructor:h,superCall:p}=u,g=er.ChangeTracker.with(t,C=>oct(C,r,h,p));return[ua(y3e,g,k.Make_super_call_the_first_statement_in_the_constructor,y3e,k.Make_all_super_calls_the_first_statement_in_their_constructor)]},fixIds:[y3e],getAllCodeActions(t){const{sourceFile:r}=t,a=new Map;return qc(t,sct,(u,h)=>{const p=act(h.file,h.start);if(!p)return;const{constructor:g,superCall:C}=p;Pg(a,Sc(g.parent))&&oct(u,r,g,C)})}});function oct(t,r,a,u){t.insertNodeAtConstructorStart(r,a,u),t.delete(r,u)}function act(t,r){const a=Rs(t,r);if(a.kind!==110)return;const u=Up(a),h=cct(u.body);return h&&!h.expression.arguments.some(p=>Nr(p)&&p.expression===a)?{constructor:u,superCall:h}:void 0}function cct(t){return uf(t)&&mI(t.expression)?t:Ho(t)?void 0:Uo(t,cct)}var v3e="constructorForDerivedNeedSuperCall",lct=[k.Constructors_for_derived_classes_must_contain_a_super_call.code];Na({errorCodes:lct,getCodeActions(t){const{sourceFile:r,span:a}=t,u=uct(r,a.start),h=er.ChangeTracker.with(t,p=>dct(p,r,u));return[ua(v3e,h,k.Add_missing_super_call,v3e,k.Add_all_missing_super_calls)]},fixIds:[v3e],getAllCodeActions:t=>qc(t,lct,(r,a)=>dct(r,t.sourceFile,uct(a.file,a.start)))});function uct(t,r){const a=Rs(t,r);return j.assert(iu(a.parent),"token should be at the constructor declaration"),a.parent}function dct(t,r,a){const u=G.createExpressionStatement(G.createCallExpression(G.createSuper(),void 0,w));t.insertNodeAtConstructorStart(r,a,u)}var fct="fixEnableJsxFlag",hct=[k.Cannot_use_JSX_unless_the_jsx_flag_is_provided.code];Na({errorCodes:hct,getCodeActions:function(r){const{configFile:a}=r.program.getCompilerOptions();if(a===void 0)return;const u=er.ChangeTracker.with(r,h=>_ct(h,a));return[G0(fct,u,k.Enable_the_jsx_flag_in_your_configuration_file)]},fixIds:[fct],getAllCodeActions:t=>qc(t,hct,r=>{const{configFile:a}=t.program.getCompilerOptions();a!==void 0&&_ct(r,a)})});function _ct(t,r){G3e(t,r,"jsx",G.createStringLiteral("react"))}var b3e="fixNaNEquality",pct=[k.This_condition_will_always_return_0.code];Na({errorCodes:pct,getCodeActions(t){const{sourceFile:r,span:a,program:u}=t,h=mct(u,r,a);if(h===void 0)return;const{suggestion:p,expression:g,arg:C}=h,b=er.ChangeTracker.with(t,T=>gct(T,r,C,g));return[ua(b3e,b,[k.Use_0,p],b3e,k.Use_Number_isNaN_in_all_conditions)]},fixIds:[b3e],getAllCodeActions:t=>qc(t,pct,(r,a)=>{const u=mct(t.program,a.file,Ff(a.start,a.length));u&&gct(r,a.file,u.arg,u.expression)})});function mct(t,r,a){const u=Fe(t.getSemanticDiagnostics(r),g=>g.start===a.start&&g.length===a.length);if(u===void 0||u.relatedInformation===void 0)return;const h=Fe(u.relatedInformation,g=>g.code===k.Did_you_mean_0.code);if(h===void 0||h.file===void 0||h.start===void 0||h.length===void 0)return;const p=X3e(h.file,Ff(h.start,h.length));if(p!==void 0&&jt(p)&&ur(p.parent))return{suggestion:yHt(h.messageText),expression:p.parent,arg:p}}function gct(t,r,a,u){const h=G.createCallExpression(G.createPropertyAccessExpression(G.createIdentifier("Number"),G.createIdentifier("isNaN")),void 0,[a]),p=u.operatorToken.kind;t.replaceNode(r,u,p===38||p===36?G.createPrefixUnaryExpression(54,h):h)}function yHt(t){const[,r]=$1(t,`
+`,0).match(/'(.*)'/)||[];return r}Na({errorCodes:[k.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code,k.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code,k.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code],getCodeActions:function(r){const a=r.program.getCompilerOptions(),{configFile:u}=a;if(u===void 0)return;const h=[],p=zh(a);if(p>=5&&p<99){const T=er.ChangeTracker.with(r,E=>{G3e(E,u,"module",G.createStringLiteral("esnext"))});h.push(G0("fixModuleOption",T,[k.Set_the_module_option_in_your_configuration_file_to_0,"esnext"]))}const C=Ja(a);if(C<4||C>99){const T=er.ChangeTracker.with(r,E=>{if(!I8(u))return;const R=[["target",G.createStringLiteral("es2017")]];p===1&&R.push(["module",G.createStringLiteral("commonjs")]),J3e(E,u,R)});h.push(G0("fixTargetOption",T,[k.Set_the_target_option_in_your_configuration_file_to_0,"es2017"]))}return h.length?h:void 0}});var C3e="fixPropertyAssignment",yct=[k.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code];Na({errorCodes:yct,fixIds:[C3e],getCodeActions(t){const{sourceFile:r,span:a}=t,u=bct(r,a.start),h=er.ChangeTracker.with(t,p=>vct(p,t.sourceFile,u));return[ua(C3e,h,[k.Change_0_to_1,"=",":"],C3e,[k.Switch_each_misused_0_to_1,"=",":"])]},getAllCodeActions:t=>qc(t,yct,(r,a)=>vct(r,a.file,bct(a.file,a.start)))});function vct(t,r,a){t.replaceNode(r,a,G.createPropertyAssignment(a.name,a.objectAssignmentInitializer))}function bct(t,r){return ha(Rs(t,r).parent,lh)}var S3e="extendsInterfaceBecomesImplements",Cct=[k.Cannot_extend_an_interface_0_Did_you_mean_implements.code];Na({errorCodes:Cct,getCodeActions(t){const{sourceFile:r}=t,a=Sct(r,t.span.start);if(!a)return;const{extendsToken:u,heritageClauses:h}=a,p=er.ChangeTracker.with(t,g=>wct(g,r,u,h));return[ua(S3e,p,k.Change_extends_to_implements,S3e,k.Change_all_extended_interfaces_to_implements)]},fixIds:[S3e],getAllCodeActions:t=>qc(t,Cct,(r,a)=>{const u=Sct(a.file,a.start);u&&wct(r,a.file,u.extendsToken,u.heritageClauses)})});function Sct(t,r){const a=Rs(t,r),u=Cf(a).heritageClauses,h=u[0].getFirstToken();return h.kind===96?{extendsToken:h,heritageClauses:u}:void 0}function wct(t,r,a,u){if(t.replaceNode(r,a,G.createToken(119)),u.length===2&&u[0].token===96&&u[1].token===119){const h=u[1].getFirstToken(),p=h.getFullStart();t.replaceRange(r,{pos:p,end:p},G.createToken(28));const g=r.text;let C=h.end;for(;C<g.length&&k1(g.charCodeAt(C));)C++;t.deleteRange(r,{pos:h.getStart(),end:C})}}var w3e="forgottenThisPropertyAccess",xct=k.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,kct=[k.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,k.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression.code,xct];Na({errorCodes:kct,getCodeActions(t){const{sourceFile:r}=t,a=Tct(r,t.span.start,t.errorCode);if(!a)return;const u=er.ChangeTracker.with(t,h=>Dct(h,r,a));return[ua(w3e,u,[k.Add_0_to_unresolved_variable,a.className||"this"],w3e,k.Add_qualifier_to_all_unresolved_variables_matching_a_member_name)]},fixIds:[w3e],getAllCodeActions:t=>qc(t,kct,(r,a)=>{const u=Tct(a.file,a.start,a.code);u&&Dct(r,t.sourceFile,u)})});function Tct(t,r,a){const u=Rs(t,r);if(ot(u)||Vs(u))return{node:u,className:a===xct?Cf(u).name.text:void 0}}function Dct(t,r,{node:a,className:u}){Lp(a),t.replaceNode(r,a,G.createPropertyAccessExpression(u?G.createIdentifier(u):G.createThis(),a))}var x3e="fixInvalidJsxCharacters_expression",I_e="fixInvalidJsxCharacters_htmlEntity",Ect=[k.Unexpected_token_Did_you_mean_or_gt.code,k.Unexpected_token_Did_you_mean_or_rbrace.code];Na({errorCodes:Ect,fixIds:[x3e,I_e],getCodeActions(t){const{sourceFile:r,preferences:a,span:u}=t,h=er.ChangeTracker.with(t,g=>k3e(g,a,r,u.start,!1)),p=er.ChangeTracker.with(t,g=>k3e(g,a,r,u.start,!0));return[ua(x3e,h,k.Wrap_invalid_character_in_an_expression_container,x3e,k.Wrap_all_invalid_characters_in_an_expression_container),ua(I_e,p,k.Convert_invalid_character_to_its_html_entity_code,I_e,k.Convert_all_invalid_characters_to_HTML_entity_code)]},getAllCodeActions(t){return qc(t,Ect,(r,a)=>k3e(r,t.preferences,a.file,a.start,t.fixId===I_e))}});var Ict={">":"&gt;","}":"&rbrace;"};function vHt(t){return Li(Ict,t)}function k3e(t,r,a,u,h){const p=a.getText()[u];if(!vHt(p))return;const g=h?Ict[p]:`{${_5(a,r,p)}}`;t.replaceRangeWithText(a,{pos:u,end:u+1},g)}var N_e="deleteUnmatchedParameter",Nct="renameUnmatchedParameter",Lct=[k.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name.code];Na({fixIds:[N_e,Nct],errorCodes:Lct,getCodeActions:function(r){const{sourceFile:a,span:u}=r,h=[],p=Pct(a,u.start);if(p)return fn(h,bHt(r,p)),fn(h,CHt(r,p)),h},getAllCodeActions:function(r){const a=new Map;return gA(er.ChangeTracker.with(r,u=>{yA(r,Lct,({file:h,start:p})=>{const g=Pct(h,p);g&&a.set(g.signature,fn(a.get(g.signature),g.jsDocParameterTag))}),a.forEach((h,p)=>{if(r.fixId===N_e){const g=new Set(h);u.filterJSDocTags(p.getSourceFile(),p,C=>!g.has(C))}})}))}});function bHt(t,{name:r,jsDocHost:a,jsDocParameterTag:u}){const h=er.ChangeTracker.with(t,p=>p.filterJSDocTags(t.sourceFile,a,g=>g!==u));return ua(N_e,h,[k.Delete_unused_param_tag_0,r.getText(t.sourceFile)],N_e,k.Delete_all_unused_param_tags)}function CHt(t,{name:r,jsDocHost:a,signature:u,jsDocParameterTag:h}){if(!P(u.parameters))return;const p=t.sourceFile,g=Wk(u),C=new Set;for(const N of g)Qm(N)&&ot(N.name)&&C.add(N.name.escapedText);const b=J(u.parameters,N=>ot(N.name)&&!C.has(N.name.escapedText)?N.name.getText(p):void 0);if(b===void 0)return;const T=G.updateJSDocParameterTag(h,h.tagName,G.createIdentifier(b),h.isBracketed,h.typeExpression,h.isNameFirst,h.comment),E=er.ChangeTracker.with(t,N=>N.replaceJSDocComment(p,a,qt(g,R=>R===h?T:R)));return G0(Nct,E,[k.Rename_param_tag_name_0_to_1,r.getText(p),b])}function Pct(t,r){const a=Rs(t,r);if(a.parent&&Qm(a.parent)&&ot(a.parent.name)){const u=a.parent,h=zT(u),p=Jk(u);if(h&&p)return{jsDocHost:h,signature:p,name:a.parent.name,jsDocParameterTag:u}}}var T3e="fixUnreferenceableDecoratorMetadata",SHt=[k.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled.code];Na({errorCodes:SHt,getCodeActions:t=>{const r=wHt(t.sourceFile,t.program,t.span.start);if(!r)return;const a=er.ChangeTracker.with(t,p=>r.kind===276&&kHt(p,t.sourceFile,r,t.program)),u=er.ChangeTracker.with(t,p=>xHt(p,t.sourceFile,r,t.program));let h;return a.length&&(h=fn(h,G0(T3e,a,k.Convert_named_imports_to_namespace_import))),u.length&&(h=fn(h,G0(T3e,u,k.Use_import_type))),h},fixIds:[T3e]});function wHt(t,r,a){const u=Jr(Rs(t,a),ot);if(!u||u.parent.kind!==183)return;const p=r.getTypeChecker().getSymbolAtLocation(u);return Fe((p==null?void 0:p.declarations)||w,om(H0,l_,Wd))}function xHt(t,r,a,u){if(a.kind===271){t.insertModifierBefore(r,156,a.name);return}const h=a.kind===273?a:a.parent.parent;if(h.name&&h.namedBindings)return;const p=u.getTypeChecker();ATe(h,C=>{if(Vf(C.symbol,p).flags&111551)return!0})||t.insertModifierBefore(r,156,h)}function kHt(t,r,a,u){pA.doChangeNamedToNamespaceOrDefault(r,u,t,a.parent)}var bY="unusedIdentifier",D3e="unusedIdentifier_prefix",E3e="unusedIdentifier_delete",L_e="unusedIdentifier_deleteImports",I3e="unusedIdentifier_infer",Act=[k._0_is_declared_but_its_value_is_never_read.code,k._0_is_declared_but_never_used.code,k.Property_0_is_declared_but_its_value_is_never_read.code,k.All_imports_in_import_declaration_are_unused.code,k.All_destructured_elements_are_unused.code,k.All_variables_are_unused.code,k.All_type_parameters_are_unused.code];Na({errorCodes:Act,getCodeActions(t){const{errorCode:r,sourceFile:a,program:u,cancellationToken:h}=t,p=u.getTypeChecker(),g=u.getSourceFiles(),C=Rs(a,t.span.start);if(Rg(C))return[w5(er.ChangeTracker.with(t,N=>N.delete(a,C)),k.Remove_template_tag)];if(C.kind===30){const N=er.ChangeTracker.with(t,R=>Mct(R,a,C));return[w5(N,k.Remove_type_parameters)]}const b=Rct(C);if(b){const N=er.ChangeTracker.with(t,R=>R.delete(a,b));return[ua(bY,N,[k.Remove_import_from_0,bDe(b)],L_e,k.Delete_all_unused_imports)]}else if(N3e(C)){const N=er.ChangeTracker.with(t,R=>P_e(a,C,R,p,g,u,h,!1));if(N.length)return[ua(bY,N,[k.Remove_unused_declaration_for_Colon_0,C.getText(a)],L_e,k.Delete_all_unused_imports)]}if(dm(C.parent)||CS(C.parent)){if($s(C.parent.parent)){const N=C.parent.elements,R=[N.length>1?k.Remove_unused_declarations_for_Colon_0:k.Remove_unused_declaration_for_Colon_0,qt(N,F=>F.getText(a)).join(", ")];return[w5(er.ChangeTracker.with(t,F=>THt(F,a,C.parent)),R)]}return[w5(er.ChangeTracker.with(t,N=>DHt(t,N,a,C.parent)),k.Remove_unused_destructuring_declaration)]}if(Fct(a,C))return[w5(er.ChangeTracker.with(t,N=>Bct(N,a,C.parent)),k.Remove_variable_statement)];if(ot(C)&&Wu(C.parent))return[w5(er.ChangeTracker.with(t,N=>OHt(N,a,C.parent)),[k.Remove_unused_declaration_for_Colon_0,C.getText(a)])];const T=[];if(C.kind===140){const N=er.ChangeTracker.with(t,F=>Oct(F,a,C)),R=ha(C.parent,DI).typeParameter.name.text;T.push(ua(bY,N,[k.Replace_infer_0_with_unknown,R],I3e,k.Replace_all_unused_infer_with_unknown))}else{const N=er.ChangeTracker.with(t,R=>P_e(a,C,R,p,g,u,h,!1));if(N.length){const R=Ka(C.parent)?C.parent:C;T.push(w5(N,[k.Remove_unused_declaration_for_Colon_0,R.getText(a)]))}}const E=er.ChangeTracker.with(t,N=>Wct(N,r,a,C));return E.length&&T.push(ua(bY,E,[k.Prefix_0_with_an_underscore,C.getText(a)],D3e,k.Prefix_all_unused_declarations_with_where_possible)),T},fixIds:[D3e,E3e,L_e,I3e],getAllCodeActions:t=>{const{sourceFile:r,program:a,cancellationToken:u}=t,h=a.getTypeChecker(),p=a.getSourceFiles();return qc(t,Act,(g,C)=>{const b=Rs(r,C.start);switch(t.fixId){case D3e:Wct(g,C.code,r,b);break;case L_e:{const T=Rct(b);T?g.delete(r,T):N3e(b)&&P_e(r,b,g,h,p,a,u,!0);break}case E3e:{if(b.kind===140||N3e(b))break;if(Rg(b))g.delete(r,b);else if(b.kind===30)Mct(g,r,b);else if(dm(b.parent)){if(b.parent.parent.initializer)break;(!$s(b.parent.parent)||Vct(b.parent.parent,h,p))&&g.delete(r,b.parent.parent)}else{if(CS(b.parent.parent)&&b.parent.parent.parent.initializer)break;Fct(r,b)?Bct(g,r,b.parent):P_e(r,b,g,h,p,a,u,!0)}break}case I3e:b.kind===140&&Oct(g,r,b);break;default:j.fail(JSON.stringify(t.fixId))}})}});function Oct(t,r,a){t.replaceNode(r,a.parent,G.createKeywordTypeNode(159))}function w5(t,r){return ua(bY,t,r,E3e,k.Delete_all_unused_declarations)}function Mct(t,r,a){t.delete(r,j.checkDefined(ha(a.parent,Iae).typeParameters,"The type parameter to delete should exist"))}function N3e(t){return t.kind===102||t.kind===80&&(t.parent.kind===276||t.parent.kind===273)}function Rct(t){return t.kind===102?Jr(t.parent,du):void 0}function Fct(t,r){return Sf(r.parent)&&ya(r.parent.getChildren(t))===r}function Bct(t,r,a){t.delete(r,a.parent.kind===243?a.parent:a)}function THt(t,r,a){O(a.elements,u=>t.delete(r,u))}function DHt(t,r,a,{parent:u}){if(_s(u)&&u.initializer&&MT(u.initializer))if(Sf(u.parent)&&P(u.parent.declarations)>1){const h=u.parent.parent,p=h.getStart(a),g=h.end;r.delete(a,u),r.insertNodeAt(a,g,u.initializer,{prefix:rC(t.host,t.formatContext.options)+a.text.slice(OZ(a.text,p-1),p),suffix:kj(a)?";":""})}else r.replaceNode(a,u.parent,u.initializer);else r.delete(a,u)}function Wct(t,r,a,u){r!==k.Property_0_is_declared_but_its_value_is_never_read.code&&(u.kind===140&&(u=ha(u.parent,DI).typeParameter.name),ot(u)&&EHt(u)&&(t.replaceNode(a,u,G.createIdentifier(`_${u.text}`)),$s(u.parent)&&M6(u.parent).forEach(h=>{ot(h.name)&&t.replaceNode(a,h.name,G.createIdentifier(`_${h.name.text}`))})))}function EHt(t){switch(t.parent.kind){case 169:case 168:return!0;case 260:switch(t.parent.parent.parent.kind){case 250:case 249:return!0}}return!1}function P_e(t,r,a,u,h,p,g,C){IHt(r,a,t,u,h,p,g,C),ot(r)&&kl.Core.eachSymbolReferenceInFile(r,u,t,b=>{Nr(b.parent)&&b.parent.name===b&&(b=b.parent),!C&&AHt(b)&&a.delete(t,b.parent.parent)})}function IHt(t,r,a,u,h,p,g,C){const{parent:b}=t;if($s(b))NHt(r,a,b,u,h,p,g,C);else if(!(C&&ot(t)&&kl.Core.isSymbolReferencedInFile(t,u,a))){const T=H0(b)?t:Ka(b)?b.parent:b;j.assert(T!==a,"should not delete whole source file"),r.delete(a,T)}}function NHt(t,r,a,u,h,p,g,C=!1){if(LHt(u,r,a,h,p,g,C))if(a.modifiers&&a.modifiers.length>0&&(!ot(a.name)||kl.Core.isSymbolReferencedInFile(a.name,u,r)))for(const b of a.modifiers)Fa(b)&&t.deleteModifier(r,b);else!a.initializer&&Vct(a,u,h)&&t.delete(r,a)}function Vct(t,r,a){const u=t.parent.parameters.indexOf(t);return!kl.Core.someSignatureUsage(t.parent,a,r,(h,p)=>!p||p.arguments.length>u)}function LHt(t,r,a,u,h,p,g){const{parent:C}=a;switch(C.kind){case 174:case 176:const b=C.parameters.indexOf(a),T=Nu(C)?C.name:C,E=kl.Core.getReferencedSymbolsForNode(C.pos,T,h,u,p);if(E){for(const N of E)for(const R of N.references)if(R.kind===kl.EntryKind.Node){const F=g7(R.node)&&la(R.node.parent)&&R.node.parent.arguments.length>b,H=Nr(R.node.parent)&&g7(R.node.parent.expression)&&la(R.node.parent.parent)&&R.node.parent.parent.arguments.length>b,U=(Nu(R.node.parent)||W1(R.node.parent))&&R.node.parent!==a.parent&&R.node.parent.parameters.length>b;if(F||H||U)return!1}}return!0;case 262:return C.name&&PHt(t,r,C.name)?Hct(C,a,g):!0;case 218:case 219:return Hct(C,a,g);case 178:return!1;case 177:return!0;default:return j.failBadSyntaxKind(C)}}function PHt(t,r,a){return!!kl.Core.eachSymbolReferenceInFile(a,t,r,u=>ot(u)&&la(u.parent)&&u.parent.arguments.includes(u))}function Hct(t,r,a){const u=t.parameters,h=u.indexOf(r);return j.assert(h!==-1,"The parameter should already be in the list"),a?u.slice(h+1).every(p=>ot(p.name)&&!p.symbol.isReferenced):h===u.length-1}function AHt(t){return(ur(t.parent)&&t.parent.left===t||(_le(t.parent)||n2(t.parent))&&t.parent.operand===t)&&uf(t.parent.parent)}function OHt(t,r,a){const u=a.symbol.declarations;if(u)for(const h of u)t.delete(r,h)}var L3e="fixUnreachableCode",jct=[k.Unreachable_code_detected.code];Na({errorCodes:jct,getCodeActions(t){if(t.program.getSyntacticDiagnostics(t.sourceFile,t.cancellationToken).length)return;const a=er.ChangeTracker.with(t,u=>zct(u,t.sourceFile,t.span.start,t.span.length,t.errorCode));return[ua(L3e,a,k.Remove_unreachable_code,L3e,k.Remove_all_unreachable_code)]},fixIds:[L3e],getAllCodeActions:t=>qc(t,jct,(r,a)=>zct(r,a.file,a.start,a.length,a.code))});function zct(t,r,a,u,h){const p=Rs(r,a),g=Qi(p,Ps);if(g.getStart(r)!==p.getStart(r)){const b=JSON.stringify({statementKind:j.formatSyntaxKind(g.kind),tokenKind:j.formatSyntaxKind(p.kind),errorCode:h,start:a,length:u});j.fail("Token and statement should start at the same point. "+b)}const C=(Xo(g.parent)?g.parent:g).parent;if(!Xo(g.parent)||g===ya(g.parent.statements))switch(C.kind){case 245:if(C.elseStatement){if(Xo(g.parent))break;t.replaceNode(r,g,G.createBlock(w));return}case 247:case 248:t.delete(r,C);return}if(Xo(g.parent)){const b=a+u,T=j.checkDefined(MHt(jce(g.parent.statements,g),E=>E.pos<b),"Some statement should be last");t.deleteNodeRange(r,g,T)}else t.delete(r,g)}function MHt(t,r){let a;for(const u of t){if(!r(u))break;a=u}return a}var P3e="fixUnusedLabel",Uct=[k.Unused_label.code];Na({errorCodes:Uct,getCodeActions(t){const r=er.ChangeTracker.with(t,a=>qct(a,t.sourceFile,t.span.start));return[ua(P3e,r,k.Remove_unused_label,P3e,k.Remove_all_unused_labels)]},fixIds:[P3e],getAllCodeActions:t=>qc(t,Uct,(r,a)=>qct(r,a.file,a.start))});function qct(t,r,a){const u=Rs(r,a),h=ha(u.parent,_x),p=u.getStart(r),g=h.statement.getStart(r),C=qm(p,g,r)?g:Va(r.text,Uc(h,59,r).end,!0);t.deleteRange(r,{pos:p,end:C})}var $ct="fixJSDocTypes_plain",A3e="fixJSDocTypes_nullable",Jct=[k.JSDoc_types_can_only_be_used_inside_documentation_comments.code,k._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1.code,k._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1.code];Na({errorCodes:Jct,getCodeActions(t){const{sourceFile:r}=t,a=t.program.getTypeChecker(),u=Kct(r,t.span.start,a);if(!u)return;const{typeNode:h,type:p}=u,g=h.getText(r),C=[b(p,$ct,k.Change_all_jsdoc_style_types_to_TypeScript)];return h.kind===314&&C.push(b(p,A3e,k.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types)),C;function b(T,E,N){const R=er.ChangeTracker.with(t,F=>Gct(F,r,h,T,a));return ua("jdocTypes",R,[k.Change_0_to_1,g,a.typeToString(T)],E,N)}},fixIds:[$ct,A3e],getAllCodeActions(t){const{fixId:r,program:a,sourceFile:u}=t,h=a.getTypeChecker();return qc(t,Jct,(p,g)=>{const C=Kct(g.file,g.start,h);if(!C)return;const{typeNode:b,type:T}=C,E=b.kind===314&&r===A3e?h.getNullableType(T,32768):T;Gct(p,u,b,E,h)})}});function Gct(t,r,a,u,h){t.replaceNode(r,a,h.typeToTypeNode(u,a,void 0))}function Kct(t,r,a){const u=Qi(Rs(t,r),RHt),h=u&&u.type;return h&&{typeNode:h,type:FHt(a,h)}}function RHt(t){switch(t.kind){case 234:case 179:case 180:case 262:case 177:case 181:case 200:case 174:case 173:case 169:case 172:case 171:case 178:case 265:case 216:case 260:return!0;default:return!1}}function FHt(t,r){if(k3(r)){const a=t.getTypeFromTypeNode(r.type);return a===t.getNeverType()||a===t.getVoidType()?a:t.getUnionType(fn([a,t.getUndefinedType()],r.postfix?void 0:t.getNullType()))}return t.getTypeFromTypeNode(r)}var O3e="fixMissingCallParentheses",Xct=[k.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead.code];Na({errorCodes:Xct,fixIds:[O3e],getCodeActions(t){const{sourceFile:r,span:a}=t,u=Zct(r,a.start);if(!u)return;const h=er.ChangeTracker.with(t,p=>Qct(p,t.sourceFile,u));return[ua(O3e,h,k.Add_missing_call_parentheses,O3e,k.Add_all_missing_call_parentheses)]},getAllCodeActions:t=>qc(t,Xct,(r,a)=>{const u=Zct(a.file,a.start);u&&Qct(r,a.file,u)})});function Qct(t,r,a){t.replaceNodeWithText(r,a,`${a.text}()`)}function Zct(t,r){const a=Rs(t,r);if(Nr(a.parent)){let u=a.parent;for(;Nr(u.parent);)u=u.parent;return u.name}if(ot(a))return a}var Yct="fixMissingTypeAnnotationOnExports",M3e="add-annotation",R3e="add-type-assertion",BHt="extract-expression",elt=[k.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code,k.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code,k.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code,k.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,k.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,k.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,k.Expression_type_can_t_be_inferred_with_isolatedDeclarations.code,k.Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations.code,k.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations.code,k.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations.code,k.Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations.code,k.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations.code,k.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations.code,k.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations.code,k.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations.code,k.Default_exports_can_t_be_inferred_with_isolatedDeclarations.code,k.Only_const_arrays_can_be_inferred_with_isolatedDeclarations.code,k.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function.code,k.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_supported_with_isolatedDeclarations.code,k.Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations.code,k.Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit.code],WHt=new Set([177,174,172,262,218,219,260,169,277,263,206,207]),tlt=531469,ilt=1;Na({errorCodes:elt,fixIds:[Yct],getCodeActions(t){const r=[];return x5(M3e,r,t,0,a=>a.addTypeAnnotation(t.span)),x5(M3e,r,t,1,a=>a.addTypeAnnotation(t.span)),x5(M3e,r,t,2,a=>a.addTypeAnnotation(t.span)),x5(R3e,r,t,0,a=>a.addInlineAssertion(t.span)),x5(R3e,r,t,1,a=>a.addInlineAssertion(t.span)),x5(R3e,r,t,2,a=>a.addInlineAssertion(t.span)),x5(BHt,r,t,0,a=>a.extractAsVariable(t.span)),r},getAllCodeActions:t=>{const r=nlt(t,0,a=>{yA(t,elt,u=>{a.addTypeAnnotation(u)})});return gA(r.textChanges)}});function x5(t,r,a,u,h){const p=nlt(a,u,h);p.result&&p.textChanges.length&&r.push(ua(t,p.textChanges,p.result,Yct,k.Add_all_missing_type_annotations))}function nlt(t,r,a){const u={typeNode:void 0,mutatedTarget:!1},h=er.ChangeTracker.fromContext(t),p=t.sourceFile,g=t.program,C=g.getTypeChecker(),b=Ja(g.getCompilerOptions()),T=kD(t.sourceFile,t.program,t.preferences,t.host),E=new Set,N=new Set,R=bx({preserveSourceNewlines:!1}),F=a({addTypeAnnotation:H,addInlineAssertion:Q,extractAsVariable:re});return T.writeFixes(h),{result:F,textChanges:h.getChanges()};function H(Me){t.cancellationToken.throwIfCancellationRequested();const ut=Rs(p,Me.start),wt=oe(ut);if(wt)return Wu(wt)?U(wt):pe(wt);const Et=$e(ut);if(Et)return pe(Et)}function U(Me){var ut;if(N!=null&&N.has(Me))return;N==null||N.add(Me);const wt=C.getTypeAtLocation(Me),Et=C.getPropertiesOfType(wt);if(!Me.name||Et.length===0)return;const dt=[];for(const tn of Et)J_(tn.name,Ja(g.getCompilerOptions()))&&(tn.valueDeclaration&&_s(tn.valueDeclaration)||dt.push(G.createVariableStatement([G.createModifier(95)],G.createVariableDeclarationList([G.createVariableDeclaration(tn.name,void 0,Pe(C.getTypeOfSymbol(tn),Me),void 0)]))));if(dt.length===0)return;const zt=[];(ut=Me.modifiers)!=null&&ut.some(tn=>tn.kind===95)&&zt.push(G.createModifier(95)),zt.push(G.createModifier(138));const Ei=G.createModuleDeclaration(zt,Me.name,G.createModuleBlock(dt),101441696);return h.insertNodeAfter(p,Me,Ei),[k.Annotate_types_of_properties_expando_function_in_a_namespace]}function q(Me){return!pl(Me)&&!la(Me)&&!Aa(Me)&&!jf(Me)}function X(Me,ut){return q(Me)&&(Me=G.createParenthesizedExpression(Me)),G.createAsExpression(Me,ut)}function Z(Me,ut){return q(Me)&&(Me=G.createParenthesizedExpression(Me)),G.createAsExpression(G.createSatisfiesExpression(Me,Ec(ut)),ut)}function Q(Me){t.cancellationToken.throwIfCancellationRequested();const ut=Rs(p,Me.start);if(oe(ut))return;const Et=et(ut,Me);if(!Et||mP(Et)||mP(Et.parent))return;const dt=jt(Et),zt=lh(Et);if(!zt&&Wf(Et)||Qi(Et,ta)||Qi(Et,SS)||dt&&(Qi(Et,Tp)||Qi(Et,ws))||Km(Et))return;const Ei=Qi(Et,_s),tn=Ei&&C.getTypeAtLocation(Ei);if(tn&&tn.flags&8192||!(dt||zt))return;const{typeNode:xn,mutatedTarget:Pn}=Te(Et,tn);if(!(!xn||Pn))return zt?h.insertNodeAt(p,Et.end,X(Ec(Et.name),xn),{prefix:": "}):dt?h.replaceNode(p,Et,Z(Ec(Et),xn)):j.assertNever(Et),[k.Add_satisfies_and_an_inline_type_assertion_with_0,Nt(xn)]}function re(Me){t.cancellationToken.throwIfCancellationRequested();const ut=Rs(p,Me.start),wt=et(ut,Me);if(!wt||mP(wt)||mP(wt.parent)||!jt(wt))return;if(jf(wt))return h.replaceNode(p,wt,X(wt,G.createTypeReferenceNode("const"))),[k.Mark_array_literal_as_const];const dt=Qi(wt,_d);if(dt){if(dt===wt.parent&&pl(wt))return;const zt=G.createUniqueName(W4e(wt,p,C,p),16);let Ei=wt,tn=wt;if(Km(Ei)&&(Ei=By(Ei.parent),Oe(Ei.parent)?tn=Ei=Ei.parent:tn=X(Ei,G.createTypeReferenceNode("const"))),pl(Ei))return;const xn=G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(zt,void 0,void 0,tn)],2)),Pn=Qi(wt,Ps);return h.insertNodeBefore(p,Pn,xn),h.replaceNode(p,Ei,G.createAsExpression(G.cloneNode(zt),G.createTypeQueryNode(G.cloneNode(zt)))),[k.Extract_to_variable_and_replace_with_0_as_typeof_0,Nt(zt)]}}function oe(Me){const ut=Qi(Me,wt=>Ps(wt)?"quit":PP(wt));if(ut&&PP(ut)){let wt=ut;if(ur(wt)&&(wt=wt.left,!PP(wt)))return;const Et=C.getTypeAtLocation(wt.expression);if(!Et)return;const dt=C.getPropertiesOfType(Et);if(Ft(dt,zt=>zt.valueDeclaration===ut||zt.valueDeclaration===ut.parent)){const zt=Et.symbol.valueDeclaration;if(zt){if(lx(zt)&&_s(zt.parent))return zt.parent;if(Wu(zt))return zt}}}}function pe(Me){if(!(E!=null&&E.has(Me)))switch(E==null||E.add(Me),Me.kind){case 169:case 172:case 260:return ze(Me);case 219:case 218:case 262:case 174:case 177:return de(Me,p);case 277:return ue(Me);case 263:return Ie(Me);case 206:case 207:return we(Me);default:throw new Error(`Cannot find a fix for the given node ${Me.kind}`)}}function de(Me,ut){if(Me.type)return;const{typeNode:wt}=Te(Me);if(wt)return h.tryInsertTypeAnnotation(ut,Me,wt),[k.Add_return_type_0,Nt(wt)]}function ue(Me){if(Me.isExportEquals)return;const{typeNode:ut}=Te(Me.expression);if(!ut)return;const wt=G.createUniqueName("_default");return h.replaceNodeWithNodes(p,Me,[G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(wt,void 0,ut,Me.expression)],2)),G.updateExportAssignment(Me,Me==null?void 0:Me.modifiers,wt)]),[k.Extract_default_export_to_variable]}function Ie(Me){var ut,wt;const Et=(ut=Me.heritageClauses)==null?void 0:ut.find(_i=>_i.token===96),dt=Et==null?void 0:Et.types[0];if(!dt)return;const{typeNode:zt}=Te(dt.expression);if(!zt)return;const Ei=G.createUniqueName(Me.name?Me.name.text+"Base":"Anonymous",16),tn=G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(Ei,void 0,zt,dt.expression)],2));h.insertNodeBefore(p,Me,tn);const xn=qw(p.text,dt.end),Pn=((wt=xn==null?void 0:xn[xn.length-1])==null?void 0:wt.end)??dt.end;return h.replaceRange(p,{pos:dt.getFullStart(),end:Pn},Ei,{prefix:" "}),[k.Extract_base_class_to_variable]}function we(Me){var ut;const wt=Me.parent,Et=Me.parent.parent.parent;if(!wt.initializer)return;let dt;const zt=[];if(ot(wt.initializer))dt={expression:{kind:3,identifier:wt.initializer}};else{const xn=G.createUniqueName("dest",16);dt={expression:{kind:3,identifier:xn}},zt.push(G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(xn,void 0,void 0,wt.initializer)],2)))}const Ei=[];CS(Me)?he(Me,Ei,dt):Ae(Me,Ei,dt);const tn=new Map;for(const xn of Ei){if(xn.element.propertyName&&Ka(xn.element.propertyName)){const _i=xn.element.propertyName.expression,Fi=G.getGeneratedNameForNode(_i),On=G.createVariableDeclaration(Fi,void 0,void 0,_i),pn=G.createVariableDeclarationList([On],2),qr=G.createVariableStatement(void 0,pn);zt.push(qr),tn.set(_i,Fi)}const Pn=xn.element.name;if(CS(Pn))he(Pn,Ei,xn);else if(dm(Pn))Ae(Pn,Ei,xn);else{const{typeNode:_i}=Te(Pn);let Fi=ke(xn,tn);if(xn.element.initializer){const pn=(ut=xn.element)==null?void 0:ut.propertyName,qr=G.createUniqueName(pn&&ot(pn)?pn.text:"temp",16);zt.push(G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(qr,void 0,void 0,Fi)],2))),Fi=G.createConditionalExpression(G.createBinaryExpression(qr,G.createToken(37),G.createIdentifier("undefined")),G.createToken(58),xn.element.initializer,G.createToken(59),Fi)}const On=Zr(Et,32)?[G.createToken(95)]:void 0;zt.push(G.createVariableStatement(On,G.createVariableDeclarationList([G.createVariableDeclaration(Pn,void 0,_i,Fi)],2)))}}return Et.declarationList.declarations.length>1&&zt.push(G.updateVariableStatement(Et,Et.modifiers,G.updateVariableDeclarationList(Et.declarationList,Et.declarationList.declarations.filter(xn=>xn!==Me.parent)))),h.replaceNodeWithNodes(p,Et,zt),[k.Extract_binding_expressions_to_variable]}function he(Me,ut,wt){for(let Et=0;Et<Me.elements.length;++Et){const dt=Me.elements[Et];Bd(dt)||ut.push({element:dt,parent:wt,expression:{kind:2,arrayIndex:Et}})}}function Ae(Me,ut,wt){for(const Et of Me.elements){let dt;if(Et.propertyName)if(Ka(Et.propertyName)){ut.push({element:Et,parent:wt,expression:{kind:1,computed:Et.propertyName.expression}});continue}else dt=Et.propertyName.text;else dt=Et.name.text;ut.push({element:Et,parent:wt,expression:{kind:0,text:dt}})}}function ke(Me,ut){const wt=[Me];for(;Me.parent;)Me=Me.parent,wt.push(Me);let Et=wt[wt.length-1].expression.identifier;for(let dt=wt.length-2;dt>=0;--dt){const zt=wt[dt].expression;zt.kind===0?Et=G.createPropertyAccessChain(Et,void 0,G.createIdentifier(zt.text)):zt.kind===1?Et=G.createElementAccessExpression(Et,ut.get(zt.computed)):zt.kind===2&&(Et=G.createElementAccessExpression(Et,zt.arrayIndex))}return Et}function Te(Me,ut){if(r===1)return He(Me);let wt;if(mP(Me)){const zt=C.getSignatureFromDeclaration(Me);if(zt){const Ei=C.getTypePredicateOfSignature(zt);if(Ei)return Ei.type?{typeNode:We(Ei,Qi(Me,Wf)??p,dt(Ei.type)),mutatedTarget:!1}:u;wt=C.getReturnTypeOfSignature(zt)}}else wt=C.getTypeAtLocation(Me);if(!wt)return u;if(r===2){ut&&(wt=ut);const zt=C.getWidenedLiteralType(wt);if(C.isTypeAssignableTo(zt,wt))return u;wt=zt}const Et=Qi(Me,Wf)??p;return $s(Me)&&C.requiresAddingImplicitUndefined(Me,Et)&&(wt=C.getUnionType([C.getUndefinedType(),wt],0)),{typeNode:Pe(wt,Et,dt(wt)),mutatedTarget:!1};function dt(zt){return(_s(Me)||Lo(Me)&&Zr(Me,264))&&zt.flags&8192?1048576:0}}function De(Me){return G.createTypeQueryNode(Ec(Me))}function qe(Me,ut="temp"){const wt=!!Qi(Me,Oe);return wt?Ne(Me,ut,wt,Et=>Et.elements,Km,G.createSpreadElement,Et=>G.createArrayLiteralExpression(Et,!0),Et=>G.createTupleTypeNode(Et.map(G.createRestTypeNode))):u}function se(Me,ut="temp"){const wt=!!Qi(Me,Oe);return Ne(Me,ut,wt,Et=>Et.properties,Kv,G.createSpreadAssignment,Et=>G.createObjectLiteralExpression(Et,!0),G.createIntersectionTypeNode)}function Ne(Me,ut,wt,Et,dt,zt,Ei,tn){const xn=[],Pn=[];let _i;const Fi=Qi(Me,Ps);for(const qr of Et(Me))dt(qr)?(pn(),pl(qr.expression)?(xn.push(De(qr.expression)),Pn.push(qr)):On(qr.expression)):(_i??(_i=[])).push(qr);if(Pn.length===0)return u;return pn(),h.replaceNode(p,Me,Ei(Pn)),{typeNode:tn(xn),mutatedTarget:!0};function On(qr){const Fs=G.createUniqueName(ut+"_Part"+(Pn.length+1),16),ko=wt?G.createAsExpression(qr,G.createTypeReferenceNode("const")):qr,ls=G.createVariableStatement(void 0,G.createVariableDeclarationList([G.createVariableDeclaration(Fs,void 0,void 0,ko)],2));h.insertNodeBefore(p,Fi,ls),xn.push(De(Fs)),Pn.push(zt(Fs))}function pn(){_i&&(On(Ei(_i)),_i=void 0)}}function Oe(Me){return Hk(Me)&&O0(Me.type)}function He(Me){if($s(Me))return u;if(lh(Me))return{typeNode:De(Me.name),mutatedTarget:!1};if(pl(Me))return{typeNode:De(Me),mutatedTarget:!1};if(Oe(Me))return He(Me.expression);if(jf(Me)){const ut=Qi(Me,_s),wt=ut&&ot(ut.name)?ut.name.text:void 0;return qe(Me,wt)}if(Aa(Me)){const ut=Qi(Me,_s),wt=ut&&ot(ut.name)?ut.name.text:void 0;return se(Me,wt)}if(_s(Me)&&Me.initializer)return He(Me.initializer);if(qP(Me)){const{typeNode:ut,mutatedTarget:wt}=He(Me.whenTrue);if(!ut)return u;const{typeNode:Et,mutatedTarget:dt}=He(Me.whenFalse);return Et?{typeNode:G.createUnionTypeNode([ut,Et]),mutatedTarget:wt||dt}:u}return u}function Pe(Me,ut,wt=0){let Et=!1;const dt=CY(C,T,Me,ut,b,tlt|wt,ilt,{moduleResolverHost:g,trackSymbol(){return!0},reportTruncationError(){Et=!0}});return Et?G.createKeywordTypeNode(133):dt}function We(Me,ut,wt=0){let Et=!1;const dt=klt(C,T,Me,ut,b,tlt|wt,ilt,{moduleResolverHost:g,trackSymbol(){return!0},reportTruncationError(){Et=!0}});return Et?G.createKeywordTypeNode(133):dt}function ze(Me){const{typeNode:ut}=Te(Me);if(ut)return Me.type?h.replaceNode(_n(Me),Me.type,ut):h.tryInsertTypeAnnotation(_n(Me),Me,ut),[k.Add_annotation_of_type_0,Nt(ut)]}function Nt(Me){tr(Me,1);const ut=R.printNode(4,Me,p);return ut.length>x8?ut.substring(0,x8-3)+"...":(tr(Me,0),ut)}function $e(Me){return Qi(Me,ut=>WHt.has(ut.kind)&&(!dm(ut)&&!CS(ut)||_s(ut.parent)))}function et(Me,ut){for(;Me&&Me.end<ut.start+ut.length;)Me=Me.parent;for(;Me.parent.pos===Me.pos&&Me.parent.end===Me.end;)Me=Me.parent;return ot(Me)&&aS(Me.parent)&&Me.parent.initializer?Me.parent.initializer:Me}}var F3e="fixAwaitInSyncFunction",rlt=[k.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,k.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,k.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,k.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code];Na({errorCodes:rlt,getCodeActions(t){const{sourceFile:r,span:a}=t,u=slt(r,a.start);if(!u)return;const h=er.ChangeTracker.with(t,p=>olt(p,r,u));return[ua(F3e,h,k.Add_async_modifier_to_containing_function,F3e,k.Add_all_missing_async_modifiers)]},fixIds:[F3e],getAllCodeActions:function(r){const a=new Map;return qc(r,rlt,(u,h)=>{const p=slt(h.file,h.start);!p||!Pg(a,Sc(p.insertBefore))||olt(u,r.sourceFile,p)})}});function VHt(t){if(t.type)return t.type;if(_s(t.parent)&&t.parent.type&&Hy(t.parent.type))return t.parent.type.type}function slt(t,r){const a=Rs(t,r),u=Up(a);if(!u)return;let h;switch(u.kind){case 174:h=u.name;break;case 262:case 218:h=Uc(u,100,t);break;case 219:const p=u.typeParameters?30:21;h=Uc(u,p,t)||ya(u.parameters);break;default:return}return h&&{insertBefore:h,returnType:VHt(u)}}function olt(t,r,{insertBefore:a,returnType:u}){if(u){const h=cV(u);(!h||h.kind!==80||h.text!=="Promise")&&t.replaceNode(r,u,G.createTypeReferenceNode("Promise",G.createNodeArray([u])))}t.insertModifierBefore(r,134,a)}var alt=[k._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code,k._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor.code],B3e="fixPropertyOverrideAccessor";Na({errorCodes:alt,getCodeActions(t){const r=clt(t.sourceFile,t.span.start,t.span.length,t.errorCode,t);if(r)return[ua(B3e,r,k.Generate_get_and_set_accessors,B3e,k.Generate_get_and_set_accessors_for_all_overriding_properties)]},fixIds:[B3e],getAllCodeActions:t=>qc(t,alt,(r,a)=>{const u=clt(a.file,a.start,a.length,a.code,t);if(u)for(const h of u)r.pushRaw(t.sourceFile,h)})});function clt(t,r,a,u,h){let p,g;if(u===k._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code)p=r,g=r+a;else if(u===k._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor.code){const C=h.program.getTypeChecker(),b=Rs(t,r).parent;j.assert(Qw(b),"error span of fixPropertyOverrideAccessor should only be on an accessor");const T=b.parent;j.assert(ss(T),"erroneous accessors should only be inside classes");const E=Bm(Q3e(T,C));if(!E)return[];const N=Ws(lP(b.name)),R=C.getPropertyOfType(C.getTypeAtLocation(E),N);if(!R||!R.valueDeclaration)return[];p=R.valueDeclaration.pos,g=R.valueDeclaration.end,t=_n(R.valueDeclaration)}else j.fail("fixPropertyOverrideAccessor codefix got unexpected error code "+u);return Nlt(t,h.program,p,g,h,k.Generate_get_and_set_accessors.message)}var W3e="inferFromUsage",llt=[k.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code,k.Variable_0_implicitly_has_an_1_type.code,k.Parameter_0_implicitly_has_an_1_type.code,k.Rest_parameter_0_implicitly_has_an_any_type.code,k.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code,k._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code,k.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code,k.Member_0_implicitly_has_an_1_type.code,k.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code,k.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,k.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,k.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code,k.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code,k._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code,k.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code,k.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,k.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code];Na({errorCodes:llt,getCodeActions(t){const{sourceFile:r,program:a,span:{start:u},errorCode:h,cancellationToken:p,host:g,preferences:C}=t,b=Rs(r,u);let T;const E=er.ChangeTracker.with(t,R=>{T=ult(R,r,b,h,a,p,Pk,g,C)}),N=T&&No(T);return!N||E.length===0?void 0:[ua(W3e,E,[HHt(h,b),uu(N)],W3e,k.Infer_all_types_from_usage)]},fixIds:[W3e],getAllCodeActions(t){const{sourceFile:r,program:a,cancellationToken:u,host:h,preferences:p}=t,g=Z3();return qc(t,llt,(C,b)=>{ult(C,r,Rs(b.file,b.start),b.code,a,u,g,h,p)})}});function HHt(t,r){switch(t){case k.Parameter_0_implicitly_has_an_1_type.code:case k.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return kp(Up(r))?k.Infer_type_of_0_from_usage:k.Infer_parameter_types_from_usage;case k.Rest_parameter_0_implicitly_has_an_any_type.code:case k.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code:return k.Infer_parameter_types_from_usage;case k.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code:return k.Infer_this_type_of_0_from_usage;default:return k.Infer_type_of_0_from_usage}}function jHt(t){switch(t){case k.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code:return k.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code;case k.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return k.Variable_0_implicitly_has_an_1_type.code;case k.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return k.Parameter_0_implicitly_has_an_1_type.code;case k.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code:return k.Rest_parameter_0_implicitly_has_an_any_type.code;case k.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code:return k.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code;case k._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code:return k._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code;case k.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code:return k.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code;case k.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return k.Member_0_implicitly_has_an_1_type.code}return t}function ult(t,r,a,u,h,p,g,C,b){if(!b8(a.kind)&&a.kind!==80&&a.kind!==26&&a.kind!==110)return;const{parent:T}=a,E=kD(r,h,b,C);switch(u=jHt(u),u){case k.Member_0_implicitly_has_an_1_type.code:case k.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code:if(_s(T)&&g(T)||Lo(T)||O_(T))return dlt(t,E,r,T,h,C,p),E.writeFixes(t),T;if(Nr(T)){const F=$j(T.name,h,p),H=p5(F,T,h,C);if(H){const U=G.createJSDocTypeTag(void 0,G.createJSDocTypeExpression(H),void 0);t.addJSDocTags(r,ha(T.parent.parent,uf),[U])}return E.writeFixes(t),T}return;case k.Variable_0_implicitly_has_an_1_type.code:{const F=h.getTypeChecker().getSymbolAtLocation(a);return F&&F.valueDeclaration&&_s(F.valueDeclaration)&&g(F.valueDeclaration)?(dlt(t,E,_n(F.valueDeclaration),F.valueDeclaration,h,C,p),E.writeFixes(t),F.valueDeclaration):void 0}}const N=Up(a);if(N===void 0)return;let R;switch(u){case k.Parameter_0_implicitly_has_an_1_type.code:if(kp(N)){flt(t,E,r,N,h,C,p),R=N;break}case k.Rest_parameter_0_implicitly_has_an_any_type.code:if(g(N)){const F=ha(T,$s);zHt(t,E,r,F,N,h,C,p),R=F}break;case k.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code:case k._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code:um(N)&&ot(N.name)&&(A_e(t,E,r,N,$j(N.name,h,p),h,C),R=N);break;case k.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code:kp(N)&&(flt(t,E,r,N,h,C,p),R=N);break;case k.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code:er.isThisTypeAnnotatable(N)&&g(N)&&(UHt(t,r,N,h,C,p),R=N);break;default:return j.fail(String(u))}return E.writeFixes(t),R}function dlt(t,r,a,u,h,p,g){ot(u.name)&&A_e(t,r,a,u,$j(u.name,h,g),h,p)}function zHt(t,r,a,u,h,p,g,C){if(!ot(u.name))return;const b=JHt(h,a,p,C);if(j.assert(h.parameters.length===b.length,"Parameter count and inference count should match"),nr(h))hlt(t,a,b,p,g);else{const T=xl(h)&&!Uc(h,21,a);T&&t.insertNodeBefore(a,ya(h.parameters),G.createToken(21));for(const{declaration:E,type:N}of b)E&&!E.type&&!E.initializer&&A_e(t,r,a,E,N,p,g);T&&t.insertNodeAfter(a,va(h.parameters),G.createToken(22))}}function UHt(t,r,a,u,h,p){const g=_lt(a,r,u,p);if(!g||!g.length)return;const C=H3e(u,g,p).thisParameter(),b=p5(C,a,u,h);b&&(nr(a)?qHt(t,r,a,b):t.tryInsertThisTypeAnnotation(r,a,b))}function qHt(t,r,a,u){t.addJSDocTags(r,a,[G.createJSDocThisTag(void 0,G.createJSDocTypeExpression(u))])}function flt(t,r,a,u,h,p,g){const C=Ra(u.parameters);if(C&&ot(u.name)&&ot(C.name)){let b=$j(u.name,h,g);b===h.getTypeChecker().getAnyType()&&(b=$j(C.name,h,g)),nr(u)?hlt(t,a,[{declaration:C,type:b}],h,p):A_e(t,r,a,C,b,h,p)}}function A_e(t,r,a,u,h,p,g){const C=p5(h,u,p,g);if(C)if(nr(a)&&u.kind!==171){const b=_s(u)?Jr(u.parent.parent,Lu):u;if(!b)return;const T=G.createJSDocTypeExpression(C),E=um(u)?G.createJSDocReturnTag(void 0,T,void 0):G.createJSDocTypeTag(void 0,T,void 0);t.addJSDocTags(a,b,[E])}else $Ht(C,u,a,t,r,Ja(p.getCompilerOptions()))||t.tryInsertTypeAnnotation(a,u,C)}function $Ht(t,r,a,u,h,p){const g=TD(t,p);return g&&u.tryInsertTypeAnnotation(a,r,g.typeNode)?(O(g.symbols,C=>h.addImportFromExportedSymbol(C,!0)),!0):!1}function hlt(t,r,a,u,h){const p=a.length&&a[0].declaration.parent;if(!p)return;const g=es(a,C=>{const b=C.declaration;if(b.initializer||Bk(b)||!ot(b.name))return;const T=C.type&&p5(C.type,b,u,h);if(T){const E=G.cloneNode(b.name);return tr(E,7168),{name:G.cloneNode(b.name),param:b,isOptional:!!C.isOptional,typeNode:T}}});if(g.length)if(xl(p)||ml(p)){const C=xl(p)&&!Uc(p,21,r);C&&t.insertNodeBefore(r,ya(p.parameters),G.createToken(21)),O(g,({typeNode:b,param:T})=>{const E=G.createJSDocTypeTag(void 0,G.createJSDocTypeExpression(b)),N=G.createJSDocComment(void 0,[E]);t.insertNodeAt(r,T.getStart(r),N,{suffix:" "})}),C&&t.insertNodeAfter(r,va(p.parameters),G.createToken(22))}else{const C=qt(g,({name:b,typeNode:T,isOptional:E})=>G.createJSDocParameterTag(void 0,b,!!E,G.createJSDocTypeExpression(T),!1,void 0));t.addJSDocTags(r,p,C)}}function V3e(t,r,a){return es(kl.getReferenceEntriesForNode(-1,t,r,r.getSourceFiles(),a),u=>u.kind!==kl.EntryKind.Span?Jr(u.node,ot):void 0)}function $j(t,r,a){const u=V3e(t,r,a);return H3e(r,u,a).single()}function JHt(t,r,a,u){const h=_lt(t,r,a,u);return h&&H3e(a,h,u).parameters(t)||t.parameters.map(p=>({declaration:p,type:ot(p.name)?$j(p.name,a,u):a.getTypeChecker().getAnyType()}))}function _lt(t,r,a,u){let h;switch(t.kind){case 176:h=Uc(t,137,r);break;case 219:case 218:const p=t.parent;h=(_s(p)||Lo(p))&&ot(p.name)?p.name:t.name;break;case 262:case 174:case 173:h=t.name;break}if(h)return V3e(h,a,u)}function H3e(t,r,a){const u=t.getTypeChecker(),h={string:()=>u.getStringType(),number:()=>u.getNumberType(),Array:We=>u.createArrayType(We),Promise:We=>u.createPromiseType(We)},p=[u.getStringType(),u.getNumberType(),u.createArrayType(u.getAnyType()),u.createPromiseType(u.getAnyType())];return{single:b,parameters:T,thisParameter:E};function g(){return{isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0}}function C(We){const ze=new Map;for(const $e of We)$e.properties&&$e.properties.forEach((et,Me)=>{ze.has(Me)||ze.set(Me,[]),ze.get(Me).push(et)});const Nt=new Map;return ze.forEach(($e,et)=>{Nt.set(et,C($e))}),{isNumber:We.some($e=>$e.isNumber),isString:We.some($e=>$e.isString),isNumberOrString:We.some($e=>$e.isNumberOrString),candidateTypes:Rr(We,$e=>$e.candidateTypes),properties:Nt,calls:Rr(We,$e=>$e.calls),constructs:Rr(We,$e=>$e.constructs),numberIndex:O(We,$e=>$e.numberIndex),stringIndex:O(We,$e=>$e.stringIndex),candidateThisTypes:Rr(We,$e=>$e.candidateThisTypes),inferredTypes:void 0}}function b(){return Ie(N(r))}function T(We){if(r.length===0||!We.parameters)return;const ze=g();for(const $e of r)a.throwIfCancellationRequested(),R($e,ze);const Nt=[...ze.constructs||[],...ze.calls||[]];return We.parameters.map(($e,et)=>{const Me=[],ut=Oy($e);let wt=!1;for(const dt of Nt)if(dt.argumentTypes.length<=et)wt=nr(We),Me.push(u.getUndefinedType());else if(ut)for(let zt=et;zt<dt.argumentTypes.length;zt++)Me.push(u.getBaseTypeOfLiteralType(dt.argumentTypes[zt]));else Me.push(u.getBaseTypeOfLiteralType(dt.argumentTypes[et]));if(ot($e.name)){const dt=N(V3e($e.name,t,a));Me.push(...ut?es(dt,u.getElementTypeOfArrayType):dt)}const Et=Ie(Me);return{type:ut?u.createArrayType(Et):Et,isOptional:wt&&!ut,declaration:$e}})}function E(){const We=g();for(const ze of r)a.throwIfCancellationRequested(),R(ze,We);return Ie(We.candidateThisTypes||w)}function N(We){const ze=g();for(const Nt of We)a.throwIfCancellationRequested(),R(Nt,ze);return he(ze)}function R(We,ze){for(;q8(We);)We=We.parent;switch(We.parent.kind){case 244:H(We,ze);break;case 225:ze.isNumber=!0;break;case 224:U(We.parent,ze);break;case 226:q(We,We.parent,ze);break;case 296:case 297:X(We.parent,ze);break;case 213:case 214:We.parent.expression===We?Z(We.parent,ze):F(We,ze);break;case 211:Q(We.parent,ze);break;case 212:re(We.parent,We,ze);break;case 303:case 304:oe(We.parent,ze);break;case 172:pe(We.parent,ze);break;case 260:{const{name:Nt,initializer:$e}=We.parent;if(We===Nt){$e&&He(ze,u.getTypeAtLocation($e));break}}default:return F(We,ze)}}function F(We,ze){F0(We)&&He(ze,u.getContextualType(We))}function H(We,ze){He(ze,la(We)?u.getVoidType():u.getAnyType())}function U(We,ze){switch(We.operator){case 46:case 47:case 41:case 55:ze.isNumber=!0;break;case 40:ze.isNumberOrString=!0;break}}function q(We,ze,Nt){switch(ze.operatorToken.kind){case 43:case 42:case 44:case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 66:case 68:case 67:case 69:case 70:case 74:case 75:case 79:case 71:case 73:case 72:case 41:case 30:case 33:case 32:case 34:const $e=u.getTypeAtLocation(ze.left===We?ze.right:ze.left);$e.flags&1056?He(Nt,$e):Nt.isNumber=!0;break;case 65:case 40:const et=u.getTypeAtLocation(ze.left===We?ze.right:ze.left);et.flags&1056?He(Nt,et):et.flags&296?Nt.isNumber=!0:et.flags&402653316?Nt.isString=!0:et.flags&1||(Nt.isNumberOrString=!0);break;case 64:case 35:case 37:case 38:case 36:case 77:case 78:case 76:He(Nt,u.getTypeAtLocation(ze.left===We?ze.right:ze.left));break;case 103:We===ze.left&&(Nt.isString=!0);break;case 57:case 61:We===ze.left&&(We.parent.parent.kind===260||lf(We.parent.parent,!0))&&He(Nt,u.getTypeAtLocation(ze.right));break}}function X(We,ze){He(ze,u.getTypeAtLocation(We.parent.parent.expression))}function Z(We,ze){const Nt={argumentTypes:[],return_:g()};if(We.arguments)for(const $e of We.arguments)Nt.argumentTypes.push(u.getTypeAtLocation($e));R(We,Nt.return_),We.kind===213?(ze.calls||(ze.calls=[])).push(Nt):(ze.constructs||(ze.constructs=[])).push(Nt)}function Q(We,ze){const Nt=cu(We.name.text);ze.properties||(ze.properties=new Map);const $e=ze.properties.get(Nt)||g();R(We,$e),ze.properties.set(Nt,$e)}function re(We,ze,Nt){if(ze===We.argumentExpression){Nt.isNumberOrString=!0;return}else{const $e=u.getTypeAtLocation(We.argumentExpression),et=g();R(We,et),$e.flags&296?Nt.numberIndex=et:Nt.stringIndex=et}}function oe(We,ze){const Nt=_s(We.parent.parent)?We.parent.parent:We.parent;Pe(ze,u.getTypeAtLocation(Nt))}function pe(We,ze){Pe(ze,u.getTypeAtLocation(We.parent))}function de(We,ze){const Nt=[];for(const $e of We)for(const{high:et,low:Me}of ze)et($e)&&(j.assert(!Me($e),"Priority can't have both low and high"),Nt.push(Me));return We.filter($e=>Nt.every(et=>!et($e)))}function ue(We){return Ie(he(We))}function Ie(We){if(!We.length)return u.getAnyType();const ze=u.getUnionType([u.getStringType(),u.getNumberType()]);let $e=de(We,[{high:Me=>Me===u.getStringType()||Me===u.getNumberType(),low:Me=>Me===ze},{high:Me=>!(Me.flags&16385),low:Me=>!!(Me.flags&16385)},{high:Me=>!(Me.flags&114689)&&!(Or(Me)&16),low:Me=>!!(Or(Me)&16)}]);const et=$e.filter(Me=>Or(Me)&16);return et.length&&($e=$e.filter(Me=>!(Or(Me)&16)),$e.push(we(et))),u.getWidenedType(u.getUnionType($e.map(u.getBaseTypeOfLiteralType),2))}function we(We){if(We.length===1)return We[0];const ze=[],Nt=[],$e=[],et=[];let Me=!1,ut=!1;const wt=Of();for(const zt of We){for(const xn of u.getPropertiesOfType(zt))wt.add(xn.escapedName,xn.valueDeclaration?u.getTypeOfSymbolAtLocation(xn,xn.valueDeclaration):u.getAnyType());ze.push(...u.getSignaturesOfType(zt,0)),Nt.push(...u.getSignaturesOfType(zt,1));const Ei=u.getIndexInfoOfType(zt,0);Ei&&($e.push(Ei.type),Me=Me||Ei.isReadonly);const tn=u.getIndexInfoOfType(zt,1);tn&&(et.push(tn.type),ut=ut||tn.isReadonly)}const Et=Nv(wt,(zt,Ei)=>{const tn=Ei.length<We.length?16777216:0,xn=u.createSymbol(4|tn,zt);return xn.links.type=u.getUnionType(Ei),[zt,xn]}),dt=[];return $e.length&&dt.push(u.createIndexInfo(u.getStringType(),u.getUnionType($e),Me)),et.length&&dt.push(u.createIndexInfo(u.getNumberType(),u.getUnionType(et),ut)),u.createAnonymousType(We[0].symbol,Et,ze,Nt,dt)}function he(We){var ze,Nt,$e;const et=[];We.isNumber&&et.push(u.getNumberType()),We.isString&&et.push(u.getStringType()),We.isNumberOrString&&et.push(u.getUnionType([u.getStringType(),u.getNumberType()])),We.numberIndex&&et.push(u.createArrayType(ue(We.numberIndex))),((ze=We.properties)!=null&&ze.size||(Nt=We.constructs)!=null&&Nt.length||We.stringIndex)&&et.push(Ae(We));const Me=(We.candidateTypes||[]).map(wt=>u.getBaseTypeOfLiteralType(wt)),ut=($e=We.calls)!=null&&$e.length?Ae(We):void 0;return ut&&Me?et.push(u.getUnionType([ut,...Me],2)):(ut&&et.push(ut),P(Me)&&et.push(...Me)),et.push(...ke(We)),et}function Ae(We){const ze=new Map;We.properties&&We.properties.forEach((Me,ut)=>{const wt=u.createSymbol(4,ut);wt.links.type=ue(Me),ze.set(ut,wt)});const Nt=We.calls?[Oe(We.calls)]:[],$e=We.constructs?[Oe(We.constructs)]:[],et=We.stringIndex?[u.createIndexInfo(u.getStringType(),ue(We.stringIndex),!1)]:[];return u.createAnonymousType(void 0,ze,Nt,$e,et)}function ke(We){if(!We.properties||!We.properties.size)return[];const ze=p.filter(Nt=>Te(Nt,We));return 0<ze.length&&ze.length<3?ze.map(Nt=>De(Nt,We)):[]}function Te(We,ze){return ze.properties?!cf(ze.properties,(Nt,$e)=>{const et=u.getTypeOfPropertyOfType(We,$e);return et?Nt.calls?!u.getSignaturesOfType(et,0).length||!u.isTypeAssignableTo(et,Ne(Nt.calls)):!u.isTypeAssignableTo(et,ue(Nt)):!0}):!1}function De(We,ze){if(!(Or(We)&4)||!ze.properties)return We;const Nt=We.target,$e=Bm(Nt.typeParameters);if(!$e)return We;const et=[];return ze.properties.forEach((Me,ut)=>{const wt=u.getTypeOfPropertyOfType(Nt,ut);j.assert(!!wt,"generic should have all the properties of its reference."),et.push(...qe(wt,ue(Me),$e))}),h[We.symbol.escapedName](Ie(et))}function qe(We,ze,Nt){if(We===Nt)return[ze];if(We.flags&3145728)return Rr(We.types,Me=>qe(Me,ze,Nt));if(Or(We)&4&&Or(ze)&4){const Me=u.getTypeArguments(We),ut=u.getTypeArguments(ze),wt=[];if(Me&&ut)for(let Et=0;Et<Me.length;Et++)ut[Et]&&wt.push(...qe(Me[Et],ut[Et],Nt));return wt}const $e=u.getSignaturesOfType(We,0),et=u.getSignaturesOfType(ze,0);return $e.length===1&&et.length===1?se($e[0],et[0],Nt):[]}function se(We,ze,Nt){var $e;const et=[];for(let wt=0;wt<We.parameters.length;wt++){const Et=We.parameters[wt],dt=ze.parameters[wt],zt=We.declaration&&Oy(We.declaration.parameters[wt]);if(!dt)break;let Ei=Et.valueDeclaration?u.getTypeOfSymbolAtLocation(Et,Et.valueDeclaration):u.getAnyType();const tn=zt&&u.getElementTypeOfArrayType(Ei);tn&&(Ei=tn);const xn=(($e=Jr(dt,Rv))==null?void 0:$e.links.type)||(dt.valueDeclaration?u.getTypeOfSymbolAtLocation(dt,dt.valueDeclaration):u.getAnyType());et.push(...qe(Ei,xn,Nt))}const Me=u.getReturnTypeOfSignature(We),ut=u.getReturnTypeOfSignature(ze);return et.push(...qe(Me,ut,Nt)),et}function Ne(We){return u.createAnonymousType(void 0,_a(),[Oe(We)],w,w)}function Oe(We){const ze=[],Nt=Math.max(...We.map(et=>et.argumentTypes.length));for(let et=0;et<Nt;et++){const Me=u.createSymbol(1,cu(`arg${et}`));Me.links.type=Ie(We.map(ut=>ut.argumentTypes[et]||u.getUndefinedType())),We.some(ut=>ut.argumentTypes[et]===void 0)&&(Me.flags|=16777216),ze.push(Me)}const $e=ue(C(We.map(et=>et.return_)));return u.createSignature(void 0,void 0,void 0,ze,$e,void 0,Nt,0)}function He(We,ze){ze&&!(ze.flags&1)&&!(ze.flags&131072)&&(We.candidateTypes||(We.candidateTypes=[])).push(ze)}function Pe(We,ze){ze&&!(ze.flags&1)&&!(ze.flags&131072)&&(We.candidateThisTypes||(We.candidateThisTypes=[])).push(ze)}}var j3e="fixReturnTypeInAsyncFunction",plt=[k.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0.code];Na({errorCodes:plt,fixIds:[j3e],getCodeActions:function(r){const{sourceFile:a,program:u,span:h}=r,p=u.getTypeChecker(),g=mlt(a,u.getTypeChecker(),h.start);if(!g)return;const{returnTypeNode:C,returnType:b,promisedTypeNode:T,promisedType:E}=g,N=er.ChangeTracker.with(r,R=>glt(R,a,C,T));return[ua(j3e,N,[k.Replace_0_with_Promise_1,p.typeToString(b),p.typeToString(E)],j3e,k.Fix_all_incorrect_return_type_of_an_async_functions)]},getAllCodeActions:t=>qc(t,plt,(r,a)=>{const u=mlt(a.file,t.program.getTypeChecker(),a.start);u&&glt(r,a.file,u.returnTypeNode,u.promisedTypeNode)})});function mlt(t,r,a){if(nr(t))return;const u=Rs(t,a),h=Qi(u,Qc),p=h==null?void 0:h.type;if(!p)return;const g=r.getTypeFromTypeNode(p),C=r.getAwaitedType(g)||r.getVoidType(),b=r.typeToTypeNode(C,p,void 0);if(b)return{returnTypeNode:p,returnType:g,promisedTypeNode:b,promisedType:C}}function glt(t,r,a,u){t.replaceNode(r,a,G.createTypeReferenceNode("Promise",[u]))}var ylt="disableJsDiagnostics",vlt="disableJsDiagnostics",blt=es(Object.keys(k),t=>{const r=k[t];return r.category===1?r.code:void 0});Na({errorCodes:blt,getCodeActions:function(r){const{sourceFile:a,program:u,span:h,host:p,formatContext:g}=r;if(!nr(a)||!n7(a,u.getCompilerOptions()))return;const C=a.checkJsDirective?"":rC(p,g.options),b=[G0(ylt,[fst(a.fileName,[mj(a.checkJsDirective?Fu(a.checkJsDirective.pos,a.checkJsDirective.end):Ff(0,0),`// @ts-nocheck${C}`)])],k.Disable_checking_for_this_file)];return er.isValidLocationToAddComment(a,h.start)&&b.unshift(ua(ylt,er.ChangeTracker.with(r,T=>Clt(T,a,h.start)),k.Ignore_this_error_message,vlt,k.Add_ts_ignore_to_all_error_messages)),b},fixIds:[vlt],getAllCodeActions:t=>{const r=new Set;return qc(t,blt,(a,u)=>{er.isValidLocationToAddComment(u.file,u.start)&&Clt(a,u.file,u.start,r)})}});function Clt(t,r,a,u){const{line:h}=Ia(r,a);(!u||of(u,h))&&t.insertCommentBeforeLine(r,h,a," @ts-ignore")}function z3e(t,r,a,u,h,p,g){const C=t.symbol.members;for(const b of r)C.has(b.escapedName)||wlt(b,t,a,u,h,p,g,void 0)}function lO(t){return{trackSymbol:()=>!1,moduleResolverHost:Ufe(t.program,t.host)}}var Slt=(t=>(t[t.Method=1]="Method",t[t.Property=2]="Property",t[t.All=3]="All",t))(Slt||{});function wlt(t,r,a,u,h,p,g,C,b=3,T=!1){const E=t.getDeclarations(),N=Ra(E),R=u.program.getTypeChecker(),F=Ja(u.program.getCompilerOptions()),H=(N==null?void 0:N.kind)??171,U=ke(t,N),q=N?jh(N):0;let X=q&256;X|=q&1?1:q&4?4:0,N&&I_(N)&&(X|=512);const Z=ue(),Q=R.getWidenedType(R.getTypeOfSymbolAtLocation(t,r)),re=!!(t.flags&16777216),oe=!!(r.flags&33554432)||T,pe=$p(a,h);switch(H){case 171:case 172:let Te=1;Te|=pe===0?268435456:0;let De=R.typeToTypeNode(Q,r,Te,8,lO(u));if(p){const se=TD(De,F);se&&(De=se.typeNode,JI(p,se.symbols))}g(G.createPropertyDeclaration(Z,N?we(U):t.getName(),re&&b&2?G.createToken(58):void 0,De,void 0));break;case 177:case 178:{j.assertIsDefined(E);let se=R.typeToTypeNode(Q,r,void 0,void 0,lO(u));const Ne=nx(E,N),Oe=Ne.secondAccessor?[Ne.firstAccessor,Ne.secondAccessor]:[Ne.firstAccessor];if(p){const He=TD(se,F);He&&(se=He.typeNode,JI(p,He.symbols))}for(const He of Oe)if(um(He))g(G.createGetAccessorDeclaration(Z,we(U),w,Ae(se),he(C,pe,oe)));else{j.assertNode(He,kp,"The counterpart to a getter should be a setter");const Pe=a3(He),We=Pe&&ot(Pe.name)?Fr(Pe.name):void 0;g(G.createSetAccessorDeclaration(Z,we(U),q3e(1,[We],[Ae(se)],1,!1),he(C,pe,oe)))}break}case 173:case 174:j.assertIsDefined(E);const qe=Q.isUnion()?Rr(Q.types,se=>se.getCallSignatures()):Q.getCallSignatures();if(!Ft(qe))break;if(E.length===1){j.assert(qe.length===1,"One declaration implies one signature");const se=qe[0];de(pe,se,Z,we(U),he(C,pe,oe));break}for(const se of qe)se.declaration&&se.declaration.flags&33554432||de(pe,se,Z,we(U));if(!oe)if(E.length>qe.length){const se=R.getSignatureFromDeclaration(E[E.length-1]);de(pe,se,Z,we(U),he(C,pe))}else j.assert(E.length===qe.length,"Declarations and signatures should match count"),g(QHt(R,u,r,qe,we(U),re&&!!(b&1),Z,pe,C));break}function de(Te,De,qe,se,Ne){const Oe=O_e(174,u,Te,De,Ne,se,qe,re&&!!(b&1),r,p);Oe&&g(Oe)}function ue(){let Te;return X&&(Te=rS(Te,G.createModifiersFromModifierFlags(X))),Ie()&&(Te=fn(Te,G.createToken(164))),Te&&G.createNodeArray(Te)}function Ie(){return!!(u.program.getCompilerOptions().noImplicitOverride&&N&&KT(N))}function we(Te){return ot(Te)&&Te.escapedText==="constructor"?G.createComputedPropertyName(G.createStringLiteral(Fr(Te),pe===0)):Ec(Te,!1)}function he(Te,De,qe){return qe?void 0:Ec(Te,!1)||$3e(De)}function Ae(Te){return Ec(Te,!1)}function ke(Te,De){if(Iu(Te)&262144){const qe=Te.links.nameType;if(qe&&Jm(qe))return G.createIdentifier(Ws(Gm(qe)))}return Ec(No(De),!1)}}function O_e(t,r,a,u,h,p,g,C,b,T){const E=r.program,N=E.getTypeChecker(),R=Ja(E.getCompilerOptions()),F=nr(b),H=524545|(a===0?268435456:0),U=N.signatureToSignatureDeclaration(u,t,b,H,8,lO(r));if(!U)return;let q=F?void 0:U.typeParameters,X=U.parameters,Z=F?void 0:Ec(U.type);if(T){if(q){const pe=Wr(q,de=>{let ue=de.constraint,Ie=de.default;if(ue){const we=TD(ue,R);we&&(ue=we.typeNode,JI(T,we.symbols))}if(Ie){const we=TD(Ie,R);we&&(Ie=we.typeNode,JI(T,we.symbols))}return G.updateTypeParameterDeclaration(de,de.modifiers,de.name,ue,Ie)});q!==pe&&(q=Ht(G.createNodeArray(pe,q.hasTrailingComma),q))}const oe=Wr(X,pe=>{let de=F?void 0:pe.type;if(de){const ue=TD(de,R);ue&&(de=ue.typeNode,JI(T,ue.symbols))}return G.updateParameterDeclaration(pe,pe.modifiers,pe.dotDotDotToken,pe.name,F?void 0:pe.questionToken,de,pe.initializer)});if(X!==oe&&(X=Ht(G.createNodeArray(oe,X.hasTrailingComma),X)),Z){const pe=TD(Z,R);pe&&(Z=pe.typeNode,JI(T,pe.symbols))}}const Q=C?G.createToken(58):void 0,re=U.asteriskToken;if(ml(U))return G.updateFunctionExpression(U,g,U.asteriskToken,Jr(p,ot),q,X,Z,h??U.body);if(xl(U))return G.updateArrowFunction(U,g,q,X,Z,U.equalsGreaterThanToken,h??U.body);if(Nu(U))return G.updateMethodDeclaration(U,g,re,p??G.createIdentifier(""),Q,q,X,Z,h);if(Wu(U))return G.updateFunctionDeclaration(U,g,U.asteriskToken,Jr(p,ot),q,X,Z,h??U.body)}function U3e(t,r,a,u,h,p,g){const C=$p(r.sourceFile,r.preferences),b=Ja(r.program.getCompilerOptions()),T=lO(r),E=r.program.getTypeChecker(),N=nr(g),{typeArguments:R,arguments:F,parent:H}=u,U=N?void 0:E.getContextualType(u),q=qt(F,Ie=>ot(Ie)?Ie.text:Nr(Ie)&&ot(Ie.name)?Ie.name.text:void 0),X=N?[]:qt(F,Ie=>E.getTypeAtLocation(Ie)),{argumentTypeNodes:Z,argumentTypeParameters:Q}=KHt(E,a,X,g,b,1,8,T),re=p?G.createNodeArray(G.createModifiersFromModifierFlags(p)):void 0,oe=SX(H)?G.createToken(42):void 0,pe=N?void 0:GHt(E,Q,R),de=q3e(F.length,q,Z,void 0,N),ue=N||U===void 0?void 0:E.typeToTypeNode(U,g,void 0,void 0,T);switch(t){case 174:return G.createMethodDeclaration(re,oe,h,void 0,pe,de,ue,$3e(C));case 173:return G.createMethodSignature(re,h,void 0,pe,de,ue===void 0?G.createKeywordTypeNode(159):ue);case 262:return j.assert(typeof h=="string"||ot(h),"Unexpected name"),G.createFunctionDeclaration(re,oe,h,pe,de,ue,SY(k.Function_not_implemented.message,C));default:j.fail("Unexpected kind")}}function GHt(t,r,a){const u=new Set(r.map(p=>p[0])),h=new Map(r);if(a){const p=a.filter(C=>!r.some(b=>{var T;return t.getTypeAtLocation(C)===((T=b[1])==null?void 0:T.argumentType)})),g=u.size+p.length;for(let C=0;u.size<g;C+=1)u.add(xlt(C))}return as(u.values(),p=>{var g;return G.createTypeParameterDeclaration(void 0,p,(g=h.get(p))==null?void 0:g.constraint)})}function xlt(t){return 84+t<=90?String.fromCharCode(84+t):`T${t}`}function CY(t,r,a,u,h,p,g,C){let b=t.typeToTypeNode(a,u,p,g,C);if(b&&V1(b)){const T=TD(b,h);T&&(JI(r,T.symbols),b=T.typeNode)}return Ec(b)}function klt(t,r,a,u,h,p,g,C){let b=t.typePredicateToTypePredicateNode(a,u,p,g,C);if(b!=null&&b.type&&V1(b.type)){const T=TD(b.type,h);T&&(JI(r,T.symbols),b=G.updateTypePredicateNode(b,b.assertsModifier,b.parameterName,T.typeNode))}return Ec(b)}function Tlt(t){return t.isUnionOrIntersection()?t.types.some(Tlt):t.flags&262144}function KHt(t,r,a,u,h,p,g,C){const b=[],T=new Map;for(let E=0;E<a.length;E+=1){const N=a[E];if(N.isUnionOrIntersection()&&N.types.some(Tlt)){const q=xlt(E);b.push(G.createTypeReferenceNode(q)),T.set(q,void 0);continue}const R=t.getBaseTypeOfLiteralType(N),F=CY(t,r,R,u,h,p,g,C);if(!F)continue;b.push(F);const H=Dlt(N),U=N.isTypeParameter()&&N.constraint&&!XHt(N.constraint)?CY(t,r,N.constraint,u,h,p,g,C):void 0;H&&T.set(H,{argumentType:N,constraint:U})}return{argumentTypeNodes:b,argumentTypeParameters:as(T.entries())}}function XHt(t){return t.flags&524288&&t.objectFlags===16}function Dlt(t){var r;if(t.flags&3145728)for(const a of t.types){const u=Dlt(a);if(u)return u}return t.flags&262144?(r=t.getSymbol())==null?void 0:r.getName():void 0}function q3e(t,r,a,u,h){const p=[],g=new Map;for(let C=0;C<t;C++){const b=(r==null?void 0:r[C])||`arg${C}`,T=g.get(b);g.set(b,(T||0)+1);const E=G.createParameterDeclaration(void 0,void 0,b+(T||""),u!==void 0&&C>=u?G.createToken(58):void 0,h?void 0:(a==null?void 0:a[C])||G.createKeywordTypeNode(159),void 0);p.push(E)}return p}function QHt(t,r,a,u,h,p,g,C,b){let T=u[0],E=u[0].minArgumentCount,N=!1;for(const U of u)E=Math.min(U.minArgumentCount,E),Ch(U)&&(N=!0),U.parameters.length>=T.parameters.length&&(!Ch(U)||Ch(T))&&(T=U);const R=T.parameters.length-(Ch(T)?1:0),F=T.parameters.map(U=>U.name),H=q3e(R,F,void 0,E,!1);if(N){const U=G.createParameterDeclaration(void 0,G.createToken(26),F[R]||"rest",R>=E?G.createToken(58):void 0,G.createArrayTypeNode(G.createKeywordTypeNode(159)),void 0);H.push(U)}return YHt(g,h,p,void 0,H,ZHt(u,t,r,a),C,b)}function ZHt(t,r,a,u){if(P(t)){const h=r.getUnionType(qt(t,r.getReturnTypeOfSignature));return r.typeToTypeNode(h,u,1,8,lO(a))}}function YHt(t,r,a,u,h,p,g,C){return G.createMethodDeclaration(t,void 0,r,a?G.createToken(58):void 0,u,h,p,C||$3e(g))}function $3e(t){return SY(k.Method_not_implemented.message,t)}function SY(t,r){return G.createBlock([G.createThrowStatement(G.createNewExpression(G.createIdentifier("Error"),void 0,[G.createStringLiteral(t,r===0)]))],!0)}function J3e(t,r,a){const u=I8(r);if(!u)return;const h=Elt(u,"compilerOptions");if(h===void 0){t.insertNodeAtObjectStart(r,u,K3e("compilerOptions",G.createObjectLiteralExpression(a.map(([g,C])=>K3e(g,C)),!0)));return}const p=h.initializer;if(Aa(p))for(const[g,C]of a){const b=Elt(p,g);b===void 0?t.insertNodeAtObjectStart(r,p,K3e(g,C)):t.replaceNode(r,b.initializer,C)}}function G3e(t,r,a,u){J3e(t,r,[[a,u]])}function K3e(t,r){return G.createPropertyAssignment(G.createStringLiteral(t),r)}function Elt(t,r){return Fe(t.properties,a=>_d(a)&&!!a.name&&Ha(a.name)&&a.name.text===r)}function TD(t,r){let a;const u=bt(t,h,ws);if(a&&u)return{typeNode:u,symbols:a};function h(p){if(lS(p)&&p.qualifier){const g=K_(p.qualifier);if(!g.symbol)return dn(p,h,void 0);const C=zZ(g.symbol,r),b=C!==g.text?Ilt(p.qualifier,G.createIdentifier(C)):p.qualifier;a=fn(a,g.symbol);const T=Dn(p.typeArguments,h,ws);return G.createTypeReferenceNode(b,T)}return dn(p,h,void 0)}}function Ilt(t,r){return t.kind===80?r:G.createQualifiedName(Ilt(t.left,r),t.right)}function JI(t,r){r.forEach(a=>t.addImportFromExportedSymbol(a,!0))}function X3e(t,r){const a=au(r);let u=Rs(t,r.start);for(;u.end<a;)u=u.parent;return u}function Nlt(t,r,a,u,h,p){const g=Alt(t,r,a,u);if(!g||pA.isRefactorErrorInfo(g))return;const C=er.ChangeTracker.fromContext(h),{isStatic:b,isReadonly:T,fieldName:E,accessorName:N,originalName:R,type:F,container:H,declaration:U}=g;Lp(E),Lp(N),Lp(U),Lp(H);let q,X;if(ss(H)){const Q=jh(U);if(r_(t)){const re=G.createModifiersFromModifierFlags(Q);q=re,X=re}else q=G.createModifiersFromModifierFlags(ijt(Q)),X=G.createModifiersFromModifierFlags(njt(Q));uD(U)&&(X=Js($w(U),X))}cjt(C,t,U,F,E,X);const Z=rjt(E,N,F,q,b,H);if(Lp(Z),Olt(C,t,Z,U,H),T){const Q=Vv(H);Q&&ljt(C,t,Q,E.text,R)}else{const Q=sjt(E,N,F,q,b,H);Lp(Q),Olt(C,t,Q,U,H)}return C.getChanges()}function ejt(t){return ot(t)||Ha(t)}function tjt(t){return vp(t,t.parent)||Lo(t)||_d(t)}function Llt(t,r){return ot(r)?G.createIdentifier(t):G.createStringLiteral(t)}function Plt(t,r,a){const u=r?a.name:G.createThis();return ot(t)?G.createPropertyAccessExpression(u,t):G.createElementAccessExpression(u,G.createStringLiteralFromNode(t))}function ijt(t){return t&=-9,t&=-3,t&4||(t|=1),t}function njt(t){return t&=-2,t&=-5,t|=2,t}function Alt(t,r,a,u,h=!0){const p=Rs(t,a),g=a===u&&h,C=Qi(p.parent,tjt),b=271;if(!C||!(gZ(C.name,t,a,u)||g))return{error:Bo(k.Could_not_find_property_for_which_to_generate_accessor)};if(!ejt(C.name))return{error:Bo(k.Name_is_not_valid)};if((jh(C)&98303|b)!==b)return{error:Bo(k.Can_only_convert_property_with_modifier)};const T=C.name.text,E=ghe(T),N=Llt(E?T:$I(`_${T}`,t),C.name),R=Llt(E?$I(T.substring(1),t):T,C.name);return{isStatic:bd(C),isReadonly:z8(C),type:ujt(C,r),container:C.kind===169?C.parent.parent:C.parent,originalName:C.name.text,declaration:C,fieldName:N,accessorName:R,renameAccessor:E}}function rjt(t,r,a,u,h,p){return G.createGetAccessorDeclaration(u,r,[],a,G.createBlock([G.createReturnStatement(Plt(t,h,p))],!0))}function sjt(t,r,a,u,h,p){return G.createSetAccessorDeclaration(u,r,[G.createParameterDeclaration(void 0,void 0,G.createIdentifier("value"),void 0,a)],G.createBlock([G.createExpressionStatement(G.createAssignment(Plt(t,h,p),G.createIdentifier("value")))],!0))}function ojt(t,r,a,u,h,p){const g=G.updatePropertyDeclaration(a,p,h,a.questionToken||a.exclamationToken,u,a.initializer);t.replaceNode(r,a,g)}function ajt(t,r,a,u){let h=G.updatePropertyAssignment(a,u,a.initializer);(h.modifiers||h.questionToken||h.exclamationToken)&&(h===a&&(h=G.cloneNode(h)),h.modifiers=void 0,h.questionToken=void 0,h.exclamationToken=void 0),t.replacePropertyAssignment(r,a,h)}function cjt(t,r,a,u,h,p){Lo(a)?ojt(t,r,a,u,h,p):_d(a)?ajt(t,r,a,h):t.replaceNode(r,a,G.updateParameterDeclaration(a,p,a.dotDotDotToken,ha(h,ot),a.questionToken,a.type,a.initializer))}function Olt(t,r,a,u,h){vp(u,u.parent)?t.insertMemberAtStart(r,h,a):_d(u)?t.insertNodeAfterComma(r,u,a):t.insertNodeAfter(r,u,a)}function ljt(t,r,a,u,h){a.body&&a.body.forEachChild(function p(g){wl(g)&&g.expression.kind===110&&Ha(g.argumentExpression)&&g.argumentExpression.text===h&&wP(g)&&t.replaceNode(r,g.argumentExpression,G.createStringLiteral(u)),Nr(g)&&g.expression.kind===110&&g.name.text===h&&wP(g)&&t.replaceNode(r,g.name,G.createIdentifier(u)),!Ho(g)&&!ss(g)&&g.forEachChild(p)})}function ujt(t,r){const a=ZTe(t);if(Lo(t)&&a&&t.questionToken){const u=r.getTypeChecker(),h=u.getTypeFromTypeNode(a);if(!u.isTypeAssignableTo(u.getUndefinedType(),h)){const p=fx(a)?a.types:[a];return G.createUnionTypeNode([...p,G.createKeywordTypeNode(157)])}}return a}function Q3e(t,r){const a=[];for(;t;){const u=qT(t),h=u&&r.getSymbolAtLocation(u.expression);if(!h)break;const p=h.flags&2097152?r.getAliasedSymbol(h):h,g=p.declarations&&Fe(p.declarations,ss);if(!g)break;a.push(g),t=g}return a}var Mlt="invalidImportSyntax";function djt(t,r){const a=_n(r),u=Y6(r),h=t.program.getCompilerOptions(),p=[];return p.push(Rlt(t,a,r,Sx(u.name,void 0,r.moduleSpecifier,$p(a,t.preferences)))),zh(h)===1&&p.push(Rlt(t,a,r,G.createImportEqualsDeclaration(void 0,!1,u.name,G.createExternalModuleReference(r.moduleSpecifier)))),p}function Rlt(t,r,a,u){const h=er.ChangeTracker.with(t,p=>p.replaceNode(r,a,u));return G0(Mlt,h,[k.Replace_import_with_0,h[0].textChanges[0].newText])}Na({errorCodes:[k.This_expression_is_not_callable.code,k.This_expression_is_not_constructable.code],getCodeActions:fjt});function fjt(t){const r=t.sourceFile,a=k.This_expression_is_not_callable.code===t.errorCode?213:214,u=Qi(Rs(r,t.span.start),p=>p.kind===a);if(!u)return[];const h=u.expression;return Flt(t,h)}Na({errorCodes:[k.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,k.Type_0_does_not_satisfy_the_constraint_1.code,k.Type_0_is_not_assignable_to_type_1.code,k.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated.code,k.Type_predicate_0_is_not_assignable_to_1.code,k.Property_0_of_type_1_is_not_assignable_to_2_index_type_3.code,k._0_index_type_1_is_not_assignable_to_2_index_type_3.code,k.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2.code,k.Property_0_in_type_1_is_not_assignable_to_type_2.code,k.Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property.code,k.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1.code],getCodeActions:hjt});function hjt(t){const r=t.sourceFile,a=Qi(Rs(r,t.span.start),u=>u.getStart()===t.span.start&&u.getEnd()===t.span.start+t.span.length);return a?Flt(t,a):[]}function Flt(t,r){const a=t.program.getTypeChecker().getTypeAtLocation(r);if(!(a.symbol&&Rv(a.symbol)&&a.symbol.links.originatingImport))return[];const u=[],h=a.symbol.links.originatingImport;if(zp(h)||Sr(u,djt(t,h)),jt(r)&&!(Bf(r.parent)&&r.parent.name===r)){const p=t.sourceFile,g=er.ChangeTracker.with(t,C=>C.replaceNode(p,r,G.createPropertyAccessExpression(r,"default"),{}));u.push(G0(Mlt,g,k.Use_synthetic_default_member))}return u}var Z3e="strictClassInitialization",Y3e="addMissingPropertyDefiniteAssignmentAssertions",eOe="addMissingPropertyUndefinedType",tOe="addMissingPropertyInitializer",Blt=[k.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor.code];Na({errorCodes:Blt,getCodeActions:function(r){const a=Wlt(r.sourceFile,r.span.start);if(!a)return;const u=[];return fn(u,pjt(r,a)),fn(u,_jt(r,a)),fn(u,mjt(r,a)),u},fixIds:[Y3e,eOe,tOe],getAllCodeActions:t=>qc(t,Blt,(r,a)=>{const u=Wlt(a.file,a.start);if(u)switch(t.fixId){case Y3e:Vlt(r,a.file,u.prop);break;case eOe:Hlt(r,a.file,u);break;case tOe:const h=t.program.getTypeChecker(),p=zlt(h,u.prop);if(!p)return;jlt(r,a.file,u.prop,p);break;default:j.fail(JSON.stringify(t.fixId))}})});function Wlt(t,r){const a=Rs(t,r);if(ot(a)&&Lo(a.parent)){const u=dd(a.parent);if(u)return{type:u,prop:a.parent,isJs:nr(a.parent)}}}function _jt(t,r){if(r.isJs)return;const a=er.ChangeTracker.with(t,u=>Vlt(u,t.sourceFile,r.prop));return ua(Z3e,a,[k.Add_definite_assignment_assertion_to_property_0,r.prop.getText()],Y3e,k.Add_definite_assignment_assertions_to_all_uninitialized_properties)}function Vlt(t,r,a){Lp(a);const u=G.updatePropertyDeclaration(a,a.modifiers,a.name,G.createToken(54),a.type,a.initializer);t.replaceNode(r,a,u)}function pjt(t,r){const a=er.ChangeTracker.with(t,u=>Hlt(u,t.sourceFile,r));return ua(Z3e,a,[k.Add_undefined_type_to_property_0,r.prop.name.getText()],eOe,k.Add_undefined_type_to_all_uninitialized_properties)}function Hlt(t,r,a){const u=G.createKeywordTypeNode(157),h=fx(a.type)?a.type.types.concat(u):[a.type,u],p=G.createUnionTypeNode(h);a.isJs?t.addJSDocTags(r,a.prop,[G.createJSDocTypeTag(void 0,G.createJSDocTypeExpression(p))]):t.replaceNode(r,a.type,p)}function mjt(t,r){if(r.isJs)return;const a=t.program.getTypeChecker(),u=zlt(a,r.prop);if(!u)return;const h=er.ChangeTracker.with(t,p=>jlt(p,t.sourceFile,r.prop,u));return ua(Z3e,h,[k.Add_initializer_to_property_0,r.prop.name.getText()],tOe,k.Add_initializers_to_all_uninitialized_properties)}function jlt(t,r,a,u){Lp(a);const h=G.updatePropertyDeclaration(a,a.modifiers,a.name,a.questionToken,a.type,u);t.replaceNode(r,a,h)}function zlt(t,r){return Ult(t,t.getTypeFromTypeNode(r.type))}function Ult(t,r){if(r.flags&512)return r===t.getFalseType()||r===t.getFalseType(!0)?G.createFalse():G.createTrue();if(r.isStringLiteral())return G.createStringLiteral(r.value);if(r.isNumberLiteral())return G.createNumericLiteral(r.value);if(r.flags&2048)return G.createBigIntLiteral(r.value);if(r.isUnion())return J(r.types,a=>Ult(t,a));if(r.isClass()){const a=Xb(r.symbol);if(!a||Zr(a,64))return;const u=Vv(a);return u&&u.parameters.length?void 0:G.createNewExpression(G.createIdentifier(r.symbol.name),void 0,void 0)}else if(t.isArrayLikeType(r))return G.createArrayLiteralExpression()}var iOe="requireInTs",qlt=[k.require_call_may_be_converted_to_an_import.code];Na({errorCodes:qlt,getCodeActions(t){const r=Jlt(t.sourceFile,t.program,t.span.start,t.preferences);if(!r)return;const a=er.ChangeTracker.with(t,u=>$lt(u,t.sourceFile,r));return[ua(iOe,a,k.Convert_require_to_import,iOe,k.Convert_all_require_to_import)]},fixIds:[iOe],getAllCodeActions:t=>qc(t,qlt,(r,a)=>{const u=Jlt(a.file,t.program,a.start,t.preferences);u&&$lt(r,t.sourceFile,u)})});function $lt(t,r,a){const{allowSyntheticDefaults:u,defaultImportName:h,namedImports:p,statement:g,moduleSpecifier:C}=a;t.replaceNode(r,g,h&&!u?G.createImportEqualsDeclaration(void 0,!1,h,G.createExternalModuleReference(C)):G.createImportDeclaration(void 0,G.createImportClause(!1,h,p),C,void 0))}function Jlt(t,r,a,u){const{parent:h}=Rs(t,a);L_(h,!0)||j.failBadSyntaxKind(h);const p=ha(h.parent,_s),g=$p(t,u),C=Jr(p.name,ot),b=dm(p.name)?gjt(p.name):void 0;if(C||b){const T=ya(h.arguments);return{allowSyntheticDefaults:EP(r.getCompilerOptions()),defaultImportName:C,namedImports:b,statement:ha(p.parent.parent,Lu),moduleSpecifier:TI(T)?G.createStringLiteral(T.text,g===0):T}}}function gjt(t){const r=[];for(const a of t.elements){if(!ot(a.name)||a.initializer)return;r.push(G.createImportSpecifier(!1,Jr(a.propertyName,ot),a.name))}if(r.length)return G.createNamedImports(r)}var nOe="useDefaultImport",Glt=[k.Import_may_be_converted_to_a_default_import.code];Na({errorCodes:Glt,getCodeActions(t){const{sourceFile:r,span:{start:a}}=t,u=Klt(r,a);if(!u)return;const h=er.ChangeTracker.with(t,p=>Xlt(p,r,u,t.preferences));return[ua(nOe,h,k.Convert_to_default_import,nOe,k.Convert_all_to_default_imports)]},fixIds:[nOe],getAllCodeActions:t=>qc(t,Glt,(r,a)=>{const u=Klt(a.file,a.start);u&&Xlt(r,a.file,u,t.preferences)})});function Klt(t,r){const a=Rs(t,r);if(!ot(a))return;const{parent:u}=a;if(Wd(u)&&eC(u.moduleReference))return{importNode:u,name:a,moduleSpecifier:u.moduleReference.expression};if(Jv(u)&&du(u.parent.parent)){const h=u.parent.parent;return{importNode:h,name:a,moduleSpecifier:h.moduleSpecifier}}}function Xlt(t,r,a,u){t.replaceNode(r,a.importNode,Sx(a.name,void 0,a.moduleSpecifier,$p(r,u)))}var rOe="useBigintLiteral",Qlt=[k.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers.code];Na({errorCodes:Qlt,getCodeActions:function(r){const a=er.ChangeTracker.with(r,u=>Zlt(u,r.sourceFile,r.span));if(a.length>0)return[ua(rOe,a,k.Convert_to_a_bigint_numeric_literal,rOe,k.Convert_all_to_bigint_numeric_literals)]},fixIds:[rOe],getAllCodeActions:t=>qc(t,Qlt,(r,a)=>Zlt(r,a.file,a))});function Zlt(t,r,a){const u=Jr(Rs(r,a.start),A_);if(!u)return;const h=u.getText(r)+"n";t.replaceNode(r,u,G.createBigIntLiteral(h))}var yjt="fixAddModuleReferTypeMissingTypeof",sOe=yjt,Ylt=[k.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0.code];Na({errorCodes:Ylt,getCodeActions:function(r){const{sourceFile:a,span:u}=r,h=eut(a,u.start),p=er.ChangeTracker.with(r,g=>tut(g,a,h));return[ua(sOe,p,k.Add_missing_typeof,sOe,k.Add_missing_typeof)]},fixIds:[sOe],getAllCodeActions:t=>qc(t,Ylt,(r,a)=>tut(r,t.sourceFile,eut(a.file,a.start)))});function eut(t,r){const a=Rs(t,r);return j.assert(a.kind===102,"This token should be an ImportKeyword"),j.assert(a.parent.kind===205,"Token parent should be an ImportType"),a.parent}function tut(t,r,a){const u=G.updateImportTypeNode(a,a.argument,a.attributes,a.qualifier,a.typeArguments,!0);t.replaceNode(r,a,u)}var oOe="wrapJsxInFragment",iut=[k.JSX_expressions_must_have_one_parent_element.code];Na({errorCodes:iut,getCodeActions:function(r){const{sourceFile:a,span:u}=r,h=nut(a,u.start);if(!h)return;const p=er.ChangeTracker.with(r,g=>rut(g,a,h));return[ua(oOe,p,k.Wrap_in_JSX_fragment,oOe,k.Wrap_all_unparented_JSX_in_JSX_fragment)]},fixIds:[oOe],getAllCodeActions:t=>qc(t,iut,(r,a)=>{const u=nut(t.sourceFile,a.start);u&&rut(r,t.sourceFile,u)})});function nut(t,r){let h=Rs(t,r).parent.parent;if(!(!ur(h)&&(h=h.parent,!ur(h)))&&lu(h.operatorToken))return h}function rut(t,r,a){const u=vjt(a);u&&t.replaceNode(r,a,G.createJsxFragment(G.createJsxOpeningFragment(),u,G.createJsxJsxClosingFragment()))}function vjt(t){const r=[];let a=t;for(;;)if(ur(a)&&lu(a.operatorToken)&&a.operatorToken.kind===28){if(r.push(a.left),JW(a.right))return r.push(a.right),r;if(ur(a.right)){a=a.right;continue}else return}else return}var aOe="wrapDecoratorInParentheses",sut=[k.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator.code];Na({errorCodes:sut,getCodeActions:function(r){const a=er.ChangeTracker.with(r,u=>out(u,r.sourceFile,r.span.start));return[ua(aOe,a,k.Wrap_in_parentheses,aOe,k.Wrap_all_invalid_decorator_expressions_in_parentheses)]},fixIds:[aOe],getAllCodeActions:t=>qc(t,sut,(r,a)=>out(r,a.file,a.start))});function out(t,r,a){const u=Rs(r,a),h=Qi(u,Fd);j.assert(!!h,"Expected position to be owned by a decorator.");const p=G.createParenthesizedExpression(h.expression);t.replaceNode(r,h.expression,p)}var cOe="fixConvertToMappedObjectType",aut=[k.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead.code];Na({errorCodes:aut,getCodeActions:function(r){const{sourceFile:a,span:u}=r,h=cut(a,u.start);if(!h)return;const p=er.ChangeTracker.with(r,C=>lut(C,a,h)),g=Fr(h.container.name);return[ua(cOe,p,[k.Convert_0_to_mapped_object_type,g],cOe,[k.Convert_0_to_mapped_object_type,g])]},fixIds:[cOe],getAllCodeActions:t=>qc(t,aut,(r,a)=>{const u=cut(a.file,a.start);u&&lut(r,a.file,u)})});function cut(t,r){const a=Rs(t,r),u=Jr(a.parent.parent,eD);if(!u)return;const h=zf(u.parent)?u.parent:Jr(u.parent.parent,Mg);if(h)return{indexSignature:u,container:h}}function bjt(t,r){return G.createTypeAliasDeclaration(t.modifiers,t.name,t.typeParameters,r)}function lut(t,r,{indexSignature:a,container:u}){const p=(zf(u)?u.members:u.type.members).filter(E=>!eD(E)),g=ya(a.parameters),C=G.createTypeParameterDeclaration(void 0,ha(g.name,ot),g.type),b=G.createMappedTypeNode(z8(a)?G.createModifier(148):void 0,C,void 0,a.questionToken,a.type,void 0),T=G.createIntersectionTypeNode([...F8(u),b,...p.length?[G.createTypeLiteralNode(p)]:w]);t.replaceNode(r,u,bjt(u,T))}var uut="removeAccidentalCallParentheses",Cjt=[k.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without.code];Na({errorCodes:Cjt,getCodeActions(t){const r=Qi(Rs(t.sourceFile,t.span.start),la);if(!r)return;const a=er.ChangeTracker.with(t,u=>{u.deleteRange(t.sourceFile,{pos:r.expression.end,end:r.end})});return[G0(uut,a,k.Remove_parentheses)]},fixIds:[uut]});var lOe="removeUnnecessaryAwait",dut=[k.await_has_no_effect_on_the_type_of_this_expression.code];Na({errorCodes:dut,getCodeActions:function(r){const a=er.ChangeTracker.with(r,u=>fut(u,r.sourceFile,r.span));if(a.length>0)return[ua(lOe,a,k.Remove_unnecessary_await,lOe,k.Remove_all_unnecessary_uses_of_await)]},fixIds:[lOe],getAllCodeActions:t=>qc(t,dut,(r,a)=>fut(r,a.file,a))});function fut(t,r,a){const u=Jr(Rs(r,a.start),C=>C.kind===135),h=u&&Jr(u.parent,hx);if(!h)return;let p=h;if(c_(h.parent)){const C=d3(h.expression,!1);if(ot(C)){const b=xd(h.parent.pos,r);b&&b.kind!==105&&(p=h.parent)}}t.replaceNode(r,p,h.expression)}var hut=[k.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both.code],uOe="splitTypeOnlyImport";Na({errorCodes:hut,fixIds:[uOe],getCodeActions:function(r){const a=er.ChangeTracker.with(r,u=>put(u,_ut(r.sourceFile,r.span),r));if(a.length)return[ua(uOe,a,k.Split_into_two_separate_import_declarations,uOe,k.Split_all_invalid_type_only_imports)]},getAllCodeActions:t=>qc(t,hut,(r,a)=>{put(r,_ut(t.sourceFile,a),t)})});function _ut(t,r){return Qi(Rs(t,r.start),du)}function put(t,r,a){if(!r)return;const u=j.checkDefined(r.importClause);t.replaceNode(a.sourceFile,r,G.updateImportDeclaration(r,r.modifiers,G.updateImportClause(u,u.isTypeOnly,u.name,void 0),r.moduleSpecifier,r.attributes)),t.insertNodeAfter(a.sourceFile,r,G.createImportDeclaration(void 0,G.updateImportClause(u,u.isTypeOnly,void 0,u.namedBindings),r.moduleSpecifier,r.attributes))}var dOe="fixConvertConstToLet",mut=[k.Cannot_assign_to_0_because_it_is_a_constant.code];Na({errorCodes:mut,getCodeActions:function(r){const{sourceFile:a,span:u,program:h}=r,p=gut(a,u.start,h);if(p===void 0)return;const g=er.ChangeTracker.with(r,C=>yut(C,a,p.token));return[x6e(dOe,g,k.Convert_const_to_let,dOe,k.Convert_all_const_to_let)]},getAllCodeActions:t=>{const{program:r}=t,a=new Map;return gA(er.ChangeTracker.with(t,u=>{yA(t,mut,h=>{const p=gut(h.file,h.start,r);if(p&&Pg(a,Ba(p.symbol)))return yut(u,h.file,p.token)})}))},fixIds:[dOe]});function gut(t,r,a){var u;const p=a.getTypeChecker().getSymbolAtLocation(Rs(t,r));if(p===void 0)return;const g=Jr((u=p==null?void 0:p.valueDeclaration)==null?void 0:u.parent,Sf);if(g===void 0)return;const C=Uc(g,87,t);if(C!==void 0)return{symbol:p,token:C}}function yut(t,r,a){t.replaceNode(r,a,G.createToken(121))}var fOe="fixExpectedComma",Sjt=k._0_expected.code,vut=[Sjt];Na({errorCodes:vut,getCodeActions(t){const{sourceFile:r}=t,a=but(r,t.span.start,t.errorCode);if(!a)return;const u=er.ChangeTracker.with(t,h=>Cut(h,r,a));return[ua(fOe,u,[k.Change_0_to_1,";",","],fOe,[k.Change_0_to_1,";",","])]},fixIds:[fOe],getAllCodeActions:t=>qc(t,vut,(r,a)=>{const u=but(a.file,a.start,a.code);u&&Cut(r,t.sourceFile,u)})});function but(t,r,a){const u=Rs(t,r);return u.kind===27&&u.parent&&(Aa(u.parent)||jf(u.parent))?{node:u}:void 0}function Cut(t,r,{node:a}){const u=G.createToken(28);t.replaceNode(r,a,u)}var wjt="addVoidToPromise",Sut="addVoidToPromise",wut=[k.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments.code,k.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise.code];Na({errorCodes:wut,fixIds:[Sut],getCodeActions(t){const r=er.ChangeTracker.with(t,a=>xut(a,t.sourceFile,t.span,t.program));if(r.length>0)return[ua(wjt,r,k.Add_void_to_Promise_resolved_without_a_value,Sut,k.Add_void_to_all_Promises_resolved_without_a_value)]},getAllCodeActions(t){return qc(t,wut,(r,a)=>xut(r,a.file,a,t.program,new Set))}});function xut(t,r,a,u,h){const p=Rs(r,a.start);if(!ot(p)||!la(p.parent)||p.parent.expression!==p||p.parent.arguments.length!==0)return;const g=u.getTypeChecker(),C=g.getSymbolAtLocation(p),b=C==null?void 0:C.valueDeclaration;if(!b||!$s(b)||!rD(b.parent.parent)||h!=null&&h.has(b))return;h==null||h.add(b);const T=xjt(b.parent.parent);if(Ft(T)){const E=T[0],N=!fx(E)&&!EI(E)&&EI(G.createUnionTypeNode([E,G.createKeywordTypeNode(116)]).types[0]);N&&t.insertText(r,E.pos,"("),t.insertText(r,E.end,N?") | void":" | void")}else{const E=g.getResolvedSignature(p.parent),N=E==null?void 0:E.parameters[0],R=N&&g.getTypeOfSymbolAtLocation(N,b.parent.parent);nr(b)?(!R||R.flags&3)&&(t.insertText(r,b.parent.parent.end,")"),t.insertText(r,Va(r.text,b.parent.parent.pos),"/** @type {Promise<void>} */(")):(!R||R.flags&2)&&t.insertText(r,b.parent.parent.expression.end,"<void>")}}function xjt(t){var r;if(nr(t)){if(c_(t.parent)){const a=(r=Fk(t.parent))==null?void 0:r.typeExpression.type;if(a&&qp(a)&&ot(a.typeName)&&Fr(a.typeName)==="Promise")return a.typeArguments}}else return t.typeArguments}var CA={};c(CA,{CompletionKind:()=>jut,CompletionSource:()=>Tut,SortText:()=>xh,StringCompletions:()=>q_e,SymbolOriginInfoKind:()=>Dut,createCompletionDetails:()=>kY,createCompletionDetailsForSymbol:()=>bOe,getCompletionEntriesFromSymbols:()=>yOe,getCompletionEntryDetails:()=>tzt,getCompletionEntrySymbol:()=>nzt,getCompletionsAtPosition:()=>Pjt,getDefaultCommitCharacters:()=>GI,getPropertiesForObjectExpression:()=>j_e,moduleSpecifierResolutionCacheAttemptLimit:()=>kut,moduleSpecifierResolutionLimit:()=>hOe});var hOe=100,kut=1e3,xh={LocalDeclarationPriority:"10",LocationPriority:"11",OptionalMember:"12",MemberDeclaredBySpreadAssignment:"13",SuggestedClassMembers:"14",GlobalsOrKeywords:"15",AutoImportSuggestions:"16",ClassMemberSnippets:"17",JavascriptIdentifiers:"18",Deprecated(t){return"z"+t},ObjectLiteralProperty(t,r){return`${t}\0${r}\0`},SortBelow(t){return t+"1"}},Tut=(t=>(t.ThisProperty="ThisProperty/",t.ClassMemberSnippet="ClassMemberSnippet/",t.TypeOnlyAlias="TypeOnlyAlias/",t.ObjectLiteralMethodSnippet="ObjectLiteralMethodSnippet/",t.SwitchCases="SwitchCases/",t.ObjectLiteralMemberWithComma="ObjectLiteralMemberWithComma/",t))(Tut||{}),Dut=(t=>(t[t.ThisType=1]="ThisType",t[t.SymbolMember=2]="SymbolMember",t[t.Export=4]="Export",t[t.Promise=8]="Promise",t[t.Nullable=16]="Nullable",t[t.ResolvedExport=32]="ResolvedExport",t[t.TypeOnlyAlias=64]="TypeOnlyAlias",t[t.ObjectLiteralMethod=128]="ObjectLiteralMethod",t[t.Ignore=256]="Ignore",t[t.ComputedPropertyName=512]="ComputedPropertyName",t[t.SymbolMemberNoExport=2]="SymbolMemberNoExport",t[t.SymbolMemberExport=6]="SymbolMemberExport",t))(Dut||{});function kjt(t){return!!(t.kind&1)}function Tjt(t){return!!(t.kind&2)}function wY(t){return!!(t&&t.kind&4)}function k5(t){return!!(t&&t.kind===32)}function Djt(t){return wY(t)||k5(t)||_Oe(t)}function Ejt(t){return(wY(t)||k5(t))&&!!t.isFromPackageJson}function Ijt(t){return!!(t.kind&8)}function Njt(t){return!!(t.kind&16)}function Eut(t){return!!(t&&t.kind&64)}function Iut(t){return!!(t&&t.kind&128)}function Ljt(t){return!!(t&&t.kind&256)}function _Oe(t){return!!(t&&t.kind&512)}function Nut(t,r,a,u,h,p,g,C,b){var T,E,N,R;const F=sl(),H=g||JV(u.getCompilerOptions())||((T=p.autoImportSpecifierExcludeRegexes)==null?void 0:T.length);let U=!1,q=0,X=0,Z=0,Q=0;const re=b({tryResolve:pe,skippedAny:()=>U,resolvedAny:()=>X>0,resolvedBeyondLimit:()=>X>hOe}),oe=Q?` (${(Z/Q*100).toFixed(1)}% hit rate)`:"";return(E=r.log)==null||E.call(r,`${t}: resolved ${X} module specifiers, plus ${q} ambient and ${Z} from cache${oe}`),(N=r.log)==null||N.call(r,`${t}: response is ${U?"incomplete":"complete"}`),(R=r.log)==null||R.call(r,`${t}: ${sl()-F}`),re;function pe(de,ue){if(ue){const Ae=a.getModuleSpecifierForBestExportInfo(de,h,C);return Ae&&q++,Ae||"failed"}const Ie=H||p.allowIncompleteCompletions&&X<hOe,we=!Ie&&p.allowIncompleteCompletions&&Q<kut,he=Ie||we?a.getModuleSpecifierForBestExportInfo(de,h,C,we):void 0;return(!Ie&&!we||we&&!he)&&(U=!0),X+=(he==null?void 0:he.computedWithoutCacheCount)||0,Z+=de.length-((he==null?void 0:he.computedWithoutCacheCount)||0),we&&Q++,he||(H?"failed":"skipped")}}function GI(t){return t?[]:[".",",",";"]}function Pjt(t,r,a,u,h,p,g,C,b,T,E=!1){var N;const{previousToken:R}=B_e(h,u);if(g&&!lA(u,h,R)&&!_zt(u,g,R,h))return;if(g===" ")return p.includeCompletionsForImportStatements&&p.includeCompletionsWithInsertText?{isGlobalCompletion:!0,isMemberCompletion:!1,isNewIdentifierLocation:!0,isIncomplete:!0,entries:[],defaultCommitCharacters:GI(!0)}:void 0;const F=r.getCompilerOptions(),H=r.getTypeChecker(),U=p.allowIncompleteCompletions?(N=t.getIncompleteCompletionsCache)==null?void 0:N.call(t):void 0;if(U&&C===3&&R&&ot(R)){const Z=Ajt(U,u,R,r,t,p,b,h);if(Z)return Z}else U==null||U.clear();const q=q_e.getStringLiteralCompletions(u,h,R,F,t,r,a,p,E);if(q)return q;if(R&&m8(R.parent)&&(R.kind===83||R.kind===88||R.kind===80))return Yjt(R.parent);const X=zut(r,a,u,F,h,p,void 0,t,T,b);if(X)switch(X.kind){case 0:const Z=Bjt(u,t,r,F,a,X,p,T,h,E);return Z!=null&&Z.isIncomplete&&(U==null||U.set(Z)),Z;case 1:return pOe([...S2.getJSDocTagNameCompletions(),...Put(u,h,H,F,p,!0)]);case 2:return pOe([...S2.getJSDocTagCompletions(),...Put(u,h,H,F,p,!1)]);case 3:return pOe(S2.getJSDocParameterNameCompletions(X.tag));case 4:return Rjt(X.keywordCompletions,X.isNewIdentifierLocation);default:return j.assertNever(X)}}function xY(t,r){var a,u;let h=gW(t.sortText,r.sortText);return h===0&&(h=gW(t.name,r.name)),h===0&&((a=t.data)!=null&&a.moduleSpecifier)&&((u=r.data)!=null&&u.moduleSpecifier)&&(h=ZV(t.data.moduleSpecifier,r.data.moduleSpecifier)),h===0?-1:h}function Lut(t){return!!(t!=null&&t.moduleSpecifier)}function Ajt(t,r,a,u,h,p,g,C){const b=t.get();if(!b)return;const T=R_(r,C),E=a.text.toLowerCase(),N=Pj(r,h,u,p,g),R=Nut("continuePreviousIncompleteResponse",h,wh.createImportSpecifierResolver(r,u,h,p),u,a.getStart(),p,!1,Yk(a),F=>{const H=es(b.entries,U=>{var q;if(!U.hasAction||!U.source||!U.data||Lut(U.data))return U;if(!rdt(U.name,E))return;const{origin:X}=j.checkDefined(Uut(U.name,U.data,u,h)),Z=N.get(r.path,U.data.exportMapKey),Q=Z&&F.tryResolve(Z,!Gd(zm(X.moduleSymbol.name)));if(Q==="skipped")return U;if(!Q||Q==="failed"){(q=h.log)==null||q.call(h,`Unexpected failure resolving auto import for '${U.name}' from '${U.source}'`);return}const re={...X,kind:32,moduleSpecifier:Q.moduleSpecifier};return U.data=Wut(re),U.source=gOe(re),U.sourceDisplay=[pm(re.moduleSpecifier)],U});return F.skippedAny()||(b.isIncomplete=void 0),H});return b.entries=R,b.flags=(b.flags||0)|4,b.optionalReplacementSpan=Mut(T),b}function pOe(t){return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:t,defaultCommitCharacters:GI(!1)}}function Put(t,r,a,u,h,p){const g=Rs(t,r);if(!V6(g)&&!z0(g))return[];const C=z0(g)?g:g.parent;if(!z0(C))return[];const b=C.parent;if(!Ho(b))return[];const T=r_(t),E=h.includeCompletionsWithSnippetText||void 0,N=$i(C.tags,R=>Qm(R)&&R.getEnd()<=r);return es(b.parameters,R=>{if(!M6(R).length){if(ot(R.name)){const F={tabstop:1},H=R.name.text;let U=Jj(H,R.initializer,R.dotDotDotToken,T,!1,!1,a,u,h),q=E?Jj(H,R.initializer,R.dotDotDotToken,T,!1,!0,a,u,h,F):void 0;return p&&(U=U.slice(1),q&&(q=q.slice(1))),{name:U,kind:"parameter",sortText:xh.LocationPriority,insertText:E?q:void 0,isSnippet:E}}else if(R.parent.parameters.indexOf(R)===N){const F=`param${N}`,H=Aut(F,R.name,R.initializer,R.dotDotDotToken,T,!1,a,u,h),U=E?Aut(F,R.name,R.initializer,R.dotDotDotToken,T,!0,a,u,h):void 0;let q=H.join(mS(u)+"* "),X=U==null?void 0:U.join(mS(u)+"* ");return p&&(q=q.slice(1),X&&(X=X.slice(1))),{name:q,kind:"parameter",sortText:xh.LocationPriority,insertText:E?X:void 0,isSnippet:E}}}})}function Aut(t,r,a,u,h,p,g,C,b){if(!h)return[Jj(t,a,u,h,!1,p,g,C,b,{tabstop:1})];return T(t,r,a,u,{tabstop:1});function T(N,R,F,H,U){if(dm(R)&&!H){const X={tabstop:U.tabstop},Z=Jj(N,F,H,h,!0,p,g,C,b,X);let Q=[];for(const re of R.elements){const oe=E(N,re,X);if(oe)Q.push(...oe);else{Q=void 0;break}}if(Q)return U.tabstop=X.tabstop,[Z,...Q]}return[Jj(N,F,H,h,!1,p,g,C,b,U)]}function E(N,R,F){if(!R.propertyName&&ot(R.name)||ot(R.name)){const H=R.propertyName?D8(R.propertyName):R.name.text;if(!H)return;const U=`${N}.${H}`;return[Jj(U,R.initializer,R.dotDotDotToken,h,!1,p,g,C,b,F)]}else if(R.propertyName){const H=D8(R.propertyName);return H&&T(`${N}.${H}`,R.name,R.initializer,R.dotDotDotToken,F)}}}function Jj(t,r,a,u,h,p,g,C,b,T){if(p&&j.assertIsDefined(T),r&&(t=Ojt(t,r)),p&&(t=YT(t)),u){let E="*";if(h)j.assert(!a,"Cannot annotate a rest parameter with type 'Object'."),E="Object";else{if(r){const F=g.getTypeAtLocation(r.parent);if(!(F.flags&16385)){const H=r.getSourceFile(),q=$p(H,b)===0?268435456:0,X=g.typeToTypeNode(F,Qi(r,Ho),q);if(X){const Z=p?F_e({removeComments:!0,module:C.module,moduleResolution:C.moduleResolution,target:C.target}):bx({removeComments:!0,module:C.module,moduleResolution:C.moduleResolution,target:C.target});tr(X,1),E=Z.printNode(4,X,H)}}}p&&E==="*"&&(E=`\${${T.tabstop++}:${E}}`)}const N=!h&&a?"...":"",R=p?`\${${T.tabstop++}}`:"";return`@param {${N}${E}} ${t} ${R}`}else{const E=p?`\${${T.tabstop++}}`:"";return`@param ${t} ${E}`}}function Ojt(t,r){const a=r.getText().trim();return a.includes(`
+`)||a.length>80?`[${t}]`:`[${t}=${a}]`}function Mjt(t){return{name:xa(t),kind:"keyword",kindModifiers:"",sortText:xh.GlobalsOrKeywords}}function Rjt(t,r){return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:r,entries:t.slice(),defaultCommitCharacters:GI(r)}}function Out(t,r,a){return{kind:4,keywordCompletions:$ut(t,r),isNewIdentifierLocation:a}}function Fjt(t){switch(t){case 156:return 8;default:j.fail("Unknown mapping from SyntaxKind to KeywordCompletionFilters")}}function Mut(t){return(t==null?void 0:t.kind)===80?f_(t):void 0}function Bjt(t,r,a,u,h,p,g,C,b,T){const{symbols:E,contextToken:N,completionKind:R,isInSnippetScope:F,isNewIdentifierLocation:H,location:U,propertyAccessToConvert:q,keywordFilters:X,symbolToOriginInfoMap:Z,recommendedCompletion:Q,isJsxInitializer:re,isTypeOnlyLocation:oe,isJsxIdentifierExpected:pe,isRightOfOpenTag:de,isRightOfDotOrQuestionDot:ue,importStatementCompletion:Ie,insideJsDocTagTypeExpression:we,symbolToSortTextMap:he,hasUnresolvedAutoImports:Ae}=p;let ke=p.literals;const Te=a.getTypeChecker();if(qV(t.scriptKind)===1){const He=Vjt(U,t);if(He)return He}const De=Qi(N,x3);if(De&&(MEe(N)||UT(N,De.expression))){const He=JZ(Te,De.parent.clauses);ke=ke.filter(Pe=>!He.hasValue(Pe)),E.forEach((Pe,We)=>{if(Pe.valueDeclaration&&SS(Pe.valueDeclaration)){const ze=Te.getConstantValue(Pe.valueDeclaration);ze!==void 0&&He.hasValue(ze)&&(Z[We]={kind:256})}})}const qe=Lk(),se=Rut(t,u);if(se&&!H&&(!E||E.length===0)&&X===0)return;const Ne=yOe(E,qe,void 0,N,U,b,t,r,a,Ja(u),h,R,g,u,C,oe,q,pe,re,Ie,Q,Z,he,pe,de,T);if(X!==0)for(const He of $ut(X,!we&&r_(t)))(oe&&c5(oI(He.name))||!oe&&Szt(He.name)||!Ne.has(He.name))&&(Ne.add(He.name),rm(qe,He,xY,void 0,!0));for(const He of lzt(N,b))Ne.has(He.name)||(Ne.add(He.name),rm(qe,He,xY,void 0,!0));for(const He of ke){const Pe=jjt(t,g,He);Ne.add(Pe.name),rm(qe,Pe,xY,void 0,!0)}se||Hjt(t,U.pos,Ne,Ja(u),qe);let Oe;if(g.includeCompletionsWithInsertText&&N&&!de&&!ue&&(Oe=Qi(N,w7))){const He=Fut(Oe,t,g,u,r,a,C);He&&qe.push(He.entry)}return{flags:p.flags,isGlobalCompletion:F,isIncomplete:g.allowIncompleteCompletions&&Ae?!0:void 0,isMemberCompletion:Wjt(R),isNewIdentifierLocation:H,optionalReplacementSpan:Mut(U),entries:qe,defaultCommitCharacters:GI(H)}}function Rut(t,r){return!r_(t)||!!n7(t,r)}function Fut(t,r,a,u,h,p,g){const C=t.clauses,b=p.getTypeChecker(),T=b.getTypeAtLocation(t.parent.expression);if(T&&T.isUnion()&&Ce(T.types,E=>E.isLiteral())){const E=JZ(b,C),N=Ja(u),R=$p(r,a),F=wh.createImportAdder(r,p,a,h),H=[];for(const oe of T.types)if(oe.flags&1024){j.assert(oe.symbol,"An enum member type should have a symbol"),j.assert(oe.symbol.parent,"An enum member type should have a parent symbol (the enum symbol)");const pe=oe.symbol.valueDeclaration&&b.getConstantValue(oe.symbol.valueDeclaration);if(pe!==void 0){if(E.hasValue(pe))continue;E.addValue(pe)}const de=wh.typeToAutoImportableTypeNode(b,F,oe,t,N);if(!de)return;const ue=M_e(de,N,R);if(!ue)return;H.push(ue)}else if(!E.hasValue(oe.value))switch(typeof oe.value){case"object":H.push(oe.value.negative?G.createPrefixUnaryExpression(41,G.createBigIntLiteral({negative:!1,base10Value:oe.value.base10Value})):G.createBigIntLiteral(oe.value));break;case"number":H.push(oe.value<0?G.createPrefixUnaryExpression(41,G.createNumericLiteral(-oe.value)):G.createNumericLiteral(oe.value));break;case"string":H.push(G.createStringLiteral(oe.value,R===0));break}if(H.length===0)return;const U=qt(H,oe=>G.createCaseClause(oe,[])),q=rC(h,g==null?void 0:g.options),X=F_e({removeComments:!0,module:u.module,moduleResolution:u.moduleResolution,target:u.target,newLine:Nj(q)}),Z=g?oe=>X.printAndFormatNode(4,oe,r,g):oe=>X.printNode(4,oe,r),Q=qt(U,(oe,pe)=>a.includeCompletionsWithSnippetText?`${Z(oe)}$${pe+1}`:`${Z(oe)}`).join(q);return{entry:{name:`${X.printNode(4,U[0],r)} ...`,kind:"",sortText:xh.GlobalsOrKeywords,insertText:Q,hasAction:F.hasFixes()||void 0,source:"SwitchCases/",isSnippet:a.includeCompletionsWithSnippetText?!0:void 0},importAdder:F}}}function M_e(t,r,a){switch(t.kind){case 183:const u=t.typeName;return R_e(u,r,a);case 199:const h=M_e(t.objectType,r,a),p=M_e(t.indexType,r,a);return h&&p&&G.createElementAccessExpression(h,p);case 201:const g=t.literal;switch(g.kind){case 11:return G.createStringLiteral(g.text,a===0);case 9:return G.createNumericLiteral(g.text,g.numericLiteralFlags)}return;case 196:const C=M_e(t.type,r,a);return C&&(ot(C)?C:G.createParenthesizedExpression(C));case 186:return R_e(t.exprName,r,a);case 205:j.fail("We should not get an import type after calling 'codefix.typeToAutoImportableTypeNode'.")}}function R_e(t,r,a){if(ot(t))return t;const u=Ws(t.right.escapedText);return Gce(u,r)?G.createPropertyAccessExpression(R_e(t.left,r,a),u):G.createElementAccessExpression(R_e(t.left,r,a),G.createStringLiteral(u,a===0))}function Wjt(t){switch(t){case 0:case 3:case 2:return!0;default:return!1}}function Vjt(t,r){const a=Qi(t,u=>{switch(u.kind){case 287:return!0;case 44:case 32:case 80:case 211:return!1;default:return"quit"}});if(a){const u=!!Uc(a,32,r),g=a.parent.openingElement.tagName.getText(r)+(u?"":">"),C=f_(a.tagName),b={name:g,kind:"class",kindModifiers:void 0,sortText:xh.LocationPriority};return{isGlobalCompletion:!1,isMemberCompletion:!0,isNewIdentifierLocation:!1,optionalReplacementSpan:C,entries:[b],defaultCommitCharacters:GI(!1)}}}function Hjt(t,r,a,u,h){s_e(t).forEach((p,g)=>{if(p===r)return;const C=Ws(g);!a.has(C)&&J_(C,u)&&(a.add(C),rm(h,{name:C,kind:"warning",kindModifiers:"",sortText:xh.JavascriptIdentifiers,isFromUncheckedFile:!0,commitCharacters:[]},xY))})}function mOe(t,r,a){return typeof a=="object"?ZT(a)+"n":Oo(a)?_5(t,r,a):JSON.stringify(a)}function jjt(t,r,a){return{name:mOe(t,r,a),kind:"string",kindModifiers:"",sortText:xh.LocationPriority,commitCharacters:[]}}function zjt(t,r,a,u,h,p,g,C,b,T,E,N,R,F,H,U,q,X,Z,Q,re,oe,pe,de){var ue,Ie;let we,he,Ae=Bfe(a,p),ke,Te,De=gOe(N),qe,se,Ne;const Oe=b.getTypeChecker(),He=N&&Njt(N),Pe=N&&Tjt(N)||E;if(N&&kjt(N))we=E?`this${He?"?.":""}[${Vut(g,Z,T)}]`:`this${He?"?.":"."}${T}`;else if((Pe||He)&&F){we=Pe?E?`[${Vut(g,Z,T)}]`:`[${T}]`:T,(He||F.questionDotToken)&&(we=`?.${we}`);const $e=Uc(F,25,g)||Uc(F,29,g);if(!$e)return;const et=so(T,F.name.text)?F.name.end:$e.end;Ae=Fu($e.getStart(g),et)}if(H&&(we===void 0&&(we=T),we=`{${we}}`,typeof H!="boolean"&&(Ae=f_(H,g))),N&&Ijt(N)&&F){we===void 0&&(we=T);const $e=xd(F.pos,g);let et="";$e&&BZ($e.end,$e.parent,g)&&(et=";"),et+=`(await ${F.expression.getText()})`,we=E?`${et}${we}`:`${et}${He?"?.":"."}${we}`;const ut=Jr(F.parent,hx)?F.parent:F.expression;Ae=Fu(ut.getStart(g),F.end)}if(k5(N)&&(qe=[pm(N.moduleSpecifier)],U&&({insertText:we,replacementSpan:Ae}=Qjt(T,U,N,q,g,b,Z),Te=Z.includeCompletionsWithSnippetText?!0:void 0)),(N==null?void 0:N.kind)===64&&(se=!0),Q===0&&u&&((ue=xd(u.pos,g,u))==null?void 0:ue.kind)!==28&&(Nu(u.parent.parent)||um(u.parent.parent)||kp(u.parent.parent)||Kv(u.parent)||((Ie=Qi(u.parent,_d))==null?void 0:Ie.getLastToken(g))===u||lh(u.parent)&&Ia(g,u.getEnd()).line!==Ia(g,p).line)&&(De="ObjectLiteralMemberWithComma/",se=!0),Z.includeCompletionsWithClassMemberSnippets&&Z.includeCompletionsWithInsertText&&Q===3&&qjt(t,h,g)){let $e;const et=But(C,b,X,Z,T,t,h,p,u,re);if(et)({insertText:we,filterText:he,isSnippet:Te,importAdder:$e}=et),($e!=null&&$e.hasFixes()||et.eraseRange)&&(se=!0,De="ClassMemberSnippet/");else return}if(N&&Iut(N)&&({insertText:we,isSnippet:Te,labelDetails:Ne}=N,Z.useLabelDetailsInCompletionEntries||(T=T+Ne.detail,Ne=void 0),De="ObjectLiteralMethodSnippet/",r=xh.SortBelow(r)),oe&&!pe&&Z.includeCompletionsWithSnippetText&&Z.jsxAttributeCompletionStyle&&Z.jsxAttributeCompletionStyle!=="none"&&!(U1(h.parent)&&h.parent.initializer)){let $e=Z.jsxAttributeCompletionStyle==="braces";const et=Oe.getTypeOfSymbolAtLocation(t,h);Z.jsxAttributeCompletionStyle==="auto"&&!(et.flags&528)&&!(et.flags&1048576&&Fe(et.types,Me=>!!(Me.flags&528)))&&(et.flags&402653316||et.flags&1048576&&Ce(et.types,Me=>!!(Me.flags&402686084||lAe(Me)))?(we=`${YT(T)}=${_5(g,Z,"$1")}`,Te=!0):$e=!0),$e&&(we=`${YT(T)}={$1}`,Te=!0)}if(we!==void 0&&!Z.includeCompletionsWithInsertText)return;(wY(N)||k5(N))&&(ke=Wut(N),se=!U);const We=Qi(h,NK);if(We){const $e=Ja(C.getCompilationSettings());if(!J_(T,$e))we=JSON.stringify(T),We.kind===275&&(we+=" as "+Ujt(T,$e));else if(We.kind===275){const et=oI(T);et&&(et===135||Xae(et))&&(we=`${T} as ${T}_`)}}const ze=NS.getSymbolKind(Oe,t,h),Nt=ze==="warning"||ze==="string"?[]:void 0;return{name:T,kind:ze,kindModifiers:NS.getSymbolModifiers(Oe,t),sortText:r,source:De,hasAction:se?!0:void 0,isRecommended:Zjt(t,R,Oe)||void 0,insertText:we,filterText:he,replacementSpan:Ae,sourceDisplay:qe,labelDetails:Ne,isSnippet:Te,isPackageJsonImport:Ejt(N)||void 0,isImportStatementCompletion:!!U||void 0,data:ke,commitCharacters:Nt,...de?{symbol:t}:void 0}}function Ujt(t,r){let a=!1,u="",h;for(let p=0;p<t.length;p+=h!==void 0&&h>=65536?2:1)h=t.codePointAt(p),h!==void 0&&(p===0?Py(h,r):jb(h,r))?(a&&(u+="_"),u+=String.fromCodePoint(h),a=!1):a=!0;return a&&(u+="_"),u||"_"}function qjt(t,r,a){return nr(r)?!1:!!(t.flags&106500)&&(ss(r)||r.parent&&r.parent.parent&&Od(r.parent)&&r===r.parent.name&&r.parent.getLastToken(a)===r.parent.name&&ss(r.parent.parent)||r.parent&&E3(r)&&ss(r.parent))}function But(t,r,a,u,h,p,g,C,b,T){const E=Qi(g,ss);if(!E)return;let N,R=h;const F=h,H=r.getTypeChecker(),U=g.getSourceFile(),q=F_e({removeComments:!0,module:a.module,moduleResolution:a.moduleResolution,target:a.target,omitTrailingSemicolon:!1,newLine:Nj(rC(t,T==null?void 0:T.options))}),X=wh.createImportAdder(U,r,u,t);let Z;if(u.includeCompletionsWithSnippetText){N=!0;const Ie=G.createEmptyStatement();Z=G.createBlock([Ie],!0),sle(Ie,{kind:0,order:0})}else Z=G.createBlock([],!0);let Q=0;const{modifiers:re,range:oe,decorators:pe}=$jt(b,U,C),de=re&64&&E.modifierFlagsCache&64;let ue=[];if(wh.addNewNodeForMemberSymbol(p,E,U,{program:r,host:t},u,X,Ie=>{let we=0;de&&(we|=64),Od(Ie)&&H.getMemberOverrideModifierStatus(E,Ie,p)===1&&(we|=16),ue.length||(Q=Ie.modifierFlagsCache|we),Ie=G.replaceModifiers(Ie,Q),ue.push(Ie)},Z,wh.PreserveOptionalFlags.Property,!!de),ue.length){const Ie=p.flags&8192;let we=Q|16|1;Ie?we|=1024:we|=136;const he=re&we;if(re&~we)return;if(Q&4&&he&1&&(Q&=-5),he!==0&&!(he&1)&&(Q&=-2),Q|=he,ue=ue.map(ke=>G.replaceModifiers(ke,Q)),pe!=null&&pe.length){const ke=ue[ue.length-1];uD(ke)&&(ue[ue.length-1]=G.replaceDecoratorsAndModifiers(ke,pe.concat(PT(ke)||[])))}const Ae=131073;T?R=q.printAndFormatSnippetList(Ae,G.createNodeArray(ue),U,T):R=q.printSnippetList(Ae,G.createNodeArray(ue),U)}return{insertText:R,filterText:F,isSnippet:N,importAdder:X,eraseRange:oe}}function $jt(t,r,a){if(!t||Ia(r,a).line>Ia(r,t.getEnd()).line)return{modifiers:0};let u=0,h,p;const g={pos:a,end:a};if(Lo(t.parent)&&(p=Jjt(t))){t.parent.modifiers&&(u|=M1(t.parent.modifiers)&98303,h=t.parent.modifiers.filter(Fd)||[],g.pos=Math.min(...t.parent.modifiers.map(b=>b.getStart(r))));const C=CP(p);u&C||(u|=C,g.pos=Math.min(g.pos,t.getStart(r))),t.parent.name!==t&&(g.end=t.parent.name.getStart(r))}return{modifiers:u,decorators:h,range:g.pos<g.end?g:void 0}}function Jjt(t){if(Fa(t))return t.kind;if(ot(t)){const r=aI(t);if(r&&Xw(r))return r}}function Gjt(t,r,a,u,h,p,g,C){const b=g.includeCompletionsWithSnippetText||void 0;let T=r;const E=a.getSourceFile(),N=Kjt(t,a,E,u,h,g);if(!N)return;const R=F_e({removeComments:!0,module:p.module,moduleResolution:p.moduleResolution,target:p.target,omitTrailingSemicolon:!1,newLine:Nj(rC(h,C==null?void 0:C.options))});C?T=R.printAndFormatSnippetList(80,G.createNodeArray([N],!0),E,C):T=R.printSnippetList(80,G.createNodeArray([N],!0),E);const F=bx({removeComments:!0,module:p.module,moduleResolution:p.moduleResolution,target:p.target,omitTrailingSemicolon:!0}),H=G.createMethodSignature(void 0,"",N.questionToken,N.typeParameters,N.parameters,N.type),U={detail:F.printNode(4,H,E)};return{isSnippet:b,insertText:T,labelDetails:U}}function Kjt(t,r,a,u,h,p){const g=t.getDeclarations();if(!(g&&g.length))return;const C=u.getTypeChecker(),b=g[0],T=Ec(No(b),!1),E=C.getWidenedType(C.getTypeOfSymbolAtLocation(t,r)),R=33554432|($p(a,p)===0?268435456:0);switch(b.kind){case 171:case 172:case 173:case 174:{let F=E.flags&1048576&&E.types.length<10?C.getUnionType(E.types,2):E;if(F.flags&1048576){const Z=$t(F.types,Q=>C.getSignaturesOfType(Q,0).length>0);if(Z.length===1)F=Z[0];else return}if(C.getSignaturesOfType(F,0).length!==1)return;const U=C.typeToTypeNode(F,r,R,void 0,wh.getNoopSymbolTrackerWithResolver({program:u,host:h}));if(!U||!Hy(U))return;let q;if(p.includeCompletionsWithSnippetText){const Z=G.createEmptyStatement();q=G.createBlock([Z],!0),sle(Z,{kind:0,order:0})}else q=G.createBlock([],!0);const X=U.parameters.map(Z=>G.createParameterDeclaration(void 0,Z.dotDotDotToken,Z.name,void 0,void 0,Z.initializer));return G.createMethodDeclaration(void 0,void 0,T,void 0,void 0,X,void 0,q)}default:return}}function F_e(t){let r;const a=er.createWriter(mS(t)),u=bx(t,a),h={...a,write:R=>p(R,()=>a.write(R)),nonEscapingWrite:a.write,writeLiteral:R=>p(R,()=>a.writeLiteral(R)),writeStringLiteral:R=>p(R,()=>a.writeStringLiteral(R)),writeSymbol:(R,F)=>p(R,()=>a.writeSymbol(R,F)),writeParameter:R=>p(R,()=>a.writeParameter(R)),writeComment:R=>p(R,()=>a.writeComment(R)),writeProperty:R=>p(R,()=>a.writeProperty(R))};return{printSnippetList:g,printAndFormatSnippetList:b,printNode:T,printAndFormatNode:N};function p(R,F){const H=YT(R);if(H!==R){const U=a.getTextPos();F();const q=a.getTextPos();r=fn(r||(r=[]),{newText:H,span:{start:U,length:q-U}})}else F()}function g(R,F,H){const U=C(R,F,H);return r?er.applyChanges(U,r):U}function C(R,F,H){return r=void 0,h.clear(),u.writeList(R,F,H,h),h.getText()}function b(R,F,H,U){const q={text:C(R,F,H),getLineAndCharacterOfPosition(re){return Ia(this,re)}},X=$Z(U,H),Z=Rr(F,re=>{const oe=er.assignPositionsToNode(re);return pd.formatNodeGivenIndentation(oe,q,H.languageVariant,0,0,{...U,options:X})}),Q=r?Mu(Js(Z,r),(re,oe)=>VJ(re.span,oe.span)):Z;return er.applyChanges(q.text,Q)}function T(R,F,H){const U=E(R,F,H);return r?er.applyChanges(U,r):U}function E(R,F,H){return r=void 0,h.clear(),u.writeNode(R,F,H,h),h.getText()}function N(R,F,H,U){const q={text:E(R,F,H),getLineAndCharacterOfPosition(oe){return Ia(this,oe)}},X=$Z(U,H),Z=er.assignPositionsToNode(F),Q=pd.formatNodeGivenIndentation(Z,q,H.languageVariant,0,0,{...U,options:X}),re=r?Mu(Js(Q,r),(oe,pe)=>VJ(oe.span,pe.span)):Q;return er.applyChanges(q.text,re)}}function Wut(t){const r=t.fileName?void 0:zm(t.moduleSymbol.name),a=t.isFromPackageJson?!0:void 0;return k5(t)?{exportName:t.exportName,exportMapKey:t.exportMapKey,moduleSpecifier:t.moduleSpecifier,ambientModuleName:r,fileName:t.fileName,isPackageJsonImport:a}:{exportName:t.exportName,exportMapKey:t.exportMapKey,fileName:t.fileName,ambientModuleName:t.fileName?void 0:zm(t.moduleSymbol.name),isPackageJsonImport:t.isFromPackageJson?!0:void 0}}function Xjt(t,r,a){const u=t.exportName==="default",h=!!t.isPackageJsonImport;return Lut(t)?{kind:32,exportName:t.exportName,exportMapKey:t.exportMapKey,moduleSpecifier:t.moduleSpecifier,symbolName:r,fileName:t.fileName,moduleSymbol:a,isDefaultExport:u,isFromPackageJson:h}:{kind:4,exportName:t.exportName,exportMapKey:t.exportMapKey,symbolName:r,fileName:t.fileName,moduleSymbol:a,isDefaultExport:u,isFromPackageJson:h}}function Qjt(t,r,a,u,h,p,g){const C=r.replacementSpan,b=YT(_5(h,g,a.moduleSpecifier)),T=a.isDefaultExport?1:a.exportName==="export="?2:0,E=g.includeCompletionsWithSnippetText?"$1":"",N=wh.getImportKind(h,T,p,!0),R=r.couldBeTypeOnlyImportSpecifier,F=r.isTopLevelTypeOnly?` ${xa(156)} `:" ",H=R?`${xa(156)} `:"",U=u?";":"";switch(N){case 3:return{replacementSpan:C,insertText:`import${F}${YT(t)}${E} = require(${b})${U}`};case 1:return{replacementSpan:C,insertText:`import${F}${YT(t)}${E} from ${b}${U}`};case 2:return{replacementSpan:C,insertText:`import${F}* as ${YT(t)} from ${b}${U}`};case 0:return{replacementSpan:C,insertText:`import${F}{ ${H}${YT(t)}${E} } from ${b}${U}`}}}function Vut(t,r,a){return/^\d+$/.test(a)?a:_5(t,r,a)}function Zjt(t,r,a){return t===r||!!(t.flags&1048576)&&a.getExportSymbolOfSymbol(t)===r}function gOe(t){if(wY(t))return zm(t.moduleSymbol.name);if(k5(t))return t.moduleSpecifier;if((t==null?void 0:t.kind)===1)return"ThisProperty/";if((t==null?void 0:t.kind)===64)return"TypeOnlyAlias/"}function yOe(t,r,a,u,h,p,g,C,b,T,E,N,R,F,H,U,q,X,Z,Q,re,oe,pe,de,ue,Ie=!1){const we=sl(),he=vzt(u,h),Ae=kj(g),ke=b.getTypeChecker(),Te=new Map;for(let se=0;se<t.length;se++){const Ne=t[se],Oe=oe==null?void 0:oe[se],He=W_e(Ne,T,Oe,N,!!X);if(!He||Te.get(He.name)&&(!Oe||!Iut(Oe))||N===1&&pe&&!De(Ne,pe)||!U&&nr(g)&&qe(Ne))continue;const{name:Pe,needsConvertPropertyAccess:We}=He,ze=(pe==null?void 0:pe[Ba(Ne)])??xh.LocationPriority,Nt=bzt(Ne,ke)?xh.Deprecated(ze):ze,$e=zjt(Ne,Nt,a,u,h,p,g,C,b,Pe,We,Oe,re,q,Z,Q,Ae,F,R,N,H,de,ue,Ie);if(!$e)continue;const et=(!Oe||Eut(Oe))&&!(Ne.parent===void 0&&!Ft(Ne.declarations,Me=>Me.getSourceFile()===h.getSourceFile()));Te.set(Pe,et),rm(r,$e,xY,void 0,!0)}return E("getCompletionsAtPosition: getCompletionEntriesFromSymbols: "+(sl()-we)),{has:se=>Te.has(se),add:se=>Te.set(se,!0)};function De(se,Ne){var Oe;let He=se.flags;if(!Os(h)){if(Il(h.parent))return!0;if(Jr(he,_s)&&se.valueDeclaration===he)return!1;const Pe=se.valueDeclaration??((Oe=se.declarations)==null?void 0:Oe[0]);if(he&&Pe&&($l(he)&&$l(Pe)||$s(he)&&$s(Pe))){const ze=Pe.pos,Nt=$s(he)?he.parent.parameters:DI(he.parent)?void 0:he.parent.typeParameters;if(ze>=he.pos&&Nt&&ze<Nt.end)return!1}const We=Vf(se,ke);if(g.externalModuleIndicator&&!F.allowUmdGlobalAccess&&Ne[Ba(se)]===xh.GlobalsOrKeywords&&(Ne[Ba(We)]===xh.AutoImportSuggestions||Ne[Ba(We)]===xh.LocationPriority))return!1;if(He|=l3(We),hZ(h))return!!(He&1920);if(U)return wOe(se,ke)}return!!(He&111551)}function qe(se){var Ne;const Oe=l3(Vf(se,ke));return!(Oe&111551)&&(!nr((Ne=se.declarations)==null?void 0:Ne[0])||!!(Oe&788968))}}function Yjt(t){const r=ezt(t);if(r.length)return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:r,defaultCommitCharacters:GI(!1)}}function ezt(t){const r=[],a=new Map;let u=t;for(;u&&!Ho(u);){if(_x(u)){const h=u.label.text;a.has(h)||(a.set(h,!0),r.push({name:h,kindModifiers:"",kind:"label",sortText:xh.LocationPriority}))}u=u.parent}return r}function Hut(t,r,a,u,h,p,g){if(h.source==="SwitchCases/")return{type:"cases"};if(h.data){const Q=Uut(h.name,h.data,t,p);if(Q){const{contextToken:re,previousToken:oe}=B_e(u,a);return{type:"symbol",symbol:Q.symbol,location:R_(a,u),previousToken:oe,contextToken:re,isJsxInitializer:!1,isTypeOnlyLocation:!1,origin:Q.origin}}}const C=t.getCompilerOptions(),b=zut(t,r,a,C,u,{includeCompletionsForModuleExports:!0,includeCompletionsWithInsertText:!0},h,p,void 0);if(!b)return{type:"none"};if(b.kind!==0)return{type:"request",request:b};const{symbols:T,literals:E,location:N,completionKind:R,symbolToOriginInfoMap:F,contextToken:H,previousToken:U,isJsxInitializer:q,isTypeOnlyLocation:X}=b,Z=Fe(E,Q=>mOe(a,g,Q)===h.name);return Z!==void 0?{type:"literal",literal:Z}:J(T,(Q,re)=>{const oe=F[re],pe=W_e(Q,Ja(C),oe,R,b.isJsxIdentifierExpected);return pe&&pe.name===h.name&&(h.source==="ClassMemberSnippet/"&&Q.flags&106500||h.source==="ObjectLiteralMethodSnippet/"&&Q.flags&8196||gOe(oe)===h.source||h.source==="ObjectLiteralMemberWithComma/")?{type:"symbol",symbol:Q,location:N,origin:oe,contextToken:H,previousToken:U,isJsxInitializer:q,isTypeOnlyLocation:X}:void 0})||{type:"none"}}function tzt(t,r,a,u,h,p,g,C,b){const T=t.getTypeChecker(),E=t.getCompilerOptions(),{name:N,source:R,data:F}=h,{previousToken:H,contextToken:U}=B_e(u,a);if(lA(a,u,H))return q_e.getStringLiteralCompletionDetails(N,a,u,H,t,p,b,C);const q=Hut(t,r,a,u,h,p,C);switch(q.type){case"request":{const{request:X}=q;switch(X.kind){case 1:return S2.getJSDocTagNameCompletionDetails(N);case 2:return S2.getJSDocTagCompletionDetails(N);case 3:return S2.getJSDocParameterNameCompletionDetails(N);case 4:return Ft(X.keywordCompletions,Z=>Z.name===N)?vOe(N,"keyword",5):void 0;default:return j.assertNever(X)}}case"symbol":{const{symbol:X,location:Z,contextToken:Q,origin:re,previousToken:oe}=q,{codeActions:pe,sourceDisplay:de}=izt(N,Z,Q,re,X,t,p,E,a,u,oe,g,C,F,R,b),ue=_Oe(re)?re.symbolName:X.name;return bOe(X,ue,T,a,Z,b,pe,de)}case"literal":{const{literal:X}=q;return vOe(mOe(a,C,X),"string",typeof X=="string"?8:7)}case"cases":{const X=Fut(U.parent,a,C,t.getCompilerOptions(),p,t,void 0);if(X!=null&&X.importAdder.hasFixes()){const{entry:Z,importAdder:Q}=X,re=er.ChangeTracker.with({host:p,formatContext:g,preferences:C},Q.writeFixes);return{name:Z.name,kind:"",kindModifiers:"",displayParts:[],sourceDisplay:void 0,codeActions:[{changes:re,description:bD([k.Includes_imports_of_types_referenced_by_0,N])}]}}return{name:N,kind:"",kindModifiers:"",displayParts:[],sourceDisplay:void 0}}case"none":return qut().some(X=>X.name===N)?vOe(N,"keyword",5):void 0;default:j.assertNever(q)}}function vOe(t,r,a){return kY(t,"",r,[Z_(t,a)])}function bOe(t,r,a,u,h,p,g,C){const{displayParts:b,documentation:T,symbolKind:E,tags:N}=a.runWithCancellationToken(p,R=>NS.getSymbolDisplayPartsDocumentationAndSymbolKind(R,t,u,h,h,7));return kY(r,NS.getSymbolModifiers(a,t),E,b,T,N,g,C)}function kY(t,r,a,u,h,p,g,C){return{name:t,kindModifiers:r,kind:a,displayParts:u,documentation:h,tags:p,codeActions:g,source:C,sourceDisplay:C}}function izt(t,r,a,u,h,p,g,C,b,T,E,N,R,F,H,U){if(F!=null&&F.moduleSpecifier&&E&&Yut(a||E,b).replacementSpan)return{codeActions:void 0,sourceDisplay:[pm(F.moduleSpecifier)]};if(H==="ClassMemberSnippet/"){const{importAdder:pe,eraseRange:de}=But(g,p,C,R,t,h,r,T,a,N);if(pe!=null&&pe.hasFixes()||de)return{sourceDisplay:void 0,codeActions:[{changes:er.ChangeTracker.with({host:g,formatContext:N,preferences:R},Ie=>{pe&&pe.writeFixes(Ie),de&&Ie.deleteRange(b,de)}),description:pe!=null&&pe.hasFixes()?bD([k.Includes_imports_of_types_referenced_by_0,t]):bD([k.Update_modifiers_of_0,t])}]}}if(Eut(u)){const pe=wh.getPromoteTypeOnlyCompletionAction(b,u.declaration.name,p,g,N,R);return j.assertIsDefined(pe,"Expected to have a code action for promoting type-only alias"),{codeActions:[pe],sourceDisplay:void 0}}if(H==="ObjectLiteralMemberWithComma/"&&a){const pe=er.ChangeTracker.with({host:g,formatContext:N,preferences:R},de=>de.insertText(b,a.end,","));if(pe)return{sourceDisplay:void 0,codeActions:[{changes:pe,description:bD([k.Add_missing_comma_for_object_member_completion_0,t])}]}}if(!u||!(wY(u)||k5(u)))return{codeActions:void 0,sourceDisplay:void 0};const q=u.isFromPackageJson?g.getPackageJsonAutoImportProvider().getTypeChecker():p.getTypeChecker(),{moduleSymbol:X}=u,Z=q.getMergedSymbol(Vf(h.exportSymbol||h,q)),Q=(a==null?void 0:a.kind)===30&&oh(a.parent),{moduleSpecifier:re,codeAction:oe}=wh.getImportCompletionAction(Z,X,F==null?void 0:F.exportMapKey,b,t,Q,g,p,N,E&&ot(E)?E.getStart(b):T,R,U);return j.assert(!(F!=null&&F.moduleSpecifier)||re===F.moduleSpecifier),{sourceDisplay:[pm(re)],codeActions:[oe]}}function nzt(t,r,a,u,h,p,g){const C=Hut(t,r,a,u,h,p,g);return C.type==="symbol"?C.symbol:void 0}var jut=(t=>(t[t.ObjectPropertyDeclaration=0]="ObjectPropertyDeclaration",t[t.Global=1]="Global",t[t.PropertyAccess=2]="PropertyAccess",t[t.MemberLike=3]="MemberLike",t[t.String=4]="String",t[t.None=5]="None",t))(jut||{});function rzt(t,r,a){return J(r&&(r.isUnion()?r.types:[r]),u=>{const h=u&&u.symbol;return h&&h.flags&424&&!vDe(h)?COe(h,t,a):void 0})}function szt(t,r,a,u){const{parent:h}=t;switch(t.kind){case 80:return RZ(t,u);case 64:switch(h.kind){case 260:return u.getContextualType(h.initializer);case 226:return u.getTypeAtLocation(h.left);case 291:return u.getContextualTypeForJsxAttribute(h);default:return}case 105:return u.getContextualType(h);case 84:const p=Jr(h,x3);return p?che(p,u):void 0;case 19:return x7(h)&&!Gv(h.parent)&&!aD(h.parent)?u.getContextualTypeForJsxAttribute(h.parent):void 0;default:const g=ez.getArgumentInfoForCompletions(t,r,a,u);return g?u.getContextualTypeForArgumentAtIndex(g.invocation,g.argumentIndex):FZ(t.kind)&&ur(h)&&FZ(h.operatorToken.kind)?u.getTypeAtLocation(h.left):u.getContextualType(t,4)||u.getContextualType(t)}}function COe(t,r,a){const u=a.getAccessibleSymbolChain(t,r,-1,!1);return u?ya(u):t.parent&&(ozt(t.parent)?t:COe(t.parent,r,a))}function ozt(t){var r;return!!((r=t.declarations)!=null&&r.some(a=>a.kind===307))}function zut(t,r,a,u,h,p,g,C,b,T){const E=t.getTypeChecker(),N=Rut(a,u);let R=sl(),F=Rs(a,h);r("getCompletionData: Get current token: "+(sl()-R)),R=sl();const H=kS(a,h,F);r("getCompletionData: Is inside comment: "+(sl()-R));let U=!1,q=!1,X=!1;if(H){if(oAe(a,h)){if(a.text.charCodeAt(h-1)===64)return{kind:1};{const st=Wg(h,a);if(!/[^*|\s(/)]/.test(a.text.substring(st,h)))return{kind:2}}}const lt=uzt(F,h);if(lt){if(lt.tagName.pos<=h&&h<=lt.tagName.end)return{kind:1};if(q1(lt))q=!0;else{const st=tn(lt);if(st&&(F=Rs(a,h),(!F||!Wy(F)&&(F.parent.kind!==348||F.parent.name!==F))&&(U=Qt(st))),!U&&Qm(lt)&&(lu(lt.name)||lt.name.pos<=h&&h<=lt.name.end))return{kind:3,tag:lt}}}if(!U&&!q){r("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment.");return}}R=sl();const Z=!U&&!q&&r_(a),Q=B_e(h,a),re=Q.previousToken;let oe=Q.contextToken;r("getCompletionData: Get previous token: "+(sl()-R));let pe=F,de,ue=!1,Ie=!1,we=!1,he=!1,Ae=!1,ke=!1,Te,De=R_(a,h),qe=0,se=!1,Ne=0;if(oe){const lt=Yut(oe,a);if(lt.keywordCompletion){if(lt.isKeywordOnlyCompletion)return{kind:4,keywordCompletions:[Mjt(lt.keywordCompletion)],isNewIdentifierLocation:lt.isNewIdentifierLocation};qe=Fjt(lt.keywordCompletion)}if(lt.replacementSpan&&p.includeCompletionsForImportStatements&&p.includeCompletionsWithInsertText&&(Ne|=2,Te=lt,se=lt.isNewIdentifierLocation),!lt.replacementSpan&&Gs(oe))return r("Returning an empty list because completion was requested in an invalid position."),qe?Out(qe,Z,ka()):void 0;let st=oe.parent;if(oe.kind===25||oe.kind===29)switch(ue=oe.kind===25,Ie=oe.kind===29,st.kind){case 211:de=st,pe=de.expression;const hi=u3(de);if(lu(hi)||(la(pe)||Ho(pe))&&pe.end===oe.pos&&pe.getChildCount(a)&&va(pe.getChildren(a)).kind!==22)return;break;case 166:pe=st.left;break;case 267:pe=st.name;break;case 205:pe=st;break;case 236:pe=st.getFirstToken(a),j.assert(pe.kind===102||pe.kind===105);break;default:return}else if(!Te){if(st&&st.kind===211&&(oe=st,st=st.parent),F.parent===De)switch(F.kind){case 32:(F.parent.kind===284||F.parent.kind===286)&&(De=F);break;case 44:F.parent.kind===285&&(De=F);break}switch(st.kind){case 287:oe.kind===44&&(he=!0,De=oe);break;case 226:if(!Zut(st))break;case 285:case 284:case 286:ke=!0,oe.kind===30&&(we=!0,De=oe);break;case 294:case 293:(re.kind===20||re.kind===80&&re.parent.kind===291)&&(ke=!0);break;case 291:if(st.initializer===re&&re.end<h){ke=!0;break}switch(re.kind){case 64:Ae=!0;break;case 80:ke=!0,st!==re.parent&&!st.initializer&&Uc(st,64,a)&&(Ae=re)}break}}}const Oe=sl();let He=5,Pe=!1,We=[],ze;const Nt=[],$e=[],et=new Map,Me=Mn(),ut=x1(lt=>dA(lt?C.getPackageJsonAutoImportProvider():t,C));if(ue||Ie)xn();else if(we)We=E.getJsxIntrinsicTagNamesAt(De),j.assertEachIsDefined(We,"getJsxIntrinsicTagNames() should all be defined"),On(),He=1,qe=0;else if(he){const lt=oe.parent.parent.openingElement.tagName,st=E.getSymbolAtLocation(lt);st&&(We=[st]),He=1,qe=0}else if(!On())return qe?Out(qe,Z,se):void 0;r("getCompletionData: Semantic work: "+(sl()-Oe));const wt=re&&szt(re,h,a,E),dt=!Jr(re,Bc)&&!ke?es(wt&&(wt.isUnion()?wt.types:[wt]),lt=>lt.isLiteral()&&!(lt.flags&1024)?lt.value:void 0):[],zt=re&&wt&&rzt(re,wt,E);return{kind:0,symbols:We,completionKind:He,isInSnippetScope:X,propertyAccessToConvert:de,isNewIdentifierLocation:se,location:De,keywordFilters:qe,literals:dt,symbolToOriginInfoMap:Nt,recommendedCompletion:zt,previousToken:re,contextToken:oe,isJsxInitializer:Ae,insideJsDocTagTypeExpression:U,symbolToSortTextMap:$e,isTypeOnlyLocation:Me,isJsxIdentifierExpected:ke,isRightOfOpenTag:we,isRightOfDotOrQuestionDot:ue||Ie,importStatementCompletion:Te,hasUnresolvedAutoImports:Pe,flags:Ne};function Ei(lt){switch(lt.kind){case 341:case 348:case 342:case 344:case 346:case 349:case 350:return!0;case 345:return!!lt.constraint;default:return!1}}function tn(lt){if(Ei(lt)){const st=Rg(lt)?lt.constraint:lt.typeExpression;return st&&st.kind===309?st:void 0}if(KP(lt)||NX(lt))return lt.class}function xn(){He=2;const lt=lS(pe),st=lt&&!pe.isTypeOf||N1(pe.parent)||_j(oe,a,E),hi=hZ(pe);if(E_(pe)||lt||Nr(pe)){const vn=rd(pe.parent);vn&&(se=!0);let ln=E.getSymbolAtLocation(pe);if(ln&&(ln=Vf(ln,E),ln.flags&1920)){const Un=E.getExportsOfModule(ln);j.assertEachIsDefined(Un,"getExportsOfModule() should all be defined");const Pt=wi=>E.isValidPropertyAccess(lt?pe:pe.parent,wi.name),Bt=wi=>wOe(wi,E),fi=vn?wi=>{var Ri;return!!(wi.flags&1920)&&!((Ri=wi.declarations)!=null&&Ri.every(Ai=>Ai.parent===pe.parent))}:hi?wi=>Bt(wi)||Pt(wi):st||U?Bt:Pt;for(const wi of Un)fi(wi)&&We.push(wi);if(!st&&!U&&ln.declarations&&ln.declarations.some(wi=>wi.kind!==307&&wi.kind!==267&&wi.kind!==266)){let wi=E.getTypeOfSymbolAtLocation(ln,pe).getNonOptionalType(),Ri=!1;if(wi.isNullableType()){const Ai=ue&&!Ie&&p.includeAutomaticOptionalChainCompletions!==!1;(Ai||Ie)&&(wi=wi.getNonNullableType(),Ai&&(Ri=!0))}Pn(wi,!!(pe.flags&65536),Ri)}return}}if(!st||vP(pe)){E.tryGetThisTypeAt(pe,!1);let vn=E.getTypeAtLocation(pe).getNonOptionalType();if(st)Pn(vn.getNonNullableType(),!1,!1);else{let ln=!1;if(vn.isNullableType()){const Un=ue&&!Ie&&p.includeAutomaticOptionalChainCompletions!==!1;(Un||Ie)&&(vn=vn.getNonNullableType(),Un&&(ln=!0))}Pn(vn,!!(pe.flags&65536),ln)}}}function Pn(lt,st,hi){se=!!lt.getStringIndexType(),Ie&&Ft(lt.getCallSignatures())&&(se=!0);const vn=pe.kind===205?pe:pe.parent;if(N)for(const ln of lt.getApparentProperties())E.isValidPropertyAccessForCompletions(vn,lt,ln)&&_i(ln,!1,hi);else We.push(...$t(z_e(lt,E),ln=>E.isValidPropertyAccessForCompletions(vn,lt,ln)));if(st&&p.includeCompletionsWithInsertText){const ln=E.getPromisedTypeOfPromise(lt);if(ln)for(const Un of ln.getApparentProperties())E.isValidPropertyAccessForCompletions(vn,ln,Un)&&_i(Un,!0,hi)}}function _i(lt,st,hi){var vn;const ln=J(lt.declarations,fi=>Jr(No(fi),Ka));if(ln){const fi=Fi(ln.expression),wi=fi&&E.getSymbolAtLocation(fi),Ri=wi&&COe(wi,oe,E),Ai=Ri&&Ba(Ri);if(Ai&&Pg(et,Ai)){const Xn=We.length;We.push(Ri);const Di=Ri.parent;if(!Di||!H6(Di)||E.tryGetMemberInModuleExportsAndProperties(Ri.name,Di)!==Ri)Nt[Xn]={kind:Bt(2)};else{const on=Gd(zm(Di.name))?(vn=LG(Di))==null?void 0:vn.fileName:void 0,{moduleSpecifier:zi}=(ze||(ze=wh.createImportSpecifierResolver(a,t,C,p))).getModuleSpecifierForBestExportInfo([{exportKind:0,moduleFileName:on,isFromPackageJson:!1,moduleSymbol:Di,symbol:Ri,targetFlags:Vf(Ri,E).flags}],h,Yk(De))||{};if(zi){const cn={kind:Bt(6),moduleSymbol:Di,isDefaultExport:!1,symbolName:Ri.name,exportName:Ri.name,fileName:on,moduleSpecifier:zi};Nt[Xn]=cn}}}else if(p.includeCompletionsWithInsertText){if(Ai&&et.has(Ai))return;Pt(lt),Un(lt),We.push(lt)}}else Pt(lt),Un(lt),We.push(lt);function Un(fi){mzt(fi)&&($e[Ba(fi)]=xh.LocalDeclarationPriority)}function Pt(fi){p.includeCompletionsWithInsertText&&(st&&Pg(et,Ba(fi))?Nt[We.length]={kind:Bt(8)}:hi&&(Nt[We.length]={kind:16}))}function Bt(fi){return hi?fi|16:fi}}function Fi(lt){return ot(lt)?lt:Nr(lt)?Fi(lt.expression):void 0}function On(){return(ac()||St()||Fs()||ri()||xe()||pt()||pn()||Se()||qr()||(ko(),1))===1}function pn(){return gt(oe)?(He=5,se=!0,qe=4,1):0}function qr(){const lt=Je(oe),st=lt&&E.getContextualType(lt.attributes);if(!st)return 0;const hi=lt&&E.getContextualType(lt.attributes,4);return We=Js(We,be(j_e(st,hi,lt.attributes,E),lt.attributes.properties)),tt(),He=3,se=!1,1}function Fs(){return Te?(se=!0,yi(),1):0}function ko(){qe=Dt(oe)?5:1,He=1,se=ka(),re!==oe&&j.assert(!!re,"Expected 'contextToken' to be defined when different from 'previousToken'.");const lt=re!==oe?re.getStart():h,st=Xr(oe,lt,a)||a;X=Qs(st);const hi=(Me?0:111551)|788968|1920|2097152,vn=re&&!Yk(re);We=Js(We,E.getSymbolsInScope(st,hi)),j.assertEachIsDefined(We,"getSymbolsInScope() should all be defined");for(let ln=0;ln<We.length;ln++){const Un=We[ln];if(!E.isArgumentsSymbol(Un)&&!Ft(Un.declarations,Pt=>Pt.getSourceFile()===a)&&($e[Ba(Un)]=xh.GlobalsOrKeywords),vn&&!(Un.flags&111551)){const Pt=Un.declarations&&Fe(Un.declarations,v8);if(Pt){const Bt={kind:64,declaration:Pt};Nt[ln]=Bt}}}if(p.includeCompletionsWithInsertText&&st.kind!==307){const ln=E.tryGetThisTypeAt(st,!1,ss(st.parent)?st:void 0);if(ln&&!pzt(ln,a,E))for(const Un of z_e(ln,E))Nt[We.length]={kind:1},We.push(Un),$e[Ba(Un)]=xh.SuggestedClassMembers}yi(),Me&&(qe=oe&&Hk(oe.parent)?6:7)}function ls(){var lt;return Te?!0:p.includeCompletionsForModuleExports?a.externalModuleIndicator||a.commonJsModuleIndicator||zfe(t.getCompilerOptions())?!0:((lt=t.getSymlinkCache)==null?void 0:lt.call(t).hasAnySymlinks())||!!t.getCompilerOptions().paths||fAe(t):!1}function Qs(lt){switch(lt.kind){case 307:case 228:case 294:case 241:return!0;default:return Ps(lt)}}function Mn(){return U||q||!!Te&&Kw(De.parent)||!Zs(oe)&&(_j(oe,a,E)||N1(De)||at(oe))}function Zs(lt){return lt&&(lt.kind===114&&(lt.parent.kind===186||S3(lt.parent))||lt.kind===131&&lt.parent.kind===182)}function at(lt){if(lt){const st=lt.parent.kind;switch(lt.kind){case 59:return st===172||st===171||st===169||st===260||tP(st);case 64:return st===265||st===168;case 130:return st===234;case 30:return st===183||st===216;case 96:return st===168;case 152:return st===238}}return!1}function yi(){var lt,st;if(!ls()||(j.assert(!(g!=null&&g.data),"Should not run 'collectAutoImports' when faster path is available via `data`"),g&&!g.source))return;Ne|=1;const vn=re===oe&&Te?"":re&&ot(re)?re.text.toLowerCase():"",ln=(lt=C.getModuleSpecifierCache)==null?void 0:lt.call(C),Un=Pj(a,C,t,p,T),Pt=(st=C.getPackageJsonAutoImportProvider)==null?void 0:st.call(C),Bt=g?void 0:nO(a,p,C);Nut("collectAutoImports",C,ze||(ze=wh.createImportSpecifierResolver(a,t,C,p)),t,h,p,!!Te,Yk(De),wi=>{Un.search(a.path,we,(Ri,Ai)=>{if(!J_(Ri,Ja(C.getCompilationSettings()))||!g&&gP(Ri)||!Me&&!Te&&!(Ai&111551)||Me&&!(Ai&790504))return!1;const Xn=Ri.charCodeAt(0);return we&&(Xn<65||Xn>90)?!1:g?!0:rdt(Ri,vn)},(Ri,Ai,Xn,Di)=>{if(g&&!Ft(Ri,Wo=>g.source===zm(Wo.moduleSymbol.name))||(Ri=$t(Ri,fi),!Ri.length))return;const on=wi.tryResolve(Ri,Xn)||{};if(on==="failed")return;let zi=Ri[0],cn;on!=="skipped"&&({exportInfo:zi=Ri[0],moduleSpecifier:cn}=on);const vi=zi.exportKind===1,qo=vi&&$8(j.checkDefined(zi.symbol))||j.checkDefined(zi.symbol);Sn(qo,{kind:cn?32:4,moduleSpecifier:cn,symbolName:Ai,exportMapKey:Di,exportName:zi.exportKind===2?"export=":j.checkDefined(zi.symbol).name,fileName:zi.moduleFileName,isDefaultExport:vi,moduleSymbol:zi.moduleSymbol,isFromPackageJson:zi.isFromPackageJson})}),Pe=wi.skippedAny(),Ne|=wi.resolvedAny()?8:0,Ne|=wi.resolvedBeyondLimit()?16:0});function fi(wi){const Ri=Jr(wi.moduleSymbol.valueDeclaration,Os);if(!Ri){const Ai=zm(wi.moduleSymbol.name);return J1.nodeCoreModules.has(Ai)&&so(Ai,"node:")!==qZ(a,t)?!1:((Bt==null?void 0:Bt.allowsImportingAmbientModule(wi.moduleSymbol,ut(wi.isFromPackageJson)))??!0)||Lj(a,Ai)}return Che(wi.isFromPackageJson?Pt:t,a,Ri,p,Bt,ut(wi.isFromPackageJson),ln)}}function Sn(lt,st){const hi=Ba(lt);$e[hi]!==xh.GlobalsOrKeywords&&(Nt[We.length]=st,$e[hi]=Te?xh.LocationPriority:xh.AutoImportSuggestions,We.push(lt))}function dr(lt,st){nr(De)||lt.forEach(hi=>{if(!us(hi))return;const vn=W_e(hi,Ja(u),void 0,0,!1);if(!vn)return;const{name:ln}=vn,Un=Gjt(hi,ln,st,t,C,u,p,b);if(!Un)return;const Pt={kind:128,...Un};Ne|=32,Nt[We.length]=Pt,We.push(hi)})}function us(lt){return!!(lt.flags&8196)}function Xr(lt,st,hi){let vn=lt;for(;vn&&!Efe(vn,st,hi);)vn=vn.parent;return vn}function Gs(lt){const st=sl(),hi=Ji(lt)||Ct(lt)||Ni(lt)||ma(lt)||p7(lt);return r("getCompletionsAtPosition: isCompletionListBlocker: "+(sl()-st)),hi}function ma(lt){if(lt.kind===12)return!0;if(lt.kind===32&&lt.parent){if(De===lt.parent&&(De.kind===286||De.kind===285))return!1;if(lt.parent.kind===286)return De.parent.kind!==286;if(lt.parent.kind===287||lt.parent.kind===285)return!!lt.parent.parent&&lt.parent.parent.kind===284}return!1}function ka(){if(oe){const lt=oe.parent.kind,st=H_e(oe);switch(st){case 28:return lt===213||lt===176||lt===214||lt===209||lt===226||lt===184||lt===210;case 21:return lt===213||lt===176||lt===214||lt===217||lt===196;case 23:return lt===209||lt===181||lt===167;case 144:case 145:case 102:return!0;case 25:return lt===267;case 19:return lt===263||lt===210;case 64:return lt===260||lt===226;case 16:return lt===228;case 17:return lt===239;case 134:return lt===174||lt===304;case 42:return lt===174}if(TY(st))return!0}return!1}function Ji(lt){return(ale(lt)||eae(lt))&&(dj(lt,h)||h===lt.end&&(!!lt.isUnterminated||ale(lt)))}function ac(){const lt=hzt(oe);if(!lt)return 0;const hi=(zP(lt.parent)?lt.parent:void 0)||lt,vn=Qut(hi,E);if(!vn)return 0;const ln=E.getTypeFromTypeNode(hi),Un=z_e(vn,E),Pt=z_e(ln,E),Bt=new Set;return Pt.forEach(fi=>Bt.add(fi.escapedName)),We=Js(We,$t(Un,fi=>!Bt.has(fi.escapedName))),He=0,se=!0,1}function St(){if((oe==null?void 0:oe.kind)===26)return 0;const lt=We.length,st=azt(oe,h,a);if(!st)return 0;He=0;let hi,vn;if(st.kind===210){const ln=gzt(st,E);if(ln===void 0)return st.flags&67108864?2:0;const Un=E.getContextualType(st,4),Pt=(Un||ln).getStringIndexType(),Bt=(Un||ln).getNumberIndexType();if(se=!!Pt||!!Bt,hi=j_e(ln,Un,st,E),vn=st.properties,hi.length===0&&!Bt)return 0}else{j.assert(st.kind===206),se=!1;const ln=A1(st.parent);if(!uP(ln))return j.fail("Root declaration is not variable-like.");let Un=aS(ln)||!!dd(ln)||ln.parent.parent.kind===250;if(!Un&&ln.kind===169&&(jt(ln.parent)?Un=!!E.getContextualType(ln.parent):(ln.parent.kind===174||ln.parent.kind===178)&&(Un=jt(ln.parent.parent)&&!!E.getContextualType(ln.parent.parent))),Un){const Pt=E.getTypeAtLocation(st);if(!Pt)return 2;hi=E.getPropertiesOfType(Pt).filter(Bt=>E.isPropertyAccessible(st,!1,!1,Pt,Bt)),vn=st.elements}}if(hi&&hi.length>0){const ln=gr(hi,j.checkDefined(vn));We=Js(We,ln),tt(),st.kind===210&&p.includeCompletionsWithObjectLiteralMethodSnippets&&p.includeCompletionsWithInsertText&&(le(lt),dr(ln,st))}return 1}function ri(){if(!oe)return 0;const lt=oe.kind===19||oe.kind===28?Jr(oe.parent,NK):EZ(oe)?Jr(oe.parent.parent,NK):void 0;if(!lt)return 0;EZ(oe)||(qe=8);const{moduleSpecifier:st}=lt.kind===275?lt.parent.parent:lt.parent;if(!st)return se=!0,lt.kind===275?2:0;const hi=E.getSymbolAtLocation(st);if(!hi)return se=!0,2;He=3,se=!1;const vn=E.getExportsAndPropertiesOfModule(hi),ln=new Set(lt.elements.filter(Pt=>!Qt(Pt)).map(Pt=>FT(Pt.propertyName||Pt.name))),Un=vn.filter(Pt=>Pt.escapedName!=="default"&&!ln.has(Pt.escapedName));return We=Js(We,Un),Un.length||(qe=0),1}function xe(){if(oe===void 0)return 0;const lt=oe.kind===19||oe.kind===28?Jr(oe.parent,LI):oe.kind===59?Jr(oe.parent.parent,LI):void 0;if(lt===void 0)return 0;const st=new Set(lt.elements.map(sX));return We=$t(E.getTypeAtLocation(lt).getApparentProperties(),hi=>!st.has(hi.escapedName)),1}function pt(){var lt;const st=oe&&(oe.kind===19||oe.kind===28)?Jr(oe.parent,Xm):void 0;if(!st)return 0;const hi=Qi(st,om(Os,rd));return He=5,se=!1,(lt=hi.locals)==null||lt.forEach((vn,ln)=>{var Un,Pt;We.push(vn),(Pt=(Un=hi.symbol)==null?void 0:Un.exports)!=null&&Pt.has(ln)&&($e[Ba(vn)]=xh.OptionalMember)}),1}function Se(){const lt=fzt(a,oe,De,h);if(!lt)return 0;if(He=3,se=!0,qe=oe.kind===42?0:ss(lt)?2:3,!ss(lt))return 1;const st=oe.kind===27?oe.parent.parent:oe.parent;let hi=Od(st)?jh(st):0;if(oe.kind===80&&!Qt(oe))switch(oe.getText()){case"private":hi=hi|2;break;case"static":hi=hi|256;break;case"override":hi=hi|16;break}if(gu(st)&&(hi|=256),!(hi&2)){const vn=ss(lt)&&hi&16?KL(L1(lt)):F8(lt),ln=Rr(vn,Un=>{const Pt=E.getTypeAtLocation(Un);return hi&256?(Pt==null?void 0:Pt.symbol)&&E.getPropertiesOfType(E.getTypeOfSymbolAtLocation(Pt.symbol,lt)):Pt&&E.getPropertiesOfType(Pt)});We=Js(We,Ue(ln,lt.members,hi)),O(We,(Un,Pt)=>{const Bt=Un==null?void 0:Un.valueDeclaration;if(Bt&&Od(Bt)&&Bt.name&&Ka(Bt.name)){const fi={kind:512,symbolName:E.symbolToString(Un)};Nt[Pt]=fi}})}return 1}function Ze(lt){return!!lt.parent&&$s(lt.parent)&&iu(lt.parent.parent)&&(b8(lt.kind)||Wy(lt))}function gt(lt){if(lt){const st=lt.parent;switch(lt.kind){case 21:case 28:return iu(lt.parent)?lt.parent:void 0;default:if(Ze(lt))return st.parent}}}function Dt(lt){if(lt){let st;const hi=Qi(lt.parent,vn=>ss(vn)?"quit":Qc(vn)&&st===vn.body?!0:(st=vn,!1));return hi&&hi}}function Je(lt){if(lt){const st=lt.parent;switch(lt.kind){case 32:case 31:case 44:case 80:case 211:case 292:case 291:case 293:if(st&&(st.kind===285||st.kind===286)){if(lt.kind===32){const hi=xd(lt.pos,a,void 0);if(!st.typeArguments||hi&&hi.kind===44)break}return st}else if(st.kind===291)return st.parent.parent;break;case 11:if(st&&(st.kind===291||st.kind===293))return st.parent.parent;break;case 20:if(st&&st.kind===294&&st.parent&&st.parent.kind===291)return st.parent.parent.parent;if(st&&st.kind===293)return st.parent.parent;break}}}function Rt(lt,st){return a.getLineEndOfPosition(lt.getEnd())<st}function Ct(lt){const st=lt.parent,hi=st.kind;switch(lt.kind){case 28:return hi===260||ji(lt)||hi===243||hi===266||vt(hi)||hi===264||hi===207||hi===265||ss(st)&&!!st.typeParameters&&st.typeParameters.end>=lt.pos;case 25:return hi===207;case 59:return hi===208;case 23:return hi===207;case 21:return hi===299||vt(hi);case 19:return hi===266;case 30:return hi===263||hi===231||hi===264||hi===265||tP(hi);case 126:return hi===172&&!ss(st.parent);case 26:return hi===169||!!st.parent&&st.parent.kind===207;case 125:case 123:case 124:return hi===169&&!iu(st.parent);case 130:return hi===276||hi===281||hi===274;case 139:case 153:return!U_e(lt);case 80:{if(hi===276&&lt===st.name&&lt.text==="type"||Qi(lt.parent,_s)&&Rt(lt,h))return!1;break}case 86:case 94:case 120:case 100:case 115:case 102:case 121:case 87:case 140:return!0;case 156:return hi!==276;case 42:return Ho(lt.parent)&&!Nu(lt.parent)}if(TY(H_e(lt))&&U_e(lt)||Ze(lt)&&(!ot(lt)||b8(H_e(lt))||Qt(lt)))return!1;switch(H_e(lt)){case 128:case 86:case 87:case 138:case 94:case 100:case 120:case 121:case 123:case 124:case 125:case 126:case 115:return!0;case 134:return Lo(lt.parent)}if(Qi(lt.parent,ss)&&lt===re&&ii(lt,h))return!1;const ln=Xk(lt.parent,172);if(ln&&lt!==re&&ss(re.parent.parent)&&h<=re.end){if(ii(lt,re.end))return!1;if(lt.kind!==64&&(HH(ln)||wG(ln)))return!0}return Wy(lt)&&!lh(lt.parent)&&!U1(lt.parent)&&!((ss(lt.parent)||zf(lt.parent)||$l(lt.parent))&&(lt!==re||h>re.end))}function ii(lt,st){return lt.kind!==64&&(lt.kind===27||!qm(lt.end,st,a))}function vt(lt){return tP(lt)&&lt!==176}function Ni(lt){if(lt.kind===9){const st=lt.getFullText();return st.charAt(st.length-1)==="."}return!1}function ji(lt){return lt.parent.kind===261&&!_j(lt,a,E)}function gr(lt,st){if(st.length===0)return lt;const hi=new Set,vn=new Set;for(const Un of st){if(Un.kind!==303&&Un.kind!==304&&Un.kind!==208&&Un.kind!==174&&Un.kind!==177&&Un.kind!==178&&Un.kind!==305||Qt(Un))continue;let Pt;if(Kv(Un))te(Un,hi);else if(ec(Un)&&Un.propertyName)Un.propertyName.kind===80&&(Pt=Un.propertyName.escapedText);else{const Bt=No(Un);Pt=Bt&&P1(Bt)?V8(Bt):void 0}Pt!==void 0&&vn.add(Pt)}const ln=lt.filter(Un=>!vn.has(Un.escapedName));return Gt(hi,ln),ln}function te(lt,st){const hi=lt.expression,vn=E.getSymbolAtLocation(hi),ln=vn&&E.getTypeOfSymbolAtLocation(vn,hi),Un=ln&&ln.properties;Un&&Un.forEach(Pt=>{st.add(Pt.name)})}function tt(){We.forEach(lt=>{if(lt.flags&16777216){const st=Ba(lt);$e[st]=$e[st]??xh.OptionalMember}})}function Gt(lt,st){if(lt.size!==0)for(const hi of st)lt.has(hi.name)&&($e[Ba(hi)]=xh.MemberDeclaredBySpreadAssignment)}function le(lt){for(let st=lt;st<We.length;st++){const hi=We[st],vn=Ba(hi),ln=Nt==null?void 0:Nt[st],Un=Ja(u),Pt=W_e(hi,Un,ln,0,!1);if(Pt){const Bt=$e[vn]??xh.LocationPriority,{name:fi}=Pt;$e[vn]=xh.ObjectLiteralProperty(Bt,fi)}}}function Ue(lt,st,hi){const vn=new Set;for(const ln of st){if(ln.kind!==172&&ln.kind!==174&&ln.kind!==177&&ln.kind!==178||Qt(ln)||xp(ln,2)||pa(ln)!==!!(hi&256))continue;const Un=CI(ln.name);Un&&vn.add(Un)}return lt.filter(ln=>!vn.has(ln.escapedName)&&!!ln.declarations&&!($m(ln)&2)&&!(ln.valueDeclaration&&Wh(ln.valueDeclaration)))}function be(lt,st){const hi=new Set,vn=new Set;for(const Un of st)Qt(Un)||(Un.kind===291?hi.add(u7(Un.name)):GP(Un)&&te(Un,vn));const ln=lt.filter(Un=>!hi.has(Un.escapedName));return Gt(vn,ln),ln}function Qt(lt){return lt.getStart(a)<=h&&h<=lt.getEnd()}}function azt(t,r,a){var u;if(t){const{parent:h}=t;switch(t.kind){case 19:case 28:if(Aa(h)||dm(h))return h;break;case 42:return Nu(h)?Jr(h.parent,Aa):void 0;case 134:return Jr(h.parent,Aa);case 80:if(t.text==="async"&&lh(t.parent))return t.parent.parent;{if(Aa(t.parent.parent)&&(Kv(t.parent)||lh(t.parent)&&Ia(a,t.getEnd()).line!==Ia(a,r).line))return t.parent.parent;const g=Qi(h,_d);if((g==null?void 0:g.getLastToken(a))===t&&Aa(g.parent))return g.parent}break;default:if((u=h.parent)!=null&&u.parent&&(Nu(h.parent)||um(h.parent)||kp(h.parent))&&Aa(h.parent.parent))return h.parent.parent;if(Kv(h)&&Aa(h.parent))return h.parent;const p=Qi(h,_d);if(t.kind!==59&&(p==null?void 0:p.getLastToken(a))===t&&Aa(p.parent))return p.parent}}}function B_e(t,r){const a=xd(t,r);return a&&t<=a.end&&(Mv(a)||P_(a.kind))?{contextToken:xd(a.getFullStart(),r,void 0),previousToken:a}:{contextToken:a,previousToken:a}}function Uut(t,r,a,u){const h=r.isPackageJsonImport?u.getPackageJsonAutoImportProvider():a,p=h.getTypeChecker(),g=r.ambientModuleName?p.tryFindAmbientModule(r.ambientModuleName):r.fileName?p.getMergedSymbol(j.checkDefined(h.getSourceFile(r.fileName)).symbol):void 0;if(!g)return;let C=r.exportName==="export="?p.resolveExternalModuleSymbol(g):p.tryGetMemberInModuleExportsAndProperties(r.exportName,g);return C?(C=r.exportName==="default"&&$8(C)||C,{symbol:C,origin:Xjt(r,t,g)}):void 0}function W_e(t,r,a,u,h){if(Ljt(a))return;const p=Djt(a)?a.symbolName:t.name;if(p===void 0||t.flags&1536&&_V(p.charCodeAt(0))||LV(t))return;const g={name:p,needsConvertPropertyAccess:!1};if(J_(p,r,h?1:0)||t.valueDeclaration&&Wh(t.valueDeclaration))return g;if(t.flags&2097152)return{name:p,needsConvertPropertyAccess:!0};switch(u){case 3:return _Oe(a)?{name:a.symbolName,needsConvertPropertyAccess:!1}:void 0;case 0:return{name:JSON.stringify(p),needsConvertPropertyAccess:!1};case 2:case 1:return p.charCodeAt(0)===32?void 0:{name:p,needsConvertPropertyAccess:!0};case 5:case 4:return g;default:j.assertNever(u)}}var V_e=[],qut=Bh(()=>{const t=[];for(let r=83;r<=165;r++)t.push({name:xa(r),kind:"keyword",kindModifiers:"",sortText:xh.GlobalsOrKeywords});return t});function $ut(t,r){if(!r)return Jut(t);const a=t+8+1;return V_e[a]||(V_e[a]=Jut(t).filter(u=>!czt(oI(u.name))))}function Jut(t){return V_e[t]||(V_e[t]=qut().filter(r=>{const a=oI(r.name);switch(t){case 0:return!1;case 1:return Kut(a)||a===138||a===144||a===156||a===145||a===128||c5(a)&&a!==157;case 5:return Kut(a);case 2:return TY(a);case 3:return Gut(a);case 4:return b8(a);case 6:return c5(a)||a===87;case 7:return c5(a);case 8:return a===156;default:return j.assertNever(t)}}))}function czt(t){switch(t){case 128:case 133:case 163:case 136:case 138:case 94:case 162:case 119:case 140:case 120:case 142:case 143:case 144:case 145:case 146:case 150:case 151:case 164:case 123:case 124:case 125:case 148:case 154:case 155:case 156:case 158:case 159:return!0;default:return!1}}function Gut(t){return t===148}function TY(t){switch(t){case 128:case 129:case 137:case 139:case 153:case 134:case 138:case 164:return!0;default:return tae(t)}}function Kut(t){return t===134||t===135||t===160||t===130||t===152||t===156||!aK(t)&&!TY(t)}function H_e(t){return ot(t)?aI(t)??0:t.kind}function lzt(t,r){const a=[];if(t){const u=t.getSourceFile(),h=t.parent,p=u.getLineAndCharacterOfPosition(t.end).line,g=u.getLineAndCharacterOfPosition(r).line;(du(h)||Ju(h)&&h.moduleSpecifier)&&t===h.moduleSpecifier&&p===g&&a.push({name:xa(132),kind:"keyword",kindModifiers:"",sortText:xh.GlobalsOrKeywords})}return a}function uzt(t,r){return Qi(t,a=>V6(a)&&s5(a,r)?!0:z0(a)?"quit":!1)}function j_e(t,r,a,u){const h=r&&r!==t,p=u.getUnionType($t(t.flags&1048576?t.types:[t],T=>!u.getPromisedTypeOfPromise(T))),g=h&&!(r.flags&3)?u.getUnionType([p,r]):p,C=dzt(g,a,u);return g.isClass()&&Xut(C)?[]:h?$t(C,b):C;function b(T){return P(T.declarations)?Ft(T.declarations,E=>E.parent!==a):!0}}function dzt(t,r,a){return t.isUnion()?a.getAllPossiblePropertiesOfTypes($t(t.types,u=>!(u.flags&402784252||a.isArrayLikeType(u)||a.isTypeInvalidDueToUnionDiscriminant(u,r)||a.typeHasCallOrConstructSignatures(u)||u.isClass()&&Xut(u.getApparentProperties())))):t.getApparentProperties()}function Xut(t){return Ft(t,r=>!!($m(r)&6))}function z_e(t,r){return t.isUnion()?j.checkEachDefined(r.getAllPossiblePropertiesOfTypes(t.types),"getAllPossiblePropertiesOfTypes() should all be defined"):j.checkEachDefined(t.getApparentProperties(),"getApparentProperties() should all be defined")}function fzt(t,r,a,u){switch(a.kind){case 352:return Jr(a.parent,xP);case 1:const h=Jr(rl(ha(a.parent,Os).statements),xP);if(h&&!Uc(h,20,t))return h;break;case 81:if(Jr(a.parent,Lo))return Qi(a,ss);break;case 80:{if(aI(a)||Lo(a.parent)&&a.parent.initializer===a)return;if(U_e(a))return Qi(a,xP)}}if(r){if(a.kind===137||ot(r)&&Lo(r.parent)&&ss(a))return Qi(r,ss);switch(r.kind){case 64:return;case 27:case 20:return U_e(a)&&a.parent.name===a?a.parent.parent:Jr(a,xP);case 19:case 28:return Jr(r.parent,xP);default:if(xP(a)){if(Ia(t,r.getEnd()).line!==Ia(t,u).line)return a;const h=ss(r.parent.parent)?TY:Gut;return h(r.kind)||r.kind===42||ot(r)&&h(aI(r)??0)?r.parent.parent:void 0}return}}}function hzt(t){if(!t)return;const r=t.parent;switch(t.kind){case 19:if(a_(r))return r;break;case 27:case 28:case 80:if(r.kind===171&&a_(r.parent))return r.parent;break}}function Qut(t,r){if(!t)return;if(ws(t)&&xG(t.parent))return r.getTypeArgumentConstraint(t);const a=Qut(t.parent,r);if(a)switch(t.kind){case 171:return r.getTypeOfPropertyOfContextualType(a,t.symbol.escapedName);case 193:case 187:case 192:return a}}function U_e(t){return t.parent&&mG(t.parent)&&xP(t.parent.parent)}function _zt(t,r,a,u){switch(r){case".":case"@":return!0;case'"':case"'":case"`":return!!a&&IAe(a)&&u===a.getStart(t)+1;case"#":return!!a&&Vs(a)&&!!Cf(a);case"<":return!!a&&a.kind===30&&(!ur(a.parent)||Zut(a.parent));case"/":return!!a&&(Bc(a)?!!CV(a):a.kind===44&&oD(a.parent));case" ":return!!a&&y7(a)&&a.parent.kind===307;default:return j.assertNever(r)}}function Zut({left:t}){return lu(t)}function pzt(t,r,a){const u=a.resolveName("self",void 0,111551,!1);if(u&&a.getTypeOfSymbolAtLocation(u,r)===t)return!0;const h=a.resolveName("global",void 0,111551,!1);if(h&&a.getTypeOfSymbolAtLocation(h,r)===t)return!0;const p=a.resolveName("globalThis",void 0,111551,!1);return!!(p&&a.getTypeOfSymbolAtLocation(p,r)===t)}function mzt(t){return!!(t.valueDeclaration&&jh(t.valueDeclaration)&256&&ss(t.valueDeclaration.parent))}function gzt(t,r){const a=r.getContextualType(t);if(a)return a;const u=By(t.parent);if(ur(u)&&u.operatorToken.kind===64&&t===u.left)return r.getTypeAtLocation(u);if(jt(u))return r.getContextualType(u)}function Yut(t,r){var a,u,h;let p,g=!1;const C=b();return{isKeywordOnlyCompletion:g,keywordCompletion:p,isNewIdentifierLocation:!!(C||p===156),isTopLevelTypeOnly:!!((u=(a=Jr(C,du))==null?void 0:a.importClause)!=null&&u.isTypeOnly)||!!((h=Jr(C,Wd))!=null&&h.isTypeOnly),couldBeTypeOnlyImportSpecifier:!!C&&tdt(C,t),replacementSpan:yzt(C)};function b(){const T=t.parent;if(Wd(T)){const E=T.getLastToken(r);if(ot(t)&&E!==t){p=161,g=!0;return}return p=t.kind===156?void 0:156,SOe(T.moduleReference)?T:void 0}if(tdt(T,t)&&idt(T.parent))return T;if(j1(T)||Jv(T)){if(!T.parent.isTypeOnly&&(t.kind===19||t.kind===102||t.kind===28)&&(p=156),idt(T))if(t.kind===20||t.kind===80)g=!0,p=161;else return T.parent.parent;return}if(Ju(T)&&t.kind===42||Xm(T)&&t.kind===20){g=!0,p=161;return}if(y7(t)&&Os(T))return p=156,t;if(y7(t)&&du(T))return p=156,SOe(T.moduleSpecifier)?T:void 0}}function yzt(t){var r;if(!t)return;const a=Qi(t,om(du,Wd,q1))??t,u=a.getSourceFile();if(wI(a,u))return f_(a,u);j.assert(a.kind!==102&&a.kind!==276);const h=a.kind===272||a.kind===351?edt((r=a.importClause)==null?void 0:r.namedBindings)??a.moduleSpecifier:a.moduleReference,p={pos:a.getFirstToken().getStart(),end:h.pos};if(wI(p,u))return DS(p)}function edt(t){var r;return Fe((r=Jr(t,j1))==null?void 0:r.elements,a=>{var u;return!a.propertyName&&gP(a.name.text)&&((u=xd(a.name.pos,t.getSourceFile(),t))==null?void 0:u.kind)!==28})}function tdt(t,r){return l_(t)&&(t.isTypeOnly||r===t.name&&EZ(r))}function idt(t){if(!SOe(t.parent.parent.moduleSpecifier)||t.parent.name)return!1;if(j1(t)){const r=edt(t);return(r?t.elements.indexOf(r):t.elements.length)<2}return!0}function SOe(t){var r;return lu(t)?!0:!((r=Jr(eC(t)?t.expression:t,Bc))!=null&&r.text)}function vzt(t,r){if(!t)return;const a=Qi(t,h=>WT(h)||ndt(h)||ta(h)?"quit":($s(h)||$l(h))&&!eD(h.parent)),u=Qi(r,h=>WT(h)||ndt(h)||ta(h)?"quit":_s(h));return a||u}function ndt(t){return t.parent&&xl(t.parent)&&(t.parent.body===t||t.kind===39)}function wOe(t,r,a=new Map){return u(t)||u(Vf(t.exportSymbol||t,r));function u(h){return!!(h.flags&788968)||r.isUnknownSymbol(h)||!!(h.flags&1536)&&Pg(a,Ba(h))&&r.getExportsOfModule(h).some(p=>wOe(p,r,a))}}function bzt(t,r){const a=Vf(t,r).declarations;return!!P(a)&&Ce(a,UZ)}function rdt(t,r){if(r.length===0)return!0;let a=!1,u,h=0;const p=t.length;for(let g=0;g<p;g++){const C=t.charCodeAt(g),b=r.charCodeAt(h);if((C===b||C===Czt(b))&&(a||(a=u===void 0||97<=u&&u<=122&&65<=C&&C<=90||u===95&&C!==95),a&&h++,h===r.length))return!0;u=C}return!1}function Czt(t){return 97<=t&&t<=122?t-32:t}function Szt(t){return t==="abstract"||t==="async"||t==="await"||t==="declare"||t==="module"||t==="namespace"||t==="type"||t==="satisfies"||t==="as"}var q_e={};c(q_e,{getStringLiteralCompletionDetails:()=>kzt,getStringLiteralCompletions:()=>wzt});var sdt={directory:0,script:1,"external module name":2};function xOe(){const t=new Map;function r(a){const u=t.get(a.name);(!u||sdt[u.kind]<sdt[a.kind])&&t.set(a.name,a)}return{add:r,has:t.has.bind(t),values:t.values.bind(t)}}function wzt(t,r,a,u,h,p,g,C,b){if(uAe(t,r)){const T=Wzt(t,r,p,h);return T&&odt(T)}if(lA(t,r,a)){if(!a||!Bc(a))return;const T=cdt(t,a,r,p,h,C);return xzt(T,a,t,h,p,g,u,C,r,b)}}function xzt(t,r,a,u,h,p,g,C,b,T){if(t===void 0)return;const E=Wfe(r,b);switch(t.kind){case 0:return odt(t.paths);case 1:{const N=Lk();return yOe(t.symbols,N,r,r,a,b,a,u,h,99,p,4,C,g,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,T),{isGlobalCompletion:!1,isMemberCompletion:!0,isNewIdentifierLocation:t.hasIndexSignature,optionalReplacementSpan:E,entries:N,defaultCommitCharacters:GI(t.hasIndexSignature)}}case 2:{const N=r.kind===15?96:so(uu(r),"'")?39:34,R=t.types.map(F=>({name:Vy(F.value,N),kindModifiers:"",kind:"string",sortText:xh.LocationPriority,replacementSpan:Bfe(r,b),commitCharacters:[]}));return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:t.isNewIdentifier,optionalReplacementSpan:E,entries:R,defaultCommitCharacters:GI(t.isNewIdentifier)}}default:return j.assertNever(t)}}function kzt(t,r,a,u,h,p,g,C){if(!u||!Bc(u))return;const b=cdt(r,u,a,h,p,C);return b&&Tzt(t,u,b,r,h.getTypeChecker(),g)}function Tzt(t,r,a,u,h,p){switch(a.kind){case 0:{const g=Fe(a.paths,C=>C.name===t);return g&&kY(t,adt(g.extension),g.kind,[pm(t)])}case 1:{const g=Fe(a.symbols,C=>C.name===t);return g&&bOe(g,g.name,h,u,r,p)}case 2:return Fe(a.types,g=>g.value===t)?kY(t,"","string",[pm(t)]):void 0;default:return j.assertNever(a)}}function odt(t){return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!0,entries:t.map(({name:h,kind:p,span:g,extension:C})=>({name:h,kind:p,kindModifiers:adt(C),sortText:xh.LocationPriority,replacementSpan:g})),defaultCommitCharacters:GI(!0)}}function adt(t){switch(t){case".d.ts":return".d.ts";case".js":return".js";case".json":return".json";case".jsx":return".jsx";case".ts":return".ts";case".tsx":return".tsx";case".d.mts":return".d.mts";case".mjs":return".mjs";case".mts":return".mts";case".d.cts":return".d.cts";case".cjs":return".cjs";case".cts":return".cts";case".tsbuildinfo":return j.fail("Extension .tsbuildinfo is unsupported.");case void 0:return"";default:return j.assertNever(t)}}function cdt(t,r,a,u,h,p){const g=u.getTypeChecker(),C=kOe(r.parent);switch(C.kind){case 201:{const re=kOe(C.parent);return re.kind===205?{kind:0,paths:ddt(t,r,u,h,p)}:b(re)}case 303:return Aa(C.parent)&&C.name===r?Izt(g,C.parent):T()||T(0);case 212:{const{expression:re,argumentExpression:oe}=C;return r===Dc(oe)?ldt(g.getTypeAtLocation(re)):void 0}case 213:case 214:case 291:if(!qzt(r)&&!zp(C)){const re=ez.getArgumentInfoForCompletions(C.kind===291?C.parent:r,a,t,g);return re&&Ezt(re.invocation,r,re,g)||T(0)}case 272:case 278:case 283:case 351:return{kind:0,paths:ddt(t,r,u,h,p)};case 296:const E=JZ(g,C.parent.clauses),N=T();return N?{kind:2,types:N.types.filter(re=>!E.hasValue(re.value)),isNewIdentifier:!1}:void 0;case 276:case 281:const F=C;if(F.propertyName&&r!==F.propertyName)return;const H=F.parent,{moduleSpecifier:U}=H.kind===275?H.parent.parent:H.parent;if(!U)return;const q=g.getSymbolAtLocation(U);if(!q)return;const X=g.getExportsAndPropertiesOfModule(q),Z=new Set(H.elements.map(re=>FT(re.propertyName||re.name)));return{kind:1,symbols:X.filter(re=>re.escapedName!=="default"&&!Z.has(re.escapedName)),hasIndexSignature:!1};default:return T()||T(0)}function b(E){switch(E.kind){case 233:case 183:{const F=Qi(C,H=>H.parent===E);return F?{kind:2,types:$_e(g.getTypeArgumentConstraint(F)),isNewIdentifier:!1}:void 0}case 199:const{indexType:N,objectType:R}=E;return s5(N,a)?ldt(g.getTypeFromTypeNode(R)):void 0;case 192:{const F=b(kOe(E.parent));if(!F)return;const H=Dzt(E,C);return F.kind===1?{kind:1,symbols:F.symbols.filter(U=>!Yt(H,U.name)),hasIndexSignature:F.hasIndexSignature}:{kind:2,types:F.types.filter(U=>!Yt(H,U.value)),isNewIdentifier:!1}}default:return}}function T(E=4){const N=$_e(RZ(r,g,E));if(N.length)return{kind:2,types:N,isNewIdentifier:!1}}}function kOe(t){switch(t.kind){case 196:return TV(t);case 217:return By(t);default:return t}}function Dzt(t,r){return es(t.types,a=>a!==r&&bS(a)&&Ha(a.literal)?a.literal.text:void 0)}function Ezt(t,r,a,u){let h=!1;const p=new Map,g=oh(t)?j.checkDefined(Qi(r.parent,U1)):r,C=u.getCandidateSignaturesForStringLiteralCompletions(t,g),b=Rr(C,T=>{if(!Ch(T)&&a.argumentCount>T.parameters.length)return;let E=T.getTypeParameterAtPosition(a.argumentIndex);if(oh(t)){const N=u.getTypeOfPropertyOfType(E,iH(g.name));N&&(E=N)}return h=h||!!(E.flags&4),$_e(E,p)});return P(b)?{kind:2,types:b,isNewIdentifier:h}:void 0}function ldt(t){return t&&{kind:1,symbols:$t(t.getApparentProperties(),r=>!(r.valueDeclaration&&Wh(r.valueDeclaration))),hasIndexSignature:ahe(t)}}function Izt(t,r){const a=t.getContextualType(r);if(!a)return;const u=t.getContextualType(r,4);return{kind:1,symbols:j_e(a,u,r,t),hasIndexSignature:ahe(a)}}function $_e(t,r=new Map){return t?(t=jfe(t),t.isUnion()?Rr(t.types,a=>$_e(a,r)):t.isStringLiteral()&&!(t.flags&1024)&&Pg(r,t.value)?[t]:w):w}function T5(t,r,a){return{name:t,kind:r,extension:a}}function TOe(t){return T5(t,"directory",void 0)}function udt(t,r,a){const u=Hzt(t,r),h=t.length===0?void 0:Ff(r,t.length);return a.map(({name:p,kind:g,extension:C})=>p.includes(Kl)||p.includes(QJ)?{name:p,kind:g,extension:C,span:h}:{name:p,kind:g,extension:C,span:u})}function ddt(t,r,a,u,h){return udt(r.text,r.getStart(t)+1,Nzt(t,r,a,u,h))}function Nzt(t,r,a,u,h){const p=Rf(r.text),g=Bc(r)?a.getModeForUsageLocation(t,r):void 0,C=t.path,b=ts(C),T=a.getCompilerOptions(),E=a.getTypeChecker(),N=DOe(T,1,t,E,h,g);return jzt(p)||!T.baseUrl&&!T.paths&&(yp(p)||Bke(p))?Lzt(p,b,a,u,C,N):Mzt(p,b,g,a,u,N)}function DOe(t,r,a,u,h,p){return{extensionsToSearch:Dr(Pzt(t,u)),referenceKind:r,importingSourceFile:a,endingPreference:h==null?void 0:h.importModuleSpecifierEnding,resolutionMode:p}}function Lzt(t,r,a,u,h,p){const g=a.getCompilerOptions();return g.rootDirs?Ozt(g.rootDirs,t,r,p,a,u,h):as(Gj(t,r,p,a,u,!0,h).values())}function Pzt(t,r){const a=r?es(r.getAmbientModules(),p=>{const g=p.name.slice(1,-1);if(!(!g.startsWith("*.")||g.includes("/")))return g.slice(1)}):[],u=[...e7(t),a],h=yh(t);return IZ(h)?QV(t,u):u}function Azt(t,r,a,u){t=t.map(p=>Ad(ca(yp(p)?p:zr(r,p))));const h=J(t,p=>Vm(p,a,r,u)?a.substr(p.length):void 0);return Wb([...t.map(p=>zr(p,h)),a].map(p=>Mk(p)),NT,sh)}function Ozt(t,r,a,u,h,p,g){const b=h.getCompilerOptions().project||p.getCurrentDirectory(),T=!(p.useCaseSensitiveFileNames&&p.useCaseSensitiveFileNames()),E=Azt(t,b,a,T);return Wb(Rr(E,N=>as(Gj(r,N,u,h,p,!0,g).values())),(N,R)=>N.name===R.name&&N.kind===R.kind&&N.extension===R.extension)}function Gj(t,r,a,u,h,p,g,C=xOe()){var b;t===void 0&&(t=""),t=Rf(t),Uw(t)||(t=ts(t)),t===""&&(t="."+Kl),t=Ad(t);const T=Ok(r,t),E=Uw(T)?T:ts(T);if(!p){const H=AAe(E,h);if(H){const q=J8(H,h).typesVersions;if(typeof q=="object"){const X=(b=iQ(q))==null?void 0:b.paths;if(X){const Z=ts(H),Q=T.slice(Ad(Z).length);if(hdt(C,Q,Z,a,u,h,X))return C}}}}const N=!(h.useCaseSensitiveFileNames&&h.useCaseSensitiveFileNames());if(!VZ(h,E))return C;const R=uhe(h,E,a.extensionsToSearch,void 0,["./*"]);if(R)for(let H of R){if(H=ca(H),g&&Hb(H,g,r,N)===0)continue;const{name:U,extension:q}=fdt(ud(H),u,a,!1);C.add(T5(U,"script",q))}const F=WZ(h,E);if(F)for(const H of F){const U=ud(ca(H));U!=="@types"&&C.add(TOe(U))}return C}function fdt(t,r,a,u){const h=wS.tryGetRealFileNameForNonJsDeclarationFileName(t);if(h)return{name:h,extension:qv(h)};if(a.referenceKind===0)return{name:t,extension:qv(t)};let p=wS.getModuleSpecifierPreferences({importModuleSpecifierEnding:a.endingPreference},r,r.getCompilerOptions(),a.importingSourceFile).getAllowedEndingsInPreferredOrder(a.resolutionMode);if(u&&(p=p.filter(C=>C!==0&&C!==1)),p[0]===3){if(Ru(t,XV))return{name:t,extension:qv(t)};const C=wS.tryGetJSExtensionForFile(t,r.getCompilerOptions());return C?{name:cx(t,C),extension:C}:{name:t,extension:qv(t)}}if(!u&&(p[0]===0||p[0]===1)&&Ru(t,[".js",".jsx",".ts",".tsx",".d.ts"]))return{name:s_(t),extension:qv(t)};const g=wS.tryGetJSExtensionForFile(t,r.getCompilerOptions());return g?{name:cx(t,g),extension:g}:{name:t,extension:qv(t)}}function hdt(t,r,a,u,h,p,g){const C=T=>g[T],b=(T,E)=>{const N=_3(T),R=_3(E),F=typeof N=="object"?N.prefix.length:T.length,H=typeof R=="object"?R.prefix.length:E.length;return _l(H,F)};return _dt(t,!1,r,a,u,h,p,wr(g),C,b)}function _dt(t,r,a,u,h,p,g,C,b,T){let E=[],N;for(const R of C){if(R===".")continue;const F=R.replace(/^\.\//,""),H=b(R);if(H){const U=_3(F);if(!U)continue;const q=typeof U=="object"&&HJ(U,a);q&&(N===void 0||T(R,N)===-1)&&(N=R,E=E.filter(Z=>!Z.matchedPattern)),(typeof U=="string"||N===void 0||T(R,N)!==1)&&E.push({matchedPattern:q,results:Rzt(F,H,a,u,h,r&&q,p,g).map(({name:Z,kind:Q,extension:re})=>T5(Z,Q,re))})}}return E.forEach(R=>R.results.forEach(F=>t.add(F))),N!==void 0}function Mzt(t,r,a,u,h,p){const g=u.getTypeChecker(),C=u.getCompilerOptions(),{baseUrl:b,paths:T}=C,E=xOe(),N=yh(C);if(b){const F=ca(zr(h.getCurrentDirectory(),b));Gj(t,F,p,u,h,!1,void 0,E)}if(T){const F=pK(C,h);hdt(E,t,F,p,u,h,T)}const R=mdt(t);for(const F of Bzt(t,R,g))E.add(T5(F,"external module name",void 0));if(vdt(h,u,r,R,p,E),IZ(N)){let F=!1;if(R===void 0)for(const H of Vzt(h,r)){const U=T5(H,"external module name",void 0);E.has(U.name)||(F=!0,E.add(U))}if(!F){let H=U=>{const q=zr(U,"node_modules");VZ(h,q)&&Gj(t,q,p,u,h,!1,void 0,E)};if(R&&JV(C)){const U=H;H=q=>{const X=af(t);X.shift();let Z=X.shift();if(!Z)return U(q);if(so(Z,"@")){const oe=X.shift();if(!oe)return U(q);Z=zr(Z,oe)}const Q=zr(q,"node_modules",Z),re=zr(Q,"package.json");if(Tj(h,re)){const pe=J8(re,h).exports;if(pe){if(typeof pe!="object"||pe===null)return;const de=wr(pe),ue=X.join("/")+(X.length&&Uw(t)?"/":""),Ie=gx(C,a);_dt(E,!0,ue,Q,p,u,h,de,we=>KL(pdt(pe[we],Ie)),Cue);return}}return U(q)}}kg(r,H)}}return as(E.values())}function pdt(t,r){if(typeof t=="string")return t;if(t&&typeof t=="object"&&!Ao(t)){for(const a in t)if(a==="default"||r.includes(a)||RH(r,a)){const u=t[a];return pdt(u,r)}}}function mdt(t){return EOe(t)?Uw(t)?t:ts(t):void 0}function Rzt(t,r,a,u,h,p,g,C){if(!su(t,"*"))return t.includes("*")?w:E(t,"script");const b=t.slice(0,t.length-1),T=noe(a,b);if(T===void 0)return t[t.length-2]==="/"?E(b,"directory"):Rr(r,R=>{var F;return(F=gdt("",u,R,h,p,g,C))==null?void 0:F.map(({name:H,...U})=>({name:b+H,...U}))});return Rr(r,N=>gdt(T,u,N,h,p,g,C));function E(N,R){return so(N,a)?[{name:Mk(N),kind:R,extension:void 0}]:w}}function gdt(t,r,a,u,h,p,g){if(!g.readDirectory)return;const C=_3(a);if(C===void 0||Oo(C))return;const b=Ok(C.prefix),T=Uw(C.prefix)?b:ts(b),E=Uw(C.prefix)?"":ud(b),N=EOe(t),R=N?Uw(t)?t:ts(t):void 0,F=N?zr(T,E+R):T,H=ca(C.suffix),U=H&&_K("_"+H),q=U?[cx(H,U),H]:[H],X=ca(zr(r,F)),Z=N?X:Ad(X)+E,Q=H?q.map(de=>"**/*"+de):["./*"],re=es(uhe(g,X,u.extensionsToSearch,void 0,Q),de=>{const ue=pe(de);if(ue){if(EOe(ue))return TOe(af(ydt(ue))[1]);const{name:Ie,extension:we}=fdt(ue,p,u,h);return T5(Ie,"script",we)}}),oe=H?w:es(WZ(g,X),de=>de==="node_modules"?void 0:TOe(de));return[...re,...oe];function pe(de){return J(q,ue=>{const Ie=Fzt(ca(de),Z,ue);return Ie===void 0?void 0:ydt(Ie)})}}function Fzt(t,r,a){return so(t,r)&&su(t,a)?t.slice(r.length,t.length-a.length):void 0}function ydt(t){return t[0]===Kl?t.slice(1):t}function Bzt(t,r,a){const h=a.getAmbientModules().map(p=>zm(p.name)).filter(p=>so(p,t)&&!p.includes("*"));if(r!==void 0){const p=Ad(r);return h.map(g=>KR(g,p))}return h}function Wzt(t,r,a,u){const h=a.getCompilerOptions(),p=Rs(t,r),g=Av(t.text,p.pos),C=g&&Fe(g,U=>r>=U.pos&&r<=U.end);if(!C)return;const b=t.text.slice(C.pos,r),T=zzt.exec(b);if(!T)return;const[,E,N,R]=T,F=ts(t.path),H=N==="path"?Gj(R,F,DOe(h,0,t),a,u,!0,t.path):N==="types"?vdt(u,a,F,mdt(R),DOe(h,1,t)):j.fail();return udt(R,C.pos+E.length,as(H.values()))}function vdt(t,r,a,u,h,p=xOe()){const g=r.getCompilerOptions(),C=new Map,b=HZ(()=>F7(g,t))||w;for(const E of b)T(E);for(const E of dhe(a,t)){const N=zr(ts(E),"node_modules/@types");T(N)}return p;function T(E){if(VZ(t,E))for(const N of WZ(t,E)){const R=FH(N);if(!(g.types&&!Yt(g.types,R)))if(u===void 0)C.has(R)||(p.add(T5(R,"external module name",void 0)),C.set(R,!0));else{const F=zr(E,N),H=Mce(u,R,hS(t));H!==void 0&&Gj(H,F,h,r,t,!1,void 0,p)}}}}function Vzt(t,r){if(!t.readFile||!t.fileExists)return w;const a=[];for(const u of dhe(r,t)){const h=J8(u,t);for(const p of Uzt){const g=h[p];if(g)for(const C in g)Li(g,C)&&!so(C,"@types/")&&a.push(C)}}return a}function Hzt(t,r){const a=Math.max(t.lastIndexOf(Kl),t.lastIndexOf(QJ)),u=a!==-1?a+1:0,h=t.length-u;return h===0||J_(t.substr(u,h),99)?void 0:Ff(r+u,h)}function jzt(t){if(t&&t.length>=2&&t.charCodeAt(0)===46){const r=t.length>=3&&t.charCodeAt(1)===46?2:1,a=t.charCodeAt(r);return a===47||a===92}return!1}var zzt=/^(\/\/\/\s*<reference\s+(path|types)\s*=\s*(?:'|"))([^\x03"]*)$/,Uzt=["dependencies","devDependencies","peerDependencies","optionalDependencies"];function EOe(t){return t.includes(Kl)}function qzt(t){return la(t.parent)&&Ra(t.parent.arguments)===t&&ot(t.parent.expression)&&t.parent.expression.escapedText==="require"}var kl={};c(kl,{Core:()=>SA,DefinitionKind:()=>Tdt,EntryKind:()=>Ddt,ExportKind:()=>bdt,FindReferencesUse:()=>Edt,ImportExport:()=>Cdt,createImportTracker:()=>IOe,findModuleReferences:()=>Sdt,findReferenceOrRenameEntries:()=>sUt,findReferencedSymbols:()=>iUt,getContextNode:()=>KI,getExportInfo:()=>NOe,getImplementationsAtPosition:()=>rUt,getImportOrExportSymbol:()=>kdt,getReferenceEntriesForNode:()=>Ndt,isContextWithStartAndEndNode:()=>POe,isDeclarationOfSymbol:()=>Mdt,isWriteAccessForReference:()=>OOe,toContextSpan:()=>AOe,toHighlightSpan:()=>fUt,toReferenceEntry:()=>Adt,toRenameLocation:()=>aUt});function IOe(t,r,a,u){const h=Kzt(t,a,u);return(p,g,C)=>{const{directImports:b,indirectUsers:T}=$zt(t,r,h,g,a,u);return{indirectUsers:T,...Jzt(b,p,g.exportKind,a,C)}}}var bdt=(t=>(t[t.Named=0]="Named",t[t.Default=1]="Default",t[t.ExportEquals=2]="ExportEquals",t))(bdt||{}),Cdt=(t=>(t[t.Import=0]="Import",t[t.Export=1]="Export",t))(Cdt||{});function $zt(t,r,a,{exportingModuleSymbol:u,exportKind:h},p,g){const C=Z3(),b=Z3(),T=[],E=!!u.globalExports,N=E?void 0:[];return F(u),{directImports:T,indirectUsers:R()};function R(){if(E)return t;if(u.declarations)for(const Q of u.declarations)BT(Q)&&r.has(Q.getSourceFile().fileName)&&X(Q);return N.map(_n)}function F(Q){const re=Z(Q);if(re){for(const oe of re)if(C(oe))switch(g&&g.throwIfCancellationRequested(),oe.kind){case 213:if(zp(oe)){H(oe);break}if(!E){const de=oe.parent;if(h===2&&de.kind===260){const{name:ue}=de;if(ue.kind===80){T.push(ue);break}}}break;case 80:break;case 271:q(oe,oe.name,Zr(oe,32),!1);break;case 272:case 351:T.push(oe);const pe=oe.importClause&&oe.importClause.namedBindings;pe&&pe.kind===274?q(oe,pe.name,!1,!0):!E&&hP(oe)&&X(DY(oe));break;case 278:oe.exportClause?oe.exportClause.kind===280?X(DY(oe),!0):T.push(oe):F(eUt(oe,p));break;case 205:!E&&oe.isTypeOf&&!oe.qualifier&&U(oe)&&X(oe.getSourceFile(),!0),T.push(oe);break;default:j.failBadSyntaxKind(oe,"Unexpected import kind.")}}}function H(Q){const re=Qi(Q,J_e)||Q.getSourceFile();X(re,!!U(Q,!0))}function U(Q,re=!1){return Qi(Q,oe=>re&&J_e(oe)?"quit":Fg(oe)&&Ft(oe.modifiers,BP))}function q(Q,re,oe,pe){if(h===2)pe||T.push(Q);else if(!E){const de=DY(Q);j.assert(de.kind===307||de.kind===267),oe||Gzt(de,re,p)?X(de,!0):X(de)}}function X(Q,re=!1){if(j.assert(!E),!b(Q)||(N.push(Q),!re))return;const pe=p.getMergedSymbol(Q.symbol);if(!pe)return;j.assert(!!(pe.flags&1536));const de=Z(pe);if(de)for(const ue of de)V1(ue)||X(DY(ue),!0)}function Z(Q){return a.get(Ba(Q).toString())}}function Jzt(t,r,a,u,h){const p=[],g=[];function C(R,F){p.push([R,F])}if(t)for(const R of t)b(R);return{importSearches:p,singleReferences:g};function b(R){if(R.kind===271){LOe(R)&&T(R.name);return}if(R.kind===80){T(R);return}if(R.kind===205){if(R.qualifier){const U=K_(R.qualifier);U.escapedText===Eu(r)&&g.push(U)}else a===2&&g.push(R.argument.literal);return}if(R.moduleSpecifier.kind!==11)return;if(R.kind===278){R.exportClause&&Xm(R.exportClause)&&E(R.exportClause);return}const{name:F,namedBindings:H}=R.importClause||{name:void 0,namedBindings:void 0};if(H)switch(H.kind){case 274:T(H.name);break;case 275:(a===0||a===1)&&E(H);break;default:j.assertNever(H)}if(F&&(a===1||a===2)&&(!h||F.escapedText===NZ(r))){const U=u.getSymbolAtLocation(F);C(F,U)}}function T(R){a===2&&(!h||N(R.escapedText))&&C(R,u.getSymbolAtLocation(R))}function E(R){if(R)for(const F of R.elements){const{name:H,propertyName:U}=F;if(N(FT(U||H)))if(U)g.push(U),(!h||FT(H)===r.escapedName)&&C(H,u.getSymbolAtLocation(H));else{const q=F.kind===281&&F.propertyName?u.getExportSpecifierLocalTargetSymbol(F):u.getSymbolAtLocation(H);C(H,q)}}}function N(R){return R===r.escapedName||a!==0&&R==="default"}}function Gzt(t,r,a){const u=a.getSymbolAtLocation(r);return!!wdt(t,h=>{if(!Ju(h))return;const{exportClause:p,moduleSpecifier:g}=h;return!g&&p&&Xm(p)&&p.elements.some(C=>a.getExportSpecifierLocalTargetSymbol(C)===u)})}function Sdt(t,r,a){var u;const h=[],p=t.getTypeChecker();for(const g of r){const C=a.valueDeclaration;if((C==null?void 0:C.kind)===307){for(const b of g.referencedFiles)t.getSourceFileFromReference(g,b)===C&&h.push({kind:"reference",referencingFile:g,ref:b});for(const b of g.typeReferenceDirectives){const T=(u=t.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(b,g))==null?void 0:u.resolvedTypeReferenceDirective;T!==void 0&&T.resolvedFileName===C.fileName&&h.push({kind:"reference",referencingFile:g,ref:b})}}xdt(g,(b,T)=>{p.getSymbolAtLocation(T)===a&&h.push(cl(b)?{kind:"implicit",literal:T,referencingFile:g}:{kind:"import",literal:T})})}return h}function Kzt(t,r,a){const u=new Map;for(const h of t)a&&a.throwIfCancellationRequested(),xdt(h,(p,g)=>{const C=r.getSymbolAtLocation(g);if(C){const b=Ba(C).toString();let T=u.get(b);T||u.set(b,T=[]),T.push(p)}});return u}function wdt(t,r){return O(t.kind===307?t.statements:t.body.statements,a=>r(a)||J_e(a)&&O(a.body&&a.body.statements,r))}function xdt(t,r){if(t.externalModuleIndicator||t.imports!==void 0)for(const a of t.imports)r(O8(a),a);else wdt(t,a=>{switch(a.kind){case 278:case 272:{const u=a;u.moduleSpecifier&&Ha(u.moduleSpecifier)&&r(u,u.moduleSpecifier);break}case 271:{const u=a;LOe(u)&&r(u,u.moduleReference.expression);break}}})}function kdt(t,r,a,u){return u?h():h()||p();function h(){var b;const{parent:T}=t,E=T.parent;if(r.exportSymbol)return T.kind===211?(b=r.declarations)!=null&&b.some(F=>F===T)&&ur(E)?R(E,!1):void 0:g(r.exportSymbol,C(T));{const F=Qzt(T,t);if(F&&Zr(F,32))return Wd(F)&&F.moduleReference===t?u?void 0:{kind:0,symbol:a.getSymbolAtLocation(F.name)}:g(r,C(F));if(jy(T))return g(r,0);if(Il(T))return N(T);if(Il(E))return N(E);if(ur(T))return R(T,!0);if(ur(E))return R(E,!0);if(MI(T)||ble(T))return g(r,0)}function N(F){if(!F.symbol.parent)return;const H=F.isExportEquals?2:1;return{kind:1,symbol:r,exportInfo:{exportingModuleSymbol:F.symbol.parent,exportKind:H}}}function R(F,H){let U;switch(Bu(F)){case 1:U=0;break;case 2:U=2;break;default:return}const q=H?a.getSymbolAtLocation(Dce(ha(F.left,Sl))):r;return q&&g(q,U)}}function p(){if(!Zzt(t))return;let T=a.getImmediateAliasedSymbol(r);if(!T||(T=Yzt(T,a),T.escapedName==="export="&&(T=Xzt(T,a),T===void 0)))return;const E=NZ(T);if(E===void 0||E==="default"||E===r.escapedName)return{kind:0,symbol:T}}function g(b,T){const E=NOe(b,T,a);return E&&{kind:1,symbol:b,exportInfo:E}}function C(b){return Zr(b,2048)?1:0}}function Xzt(t,r){var a,u;if(t.flags&2097152)return r.getImmediateAliasedSymbol(t);const h=j.checkDefined(t.valueDeclaration);if(Il(h))return(a=Jr(h.expression,M0))==null?void 0:a.symbol;if(ur(h))return(u=Jr(h.right,M0))==null?void 0:u.symbol;if(Os(h))return h.symbol}function Qzt(t,r){const a=_s(t)?t:ec(t)?YL(t):void 0;return a?t.name!==r||lD(a.parent)?void 0:Lu(a.parent.parent)?a.parent.parent:void 0:t}function Zzt(t){const{parent:r}=t;switch(r.kind){case 271:return r.name===t&&LOe(r);case 276:return!r.propertyName;case 273:case 274:return j.assert(r.name===t),!0;case 208:return nr(t)&&HT(r.parent.parent);default:return!1}}function NOe(t,r,a){const u=t.parent;if(!u)return;const h=a.getMergedSymbol(u);return H6(h)?{exportingModuleSymbol:h,exportKind:r}:void 0}function Yzt(t,r){if(t.declarations)for(const a of t.declarations){if(vh(a)&&!a.propertyName&&!a.parent.parent.moduleSpecifier)return r.getExportSpecifierLocalTargetSymbol(a)||t;if(Nr(a)&&Wv(a.expression)&&!Vs(a.name))return r.getSymbolAtLocation(a);if(lh(a)&&ur(a.parent.parent)&&Bu(a.parent.parent)===2)return r.getExportSpecifierLocalTargetSymbol(a.name)}return t}function eUt(t,r){return r.getMergedSymbol(DY(t).symbol)}function DY(t){if(t.kind===213||t.kind===351)return t.getSourceFile();const{parent:r}=t;return r.kind===307?r:(j.assert(r.kind===268),ha(r.parent,J_e))}function J_e(t){return t.kind===267&&t.name.kind===11}function LOe(t){return t.moduleReference.kind===283&&t.moduleReference.expression.kind===11}var Tdt=(t=>(t[t.Symbol=0]="Symbol",t[t.Label=1]="Label",t[t.Keyword=2]="Keyword",t[t.This=3]="This",t[t.String=4]="String",t[t.TripleSlashReference=5]="TripleSlashReference",t))(Tdt||{}),Ddt=(t=>(t[t.Span=0]="Span",t[t.Node=1]="Node",t[t.StringLiteral=2]="StringLiteral",t[t.SearchedLocalFoundProperty=3]="SearchedLocalFoundProperty",t[t.SearchedPropertyFoundLocal=4]="SearchedPropertyFoundLocal",t))(Ddt||{});function oC(t,r=1){return{kind:r,node:t.name||t,context:tUt(t)}}function POe(t){return t&&t.kind===void 0}function tUt(t){if(Wf(t))return KI(t);if(t.parent){if(!Wf(t.parent)&&!Il(t.parent)){if(nr(t)){const a=ur(t.parent)?t.parent:Sl(t.parent)&&ur(t.parent.parent)&&t.parent.parent.left===t.parent?t.parent.parent:void 0;if(a&&Bu(a)!==0)return KI(a)}if(z1(t.parent)||oD(t.parent))return t.parent.parent;if(PI(t.parent)||_x(t.parent)||m8(t.parent))return t.parent;if(Bc(t)){const a=CV(t);if(a){const u=Qi(a,h=>Wf(h)||Ps(h)||V6(h));return Wf(u)?KI(u):u}}const r=Qi(t,Ka);return r?KI(r.parent):void 0}if(t.parent.name===t||iu(t.parent)||Il(t.parent)||(Vk(t.parent)||ec(t.parent))&&t.parent.propertyName===t||t.kind===90&&Zr(t.parent,2080))return KI(t.parent)}}function KI(t){if(t)switch(t.kind){case 260:return!Sf(t.parent)||t.parent.declarations.length!==1?t:Lu(t.parent.parent)?t.parent.parent:fI(t.parent.parent)?KI(t.parent.parent):t.parent;case 208:return KI(t.parent.parent);case 276:return t.parent.parent.parent;case 281:case 274:return t.parent.parent;case 273:case 280:return t.parent;case 226:return uf(t.parent)?t.parent:t;case 250:case 249:return{start:t.initializer,end:t.expression};case 303:case 304:return TS(t.parent)?KI(Qi(t.parent,r=>ur(r)||fI(r))):t;case 255:return{start:Fe(t.getChildren(t.getSourceFile()),r=>r.kind===109),end:t.caseBlock};default:return t}}function AOe(t,r,a){if(!a)return;const u=POe(a)?IY(a.start,r,a.end):IY(a,r);return u.start!==t.start||u.length!==t.length?{contextSpan:u}:void 0}var Edt=(t=>(t[t.Other=0]="Other",t[t.References=1]="References",t[t.Rename=2]="Rename",t))(Edt||{});function iUt(t,r,a,u,h){const p=R_(u,h),g={use:1},C=SA.getReferencedSymbolsForNode(h,p,t,a,r,g),b=t.getTypeChecker(),T=SA.getAdjustedNode(p,g),E=nUt(T)?b.getSymbolAtLocation(T):void 0;return!C||!C.length?void 0:es(C,({definition:N,references:R})=>N&&{definition:b.runWithCancellationToken(r,F=>oUt(N,F,p)),references:R.map(F=>cUt(F,E))})}function nUt(t){return t.kind===90||!!R8(t)||DV(t)||t.kind===137&&iu(t.parent)}function rUt(t,r,a,u,h){const p=R_(u,h);let g;const C=Idt(t,r,a,p,h);if(p.parent.kind===211||p.parent.kind===208||p.parent.kind===212||p.kind===108)g=C&&[...C];else if(C){const T=JR(C),E=new Map;for(;!T.isEmpty();){const N=T.dequeue();if(!Pg(E,Sc(N.node)))continue;g=fn(g,N);const R=Idt(t,r,a,N.node,N.node.pos);R&&T.enqueue(...R)}}const b=t.getTypeChecker();return qt(g,T=>uUt(T,b))}function Idt(t,r,a,u,h){if(u.kind===307)return;const p=t.getTypeChecker();if(u.parent.kind===304){const g=[];return SA.getReferenceEntriesForShorthandPropertyAssignment(u,p,C=>g.push(oC(C))),g}else if(u.kind===108||G_(u.parent)){const g=p.getSymbolAtLocation(u);return g.valueDeclaration&&[oC(g.valueDeclaration)]}else return Ndt(h,u,t,a,r,{implementations:!0,use:1})}function sUt(t,r,a,u,h,p,g){return qt(Ldt(SA.getReferencedSymbolsForNode(h,u,t,a,r,p)),C=>g(C,u,t.getTypeChecker()))}function Ndt(t,r,a,u,h,p={},g=new Set(u.map(C=>C.fileName))){return Ldt(SA.getReferencedSymbolsForNode(t,r,a,u,h,p,g))}function Ldt(t){return t&&Rr(t,r=>r.references)}function oUt(t,r,a){const u=(()=>{switch(t.type){case 0:{const{symbol:E}=t,{displayParts:N,kind:R}=Pdt(E,r,a),F=N.map(q=>q.text).join(""),H=E.declarations&&Ra(E.declarations),U=H?No(H)||H:a;return{...EY(U),name:F,kind:R,displayParts:N,context:KI(H)}}case 1:{const{node:E}=t;return{...EY(E),name:E.text,kind:"label",displayParts:[Z_(E.text,17)]}}case 2:{const{node:E}=t,N=xa(E.kind);return{...EY(E),name:N,kind:"keyword",displayParts:[{text:N,kind:"keyword"}]}}case 3:{const{node:E}=t,N=r.getSymbolAtLocation(E),R=N&&NS.getSymbolDisplayPartsDocumentationAndSymbolKind(r,N,E.getSourceFile(),UI(E),E).displayParts||[pm("this")];return{...EY(E),name:"this",kind:"var",displayParts:R}}case 4:{const{node:E}=t;return{...EY(E),name:E.text,kind:"var",displayParts:[Z_(uu(E),8)]}}case 5:return{textSpan:DS(t.reference),sourceFile:t.file,name:t.reference.fileName,kind:"string",displayParts:[Z_(`"${t.reference.fileName}"`,8)]};default:return j.assertNever(t)}})(),{sourceFile:h,textSpan:p,name:g,kind:C,displayParts:b,context:T}=u;return{containerKind:"",containerName:"",fileName:h.fileName,kind:C,name:g,textSpan:p,displayParts:b,...AOe(p,h,T)}}function EY(t){const r=t.getSourceFile();return{sourceFile:r,textSpan:IY(Ka(t)?t.expression:t,r)}}function Pdt(t,r,a){const u=SA.getIntersectingMeaningFromDeclarations(a,t),h=t.declarations&&Ra(t.declarations)||a,{displayParts:p,symbolKind:g}=NS.getSymbolDisplayPartsDocumentationAndSymbolKind(r,t,h.getSourceFile(),h,h,u);return{displayParts:p,kind:g}}function aUt(t,r,a,u,h){return{...G_e(t),...u&&lUt(t,r,a,h)}}function cUt(t,r){const a=Adt(t);return r?{...a,isDefinition:t.kind!==0&&Mdt(t.node,r)}:a}function Adt(t){const r=G_e(t);if(t.kind===0)return{...r,isWriteAccess:!1};const{kind:a,node:u}=t;return{...r,isWriteAccess:OOe(u),isInString:a===2?!0:void 0}}function G_e(t){if(t.kind===0)return{textSpan:t.textSpan,fileName:t.fileName};{const r=t.node.getSourceFile(),a=IY(t.node,r);return{textSpan:a,fileName:r.fileName,...AOe(a,r,t.context)}}}function lUt(t,r,a,u){if(t.kind!==0&&(ot(r)||Bc(r))){const{node:h,kind:p}=t,g=h.parent,C=r.text,b=lh(g);if(b||vj(g)&&g.name===h&&g.dotDotDotToken===void 0){const T={prefixText:C+": "},E={suffixText:": "+C};if(p===3)return T;if(p===4)return E;if(b){const N=g.parent;return Aa(N)&&ur(N.parent)&&Wv(N.parent.left)?T:E}else return T}else if(l_(g)&&!g.propertyName){const T=vh(r.parent)?a.getExportSpecifierLocalTargetSymbol(r.parent):a.getSymbolAtLocation(r);return Yt(T.declarations,g)?{prefixText:C+" as "}:Bg}else if(vh(g)&&!g.propertyName)return r===t.node||a.getSymbolAtLocation(r)===a.getSymbolAtLocation(t.node)?{prefixText:C+" as "}:{suffixText:" as "+C}}if(t.kind!==0&&A_(t.node)&&Sl(t.node.parent)){const h=$fe(u);return{prefixText:h,suffixText:h}}return Bg}function uUt(t,r){const a=G_e(t);if(t.kind!==0){const{node:u}=t;return{...a,...dUt(u,r)}}else return{...a,kind:"",displayParts:[]}}function dUt(t,r){const a=r.getSymbolAtLocation(Wf(t)&&t.name?t.name:t);return a?Pdt(a,r,t):t.kind===210?{kind:"interface",displayParts:[Sh(21),pm("object literal"),Sh(22)]}:t.kind===231?{kind:"local class",displayParts:[Sh(21),pm("anonymous local class"),Sh(22)]}:{kind:gD(t),displayParts:[]}}function fUt(t){const r=G_e(t);if(t.kind===0)return{fileName:r.fileName,span:{textSpan:r.textSpan,kind:"reference"}};const a=OOe(t.node),u={textSpan:r.textSpan,kind:a?"writtenReference":"reference",isInString:t.kind===2?!0:void 0,...r.contextSpan&&{contextSpan:r.contextSpan}};return{fileName:r.fileName,span:u}}function IY(t,r,a){let u=t.getStart(r),h=(a||t).getEnd();return Bc(t)&&h-u>2&&(j.assert(a===void 0),u+=1,h-=1),(a==null?void 0:a.kind)===269&&(h=a.getFullStart()),Fu(u,h)}function Odt(t){return t.kind===0?t.textSpan:IY(t.node,t.node.getSourceFile())}function OOe(t){const r=R8(t);return!!r&&hUt(r)||t.kind===90||wP(t)}function Mdt(t,r){var a;if(!r)return!1;const u=R8(t)||(t.kind===90?t.parent:DV(t)||t.kind===137&&iu(t.parent)?t.parent.parent:void 0),h=u&&ur(u)?u.left:void 0;return!!(u&&((a=r.declarations)!=null&&a.some(p=>p===u||p===h)))}function hUt(t){if(t.flags&33554432)return!0;switch(t.kind){case 226:case 208:case 263:case 231:case 90:case 266:case 306:case 281:case 273:case 271:case 276:case 264:case 338:case 346:case 291:case 267:case 270:case 274:case 280:case 169:case 304:case 265:case 168:return!0;case 303:return!TS(t.parent);case 262:case 218:case 176:case 174:case 177:case 178:return!!t.body;case 260:case 172:return!!t.initializer||lD(t.parent);case 173:case 171:case 348:case 341:return!1;default:return j.failBadSyntaxKind(t)}}var SA;(t=>{function r(St,ri,xe,pt,Se,Ze={},gt=new Set(pt.map(Dt=>Dt.fileName))){var Dt,Je;if(ri=a(ri,Ze),Os(ri)){const gr=uO.getReferenceAtPosition(ri,St,xe);if(!(gr!=null&&gr.file))return;const te=xe.getTypeChecker().getMergedSymbol(gr.file.symbol);if(te)return T(xe,te,!1,pt,gt);const tt=xe.getFileIncludeReasons();return tt?[{definition:{type:5,reference:gr.reference,file:ri},references:h(gr.file,tt,xe)||w}]:void 0}if(!Ze.implementations){const gr=N(ri,pt,Se);if(gr)return gr}const Rt=xe.getTypeChecker(),Ct=Rt.getSymbolAtLocation(iu(ri)&&ri.parent.name||ri);if(!Ct){if(!Ze.implementations&&Bc(ri)){if(LZ(ri)){const gr=xe.getFileIncludeReasons(),te=(Je=(Dt=xe.getResolvedModuleFromModuleSpecifier(ri))==null?void 0:Dt.resolvedModule)==null?void 0:Je.resolvedFileName,tt=te?xe.getSourceFile(te):void 0;if(tt)return[{definition:{type:4,node:ri},references:h(tt,gr,xe)||w}]}return Qs(ri,pt,Rt,Se)}return}if(Ct.escapedName==="export=")return T(xe,Ct.parent,!1,pt,gt);const ii=g(Ct,xe,pt,Se,Ze,gt);if(ii&&!(Ct.flags&33554432))return ii;const vt=p(ri,Ct,Rt),Ni=vt&&g(vt,xe,pt,Se,Ze,gt),ji=R(Ct,ri,pt,gt,Rt,Se,Ze);return C(xe,ii,ji,Ni)}t.getReferencedSymbolsForNode=r;function a(St,ri){return ri.use===1?St=Lfe(St):ri.use===2&&(St=CZ(St)),St}t.getAdjustedNode=a;function u(St,ri,xe,pt=new Set(xe.map(Se=>Se.fileName))){var Se,Ze;const gt=(Se=ri.getSourceFile(St))==null?void 0:Se.symbol;if(gt)return((Ze=T(ri,gt,!1,xe,pt)[0])==null?void 0:Ze.references)||w;const Dt=ri.getFileIncludeReasons(),Je=ri.getSourceFile(St);return Je&&Dt&&h(Je,Dt,ri)||w}t.getReferencesForFileName=u;function h(St,ri,xe){let pt;const Se=ri.get(St.path)||w;for(const Ze of Se)if(_2(Ze)){const gt=xe.getSourceFileByPath(Ze.file),Dt=Y7(xe,Ze);U3(Dt)&&(pt=fn(pt,{kind:0,fileName:gt.fileName,textSpan:DS(Dt)}))}return pt}function p(St,ri,xe){if(St.parent&&pH(St.parent)){const pt=xe.getAliasedSymbol(ri),Se=xe.getMergedSymbol(pt);if(pt!==Se)return Se}}function g(St,ri,xe,pt,Se,Ze){const gt=St.flags&1536&&St.declarations&&Fe(St.declarations,Os);if(!gt)return;const Dt=St.exports.get("export="),Je=T(ri,St,!!Dt,xe,Ze);if(!Dt||!Ze.has(gt.fileName))return Je;const Rt=ri.getTypeChecker();return St=Vf(Dt,Rt),C(ri,Je,R(St,void 0,xe,Ze,Rt,pt,Se))}function C(St,...ri){let xe;for(const pt of ri)if(!(!pt||!pt.length)){if(!xe){xe=pt;continue}for(const Se of pt){if(!Se.definition||Se.definition.type!==0){xe.push(Se);continue}const Ze=Se.definition.symbol,gt=ct(xe,Je=>!!Je.definition&&Je.definition.type===0&&Je.definition.symbol===Ze);if(gt===-1){xe.push(Se);continue}const Dt=xe[gt];xe[gt]={definition:Dt.definition,references:Dt.references.concat(Se.references).sort((Je,Rt)=>{const Ct=b(St,Je),ii=b(St,Rt);if(Ct!==ii)return _l(Ct,ii);const vt=Odt(Je),Ni=Odt(Rt);return vt.start!==Ni.start?_l(vt.start,Ni.start):_l(vt.length,Ni.length)})}}}return xe}function b(St,ri){const xe=ri.kind===0?St.getSourceFile(ri.fileName):ri.node.getSourceFile();return St.getSourceFiles().indexOf(xe)}function T(St,ri,xe,pt,Se){j.assert(!!ri.valueDeclaration);const Ze=es(Sdt(St,pt,ri),Dt=>{if(Dt.kind==="import"){const Je=Dt.literal.parent;if(bS(Je)){const Rt=ha(Je.parent,V1);if(xe&&!Rt.qualifier)return}return oC(Dt.literal)}else if(Dt.kind==="implicit"){const Je=Dt.literal.text!==jk&&QP(Dt.referencingFile,Rt=>Rt.transformFlags&2?Gv(Rt)||PI(Rt)||aD(Rt)?Rt:void 0:"skip")||Dt.referencingFile.statements[0]||Dt.referencingFile;return oC(Je)}else return{kind:0,fileName:Dt.referencingFile.fileName,textSpan:DS(Dt.ref)}});if(ri.declarations)for(const Dt of ri.declarations)switch(Dt.kind){case 307:break;case 267:Se.has(Dt.getSourceFile().fileName)&&Ze.push(oC(Dt.name));break;default:j.assert(!!(ri.flags&33554432),"Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.")}const gt=ri.exports.get("export=");if(gt!=null&&gt.declarations)for(const Dt of gt.declarations){const Je=Dt.getSourceFile();if(Se.has(Je.fileName)){const Rt=ur(Dt)&&Nr(Dt.left)?Dt.left.expression:Il(Dt)?j.checkDefined(Uc(Dt,95,Je)):No(Dt)||Dt;Ze.push(oC(Rt))}}return Ze.length?[{definition:{type:0,symbol:ri},references:Ze}]:w}function E(St){return St.kind===148&&t2(St.parent)&&St.parent.operator===148}function N(St,ri,xe){if(c5(St.kind))return St.kind===116&&UP(St.parent)||St.kind===148&&!E(St)?void 0:Oe(ri,St.kind,xe,St.kind===148?E:void 0);if(J6(St.parent)&&St.parent.name===St)return Ne(ri,xe);if(WP(St)&&gu(St.parent))return[{definition:{type:2,node:St},references:[oC(St)]}];if(uj(St)){const pt=pZ(St.parent,St.text);return pt&&qe(pt.parent,pt)}else if(Cfe(St))return qe(St.parent,St);if(X3(St))return ls(St,ri,xe);if(St.kind===108)return Fs(St)}function R(St,ri,xe,pt,Se,Ze,gt){const Dt=ri&&U(St,ri,Se,!ac(gt))||St,Je=ri?us(ri,Dt):7,Rt=[],Ct=new Z(xe,pt,ri?H(ri):0,Se,Ze,Je,gt,Rt),ii=!ac(gt)||!Dt.declarations?void 0:Fe(Dt.declarations,vh);if(ii)$e(ii.name,Dt,ii,Ct.createSearch(ri,St,void 0),Ct,!0,!0);else if(ri&&ri.kind===90&&Dt.escapedName==="default"&&Dt.parent)Et(ri,Dt,Ct),Q(ri,Dt,{exportingModuleSymbol:Dt.parent,exportKind:1},Ct);else{const vt=Ct.createSearch(ri,Dt,void 0,{allSearchSymbols:ri?Zs(Dt,ri,Se,gt.use===2,!!gt.providePrefixAndSuffixTextForRename,!!gt.implementations):[Dt]});F(Dt,Ct,vt)}return Rt}function F(St,ri,xe){const pt=Ie(St);if(pt)Pe(pt,pt.getSourceFile(),xe,ri,!(Os(pt)&&!Yt(ri.sourceFiles,pt)));else for(const Se of ri.sourceFiles)ri.cancellationToken.throwIfCancellationRequested(),de(Se,xe,ri)}function H(St){switch(St.kind){case 176:case 137:return 1;case 80:if(ss(St.parent))return j.assert(St.parent.name===St),2;default:return 0}}function U(St,ri,xe,pt){const{parent:Se}=ri;return vh(Se)&&pt?et(ri,St,Se,xe):J(St.declarations,Ze=>{if(!Ze.parent){if(St.flags&33554432)return;j.fail(`Unexpected symbol at ${j.formatSyntaxKind(ri.kind)}: ${j.formatSymbol(St)}`)}return a_(Ze.parent)&&fx(Ze.parent.parent)?xe.getPropertyOfType(xe.getTypeFromTypeNode(Ze.parent.parent),St.name):void 0})}let q;(St=>{St[St.None=0]="None",St[St.Constructor=1]="Constructor",St[St.Class=2]="Class"})(q||(q={}));function X(St){if(!(St.flags&33555968))return;const ri=St.declarations&&Fe(St.declarations,xe=>!Os(xe)&&!rd(xe));return ri&&ri.symbol}class Z{constructor(ri,xe,pt,Se,Ze,gt,Dt,Je){this.sourceFiles=ri,this.sourceFilesSet=xe,this.specialSearchKind=pt,this.checker=Se,this.cancellationToken=Ze,this.searchMeaning=gt,this.options=Dt,this.result=Je,this.inheritsFromCache=new Map,this.markSeenContainingTypeReference=Z3(),this.markSeenReExportRHS=Z3(),this.symbolIdToReferences=[],this.sourceFileToSeenSymbols=[]}includesSourceFile(ri){return this.sourceFilesSet.has(ri.fileName)}getImportSearches(ri,xe){return this.importTracker||(this.importTracker=IOe(this.sourceFiles,this.sourceFilesSet,this.checker,this.cancellationToken)),this.importTracker(ri,xe,this.options.use===2)}createSearch(ri,xe,pt,Se={}){const{text:Ze=zm(Eu($8(xe)||X(xe)||xe)),allSearchSymbols:gt=[xe]}=Se,Dt=cu(Ze),Je=this.options.implementations&&ri?Ji(ri,xe,this.checker):void 0;return{symbol:xe,comingFrom:pt,text:Ze,escapedText:Dt,parents:Je,allSearchSymbols:gt,includes:Rt=>Yt(gt,Rt)}}referenceAdder(ri){const xe=Ba(ri);let pt=this.symbolIdToReferences[xe];return pt||(pt=this.symbolIdToReferences[xe]=[],this.result.push({definition:{type:0,symbol:ri},references:pt})),(Se,Ze)=>pt.push(oC(Se,Ze))}addStringOrCommentReference(ri,xe){this.result.push({definition:void 0,references:[{kind:0,fileName:ri,textSpan:xe}]})}markSearchedSymbols(ri,xe){const pt=Sc(ri),Se=this.sourceFileToSeenSymbols[pt]||(this.sourceFileToSeenSymbols[pt]=new Set);let Ze=!1;for(const gt of xe)Ze=of(Se,Ba(gt))||Ze;return Ze}}function Q(St,ri,xe,pt){const{importSearches:Se,singleReferences:Ze,indirectUsers:gt}=pt.getImportSearches(ri,xe);if(Ze.length){const Dt=pt.referenceAdder(ri);for(const Je of Ze)oe(Je,pt)&&Dt(Je)}for(const[Dt,Je]of Se)He(Dt.getSourceFile(),pt.createSearch(Dt,Je,1),pt);if(gt.length){let Dt;switch(xe.exportKind){case 0:Dt=pt.createSearch(St,ri,1);break;case 1:Dt=pt.options.use===2?void 0:pt.createSearch(St,ri,1,{text:"default"});break}if(Dt)for(const Je of gt)de(Je,Dt,pt)}}function re(St,ri,xe,pt,Se,Ze,gt,Dt){const Je=IOe(St,new Set(St.map(vt=>vt.fileName)),ri,xe),{importSearches:Rt,indirectUsers:Ct,singleReferences:ii}=Je(pt,{exportKind:gt?1:0,exportingModuleSymbol:Se},!1);for(const[vt]of Rt)Dt(vt);for(const vt of ii)ot(vt)&&V1(vt.parent)&&Dt(vt);for(const vt of Ct)for(const Ni of Te(vt,gt?"default":Ze)){const ji=ri.getSymbolAtLocation(Ni),gr=Ft(ji==null?void 0:ji.declarations,te=>!!Jr(te,Il));ot(Ni)&&!Vk(Ni.parent)&&(ji===pt||gr)&&Dt(Ni)}}t.eachExportReference=re;function oe(St,ri){return We(St,ri)?ri.options.use!==2?!0:!ot(St)&&!Vk(St.parent)?!1:!(Vk(St.parent)&&My(St)):!1}function pe(St,ri){if(St.declarations)for(const xe of St.declarations){const pt=xe.getSourceFile();He(pt,ri.createSearch(xe,St,0),ri,ri.includesSourceFile(pt))}}function de(St,ri,xe){s_e(St).get(ri.escapedText)!==void 0&&He(St,ri,xe)}function ue(St,ri){return TS(St.parent.parent)?ri.getPropertySymbolOfDestructuringAssignment(St):void 0}function Ie(St){const{declarations:ri,flags:xe,parent:pt,valueDeclaration:Se}=St;if(Se&&(Se.kind===218||Se.kind===231))return Se;if(!ri)return;if(xe&8196){const Dt=Fe(ri,Je=>xp(Je,2)||Wh(Je));return Dt?Xk(Dt,263):void 0}if(ri.some(vj))return;const Ze=pt&&!(St.flags&262144);if(Ze&&!(H6(pt)&&!pt.globalExports))return;let gt;for(const Dt of ri){const Je=UI(Dt);if(gt&&gt!==Je||!Je||Je.kind===307&&!Cp(Je))return;if(gt=Je,ml(gt)){let Rt;for(;Rt=zae(gt);)gt=Rt}}return Ze?gt.getSourceFile():gt}function we(St,ri,xe,pt=xe){return he(St,ri,xe,()=>!0,pt)||!1}t.isSymbolReferencedInFile=we;function he(St,ri,xe,pt,Se=xe){const Ze=vp(St.parent,St.parent.parent)?ya(ri.getSymbolsOfParameterPropertyDeclaration(St.parent,St.text)):ri.getSymbolAtLocation(St);if(Ze)for(const gt of Te(xe,Ze.name,Se)){if(!ot(gt)||gt===St||gt.escapedText!==St.escapedText)continue;const Dt=ri.getSymbolAtLocation(gt);if(Dt===Ze||ri.getShorthandAssignmentValueSymbol(gt.parent)===Ze||vh(gt.parent)&&et(gt,Dt,gt.parent,ri)===Ze){const Je=pt(gt);if(Je)return Je}}}t.eachSymbolReferenceInFile=he;function Ae(St,ri){return $t(Te(ri,St),Se=>!!R8(Se)).reduce((Se,Ze)=>{const gt=pt(Ze);return!Ft(Se.declarationNames)||gt===Se.depth?(Se.declarationNames.push(Ze),Se.depth=gt):gt<Se.depth&&(Se.declarationNames=[Ze],Se.depth=gt),Se},{depth:1/0,declarationNames:[]}).declarationNames;function pt(Se){let Ze=0;for(;Se;)Se=UI(Se),Ze++;return Ze}}t.getTopMostDeclarationNamesInFile=Ae;function ke(St,ri,xe,pt){if(!St.name||!ot(St.name))return!1;const Se=j.checkDefined(xe.getSymbolAtLocation(St.name));for(const Ze of ri)for(const gt of Te(Ze,Se.name)){if(!ot(gt)||gt===St.name||gt.escapedText!==St.name.escapedText)continue;const Dt=_Z(gt),Je=la(Dt.parent)&&Dt.parent.expression===Dt?Dt.parent:void 0,Rt=xe.getSymbolAtLocation(gt);if(Rt&&xe.getRootSymbols(Rt).some(Ct=>Ct===Se)&&pt(gt,Je))return!0}return!1}t.someSignatureUsage=ke;function Te(St,ri,xe=St){return es(De(St,ri,xe),pt=>{const Se=R_(St,pt);return Se===St?void 0:Se})}function De(St,ri,xe=St){const pt=[];if(!ri||!ri.length)return pt;const Se=St.text,Ze=Se.length,gt=ri.length;let Dt=Se.indexOf(ri,xe.pos);for(;Dt>=0&&!(Dt>xe.end);){const Je=Dt+gt;(Dt===0||!jb(Se.charCodeAt(Dt-1),99))&&(Je===Ze||!jb(Se.charCodeAt(Je),99))&&pt.push(Dt),Dt=Se.indexOf(ri,Dt+gt+1)}return pt}function qe(St,ri){const xe=St.getSourceFile(),pt=ri.text,Se=es(Te(xe,pt,St),Ze=>Ze===ri||uj(Ze)&&pZ(Ze,pt)===ri?oC(Ze):void 0);return[{definition:{type:1,node:ri},references:Se}]}function se(St,ri){switch(St.kind){case 81:if(a2(St.parent))return!0;case 80:return St.text.length===ri.length;case 15:case 11:{const xe=St;return xe.text.length===ri.length&&(mZ(xe)||kfe(St)||ZPe(St)||la(St.parent)&&vI(St.parent)&&St.parent.arguments[1]===St||Vk(St.parent))}case 9:return mZ(St)&&St.text.length===ri.length;case 90:return ri.length===7;default:return!1}}function Ne(St,ri){const xe=Rr(St,pt=>(ri.throwIfCancellationRequested(),es(Te(pt,"meta",pt),Se=>{const Ze=Se.parent;if(J6(Ze))return oC(Ze)})));return xe.length?[{definition:{type:2,node:xe[0].node},references:xe}]:void 0}function Oe(St,ri,xe,pt){const Se=Rr(St,Ze=>(xe.throwIfCancellationRequested(),es(Te(Ze,xa(ri),Ze),gt=>{if(gt.kind===ri&&(!pt||pt(gt)))return oC(gt)})));return Se.length?[{definition:{type:2,node:Se[0].node},references:Se}]:void 0}function He(St,ri,xe,pt=!0){return xe.cancellationToken.throwIfCancellationRequested(),Pe(St,St,ri,xe,pt)}function Pe(St,ri,xe,pt,Se){if(pt.markSearchedSymbols(ri,xe.allSearchSymbols))for(const Ze of De(ri,xe.text,St))ze(ri,Ze,xe,pt,Se)}function We(St,ri){return!!(zI(St)&ri.searchMeaning)}function ze(St,ri,xe,pt,Se){const Ze=R_(St,ri);if(!se(Ze,xe.text)){!pt.options.implementations&&(pt.options.findInStrings&&lA(St,ri)||pt.options.findInComments&&dAe(St,ri))&&pt.addStringOrCommentReference(St.fileName,Ff(ri,xe.text.length));return}if(!We(Ze,pt))return;let gt=pt.checker.getSymbolAtLocation(Ze);if(!gt)return;const Dt=Ze.parent;if(l_(Dt)&&Dt.propertyName===Ze)return;if(vh(Dt)){j.assert(Ze.kind===80||Ze.kind===11),$e(Ze,gt,Dt,xe,pt,Se);return}if(g8(Dt)&&Dt.isNameFirst&&Dt.typeExpression&&OI(Dt.typeExpression.type)&&Dt.typeExpression.type.jsDocPropertyTags&&P(Dt.typeExpression.type.jsDocPropertyTags)){Nt(Dt.typeExpression.type.jsDocPropertyTags,Ze,xe,pt);return}const Je=dr(xe,gt,Ze,pt);if(!Je){wt(gt,xe,pt);return}switch(pt.specialSearchKind){case 0:Se&&Et(Ze,Je,pt);break;case 1:dt(Ze,St,xe,pt);break;case 2:zt(Ze,xe,pt);break;default:j.assertNever(pt.specialSearchKind)}nr(Ze)&&ec(Ze.parent)&&HT(Ze.parent.parent.parent)&&(gt=Ze.parent.symbol,!gt)||ut(Ze,gt,xe,pt)}function Nt(St,ri,xe,pt){const Se=pt.referenceAdder(xe.symbol);Et(ri,xe.symbol,pt),O(St,Ze=>{o_(Ze.name)&&Se(Ze.name.left)})}function $e(St,ri,xe,pt,Se,Ze,gt){j.assert(!gt||!!Se.options.providePrefixAndSuffixTextForRename,"If alwaysGetReferences is true, then prefix/suffix text must be enabled");const{parent:Dt,propertyName:Je,name:Rt}=xe,Ct=Dt.parent,ii=et(St,ri,xe,Se.checker);if(!gt&&!pt.includes(ii))return;if(Je?St===Je?(Ct.moduleSpecifier||vt(),Ze&&Se.options.use!==2&&Se.markSeenReExportRHS(Rt)&&Et(Rt,j.checkDefined(xe.symbol),Se)):Se.markSeenReExportRHS(St)&&vt():Se.options.use===2&&My(Rt)||vt(),!ac(Se.options)||gt){const ji=My(St)||My(xe.name)?1:0,gr=j.checkDefined(xe.symbol),te=NOe(gr,ji,Se.checker);te&&Q(St,gr,te,Se)}if(pt.comingFrom!==1&&Ct.moduleSpecifier&&!Je&&!ac(Se.options)){const Ni=Se.checker.getExportSpecifierLocalTargetSymbol(xe);Ni&&pe(Ni,Se)}function vt(){Ze&&Et(St,ii,Se)}}function et(St,ri,xe,pt){return Me(St,xe)&&pt.getExportSpecifierLocalTargetSymbol(xe)||ri}function Me(St,ri){const{parent:xe,propertyName:pt,name:Se}=ri;return j.assert(pt===St||Se===St),pt?pt===St:!xe.parent.moduleSpecifier}function ut(St,ri,xe,pt){const Se=kdt(St,ri,pt.checker,xe.comingFrom===1);if(!Se)return;const{symbol:Ze}=Se;Se.kind===0?ac(pt.options)||pe(Ze,pt):Q(St,Ze,Se.exportInfo,pt)}function wt({flags:St,valueDeclaration:ri},xe,pt){const Se=pt.checker.getShorthandAssignmentValueSymbol(ri),Ze=ri&&No(ri);!(St&33554432)&&Ze&&xe.includes(Se)&&Et(Ze,Se,pt)}function Et(St,ri,xe){const{kind:pt,symbol:Se}="kind"in ri?ri:{kind:void 0,symbol:ri};if(xe.options.use===2&&St.kind===90)return;const Ze=xe.referenceAdder(Se);xe.options.implementations?Fi(St,Ze,xe):Ze(St,pt)}function dt(St,ri,xe,pt){r5(St)&&Et(St,xe.symbol,pt);const Se=()=>pt.referenceAdder(xe.symbol);if(ss(St.parent))j.assert(St.kind===90||St.parent.name===St),Ei(xe.symbol,ri,Se());else{const Ze=ka(St);Ze&&(xn(Ze,Se()),_i(Ze,pt))}}function zt(St,ri,xe){Et(St,ri.symbol,xe);const pt=St.parent;if(xe.options.use===2||!ss(pt))return;j.assert(pt.name===St);const Se=xe.referenceAdder(ri.symbol);for(const Ze of pt.members)iP(Ze)&&pa(Ze)&&Ze.body&&Ze.body.forEachChild(function gt(Dt){Dt.kind===110?Se(Dt):!Ho(Dt)&&!ss(Dt)&&Dt.forEachChild(gt)})}function Ei(St,ri,xe){const pt=tn(St);if(pt&&pt.declarations)for(const Se of pt.declarations){const Ze=Uc(Se,137,ri);j.assert(Se.kind===176&&!!Ze),xe(Ze)}St.exports&&St.exports.forEach(Se=>{const Ze=Se.valueDeclaration;if(Ze&&Ze.kind===174){const gt=Ze.body;gt&&ma(gt,110,Dt=>{r5(Dt)&&xe(Dt)})}})}function tn(St){return St.members&&St.members.get("__constructor")}function xn(St,ri){const xe=tn(St.symbol);if(xe&&xe.declarations)for(const pt of xe.declarations){j.assert(pt.kind===176);const Se=pt.body;Se&&ma(Se,108,Ze=>{yfe(Ze)&&ri(Ze)})}}function Pn(St){return!!tn(St.symbol)}function _i(St,ri){if(Pn(St))return;const xe=St.symbol,pt=ri.createSearch(void 0,xe,void 0);F(xe,ri,pt)}function Fi(St,ri,xe){if(Wy(St)&&Xr(St.parent)){ri(St);return}if(St.kind!==80)return;St.parent.kind===304&&Gs(St,xe.checker,ri);const pt=On(St);if(pt){ri(pt);return}const Se=Qi(St,Dt=>!o_(Dt.parent)&&!ws(Dt.parent)&&!OT(Dt.parent)),Ze=Se.parent;if(wG(Ze)&&Ze.type===Se&&xe.markSeenContainingTypeReference(Ze))if(aS(Ze))gt(Ze.initializer);else if(Ho(Ze)&&Ze.body){const Dt=Ze.body;Dt.kind===241?uS(Dt,Je=>{Je.expression&&gt(Je.expression)}):gt(Dt)}else Hk(Ze)&&gt(Ze.expression);function gt(Dt){pn(Dt)&&ri(Dt)}}function On(St){return ot(St)||Nr(St)?On(St.parent):Yb(St)?Jr(St.parent.parent,om(ss,zf)):void 0}function pn(St){switch(St.kind){case 217:return pn(St.expression);case 219:case 218:case 210:case 231:case 209:return!0;default:return!1}}function qr(St,ri,xe,pt){if(St===ri)return!0;const Se=Ba(St)+","+Ba(ri),Ze=xe.get(Se);if(Ze!==void 0)return Ze;xe.set(Se,!1);const gt=!!St.declarations&&St.declarations.some(Dt=>F8(Dt).some(Je=>{const Rt=pt.getTypeAtLocation(Je);return!!Rt&&!!Rt.symbol&&qr(Rt.symbol,ri,xe,pt)}));return xe.set(Se,gt),gt}function Fs(St){let ri=oV(St,!1);if(!ri)return;let xe=256;switch(ri.kind){case 172:case 171:case 174:case 173:case 176:case 177:case 178:xe&=_S(ri),ri=ri.parent;break;default:return}const pt=ri.getSourceFile(),Se=es(Te(pt,"super",ri),Ze=>{if(Ze.kind!==108)return;const gt=oV(Ze,!1);return gt&&pa(gt)===!!xe&&gt.parent.symbol===ri.symbol?oC(Ze):void 0});return[{definition:{type:0,symbol:ri.symbol},references:Se}]}function ko(St){return St.kind===80&&St.parent.kind===169&&St.parent.name===St}function ls(St,ri,xe){let pt=Hh(St,!1,!1),Se=256;switch(pt.kind){case 174:case 173:if(Ig(pt)){Se&=_S(pt),pt=pt.parent;break}case 172:case 171:case 176:case 177:case 178:Se&=_S(pt),pt=pt.parent;break;case 307:if(wd(pt)||ko(St))return;case 262:case 218:break;default:return}const Ze=Rr(pt.kind===307?ri:[pt.getSourceFile()],Dt=>(xe.throwIfCancellationRequested(),Te(Dt,"this",Os(pt)?Dt:pt).filter(Je=>{if(!X3(Je))return!1;const Rt=Hh(Je,!1,!1);if(!M0(Rt))return!1;switch(pt.kind){case 218:case 262:return pt.symbol===Rt.symbol;case 174:case 173:return Ig(pt)&&pt.symbol===Rt.symbol;case 231:case 263:case 210:return Rt.parent&&M0(Rt.parent)&&pt.symbol===Rt.parent.symbol&&pa(Rt)===!!Se;case 307:return Rt.kind===307&&!wd(Rt)&&!ko(Je)}}))).map(Dt=>oC(Dt));return[{definition:{type:3,node:J(Ze,Dt=>$s(Dt.node.parent)?Dt.node:void 0)||St},references:Ze}]}function Qs(St,ri,xe,pt){const Se=bZ(St,xe),Ze=Rr(ri,gt=>(pt.throwIfCancellationRequested(),es(Te(gt,St.text),Dt=>{if(Bc(Dt)&&Dt.text===St.text)if(Se){const Je=bZ(Dt,xe);if(Se!==xe.getStringType()&&(Se===Je||Mn(Dt,xe)))return oC(Dt,2)}else return TI(Dt)&&!wI(Dt,gt)?void 0:oC(Dt,2)})));return[{definition:{type:4,node:St},references:Ze}]}function Mn(St,ri){if(O_(St.parent))return ri.getPropertyOfType(ri.getTypeAtLocation(St.parent.parent),St.text)}function Zs(St,ri,xe,pt,Se,Ze){const gt=[];return at(St,ri,xe,pt,!(pt&&Se),(Dt,Je,Rt)=>{Rt&&Sn(St)!==Sn(Rt)&&(Rt=void 0),gt.push(Rt||Je||Dt)},()=>!Ze),gt}function at(St,ri,xe,pt,Se,Ze,gt){const Dt=Vj(ri);if(Dt){const ji=xe.getShorthandAssignmentValueSymbol(ri.parent);if(ji&&pt)return Ze(ji,void 0,void 0,3);const gr=xe.getContextualType(Dt.parent),te=gr&&J(_Y(Dt,xe,gr,!0),Ue=>vt(Ue,4));if(te)return te;const tt=ue(ri,xe),Gt=tt&&Ze(tt,void 0,void 0,4);if(Gt)return Gt;const le=ji&&Ze(ji,void 0,void 0,3);if(le)return le}const Je=p(ri,St,xe);if(Je){const ji=Ze(Je,void 0,void 0,1);if(ji)return ji}const Rt=vt(St);if(Rt)return Rt;if(St.valueDeclaration&&vp(St.valueDeclaration,St.valueDeclaration.parent)){const ji=xe.getSymbolsOfParameterPropertyDeclaration(ha(St.valueDeclaration,$s),St.name);return j.assert(ji.length===2&&!!(ji[0].flags&1)&&!!(ji[1].flags&4)),vt(St.flags&1?ji[1]:ji[0])}const Ct=ql(St,281);if(!pt||Ct&&!Ct.propertyName){const ji=Ct&&xe.getExportSpecifierLocalTargetSymbol(Ct);if(ji){const gr=Ze(ji,void 0,void 0,1);if(gr)return gr}}if(!pt){let ji;return Se?ji=vj(ri.parent)?PZ(xe,ri.parent):void 0:ji=Ni(St,xe),ji&&vt(ji,4)}if(j.assert(pt),Se){const ji=Ni(St,xe);return ji&&vt(ji,4)}function vt(ji,gr){return J(xe.getRootSymbols(ji),te=>Ze(ji,te,void 0,gr)||(te.parent&&te.parent.flags&96&&gt(te)?yi(te.parent,te.name,xe,tt=>Ze(ji,te,tt,gr)):void 0))}function Ni(ji,gr){const te=ql(ji,208);if(te&&vj(te))return PZ(gr,te)}}function yi(St,ri,xe,pt){const Se=new Map;return Ze(St);function Ze(gt){if(!(!(gt.flags&96)||!Pg(Se,Ba(gt))))return J(gt.declarations,Dt=>J(F8(Dt),Je=>{const Rt=xe.getTypeAtLocation(Je),Ct=Rt&&Rt.symbol&&xe.getPropertyOfType(Rt,ri);return Rt&&Ct&&(J(xe.getRootSymbols(Ct),pt)||Ze(Rt.symbol))}))}}function Sn(St){return St.valueDeclaration?!!(jh(St.valueDeclaration)&256):!1}function dr(St,ri,xe,pt){const{checker:Se}=pt;return at(ri,xe,Se,!1,pt.options.use!==2||!!pt.options.providePrefixAndSuffixTextForRename,(Ze,gt,Dt,Je)=>(Dt&&Sn(ri)!==Sn(Dt)&&(Dt=void 0),St.includes(Dt||gt||Ze)?{symbol:gt&&!(Iu(Ze)&6)?gt:Ze,kind:Je}:void 0),Ze=>!(St.parents&&!St.parents.some(gt=>qr(Ze.parent,gt,pt.inheritsFromCache,Se))))}function us(St,ri){let xe=zI(St);const{declarations:pt}=ri;if(pt){let Se;do{Se=xe;for(const Ze of pt){const gt=fZ(Ze);gt&xe&&(xe|=gt)}}while(xe!==Se)}return xe}t.getIntersectingMeaningFromDeclarations=us;function Xr(St){return St.flags&33554432?!(zf(St)||Mg(St)):uP(St)?aS(St):Qc(St)?!!St.body:ss(St)||qW(St)}function Gs(St,ri,xe){const pt=ri.getSymbolAtLocation(St),Se=ri.getShorthandAssignmentValueSymbol(pt.valueDeclaration);if(Se)for(const Ze of Se.getDeclarations())fZ(Ze)&1&&xe(Ze)}t.getReferenceEntriesForShorthandPropertyAssignment=Gs;function ma(St,ri,xe){Uo(St,pt=>{pt.kind===ri&&xe(pt),ma(pt,ri,xe)})}function ka(St){return pce(_Z(St).parent)}function Ji(St,ri,xe){const pt=K3(St)?St.parent:void 0,Se=pt&&xe.getTypeAtLocation(pt.expression),Ze=es(Se&&(Se.isUnionOrIntersection()?Se.types:Se.symbol===ri.parent?void 0:[Se]),gt=>gt.symbol&&gt.symbol.flags&96?gt.symbol:void 0);return Ze.length===0?void 0:Ze}function ac(St){return St.use===2&&St.providePrefixAndSuffixTextForRename}})(SA||(SA={}));var uO={};c(uO,{createDefinitionInfo:()=>Xj,getDefinitionAndBoundSpan:()=>bUt,getDefinitionAtPosition:()=>Rdt,getReferenceAtPosition:()=>Bdt,getTypeDefinitionAtPosition:()=>yUt});function Rdt(t,r,a,u,h){var p;const g=Bdt(r,a,t),C=g&&[kUt(g.reference.fileName,g.fileName,g.unverified)]||w;if(g!=null&&g.file)return C;const b=R_(r,a);if(b===r)return;const{parent:T}=b,E=t.getTypeChecker();if(b.kind===164||ot(b)&&EX(T)&&T.tagName===b)return pUt(E,b)||w;if(uj(b)){const q=pZ(b.parent,b.text);return q?[MOe(E,q,"label",b.text,void 0)]:void 0}switch(b.kind){case 107:const q=Qi(b.parent,Z=>gu(Z)?"quit":Qc(Z));return q?[NY(E,q)]:void 0;case 90:if(!k7(b.parent))break;case 84:const X=Qi(b.parent,S7);if(X)return[xUt(X,r)];break}if(b.kind===135){const q=Qi(b,Z=>Qc(Z));return q&&Ft(q.modifiers,Z=>Z.kind===134)?[NY(E,q)]:void 0}if(b.kind===127){const q=Qi(b,Z=>Qc(Z));return q&&q.asteriskToken?[NY(E,q)]:void 0}if(WP(b)&&gu(b.parent)){const q=b.parent.parent,{symbol:X,failedAliasResolution:Z}=K_e(q,E,h),Q=$t(q.members,gu),re=X?E.symbolToString(X,q):"",oe=b.getSourceFile();return qt(Q,pe=>{let{pos:de}=R1(pe);return de=Va(oe.text,de),MOe(E,pe,"constructor","static {}",re,!1,Z,{start:de,length:6})})}let{symbol:N,failedAliasResolution:R}=K_e(b,E,h),F=b;if(u&&R){const q=O([b,...(N==null?void 0:N.declarations)||w],Z=>Qi(Z,tTe)),X=q&&Z6(q);X&&({symbol:N,failedAliasResolution:R}=K_e(X,E,h),F=X)}if(!N&&LZ(F)){const q=(p=t.getResolvedModuleFromModuleSpecifier(F,r))==null?void 0:p.resolvedModule;if(q)return[{name:F.text,fileName:q.resolvedFileName,containerName:void 0,containerKind:void 0,kind:"script",textSpan:Ff(0,0),failedAliasResolution:R,isAmbient:df(q.resolvedFileName),unverified:F!==b}]}if(!N)return Js(C,CUt(b,E));if(u&&Ce(N.declarations,q=>q.getSourceFile().fileName===r.fileName))return;const H=DUt(E,b);if(H&&!(oh(b.parent)&&EUt(H))){const q=NY(E,H,R);let X=Q=>Q!==H;if(E.getRootSymbols(N).some(Q=>_Ut(Q,H))){if(!iu(H))return[q];X=Q=>Q!==H&&(hd(Q)||fd(Q))}const Z=D5(E,N,b,R,X)||w;return b.kind===108?[q,...Z]:[...Z,q]}if(b.parent.kind===304){const q=E.getShorthandAssignmentValueSymbol(N.valueDeclaration),X=q!=null&&q.declarations?q.declarations.map(Z=>Xj(Z,E,q,b,!1,R)):w;return Js(X,Fdt(E,b))}if(id(b)&&ec(T)&&dm(T.parent)&&b===(T.propertyName||T.name)){const q=yj(b),X=E.getTypeAtLocation(T.parent);return q===void 0?w:Rr(X.isUnion()?X.types:[X],Z=>{const Q=Z.getProperty(q);return Q&&D5(E,Q,b)})}const U=Fdt(E,b);return Js(C,U.length?U:D5(E,N,b,R))}function _Ut(t,r){var a;return t===r.symbol||t===r.symbol.parent||lf(r.parent)||!MT(r.parent)&&t===((a=Jr(r.parent,M0))==null?void 0:a.symbol)}function Fdt(t,r){const a=Vj(r);if(a){const u=a&&t.getContextualType(a.parent);if(u)return Rr(_Y(a,t,u,!1),h=>D5(t,h,r))}return w}function pUt(t,r){const a=Qi(r,Od);if(!(a&&a.name))return;const u=Qi(a,ss);if(!u)return;const h=L1(u);if(!h)return;const p=Dc(h.expression),g=fd(p)?p.symbol:t.getSymbolAtLocation(p);if(!g)return;const C=Ws(lP(a.name)),b=bd(a)?t.getPropertyOfType(t.getTypeOfSymbol(g),C):t.getPropertyOfType(t.getDeclaredTypeOfSymbol(g),C);if(b)return D5(t,b,r)}function Bdt(t,r,a){var u,h;const p=Qj(t.referencedFiles,r);if(p){const b=a.getSourceFileFromReference(t,p);return b&&{reference:p,fileName:b.fileName,file:b,unverified:!1}}const g=Qj(t.typeReferenceDirectives,r);if(g){const b=(u=a.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(g,t))==null?void 0:u.resolvedTypeReferenceDirective,T=b&&a.getSourceFile(b.resolvedFileName);return T&&{reference:g,fileName:T.fileName,file:T,unverified:!1}}const C=Qj(t.libReferenceDirectives,r);if(C){const b=a.getLibFileFromReference(C);return b&&{reference:C,fileName:b.fileName,file:b,unverified:!1}}if(t.imports.length||t.moduleAugmentations.length){const b=Q3(t,r);let T;if(LZ(b)&&Gd(b.text)&&(T=a.getResolvedModuleFromModuleSpecifier(b,t))){const E=(h=T.resolvedModule)==null?void 0:h.resolvedFileName,N=E||Ok(ts(t.fileName),b.text);return{file:a.getSourceFile(N),fileName:N,reference:{pos:b.getStart(),end:b.getEnd(),fileName:b.text},unverified:!E}}}}var Wdt=new Set(["Array","ArrayLike","ReadonlyArray","Promise","PromiseLike","Iterable","IterableIterator","AsyncIterable","Set","WeakSet","ReadonlySet","Map","WeakMap","ReadonlyMap","Partial","Required","Readonly","Pick","Omit"]);function mUt(t,r){const a=r.symbol.name;if(!Wdt.has(a))return!1;const u=t.resolveName(a,void 0,788968,!1);return!!u&&u===r.target.symbol}function Vdt(t,r){if(!r.aliasSymbol)return!1;const a=r.aliasSymbol.name;if(!Wdt.has(a))return!1;const u=t.resolveName(a,void 0,788968,!1);return!!u&&u===r.aliasSymbol}function gUt(t,r,a,u){var h,p;if(Or(r)&4&&mUt(t,r))return Kj(t.getTypeArguments(r)[0],t,a,u);if(Vdt(t,r)&&r.aliasTypeArguments)return Kj(r.aliasTypeArguments[0],t,a,u);if(Or(r)&32&&r.target&&Vdt(t,r.target)){const g=(p=(h=r.aliasSymbol)==null?void 0:h.declarations)==null?void 0:p[0];if(g&&Mg(g)&&qp(g.type)&&g.type.typeArguments)return Kj(t.getTypeAtLocation(g.type.typeArguments[0]),t,a,u)}return[]}function yUt(t,r,a){const u=R_(r,a);if(u===r)return;if(J6(u.parent)&&u.parent.name===u)return Kj(t.getTypeAtLocation(u.parent),t,u.parent,!1);const{symbol:h,failedAliasResolution:p}=K_e(u,t,!1);if(!h)return;const g=t.getTypeOfSymbolAtLocation(h,u),C=vUt(h,g,t),b=C&&Kj(C,t,u,p),[T,E]=b&&b.length!==0?[C,b]:[g,Kj(g,t,u,p)];return E.length?[...gUt(t,T,u,p),...E]:!(h.flags&111551)&&h.flags&788968?D5(t,Vf(h,t),u,p):void 0}function Kj(t,r,a,u){return Rr(t.isUnion()&&!(t.flags&32)?t.types:[t],h=>h.symbol&&D5(r,h.symbol,a,u))}function vUt(t,r,a){if(r.symbol===t||t.valueDeclaration&&r.symbol&&_s(t.valueDeclaration)&&t.valueDeclaration.initializer===r.symbol.valueDeclaration){const u=r.getCallSignatures();if(u.length===1)return a.getReturnTypeOfSignature(ya(u))}}function bUt(t,r,a){const u=Rdt(t,r,a);if(!u||u.length===0)return;const h=Qj(r.referencedFiles,a)||Qj(r.typeReferenceDirectives,a)||Qj(r.libReferenceDirectives,a);if(h)return{definitions:u,textSpan:DS(h)};const p=R_(r,a),g=Ff(p.getStart(),p.getWidth());return{definitions:u,textSpan:g}}function CUt(t,r){return es(r.getIndexInfosAtLocation(t),a=>a.declaration&&NY(r,a.declaration))}function K_e(t,r,a){const u=r.getSymbolAtLocation(t);let h=!1;if(u!=null&&u.declarations&&u.flags&2097152&&!a&&SUt(t,u.declarations[0])){const p=r.getAliasedSymbol(u);if(p.declarations)return{symbol:p};h=!0}return{symbol:u,failedAliasResolution:h}}function SUt(t,r){return t.kind!==80&&(t.kind!==11||!Vk(t.parent))?!1:t.parent===r?!0:r.kind!==274}function wUt(t){if(!P8(t))return!1;const r=Qi(t,a=>lf(a)?!0:P8(a)?!1:"quit");return!!r&&Bu(r)===5}function D5(t,r,a,u,h){const p=h!==void 0?$t(r.declarations,h):r.declarations,g=!h&&(T()||E());if(g)return g;const C=$t(p,R=>!wUt(R)),b=Ft(C)?C:p;return qt(b,R=>Xj(R,t,r,a,!1,u));function T(){if(r.flags&32&&!(r.flags&19)&&(r5(a)||a.kind===137)){const R=Fe(p,ss);return R&&N(R.members,!0)}}function E(){return vfe(a)||Tfe(a)?N(p,!1):void 0}function N(R,F){if(!R)return;const H=R.filter(F?iu:Ho),U=H.filter(q=>!!q.body);return H.length?U.length!==0?U.map(q=>Xj(q,t,r,a)):[Xj(va(H),t,r,a,!1,u)]:void 0}}function Xj(t,r,a,u,h,p){const g=r.symbolToString(a),C=NS.getSymbolKind(r,a,u),b=a.parent?r.symbolToString(a.parent,u):"";return MOe(r,t,C,g,b,h,p)}function MOe(t,r,a,u,h,p,g,C){const b=r.getSourceFile();if(!C){const T=No(r)||r;C=f_(T,b)}return{fileName:b.fileName,textSpan:C,kind:a,name:u,containerKind:void 0,containerName:h,...kl.toContextSpan(C,b,kl.getContextNode(r)),isLocal:!ROe(t,r),isAmbient:!!(r.flags&33554432),unverified:p,failedAliasResolution:g}}function xUt(t,r){const a=kl.getContextNode(t),u=f_(POe(a)?a.start:a,r);return{fileName:r.fileName,textSpan:u,kind:"keyword",name:"switch",containerKind:void 0,containerName:"",...kl.toContextSpan(u,r,a),isLocal:!0,isAmbient:!1,unverified:!1,failedAliasResolution:void 0}}function ROe(t,r){if(t.isDeclarationVisible(r))return!0;if(!r.parent)return!1;if(aS(r.parent)&&r.parent.initializer===r)return ROe(t,r.parent);switch(r.kind){case 172:case 177:case 178:case 174:if(xp(r,2))return!1;case 176:case 303:case 304:case 210:case 231:case 219:case 218:return ROe(t,r.parent);default:return!1}}function NY(t,r,a){return Xj(r,t,r.symbol,r,!1,a)}function Qj(t,r){return Fe(t,a=>NW(a,r))}function kUt(t,r,a){return{fileName:r,textSpan:Fu(0,0),kind:"script",name:t,containerName:void 0,containerKind:void 0,unverified:a}}function TUt(t){const r=Qi(t,u=>!K3(u)),a=r==null?void 0:r.parent;return a&&MT(a)&&KG(a)===r?a:void 0}function DUt(t,r){const a=TUt(r),u=a&&t.getResolvedSignature(a);return Jr(u&&u.declaration,h=>Ho(h)&&!Hy(h))}function EUt(t){switch(t.kind){case 176:case 185:case 179:case 180:return!0;default:return!1}}var X_e={};c(X_e,{provideInlayHints:()=>PUt});var IUt=t=>new RegExp(`^\\s?/\\*\\*?\\s?${t}\\s?\\*\\/\\s?$`);function NUt(t){return t.includeInlayParameterNameHints==="literals"||t.includeInlayParameterNameHints==="all"}function LUt(t){return t.includeInlayParameterNameHints==="literals"}function FOe(t){return t.interactiveInlayHints===!0}function PUt(t){const{file:r,program:a,span:u,cancellationToken:h,preferences:p}=t,g=r.text,C=a.getCompilerOptions(),b=$p(r,p),T=a.getTypeChecker(),E=[];return N(r),E;function N(Oe){if(!(!Oe||Oe.getFullWidth()===0)){switch(Oe.kind){case 267:case 263:case 264:case 262:case 231:case 218:case 174:case 219:h.throwIfCancellationRequested()}if(LW(u,Oe.pos,Oe.getFullWidth())&&!(ws(Oe)&&!Yb(Oe)))return p.includeInlayVariableTypeHints&&_s(Oe)||p.includeInlayPropertyDeclarationTypeHints&&Lo(Oe)?Z(Oe):p.includeInlayEnumMemberValueHints&&SS(Oe)?q(Oe):NUt(p)&&(la(Oe)||rD(Oe))?Q(Oe):(p.includeInlayFunctionParameterTypeHints&&Qc(Oe)&&eX(Oe)&&Ie(Oe),p.includeInlayFunctionLikeReturnTypeHints&&R(Oe)&&de(Oe)),Uo(Oe,N)}}function R(Oe){return xl(Oe)||ml(Oe)||Wu(Oe)||Nu(Oe)||um(Oe)}function F(Oe,He,Pe,We){let ze=`${We?"...":""}${Oe}`,Nt;FOe(p)?(Nt=[Ne(ze,He),{text:":"}],ze=""):ze+=":",E.push({text:ze,position:Pe,kind:"Parameter",whitespaceAfter:!0,displayParts:Nt})}function H(Oe,He){E.push({text:typeof Oe=="string"?`: ${Oe}`:"",displayParts:typeof Oe=="string"?void 0:[{text:": "},...Oe],position:He,kind:"Type",whitespaceBefore:!0})}function U(Oe,He){E.push({text:`= ${Oe}`,position:He,kind:"Enum",whitespaceBefore:!0})}function q(Oe){if(Oe.initializer)return;const He=T.getConstantValue(Oe);He!==void 0&&U(He.toString(),Oe.end)}function X(Oe){return Oe.symbol&&Oe.symbol.flags&1536}function Z(Oe){if(Oe.initializer===void 0&&!(Lo(Oe)&&!(T.getTypeAtLocation(Oe).flags&1))||ta(Oe.name)||_s(Oe)&&!se(Oe)||dd(Oe))return;const Pe=T.getTypeAtLocation(Oe);if(X(Pe))return;const We=ke(Pe);if(We){const ze=typeof We=="string"?We:We.map($e=>$e.text).join("");if(p.includeInlayVariableTypeHintsWhenTypeMatchesName===!1&&jw(Oe.name.getText(),ze))return;H(We,Oe.name.end)}}function Q(Oe){const He=Oe.arguments;if(!He||!He.length)return;const Pe=[],We=T.getResolvedSignatureForSignatureHelp(Oe,Pe);if(!We||!Pe.length)return;let ze=0;for(const Nt of He){const $e=Dc(Nt);if(LUt(p)&&!pe($e)){ze++;continue}let et=0;if(Km($e)){const ut=T.getTypeAtLocation($e.expression);if(T.isTupleType(ut)){const{elementFlags:wt,fixedLength:Et}=ut.target;if(Et===0)continue;const dt=ct(wt,Ei=>!(Ei&1));(dt<0?Et:dt)>0&&(et=dt<0?Et:dt)}}const Me=T.getParameterIdentifierInfoAtPosition(We,ze);if(ze=ze+(et||1),Me){const{parameter:ut,parameterName:wt,isRestParameter:Et}=Me;if(!(p.includeInlayParameterNameHintsWhenArgumentMatchesName||!re($e,wt))&&!Et)continue;const zt=Ws(wt);if(oe($e,zt))continue;F(zt,ut,Nt.getStart(),Et)}}}function re(Oe,He){return ot(Oe)?Oe.text===He:Nr(Oe)?Oe.name.text===He:!1}function oe(Oe,He){if(!J_(He,Ja(C),qV(r.scriptKind)))return!1;const Pe=Av(g,Oe.pos);if(!(Pe!=null&&Pe.length))return!1;const We=IUt(He);return Ft(Pe,ze=>We.test(g.substring(ze.pos,ze.end)))}function pe(Oe){switch(Oe.kind){case 224:{const He=Oe.operand;return lI(He)||ot(He)&&c7(He.escapedText)}case 112:case 97:case 106:case 15:case 228:return!0;case 80:{const He=Oe.escapedText;return qe(He)||c7(He)}}return lI(Oe)}function de(Oe){if(xl(Oe)&&!Uc(Oe,21,r)||wp(Oe)||!Oe.body)return;const Pe=T.getSignatureFromDeclaration(Oe);if(!Pe)return;const We=T.getTypePredicateOfSignature(Pe);if(We!=null&&We.type){const $e=Te(We);if($e){H($e,ue(Oe));return}}const ze=T.getReturnTypeOfSignature(Pe);if(X(ze))return;const Nt=ke(ze);Nt&&H(Nt,ue(Oe))}function ue(Oe){const He=Uc(Oe,22,r);return He?He.end:Oe.parameters.end}function Ie(Oe){const He=T.getSignatureFromDeclaration(Oe);if(He)for(let Pe=0;Pe<Oe.parameters.length&&Pe<He.parameters.length;++Pe){const We=Oe.parameters[Pe];if(!se(We)||dd(We))continue;const Nt=we(He.parameters[Pe]);Nt&&H(Nt,We.questionToken?We.questionToken.end:We.name.end)}}function we(Oe){const He=Oe.valueDeclaration;if(!He||!$s(He))return;const Pe=T.getTypeOfSymbolAtLocation(Oe,He);if(!X(Pe))return ke(Pe)}function he(Oe){const Pe=_D();return z6(We=>{const ze=T.typeToTypeNode(Oe,void 0,71286784);j.assertIsDefined(ze,"should always get typenode"),Pe.writeNode(4,ze,r,We)})}function Ae(Oe){const Pe=_D();return z6(We=>{const ze=T.typePredicateToTypePredicateNode(Oe,void 0,71286784);j.assertIsDefined(ze,"should always get typePredicateNode"),Pe.writeNode(4,ze,r,We)})}function ke(Oe){if(!FOe(p))return he(Oe);const Pe=T.typeToTypeNode(Oe,void 0,71286784);return j.assertIsDefined(Pe,"should always get typeNode"),De(Pe)}function Te(Oe){if(!FOe(p))return Ae(Oe);const Pe=T.typePredicateToTypePredicateNode(Oe,void 0,71286784);return j.assertIsDefined(Pe,"should always get typenode"),De(Pe)}function De(Oe){const He=[];return Pe(Oe),He;function Pe($e){var et,Me;if(!$e)return;const ut=xa($e.kind);if(ut){He.push({text:ut});return}if(lI($e)){He.push({text:Nt($e)});return}switch($e.kind){case 80:j.assertNode($e,ot);const wt=Fr($e),Et=$e.symbol&&$e.symbol.declarations&&$e.symbol.declarations.length&&No($e.symbol.declarations[0]);Et?He.push(Ne(wt,Et)):He.push({text:wt});break;case 166:j.assertNode($e,o_),Pe($e.left),He.push({text:"."}),Pe($e.right);break;case 182:j.assertNode($e,HP),$e.assertsModifier&&He.push({text:"asserts "}),Pe($e.parameterName),$e.type&&(He.push({text:" is "}),Pe($e.type));break;case 183:j.assertNode($e,qp),Pe($e.typeName),$e.typeArguments&&(He.push({text:"<"}),ze($e.typeArguments,", "),He.push({text:">"}));break;case 168:j.assertNode($e,$l),$e.modifiers&&ze($e.modifiers," "),Pe($e.name),$e.constraint&&(He.push({text:" extends "}),Pe($e.constraint)),$e.default&&(He.push({text:" = "}),Pe($e.default));break;case 169:j.assertNode($e,$s),$e.modifiers&&ze($e.modifiers," "),$e.dotDotDotToken&&He.push({text:"..."}),Pe($e.name),$e.questionToken&&He.push({text:"?"}),$e.type&&(He.push({text:": "}),Pe($e.type));break;case 185:j.assertNode($e,v3),He.push({text:"new "}),We($e),He.push({text:" => "}),Pe($e.type);break;case 186:j.assertNode($e,tD),He.push({text:"typeof "}),Pe($e.exprName),$e.typeArguments&&(He.push({text:"<"}),ze($e.typeArguments,", "),He.push({text:">"}));break;case 187:j.assertNode($e,a_),He.push({text:"{"}),$e.members.length&&(He.push({text:" "}),ze($e.members,"; "),He.push({text:" "})),He.push({text:"}"});break;case 188:j.assertNode($e,hH),Pe($e.elementType),He.push({text:"[]"});break;case 189:j.assertNode($e,jP),He.push({text:"["}),ze($e.elements,", "),He.push({text:"]"});break;case 202:j.assertNode($e,b3),$e.dotDotDotToken&&He.push({text:"..."}),Pe($e.name),$e.questionToken&&He.push({text:"?"}),He.push({text:": "}),Pe($e.type);break;case 190:j.assertNode($e,vX),Pe($e.type),He.push({text:"?"});break;case 191:j.assertNode($e,bX),He.push({text:"..."}),Pe($e.type);break;case 192:j.assertNode($e,fx),ze($e.types," | ");break;case 193:j.assertNode($e,zP),ze($e.types," & ");break;case 194:j.assertNode($e,iD),Pe($e.checkType),He.push({text:" extends "}),Pe($e.extendsType),He.push({text:" ? "}),Pe($e.trueType),He.push({text:" : "}),Pe($e.falseType);break;case 195:j.assertNode($e,DI),He.push({text:"infer "}),Pe($e.typeParameter);break;case 196:j.assertNode($e,EI),He.push({text:"("}),Pe($e.type),He.push({text:")"});break;case 198:j.assertNode($e,t2),He.push({text:`${xa($e.operator)} `}),Pe($e.type);break;case 199:j.assertNode($e,nD),Pe($e.objectType),He.push({text:"["}),Pe($e.indexType),He.push({text:"]"});break;case 200:j.assertNode($e,II),He.push({text:"{ "}),$e.readonlyToken&&($e.readonlyToken.kind===40?He.push({text:"+"}):$e.readonlyToken.kind===41&&He.push({text:"-"}),He.push({text:"readonly "})),He.push({text:"["}),Pe($e.typeParameter),$e.nameType&&(He.push({text:" as "}),Pe($e.nameType)),He.push({text:"]"}),$e.questionToken&&($e.questionToken.kind===40?He.push({text:"+"}):$e.questionToken.kind===41&&He.push({text:"-"}),He.push({text:"?"})),He.push({text:": "}),$e.type&&Pe($e.type),He.push({text:"; }"});break;case 201:j.assertNode($e,bS),Pe($e.literal);break;case 184:j.assertNode($e,Hy),We($e),He.push({text:" => "}),Pe($e.type);break;case 205:j.assertNode($e,V1),$e.isTypeOf&&He.push({text:"typeof "}),He.push({text:"import("}),Pe($e.argument),$e.assertions&&(He.push({text:", { assert: "}),ze($e.assertions.assertClause.elements,", "),He.push({text:" }"})),He.push({text:")"}),$e.qualifier&&(He.push({text:"."}),Pe($e.qualifier)),$e.typeArguments&&(He.push({text:"<"}),ze($e.typeArguments,", "),He.push({text:">"}));break;case 171:j.assertNode($e,O_),(et=$e.modifiers)!=null&&et.length&&(ze($e.modifiers," "),He.push({text:" "})),Pe($e.name),$e.questionToken&&He.push({text:"?"}),$e.type&&(He.push({text:": "}),Pe($e.type));break;case 181:j.assertNode($e,eD),He.push({text:"["}),ze($e.parameters,", "),He.push({text:"]"}),$e.type&&(He.push({text:": "}),Pe($e.type));break;case 173:j.assertNode($e,W1),(Me=$e.modifiers)!=null&&Me.length&&(ze($e.modifiers," "),He.push({text:" "})),Pe($e.name),$e.questionToken&&He.push({text:"?"}),We($e),$e.type&&(He.push({text:": "}),Pe($e.type));break;case 179:j.assertNode($e,VP),We($e),$e.type&&(He.push({text:": "}),Pe($e.type));break;case 207:j.assertNode($e,CS),He.push({text:"["}),ze($e.elements,", "),He.push({text:"]"});break;case 206:j.assertNode($e,dm),He.push({text:"{"}),$e.elements.length&&(He.push({text:" "}),ze($e.elements,", "),He.push({text:" "})),He.push({text:"}"});break;case 208:j.assertNode($e,ec),Pe($e.name);break;case 224:j.assertNode($e,n2),He.push({text:xa($e.operator)}),Pe($e.operand);break;case 203:j.assertNode($e,REe),Pe($e.head),$e.templateSpans.forEach(Pe);break;case 16:j.assertNode($e,FP),He.push({text:Nt($e)});break;case 204:j.assertNode($e,fle),Pe($e.type),Pe($e.literal);break;case 17:j.assertNode($e,cle),He.push({text:Nt($e)});break;case 18:j.assertNode($e,pX),He.push({text:Nt($e)});break;case 197:j.assertNode($e,C3),He.push({text:"this"});break;default:j.failBadSyntaxKind($e)}}function We($e){$e.typeParameters&&(He.push({text:"<"}),ze($e.typeParameters,", "),He.push({text:">"})),He.push({text:"("}),ze($e.parameters,", "),He.push({text:")"})}function ze($e,et){$e.forEach((Me,ut)=>{ut>0&&He.push({text:et}),Pe(Me)})}function Nt($e){switch($e.kind){case 11:return b===0?`'${Vy($e.text,39)}'`:`"${Vy($e.text,34)}"`;case 16:case 17:case 18:{const et=$e.rawText??nce(Vy($e.text,96));switch($e.kind){case 16:return"`"+et+"${";case 17:return"}"+et+"${";case 18:return"}"+et+"`"}}}return $e.text}}function qe(Oe){return Oe==="undefined"}function se(Oe){if((Qk(Oe)||_s(Oe)&&$6(Oe))&&Oe.initializer){const He=Dc(Oe.initializer);return!(pe(He)||rD(He)||Aa(He)||Hk(He))}return!0}function Ne(Oe,He){const Pe=He.getSourceFile();return{text:Oe,span:f_(He,Pe),file:Pe.fileName}}}var S2={};c(S2,{getDocCommentTemplateAtPosition:()=>zUt,getJSDocParameterNameCompletionDetails:()=>jUt,getJSDocParameterNameCompletions:()=>HUt,getJSDocTagCompletionDetails:()=>Jdt,getJSDocTagCompletions:()=>VUt,getJSDocTagNameCompletionDetails:()=>WUt,getJSDocTagNameCompletions:()=>BUt,getJsDocCommentsFromDeclarations:()=>AUt,getJsDocTagsFromDeclarations:()=>RUt});var Hdt=["abstract","access","alias","argument","async","augments","author","borrows","callback","class","classdesc","constant","constructor","constructs","copyright","default","deprecated","description","emits","enum","event","example","exports","extends","external","field","file","fileoverview","fires","function","generator","global","hideconstructor","host","ignore","implements","import","inheritdoc","inner","instance","interface","kind","lends","license","link","linkcode","linkplain","listens","member","memberof","method","mixes","module","name","namespace","overload","override","package","param","private","prop","property","protected","public","readonly","requires","returns","satisfies","see","since","static","summary","template","this","throws","todo","tutorial","type","typedef","var","variation","version","virtual","yields"],jdt,zdt;function AUt(t,r){const a=[];return Zfe(t,u=>{for(const h of MUt(u)){const p=z0(h)&&h.tags&&Fe(h.tags,C=>C.kind===327&&(C.tagName.escapedText==="inheritDoc"||C.tagName.escapedText==="inheritdoc"));if(h.comment===void 0&&!p||z0(h)&&u.kind!==346&&u.kind!==338&&h.tags&&h.tags.some(C=>C.kind===346||C.kind===338)&&!h.tags.some(C=>C.kind===341||C.kind===342))continue;let g=h.comment?dO(h.comment,r):[];p&&p.comment&&(g=g.concat(dO(p.comment,r))),Yt(a,g,OUt)||a.push(g)}}),Dr(ye(a,[tO()]))}function OUt(t,r){return i_(t,r,(a,u)=>a.kind===u.kind&&a.text===u.text)}function MUt(t){switch(t.kind){case 341:case 348:return[t];case 338:case 346:return[t,t.parent];case 323:if(D3(t.parent))return[t.parent.parent];default:return jae(t)}}function RUt(t,r){const a=[];return Zfe(t,u=>{const h=Wk(u);if(!(h.some(p=>p.kind===346||p.kind===338)&&!h.some(p=>p.kind===341||p.kind===342)))for(const p of h)a.push({name:p.tagName.text,text:$dt(p,r)}),a.push(...Udt(qdt(p),r))}),a}function Udt(t,r){return Rr(t,a=>Js([{name:a.tagName.text,text:$dt(a,r)}],Udt(qdt(a),r)))}function qdt(t){return g8(t)&&t.isNameFirst&&t.typeExpression&&OI(t.typeExpression.type)?t.typeExpression.type.jsDocPropertyTags:void 0}function dO(t,r){return typeof t=="string"?[pm(t)]:Rr(t,a=>a.kind===321?[pm(a.text)]:SAe(a,r))}function $dt(t,r){const{comment:a,kind:u}=t,h=FUt(u);switch(u){case 349:const C=t.typeExpression;return C?p(C):a===void 0?void 0:dO(a,r);case 329:return p(t.class);case 328:return p(t.class);case 345:const b=t,T=[];if(b.constraint&&T.push(pm(b.constraint.getText())),P(b.typeParameters)){P(T)&&T.push(bu());const N=b.typeParameters[b.typeParameters.length-1];O(b.typeParameters,R=>{T.push(h(R.getText())),N!==R&&T.push(Sh(28),bu())})}return a&&T.push(bu(),...dO(a,r)),T;case 344:case 350:return p(t.typeExpression);case 346:case 338:case 348:case 341:case 347:const{name:E}=t;return E?p(E):a===void 0?void 0:dO(a,r);default:return a===void 0?void 0:dO(a,r)}function p(C){return g(C.getText())}function g(C){return a?C.match(/^https?$/)?[pm(C),...dO(a,r)]:[h(C),bu(),...dO(a,r)]:[pm(C)]}}function FUt(t){switch(t){case 341:return gAe;case 348:return yAe;case 345:return bAe;case 346:case 338:return vAe;default:return pm}}function BUt(){return jdt||(jdt=qt(Hdt,t=>({name:t,kind:"keyword",kindModifiers:"",sortText:CA.SortText.LocationPriority})))}var WUt=Jdt;function VUt(){return zdt||(zdt=qt(Hdt,t=>({name:`@${t}`,kind:"keyword",kindModifiers:"",sortText:CA.SortText.LocationPriority})))}function Jdt(t){return{name:t,kind:"",kindModifiers:"",displayParts:[pm(t)],documentation:w,tags:void 0,codeActions:void 0}}function HUt(t){if(!ot(t.name))return w;const r=t.name.text,a=t.parent,u=a.parent;return Ho(u)?es(u.parameters,h=>{if(!ot(h.name))return;const p=h.name.text;if(!(a.tags.some(g=>g!==t&&Qm(g)&&ot(g.name)&&g.name.escapedText===p)||r!==void 0&&!so(p,r)))return{name:p,kind:"parameter",kindModifiers:"",sortText:CA.SortText.LocationPriority}}):[]}function jUt(t){return{name:t,kind:"parameter",kindModifiers:"",displayParts:[pm(t)],documentation:w,tags:void 0,codeActions:void 0}}function zUt(t,r,a,u){const h=Rs(r,a),p=Qi(h,z0);if(p&&(p.comment!==void 0||P(p.tags)))return;const g=h.getStart(r);if(!p&&g<a)return;const C=JUt(h,u);if(!C)return;const{commentOwner:b,parameters:T,hasReturn:E}=C,N=jp(b)&&b.jsDoc?b.jsDoc:void 0,R=rl(N);if(b.getStart(r)<a||R&&p&&R!==p)return;const F=UUt(r,a),H=Uv(r.fileName),U=(T?qUt(T||[],H,F,t):"")+(E?$Ut(F,t):""),q="/**",X=" */",Z=P(Wk(b))>0;if(U&&!Z){const Q=q+t+F+" * ",re=g===a?t+F:"";return{newText:Q+t+U+F+X+re,caretOffset:Q.length}}return{newText:q+X,caretOffset:3}}function UUt(t,r){const{text:a}=t,u=Wg(r,t);let h=u;for(;h<=r&&k1(a.charCodeAt(h));h++);return a.slice(u,h)}function qUt(t,r,a,u){return t.map(({name:h,dotDotDotToken:p},g)=>{const C=h.kind===80?h.text:"param"+g;return`${a} * @param ${r?p?"{...any} ":"{any} ":""}${C}${u}`}).join("")}function $Ut(t,r){return`${t} * @returns${r}`}function JUt(t,r){return z2e(t,a=>BOe(a,r))}function BOe(t,r){switch(t.kind){case 262:case 218:case 174:case 176:case 173:case 219:const a=t;return{commentOwner:t,parameters:a.parameters,hasReturn:LY(a,r)};case 303:return BOe(t.initializer,r);case 263:case 264:case 266:case 306:case 265:return{commentOwner:t};case 171:{const h=t;return h.type&&Hy(h.type)?{commentOwner:t,parameters:h.type.parameters,hasReturn:LY(h.type,r)}:{commentOwner:t}}case 243:{const p=t.declarationList.declarations,g=p.length===1&&p[0].initializer?GUt(p[0].initializer):void 0;return g?{commentOwner:t,parameters:g.parameters,hasReturn:LY(g,r)}:{commentOwner:t}}case 307:return"quit";case 267:return t.parent.kind===267?void 0:{commentOwner:t};case 244:return BOe(t.expression,r);case 226:{const h=t;return Bu(h)===0?"quit":Ho(h.right)?{commentOwner:t,parameters:h.right.parameters,hasReturn:LY(h.right,r)}:{commentOwner:t}}case 172:const u=t.initializer;if(u&&(ml(u)||xl(u)))return{commentOwner:t,parameters:u.parameters,hasReturn:LY(u,r)}}}function LY(t,r){return!!(r!=null&&r.generateReturnInDocTemplate)&&(Hy(t)||xl(t)&&jt(t.body)||Qc(t)&&t.body&&Xo(t.body)&&!!uS(t.body,a=>a))}function GUt(t){for(;t.kind===217;)t=t.expression;switch(t.kind){case 218:case 219:return t;case 231:return Fe(t.members,iu)}}var Q_e={};c(Q_e,{mapCode:()=>KUt});function KUt(t,r,a,u,h,p){return er.ChangeTracker.with({host:u,formatContext:h,preferences:p},g=>{const C=r.map(T=>XUt(t,T)),b=a&&Dr(a);for(const T of C)QUt(t,g,T,b)})}function XUt(t,r){const a=[{parse:()=>ZP("__mapcode_content_nodes.ts",r,t.languageVersion,!0,t.scriptKind),body:p=>p.statements},{parse:()=>ZP("__mapcode_class_content_nodes.ts",`class __class {
+${r}
+}`,t.languageVersion,!0,t.scriptKind),body:p=>p.statements[0].members}],u=[];for(const{parse:p,body:g}of a){const C=p(),b=g(C);if(b.length&&C.parseDiagnostics.length===0)return b;b.length&&u.push({sourceFile:C,body:b})}u.sort((p,g)=>p.sourceFile.parseDiagnostics.length-g.sourceFile.parseDiagnostics.length);const{body:h}=u[0];return h}function QUt(t,r,a,u){Od(a[0])||OT(a[0])?ZUt(t,r,a,u):YUt(t,r,a,u)}function ZUt(t,r,a,u){let h;if(!u||!u.length?h=Fe(t.statements,om(ss,zf)):h=O(u,g=>Qi(Rs(t,g.start),om(ss,zf))),!h)return;const p=h.members.find(g=>a.some(C=>PY(C,g)));if(p){const g=rt(h.members,C=>a.some(b=>PY(b,C)));O(a,Z_e),r.replaceNodeRangeWithNodes(t,p,g,a);return}O(a,Z_e),r.insertNodesAfter(t,h.members[h.members.length-1],a)}function YUt(t,r,a,u){if(!(u!=null&&u.length)){r.insertNodesAtEndOfFile(t,a,!1);return}for(const p of u){const g=Qi(Rs(t,p.start),C=>om(Xo,Os)(C)&&Ft(C.statements,b=>a.some(T=>PY(T,b))));if(g){const C=g.statements.find(b=>a.some(T=>PY(T,b)));if(C){const b=rt(g.statements,T=>a.some(E=>PY(E,T)));O(a,Z_e),r.replaceNodeRangeWithNodes(t,C,b,a);return}}}let h=t.statements;for(const p of u){const g=Qi(Rs(t,p.start),Xo);if(g){h=g.statements;break}}O(a,Z_e),r.insertNodesAfter(t,h[h.length-1],a)}function PY(t,r){var a,u,h,p,g,C;return t.kind!==r.kind?!1:t.kind===176?t.kind===r.kind:Bf(t)&&Bf(r)?t.name.getText()===r.name.getText():r2(t)&&r2(r)||gle(t)&&gle(r)?t.expression.getText()===r.expression.getText():s2(t)&&s2(r)?((a=t.initializer)==null?void 0:a.getText())===((u=r.initializer)==null?void 0:u.getText())&&((h=t.incrementor)==null?void 0:h.getText())===((p=r.incrementor)==null?void 0:p.getText())&&((g=t.condition)==null?void 0:g.getText())===((C=r.condition)==null?void 0:C.getText()):fI(t)&&fI(r)?t.expression.getText()===r.expression.getText()&&t.initializer.getText()===r.initializer.getText():_x(t)&&_x(r)?t.label.getText()===r.label.getText():t.getText()===r.getText()}function Z_e(t){Gdt(t),t.parent=void 0}function Gdt(t){t.pos=-1,t.end=-1,t.forEachChild(Gdt)}var w2={};c(w2,{compareImportsOrRequireStatements:()=>$Oe,compareModuleSpecifiers:()=>yqt,getImportDeclarationInsertionIndex:()=>_qt,getImportSpecifierInsertionIndex:()=>pqt,getNamedImportSpecifierComparerWithDetection:()=>hqt,getOrganizeImportsStringComparerWithDetection:()=>fqt,organizeImports:()=>eqt,testCoalesceExports:()=>gqt,testCoalesceImports:()=>mqt});function eqt(t,r,a,u,h,p){const g=er.ChangeTracker.fromContext({host:a,formatContext:r,preferences:h}),C=p==="SortAndCombine"||p==="All",b=C,T=p==="RemoveUnused"||p==="All",E=t.statements.filter(du),N=VOe(t,E),{comparersToTest:R,typeOrdersToTest:F}=WOe(h),H=R[0],U={moduleSpecifierComparer:typeof h.organizeImportsIgnoreCase=="boolean"?H:void 0,namedImportComparer:typeof h.organizeImportsIgnoreCase=="boolean"?H:void 0,typeOrder:h.organizeImportsTypeOrder};if(typeof h.organizeImportsIgnoreCase!="boolean"&&({comparer:U.moduleSpecifierComparer}=Qdt(N,R)),!U.typeOrder||typeof h.organizeImportsIgnoreCase!="boolean"){const Q=UOe(E,R,F);if(Q){const{namedImportComparer:re,typeOrder:oe}=Q;U.namedImportComparer=U.namedImportComparer??re,U.typeOrder=U.typeOrder??oe}}N.forEach(Q=>X(Q,U)),p!=="RemoveUnused"&&iqt(t).forEach(Q=>Z(Q,U.namedImportComparer));for(const Q of t.statements.filter(Vh)){if(!Q.body)continue;if(VOe(t,Q.body.statements.filter(du)).forEach(oe=>X(oe,U)),p!=="RemoveUnused"){const oe=Q.body.statements.filter(Ju);Z(oe,U.namedImportComparer)}}return g.getChanges();function q(Q,re){if(P(Q)===0)return;tr(Q[0],1024);const oe=b?qs(Q,ue=>AY(ue.moduleSpecifier)):[Q],pe=C?Mu(oe,(ue,Ie)=>jOe(ue[0].moduleSpecifier,Ie[0].moduleSpecifier,U.moduleSpecifierComparer??H)):oe,de=Rr(pe,ue=>AY(ue[0].moduleSpecifier)||ue[0].moduleSpecifier===void 0?re(ue):ue);if(de.length===0)g.deleteNodes(t,Q,{leadingTriviaOption:er.LeadingTriviaOption.Exclude,trailingTriviaOption:er.TrailingTriviaOption.Include},!0);else{const ue={leadingTriviaOption:er.LeadingTriviaOption.Exclude,trailingTriviaOption:er.TrailingTriviaOption.Include,suffix:rC(a,r.options)};g.replaceNodeWithNodes(t,Q[0],de,ue);const Ie=g.nodeHasTrailingComment(t,Q[0],ue);g.deleteNodes(t,Q.slice(1),{trailingTriviaOption:er.TrailingTriviaOption.Include},Ie)}}function X(Q,re){const oe=re.moduleSpecifierComparer??H,pe=re.namedImportComparer??H,de=re.typeOrder??"last",ue=Yj({organizeImportsTypeOrder:de},pe);q(Q,we=>(T&&(we=nqt(we,t,u)),b&&(we=Kdt(we,oe,ue,t)),C&&(we=Mu(we,(he,Ae)=>$Oe(he,Ae,oe))),we))}function Z(Q,re){const oe=Yj(h,re);q(Q,pe=>Xdt(pe,oe))}}function WOe(t){return{comparersToTest:typeof t.organizeImportsIgnoreCase=="boolean"?[qOe(t,t.organizeImportsIgnoreCase)]:[qOe(t,!0),qOe(t,!1)],typeOrdersToTest:t.organizeImportsTypeOrder?[t.organizeImportsTypeOrder]:["last","inline","first"]}}function VOe(t,r){const a=Ov(t.languageVersion,!1,t.languageVariant),u=[];let h=0;for(const p of r)u[h]&&tqt(t,p,a)&&h++,u[h]||(u[h]=[]),u[h].push(p);return u}function tqt(t,r,a){const u=r.getFullStart(),h=r.getStart();a.setText(t.text,u,h-u);let p=0;for(;a.getTokenStart()<h;)if(a.scan()===4&&(p++,p>=2))return!0;return!1}function iqt(t){const r=[],a=t.statements,u=P(a);let h=0,p=0;for(;h<u;)if(Ju(a[h])){r[p]===void 0&&(r[p]=[]);const g=a[h];if(g.moduleSpecifier)r[p].push(g),h++;else{for(;h<u&&Ju(a[h]);)r[p].push(a[h++]);p++}}else h++;return Rr(r,g=>VOe(t,g))}function nqt(t,r,a){const u=a.getTypeChecker(),h=a.getCompilerOptions(),p=u.getJsxNamespace(r),g=u.getJsxFragmentFactory(r),C=!!(r.transformFlags&2),b=[];for(const E of t){const{importClause:N,moduleSpecifier:R}=E;if(!N){b.push(E);continue}let{name:F,namedBindings:H}=N;if(F&&!T(F)&&(F=void 0),H)if(Jv(H))T(H.name)||(H=void 0);else{const U=H.elements.filter(q=>T(q.name));U.length<H.elements.length&&(H=U.length?G.updateNamedImports(H,U):void 0)}F||H?b.push(Zj(E,F,H)):oqt(r,R)&&(r.isDeclarationFile?b.push(G.createImportDeclaration(E.modifiers,void 0,R,void 0)):b.push(E))}return b;function T(E){return C&&(E.text===p||g&&E.text===g)&&yhe(h.jsx)||kl.Core.isSymbolReferencedInFile(E,u,r)}}function AY(t){return t!==void 0&&Bc(t)?t.text:void 0}function rqt(t){let r;const a={defaultImports:[],namespaceImports:[],namedImports:[]},u={defaultImports:[],namespaceImports:[],namedImports:[]};for(const h of t){if(h.importClause===void 0){r=r||h;continue}const p=h.importClause.isTypeOnly?a:u,{name:g,namedBindings:C}=h.importClause;g&&p.defaultImports.push(h),C&&(Jv(C)?p.namespaceImports.push(h):p.namedImports.push(h))}return{importWithoutClause:r,typeOnlyImports:a,regularImports:u}}function Kdt(t,r,a,u){if(t.length===0)return t;const h=ra(t,g=>{if(g.attributes){let C=g.attributes.token+" ";for(const b of Mu(g.attributes.elements,(T,E)=>sh(T.name.text,E.name.text)))C+=b.name.text+":",C+=Bc(b.value)?`"${b.value.text}"`:b.value.getText()+" ";return C}return""}),p=[];for(const g in h){const C=h[g],{importWithoutClause:b,typeOnlyImports:T,regularImports:E}=rqt(C);b&&p.push(b);for(const N of[E,T]){const R=N===T,{defaultImports:F,namespaceImports:H,namedImports:U}=N;if(!R&&F.length===1&&H.length===1&&U.length===0){const ue=F[0];p.push(Zj(ue,ue.importClause.name,H[0].importClause.namedBindings));continue}const q=Mu(H,(ue,Ie)=>r(ue.importClause.namedBindings.name.text,Ie.importClause.namedBindings.name.text));for(const ue of q)p.push(Zj(ue,void 0,ue.importClause.namedBindings));const X=Ra(F),Z=Ra(U),Q=X??Z;if(!Q)continue;let re;const oe=[];if(F.length===1)re=F[0].importClause.name;else for(const ue of F)oe.push(G.createImportSpecifier(!1,G.createIdentifier("default"),ue.importClause.name));oe.push(...aqt(U));const pe=G.createNodeArray(Mu(oe,a),Z==null?void 0:Z.importClause.namedBindings.elements.hasTrailingComma),de=pe.length===0?re?void 0:G.createNamedImports(w):Z?G.updateNamedImports(Z.importClause.namedBindings,pe):G.createNamedImports(pe);u&&de&&(Z!=null&&Z.importClause.namedBindings)&&!wI(Z.importClause.namedBindings,u)&&tr(de,2),R&&re&&de?(p.push(Zj(Q,re,void 0)),p.push(Zj(Z??Q,void 0,de))):p.push(Zj(Q,re,de))}}return p}function Xdt(t,r){if(t.length===0)return t;const{exportWithoutClause:a,namedExports:u,typeOnlyExports:h}=g(t),p=[];a&&p.push(a);for(const C of[u,h]){if(C.length===0)continue;const b=[];b.push(...Rr(C,N=>N.exportClause&&Xm(N.exportClause)?N.exportClause.elements:w));const T=Mu(b,r),E=C[0];p.push(G.updateExportDeclaration(E,E.modifiers,E.isTypeOnly,E.exportClause&&(Xm(E.exportClause)?G.updateNamedExports(E.exportClause,T):G.updateNamespaceExport(E.exportClause,E.exportClause.name)),E.moduleSpecifier,E.attributes))}return p;function g(C){let b;const T=[],E=[];for(const N of C)N.exportClause===void 0?b=b||N:N.isTypeOnly?E.push(N):T.push(N);return{exportWithoutClause:b,namedExports:T,typeOnlyExports:E}}}function Zj(t,r,a){return G.updateImportDeclaration(t,t.modifiers,G.updateImportClause(t.importClause,t.importClause.isTypeOnly,r,a),t.moduleSpecifier,t.attributes)}function HOe(t,r,a,u){switch(u==null?void 0:u.organizeImportsTypeOrder){case"first":return Ak(r.isTypeOnly,t.isTypeOnly)||a(t.name.text,r.name.text);case"inline":return a(t.name.text,r.name.text);default:return Ak(t.isTypeOnly,r.isTypeOnly)||a(t.name.text,r.name.text)}}function jOe(t,r,a){const u=t===void 0?void 0:AY(t),h=r===void 0?void 0:AY(r);return Ak(u===void 0,h===void 0)||Ak(Gd(u),Gd(h))||a(u,h)}function sqt(t){return t.map(r=>AY(zOe(r))||"")}function zOe(t){var r;switch(t.kind){case 271:return(r=Jr(t.moduleReference,eC))==null?void 0:r.expression;case 272:return t.moduleSpecifier;case 243:return t.declarationList.declarations[0].initializer.arguments[0]}}function oqt(t,r){const a=Ha(r)&&r.text;return Oo(a)&&Ft(t.moduleAugmentations,u=>Ha(u)&&u.text===a)}function aqt(t){return Rr(t,r=>qt(cqt(r),a=>a.name&&a.propertyName&&FT(a.name)===FT(a.propertyName)?G.updateImportSpecifier(a,a.isTypeOnly,void 0,a.name):a))}function cqt(t){var r;return(r=t.importClause)!=null&&r.namedBindings&&j1(t.importClause.namedBindings)?t.importClause.namedBindings.elements:void 0}function Qdt(t,r){const a=[];return t.forEach(u=>{a.push(sqt(u))}),Ydt(a,r)}function UOe(t,r,a){let u=!1;const h=t.filter(b=>{var T,E;const N=(E=Jr((T=b.importClause)==null?void 0:T.namedBindings,j1))==null?void 0:E.elements;return N!=null&&N.length?(!u&&N.some(R=>R.isTypeOnly)&&N.some(R=>!R.isTypeOnly)&&(u=!0),!0):!1});if(h.length===0)return;const p=h.map(b=>{var T,E;return(E=Jr((T=b.importClause)==null?void 0:T.namedBindings,j1))==null?void 0:E.elements}).filter(b=>b!==void 0);if(!u||a.length===0){const b=Ydt(p.map(T=>T.map(E=>E.name.text)),r);return{namedImportComparer:b.comparer,typeOrder:a.length===1?a[0]:void 0,isSorted:b.isSorted}}const g={first:1/0,last:1/0,inline:1/0},C={first:r[0],last:r[0],inline:r[0]};for(const b of r){const T={first:0,last:0,inline:0};for(const E of p)for(const N of a)T[N]=(T[N]??0)+Zdt(E,(R,F)=>HOe(R,F,b,{organizeImportsTypeOrder:N}));for(const E of a){const N=E;T[N]<g[N]&&(g[N]=T[N],C[N]=b)}}e:for(const b of a){const T=b;for(const E of a)if(g[E]<g[T])continue e;return{namedImportComparer:C[T],typeOrder:T,isSorted:g[T]===0}}return{namedImportComparer:C.last,typeOrder:"last",isSorted:g.last===0}}function Zdt(t,r){let a=0;for(let u=0;u<t.length-1;u++)r(t[u],t[u+1])>0&&a++;return a}function Ydt(t,r){let a,u=1/0;for(const h of r){let p=0;for(const g of t){if(g.length<=1)continue;const C=Zdt(g,h);p+=C}p<u&&(u=p,a=h)}return{comparer:a??r[0],isSorted:u===0}}function lqt(t,r){return _l(eft(t),eft(r))}function eft(t){var r;switch(t.kind){case 272:return t.importClause?t.importClause.isTypeOnly?1:((r=t.importClause.namedBindings)==null?void 0:r.kind)===274?2:t.importClause.name?3:4:0;case 271:return 5;case 243:return 6}}function OY(t){return t?fxe:sh}function uqt(t,r){const a=dqt(r),u=r.organizeImportsCaseFirst??!1,h=r.organizeImportsNumericCollation??!1,p=r.organizeImportsAccentCollation??!0,g=t?p?"accent":"base":p?"variant":"case";return new Intl.Collator(a,{usage:"sort",caseFirst:u||"false",sensitivity:g,numeric:h}).compare}function dqt(t){let r=t.organizeImportsLocale;r==="auto"&&(r=hxe()),r===void 0&&(r="en");const a=Intl.Collator.supportedLocalesOf(r);return a.length?a[0]:"en"}function qOe(t,r){return(t.organizeImportsCollation??"ordinal")==="unicode"?uqt(r,t):OY(r)}function fqt(t,r){return Qdt([t],WOe(r).comparersToTest)}function Yj(t,r){const a=r??OY(!!t.organizeImportsIgnoreCase);return(u,h)=>HOe(u,h,a,t)}function hqt(t,r,a){const{comparersToTest:u,typeOrdersToTest:h}=WOe(r),p=UOe([t],u,h);let g=Yj(r,u[0]),C;if(typeof r.organizeImportsIgnoreCase!="boolean"||!r.organizeImportsTypeOrder){if(p){const{namedImportComparer:b,typeOrder:T,isSorted:E}=p;C=E,g=Yj({organizeImportsTypeOrder:T},b)}else if(a){const b=UOe(a.statements.filter(du),u,h);if(b){const{namedImportComparer:T,typeOrder:E,isSorted:N}=b;C=N,g=Yj({organizeImportsTypeOrder:E},T)}}}return{specifierComparer:g,isSorted:C}}function _qt(t,r,a){const u=Jt(t,r,hl,(h,p)=>$Oe(h,p,a));return u<0?~u:u}function pqt(t,r,a){const u=Jt(t,r,hl,a);return u<0?~u:u}function $Oe(t,r,a){return jOe(zOe(t),zOe(r),a)||lqt(t,r)}function mqt(t,r,a,u){const h=OY(r),p=Yj({organizeImportsTypeOrder:u==null?void 0:u.organizeImportsTypeOrder},h);return Kdt(t,h,p,a)}function gqt(t,r,a){return Xdt(t,(h,p)=>HOe(h,p,OY(r),{organizeImportsTypeOrder:(a==null?void 0:a.organizeImportsTypeOrder)??"last"}))}function yqt(t,r,a){const u=OY(!!a);return jOe(t,r,u)}var Y_e={};c(Y_e,{collectElements:()=>vqt});function vqt(t,r){const a=[];return bqt(t,r,a),Cqt(t,a),a.sort((u,h)=>u.textSpan.start-h.textSpan.start),a}function bqt(t,r,a){let u=40,h=0;const p=[...t.statements,t.endOfFileToken],g=p.length;for(;h<g;){for(;h<g&&!cP(p[h]);)C(p[h]),h++;if(h===g)break;const b=h;for(;h<g&&cP(p[h]);)C(p[h]),h++;const T=h-1;T!==b&&a.push(MY(Uc(p[b],102,t).getStart(t),p[T].getEnd(),"imports"))}function C(b){var T;if(u===0)return;r.throwIfCancellationRequested(),(Wf(b)||Lu(b)||Og(b)||T1(b)||b.kind===1)&&ift(b,t,r,a),Ho(b)&&ur(b.parent)&&Nr(b.parent.left)&&ift(b.parent.left,t,r,a),(Xo(b)||H1(b))&&JOe(b.statements.end,t,r,a),(ss(b)||zf(b))&&JOe(b.members.end,t,r,a);const E=wqt(b,t);E&&a.push(E),u--,la(b)?(u++,C(b.expression),u--,b.arguments.forEach(C),(T=b.typeArguments)==null||T.forEach(C)):r2(b)&&b.elseStatement&&r2(b.elseStatement)?(C(b.expression),C(b.thenStatement),u++,C(b.elseStatement),u--):b.forEachChild(C),u++}}function Cqt(t,r){const a=[],u=t.getLineStarts();for(const h of u){const p=t.getLineEndOfPosition(h),g=t.text.substring(h,p),C=tft(g);if(!(!C||kS(t,h)))if(C.isStart){const b=Fu(t.text.indexOf("//",h),p);a.push(wA(b,"region",b,!1,C.name||"#region"))}else{const b=a.pop();b&&(b.textSpan.length=p-b.textSpan.start,b.hintSpan.length=p-b.textSpan.start,r.push(b))}}}var Sqt=/^#(end)?region(.*)\r?$/;function tft(t){if(t=t.trimStart(),!so(t,"//"))return null;t=t.slice(2).trim();const r=Sqt.exec(t);if(r)return{isStart:!r[1],name:r[2].trim()}}function JOe(t,r,a,u){const h=Av(r.text,t);if(!h)return;let p=-1,g=-1,C=0;const b=r.getFullText();for(const{kind:E,pos:N,end:R}of h)switch(a.throwIfCancellationRequested(),E){case 2:const F=b.slice(N,R);if(tft(F)){T(),C=0;break}C===0&&(p=N),g=R,C++;break;case 3:T(),u.push(MY(N,R,"comment")),C=0;break;default:j.assertNever(E)}T();function T(){C>1&&u.push(MY(p,g,"comment"))}}function ift(t,r,a,u){RP(t)||JOe(t.pos,r,a,u)}function MY(t,r,a){return wA(Fu(t,r),a)}function wqt(t,r){switch(t.kind){case 241:if(Ho(t.parent))return xqt(t.parent,t,r);switch(t.parent.kind){case 246:case 249:case 250:case 248:case 245:case 247:case 254:case 299:return E(t.parent);case 258:const F=t.parent;if(F.tryBlock===t)return E(t.parent);if(F.finallyBlock===t){const H=Uc(F,98,r);if(H)return E(H)}default:return wA(f_(t,r),"code")}case 268:return E(t.parent);case 263:case 231:case 264:case 266:case 269:case 187:case 206:return E(t);case 189:return E(t,!1,!jP(t.parent),23);case 296:case 297:return N(t.statements);case 210:return T(t);case 209:return T(t,23);case 284:return p(t);case 288:return g(t);case 285:case 286:return C(t.attributes);case 228:case 15:return b(t);case 207:return E(t,!1,!ec(t.parent),23);case 219:return h(t);case 213:return u(t);case 217:return R(t);case 275:case 279:case 300:return a(t)}function a(F){if(!F.elements.length)return;const H=Uc(F,19,r),U=Uc(F,20,r);if(!(!H||!U||qm(H.pos,U.pos,r)))return epe(H,U,F,r,!1,!1)}function u(F){if(!F.arguments.length)return;const H=Uc(F,21,r),U=Uc(F,22,r);if(!(!H||!U||qm(H.pos,U.pos,r)))return epe(H,U,F,r,!1,!0)}function h(F){if(Xo(F.body)||c_(F.body)||qm(F.body.getFullStart(),F.body.getEnd(),r))return;const H=Fu(F.body.getFullStart(),F.body.getEnd());return wA(H,"code",f_(F))}function p(F){const H=Fu(F.openingElement.getStart(r),F.closingElement.getEnd()),U=F.openingElement.tagName.getText(r),q="<"+U+">...</"+U+">";return wA(H,"code",H,!1,q)}function g(F){const H=Fu(F.openingFragment.getStart(r),F.closingFragment.getEnd());return wA(H,"code",H,!1,"<>...</>")}function C(F){if(F.properties.length!==0)return MY(F.getStart(r),F.getEnd(),"code")}function b(F){if(!(F.kind===15&&F.text.length===0))return MY(F.getStart(r),F.getEnd(),"code")}function T(F,H=19){return E(F,!1,!jf(F.parent)&&!la(F.parent),H)}function E(F,H=!1,U=!0,q=19,X=q===19?20:24){const Z=Uc(t,q,r),Q=Uc(t,X,r);return Z&&Q&&epe(Z,Q,F,r,H,U)}function N(F){return F.length?wA(DS(F),"code"):void 0}function R(F){if(qm(F.getStart(),F.getEnd(),r))return;const H=Fu(F.getStart(),F.getEnd());return wA(H,"code",f_(F))}}function xqt(t,r,a){const u=kqt(t,r,a),h=Uc(r,20,a);return u&&h&&epe(u,h,t,a,t.kind!==219)}function epe(t,r,a,u,h=!1,p=!0){const g=Fu(p?t.getFullStart():t.getStart(u),r.getEnd());return wA(g,"code",f_(a,u),h)}function wA(t,r,a=t,u=!1,h="..."){return{textSpan:t,kind:r,hintSpan:a,bannerText:h,autoCollapse:u}}function kqt(t,r,a){if(mDe(t.parameters,a)){const u=Uc(t,21,a);if(u)return u}return Uc(r,19,a)}var RY={};c(RY,{getRenameInfo:()=>Tqt,nodeIsEligibleForRename:()=>rft});function Tqt(t,r,a,u){const h=CZ(R_(r,a));if(rft(h)){const p=Dqt(h,t.getTypeChecker(),r,t,u);if(p)return p}return tpe(k.You_cannot_rename_this_element)}function Dqt(t,r,a,u,h){const p=r.getSymbolAtLocation(t);if(!p){if(Bc(t)){const R=bZ(t,r);if(R&&(R.flags&128||R.flags&1048576&&Ce(R.types,F=>!!(F.flags&128))))return GOe(t.text,t.text,"string","",t,a)}else if(Sfe(t)){const R=uu(t);return GOe(R,R,"label","",t,a)}return}const{declarations:g}=p;if(!g||g.length===0)return;if(g.some(R=>Eqt(u,R)))return tpe(k.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library);if(ot(t)&&t.escapedText==="default"&&p.parent&&p.parent.flags&1536)return;if(Bc(t)&&CV(t))return h.allowRenameOfImportPath?Nqt(t,a,p):void 0;const C=Iqt(a,p,r,h);if(C)return tpe(C);const b=NS.getSymbolKind(r,p,t),T=wAe(t)||cm(t)&&t.parent.kind===167?zm(Lg(t)):void 0,E=T||r.symbolToString(p),N=T||r.getFullyQualifiedName(p);return GOe(E,N,b,NS.getSymbolModifiers(r,p),t,a)}function Eqt(t,r){const a=r.getSourceFile();return t.isSourceFileDefaultLibrary(a)&&Xl(a.fileName,".d.ts")}function Iqt(t,r,a,u){if(!u.providePrefixAndSuffixTextForRename&&r.flags&2097152){const g=r.declarations&&Fe(r.declarations,C=>l_(C));g&&!g.propertyName&&(r=a.getAliasedSymbol(r))}const{declarations:h}=r;if(!h)return;const p=nft(t.path);if(p===void 0)return Ft(h,g=>Dj(g.getSourceFile().path))?k.You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder:void 0;for(const g of h){const C=nft(g.getSourceFile().path);if(C){const b=Math.min(p.length,C.length);for(let T=0;T<=b;T++)if(sh(p[T],C[T])!==0)return k.You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder}}}function nft(t){const r=af(t),a=r.lastIndexOf("node_modules");if(a!==-1)return r.slice(0,a+2)}function Nqt(t,r,a){if(!Gd(t.text))return tpe(k.You_cannot_rename_a_module_via_a_global_import);const u=a.declarations&&Fe(a.declarations,Os);if(!u)return;const h=su(t.text,"/index")||su(t.text,"/index.js")?void 0:mxe(s_(u.fileName),"/index"),p=h===void 0?u.fileName:h,g=h===void 0?"module":"directory",C=t.text.lastIndexOf("/")+1,b=Ff(t.getStart(r)+1+C,t.text.length-C);return{canRename:!0,fileToRename:p,kind:g,displayName:p,fullDisplayName:t.text,kindModifiers:"",triggerSpan:b}}function GOe(t,r,a,u,h,p){return{canRename:!0,fileToRename:void 0,kind:a,displayName:t,fullDisplayName:r,kindModifiers:u,triggerSpan:Lqt(h,p)}}function tpe(t){return{canRename:!1,localizedErrorMessage:Bo(t)}}function Lqt(t,r){let a=t.getStart(r),u=t.getWidth(r);return Bc(t)&&(a+=1,u-=2),Ff(a,u)}function rft(t){switch(t.kind){case 80:case 81:case 11:case 15:case 110:return!0;case 9:return mZ(t);default:return!1}}var ez={};c(ez,{getArgumentInfoForCompletions:()=>Rqt,getSignatureHelpItems:()=>Pqt});function Pqt(t,r,a,u,h){const p=t.getTypeChecker(),g=hj(r,a);if(!g)return;const C=!!u&&u.kind==="characterTyped";if(C&&(lA(r,a,g)||kS(r,a)))return;const b=!!u&&u.kind==="invoked",T=Kqt(g,a,r,p,b);if(!T)return;h.throwIfCancellationRequested();const E=Aqt(T,p,r,g,C);return h.throwIfCancellationRequested(),E?p.runWithCancellationToken(h,N=>E.kind===0?fft(E.candidates,E.resolvedSignature,T,r,N):Qqt(E.symbol,T,r,N)):r_(r)?Mqt(T,t,h):void 0}function Aqt({invocation:t,argumentCount:r},a,u,h,p){switch(t.kind){case 0:{if(p&&!Oqt(h,t.node,u))return;const g=[],C=a.getResolvedSignatureForSignatureHelp(t.node,g,r);return g.length===0?void 0:{kind:0,candidates:g,resolvedSignature:C}}case 1:{const{called:g}=t;if(p&&!sft(h,u,ot(g)?g.parent:g))return;const C=Afe(g,r,a);if(C.length!==0)return{kind:0,candidates:C,resolvedSignature:ya(C)};const b=a.getSymbolAtLocation(g);return b&&{kind:1,symbol:b}}case 2:return{kind:0,candidates:[t.signature],resolvedSignature:t.signature};default:return j.assertNever(t)}}function Oqt(t,r,a){if(!T1(r))return!1;const u=r.getChildren(a);switch(t.kind){case 21:return Yt(u,t);case 28:{const h=vZ(t);return!!h&&Yt(u,h)}case 30:return sft(t,a,r.expression);default:return!1}}function Mqt(t,r,a){if(t.invocation.kind===2)return;const u=uft(t.invocation),h=Nr(u)?u.name.text:void 0,p=r.getTypeChecker();return h===void 0?void 0:J(r.getSourceFiles(),g=>J(g.getNamedDeclarations().get(h),C=>{const b=C.symbol&&p.getTypeOfSymbolAtLocation(C.symbol,C),T=b&&b.getCallSignatures();if(T&&T.length)return p.runWithCancellationToken(a,E=>fft(T,T[0],t,g,E,!0))}))}function sft(t,r,a){const u=t.getFullStart();let h=t.parent;for(;h;){const p=xd(u,r,h,!0);if(p)return Ip(a,p);h=h.parent}return j.fail("Could not find preceding token")}function Rqt(t,r,a,u){const h=aft(t,r,a,u);return!h||h.isTypeParameterList||h.invocation.kind!==0?void 0:{invocation:h.invocation.node,argumentCount:h.argumentCount,argumentIndex:h.argumentIndex}}function oft(t,r,a,u){const h=Fqt(t,a,u);if(!h)return;const{list:p,argumentIndex:g}=h,C=qqt(u,p),b=Jqt(p,a);return{list:p,argumentIndex:g,argumentCount:C,argumentsSpan:b}}function Fqt(t,r,a){if(t.kind===30||t.kind===21)return{list:Xqt(t.parent,t,r),argumentIndex:0};{const u=vZ(t);return u&&{list:u,argumentIndex:Uqt(a,u,t)}}}function aft(t,r,a,u){const{parent:h}=t;if(T1(h)){const p=h,g=oft(t,r,a,u);if(!g)return;const{list:C,argumentIndex:b,argumentCount:T,argumentsSpan:E}=g;return{isTypeParameterList:!!h.typeArguments&&h.typeArguments.pos===C.pos,invocation:{kind:0,node:p},argumentsSpan:E,argumentIndex:b,argumentCount:T}}else{if(TI(t)&&i2(h))return pj(t,r,a)?XOe(h,0,a):void 0;if(FP(t)&&h.parent.kind===215){const p=h,g=p.parent;j.assert(p.kind===228);const C=pj(t,r,a)?0:1;return XOe(g,C,a)}else if(w3(h)&&i2(h.parent.parent)){const p=h,g=h.parent.parent;if(pX(t)&&!pj(t,r,a))return;const C=p.parent.templateSpans.indexOf(p),b=$qt(C,t,r,a);return XOe(g,b,a)}else if(oh(h)){const p=h.attributes.pos,g=Va(a.text,h.attributes.end,!1);return{isTypeParameterList:!1,invocation:{kind:0,node:h},argumentsSpan:Ff(p,g-p),argumentIndex:0,argumentCount:1}}else{const p=Ofe(t,a);if(p){const{called:g,nTypeArguments:C}=p,b={kind:1,called:g},T=Fu(g.getStart(a),t.end);return{isTypeParameterList:!0,invocation:b,argumentsSpan:T,argumentIndex:C,argumentCount:C+1}}return}}}function Bqt(t,r,a,u){return Wqt(t,r,a,u)||aft(t,r,a,u)}function cft(t){return ur(t.parent)?cft(t.parent):t}function KOe(t){return ur(t.left)?KOe(t.left)+1:2}function Wqt(t,r,a,u){const h=Vqt(t);if(h===void 0)return;const p=Hqt(h,a,r,u);if(p===void 0)return;const{contextualType:g,argumentIndex:C,argumentCount:b,argumentsSpan:T}=p,E=g.getNonNullableType(),N=E.symbol;if(N===void 0)return;const R=rl(E.getCallSignatures());return R===void 0?void 0:{isTypeParameterList:!1,invocation:{kind:2,signature:R,node:t,symbol:jqt(N)},argumentsSpan:T,argumentIndex:C,argumentCount:b}}function Vqt(t){switch(t.kind){case 21:case 28:return t;default:return Qi(t.parent,r=>$s(r)?!0:ec(r)||dm(r)||CS(r)?!1:"quit")}}function Hqt(t,r,a,u){const{parent:h}=t;switch(h.kind){case 217:case 174:case 218:case 219:const p=oft(t,a,r,u);if(!p)return;const{argumentIndex:g,argumentCount:C,argumentsSpan:b}=p,T=Nu(h)?u.getContextualTypeForObjectLiteralElement(h):u.getContextualType(h);return T&&{contextualType:T,argumentIndex:g,argumentCount:C,argumentsSpan:b};case 226:{const E=cft(h),N=u.getContextualType(E),R=t.kind===21?0:KOe(h)-1,F=KOe(E);return N&&{contextualType:N,argumentIndex:R,argumentCount:F,argumentsSpan:f_(h)}}default:return}}function jqt(t){return t.name==="__type"&&J(t.declarations,r=>{var a;return Hy(r)?(a=Jr(r.parent,M0))==null?void 0:a.symbol:void 0})||t}function zqt(t,r){const a=r.getTypeAtLocation(t.expression);if(r.isTupleType(a)){const{elementFlags:u,fixedLength:h}=a.target;if(h===0)return 0;const p=ct(u,g=>!(g&1));return p<0?h:p}return 0}function Uqt(t,r,a){return lft(t,r,a)}function qqt(t,r){return lft(t,r,void 0)}function lft(t,r,a){const u=r.getChildren();let h=0,p=!1;for(const g of u){if(a&&g===a)return!p&&g.kind===28&&h++,h;if(Km(g)){h+=zqt(g,t),p=!0;continue}if(g.kind!==28){h++,p=!0;continue}if(p){p=!1;continue}h++}return a?h:u.length&&va(u).kind===28?h+1:h}function $qt(t,r,a,u){return j.assert(a>=r.getStart(),"Assumed 'position' could not occur before node."),S2e(r)?pj(r,a,u)?0:t+2:t+1}function XOe(t,r,a){const u=TI(t.template)?1:t.template.templateSpans.length+1;return r!==0&&j.assertLessThan(r,u),{isTypeParameterList:!1,invocation:{kind:0,node:t},argumentsSpan:Gqt(t,a),argumentIndex:r,argumentCount:u}}function Jqt(t,r){const a=t.getFullStart(),u=Va(r.text,t.getEnd(),!1);return Ff(a,u-a)}function Gqt(t,r){const a=t.template,u=a.getStart();let h=a.getEnd();return a.kind===228&&va(a.templateSpans).literal.getFullWidth()===0&&(h=Va(r.text,h,!1)),Ff(u,h-u)}function Kqt(t,r,a,u,h){for(let p=t;!Os(p)&&(h||!Xo(p));p=p.parent){j.assert(Ip(p.parent,p),"Not a subspan",()=>`Child: ${j.formatSyntaxKind(p.kind)}, parent: ${j.formatSyntaxKind(p.parent.kind)}`);const g=Bqt(p,r,a,u);if(g)return g}}function Xqt(t,r,a){const u=t.getChildren(a),h=u.indexOf(r);return j.assert(h>=0&&u.length>h+1),u[h+1]}function uft(t){return t.kind===0?KG(t.node):t.called}function dft(t){return t.kind===0?t.node:t.kind===1?t.called:t.node}var FY=70246400;function fft(t,r,{isTypeParameterList:a,argumentCount:u,argumentsSpan:h,invocation:p,argumentIndex:g},C,b,T){var E;const N=dft(p),R=p.kind===2?p.symbol:b.getSymbolAtLocation(uft(p))||T&&((E=r.declaration)==null?void 0:E.symbol),F=R?f5(b,R,T?C:void 0,void 0):w,H=qt(t,Q=>Yqt(Q,F,a,b,N,C));let U=0,q=0;for(let Q=0;Q<H.length;Q++){const re=H[Q];if(t[Q]===r&&(U=q,re.length>1)){let oe=0;for(const pe of re){if(pe.isVariadic||pe.parameters.length>=u){U=q+oe;break}oe++}}q+=re.length}j.assert(U!==-1);const X={items:na(H,hl),applicableSpan:h,selectedItemIndex:U,argumentIndex:g,argumentCount:u},Z=X.items[U];if(Z.isVariadic){const Q=ct(Z.parameters,re=>!!re.isRest);-1<Q&&Q<Z.parameters.length-1?X.argumentIndex=Z.parameters.length:X.argumentIndex=Math.min(X.argumentIndex,Z.parameters.length-1)}return X}function Qqt(t,{argumentCount:r,argumentsSpan:a,invocation:u,argumentIndex:h},p,g){const C=g.getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(t);return C?{items:[Zqt(t,C,g,dft(u),p)],applicableSpan:a,selectedItemIndex:0,argumentIndex:h,argumentCount:r}:void 0}function Zqt(t,r,a,u,h){const p=f5(a,t),g=_D(),C=r.map(N=>_ft(N,a,u,h,g)),b=t.getDocumentationComment(a),T=t.getJsDocTags(a);return{isVariadic:!1,prefixDisplayParts:[...p,Sh(30)],suffixDisplayParts:[Sh(32)],separatorDisplayParts:hft,parameters:C,documentation:b,tags:T}}var hft=[Sh(28),bu()];function Yqt(t,r,a,u,h,p){const g=(a?t$t:i$t)(t,u,h,p);return qt(g,({isVariadic:C,parameters:b,prefix:T,suffix:E})=>{const N=[...r,...T],R=[...E,...e$t(t,h,u)],F=t.getDocumentationComment(u),H=t.getJsDocTags();return{isVariadic:C,prefixDisplayParts:N,suffixDisplayParts:R,separatorDisplayParts:hft,parameters:b,documentation:F,tags:H}})}function e$t(t,r,a){return m2(u=>{u.writePunctuation(":"),u.writeSpace(" ");const h=a.getTypePredicateOfSignature(t);h?a.writeTypePredicate(h,r,void 0,u):a.writeType(a.getReturnTypeOfSignature(t),r,void 0,u)})}function t$t(t,r,a,u){const h=(t.target||t).typeParameters,p=_D(),g=(h||w).map(b=>_ft(b,r,a,u,p)),C=t.thisParameter?[r.symbolToParameterDeclaration(t.thisParameter,a,FY)]:[];return r.getExpandedParameters(t).map(b=>{const T=G.createNodeArray([...C,...qt(b,N=>r.symbolToParameterDeclaration(N,a,FY))]),E=m2(N=>{p.writeList(2576,T,u,N)});return{isVariadic:!1,parameters:g,prefix:[Sh(30)],suffix:[Sh(32),...E]}})}function i$t(t,r,a,u){const h=_D(),p=m2(b=>{if(t.typeParameters&&t.typeParameters.length){const T=G.createNodeArray(t.typeParameters.map(E=>r.typeParameterToDeclaration(E,a,FY)));h.writeList(53776,T,u,b)}}),g=r.getExpandedParameters(t),C=r.hasEffectiveRestParameter(t)?g.length===1?b=>!0:b=>{var T;return!!(b.length&&((T=Jr(b[b.length-1],Rv))==null?void 0:T.links.checkFlags)&32768)}:b=>!1;return g.map(b=>({isVariadic:C(b),parameters:b.map(T=>n$t(T,r,a,u,h)),prefix:[...p,Sh(21)],suffix:[Sh(22)]}))}function n$t(t,r,a,u,h){const p=m2(b=>{const T=r.symbolToParameterDeclaration(t,a,FY);h.writeNode(4,T,u,b)}),g=r.isOptionalParameter(t.valueDeclaration),C=Rv(t)&&!!(t.links.checkFlags&32768);return{name:t.name,documentation:t.getDocumentationComment(r),displayParts:p,isOptional:g,isRest:C}}function _ft(t,r,a,u,h){const p=m2(g=>{const C=r.typeParameterToDeclaration(t,a,FY);h.writeNode(4,C,u,g)});return{name:t.symbol.name,documentation:t.symbol.getDocumentationComment(r),displayParts:p,isOptional:!1,isRest:!1}}var ipe={};c(ipe,{getSmartSelectionRange:()=>r$t});function r$t(t,r){var a,u;let h={textSpan:Fu(r.getFullStart(),r.getEnd())},p=r;e:for(;;){const b=a$t(p);if(!b.length)break;for(let T=0;T<b.length;T++){const E=b[T-1],N=b[T],R=b[T+1];if(ex(N,r,!0)>t)break e;const F=Bm(qw(r.text,N.end));if(F&&F.kind===2&&C(F.pos,F.end),s$t(r,t,N)){if(aae(N)&&Qc(p)&&!qm(N.getStart(r),N.getEnd(),r)&&g(N.getStart(r),N.getEnd()),Xo(N)||w3(N)||FP(N)||pX(N)||E&&FP(E)||Sf(N)&&Lu(p)||E3(N)&&Sf(p)||_s(N)&&E3(p)&&b.length===1||o2(N)||tC(N)||OI(N)){p=N;break}if(w3(p)&&R&&pG(R)){const X=N.getFullStart()-2,Z=R.getStart()+1;g(X,Z)}const H=E3(N)&&c$t(E)&&l$t(R)&&!qm(E.getStart(),R.getStart(),r);let U=H?E.getEnd():N.getStart();const q=H?R.getStart():u$t(r,N);if(jp(N)&&((a=N.jsDoc)!=null&&a.length)&&g(ya(N.jsDoc).getStart(),q),E3(N)){const X=N.getChildren()[0];X&&jp(X)&&((u=X.jsDoc)!=null&&u.length)&&X.getStart()!==N.pos&&(U=Math.min(U,ya(X.jsDoc).getStart()))}g(U,q),(Ha(N)||nP(N))&&g(U+1,q-1),p=N;break}if(T===b.length-1)break e}}return h;function g(b,T){if(b!==T){const E=Fu(b,T);(!h||!eO(E,h.textSpan)&&Yke(E,t))&&(h={textSpan:E,...h&&{parent:h}})}}function C(b,T){g(b,T);let E=b;for(;r.text.charCodeAt(E)===47;)E++;g(E,T)}}function s$t(t,r,a){return j.assert(a.pos<=r),r<a.end?!0:a.getEnd()===r?R_(t,r).pos<a.end:!1}var o$t=om(du,Wd);function a$t(t){var r;if(Os(t))return tz(t.getChildAt(0).getChildren(),o$t);if(II(t)){const[a,...u]=t.getChildren(),h=j.checkDefined(u.pop());j.assertEqual(a.kind,19),j.assertEqual(h.kind,20);const p=tz(u,C=>C===t.readonlyToken||C.kind===148||C===t.questionToken||C.kind===58),g=tz(p,({kind:C})=>C===23||C===168||C===24);return[a,iz(npe(g,({kind:C})=>C===59)),h]}if(O_(t)){const a=tz(t.getChildren(),g=>g===t.name||Yt(t.modifiers,g)),u=((r=a[0])==null?void 0:r.kind)===320?a[0]:void 0,h=u?a.slice(1):a,p=npe(h,({kind:g})=>g===59);return u?[u,iz(p)]:p}if($s(t)){const a=tz(t.getChildren(),h=>h===t.dotDotDotToken||h===t.name),u=tz(a,h=>h===a[0]||h===t.questionToken);return npe(u,({kind:h})=>h===64)}return ec(t)?npe(t.getChildren(),({kind:a})=>a===64):t.getChildren()}function tz(t,r){const a=[];let u;for(const h of t)r(h)?(u=u||[],u.push(h)):(u&&(a.push(iz(u)),u=void 0),a.push(h));return u&&a.push(iz(u)),a}function npe(t,r,a=!0){if(t.length<2)return t;const u=ct(t,r);if(u===-1)return t;const h=t.slice(0,u),p=t[u],g=va(t),C=a&&g.kind===27,b=t.slice(u+1,C?t.length-1:void 0),T=Rw([h.length?iz(h):void 0,p,b.length?iz(b):void 0]);return C?T.concat(g):T}function iz(t){return j.assertGreaterThanOrEqual(t.length,1),V0(l2.createSyntaxList(t),t[0].pos,va(t).end)}function c$t(t){const r=t&&t.kind;return r===19||r===23||r===21||r===286}function l$t(t){const r=t&&t.kind;return r===20||r===24||r===22||r===287}function u$t(t,r){switch(r.kind){case 341:case 338:case 348:case 346:case 343:return t.getLineEndOfPosition(r.getStart());default:return r.getEnd()}}var NS={};c(NS,{getSymbolDisplayPartsDocumentationAndSymbolKind:()=>f$t,getSymbolKind:()=>mft,getSymbolModifiers:()=>d$t});var pft=70246400;function mft(t,r,a){const u=gft(t,r,a);if(u!=="")return u;const h=l3(r);return h&32?ql(r,231)?"local class":"class":h&384?"enum":h&524288?"type":h&64?"interface":h&262144?"type parameter":h&8?"enum member":h&2097152?"alias":h&1536?"module":u}function gft(t,r,a){const u=t.getRootSymbols(r);if(u.length===1&&ya(u).flags&8192&&t.getTypeOfSymbolAtLocation(r,a).getNonNullableType().getCallSignatures().length!==0)return"method";if(t.isUndefinedSymbol(r))return"var";if(t.isArgumentsSymbol(r))return"local var";if(a.kind===110&&jt(a)||GT(a))return"parameter";const h=l3(r);if(h&3)return ehe(r)?"parameter":r.valueDeclaration&&$6(r.valueDeclaration)?"const":r.valueDeclaration&&nV(r.valueDeclaration)?"using":r.valueDeclaration&&iV(r.valueDeclaration)?"await using":O(r.declarations,WG)?"let":bft(r)?"local var":"var";if(h&16)return bft(r)?"local function":"function";if(h&32768)return"getter";if(h&65536)return"setter";if(h&8192)return"method";if(h&16384)return"constructor";if(h&131072)return"index";if(h&4){if(h&33554432&&r.links.checkFlags&6){const p=O(t.getRootSymbols(r),g=>{if(g.getFlags()&98311)return"property"});return p||(t.getTypeOfSymbolAtLocation(r,a).getCallSignatures().length?"method":"property")}return"property"}return""}function yft(t){if(t.declarations&&t.declarations.length){const[r,...a]=t.declarations,u=P(a)&&UZ(r)&&Ft(a,p=>!UZ(p))?65536:0,h=a5(r,u);if(h)return h.split(",")}return[]}function d$t(t,r){if(!r)return"";const a=new Set(yft(r));if(r.flags&2097152){const u=t.getAliasedSymbol(r);u!==r&&O(yft(u),h=>{a.add(h)})}return r.flags&16777216&&a.add("optional"),a.size>0?as(a.values()).join(","):""}function vft(t,r,a,u,h,p,g,C){var b;const T=[];let E=[],N=[];const R=l3(r);let F=g&1?gft(t,r,h):"",H=!1;const U=h.kind===110&&XG(h)||GT(h);let q,X,Z=!1;if(h.kind===110&&!U)return{displayParts:[Np(110)],documentation:[],symbolKind:"primitive type",tags:void 0};if(F!==""||R&32||R&2097152){if(F==="getter"||F==="setter"){const Te=Fe(r.declarations,De=>De.name===h);if(Te)switch(Te.kind){case 177:F="getter";break;case 178:F="setter";break;case 172:F="accessor";break;default:j.assertNever(Te)}else F="property"}let Ae;if(p??(p=U?t.getTypeAtLocation(h):t.getTypeOfSymbolAtLocation(r,h)),h.parent&&h.parent.kind===211){const Te=h.parent.name;(Te===h||Te&&Te.getFullWidth()===0)&&(h=h.parent)}let ke;if(T1(h)?ke=h:(yfe(h)||r5(h)||h.parent&&(oh(h.parent)||i2(h.parent))&&Ho(r.valueDeclaration))&&(ke=h.parent),ke){Ae=t.getResolvedSignature(ke);const Te=ke.kind===214||la(ke)&&ke.expression.kind===108,De=Te?p.getConstructSignatures():p.getCallSignatures();if(Ae&&!Yt(De,Ae.target)&&!Yt(De,Ae)&&(Ae=De.length?De[0]:void 0),Ae){switch(Te&&R&32?(F="constructor",ue(p.symbol,F)):R&2097152?(F="alias",Ie(F),T.push(bu()),Te&&(Ae.flags&4&&(T.push(Np(128)),T.push(bu())),T.push(Np(105)),T.push(bu())),de(r)):ue(r,F),F){case"JSX attribute":case"property":case"var":case"const":case"let":case"parameter":case"local var":T.push(Sh(59)),T.push(bu()),!(Or(p)&16)&&p.symbol&&(Sr(T,f5(t,p.symbol,u,void 0,5)),T.push(tO())),Te&&(Ae.flags&4&&(T.push(Np(128)),T.push(bu())),T.push(Np(105)),T.push(bu())),we(Ae,De,262144);break;default:we(Ae,De)}H=!0,Z=De.length>1}}else if(Tfe(h)&&!(R&98304)||h.kind===137&&h.parent.kind===176){const Te=h.parent;if(r.declarations&&Fe(r.declarations,qe=>qe===(h.kind===137?Te.parent:Te))){const qe=Te.kind===176?p.getNonNullableType().getConstructSignatures():p.getNonNullableType().getCallSignatures();t.isImplementationOfOverload(Te)?Ae=qe[0]:Ae=t.getSignatureFromDeclaration(Te),Te.kind===176?(F="constructor",ue(p.symbol,F)):ue(Te.kind===179&&!(p.symbol.flags&2048||p.symbol.flags&4096)?p.symbol:r,F),Ae&&we(Ae,qe),H=!0,Z=qe.length>1}}}if(R&32&&!H&&!U&&(oe(),ql(r,231)?Ie("local class"):T.push(Np(86)),T.push(bu()),de(r),he(r,a)),R&64&&g&2&&(re(),T.push(Np(120)),T.push(bu()),de(r),he(r,a)),R&524288&&g&2&&(re(),T.push(Np(156)),T.push(bu()),de(r),he(r,a),T.push(bu()),T.push(d5(64)),T.push(bu()),Sr(T,Cj(t,h.parent&&O0(h.parent)?t.getTypeAtLocation(h.parent):t.getDeclaredTypeOfSymbol(r),u,8388608))),R&384&&(re(),Ft(r.declarations,Ae=>sD(Ae)&&Uk(Ae))&&(T.push(Np(87)),T.push(bu())),T.push(Np(94)),T.push(bu()),de(r)),R&1536&&!U){re();const Ae=ql(r,267),ke=Ae&&Ae.name&&Ae.name.kind===80;T.push(Np(ke?145:144)),T.push(bu()),de(r)}if(R&262144&&g&2)if(re(),T.push(Sh(21)),T.push(pm("type parameter")),T.push(Sh(22)),T.push(bu()),de(r),r.parent)pe(),de(r.parent,u),he(r.parent,u);else{const Ae=ql(r,168);if(Ae===void 0)return j.fail();const ke=Ae.parent;if(ke)if(Ho(ke)){pe();const Te=t.getSignatureFromDeclaration(ke);ke.kind===180?(T.push(Np(105)),T.push(bu())):ke.kind!==179&&ke.name&&de(ke.symbol),Sr(T,ihe(t,Te,a,32))}else Mg(ke)&&(pe(),T.push(Np(156)),T.push(bu()),de(ke.symbol),he(ke.symbol,a))}if(R&8){F="enum member",ue(r,"enum member");const Ae=(b=r.declarations)==null?void 0:b[0];if((Ae==null?void 0:Ae.kind)===306){const ke=t.getConstantValue(Ae);ke!==void 0&&(T.push(bu()),T.push(d5(64)),T.push(bu()),T.push(Z_(Z2e(ke),typeof ke=="number"?7:8)))}}if(r.flags&2097152){if(re(),!H||E.length===0&&N.length===0){const Ae=t.getAliasedSymbol(r);if(Ae!==r&&Ae.declarations&&Ae.declarations.length>0){const ke=Ae.declarations[0],Te=No(ke);if(Te&&!H){const De=MG(ke)&&Zr(ke,128),qe=r.name!=="default"&&!De,se=vft(t,Ae,_n(ke),u,Te,p,g,qe?r:Ae);T.push(...se.displayParts),T.push(tO()),q=se.documentation,X=se.tags}else q=Ae.getContextualDocumentationComment(ke,t),X=Ae.getJsDocTags(t)}}if(r.declarations)switch(r.declarations[0].kind){case 270:T.push(Np(95)),T.push(bu()),T.push(Np(145));break;case 277:T.push(Np(95)),T.push(bu()),T.push(Np(r.declarations[0].isExportEquals?64:90));break;case 281:T.push(Np(95));break;default:T.push(Np(102))}T.push(bu()),de(r),O(r.declarations,Ae=>{if(Ae.kind===271){const ke=Ae;if(qk(ke))T.push(bu()),T.push(d5(64)),T.push(bu()),T.push(Np(149)),T.push(Sh(21)),T.push(Z_(uu(L8(ke)),8)),T.push(Sh(22));else{const Te=t.getSymbolAtLocation(ke.moduleReference);Te&&(T.push(bu()),T.push(d5(64)),T.push(bu()),de(Te,u))}return!0}})}if(!H)if(F!==""){if(p){if(U?(re(),T.push(Np(110))):ue(r,F),F==="property"||F==="accessor"||F==="getter"||F==="setter"||F==="JSX attribute"||R&3||F==="local var"||F==="index"||F==="using"||F==="await using"||U){if(T.push(Sh(59)),T.push(bu()),p.symbol&&p.symbol.flags&262144&&F!=="index"){const Ae=m2(ke=>{const Te=t.typeParameterToDeclaration(p,u,pft);Q().writeNode(4,Te,_n(Mo(u)),ke)});Sr(T,Ae)}else Sr(T,Cj(t,p,u));if(Rv(r)&&r.links.target&&Rv(r.links.target)&&r.links.target.links.tupleLabelDeclaration){const Ae=r.links.target.links.tupleLabelDeclaration;j.assertNode(Ae.name,ot),T.push(bu()),T.push(Sh(21)),T.push(pm(Fr(Ae.name))),T.push(Sh(22))}}else if(R&16||R&8192||R&16384||R&131072||R&98304||F==="method"){const Ae=p.getNonNullableType().getCallSignatures();Ae.length&&(we(Ae[0],Ae),Z=Ae.length>1)}}}else F=mft(t,r,h);if(E.length===0&&!Z&&(E=r.getContextualDocumentationComment(u,t)),E.length===0&&R&4&&r.parent&&r.declarations&&O(r.parent.declarations,Ae=>Ae.kind===307))for(const Ae of r.declarations){if(!Ae.parent||Ae.parent.kind!==226)continue;const ke=t.getSymbolAtLocation(Ae.parent.right);if(ke&&(E=ke.getDocumentationComment(t),N=ke.getJsDocTags(t),E.length>0))break}if(E.length===0&&ot(h)&&r.valueDeclaration&&ec(r.valueDeclaration)){const Ae=r.valueDeclaration,ke=Ae.parent,Te=Ae.propertyName||Ae.name;if(ot(Te)&&dm(ke)){const De=Lg(Te),qe=t.getTypeAtLocation(ke);E=J(qe.isUnion()?qe.types:[qe],se=>{const Ne=se.getProperty(De);return Ne?Ne.getDocumentationComment(t):void 0})||w}}return N.length===0&&!Z&&(N=r.getContextualJsDocTags(u,t)),E.length===0&&q&&(E=q),N.length===0&&X&&(N=X),{displayParts:T,documentation:E,symbolKind:F,tags:N.length===0?void 0:N};function Q(){return _D()}function re(){T.length&&T.push(tO()),oe()}function oe(){C&&(Ie("alias"),T.push(bu()))}function pe(){T.push(bu()),T.push(Np(103)),T.push(bu())}function de(Ae,ke){let Te;C&&Ae===r&&(Ae=C),F==="index"&&(Te=t.getIndexInfosOfIndexSymbol(Ae));let De=[];Ae.flags&131072&&Te?(Ae.parent&&(De=f5(t,Ae.parent)),De.push(Sh(23)),Te.forEach((qe,se)=>{De.push(...Cj(t,qe.keyType)),se!==Te.length-1&&(De.push(bu()),De.push(Sh(52)),De.push(bu()))}),De.push(Sh(24))):De=f5(t,Ae,ke||a,void 0,7),Sr(T,De),r.flags&16777216&&T.push(Sh(58))}function ue(Ae,ke){re(),ke&&(Ie(ke),Ae&&!Ft(Ae.declarations,Te=>xl(Te)||(ml(Te)||fd(Te))&&!Te.name)&&(T.push(bu()),de(Ae)))}function Ie(Ae){switch(Ae){case"var":case"function":case"let":case"const":case"constructor":case"using":case"await using":T.push(the(Ae));return;default:T.push(Sh(21)),T.push(the(Ae)),T.push(Sh(22));return}}function we(Ae,ke,Te=0){Sr(T,ihe(t,Ae,u,Te|32)),ke.length>1&&(T.push(bu()),T.push(Sh(21)),T.push(d5(40)),T.push(Z_((ke.length-1).toString(),7)),T.push(bu()),T.push(pm(ke.length===2?"overload":"overloads")),T.push(Sh(22))),E=Ae.getDocumentationComment(t),N=Ae.getJsDocTags(),ke.length>1&&E.length===0&&N.length===0&&(E=ke[0].getDocumentationComment(t),N=ke[0].getJsDocTags().filter(De=>De.name!=="deprecated"))}function he(Ae,ke){const Te=m2(De=>{const qe=t.symbolToTypeParameterDeclarations(Ae,ke,pft);Q().writeList(53776,qe,_n(Mo(ke)),De)});Sr(T,Te)}}function f$t(t,r,a,u,h,p=zI(h),g){return vft(t,r,a,u,h,void 0,p,g)}function bft(t){return t.parent?!1:O(t.declarations,r=>{if(r.kind===218)return!0;if(r.kind!==260&&r.kind!==262)return!1;for(let a=r.parent;!WT(a);a=a.parent)if(a.kind===307||a.kind===268)return!1;return!0})}var er={};c(er,{ChangeTracker:()=>p$t,LeadingTriviaOption:()=>wft,TrailingTriviaOption:()=>xft,applyChanges:()=>tMe,assignPositionsToNode:()=>ape,createWriter:()=>Tft,deleteNode:()=>aC,isThisTypeAnnotatable:()=>_$t,isValidLocationToAddComment:()=>Dft});function Cft(t){const r=t.__pos;return j.assert(typeof r=="number"),r}function QOe(t,r){j.assert(typeof r=="number"),t.__pos=r}function Sft(t){const r=t.__end;return j.assert(typeof r=="number"),r}function ZOe(t,r){j.assert(typeof r=="number"),t.__end=r}var wft=(t=>(t[t.Exclude=0]="Exclude",t[t.IncludeAll=1]="IncludeAll",t[t.JSDoc=2]="JSDoc",t[t.StartLine=3]="StartLine",t))(wft||{}),xft=(t=>(t[t.Exclude=0]="Exclude",t[t.ExcludeWhitespace=1]="ExcludeWhitespace",t[t.Include=2]="Include",t))(xft||{});function kft(t,r){return Va(t,r,!1,!0)}function h$t(t,r){let a=r;for(;a<t.length;){const u=t.charCodeAt(a);if(k1(u)){a++;continue}return u===47}return!1}var nz={leadingTriviaOption:0,trailingTriviaOption:0};function rz(t,r,a,u){return{pos:XI(t,r,u),end:fO(t,a,u)}}function XI(t,r,a,u=!1){var h,p;const{leadingTriviaOption:g}=a;if(g===0)return r.getStart(t);if(g===3){const F=r.getStart(t),H=Wg(F,t);return s5(r,H)?H:F}if(g===2){const F=Pae(r,t.text);if(F!=null&&F.length)return Wg(F[0].pos,t)}const C=r.getFullStart(),b=r.getStart(t);if(C===b)return b;const T=Wg(C,t);if(Wg(b,t)===T)return g===1?C:b;if(u){const F=((h=Av(t.text,C))==null?void 0:h[0])||((p=qw(t.text,C))==null?void 0:p[0]);if(F)return Va(t.text,F.end,!0,!0)}const N=C>0?1:0;let R=Yw(j8(t,T)+N,t);return R=kft(t.text,R),Yw(j8(t,R),t)}function YOe(t,r,a){const{end:u}=r,{trailingTriviaOption:h}=a;if(h===2){const p=qw(t.text,u);if(p){const g=j8(t,r.end);for(const C of p){if(C.kind===2||j8(t,C.pos)>g)break;if(j8(t,C.end)>g)return Va(t.text,C.end,!0,!0)}}}}function fO(t,r,a){var u;const{end:h}=r,{trailingTriviaOption:p}=a;if(p===0)return h;if(p===1){const b=Js(qw(t.text,h),Av(t.text,h)),T=(u=b==null?void 0:b[b.length-1])==null?void 0:u.end;return T||h}const g=YOe(t,r,a);if(g)return g;const C=Va(t.text,h,!0);return C!==h&&(p===2||mh(t.text.charCodeAt(C-1)))?C:h}function rpe(t,r){return!!r&&!!t.parent&&(r.kind===28||r.kind===27&&t.parent.kind===210)}function _$t(t){return ml(t)||Wu(t)}var p$t=class Nqe{constructor(r,a){this.newLineCharacter=r,this.formatContext=a,this.changes=[],this.classesWithNodesInsertedAtStart=new Map,this.deletedNodes=[]}static fromContext(r){return new Nqe(rC(r.host,r.formatContext.options),r.formatContext)}static with(r,a){const u=Nqe.fromContext(r);return a(u),u.getChanges()}pushRaw(r,a){j.assertEqual(r.fileName,a.fileName);for(const u of a.textChanges)this.changes.push({kind:3,sourceFile:r,text:u.newText,range:TZ(u.span)})}deleteRange(r,a){this.changes.push({kind:0,sourceFile:r,range:a})}delete(r,a){this.deletedNodes.push({sourceFile:r,node:a})}deleteNode(r,a,u={leadingTriviaOption:1}){this.deleteRange(r,rz(r,a,a,u))}deleteNodes(r,a,u={leadingTriviaOption:1},h){for(const p of a){const g=XI(r,p,u,h),C=fO(r,p,u);this.deleteRange(r,{pos:g,end:C}),h=!!YOe(r,p,u)}}deleteModifier(r,a){this.deleteRange(r,{pos:a.getStart(r),end:Va(r.text,a.end,!0)})}deleteNodeRange(r,a,u,h={leadingTriviaOption:1}){const p=XI(r,a,h),g=fO(r,u,h);this.deleteRange(r,{pos:p,end:g})}deleteNodeRangeExcludingEnd(r,a,u,h={leadingTriviaOption:1}){const p=XI(r,a,h),g=u===void 0?r.text.length:XI(r,u,h);this.deleteRange(r,{pos:p,end:g})}replaceRange(r,a,u,h={}){this.changes.push({kind:1,sourceFile:r,range:a,options:h,node:u})}replaceNode(r,a,u,h=nz){this.replaceRange(r,rz(r,a,a,h),u,h)}replaceNodeRange(r,a,u,h,p=nz){this.replaceRange(r,rz(r,a,u,p),h,p)}replaceRangeWithNodes(r,a,u,h={}){this.changes.push({kind:2,sourceFile:r,range:a,options:h,nodes:u})}replaceNodeWithNodes(r,a,u,h=nz){this.replaceRangeWithNodes(r,rz(r,a,a,h),u,h)}replaceNodeWithText(r,a,u){this.replaceRangeWithText(r,rz(r,a,a,nz),u)}replaceNodeRangeWithNodes(r,a,u,h,p=nz){this.replaceRangeWithNodes(r,rz(r,a,u,p),h,p)}nodeHasTrailingComment(r,a,u=nz){return!!YOe(r,a,u)}nextCommaToken(r,a){const u=yD(a,a.parent,r);return u&&u.kind===28?u:void 0}replacePropertyAssignment(r,a,u){const h=this.nextCommaToken(r,a)?"":","+this.newLineCharacter;this.replaceNode(r,a,u,{suffix:h})}insertNodeAt(r,a,u,h={}){this.replaceRange(r,Um(a),u,h)}insertNodesAt(r,a,u,h={}){this.replaceRangeWithNodes(r,Um(a),u,h)}insertNodeAtTopOfFile(r,a,u){this.insertAtTopOfFile(r,a,u)}insertNodesAtTopOfFile(r,a,u){this.insertAtTopOfFile(r,a,u)}insertAtTopOfFile(r,a,u){const h=w$t(r),p={prefix:h===0?void 0:this.newLineCharacter,suffix:(mh(r.text.charCodeAt(h))?"":this.newLineCharacter)+(u?this.newLineCharacter:"")};Ao(a)?this.insertNodesAt(r,h,a,p):this.insertNodeAt(r,h,a,p)}insertNodesAtEndOfFile(r,a,u){this.insertAtEndOfFile(r,a,u)}insertAtEndOfFile(r,a,u){const h=r.end+1,p={prefix:this.newLineCharacter,suffix:this.newLineCharacter+(u?this.newLineCharacter:"")};this.insertNodesAt(r,h,a,p)}insertStatementsInNewFile(r,a,u){this.newFileChanges||(this.newFileChanges=Of()),this.newFileChanges.add(r,{oldFile:u,statements:a})}insertFirstParameter(r,a,u){const h=Ra(a);h?this.insertNodeBefore(r,h,u):this.insertNodeAt(r,a.pos,u)}insertNodeBefore(r,a,u,h=!1,p={}){this.insertNodeAt(r,XI(r,a,p),u,this.getOptionsForInsertNodeBefore(a,u,h))}insertNodesBefore(r,a,u,h=!1,p={}){this.insertNodesAt(r,XI(r,a,p),u,this.getOptionsForInsertNodeBefore(a,ya(u),h))}insertModifierAt(r,a,u,h={}){this.insertNodeAt(r,a,G.createToken(u),h)}insertModifierBefore(r,a,u){return this.insertModifierAt(r,u.getStart(r),a,{suffix:" "})}insertCommentBeforeLine(r,a,u,h){const p=Yw(a,r),g=kAe(r.text,p),C=Dft(r,g),b=Q3(r,C?g:u),T=r.text.slice(p,g),E=`${C?"":this.newLineCharacter}//${h}${this.newLineCharacter}${T}`;this.insertText(r,b.getStart(r),E)}insertJsdocCommentBefore(r,a,u){const h=a.getStart(r);if(a.jsDoc)for(const C of a.jsDoc)this.deleteRange(r,{pos:Wg(C.getStart(r),r),end:fO(r,C,{})});const p=OZ(r.text,h-1),g=r.text.slice(p,h);this.insertNodeAt(r,h,u,{suffix:this.newLineCharacter+g})}createJSDocText(r,a){const u=Rr(a.jsDoc,p=>Oo(p.comment)?G.createJSDocText(p.comment):p.comment),h=Bm(a.jsDoc);return h&&qm(h.pos,h.end,r)&&P(u)===0?void 0:G.createNodeArray(ye(u,G.createJSDocText(`
+`)))}replaceJSDocComment(r,a,u){this.insertJsdocCommentBefore(r,m$t(a),G.createJSDocComment(this.createJSDocText(r,a),G.createNodeArray(u)))}addJSDocTags(r,a,u){const h=na(a.jsDoc,g=>g.tags),p=u.filter(g=>!h.some((C,b)=>{const T=g$t(C,g);return T&&(h[b]=T),!!T}));this.replaceJSDocComment(r,a,[...h,...p])}filterJSDocTags(r,a,u){this.replaceJSDocComment(r,a,$t(na(a.jsDoc,h=>h.tags),u))}replaceRangeWithText(r,a,u){this.changes.push({kind:3,sourceFile:r,range:a,text:u})}insertText(r,a,u){this.replaceRangeWithText(r,Um(a),u)}tryInsertTypeAnnotation(r,a,u){let h;if(Ho(a)){if(h=Uc(a,22,r),!h){if(!xl(a))return!1;h=ya(a.parameters)}}else h=(a.kind===260?a.exclamationToken:a.questionToken)??a.name;return this.insertNodeAt(r,h.end,u,{prefix:": "}),!0}tryInsertThisTypeAnnotation(r,a,u){const h=Uc(a,21,r).getStart(r)+1,p=a.parameters.length?", ":"";this.insertNodeAt(r,h,u,{prefix:"this: ",suffix:p})}insertTypeParameters(r,a,u){const h=(Uc(a,21,r)||ya(a.parameters)).getStart(r);this.insertNodesAt(r,h,u,{prefix:"<",suffix:">",joiner:", "})}getOptionsForInsertNodeBefore(r,a,u){return Ps(r)||Od(r)?{suffix:u?this.newLineCharacter+this.newLineCharacter:this.newLineCharacter}:_s(r)?{suffix:", "}:$s(r)?$s(a)?{suffix:", "}:{}:Ha(r)&&du(r.parent)||j1(r)?{suffix:", "}:l_(r)?{suffix:","+(u?this.newLineCharacter:" ")}:j.failBadSyntaxKind(r)}insertNodeAtConstructorStart(r,a,u){const h=Ra(a.body.statements);!h||!a.body.multiLine?this.replaceConstructorBody(r,a,[u,...a.body.statements]):this.insertNodeBefore(r,h,u)}insertNodeAtConstructorStartAfterSuperCall(r,a,u){const h=Fe(a.body.statements,p=>uf(p)&&mI(p.expression));!h||!a.body.multiLine?this.replaceConstructorBody(r,a,[...a.body.statements,u]):this.insertNodeAfter(r,h,u)}insertNodeAtConstructorEnd(r,a,u){const h=rl(a.body.statements);!h||!a.body.multiLine?this.replaceConstructorBody(r,a,[...a.body.statements,u]):this.insertNodeAfter(r,h,u)}replaceConstructorBody(r,a,u){this.replaceNode(r,a.body,G.createBlock(u,!0))}insertNodeAtEndOfScope(r,a,u){const h=XI(r,a.getLastToken(),{});this.insertNodeAt(r,h,u,{prefix:mh(r.text.charCodeAt(a.getLastToken().pos))?this.newLineCharacter:this.newLineCharacter+this.newLineCharacter,suffix:this.newLineCharacter})}insertMemberAtStart(r,a,u){this.insertNodeAtStartWorker(r,a,u)}insertNodeAtObjectStart(r,a,u){this.insertNodeAtStartWorker(r,a,u)}insertNodeAtStartWorker(r,a,u){const h=this.guessIndentationFromExistingMembers(r,a)??this.computeIndentationForNewMember(r,a);this.insertNodeAt(r,spe(a).pos,u,this.getInsertNodeAtStartInsertOptions(r,a,h))}guessIndentationFromExistingMembers(r,a){let u,h=a;for(const p of spe(a)){if(DK(h,p,r))return;const g=p.getStart(r),C=pd.SmartIndenter.findFirstNonWhitespaceColumn(Wg(g,r),g,r,this.formatContext.options);if(u===void 0)u=C;else if(C!==u)return;h=p}return u}computeIndentationForNewMember(r,a){const u=a.getStart(r);return pd.SmartIndenter.findFirstNonWhitespaceColumn(Wg(u,r),u,r,this.formatContext.options)+(this.formatContext.options.indentSize??4)}getInsertNodeAtStartInsertOptions(r,a,u){const p=spe(a).length===0,g=Pg(this.classesWithNodesInsertedAtStart,Sc(a),{node:a,sourceFile:r}),C=Aa(a)&&(!Eg(r)||!p),b=Aa(a)&&Eg(r)&&p&&!g;return{indentation:u,prefix:(b?",":"")+this.newLineCharacter,suffix:C?",":zf(a)&&p?";":""}}insertNodeAfterComma(r,a,u){const h=this.insertNodeAfterWorker(r,this.nextCommaToken(r,a)||a,u);this.insertNodeAt(r,h,u,this.getInsertNodeAfterOptions(r,a))}insertNodeAfter(r,a,u){const h=this.insertNodeAfterWorker(r,a,u);this.insertNodeAt(r,h,u,this.getInsertNodeAfterOptions(r,a))}insertNodeAtEndOfList(r,a,u){this.insertNodeAt(r,a.end,u,{prefix:", "})}insertNodesAfter(r,a,u){const h=this.insertNodeAfterWorker(r,a,ya(u));this.insertNodesAt(r,h,u,this.getInsertNodeAfterOptions(r,a))}insertNodeAfterWorker(r,a,u){return x$t(a,u)&&r.text.charCodeAt(a.end-1)!==59&&this.replaceRange(r,Um(a.end),G.createToken(27)),fO(r,a,{})}getInsertNodeAfterOptions(r,a){const u=this.getInsertNodeAfterOptionsWorker(a);return{...u,prefix:a.end===r.end&&Ps(a)?u.prefix?`
+${u.prefix}`:`
+`:u.prefix}}getInsertNodeAfterOptionsWorker(r){switch(r.kind){case 263:case 267:return{prefix:this.newLineCharacter,suffix:this.newLineCharacter};case 260:case 11:case 80:return{prefix:", "};case 303:return{suffix:","+this.newLineCharacter};case 95:return{prefix:" "};case 169:return{};default:return j.assert(Ps(r)||mG(r)),{suffix:this.newLineCharacter}}}insertName(r,a,u){if(j.assert(!a.name),a.kind===219){const h=Uc(a,39,r),p=Uc(a,21,r);p?(this.insertNodesAt(r,p.getStart(r),[G.createToken(100),G.createIdentifier(u)],{joiner:" "}),aC(this,r,h)):(this.insertText(r,ya(a.parameters).getStart(r),`function ${u}(`),this.replaceRange(r,h,G.createToken(22))),a.body.kind!==241&&(this.insertNodesAt(r,a.body.getStart(r),[G.createToken(19),G.createToken(107)],{joiner:" ",suffix:" "}),this.insertNodesAt(r,a.body.end,[G.createToken(27),G.createToken(20)],{joiner:" "}))}else{const h=Uc(a,a.kind===218?100:86,r).end;this.insertNodeAt(r,h,G.createIdentifier(u),{prefix:" "})}}insertExportModifier(r,a){this.insertText(r,a.getStart(r),"export ")}insertImportSpecifierAtIndex(r,a,u,h){const p=u.elements[h-1];p?this.insertNodeInListAfter(r,p,a):this.insertNodeBefore(r,u.elements[0],a,!qm(u.elements[0].getStart(),u.parent.parent.getStart(),r))}insertNodeInListAfter(r,a,u,h=pd.SmartIndenter.getContainingList(a,r)){if(!h){j.fail("node is not a list element");return}const p=U6(h,a);if(p<0)return;const g=a.getEnd();if(p!==h.length-1){const C=Rs(r,a.end);if(C&&rpe(a,C)){const b=h[p+1],T=kft(r.text,b.getFullStart()),E=`${xa(C.kind)}${r.text.substring(C.end,T)}`;this.insertNodesAt(r,T,[u],{suffix:E})}}else{const C=a.getStart(r),b=Wg(C,r);let T,E=!1;if(h.length===1)T=28;else{const N=xd(a.pos,r);T=rpe(a,N)?N.kind:28,E=Wg(h[p-1].getStart(r),r)!==b}if((h$t(r.text,a.end)||!qm(h.pos,h.end,r))&&(E=!0),E){this.replaceRange(r,Um(g),G.createToken(T));const N=pd.SmartIndenter.findFirstNonWhitespaceColumn(b,C,r,this.formatContext.options);let R=Va(r.text,g,!0,!1);for(;R!==g&&mh(r.text.charCodeAt(R-1));)R--;this.replaceRange(r,Um(R),u,{indentation:N,prefix:this.newLineCharacter})}else this.replaceRange(r,Um(g),u,{prefix:`${xa(T)} `})}}parenthesizeExpression(r,a){this.replaceRange(r,zce(a),G.createParenthesizedExpression(a))}finishClassesWithNodesInsertedAtStart(){this.classesWithNodesInsertedAtStart.forEach(({node:r,sourceFile:a})=>{const[u,h]=v$t(r,a);if(u!==void 0&&h!==void 0){const p=spe(r).length===0,g=qm(u,h,a);p&&g&&u!==h-1&&this.deleteRange(a,Um(u,h-1)),g&&this.insertText(a,h-1,this.newLineCharacter)}})}finishDeleteDeclarations(){const r=new Set;for(const{sourceFile:a,node:u}of this.deletedNodes)this.deletedNodes.some(h=>h.sourceFile===a&&YPe(h.node,u))||(Ao(u)?this.deleteRange(a,Uce(a,u)):iMe.deleteDeclaration(this,r,a,u));r.forEach(a=>{const u=a.getSourceFile(),h=pd.SmartIndenter.getContainingList(a,u);if(a!==va(h))return;const p=Mt(h,g=>!r.has(g),h.length-2);p!==-1&&this.deleteRange(u,{pos:h[p].end,end:eMe(u,h[p+1])})})}getChanges(r){this.finishDeleteDeclarations(),this.finishClassesWithNodesInsertedAtStart();const a=ope.getTextChangesFromChanges(this.changes,this.newLineCharacter,this.formatContext,r);return this.newFileChanges&&this.newFileChanges.forEach((u,h)=>{a.push(ope.newFileChanges(h,u,this.newLineCharacter,this.formatContext))}),a}createNewFile(r,a,u){this.insertStatementsInNewFile(a,u,r)}};function m$t(t){if(t.kind!==219)return t;const r=t.parent.kind===172?t.parent:t.parent.parent;return r.jsDoc=t.jsDoc,r}function g$t(t,r){if(t.kind===r.kind)switch(t.kind){case 341:{const a=t,u=r;return ot(a.name)&&ot(u.name)&&a.name.escapedText===u.name.escapedText?G.createJSDocParameterTag(void 0,u.name,!1,u.typeExpression,u.isNameFirst,a.comment):void 0}case 342:return G.createJSDocReturnTag(void 0,r.typeExpression,t.comment);case 344:return G.createJSDocTypeTag(void 0,r.typeExpression,t.comment)}}function eMe(t,r){return Va(t.text,XI(t,r,{leadingTriviaOption:1}),!1,!0)}function y$t(t,r,a,u){const h=eMe(t,u);if(a===void 0||qm(fO(t,r,{}),h,t))return h;const p=xd(u.getStart(t),t);if(rpe(r,p)){const g=xd(r.getStart(t),t);if(rpe(a,g)){const C=Va(t.text,p.getEnd(),!0,!0);if(qm(g.getStart(t),p.getStart(t),t))return mh(t.text.charCodeAt(C-1))?C-1:C;if(mh(t.text.charCodeAt(C)))return C}}return h}function v$t(t,r){const a=Uc(t,19,r),u=Uc(t,20,r);return[a==null?void 0:a.end,u==null?void 0:u.end]}function spe(t){return Aa(t)?t.properties:t.members}var ope;(t=>{function r(C,b,T,E){return es(qs(C,N=>N.sourceFile.path),N=>{const R=N[0].sourceFile,F=Mu(N,(U,q)=>U.range.pos-q.range.pos||U.range.end-q.range.end);for(let U=0;U<F.length-1;U++)j.assert(F[U].range.end<=F[U+1].range.pos,"Changes overlap",()=>`${JSON.stringify(F[U].range)} and ${JSON.stringify(F[U+1].range)}`);const H=es(F,U=>{const q=DS(U.range),X=U.kind===1?_n(Ql(U.node))??U.sourceFile:U.kind===2?_n(Ql(U.nodes[0]))??U.sourceFile:U.sourceFile,Z=h(U,X,R,b,T,E);if(!(q.length===Z.length&&RAe(X.text,Z,q.start)))return mj(q,Z)});return H.length>0?{fileName:R.fileName,textChanges:H}:void 0})}t.getTextChangesFromChanges=r;function a(C,b,T,E){const N=u($K(C),b,T,E);return{fileName:C,textChanges:[mj(Ff(0,0),N)],isNewFile:!0}}t.newFileChanges=a;function u(C,b,T,E){const N=Rr(b,H=>H.statements.map(U=>U===4?"":g(U,H.oldFile,T).text)).join(T),R=ZP("any file name",N,{languageVersion:99,jsDocParsingMode:1},!0,C),F=pd.formatDocument(R,E);return tMe(N,F)+T}t.newFileChangesWorker=u;function h(C,b,T,E,N,R){var F;if(C.kind===0)return"";if(C.kind===3)return C.text;const{options:H={},range:{pos:U}}=C,q=Q=>p(Q,b,T,U,H,E,N,R),X=C.kind===2?C.nodes.map(Q=>I6(q(Q),E)).join(((F=C.options)==null?void 0:F.joiner)||E):q(C.node),Z=H.indentation!==void 0||Wg(U,b)===U?X:X.replace(/^\s+/,"");return(H.prefix||"")+Z+(!H.suffix||su(Z,H.suffix)?"":H.suffix)}function p(C,b,T,E,{indentation:N,prefix:R,delta:F},H,U,q){const{node:X,text:Z}=g(C,b,H);q&&q(X,Z);const Q=$Z(U,b),re=N!==void 0?N:pd.SmartIndenter.getIndentation(E,T,Q,R===H||Wg(E,b)===E);F===void 0&&(F=pd.SmartIndenter.shouldIndentChildNode(Q,C)&&Q.indentSize||0);const oe={text:Z,getLineAndCharacterOfPosition(de){return Ia(this,de)}},pe=pd.formatNodeGivenIndentation(X,oe,b.languageVariant,re,F,{...U,options:Q});return tMe(Z,pe)}function g(C,b,T){const E=Tft(T),N=Nj(T);return bx({newLine:N,neverAsciiEscape:!0,preserveSourceNewlines:!0,terminateUnterminatedLiterals:!0},E).writeNode(4,C,b,E),{text:E.getText(),node:ape(C)}}t.getNonformattedText=g})(ope||(ope={}));function tMe(t,r){for(let a=r.length-1;a>=0;a--){const{span:u,newText:h}=r[a];t=`${t.substring(0,u.start)}${h}${t.substring(au(u))}`}return t}function b$t(t){return Va(t,0)===t.length}var C$t={...JH,factory:rH(JH.factory.flags|1,JH.factory.baseFactory)};function ape(t){const r=dn(t,ape,C$t,S$t,ape),a=cl(r)?r:Object.create(r);return V0(a,Cft(t),Sft(t)),a}function S$t(t,r,a,u,h){const p=Dn(t,r,a,u,h);if(!p)return p;j.assert(t);const g=p===t?G.createNodeArray(p.slice(0)):p;return V0(g,Cft(t),Sft(t)),g}function Tft(t){let r=0;const a=FV(t),u=se=>{se&&QOe(se,r)},h=se=>{se&&ZOe(se,r)},p=se=>{se&&QOe(se,r)},g=se=>{se&&ZOe(se,r)},C=se=>{se&&QOe(se,r)},b=se=>{se&&ZOe(se,r)};function T(se,Ne){if(Ne||!b$t(se)){r=a.getTextPos();let Oe=0;for(;Pv(se.charCodeAt(se.length-Oe-1));)Oe++;r-=Oe}}function E(se){a.write(se),T(se,!1)}function N(se){a.writeComment(se)}function R(se){a.writeKeyword(se),T(se,!1)}function F(se){a.writeOperator(se),T(se,!1)}function H(se){a.writePunctuation(se),T(se,!1)}function U(se){a.writeTrailingSemicolon(se),T(se,!1)}function q(se){a.writeParameter(se),T(se,!1)}function X(se){a.writeProperty(se),T(se,!1)}function Z(se){a.writeSpace(se),T(se,!1)}function Q(se){a.writeStringLiteral(se),T(se,!1)}function re(se,Ne){a.writeSymbol(se,Ne),T(se,!1)}function oe(se){a.writeLine(se)}function pe(){a.increaseIndent()}function de(){a.decreaseIndent()}function ue(){return a.getText()}function Ie(se){a.rawWrite(se),T(se,!1)}function we(se){a.writeLiteral(se),T(se,!0)}function he(){return a.getTextPos()}function Ae(){return a.getLine()}function ke(){return a.getColumn()}function Te(){return a.getIndent()}function De(){return a.isAtStartOfLine()}function qe(){a.clear(),r=0}return{onBeforeEmitNode:u,onAfterEmitNode:h,onBeforeEmitNodeArray:p,onAfterEmitNodeArray:g,onBeforeEmitToken:C,onAfterEmitToken:b,write:E,writeComment:N,writeKeyword:R,writeOperator:F,writePunctuation:H,writeTrailingSemicolon:U,writeParameter:q,writeProperty:X,writeSpace:Z,writeStringLiteral:Q,writeSymbol:re,writeLine:oe,increaseIndent:pe,decreaseIndent:de,getText:ue,rawWrite:Ie,writeLiteral:we,getTextPos:he,getLine:Ae,getColumn:ke,getIndent:Te,isAtStartOfLine:De,hasTrailingComment:()=>a.hasTrailingComment(),hasTrailingWhitespace:()=>a.hasTrailingWhitespace(),clear:qe}}function w$t(t){let r;for(const T of t.statements)if(I1(T))r=T;else break;let a=0;const u=t.text;if(r)return a=r.end,b(),a;const h=rG(u);h!==void 0&&(a=h.length,b());const p=Av(u,a);if(!p)return a;let g,C;for(const T of p){if(T.kind===3){if(AG(u,T.pos)){g={range:T,pinnedOrTripleSlash:!0};continue}}else if(gae(u,T.pos,T.end)){g={range:T,pinnedOrTripleSlash:!0};continue}if(g){if(g.pinnedOrTripleSlash)break;const E=t.getLineAndCharacterOfPosition(T.pos).line,N=t.getLineAndCharacterOfPosition(g.range.end).line;if(E>=N+2)break}if(t.statements.length){C===void 0&&(C=t.getLineAndCharacterOfPosition(t.statements[0].getStart()).line);const E=t.getLineAndCharacterOfPosition(T.end).line;if(C<E+2)break}g={range:T,pinnedOrTripleSlash:!1}}return g&&(a=g.range.end,b()),a;function b(){if(a<u.length){const T=u.charCodeAt(a);mh(T)&&(a++,a<u.length&&T===13&&u.charCodeAt(a)===10&&a++)}}}function Dft(t,r){return!kS(t,r)&&!lA(t,r)&&!Pfe(t,r)&&!sAe(t,r)}function x$t(t,r){return(O_(t)||Lo(t))&&mG(r)&&r.name.kind===167||$W(t)&&$W(r)}var iMe;(t=>{function r(p,g,C,b){switch(b.kind){case 169:{const F=b.parent;xl(F)&&F.parameters.length===1&&!Uc(F,21,C)?p.replaceNodeWithText(C,b,"()"):sz(p,g,C,b);break}case 272:case 271:const T=C.imports.length&&b===ya(C.imports).parent||b===Fe(C.statements,cP);aC(p,C,b,{leadingTriviaOption:T?0:jp(b)?2:3});break;case 208:const E=b.parent;E.kind===207&&b!==va(E.elements)?aC(p,C,b):sz(p,g,C,b);break;case 260:h(p,g,C,b);break;case 168:sz(p,g,C,b);break;case 276:const R=b.parent;R.elements.length===1?u(p,C,R):sz(p,g,C,b);break;case 274:u(p,C,b);break;case 27:aC(p,C,b,{trailingTriviaOption:0});break;case 100:aC(p,C,b,{leadingTriviaOption:0});break;case 263:case 262:aC(p,C,b,{leadingTriviaOption:jp(b)?2:3});break;default:b.parent?H0(b.parent)&&b.parent.name===b?a(p,C,b.parent):la(b.parent)&&Yt(b.parent.arguments,b)?sz(p,g,C,b):aC(p,C,b):aC(p,C,b)}}t.deleteDeclaration=r;function a(p,g,C){if(!C.namedBindings)aC(p,g,C.parent);else{const b=C.name.getStart(g),T=Rs(g,C.name.end);if(T&&T.kind===28){const E=Va(g.text,T.end,!1,!0);p.deleteRange(g,{pos:b,end:E})}else aC(p,g,C.name)}}function u(p,g,C){if(C.parent.name){const b=j.checkDefined(Rs(g,C.pos-1));p.deleteRange(g,{pos:b.getStart(g),end:C.end})}else{const b=Xk(C,272);aC(p,g,b)}}function h(p,g,C,b){const{parent:T}=b;if(T.kind===299){p.deleteNodeRange(C,Uc(T,21,C),Uc(T,22,C));return}if(T.declarations.length!==1){sz(p,g,C,b);return}const E=T.parent;switch(E.kind){case 250:case 249:p.replaceNode(C,b,G.createObjectLiteralExpression());break;case 248:aC(p,C,T);break;case 243:aC(p,C,E,{leadingTriviaOption:jp(E)?2:3});break;default:j.assertNever(E)}}})(iMe||(iMe={}));function aC(t,r,a,u={leadingTriviaOption:1}){const h=XI(r,a,u),p=fO(r,a,u);t.deleteRange(r,{pos:h,end:p})}function sz(t,r,a,u){const h=j.checkDefined(pd.SmartIndenter.getContainingList(u,a)),p=U6(h,u);if(j.assert(p!==-1),h.length===1){aC(t,a,u);return}j.assert(!r.has(u),"Deleting a node twice"),r.add(u),t.deleteRange(a,{pos:eMe(a,u),end:p===h.length-1?fO(a,u,{}):y$t(a,u,h[p-1],h[p+1])})}var pd={};c(pd,{FormattingContext:()=>Ift,FormattingRequestKind:()=>Eft,RuleAction:()=>Nft,RuleFlags:()=>Lft,SmartIndenter:()=>K1,anyContext:()=>cpe,createTextRangeWithKind:()=>fpe,formatDocument:()=>pJt,formatNodeGivenIndentation:()=>SJt,formatOnClosingCurly:()=>_Jt,formatOnEnter:()=>dJt,formatOnOpeningCurly:()=>hJt,formatOnSemicolon:()=>fJt,formatSelection:()=>mJt,getAllRules:()=>Pft,getFormatContext:()=>nJt,getFormattingScanner:()=>nMe,getIndentationString:()=>gMe,getRangeOfEnclosingComment:()=>nht});var Eft=(t=>(t[t.FormatDocument=0]="FormatDocument",t[t.FormatSelection=1]="FormatSelection",t[t.FormatOnEnter=2]="FormatOnEnter",t[t.FormatOnSemicolon=3]="FormatOnSemicolon",t[t.FormatOnOpeningCurlyBrace=4]="FormatOnOpeningCurlyBrace",t[t.FormatOnClosingCurlyBrace=5]="FormatOnClosingCurlyBrace",t))(Eft||{}),Ift=class{constructor(t,r,a){this.sourceFile=t,this.formattingRequestKind=r,this.options=a}updateContext(t,r,a,u,h){this.currentTokenSpan=j.checkDefined(t),this.currentTokenParent=j.checkDefined(r),this.nextTokenSpan=j.checkDefined(a),this.nextTokenParent=j.checkDefined(u),this.contextNode=j.checkDefined(h),this.contextNodeAllOnSameLine=void 0,this.nextNodeAllOnSameLine=void 0,this.tokensAreOnSameLine=void 0,this.contextNodeBlockIsOnOneLine=void 0,this.nextNodeBlockIsOnOneLine=void 0}ContextNodeAllOnSameLine(){return this.contextNodeAllOnSameLine===void 0&&(this.contextNodeAllOnSameLine=this.NodeIsOnOneLine(this.contextNode)),this.contextNodeAllOnSameLine}NextNodeAllOnSameLine(){return this.nextNodeAllOnSameLine===void 0&&(this.nextNodeAllOnSameLine=this.NodeIsOnOneLine(this.nextTokenParent)),this.nextNodeAllOnSameLine}TokensAreOnSameLine(){if(this.tokensAreOnSameLine===void 0){const t=this.sourceFile.getLineAndCharacterOfPosition(this.currentTokenSpan.pos).line,r=this.sourceFile.getLineAndCharacterOfPosition(this.nextTokenSpan.pos).line;this.tokensAreOnSameLine=t===r}return this.tokensAreOnSameLine}ContextNodeBlockIsOnOneLine(){return this.contextNodeBlockIsOnOneLine===void 0&&(this.contextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.contextNode)),this.contextNodeBlockIsOnOneLine}NextNodeBlockIsOnOneLine(){return this.nextNodeBlockIsOnOneLine===void 0&&(this.nextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.nextTokenParent)),this.nextNodeBlockIsOnOneLine}NodeIsOnOneLine(t){const r=this.sourceFile.getLineAndCharacterOfPosition(t.getStart(this.sourceFile)).line,a=this.sourceFile.getLineAndCharacterOfPosition(t.getEnd()).line;return r===a}BlockIsOnOneLine(t){const r=Uc(t,19,this.sourceFile),a=Uc(t,20,this.sourceFile);if(r&&a){const u=this.sourceFile.getLineAndCharacterOfPosition(r.getEnd()).line,h=this.sourceFile.getLineAndCharacterOfPosition(a.getStart(this.sourceFile)).line;return u===h}return!1}},k$t=Ov(99,!1,0),T$t=Ov(99,!1,1);function nMe(t,r,a,u,h){const p=r===1?T$t:k$t;p.setText(t),p.resetTokenState(a);let g=!0,C,b,T,E,N;const R=h({advance:F,readTokenInfo:oe,readEOFTokenRange:de,isOnToken:ue,isOnEOF:Ie,getCurrentLeadingTrivia:()=>C,lastTrailingTriviaWasNewLine:()=>g,skipToEndOf:he,skipToStartOf:Ae,getTokenFullStart:()=>(N==null?void 0:N.token.pos)??p.getTokenStart(),getStartPos:()=>(N==null?void 0:N.token.pos)??p.getTokenStart()});return N=void 0,p.setText(void 0),R;function F(){N=void 0,p.getTokenFullStart()!==a?g=!!b&&va(b).kind===4:p.scan(),C=void 0,b=void 0;let Te=p.getTokenFullStart();for(;Te<u;){const De=p.getToken();if(!n3(De))break;p.scan();const qe={pos:Te,end:p.getTokenFullStart(),kind:De};Te=p.getTokenFullStart(),C=fn(C,qe)}T=p.getTokenFullStart()}function H(ke){switch(ke.kind){case 34:case 72:case 73:case 50:case 49:return!0}return!1}function U(ke){if(ke.parent)switch(ke.parent.kind){case 291:case 286:case 287:case 285:return P_(ke.kind)||ke.kind===80}return!1}function q(ke){return RP(ke)||Gv(ke)&&(N==null?void 0:N.token.kind)===12}function X(ke){return ke.kind===14}function Z(ke){return ke.kind===17||ke.kind===18}function Q(ke){return ke.parent&&U1(ke.parent)&&ke.parent.initializer===ke}function re(ke){return ke===44||ke===69}function oe(ke){j.assert(ue());const Te=H(ke)?1:X(ke)?2:Z(ke)?3:U(ke)?4:q(ke)?5:Q(ke)?6:0;if(N&&Te===E)return we(N,ke);p.getTokenFullStart()!==T&&(j.assert(N!==void 0),p.resetTokenState(T),p.scan());let De=pe(ke,Te);const qe=fpe(p.getTokenFullStart(),p.getTokenEnd(),De);for(b&&(b=void 0);p.getTokenFullStart()<u&&(De=p.scan(),!!n3(De));){const se=fpe(p.getTokenFullStart(),p.getTokenEnd(),De);if(b||(b=[]),b.push(se),De===4){p.scan();break}}return N={leadingTrivia:C,trailingTrivia:b,token:qe},we(N,ke)}function pe(ke,Te){const De=p.getToken();switch(E=0,Te){case 1:if(De===32){E=1;const qe=p.reScanGreaterToken();return j.assert(ke.kind===qe),qe}break;case 2:if(re(De)){E=2;const qe=p.reScanSlashToken();return j.assert(ke.kind===qe),qe}break;case 3:if(De===20)return E=3,p.reScanTemplateToken(!1);break;case 4:return E=4,p.scanJsxIdentifier();case 5:return E=5,p.reScanJsxToken(!1);case 6:return E=6,p.reScanJsxAttributeValue();case 0:break;default:j.assertNever(Te)}return De}function de(){return j.assert(Ie()),fpe(p.getTokenFullStart(),p.getTokenEnd(),1)}function ue(){const ke=N?N.token.kind:p.getToken();return ke!==1&&!n3(ke)}function Ie(){return(N?N.token.kind:p.getToken())===1}function we(ke,Te){return eP(Te)&&ke.token.kind!==Te.kind&&(ke.token.kind=Te.kind),ke}function he(ke){p.resetTokenState(ke.end),T=p.getTokenFullStart(),E=void 0,N=void 0,g=!1,C=void 0,b=void 0}function Ae(ke){p.resetTokenState(ke.pos),T=p.getTokenFullStart(),E=void 0,N=void 0,g=!1,C=void 0,b=void 0}}var cpe=w,Nft=(t=>(t[t.None=0]="None",t[t.StopProcessingSpaceActions=1]="StopProcessingSpaceActions",t[t.StopProcessingTokenActions=2]="StopProcessingTokenActions",t[t.InsertSpace=4]="InsertSpace",t[t.InsertNewLine=8]="InsertNewLine",t[t.DeleteSpace=16]="DeleteSpace",t[t.DeleteToken=32]="DeleteToken",t[t.InsertTrailingSemicolon=64]="InsertTrailingSemicolon",t[t.StopAction=3]="StopAction",t[t.ModifySpaceAction=28]="ModifySpaceAction",t[t.ModifyTokenAction=96]="ModifyTokenAction",t))(Nft||{}),Lft=(t=>(t[t.None=0]="None",t[t.CanDeleteNewLines=1]="CanDeleteNewLines",t))(Lft||{});function Pft(){const t=[];for(let pe=0;pe<=165;pe++)pe!==1&&t.push(pe);function r(...pe){return{tokens:t.filter(de=>!pe.some(ue=>ue===de)),isSpecific:!1}}const a={tokens:t,isSpecific:!1},u=E5([...t,3]),h=E5([...t,1]),p=Oft(83,165),g=Oft(30,79),C=[103,104,165,130,142,152],b=[46,47,55,54],T=[9,10,80,21,23,19,110,105],E=[80,21,110,105],N=[80,22,24,105],R=[80,21,110,105],F=[80,22,24,105],H=[2,3],U=[80,...Hfe],q=u,X=E5([80,32,3,86,95,102]),Z=E5([22,3,92,113,98,93,85]),Q=[Kr("IgnoreBeforeComment",a,H,cpe,1),Kr("IgnoreAfterLineComment",2,a,cpe,1),Kr("NotSpaceBeforeColon",a,59,[zs,BY,Fft],16),Kr("SpaceAfterColon",59,a,[zs,BY,z$t],4),Kr("NoSpaceBeforeQuestionMark",a,58,[zs,BY,Fft],16),Kr("SpaceAfterQuestionMarkInConditionalOperator",58,a,[zs,N$t],4),Kr("NoSpaceAfterQuestionMark",58,a,[zs,I$t],16),Kr("NoSpaceBeforeDot",a,[25,29],[zs,iJt],16),Kr("NoSpaceAfterDot",[25,29],a,[zs],16),Kr("NoSpaceBetweenImportParenInImportType",102,21,[zs,H$t],16),Kr("NoSpaceAfterUnaryPrefixOperator",b,T,[zs,BY],16),Kr("NoSpaceAfterUnaryPreincrementOperator",46,E,[zs],16),Kr("NoSpaceAfterUnaryPredecrementOperator",47,R,[zs],16),Kr("NoSpaceBeforeUnaryPostincrementOperator",N,46,[zs,Yft],16),Kr("NoSpaceBeforeUnaryPostdecrementOperator",F,47,[zs,Yft],16),Kr("SpaceAfterPostincrementWhenFollowedByAdd",46,40,[zs,wx],4),Kr("SpaceAfterAddWhenFollowedByUnaryPlus",40,40,[zs,wx],4),Kr("SpaceAfterAddWhenFollowedByPreincrement",40,46,[zs,wx],4),Kr("SpaceAfterPostdecrementWhenFollowedBySubtract",47,41,[zs,wx],4),Kr("SpaceAfterSubtractWhenFollowedByUnaryMinus",41,41,[zs,wx],4),Kr("SpaceAfterSubtractWhenFollowedByPredecrement",41,47,[zs,wx],4),Kr("NoSpaceAfterCloseBrace",20,[28,27],[zs],16),Kr("NewLineBeforeCloseBraceInBlockContext",u,20,[Wft],8),Kr("SpaceAfterCloseBrace",20,r(22),[zs,A$t],4),Kr("SpaceBetweenCloseBraceAndElse",20,93,[zs],4),Kr("SpaceBetweenCloseBraceAndWhile",20,117,[zs],4),Kr("NoSpaceBetweenEmptyBraceBrackets",19,20,[zs,qft],16),Kr("SpaceAfterConditionalClosingParen",22,23,[WY],4),Kr("NoSpaceBetweenFunctionKeywordAndStar",100,42,[jft],16),Kr("SpaceAfterStarInGeneratorDeclaration",42,80,[jft],4),Kr("SpaceAfterFunctionInFuncDecl",100,a,[QI],4),Kr("NewLineAfterOpenBraceInBlockContext",19,a,[Wft],8),Kr("SpaceAfterGetSetInMember",[139,153],80,[QI],4),Kr("NoSpaceBetweenYieldKeywordAndStar",127,42,[zs,Zft],16),Kr("SpaceBetweenYieldOrYieldStarAndOperand",[127,42],a,[zs,Zft],4),Kr("NoSpaceBetweenReturnAndSemicolon",107,27,[zs],16),Kr("SpaceAfterCertainKeywords",[115,111,105,91,107,114,135],a,[zs],4),Kr("SpaceAfterLetConstInVariableDeclaration",[121,87],a,[zs,$$t],4),Kr("NoSpaceBeforeOpenParenInFuncCall",a,21,[zs,R$t,F$t],16),Kr("SpaceBeforeBinaryKeywordOperator",a,C,[zs,wx],4),Kr("SpaceAfterBinaryKeywordOperator",C,a,[zs,wx],4),Kr("SpaceAfterVoidOperator",116,a,[zs,Q$t],4),Kr("SpaceBetweenAsyncAndOpenParen",134,21,[V$t,zs],4),Kr("SpaceBetweenAsyncAndFunctionKeyword",134,[100,80],[zs],4),Kr("NoSpaceBetweenTagAndTemplateString",[80,22],[15,16],[zs],16),Kr("SpaceBeforeJsxAttribute",a,80,[j$t,zs],4),Kr("SpaceBeforeSlashInJsxOpeningElement",a,44,[Kft,zs],4),Kr("NoSpaceBeforeGreaterThanTokenInJsxOpeningElement",44,32,[Kft,zs],16),Kr("NoSpaceBeforeEqualInJsxAttribute",a,64,[Jft,zs],16),Kr("NoSpaceAfterEqualInJsxAttribute",64,a,[Jft,zs],16),Kr("NoSpaceBeforeJsxNamespaceColon",80,59,[Gft],16),Kr("NoSpaceAfterJsxNamespaceColon",59,80,[Gft],16),Kr("NoSpaceAfterModuleImport",[144,149],21,[zs],16),Kr("SpaceAfterCertainTypeScriptKeywords",[128,129,86,138,90,94,95,96,139,119,102,120,144,145,123,125,124,148,153,126,156,161,143,140],a,[zs],4),Kr("SpaceBeforeCertainTypeScriptKeywords",a,[96,119,161],[zs],4),Kr("SpaceAfterModuleName",11,19,[J$t],4),Kr("SpaceBeforeArrow",a,39,[zs],4),Kr("SpaceAfterArrow",39,a,[zs],4),Kr("NoSpaceAfterEllipsis",26,80,[zs],16),Kr("NoSpaceAfterOptionalParameters",58,[22,28],[zs,BY],16),Kr("NoSpaceBetweenEmptyInterfaceBraceBrackets",19,20,[zs,G$t],16),Kr("NoSpaceBeforeOpenAngularBracket",U,30,[zs,VY],16),Kr("NoSpaceBetweenCloseParenAndAngularBracket",22,30,[zs,VY],16),Kr("NoSpaceAfterOpenAngularBracket",30,a,[zs,VY],16),Kr("NoSpaceBeforeCloseAngularBracket",a,32,[zs,VY],16),Kr("NoSpaceAfterCloseAngularBracket",32,[21,23,32,28],[zs,VY,P$t,X$t],16),Kr("SpaceBeforeAt",[22,80],60,[zs],4),Kr("NoSpaceAfterAt",60,a,[zs],16),Kr("SpaceAfterDecorator",a,[128,80,95,90,86,126,125,123,124,139,153,23,42],[q$t],4),Kr("NoSpaceBeforeNonNullAssertionOperator",a,54,[zs,Z$t],16),Kr("NoSpaceAfterNewKeywordOnConstructorSignature",105,21,[zs,K$t],16),Kr("SpaceLessThanAndNonJSXTypeAnnotation",30,30,[zs],4)],re=[Kr("SpaceAfterConstructor",137,21,[mm("insertSpaceAfterConstructor"),zs],4),Kr("NoSpaceAfterConstructor",137,21,[G1("insertSpaceAfterConstructor"),zs],16),Kr("SpaceAfterComma",28,a,[mm("insertSpaceAfterCommaDelimiter"),zs,uMe,B$t,W$t],4),Kr("NoSpaceAfterComma",28,a,[G1("insertSpaceAfterCommaDelimiter"),zs,uMe],16),Kr("SpaceAfterAnonymousFunctionKeyword",[100,42],21,[mm("insertSpaceAfterFunctionKeywordForAnonymousFunctions"),QI],4),Kr("NoSpaceAfterAnonymousFunctionKeyword",[100,42],21,[G1("insertSpaceAfterFunctionKeywordForAnonymousFunctions"),QI],16),Kr("SpaceAfterKeywordInControl",p,21,[mm("insertSpaceAfterKeywordsInControlFlowStatements"),WY],4),Kr("NoSpaceAfterKeywordInControl",p,21,[G1("insertSpaceAfterKeywordsInControlFlowStatements"),WY],16),Kr("SpaceAfterOpenParen",21,a,[mm("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),zs],4),Kr("SpaceBeforeCloseParen",a,22,[mm("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),zs],4),Kr("SpaceBetweenOpenParens",21,21,[mm("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),zs],4),Kr("NoSpaceBetweenParens",21,22,[zs],16),Kr("NoSpaceAfterOpenParen",21,a,[G1("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),zs],16),Kr("NoSpaceBeforeCloseParen",a,22,[G1("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),zs],16),Kr("SpaceAfterOpenBracket",23,a,[mm("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),zs],4),Kr("SpaceBeforeCloseBracket",a,24,[mm("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),zs],4),Kr("NoSpaceBetweenBrackets",23,24,[zs],16),Kr("NoSpaceAfterOpenBracket",23,a,[G1("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),zs],16),Kr("NoSpaceBeforeCloseBracket",a,24,[G1("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),zs],16),Kr("SpaceAfterOpenBrace",19,a,[Rft("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),Bft],4),Kr("SpaceBeforeCloseBrace",a,20,[Rft("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),Bft],4),Kr("NoSpaceBetweenEmptyBraceBrackets",19,20,[zs,qft],16),Kr("NoSpaceAfterOpenBrace",19,a,[rMe("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),zs],16),Kr("NoSpaceBeforeCloseBrace",a,20,[rMe("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),zs],16),Kr("SpaceBetweenEmptyBraceBrackets",19,20,[mm("insertSpaceAfterOpeningAndBeforeClosingEmptyBraces")],4),Kr("NoSpaceBetweenEmptyBraceBrackets",19,20,[rMe("insertSpaceAfterOpeningAndBeforeClosingEmptyBraces"),zs],16),Kr("SpaceAfterTemplateHeadAndMiddle",[16,17],a,[mm("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),$ft],4,1),Kr("SpaceBeforeTemplateMiddleAndTail",a,[17,18],[mm("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),zs],4),Kr("NoSpaceAfterTemplateHeadAndMiddle",[16,17],a,[G1("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),$ft],16,1),Kr("NoSpaceBeforeTemplateMiddleAndTail",a,[17,18],[G1("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),zs],16),Kr("SpaceAfterOpenBraceInJsxExpression",19,a,[mm("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),zs,upe],4),Kr("SpaceBeforeCloseBraceInJsxExpression",a,20,[mm("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),zs,upe],4),Kr("NoSpaceAfterOpenBraceInJsxExpression",19,a,[G1("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),zs,upe],16),Kr("NoSpaceBeforeCloseBraceInJsxExpression",a,20,[G1("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),zs,upe],16),Kr("SpaceAfterSemicolonInFor",27,a,[mm("insertSpaceAfterSemicolonInForStatements"),zs,oMe],4),Kr("NoSpaceAfterSemicolonInFor",27,a,[G1("insertSpaceAfterSemicolonInForStatements"),zs,oMe],16),Kr("SpaceBeforeBinaryOperator",a,g,[mm("insertSpaceBeforeAndAfterBinaryOperators"),zs,wx],4),Kr("SpaceAfterBinaryOperator",g,a,[mm("insertSpaceBeforeAndAfterBinaryOperators"),zs,wx],4),Kr("NoSpaceBeforeBinaryOperator",a,g,[G1("insertSpaceBeforeAndAfterBinaryOperators"),zs,wx],16),Kr("NoSpaceAfterBinaryOperator",g,a,[G1("insertSpaceBeforeAndAfterBinaryOperators"),zs,wx],16),Kr("SpaceBeforeOpenParenInFuncDecl",a,21,[mm("insertSpaceBeforeFunctionParenthesis"),zs,QI],4),Kr("NoSpaceBeforeOpenParenInFuncDecl",a,21,[G1("insertSpaceBeforeFunctionParenthesis"),zs,QI],16),Kr("NewLineBeforeOpenBraceInControl",Z,19,[mm("placeOpenBraceOnNewLineForControlBlocks"),WY,lMe],8,1),Kr("NewLineBeforeOpenBraceInFunction",q,19,[mm("placeOpenBraceOnNewLineForFunctions"),QI,lMe],8,1),Kr("NewLineBeforeOpenBraceInTypeScriptDeclWithBlock",X,19,[mm("placeOpenBraceOnNewLineForFunctions"),zft,lMe],8,1),Kr("SpaceAfterTypeAssertion",32,a,[mm("insertSpaceAfterTypeAssertion"),zs,fMe],4),Kr("NoSpaceAfterTypeAssertion",32,a,[G1("insertSpaceAfterTypeAssertion"),zs,fMe],16),Kr("SpaceBeforeTypeAnnotation",a,[58,59],[mm("insertSpaceBeforeTypeAnnotation"),zs,aMe],4),Kr("NoSpaceBeforeTypeAnnotation",a,[58,59],[G1("insertSpaceBeforeTypeAnnotation"),zs,aMe],16),Kr("NoOptionalSemicolon",27,h,[Mft("semicolons","remove"),eJt],32),Kr("OptionalSemicolon",a,h,[Mft("semicolons","insert"),tJt],64)],oe=[Kr("NoSpaceBeforeSemicolon",a,27,[zs],16),Kr("SpaceBeforeOpenBraceInControl",Z,19,[sMe("placeOpenBraceOnNewLineForControlBlocks"),WY,dMe,cMe],4,1),Kr("SpaceBeforeOpenBraceInFunction",q,19,[sMe("placeOpenBraceOnNewLineForFunctions"),QI,lpe,dMe,cMe],4,1),Kr("SpaceBeforeOpenBraceInTypeScriptDeclWithBlock",X,19,[sMe("placeOpenBraceOnNewLineForFunctions"),zft,dMe,cMe],4,1),Kr("NoSpaceBeforeComma",a,28,[zs],16),Kr("NoSpaceBeforeOpenBracket",r(134,84),23,[zs],16),Kr("NoSpaceAfterCloseBracket",24,a,[zs,U$t],16),Kr("SpaceAfterSemicolon",27,a,[zs],4),Kr("SpaceBetweenForAndAwaitKeyword",99,135,[zs],4),Kr("SpaceBetweenDotDotDotAndTypeName",26,U,[zs],16),Kr("SpaceBetweenStatements",[22,92,93,84],a,[zs,uMe,D$t],4),Kr("SpaceAfterTryCatchFinally",[113,85,98],19,[zs],4)];return[...Q,...re,...oe]}function Kr(t,r,a,u,h,p=0){return{leftTokenRange:Aft(r),rightTokenRange:Aft(a),rule:{debugName:t,context:u,action:h,flags:p}}}function E5(t){return{tokens:t,isSpecific:!0}}function Aft(t){return typeof t=="number"?E5([t]):Ao(t)?E5(t):t}function Oft(t,r,a=[]){const u=[];for(let h=t;h<=r;h++)Yt(a,h)||u.push(h);return E5(u)}function Mft(t,r){return a=>a.options&&a.options[t]===r}function mm(t){return r=>r.options&&Li(r.options,t)&&!!r.options[t]}function rMe(t){return r=>r.options&&Li(r.options,t)&&!r.options[t]}function G1(t){return r=>!r.options||!Li(r.options,t)||!r.options[t]}function sMe(t){return r=>!r.options||!Li(r.options,t)||!r.options[t]||r.TokensAreOnSameLine()}function Rft(t){return r=>!r.options||!Li(r.options,t)||!!r.options[t]}function oMe(t){return t.contextNode.kind===248}function D$t(t){return!oMe(t)}function wx(t){switch(t.contextNode.kind){case 226:return t.contextNode.operatorToken.kind!==28;case 227:case 194:case 234:case 281:case 276:case 182:case 192:case 193:case 238:return!0;case 208:case 265:case 271:case 277:case 260:case 169:case 306:case 172:case 171:return t.currentTokenSpan.kind===64||t.nextTokenSpan.kind===64;case 249:case 168:return t.currentTokenSpan.kind===103||t.nextTokenSpan.kind===103||t.currentTokenSpan.kind===64||t.nextTokenSpan.kind===64;case 250:return t.currentTokenSpan.kind===165||t.nextTokenSpan.kind===165}return!1}function BY(t){return!wx(t)}function Fft(t){return!aMe(t)}function aMe(t){const r=t.contextNode.kind;return r===172||r===171||r===169||r===260||tP(r)}function E$t(t){return Lo(t.contextNode)&&t.contextNode.questionToken}function I$t(t){return!E$t(t)}function N$t(t){return t.contextNode.kind===227||t.contextNode.kind===194}function cMe(t){return t.TokensAreOnSameLine()||lpe(t)}function Bft(t){return t.contextNode.kind===206||t.contextNode.kind===200||L$t(t)}function lMe(t){return lpe(t)&&!(t.NextNodeAllOnSameLine()||t.NextNodeBlockIsOnOneLine())}function Wft(t){return Vft(t)&&!(t.ContextNodeAllOnSameLine()||t.ContextNodeBlockIsOnOneLine())}function L$t(t){return Vft(t)&&(t.ContextNodeAllOnSameLine()||t.ContextNodeBlockIsOnOneLine())}function Vft(t){return Hft(t.contextNode)}function lpe(t){return Hft(t.nextTokenParent)}function Hft(t){if(Uft(t))return!0;switch(t.kind){case 241:case 269:case 210:case 268:return!0}return!1}function QI(t){switch(t.contextNode.kind){case 262:case 174:case 173:case 177:case 178:case 179:case 218:case 176:case 219:case 264:return!0}return!1}function P$t(t){return!QI(t)}function jft(t){return t.contextNode.kind===262||t.contextNode.kind===218}function zft(t){return Uft(t.contextNode)}function Uft(t){switch(t.kind){case 263:case 231:case 264:case 266:case 187:case 267:case 278:case 279:case 272:case 275:return!0}return!1}function A$t(t){switch(t.currentTokenParent.kind){case 263:case 267:case 266:case 299:case 268:case 255:return!0;case 241:{const r=t.currentTokenParent.parent;if(!r||r.kind!==219&&r.kind!==218)return!0}}return!1}function WY(t){switch(t.contextNode.kind){case 245:case 255:case 248:case 249:case 250:case 247:case 258:case 246:case 254:case 299:return!0;default:return!1}}function qft(t){return t.contextNode.kind===210}function O$t(t){return t.contextNode.kind===213}function M$t(t){return t.contextNode.kind===214}function R$t(t){return O$t(t)||M$t(t)}function F$t(t){return t.currentTokenSpan.kind!==28}function B$t(t){return t.nextTokenSpan.kind!==24}function W$t(t){return t.nextTokenSpan.kind!==22}function V$t(t){return t.contextNode.kind===219}function H$t(t){return t.contextNode.kind===205}function zs(t){return t.TokensAreOnSameLine()&&t.contextNode.kind!==12}function $ft(t){return t.contextNode.kind!==12}function uMe(t){return t.contextNode.kind!==284&&t.contextNode.kind!==288}function upe(t){return t.contextNode.kind===294||t.contextNode.kind===293}function j$t(t){return t.nextTokenParent.kind===291||t.nextTokenParent.kind===295&&t.nextTokenParent.parent.kind===291}function Jft(t){return t.contextNode.kind===291}function z$t(t){return t.nextTokenParent.kind!==295}function Gft(t){return t.nextTokenParent.kind===295}function Kft(t){return t.contextNode.kind===285}function U$t(t){return!QI(t)&&!lpe(t)}function q$t(t){return t.TokensAreOnSameLine()&&lm(t.contextNode)&&Xft(t.currentTokenParent)&&!Xft(t.nextTokenParent)}function Xft(t){for(;t&&jt(t);)t=t.parent;return t&&t.kind===170}function $$t(t){return t.currentTokenParent.kind===261&&t.currentTokenParent.getStart(t.sourceFile)===t.currentTokenSpan.pos}function dMe(t){return t.formattingRequestKind!==2}function J$t(t){return t.contextNode.kind===267}function G$t(t){return t.contextNode.kind===187}function K$t(t){return t.contextNode.kind===180}function Qft(t,r){if(t.kind!==30&&t.kind!==32)return!1;switch(r.kind){case 183:case 216:case 265:case 263:case 231:case 264:case 262:case 218:case 219:case 174:case 173:case 179:case 180:case 213:case 214:case 233:return!0;default:return!1}}function VY(t){return Qft(t.currentTokenSpan,t.currentTokenParent)||Qft(t.nextTokenSpan,t.nextTokenParent)}function fMe(t){return t.contextNode.kind===216}function X$t(t){return!fMe(t)}function Q$t(t){return t.currentTokenSpan.kind===116&&t.currentTokenParent.kind===222}function Zft(t){return t.contextNode.kind===229&&t.contextNode.expression!==void 0}function Z$t(t){return t.contextNode.kind===235}function Yft(t){return!Y$t(t)}function Y$t(t){switch(t.contextNode.kind){case 245:case 248:case 249:case 250:case 246:case 247:return!0;default:return!1}}function eJt(t){let r=t.nextTokenSpan.kind,a=t.nextTokenSpan.pos;if(n3(r)){const p=t.nextTokenParent===t.currentTokenParent?yD(t.currentTokenParent,Qi(t.currentTokenParent,g=>!g.parent),t.sourceFile):t.nextTokenParent.getFirstToken(t.sourceFile);if(!p)return!0;r=p.kind,a=p.getStart(t.sourceFile)}const u=t.sourceFile.getLineAndCharacterOfPosition(t.currentTokenSpan.pos).line,h=t.sourceFile.getLineAndCharacterOfPosition(a).line;return u===h?r===20||r===1:r===240||r===27?!1:t.contextNode.kind===264||t.contextNode.kind===265?!O_(t.currentTokenParent)||!!t.currentTokenParent.type||r!==21:Lo(t.currentTokenParent)?!t.currentTokenParent.initializer:t.currentTokenParent.kind!==248&&t.currentTokenParent.kind!==242&&t.currentTokenParent.kind!==240&&r!==23&&r!==21&&r!==40&&r!==41&&r!==44&&r!==14&&r!==28&&r!==228&&r!==16&&r!==15&&r!==25}function tJt(t){return BZ(t.currentTokenSpan.end,t.currentTokenParent,t.sourceFile)}function iJt(t){return!Nr(t.contextNode)||!A_(t.contextNode.expression)||t.contextNode.expression.getText().includes(".")}function nJt(t,r){return{options:t,getRules:rJt(),host:r}}var hMe;function rJt(){return hMe===void 0&&(hMe=oJt(Pft())),hMe}function sJt(t){let r=0;return t&1&&(r|=28),t&2&&(r|=96),t&28&&(r|=28),t&96&&(r|=96),r}function oJt(t){const r=aJt(t);return a=>{const u=r[eht(a.currentTokenSpan.kind,a.nextTokenSpan.kind)];if(u){const h=[];let p=0;for(const g of u){const C=~sJt(p);g.action&C&&Ce(g.context,b=>b(a))&&(h.push(g),p|=g.action)}if(h.length)return h}}}function aJt(t){const r=new Array(_Me*_Me),a=new Array(r.length);for(const u of t){const h=u.leftTokenRange.isSpecific&&u.rightTokenRange.isSpecific;for(const p of u.leftTokenRange.tokens)for(const g of u.rightTokenRange.tokens){const C=eht(p,g);let b=r[C];b===void 0&&(b=r[C]=[]),cJt(b,u.rule,h,a,C)}}return r}function eht(t,r){return j.assert(t<=165&&r<=165,"Must compute formatting context from tokens"),t*_Me+r}var I5=5,dpe=31,_Me=166,oz=(t=>(t[t.StopRulesSpecific=0]="StopRulesSpecific",t[t.StopRulesAny=I5*1]="StopRulesAny",t[t.ContextRulesSpecific=I5*2]="ContextRulesSpecific",t[t.ContextRulesAny=I5*3]="ContextRulesAny",t[t.NoContextRulesSpecific=I5*4]="NoContextRulesSpecific",t[t.NoContextRulesAny=I5*5]="NoContextRulesAny",t))(oz||{});function cJt(t,r,a,u,h){const p=r.action&3?a?0:oz.StopRulesAny:r.context!==cpe?a?oz.ContextRulesSpecific:oz.ContextRulesAny:a?oz.NoContextRulesSpecific:oz.NoContextRulesAny,g=u[h]||0;t.splice(lJt(g,p),0,r),u[h]=uJt(g,p)}function lJt(t,r){let a=0;for(let u=0;u<=r;u+=I5)a+=t&dpe,t>>=I5;return a}function uJt(t,r){const a=(t>>r&dpe)+1;return j.assert((a&dpe)===a,"Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."),t&~(dpe<<r)|a<<r}function fpe(t,r,a){const u={pos:t,end:r,kind:a};return j.isDebugging&&Object.defineProperty(u,"__debugKind",{get:()=>j.formatSyntaxKind(a)}),u}function dJt(t,r,a){const u=r.getLineAndCharacterOfPosition(t).line;if(u===0)return[];let h=KW(u,r);for(;k1(r.text.charCodeAt(h));)h--;mh(r.text.charCodeAt(h))&&h--;const p={pos:Yw(u-1,r),end:h+1};return HY(p,r,a,2)}function fJt(t,r,a){const u=pMe(t,27,r);return tht(mMe(u),r,a,3)}function hJt(t,r,a){const u=pMe(t,19,r);if(!u)return[];const h=u.parent,p=mMe(h),g={pos:Wg(p.getStart(r),r),end:t};return HY(g,r,a,4)}function _Jt(t,r,a){const u=pMe(t,20,r);return tht(mMe(u),r,a,5)}function pJt(t,r){const a={pos:0,end:t.text.length};return HY(a,t,r,0)}function mJt(t,r,a,u){const h={pos:Wg(t,a),end:r};return HY(h,a,u,1)}function pMe(t,r,a){const u=xd(t,a);return u&&u.kind===r&&t===u.getEnd()?u:void 0}function mMe(t){let r=t;for(;r&&r.parent&&r.parent.end===t.end&&!gJt(r.parent,r);)r=r.parent;return r}function gJt(t,r){switch(t.kind){case 263:case 264:return Ip(t.members,r);case 267:const a=t.body;return!!a&&a.kind===268&&Ip(a.statements,r);case 307:case 241:case 268:return Ip(t.statements,r);case 299:return Ip(t.block.statements,r)}return!1}function yJt(t,r){return a(r);function a(u){const h=Uo(u,p=>Dfe(p.getStart(r),p.end,t)&&p);if(h){const p=a(h);if(p)return p}return u}}function vJt(t,r){if(!t.length)return h;const a=t.filter(p=>o5(r,p.start,p.start+p.length)).sort((p,g)=>p.start-g.start);if(!a.length)return h;let u=0;return p=>{for(;;){if(u>=a.length)return!1;const g=a[u];if(p.end<=g.start)return!1;if(yZ(p.pos,p.end,g.start,g.start+g.length))return!0;u++}};function h(){return!1}}function bJt(t,r,a){const u=t.getStart(a);if(u===r.pos&&t.end===r.end)return u;const h=xd(r.pos,a);return!h||h.end>=r.pos?t.pos:h.end}function CJt(t,r,a){let u=-1,h;for(;t;){const p=a.getLineAndCharacterOfPosition(t.getStart(a)).line;if(u!==-1&&p!==u)break;if(K1.shouldIndentChildNode(r,t,h,a))return r.indentSize;u=p,h=t,t=t.parent}return 0}function SJt(t,r,a,u,h,p){const g={pos:t.pos,end:t.end};return nMe(r.text,a,g.pos,g.end,C=>iht(g,t,u,h,C,p,1,b=>!1,r))}function tht(t,r,a,u){if(!t)return[];const h={pos:Wg(t.getStart(r),r),end:t.end};return HY(h,r,a,u)}function HY(t,r,a,u){const h=yJt(t,r);return nMe(r.text,r.languageVariant,bJt(h,t,r),t.end,p=>iht(t,h,K1.getIndentationForNode(h,t,r,a.options),CJt(h,a.options,r),p,a,u,vJt(r.parseDiagnostics,t),r))}function iht(t,r,a,u,h,{options:p,getRules:g,host:C},b,T,E){var N;const R=new Ift(E,b,p);let F,H,U,q,X,Z=-1;const Q=[];if(h.advance(),h.isOnToken()){const et=E.getLineAndCharacterOfPosition(r.getStart(E)).line;let Me=et;lm(r)&&(Me=E.getLineAndCharacterOfPosition(yae(r,E)).line),Ie(r,r,et,Me,a,u)}const re=h.getCurrentLeadingTrivia();if(re){const et=K1.nodeWillIndentChild(p,r,void 0,E,!1)?a+p.indentSize:a;we(re,et,!0,Me=>{Ae(Me,E.getLineAndCharacterOfPosition(Me.pos),r,r,void 0),Te(Me.pos,et,!1)}),p.trimTrailingWhitespace!==!1&&He(re)}if(H&&h.getTokenFullStart()>=t.end){const et=h.isOnEOF()?h.readEOFTokenRange():h.isOnToken()?h.readTokenInfo(r).token:void 0;if(et&&et.pos===F){const Me=((N=xd(et.end,E,r))==null?void 0:N.parent)||U;ke(et,E.getLineAndCharacterOfPosition(et.pos).line,Me,H,q,U,Me,void 0)}}return Q;function oe(et,Me,ut,wt,Et){if(o5(wt,et,Me)||fj(wt,et,Me)){if(Et!==-1)return Et}else{const dt=E.getLineAndCharacterOfPosition(et).line,zt=Wg(et,E),Ei=K1.findFirstNonWhitespaceColumn(zt,et,E,p);if(dt!==ut||et===Ei){const tn=K1.getBaseIndentation(p);return tn>Ei?tn:Ei}}return-1}function pe(et,Me,ut,wt,Et,dt){const zt=K1.shouldIndentChildNode(p,et)?p.indentSize:0;return dt===Me?{indentation:Me===X?Z:Et.getIndentation(),delta:Math.min(p.indentSize,Et.getDelta(et)+zt)}:ut===-1?et.kind===21&&Me===X?{indentation:Z,delta:Et.getDelta(et)}:K1.childStartsOnTheSameLineWithElseInIfStatement(wt,et,Me,E)||K1.childIsUnindentedBranchOfConditionalExpression(wt,et,Me,E)||K1.argumentStartsOnSameLineAsPreviousArgument(wt,et,Me,E)?{indentation:Et.getIndentation(),delta:zt}:{indentation:Et.getIndentation()+Et.getDelta(et),delta:zt}:{indentation:ut,delta:zt}}function de(et){if(Fg(et)){const Me=Fe(et.modifiers,Fa,ct(et.modifiers,Fd));if(Me)return Me.kind}switch(et.kind){case 263:return 86;case 264:return 120;case 262:return 100;case 266:return 266;case 177:return 139;case 178:return 153;case 174:if(et.asteriskToken)return 42;case 172:case 169:const Me=No(et);if(Me)return Me.kind}}function ue(et,Me,ut,wt){return{getIndentationForComment:(zt,Ei,tn)=>{switch(zt){case 20:case 24:case 22:return ut+dt(tn)}return Ei!==-1?Ei:ut},getIndentationForToken:(zt,Ei,tn,xn)=>!xn&&Et(zt,Ei,tn)?ut+dt(tn):ut,getIndentation:()=>ut,getDelta:dt,recomputeIndentation:(zt,Ei)=>{K1.shouldIndentChildNode(p,Ei,et,E)&&(ut+=zt?p.indentSize:-p.indentSize,wt=K1.shouldIndentChildNode(p,et)?p.indentSize:0)}};function Et(zt,Ei,tn){switch(Ei){case 19:case 20:case 22:case 93:case 117:case 60:return!1;case 44:case 32:switch(tn.kind){case 286:case 287:case 285:return!1}break;case 23:case 24:if(tn.kind!==200)return!1;break}return Me!==zt&&!(lm(et)&&Ei===de(et))}function dt(zt){return K1.nodeWillIndentChild(p,et,zt,E,!0)?wt:0}}function Ie(et,Me,ut,wt,Et,dt){if(!o5(t,et.getStart(E),et.getEnd()))return;const zt=ue(et,ut,Et,dt);let Ei=Me;for(Uo(et,_i=>{tn(_i,-1,et,zt,ut,wt,!1)},_i=>{xn(_i,et,ut,zt)});h.isOnToken()&&h.getTokenFullStart()<t.end;){const _i=h.readTokenInfo(et);if(_i.token.end>Math.min(et.end,t.end))break;Pn(_i,et,zt,et)}function tn(_i,Fi,On,pn,qr,Fs,ko,ls){if(j.assert(!cl(_i)),lu(_i)||J2e(On,_i))return Fi;const Qs=_i.getStart(E),Mn=E.getLineAndCharacterOfPosition(Qs).line;let Zs=Mn;lm(_i)&&(Zs=E.getLineAndCharacterOfPosition(yae(_i,E)).line);let at=-1;if(ko&&Ip(t,On)&&(at=oe(Qs,_i.end,qr,t,Fi),at!==-1&&(Fi=at)),!o5(t,_i.pos,_i.end))return _i.end<t.pos&&h.skipToEndOf(_i),Fi;if(_i.getFullWidth()===0)return Fi;for(;h.isOnToken()&&h.getTokenFullStart()<t.end;){const dr=h.readTokenInfo(et);if(dr.token.end>t.end)return Fi;if(dr.token.end>Qs){dr.token.pos>Qs&&h.skipToStartOf(_i);break}Pn(dr,et,pn,et)}if(!h.isOnToken()||h.getTokenFullStart()>=t.end)return Fi;if(eP(_i)){const dr=h.readTokenInfo(_i);if(_i.kind!==12)return j.assert(dr.token.end===_i.end,"Token end is child end"),Pn(dr,et,pn,_i),Fi}const yi=_i.kind===170?Mn:Fs,Sn=pe(_i,Mn,at,et,pn,yi);return Ie(_i,Ei,Mn,Zs,Sn.indentation,Sn.delta),Ei=et,ls&&On.kind===209&&Fi===-1&&(Fi=Sn.indentation),Fi}function xn(_i,Fi,On,pn){j.assert(AT(_i)),j.assert(!cl(_i));const qr=wJt(Fi,_i);let Fs=pn,ko=On;if(!o5(t,_i.pos,_i.end)){_i.end<t.pos&&h.skipToEndOf(_i);return}if(qr!==0)for(;h.isOnToken()&&h.getTokenFullStart()<t.end;){const Mn=h.readTokenInfo(Fi);if(Mn.token.end>_i.pos)break;if(Mn.token.kind===qr){ko=E.getLineAndCharacterOfPosition(Mn.token.pos).line,Pn(Mn,Fi,pn,Fi);let Zs;if(Z!==-1)Zs=Z;else{const at=Wg(Mn.token.pos,E);Zs=K1.findFirstNonWhitespaceColumn(at,Mn.token.pos,E,p)}Fs=ue(Fi,On,Zs,p.indentSize)}else Pn(Mn,Fi,pn,Fi)}let ls=-1;for(let Mn=0;Mn<_i.length;Mn++){const Zs=_i[Mn];ls=tn(Zs,ls,et,Fs,ko,ko,!0,Mn===0)}const Qs=xJt(qr);if(Qs!==0&&h.isOnToken()&&h.getTokenFullStart()<t.end){let Mn=h.readTokenInfo(Fi);Mn.token.kind===28&&(Pn(Mn,Fi,Fs,Fi),Mn=h.isOnToken()?h.readTokenInfo(Fi):void 0),Mn&&Mn.token.kind===Qs&&Ip(Fi,Mn.token)&&Pn(Mn,Fi,Fs,Fi,!0)}}function Pn(_i,Fi,On,pn,qr){j.assert(Ip(Fi,_i.token));const Fs=h.lastTrailingTriviaWasNewLine();let ko=!1;_i.leadingTrivia&&he(_i.leadingTrivia,Fi,Ei,On);let ls=0;const Qs=Ip(t,_i.token),Mn=E.getLineAndCharacterOfPosition(_i.token.pos);if(Qs){const Zs=T(_i.token),at=H;if(ls=Ae(_i.token,Mn,Fi,Ei,On),!Zs)if(ls===0){const yi=at&&E.getLineAndCharacterOfPosition(at.end).line;ko=Fs&&Mn.line!==yi}else ko=ls===1}if(_i.trailingTrivia&&(F=va(_i.trailingTrivia).end,he(_i.trailingTrivia,Fi,Ei,On)),ko){const Zs=Qs&&!T(_i.token)?On.getIndentationForToken(Mn.line,_i.token.kind,pn,!!qr):-1;let at=!0;if(_i.leadingTrivia){const yi=On.getIndentationForComment(_i.token.kind,Zs,pn);at=we(_i.leadingTrivia,yi,at,Sn=>Te(Sn.pos,yi,!1))}Zs!==-1&&at&&(Te(_i.token.pos,Zs,ls===1),X=Mn.line,Z=Zs)}h.advance(),Ei=Fi}}function we(et,Me,ut,wt){for(const Et of et){const dt=Ip(t,Et);switch(Et.kind){case 3:dt&&se(Et,Me,!ut),ut=!1;break;case 2:ut&&dt&&wt(Et),ut=!1;break;case 4:ut=!0;break}}return ut}function he(et,Me,ut,wt){for(const Et of et)if(kZ(Et.kind)&&Ip(t,Et)){const dt=E.getLineAndCharacterOfPosition(Et.pos);Ae(Et,dt,Me,ut,wt)}}function Ae(et,Me,ut,wt,Et){const dt=T(et);let zt=0;if(!dt)if(H)zt=ke(et,Me.line,ut,H,q,U,wt,Et);else{const Ei=E.getLineAndCharacterOfPosition(t.pos);Ne(Ei.line,Me.line)}return H=et,F=et.end,U=ut,q=Me.line,zt}function ke(et,Me,ut,wt,Et,dt,zt,Ei){R.updateContext(wt,dt,et,ut,zt);const tn=g(R);let xn=R.options.trimTrailingWhitespace!==!1,Pn=0;return tn?z(tn,_i=>{if(Pn=$e(_i,wt,Et,et,Me),Ei)switch(Pn){case 2:ut.getStart(E)===et.pos&&Ei.recomputeIndentation(!1,zt);break;case 1:ut.getStart(E)===et.pos&&Ei.recomputeIndentation(!0,zt);break;default:j.assert(Pn===0)}xn=xn&&!(_i.action&16)&&_i.flags!==1}):xn=xn&&et.kind!==1,Me!==Et&&xn&&Ne(Et,Me,wt),Pn}function Te(et,Me,ut){const wt=gMe(Me,p);if(ut)ze(et,0,wt);else{const Et=E.getLineAndCharacterOfPosition(et),dt=Yw(Et.line,E);(Me!==De(dt,Et.character)||qe(wt,dt))&&ze(dt,Et.character,wt)}}function De(et,Me){let ut=0;for(let wt=0;wt<Me;wt++)E.text.charCodeAt(et+wt)===9?ut+=p.tabSize-ut%p.tabSize:ut++;return ut}function qe(et,Me){return et!==E.text.substr(Me,et.length)}function se(et,Me,ut,wt=!0){let Et=E.getLineAndCharacterOfPosition(et.pos).line;const dt=E.getLineAndCharacterOfPosition(et.end).line;if(Et===dt){ut||Te(et.pos,Me,!1);return}const zt=[];let Ei=et.pos;for(let Fi=Et;Fi<dt;Fi++){const On=KW(Fi,E);zt.push({pos:Ei,end:On}),Ei=Yw(Fi+1,E)}if(wt&&zt.push({pos:Ei,end:et.end}),zt.length===0)return;const tn=Yw(Et,E),xn=K1.findFirstNonWhitespaceCharacterAndColumn(tn,zt[0].pos,E,p);let Pn=0;ut&&(Pn=1,Et++);const _i=Me-xn.column;for(let Fi=Pn;Fi<zt.length;Fi++,Et++){const On=Yw(Et,E),pn=Fi===0?xn:K1.findFirstNonWhitespaceCharacterAndColumn(zt[Fi].pos,zt[Fi].end,E,p),qr=pn.column+_i;if(qr>0){const Fs=gMe(qr,p);ze(On,pn.character,Fs)}else We(On,pn.character)}}function Ne(et,Me,ut){for(let wt=et;wt<Me;wt++){const Et=Yw(wt,E),dt=KW(wt,E);if(ut&&(kZ(ut.kind)||Mfe(ut.kind))&&ut.pos<=dt&&ut.end>dt)continue;const zt=Oe(Et,dt);zt!==-1&&(j.assert(zt===Et||!k1(E.text.charCodeAt(zt-1))),We(zt,dt+1-zt))}}function Oe(et,Me){let ut=Me;for(;ut>=et&&k1(E.text.charCodeAt(ut));)ut--;return ut!==Me?ut+1:-1}function He(et){let Me=H?H.end:t.pos;for(const ut of et)kZ(ut.kind)&&(Me<ut.pos&&Pe(Me,ut.pos-1,H),Me=ut.end+1);Me<t.end&&Pe(Me,t.end,H)}function Pe(et,Me,ut){const wt=E.getLineAndCharacterOfPosition(et).line,Et=E.getLineAndCharacterOfPosition(Me).line;Ne(wt,Et+1,ut)}function We(et,Me){Me&&Q.push(DZ(et,Me,""))}function ze(et,Me,ut){(Me||ut)&&Q.push(DZ(et,Me,ut))}function Nt(et,Me){Q.push(DZ(et,0,Me))}function $e(et,Me,ut,wt,Et){const dt=Et!==ut;switch(et.action){case 1:return 0;case 16:if(Me.end!==wt.pos)return We(Me.end,wt.pos-Me.end),dt?2:0;break;case 32:We(Me.pos,Me.end-Me.pos);break;case 8:if(et.flags!==1&&ut!==Et)return 0;if(Et-ut!==1)return ze(Me.end,wt.pos-Me.end,rC(C,p)),dt?0:1;break;case 4:if(et.flags!==1&&ut!==Et)return 0;if(wt.pos-Me.end!==1||E.text.charCodeAt(Me.end)!==32)return ze(Me.end,wt.pos-Me.end," "),dt?2:0;break;case 64:Nt(Me.end,";")}return 0}}function nht(t,r,a,u=Rs(t,r)){const h=Qi(u,z0);if(h&&(u=h.parent),u.getStart(t)<=r&&r<u.getEnd())return;a=a===null?void 0:a===void 0?xd(r,t):a;const g=a&&qw(t.text,a.end),C=Lae(u,t),b=Js(g,C);return b&&Fe(b,T=>dj(T,r)||r===T.end&&(T.kind===2||r===t.getFullWidth()))}function wJt(t,r){switch(t.kind){case 176:case 262:case 218:case 174:case 173:case 219:case 179:case 180:case 184:case 185:case 177:case 178:if(t.typeParameters===r)return 30;if(t.parameters===r)return 21;break;case 213:case 214:if(t.typeArguments===r)return 30;if(t.arguments===r)return 21;break;case 263:case 231:case 264:case 265:if(t.typeParameters===r)return 30;break;case 183:case 215:case 186:case 233:case 205:if(t.typeArguments===r)return 30;break;case 187:return 19}return 0}function xJt(t){switch(t){case 21:return 22;case 30:return 32;case 19:return 20}return 0}var hpe,az,cz;function gMe(t,r){if((!hpe||hpe.tabSize!==r.tabSize||hpe.indentSize!==r.indentSize)&&(hpe={tabSize:r.tabSize,indentSize:r.indentSize},az=cz=void 0),r.convertTabsToSpaces){let u;const h=Math.floor(t/r.indentSize),p=t%r.indentSize;return cz||(cz=[]),cz[h]===void 0?(u=gj(" ",r.indentSize*h),cz[h]=u):u=cz[h],p?u+gj(" ",p):u}else{const u=Math.floor(t/r.tabSize),h=t-u*r.tabSize;let p;return az||(az=[]),az[u]===void 0?az[u]=p=gj(" ",u):p=az[u],h?p+gj(" ",h):p}}var K1;(t=>{let r;(se=>{se[se.Unknown=-1]="Unknown"})(r||(r={}));function a(se,Ne,Oe,He=!1){if(se>Ne.text.length)return C(Oe);if(Oe.indentStyle===0)return 0;const Pe=xd(se,Ne,void 0,!0),We=nht(Ne,se,Pe||null);if(We&&We.kind===3)return u(Ne,se,Oe,We);if(!Pe)return C(Oe);if(Mfe(Pe.kind)&&Pe.getStart(Ne)<=se&&se<Pe.end)return 0;const Nt=Ne.getLineAndCharacterOfPosition(se).line,$e=Rs(Ne,se),et=$e.kind===19&&$e.parent.kind===210;if(Oe.indentStyle===1||et)return h(Ne,se,Oe);if(Pe.kind===28&&Pe.parent.kind!==226){const ut=E(Pe,Ne,Oe);if(ut!==-1)return ut}const Me=re(se,Pe.parent,Ne);if(Me&&!Ip(Me,Pe)){const wt=[218,219].includes($e.parent.kind)?0:Oe.indentSize;return de(Me,Ne,Oe)+wt}return p(Ne,se,Pe,Nt,He,Oe)}t.getIndentation=a;function u(se,Ne,Oe,He){const Pe=Ia(se,Ne).line-1,We=Ia(se,He.pos).line;if(j.assert(We>=0),Pe<=We)return Ae(Yw(We,se),Ne,se,Oe);const ze=Yw(Pe,se),{column:Nt,character:$e}=he(ze,Ne,se,Oe);return Nt===0?Nt:se.text.charCodeAt(ze+$e)===42?Nt-1:Nt}function h(se,Ne,Oe){let He=Ne;for(;He>0;){const We=se.text.charCodeAt(He);if(!Pv(We))break;He--}const Pe=Wg(He,se);return Ae(Pe,He,se,Oe)}function p(se,Ne,Oe,He,Pe,We){let ze,Nt=Oe;for(;Nt;){if(Efe(Nt,Ne,se)&&De(We,Nt,ze,se,!0)){const et=H(Nt,se),Me=F(Oe,Nt,He,se),ut=Me!==0?Pe&&Me===2?We.indentSize:0:He!==et.line?We.indentSize:0;return b(Nt,et,void 0,ut,se,!0,We)}const $e=ue(Nt,se,We,!0);if($e!==-1)return $e;ze=Nt,Nt=Nt.parent}return C(We)}function g(se,Ne,Oe,He){const Pe=Oe.getLineAndCharacterOfPosition(se.getStart(Oe));return b(se,Pe,Ne,0,Oe,!1,He)}t.getIndentationForNode=g;function C(se){return se.baseIndentSize||0}t.getBaseIndentation=C;function b(se,Ne,Oe,He,Pe,We,ze){var Nt;let $e=se.parent;for(;$e;){let et=!0;if(Oe){const Et=se.getStart(Pe);et=Et<Oe.pos||Et>Oe.end}const Me=T($e,se,Pe),ut=Me.line===Ne.line||q($e,se,Ne.line,Pe);if(et){const Et=(Nt=Q(se,Pe))==null?void 0:Nt[0],dt=!!Et&&H(Et,Pe).line>Me.line;let zt=ue(se,Pe,ze,dt);if(zt!==-1||(zt=N(se,$e,Ne,ut,Pe,ze),zt!==-1))return zt+He}De(ze,$e,se,Pe,We)&&!ut&&(He+=ze.indentSize);const wt=U($e,se,Ne.line,Pe);se=$e,$e=se.parent,Ne=wt?Pe.getLineAndCharacterOfPosition(se.getStart(Pe)):Me}return He+C(ze)}function T(se,Ne,Oe){const He=Q(Ne,Oe),Pe=He?He.pos:se.getStart(Oe);return Oe.getLineAndCharacterOfPosition(Pe)}function E(se,Ne,Oe){const He=eAe(se);return He&&He.listItemIndex>0?Ie(He.list.getChildren(),He.listItemIndex-1,Ne,Oe):-1}function N(se,Ne,Oe,He,Pe,We){return(Wf(se)||$W(se))&&(Ne.kind===307||!He)?we(Oe,Pe,We):-1}let R;(se=>{se[se.Unknown=0]="Unknown",se[se.OpenBrace=1]="OpenBrace",se[se.CloseBrace=2]="CloseBrace"})(R||(R={}));function F(se,Ne,Oe,He){const Pe=yD(se,Ne,He);if(!Pe)return 0;if(Pe.kind===19)return 1;if(Pe.kind===20){const We=H(Pe,He).line;return Oe===We?2:0}return 0}function H(se,Ne){return Ne.getLineAndCharacterOfPosition(se.getStart(Ne))}function U(se,Ne,Oe,He){if(!(la(se)&&Yt(se.arguments,Ne)))return!1;const Pe=se.expression.getEnd();return Ia(He,Pe).line===Oe}t.isArgumentAndStartLineOverlapsExpressionBeingCalled=U;function q(se,Ne,Oe,He){if(se.kind===245&&se.elseStatement===Ne){const Pe=Uc(se,93,He);return j.assert(Pe!==void 0),H(Pe,He).line===Oe}return!1}t.childStartsOnTheSameLineWithElseInIfStatement=q;function X(se,Ne,Oe,He){if(qP(se)&&(Ne===se.whenTrue||Ne===se.whenFalse)){const Pe=Ia(He,se.condition.end).line;if(Ne===se.whenTrue)return Oe===Pe;{const We=H(se.whenTrue,He).line,ze=Ia(He,se.whenTrue.end).line;return Pe===We&&ze===Oe}}return!1}t.childIsUnindentedBranchOfConditionalExpression=X;function Z(se,Ne,Oe,He){if(T1(se)){if(!se.arguments)return!1;const Pe=Fe(se.arguments,$e=>$e.pos===Ne.pos);if(!Pe)return!1;const We=se.arguments.indexOf(Pe);if(We===0)return!1;const ze=se.arguments[We-1],Nt=Ia(He,ze.getEnd()).line;if(Oe===Nt)return!0}return!1}t.argumentStartsOnSameLineAsPreviousArgument=Z;function Q(se,Ne){return se.parent&&oe(se.getStart(Ne),se.getEnd(),se.parent,Ne)}t.getContainingList=Q;function re(se,Ne,Oe){return Ne&&oe(se,se,Ne,Oe)}function oe(se,Ne,Oe,He){switch(Oe.kind){case 183:return Pe(Oe.typeArguments);case 210:return Pe(Oe.properties);case 209:return Pe(Oe.elements);case 187:return Pe(Oe.members);case 262:case 218:case 219:case 174:case 173:case 179:case 176:case 185:case 180:return Pe(Oe.typeParameters)||Pe(Oe.parameters);case 177:return Pe(Oe.parameters);case 263:case 231:case 264:case 265:case 345:return Pe(Oe.typeParameters);case 214:case 213:return Pe(Oe.typeArguments)||Pe(Oe.arguments);case 261:return Pe(Oe.declarations);case 275:case 279:return Pe(Oe.elements);case 206:case 207:return Pe(Oe.elements)}function Pe(We){return We&&fj(pe(Oe,We,He),se,Ne)?We:void 0}}function pe(se,Ne,Oe){const He=se.getChildren(Oe);for(let Pe=1;Pe<He.length-1;Pe++)if(He[Pe].pos===Ne.pos&&He[Pe].end===Ne.end)return{pos:He[Pe-1].end,end:He[Pe+1].getStart(Oe)};return Ne}function de(se,Ne,Oe){return se?we(Ne.getLineAndCharacterOfPosition(se.pos),Ne,Oe):-1}function ue(se,Ne,Oe,He){if(se.parent&&se.parent.kind===261)return-1;const Pe=Q(se,Ne);if(Pe){const We=Pe.indexOf(se);if(We!==-1){const ze=Ie(Pe,We,Ne,Oe);if(ze!==-1)return ze}return de(Pe,Ne,Oe)+(He?Oe.indentSize:0)}return-1}function Ie(se,Ne,Oe,He){j.assert(Ne>=0&&Ne<se.length);const Pe=se[Ne];let We=H(Pe,Oe);for(let ze=Ne-1;ze>=0;ze--){if(se[ze].kind===28)continue;if(Oe.getLineAndCharacterOfPosition(se[ze].end).line!==We.line)return we(We,Oe,He);We=H(se[ze],Oe)}return-1}function we(se,Ne,Oe){const He=Ne.getPositionOfLineAndCharacter(se.line,0);return Ae(He,He+se.character,Ne,Oe)}function he(se,Ne,Oe,He){let Pe=0,We=0;for(let ze=se;ze<Ne;ze++){const Nt=Oe.text.charCodeAt(ze);if(!k1(Nt))break;Nt===9?We+=He.tabSize+We%He.tabSize:We++,Pe++}return{column:We,character:Pe}}t.findFirstNonWhitespaceCharacterAndColumn=he;function Ae(se,Ne,Oe,He){return he(se,Ne,Oe,He).column}t.findFirstNonWhitespaceColumn=Ae;function ke(se,Ne,Oe,He,Pe){const We=Oe?Oe.kind:0;switch(Ne.kind){case 244:case 263:case 231:case 264:case 266:case 265:case 209:case 241:case 268:case 210:case 187:case 200:case 189:case 217:case 211:case 213:case 214:case 243:case 277:case 253:case 227:case 207:case 206:case 286:case 289:case 285:case 294:case 173:case 179:case 180:case 169:case 184:case 185:case 196:case 215:case 223:case 279:case 275:case 281:case 276:case 172:case 296:case 297:return!0;case 269:return se.indentSwitchCase??!0;case 260:case 303:case 226:if(!se.indentMultiLineObjectLiteralBeginningOnBlankLine&&He&&We===210)return qe(He,Oe);if(Ne.kind===226&&He&&Oe&&We===284){const ze=He.getLineAndCharacterOfPosition(Va(He.text,Ne.pos)).line,Nt=He.getLineAndCharacterOfPosition(Va(He.text,Oe.pos)).line;return ze!==Nt}if(Ne.kind!==226)return!0;break;case 246:case 247:case 249:case 250:case 248:case 245:case 262:case 218:case 174:case 176:case 177:case 178:return We!==241;case 219:return He&&We===217?qe(He,Oe):We!==241;case 278:return We!==279;case 272:return We!==273||!!Oe.namedBindings&&Oe.namedBindings.kind!==275;case 284:return We!==287;case 288:return We!==290;case 193:case 192:case 238:if(We===187||We===189||We===200)return!1;break}return Pe}t.nodeWillIndentChild=ke;function Te(se,Ne){switch(se){case 253:case 257:case 251:case 252:return Ne.kind!==241;default:return!1}}function De(se,Ne,Oe,He,Pe=!1){return ke(se,Ne,Oe,He,!1)&&!(Pe&&Oe&&Te(Oe.kind,Ne))}t.shouldIndentChildNode=De;function qe(se,Ne){const Oe=Va(se.text,Ne.pos),He=se.getLineAndCharacterOfPosition(Oe).line,Pe=se.getLineAndCharacterOfPosition(Ne.end).line;return He===Pe}})(K1||(K1={}));var _pe={};c(_pe,{pasteEditsProvider:()=>TJt});var kJt="providePostPasteEdits";function TJt(t,r,a,u,h,p,g,C){return{edits:er.ChangeTracker.with({host:h,formatContext:g,preferences:p},T=>DJt(t,r,a,u,h,p,g,C,T)),fixId:kJt}}function DJt(t,r,a,u,h,p,g,C,b){let T;r.length!==a.length&&(T=r.length===1?r[0]:r.join(rC(g.host,g.options)));const E=[];let N=t.text;for(let F=a.length-1;F>=0;F--){const{pos:H,end:U}=a[F];N=T?N.slice(0,H)+T+N.slice(U):N.slice(0,H)+r[F]+N.slice(U)}let R;j.checkDefined(h.runWithTemporaryFileUpdate).call(h,t.fileName,N,(F,H,U)=>{if(R=wh.createImportAdder(U,F,p,h),u!=null&&u.range){j.assert(u.range.length===r.length),u.range.forEach(Z=>{const Q=u.file.statements,re=ct(Q,pe=>pe.end>Z.pos);if(re===-1)return;let oe=ct(Q,pe=>pe.end>=Z.end,re);oe!==-1&&Z.end<=Q[oe].getStart()&&oe--,E.push(...Q.slice(re,oe===-1?Q.length:oe+1))});const q=iY(u.file,E,H.getTypeChecker(),B4e(U,E,H.getTypeChecker()),{pos:u.range[0].pos,end:u.range[u.range.length-1].end});j.assertIsDefined(H);const X=!vhe(t.fileName,H,h,!!u.file.commonJsModuleIndicator);N4e(u.file,q.targetFileImportsFromOldFile,b,X),V4e(u.file,q.oldImportsNeededByTargetFile,q.targetFileImportsFromOldFile,H.getTypeChecker(),F,R)}else{const q={sourceFile:U,program:H,cancellationToken:C,host:h,preferences:p,formatContext:g};let X=0;a.forEach((Z,Q)=>{const re=Z.end-Z.pos,oe=T??r[Q],pe=Z.pos+X,de=pe+oe.length,ue={pos:pe,end:de};X+=oe.length-re;const Ie=Qi(Rs(q.sourceFile,ue.pos),we=>Ip(we,ue));Ie&&Uo(Ie,function we(he){if(ot(he)&&s5(ue,he.getStart(U))&&!(F!=null&&F.getTypeChecker().resolveName(he.text,he,-1,!1)))return R.addImportForUnresolvedIdentifier(q,he,!0);he.forEachChild(we)})})}R.writeFixes(b,$p(u?u.file:t,p))}),R.hasFixes()&&a.forEach((F,H)=>{b.replaceRangeWithText(t,{pos:F.pos,end:F.end},T??r[H])})}var rht={};c(rht,{ANONYMOUS:()=>lhe,AccessFlags:()=>tke,AssertionLevel:()=>dxe,AssignmentDeclarationKind:()=>uke,AssignmentKind:()=>MTe,Associativity:()=>zTe,BreakpointResolver:()=>o_e,BuilderFileEmit:()=>RLe,BuilderProgramKind:()=>ULe,BuilderState:()=>$0,CallHierarchy:()=>mA,CharacterCodes:()=>Cke,CheckFlags:()=>Qxe,CheckMode:()=>Iue,ClassificationType:()=>gfe,ClassificationTypeNames:()=>$Pe,CommentDirectiveType:()=>Rxe,Comparison:()=>x,CompletionInfoFlags:()=>WPe,CompletionTriggerKind:()=>pfe,Completions:()=>CA,ContainerFlags:()=>yNe,ContextFlags:()=>zxe,Debug:()=>j,DiagnosticCategory:()=>JJ,Diagnostics:()=>k,DocumentHighlights:()=>QZ,ElementFlags:()=>eke,EmitFlags:()=>xoe,EmitHint:()=>Tke,EmitOnly:()=>Bxe,EndOfLineState:()=>jPe,ExitStatus:()=>Wxe,ExportKind:()=>BAe,Extension:()=>Ske,ExternalEmitHelpers:()=>kke,FileIncludeKind:()=>_oe,FilePreprocessingDiagnosticsKind:()=>Fxe,FileSystemEntryKind:()=>Mke,FileWatcherEventKind:()=>Pke,FindAllReferences:()=>kl,FlattenLevel:()=>WNe,FlowFlags:()=>$J,ForegroundColorEscapeSequences:()=>ELe,FunctionFlags:()=>HTe,GeneratedIdentifierFlags:()=>hoe,GetLiteralTextFlags:()=>X2e,GoToDefinition:()=>uO,HighlightSpanKind:()=>FPe,IdentifierNameMap:()=>V3,ImportKind:()=>FAe,ImportsNotUsedAsValues:()=>mke,IndentStyle:()=>BPe,IndexFlags:()=>ike,IndexKind:()=>ske,InferenceFlags:()=>cke,InferencePriority:()=>ake,InlayHintKind:()=>RPe,InlayHints:()=>X_e,InternalEmitFlags:()=>wke,InternalNodeBuilderFlags:()=>qxe,InternalSymbolName:()=>Zxe,IntersectionFlags:()=>jxe,InvalidatedProjectKind:()=>hPe,JSDocParsingMode:()=>Lke,JsDoc:()=>S2,JsTyping:()=>J1,JsxEmit:()=>pke,JsxFlags:()=>Pxe,JsxReferenceKind:()=>nke,LanguageFeatureMinimumTarget:()=>xke,LanguageServiceMode:()=>OPe,LanguageVariant:()=>vke,LexicalEnvironmentFlags:()=>Eke,ListFormat:()=>Ike,LogLevel:()=>Cxe,MapCode:()=>Q_e,MemberOverrideStatus:()=>Vxe,ModifierFlags:()=>doe,ModuleDetectionKind:()=>dke,ModuleInstanceState:()=>mNe,ModuleKind:()=>bW,ModuleResolutionKind:()=>i8,ModuleSpecifierEnding:()=>VDe,NavigateTo:()=>a4e,NavigationBar:()=>l4e,NewLineKind:()=>gke,NodeBuilderFlags:()=>Uxe,NodeCheckFlags:()=>goe,NodeFactoryFlags:()=>hEe,NodeFlags:()=>uoe,NodeResolutionFeatures:()=>oNe,ObjectFlags:()=>voe,OperationCanceledException:()=>t8,OperatorPrecedence:()=>UTe,OrganizeImports:()=>w2,OrganizeImportsMode:()=>_fe,OuterExpressionKinds:()=>Dke,OutliningElementsCollector:()=>Y_e,OutliningSpanKind:()=>VPe,OutputFileType:()=>HPe,PackageJsonAutoImportPreference:()=>APe,PackageJsonDependencyGroup:()=>PPe,PatternMatchKind:()=>Ehe,PollingInterval:()=>koe,PollingWatchKind:()=>_ke,PragmaKindFlags:()=>Nke,PredicateSemantics:()=>Axe,PrivateIdentifierKind:()=>wEe,ProcessLevel:()=>zNe,ProgramUpdateLevel:()=>wLe,QuotePreference:()=>_Ae,RegularExpressionFlags:()=>Oxe,RelationComparisonResult:()=>foe,Rename:()=>RY,ScriptElementKind:()=>UPe,ScriptElementKindModifier:()=>qPe,ScriptKind:()=>Coe,ScriptSnapshot:()=>lZ,ScriptTarget:()=>yke,SemanticClassificationFormat:()=>MPe,SemanticMeaning:()=>JPe,SemicolonPreference:()=>mfe,SignatureCheckMode:()=>Nue,SignatureFlags:()=>boe,SignatureHelp:()=>ez,SignatureInfo:()=>MLe,SignatureKind:()=>rke,SmartSelectionRange:()=>ipe,SnippetKind:()=>woe,StatisticType:()=>SPe,StructureIsReused:()=>poe,SymbolAccessibility:()=>Gxe,SymbolDisplay:()=>NS,SymbolDisplayPartKind:()=>dZ,SymbolFlags:()=>moe,SymbolFormatFlags:()=>Jxe,SyntaxKind:()=>loe,Ternary:()=>lke,ThrottledCancellationToken:()=>g6e,TokenClass:()=>zPe,TokenFlags:()=>Mxe,TransformFlags:()=>Soe,TypeFacts:()=>Eue,TypeFlags:()=>yoe,TypeFormatFlags:()=>$xe,TypeMapKind:()=>oke,TypePredicateKind:()=>Kxe,TypeReferenceSerializationKind:()=>Xxe,UnionReduction:()=>Hxe,UpToDateStatusType:()=>oPe,VarianceFlags:()=>Yxe,Version:()=>P0,VersionRange:()=>qJ,WatchDirectoryFlags:()=>bke,WatchDirectoryKind:()=>hke,WatchFileKind:()=>fke,WatchLogLevel:()=>kLe,WatchType:()=>Kd,accessPrivateIdentifier:()=>BNe,addEmitFlags:()=>F1,addEmitHelper:()=>MP,addEmitHelpers:()=>Zb,addInternalEmitFlags:()=>AP,addNodeFactoryPatcher:()=>yQe,addObjectAllocatorPatcher:()=>rQe,addRange:()=>Sr,addRelatedInfo:()=>da,addSyntheticLeadingComment:()=>h7,addSyntheticTrailingComment:()=>uX,addToSeen:()=>Pg,advancedAsyncSuperHelper:()=>_X,affectsDeclarationPathOptionDeclarations:()=>IIe,affectsEmitOptionDeclarations:()=>EIe,allKeysStartWithDot:()=>lQ,altDirectorySeparator:()=>QJ,and:()=>jJ,append:()=>fn,appendIfUnique:()=>n_,arrayFrom:()=>as,arrayIsEqualTo:()=>i_,arrayIsHomogeneous:()=>KDe,arrayOf:()=>zc,arrayReverseIterator:()=>Bw,arrayToMap:()=>Ld,arrayToMultiMap:()=>Cn,arrayToNumericMap:()=>Sa,assertType:()=>MKe,assign:()=>$u,asyncSuperHelper:()=>hX,attachFileToDiagnostics:()=>TP,base64decode:()=>hDe,base64encode:()=>fDe,binarySearch:()=>Jt,binarySearchKey:()=>ti,bindSourceFile:()=>vNe,breakIntoCharacterSpans:()=>YAe,breakIntoWordSpans:()=>e4e,buildLinkParts:()=>SAe,buildOpts:()=>EH,buildOverload:()=>aht,bundlerModuleNameResolver:()=>aNe,canBeConvertedToAsync:()=>Ohe,canHaveDecorators:()=>uD,canHaveExportModifier:()=>eH,canHaveFlowNode:()=>wV,canHaveIllegalDecorators:()=>Fle,canHaveIllegalModifiers:()=>cIe,canHaveIllegalType:()=>UQe,canHaveIllegalTypeParameters:()=>aIe,canHaveJSDoc:()=>xV,canHaveLocals:()=>Ay,canHaveModifiers:()=>Fg,canHaveModuleSpecifier:()=>PTe,canHaveSymbol:()=>M0,canIncludeBindAndCheckDiagnostics:()=>r7,canJsonReportNoInputFiles:()=>O7,canProduceDiagnostics:()=>TQ,canUsePropertyAccess:()=>Gce,canWatchAffectingLocation:()=>ZLe,canWatchAtTypes:()=>QLe,canWatchDirectoryOrFile:()=>$Q,cartesianProduct:()=>vxe,cast:()=>ha,chainBundle:()=>q0,chainDiagnosticMessages:()=>jo,changeAnyExtension:()=>wW,changeCompilerHostLikeToUseCache:()=>Q7,changeExtension:()=>cx,changeFullExtension:()=>YJ,changesAffectModuleResolution:()=>TG,changesAffectingProgramStructure:()=>j2e,characterCodeToRegularExpressionFlag:()=>Roe,childIsDecorated:()=>N8,classElementOrClassElementParameterIsDecorated:()=>Mae,classHasClassThisAssignment:()=>Uue,classHasDeclaredOrExplicitlyAssignedName:()=>que,classHasExplicitlyAssignedName:()=>wQ,classOrConstructorParameterIsDecorated:()=>dS,classicNameResolver:()=>_Ne,classifier:()=>C6e,cleanExtendedConfigCache:()=>LQ,clear:()=>An,clearMap:()=>X_,clearSharedExtendedConfigFileWatcher:()=>sde,climbPastPropertyAccess:()=>_Z,clone:()=>Jd,cloneCompilerOptions:()=>Ffe,closeFileWatcher:()=>d0,closeFileWatcherOf:()=>Zm,codefix:()=>wh,collapseTextChangeRangesAcrossMultipleVersions:()=>n2e,collectExternalModuleInfo:()=>Vue,combine:()=>rS,combinePaths:()=>zr,commandLineOptionOfCustomType:()=>PIe,commentPragmas:()=>GJ,commonOptionsWithBuild:()=>jX,compact:()=>Rw,compareBooleans:()=>Ak,compareDataObjects:()=>xce,compareDiagnostics:()=>Z8,compareEmitHelpers:()=>kEe,compareNumberOfDirectorySeparators:()=>ZV,comparePaths:()=>Hb,comparePathsCaseInsensitive:()=>rXe,comparePathsCaseSensitive:()=>nXe,comparePatternKeys:()=>Cue,compareProperties:()=>pxe,compareStringsCaseInsensitive:()=>mW,compareStringsCaseInsensitiveEslintCompatible:()=>fxe,compareStringsCaseSensitive:()=>sh,compareStringsCaseSensitiveUI:()=>gW,compareTextSpans:()=>VJ,compareValues:()=>_l,compilerOptionsAffectDeclarationPath:()=>ADe,compilerOptionsAffectEmit:()=>PDe,compilerOptionsAffectSemanticDiagnostics:()=>LDe,compilerOptionsDidYouMeanDiagnostics:()=>$X,compilerOptionsIndicateEsModules:()=>zfe,computeCommonSourceDirectoryOfFilenames:()=>TLe,computeLineAndCharacterOfPosition:()=>P6,computeLineOfPosition:()=>a8,computeLineStarts:()=>ZL,computePositionOfLineAndCharacter:()=>nG,computeSignatureWithDiagnostics:()=>Tde,computeSuggestionDiagnostics:()=>Lhe,computedOptions:()=>Cd,concatenate:()=>Js,concatenateDiagnosticMessageChains:()=>TDe,consumesNodeCoreModules:()=>jZ,contains:()=>Yt,containsIgnoredPath:()=>a7,containsObjectRestOrSpread:()=>xH,containsParseError:()=>oP,containsPath:()=>Vm,convertCompilerOptionsForTelemetry:()=>GIe,convertCompilerOptionsFromJson:()=>ZZe,convertJsonOption:()=>BI,convertToBase64:()=>dDe,convertToJson:()=>LH,convertToObject:()=>HIe,convertToOptionsWithAbsolutePaths:()=>XX,convertToRelativePath:()=>s8,convertToTSConfig:()=>sue,convertTypeAcquisitionFromJson:()=>YZe,copyComments:()=>qI,copyEntries:()=>DG,copyLeadingComments:()=>iO,copyProperties:()=>wg,copyTrailingAsLeadingComments:()=>xj,copyTrailingComments:()=>h5,couldStartTrivia:()=>Uke,countWhere:()=>$i,createAbstractBuilder:()=>ltt,createAccessorPropertyBackingField:()=>Vle,createAccessorPropertyGetRedirector:()=>mIe,createAccessorPropertySetRedirector:()=>gIe,createBaseNodeFactory:()=>cEe,createBinaryExpressionTrampoline:()=>BX,createBuilderProgram:()=>Dde,createBuilderProgramUsingIncrementalBuildInfo:()=>GLe,createBuilderStatusReporter:()=>tZ,createCacheableExportInfoMap:()=>bhe,createCachedDirectoryStructureHost:()=>IQ,createClassifier:()=>Hit,createCommentDirectivesMap:()=>G2e,createCompilerDiagnostic:()=>Zl,createCompilerDiagnosticForInvalidCustomType:()=>AIe,createCompilerDiagnosticFromMessageChain:()=>PK,createCompilerHost:()=>DLe,createCompilerHostFromProgramHost:()=>$de,createCompilerHostWorker:()=>PQ,createDetachedDiagnostic:()=>kP,createDiagnosticCollection:()=>OV,createDiagnosticForFileFromMessageChain:()=>Nae,createDiagnosticForNode:()=>Kn,createDiagnosticForNodeArray:()=>q6,createDiagnosticForNodeArrayFromMessageChain:()=>eV,createDiagnosticForNodeFromMessageChain:()=>Bv,createDiagnosticForNodeInSourceFile:()=>jm,createDiagnosticForRange:()=>cTe,createDiagnosticMessageChainFromDiagnostic:()=>aTe,createDiagnosticReporter:()=>aA,createDocumentPositionMapper:()=>ANe,createDocumentRegistry:()=>jAe,createDocumentRegistryInternal:()=>khe,createEmitAndSemanticDiagnosticsBuilderProgram:()=>Lde,createEmitHelperFactory:()=>xEe,createEmptyExports:()=>gH,createEvaluator:()=>sEe,createExpressionForJsxElement:()=>tIe,createExpressionForJsxFragment:()=>iIe,createExpressionForObjectLiteralElementLike:()=>nIe,createExpressionForPropertyName:()=>Lle,createExpressionFromEntityName:()=>yH,createExternalHelpersImportDeclarationIfNeeded:()=>Ole,createFileDiagnostic:()=>Md,createFileDiagnosticFromMessageChain:()=>BG,createFlowNode:()=>zy,createForOfBindingStatement:()=>Nle,createFutureSourceFile:()=>GZ,createGetCanonicalFileName:()=>Mf,createGetIsolatedDeclarationErrors:()=>fLe,createGetSourceFile:()=>ude,createGetSymbolAccessibilityDiagnosticForNode:()=>xS,createGetSymbolAccessibilityDiagnosticForNodeName:()=>dLe,createGetSymbolWalker:()=>bNe,createIncrementalCompilerHost:()=>eZ,createIncrementalProgram:()=>sPe,createJsxFactoryExpression:()=>Ile,createLanguageService:()=>y6e,createLanguageServiceSourceFile:()=>hY,createMemberAccessForPropertyName:()=>RI,createModeAwareCache:()=>M3,createModeAwareCacheKey:()=>B7,createModeMismatchDetails:()=>_ae,createModuleNotFoundChain:()=>IG,createModuleResolutionCache:()=>R3,createModuleResolutionLoader:()=>gde,createModuleResolutionLoaderUsingGlobalCache:()=>iPe,createModuleSpecifierResolutionHost:()=>dA,createMultiMap:()=>Of,createNameResolver:()=>Yce,createNodeConverters:()=>dEe,createNodeFactory:()=>rH,createOptionNameMap:()=>UX,createOverload:()=>ppe,createPackageJsonImportFilter:()=>nO,createPackageJsonInfo:()=>fhe,createParenthesizerRules:()=>lEe,createPatternMatcher:()=>JAe,createPrinter:()=>bx,createPrinterWithDefaults:()=>CLe,createPrinterWithRemoveComments:()=>_D,createPrinterWithRemoveCommentsNeverAsciiEscape:()=>SLe,createPrinterWithRemoveCommentsOmitTrailingSemicolon:()=>rde,createProgram:()=>YH,createProgramHost:()=>Jde,createPropertyNameNodeForIdentifierOrLiteral:()=>tX,createQueue:()=>JR,createRange:()=>Um,createRedirectedBuilderProgram:()=>Nde,createResolutionCache:()=>Ade,createRuntimeTypeSerializer:()=>GNe,createScanner:()=>Ov,createSemanticDiagnosticsBuilderProgram:()=>ctt,createSet:()=>Xse,createSolutionBuilder:()=>uPe,createSolutionBuilderHost:()=>cPe,createSolutionBuilderWithWatch:()=>dPe,createSolutionBuilderWithWatchHost:()=>lPe,createSortedArray:()=>Lk,createSourceFile:()=>ZP,createSourceMapGenerator:()=>ENe,createSourceMapSource:()=>SQe,createSuperAccessVariableStatement:()=>kQ,createSymbolTable:()=>_a,createSymlinkCache:()=>Oce,createSyntacticTypeNodeBuilder:()=>IPe,createSystemWatchFunctions:()=>Rke,createTextChange:()=>mj,createTextChangeFromStartLength:()=>DZ,createTextChangeRange:()=>AW,createTextRangeFromNode:()=>Vfe,createTextRangeFromSpan:()=>TZ,createTextSpan:()=>Ff,createTextSpanFromBounds:()=>Fu,createTextSpanFromNode:()=>f_,createTextSpanFromRange:()=>DS,createTextSpanFromStringLiteralLikeContent:()=>Wfe,createTextWriter:()=>FV,createTokenRange:()=>bce,createTypeChecker:()=>TNe,createTypeReferenceDirectiveResolutionCache:()=>sQ,createTypeReferenceResolutionLoader:()=>MQ,createWatchCompilerHost:()=>vtt,createWatchCompilerHostOfConfigFile:()=>Gde,createWatchCompilerHostOfFilesAndCompilerOptions:()=>Kde,createWatchFactory:()=>qde,createWatchHost:()=>Ude,createWatchProgram:()=>Xde,createWatchStatusReporter:()=>Ode,createWriteFileMeasuringIO:()=>dde,declarationNameToString:()=>al,decodeMappings:()=>Fue,decodedTextSpanIntersectsWith:()=>PW,deduplicate:()=>Wb,defaultInitCompilerOptions:()=>Zle,defaultMaximumTruncationLength:()=>x8,diagnosticCategoryName:()=>nI,diagnosticToString:()=>bD,diagnosticsEqualityComparer:()=>AK,directoryProbablyExists:()=>B0,directorySeparator:()=>Kl,displayPart:()=>Z_,displayPartsToString:()=>Wj,disposeEmitNodes:()=>nle,documentSpansEqual:()=>Xfe,dumpTracingLegend:()=>Lxe,elementAt:()=>sm,elideNodes:()=>pIe,emitDetachedComments:()=>tDe,emitFiles:()=>ide,emitFilesAndReportErrors:()=>XQ,emitFilesAndReportErrorsAndGetExitStatus:()=>zde,emitModuleKindIsNonNodeESM:()=>KV,emitNewLineBeforeLeadingCommentOfPosition:()=>eDe,emitResolverSkipsTypeChecking:()=>tde,emitSkippedWithNoDiagnostics:()=>Cde,emptyArray:()=>w,emptyFileSystemEntries:()=>Vce,emptyMap:()=>I,emptyOptions:()=>Bg,endsWith:()=>su,ensurePathIsNonModuleName:()=>sI,ensureScriptKind:()=>qK,ensureTrailingDirectorySeparator:()=>Ad,entityNameToString:()=>bp,enumerateInsertsAndDeletes:()=>UJ,equalOwnProperties:()=>Af,equateStringsCaseInsensitive:()=>jw,equateStringsCaseSensitive:()=>NT,equateValues:()=>Hw,escapeJsxAttributeString:()=>sce,escapeLeadingUnderscores:()=>cu,escapeNonAsciiString:()=>dK,escapeSnippetText:()=>YT,escapeString:()=>Vy,escapeTemplateSubstitution:()=>nce,evaluatorResult:()=>Rd,every:()=>Ce,executeCommandLine:()=>Ztt,expandPreOrPostfixIncrementOrDecrementExpression:()=>PX,explainFiles:()=>Bde,explainIfFileIsRedirectAndImpliedFormat:()=>Wde,exportAssignmentIsAlias:()=>EV,expressionResultIsUnused:()=>QDe,extend:()=>T_,extensionFromPath:()=>i7,extensionIsTS:()=>QK,extensionsNotSupportingExtensionlessResolution:()=>KK,externalHelpersModuleNameText:()=>jk,factory:()=>G,fileContainsPackageImport:()=>Lj,fileExtensionIs:()=>Xl,fileExtensionIsOneOf:()=>Ru,fileIncludeReasonToDiagnostics:()=>jde,fileShouldUseJavaScriptRequire:()=>vhe,filter:()=>$t,filterMutate:()=>Hi,filterSemanticDiagnostics:()=>VQ,find:()=>Fe,findAncestor:()=>Qi,findBestPatternMatch:()=>ioe,findChildOfKind:()=>Uc,findComputedPropertyNameCacheAssignment:()=>WX,findConfigFile:()=>cde,findConstructorDeclaration:()=>nH,findContainingList:()=>vZ,findDiagnosticForNode:()=>OAe,findFirstNonJsxWhitespaceToken:()=>tAe,findIndex:()=>ct,findLast:()=>rt,findLastIndex:()=>Mt,findListItemInfo:()=>eAe,findModifier:()=>Y3,findNextToken:()=>yD,findPackageJson:()=>AAe,findPackageJsons:()=>dhe,findPrecedingMatchingToken:()=>xZ,findPrecedingToken:()=>xd,findSuperStatementIndexPath:()=>vQ,findTokenOnLeftOfPosition:()=>hj,findUseStrictPrologue:()=>Ale,first:()=>ya,firstDefined:()=>J,firstDefinedIterator:()=>Y,firstIterator:()=>D6,firstOrOnly:()=>phe,firstOrUndefined:()=>Ra,firstOrUndefinedIterator:()=>k_,fixupCompilerOptions:()=>Mhe,flatMap:()=>Rr,flatMapIterator:()=>$d,flatMapToMutable:()=>na,flatten:()=>Dr,flattenCommaList:()=>yIe,flattenDestructuringAssignment:()=>HI,flattenDestructuringBinding:()=>hD,flattenDiagnosticMessageText:()=>$1,forEach:()=>O,forEachAncestor:()=>z2e,forEachAncestorDirectory:()=>kg,forEachChild:()=>Uo,forEachChildRecursively:()=>QP,forEachEmittedFile:()=>Que,forEachEnclosingBlockScopeContainer:()=>rTe,forEachEntry:()=>cf,forEachExternalModuleToImportFrom:()=>She,forEachImportClauseDeclaration:()=>ATe,forEachKey:()=>qb,forEachLeadingCommentRange:()=>TW,forEachNameInAccessChainWalkingLeft:()=>CDe,forEachNameOfDefaultExport:()=>XZ,forEachPropertyAssignment:()=>G6,forEachResolvedProjectReference:()=>yde,forEachReturnStatement:()=>uS,forEachRight:()=>z,forEachTrailingCommentRange:()=>DW,forEachTsConfigPropArray:()=>sV,forEachUnique:()=>Zfe,forEachYieldExpression:()=>fTe,formatColorAndReset:()=>pD,formatDiagnostic:()=>fde,formatDiagnostics:()=>Oet,formatDiagnosticsWithColorAndContext:()=>LLe,formatGeneratedName:()=>c2,formatGeneratedNamePart:()=>L3,formatLocation:()=>hde,formatMessage:()=>DP,formatStringFromArgs:()=>jv,formatting:()=>pd,generateDjb2Hash:()=>n8,generateTSConfig:()=>zIe,getAdjustedReferenceLocation:()=>Lfe,getAdjustedRenameLocation:()=>CZ,getAliasDeclarationFromName:()=>Jae,getAllAccessorDeclarations:()=>nx,getAllDecoratorsOfClass:()=>jue,getAllDecoratorsOfClassElement:()=>CQ,getAllJSDocTags:()=>uG,getAllJSDocTagsOfKind:()=>DXe,getAllKeys:()=>vo,getAllProjectOutputs:()=>EQ,getAllSuperTypeNodes:()=>F8,getAllowJSCompilerOption:()=>ox,getAllowSyntheticDefaultImports:()=>EP,getAncestor:()=>Xk,getAnyExtensionFromPath:()=>L6,getAreDeclarationMapsEnabled:()=>MK,getAssignedExpandoInitializer:()=>dP,getAssignedName:()=>aG,getAssignmentDeclarationKind:()=>Bu,getAssignmentDeclarationPropertyAccessKind:()=>yV,getAssignmentTargetKind:()=>Kk,getAutomaticTypeDirectiveNames:()=>nQ,getBaseFileName:()=>ud,getBinaryOperatorPrecedence:()=>AV,getBuildInfo:()=>nde,getBuildInfoFileVersionMap:()=>Ide,getBuildInfoText:()=>vLe,getBuildOrderFromAnyBuildOrder:()=>nj,getBuilderCreationParameters:()=>UQ,getBuilderFileEmit:()=>Cx,getCanonicalDiagnostic:()=>lTe,getCheckFlags:()=>Iu,getClassExtendsHeritageElement:()=>qT,getClassLikeDeclarationOfSymbol:()=>Xb,getCombinedLocalAndExportSymbolFlags:()=>l3,getCombinedModifierFlags:()=>Rk,getCombinedNodeFlags:()=>zb,getCombinedNodeFlagsAlwaysIncludeJSDoc:()=>joe,getCommentRange:()=>B1,getCommonSourceDirectory:()=>X7,getCommonSourceDirectoryOfConfig:()=>oA,getCompilerOptionValue:()=>BK,getCompilerOptionsDiffValue:()=>jIe,getConditions:()=>gx,getConfigFileParsingDiagnostics:()=>mD,getConstantValue:()=>mEe,getContainerFlags:()=>wue,getContainerNode:()=>UI,getContainingClass:()=>Cf,getContainingClassExcludingClassDecorators:()=>$G,getContainingClassStaticBlock:()=>STe,getContainingFunction:()=>Up,getContainingFunctionDeclaration:()=>CTe,getContainingFunctionOrClassStaticBlock:()=>qG,getContainingNodeArray:()=>ZDe,getContainingObjectLiteralElement:()=>Vj,getContextualTypeFromParent:()=>RZ,getContextualTypeFromParentOrAncestorTypeNode:()=>bZ,getDeclarationDiagnostics:()=>hLe,getDeclarationEmitExtensionForPath:()=>_K,getDeclarationEmitOutputFilePath:()=>GTe,getDeclarationEmitOutputFilePathWorker:()=>hK,getDeclarationFileExtension:()=>Ule,getDeclarationFromName:()=>R8,getDeclarationModifierFlagsFromSymbol:()=>$m,getDeclarationOfKind:()=>ql,getDeclarationsOfKind:()=>H2e,getDeclaredExpandoInitializer:()=>A8,getDecorators:()=>$w,getDefaultCompilerOptions:()=>fY,getDefaultFormatCodeSettings:()=>uZ,getDefaultLibFileName:()=>IW,getDefaultLibFilePath:()=>v6e,getDefaultLikeExportInfo:()=>KZ,getDefaultLikeExportNameFromDeclaration:()=>mhe,getDefaultResolutionModeForFileWorker:()=>WQ,getDiagnosticText:()=>M_,getDiagnosticsWithinSpan:()=>MAe,getDirectoryPath:()=>ts,getDirectoryToWatchFailedLookupLocation:()=>Pde,getDirectoryToWatchFailedLookupLocationFromTypeRoot:()=>ePe,getDocumentPositionMapper:()=>Nhe,getDocumentSpansEqualityComparer:()=>Qfe,getESModuleInterop:()=>zv,getEditsForFileRename:()=>UAe,getEffectiveBaseTypeNode:()=>L1,getEffectiveConstraintOfTypeParameter:()=>R6,getEffectiveContainerForJSDocTemplateTag:()=>rK,getEffectiveImplementsTypeNodes:()=>i3,getEffectiveInitializer:()=>pV,getEffectiveJSDocHost:()=>Gk,getEffectiveModifierFlags:()=>jh,getEffectiveModifierFlagsAlwaysIncludeJSDoc:()=>sDe,getEffectiveModifierFlagsNoCache:()=>oDe,getEffectiveReturnTypeNode:()=>wp,getEffectiveSetAccessorTypeAnnotationNode:()=>YTe,getEffectiveTypeAnnotationNode:()=>dd,getEffectiveTypeParameterDeclarations:()=>Jw,getEffectiveTypeRoots:()=>F7,getElementOrPropertyAccessArgumentExpressionOrName:()=>nK,getElementOrPropertyAccessName:()=>$b,getElementsOfBindingOrAssignmentPattern:()=>N3,getEmitDeclarations:()=>Q_,getEmitFlags:()=>Ya,getEmitHelpers:()=>dX,getEmitModuleDetectionKind:()=>EDe,getEmitModuleFormatOfFileWorker:()=>e5,getEmitModuleKind:()=>zh,getEmitModuleResolutionKind:()=>yh,getEmitScriptTarget:()=>Ja,getEmitStandardClassFields:()=>Pce,getEnclosingBlockScopeContainer:()=>R0,getEnclosingContainer:()=>FG,getEncodedSemanticClassifications:()=>whe,getEncodedSyntacticClassifications:()=>xhe,getEndLinePosition:()=>KW,getEntityNameFromTypeNode:()=>cV,getEntrypointsFromPackageJsonInfo:()=>yue,getErrorCountForSummary:()=>GQ,getErrorSpanForNode:()=>pI,getErrorSummaryText:()=>Rde,getEscapedTextOfIdentifierOrLiteral:()=>V8,getEscapedTextOfJsxAttributeName:()=>u7,getEscapedTextOfJsxNamespacedName:()=>LP,getExpandoInitializer:()=>$k,getExportAssignmentExpression:()=>Gae,getExportInfoMap:()=>Pj,getExportNeedsImportStarHelper:()=>ONe,getExpressionAssociativity:()=>tce,getExpressionPrecedence:()=>H8,getExternalHelpersModuleName:()=>MX,getExternalModuleImportEqualsDeclarationExpression:()=>L8,getExternalModuleName:()=>fP,getExternalModuleNameFromDeclaration:()=>$Te,getExternalModuleNameFromPath:()=>cce,getExternalModuleNameLiteral:()=>XP,getExternalModuleRequireArgument:()=>Fae,getFallbackOptions:()=>XH,getFileEmitOutput:()=>OLe,getFileMatcherPatterns:()=>UK,getFileNamesFromConfigSpecs:()=>M7,getFileWatcherEventKind:()=>Eoe,getFilesInErrorForSummary:()=>KQ,getFirstConstructorWithBody:()=>Vv,getFirstIdentifier:()=>K_,getFirstNonSpaceCharacterPosition:()=>kAe,getFirstProjectOutput:()=>ede,getFixableErrorSpanExpression:()=>hhe,getFormatCodeSettingsForWriting:()=>$Z,getFullWidth:()=>GW,getFunctionFlags:()=>nd,getHeritageClause:()=>IV,getHostSignatureFromJSDoc:()=>Jk,getIdentifierAutoGenerate:()=>kQe,getIdentifierGeneratedImportReference:()=>SEe,getIdentifierTypeArguments:()=>kI,getImmediatelyInvokedFunctionExpression:()=>VT,getImpliedNodeFormatForEmitWorker:()=>jI,getImpliedNodeFormatForFile:()=>ZH,getImpliedNodeFormatForFileWorker:()=>BQ,getImportNeedsImportDefaultHelper:()=>Wue,getImportNeedsImportStarHelper:()=>gQ,getIndentString:()=>fK,getInferredLibraryNameResolveFrom:()=>FQ,getInitializedVariables:()=>K8,getInitializerOfBinaryExpression:()=>Hae,getInitializerOfBindingOrAssignmentElement:()=>CH,getInterfaceBaseTypeNodes:()=>B8,getInternalEmitFlags:()=>u0,getInvokedExpression:()=>KG,getIsFileExcluded:()=>WAe,getIsolatedModules:()=>Ag,getJSDocAugmentsTag:()=>h2e,getJSDocClassTag:()=>qoe,getJSDocCommentRanges:()=>Pae,getJSDocCommentsAndTags:()=>jae,getJSDocDeprecatedTag:()=>$oe,getJSDocDeprecatedTagNoCache:()=>b2e,getJSDocEnumTag:()=>Joe,getJSDocHost:()=>zT,getJSDocImplementsTags:()=>_2e,getJSDocOverloadTags:()=>Uae,getJSDocOverrideTagNoCache:()=>v2e,getJSDocParameterTags:()=>M6,getJSDocParameterTagsNoCache:()=>l2e,getJSDocPrivateTag:()=>wXe,getJSDocPrivateTagNoCache:()=>m2e,getJSDocProtectedTag:()=>xXe,getJSDocProtectedTagNoCache:()=>g2e,getJSDocPublicTag:()=>SXe,getJSDocPublicTagNoCache:()=>p2e,getJSDocReadonlyTag:()=>kXe,getJSDocReadonlyTagNoCache:()=>y2e,getJSDocReturnTag:()=>C2e,getJSDocReturnType:()=>MW,getJSDocRoot:()=>t3,getJSDocSatisfiesExpressionType:()=>Xce,getJSDocSatisfiesTag:()=>Goe,getJSDocTags:()=>Wk,getJSDocTemplateTag:()=>TXe,getJSDocThisTag:()=>cG,getJSDocType:()=>Bk,getJSDocTypeAliasName:()=>Rle,getJSDocTypeAssertionType:()=>N7,getJSDocTypeParameterDeclarations:()=>vK,getJSDocTypeParameterTags:()=>u2e,getJSDocTypeParameterTagsNoCache:()=>d2e,getJSDocTypeTag:()=>Fk,getJSXImplicitImportBase:()=>VK,getJSXRuntimeImport:()=>HK,getJSXTransformEnabled:()=>WK,getKeyForCompilerOptions:()=>hue,getLanguageVariant:()=>qV,getLastChild:()=>kce,getLeadingCommentRanges:()=>Av,getLeadingCommentRangesOfNode:()=>Lae,getLeftmostAccessExpression:()=>u3,getLeftmostExpression:()=>d3,getLibraryNameFromLibFileName:()=>vde,getLineAndCharacterOfPosition:()=>Ia,getLineInfo:()=>Rue,getLineOfLocalPosition:()=>j8,getLineStartPositionForPosition:()=>Wg,getLineStarts:()=>Lv,getLinesBetweenPositionAndNextNonWhitespaceCharacter:()=>yDe,getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter:()=>gDe,getLinesBetweenPositions:()=>c8,getLinesBetweenRangeEndAndRangeStart:()=>Cce,getLinesBetweenRangeEndPositions:()=>iQe,getLiteralText:()=>Q2e,getLocalNameForExternalImport:()=>I3,getLocalSymbolForExportDefault:()=>$8,getLocaleSpecificMessage:()=>Bo,getLocaleTimeString:()=>ij,getMappedContextSpan:()=>Yfe,getMappedDocumentSpan:()=>AZ,getMappedLocation:()=>u5,getMatchedFileSpec:()=>Vde,getMatchedIncludeSpec:()=>Hde,getMeaningFromDeclaration:()=>fZ,getMeaningFromLocation:()=>zI,getMembersOfDeclaration:()=>hTe,getModeForFileReference:()=>AQ,getModeForResolutionAtIndex:()=>Vet,getModeForUsageLocation:()=>pde,getModifiedTime:()=>XL,getModifiers:()=>PT,getModuleInstanceState:()=>nC,getModuleNameStringLiteralAt:()=>ej,getModuleSpecifierEndingPreference:()=>HDe,getModuleSpecifierResolverHost:()=>Ufe,getNameForExportedSymbol:()=>zZ,getNameFromImportAttribute:()=>sX,getNameFromIndexInfo:()=>sTe,getNameFromPropertyName:()=>yj,getNameOfAccessExpression:()=>Dce,getNameOfCompilerOptionValue:()=>oue,getNameOfDeclaration:()=>No,getNameOfExpando:()=>Bae,getNameOfJSDocTypedef:()=>c2e,getNameOfScriptTarget:()=>FK,getNameOrArgument:()=>gV,getNameTable:()=>s_e,getNamespaceDeclarationNode:()=>Y6,getNewLineCharacter:()=>mS,getNewLineKind:()=>Nj,getNewLineOrDefaultFromHost:()=>rC,getNewTargetContainer:()=>xTe,getNextJSDocCommentLocation:()=>zae,getNodeChildren:()=>Dle,getNodeForGeneratedName:()=>wH,getNodeId:()=>Sc,getNodeKind:()=>gD,getNodeModifiers:()=>a5,getNodeModulePathParts:()=>iX,getNonAssignedNameOfDeclaration:()=>oG,getNonAssignmentOperatorForCompoundAssignment:()=>U7,getNonAugmentationDeclaration:()=>xae,getNonDecoratorTokenPosOfNode:()=>yae,getNonIncrementalBuildInfoRoots:()=>KLe,getNonModifierTokenPosOfNode:()=>K2e,getNormalizedAbsolutePath:()=>wo,getNormalizedAbsolutePathWithoutRoot:()=>Poe,getNormalizedPathComponents:()=>SW,getObjectFlags:()=>Or,getOperatorAssociativity:()=>ice,getOperatorPrecedence:()=>PV,getOptionFromName:()=>eue,getOptionsForLibraryResolution:()=>_ue,getOptionsNameMap:()=>A3,getOrCreateEmitNode:()=>ch,getOrUpdate:()=>mp,getOriginalNode:()=>Ql,getOriginalNodeId:()=>d_,getOutputDeclarationFileName:()=>j3,getOutputDeclarationFileNameWorker:()=>Zue,getOutputExtension:()=>DQ,getOutputFileNames:()=>Pet,getOutputJSFileNameWorker:()=>Yue,getOutputPathsFor:()=>K7,getOwnEmitOutputFilePath:()=>JTe,getOwnKeys:()=>wr,getOwnValues:()=>So,getPackageJsonTypesVersionsPaths:()=>iQ,getPackageNameFromTypesPackageName:()=>H7,getPackageScopeForPath:()=>V7,getParameterSymbolFromJSDoc:()=>kV,getParentNodeInSpan:()=>bj,getParseTreeNode:()=>Mo,getParsedCommandLineOfConfigFile:()=>IH,getPathComponents:()=>af,getPathFromPathComponents:()=>sS,getPathUpdater:()=>Dhe,getPathsBasePath:()=>pK,getPatternFromSpec:()=>FDe,getPendingEmitKindWithSeen:()=>zQ,getPositionOfLineAndCharacter:()=>xW,getPossibleGenericSignatures:()=>Afe,getPossibleOriginalInputExtensionForExtension:()=>KTe,getPossibleTypeArgumentsInfo:()=>Ofe,getPreEmitDiagnostics:()=>Aet,getPrecedingNonSpaceCharacterPosition:()=>OZ,getPrivateIdentifier:()=>zue,getProperties:()=>Hue,getProperty:()=>hr,getPropertyArrayElementValue:()=>bTe,getPropertyAssignmentAliasLikeExpression:()=>VTe,getPropertyNameForPropertyNameNode:()=>CI,getPropertyNameFromType:()=>Gm,getPropertyNameOfBindingOrAssignmentElement:()=>Mle,getPropertySymbolFromBindingElement:()=>PZ,getPropertySymbolsFromContextualType:()=>_Y,getQuoteFromPreference:()=>$fe,getQuotePreference:()=>$p,getRangesWhere:()=>Ey,getRefactorContextSpan:()=>fA,getReferencedFileLocation:()=>Y7,getRegexFromPattern:()=>ax,getRegularExpressionForWildcard:()=>Y8,getRegularExpressionsForWildcards:()=>jK,getRelativePathFromDirectory:()=>c0,getRelativePathFromFile:()=>o8,getRelativePathToDirectoryOrUrl:()=>QL,getRenameLocation:()=>wj,getReplacementSpanForContextToken:()=>Bfe,getResolutionDiagnostic:()=>wde,getResolutionModeOverride:()=>z3,getResolveJsonModule:()=>XT,getResolvePackageJsonExports:()=>JV,getResolvePackageJsonImports:()=>OK,getResolvedExternalModuleName:()=>ace,getResolvedModuleFromResolution:()=>sP,getResolvedTypeReferenceDirectiveFromResolution:()=>EG,getRestIndicatorOfBindingOrAssignmentElement:()=>RX,getRestParameterElementType:()=>Aae,getRightMostAssignedExpression:()=>mV,getRootDeclaration:()=>A1,getRootDirectoryOfResolutionCache:()=>tPe,getRootLength:()=>Ly,getScriptKind:()=>nhe,getScriptKindFromFileName:()=>$K,getScriptTargetFeatures:()=>vae,getSelectedEffectiveModifierFlags:()=>bP,getSelectedSyntacticModifierFlags:()=>nDe,getSemanticClassifications:()=>VAe,getSemanticJsxChildren:()=>r3,getSetAccessorTypeAnnotationNode:()=>QTe,getSetAccessorValueParameter:()=>a3,getSetExternalModuleIndicator:()=>$V,getShebang:()=>rG,getSingleVariableOfVariableStatement:()=>pP,getSnapshotText:()=>uA,getSnippetElement:()=>rle,getSourceFileOfModule:()=>LG,getSourceFileOfNode:()=>_n,getSourceFilePathInNewDir:()=>gK,getSourceFileVersionAsHashFromText:()=>QQ,getSourceFilesToEmit:()=>mK,getSourceMapRange:()=>yS,getSourceMapper:()=>i4e,getSourceTextOfNodeFromSourceFile:()=>RT,getSpanOfTokenAtPosition:()=>E1,getSpellingSuggestion:()=>LT,getStartPositionOfLine:()=>Yw,getStartPositionOfRange:()=>G8,getStartsOnNewLine:()=>f7,getStaticPropertiesAndClassStaticBlock:()=>bQ,getStrictOptionValue:()=>ah,getStringComparer:()=>E6,getSubPatternFromSpec:()=>zK,getSuperCallFromStatement:()=>yQ,getSuperContainer:()=>oV,getSupportedCodeFixes:()=>n_e,getSupportedExtensions:()=>e7,getSupportedExtensionsWithJsonIfResolveJsonModule:()=>QV,getSwitchedType:()=>che,getSymbolId:()=>Ba,getSymbolNameForPrivateIdentifier:()=>NV,getSymbolTarget:()=>rhe,getSyntacticClassifications:()=>HAe,getSyntacticModifierFlags:()=>_S,getSyntacticModifierFlagsNoCache:()=>hce,getSynthesizedDeepClone:()=>Ec,getSynthesizedDeepCloneWithReplacements:()=>Sj,getSynthesizedDeepClones:()=>vD,getSynthesizedDeepClonesWithReplacements:()=>she,getSyntheticLeadingComments:()=>y3,getSyntheticTrailingComments:()=>cH,getTargetLabel:()=>pZ,getTargetOfBindingOrAssignmentElement:()=>px,getTemporaryModuleResolutionState:()=>W7,getTextOfConstantValue:()=>Z2e,getTextOfIdentifierOrLiteral:()=>Lg,getTextOfJSDocComment:()=>RW,getTextOfJsxAttributeName:()=>iH,getTextOfJsxNamespacedName:()=>d7,getTextOfNode:()=>uu,getTextOfNodeFromSourceText:()=>T8,getTextOfPropertyName:()=>lP,getThisContainer:()=>Hh,getThisParameter:()=>$T,getTokenAtPosition:()=>Rs,getTokenPosOfNode:()=>ex,getTokenSourceMapRange:()=>wQe,getTouchingPropertyName:()=>R_,getTouchingToken:()=>Q3,getTrailingCommentRanges:()=>qw,getTrailingSemicolonDeferringWriter:()=>oce,getTransformers:()=>mLe,getTsBuildInfoEmitOutputFilePath:()=>h2,getTsConfigObjectLiteralExpression:()=>I8,getTsConfigPropArrayElementValue:()=>UG,getTypeAnnotationNode:()=>ZTe,getTypeArgumentOrTypeParameterList:()=>cAe,getTypeKeywordOfTypeOnlyImport:()=>Kfe,getTypeNode:()=>bEe,getTypeNodeIfAccessible:()=>p5,getTypeParameterFromJsDoc:()=>OTe,getTypeParameterOwner:()=>yXe,getTypesPackageName:()=>uQ,getUILocale:()=>hxe,getUniqueName:()=>$I,getUniqueSymbolId:()=>xAe,getUseDefineForClassFields:()=>GV,getWatchErrorSummaryDiagnosticMessage:()=>Mde,getWatchFactory:()=>ade,group:()=>qs,groupBy:()=>ra,guessIndentation:()=>W2e,handleNoEmitOptions:()=>Sde,handleWatchOptionsConfigDirTemplateSubstitution:()=>QX,hasAbstractModifier:()=>KT,hasAccessorModifier:()=>O1,hasAmbientModifier:()=>fce,hasChangesInResolutions:()=>pae,hasContextSensitiveParameters:()=>eX,hasDecorators:()=>lm,hasDocComment:()=>oAe,hasDynamicName:()=>Jb,hasEffectiveModifier:()=>xp,hasEffectiveModifiers:()=>dce,hasEffectiveReadonlyModifier:()=>z8,hasExtension:()=>N6,hasImplementationTSFileExtension:()=>WDe,hasIndexSignature:()=>ahe,hasInferredType:()=>aEe,hasInitializer:()=>aS,hasInvalidEscape:()=>rce,hasJSDocNodes:()=>jp,hasJSDocParameterTags:()=>f2e,hasJSFileExtension:()=>Uv,hasJsonModuleEmitEnabled:()=>RK,hasOnlyExpressionInitializer:()=>hI,hasOverrideModifier:()=>bK,hasPossibleExternalModuleReference:()=>nTe,hasProperty:()=>Li,hasPropertyAccessExpressionWithName:()=>lj,hasQuestionToken:()=>_P,hasRecordedExternalHelpers:()=>oIe,hasResolutionModeOverride:()=>nEe,hasRestParameter:()=>uae,hasScopeMarker:()=>L2e,hasStaticModifier:()=>bd,hasSyntacticModifier:()=>Zr,hasSyntacticModifiers:()=>iDe,hasTSFileExtension:()=>IP,hasTabstop:()=>eEe,hasTrailingDirectorySeparator:()=>Uw,hasType:()=>wG,hasTypeArguments:()=>$Xe,hasZeroOrOneAsteriskCharacter:()=>Ace,hostGetCanonicalFileName:()=>hS,hostUsesCaseSensitiveFileNames:()=>yP,idText:()=>Fr,identifierIsThisKeyword:()=>uce,identifierToKeywordKind:()=>aI,identity:()=>hl,identitySourceMapConsumer:()=>Bue,ignoreSourceNewlines:()=>ole,ignoredPaths:()=>XJ,importFromModuleSpecifier:()=>O8,importSyntaxAffectsModuleResolution:()=>Lce,indexOfAnyCharCode:()=>Bi,indexOfNode:()=>U6,indicesOf:()=>Nk,inferredTypesContainingFile:()=>Z7,injectClassNamedEvaluationHelperBlockIfMissing:()=>xQ,injectClassThisAssignmentIfMissing:()=>jNe,insertImports:()=>Gfe,insertSorted:()=>rm,insertStatementAfterCustomPrologue:()=>_I,insertStatementAfterStandardPrologue:()=>WXe,insertStatementsAfterCustomPrologue:()=>mae,insertStatementsAfterStandardPrologue:()=>Fv,intersperse:()=>ye,intrinsicTagNameToString:()=>Qce,introducesArgumentsExoticObject:()=>gTe,inverseJsxOptionMap:()=>DH,isAbstractConstructorSymbol:()=>vDe,isAbstractModifier:()=>PEe,isAccessExpression:()=>Sl,isAccessibilityModifier:()=>Rfe,isAccessor:()=>Qw,isAccessorModifier:()=>OEe,isAliasableExpression:()=>sK,isAmbientModule:()=>Vh,isAmbientPropertyDeclaration:()=>Tae,isAnyDirectorySeparator:()=>Ioe,isAnyImportOrBareOrAccessedRequire:()=>tTe,isAnyImportOrReExport:()=>ZW,isAnyImportOrRequireStatement:()=>iTe,isAnyImportSyntax:()=>cP,isAnySupportedFileExtension:()=>pQe,isApplicableVersionedTypesKey:()=>RH,isArgumentExpressionOfElementAccess:()=>xfe,isArray:()=>Ao,isArrayBindingElement:()=>gG,isArrayBindingOrAssignmentElement:()=>jW,isArrayBindingOrAssignmentPattern:()=>rae,isArrayBindingPattern:()=>CS,isArrayLiteralExpression:()=>jf,isArrayLiteralOrObjectLiteralDestructuringPattern:()=>TS,isArrayTypeNode:()=>hH,isArrowFunction:()=>xl,isAsExpression:()=>v7,isAssertClause:()=>VEe,isAssertEntry:()=>OQe,isAssertionExpression:()=>Hk,isAssertsKeyword:()=>NEe,isAssignmentDeclaration:()=>P8,isAssignmentExpression:()=>lf,isAssignmentOperator:()=>Gb,isAssignmentPattern:()=>S8,isAssignmentTarget:()=>fS,isAsteriskToken:()=>uH,isAsyncFunction:()=>W8,isAsyncModifier:()=>m7,isAutoAccessorPropertyDeclaration:()=>I_,isAwaitExpression:()=>hx,isAwaitKeyword:()=>dle,isBigIntLiteral:()=>p7,isBinaryExpression:()=>ur,isBinaryLogicalOperator:()=>BV,isBinaryOperatorToken:()=>_Ie,isBindableObjectDefinePropertyCall:()=>vI,isBindableStaticAccessExpression:()=>jT,isBindableStaticElementAccessExpression:()=>iK,isBindableStaticNameExpression:()=>bI,isBindingElement:()=>ec,isBindingElementOfBareOrAccessedRequire:()=>DTe,isBindingName:()=>dI,isBindingOrAssignmentElement:()=>D2e,isBindingOrAssignmentPattern:()=>VW,isBindingPattern:()=>ta,isBlock:()=>Xo,isBlockLike:()=>hA,isBlockOrCatchScoped:()=>bae,isBlockScope:()=>Dae,isBlockScopedContainerTopLevel:()=>eTe,isBooleanLiteral:()=>C8,isBreakOrContinueStatement:()=>m8,isBreakStatement:()=>LQe,isBuild:()=>wPe,isBuildInfoFile:()=>gLe,isBuilderProgram:()=>Fde,isBundle:()=>UEe,isCallChain:()=>cI,isCallExpression:()=>la,isCallExpressionTarget:()=>yfe,isCallLikeExpression:()=>MT,isCallLikeOrFunctionLikeExpression:()=>sae,isCallOrNewExpression:()=>T1,isCallOrNewExpressionTarget:()=>vfe,isCallSignatureDeclaration:()=>VP,isCallToHelper:()=>_7,isCaseBlock:()=>w7,isCaseClause:()=>x3,isCaseKeyword:()=>MEe,isCaseOrDefaultClause:()=>CG,isCatchClause:()=>lD,isCatchClauseVariableDeclaration:()=>YDe,isCatchClauseVariableDeclarationOrBindingElement:()=>Cae,isCheckJsEnabledForFile:()=>n7,isCircularBuildOrder:()=>cA,isClassDeclaration:()=>hd,isClassElement:()=>Od,isClassExpression:()=>fd,isClassInstanceProperty:()=>k2e,isClassLike:()=>ss,isClassMemberModifier:()=>tae,isClassNamedEvaluationHelperBlock:()=>sA,isClassOrTypeElement:()=>mG,isClassStaticBlockDeclaration:()=>gu,isClassThisAssignmentBlock:()=>$7,isColonToken:()=>EEe,isCommaExpression:()=>vH,isCommaListExpression:()=>C7,isCommaSequence:()=>I7,isCommaToken:()=>DEe,isComment:()=>kZ,isCommonJsExportPropertyAssignment:()=>jG,isCommonJsExportedExpression:()=>pTe,isCompoundAssignment:()=>z7,isComputedNonLiteralName:()=>YW,isComputedPropertyName:()=>Ka,isConciseBody:()=>vG,isConditionalExpression:()=>qP,isConditionalTypeNode:()=>iD,isConstAssertion:()=>Zce,isConstTypeReference:()=>O0,isConstructSignatureDeclaration:()=>fH,isConstructorDeclaration:()=>iu,isConstructorTypeNode:()=>v3,isContextualKeyword:()=>aK,isContinueStatement:()=>NQe,isCustomPrologue:()=>rV,isDebuggerStatement:()=>PQe,isDeclaration:()=>Wf,isDeclarationBindingElement:()=>WW,isDeclarationFileName:()=>df,isDeclarationName:()=>Wy,isDeclarationNameOfEnumOrNamespace:()=>Sce,isDeclarationReadonly:()=>tV,isDeclarationStatement:()=>M2e,isDeclarationWithTypeParameterChildren:()=>Iae,isDeclarationWithTypeParameters:()=>Eae,isDecorator:()=>Fd,isDecoratorTarget:()=>KPe,isDefaultClause:()=>k7,isDefaultImport:()=>hP,isDefaultModifier:()=>yX,isDefaultedExpandoInitializer:()=>ETe,isDeleteExpression:()=>FEe,isDeleteTarget:()=>$ae,isDeprecatedDeclaration:()=>UZ,isDestructuringAssignment:()=>pS,isDiskPathRoot:()=>Noe,isDoStatement:()=>IQe,isDocumentRegistryEntry:()=>Aj,isDotDotDotToken:()=>mX,isDottedName:()=>VV,isDynamicName:()=>lK,isEffectiveExternalModule:()=>aP,isEffectiveStrictModeSourceFile:()=>kae,isElementAccessChain:()=>Koe,isElementAccessExpression:()=>wl,isEmittedFileOfProgram:()=>xLe,isEmptyArrayLiteral:()=>uDe,isEmptyBindingElement:()=>s2e,isEmptyBindingPattern:()=>r2e,isEmptyObjectLiteral:()=>yce,isEmptyStatement:()=>mle,isEmptyStringLiteral:()=>Rae,isEntityName:()=>E_,isEntityNameExpression:()=>pl,isEnumConst:()=>Uk,isEnumDeclaration:()=>sD,isEnumMember:()=>SS,isEqualityOperatorKind:()=>FZ,isEqualsGreaterThanToken:()=>IEe,isExclamationToken:()=>dH,isExcludedFile:()=>qIe,isExclusivelyTypeOnlyImportOrExport:()=>_de,isExpandoPropertyDeclaration:()=>PP,isExportAssignment:()=>Il,isExportDeclaration:()=>Ju,isExportModifier:()=>BP,isExportName:()=>AX,isExportNamespaceAsDefaultDeclaration:()=>OG,isExportOrDefaultModifier:()=>SH,isExportSpecifier:()=>vh,isExportsIdentifier:()=>yI,isExportsOrModuleExportsOrAlias:()=>dD,isExpression:()=>jt,isExpressionNode:()=>F0,isExpressionOfExternalModuleImportEqualsDeclaration:()=>ZPe,isExpressionOfOptionalChainRoot:()=>fG,isExpressionStatement:()=>uf,isExpressionWithTypeArguments:()=>Yb,isExpressionWithTypeArgumentsInClassExtendsClause:()=>SK,isExternalModule:()=>wd,isExternalModuleAugmentation:()=>BT,isExternalModuleImportEqualsDeclaration:()=>qk,isExternalModuleIndicator:()=>UW,isExternalModuleNameRelative:()=>Gd,isExternalModuleReference:()=>eC,isExternalModuleSymbol:()=>H6,isExternalOrCommonJsModule:()=>Cp,isFileLevelReservedGeneratedIdentifier:()=>BW,isFileLevelUniqueName:()=>PG,isFileProbablyExternalModule:()=>kH,isFirstDeclarationOfSymbolParameter:()=>ehe,isFixablePromiseHandler:()=>Ahe,isForInOrOfStatement:()=>fI,isForInStatement:()=>xX,isForInitializer:()=>Hm,isForOfStatement:()=>_H,isForStatement:()=>s2,isFullSourceFile:()=>Fy,isFunctionBlock:()=>WT,isFunctionBody:()=>aae,isFunctionDeclaration:()=>Wu,isFunctionExpression:()=>ml,isFunctionExpressionOrArrowFunction:()=>lx,isFunctionLike:()=>Ho,isFunctionLikeDeclaration:()=>Qc,isFunctionLikeKind:()=>tP,isFunctionLikeOrClassStaticBlockDeclaration:()=>B6,isFunctionOrConstructorTypeNode:()=>T2e,isFunctionOrModuleBlock:()=>iae,isFunctionSymbol:()=>LTe,isFunctionTypeNode:()=>Hy,isGeneratedIdentifier:()=>zl,isGeneratedPrivateIdentifier:()=>uI,isGetAccessor:()=>oS,isGetAccessorDeclaration:()=>um,isGetOrSetAccessorDeclaration:()=>FW,isGlobalScopeAugmentation:()=>Ry,isGlobalSourceFile:()=>cS,isGrammarError:()=>J2e,isHeritageClause:()=>Tp,isHoistedFunction:()=>VG,isHoistedVariableStatement:()=>HG,isIdentifier:()=>ot,isIdentifierANonContextualKeyword:()=>Qae,isIdentifierName:()=>WTe,isIdentifierOrThisTypeNode:()=>uIe,isIdentifierPart:()=>jb,isIdentifierStart:()=>Py,isIdentifierText:()=>J_,isIdentifierTypePredicate:()=>yTe,isIdentifierTypeReference:()=>GDe,isIfStatement:()=>r2,isIgnoredFileFromWildCardWatching:()=>KH,isImplicitGlob:()=>Rce,isImportAttribute:()=>HEe,isImportAttributeName:()=>x2e,isImportAttributes:()=>LI,isImportCall:()=>zp,isImportClause:()=>H0,isImportDeclaration:()=>du,isImportEqualsDeclaration:()=>Wd,isImportKeyword:()=>y7,isImportMeta:()=>J6,isImportOrExportSpecifier:()=>Vk,isImportOrExportSpecifierName:()=>wAe,isImportSpecifier:()=>l_,isImportTypeAssertionContainer:()=>AQe,isImportTypeNode:()=>V1,isImportableFile:()=>Che,isInComment:()=>kS,isInCompoundLikeAssignment:()=>qae,isInExpressionContext:()=>XG,isInJSDoc:()=>dV,isInJSFile:()=>nr,isInJSXText:()=>sAe,isInJsonFile:()=>ZG,isInNonReferenceComment:()=>dAe,isInReferenceComment:()=>uAe,isInRightSideOfInternalImportEqualsDeclaration:()=>hZ,isInString:()=>lA,isInTemplateString:()=>Pfe,isInTopLevelContext:()=>JG,isInTypeQuery:()=>vP,isIncrementalBuildInfo:()=>tj,isIncrementalBundleEmitBuildInfo:()=>zLe,isIncrementalCompilation:()=>QT,isIndexSignatureDeclaration:()=>eD,isIndexedAccessTypeNode:()=>nD,isInferTypeNode:()=>DI,isInfinityOrNaNString:()=>c7,isInitializedProperty:()=>HH,isInitializedVariable:()=>UV,isInsideJsxElement:()=>wZ,isInsideJsxElementOrAttribute:()=>rAe,isInsideNodeModules:()=>Dj,isInsideTemplateLiteral:()=>pj,isInstanceOfExpression:()=>wK,isInstantiatedModule:()=>Pue,isInterfaceDeclaration:()=>zf,isInternalDeclaration:()=>V2e,isInternalModuleImportEqualsDeclaration:()=>gI,isInternalName:()=>Ple,isIntersectionTypeNode:()=>zP,isIntrinsicJsxName:()=>s3,isIterationStatement:()=>Zw,isJSDoc:()=>z0,isJSDocAllType:()=>JEe,isJSDocAugmentsTag:()=>KP,isJSDocAuthorTag:()=>BQe,isJSDocCallbackTag:()=>ble,isJSDocClassTag:()=>KEe,isJSDocCommentContainingNode:()=>SG,isJSDocConstructSignature:()=>e3,isJSDocDeprecatedTag:()=>kle,isJSDocEnumTag:()=>mH,isJSDocFunctionType:()=>T3,isJSDocImplementsTag:()=>NX,isJSDocImportTag:()=>q1,isJSDocIndexSignature:()=>eK,isJSDocLikeText:()=>Hle,isJSDocLink:()=>qEe,isJSDocLinkCode:()=>$Ee,isJSDocLinkLike:()=>rP,isJSDocLinkPlain:()=>RQe,isJSDocMemberName:()=>a2,isJSDocNameReference:()=>T7,isJSDocNamepathType:()=>FQe,isJSDocNamespaceBody:()=>PXe,isJSDocNode:()=>W6,isJSDocNonNullableType:()=>TX,isJSDocNullableType:()=>k3,isJSDocOptionalParameter:()=>nX,isJSDocOptionalType:()=>vle,isJSDocOverloadTag:()=>D3,isJSDocOverrideTag:()=>EX,isJSDocParameterTag:()=>Qm,isJSDocPrivateTag:()=>Sle,isJSDocPropertyLikeTag:()=>g8,isJSDocPropertyTag:()=>XEe,isJSDocProtectedTag:()=>wle,isJSDocPublicTag:()=>Cle,isJSDocReadonlyTag:()=>xle,isJSDocReturnTag:()=>IX,isJSDocSatisfiesExpression:()=>Kce,isJSDocSatisfiesTag:()=>LX,isJSDocSeeTag:()=>WQe,isJSDocSignature:()=>tC,isJSDocTag:()=>V6,isJSDocTemplateTag:()=>Rg,isJSDocThisTag:()=>Tle,isJSDocThrowsTag:()=>HQe,isJSDocTypeAlias:()=>Ng,isJSDocTypeAssertion:()=>FI,isJSDocTypeExpression:()=>o2,isJSDocTypeLiteral:()=>OI,isJSDocTypeTag:()=>D7,isJSDocTypedefTag:()=>MI,isJSDocUnknownTag:()=>VQe,isJSDocUnknownType:()=>GEe,isJSDocVariadicType:()=>DX,isJSXTagName:()=>X6,isJsonEqual:()=>ZK,isJsonSourceFile:()=>Eg,isJsxAttribute:()=>U1,isJsxAttributeLike:()=>bG,isJsxAttributeName:()=>iEe,isJsxAttributes:()=>cD,isJsxChild:()=>JW,isJsxClosingElement:()=>oD,isJsxClosingFragment:()=>zEe,isJsxElement:()=>Gv,isJsxExpression:()=>x7,isJsxFragment:()=>aD,isJsxNamespacedName:()=>j0,isJsxOpeningElement:()=>z1,isJsxOpeningFragment:()=>AI,isJsxOpeningLikeElement:()=>oh,isJsxOpeningLikeElementTagName:()=>XPe,isJsxSelfClosingElement:()=>PI,isJsxSpreadAttribute:()=>GP,isJsxTagNameExpression:()=>w8,isJsxText:()=>RP,isJumpStatementTarget:()=>uj,isKeyword:()=>P_,isKeywordOrPunctuation:()=>oK,isKnownSymbol:()=>LV,isLabelName:()=>Sfe,isLabelOfLabeledStatement:()=>Cfe,isLabeledStatement:()=>_x,isLateVisibilityPaintedStatement:()=>RG,isLeftHandSideExpression:()=>N_,isLet:()=>WG,isLineBreak:()=>mh,isLiteralComputedPropertyDeclarationName:()=>DV,isLiteralExpression:()=>lI,isLiteralExpressionOfObject:()=>Yoe,isLiteralImportTypeNode:()=>lS,isLiteralKind:()=>y8,isLiteralNameOfPropertyDeclarationOrIndexAccess:()=>mZ,isLiteralTypeLiteral:()=>N2e,isLiteralTypeNode:()=>bS,isLocalName:()=>iC,isLogicalOperator:()=>aDe,isLogicalOrCoalescingAssignmentExpression:()=>_ce,isLogicalOrCoalescingAssignmentOperator:()=>U8,isLogicalOrCoalescingBinaryExpression:()=>WV,isLogicalOrCoalescingBinaryOperator:()=>CK,isMappedTypeNode:()=>II,isMemberName:()=>Mv,isMetaProperty:()=>b7,isMethodDeclaration:()=>Nu,isMethodOrAccessor:()=>iP,isMethodSignature:()=>W1,isMinusToken:()=>ule,isMissingDeclaration:()=>MQe,isMissingPackageJsonInfo:()=>nNe,isModifier:()=>Fa,isModifierKind:()=>Xw,isModifierLike:()=>Ul,isModuleAugmentationExternal:()=>wae,isModuleBlock:()=>H1,isModuleBody:()=>P2e,isModuleDeclaration:()=>rd,isModuleExportName:()=>kX,isModuleExportsAccessExpression:()=>Wv,isModuleIdentifier:()=>Wae,isModuleName:()=>hIe,isModuleOrEnumDeclaration:()=>qW,isModuleReference:()=>F2e,isModuleSpecifierLike:()=>LZ,isModuleWithStringLiteralName:()=>MG,isNameOfFunctionDeclaration:()=>Tfe,isNameOfModuleDeclaration:()=>kfe,isNamedDeclaration:()=>Bf,isNamedEvaluation:()=>Sp,isNamedEvaluationSource:()=>Zae,isNamedExportBindings:()=>Qoe,isNamedExports:()=>Xm,isNamedImportBindings:()=>cae,isNamedImports:()=>j1,isNamedImportsOrExports:()=>NK,isNamedTupleMember:()=>b3,isNamespaceBody:()=>LXe,isNamespaceExport:()=>jy,isNamespaceExportDeclaration:()=>pH,isNamespaceImport:()=>Jv,isNamespaceReexportDeclaration:()=>TTe,isNewExpression:()=>rD,isNewExpressionTarget:()=>r5,isNoSubstitutionTemplateLiteral:()=>TI,isNodeArray:()=>AT,isNodeArrayMultiLine:()=>mDe,isNodeDescendantOf:()=>UT,isNodeKind:()=>_G,isNodeLikeSystem:()=>soe,isNodeModulesDirectory:()=>eG,isNodeWithPossibleHoistedDeclaration:()=>FTe,isNonContextualKeyword:()=>Xae,isNonGlobalAmbientModule:()=>Sae,isNonNullAccess:()=>tEe,isNonNullChain:()=>hG,isNonNullExpression:()=>$P,isNonStaticMethodOrAccessorWithPrivateName:()=>MNe,isNotEmittedStatement:()=>jEe,isNullishCoalesce:()=>Xoe,isNumber:()=>Ww,isNumericLiteral:()=>A_,isNumericLiteralName:()=>$v,isObjectBindingElementWithoutPropertyName:()=>vj,isObjectBindingOrAssignmentElement:()=>HW,isObjectBindingOrAssignmentPattern:()=>nae,isObjectBindingPattern:()=>dm,isObjectLiteralElement:()=>lae,isObjectLiteralElementLike:()=>Ub,isObjectLiteralExpression:()=>Aa,isObjectLiteralMethod:()=>Ig,isObjectLiteralOrClassExpressionMethodOrAccessor:()=>zG,isObjectTypeDeclaration:()=>xP,isOmittedExpression:()=>Bd,isOptionalChain:()=>gh,isOptionalChainRoot:()=>_8,isOptionalDeclaration:()=>g3,isOptionalJSDocPropertyLikeTag:()=>tH,isOptionalTypeNode:()=>vX,isOuterExpression:()=>OX,isOutermostOptionalChain:()=>p8,isOverrideModifier:()=>AEe,isPackageJsonInfo:()=>rQ,isPackedArrayLiteral:()=>Jce,isParameter:()=>$s,isParameterPropertyDeclaration:()=>vp,isParameterPropertyModifier:()=>b8,isParenthesizedExpression:()=>c_,isParenthesizedTypeNode:()=>EI,isParseTreeNode:()=>h8,isPartOfParameterDeclaration:()=>Qk,isPartOfTypeNode:()=>N1,isPartOfTypeQuery:()=>QG,isPartiallyEmittedExpression:()=>ple,isPatternMatch:()=>HJ,isPinnedComment:()=>AG,isPlainJsFile:()=>k8,isPlusToken:()=>lle,isPossiblyTypeArgumentPosition:()=>_j,isPostfixUnaryExpression:()=>_le,isPrefixUnaryExpression:()=>n2,isPrimitiveLiteralValue:()=>oX,isPrivateIdentifier:()=>Vs,isPrivateIdentifierClassElementDeclaration:()=>Wh,isPrivateIdentifierPropertyAccessExpression:()=>F6,isPrivateIdentifierSymbol:()=>jTe,isProgramUptoDate:()=>bde,isPrologueDirective:()=>I1,isPropertyAccessChain:()=>dG,isPropertyAccessEntityNameExpression:()=>HV,isPropertyAccessExpression:()=>Nr,isPropertyAccessOrQualifiedName:()=>zW,isPropertyAccessOrQualifiedNameOrImportTypeNode:()=>E2e,isPropertyAssignment:()=>_d,isPropertyDeclaration:()=>Lo,isPropertyName:()=>id,isPropertyNameLiteral:()=>P1,isPropertySignature:()=>O_,isPrototypeAccess:()=>rx,isPrototypePropertyAssignment:()=>vV,isPunctuation:()=>Kae,isPushOrUnshiftIdentifier:()=>Yae,isQualifiedName:()=>o_,isQuestionDotToken:()=>gX,isQuestionOrExclamationToken:()=>lIe,isQuestionOrPlusOrMinusToken:()=>fIe,isQuestionToken:()=>dx,isReadonlyKeyword:()=>LEe,isReadonlyKeywordOrPlusOrMinusToken:()=>dIe,isRecognizedTripleSlashComment:()=>gae,isReferenceFileLocation:()=>U3,isReferencedFile:()=>_2,isRegularExpressionLiteral:()=>ale,isRequireCall:()=>L_,isRequireVariableStatement:()=>hV,isRestParameter:()=>Oy,isRestTypeNode:()=>bX,isReturnStatement:()=>Og,isReturnStatementWithFixablePromiseHandler:()=>ZZ,isRightSideOfAccessExpression:()=>gce,isRightSideOfInstanceofExpression:()=>lDe,isRightSideOfPropertyAccess:()=>K3,isRightSideOfQualifiedName:()=>QPe,isRightSideOfQualifiedNameOrPropertyAccess:()=>q8,isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName:()=>cDe,isRootedDiskPath:()=>yp,isSameEntityName:()=>Q6,isSatisfiesExpression:()=>wX,isSemicolonClassElement:()=>BEe,isSetAccessor:()=>D1,isSetAccessorDeclaration:()=>kp,isShiftOperatorOrHigher:()=>Ble,isShorthandAmbientModuleSymbol:()=>QW,isShorthandPropertyAssignment:()=>lh,isSideEffectImport:()=>ele,isSignedNumericLiteral:()=>cK,isSimpleCopiableExpression:()=>fD,isSimpleInlineableExpression:()=>Uy,isSimpleParameterList:()=>jH,isSingleOrDoubleQuote:()=>_V,isSourceElement:()=>rEe,isSourceFile:()=>Os,isSourceFileFromLibrary:()=>rO,isSourceFileJS:()=>r_,isSourceFileNotJson:()=>YG,isSourceMapping:()=>PNe,isSpecialPropertyDeclaration:()=>NTe,isSpreadAssignment:()=>Kv,isSpreadElement:()=>Km,isStatement:()=>Ps,isStatementButNotDeclaration:()=>$W,isStatementOrBlock:()=>R2e,isStatementWithLocals:()=>$2e,isStatic:()=>pa,isStaticModifier:()=>WP,isString:()=>Oo,isStringANonContextualKeyword:()=>gP,isStringAndEmptyAnonymousObjectIntersection:()=>lAe,isStringDoubleQuoted:()=>tK,isStringLiteral:()=>Ha,isStringLiteralLike:()=>Bc,isStringLiteralOrJsxExpression:()=>B2e,isStringLiteralOrTemplate:()=>IAe,isStringOrNumericLiteralLike:()=>cm,isStringOrRegularExpressionOrTemplateLiteral:()=>Mfe,isStringTextContainingNode:()=>eae,isSuperCall:()=>mI,isSuperKeyword:()=>g7,isSuperProperty:()=>G_,isSupportedSourceFileName:()=>jDe,isSwitchStatement:()=>S7,isSyntaxList:()=>E3,isSyntheticExpression:()=>EQe,isSyntheticReference:()=>JP,isTagName:()=>wfe,isTaggedTemplateExpression:()=>i2,isTaggedTemplateTag:()=>GPe,isTemplateExpression:()=>CX,isTemplateHead:()=>FP,isTemplateLiteral:()=>nP,isTemplateLiteralKind:()=>Gw,isTemplateLiteralToken:()=>S2e,isTemplateLiteralTypeNode:()=>REe,isTemplateLiteralTypeSpan:()=>fle,isTemplateMiddle:()=>cle,isTemplateMiddleOrTemplateTail:()=>pG,isTemplateSpan:()=>w3,isTemplateTail:()=>pX,isTextWhiteSpaceLike:()=>pAe,isThis:()=>X3,isThisContainerOrFunctionBlock:()=>wTe,isThisIdentifier:()=>ix,isThisInTypeQuery:()=>GT,isThisInitializedDeclaration:()=>GG,isThisInitializedObjectBindingExpression:()=>kTe,isThisProperty:()=>aV,isThisTypeNode:()=>C3,isThisTypeParameter:()=>l7,isThisTypePredicate:()=>vTe,isThrowStatement:()=>yle,isToken:()=>eP,isTokenKind:()=>Zoe,isTraceEnabled:()=>mx,isTransientSymbol:()=>Rv,isTrivia:()=>n3,isTryStatement:()=>NI,isTupleTypeNode:()=>jP,isTypeAlias:()=>SV,isTypeAliasDeclaration:()=>Mg,isTypeAssertionExpression:()=>hle,isTypeDeclaration:()=>NP,isTypeElement:()=>OT,isTypeKeyword:()=>c5,isTypeKeywordTokenOrIdentifier:()=>EZ,isTypeLiteralNode:()=>a_,isTypeNode:()=>ws,isTypeNodeKind:()=>Tce,isTypeOfExpression:()=>S3,isTypeOnlyExportDeclaration:()=>w2e,isTypeOnlyImportDeclaration:()=>v8,isTypeOnlyImportOrExportDeclaration:()=>Kw,isTypeOperatorNode:()=>t2,isTypeParameterDeclaration:()=>$l,isTypePredicateNode:()=>HP,isTypeQueryNode:()=>tD,isTypeReferenceNode:()=>qp,isTypeReferenceType:()=>xG,isTypeUsableAsPropertyName:()=>Jm,isUMDExportSymbol:()=>IK,isUnaryExpression:()=>oae,isUnaryExpressionWithWrite:()=>I2e,isUnicodeIdentifierStart:()=>iG,isUnionTypeNode:()=>fx,isUrl:()=>Bke,isValidBigIntString:()=>YK,isValidESSymbolDeclaration:()=>mTe,isValidTypeOnlyAliasUseSite:()=>Yk,isValueSignatureDeclaration:()=>mP,isVarAwaitUsing:()=>iV,isVarConst:()=>$6,isVarConstLike:()=>dTe,isVarUsing:()=>nV,isVariableDeclaration:()=>_s,isVariableDeclarationInVariableStatement:()=>E8,isVariableDeclarationInitializedToBareOrAccessedRequire:()=>HT,isVariableDeclarationInitializedToRequire:()=>fV,isVariableDeclarationList:()=>Sf,isVariableLike:()=>uP,isVariableLikeOrAccessor:()=>_Te,isVariableStatement:()=>Lu,isVoidExpression:()=>UP,isWatchSet:()=>wce,isWhileStatement:()=>gle,isWhiteSpaceLike:()=>Pv,isWhiteSpaceSingleLine:()=>k1,isWithStatement:()=>WEe,isWriteAccess:()=>wP,isWriteOnlyAccess:()=>EK,isYieldExpression:()=>SX,jsxModeNeedsExplicitImport:()=>yhe,keywordPart:()=>Np,last:()=>va,lastOrUndefined:()=>rl,length:()=>P,libMap:()=>Jle,libs:()=>HX,lineBreakPart:()=>tO,loadModuleFromGlobalCache:()=>pNe,loadWithModeAwareCache:()=>QH,makeIdentifierFromModuleName:()=>Y2e,makeImport:()=>Sx,makeStringLiteral:()=>l5,mangleScopedPackageName:()=>B3,map:()=>qt,mapAllOrFail:()=>jl,mapDefined:()=>es,mapDefinedIterator:()=>ld,mapEntries:()=>Nv,mapIterator:()=>ms,mapOneOrMany:()=>_he,mapToDisplayParts:()=>m2,matchFiles:()=>Fce,matchPatternOrExact:()=>Hce,matchedText:()=>yxe,matchesExclude:()=>eQ,maxBy:()=>Qse,maybeBind:()=>to,maybeSetLocalizedDiagnosticMessages:()=>kDe,memoize:()=>Bh,memoizeOne:()=>x1,min:()=>Zse,minAndMax:()=>qDe,missingFileModifiedTime:()=>gp,modifierToFlag:()=>CP,modifiersToFlags:()=>M1,moduleExportNameIsDefault:()=>My,moduleExportNameTextEscaped:()=>FT,moduleExportNameTextUnescaped:()=>tx,moduleOptionDeclaration:()=>kIe,moduleResolutionIsEqualTo:()=>U2e,moduleResolutionNameAndModeGetter:()=>OQ,moduleResolutionOptionDeclarations:()=>Kle,moduleResolutionSupportsPackageJsonExportsAndImports:()=>f3,moduleResolutionUsesNodeModules:()=>IZ,moduleSpecifierToValidIdentifier:()=>Ij,moduleSpecifiers:()=>wS,moduleSymbolToValidIdentifier:()=>Ej,moveEmitHelpers:()=>yEe,moveRangeEnd:()=>TK,moveRangePastDecorators:()=>Kb,moveRangePastModifiers:()=>R1,moveRangePos:()=>Zk,moveSyntheticComments:()=>pEe,mutateMap:()=>Q8,mutateMapSkippingNewValues:()=>Hv,needsParentheses:()=>MZ,needsScopeMarker:()=>yG,newCaseClauseTracker:()=>JZ,newPrivateEnvironment:()=>FNe,noEmitNotification:()=>qH,noEmitSubstitution:()=>G7,noTransformers:()=>pLe,noTruncationMaximumTruncationLength:()=>fae,nodeCanBeDecorated:()=>lV,nodeHasName:()=>OW,nodeIsDecorated:()=>K6,nodeIsMissing:()=>lu,nodeIsPresent:()=>Dg,nodeIsSynthesized:()=>cl,nodeModuleNameResolver:()=>cNe,nodeModulesPathPart:()=>Xv,nodeNextJsonConfigResolver:()=>lNe,nodeOrChildIsDecorated:()=>uV,nodeOverlapsWithStartEnd:()=>gZ,nodePosToString:()=>MXe,nodeSeenTracker:()=>Z3,nodeStartsNewLexicalEnvironment:()=>ece,noop:()=>Tc,noopFileWatcher:()=>t5,normalizePath:()=>ca,normalizeSlashes:()=>Rf,normalizeSpans:()=>Hoe,not:()=>zJ,notImplemented:()=>wa,notImplementedResolver:()=>bLe,nullNodeConverters:()=>fEe,nullParenthesizerRules:()=>uEe,nullTransformationContext:()=>JH,objectAllocator:()=>Hf,operatorPart:()=>d5,optionDeclarations:()=>U0,optionMapToObject:()=>GX,optionsAffectingProgramStructure:()=>NIe,optionsForBuild:()=>Qle,optionsForWatch:()=>eA,optionsHaveChanges:()=>j6,or:()=>om,orderedRemoveItem:()=>GR,orderedRemoveItemAt:()=>zw,packageIdToPackageName:()=>NG,packageIdToString:()=>zk,parameterIsThisKeyword:()=>JT,parameterNamePart:()=>gAe,parseBaseNodeFactory:()=>vIe,parseBigInt:()=>JDe,parseBuildCommand:()=>BIe,parseCommandLine:()=>RIe,parseCommandLineWorker:()=>Yle,parseConfigFileTextToJson:()=>tue,parseConfigFileWithSystem:()=>nPe,parseConfigHostFromCompilerHostLike:()=>HQ,parseCustomTypeOption:()=>qX,parseIsolatedEntityName:()=>YP,parseIsolatedJSDocComment:()=>CIe,parseJSDocTypeExpressionForTests:()=>dZe,parseJsonConfigFileContent:()=>VZe,parseJsonSourceFileConfigFileContent:()=>PH,parseJsonText:()=>TH,parseListTypeOption:()=>OIe,parseNodeFactory:()=>l2,parseNodeModuleFromPath:()=>MH,parsePackageName:()=>cQ,parsePseudoBigInt:()=>s7,parseValidBigInt:()=>qce,pasteEdits:()=>_pe,patchWriteFileEnsuringDirectory:()=>Fke,pathContainsNodeModules:()=>yx,pathIsAbsolute:()=>r8,pathIsBareSpecifier:()=>Loe,pathIsRelative:()=>am,patternText:()=>gxe,performIncrementalCompilation:()=>rPe,performance:()=>Txe,positionBelongsToNode:()=>Efe,positionIsASICandidate:()=>BZ,positionIsSynthesized:()=>W0,positionsAreOnSameLine:()=>qm,preProcessFile:()=>tnt,probablyUsesSemicolons:()=>kj,processCommentPragmas:()=>qle,processPragmasIntoFields:()=>$le,processTaggedTemplateExpression:()=>$ue,programContainsEsModules:()=>hAe,programContainsModules:()=>fAe,projectReferenceIsEqualTo:()=>hae,propertyNamePart:()=>yAe,pseudoBigIntToString:()=>ZT,punctuationPart:()=>Sh,pushIfUnique:()=>mu,quote:()=>_5,quotePreferenceFromString:()=>qfe,rangeContainsPosition:()=>s5,rangeContainsPositionExclusive:()=>dj,rangeContainsRange:()=>Ip,rangeContainsRangeExclusive:()=>YPe,rangeContainsStartEnd:()=>fj,rangeEndIsOnSameLineAsRangeStart:()=>zV,rangeEndPositionsAreOnSameLine:()=>_De,rangeEquals:()=>Vb,rangeIsOnSingleLine:()=>wI,rangeOfNode:()=>zce,rangeOfTypeParameters:()=>Uce,rangeOverlapsWithStartEnd:()=>o5,rangeStartIsOnSameLineAsRangeEnd:()=>pDe,rangeStartPositionsAreOnSameLine:()=>DK,readBuilderProgram:()=>YQ,readConfigFile:()=>NH,readJson:()=>J8,readJsonConfigFile:()=>WIe,readJsonOrUndefined:()=>vce,reduceEachLeadingCommentRange:()=>$ke,reduceEachTrailingCommentRange:()=>Jke,reduceLeft:()=>oi,reduceLeftIterator:()=>ae,reducePathComponents:()=>rI,refactor:()=>pA,regExpEscape:()=>uQe,regularExpressionFlagToCharacterCode:()=>lXe,relativeComplement:()=>T6,removeAllComments:()=>oH,removeEmitHelper:()=>xQe,removeExtension:()=>YV,removeFileExtension:()=>s_,removeIgnoredPath:()=>qQ,removeMinAndVersionNumbers:()=>toe,removePrefix:()=>KR,removeSuffix:()=>I6,removeTrailingDirectorySeparator:()=>Mk,repeatString:()=>gj,replaceElement:()=>Fc,replaceFirstStar:()=>xI,resolutionExtensionIsTSOrJson:()=>t7,resolveConfigFileProjectName:()=>Qde,resolveJSModule:()=>sNe,resolveLibrary:()=>oQ,resolveModuleName:()=>nA,resolveModuleNameFromCache:()=>mYe,resolvePackageNameToPackageJson:()=>fue,resolvePath:()=>Ok,resolveProjectReferencePath:()=>q3,resolveTripleslashReference:()=>lde,resolveTypeReferenceDirective:()=>tNe,resolvingEmptyArray:()=>dae,returnFalse:()=>w1,returnNoopFileWatcher:()=>i5,returnTrue:()=>Pk,returnUndefined:()=>IT,returnsPromise:()=>Phe,sameFlatMap:()=>Ca,sameMap:()=>Wr,sameMapping:()=>oet,scanTokenAtPosition:()=>uTe,scanner:()=>Uh,semanticDiagnosticsOptionDeclarations:()=>DIe,serializeCompilerOptions:()=>KX,server:()=>cht,servicesVersion:()=>qrt,setCommentRange:()=>Sd,setConfigFileInOptions:()=>aue,setConstantValue:()=>gEe,setEmitFlags:()=>tr,setGetSourceFileAsHashVersioned:()=>ZQ,setIdentifierAutoGenerate:()=>lH,setIdentifierGeneratedImportReference:()=>CEe,setIdentifierTypeArguments:()=>vS,setInternalEmitFlags:()=>aH,setLocalizedDiagnosticMessages:()=>xDe,setNodeChildren:()=>QEe,setNodeFlags:()=>XDe,setObjectAllocator:()=>wDe,setOriginalNode:()=>Ir,setParent:()=>_c,setParentRecursive:()=>Qb,setPrivateIdentifier:()=>VI,setSnippetElement:()=>sle,setSourceMapRange:()=>Ga,setStackTraceLimit:()=>JKe,setStartsOnNewLine:()=>lX,setSyntheticLeadingComments:()=>e2,setSyntheticTrailingComments:()=>OP,setSys:()=>YKe,setSysLog:()=>Oke,setTextRange:()=>Ht,setTextRangeEnd:()=>m3,setTextRangePos:()=>o7,setTextRangePosEnd:()=>V0,setTextRangePosWidth:()=>$ce,setTokenSourceMapRange:()=>_Ee,setTypeNode:()=>vEe,setUILocale:()=>_xe,setValueDeclaration:()=>bV,shouldAllowImportingTsExtension:()=>W3,shouldPreserveConstEnums:()=>sx,shouldUseUriStyleNodeCoreModules:()=>qZ,showModuleSpecifier:()=>bDe,signatureHasRestParameter:()=>Ch,signatureToDisplayParts:()=>ihe,single:()=>$L,singleElementArray:()=>KL,singleIterator:()=>Bb,singleOrMany:()=>Sg,singleOrUndefined:()=>Bm,skipAlias:()=>Vf,skipConstraint:()=>jfe,skipOuterExpressions:()=>Vu,skipParentheses:()=>Dc,skipPartiallyEmittedExpressions:()=>l0,skipTrivia:()=>Va,skipTypeChecking:()=>p3,skipTypeCheckingIgnoringNoCheck:()=>$De,skipTypeParentheses:()=>M8,skipWhile:()=>bxe,sliceAfter:()=>jce,some:()=>Ft,sortAndDeduplicate:()=>Iy,sortAndDeduplicateDiagnostics:()=>O6,sourceFileAffectingCompilerOptions:()=>Xle,sourceFileMayBeEmitted:()=>SI,sourceMapCommentRegExp:()=>Oue,sourceMapCommentRegExpDontCareLineStart:()=>INe,spacePart:()=>bu,spanMap:()=>nm,startEndContainsRange:()=>Dfe,startEndOverlapsWithStartEnd:()=>yZ,startOnNewLine:()=>bh,startTracing:()=>Nxe,startsWith:()=>so,startsWithDirectory:()=>Ooe,startsWithUnderscore:()=>ghe,startsWithUseStrict:()=>rIe,stringContainsAt:()=>RAe,stringToToken:()=>oI,stripQuotes:()=>zm,supportedDeclarationExtensions:()=>GK,supportedJSExtensionsFlat:()=>h3,supportedLocaleDirectories:()=>a2e,supportedTSExtensionsFlat:()=>Bce,supportedTSImplementationExtensions:()=>XV,suppressLeadingAndTrailingTrivia:()=>Lp,suppressLeadingTrivia:()=>ohe,suppressTrailingTrivia:()=>TAe,symbolEscapedNameNoDefault:()=>NZ,symbolName:()=>Eu,symbolNameNoDefault:()=>Jfe,symbolToDisplayParts:()=>f5,sys:()=>Pd,sysLog:()=>CW,tagNamesAreEquivalent:()=>d2,takeWhile:()=>roe,targetOptionDeclaration:()=>Gle,testFormatSettings:()=>Sit,textChangeRangeIsUnchanged:()=>i2e,textChangeRangeNewSpan:()=>f8,textChanges:()=>er,textOrKeywordPart:()=>the,textPart:()=>pm,textRangeContainsPositionInclusive:()=>NW,textRangeContainsTextSpan:()=>Xke,textRangeIntersectsWithTextSpan:()=>e2e,textSpanContainsPosition:()=>Woe,textSpanContainsTextRange:()=>Voe,textSpanContainsTextSpan:()=>Kke,textSpanEnd:()=>au,textSpanIntersection:()=>t2e,textSpanIntersectsWith:()=>LW,textSpanIntersectsWithPosition:()=>Yke,textSpanIntersectsWithTextSpan:()=>Zke,textSpanIsEmpty:()=>Gke,textSpanOverlap:()=>Qke,textSpanOverlapsWith:()=>gXe,textSpansEqual:()=>eO,textToKeywordObj:()=>tG,timestamp:()=>sl,toArray:()=>JL,toBuilderFileEmit:()=>$Le,toBuilderStateFileInfoForMultiEmit:()=>qLe,toEditorSettings:()=>Bj,toFileNameLowerCase:()=>Vw,toPath:()=>ol,toProgramEmitPending:()=>JLe,toSorted:()=>Mu,tokenIsIdentifierOrKeyword:()=>D_,tokenIsIdentifierOrKeywordOrGreaterThan:()=>Vke,tokenToString:()=>xa,trace:()=>bo,tracing:()=>Zn,tracingEnabled:()=>vW,transferSourceFileChildren:()=>ZEe,transform:()=>tst,transformClassFields:()=>JNe,transformDeclarations:()=>Xue,transformECMAScriptModule:()=>Kue,transformES2015:()=>aLe,transformES2016:()=>oLe,transformES2017:()=>QNe,transformES2018:()=>ZNe,transformES2019:()=>YNe,transformES2020:()=>eLe,transformES2021:()=>tLe,transformESDecorators:()=>XNe,transformESNext:()=>iLe,transformGenerators:()=>cLe,transformImpliedNodeFormatDependentModule:()=>uLe,transformJsx:()=>sLe,transformLegacyDecorators:()=>KNe,transformModule:()=>Gue,transformNamedEvaluation:()=>Dp,transformNodes:()=>$H,transformSystemModule:()=>lLe,transformTypeScript:()=>$Ne,transpile:()=>unt,transpileDeclaration:()=>cnt,transpileModule:()=>r4e,transpileOptionValueCompilerOptions:()=>LIe,tryAddToSet:()=>of,tryAndIgnoreErrors:()=>HZ,tryCast:()=>Jr,tryDirectoryExists:()=>VZ,tryExtractTSExtension:()=>xK,tryFileExists:()=>Tj,tryGetClassExtendingExpressionWithTypeArguments:()=>pce,tryGetClassImplementingOrExtendingExpressionWithTypeArguments:()=>mce,tryGetDirectories:()=>WZ,tryGetExtensionFromPath:()=>qv,tryGetImportFromModuleSpecifier:()=>CV,tryGetJSDocSatisfiesTypeNode:()=>rX,tryGetModuleNameFromFile:()=>bH,tryGetModuleSpecifierFromDeclaration:()=>Z6,tryGetNativePerformanceHooks:()=>kxe,tryGetPropertyAccessOrIdentifierToString:()=>jV,tryGetPropertyNameOfBindingOrAssignmentElement:()=>FX,tryGetSourceMappingURL:()=>NNe,tryGetTextOfPropertyName:()=>D8,tryParseJson:()=>kK,tryParsePattern:()=>_3,tryParsePatterns:()=>XK,tryParseRawSourceMap:()=>LNe,tryReadDirectory:()=>uhe,tryReadFile:()=>A7,tryRemoveDirectoryPrefix:()=>Mce,tryRemoveExtension:()=>UDe,tryRemovePrefix:()=>noe,tryRemoveSuffix:()=>mxe,typeAcquisitionDeclarations:()=>zX,typeAliasNamePart:()=>vAe,typeDirectiveIsEqualTo:()=>q2e,typeKeywords:()=>Hfe,typeParameterNamePart:()=>bAe,typeToDisplayParts:()=>Cj,unchangedPollThresholds:()=>KJ,unchangedTextChangeRange:()=>sG,unescapeLeadingUnderscores:()=>Ws,unmangleScopedPackageName:()=>FH,unorderedRemoveItem:()=>GL,unreachableCodeIsError:()=>IDe,unsetNodeChildren:()=>Ele,unusedLabelIsError:()=>NDe,unwrapInnermostStatementOfLabel:()=>Oae,unwrapParenthesizedExpression:()=>oEe,updateErrorForNoInputFiles:()=>YX,updateLanguageServiceSourceFile:()=>r_e,updateMissingFilePathsWatch:()=>ode,updateResolutionField:()=>O3,updateSharedExtendedConfigFileWatcher:()=>NQ,updateSourceFile:()=>jle,updateWatchingWildcardDirectories:()=>GH,usingSingleLineStringWriter:()=>z6,utf16EncodeAsString:()=>d8,validateLocaleAndSetLanguage:()=>zoe,version:()=>v,versionMajorMinor:()=>m,visitArray:()=>VH,visitCommaListElements:()=>mQ,visitEachChild:()=>dn,visitFunctionBody:()=>_m,visitIterationBody:()=>u_,visitLexicalEnvironment:()=>Aue,visitNode:()=>bt,visitNodes:()=>Dn,visitParameterList:()=>yu,walkUpBindingElementsAndPatterns:()=>YL,walkUpOuterExpressions:()=>sIe,walkUpParenthesizedExpressions:()=>By,walkUpParenthesizedTypes:()=>TV,walkUpParenthesizedTypesAndGetParentAndChild:()=>BTe,whitespaceOrMapCommentRegExp:()=>Mue,writeCommentRange:()=>c3,writeFile:()=>yK,writeFileEnsuringDirectories:()=>lce,zipWith:()=>me});var sht;function EJt(){return sht??(sht=new P0(v))}function oht(t,r,a,u,h){let p=r?"DeprecationError: ":"DeprecationWarning: ";return p+=`'${t}' `,p+=u?`has been deprecated since v${u}`:"is deprecated",p+=r?" and can no longer be used.":a?` and will no longer be usable after v${a}.`:".",p+=h?` ${jv(h,[t])}`:"",p}function IJt(t,r,a,u){const h=oht(t,!0,r,a,u);return()=>{throw new TypeError(h)}}function NJt(t,r,a,u){let h=!1;return()=>{h||(j.log.warn(oht(t,!1,r,a,u)),h=!0)}}function LJt(t,r={}){const a=typeof r.typeScriptVersion=="string"?new P0(r.typeScriptVersion):r.typeScriptVersion??EJt(),u=typeof r.errorAfter=="string"?new P0(r.errorAfter):r.errorAfter,h=typeof r.warnAfter=="string"?new P0(r.warnAfter):r.warnAfter,p=typeof r.since=="string"?new P0(r.since):r.since??h,g=r.error||u&&a.compareTo(u)>=0,C=!h||a.compareTo(h)>=0;return g?IJt(t,u,p,r.message):C?NJt(t,u,p,r.message):Tc}function PJt(t,r){return function(){return t(),r.apply(this,arguments)}}function AJt(t,r){const a=LJt((r==null?void 0:r.name)??j.getFunctionName(t),r);return PJt(a,t)}function ppe(t,r,a,u){if(Object.defineProperty(p,"name",{...Object.getOwnPropertyDescriptor(p,"name"),value:t}),u)for(const g of Object.keys(u)){const C=+g;!isNaN(C)&&Li(r,`${C}`)&&(r[C]=AJt(r[C],{...u[C],name:t}))}const h=OJt(r,a);return p;function p(...g){const C=h(g),b=C!==void 0?r[C]:void 0;if(typeof b=="function")return b(...g);throw new TypeError("Invalid arguments")}}function OJt(t,r){return a=>{for(let u=0;Li(t,`${u}`)&&Li(r,`${u}`);u++){const h=r[u];if(h(a))return u}}}function aht(t){return{overload:r=>({bind:a=>({finish:()=>ppe(t,r,a),deprecate:u=>({finish:()=>ppe(t,r,a,u)})})})}}var cht={};c(cht,{ActionInvalidate:()=>aZ,ActionPackageInstalled:()=>cZ,ActionSet:()=>oZ,ActionWatchTypingLocations:()=>aj,Arguments:()=>hfe,AutoImportProviderProject:()=>VMe,AuxiliaryProject:()=>BMe,CharRangeSection:()=>uRe,CloseFileWatcherEvent:()=>Epe,CommandNames:()=>Wht,ConfigFileDiagEvent:()=>wpe,ConfiguredProject:()=>HMe,ConfiguredProjectLoadKind:()=>JMe,CreateDirectoryWatcherEvent:()=>Dpe,CreateFileWatcherEvent:()=>Tpe,Errors:()=>cC,EventBeginInstallTypes:()=>dfe,EventEndInstallTypes:()=>ffe,EventInitializationFailed:()=>NPe,EventTypesRegistry:()=>ufe,ExternalProject:()=>gpe,GcTimer:()=>EMe,InferredProject:()=>FMe,LargeFileReferencedEvent:()=>Spe,LineIndex:()=>mz,LineLeaf:()=>$Y,LineNode:()=>yO,LogLevel:()=>vMe,Msg:()=>bMe,OpenFileInfoTelemetryEvent:()=>jMe,Project:()=>xA,ProjectInfoTelemetryEvent:()=>kpe,ProjectKind:()=>uz,ProjectLanguageServiceStateEvent:()=>xpe,ProjectLoadingFinishEvent:()=>Cpe,ProjectLoadingStartEvent:()=>bpe,ProjectService:()=>eRe,ProjectsUpdatedInBackgroundEvent:()=>zY,ScriptInfo:()=>PMe,ScriptVersionCache:()=>Wpe,Session:()=>Uht,TextStorage:()=>LMe,ThrottledOperations:()=>DMe,TypingsInstallerAdapter:()=>Xht,allFilesAreJsOrDts:()=>OMe,allRootFilesAreJsOrDts:()=>AMe,asNormalizedPath:()=>fht,convertCompilerOptions:()=>UY,convertFormatOptions:()=>pO,convertScriptKindName:()=>Npe,convertTypeAcquisition:()=>UMe,convertUserPreferences:()=>qMe,convertWatchOptions:()=>_z,countEachFileTypes:()=>dz,createInstallTypingsRequest:()=>CMe,createModuleSpecifierCache:()=>nRe,createNormalizedPathMap:()=>hht,createPackageJsonCache:()=>rRe,createSortedArray:()=>TMe,emptyArray:()=>Vd,findArgument:()=>dit,formatDiagnosticToProtocol:()=>pz,formatMessage:()=>sRe,getBaseConfigFileName:()=>mpe,getLocationInNewDocument:()=>lRe,hasArgument:()=>uit,hasNoTypeScriptSource:()=>MMe,indent:()=>n5,isBackgroundProject:()=>hz,isConfigFile:()=>tRe,isConfiguredProject:()=>LS,isDynamicFileName:()=>lz,isExternalProject:()=>fz,isInferredProject:()=>_O,isInferredProjectName:()=>SMe,isProjectDeferredClose:()=>jY,makeAutoImportProviderProjectName:()=>xMe,makeAuxiliaryProjectName:()=>kMe,makeInferredProjectName:()=>wMe,maxFileSize:()=>vpe,maxProgramSizeForNonTsFiles:()=>ype,normalizedPathToPath:()=>hO,nowString:()=>fit,nullCancellationToken:()=>Rht,nullTypingsInstaller:()=>qY,protocol:()=>IMe,stringifyIndented:()=>p2,toEvent:()=>oRe,toNormalizedPath:()=>Jl,tryConvertScriptKindName:()=>Ipe,typingsInstaller:()=>yMe,updateProjectIfDirty:()=>Ym});var yMe={};c(yMe,{TypingsInstaller:()=>FJt,getNpmCommandForInstallation:()=>uht,installNpmPackages:()=>RJt,typingsName:()=>dht});var MJt={isEnabled:()=>!1,writeLine:Tc};function lht(t,r,a,u){try{const h=nA(r,zr(t,"index.d.ts"),{moduleResolution:2},a);return h.resolvedModule&&h.resolvedModule.resolvedFileName}catch(h){u.isEnabled()&&u.writeLine(`Failed to resolve ${r} in folder '${t}': ${h.message}`);return}}function RJt(t,r,a,u){let h=!1;for(let p=a.length;p>0;){const g=uht(t,r,a,p);p=g.remaining,h=u(g.command)||h}return h}function uht(t,r,a,u){const h=a.length-u;let p,g=u;for(;p=`${t} install --ignore-scripts ${(g===a.length?a:a.slice(h,h+g)).join(" ")} --save-dev --user-agent="typesInstaller/${r}"`,!(p.length<8e3);)g=g-Math.floor(g/2);return{command:p,remaining:u-g}}var FJt=class{constructor(t,r,a,u,h,p=MJt){this.installTypingHost=t,this.globalCachePath=r,this.safeListPath=a,this.typesMapLocation=u,this.throttleLimit=h,this.log=p,this.packageNameToTypingLocation=new Map,this.missingTypingsSet=new Set,this.knownCachesSet=new Set,this.projectWatchers=new Map,this.pendingRunRequests=[],this.installRunCount=1,this.inFlightRequestCount=0,this.latestDistTag="latest",this.log.isEnabled()&&this.log.writeLine(`Global cache location '${r}', safe file path '${a}', types map path ${u}`),this.processCacheLocation(this.globalCachePath)}handleRequest(t){switch(t.kind){case"discover":this.install(t);break;case"closeProject":this.closeProject(t);break;case"typesRegistry":{const r={};this.typesRegistry.forEach((u,h)=>{r[h]=u});const a={kind:ufe,typesRegistry:r};this.sendResponse(a);break}case"installPackage":{this.installPackage(t);break}default:j.assertNever(t)}}closeProject(t){this.closeWatchers(t.projectName)}closeWatchers(t){if(this.log.isEnabled()&&this.log.writeLine(`Closing file watchers for project '${t}'`),!this.projectWatchers.get(t)){this.log.isEnabled()&&this.log.writeLine(`No watchers are registered for project '${t}'`);return}this.projectWatchers.delete(t),this.sendResponse({kind:aj,projectName:t,files:[]}),this.log.isEnabled()&&this.log.writeLine(`Closing file watchers for project '${t}' - done.`)}install(t){this.log.isEnabled()&&this.log.writeLine(`Got install request${p2(t)}`),t.cachePath&&(this.log.isEnabled()&&this.log.writeLine(`Request specifies cache path '${t.cachePath}', loading cached information...`),this.processCacheLocation(t.cachePath)),this.safeList===void 0&&this.initializeSafeList();const r=J1.discoverTypings(this.installTypingHost,this.log.isEnabled()?a=>this.log.writeLine(a):void 0,t.fileNames,t.projectRootPath,this.safeList,this.packageNameToTypingLocation,t.typeAcquisition,t.unresolvedImports,this.typesRegistry,t.compilerOptions);this.watchFiles(t.projectName,r.filesToWatch),r.newTypingNames.length?this.installTypings(t,t.cachePath||this.globalCachePath,r.cachedTypingPaths,r.newTypingNames):(this.sendResponse(this.createSetTypings(t,r.cachedTypingPaths)),this.log.isEnabled()&&this.log.writeLine("No new typings were requested as a result of typings discovery"))}installPackage(t){const{fileName:r,packageName:a,projectName:u,projectRootPath:h,id:p}=t,g=kg(ts(r),C=>{if(this.installTypingHost.fileExists(zr(C,"package.json")))return C})||h;if(g)this.installWorker(-1,[a],g,C=>{const b=C?`Package ${a} installed.`:`There was an error installing ${a}.`,T={kind:cZ,projectName:u,id:p,success:C,message:b};this.sendResponse(T)});else{const C={kind:cZ,projectName:u,id:p,success:!1,message:"Could not determine a project root path."};this.sendResponse(C)}}initializeSafeList(){if(this.typesMapLocation){const t=J1.loadTypesMap(this.installTypingHost,this.typesMapLocation);if(t){this.log.writeLine(`Loaded safelist from types map file '${this.typesMapLocation}'`),this.safeList=t;return}this.log.writeLine(`Failed to load safelist from types map file '${this.typesMapLocation}'`)}this.safeList=J1.loadSafeList(this.installTypingHost,this.safeListPath)}processCacheLocation(t){if(this.log.isEnabled()&&this.log.writeLine(`Processing cache location '${t}'`),this.knownCachesSet.has(t)){this.log.isEnabled()&&this.log.writeLine("Cache location was already processed...");return}const r=zr(t,"package.json"),a=zr(t,"package-lock.json");if(this.log.isEnabled()&&this.log.writeLine(`Trying to find '${r}'...`),this.installTypingHost.fileExists(r)&&this.installTypingHost.fileExists(a)){const u=JSON.parse(this.installTypingHost.readFile(r)),h=JSON.parse(this.installTypingHost.readFile(a));if(this.log.isEnabled()&&(this.log.writeLine(`Loaded content of '${r}':${p2(u)}`),this.log.writeLine(`Loaded content of '${a}':${p2(h)}`)),u.devDependencies&&h.dependencies)for(const p in u.devDependencies){if(!Li(h.dependencies,p))continue;const g=ud(p);if(!g)continue;const C=lht(t,g,this.installTypingHost,this.log);if(!C){this.missingTypingsSet.add(g);continue}const b=this.packageNameToTypingLocation.get(g);if(b){if(b.typingLocation===C)continue;this.log.isEnabled()&&this.log.writeLine(`New typing for package ${g} from '${C}' conflicts with existing typing file '${b}'`)}this.log.isEnabled()&&this.log.writeLine(`Adding entry into typings cache: '${g}' => '${C}'`);const T=hr(h.dependencies,p),E=T&&T.version;if(!E)continue;const N={typingLocation:C,version:new P0(E)};this.packageNameToTypingLocation.set(g,N)}}this.log.isEnabled()&&this.log.writeLine(`Finished processing cache location '${t}'`),this.knownCachesSet.add(t)}filterTypings(t){return es(t,r=>{const a=B3(r);if(this.missingTypingsSet.has(a)){this.log.isEnabled()&&this.log.writeLine(`'${r}':: '${a}' is in missingTypingsSet - skipping...`);return}const u=J1.validatePackageName(r);if(u!==J1.NameValidationResult.Ok){this.missingTypingsSet.add(a),this.log.isEnabled()&&this.log.writeLine(J1.renderPackageNameValidationFailure(u,r));return}if(!this.typesRegistry.has(a)){this.log.isEnabled()&&this.log.writeLine(`'${r}':: Entry for package '${a}' does not exist in local types registry - skipping...`);return}if(this.packageNameToTypingLocation.get(a)&&J1.isTypingUpToDate(this.packageNameToTypingLocation.get(a),this.typesRegistry.get(a))){this.log.isEnabled()&&this.log.writeLine(`'${r}':: '${a}' already has an up-to-date typing - skipping...`);return}return a})}ensurePackageDirectoryExists(t){const r=zr(t,"package.json");this.log.isEnabled()&&this.log.writeLine(`Npm config file: ${r}`),this.installTypingHost.fileExists(r)||(this.log.isEnabled()&&this.log.writeLine(`Npm config file: '${r}' is missing, creating new one...`),this.ensureDirectoryExists(t,this.installTypingHost),this.installTypingHost.writeFile(r,'{ "private": true }'))}installTypings(t,r,a,u){this.log.isEnabled()&&this.log.writeLine(`Installing typings ${JSON.stringify(u)}`);const h=this.filterTypings(u);if(h.length===0){this.log.isEnabled()&&this.log.writeLine("All typings are known to be missing or invalid - no need to install more typings"),this.sendResponse(this.createSetTypings(t,a));return}this.ensurePackageDirectoryExists(r);const p=this.installRunCount;this.installRunCount++,this.sendResponse({kind:dfe,eventId:p,typingsInstallerVersion:v,projectName:t.projectName});const g=h.map(dht);this.installTypingsAsync(p,g,r,C=>{try{if(!C){this.log.isEnabled()&&this.log.writeLine(`install request failed, marking packages as missing to prevent repeated requests: ${JSON.stringify(h)}`);for(const T of h)this.missingTypingsSet.add(T);return}this.log.isEnabled()&&this.log.writeLine(`Installed typings ${JSON.stringify(g)}`);const b=[];for(const T of h){const E=lht(r,T,this.installTypingHost,this.log);if(!E){this.missingTypingsSet.add(T);continue}const N=this.typesRegistry.get(T),R=new P0(N[`ts${m}`]||N[this.latestDistTag]),F={typingLocation:E,version:R};this.packageNameToTypingLocation.set(T,F),b.push(E)}this.log.isEnabled()&&this.log.writeLine(`Installed typing files ${JSON.stringify(b)}`),this.sendResponse(this.createSetTypings(t,a.concat(b)))}finally{const b={kind:ffe,eventId:p,projectName:t.projectName,packagesToInstall:g,installSuccess:C,typingsInstallerVersion:v};this.sendResponse(b)}})}ensureDirectoryExists(t,r){const a=ts(t);r.directoryExists(a)||this.ensureDirectoryExists(a,r),r.directoryExists(t)||r.createDirectory(t)}watchFiles(t,r){if(!r.length){this.closeWatchers(t);return}const a=this.projectWatchers.get(t),u=new Set(r);!a||qb(u,h=>!a.has(h))||qb(a,h=>!u.has(h))?(this.projectWatchers.set(t,u),this.sendResponse({kind:aj,projectName:t,files:r})):this.sendResponse({kind:aj,projectName:t,files:void 0})}createSetTypings(t,r){return{projectName:t.projectName,typeAcquisition:t.typeAcquisition,compilerOptions:t.compilerOptions,typings:r,unresolvedImports:t.unresolvedImports,kind:oZ}}installTypingsAsync(t,r,a,u){this.pendingRunRequests.unshift({requestId:t,packageNames:r,cwd:a,onRequestCompleted:u}),this.executeWithThrottling()}executeWithThrottling(){for(;this.inFlightRequestCount<this.throttleLimit&&this.pendingRunRequests.length;){this.inFlightRequestCount++;const t=this.pendingRunRequests.pop();this.installWorker(t.requestId,t.packageNames,t.cwd,r=>{this.inFlightRequestCount--,t.onRequestCompleted(r),this.executeWithThrottling()})}}};function dht(t){return`@types/${t}@ts${m}`}var vMe=(t=>(t[t.terse=0]="terse",t[t.normal=1]="normal",t[t.requestTime=2]="requestTime",t[t.verbose=3]="verbose",t))(vMe||{}),Vd=TMe(),bMe=(t=>(t.Err="Err",t.Info="Info",t.Perf="Perf",t))(bMe||{});function CMe(t,r,a,u){return{projectName:t.getProjectName(),fileNames:t.getFileNames(!0,!0).concat(t.getExcludedFiles()),compilerOptions:t.getCompilationSettings(),typeAcquisition:r,unresolvedImports:a,projectRootPath:t.getCurrentDirectory(),cachePath:u,kind:"discover"}}var cC;(t=>{function r(){throw new Error("No Project.")}t.ThrowNoProject=r;function a(){throw new Error("The project's language service is disabled.")}t.ThrowProjectLanguageServiceDisabled=a;function u(h,p){throw new Error(`Project '${p.getProjectName()}' does not contain document '${h}'`)}t.ThrowProjectDoesNotContainDocument=u})(cC||(cC={}));function Jl(t){return ca(t)}function hO(t,r,a){const u=yp(t)?t:wo(t,r);return a(u)}function fht(t){return t}function hht(){const t=new Map;return{get(r){return t.get(r)},set(r,a){t.set(r,a)},contains(r){return t.has(r)},remove(r){t.delete(r)}}}function SMe(t){return/dev\/null\/inferredProject\d+\*/.test(t)}function wMe(t){return`/dev/null/inferredProject${t}*`}function xMe(t){return`/dev/null/autoImportProviderProject${t}*`}function kMe(t){return`/dev/null/auxiliaryProject${t}*`}function TMe(){return[]}var DMe=class cAt{constructor(r,a){this.host=r,this.pendingTimeouts=new Map,this.logger=a.hasLevel(3)?a:void 0}schedule(r,a,u){const h=this.pendingTimeouts.get(r);h&&this.host.clearTimeout(h),this.pendingTimeouts.set(r,this.host.setTimeout(cAt.run,a,r,this,u)),this.logger&&this.logger.info(`Scheduled: ${r}${h?", Cancelled earlier one":""}`)}cancel(r){const a=this.pendingTimeouts.get(r);return a?(this.host.clearTimeout(a),this.pendingTimeouts.delete(r)):!1}static run(r,a,u){a.pendingTimeouts.delete(r),a.logger&&a.logger.info(`Running: ${r}`),u()}},EMe=class lAt{constructor(r,a,u){this.host=r,this.delay=a,this.logger=u}scheduleCollect(){!this.host.gc||this.timerId!==void 0||(this.timerId=this.host.setTimeout(lAt.run,this.delay,this))}static run(r){r.timerId=void 0;const a=r.logger.hasLevel(2),u=a&&r.host.getMemoryUsage();if(r.host.gc(),a){const h=r.host.getMemoryUsage();r.logger.perftrc(`GC::before ${u}, after ${h}`)}}};function mpe(t){const r=ud(t);return r==="tsconfig.json"||r==="jsconfig.json"?r:void 0}var IMe={};c(IMe,{ClassificationType:()=>gfe,CommandTypes:()=>NMe,CompletionTriggerKind:()=>pfe,IndentStyle:()=>ght,JsxEmit:()=>yht,ModuleKind:()=>vht,ModuleResolutionKind:()=>bht,NewLineKind:()=>Cht,OrganizeImportsMode:()=>_fe,PollingWatchKind:()=>mht,ScriptTarget:()=>Sht,SemicolonPreference:()=>mfe,WatchDirectoryKind:()=>pht,WatchFileKind:()=>_ht});var NMe=(t=>(t.JsxClosingTag="jsxClosingTag",t.LinkedEditingRange="linkedEditingRange",t.Brace="brace",t.BraceFull="brace-full",t.BraceCompletion="braceCompletion",t.GetSpanOfEnclosingComment="getSpanOfEnclosingComment",t.Change="change",t.Close="close",t.Completions="completions",t.CompletionInfo="completionInfo",t.CompletionsFull="completions-full",t.CompletionDetails="completionEntryDetails",t.CompletionDetailsFull="completionEntryDetails-full",t.CompileOnSaveAffectedFileList="compileOnSaveAffectedFileList",t.CompileOnSaveEmitFile="compileOnSaveEmitFile",t.Configure="configure",t.Definition="definition",t.DefinitionFull="definition-full",t.DefinitionAndBoundSpan="definitionAndBoundSpan",t.DefinitionAndBoundSpanFull="definitionAndBoundSpan-full",t.Implementation="implementation",t.ImplementationFull="implementation-full",t.EmitOutput="emit-output",t.Exit="exit",t.FileReferences="fileReferences",t.FileReferencesFull="fileReferences-full",t.Format="format",t.Formatonkey="formatonkey",t.FormatFull="format-full",t.FormatonkeyFull="formatonkey-full",t.FormatRangeFull="formatRange-full",t.Geterr="geterr",t.GeterrForProject="geterrForProject",t.SemanticDiagnosticsSync="semanticDiagnosticsSync",t.SyntacticDiagnosticsSync="syntacticDiagnosticsSync",t.SuggestionDiagnosticsSync="suggestionDiagnosticsSync",t.NavBar="navbar",t.NavBarFull="navbar-full",t.Navto="navto",t.NavtoFull="navto-full",t.NavTree="navtree",t.NavTreeFull="navtree-full",t.DocumentHighlights="documentHighlights",t.DocumentHighlightsFull="documentHighlights-full",t.Open="open",t.Quickinfo="quickinfo",t.QuickinfoFull="quickinfo-full",t.References="references",t.ReferencesFull="references-full",t.Reload="reload",t.Rename="rename",t.RenameInfoFull="rename-full",t.RenameLocationsFull="renameLocations-full",t.Saveto="saveto",t.SignatureHelp="signatureHelp",t.SignatureHelpFull="signatureHelp-full",t.FindSourceDefinition="findSourceDefinition",t.Status="status",t.TypeDefinition="typeDefinition",t.ProjectInfo="projectInfo",t.ReloadProjects="reloadProjects",t.Unknown="unknown",t.OpenExternalProject="openExternalProject",t.OpenExternalProjects="openExternalProjects",t.CloseExternalProject="closeExternalProject",t.SynchronizeProjectList="synchronizeProjectList",t.ApplyChangedToOpenFiles="applyChangedToOpenFiles",t.UpdateOpen="updateOpen",t.EncodedSyntacticClassificationsFull="encodedSyntacticClassifications-full",t.EncodedSemanticClassificationsFull="encodedSemanticClassifications-full",t.Cleanup="cleanup",t.GetOutliningSpans="getOutliningSpans",t.GetOutliningSpansFull="outliningSpans",t.TodoComments="todoComments",t.Indentation="indentation",t.DocCommentTemplate="docCommentTemplate",t.CompilerOptionsDiagnosticsFull="compilerOptionsDiagnostics-full",t.NameOrDottedNameSpan="nameOrDottedNameSpan",t.BreakpointStatement="breakpointStatement",t.CompilerOptionsForInferredProjects="compilerOptionsForInferredProjects",t.GetCodeFixes="getCodeFixes",t.GetCodeFixesFull="getCodeFixes-full",t.GetCombinedCodeFix="getCombinedCodeFix",t.GetCombinedCodeFixFull="getCombinedCodeFix-full",t.ApplyCodeActionCommand="applyCodeActionCommand",t.GetSupportedCodeFixes="getSupportedCodeFixes",t.GetApplicableRefactors="getApplicableRefactors",t.GetEditsForRefactor="getEditsForRefactor",t.GetMoveToRefactoringFileSuggestions="getMoveToRefactoringFileSuggestions",t.GetPasteEdits="getPasteEdits",t.GetEditsForRefactorFull="getEditsForRefactor-full",t.OrganizeImports="organizeImports",t.OrganizeImportsFull="organizeImports-full",t.GetEditsForFileRename="getEditsForFileRename",t.GetEditsForFileRenameFull="getEditsForFileRename-full",t.ConfigurePlugin="configurePlugin",t.SelectionRange="selectionRange",t.SelectionRangeFull="selectionRange-full",t.ToggleLineComment="toggleLineComment",t.ToggleLineCommentFull="toggleLineComment-full",t.ToggleMultilineComment="toggleMultilineComment",t.ToggleMultilineCommentFull="toggleMultilineComment-full",t.CommentSelection="commentSelection",t.CommentSelectionFull="commentSelection-full",t.UncommentSelection="uncommentSelection",t.UncommentSelectionFull="uncommentSelection-full",t.PrepareCallHierarchy="prepareCallHierarchy",t.ProvideCallHierarchyIncomingCalls="provideCallHierarchyIncomingCalls",t.ProvideCallHierarchyOutgoingCalls="provideCallHierarchyOutgoingCalls",t.ProvideInlayHints="provideInlayHints",t.WatchChange="watchChange",t.MapCode="mapCode",t))(NMe||{}),_ht=(t=>(t.FixedPollingInterval="FixedPollingInterval",t.PriorityPollingInterval="PriorityPollingInterval",t.DynamicPriorityPolling="DynamicPriorityPolling",t.FixedChunkSizePolling="FixedChunkSizePolling",t.UseFsEvents="UseFsEvents",t.UseFsEventsOnParentDirectory="UseFsEventsOnParentDirectory",t))(_ht||{}),pht=(t=>(t.UseFsEvents="UseFsEvents",t.FixedPollingInterval="FixedPollingInterval",t.DynamicPriorityPolling="DynamicPriorityPolling",t.FixedChunkSizePolling="FixedChunkSizePolling",t))(pht||{}),mht=(t=>(t.FixedInterval="FixedInterval",t.PriorityInterval="PriorityInterval",t.DynamicPriority="DynamicPriority",t.FixedChunkSize="FixedChunkSize",t))(mht||{}),ght=(t=>(t.None="None",t.Block="Block",t.Smart="Smart",t))(ght||{}),yht=(t=>(t.None="none",t.Preserve="preserve",t.ReactNative="react-native",t.React="react",t.ReactJSX="react-jsx",t.ReactJSXDev="react-jsxdev",t))(yht||{}),vht=(t=>(t.None="none",t.CommonJS="commonjs",t.AMD="amd",t.UMD="umd",t.System="system",t.ES6="es6",t.ES2015="es2015",t.ES2020="es2020",t.ES2022="es2022",t.ESNext="esnext",t.Node16="node16",t.NodeNext="nodenext",t.Preserve="preserve",t))(vht||{}),bht=(t=>(t.Classic="classic",t.Node="node",t.NodeJs="node",t.Node10="node10",t.Node16="node16",t.NodeNext="nodenext",t.Bundler="bundler",t))(bht||{}),Cht=(t=>(t.Crlf="Crlf",t.Lf="Lf",t))(Cht||{}),Sht=(t=>(t.ES3="es3",t.ES5="es5",t.ES6="es6",t.ES2015="es2015",t.ES2016="es2016",t.ES2017="es2017",t.ES2018="es2018",t.ES2019="es2019",t.ES2020="es2020",t.ES2021="es2021",t.ES2022="es2022",t.ES2023="es2023",t.ESNext="esnext",t.JSON="json",t.Latest="esnext",t))(Sht||{}),LMe=class{constructor(t,r,a){this.host=t,this.info=r,this.isOpen=!1,this.ownFileText=!1,this.pendingReloadFromDisk=!1,this.version=a||0}getVersion(){return this.svc?`SVC-${this.version}-${this.svc.getSnapshotVersion()}`:`Text-${this.version}`}hasScriptVersionCache_TestOnly(){return this.svc!==void 0}resetSourceMapInfo(){this.info.sourceFileLike=void 0,this.info.closeSourceMapFileWatcher(),this.info.sourceMapFilePath=void 0,this.info.declarationInfoPath=void 0,this.info.sourceInfos=void 0,this.info.documentPositionMapper=void 0}useText(t){this.svc=void 0,this.text=t,this.textSnapshot=void 0,this.lineMap=void 0,this.fileSize=void 0,this.resetSourceMapInfo(),this.version++}edit(t,r,a){this.switchToScriptVersionCache().edit(t,r-t,a),this.ownFileText=!1,this.text=void 0,this.textSnapshot=void 0,this.lineMap=void 0,this.fileSize=void 0,this.resetSourceMapInfo()}reload(t){return j.assert(t!==void 0),this.pendingReloadFromDisk=!1,!this.text&&this.svc&&(this.text=uA(this.svc.getSnapshot())),this.text!==t?(this.useText(t),this.ownFileText=!1,!0):!1}reloadWithFileText(t){const{text:r,fileSize:a}=t||!this.info.isDynamicOrHasMixedContent()?this.getFileTextAndSize(t):{text:"",fileSize:void 0},u=this.reload(r);return this.fileSize=a,this.ownFileText=!t||t===this.info.fileName,this.ownFileText&&this.info.mTime===gp.getTime()&&(this.info.mTime=(this.host.getModifiedTime(this.info.fileName)||gp).getTime()),u}scheduleReloadIfNeeded(){return!this.pendingReloadFromDisk&&!this.ownFileText?this.pendingReloadFromDisk=!0:!1}delayReloadFromFileIntoText(){this.pendingReloadFromDisk=!0}getTelemetryFileSize(){return this.fileSize?this.fileSize:this.text?this.text.length:this.svc?this.svc.getSnapshot().getLength():this.getSnapshot().getLength()}getSnapshot(){var t;return((t=this.tryUseScriptVersionCache())==null?void 0:t.getSnapshot())||(this.textSnapshot??(this.textSnapshot=lZ.fromString(j.checkDefined(this.text))))}getAbsolutePositionAndLineText(t){const r=this.tryUseScriptVersionCache();if(r)return r.getAbsolutePositionAndLineText(t);const a=this.getLineMap();return t<=a.length?{absolutePosition:a[t-1],lineText:this.text.substring(a[t-1],a[t])}:{absolutePosition:this.text.length,lineText:void 0}}lineToTextSpan(t){const r=this.tryUseScriptVersionCache();if(r)return r.lineToTextSpan(t);const a=this.getLineMap(),u=a[t],h=t+1<a.length?a[t+1]:this.text.length;return Fu(u,h)}lineOffsetToPosition(t,r,a){const u=this.tryUseScriptVersionCache();return u?u.lineOffsetToPosition(t,r):nG(this.getLineMap(),t-1,r-1,this.text,a)}positionToLineOffset(t){const r=this.tryUseScriptVersionCache();if(r)return r.positionToLineOffset(t);const{line:a,character:u}=P6(this.getLineMap(),t);return{line:a+1,offset:u+1}}getFileTextAndSize(t){let r;const a=t||this.info.fileName,u=()=>r===void 0?r=this.host.readFile(a)||"":r;if(!IP(this.info.fileName)){const h=this.host.getFileSize?this.host.getFileSize(a):u().length;if(h>vpe)return j.assert(!!this.info.containingProjects.length),this.info.containingProjects[0].projectService.logger.info(`Skipped loading contents of large file ${a} for info ${this.info.fileName}: fileSize: ${h}`),this.info.containingProjects[0].projectService.sendLargeFileReferencedEvent(a,h),{text:"",fileSize:h}}return{text:u()}}switchToScriptVersionCache(){return(!this.svc||this.pendingReloadFromDisk)&&(this.svc=Wpe.fromString(this.getOrLoadText()),this.textSnapshot=void 0,this.version++),this.svc}tryUseScriptVersionCache(){return(!this.svc||this.pendingReloadFromDisk)&&this.getOrLoadText(),this.isOpen?(!this.svc&&!this.textSnapshot&&(this.svc=Wpe.fromString(j.checkDefined(this.text)),this.textSnapshot=void 0),this.svc):this.svc}getOrLoadText(){return(this.text===void 0||this.pendingReloadFromDisk)&&(j.assert(!this.svc||this.pendingReloadFromDisk,"ScriptVersionCache should not be set when reloading from disk"),this.reloadWithFileText()),this.text}getLineMap(){return j.assert(!this.svc,"ScriptVersionCache should not be set"),this.lineMap||(this.lineMap=ZL(j.checkDefined(this.text)))}getLineInfo(){const t=this.tryUseScriptVersionCache();if(t)return{getLineCount:()=>t.getLineCount(),getLineText:a=>t.getAbsolutePositionAndLineText(a+1).lineText};const r=this.getLineMap();return Rue(this.text,r)}};function lz(t){return t[0]==="^"||(t.includes("walkThroughSnippet:/")||t.includes("untitled:/"))&&ud(t)[0]==="^"||t.includes(":^")&&!t.includes(Kl)}var PMe=class{constructor(t,r,a,u,h,p){this.host=t,this.fileName=r,this.scriptKind=a,this.hasMixedContent=u,this.path=h,this.containingProjects=[],this.isDynamic=lz(r),this.textStorage=new LMe(t,this,p),(u||this.isDynamic)&&(this.realpath=this.path),this.scriptKind=a||$K(r)}isDynamicOrHasMixedContent(){return this.hasMixedContent||this.isDynamic}isScriptOpen(){return this.textStorage.isOpen}open(t){this.textStorage.isOpen=!0,t!==void 0&&this.textStorage.reload(t)&&this.markContainingProjectsAsDirty()}close(t=!0){this.textStorage.isOpen=!1,t&&this.textStorage.scheduleReloadIfNeeded()&&this.markContainingProjectsAsDirty()}getSnapshot(){return this.textStorage.getSnapshot()}ensureRealPath(){if(this.realpath===void 0&&(this.realpath=this.path,this.host.realpath)){j.assert(!!this.containingProjects.length);const t=this.containingProjects[0],r=this.host.realpath(this.path);r&&(this.realpath=t.toPath(r),this.realpath!==this.path&&t.projectService.realpathToScriptInfos.add(this.realpath,this))}}getRealpathIfDifferent(){return this.realpath&&this.realpath!==this.path?this.realpath:void 0}isSymlink(){return this.realpath&&this.realpath!==this.path}getFormatCodeSettings(){return this.formatSettings}getPreferences(){return this.preferences}attachToProject(t){const r=!this.isAttached(t);return r&&(this.containingProjects.push(t),t.getCompilerOptions().preserveSymlinks||this.ensureRealPath(),t.onFileAddedOrRemoved(this.isSymlink())),r}isAttached(t){switch(this.containingProjects.length){case 0:return!1;case 1:return this.containingProjects[0]===t;case 2:return this.containingProjects[0]===t||this.containingProjects[1]===t;default:return Yt(this.containingProjects,t)}}detachFromProject(t){switch(this.containingProjects.length){case 0:return;case 1:this.containingProjects[0]===t&&(t.onFileAddedOrRemoved(this.isSymlink()),this.containingProjects.pop());break;case 2:this.containingProjects[0]===t?(t.onFileAddedOrRemoved(this.isSymlink()),this.containingProjects[0]=this.containingProjects.pop()):this.containingProjects[1]===t&&(t.onFileAddedOrRemoved(this.isSymlink()),this.containingProjects.pop());break;default:GR(this.containingProjects,t)&&t.onFileAddedOrRemoved(this.isSymlink());break}}detachAllProjects(){for(const t of this.containingProjects){LS(t)&&t.getCachedDirectoryStructureHost().addOrDeleteFile(this.fileName,this.path,2);const r=t.getRootFilesMap().get(this.path);t.removeFile(this,!1,!1),t.onFileAddedOrRemoved(this.isSymlink()),r&&!_O(t)&&t.addMissingFileRoot(r.fileName)}An(this.containingProjects)}getDefaultProject(){switch(this.containingProjects.length){case 0:return cC.ThrowNoProject();case 1:return jY(this.containingProjects[0])||hz(this.containingProjects[0])?cC.ThrowNoProject():this.containingProjects[0];default:let t,r,a,u;for(let h=0;h<this.containingProjects.length;h++){const p=this.containingProjects[h];if(LS(p)){if(p.deferredClose)continue;if(!p.isSourceOfProjectReferenceRedirect(this.fileName)){if(u===void 0&&h!==this.containingProjects.length-1&&(u=p.projectService.findDefaultConfiguredProject(this)||!1),u===p)return p;a||(a=p)}t||(t=p)}else{if(fz(p))return p;!r&&_O(p)&&(r=p)}}return(u||a||t||r)??cC.ThrowNoProject()}}registerFileUpdate(){for(const t of this.containingProjects)t.registerFileUpdate(this.path)}setOptions(t,r){t&&(this.formatSettings?this.formatSettings={...this.formatSettings,...t}:(this.formatSettings=uZ(this.host.newLine),$u(this.formatSettings,t))),r&&(this.preferences||(this.preferences=Bg),this.preferences={...this.preferences,...r})}getLatestVersion(){return this.textStorage.getSnapshot(),this.textStorage.getVersion()}saveTo(t){this.host.writeFile(t,uA(this.textStorage.getSnapshot()))}delayReloadNonMixedContentFile(){j.assert(!this.isDynamicOrHasMixedContent()),this.textStorage.delayReloadFromFileIntoText(),this.markContainingProjectsAsDirty()}reloadFromFile(t){return this.textStorage.reloadWithFileText(t)?(this.markContainingProjectsAsDirty(),!0):!1}editContent(t,r,a){this.textStorage.edit(t,r,a),this.markContainingProjectsAsDirty()}markContainingProjectsAsDirty(){for(const t of this.containingProjects)t.markFileAsDirty(this.path)}isOrphan(){return this.deferredDelete||!O(this.containingProjects,t=>!t.isOrphan())}isContainedByBackgroundProject(){return Ft(this.containingProjects,hz)}lineToTextSpan(t){return this.textStorage.lineToTextSpan(t)}lineOffsetToPosition(t,r,a){return this.textStorage.lineOffsetToPosition(t,r,a)}positionToLineOffset(t){BJt(t);const r=this.textStorage.positionToLineOffset(t);return WJt(r),r}isJavaScript(){return this.scriptKind===1||this.scriptKind===2}closeSourceMapFileWatcher(){this.sourceMapFilePath&&!Oo(this.sourceMapFilePath)&&(Zm(this.sourceMapFilePath),this.sourceMapFilePath=void 0)}};function BJt(t){j.assert(typeof t=="number",`Expected position ${t} to be a number.`),j.assert(t>=0,"Expected position to be non-negative.")}function WJt(t){j.assert(typeof t.line=="number",`Expected line ${t.line} to be a number.`),j.assert(typeof t.offset=="number",`Expected offset ${t.offset} to be a number.`),j.assert(t.line>0,`Expected line to be non-${t.line===0?"zero":"negative"}`),j.assert(t.offset>0,`Expected offset to be non-${t.offset===0?"zero":"negative"}`)}var uz=(t=>(t[t.Inferred=0]="Inferred",t[t.Configured=1]="Configured",t[t.External=2]="External",t[t.AutoImportProvider=3]="AutoImportProvider",t[t.Auxiliary=4]="Auxiliary",t))(uz||{});function dz(t,r=!1){const a={js:0,jsSize:0,jsx:0,jsxSize:0,ts:0,tsSize:0,tsx:0,tsxSize:0,dts:0,dtsSize:0,deferred:0,deferredSize:0};for(const u of t){const h=r?u.textStorage.getTelemetryFileSize():0;switch(u.scriptKind){case 1:a.js+=1,a.jsSize+=h;break;case 2:a.jsx+=1,a.jsxSize+=h;break;case 3:df(u.fileName)?(a.dts+=1,a.dtsSize+=h):(a.ts+=1,a.tsSize+=h);break;case 4:a.tsx+=1,a.tsxSize+=h;break;case 7:a.deferred+=1,a.deferredSize+=h;break}}return a}function VJt(t){const r=dz(t.getScriptInfos());return r.js>0&&r.ts===0&&r.tsx===0}function AMe(t){const r=dz(t.getRootScriptInfos());return r.ts===0&&r.tsx===0}function OMe(t){const r=dz(t.getScriptInfos());return r.ts===0&&r.tsx===0}function MMe(t){return!t.some(r=>Xl(r,".ts")&&!df(r)||Xl(r,".tsx"))}function RMe(t){return t.generatedFilePath!==void 0}function wht(t,r){if(t===r||(t||Vd).length===0&&(r||Vd).length===0)return!0;const a=new Map;let u=0;for(const h of t)a.get(h)!==!0&&(a.set(h,!0),u++);for(const h of r){const p=a.get(h);if(p===void 0)return!1;p===!0&&(a.set(h,!1),u--)}return u===0}function HJt(t,r){return t.enable!==r.enable||!wht(t.include,r.include)||!wht(t.exclude,r.exclude)}function jJt(t,r){return ox(t)!==ox(r)}function zJt(t,r){return t===r?!1:!i_(t,r)}var xA=class uAt{constructor(r,a,u,h,p,g,C,b,T,E,N){switch(this.projectKind=a,this.projectService=u,this.documentRegistry=h,this.compilerOptions=C,this.compileOnSaveEnabled=b,this.watchOptions=T,this.rootFilesMap=new Map,this.plugins=[],this.cachedUnresolvedImportsPerFile=new Map,this.hasAddedorRemovedFiles=!1,this.hasAddedOrRemovedSymlinks=!1,this.lastReportedVersion=0,this.projectProgramVersion=0,this.projectStateVersion=0,this.isInitialLoadPending=w1,this.dirty=!1,this.typingFiles=Vd,this.moduleSpecifierCache=nRe(this),this.createHash=to(this.projectService.host,this.projectService.host.createHash),this.globalCacheResolutionModuleName=J1.nonRelativeModuleNameForTypingCache,this.updateFromProjectInProgress=!1,this.projectName=r,this.directoryStructureHost=E,this.currentDirectory=this.projectService.getNormalizedAbsolutePath(N),this.getCanonicalFileName=this.projectService.toCanonicalFileName,this.jsDocParsingMode=this.projectService.jsDocParsingMode,this.cancellationToken=new g6e(this.projectService.cancellationToken,this.projectService.throttleWaitMilliseconds),this.compilerOptions?(p||ox(this.compilerOptions)||this.projectService.hasDeferredExtension())&&(this.compilerOptions.allowNonTsExtensions=!0):(this.compilerOptions=fY(),this.compilerOptions.allowNonTsExtensions=!0,this.compilerOptions.allowJs=!0),u.serverMode){case 0:this.languageServiceEnabled=!0;break;case 1:this.languageServiceEnabled=!0,this.compilerOptions.noResolve=!0,this.compilerOptions.types=[];break;case 2:this.languageServiceEnabled=!1,this.compilerOptions.noResolve=!0,this.compilerOptions.types=[];break;default:j.assertNever(u.serverMode)}this.setInternalCompilerOptionsForEmittingJsFiles();const R=this.projectService.host;this.projectService.logger.loggingEnabled()?this.trace=F=>this.writeLog(F):R.trace&&(this.trace=F=>R.trace(F)),this.realpath=to(R,R.realpath),this.preferNonRecursiveWatch=this.projectService.canUseWatchEvents||R.preferNonRecursiveWatch,this.resolutionCache=Ade(this,this.currentDirectory,!0),this.languageService=y6e(this,this.documentRegistry,this.projectService.serverMode),g&&this.disableLanguageService(g),this.markAsDirty(),hz(this)||(this.projectService.pendingEnsureProjectForOpenFiles=!0),this.projectService.onProjectCreation(this)}getResolvedProjectReferenceToRedirect(r){}isNonTsProject(){return Ym(this),OMe(this)}isJsOnlyProject(){return Ym(this),VJt(this)}static resolveModule(r,a,u,h){return uAt.importServicePluginSync({name:r},[a],u,h).resolvedModule}static importServicePluginSync(r,a,u,h){j.assertIsDefined(u.require);let p,g;for(const C of a){const b=Rf(u.resolvePath(zr(C,"node_modules")));h(`Loading ${r.name} from ${C} (resolved to ${b})`);const T=u.require(b,r.name);if(!T.error){g=T.module;break}const E=T.error.stack||T.error.message||JSON.stringify(T.error);(p??(p=[])).push(`Failed to load module '${r.name}' from ${b}: ${E}`)}return{pluginConfigEntry:r,resolvedModule:g,errorLogs:p}}static async importServicePluginAsync(r,a,u,h){j.assertIsDefined(u.importPlugin);let p,g;for(const C of a){const b=zr(C,"node_modules");h(`Dynamically importing ${r.name} from ${C} (resolved to ${b})`);let T;try{T=await u.importPlugin(b,r.name)}catch(N){T={module:void 0,error:N}}if(!T.error){g=T.module;break}const E=T.error.stack||T.error.message||JSON.stringify(T.error);(p??(p=[])).push(`Failed to dynamically import module '${r.name}' from ${b}: ${E}`)}return{pluginConfigEntry:r,resolvedModule:g,errorLogs:p}}isKnownTypesPackageName(r){return this.projectService.typingsInstaller.isKnownTypesPackageName(r)}installPackage(r){return this.projectService.typingsInstaller.installPackage({...r,projectName:this.projectName,projectRootPath:this.toPath(this.currentDirectory)})}getGlobalTypingsCacheLocation(){return this.getGlobalCache()}getSymlinkCache(){return this.symlinks||(this.symlinks=Oce(this.getCurrentDirectory(),this.getCanonicalFileName)),this.program&&!this.symlinks.hasProcessedResolutions()&&this.symlinks.setSymlinksFromResolutions(this.program.forEachResolvedModule,this.program.forEachResolvedTypeReferenceDirective,this.program.getAutomaticTypeDirectiveResolutions()),this.symlinks}getCompilationSettings(){return this.compilerOptions}getCompilerOptions(){return this.getCompilationSettings()}getNewLine(){return this.projectService.host.newLine}getProjectVersion(){return this.projectStateVersion.toString()}getProjectReferences(){}getScriptFileNames(){if(!this.rootFilesMap.size)return w;let r;return this.rootFilesMap.forEach(a=>{(this.languageServiceEnabled||a.info&&a.info.isScriptOpen())&&(r||(r=[])).push(a.fileName)}),Sr(r,this.typingFiles)||w}getOrCreateScriptInfoAndAttachToProject(r){const a=this.projectService.getOrCreateScriptInfoNotOpenedByClient(r,this.currentDirectory,this.directoryStructureHost,!1);if(a){const u=this.rootFilesMap.get(a.path);u&&u.info!==a&&(u.info=a),a.attachToProject(this)}return a}getScriptKind(r){const a=this.projectService.getScriptInfoForPath(this.toPath(r));return a&&a.scriptKind}getScriptVersion(r){const a=this.projectService.getOrCreateScriptInfoNotOpenedByClient(r,this.currentDirectory,this.directoryStructureHost,!1);return a&&a.getLatestVersion()}getScriptSnapshot(r){const a=this.getOrCreateScriptInfoAndAttachToProject(r);if(a)return a.getSnapshot()}getCancellationToken(){return this.cancellationToken}getCurrentDirectory(){return this.currentDirectory}getDefaultLibFileName(){const r=ts(ca(this.projectService.getExecutingFilePath()));return zr(r,IW(this.compilerOptions))}useCaseSensitiveFileNames(){return this.projectService.host.useCaseSensitiveFileNames}readDirectory(r,a,u,h,p){return this.directoryStructureHost.readDirectory(r,a,u,h,p)}readFile(r){return this.projectService.host.readFile(r)}writeFile(r,a){return this.projectService.host.writeFile(r,a)}fileExists(r){const a=this.toPath(r);return!!this.projectService.getScriptInfoForPath(a)||!this.isWatchedMissingFile(a)&&this.directoryStructureHost.fileExists(r)}resolveModuleNameLiterals(r,a,u,h,p,g){return this.resolutionCache.resolveModuleNameLiterals(r,a,u,h,p,g)}getModuleResolutionCache(){return this.resolutionCache.getModuleResolutionCache()}resolveTypeReferenceDirectiveReferences(r,a,u,h,p,g){return this.resolutionCache.resolveTypeReferenceDirectiveReferences(r,a,u,h,p,g)}resolveLibrary(r,a,u,h){return this.resolutionCache.resolveLibrary(r,a,u,h)}directoryExists(r){return this.directoryStructureHost.directoryExists(r)}getDirectories(r){return this.directoryStructureHost.getDirectories(r)}getCachedDirectoryStructureHost(){}toPath(r){return ol(r,this.currentDirectory,this.projectService.toCanonicalFileName)}watchDirectoryOfFailedLookupLocation(r,a,u){return this.projectService.watchFactory.watchDirectory(r,a,u,this.projectService.getWatchOptions(this),Kd.FailedLookupLocations,this)}watchAffectingFileLocation(r,a){return this.projectService.watchFactory.watchFile(r,a,2e3,this.projectService.getWatchOptions(this),Kd.AffectingFileLocation,this)}clearInvalidateResolutionOfFailedLookupTimer(){return this.projectService.throttledOperations.cancel(`${this.getProjectName()}FailedLookupInvalidation`)}scheduleInvalidateResolutionsOfFailedLookupLocations(){this.projectService.throttledOperations.schedule(`${this.getProjectName()}FailedLookupInvalidation`,1e3,()=>{this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()&&this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)})}invalidateResolutionsOfFailedLookupLocations(){this.clearInvalidateResolutionOfFailedLookupTimer()&&this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()&&(this.markAsDirty(),this.projectService.delayEnsureProjectForOpenFiles())}onInvalidatedResolution(){this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)}watchTypeRootsDirectory(r,a,u){return this.projectService.watchFactory.watchDirectory(r,a,u,this.projectService.getWatchOptions(this),Kd.TypeRoots,this)}hasChangedAutomaticTypeDirectiveNames(){return this.resolutionCache.hasChangedAutomaticTypeDirectiveNames()}onChangedAutomaticTypeDirectiveNames(){this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)}getGlobalCache(){return this.getTypeAcquisition().enable?this.projectService.typingsInstaller.globalTypingsCacheLocation:void 0}fileIsOpen(r){return this.projectService.openFiles.has(r)}writeLog(r){this.projectService.logger.info(r)}log(r){this.writeLog(r)}error(r){this.projectService.logger.msg(r,"Err")}setInternalCompilerOptionsForEmittingJsFiles(){(this.projectKind===0||this.projectKind===2)&&(this.compilerOptions.noEmitForJsFiles=!0)}getGlobalProjectErrors(){return $t(this.projectErrors,r=>!r.file)||Vd}getAllProjectErrors(){return this.projectErrors||Vd}setProjectErrors(r){this.projectErrors=r}getLanguageService(r=!0){return r&&Ym(this),this.languageService}getSourceMapper(){return this.getLanguageService().getSourceMapper()}clearSourceMapperCache(){this.languageService.clearSourceMapperCache()}getDocumentPositionMapper(r,a){return this.projectService.getDocumentPositionMapper(this,r,a)}getSourceFileLike(r){return this.projectService.getSourceFileLike(r,this)}shouldEmitFile(r){return r&&!r.isDynamicOrHasMixedContent()&&!this.program.isSourceOfProjectReferenceRedirect(r.path)}getCompileOnSaveAffectedFileList(r){return this.languageServiceEnabled?(Ym(this),this.builderState=$0.create(this.program,this.builderState,!0),es($0.getFilesAffectedBy(this.builderState,this.program,r.path,this.cancellationToken,this.projectService.host),a=>this.shouldEmitFile(this.projectService.getScriptInfoForPath(a.path))?a.fileName:void 0)):[]}emitFile(r,a){if(!this.languageServiceEnabled||!this.shouldEmitFile(r))return{emitSkipped:!0,diagnostics:Vd};const{emitSkipped:u,diagnostics:h,outputFiles:p}=this.getLanguageService().getEmitOutput(r.fileName);if(!u){for(const g of p){const C=wo(g.name,this.currentDirectory);a(C,g.text,g.writeByteOrderMark)}if(this.builderState&&Q_(this.compilerOptions)){const g=p.filter(C=>df(C.name));if(g.length===1){const C=this.program.getSourceFile(r.fileName),b=this.projectService.host.createHash?this.projectService.host.createHash(g[0].text):n8(g[0].text);$0.updateSignatureOfFile(this.builderState,b,C.resolvedPath)}}}return{emitSkipped:u,diagnostics:h}}enableLanguageService(){this.languageServiceEnabled||this.projectService.serverMode===2||(this.languageServiceEnabled=!0,this.lastFileExceededProgramSize=void 0,this.projectService.onUpdateLanguageServiceStateForProject(this,!0))}cleanupProgram(){if(this.program){for(const r of this.program.getSourceFiles())this.detachScriptInfoIfNotRoot(r.fileName);this.program.forEachResolvedProjectReference(r=>this.detachScriptInfoFromProject(r.sourceFile.fileName)),this.program=void 0}}disableLanguageService(r){this.languageServiceEnabled&&(j.assert(this.projectService.serverMode!==2),this.languageService.cleanupSemanticCache(),this.languageServiceEnabled=!1,this.cleanupProgram(),this.lastFileExceededProgramSize=r,this.builderState=void 0,this.autoImportProviderHost&&this.autoImportProviderHost.close(),this.autoImportProviderHost=void 0,this.resolutionCache.closeTypeRootsWatch(),this.clearGeneratedFileWatch(),this.projectService.verifyDocumentRegistry(),this.projectService.onUpdateLanguageServiceStateForProject(this,!1))}getProjectName(){return this.projectName}removeLocalTypingsFromTypeAcquisition(r){return!r.enable||!r.include?r:{...r,include:this.removeExistingTypings(r.include)}}getExternalFiles(r){return Mu(Rr(this.plugins,a=>{if(typeof a.module.getExternalFiles=="function")try{return a.module.getExternalFiles(this,r||0)}catch(u){this.projectService.logger.info(`A plugin threw an exception in getExternalFiles: ${u}`),u.stack&&this.projectService.logger.info(u.stack)}}))}getSourceFile(r){if(this.program)return this.program.getSourceFileByPath(r)}getSourceFileOrConfigFile(r){const a=this.program.getCompilerOptions();return r===a.configFilePath?a.configFile:this.getSourceFile(r)}close(){var r;this.typingsCache&&this.projectService.typingsInstaller.onProjectClosed(this),this.typingsCache=void 0,this.closeWatchingTypingLocations(),this.cleanupProgram(),O(this.externalFiles,a=>this.detachScriptInfoIfNotRoot(a)),this.rootFilesMap.forEach(a=>{var u;return(u=a.info)==null?void 0:u.detachFromProject(this)}),this.projectService.pendingEnsureProjectForOpenFiles=!0,this.rootFilesMap=void 0,this.externalFiles=void 0,this.program=void 0,this.builderState=void 0,this.resolutionCache.clear(),this.resolutionCache=void 0,this.cachedUnresolvedImportsPerFile=void 0,(r=this.packageJsonWatches)==null||r.forEach(a=>{a.projects.delete(this),a.close()}),this.packageJsonWatches=void 0,this.moduleSpecifierCache.clear(),this.moduleSpecifierCache=void 0,this.directoryStructureHost=void 0,this.exportMapCache=void 0,this.projectErrors=void 0,this.plugins.length=0,this.missingFilesMap&&(X_(this.missingFilesMap,d0),this.missingFilesMap=void 0),this.clearGeneratedFileWatch(),this.clearInvalidateResolutionOfFailedLookupTimer(),this.autoImportProviderHost&&this.autoImportProviderHost.close(),this.autoImportProviderHost=void 0,this.noDtsResolutionProject&&this.noDtsResolutionProject.close(),this.noDtsResolutionProject=void 0,this.languageService.dispose(),this.languageService=void 0}detachScriptInfoIfNotRoot(r){const a=this.projectService.getScriptInfo(r);a&&!this.isRoot(a)&&a.detachFromProject(this)}isClosed(){return this.rootFilesMap===void 0}hasRoots(){var r;return!!((r=this.rootFilesMap)!=null&&r.size)}isOrphan(){return!1}getRootFiles(){return this.rootFilesMap&&as(ld(this.rootFilesMap.values(),r=>{var a;return(a=r.info)==null?void 0:a.fileName}))}getRootFilesMap(){return this.rootFilesMap}getRootScriptInfos(){return as(ld(this.rootFilesMap.values(),r=>r.info))}getScriptInfos(){return this.languageServiceEnabled?qt(this.program.getSourceFiles(),r=>{const a=this.projectService.getScriptInfoForPath(r.resolvedPath);return j.assert(!!a,"getScriptInfo",()=>`scriptInfo for a file '${r.fileName}' Path: '${r.path}' / '${r.resolvedPath}' is missing.`),a}):this.getRootScriptInfos()}getExcludedFiles(){return Vd}getFileNames(r,a){if(!this.program)return[];if(!this.languageServiceEnabled){let h=this.getRootFiles();if(this.compilerOptions){const p=v6e(this.compilerOptions);p&&(h||(h=[])).push(p)}return h}const u=[];for(const h of this.program.getSourceFiles())r&&this.program.isSourceFileFromExternalLibrary(h)||u.push(h.fileName);if(!a){const h=this.program.getCompilerOptions().configFile;if(h&&(u.push(h.fileName),h.extendedSourceFiles))for(const p of h.extendedSourceFiles)u.push(p)}return u}getFileNamesWithRedirectInfo(r){return this.getFileNames().map(a=>({fileName:a,isSourceOfProjectReferenceRedirect:r&&this.isSourceOfProjectReferenceRedirect(a)}))}hasConfigFile(r){if(this.program&&this.languageServiceEnabled){const a=this.program.getCompilerOptions().configFile;if(a){if(r===a.fileName)return!0;if(a.extendedSourceFiles){for(const u of a.extendedSourceFiles)if(r===u)return!0}}}return!1}containsScriptInfo(r){if(this.isRoot(r))return!0;if(!this.program)return!1;const a=this.program.getSourceFileByPath(r.path);return!!a&&a.resolvedPath===r.path}containsFile(r,a){const u=this.projectService.getScriptInfoForNormalizedPath(r);return u&&(u.isScriptOpen()||!a)?this.containsScriptInfo(u):!1}isRoot(r){var a,u;return((u=(a=this.rootFilesMap)==null?void 0:a.get(r.path))==null?void 0:u.info)===r}addRoot(r,a){j.assert(!this.isRoot(r)),this.rootFilesMap.set(r.path,{fileName:a||r.fileName,info:r}),r.attachToProject(this),this.markAsDirty()}addMissingFileRoot(r){const a=this.projectService.toPath(r);this.rootFilesMap.set(a,{fileName:r}),this.markAsDirty()}removeFile(r,a,u){this.isRoot(r)&&this.removeRoot(r),a?this.resolutionCache.removeResolutionsOfFile(r.path):this.resolutionCache.invalidateResolutionOfFile(r.path),this.cachedUnresolvedImportsPerFile.delete(r.path),u&&r.detachFromProject(this),this.markAsDirty()}registerFileUpdate(r){(this.updatedFileNames||(this.updatedFileNames=new Set)).add(r)}markFileAsDirty(r){this.markAsDirty(),this.exportMapCache&&!this.exportMapCache.isEmpty()&&(this.changedFilesForExportMapCache||(this.changedFilesForExportMapCache=new Set)).add(r)}markAsDirty(){this.dirty||(this.projectStateVersion++,this.dirty=!0)}markAutoImportProviderAsDirty(){var r;this.autoImportProviderHost||(this.autoImportProviderHost=void 0),(r=this.autoImportProviderHost)==null||r.markAsDirty()}onAutoImportProviderSettingsChanged(){var r;this.autoImportProviderHost===!1?this.autoImportProviderHost=void 0:(r=this.autoImportProviderHost)==null||r.markAsDirty()}onPackageJsonChange(){this.moduleSpecifierCache.clear(),this.autoImportProviderHost&&this.autoImportProviderHost.markAsDirty()}onFileAddedOrRemoved(r){this.hasAddedorRemovedFiles=!0,r&&(this.hasAddedOrRemovedSymlinks=!0)}onDiscoveredSymlink(){this.hasAddedOrRemovedSymlinks=!0}onReleaseOldSourceFile(r,a,u,h){(!h||r.resolvedPath===r.path&&h.resolvedPath!==r.path)&&this.detachScriptInfoFromProject(r.fileName,u)}updateFromProject(){Ym(this)}updateGraph(){var r,a;(r=Zn)==null||r.push(Zn.Phase.Session,"updateGraph",{name:this.projectName,kind:uz[this.projectKind]}),this.resolutionCache.startRecordingFilesWithChangedResolutions();const u=this.updateGraphWorker(),h=this.hasAddedorRemovedFiles;this.hasAddedorRemovedFiles=!1,this.hasAddedOrRemovedSymlinks=!1;const p=this.resolutionCache.finishRecordingFilesWithChangedResolutions()||Vd;for(const C of p)this.cachedUnresolvedImportsPerFile.delete(C);this.languageServiceEnabled&&this.projectService.serverMode===0&&!this.isOrphan()?((u||p.length)&&(this.lastCachedUnresolvedImportsList=UJt(this.program,this.cachedUnresolvedImportsPerFile)),this.enqueueInstallTypingsForProject(h)):this.lastCachedUnresolvedImportsList=void 0;const g=this.projectProgramVersion===0&&u;return u&&this.projectProgramVersion++,h&&this.markAutoImportProviderAsDirty(),g&&this.getPackageJsonAutoImportProvider(),(a=Zn)==null||a.pop(),!u}enqueueInstallTypingsForProject(r){const a=this.getTypeAcquisition();if(!a||!a.enable||this.projectService.typingsInstaller===qY)return;const u=this.typingsCache;(r||!u||HJt(a,u.typeAcquisition)||jJt(this.getCompilationSettings(),u.compilerOptions)||zJt(this.lastCachedUnresolvedImportsList,u.unresolvedImports))&&(this.typingsCache={compilerOptions:this.getCompilationSettings(),typeAcquisition:a,unresolvedImports:this.lastCachedUnresolvedImportsList},this.projectService.typingsInstaller.enqueueInstallTypingsRequest(this,a,this.lastCachedUnresolvedImportsList))}updateTypingFiles(r,a,u,h){this.typingsCache={compilerOptions:r,typeAcquisition:a,unresolvedImports:u};const p=!a||!a.enable?Vd:Mu(h);UJ(p,this.typingFiles,E6(!this.useCaseSensitiveFileNames()),Tc,g=>this.detachScriptInfoFromProject(g))&&(this.typingFiles=p,this.resolutionCache.setFilesWithInvalidatedNonRelativeUnresolvedImports(this.cachedUnresolvedImportsPerFile),this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this))}closeWatchingTypingLocations(){this.typingWatchers&&X_(this.typingWatchers,d0),this.typingWatchers=void 0}onTypingInstallerWatchInvoke(){this.typingWatchers.isInvoked=!0,this.projectService.updateTypingsForProject({projectName:this.getProjectName(),kind:aZ})}watchTypingLocations(r){if(!r){this.typingWatchers.isInvoked=!1;return}if(!r.length){this.closeWatchingTypingLocations();return}const a=new Map(this.typingWatchers);this.typingWatchers||(this.typingWatchers=new Map),this.typingWatchers.isInvoked=!1;const u=(h,p)=>{const g=this.toPath(h);a.delete(g),this.typingWatchers.has(g)||this.typingWatchers.set(g,p==="FileWatcher"?this.projectService.watchFactory.watchFile(h,()=>this.typingWatchers.isInvoked?this.writeLog("TypingWatchers already invoked"):this.onTypingInstallerWatchInvoke(),2e3,this.projectService.getWatchOptions(this),Kd.TypingInstallerLocationFile,this):this.projectService.watchFactory.watchDirectory(h,C=>{if(this.typingWatchers.isInvoked)return this.writeLog("TypingWatchers already invoked");if(!Xl(C,".json"))return this.writeLog("Ignoring files that are not *.json");if(Hb(C,zr(this.projectService.typingsInstaller.globalTypingsCacheLocation,"package.json"),!this.useCaseSensitiveFileNames()))return this.writeLog("Ignoring package.json change at global typings location");this.onTypingInstallerWatchInvoke()},1,this.projectService.getWatchOptions(this),Kd.TypingInstallerLocationDirectory,this))};for(const h of r){const p=ud(h);if(p==="package.json"||p==="bower.json"){u(h,"FileWatcher");continue}if(Vm(this.currentDirectory,h,this.currentDirectory,!this.useCaseSensitiveFileNames())){const g=h.indexOf(Kl,this.currentDirectory.length+1);u(g!==-1?h.substr(0,g):h,"DirectoryWatcher");continue}if(Vm(this.projectService.typingsInstaller.globalTypingsCacheLocation,h,this.currentDirectory,!this.useCaseSensitiveFileNames())){u(this.projectService.typingsInstaller.globalTypingsCacheLocation,"DirectoryWatcher");continue}u(h,"DirectoryWatcher")}a.forEach((h,p)=>{h.close(),this.typingWatchers.delete(p)})}getCurrentProgram(){return this.program}removeExistingTypings(r){if(!r.length)return r;const a=nQ(this.getCompilerOptions(),this.directoryStructureHost);return $t(r,u=>!a.includes(u))}updateGraphWorker(){var r,a;const u=this.languageService.getCurrentProgram();j.assert(u===this.program),j.assert(!this.isClosed(),"Called update graph worker of closed project"),this.writeLog(`Starting updateGraphWorker: Project: ${this.getProjectName()}`);const h=sl(),{hasInvalidatedResolutions:p,hasInvalidatedLibResolutions:g}=this.resolutionCache.createHasInvalidatedResolutions(w1,w1);this.hasInvalidatedResolutions=p,this.hasInvalidatedLibResolutions=g,this.resolutionCache.startCachingPerDirectoryResolution(),this.dirty=!1,this.updateFromProjectInProgress=!0,this.program=this.languageService.getProgram(),this.updateFromProjectInProgress=!1,(r=Zn)==null||r.push(Zn.Phase.Session,"finishCachingPerDirectoryResolution"),this.resolutionCache.finishCachingPerDirectoryResolution(this.program,u),(a=Zn)==null||a.pop(),j.assert(u===void 0||this.program!==void 0);let C=!1;if(this.program&&(!u||this.program!==u&&this.program.structureIsReused!==2)){if(C=!0,this.rootFilesMap.forEach((E,N)=>{var R;const F=this.program.getSourceFileByPath(N),H=E.info;!F||((R=E.info)==null?void 0:R.path)===F.resolvedPath||(E.info=this.projectService.getScriptInfo(F.fileName),j.assert(E.info.isAttached(this)),H==null||H.detachFromProject(this))}),ode(this.program,this.missingFilesMap||(this.missingFilesMap=new Map),(E,N)=>this.addMissingFileWatcher(E,N)),this.generatedFilesMap){const E=this.compilerOptions.outFile;RMe(this.generatedFilesMap)?(!E||!this.isValidGeneratedFileWatcher(s_(E)+".d.ts",this.generatedFilesMap))&&this.clearGeneratedFileWatch():E?this.clearGeneratedFileWatch():this.generatedFilesMap.forEach((N,R)=>{const F=this.program.getSourceFileByPath(R);(!F||F.resolvedPath!==R||!this.isValidGeneratedFileWatcher(hK(F.fileName,this.compilerOptions,this.program),N))&&(Zm(N),this.generatedFilesMap.delete(R))})}this.languageServiceEnabled&&this.projectService.serverMode===0&&this.resolutionCache.updateTypeRootsWatch()}this.projectService.verifyProgram(this),this.exportMapCache&&!this.exportMapCache.isEmpty()&&(this.exportMapCache.releaseSymbols(),this.hasAddedorRemovedFiles||u&&!this.program.structureIsReused?this.exportMapCache.clear():this.changedFilesForExportMapCache&&u&&this.program&&qb(this.changedFilesForExportMapCache,E=>{const N=u.getSourceFileByPath(E),R=this.program.getSourceFileByPath(E);return!N||!R?(this.exportMapCache.clear(),!0):this.exportMapCache.onFileChanged(N,R,!!this.getTypeAcquisition().enable)})),this.changedFilesForExportMapCache&&this.changedFilesForExportMapCache.clear(),(this.hasAddedOrRemovedSymlinks||this.program&&!this.program.structureIsReused&&this.getCompilerOptions().preserveSymlinks)&&(this.symlinks=void 0,this.moduleSpecifierCache.clear());const b=this.externalFiles||Vd;this.externalFiles=this.getExternalFiles(),UJ(this.externalFiles,b,E6(!this.useCaseSensitiveFileNames()),E=>{const N=this.projectService.getOrCreateScriptInfoNotOpenedByClient(E,this.currentDirectory,this.directoryStructureHost,!1);N==null||N.attachToProject(this)},E=>this.detachScriptInfoFromProject(E));const T=sl()-h;return this.sendPerformanceEvent("UpdateGraph",T),this.writeLog(`Finishing updateGraphWorker: Project: ${this.getProjectName()} projectStateVersion: ${this.projectStateVersion} projectProgramVersion: ${this.projectProgramVersion} structureChanged: ${C}${this.program?` structureIsReused:: ${poe[this.program.structureIsReused]}`:""} Elapsed: ${T}ms`),this.projectService.logger.isTestLogger?this.program!==u?this.print(!0,this.hasAddedorRemovedFiles,!0):this.writeLog("Same program as before"):this.hasAddedorRemovedFiles?this.print(!0,!0,!1):this.program!==u&&this.writeLog("Different program with same set of files"),this.projectService.verifyDocumentRegistry(),C}sendPerformanceEvent(r,a){this.projectService.sendPerformanceEvent(r,a)}detachScriptInfoFromProject(r,a){const u=this.projectService.getScriptInfo(r);u&&(u.detachFromProject(this),a||this.resolutionCache.removeResolutionsOfFile(u.path))}addMissingFileWatcher(r,a){var u;if(LS(this)){const p=this.projectService.configFileExistenceInfoCache.get(r);if((u=p==null?void 0:p.config)!=null&&u.projects.has(this.canonicalConfigFilePath))return t5}const h=this.projectService.watchFactory.watchFile(wo(a,this.currentDirectory),(p,g)=>{LS(this)&&this.getCachedDirectoryStructureHost().addOrDeleteFile(p,r,g),g===0&&this.missingFilesMap.has(r)&&(this.missingFilesMap.delete(r),h.close(),this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this))},500,this.projectService.getWatchOptions(this),Kd.MissingFile,this);return h}isWatchedMissingFile(r){return!!this.missingFilesMap&&this.missingFilesMap.has(r)}addGeneratedFileWatch(r,a){if(this.compilerOptions.outFile)this.generatedFilesMap||(this.generatedFilesMap=this.createGeneratedFileWatcher(r));else{const u=this.toPath(a);if(this.generatedFilesMap){if(RMe(this.generatedFilesMap)){j.fail(`${this.projectName} Expected to not have --out watcher for generated file with options: ${JSON.stringify(this.compilerOptions)}`);return}if(this.generatedFilesMap.has(u))return}else this.generatedFilesMap=new Map;this.generatedFilesMap.set(u,this.createGeneratedFileWatcher(r))}}createGeneratedFileWatcher(r){return{generatedFilePath:this.toPath(r),watcher:this.projectService.watchFactory.watchFile(r,()=>{this.clearSourceMapperCache(),this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)},2e3,this.projectService.getWatchOptions(this),Kd.MissingGeneratedFile,this)}}isValidGeneratedFileWatcher(r,a){return this.toPath(r)===a.generatedFilePath}clearGeneratedFileWatch(){this.generatedFilesMap&&(RMe(this.generatedFilesMap)?Zm(this.generatedFilesMap):X_(this.generatedFilesMap,Zm),this.generatedFilesMap=void 0)}getScriptInfoForNormalizedPath(r){const a=this.projectService.getScriptInfoForPath(this.toPath(r));return a&&!a.isAttached(this)?cC.ThrowProjectDoesNotContainDocument(r,this):a}getScriptInfo(r){return this.projectService.getScriptInfo(r)}filesToString(r){return this.filesToStringWorker(r,!0,!1)}filesToStringWorker(r,a,u){if(this.isInitialLoadPending())return` Files (0) InitialLoadPending
+`;if(!this.program)return` Files (0) NoProgram
+`;const h=this.program.getSourceFiles();let p=` Files (${h.length})
+`;if(r){for(const g of h)p+=` ${g.fileName}${u?` ${g.version} ${JSON.stringify(g.text)}`:""}
+`;a&&(p+=`
+
+`,Bde(this.program,g=>p+=` ${g}
+`))}return p}print(r,a,u){var h;this.writeLog(`Project '${this.projectName}' (${uz[this.projectKind]})`),this.writeLog(this.filesToStringWorker(r&&this.projectService.logger.hasLevel(3),a&&this.projectService.logger.hasLevel(3),u&&this.projectService.logger.hasLevel(3))),this.writeLog("-----------------------------------------------"),this.autoImportProviderHost&&this.autoImportProviderHost.print(!1,!1,!1),(h=this.noDtsResolutionProject)==null||h.print(!1,!1,!1)}setCompilerOptions(r){var a;if(r){r.allowNonTsExtensions=!0;const u=this.compilerOptions;this.compilerOptions=r,this.setInternalCompilerOptionsForEmittingJsFiles(),(a=this.noDtsResolutionProject)==null||a.setCompilerOptions(this.getCompilerOptionsForNoDtsResolutionProject()),TG(u,r)&&(this.cachedUnresolvedImportsPerFile.clear(),this.lastCachedUnresolvedImportsList=void 0,this.resolutionCache.onChangesAffectModuleResolution(),this.moduleSpecifierCache.clear()),this.markAsDirty()}}setWatchOptions(r){this.watchOptions=r}getWatchOptions(){return this.watchOptions}setTypeAcquisition(r){r&&(this.typeAcquisition=this.removeLocalTypingsFromTypeAcquisition(r))}getTypeAcquisition(){return this.typeAcquisition||{}}getChangesSinceVersion(r,a){var u,h;const p=a?b=>as(b.entries(),([T,E])=>({fileName:T,isSourceOfProjectReferenceRedirect:E})):b=>as(b.keys());this.isInitialLoadPending()||Ym(this);const g={projectName:this.getProjectName(),version:this.projectProgramVersion,isInferred:_O(this),options:this.getCompilationSettings(),languageServiceDisabled:!this.languageServiceEnabled,lastFileExceededProgramSize:this.lastFileExceededProgramSize},C=this.updatedFileNames;if(this.updatedFileNames=void 0,this.lastReportedFileNames&&r===this.lastReportedVersion){if(this.projectProgramVersion===this.lastReportedVersion&&!C)return{info:g,projectErrors:this.getGlobalProjectErrors()};const b=this.lastReportedFileNames,T=((u=this.externalFiles)==null?void 0:u.map(U=>({fileName:Jl(U),isSourceOfProjectReferenceRedirect:!1})))||Vd,E=Ld(this.getFileNamesWithRedirectInfo(!!a).concat(T),U=>U.fileName,U=>U.isSourceOfProjectReferenceRedirect),N=new Map,R=new Map,F=C?as(C.keys()):[],H=[];return cf(E,(U,q)=>{b.has(q)?a&&U!==b.get(q)&&H.push({fileName:q,isSourceOfProjectReferenceRedirect:U}):N.set(q,U)}),cf(b,(U,q)=>{E.has(q)||R.set(q,U)}),this.lastReportedFileNames=E,this.lastReportedVersion=this.projectProgramVersion,{info:g,changes:{added:p(N),removed:p(R),updated:a?F.map(U=>({fileName:U,isSourceOfProjectReferenceRedirect:this.isSourceOfProjectReferenceRedirect(U)})):F,updatedRedirects:a?H:void 0},projectErrors:this.getGlobalProjectErrors()}}else{const b=this.getFileNamesWithRedirectInfo(!!a),T=((h=this.externalFiles)==null?void 0:h.map(N=>({fileName:Jl(N),isSourceOfProjectReferenceRedirect:!1})))||Vd,E=b.concat(T);return this.lastReportedFileNames=Ld(E,N=>N.fileName,N=>N.isSourceOfProjectReferenceRedirect),this.lastReportedVersion=this.projectProgramVersion,{info:g,files:a?E:E.map(N=>N.fileName),projectErrors:this.getGlobalProjectErrors()}}}removeRoot(r){this.rootFilesMap.delete(r.path)}isSourceOfProjectReferenceRedirect(r){return!!this.program&&this.program.isSourceOfProjectReferenceRedirect(r)}getGlobalPluginSearchPaths(){return[...this.projectService.pluginProbeLocations,zr(this.projectService.getExecutingFilePath(),"../../..")]}enableGlobalPlugins(r){if(!this.projectService.globalPlugins.length)return;const a=this.projectService.host;if(!a.require&&!a.importPlugin){this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded");return}const u=this.getGlobalPluginSearchPaths();for(const h of this.projectService.globalPlugins)h&&(r.plugins&&r.plugins.some(p=>p.name===h)||(this.projectService.logger.info(`Loading global plugin ${h}`),this.enablePlugin({name:h,global:!0},u)))}enablePlugin(r,a){this.projectService.requestEnablePlugin(this,r,a)}enableProxy(r,a){try{if(typeof r!="function"){this.projectService.logger.info(`Skipped loading plugin ${a.name} because it did not expose a proper factory function`);return}const u={config:a,project:this,languageService:this.languageService,languageServiceHost:this,serverHost:this.projectService.host,session:this.projectService.session},h=r({typescript:rht}),p=h.create(u);for(const g of Object.keys(this.languageService))g in p||(this.projectService.logger.info(`Plugin activation warning: Missing proxied method ${g} in created LS. Patching.`),p[g]=this.languageService[g]);this.projectService.logger.info("Plugin validation succeeded"),this.languageService=p,this.plugins.push({name:a.name,module:h})}catch(u){this.projectService.logger.info(`Plugin activation failed: ${u}`)}}onPluginConfigurationChanged(r,a){this.plugins.filter(u=>u.name===r).forEach(u=>{u.module.onConfigurationChanged&&u.module.onConfigurationChanged(a)})}refreshDiagnostics(){this.projectService.sendProjectsUpdatedInBackgroundEvent()}getPackageJsonsVisibleToFile(r,a){return this.projectService.serverMode!==0?Vd:this.projectService.getPackageJsonsVisibleToFile(r,this,a)}getNearestAncestorDirectoryWithPackageJson(r){return this.projectService.getNearestAncestorDirectoryWithPackageJson(r)}getPackageJsonsForAutoImport(r){return this.getPackageJsonsVisibleToFile(zr(this.currentDirectory,Z7),r)}getPackageJsonCache(){return this.projectService.packageJsonCache}getCachedExportInfoMap(){return this.exportMapCache||(this.exportMapCache=bhe(this))}clearCachedExportInfoMap(){var r;(r=this.exportMapCache)==null||r.clear()}getModuleSpecifierCache(){return this.moduleSpecifierCache}includePackageJsonAutoImports(){return this.projectService.includePackageJsonAutoImports()===0||!this.languageServiceEnabled||Dj(this.currentDirectory)||!this.isDefaultProjectForOpenFiles()?0:this.projectService.includePackageJsonAutoImports()}getHostForAutoImportProvider(){var r,a;return this.program?{fileExists:this.program.fileExists,directoryExists:this.program.directoryExists,realpath:this.program.realpath||((r=this.projectService.host.realpath)==null?void 0:r.bind(this.projectService.host)),getCurrentDirectory:this.getCurrentDirectory.bind(this),readFile:this.projectService.host.readFile.bind(this.projectService.host),getDirectories:this.projectService.host.getDirectories.bind(this.projectService.host),trace:(a=this.projectService.host.trace)==null?void 0:a.bind(this.projectService.host),useCaseSensitiveFileNames:this.program.useCaseSensitiveFileNames(),readDirectory:this.projectService.host.readDirectory.bind(this.projectService.host)}:this.projectService.host}getPackageJsonAutoImportProvider(){var r,a,u;if(this.autoImportProviderHost===!1)return;if(this.projectService.serverMode!==0){this.autoImportProviderHost=!1;return}if(this.autoImportProviderHost){if(Ym(this.autoImportProviderHost),this.autoImportProviderHost.isEmpty()){this.autoImportProviderHost.close(),this.autoImportProviderHost=void 0;return}return this.autoImportProviderHost.getCurrentProgram()}const h=this.includePackageJsonAutoImports();if(h){(r=Zn)==null||r.push(Zn.Phase.Session,"getPackageJsonAutoImportProvider");const p=sl();if(this.autoImportProviderHost=VMe.create(h,this,this.getHostForAutoImportProvider(),this.documentRegistry),this.autoImportProviderHost)return Ym(this.autoImportProviderHost),this.sendPerformanceEvent("CreatePackageJsonAutoImportProvider",sl()-p),(a=Zn)==null||a.pop(),this.autoImportProviderHost.getCurrentProgram();(u=Zn)==null||u.pop()}}isDefaultProjectForOpenFiles(){return!!cf(this.projectService.openFiles,(r,a)=>this.projectService.tryGetDefaultProjectForFile(this.projectService.getScriptInfoForPath(a))===this)}watchNodeModulesForPackageJsonChanges(r){return this.projectService.watchPackageJsonsInNodeModules(r,this)}getIncompleteCompletionsCache(){return this.projectService.getIncompleteCompletionsCache()}getNoDtsResolutionProject(r){return j.assert(this.projectService.serverMode===0),this.noDtsResolutionProject||(this.noDtsResolutionProject=new BMe(this.projectService,this.documentRegistry,this.getCompilerOptionsForNoDtsResolutionProject(),this.currentDirectory)),this.noDtsResolutionProject.rootFile!==r&&(this.projectService.setFileNamesOfAutpImportProviderOrAuxillaryProject(this.noDtsResolutionProject,[r]),this.noDtsResolutionProject.rootFile=r),this.noDtsResolutionProject}runWithTemporaryFileUpdate(r,a,u){var h,p,g,C;const b=this.program,T=j.checkDefined((h=this.program)==null?void 0:h.getSourceFile(r),"Expected file to be part of program"),E=j.checkDefined(T.getFullText());(p=this.getScriptInfo(r))==null||p.editContent(0,E.length,a),this.updateGraph();try{u(this.program,b,(g=this.program)==null?void 0:g.getSourceFile(r))}finally{(C=this.getScriptInfo(r))==null||C.editContent(0,a.length,E)}}getCompilerOptionsForNoDtsResolutionProject(){return{...this.getCompilerOptions(),noDtsResolution:!0,allowJs:!0,maxNodeModuleJsDepth:3,diagnostics:!1,skipLibCheck:!0,sourceMap:!1,types:w,lib:w,noLib:!0}}};function UJt(t,r){var a,u;const h=t.getSourceFiles();(a=Zn)==null||a.push(Zn.Phase.Session,"getUnresolvedImports",{count:h.length});const p=t.getTypeChecker().getAmbientModules().map(C=>zm(C.getName())),g=Iy(Rr(h,C=>qJt(t,C,p,r)));return(u=Zn)==null||u.pop(),g}function qJt(t,r,a,u){return mp(u,r.path,()=>{let h;return t.forEachResolvedModule(({resolvedModule:p},g)=>{(!p||!t7(p.extension))&&!Gd(g)&&!a.some(C=>C===g)&&(h=fn(h,cQ(g).packageName))},r),h||Vd})}var FMe=class extends xA{constructor(t,r,a,u,h,p,g){super(t.newInferredProjectName(),0,t,r,void 0,void 0,a,!1,u,t.host,p),this._isJsInferredProject=!1,this.typeAcquisition=g,this.projectRootPath=h&&t.toCanonicalFileName(h),!h&&!t.useSingleInferredProject&&(this.canonicalCurrentDirectory=t.toCanonicalFileName(this.currentDirectory)),this.enableGlobalPlugins(this.getCompilerOptions())}toggleJsInferredProject(t){t!==this._isJsInferredProject&&(this._isJsInferredProject=t,this.setCompilerOptions())}setCompilerOptions(t){if(!t&&!this.getCompilationSettings())return;const r=Ffe(t||this.getCompilationSettings());this._isJsInferredProject&&typeof r.maxNodeModuleJsDepth!="number"?r.maxNodeModuleJsDepth=2:this._isJsInferredProject||(r.maxNodeModuleJsDepth=void 0),r.allowJs=!0,super.setCompilerOptions(r)}addRoot(t){j.assert(t.isScriptOpen()),this.projectService.startWatchingConfigFilesForInferredProjectRoot(t),!this._isJsInferredProject&&t.isJavaScript()?this.toggleJsInferredProject(!0):this.isOrphan()&&this._isJsInferredProject&&!t.isJavaScript()&&this.toggleJsInferredProject(!1),super.addRoot(t)}removeRoot(t){this.projectService.stopWatchingConfigFilesForScriptInfo(t),super.removeRoot(t),!this.isOrphan()&&this._isJsInferredProject&&t.isJavaScript()&&Ce(this.getRootScriptInfos(),r=>!r.isJavaScript())&&this.toggleJsInferredProject(!1)}isOrphan(){return!this.hasRoots()}isProjectWithSingleRoot(){return!this.projectRootPath&&!this.projectService.useSingleInferredProject||this.getRootScriptInfos().length===1}close(){O(this.getRootScriptInfos(),t=>this.projectService.stopWatchingConfigFilesForScriptInfo(t)),super.close()}getTypeAcquisition(){return this.typeAcquisition||{enable:AMe(this),include:w,exclude:w}}},BMe=class extends xA{constructor(t,r,a,u){super(t.newAuxiliaryProjectName(),4,t,r,!1,void 0,a,!1,void 0,t.host,u)}isOrphan(){return!0}scheduleInvalidateResolutionsOfFailedLookupLocations(){}},WMe=class Lqe extends xA{constructor(r,a,u,h){super(r.projectService.newAutoImportProviderProjectName(),3,r.projectService,u,!1,void 0,h,!1,r.getWatchOptions(),r.projectService.host,r.currentDirectory),this.hostProject=r,this.rootFileNames=a,this.useSourceOfProjectReferenceRedirect=to(this.hostProject,this.hostProject.useSourceOfProjectReferenceRedirect),this.getParsedCommandLine=to(this.hostProject,this.hostProject.getParsedCommandLine)}static getRootFileNames(r,a,u,h){var p,g;if(!r)return w;const C=a.getCurrentProgram();if(!C)return w;const b=sl();let T,E;const N=zr(a.currentDirectory,Z7),R=a.getPackageJsonsForAutoImport(zr(a.currentDirectory,N));for(const re of R)(p=re.dependencies)==null||p.forEach((oe,pe)=>X(pe)),(g=re.peerDependencies)==null||g.forEach((oe,pe)=>X(pe));let F=0;if(T){const re=a.getSymlinkCache();for(const oe of as(T.keys())){if(r===2&&F>this.maxDependencies)return a.log(`AutoImportProviderProject: attempted to add more than ${this.maxDependencies} dependencies. Aborting.`),w;const pe=fue(oe,a.currentDirectory,h,u,C.getModuleResolutionCache());if(pe){const ue=Z(pe,C,re);if(ue){F+=q(ue);continue}}if(!O([a.currentDirectory,a.getGlobalTypingsCacheLocation()],ue=>{if(ue){const Ie=fue(`@types/${oe}`,ue,h,u,C.getModuleResolutionCache());if(Ie){const we=Z(Ie,C,re);return F+=q(we),!0}}})&&pe&&h.allowJs&&h.maxNodeModuleJsDepth){const ue=Z(pe,C,re,!0);F+=q(ue)}}}const H=C.getResolvedProjectReferences();let U=0;return H!=null&&H.length&&a.projectService.getHostPreferences().includeCompletionsForModuleExports&&H.forEach(re=>{if(re!=null&&re.commandLine.options.outFile)U+=q(Q([cx(re.commandLine.options.outFile,".d.ts")]));else if(re){const oe=Bh(()=>oA(re.commandLine,!a.useCaseSensitiveFileNames()));U+=q(Q(es(re.commandLine.fileNames,pe=>!df(pe)&&!Xl(pe,".json")&&!C.getSourceFile(pe)?j3(pe,re.commandLine,!a.useCaseSensitiveFileNames(),oe):void 0)))}}),E!=null&&E.size&&a.log(`AutoImportProviderProject: found ${E.size} root files in ${F} dependencies ${U} referenced projects in ${sl()-b} ms`),E?as(E.values()):w;function q(re){return re!=null&&re.length?(E??(E=new Set),re.forEach(oe=>E.add(oe)),1):0}function X(re){so(re,"@types/")||(T||(T=new Set)).add(re)}function Z(re,oe,pe,de){var ue;const Ie=yue(re,h,u,oe.getModuleResolutionCache(),de);if(Ie){const we=(ue=u.realpath)==null?void 0:ue.call(u,re.packageDirectory),he=we?a.toPath(we):void 0,Ae=he&&he!==a.toPath(re.packageDirectory);return Ae&&pe.setSymlinkedDirectory(re.packageDirectory,{real:Ad(we),realPath:Ad(he)}),Q(Ie,Ae?ke=>ke.replace(re.packageDirectory,we):void 0)}}function Q(re,oe){return es(re,pe=>{const de=oe?oe(pe):pe;if(!C.getSourceFile(de)&&!(oe&&C.getSourceFile(pe)))return de})}}static create(r,a,u,h){if(r===0)return;const p={...a.getCompilerOptions(),...this.compilerOptionsOverrides},g=this.getRootFileNames(r,a,u,p);if(g.length)return new Lqe(a,g,h,p)}isEmpty(){return!Ft(this.rootFileNames)}isOrphan(){return!0}updateGraph(){let r=this.rootFileNames;r||(r=Lqe.getRootFileNames(this.hostProject.includePackageJsonAutoImports(),this.hostProject,this.hostProject.getHostForAutoImportProvider(),this.getCompilationSettings())),this.projectService.setFileNamesOfAutpImportProviderOrAuxillaryProject(this,r),this.rootFileNames=r;const a=this.getCurrentProgram(),u=super.updateGraph();return a&&a!==this.getCurrentProgram()&&this.hostProject.clearCachedExportInfoMap(),u}scheduleInvalidateResolutionsOfFailedLookupLocations(){}hasRoots(){var r;return!!((r=this.rootFileNames)!=null&&r.length)}markAsDirty(){this.rootFileNames=void 0,super.markAsDirty()}getScriptFileNames(){return this.rootFileNames||w}getLanguageService(){throw new Error("AutoImportProviderProject language service should never be used. To get the program, use `project.getCurrentProgram()`.")}onAutoImportProviderSettingsChanged(){throw new Error("AutoImportProviderProject is an auto import provider; use `markAsDirty()` instead.")}onPackageJsonChange(){throw new Error("package.json changes should be notified on an AutoImportProvider's host project")}getHostForAutoImportProvider(){throw new Error("AutoImportProviderProject cannot provide its own host; use `hostProject.getModuleResolutionHostForAutomImportProvider()` instead.")}getProjectReferences(){return this.hostProject.getProjectReferences()}includePackageJsonAutoImports(){return 0}getSymlinkCache(){return this.hostProject.getSymlinkCache()}getModuleResolutionCache(){var r;return(r=this.hostProject.getCurrentProgram())==null?void 0:r.getModuleResolutionCache()}};WMe.maxDependencies=10,WMe.compilerOptionsOverrides={diagnostics:!1,skipLibCheck:!0,sourceMap:!1,types:w,lib:w,noLib:!0};var VMe=WMe,HMe=class extends xA{constructor(t,r,a,u,h,p){super(t,1,a,u,!1,void 0,{},!1,void 0,h,ts(t)),this.canonicalConfigFilePath=r,this.openFileWatchTriggered=new Map,this.canConfigFileJsonReportNoInputFiles=!1,this.isInitialLoadPending=Pk,this.sendLoadingProjectFinish=!1,this.pendingUpdateLevel=2,this.pendingUpdateReason=p}setCompilerHost(t){this.compilerHost=t}getCompilerHost(){return this.compilerHost}useSourceOfProjectReferenceRedirect(){return this.languageServiceEnabled}getParsedCommandLine(t){const r=ca(t),a=this.projectService.toCanonicalFileName(r);let u=this.projectService.configFileExistenceInfoCache.get(a);return u||this.projectService.configFileExistenceInfoCache.set(a,u={exists:this.projectService.host.fileExists(r)}),this.projectService.ensureParsedConfigUptoDate(r,a,u,this),this.languageServiceEnabled&&this.projectService.serverMode===0&&this.projectService.watchWildcards(r,u,this),u.exists?u.config.parsedCommandLine:void 0}onReleaseParsedCommandLine(t){this.releaseParsedConfig(this.projectService.toCanonicalFileName(ca(t)))}releaseParsedConfig(t){this.projectService.stopWatchingWildCards(t,this),this.projectService.releaseParsedConfig(t,this)}updateGraph(){if(this.deferredClose)return!1;const t=this.dirty;this.isInitialLoadPending=w1;const r=this.pendingUpdateLevel;this.pendingUpdateLevel=0;let a;switch(r){case 1:this.openFileWatchTriggered.clear(),a=this.projectService.reloadFileNamesOfConfiguredProject(this);break;case 2:this.openFileWatchTriggered.clear();const u=j.checkDefined(this.pendingUpdateReason);this.projectService.reloadConfiguredProject(this,u),a=!0;break;default:a=super.updateGraph()}return this.compilerHost=void 0,this.projectService.sendProjectLoadingFinishEvent(this),this.projectService.sendProjectTelemetry(this),r===2||a&&(!t||!this.triggerFileForConfigFileDiag||this.getCurrentProgram().structureIsReused===2)?this.triggerFileForConfigFileDiag=void 0:this.triggerFileForConfigFileDiag||this.projectService.sendConfigFileDiagEvent(this,void 0,!1),a}getCachedDirectoryStructureHost(){return this.directoryStructureHost}getConfigFilePath(){return this.getProjectName()}getProjectReferences(){return this.projectReferences}updateReferences(t){this.projectReferences=t,this.potentialProjectReferences=void 0}setPotentialProjectReference(t){j.assert(this.isInitialLoadPending()),(this.potentialProjectReferences||(this.potentialProjectReferences=new Set)).add(t)}getResolvedProjectReferenceToRedirect(t){const r=this.getCurrentProgram();return r&&r.getResolvedProjectReferenceToRedirect(t)}forEachResolvedProjectReference(t){var r;return(r=this.getCurrentProgram())==null?void 0:r.forEachResolvedProjectReference(t)}enablePluginsWithOptions(t){var r;if(this.plugins.length=0,!((r=t.plugins)!=null&&r.length)&&!this.projectService.globalPlugins.length)return;const a=this.projectService.host;if(!a.require&&!a.importPlugin){this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded");return}const u=this.getGlobalPluginSearchPaths();if(this.projectService.allowLocalPluginLoads){const h=ts(this.canonicalConfigFilePath);this.projectService.logger.info(`Local plugin loading enabled; adding ${h} to search paths`),u.unshift(h)}if(t.plugins)for(const h of t.plugins)this.enablePlugin(h,u);return this.enableGlobalPlugins(t)}getGlobalProjectErrors(){return $t(this.projectErrors,t=>!t.file)||Vd}getAllProjectErrors(){return this.projectErrors||Vd}setProjectErrors(t){this.projectErrors=t}close(){this.projectService.configFileExistenceInfoCache.forEach((t,r)=>this.releaseParsedConfig(r)),this.projectErrors=void 0,this.openFileWatchTriggered.clear(),this.compilerHost=void 0,super.close()}markAsDirty(){this.deferredClose||super.markAsDirty()}isSolution(){return this.getRootFilesMap().size===0&&!this.canConfigFileJsonReportNoInputFiles}isOrphan(){return!!this.deferredClose}getEffectiveTypeRoots(){return F7(this.getCompilationSettings(),this)||[]}updateErrorOnNoInputFiles(t){YX(t,this.getConfigFilePath(),this.getCompilerOptions().configFile.configFileSpecs,this.projectErrors,this.canConfigFileJsonReportNoInputFiles)}},gpe=class extends xA{constructor(t,r,a,u,h,p,g,C){super(t,2,r,a,!0,h,u,p,C,r.host,ts(g||Rf(t))),this.externalProjectName=t,this.compileOnSaveEnabled=p,this.excludedFiles=[],this.enableGlobalPlugins(this.getCompilerOptions())}updateGraph(){const t=super.updateGraph();return this.projectService.sendProjectTelemetry(this),t}getExcludedFiles(){return this.excludedFiles}};function _O(t){return t.projectKind===0}function LS(t){return t.projectKind===1}function fz(t){return t.projectKind===2}function hz(t){return t.projectKind===3||t.projectKind===4}function jY(t){return LS(t)&&!!t.deferredClose}var ype=20*1024*1024,vpe=4*1024*1024,zY="projectsUpdatedInBackground",bpe="projectLoadingStart",Cpe="projectLoadingFinish",Spe="largeFileReferenced",wpe="configFileDiag",xpe="projectLanguageServiceState",kpe="projectInfo",jMe="openFileInfo",Tpe="createFileWatcher",Dpe="createDirectoryWatcher",Epe="closeFileWatcher",xht="*ensureProjectForOpenFiles*";function kht(t){const r=new Map;for(const a of t)if(typeof a.type=="object"){const u=a.type;u.forEach(h=>{j.assert(typeof h=="number")}),r.set(a.name,u)}return r}var $Jt=kht(U0),JJt=kht(eA),GJt=new Map(Object.entries({none:0,block:1,smart:2})),zMe={jquery:{match:/jquery(-[\d.]+)?(\.intellisense)?(\.min)?\.js$/i,types:["jquery"]},WinJS:{match:/^(.*\/winjs-[.\d]+)\/js\/base\.js$/i,exclude:[["^",1,"/.*"]],types:["winjs"]},Kendo:{match:/^(.*\/kendo(-ui)?)\/kendo\.all(\.min)?\.js$/i,exclude:[["^",1,"/.*"]],types:["kendo-ui"]},"Office Nuget":{match:/^(.*\/office\/1)\/excel-\d+\.debug\.js$/i,exclude:[["^",1,"/.*"]],types:["office"]},References:{match:/^(.*\/_references\.js)$/i,exclude:[["^",1,"$"]]}};function pO(t){return Oo(t.indentStyle)&&(t.indentStyle=GJt.get(t.indentStyle.toLowerCase()),j.assert(t.indentStyle!==void 0)),t}function UY(t){return $Jt.forEach((r,a)=>{const u=t[a];Oo(u)&&(t[a]=r.get(u.toLowerCase()))}),t}function _z(t,r){let a,u;return eA.forEach(h=>{const p=t[h.name];if(p===void 0)return;const g=JJt.get(h.name);(a||(a={}))[h.name]=g?Oo(p)?g.get(p.toLowerCase()):p:BI(h,p,r||"",u||(u=[]))}),a&&{watchOptions:a,errors:u}}function UMe(t){let r;return zX.forEach(a=>{const u=t[a.name];u!==void 0&&((r||(r={}))[a.name]=u)}),r}function Ipe(t){return Oo(t)?Npe(t):t}function Npe(t){switch(t){case"JS":return 1;case"JSX":return 2;case"TS":return 3;case"TSX":return 4;default:return 0}}function qMe(t){const{lazyConfiguredProjectsFromExternalProject:r,...a}=t;return a}var Lpe={getFileName:t=>t,getScriptKind:(t,r)=>{let a;if(r){const u=L6(t);u&&Ft(r,h=>h.extension===u?(a=h.scriptKind,!0):!1)}return a},hasMixedContent:(t,r)=>Ft(r,a=>a.isMixedContent&&Xl(t,a.extension))},Ppe={getFileName:t=>t.fileName,getScriptKind:t=>Ipe(t.scriptKind),hasMixedContent:t=>!!t.hasMixedContent};function Tht(t,r){for(const a of r)if(a.getProjectName()===t)return a}var qY={isKnownTypesPackageName:w1,installPackage:wa,enqueueInstallTypingsRequest:Tc,attach:Tc,onProjectClosed:Tc,globalTypingsCacheLocation:void 0},$Me={close:Tc};function Dht(t,r){if(!(!r||Ape(t)))return r.get(t.path)}function KJt(t){return!!t.containingProjects}function Ape(t){return!!t.configFileInfo}var JMe=(t=>(t[t.Find=0]="Find",t[t.Create=1]="Create",t[t.Reload=2]="Reload",t))(JMe||{});function XJt(t,r,a,u,h,p,g,C){for(;;){if(!r.isInitialLoadPending()&&(!r.getCompilerOptions().composite||r.getCompilerOptions().disableSolutionSearching))return;const b=r.projectService.getConfigFileNameForFile({fileName:r.getConfigFilePath(),path:t.path,configFileInfo:!0},u===0);if(!b)return;const T=r.projectService.findCreateOrReloadConfiguredProject(b,u,h,p,void 0,g,!0,C);if(!T)return;T.project.isInitialLoadPending()&&r.getCompilerOptions().composite&&T.project.setPotentialProjectReference(r.canonicalConfigFilePath);const E=a(T.project);if(E)return E;r=T.project}}function Eht(t,r,a,u,h,p,g,C){var b;const T=(b=t.getCurrentProgram())==null?void 0:b.getResolvedProjectReferences();if(!T)return;const E=r?t.getResolvedProjectReferenceToRedirect(r):void 0;if(E){const F=Jl(E.sourceFile.fileName),H=t.projectService.findConfiguredProjectByProjectName(F,p);if(H){const U=R(H);if(U)return U}else if(u!==0){const U=GMe(T,t.getCompilerOptions(),(q,X)=>E===q?N(q,X):void 0,u,t.projectService);if(U)return U}}return GMe(T,t.getCompilerOptions(),(F,H)=>E!==F?N(F,H):void 0,u,t.projectService);function N(F,H){const U=t.projectService.findCreateOrReloadConfiguredProject(Jl(F.sourceFile.fileName),H,h,p,g,C);return U&&(H===u?a(U.project,U.sentConfigFileDiag):R(U.project))}function R(F){let H=!1;switch(u){case 1:H=Pht(F,g);break;case 2:H=F.projectService.reloadConfiguredProjectClearingSemanticCache(F,h,C);break;case 0:break;default:j.assertNever(u)}const U=a(F,H);if(U)return U}}function GMe(t,r,a,u,h,p){const g=r.disableReferencedProjectLoad?0:u;return O(t,C=>{if(!C)return;const b=Jl(C.sourceFile.fileName),T=h.toCanonicalFileName(b),E=p==null?void 0:p.get(T);if(E!==void 0&&E>=g)return;const N=a(C,g);return N||((p||(p=new Map)).set(T,g),C.references&&GMe(C.references,C.commandLine.options,a,g,h,p))})}function Iht(t,r){return t.potentialProjectReferences&&qb(t.potentialProjectReferences,r)}function QJt(t,r,a,u){return t.getCurrentProgram()?t.forEachResolvedProjectReference(r):t.isInitialLoadPending()?Iht(t,u):O(t.getProjectReferences(),a)}function KMe(t,r,a){const u=a&&t.projectService.configuredProjects.get(a);return u&&r(u)}function Nht(t,r){return QJt(t,a=>KMe(t,r,a.sourceFile.path),a=>KMe(t,r,t.toPath(q3(a))),a=>KMe(t,r,a))}function ZJt(t,r){return`${Oo(r)?`Config: ${r} `:r?`Project: ${r.getProjectName()} `:""}WatchType: ${t}`}function XMe(t){return!t.isScriptOpen()&&t.mTime!==void 0}function Ym(t){return t.invalidateResolutionsOfFailedLookupLocations(),t.dirty&&!t.updateGraph()}function Lht(t,r,a){if(!a&&(t.invalidateResolutionsOfFailedLookupLocations(),!t.dirty))return!1;t.triggerFileForConfigFileDiag=r;const u=t.pendingUpdateLevel;if(t.updateGraph(),!t.triggerFileForConfigFileDiag&&!a)return u===2;const h=t.projectService.sendConfigFileDiagEvent(t,r,a);return t.triggerFileForConfigFileDiag=void 0,h}function Pht(t,r){if(r){if(Lht(t,r,!1))return!0}else Ym(t);return!1}function Aht(t){return`Creating possible configured project for ${t.fileName} to open`}function Ope(t){return`User requested reload projects: ${t}`}function QMe(t){LS(t)&&(t.projectOptions=!0)}function ZMe(t){let r=1;return()=>t(r++)}function YMe(){return{idToCallbacks:new Map,pathToId:new Map}}function Oht(t,r){return!!r&&!!t.eventHandler&&!!t.session}function YJt(t,r){if(!Oht(t,r))return;const a=YMe(),u=YMe(),h=YMe();let p=1;return t.session.addProtocolHandler("watchChange",F=>(T(F.arguments),{responseRequired:!1})),{watchFile:g,watchDirectory:C,getCurrentDirectory:()=>t.host.getCurrentDirectory(),useCaseSensitiveFileNames:t.host.useCaseSensitiveFileNames};function g(F,H){return b(a,F,H,U=>({eventName:Tpe,data:{id:U,path:F}}))}function C(F,H,U){return b(U?h:u,F,H,q=>({eventName:Dpe,data:{id:q,path:F,recursive:!!U,ignoreUpdate:F.endsWith("/node_modules")?void 0:!0}}))}function b({pathToId:F,idToCallbacks:H},U,q,X){const Z=t.toPath(U);let Q=F.get(Z);Q||F.set(Z,Q=p++);let re=H.get(Q);return re||(H.set(Q,re=new Set),t.eventHandler(X(Q))),re.add(q),{close(){const oe=H.get(Q);oe!=null&&oe.delete(q)&&(oe.size||(H.delete(Q),F.delete(Z),t.eventHandler({eventName:Epe,data:{id:Q}})))}}}function T(F){Ao(F)?F.forEach(E):E(F)}function E({id:F,created:H,deleted:U,updated:q}){N(F,H,0),N(F,U,2),N(F,q,1)}function N(F,H,U){H!=null&&H.length&&(R(a,F,H,(q,X)=>q(X,U)),R(u,F,H,(q,X)=>q(X)),R(h,F,H,(q,X)=>q(X)))}function R(F,H,U,q){var X;(X=F.idToCallbacks.get(H))==null||X.forEach(Z=>{U.forEach(Q=>q(Z,Rf(Q)))})}}var Mht=class Pqe{constructor(r){this.filenameToScriptInfo=new Map,this.nodeModulesWatchers=new Map,this.filenameToScriptInfoVersion=new Map,this.allJsFilesForOpenFileTelemetry=new Map,this.externalProjectToConfiguredProjectMap=new Map,this.externalProjects=[],this.inferredProjects=[],this.configuredProjects=new Map,this.newInferredProjectName=ZMe(wMe),this.newAutoImportProviderProjectName=ZMe(xMe),this.newAuxiliaryProjectName=ZMe(kMe),this.openFiles=new Map,this.configFileForOpenFiles=new Map,this.rootOfInferredProjects=new Set,this.openFilesWithNonRootedDiskPath=new Map,this.compilerOptionsForInferredProjectsPerProjectRoot=new Map,this.watchOptionsForInferredProjectsPerProjectRoot=new Map,this.typeAcquisitionForInferredProjectsPerProjectRoot=new Map,this.projectToSizeMap=new Map,this.configFileExistenceInfoCache=new Map,this.safelist=zMe,this.legacySafelist=new Map,this.pendingProjectUpdates=new Map,this.pendingEnsureProjectForOpenFiles=!1,this.seenProjects=new Map,this.sharedExtendedConfigFileWatchers=new Map,this.extendedConfigCache=new Map,this.baseline=Tc,this.verifyDocumentRegistry=Tc,this.verifyProgram=Tc,this.onProjectCreation=Tc;var a;this.host=r.host,this.logger=r.logger,this.cancellationToken=r.cancellationToken,this.useSingleInferredProject=r.useSingleInferredProject,this.useInferredProjectPerProjectRoot=r.useInferredProjectPerProjectRoot,this.typingsInstaller=r.typingsInstaller||qY,this.throttleWaitMilliseconds=r.throttleWaitMilliseconds,this.eventHandler=r.eventHandler,this.suppressDiagnosticEvents=r.suppressDiagnosticEvents,this.globalPlugins=r.globalPlugins||Vd,this.pluginProbeLocations=r.pluginProbeLocations||Vd,this.allowLocalPluginLoads=!!r.allowLocalPluginLoads,this.typesMapLocation=r.typesMapLocation===void 0?zr(ts(this.getExecutingFilePath()),"typesMap.json"):r.typesMapLocation,this.session=r.session,this.jsDocParsingMode=r.jsDocParsingMode,r.serverMode!==void 0?this.serverMode=r.serverMode:this.serverMode=0,this.host.realpath&&(this.realpathToScriptInfos=Of()),this.currentDirectory=Jl(this.host.getCurrentDirectory()),this.toCanonicalFileName=Mf(this.host.useCaseSensitiveFileNames),this.globalCacheLocationDirectoryPath=this.typingsInstaller.globalTypingsCacheLocation?Ad(this.toPath(this.typingsInstaller.globalTypingsCacheLocation)):void 0,this.throttledOperations=new DMe(this.host,this.logger),this.typesMapLocation?this.loadTypesMap():this.logger.info("No types map provided; using the default"),this.typingsInstaller.attach(this),this.hostConfiguration={formatCodeOptions:uZ(this.host.newLine),preferences:Bg,hostInfo:"Unknown host",extraFileExtensions:[]},this.documentRegistry=khe(this.host.useCaseSensitiveFileNames,this.currentDirectory,this.jsDocParsingMode,this);const u=this.logger.hasLevel(3)?2:this.logger.loggingEnabled()?1:0,h=u!==0?p=>this.logger.info(p):Tc;this.packageJsonCache=rRe(this),this.watchFactory=this.serverMode!==0?{watchFile:i5,watchDirectory:i5}:ade(YJt(this,r.canUseWatchEvents)||this.host,u,h,ZJt),this.canUseWatchEvents=Oht(this,r.canUseWatchEvents),(a=r.incrementalVerifier)==null||a.call(r,this)}toPath(r){return ol(r,this.currentDirectory,this.toCanonicalFileName)}getExecutingFilePath(){return this.getNormalizedAbsolutePath(this.host.getExecutingFilePath())}getNormalizedAbsolutePath(r){return wo(r,this.host.getCurrentDirectory())}setDocument(r,a,u){const h=j.checkDefined(this.getScriptInfoForPath(a));h.cacheSourceFile={key:r,sourceFile:u}}getDocument(r,a){const u=this.getScriptInfoForPath(a);return u&&u.cacheSourceFile&&u.cacheSourceFile.key===r?u.cacheSourceFile.sourceFile:void 0}ensureInferredProjectsUpToDate_TestOnly(){this.ensureProjectStructuresUptoDate()}getCompilerOptionsForInferredProjects(){return this.compilerOptionsForInferredProjects}onUpdateLanguageServiceStateForProject(r,a){if(!this.eventHandler)return;const u={eventName:xpe,data:{project:r,languageServiceEnabled:a}};this.eventHandler(u)}loadTypesMap(){try{const r=this.host.readFile(this.typesMapLocation);if(r===void 0){this.logger.info(`Provided types map file "${this.typesMapLocation}" doesn't exist`);return}const a=JSON.parse(r);for(const u of Object.keys(a.typesMap))a.typesMap[u].match=new RegExp(a.typesMap[u].match,"i");this.safelist=a.typesMap;for(const u in a.simpleMap)Li(a.simpleMap,u)&&this.legacySafelist.set(u,a.simpleMap[u].toLowerCase())}catch(r){this.logger.info(`Error loading types map: ${r}`),this.safelist=zMe,this.legacySafelist.clear()}}updateTypingsForProject(r){const a=this.findProject(r.projectName);if(a)switch(r.kind){case oZ:a.updateTypingFiles(r.compilerOptions,r.typeAcquisition,r.unresolvedImports,r.typings);return;case aZ:a.enqueueInstallTypingsForProject(!0);return}}watchTypingLocations(r){var a;(a=this.findProject(r.projectName))==null||a.watchTypingLocations(r.files)}delayEnsureProjectForOpenFiles(){this.openFiles.size&&(this.pendingEnsureProjectForOpenFiles=!0,this.throttledOperations.schedule(xht,2500,()=>{this.pendingProjectUpdates.size!==0?this.delayEnsureProjectForOpenFiles():this.pendingEnsureProjectForOpenFiles&&(this.ensureProjectForOpenFiles(),this.sendProjectsUpdatedInBackgroundEvent())}))}delayUpdateProjectGraph(r){if(jY(r)||(r.markAsDirty(),hz(r)))return;const a=r.getProjectName();this.pendingProjectUpdates.set(a,r),this.throttledOperations.schedule(a,250,()=>{this.pendingProjectUpdates.delete(a)&&Ym(r)})}hasPendingProjectUpdate(r){return this.pendingProjectUpdates.has(r.getProjectName())}sendProjectsUpdatedInBackgroundEvent(){if(!this.eventHandler)return;const r={eventName:zY,data:{openFiles:as(this.openFiles.keys(),a=>this.getScriptInfoForPath(a).fileName)}};this.eventHandler(r)}sendLargeFileReferencedEvent(r,a){if(!this.eventHandler)return;const u={eventName:Spe,data:{file:r,fileSize:a,maxFileSize:vpe}};this.eventHandler(u)}sendProjectLoadingStartEvent(r,a){if(!this.eventHandler)return;r.sendLoadingProjectFinish=!0;const u={eventName:bpe,data:{project:r,reason:a}};this.eventHandler(u)}sendProjectLoadingFinishEvent(r){if(!this.eventHandler||!r.sendLoadingProjectFinish)return;r.sendLoadingProjectFinish=!1;const a={eventName:Cpe,data:{project:r}};this.eventHandler(a)}sendPerformanceEvent(r,a){this.performanceEventHandler&&this.performanceEventHandler({kind:r,durationMs:a})}delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(r){this.delayUpdateProjectGraph(r),this.delayEnsureProjectForOpenFiles()}delayUpdateProjectGraphs(r,a){if(r.length){for(const u of r)a&&u.clearSourceMapperCache(),this.delayUpdateProjectGraph(u);this.delayEnsureProjectForOpenFiles()}}setCompilerOptionsForInferredProjects(r,a){j.assert(a===void 0||this.useInferredProjectPerProjectRoot,"Setting compiler options per project root path is only supported when useInferredProjectPerProjectRoot is enabled");const u=UY(r),h=_z(r,a),p=UMe(r);u.allowNonTsExtensions=!0;const g=a&&this.toCanonicalFileName(a);g?(this.compilerOptionsForInferredProjectsPerProjectRoot.set(g,u),this.watchOptionsForInferredProjectsPerProjectRoot.set(g,h||!1),this.typeAcquisitionForInferredProjectsPerProjectRoot.set(g,p)):(this.compilerOptionsForInferredProjects=u,this.watchOptionsForInferredProjects=h,this.typeAcquisitionForInferredProjects=p);for(const C of this.inferredProjects)(g?C.projectRootPath===g:!C.projectRootPath||!this.compilerOptionsForInferredProjectsPerProjectRoot.has(C.projectRootPath))&&(C.setCompilerOptions(u),C.setTypeAcquisition(p),C.setWatchOptions(h==null?void 0:h.watchOptions),C.setProjectErrors(h==null?void 0:h.errors),C.compileOnSaveEnabled=u.compileOnSave,C.markAsDirty(),this.delayUpdateProjectGraph(C));this.delayEnsureProjectForOpenFiles()}findProject(r){if(r!==void 0)return SMe(r)?Tht(r,this.inferredProjects):this.findExternalProjectByProjectName(r)||this.findConfiguredProjectByProjectName(Jl(r))}forEachProject(r){this.externalProjects.forEach(r),this.configuredProjects.forEach(r),this.inferredProjects.forEach(r)}forEachEnabledProject(r){this.forEachProject(a=>{!a.isOrphan()&&a.languageServiceEnabled&&r(a)})}getDefaultProjectForFile(r,a){return a?this.ensureDefaultProjectForFile(r):this.tryGetDefaultProjectForFile(r)}tryGetDefaultProjectForFile(r){const a=Oo(r)?this.getScriptInfoForNormalizedPath(r):r;return a&&!a.isOrphan()?a.getDefaultProject():void 0}tryGetDefaultProjectForEnsuringConfiguredProjectForFile(r){var a;const u=Oo(r)?this.getScriptInfoForNormalizedPath(r):r;if(u)return(a=this.pendingOpenFileProjectUpdates)!=null&&a.delete(u.path)&&(this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(u,1),u.isOrphan()&&this.assignOrphanScriptInfoToInferredProject(u,this.openFiles.get(u.path))),this.tryGetDefaultProjectForFile(u)}ensureDefaultProjectForFile(r){return this.tryGetDefaultProjectForEnsuringConfiguredProjectForFile(r)||this.doEnsureDefaultProjectForFile(r)}doEnsureDefaultProjectForFile(r){this.ensureProjectStructuresUptoDate();const a=Oo(r)?this.getScriptInfoForNormalizedPath(r):r;return a?a.getDefaultProject():(this.logErrorForScriptInfoNotFound(Oo(r)?r:r.fileName),cC.ThrowNoProject())}getScriptInfoEnsuringProjectsUptoDate(r){return this.ensureProjectStructuresUptoDate(),this.getScriptInfo(r)}ensureProjectStructuresUptoDate(){let r=this.pendingEnsureProjectForOpenFiles;this.pendingProjectUpdates.clear();const a=u=>{r=Ym(u)||r};this.externalProjects.forEach(a),this.configuredProjects.forEach(a),this.inferredProjects.forEach(a),r&&this.ensureProjectForOpenFiles()}getFormatCodeOptions(r){const a=this.getScriptInfoForNormalizedPath(r);return a&&a.getFormatCodeSettings()||this.hostConfiguration.formatCodeOptions}getPreferences(r){const a=this.getScriptInfoForNormalizedPath(r);return{...this.hostConfiguration.preferences,...a&&a.getPreferences()}}getHostFormatCodeOptions(){return this.hostConfiguration.formatCodeOptions}getHostPreferences(){return this.hostConfiguration.preferences}onSourceFileChanged(r,a){j.assert(!r.isScriptOpen()),a===2?this.handleDeletedFile(r,!0):(r.deferredDelete&&(r.deferredDelete=void 0),r.delayReloadNonMixedContentFile(),this.delayUpdateProjectGraphs(r.containingProjects,!1),this.handleSourceMapProjects(r))}handleSourceMapProjects(r){if(r.sourceMapFilePath)if(Oo(r.sourceMapFilePath)){const a=this.getScriptInfoForPath(r.sourceMapFilePath);this.delayUpdateSourceInfoProjects(a==null?void 0:a.sourceInfos)}else this.delayUpdateSourceInfoProjects(r.sourceMapFilePath.sourceInfos);this.delayUpdateSourceInfoProjects(r.sourceInfos),r.declarationInfoPath&&this.delayUpdateProjectsOfScriptInfoPath(r.declarationInfoPath)}delayUpdateSourceInfoProjects(r){r&&r.forEach((a,u)=>this.delayUpdateProjectsOfScriptInfoPath(u))}delayUpdateProjectsOfScriptInfoPath(r){const a=this.getScriptInfoForPath(r);a&&this.delayUpdateProjectGraphs(a.containingProjects,!0)}handleDeletedFile(r,a){j.assert(!r.isScriptOpen()),this.delayUpdateProjectGraphs(r.containingProjects,!1),this.handleSourceMapProjects(r),r.detachAllProjects(),a?(r.delayReloadNonMixedContentFile(),r.deferredDelete=!0):this.deleteScriptInfo(r)}watchWildcardDirectory(r,a,u,h){let p=this.watchFactory.watchDirectory(r,C=>this.onWildCardDirectoryWatcherInvoke(r,u,h,g,C),a,this.getWatchOptionsFromProjectWatchOptions(h.parsedCommandLine.watchOptions,ts(u)),Kd.WildcardDirectory,u);const g={packageJsonWatches:void 0,close(){var C;p&&(p.close(),p=void 0,(C=g.packageJsonWatches)==null||C.forEach(b=>{b.projects.delete(g),b.close()}),g.packageJsonWatches=void 0)}};return g}onWildCardDirectoryWatcherInvoke(r,a,u,h,p){const g=this.toPath(p),C=u.cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(p,g);if(ud(g)==="package.json"&&!Dj(g)&&(C&&C.fileExists||!C&&this.host.fileExists(p))){const T=this.getNormalizedAbsolutePath(p);this.logger.info(`Config: ${a} Detected new package.json: ${T}`),this.packageJsonCache.addOrUpdate(T,g),this.watchPackageJsonFile(T,g,h)}C!=null&&C.fileExists||this.sendSourceFileChange(g);const b=this.findConfiguredProjectByProjectName(a);KH({watchedDirPath:this.toPath(r),fileOrDirectory:p,fileOrDirectoryPath:g,configFileName:a,extraFileExtensions:this.hostConfiguration.extraFileExtensions,currentDirectory:this.currentDirectory,options:u.parsedCommandLine.options,program:(b==null?void 0:b.getCurrentProgram())||u.parsedCommandLine.fileNames,useCaseSensitiveFileNames:this.host.useCaseSensitiveFileNames,writeLog:T=>this.logger.info(T),toPath:T=>this.toPath(T),getScriptKind:b?T=>b.getScriptKind(T):void 0})||(u.updateLevel!==2&&(u.updateLevel=1),u.projects.forEach((T,E)=>{var N;if(!T)return;const R=this.getConfiguredProjectByCanonicalConfigFilePath(E);if(!R)return;if(b!==R&&this.getHostPreferences().includeCompletionsForModuleExports){const H=this.toPath(a);Fe((N=R.getCurrentProgram())==null?void 0:N.getResolvedProjectReferences(),U=>(U==null?void 0:U.sourceFile.path)===H)&&R.markAutoImportProviderAsDirty()}const F=b===R?1:0;if(!(R.pendingUpdateLevel>F))if(this.openFiles.has(g))if(j.checkDefined(this.getScriptInfoForPath(g)).isAttached(R)){const U=Math.max(F,R.openFileWatchTriggered.get(g)||0);R.openFileWatchTriggered.set(g,U)}else R.pendingUpdateLevel=F,this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(R);else R.pendingUpdateLevel=F,this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(R)}))}delayUpdateProjectsFromParsedConfigOnConfigFileChange(r,a){const u=this.configFileExistenceInfoCache.get(r);if(!(u!=null&&u.config))return!1;let h=!1;return u.config.updateLevel=2,u.config.projects.forEach((p,g)=>{var C;const b=this.getConfiguredProjectByCanonicalConfigFilePath(g);if(b)if(h=!0,g===r){if(b.isInitialLoadPending())return;b.pendingUpdateLevel=2,b.pendingUpdateReason=a,this.delayUpdateProjectGraph(b),b.markAutoImportProviderAsDirty()}else{const T=this.toPath(r);b.resolutionCache.removeResolutionsFromProjectReferenceRedirects(T),this.delayUpdateProjectGraph(b),this.getHostPreferences().includeCompletionsForModuleExports&&Fe((C=b.getCurrentProgram())==null?void 0:C.getResolvedProjectReferences(),E=>(E==null?void 0:E.sourceFile.path)===T)&&b.markAutoImportProviderAsDirty()}}),h}onConfigFileChanged(r,a,u){const h=this.configFileExistenceInfoCache.get(a),p=this.getConfiguredProjectByCanonicalConfigFilePath(a),g=p==null?void 0:p.deferredClose;u===2?(h.exists=!1,p&&(p.deferredClose=!0)):(h.exists=!0,g&&(p.deferredClose=void 0,p.markAsDirty())),this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(a,"Change in config file detected");const C=new Set(p?[p]:void 0);this.openFiles.forEach((b,T)=>{var E,N;const R=this.configFileForOpenFiles.get(T);if(!((E=h.openFilesImpactedByConfigFile)!=null&&E.has(T)))return;this.configFileForOpenFiles.delete(T);const F=this.getScriptInfoForPath(T),H=this.getConfigFileNameForFile(F,!1);if(!H)return;const U=this.findConfiguredProjectByProjectName(H)??this.createConfiguredProject(H,`Change in config file ${r} detected, ${Aht(F)}`);(N=this.pendingOpenFileProjectUpdates)!=null&&N.has(T)||(this.pendingOpenFileProjectUpdates??(this.pendingOpenFileProjectUpdates=new Map)).set(T,R),of(C,U)&&U.isInitialLoadPending()&&this.delayUpdateProjectGraph(U)}),this.delayEnsureProjectForOpenFiles()}removeProject(r){switch(this.logger.info("`remove Project::"),r.print(!0,!0,!1),r.close(),j.shouldAssert(1)&&this.filenameToScriptInfo.forEach(a=>j.assert(!a.isAttached(r),"Found script Info still attached to project",()=>`${r.projectName}: ScriptInfos still attached: ${JSON.stringify(as(ld(this.filenameToScriptInfo.values(),u=>u.isAttached(r)?{fileName:u.fileName,projects:u.containingProjects.map(h=>h.projectName),hasMixedContent:u.hasMixedContent}:void 0)),void 0," ")}`)),this.pendingProjectUpdates.delete(r.getProjectName()),r.projectKind){case 2:GL(this.externalProjects,r),this.projectToSizeMap.delete(r.getProjectName());break;case 1:this.configuredProjects.delete(r.canonicalConfigFilePath),this.projectToSizeMap.delete(r.canonicalConfigFilePath);break;case 0:GL(this.inferredProjects,r);break}}assignOrphanScriptInfoToInferredProject(r,a){j.assert(r.isOrphan());const u=this.getOrCreateInferredProjectForProjectRootPathIfEnabled(r,a)||this.getOrCreateSingleInferredProjectIfEnabled()||this.getOrCreateSingleInferredWithoutProjectRoot(r.isDynamic?a||this.currentDirectory:ts(yp(r.fileName)?r.fileName:wo(r.fileName,a?this.getNormalizedAbsolutePath(a):this.currentDirectory)));if(u.addRoot(r),r.containingProjects[0]!==u&&(GR(r.containingProjects,u),r.containingProjects.unshift(u)),u.updateGraph(),!this.useSingleInferredProject&&!u.projectRootPath)for(const h of this.inferredProjects){if(h===u||h.isOrphan())continue;const p=h.getRootScriptInfos();j.assert(p.length===1||!!h.projectRootPath),p.length===1&&O(p[0].containingProjects,g=>g!==p[0].containingProjects[0]&&!g.isOrphan())&&h.removeFile(p[0],!0,!0)}return u}assignOrphanScriptInfosToInferredProject(){this.openFiles.forEach((r,a)=>{const u=this.getScriptInfoForPath(a);u.isOrphan()&&this.assignOrphanScriptInfoToInferredProject(u,r)})}closeOpenFile(r,a){var u;const h=r.isDynamic?!1:this.host.fileExists(r.fileName);r.close(h),this.stopWatchingConfigFilesForScriptInfo(r);const p=this.toCanonicalFileName(r.fileName);this.openFilesWithNonRootedDiskPath.get(p)===r&&this.openFilesWithNonRootedDiskPath.delete(p);let g=!1;for(const C of r.containingProjects){if(LS(C)){r.hasMixedContent&&r.registerFileUpdate();const b=C.openFileWatchTriggered.get(r.path);b!==void 0&&(C.openFileWatchTriggered.delete(r.path),C.pendingUpdateLevel<b&&(C.pendingUpdateLevel=b,C.markFileAsDirty(r.path)))}else _O(C)&&C.isRoot(r)&&(C.isProjectWithSingleRoot()&&(g=!0),C.removeFile(r,h,!0));C.languageServiceEnabled||C.markAsDirty()}return this.openFiles.delete(r.path),this.configFileForOpenFiles.delete(r.path),(u=this.pendingOpenFileProjectUpdates)==null||u.delete(r.path),j.assert(!this.rootOfInferredProjects.has(r)),!a&&g&&this.assignOrphanScriptInfosToInferredProject(),h?this.watchClosedScriptInfo(r):this.handleDeletedFile(r,!1),g}deleteScriptInfo(r){j.assert(!r.isScriptOpen()),this.filenameToScriptInfo.delete(r.path),this.filenameToScriptInfoVersion.set(r.path,r.textStorage.version),this.stopWatchingScriptInfo(r);const a=r.getRealpathIfDifferent();a&&this.realpathToScriptInfos.remove(a,r),r.closeSourceMapFileWatcher()}configFileExists(r,a,u){const h=this.configFileExistenceInfoCache.get(a);let p;if(this.openFiles.has(u.path)&&!Ape(u)&&(h?(h.openFilesImpactedByConfigFile??(h.openFilesImpactedByConfigFile=new Set)).add(u.path):(p=new Set).add(u.path)),h)return h.exists;const g=this.host.fileExists(r);return this.configFileExistenceInfoCache.set(a,{exists:g,openFilesImpactedByConfigFile:p}),g}createConfigFileWatcherForParsedConfig(r,a,u){var h,p;const g=this.configFileExistenceInfoCache.get(a);(!g.watcher||g.watcher===$Me)&&(g.watcher=this.watchFactory.watchFile(r,(b,T)=>this.onConfigFileChanged(r,a,T),2e3,this.getWatchOptionsFromProjectWatchOptions((p=(h=g==null?void 0:g.config)==null?void 0:h.parsedCommandLine)==null?void 0:p.watchOptions,ts(r)),Kd.ConfigFile,u));const C=g.config.projects;C.set(u.canonicalConfigFilePath,C.get(u.canonicalConfigFilePath)||!1)}releaseParsedConfig(r,a){var u,h,p;const g=this.configFileExistenceInfoCache.get(r);(u=g.config)!=null&&u.projects.delete(a.canonicalConfigFilePath)&&((h=g.config)!=null&&h.projects.size||(g.config=void 0,sde(r,this.sharedExtendedConfigFileWatchers),j.checkDefined(g.watcher),(p=g.openFilesImpactedByConfigFile)!=null&&p.size?g.inferredProjectRoots?$Q(af(ts(r)))||(g.watcher.close(),g.watcher=$Me):(g.watcher.close(),g.watcher=void 0):(g.watcher.close(),this.configFileExistenceInfoCache.delete(r))))}stopWatchingConfigFilesForScriptInfo(r){if(this.serverMode!==0)return;const a=this.rootOfInferredProjects.delete(r),u=r.isScriptOpen();u&&!a||this.forEachConfigFileLocation(r,h=>{var p,g,C;const b=this.configFileExistenceInfoCache.get(h);if(b){if(u){if(!((p=b==null?void 0:b.openFilesImpactedByConfigFile)!=null&&p.has(r.path)))return}else if(!((g=b.openFilesImpactedByConfigFile)!=null&&g.delete(r.path)))return;a&&(b.inferredProjectRoots--,b.watcher&&!b.config&&!b.inferredProjectRoots&&(b.watcher.close(),b.watcher=void 0)),!((C=b.openFilesImpactedByConfigFile)!=null&&C.size)&&!b.config&&(j.assert(!b.watcher),this.configFileExistenceInfoCache.delete(h))}})}startWatchingConfigFilesForInferredProjectRoot(r){this.serverMode===0&&(j.assert(r.isScriptOpen()),this.rootOfInferredProjects.add(r),this.forEachConfigFileLocation(r,(a,u)=>{let h=this.configFileExistenceInfoCache.get(a);h?h.inferredProjectRoots=(h.inferredProjectRoots??0)+1:(h={exists:this.host.fileExists(u),inferredProjectRoots:1},this.configFileExistenceInfoCache.set(a,h)),(h.openFilesImpactedByConfigFile??(h.openFilesImpactedByConfigFile=new Set)).add(r.path),h.watcher||(h.watcher=$Q(af(ts(a)))?this.watchFactory.watchFile(u,(p,g)=>this.onConfigFileChanged(u,a,g),2e3,this.hostConfiguration.watchOptions,Kd.ConfigFileForInferredRoot):$Me)}))}forEachConfigFileLocation(r,a){if(this.serverMode!==0)return;j.assert(!KJt(r)||this.openFiles.has(r.path));const u=this.openFiles.get(r.path);if(j.checkDefined(this.getScriptInfo(r.path)).isDynamic)return;let p=ts(r.fileName);const g=()=>Vm(u,p,this.currentDirectory,!this.host.useCaseSensitiveFileNames),C=!u||!g();let b=!Ape(r);do{if(b){const E=hO(p,this.currentDirectory,this.toCanonicalFileName),N=zr(p,"tsconfig.json");let R=a(zr(E,"tsconfig.json"),N);if(R)return N;const F=zr(p,"jsconfig.json");if(R=a(zr(E,"jsconfig.json"),F),R)return F;if(eG(E))break}const T=ts(p);if(T===p)break;p=T,b=!0}while(C||g())}findDefaultConfiguredProject(r){var a;return r.isScriptOpen()?(a=this.tryFindDefaultConfiguredProjectForOpenScriptInfo(r,0))==null?void 0:a.defaultProject:void 0}getConfigFileNameForFileFromCache(r,a){if(a){const u=Dht(r,this.pendingOpenFileProjectUpdates);if(u!==void 0)return u}return Dht(r,this.configFileForOpenFiles)}setConfigFileNameForFileInCache(r,a){this.openFiles.has(r.path)&&(Ape(r)||this.configFileForOpenFiles.set(r.path,a||!1))}getConfigFileNameForFile(r,a){const u=this.getConfigFileNameForFileFromCache(r,a);if(u!==void 0)return u||void 0;if(a)return;const h=this.forEachConfigFileLocation(r,(p,g)=>this.configFileExists(g,p,r));return this.logger.info(`getConfigFileNameForFile:: File: ${r.fileName} ProjectRootPath: ${this.openFiles.get(r.path)}:: Result: ${h}`),this.setConfigFileNameForFileInCache(r,h),h}printProjects(){this.logger.hasLevel(1)&&(this.logger.startGroup(),this.externalProjects.forEach(iRe),this.configuredProjects.forEach(iRe),this.inferredProjects.forEach(iRe),this.logger.info("Open files: "),this.openFiles.forEach((r,a)=>{const u=this.getScriptInfoForPath(a);this.logger.info(` FileName: ${u.fileName} ProjectRootPath: ${r}`),this.logger.info(` Projects: ${u.containingProjects.map(h=>h.getProjectName())}`)}),this.logger.endGroup())}findConfiguredProjectByProjectName(r,a){const u=this.toCanonicalFileName(r),h=this.getConfiguredProjectByCanonicalConfigFilePath(u);return a?h:h!=null&&h.deferredClose?void 0:h}getConfiguredProjectByCanonicalConfigFilePath(r){return this.configuredProjects.get(r)}findExternalProjectByProjectName(r){return Tht(r,this.externalProjects)}getFilenameForExceededTotalSizeLimitForNonTsFiles(r,a,u,h){if(a&&a.disableSizeLimit||!this.host.getFileSize)return;let p=ype;this.projectToSizeMap.set(r,0),this.projectToSizeMap.forEach(C=>p-=C||0);let g=0;for(const C of u){const b=h.getFileName(C);if(!IP(b)&&(g+=this.host.getFileSize(b),g>ype||g>p)){const T=u.map(E=>h.getFileName(E)).filter(E=>!IP(E)).map(E=>({name:E,size:this.host.getFileSize(E)})).sort((E,N)=>N.size-E.size).slice(0,5);return this.logger.info(`Non TS file size exceeded limit (${g}). Largest files: ${T.map(E=>`${E.name}:${E.size}`).join(", ")}`),b}}this.projectToSizeMap.set(r,g)}createExternalProject(r,a,u,h,p){const g=UY(u),C=_z(u,ts(Rf(r))),b=new gpe(r,this,this.documentRegistry,g,this.getFilenameForExceededTotalSizeLimitForNonTsFiles(r,g,a,Ppe),u.compileOnSave===void 0?!0:u.compileOnSave,void 0,C==null?void 0:C.watchOptions);return b.setProjectErrors(C==null?void 0:C.errors),b.excludedFiles=p,this.addFilesToNonInferredProject(b,a,Ppe,h),this.externalProjects.push(b),b}sendProjectTelemetry(r){if(this.seenProjects.has(r.projectName)){QMe(r);return}if(this.seenProjects.set(r.projectName,!0),!this.eventHandler||!this.host.createSHA256Hash){QMe(r);return}const a=LS(r)?r.projectOptions:void 0;QMe(r);const u={projectId:this.host.createSHA256Hash(r.projectName),fileStats:dz(r.getScriptInfos(),!0),compilerOptions:GIe(r.getCompilationSettings()),typeAcquisition:p(r.getTypeAcquisition()),extends:a&&a.configHasExtendsProperty,files:a&&a.configHasFilesProperty,include:a&&a.configHasIncludeProperty,exclude:a&&a.configHasExcludeProperty,compileOnSave:r.compileOnSaveEnabled,configFileName:h(),projectType:r instanceof gpe?"external":"configured",languageServiceEnabled:r.languageServiceEnabled,version:v};this.eventHandler({eventName:kpe,data:u});function h(){return LS(r)&&mpe(r.getConfigFilePath())||"other"}function p({enable:g,include:C,exclude:b}){return{enable:g,include:C!==void 0&&C.length!==0,exclude:b!==void 0&&b.length!==0}}}addFilesToNonInferredProject(r,a,u,h){this.updateNonInferredProjectFiles(r,a,u),r.setTypeAcquisition(h),r.markAsDirty()}createConfiguredProject(r,a){var u;(u=Zn)==null||u.instant(Zn.Phase.Session,"createConfiguredProject",{configFilePath:r}),this.logger.info(`Creating configuration project ${r}`);const h=this.toCanonicalFileName(r);let p=this.configFileExistenceInfoCache.get(h);p?p.exists=!0:this.configFileExistenceInfoCache.set(h,p={exists:!0}),p.config||(p.config={cachedDirectoryStructureHost:IQ(this.host,this.host.getCurrentDirectory(),this.host.useCaseSensitiveFileNames),projects:new Map,updateLevel:2});const g=new HMe(r,h,this,this.documentRegistry,p.config.cachedDirectoryStructureHost,a);return j.assert(!this.configuredProjects.has(h)),this.configuredProjects.set(h,g),this.createConfigFileWatcherForParsedConfig(r,h,g),g}loadConfiguredProject(r,a){var u,h;(u=Zn)==null||u.push(Zn.Phase.Session,"loadConfiguredProject",{configFilePath:r.canonicalConfigFilePath}),this.sendProjectLoadingStartEvent(r,a);const p=ca(r.getConfigFilePath()),g=this.ensureParsedConfigUptoDate(p,r.canonicalConfigFilePath,this.configFileExistenceInfoCache.get(r.canonicalConfigFilePath),r),C=g.config.parsedCommandLine;j.assert(!!C.fileNames);const b=C.options;r.projectOptions||(r.projectOptions={configHasExtendsProperty:C.raw.extends!==void 0,configHasFilesProperty:C.raw.files!==void 0,configHasIncludeProperty:C.raw.include!==void 0,configHasExcludeProperty:C.raw.exclude!==void 0}),r.canConfigFileJsonReportNoInputFiles=O7(C.raw),r.setProjectErrors(C.options.configFile.parseDiagnostics),r.updateReferences(C.projectReferences);const T=this.getFilenameForExceededTotalSizeLimitForNonTsFiles(r.canonicalConfigFilePath,b,C.fileNames,Lpe);T?(r.disableLanguageService(T),this.configFileExistenceInfoCache.forEach((N,R)=>this.stopWatchingWildCards(R,r))):(r.setCompilerOptions(b),r.setWatchOptions(C.watchOptions),r.enableLanguageService(),this.watchWildcards(p,g,r)),r.enablePluginsWithOptions(b);const E=C.fileNames.concat(r.getExternalFiles(2));this.updateRootAndOptionsOfNonInferredProject(r,E,Lpe,b,C.typeAcquisition,C.compileOnSave,C.watchOptions),(h=Zn)==null||h.pop()}ensureParsedConfigUptoDate(r,a,u,h){var p,g,C;if(u.config){if(!u.config.updateLevel)return u;if(u.config.updateLevel===1)return this.reloadFileNamesOfParsedConfig(r,u.config),u}const b=((p=u.config)==null?void 0:p.cachedDirectoryStructureHost)||IQ(this.host,this.host.getCurrentDirectory(),this.host.useCaseSensitiveFileNames),T=A7(r,U=>this.host.readFile(U)),E=TH(r,Oo(T)?T:""),N=E.parseDiagnostics;Oo(T)||N.push(T);const R=ts(r),F=PH(E,b,R,void 0,r,void 0,this.hostConfiguration.extraFileExtensions,this.extendedConfigCache);F.errors.length&&N.push(...F.errors),this.logger.info(`Config: ${r} : ${JSON.stringify({rootNames:F.fileNames,options:F.options,watchOptions:F.watchOptions,projectReferences:F.projectReferences},void 0," ")}`);const H=(g=u.config)==null?void 0:g.parsedCommandLine;return u.config?(u.config.parsedCommandLine=F,u.config.watchedDirectoriesStale=!0,u.config.updateLevel=void 0):u.config={parsedCommandLine:F,cachedDirectoryStructureHost:b,projects:new Map},!H&&!ZK(this.getWatchOptionsFromProjectWatchOptions(void 0,R),this.getWatchOptionsFromProjectWatchOptions(F.watchOptions,R))&&((C=u.watcher)==null||C.close(),u.watcher=void 0),this.createConfigFileWatcherForParsedConfig(r,a,h),NQ(a,F.options,this.sharedExtendedConfigFileWatchers,(U,q)=>this.watchFactory.watchFile(U,()=>{var X;LQ(this.extendedConfigCache,q,Q=>this.toPath(Q));let Z=!1;(X=this.sharedExtendedConfigFileWatchers.get(q))==null||X.projects.forEach(Q=>{Z=this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(Q,`Change in extended config file ${U} detected`)||Z}),Z&&this.delayEnsureProjectForOpenFiles()},2e3,this.hostConfiguration.watchOptions,Kd.ExtendedConfigFile,r),U=>this.toPath(U)),u}watchWildcards(r,{exists:a,config:u},h){if(u.projects.set(h.canonicalConfigFilePath,!0),a){if(u.watchedDirectories&&!u.watchedDirectoriesStale)return;u.watchedDirectoriesStale=!1,GH(u.watchedDirectories||(u.watchedDirectories=new Map),u.parsedCommandLine.wildcardDirectories,(p,g)=>this.watchWildcardDirectory(p,g,r,u))}else{if(u.watchedDirectoriesStale=!1,!u.watchedDirectories)return;X_(u.watchedDirectories,Zm),u.watchedDirectories=void 0}}stopWatchingWildCards(r,a){const u=this.configFileExistenceInfoCache.get(r);!u.config||!u.config.projects.get(a.canonicalConfigFilePath)||(u.config.projects.set(a.canonicalConfigFilePath,!1),!cf(u.config.projects,hl)&&(u.config.watchedDirectories&&(X_(u.config.watchedDirectories,Zm),u.config.watchedDirectories=void 0),u.config.watchedDirectoriesStale=void 0))}updateNonInferredProjectFiles(r,a,u){var h;const p=r.getRootFilesMap(),g=new Map;for(const C of a){const b=u.getFileName(C),T=Jl(b),E=lz(T);let N;if(!E&&!r.fileExists(b)){N=hO(T,this.currentDirectory,this.toCanonicalFileName);const R=p.get(N);R?(((h=R.info)==null?void 0:h.path)===N&&(r.removeFile(R.info,!1,!0),R.info=void 0),R.fileName=T):p.set(N,{fileName:T})}else{const R=u.getScriptKind(C,this.hostConfiguration.extraFileExtensions),F=u.hasMixedContent(C,this.hostConfiguration.extraFileExtensions),H=j.checkDefined(this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(T,r.currentDirectory,R,F,r.directoryStructureHost,!1));N=H.path;const U=p.get(N);!U||U.info!==H?(r.addRoot(H,T),H.isScriptOpen()&&this.removeRootOfInferredProjectIfNowPartOfOtherProject(H)):U.fileName=T}g.set(N,!0)}p.size>g.size&&p.forEach((C,b)=>{g.has(b)||(C.info?r.removeFile(C.info,r.fileExists(C.info.fileName),!0):p.delete(b))})}updateRootAndOptionsOfNonInferredProject(r,a,u,h,p,g,C){r.setCompilerOptions(h),r.setWatchOptions(C),g!==void 0&&(r.compileOnSaveEnabled=g),this.addFilesToNonInferredProject(r,a,u,p)}reloadFileNamesOfConfiguredProject(r){const a=this.reloadFileNamesOfParsedConfig(r.getConfigFilePath(),this.configFileExistenceInfoCache.get(r.canonicalConfigFilePath).config);return r.updateErrorOnNoInputFiles(a),this.updateNonInferredProjectFiles(r,a.concat(r.getExternalFiles(1)),Lpe),r.markAsDirty(),r.updateGraph()}reloadFileNamesOfParsedConfig(r,a){if(a.updateLevel===void 0)return a.parsedCommandLine.fileNames;j.assert(a.updateLevel===1);const u=a.parsedCommandLine.options.configFile.configFileSpecs,h=M7(u,ts(r),a.parsedCommandLine.options,a.cachedDirectoryStructureHost,this.hostConfiguration.extraFileExtensions);return a.parsedCommandLine={...a.parsedCommandLine,fileNames:h},h}setFileNamesOfAutpImportProviderOrAuxillaryProject(r,a){this.updateNonInferredProjectFiles(r,a,Lpe)}reloadConfiguredProjectClearingSemanticCache(r,a,u){return of(u,r)?(this.clearSemanticCache(r),this.reloadConfiguredProject(r,Ope(a)),!0):!1}reloadConfiguredProject(r,a){r.isInitialLoadPending=w1,r.pendingUpdateReason=void 0,r.pendingUpdateLevel=0,r.getCachedDirectoryStructureHost().clearCache(),this.loadConfiguredProject(r,a),Lht(r,r.triggerFileForConfigFileDiag??r.getConfigFilePath(),!0)}clearSemanticCache(r){r.originalConfiguredProjects=void 0,r.resolutionCache.clear(),r.getLanguageService(!1).cleanupSemanticCache(),r.cleanupProgram(),r.markAsDirty()}sendConfigFileDiagEvent(r,a,u){if(!this.eventHandler||this.suppressDiagnosticEvents)return!1;const h=r.getLanguageService().getCompilerOptionsDiagnostics();return h.push(...r.getAllProjectErrors()),!u&&h.length===(r.configDiagDiagnosticsReported??0)?!1:(r.configDiagDiagnosticsReported=h.length,this.eventHandler({eventName:wpe,data:{configFileName:r.getConfigFilePath(),diagnostics:h,triggerFile:a??r.getConfigFilePath()}}),!0)}getOrCreateInferredProjectForProjectRootPathIfEnabled(r,a){if(!this.useInferredProjectPerProjectRoot||r.isDynamic&&a===void 0)return;if(a){const h=this.toCanonicalFileName(a);for(const p of this.inferredProjects)if(p.projectRootPath===h)return p;return this.createInferredProject(a,!1,a)}let u;for(const h of this.inferredProjects)h.projectRootPath&&Vm(h.projectRootPath,r.path,this.host.getCurrentDirectory(),!this.host.useCaseSensitiveFileNames)&&(u&&u.projectRootPath.length>h.projectRootPath.length||(u=h));return u}getOrCreateSingleInferredProjectIfEnabled(){if(this.useSingleInferredProject)return this.inferredProjects.length>0&&this.inferredProjects[0].projectRootPath===void 0?this.inferredProjects[0]:this.createInferredProject("",!0)}getOrCreateSingleInferredWithoutProjectRoot(r){j.assert(!this.useSingleInferredProject);const a=this.toCanonicalFileName(this.getNormalizedAbsolutePath(r));for(const u of this.inferredProjects)if(!u.projectRootPath&&u.isOrphan()&&u.canonicalCurrentDirectory===a)return u;return this.createInferredProject(r)}createInferredProject(r,a,u){const h=u&&this.compilerOptionsForInferredProjectsPerProjectRoot.get(u)||this.compilerOptionsForInferredProjects;let p,g;u&&(p=this.watchOptionsForInferredProjectsPerProjectRoot.get(u),g=this.typeAcquisitionForInferredProjectsPerProjectRoot.get(u)),p===void 0&&(p=this.watchOptionsForInferredProjects),g===void 0&&(g=this.typeAcquisitionForInferredProjects),p=p||void 0;const C=new FMe(this,this.documentRegistry,h,p==null?void 0:p.watchOptions,u,r,g);return C.setProjectErrors(p==null?void 0:p.errors),a?this.inferredProjects.unshift(C):this.inferredProjects.push(C),C}getOrCreateScriptInfoNotOpenedByClient(r,a,u,h){return this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(Jl(r),a,void 0,void 0,u,h)}getScriptInfo(r){return this.getScriptInfoForNormalizedPath(Jl(r))}getScriptInfoOrConfig(r){const a=Jl(r),u=this.getScriptInfoForNormalizedPath(a);if(u)return u;const h=this.configuredProjects.get(this.toPath(r));return h&&h.getCompilerOptions().configFile}logErrorForScriptInfoNotFound(r){const a=as(ld(this.filenameToScriptInfo.entries(),u=>u[1].deferredDelete?void 0:u),([u,h])=>({path:u,fileName:h.fileName}));this.logger.msg(`Could not find file ${JSON.stringify(r)}.
+All files are: ${JSON.stringify(a)}`,"Err")}getSymlinkedProjects(r){let a;if(this.realpathToScriptInfos){const h=r.getRealpathIfDifferent();h&&O(this.realpathToScriptInfos.get(h),u),O(this.realpathToScriptInfos.get(r.path),u)}return a;function u(h){if(h!==r)for(const p of h.containingProjects)p.languageServiceEnabled&&!p.isOrphan()&&!p.getCompilerOptions().preserveSymlinks&&!r.isAttached(p)&&(a?cf(a,(g,C)=>C===h.path?!1:Yt(g,p))||a.add(h.path,p):(a=Of(),a.add(h.path,p)))}}watchClosedScriptInfo(r){if(j.assert(!r.fileWatcher),!r.isDynamicOrHasMixedContent()&&(!this.globalCacheLocationDirectoryPath||!so(r.path,this.globalCacheLocationDirectoryPath))){const a=r.fileName.indexOf("/node_modules/");!this.host.getModifiedTime||a===-1?r.fileWatcher=this.watchFactory.watchFile(r.fileName,(u,h)=>this.onSourceFileChanged(r,h),500,this.hostConfiguration.watchOptions,Kd.ClosedScriptInfo):(r.mTime=this.getModifiedTime(r),r.fileWatcher=this.watchClosedScriptInfoInNodeModules(r.fileName.substring(0,a)))}}createNodeModulesWatcher(r,a){let u=this.watchFactory.watchDirectory(r,p=>{var g;const C=qQ(this.toPath(p));if(!C)return;const b=ud(C);if((g=h.affectedModuleSpecifierCacheProjects)!=null&&g.size&&(b==="package.json"||b==="node_modules")&&h.affectedModuleSpecifierCacheProjects.forEach(T=>{var E;(E=T.getModuleSpecifierCache())==null||E.clear()}),h.refreshScriptInfoRefCount)if(a===C)this.refreshScriptInfosInDirectory(a);else{const T=this.filenameToScriptInfo.get(C);T?XMe(T)&&this.refreshScriptInfo(T):N6(C)||this.refreshScriptInfosInDirectory(C)}},1,this.hostConfiguration.watchOptions,Kd.NodeModules);const h={refreshScriptInfoRefCount:0,affectedModuleSpecifierCacheProjects:void 0,close:()=>{var p;u&&!h.refreshScriptInfoRefCount&&!((p=h.affectedModuleSpecifierCacheProjects)!=null&&p.size)&&(u.close(),u=void 0,this.nodeModulesWatchers.delete(a))}};return this.nodeModulesWatchers.set(a,h),h}watchPackageJsonsInNodeModules(r,a){var u;const h=this.toPath(r),p=this.nodeModulesWatchers.get(h)||this.createNodeModulesWatcher(r,h);return j.assert(!((u=p.affectedModuleSpecifierCacheProjects)!=null&&u.has(a))),(p.affectedModuleSpecifierCacheProjects||(p.affectedModuleSpecifierCacheProjects=new Set)).add(a),{close:()=>{var g;(g=p.affectedModuleSpecifierCacheProjects)==null||g.delete(a),p.close()}}}watchClosedScriptInfoInNodeModules(r){const a=r+"/node_modules",u=this.toPath(a),h=this.nodeModulesWatchers.get(u)||this.createNodeModulesWatcher(a,u);return h.refreshScriptInfoRefCount++,{close:()=>{h.refreshScriptInfoRefCount--,h.close()}}}getModifiedTime(r){return(this.host.getModifiedTime(r.fileName)||gp).getTime()}refreshScriptInfo(r){const a=this.getModifiedTime(r);if(a!==r.mTime){const u=Eoe(r.mTime,a);r.mTime=a,this.onSourceFileChanged(r,u)}}refreshScriptInfosInDirectory(r){r=r+Kl,this.filenameToScriptInfo.forEach(a=>{XMe(a)&&so(a.path,r)&&this.refreshScriptInfo(a)})}stopWatchingScriptInfo(r){r.fileWatcher&&(r.fileWatcher.close(),r.fileWatcher=void 0)}getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(r,a,u,h,p,g){if(yp(r)||lz(r))return this.getOrCreateScriptInfoWorker(r,a,!1,void 0,u,!!h,p,g);const C=this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(r));if(C)return C}getOrCreateScriptInfoForNormalizedPath(r,a,u,h,p,g){return this.getOrCreateScriptInfoWorker(r,this.currentDirectory,a,u,h,!!p,g,!1)}getOrCreateScriptInfoWorker(r,a,u,h,p,g,C,b){j.assert(h===void 0||u,"ScriptInfo needs to be opened by client to be able to set its user defined content");const T=hO(r,a,this.toCanonicalFileName);let E=this.filenameToScriptInfo.get(T);if(E){if(E.deferredDelete){if(j.assert(!E.isDynamic),!u&&!(C||this.host).fileExists(r))return b?E:void 0;E.deferredDelete=void 0}}else{const N=lz(r);if(j.assert(yp(r)||N||u,"",()=>`${JSON.stringify({fileName:r,currentDirectory:a,hostCurrentDirectory:this.currentDirectory,openKeys:as(this.openFilesWithNonRootedDiskPath.keys())})}
+Script info with non-dynamic relative file name can only be open script info or in context of host currentDirectory`),j.assert(!yp(r)||this.currentDirectory===a||!this.openFilesWithNonRootedDiskPath.has(this.toCanonicalFileName(r)),"",()=>`${JSON.stringify({fileName:r,currentDirectory:a,hostCurrentDirectory:this.currentDirectory,openKeys:as(this.openFilesWithNonRootedDiskPath.keys())})}
+Open script files with non rooted disk path opened with current directory context cannot have same canonical names`),j.assert(!N||this.currentDirectory===a||this.useInferredProjectPerProjectRoot,"",()=>`${JSON.stringify({fileName:r,currentDirectory:a,hostCurrentDirectory:this.currentDirectory,openKeys:as(this.openFilesWithNonRootedDiskPath.keys())})}
+Dynamic files must always be opened with service's current directory or service should support inferred project per projectRootPath.`),!u&&!N&&!(C||this.host).fileExists(r))return;E=new PMe(this.host,r,p,g,T,this.filenameToScriptInfoVersion.get(T)),this.filenameToScriptInfo.set(E.path,E),this.filenameToScriptInfoVersion.delete(E.path),u?!yp(r)&&(!N||this.currentDirectory!==a)&&this.openFilesWithNonRootedDiskPath.set(this.toCanonicalFileName(r),E):this.watchClosedScriptInfo(E)}return u&&(this.stopWatchingScriptInfo(E),E.open(h),g&&E.registerFileUpdate()),E}getScriptInfoForNormalizedPath(r){return!yp(r)&&this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(r))||this.getScriptInfoForPath(hO(r,this.currentDirectory,this.toCanonicalFileName))}getScriptInfoForPath(r){const a=this.filenameToScriptInfo.get(r);return!a||!a.deferredDelete?a:void 0}getDocumentPositionMapper(r,a,u){const h=this.getOrCreateScriptInfoNotOpenedByClient(a,r.currentDirectory,this.host,!1);if(!h){u&&r.addGeneratedFileWatch(a,u);return}if(h.getSnapshot(),Oo(h.sourceMapFilePath)){const T=this.getScriptInfoForPath(h.sourceMapFilePath);if(T&&(T.getSnapshot(),T.documentPositionMapper!==void 0))return T.sourceInfos=this.addSourceInfoToSourceMap(u,r,T.sourceInfos),T.documentPositionMapper?T.documentPositionMapper:void 0;h.sourceMapFilePath=void 0}else if(h.sourceMapFilePath){h.sourceMapFilePath.sourceInfos=this.addSourceInfoToSourceMap(u,r,h.sourceMapFilePath.sourceInfos);return}else if(h.sourceMapFilePath!==void 0)return;let p,g=(T,E)=>{const N=this.getOrCreateScriptInfoNotOpenedByClient(T,r.currentDirectory,this.host,!0);if(p=N||E,!N||N.deferredDelete)return;const R=N.getSnapshot();return N.documentPositionMapper!==void 0?N.documentPositionMapper:uA(R)};const C=r.projectName,b=Nhe({getCanonicalFileName:this.toCanonicalFileName,log:T=>this.logger.info(T),getSourceFileLike:T=>this.getSourceFileLike(T,C,h)},h.fileName,h.textStorage.getLineInfo(),g);return g=void 0,p?Oo(p)?h.sourceMapFilePath={watcher:this.addMissingSourceMapFile(r.currentDirectory===this.currentDirectory?p:wo(p,r.currentDirectory),h.path),sourceInfos:this.addSourceInfoToSourceMap(u,r)}:(h.sourceMapFilePath=p.path,p.declarationInfoPath=h.path,p.deferredDelete||(p.documentPositionMapper=b||!1),p.sourceInfos=this.addSourceInfoToSourceMap(u,r,p.sourceInfos)):h.sourceMapFilePath=!1,b}addSourceInfoToSourceMap(r,a,u){if(r){const h=this.getOrCreateScriptInfoNotOpenedByClient(r,a.currentDirectory,a.directoryStructureHost,!1);(u||(u=new Set)).add(h.path)}return u}addMissingSourceMapFile(r,a){return this.watchFactory.watchFile(r,()=>{const h=this.getScriptInfoForPath(a);h&&h.sourceMapFilePath&&!Oo(h.sourceMapFilePath)&&(this.delayUpdateProjectGraphs(h.containingProjects,!0),this.delayUpdateSourceInfoProjects(h.sourceMapFilePath.sourceInfos),h.closeSourceMapFileWatcher())},2e3,this.hostConfiguration.watchOptions,Kd.MissingSourceMapFile)}getSourceFileLike(r,a,u){const h=a.projectName?a:this.findProject(a);if(h){const g=h.toPath(r),C=h.getSourceFile(g);if(C&&C.resolvedPath===g)return C}const p=this.getOrCreateScriptInfoNotOpenedByClient(r,(h||this).currentDirectory,h?h.directoryStructureHost:this.host,!1);if(p){if(u&&Oo(u.sourceMapFilePath)&&p!==u){const g=this.getScriptInfoForPath(u.sourceMapFilePath);g&&(g.sourceInfos??(g.sourceInfos=new Set)).add(p.path)}return p.cacheSourceFile?p.cacheSourceFile.sourceFile:(p.sourceFileLike||(p.sourceFileLike={get text(){return j.fail("shouldnt need text"),""},getLineAndCharacterOfPosition:g=>{const C=p.positionToLineOffset(g);return{line:C.line-1,character:C.offset-1}},getPositionOfLineAndCharacter:(g,C,b)=>p.lineOffsetToPosition(g+1,C+1,b)}),p.sourceFileLike)}}setPerformanceEventHandler(r){this.performanceEventHandler=r}setHostConfiguration(r){var a;if(r.file){const u=this.getScriptInfoForNormalizedPath(Jl(r.file));u&&(u.setOptions(pO(r.formatOptions),r.preferences),this.logger.info(`Host configuration update for file ${r.file}`))}else{if(r.hostInfo!==void 0&&(this.hostConfiguration.hostInfo=r.hostInfo,this.logger.info(`Host information ${r.hostInfo}`)),r.formatOptions&&(this.hostConfiguration.formatCodeOptions={...this.hostConfiguration.formatCodeOptions,...pO(r.formatOptions)},this.logger.info("Format host information updated")),r.preferences){const{lazyConfiguredProjectsFromExternalProject:u,includePackageJsonAutoImports:h,includeCompletionsForModuleExports:p}=this.hostConfiguration.preferences;this.hostConfiguration.preferences={...this.hostConfiguration.preferences,...r.preferences},u&&!this.hostConfiguration.preferences.lazyConfiguredProjectsFromExternalProject&&this.externalProjectToConfiguredProjectMap.forEach(g=>g.forEach(C=>{!C.deferredClose&&!C.isClosed()&&C.pendingUpdateLevel===2&&!this.hasPendingProjectUpdate(C)&&C.updateGraph()})),(h!==r.preferences.includePackageJsonAutoImports||!!p!=!!r.preferences.includeCompletionsForModuleExports)&&this.forEachProject(g=>{g.onAutoImportProviderSettingsChanged()})}if(r.extraFileExtensions&&(this.hostConfiguration.extraFileExtensions=r.extraFileExtensions,this.reloadProjects(),this.logger.info("Host file extension mappings updated")),r.watchOptions){const u=(a=_z(r.watchOptions))==null?void 0:a.watchOptions,h=QX(u,this.currentDirectory);this.hostConfiguration.watchOptions=h,this.hostConfiguration.beforeSubstitution=h===u?void 0:u,this.logger.info(`Host watch options changed to ${JSON.stringify(this.hostConfiguration.watchOptions)}, it will be take effect for next watches.`)}}}getWatchOptions(r){return this.getWatchOptionsFromProjectWatchOptions(r.getWatchOptions(),r.getCurrentDirectory())}getWatchOptionsFromProjectWatchOptions(r,a){const u=this.hostConfiguration.beforeSubstitution?QX(this.hostConfiguration.beforeSubstitution,a):this.hostConfiguration.watchOptions;return r&&u?{...u,...r}:r||u}closeLog(){this.logger.close()}sendSourceFileChange(r){this.filenameToScriptInfo.forEach(a=>{if(this.openFiles.has(a.path)||!a.fileWatcher)return;const u=Bh(()=>this.host.fileExists(a.fileName)?a.deferredDelete?0:1:2);if(r){if(XMe(a)||!a.path.startsWith(r)||u()===2&&a.deferredDelete)return;this.logger.info(`Invoking sourceFileChange on ${a.fileName}:: ${u()}`)}this.onSourceFileChanged(a,u())})}reloadProjects(){this.logger.info("reload projects."),this.sendSourceFileChange(void 0),this.pendingProjectUpdates.forEach((u,h)=>{this.throttledOperations.cancel(h),this.pendingProjectUpdates.delete(h)}),this.throttledOperations.cancel(xht),this.pendingOpenFileProjectUpdates=void 0,this.pendingEnsureProjectForOpenFiles=!1,this.configFileExistenceInfoCache.forEach(u=>{u.config&&(u.config.updateLevel=2)}),this.configFileForOpenFiles.clear(),this.externalProjects.forEach(u=>{this.clearSemanticCache(u),u.updateGraph()});const r=new Set,a=new Set;this.externalProjectToConfiguredProjectMap.forEach((u,h)=>{const p=`Reloading configured project in external project: ${h}`;u.forEach(g=>{this.getHostPreferences().lazyConfiguredProjectsFromExternalProject?(g.isInitialLoadPending()||(this.clearSemanticCache(g),g.pendingUpdateLevel=2,g.pendingUpdateReason=Ope(p)),a.add(g)):this.reloadConfiguredProjectClearingSemanticCache(g,p,r)})}),this.openFiles.forEach((u,h)=>{const p=this.getScriptInfoForPath(h);Fe(p.containingProjects,fz)||this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(p,2,r,a)}),a.forEach(u=>r.add(u)),this.inferredProjects.forEach(u=>this.clearSemanticCache(u)),this.ensureProjectForOpenFiles(),this.cleanupProjectsAndScriptInfos(r,new Set(this.openFiles.keys()),new Set(this.externalProjectToConfiguredProjectMap.keys())),this.logger.info("After reloading projects.."),this.printProjects()}removeRootOfInferredProjectIfNowPartOfOtherProject(r){j.assert(r.containingProjects.length>0);const a=r.containingProjects[0];!a.isOrphan()&&_O(a)&&a.isRoot(r)&&O(r.containingProjects,u=>u!==a&&!u.isOrphan())&&a.removeFile(r,!0,!0)}ensureProjectForOpenFiles(){this.logger.info("Before ensureProjectForOpenFiles:"),this.printProjects();const r=this.pendingOpenFileProjectUpdates;this.pendingOpenFileProjectUpdates=void 0,r==null||r.forEach((a,u)=>this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(this.getScriptInfoForPath(u),1)),this.openFiles.forEach((a,u)=>{const h=this.getScriptInfoForPath(u);h.isOrphan()?this.assignOrphanScriptInfoToInferredProject(h,a):this.removeRootOfInferredProjectIfNowPartOfOtherProject(h)}),this.pendingEnsureProjectForOpenFiles=!1,this.inferredProjects.forEach(Ym),this.logger.info("After ensureProjectForOpenFiles:"),this.printProjects()}openClientFile(r,a,u,h){return this.openClientFileWithNormalizedPath(Jl(r),a,u,!1,h?Jl(h):void 0)}getOriginalLocationEnsuringConfiguredProject(r,a){const u=r.isSourceOfProjectReferenceRedirect(a.fileName),h=u?a:r.getSourceMapper().tryGetSourcePosition(a);if(!h)return;const{fileName:p}=h,g=this.getScriptInfo(p);if(!g&&!this.host.fileExists(p))return;const C={fileName:Jl(p),path:this.toPath(p)},b=this.getConfigFileNameForFile(C,!1);if(!b)return;let T=this.findConfiguredProjectByProjectName(b);if(!T){if(r.getCompilerOptions().disableReferencedProjectLoad)return u?a:g!=null&&g.containingProjects.length?h:a;T=this.createConfiguredProject(b,`Creating project for original file: ${C.fileName}${a!==h?" for location: "+a.fileName:""}`)}Ym(T);const E=F=>{const H=this.getScriptInfo(p);return H&&F.containsScriptInfo(H)&&!F.isSourceOfProjectReferenceRedirect(H.path)};if(T.isSolution()||!E(T)){if(T=Eht(T,p,F=>E(F)?F:void 0,1,`Creating project referenced in solution ${T.projectName} to find possible configured project for original file: ${C.fileName}${a!==h?" for location: "+a.fileName:""}`),!T)return;if(T===r)return h}R(T);const N=this.getScriptInfo(p);if(!N||!N.containingProjects.length)return;return N.containingProjects.forEach(F=>{LS(F)&&R(F)}),h;function R(F){(r.originalConfiguredProjects??(r.originalConfiguredProjects=new Set)).add(F.canonicalConfigFilePath)}}fileExists(r){return!!this.getScriptInfoForNormalizedPath(r)||this.host.fileExists(r)}findExternalProjectContainingOpenScriptInfo(r){return Fe(this.externalProjects,a=>(Ym(a),a.containsScriptInfo(r)))}getOrCreateOpenScriptInfo(r,a,u,h,p){const g=this.getOrCreateScriptInfoWorker(r,p?this.getNormalizedAbsolutePath(p):this.currentDirectory,!0,a,u,!!h,void 0,!0);return this.openFiles.set(g.path,p),g}assignProjectToOpenedScriptInfo(r){let a,u;const h=this.findExternalProjectContainingOpenScriptInfo(r);let p,g;if(!h&&this.serverMode===0){const C=this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(r,1);C&&(p=C.seenProjects,g=C.sentConfigDiag,C.defaultProject&&(a=C.defaultProject.getConfigFilePath(),u=C.defaultProject.getAllProjectErrors()))}return r.containingProjects.forEach(Ym),r.isOrphan()&&(p==null||p.forEach(C=>{g.has(C)||this.sendConfigFileDiagEvent(C,r.fileName,!0)}),j.assert(this.openFiles.has(r.path)),this.assignOrphanScriptInfoToInferredProject(r,this.openFiles.get(r.path))),j.assert(!r.isOrphan()),{configFileName:a,configFileErrors:u,retainProjects:p}}findCreateOrReloadConfiguredProject(r,a,u,h,p,g,C,b){let T=this.findConfiguredProjectByProjectName(r,h),E=!1;switch(a){case 0:if(!T)return;break;case 1:T??(T=this.createConfiguredProject(r,u)),E=!C&&Pht(T,p);break;case 2:T??(T=this.createConfiguredProject(r,Ope(u))),E=!b&&this.reloadConfiguredProjectClearingSemanticCache(T,u,g),b&&!b.has(T)&&!g.has(T)&&(T.pendingUpdateLevel=2,T.pendingUpdateReason=Ope(u),b.add(T));break;default:j.assertNever(a)}return{project:T,sentConfigFileDiag:E}}tryFindDefaultConfiguredProjectForOpenScriptInfo(r,a,u,h){const p=this.getConfigFileNameForFile(r,a===0);if(!p)return;const g=this.findCreateOrReloadConfiguredProject(p,a,Aht(r),u,r.fileName,h);if(!g)return;const C=new Set,b=new Set(g.sentConfigFileDiag?[g.project]:void 0);let T,E;return N(g.project),{defaultProject:T??E,sentConfigDiag:b,seenProjects:C};function N(H){return R(H)?T:F(H)}function R(H){if(!of(C,H))return;const U=H.containsScriptInfo(r);if(U&&!H.isSourceOfProjectReferenceRedirect(r.path))return T=H;E??(E=U?H:void 0)}function F(H){return Eht(H,r.path,(U,q)=>(q&&b.add(U),R(U)),a,`Creating project referenced in solution ${H.projectName} to find possible configured project for ${r.fileName} to open`,u,r.fileName,h)}}tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(r,a,u,h){const p=a===0,g=this.tryFindDefaultConfiguredProjectForOpenScriptInfo(r,a,p,u);if(!g)return;const{defaultProject:C,seenProjects:b}=g;return C&&XJt(r,C,T=>{b.add(T)},a,`Creating project possibly referencing default composite project ${C.getProjectName()} of open file ${r.fileName}`,p,u,h),g}loadAncestorProjectTree(r){r??(r=new Set(ld(this.configuredProjects.entries(),([h,p])=>p.isInitialLoadPending()?void 0:h)));const a=new Set,u=as(this.configuredProjects.values());for(const h of u)Iht(h,p=>r.has(p))&&Ym(h),this.ensureProjectChildren(h,r,a)}ensureProjectChildren(r,a,u){var h;if(!of(u,r.canonicalConfigFilePath)||r.getCompilerOptions().disableReferencedProjectLoad)return;const p=(h=r.getCurrentProgram())==null?void 0:h.getResolvedProjectReferences();if(p)for(const g of p){if(!g)continue;const C=yde(g.references,E=>a.has(E.sourceFile.path)?E:void 0);if(!C)continue;const b=Jl(g.sourceFile.fileName),T=this.findConfiguredProjectByProjectName(b)??this.createConfiguredProject(b,`Creating project referenced by : ${r.projectName} as it references project ${C.sourceFile.fileName}`);Ym(T),this.ensureProjectChildren(T,a,u)}}cleanupConfiguredProjects(r,a,u){this.getOrphanConfiguredProjects(r,u,a).forEach(h=>this.removeProject(h))}cleanupProjectsAndScriptInfos(r,a,u){this.cleanupConfiguredProjects(r,u,a);for(const h of this.inferredProjects.slice())h.isOrphan()&&this.removeProject(h);this.removeOrphanScriptInfos()}tryInvokeWildCardDirectories(r){this.configFileExistenceInfoCache.forEach((a,u)=>{var h,p;!((h=a.config)!=null&&h.parsedCommandLine)||Yt(a.config.parsedCommandLine.fileNames,r.fileName,this.host.useCaseSensitiveFileNames?NT:jw)||(p=a.config.watchedDirectories)==null||p.forEach((g,C)=>{Vm(C,r.fileName,!this.host.useCaseSensitiveFileNames)&&(this.logger.info(`Invoking ${u}:: wildcard for open scriptInfo:: ${r.fileName}`),this.onWildCardDirectoryWatcherInvoke(C,u,a.config,g.watcher,r.fileName))})})}openClientFileWithNormalizedPath(r,a,u,h,p){const g=this.getScriptInfoForPath(hO(r,p?this.getNormalizedAbsolutePath(p):this.currentDirectory,this.toCanonicalFileName)),C=this.getOrCreateOpenScriptInfo(r,a,u,h,p);!g&&C&&!C.isDynamic&&this.tryInvokeWildCardDirectories(C);const{retainProjects:b,...T}=this.assignProjectToOpenedScriptInfo(C);return this.cleanupProjectsAndScriptInfos(b,new Set([C.path]),void 0),this.telemetryOnOpenFile(C),this.printProjects(),T}getOrphanConfiguredProjects(r,a,u){const h=new Set(this.configuredProjects.values()),p=T=>{T.originalConfiguredProjects&&(LS(T)||!T.isOrphan())&&T.originalConfiguredProjects.forEach((E,N)=>{const R=this.getConfiguredProjectByCanonicalConfigFilePath(N);return R&&b(R)})};return r==null||r.forEach(b),this.inferredProjects.forEach(p),this.externalProjects.forEach(p),this.externalProjectToConfiguredProjectMap.forEach((T,E)=>{u!=null&&u.has(E)||T.forEach(b)}),this.openFiles.forEach((T,E)=>{if(a!=null&&a.has(E))return;const N=this.getScriptInfoForPath(E);if(Fe(N.containingProjects,fz))return;const R=this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(N,0);R!=null&&R.defaultProject&&(R==null||R.seenProjects.forEach(b))}),this.configuredProjects.forEach(T=>{h.has(T)&&(C(T)||Nht(T,g))&&b(T)}),h;function g(T){return!h.has(T)||C(T)}function C(T){var E,N;return(T.deferredClose||T.projectService.hasPendingProjectUpdate(T))&&!!((N=(E=T.projectService.configFileExistenceInfoCache.get(T.canonicalConfigFilePath))==null?void 0:E.openFilesImpactedByConfigFile)!=null&&N.size)}function b(T){h.delete(T)&&(p(T),Nht(T,b))}}removeOrphanScriptInfos(){const r=new Map(this.filenameToScriptInfo);this.filenameToScriptInfo.forEach(a=>{if(!a.deferredDelete){if(!a.isScriptOpen()&&a.isOrphan()&&!a.isContainedByBackgroundProject()){if(!a.sourceMapFilePath)return;let u;if(Oo(a.sourceMapFilePath)){const h=this.filenameToScriptInfo.get(a.sourceMapFilePath);u=h==null?void 0:h.sourceInfos}else u=a.sourceMapFilePath.sourceInfos;if(!u||!qb(u,h=>{const p=this.getScriptInfoForPath(h);return!!p&&(p.isScriptOpen()||!p.isOrphan())}))return}if(r.delete(a.path),a.sourceMapFilePath){let u;if(Oo(a.sourceMapFilePath)){const h=this.filenameToScriptInfo.get(a.sourceMapFilePath);h!=null&&h.deferredDelete?a.sourceMapFilePath={watcher:this.addMissingSourceMapFile(h.fileName,a.path),sourceInfos:h.sourceInfos}:r.delete(a.sourceMapFilePath),u=h==null?void 0:h.sourceInfos}else u=a.sourceMapFilePath.sourceInfos;u&&u.forEach((h,p)=>r.delete(p))}}}),r.forEach(a=>this.deleteScriptInfo(a))}telemetryOnOpenFile(r){if(this.serverMode!==0||!this.eventHandler||!r.isJavaScript()||!Pg(this.allJsFilesForOpenFileTelemetry,r.path))return;const a=this.ensureDefaultProjectForFile(r);if(!a.languageServiceEnabled)return;const u=a.getSourceFile(r.path),h=!!u&&!!u.checkJsDirective;this.eventHandler({eventName:jMe,data:{info:{checkJs:h}}})}closeClientFile(r,a){const u=this.getScriptInfoForNormalizedPath(Jl(r)),h=u?this.closeOpenFile(u,a):!1;return a||this.printProjects(),h}collectChanges(r,a,u,h){for(const p of a){const g=Fe(r,C=>C.projectName===p.getProjectName());h.push(p.getChangesSinceVersion(g&&g.version,u))}}synchronizeProjectList(r,a){const u=[];return this.collectChanges(r,this.externalProjects,a,u),this.collectChanges(r,ld(this.configuredProjects.values(),h=>h.deferredClose?void 0:h),a,u),this.collectChanges(r,this.inferredProjects,a,u),u}applyChangesInOpenFiles(r,a,u){let h,p,g=!1;if(r)for(const b of r){(h??(h=[])).push(this.getScriptInfoForPath(hO(Jl(b.fileName),b.projectRootPath?this.getNormalizedAbsolutePath(b.projectRootPath):this.currentDirectory,this.toCanonicalFileName)));const T=this.getOrCreateOpenScriptInfo(Jl(b.fileName),b.content,Ipe(b.scriptKind),b.hasMixedContent,b.projectRootPath?Jl(b.projectRootPath):void 0);(p||(p=[])).push(T)}if(a)for(const b of a){const T=this.getScriptInfo(b.fileName);j.assert(!!T),this.applyChangesToFile(T,b.changes)}if(u)for(const b of u)g=this.closeClientFile(b,!0)||g;let C;O(h,(b,T)=>!b&&p[T]&&!p[T].isDynamic?this.tryInvokeWildCardDirectories(p[T]):void 0),p==null||p.forEach(b=>{var T;return(T=this.assignProjectToOpenedScriptInfo(b).retainProjects)==null?void 0:T.forEach(E=>(C??(C=new Set)).add(E))}),g&&this.assignOrphanScriptInfosToInferredProject(),p?(this.cleanupProjectsAndScriptInfos(C,new Set(p.map(b=>b.path)),void 0),p.forEach(b=>this.telemetryOnOpenFile(b)),this.printProjects()):P(u)&&this.printProjects()}applyChangesToFile(r,a){for(const u of a)r.editContent(u.span.start,u.span.start+u.span.length,u.newText)}closeExternalProject(r,a){const u=Jl(r);if(this.externalProjectToConfiguredProjectMap.get(u))this.externalProjectToConfiguredProjectMap.delete(u);else{const p=this.findExternalProjectByProjectName(r);p&&this.removeProject(p)}a&&(this.cleanupConfiguredProjects(),this.printProjects())}openExternalProjects(r){const a=new Set(this.externalProjects.map(u=>u.getProjectName()));this.externalProjectToConfiguredProjectMap.forEach((u,h)=>a.add(h));for(const u of r)this.openExternalProject(u,!1),a.delete(u.projectFileName);a.forEach(u=>this.closeExternalProject(u,!1)),this.cleanupConfiguredProjects(),this.printProjects()}static escapeFilenameForRegex(r){return r.replace(this.filenameEscapeRegexp,"\\$&")}resetSafeList(){this.safelist=zMe}applySafeList(r){const a=r.typeAcquisition;j.assert(!!a,"proj.typeAcquisition should be set by now");const u=this.applySafeListWorker(r,r.rootFiles,a);return(u==null?void 0:u.excludedFiles)??[]}applySafeListWorker(r,a,u){if(u.enable===!1||u.disableFilenameBasedTypeAcquisition)return;const h=u.include||(u.include=[]),p=[],g=a.map(N=>Rf(N.fileName));for(const N of Object.keys(this.safelist)){const R=this.safelist[N];for(const F of g)if(R.match.test(F)){if(this.logger.info(`Excluding files based on rule ${N} matching file '${F}'`),R.types)for(const H of R.types)h.includes(H)||h.push(H);if(R.exclude)for(const H of R.exclude){const U=F.replace(R.match,(...q)=>H.map(X=>typeof X=="number"?Oo(q[X])?Pqe.escapeFilenameForRegex(q[X]):(this.logger.info(`Incorrect RegExp specification in safelist rule ${N} - not enough groups`),"\\*"):X).join(""));p.includes(U)||p.push(U)}else{const H=Pqe.escapeFilenameForRegex(F);p.includes(H)||p.push(H)}}}const C=p.map(N=>new RegExp(N,"i"));let b,T;for(let N=0;N<a.length;N++)if(C.some(R=>R.test(g[N])))E(N);else{if(u.enable){const R=ud(Vw(g[N]));if(Xl(R,"js")){const F=s_(R),H=toe(F),U=this.legacySafelist.get(H);if(U!==void 0){this.logger.info(`Excluded '${g[N]}' because it matched ${H} from the legacy safelist`),E(N),h.includes(U)||h.push(U);continue}}}/^.+[.-]min\.js$/.test(g[N])?E(N):b==null||b.push(a[N])}return T?{rootFiles:b,excludedFiles:T}:void 0;function E(N){T||(j.assert(!b),b=a.slice(0,N),T=[]),T.push(g[N])}}openExternalProject(r,a){const u=this.findExternalProjectByProjectName(r.projectFileName);let h,p=[];for(const g of r.rootFiles){const C=Jl(g.fileName);if(mpe(C)){if(this.serverMode===0&&this.host.fileExists(C)){let b=this.findConfiguredProjectByProjectName(C);b||(b=this.createConfiguredProject(C,`Creating configured project in external project: ${r.projectFileName}`),this.getHostPreferences().lazyConfiguredProjectsFromExternalProject||b.updateGraph()),(h??(h=new Set)).add(b),j.assert(!b.isClosed())}}else p.push(g)}if(h)this.externalProjectToConfiguredProjectMap.set(r.projectFileName,h),u&&this.removeProject(u);else{this.externalProjectToConfiguredProjectMap.delete(r.projectFileName);const g=r.typeAcquisition||{};g.include=g.include||[],g.exclude=g.exclude||[],g.enable===void 0&&(g.enable=MMe(p.map(T=>T.fileName)));const C=this.applySafeListWorker(r,p,g),b=(C==null?void 0:C.excludedFiles)??[];if(p=(C==null?void 0:C.rootFiles)??p,u){u.excludedFiles=b;const T=UY(r.options),E=_z(r.options,u.getCurrentDirectory()),N=this.getFilenameForExceededTotalSizeLimitForNonTsFiles(r.projectFileName,T,p,Ppe);N?u.disableLanguageService(N):u.enableLanguageService(),u.setProjectErrors(E==null?void 0:E.errors),this.updateRootAndOptionsOfNonInferredProject(u,p,Ppe,T,g,r.options.compileOnSave,E==null?void 0:E.watchOptions),u.updateGraph()}else this.createExternalProject(r.projectFileName,p,r.options,g,b).updateGraph()}a&&(this.cleanupConfiguredProjects(h,new Set(r.projectFileName)),this.printProjects())}hasDeferredExtension(){for(const r of this.hostConfiguration.extraFileExtensions)if(r.scriptKind===7)return!0;return!1}requestEnablePlugin(r,a,u){if(!this.host.importPlugin&&!this.host.require){this.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded");return}if(this.logger.info(`Enabling plugin ${a.name} from candidate paths: ${u.join(",")}`),!a.name||Gd(a.name)||/[\\/]\.\.?(?:$|[\\/])/.test(a.name)){this.logger.info(`Skipped loading plugin ${a.name||JSON.stringify(a)} because only package name is allowed plugin name`);return}if(this.host.importPlugin){const h=xA.importServicePluginAsync(a,u,this.host,g=>this.logger.info(g));this.pendingPluginEnablements??(this.pendingPluginEnablements=new Map);let p=this.pendingPluginEnablements.get(r);p||this.pendingPluginEnablements.set(r,p=[]),p.push(h);return}this.endEnablePlugin(r,xA.importServicePluginSync(a,u,this.host,h=>this.logger.info(h)))}endEnablePlugin(r,{pluginConfigEntry:a,resolvedModule:u,errorLogs:h}){var p;if(u){const g=(p=this.currentPluginConfigOverrides)==null?void 0:p.get(a.name);if(g){const C=a.name;a=g,a.name=C}r.enableProxy(u,a)}else O(h,g=>this.logger.info(g)),this.logger.info(`Couldn't find ${a.name}`)}hasNewPluginEnablementRequests(){return!!this.pendingPluginEnablements}hasPendingPluginEnablements(){return!!this.currentPluginEnablementPromise}async waitForPendingPlugins(){for(;this.currentPluginEnablementPromise;)await this.currentPluginEnablementPromise}enableRequestedPlugins(){this.pendingPluginEnablements&&this.enableRequestedPluginsAsync()}async enableRequestedPluginsAsync(){if(this.currentPluginEnablementPromise&&await this.waitForPendingPlugins(),!this.pendingPluginEnablements)return;const r=as(this.pendingPluginEnablements.entries());this.pendingPluginEnablements=void 0,this.currentPluginEnablementPromise=this.enableRequestedPluginsWorker(r),await this.currentPluginEnablementPromise}async enableRequestedPluginsWorker(r){j.assert(this.currentPluginEnablementPromise===void 0);let a=!1;await Promise.all(qt(r,async([u,h])=>{const p=await Promise.all(h);if(u.isClosed()||jY(u)){this.logger.info(`Cancelling plugin enabling for ${u.getProjectName()} as it is ${u.isClosed()?"closed":"deferred close"}`);return}a=!0;for(const g of p)this.endEnablePlugin(u,g);this.delayUpdateProjectGraph(u)})),this.currentPluginEnablementPromise=void 0,a&&this.sendProjectsUpdatedInBackgroundEvent()}configurePlugin(r){this.forEachEnabledProject(a=>a.onPluginConfigurationChanged(r.pluginName,r.configuration)),this.currentPluginConfigOverrides=this.currentPluginConfigOverrides||new Map,this.currentPluginConfigOverrides.set(r.pluginName,r.configuration)}getPackageJsonsVisibleToFile(r,a,u){const h=this.packageJsonCache,p=u&&this.toPath(u),g=[],C=b=>{switch(h.directoryHasPackageJson(b)){case 3:return h.searchDirectoryAndAncestors(b),C(b);case-1:const T=zr(b,"package.json");this.watchPackageJsonFile(T,this.toPath(T),a);const E=h.getInDirectory(b);E&&g.push(E)}if(p&&p===b)return!0};return kg(ts(r),C),g}getNearestAncestorDirectoryWithPackageJson(r){return kg(r,a=>{switch(this.packageJsonCache.directoryHasPackageJson(a)){case-1:return a;case 0:return;case 3:return this.host.fileExists(zr(a,"package.json"))?a:void 0}})}watchPackageJsonFile(r,a,u){j.assert(u!==void 0);let h=(this.packageJsonFilesMap??(this.packageJsonFilesMap=new Map)).get(a);if(!h){let p=this.watchFactory.watchFile(r,(g,C)=>{switch(C){case 0:case 1:this.packageJsonCache.addOrUpdate(g,a),this.onPackageJsonChange(h);break;case 2:this.packageJsonCache.delete(a),this.onPackageJsonChange(h),h.projects.clear(),h.close()}},250,this.hostConfiguration.watchOptions,Kd.PackageJson);h={projects:new Set,close:()=>{var g;h.projects.size||!p||(p.close(),p=void 0,(g=this.packageJsonFilesMap)==null||g.delete(a),this.packageJsonCache.invalidate(a))}},this.packageJsonFilesMap.set(a,h)}h.projects.add(u),(u.packageJsonWatches??(u.packageJsonWatches=new Set)).add(h)}onPackageJsonChange(r){r.projects.forEach(a=>{var u;return(u=a.onPackageJsonChange)==null?void 0:u.call(a)})}includePackageJsonAutoImports(){switch(this.hostConfiguration.preferences.includePackageJsonAutoImports){case"on":return 1;case"off":return 0;default:return 2}}getIncompleteCompletionsCache(){return this.incompleteCompletionsCache||(this.incompleteCompletionsCache=eGt())}};Mht.filenameEscapeRegexp=/[-/\\^$*+?.()|[\]{}]/g;var eRe=Mht;function eGt(){let t;return{get(){return t},set(r){t=r},clear(){t=void 0}}}function tRe(t){return t.kind!==void 0}function iRe(t){t.print(!1,!1,!1)}function nRe(t){let r,a,u;const h={get(b,T,E,N){if(!(!a||u!==g(b,E,N)))return a.get(T)},set(b,T,E,N,R,F,H){if(p(b,E,N).set(T,C(R,F,H,void 0,!1)),H){for(const U of F)if(U.isInNodeModules){const q=U.path.substring(0,U.path.indexOf(Xv)+Xv.length-1),X=t.toPath(q);r!=null&&r.has(X)||(r||(r=new Map)).set(X,t.watchNodeModulesForPackageJsonChanges(q))}}},setModulePaths(b,T,E,N,R){const F=p(b,E,N),H=F.get(T);H?H.modulePaths=R:F.set(T,C(void 0,R,void 0,void 0,void 0))},setBlockedByPackageJsonDependencies(b,T,E,N,R,F){const H=p(b,E,N),U=H.get(T);U?(U.isBlockedByPackageJsonDependencies=F,U.packageName=R):H.set(T,C(void 0,void 0,void 0,R,F))},clear(){r==null||r.forEach(d0),a==null||a.clear(),r==null||r.clear(),u=void 0},count(){return a?a.size:0}};return j.isDebugging&&Object.defineProperty(h,"__cache",{get:()=>a}),h;function p(b,T,E){const N=g(b,T,E);return a&&u!==N&&h.clear(),u=N,a||(a=new Map)}function g(b,T,E){return`${b},${T.importModuleSpecifierEnding},${T.importModuleSpecifierPreference},${E.overrideImportMode}`}function C(b,T,E,N,R){return{kind:b,modulePaths:T,moduleSpecifiers:E,packageName:N,isBlockedByPackageJsonDependencies:R}}}function rRe(t){const r=new Map,a=new Map;return{addOrUpdate:u,invalidate:h,delete:g=>{r.delete(g),a.set(ts(g),!0)},getInDirectory:g=>r.get(t.toPath(zr(g,"package.json")))||void 0,directoryHasPackageJson:g=>p(t.toPath(g)),searchDirectoryAndAncestors:g=>{kg(g,C=>{const b=t.toPath(C);if(p(b)!==3)return!0;const T=zr(C,"package.json");Tj(t,T)?u(T,zr(b,"package.json")):a.set(b,!0)})}};function u(g,C){const b=j.checkDefined(fhe(g,t.host));r.set(C,b),a.delete(ts(C))}function h(g){r.delete(g),a.delete(ts(g))}function p(g){return r.has(zr(g,"package.json"))?-1:a.has(g)?0:3}}var Rht={isCancellationRequested:()=>!1,setRequest:()=>{},resetRequest:()=>{}};function tGt(t){const r=t[0],a=t[1];return(1e9*r+a)/1e6}function Fht(t,r){if((_O(t)||fz(t))&&t.isJsOnlyProject()){const a=t.getScriptInfoForNormalizedPath(r);return a&&!a.isJavaScript()}return!1}function iGt(t){return Q_(t)||!!t.emitDecoratorMetadata}function Bht(t,r,a){const u=r.getScriptInfoForNormalizedPath(t);return{start:u.positionToLineOffset(a.start),end:u.positionToLineOffset(a.start+a.length),text:$1(a.messageText,`
+`),code:a.code,category:nI(a),reportsUnnecessary:a.reportsUnnecessary,reportsDeprecated:a.reportsDeprecated,source:a.source,relatedInformation:qt(a.relatedInformation,Mpe)}}function Mpe(t){return t.file?{span:{start:mO(Ia(t.file,t.start)),end:mO(Ia(t.file,t.start+t.length)),file:t.file.fileName},message:$1(t.messageText,`
+`),category:nI(t),code:t.code}:{message:$1(t.messageText,`
+`),category:nI(t),code:t.code}}function mO(t){return{line:t.line+1,offset:t.character+1}}function pz(t,r){const a=t.file&&mO(Ia(t.file,t.start)),u=t.file&&mO(Ia(t.file,t.start+t.length)),h=$1(t.messageText,`
+`),{code:p,source:g}=t,C=nI(t),b={start:a,end:u,text:h,code:p,category:C,reportsUnnecessary:t.reportsUnnecessary,reportsDeprecated:t.reportsDeprecated,source:g,relatedInformation:qt(t.relatedInformation,Mpe)};return r?{...b,fileName:t.file&&t.file.fileName}:b}function nGt(t,r){return t.every(a=>au(a.span)<r)}var Wht=NMe;function sRe(t,r,a,u){const h=r.hasLevel(3),p=JSON.stringify(t);return h&&r.info(`${t.type}:${p2(t)}`),`Content-Length: ${1+a(p,"utf8")}\r
+\r
+${p}${u}`}var rGt=class{constructor(t){this.operationHost=t}startNew(t){this.complete(),this.requestId=this.operationHost.getCurrentRequestId(),this.executeAction(t)}complete(){this.requestId!==void 0&&(this.operationHost.sendRequestCompletedEvent(this.requestId,this.performanceData),this.requestId=void 0),this.setTimerHandle(void 0),this.setImmediateId(void 0),this.performanceData=void 0}immediate(t,r){const a=this.requestId;j.assert(a===this.operationHost.getCurrentRequestId(),"immediate: incorrect request id"),this.setImmediateId(this.operationHost.getServerHost().setImmediate(()=>{this.immediateId=void 0,this.operationHost.executeWithRequestId(a,()=>this.executeAction(r),this.performanceData)},t))}delay(t,r,a){const u=this.requestId;j.assert(u===this.operationHost.getCurrentRequestId(),"delay: incorrect request id"),this.setTimerHandle(this.operationHost.getServerHost().setTimeout(()=>{this.timerHandle=void 0,this.operationHost.executeWithRequestId(u,()=>this.executeAction(a),this.performanceData)},r,t))}executeAction(t){var r,a,u,h,p,g;let C=!1;try{this.operationHost.isCancellationRequested()?(C=!0,(r=Zn)==null||r.instant(Zn.Phase.Session,"stepCanceled",{seq:this.requestId,early:!0})):((a=Zn)==null||a.push(Zn.Phase.Session,"stepAction",{seq:this.requestId}),t(this),(u=Zn)==null||u.pop())}catch(b){(h=Zn)==null||h.popAll(),C=!0,b instanceof t8?(p=Zn)==null||p.instant(Zn.Phase.Session,"stepCanceled",{seq:this.requestId}):((g=Zn)==null||g.instant(Zn.Phase.Session,"stepError",{seq:this.requestId,message:b.message}),this.operationHost.logError(b,`delayed processing of request ${this.requestId}`))}this.performanceData=this.operationHost.getPerformanceData(),(C||!this.hasPendingWork())&&this.complete()}setTimerHandle(t){this.timerHandle!==void 0&&this.operationHost.getServerHost().clearTimeout(this.timerHandle),this.timerHandle=t}setImmediateId(t){this.immediateId!==void 0&&this.operationHost.getServerHost().clearImmediate(this.immediateId),this.immediateId=t}hasPendingWork(){return!!this.timerHandle||!!this.immediateId}};function oRe(t,r){return{seq:0,type:"event",event:t,body:r}}function sGt(t,r,a,u){const h=na(Ao(a)?a:a.projects,p=>u(p,t));return!Ao(a)&&a.symLinkedProjects&&a.symLinkedProjects.forEach((p,g)=>{const C=r(g);h.push(...Rr(p,b=>u(b,C)))}),Wb(h,Hw)}function Rpe(t){return Xse(({textSpan:r})=>r.start+100003*r.length,Qfe(t))}function oGt(t,r,a,u,h,p,g){const C=Vht(t,r,a,!0,(E,N)=>E.getLanguageService().findRenameLocations(N.fileName,N.pos,u,h,p),(E,N)=>N(N5(E)));if(Ao(C))return C;const b=[],T=Rpe(g);return C.forEach((E,N)=>{for(const R of E)!T.has(R)&&!Fpe(N5(R),N)&&(b.push(R),T.add(R))}),b}function aGt(t,r,a){const u=t.getLanguageService().getDefinitionAtPosition(r.fileName,r.pos,!1,a),h=u&&Ra(u);return h&&!h.isLocal?{fileName:h.fileName,pos:h.textSpan.start}:void 0}function cGt(t,r,a,u,h){var p,g;const C=Vht(t,r,a,!1,(N,R)=>(h.info(`Finding references to ${R.fileName} position ${R.pos} in project ${N.getProjectName()}`),N.getLanguageService().findReferences(R.fileName,R.pos)),(N,R)=>{R(N5(N.definition));for(const F of N.references)R(N5(F))});if(Ao(C))return C;const b=C.get(r);if(((g=(p=b==null?void 0:b[0])==null?void 0:p.references[0])==null?void 0:g.isDefinition)===void 0)C.forEach(N=>{for(const R of N)for(const F of R.references)delete F.isDefinition});else{const N=Rpe(u);for(const F of b)for(const H of F.references)if(H.isDefinition){N.add(H);break}const R=new Set;for(;;){let F=!1;if(C.forEach((H,U)=>{if(R.has(U))return;U.getLanguageService().updateIsDefinitionOfReferencedSymbols(H,N)&&(R.add(U),F=!0)}),!F)break}C.forEach((F,H)=>{if(!R.has(H))for(const U of F)for(const q of U.references)q.isDefinition=!1})}const T=[],E=Rpe(u);return C.forEach((N,R)=>{for(const F of N){const H=Fpe(N5(F.definition),R),U=H===void 0?F.definition:{...F.definition,textSpan:Ff(H.pos,F.definition.textSpan.length),fileName:H.fileName,contextSpan:dGt(F.definition,R)};let q=Fe(T,X=>Xfe(X.definition,U,u));q||(q={definition:U,references:[]},T.push(q));for(const X of F.references)!E.has(X)&&!Fpe(N5(X),R)&&(E.add(X),q.references.push(X))}}),T.filter(N=>N.references.length!==0)}function aRe(t,r,a){for(const u of Ao(t)?t:t.projects)a(u,r);!Ao(t)&&t.symLinkedProjects&&t.symLinkedProjects.forEach((u,h)=>{for(const p of u)a(p,h)})}function Vht(t,r,a,u,h,p){const g=new Map,C=JR();C.enqueue({project:r,location:a}),aRe(t,a.fileName,(U,q)=>{const X={fileName:q,pos:a.pos};C.enqueue({project:U,location:X})});const b=r.projectService,T=r.getCancellationToken(),E=aGt(r,a,u),N=Bh(()=>r.isSourceOfProjectReferenceRedirect(E.fileName)?E:r.getLanguageService().getSourceMapper().tryGetGeneratedPosition(E)),R=Bh(()=>r.isSourceOfProjectReferenceRedirect(E.fileName)?E:r.getLanguageService().getSourceMapper().tryGetSourcePosition(E)),F=new Set;e:for(;!C.isEmpty();){for(;!C.isEmpty();){if(T.isCancellationRequested())break e;const{project:U,location:q}=C.dequeue();if(g.has(U)||Hht(U,q)||(Ym(U),!U.containsFile(Jl(q.fileName))))continue;const X=H(U,q);g.set(U,X??Vd),F.add(uGt(U))}E&&(b.loadAncestorProjectTree(F),b.forEachEnabledProject(U=>{if(T.isCancellationRequested()||g.has(U))return;const q=lGt(E,U,N,R);q&&C.enqueue({project:U,location:q})}))}if(g.size===1)return D6(g.values());return g;function H(U,q){const X=h(U,q);if(X){for(const Z of X)p(Z,Q=>{const re=b.getOriginalLocationEnsuringConfiguredProject(U,Q);if(!re)return;const oe=b.getScriptInfo(re.fileName);for(const de of oe.containingProjects)!de.isOrphan()&&!g.has(de)&&C.enqueue({project:de,location:re});const pe=b.getSymlinkedProjects(oe);pe&&pe.forEach((de,ue)=>{for(const Ie of de)!Ie.isOrphan()&&!g.has(Ie)&&C.enqueue({project:Ie,location:{fileName:ue,pos:re.pos}})})});return X}}}function lGt(t,r,a,u){if(r.containsFile(Jl(t.fileName))&&!Hht(r,t))return t;const h=a();if(h&&r.containsFile(Jl(h.fileName)))return h;const p=u();return p&&r.containsFile(Jl(p.fileName))?p:void 0}function Hht(t,r){if(!r)return!1;const a=t.getLanguageService().getProgram();if(!a)return!1;const u=a.getSourceFile(r.fileName);return!!u&&u.resolvedPath!==u.path&&u.resolvedPath!==t.toPath(r.fileName)}function uGt(t){return LS(t)?t.canonicalConfigFilePath:t.getProjectName()}function N5({fileName:t,textSpan:r}){return{fileName:t,pos:r.start}}function Fpe(t,r){return u5(t,r.getSourceMapper(),a=>r.projectService.fileExists(a))}function jht(t,r){return AZ(t,r.getSourceMapper(),a=>r.projectService.fileExists(a))}function dGt(t,r){return Yfe(t,r.getSourceMapper(),a=>r.projectService.fileExists(a))}var zht=["openExternalProject","openExternalProjects","closeExternalProject","synchronizeProjectList","emit-output","compileOnSaveAffectedFileList","compileOnSaveEmitFile","compilerOptionsDiagnostics-full","encodedSemanticClassifications-full","semanticDiagnosticsSync","suggestionDiagnosticsSync","geterrForProject","reload","reloadProjects","getCodeFixes","getCodeFixes-full","getCombinedCodeFix","getCombinedCodeFix-full","applyCodeActionCommand","getSupportedCodeFixes","getApplicableRefactors","getMoveToRefactoringFileSuggestions","getEditsForRefactor","getEditsForRefactor-full","organizeImports","organizeImports-full","getEditsForFileRename","getEditsForFileRename-full","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","getPasteEdits"],fGt=[...zht,"definition","definition-full","definitionAndBoundSpan","definitionAndBoundSpan-full","typeDefinition","implementation","implementation-full","references","references-full","rename","renameLocations-full","rename-full","quickinfo","quickinfo-full","completionInfo","completions","completions-full","completionEntryDetails","completionEntryDetails-full","signatureHelp","signatureHelp-full","navto","navto-full","documentHighlights","documentHighlights-full"],Uht=class j1e{constructor(r){this.changeSeq=0,this.regionDiagLineCountThreshold=500,this.handlers=new Map(Object.entries({status:()=>{const p={version:v};return this.requiredResponse(p)},openExternalProject:p=>(this.projectService.openExternalProject(p.arguments,!0),this.requiredResponse(!0)),openExternalProjects:p=>(this.projectService.openExternalProjects(p.arguments.projects),this.requiredResponse(!0)),closeExternalProject:p=>(this.projectService.closeExternalProject(p.arguments.projectFileName,!0),this.requiredResponse(!0)),synchronizeProjectList:p=>{const g=this.projectService.synchronizeProjectList(p.arguments.knownProjects,p.arguments.includeProjectReferenceRedirectInfo);if(!g.some(b=>b.projectErrors&&b.projectErrors.length!==0))return this.requiredResponse(g);const C=qt(g,b=>!b.projectErrors||b.projectErrors.length===0?b:{info:b.info,changes:b.changes,files:b.files,projectErrors:this.convertToDiagnosticsWithLinePosition(b.projectErrors,void 0)});return this.requiredResponse(C)},updateOpen:p=>(this.changeSeq++,this.projectService.applyChangesInOpenFiles(p.arguments.openFiles&&ms(p.arguments.openFiles,g=>({fileName:g.file,content:g.fileContent,scriptKind:g.scriptKindName,projectRootPath:g.projectRootPath})),p.arguments.changedFiles&&ms(p.arguments.changedFiles,g=>({fileName:g.fileName,changes:ld(Bw(g.textChanges),C=>{const b=j.checkDefined(this.projectService.getScriptInfo(g.fileName)),T=b.lineOffsetToPosition(C.start.line,C.start.offset),E=b.lineOffsetToPosition(C.end.line,C.end.offset);return T>=0?{span:{start:T,length:E-T},newText:C.newText}:void 0})})),p.arguments.closedFiles),this.requiredResponse(!0)),applyChangedToOpenFiles:p=>(this.changeSeq++,this.projectService.applyChangesInOpenFiles(p.arguments.openFiles,p.arguments.changedFiles&&ms(p.arguments.changedFiles,g=>({fileName:g.fileName,changes:Bw(g.changes)})),p.arguments.closedFiles),this.requiredResponse(!0)),exit:()=>(this.exit(),this.notRequired(void 0)),definition:p=>this.requiredResponse(this.getDefinition(p.arguments,!0)),"definition-full":p=>this.requiredResponse(this.getDefinition(p.arguments,!1)),definitionAndBoundSpan:p=>this.requiredResponse(this.getDefinitionAndBoundSpan(p.arguments,!0)),"definitionAndBoundSpan-full":p=>this.requiredResponse(this.getDefinitionAndBoundSpan(p.arguments,!1)),findSourceDefinition:p=>this.requiredResponse(this.findSourceDefinition(p.arguments)),"emit-output":p=>this.requiredResponse(this.getEmitOutput(p.arguments)),typeDefinition:p=>this.requiredResponse(this.getTypeDefinition(p.arguments)),implementation:p=>this.requiredResponse(this.getImplementation(p.arguments,!0)),"implementation-full":p=>this.requiredResponse(this.getImplementation(p.arguments,!1)),references:p=>this.requiredResponse(this.getReferences(p.arguments,!0)),"references-full":p=>this.requiredResponse(this.getReferences(p.arguments,!1)),rename:p=>this.requiredResponse(this.getRenameLocations(p.arguments,!0)),"renameLocations-full":p=>this.requiredResponse(this.getRenameLocations(p.arguments,!1)),"rename-full":p=>this.requiredResponse(this.getRenameInfo(p.arguments)),open:p=>(this.openClientFile(Jl(p.arguments.file),p.arguments.fileContent,Npe(p.arguments.scriptKindName),p.arguments.projectRootPath?Jl(p.arguments.projectRootPath):void 0),this.notRequired(p)),quickinfo:p=>this.requiredResponse(this.getQuickInfoWorker(p.arguments,!0)),"quickinfo-full":p=>this.requiredResponse(this.getQuickInfoWorker(p.arguments,!1)),getOutliningSpans:p=>this.requiredResponse(this.getOutliningSpans(p.arguments,!0)),outliningSpans:p=>this.requiredResponse(this.getOutliningSpans(p.arguments,!1)),todoComments:p=>this.requiredResponse(this.getTodoComments(p.arguments)),indentation:p=>this.requiredResponse(this.getIndentation(p.arguments)),nameOrDottedNameSpan:p=>this.requiredResponse(this.getNameOrDottedNameSpan(p.arguments)),breakpointStatement:p=>this.requiredResponse(this.getBreakpointStatement(p.arguments)),braceCompletion:p=>this.requiredResponse(this.isValidBraceCompletion(p.arguments)),docCommentTemplate:p=>this.requiredResponse(this.getDocCommentTemplate(p.arguments)),getSpanOfEnclosingComment:p=>this.requiredResponse(this.getSpanOfEnclosingComment(p.arguments)),fileReferences:p=>this.requiredResponse(this.getFileReferences(p.arguments,!0)),"fileReferences-full":p=>this.requiredResponse(this.getFileReferences(p.arguments,!1)),format:p=>this.requiredResponse(this.getFormattingEditsForRange(p.arguments)),formatonkey:p=>this.requiredResponse(this.getFormattingEditsAfterKeystroke(p.arguments)),"format-full":p=>this.requiredResponse(this.getFormattingEditsForDocumentFull(p.arguments)),"formatonkey-full":p=>this.requiredResponse(this.getFormattingEditsAfterKeystrokeFull(p.arguments)),"formatRange-full":p=>this.requiredResponse(this.getFormattingEditsForRangeFull(p.arguments)),completionInfo:p=>this.requiredResponse(this.getCompletions(p.arguments,"completionInfo")),completions:p=>this.requiredResponse(this.getCompletions(p.arguments,"completions")),"completions-full":p=>this.requiredResponse(this.getCompletions(p.arguments,"completions-full")),completionEntryDetails:p=>this.requiredResponse(this.getCompletionEntryDetails(p.arguments,!1)),"completionEntryDetails-full":p=>this.requiredResponse(this.getCompletionEntryDetails(p.arguments,!0)),compileOnSaveAffectedFileList:p=>this.requiredResponse(this.getCompileOnSaveAffectedFileList(p.arguments)),compileOnSaveEmitFile:p=>this.requiredResponse(this.emitFile(p.arguments)),signatureHelp:p=>this.requiredResponse(this.getSignatureHelpItems(p.arguments,!0)),"signatureHelp-full":p=>this.requiredResponse(this.getSignatureHelpItems(p.arguments,!1)),"compilerOptionsDiagnostics-full":p=>this.requiredResponse(this.getCompilerOptionsDiagnostics(p.arguments)),"encodedSyntacticClassifications-full":p=>this.requiredResponse(this.getEncodedSyntacticClassifications(p.arguments)),"encodedSemanticClassifications-full":p=>this.requiredResponse(this.getEncodedSemanticClassifications(p.arguments)),cleanup:()=>(this.cleanup(),this.requiredResponse(!0)),semanticDiagnosticsSync:p=>this.requiredResponse(this.getSemanticDiagnosticsSync(p.arguments)),syntacticDiagnosticsSync:p=>this.requiredResponse(this.getSyntacticDiagnosticsSync(p.arguments)),suggestionDiagnosticsSync:p=>this.requiredResponse(this.getSuggestionDiagnosticsSync(p.arguments)),geterr:p=>(this.errorCheck.startNew(g=>this.getDiagnostics(g,p.arguments.delay,p.arguments.files)),this.notRequired(void 0)),geterrForProject:p=>(this.errorCheck.startNew(g=>this.getDiagnosticsForProject(g,p.arguments.delay,p.arguments.file)),this.notRequired(void 0)),change:p=>(this.change(p.arguments),this.notRequired(p)),configure:p=>(this.projectService.setHostConfiguration(p.arguments),this.notRequired(p)),reload:p=>(this.reload(p.arguments),this.requiredResponse({reloadFinished:!0})),saveto:p=>{const g=p.arguments;return this.saveToTmp(g.file,g.tmpfile),this.notRequired(p)},close:p=>{const g=p.arguments;return this.closeClientFile(g.file),this.notRequired(p)},navto:p=>this.requiredResponse(this.getNavigateToItems(p.arguments,!0)),"navto-full":p=>this.requiredResponse(this.getNavigateToItems(p.arguments,!1)),brace:p=>this.requiredResponse(this.getBraceMatching(p.arguments,!0)),"brace-full":p=>this.requiredResponse(this.getBraceMatching(p.arguments,!1)),navbar:p=>this.requiredResponse(this.getNavigationBarItems(p.arguments,!0)),"navbar-full":p=>this.requiredResponse(this.getNavigationBarItems(p.arguments,!1)),navtree:p=>this.requiredResponse(this.getNavigationTree(p.arguments,!0)),"navtree-full":p=>this.requiredResponse(this.getNavigationTree(p.arguments,!1)),documentHighlights:p=>this.requiredResponse(this.getDocumentHighlights(p.arguments,!0)),"documentHighlights-full":p=>this.requiredResponse(this.getDocumentHighlights(p.arguments,!1)),compilerOptionsForInferredProjects:p=>(this.setCompilerOptionsForInferredProjects(p.arguments),this.requiredResponse(!0)),projectInfo:p=>this.requiredResponse(this.getProjectInfo(p.arguments)),reloadProjects:p=>(this.projectService.reloadProjects(),this.notRequired(p)),jsxClosingTag:p=>this.requiredResponse(this.getJsxClosingTag(p.arguments)),linkedEditingRange:p=>this.requiredResponse(this.getLinkedEditingRange(p.arguments)),getCodeFixes:p=>this.requiredResponse(this.getCodeFixes(p.arguments,!0)),"getCodeFixes-full":p=>this.requiredResponse(this.getCodeFixes(p.arguments,!1)),getCombinedCodeFix:p=>this.requiredResponse(this.getCombinedCodeFix(p.arguments,!0)),"getCombinedCodeFix-full":p=>this.requiredResponse(this.getCombinedCodeFix(p.arguments,!1)),applyCodeActionCommand:p=>this.requiredResponse(this.applyCodeActionCommand(p.arguments)),getSupportedCodeFixes:p=>this.requiredResponse(this.getSupportedCodeFixes(p.arguments)),getApplicableRefactors:p=>this.requiredResponse(this.getApplicableRefactors(p.arguments)),getEditsForRefactor:p=>this.requiredResponse(this.getEditsForRefactor(p.arguments,!0)),getMoveToRefactoringFileSuggestions:p=>this.requiredResponse(this.getMoveToRefactoringFileSuggestions(p.arguments)),getPasteEdits:p=>this.requiredResponse(this.getPasteEdits(p.arguments)),"getEditsForRefactor-full":p=>this.requiredResponse(this.getEditsForRefactor(p.arguments,!1)),organizeImports:p=>this.requiredResponse(this.organizeImports(p.arguments,!0)),"organizeImports-full":p=>this.requiredResponse(this.organizeImports(p.arguments,!1)),getEditsForFileRename:p=>this.requiredResponse(this.getEditsForFileRename(p.arguments,!0)),"getEditsForFileRename-full":p=>this.requiredResponse(this.getEditsForFileRename(p.arguments,!1)),configurePlugin:p=>(this.configurePlugin(p.arguments),this.notRequired(p)),selectionRange:p=>this.requiredResponse(this.getSmartSelectionRange(p.arguments,!0)),"selectionRange-full":p=>this.requiredResponse(this.getSmartSelectionRange(p.arguments,!1)),prepareCallHierarchy:p=>this.requiredResponse(this.prepareCallHierarchy(p.arguments)),provideCallHierarchyIncomingCalls:p=>this.requiredResponse(this.provideCallHierarchyIncomingCalls(p.arguments)),provideCallHierarchyOutgoingCalls:p=>this.requiredResponse(this.provideCallHierarchyOutgoingCalls(p.arguments)),toggleLineComment:p=>this.requiredResponse(this.toggleLineComment(p.arguments,!0)),"toggleLineComment-full":p=>this.requiredResponse(this.toggleLineComment(p.arguments,!1)),toggleMultilineComment:p=>this.requiredResponse(this.toggleMultilineComment(p.arguments,!0)),"toggleMultilineComment-full":p=>this.requiredResponse(this.toggleMultilineComment(p.arguments,!1)),commentSelection:p=>this.requiredResponse(this.commentSelection(p.arguments,!0)),"commentSelection-full":p=>this.requiredResponse(this.commentSelection(p.arguments,!1)),uncommentSelection:p=>this.requiredResponse(this.uncommentSelection(p.arguments,!0)),"uncommentSelection-full":p=>this.requiredResponse(this.uncommentSelection(p.arguments,!1)),provideInlayHints:p=>this.requiredResponse(this.provideInlayHints(p.arguments)),mapCode:p=>this.requiredResponse(this.mapCode(p.arguments))})),this.host=r.host,this.cancellationToken=r.cancellationToken,this.typingsInstaller=r.typingsInstaller||qY,this.byteLength=r.byteLength,this.hrtime=r.hrtime,this.logger=r.logger,this.canUseEvents=r.canUseEvents,this.suppressDiagnosticEvents=r.suppressDiagnosticEvents,this.noGetErrOnBackgroundUpdate=r.noGetErrOnBackgroundUpdate;const{throttleWaitMilliseconds:a}=r;this.eventHandler=this.canUseEvents?r.eventHandler||(p=>this.defaultEventHandler(p)):void 0;const u={executeWithRequestId:(p,g,C)=>this.executeWithRequestId(p,g,C),getCurrentRequestId:()=>this.currentRequestId,getPerformanceData:()=>this.performanceData,getServerHost:()=>this.host,logError:(p,g)=>this.logError(p,g),sendRequestCompletedEvent:(p,g)=>this.sendRequestCompletedEvent(p,g),isCancellationRequested:()=>this.cancellationToken.isCancellationRequested()};this.errorCheck=new rGt(u);const h={host:this.host,logger:this.logger,cancellationToken:this.cancellationToken,useSingleInferredProject:r.useSingleInferredProject,useInferredProjectPerProjectRoot:r.useInferredProjectPerProjectRoot,typingsInstaller:this.typingsInstaller,throttleWaitMilliseconds:a,eventHandler:this.eventHandler,suppressDiagnosticEvents:this.suppressDiagnosticEvents,globalPlugins:r.globalPlugins,pluginProbeLocations:r.pluginProbeLocations,allowLocalPluginLoads:r.allowLocalPluginLoads,typesMapLocation:r.typesMapLocation,serverMode:r.serverMode,session:this,canUseWatchEvents:r.canUseWatchEvents,incrementalVerifier:r.incrementalVerifier};switch(this.projectService=new eRe(h),this.projectService.setPerformanceEventHandler(this.performanceEventHandler.bind(this)),this.gcTimer=new EMe(this.host,7e3,this.logger),this.projectService.serverMode){case 0:break;case 1:zht.forEach(p=>this.handlers.set(p,g=>{throw new Error(`Request: ${g.command} not allowed in LanguageServiceMode.PartialSemantic`)}));break;case 2:fGt.forEach(p=>this.handlers.set(p,g=>{throw new Error(`Request: ${g.command} not allowed in LanguageServiceMode.Syntactic`)}));break;default:j.assertNever(this.projectService.serverMode)}}sendRequestCompletedEvent(r,a){this.event({request_seq:r,performanceData:a&&qht(a)},"requestCompleted")}addPerformanceData(r,a){this.performanceData||(this.performanceData={}),this.performanceData[r]=(this.performanceData[r]??0)+a}addDiagnosticsPerformanceData(r,a,u){var h,p;this.performanceData||(this.performanceData={});let g=(h=this.performanceData.diagnosticsDuration)==null?void 0:h.get(r);g||((p=this.performanceData).diagnosticsDuration??(p.diagnosticsDuration=new Map)).set(r,g={}),g[a]=u}performanceEventHandler(r){switch(r.kind){case"UpdateGraph":this.addPerformanceData("updateGraphDurationMs",r.durationMs);break;case"CreatePackageJsonAutoImportProvider":this.addPerformanceData("createAutoImportProviderProgramDurationMs",r.durationMs);break}}defaultEventHandler(r){switch(r.eventName){case zY:this.projectsUpdatedInBackgroundEvent(r.data.openFiles);break;case bpe:this.event({projectName:r.data.project.getProjectName(),reason:r.data.reason},r.eventName);break;case Cpe:this.event({projectName:r.data.project.getProjectName()},r.eventName);break;case Spe:case Tpe:case Dpe:case Epe:this.event(r.data,r.eventName);break;case wpe:this.event({triggerFile:r.data.triggerFile,configFile:r.data.configFileName,diagnostics:qt(r.data.diagnostics,a=>pz(a,!0))},r.eventName);break;case xpe:{this.event({projectName:r.data.project.getProjectName(),languageServiceEnabled:r.data.languageServiceEnabled},r.eventName);break}case kpe:{this.event({telemetryEventName:r.eventName,payload:r.data},"telemetry");break}}}projectsUpdatedInBackgroundEvent(r){this.projectService.logger.info(`got projects updated in background ${r}`),r.length&&(!this.suppressDiagnosticEvents&&!this.noGetErrOnBackgroundUpdate&&(this.projectService.logger.info(`Queueing diagnostics update for ${r}`),this.errorCheck.startNew(a=>this.updateErrorCheck(a,r,100,!0))),this.event({openFiles:r},zY))}logError(r,a){this.logErrorWorker(r,a)}logErrorWorker(r,a,u){let h="Exception on executing command "+a;if(r.message&&(h+=`:
+`+n5(r.message),r.stack&&(h+=`
+`+n5(r.stack))),this.logger.hasLevel(3)){if(u)try{const{file:p,project:g}=this.getFileAndProject(u),C=g.getScriptInfoForNormalizedPath(p);if(C){const b=uA(C.getSnapshot());h+=`
+
+File text of ${u.file}:${n5(b)}
+`}}catch{}if(r.ProgramFiles){h+=`
+
+Program files: ${JSON.stringify(r.ProgramFiles)}
+`,h+=`
+
+Projects::
+`;let p=0;const g=C=>{h+=`
+Project '${C.projectName}' (${uz[C.projectKind]}) ${p}
+`,h+=C.filesToString(!0),h+=`
+-----------------------------------------------
+`,p++};this.projectService.externalProjects.forEach(g),this.projectService.configuredProjects.forEach(g),this.projectService.inferredProjects.forEach(g)}}this.logger.msg(h,"Err")}send(r){if(r.type==="event"&&!this.canUseEvents){this.logger.hasLevel(3)&&this.logger.info(`Session does not support events: ignored event: ${p2(r)}`);return}this.writeMessage(r)}writeMessage(r){const a=sRe(r,this.logger,this.byteLength,this.host.newLine);this.host.write(a)}event(r,a){this.send(oRe(a,r))}doOutput(r,a,u,h,p,g){const C={seq:0,type:"response",command:a,request_seq:u,success:h,performanceData:p&&qht(p)};if(h){let b;if(Ao(r))C.body=r,b=r.metadata,delete r.metadata;else if(typeof r=="object")if(r.metadata){const{metadata:T,...E}=r;C.body=E,b=T}else C.body=r;else C.body=r;b&&(C.metadata=b)}else j.assert(r===void 0);g&&(C.message=g),this.send(C)}semanticCheck(r,a){var u,h;const p=sl();(u=Zn)==null||u.push(Zn.Phase.Session,"semanticCheck",{file:r,configFilePath:a.canonicalConfigFilePath});const g=Fht(a,r)?Vd:a.getLanguageService().getSemanticDiagnostics(r).filter(C=>!!C.file);this.sendDiagnosticsEvent(r,a,g,"semanticDiag",p),(h=Zn)==null||h.pop()}syntacticCheck(r,a){var u,h;const p=sl();(u=Zn)==null||u.push(Zn.Phase.Session,"syntacticCheck",{file:r,configFilePath:a.canonicalConfigFilePath}),this.sendDiagnosticsEvent(r,a,a.getLanguageService().getSyntacticDiagnostics(r),"syntaxDiag",p),(h=Zn)==null||h.pop()}suggestionCheck(r,a){var u,h;const p=sl();(u=Zn)==null||u.push(Zn.Phase.Session,"suggestionCheck",{file:r,configFilePath:a.canonicalConfigFilePath}),this.sendDiagnosticsEvent(r,a,a.getLanguageService().getSuggestionDiagnostics(r),"suggestionDiag",p),(h=Zn)==null||h.pop()}regionSemanticCheck(r,a,u){var h,p,g;const C=sl();(h=Zn)==null||h.push(Zn.Phase.Session,"regionSemanticCheck",{file:r,configFilePath:a.canonicalConfigFilePath});let b;if(!this.shouldDoRegionCheck(r)||!(b=a.getLanguageService().getRegionSemanticDiagnostics(r,u))){(p=Zn)==null||p.pop();return}this.sendDiagnosticsEvent(r,a,b.diagnostics,"regionSemanticDiag",C,b.spans),(g=Zn)==null||g.pop()}shouldDoRegionCheck(r){var a;const u=(a=this.projectService.getScriptInfoForNormalizedPath(r))==null?void 0:a.textStorage.getLineInfo().getLineCount();return!!(u&&u>=this.regionDiagLineCountThreshold)}sendDiagnosticsEvent(r,a,u,h,p,g){try{const C=j.checkDefined(a.getScriptInfo(r)),b=sl()-p,T={file:r,diagnostics:u.map(E=>Bht(r,a,E)),spans:g==null?void 0:g.map(E=>X1(E,C))};this.event(T,h),this.addDiagnosticsPerformanceData(r,h,b)}catch(C){this.logError(C,h)}}updateErrorCheck(r,a,u,h=!0){if(a.length===0)return;j.assert(!this.suppressDiagnosticEvents);const p=this.changeSeq,g=Math.min(u,200);let C=0;const b=()=>{if(C++,a.length>C)return r.delay("checkOne",g,E)},T=(N,R)=>{if(this.semanticCheck(N,R),this.changeSeq===p){if(this.getPreferences(N).disableSuggestions)return b();r.immediate("suggestionCheck",()=>{this.suggestionCheck(N,R),b()})}},E=()=>{if(this.changeSeq!==p)return;let N,R=a[C];if(Oo(R)?R=this.toPendingErrorCheck(R):"ranges"in R&&(N=R.ranges,R=this.toPendingErrorCheck(R.file)),!R)return b();const{fileName:F,project:H}=R;if(Ym(H),!!H.containsFile(F,h)&&(this.syntacticCheck(F,H),this.changeSeq===p)){if(H.projectService.serverMode!==0)return b();if(N)return r.immediate("regionSemanticCheck",()=>{const U=this.projectService.getScriptInfoForNormalizedPath(F);U&&this.regionSemanticCheck(F,H,N.map(q=>this.getRange({file:F,...q},U))),this.changeSeq===p&&r.immediate("semanticCheck",()=>T(F,H))});r.immediate("semanticCheck",()=>T(F,H))}};a.length>C&&this.changeSeq===p&&r.delay("checkOne",u,E)}cleanProjects(r,a){if(a){this.logger.info(`cleaning ${r}`);for(const u of a)u.getLanguageService(!1).cleanupSemanticCache(),u.cleanupProgram()}}cleanup(){this.cleanProjects("inferred projects",this.projectService.inferredProjects),this.cleanProjects("configured projects",as(this.projectService.configuredProjects.values())),this.cleanProjects("external projects",this.projectService.externalProjects),this.host.gc&&(this.logger.info("host.gc()"),this.host.gc())}getEncodedSyntacticClassifications(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r);return u.getEncodedSyntacticClassifications(a,r)}getEncodedSemanticClassifications(r){const{file:a,project:u}=this.getFileAndProject(r),h=r.format==="2020"?"2020":"original";return u.getLanguageService().getEncodedSemanticClassifications(a,r,h)}getProject(r){return r===void 0?void 0:this.projectService.findProject(r)}getConfigFileAndProject(r){const a=this.getProject(r.projectFileName),u=Jl(r.file);return{configFile:a&&a.hasConfigFile(u)?u:void 0,project:a}}getConfigFileDiagnostics(r,a,u){const h=a.getAllProjectErrors(),p=a.getLanguageService().getCompilerOptionsDiagnostics(),g=$t(Js(h,p),C=>!!C.file&&C.file.fileName===r);return u?this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(g):qt(g,C=>pz(C,!1))}convertToDiagnosticsWithLinePositionFromDiagnosticFile(r){return r.map(a=>({message:$1(a.messageText,this.host.newLine),start:a.start,length:a.length,category:nI(a),code:a.code,source:a.source,startLocation:a.file&&mO(Ia(a.file,a.start)),endLocation:a.file&&mO(Ia(a.file,a.start+a.length)),reportsUnnecessary:a.reportsUnnecessary,reportsDeprecated:a.reportsDeprecated,relatedInformation:qt(a.relatedInformation,Mpe)}))}getCompilerOptionsDiagnostics(r){const a=this.getProject(r.projectFileName);return this.convertToDiagnosticsWithLinePosition($t(a.getLanguageService().getCompilerOptionsDiagnostics(),u=>!u.file),void 0)}convertToDiagnosticsWithLinePosition(r,a){return r.map(u=>({message:$1(u.messageText,this.host.newLine),start:u.start,length:u.length,category:nI(u),code:u.code,source:u.source,startLocation:a&&a.positionToLineOffset(u.start),endLocation:a&&a.positionToLineOffset(u.start+u.length),reportsUnnecessary:u.reportsUnnecessary,reportsDeprecated:u.reportsDeprecated,relatedInformation:qt(u.relatedInformation,Mpe)}))}getDiagnosticsWorker(r,a,u,h){const{project:p,file:g}=this.getFileAndProject(r);if(a&&Fht(p,g))return Vd;const C=p.getScriptInfoForNormalizedPath(g),b=u(p,g);return h?this.convertToDiagnosticsWithLinePosition(b,C):b.map(T=>Bht(g,p,T))}getDefinition(r,a){const{file:u,project:h}=this.getFileAndProject(r),p=this.getPositionInFile(r,u),g=this.mapDefinitionInfoLocations(h.getLanguageService().getDefinitionAtPosition(u,p)||Vd,h);return a?this.mapDefinitionInfo(g,h):g.map(j1e.mapToOriginalLocation)}mapDefinitionInfoLocations(r,a){return r.map(u=>{const h=jht(u,a);return h?{...h,containerKind:u.containerKind,containerName:u.containerName,kind:u.kind,name:u.name,failedAliasResolution:u.failedAliasResolution,...u.unverified&&{unverified:u.unverified}}:u})}getDefinitionAndBoundSpan(r,a){const{file:u,project:h}=this.getFileAndProject(r),p=this.getPositionInFile(r,u),g=j.checkDefined(h.getScriptInfo(u)),C=h.getLanguageService().getDefinitionAndBoundSpan(u,p);if(!C||!C.definitions)return{definitions:Vd,textSpan:void 0};const b=this.mapDefinitionInfoLocations(C.definitions,h),{textSpan:T}=C;return a?{definitions:this.mapDefinitionInfo(b,h),textSpan:X1(T,g)}:{definitions:b.map(j1e.mapToOriginalLocation),textSpan:T}}findSourceDefinition(r){var a;const{file:u,project:h}=this.getFileAndProject(r),p=this.getPositionInFile(r,u),g=h.getLanguageService().getDefinitionAtPosition(u,p);let C=this.mapDefinitionInfoLocations(g||Vd,h).slice();if(this.projectService.serverMode===0&&(!Ft(C,F=>Jl(F.fileName)!==u&&!F.isAmbient)||Ft(C,F=>!!F.failedAliasResolution))){const F=Xse(X=>X.textSpan.start,Qfe(this.host.useCaseSensitiveFileNames));C==null||C.forEach(X=>F.add(X));const H=h.getNoDtsResolutionProject(u),U=H.getLanguageService(),q=(a=U.getDefinitionAtPosition(u,p,!0,!1))==null?void 0:a.filter(X=>Jl(X.fileName)!==u);if(Ft(q))for(const X of q){if(X.unverified){const Z=N(X,h.getLanguageService().getProgram(),U.getProgram());if(Ft(Z)){for(const Q of Z)F.add(Q);continue}}F.add(X)}else{const X=C.filter(Z=>Jl(Z.fileName)!==u&&Z.isAmbient);for(const Z of Ft(X)?X:E()){const Q=T(Z.fileName,u,H);if(!Q)continue;const re=this.projectService.getOrCreateScriptInfoNotOpenedByClient(Q,H.currentDirectory,H.directoryStructureHost,!1);if(!re)continue;H.containsScriptInfo(re)||(H.addRoot(re),H.updateGraph());const oe=U.getProgram(),pe=j.checkDefined(oe.getSourceFile(Q));for(const de of R(Z.name,pe,oe))F.add(de)}}C=as(F.values())}return C=C.filter(F=>!F.isAmbient&&!F.failedAliasResolution),this.mapDefinitionInfo(C,h);function T(F,H,U){var q,X,Z;const Q=iX(F);if(Q&&F.lastIndexOf(Xv)===Q.topLevelNodeModulesIndex){const re=F.substring(0,Q.packageRootIndex),oe=(q=h.getModuleResolutionCache())==null?void 0:q.getPackageJsonInfoCache(),pe=h.getCompilationSettings(),de=V7(wo(re,h.getCurrentDirectory()),W7(oe,h,pe));if(!de)return;const ue=yue(de,{moduleResolution:2},h,h.getModuleResolutionCache()),Ie=F.substring(Q.topLevelPackageNameIndex+1,Q.packageRootIndex),we=H7(FH(Ie)),he=h.toPath(F);if(ue&&Ft(ue,Ae=>h.toPath(Ae)===he))return(X=U.resolutionCache.resolveSingleModuleNameWithoutWatching(we,H).resolvedModule)==null?void 0:X.resolvedFileName;{const Ae=F.substring(Q.packageRootIndex+1),ke=`${we}/${s_(Ae)}`;return(Z=U.resolutionCache.resolveSingleModuleNameWithoutWatching(ke,H).resolvedModule)==null?void 0:Z.resolvedFileName}}}function E(){const F=h.getLanguageService(),H=F.getProgram(),U=R_(H.getSourceFile(u),p);return(Bc(U)||ot(U))&&Sl(U.parent)&&CDe(U,q=>{var X;if(q===U)return;const Z=(X=F.getDefinitionAtPosition(u,q.getStart(),!0,!1))==null?void 0:X.filter(Q=>Jl(Q.fileName)!==u&&Q.isAmbient).map(Q=>({fileName:Q.fileName,name:Lg(U)}));if(Ft(Z))return Z})||Vd}function N(F,H,U){var q;const X=U.getSourceFile(F.fileName);if(!X)return;const Z=R_(H.getSourceFile(u),p),Q=H.getTypeChecker().getSymbolAtLocation(Z),re=Q&&ql(Q,276);if(!re)return;const oe=((q=re.propertyName)==null?void 0:q.text)||re.name.text;return R(oe,X,U)}function R(F,H,U){const q=kl.Core.getTopMostDeclarationNamesInFile(F,H);return es(q,X=>{const Z=U.getTypeChecker().getSymbolAtLocation(X),Q=R8(X);if(Z&&Q)return uO.createDefinitionInfo(Q,U.getTypeChecker(),Z,Q,!0)})}}getEmitOutput(r){const{file:a,project:u}=this.getFileAndProject(r);if(!u.shouldEmitFile(u.getScriptInfo(a)))return{emitSkipped:!0,outputFiles:[],diagnostics:[]};const h=u.getLanguageService().getEmitOutput(a);return r.richResponse?{...h,diagnostics:r.includeLinePosition?this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(h.diagnostics):h.diagnostics.map(p=>pz(p,!0))}:h}mapJSDocTagInfo(r,a,u){return r?r.map(h=>{var p;return{...h,text:u?this.mapDisplayParts(h.text,a):(p=h.text)==null?void 0:p.map(g=>g.text).join("")}}):[]}mapDisplayParts(r,a){return r?r.map(u=>u.kind!=="linkName"?u:{...u,target:this.toFileSpan(u.target.fileName,u.target.textSpan,a)}):[]}mapSignatureHelpItems(r,a,u){return r.map(h=>({...h,documentation:this.mapDisplayParts(h.documentation,a),parameters:h.parameters.map(p=>({...p,documentation:this.mapDisplayParts(p.documentation,a)})),tags:this.mapJSDocTagInfo(h.tags,a,u)}))}mapDefinitionInfo(r,a){return r.map(u=>({...this.toFileSpanWithContext(u.fileName,u.textSpan,u.contextSpan,a),...u.unverified&&{unverified:u.unverified}}))}static mapToOriginalLocation(r){return r.originalFileName?(j.assert(r.originalTextSpan!==void 0,"originalTextSpan should be present if originalFileName is"),{...r,fileName:r.originalFileName,textSpan:r.originalTextSpan,targetFileName:r.fileName,targetTextSpan:r.textSpan,contextSpan:r.originalContextSpan,targetContextSpan:r.contextSpan}):r}toFileSpan(r,a,u){const h=u.getLanguageService(),p=h.toLineColumnOffset(r,a.start),g=h.toLineColumnOffset(r,au(a));return{file:r,start:{line:p.line+1,offset:p.character+1},end:{line:g.line+1,offset:g.character+1}}}toFileSpanWithContext(r,a,u,h){const p=this.toFileSpan(r,a,h),g=u&&this.toFileSpan(r,u,h);return g?{...p,contextStart:g.start,contextEnd:g.end}:p}getTypeDefinition(r){const{file:a,project:u}=this.getFileAndProject(r),h=this.getPositionInFile(r,a),p=this.mapDefinitionInfoLocations(u.getLanguageService().getTypeDefinitionAtPosition(a,h)||Vd,u);return this.mapDefinitionInfo(p,u)}mapImplementationLocations(r,a){return r.map(u=>{const h=jht(u,a);return h?{...h,kind:u.kind,displayParts:u.displayParts}:u})}getImplementation(r,a){const{file:u,project:h}=this.getFileAndProject(r),p=this.getPositionInFile(r,u),g=this.mapImplementationLocations(h.getLanguageService().getImplementationAtPosition(u,p)||Vd,h);return a?g.map(({fileName:C,textSpan:b,contextSpan:T})=>this.toFileSpanWithContext(C,b,T,h)):g.map(j1e.mapToOriginalLocation)}getSyntacticDiagnosticsSync(r){const{configFile:a}=this.getConfigFileAndProject(r);return a?Vd:this.getDiagnosticsWorker(r,!1,(u,h)=>u.getLanguageService().getSyntacticDiagnostics(h),!!r.includeLinePosition)}getSemanticDiagnosticsSync(r){const{configFile:a,project:u}=this.getConfigFileAndProject(r);return a?this.getConfigFileDiagnostics(a,u,!!r.includeLinePosition):this.getDiagnosticsWorker(r,!0,(h,p)=>h.getLanguageService().getSemanticDiagnostics(p).filter(g=>!!g.file),!!r.includeLinePosition)}getSuggestionDiagnosticsSync(r){const{configFile:a}=this.getConfigFileAndProject(r);return a?Vd:this.getDiagnosticsWorker(r,!0,(u,h)=>u.getLanguageService().getSuggestionDiagnostics(h),!!r.includeLinePosition)}getJsxClosingTag(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=this.getPositionInFile(r,a),p=u.getJsxClosingTagAtPosition(a,h);return p===void 0?void 0:{newText:p.newText,caretOffset:0}}getLinkedEditingRange(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=this.getPositionInFile(r,a),p=u.getLinkedEditingRangeAtPosition(a,h),g=this.projectService.getScriptInfoForNormalizedPath(a);if(!(g===void 0||p===void 0))return _Gt(p,g)}getDocumentHighlights(r,a){const{file:u,project:h}=this.getFileAndProject(r),p=this.getPositionInFile(r,u),g=h.getLanguageService().getDocumentHighlights(u,p,r.filesToSearch);return g?a?g.map(({fileName:C,highlightSpans:b})=>{const T=h.getScriptInfo(C);return{file:C,highlightSpans:b.map(({textSpan:E,kind:N,contextSpan:R})=>({...cRe(E,R,T),kind:N}))}}):g:Vd}provideInlayHints(r){const{file:a,project:u}=this.getFileAndProject(r),h=this.projectService.getScriptInfoForNormalizedPath(a);return u.getLanguageService().provideInlayHints(a,r,this.getPreferences(a)).map(g=>{const{position:C,displayParts:b}=g;return{...g,position:h.positionToLineOffset(C),displayParts:b==null?void 0:b.map(({text:T,span:E,file:N})=>{if(E){j.assertIsDefined(N,"Target file should be defined together with its span.");const R=this.projectService.getScriptInfo(N);return{text:T,span:{start:R.positionToLineOffset(E.start),end:R.positionToLineOffset(E.start+E.length),file:N}}}else return{text:T}})}})}mapCode(r){var a;const u=this.getHostFormatOptions(),h=this.getHostPreferences(),{file:p,languageService:g}=this.getFileAndLanguageServiceForSyntacticOperation(r),C=this.projectService.getScriptInfoForNormalizedPath(p),b=(a=r.mapping.focusLocations)==null?void 0:a.map(E=>E.map(N=>{const R=C.lineOffsetToPosition(N.start.line,N.start.offset),F=C.lineOffsetToPosition(N.end.line,N.end.offset);return{start:R,length:F-R}})),T=g.mapCode(p,r.mapping.contents,b,u,h);return this.mapTextChangesToCodeEdits(T)}setCompilerOptionsForInferredProjects(r){this.projectService.setCompilerOptionsForInferredProjects(r.options,r.projectRootPath)}getProjectInfo(r){return this.getProjectInfoWorker(r.file,r.projectFileName,r.needFileNameList,!1)}getProjectInfoWorker(r,a,u,h){const{project:p}=this.getFileAndProjectWorker(r,a);return Ym(p),{configFileName:p.getProjectName(),languageServiceDisabled:!p.languageServiceEnabled,fileNames:u?p.getFileNames(!1,h):void 0}}getRenameInfo(r){const{file:a,project:u}=this.getFileAndProject(r),h=this.getPositionInFile(r,a),p=this.getPreferences(a);return u.getLanguageService().getRenameInfo(a,h,p)}getProjects(r,a,u){let h,p;if(r.projectFileName){const g=this.getProject(r.projectFileName);g&&(h=[g])}else{const g=a?this.projectService.getScriptInfoEnsuringProjectsUptoDate(r.file):this.projectService.getScriptInfo(r.file);if(g)a||this.projectService.ensureDefaultProjectForFile(g);else return u?Vd:(this.projectService.logErrorForScriptInfoNotFound(r.file),cC.ThrowNoProject());h=g.containingProjects,p=this.projectService.getSymlinkedProjects(g)}return h=$t(h,g=>g.languageServiceEnabled&&!g.isOrphan()),!u&&(!h||!h.length)&&!p?(this.projectService.logErrorForScriptInfoNotFound(r.file??r.projectFileName),cC.ThrowNoProject()):p?{projects:h,symLinkedProjects:p}:h}getDefaultProject(r){if(r.projectFileName){const u=this.getProject(r.projectFileName);if(u)return u;if(!r.file)return cC.ThrowNoProject()}return this.projectService.getScriptInfo(r.file).getDefaultProject()}getRenameLocations(r,a){const u=Jl(r.file),h=this.getPositionInFile(r,u),p=this.getProjects(r),g=this.getDefaultProject(r),C=this.getPreferences(u),b=this.mapRenameInfo(g.getLanguageService().getRenameInfo(u,h,C),j.checkDefined(this.projectService.getScriptInfo(u)));if(!b.canRename)return a?{info:b,locs:[]}:[];const T=oGt(p,g,{fileName:r.file,pos:h},!!r.findInStrings,!!r.findInComments,C,this.host.useCaseSensitiveFileNames);return a?{info:b,locs:this.toSpanGroups(T)}:T}mapRenameInfo(r,a){if(r.canRename){const{canRename:u,fileToRename:h,displayName:p,fullDisplayName:g,kind:C,kindModifiers:b,triggerSpan:T}=r;return{canRename:u,fileToRename:h,displayName:p,fullDisplayName:g,kind:C,kindModifiers:b,triggerSpan:X1(T,a)}}else return r}toSpanGroups(r){const a=new Map;for(const{fileName:u,textSpan:h,contextSpan:p,originalContextSpan:g,originalTextSpan:C,originalFileName:b,...T}of r){let E=a.get(u);E||a.set(u,E={file:u,locs:[]});const N=j.checkDefined(this.projectService.getScriptInfo(u));E.locs.push({...cRe(h,p,N),...T})}return as(a.values())}getReferences(r,a){const u=Jl(r.file),h=this.getProjects(r),p=this.getPositionInFile(r,u),g=cGt(h,this.getDefaultProject(r),{fileName:r.file,pos:p},this.host.useCaseSensitiveFileNames,this.logger);if(!a)return g;const C=this.getPreferences(u),b=this.getDefaultProject(r),T=b.getScriptInfoForNormalizedPath(u),E=b.getLanguageService().getQuickInfoAtPosition(u,p),N=E?Wj(E.displayParts):"",R=E&&E.textSpan,F=R?T.positionToLineOffset(R.start).offset:0,H=R?T.getSnapshot().getText(R.start,au(R)):"";return{refs:Rr(g,q=>q.references.map(X=>Jht(this.projectService,X,C))),symbolName:H,symbolStartOffset:F,symbolDisplayString:N}}getFileReferences(r,a){const u=this.getProjects(r),h=r.file,p=this.getPreferences(Jl(h)),g=[],C=Rpe(this.host.useCaseSensitiveFileNames);return aRe(u,void 0,T=>{if(T.getCancellationToken().isCancellationRequested())return;const E=T.getLanguageService().getFileReferences(h);if(E)for(const N of E)C.has(N)||(g.push(N),C.add(N))}),a?{refs:g.map(T=>Jht(this.projectService,T,p)),symbolName:`"${r.file}"`}:g}openClientFile(r,a,u,h){this.projectService.openClientFileWithNormalizedPath(r,a,u,!1,h)}getPosition(r,a){return r.position!==void 0?r.position:a.lineOffsetToPosition(r.line,r.offset)}getPositionInFile(r,a){const u=this.projectService.getScriptInfoForNormalizedPath(a);return this.getPosition(r,u)}getFileAndProject(r){return this.getFileAndProjectWorker(r.file,r.projectFileName)}getFileAndLanguageServiceForSyntacticOperation(r){const{file:a,project:u}=this.getFileAndProject(r);return{file:a,languageService:u.getLanguageService(!1)}}getFileAndProjectWorker(r,a){const u=Jl(r),h=this.getProject(a)||this.projectService.ensureDefaultProjectForFile(u);return{file:u,project:h}}getOutliningSpans(r,a){const{file:u,languageService:h}=this.getFileAndLanguageServiceForSyntacticOperation(r),p=h.getOutliningSpans(u);if(a){const g=this.projectService.getScriptInfoForNormalizedPath(u);return p.map(C=>({textSpan:X1(C.textSpan,g),hintSpan:X1(C.hintSpan,g),bannerText:C.bannerText,autoCollapse:C.autoCollapse,kind:C.kind}))}else return p}getTodoComments(r){const{file:a,project:u}=this.getFileAndProject(r);return u.getLanguageService().getTodoComments(a,r.descriptors)}getDocCommentTemplate(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=this.getPositionInFile(r,a);return u.getDocCommentTemplateAtPosition(a,h,this.getPreferences(a),this.getFormatOptions(a))}getSpanOfEnclosingComment(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=r.onlyMultiLine,p=this.getPositionInFile(r,a);return u.getSpanOfEnclosingComment(a,p,h)}getIndentation(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=this.getPositionInFile(r,a),p=r.options?pO(r.options):this.getFormatOptions(a),g=u.getIndentationAtPosition(a,h,p);return{position:h,indentation:g}}getBreakpointStatement(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=this.getPositionInFile(r,a);return u.getBreakpointStatementAtPosition(a,h)}getNameOrDottedNameSpan(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=this.getPositionInFile(r,a);return u.getNameOrDottedNameSpan(a,h,h)}isValidBraceCompletion(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=this.getPositionInFile(r,a);return u.isValidBraceCompletionAtPosition(a,h,r.openingBrace.charCodeAt(0))}getQuickInfoWorker(r,a){const{file:u,project:h}=this.getFileAndProject(r),p=this.projectService.getScriptInfoForNormalizedPath(u),g=h.getLanguageService().getQuickInfoAtPosition(u,this.getPosition(r,p));if(!g)return;const C=!!this.getPreferences(u).displayPartsForJSDoc;if(a){const b=Wj(g.displayParts);return{kind:g.kind,kindModifiers:g.kindModifiers,start:p.positionToLineOffset(g.textSpan.start),end:p.positionToLineOffset(au(g.textSpan)),displayString:b,documentation:C?this.mapDisplayParts(g.documentation,h):Wj(g.documentation),tags:this.mapJSDocTagInfo(g.tags,h,C)}}else return C?g:{...g,tags:this.mapJSDocTagInfo(g.tags,h,!1)}}getFormattingEditsForRange(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=this.projectService.getScriptInfoForNormalizedPath(a),p=h.lineOffsetToPosition(r.line,r.offset),g=h.lineOffsetToPosition(r.endLine,r.endOffset),C=u.getFormattingEditsForRange(a,p,g,this.getFormatOptions(a));if(C)return C.map(b=>this.convertTextChangeToCodeEdit(b,h))}getFormattingEditsForRangeFull(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=r.options?pO(r.options):this.getFormatOptions(a);return u.getFormattingEditsForRange(a,r.position,r.endPosition,h)}getFormattingEditsForDocumentFull(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=r.options?pO(r.options):this.getFormatOptions(a);return u.getFormattingEditsForDocument(a,h)}getFormattingEditsAfterKeystrokeFull(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=r.options?pO(r.options):this.getFormatOptions(a);return u.getFormattingEditsAfterKeystroke(a,r.position,r.key,h)}getFormattingEditsAfterKeystroke(r){const{file:a,languageService:u}=this.getFileAndLanguageServiceForSyntacticOperation(r),h=this.projectService.getScriptInfoForNormalizedPath(a),p=h.lineOffsetToPosition(r.line,r.offset),g=this.getFormatOptions(a),C=u.getFormattingEditsAfterKeystroke(a,p,r.key,g);if(r.key===`
+`&&(!C||C.length===0||nGt(C,p))){const{lineText:b,absolutePosition:T}=h.textStorage.getAbsolutePositionAndLineText(r.line);if(b&&b.search("\\S")<0){const E=u.getIndentationAtPosition(a,p,g);let N=0,R,F;for(R=0,F=b.length;R<F;R++)if(b.charAt(R)===" ")N++;else if(b.charAt(R)===" ")N+=g.tabSize;else break;if(E!==N){const H=T+R;C.push({span:Fu(T,H),newText:pd.getIndentationString(E,g)})}}}if(C)return C.map(b=>({start:h.positionToLineOffset(b.span.start),end:h.positionToLineOffset(au(b.span)),newText:b.newText?b.newText:""}))}getCompletions(r,a){const{file:u,project:h}=this.getFileAndProject(r),p=this.projectService.getScriptInfoForNormalizedPath(u),g=this.getPosition(r,p),C=h.getLanguageService().getCompletionsAtPosition(u,g,{...qMe(this.getPreferences(u)),triggerCharacter:r.triggerCharacter,triggerKind:r.triggerKind,includeExternalModuleExports:r.includeExternalModuleExports,includeInsertTextCompletions:r.includeInsertTextCompletions},h.projectService.getFormatCodeOptions(u));if(C===void 0)return;if(a==="completions-full")return C;const b=r.prefix||"",T=es(C.entries,N=>{if(C.isMemberCompletion||so(N.name.toLowerCase(),b.toLowerCase())){const R=N.replacementSpan?X1(N.replacementSpan,p):void 0;return{...N,replacementSpan:R,hasAction:N.hasAction||void 0,symbol:void 0}}});return a==="completions"?(C.metadata&&(T.metadata=C.metadata),T):{...C,optionalReplacementSpan:C.optionalReplacementSpan&&X1(C.optionalReplacementSpan,p),entries:T}}getCompletionEntryDetails(r,a){const{file:u,project:h}=this.getFileAndProject(r),p=this.projectService.getScriptInfoForNormalizedPath(u),g=this.getPosition(r,p),C=h.projectService.getFormatCodeOptions(u),b=!!this.getPreferences(u).displayPartsForJSDoc,T=es(r.entryNames,E=>{const{name:N,source:R,data:F}=typeof E=="string"?{name:E,source:void 0,data:void 0}:E;return h.getLanguageService().getCompletionEntryDetails(u,g,N,C,R,this.getPreferences(u),F?ha(F,vGt):void 0)});return a?b?T:T.map(E=>({...E,tags:this.mapJSDocTagInfo(E.tags,h,!1)})):T.map(E=>({...E,codeActions:qt(E.codeActions,N=>this.mapCodeAction(N)),documentation:this.mapDisplayParts(E.documentation,h),tags:this.mapJSDocTagInfo(E.tags,h,b)}))}getCompileOnSaveAffectedFileList(r){const a=this.getProjects(r,!0,!0),u=this.projectService.getScriptInfo(r.file);return u?sGt(u,h=>this.projectService.getScriptInfoForPath(h),a,(h,p)=>{if(!h.compileOnSaveEnabled||!h.languageServiceEnabled||h.isOrphan())return;const g=h.getCompilationSettings();if(!(g.noEmit||df(p.fileName)&&!iGt(g)))return{projectFileName:h.getProjectName(),fileNames:h.getCompileOnSaveAffectedFileList(p),projectUsesOutFile:!!g.outFile}}):Vd}emitFile(r){const{file:a,project:u}=this.getFileAndProject(r);if(u||cC.ThrowNoProject(),!u.languageServiceEnabled)return r.richResponse?{emitSkipped:!0,diagnostics:[]}:!1;const h=u.getScriptInfo(a),{emitSkipped:p,diagnostics:g}=u.emitFile(h,(C,b,T)=>this.host.writeFile(C,b,T));return r.richResponse?{emitSkipped:p,diagnostics:r.includeLinePosition?this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(g):g.map(C=>pz(C,!0))}:!p}getSignatureHelpItems(r,a){const{file:u,project:h}=this.getFileAndProject(r),p=this.projectService.getScriptInfoForNormalizedPath(u),g=this.getPosition(r,p),C=h.getLanguageService().getSignatureHelpItems(u,g,r),b=!!this.getPreferences(u).displayPartsForJSDoc;if(C&&a){const T=C.applicableSpan;return{...C,applicableSpan:{start:p.positionToLineOffset(T.start),end:p.positionToLineOffset(T.start+T.length)},items:this.mapSignatureHelpItems(C.items,h,b)}}else return b||!C?C:{...C,items:C.items.map(T=>({...T,tags:this.mapJSDocTagInfo(T.tags,h,!1)}))}}toPendingErrorCheck(r){const a=Jl(r),u=this.projectService.tryGetDefaultProjectForFile(a);return u&&{fileName:a,project:u}}getDiagnostics(r,a,u){this.suppressDiagnosticEvents||u.length>0&&this.updateErrorCheck(r,u,a)}change(r){const a=this.projectService.getScriptInfo(r.file);j.assert(!!a),a.textStorage.switchToScriptVersionCache();const u=a.lineOffsetToPosition(r.line,r.offset),h=a.lineOffsetToPosition(r.endLine,r.endOffset);u>=0&&(this.changeSeq++,this.projectService.applyChangesToFile(a,Bb({span:{start:u,length:h-u},newText:r.insertString})))}reload(r){const a=Jl(r.file),u=r.tmpfile===void 0?void 0:Jl(r.tmpfile),h=this.projectService.getScriptInfoForNormalizedPath(a);h&&(this.changeSeq++,h.reloadFromFile(u))}saveToTmp(r,a){const u=this.projectService.getScriptInfo(r);u&&u.saveTo(a)}closeClientFile(r){if(!r)return;const a=ca(r);this.projectService.closeClientFile(a)}mapLocationNavigationBarItems(r,a){return qt(r,u=>({text:u.text,kind:u.kind,kindModifiers:u.kindModifiers,spans:u.spans.map(h=>X1(h,a)),childItems:this.mapLocationNavigationBarItems(u.childItems,a),indent:u.indent}))}getNavigationBarItems(r,a){const{file:u,languageService:h}=this.getFileAndLanguageServiceForSyntacticOperation(r),p=h.getNavigationBarItems(u);return p?a?this.mapLocationNavigationBarItems(p,this.projectService.getScriptInfoForNormalizedPath(u)):p:void 0}toLocationNavigationTree(r,a){return{text:r.text,kind:r.kind,kindModifiers:r.kindModifiers,spans:r.spans.map(u=>X1(u,a)),nameSpan:r.nameSpan&&X1(r.nameSpan,a),childItems:qt(r.childItems,u=>this.toLocationNavigationTree(u,a))}}getNavigationTree(r,a){const{file:u,languageService:h}=this.getFileAndLanguageServiceForSyntacticOperation(r),p=h.getNavigationTree(u);return p?a?this.toLocationNavigationTree(p,this.projectService.getScriptInfoForNormalizedPath(u)):p:void 0}getNavigateToItems(r,a){const u=this.getFullNavigateToItems(r);return a?Rr(u,({project:h,navigateToItems:p})=>p.map(g=>{const C=h.getScriptInfo(g.fileName),b={name:g.name,kind:g.kind,kindModifiers:g.kindModifiers,isCaseSensitive:g.isCaseSensitive,matchKind:g.matchKind,file:g.fileName,start:C.positionToLineOffset(g.textSpan.start),end:C.positionToLineOffset(au(g.textSpan))};return g.kindModifiers&&g.kindModifiers!==""&&(b.kindModifiers=g.kindModifiers),g.containerName&&g.containerName.length>0&&(b.containerName=g.containerName),g.containerKind&&g.containerKind.length>0&&(b.containerKind=g.containerKind),b})):Rr(u,({navigateToItems:h})=>h)}getFullNavigateToItems(r){const{currentFileOnly:a,searchValue:u,maxResultCount:h,projectFileName:p}=r;if(a){j.assertIsDefined(r.file);const{file:R,project:F}=this.getFileAndProject(r);return[{project:F,navigateToItems:F.getLanguageService().getNavigateToItems(u,h,R)}]}const g=this.getHostPreferences(),C=[],b=new Map;if(!r.file&&!p)this.projectService.loadAncestorProjectTree(),this.projectService.forEachEnabledProject(R=>T(R));else{const R=this.getProjects(r);aRe(R,void 0,F=>T(F))}return C;function T(R){const F=R.getLanguageService().getNavigateToItems(u,h,void 0,R.isNonTsProject(),g.excludeLibrarySymbolsInNavTo),H=$t(F,U=>E(U)&&!Fpe(N5(U),R));H.length&&C.push({project:R,navigateToItems:H})}function E(R){const F=R.name;if(!b.has(F))return b.set(F,[R]),!0;const H=b.get(F);for(const U of H)if(N(U,R))return!1;return H.push(R),!0}function N(R,F){return R===F?!0:!R||!F?!1:R.containerKind===F.containerKind&&R.containerName===F.containerName&&R.fileName===F.fileName&&R.isCaseSensitive===F.isCaseSensitive&&R.kind===F.kind&&R.kindModifiers===F.kindModifiers&&R.matchKind===F.matchKind&&R.name===F.name&&R.textSpan.start===F.textSpan.start&&R.textSpan.length===F.textSpan.length}}getSupportedCodeFixes(r){if(!r)return n_e();if(r.file){const{file:u,project:h}=this.getFileAndProject(r);return h.getLanguageService().getSupportedCodeFixes(u)}const a=this.getProject(r.projectFileName);return a||cC.ThrowNoProject(),a.getLanguageService().getSupportedCodeFixes()}isLocation(r){return r.line!==void 0}extractPositionOrRange(r,a){let u,h;return this.isLocation(r)?u=p(r):h=this.getRange(r,a),j.checkDefined(u===void 0?h:u);function p(g){return g.position!==void 0?g.position:a.lineOffsetToPosition(g.line,g.offset)}}getRange(r,a){const{startPosition:u,endPosition:h}=this.getStartAndEndPosition(r,a);return{pos:u,end:h}}getApplicableRefactors(r){const{file:a,project:u}=this.getFileAndProject(r),h=u.getScriptInfoForNormalizedPath(a);return u.getLanguageService().getApplicableRefactors(a,this.extractPositionOrRange(r,h),this.getPreferences(a),r.triggerReason,r.kind,r.includeInteractiveActions).map(g=>({...g,actions:g.actions.map(C=>({...C,range:C.range?{start:mO({line:C.range.start.line,character:C.range.start.offset}),end:mO({line:C.range.end.line,character:C.range.end.offset})}:void 0}))}))}getEditsForRefactor(r,a){const{file:u,project:h}=this.getFileAndProject(r),p=h.getScriptInfoForNormalizedPath(u),g=h.getLanguageService().getEditsForRefactor(u,this.getFormatOptions(u),this.extractPositionOrRange(r,p),r.refactor,r.action,this.getPreferences(u),r.interactiveRefactorArguments);if(g===void 0)return{edits:[]};if(a){const{renameFilename:C,renameLocation:b,edits:T}=g;let E;if(C!==void 0&&b!==void 0){const N=h.getScriptInfoForNormalizedPath(Jl(C));E=lRe(uA(N.getSnapshot()),C,b,T)}return{renameLocation:E,renameFilename:C,edits:this.mapTextChangesToCodeEdits(T),notApplicableReason:g.notApplicableReason}}return g}getMoveToRefactoringFileSuggestions(r){const{file:a,project:u}=this.getFileAndProject(r),h=u.getScriptInfoForNormalizedPath(a);return u.getLanguageService().getMoveToRefactoringFileSuggestions(a,this.extractPositionOrRange(r,h),this.getPreferences(a))}getPasteEdits(r){const{file:a,project:u}=this.getFileAndProject(r),h=r.copiedFrom?{file:r.copiedFrom.file,range:r.copiedFrom.spans.map(g=>this.getRange({file:r.copiedFrom.file,startLine:g.start.line,startOffset:g.start.offset,endLine:g.end.line,endOffset:g.end.offset},u.getScriptInfoForNormalizedPath(Jl(r.copiedFrom.file))))}:void 0,p=u.getLanguageService().getPasteEdits({targetFile:a,pastedText:r.pastedText,pasteLocations:r.pasteLocations.map(g=>this.getRange({file:a,startLine:g.start.line,startOffset:g.start.offset,endLine:g.end.line,endOffset:g.end.offset},u.getScriptInfoForNormalizedPath(a))),copiedFrom:h,preferences:this.getPreferences(a)},this.getFormatOptions(a));return p&&this.mapPasteEditsAction(p)}organizeImports(r,a){j.assert(r.scope.type==="file");const{file:u,project:h}=this.getFileAndProject(r.scope.args),p=h.getLanguageService().organizeImports({fileName:u,mode:r.mode??(r.skipDestructiveCodeActions?"SortAndCombine":void 0),type:"file"},this.getFormatOptions(u),this.getPreferences(u));return a?this.mapTextChangesToCodeEdits(p):p}getEditsForFileRename(r,a){const u=Jl(r.oldFilePath),h=Jl(r.newFilePath),p=this.getHostFormatOptions(),g=this.getHostPreferences(),C=new Set,b=[];return this.projectService.loadAncestorProjectTree(),this.projectService.forEachEnabledProject(T=>{const E=T.getLanguageService().getEditsForFileRename(u,h,p,g),N=[];for(const R of E)C.has(R.fileName)||(b.push(R),N.push(R.fileName));for(const R of N)C.add(R)}),a?b.map(T=>this.mapTextChangeToCodeEdit(T)):b}getCodeFixes(r,a){const{file:u,project:h}=this.getFileAndProject(r),p=h.getScriptInfoForNormalizedPath(u),{startPosition:g,endPosition:C}=this.getStartAndEndPosition(r,p);let b;try{b=h.getLanguageService().getCodeFixesAtPosition(u,g,C,r.errorCodes,this.getFormatOptions(u),this.getPreferences(u))}catch(T){const E=h.getLanguageService(),N=[...E.getSyntacticDiagnostics(u),...E.getSemanticDiagnostics(u),...E.getSuggestionDiagnostics(u)].map(F=>PW(g,C-g,F.start,F.length)&&F.code),R=r.errorCodes.find(F=>!N.includes(F));throw R!==void 0&&(T.message=`BADCLIENT: Bad error code, ${R} not found in range ${g}..${C} (found: ${N.join(", ")}); could have caused this error:
+${T.message}`),T}return a?b.map(T=>this.mapCodeFixAction(T)):b}getCombinedCodeFix({scope:r,fixId:a},u){j.assert(r.type==="file");const{file:h,project:p}=this.getFileAndProject(r.args),g=p.getLanguageService().getCombinedCodeFix({type:"file",fileName:h},a,this.getFormatOptions(h),this.getPreferences(h));return u?{changes:this.mapTextChangesToCodeEdits(g.changes),commands:g.commands}:g}applyCodeActionCommand(r){const a=r.command;for(const u of JL(a)){const{file:h,project:p}=this.getFileAndProject(u);p.getLanguageService().applyCodeActionCommand(u,this.getFormatOptions(h)).then(g=>{},g=>{})}return{}}getStartAndEndPosition(r,a){let u,h;return r.startPosition!==void 0?u=r.startPosition:(u=a.lineOffsetToPosition(r.startLine,r.startOffset),r.startPosition=u),r.endPosition!==void 0?h=r.endPosition:(h=a.lineOffsetToPosition(r.endLine,r.endOffset),r.endPosition=h),{startPosition:u,endPosition:h}}mapCodeAction({description:r,changes:a,commands:u}){return{description:r,changes:this.mapTextChangesToCodeEdits(a),commands:u}}mapCodeFixAction({fixName:r,description:a,changes:u,commands:h,fixId:p,fixAllDescription:g}){return{fixName:r,description:a,changes:this.mapTextChangesToCodeEdits(u),commands:h,fixId:p,fixAllDescription:g}}mapPasteEditsAction({edits:r,fixId:a}){return{edits:this.mapTextChangesToCodeEdits(r),fixId:a}}mapTextChangesToCodeEdits(r){return r.map(a=>this.mapTextChangeToCodeEdit(a))}mapTextChangeToCodeEdit(r){const a=this.projectService.getScriptInfoOrConfig(r.fileName);return!!r.isNewFile==!!a&&(a||this.projectService.logErrorForScriptInfoNotFound(r.fileName),j.fail("Expected isNewFile for (only) new files. "+JSON.stringify({isNewFile:!!r.isNewFile,hasScriptInfo:!!a}))),a?{fileName:r.fileName,textChanges:r.textChanges.map(u=>hGt(u,a))}:mGt(r)}convertTextChangeToCodeEdit(r,a){return{start:a.positionToLineOffset(r.span.start),end:a.positionToLineOffset(r.span.start+r.span.length),newText:r.newText?r.newText:""}}getBraceMatching(r,a){const{file:u,languageService:h}=this.getFileAndLanguageServiceForSyntacticOperation(r),p=this.projectService.getScriptInfoForNormalizedPath(u),g=this.getPosition(r,p),C=h.getBraceMatchingAtPosition(u,g);return C?a?C.map(b=>X1(b,p)):C:void 0}getDiagnosticsForProject(r,a,u){if(this.suppressDiagnosticEvents)return;const{fileNames:h,languageServiceDisabled:p}=this.getProjectInfoWorker(u,void 0,!0,!0);if(p)return;const g=h.filter(U=>!U.includes("lib.d.ts"));if(g.length===0)return;const C=[],b=[],T=[],E=[],N=Jl(u),R=this.projectService.ensureDefaultProjectForFile(N);for(const U of g)this.getCanonicalFileName(U)===this.getCanonicalFileName(u)?C.push(U):this.projectService.getScriptInfo(U).isScriptOpen()?b.push(U):df(U)?E.push(U):T.push(U);const H=[...C,...b,...T,...E].map(U=>({fileName:U,project:R}));this.updateErrorCheck(r,H,a,!1)}configurePlugin(r){this.projectService.configurePlugin(r)}getSmartSelectionRange(r,a){const{locations:u}=r,{file:h,languageService:p}=this.getFileAndLanguageServiceForSyntacticOperation(r),g=j.checkDefined(this.projectService.getScriptInfo(h));return qt(u,C=>{const b=this.getPosition(C,g),T=p.getSmartSelectionRange(h,b);return a?this.mapSelectionRange(T,g):T})}toggleLineComment(r,a){const{file:u,languageService:h}=this.getFileAndLanguageServiceForSyntacticOperation(r),p=this.projectService.getScriptInfo(u),g=this.getRange(r,p),C=h.toggleLineComment(u,g);if(a){const b=this.projectService.getScriptInfoForNormalizedPath(u);return C.map(T=>this.convertTextChangeToCodeEdit(T,b))}return C}toggleMultilineComment(r,a){const{file:u,languageService:h}=this.getFileAndLanguageServiceForSyntacticOperation(r),p=this.projectService.getScriptInfoForNormalizedPath(u),g=this.getRange(r,p),C=h.toggleMultilineComment(u,g);if(a){const b=this.projectService.getScriptInfoForNormalizedPath(u);return C.map(T=>this.convertTextChangeToCodeEdit(T,b))}return C}commentSelection(r,a){const{file:u,languageService:h}=this.getFileAndLanguageServiceForSyntacticOperation(r),p=this.projectService.getScriptInfoForNormalizedPath(u),g=this.getRange(r,p),C=h.commentSelection(u,g);if(a){const b=this.projectService.getScriptInfoForNormalizedPath(u);return C.map(T=>this.convertTextChangeToCodeEdit(T,b))}return C}uncommentSelection(r,a){const{file:u,languageService:h}=this.getFileAndLanguageServiceForSyntacticOperation(r),p=this.projectService.getScriptInfoForNormalizedPath(u),g=this.getRange(r,p),C=h.uncommentSelection(u,g);if(a){const b=this.projectService.getScriptInfoForNormalizedPath(u);return C.map(T=>this.convertTextChangeToCodeEdit(T,b))}return C}mapSelectionRange(r,a){const u={textSpan:X1(r.textSpan,a)};return r.parent&&(u.parent=this.mapSelectionRange(r.parent,a)),u}getScriptInfoFromProjectService(r){const a=Jl(r),u=this.projectService.getScriptInfoForNormalizedPath(a);return u||(this.projectService.logErrorForScriptInfoNotFound(a),cC.ThrowNoProject())}toProtocolCallHierarchyItem(r){const a=this.getScriptInfoFromProjectService(r.file);return{name:r.name,kind:r.kind,kindModifiers:r.kindModifiers,file:r.file,containerName:r.containerName,span:X1(r.span,a),selectionSpan:X1(r.selectionSpan,a)}}toProtocolCallHierarchyIncomingCall(r){const a=this.getScriptInfoFromProjectService(r.from.file);return{from:this.toProtocolCallHierarchyItem(r.from),fromSpans:r.fromSpans.map(u=>X1(u,a))}}toProtocolCallHierarchyOutgoingCall(r,a){return{to:this.toProtocolCallHierarchyItem(r.to),fromSpans:r.fromSpans.map(u=>X1(u,a))}}prepareCallHierarchy(r){const{file:a,project:u}=this.getFileAndProject(r),h=this.projectService.getScriptInfoForNormalizedPath(a);if(h){const p=this.getPosition(r,h),g=u.getLanguageService().prepareCallHierarchy(a,p);return g&&_he(g,C=>this.toProtocolCallHierarchyItem(C))}}provideCallHierarchyIncomingCalls(r){const{file:a,project:u}=this.getFileAndProject(r),h=this.getScriptInfoFromProjectService(a);return u.getLanguageService().provideCallHierarchyIncomingCalls(a,this.getPosition(r,h)).map(g=>this.toProtocolCallHierarchyIncomingCall(g))}provideCallHierarchyOutgoingCalls(r){const{file:a,project:u}=this.getFileAndProject(r),h=this.getScriptInfoFromProjectService(a);return u.getLanguageService().provideCallHierarchyOutgoingCalls(a,this.getPosition(r,h)).map(g=>this.toProtocolCallHierarchyOutgoingCall(g,h))}getCanonicalFileName(r){const a=this.host.useCaseSensitiveFileNames?r:Vw(r);return ca(a)}exit(){}notRequired(r){return r&&this.doOutput(void 0,r.command,r.seq,!0,this.performanceData),{responseRequired:!1,performanceData:this.performanceData}}requiredResponse(r){return{response:r,responseRequired:!0,performanceData:this.performanceData}}addProtocolHandler(r,a){if(this.handlers.has(r))throw new Error(`Protocol handler already exists for command "${r}"`);this.handlers.set(r,a)}setCurrentRequest(r){j.assert(this.currentRequestId===void 0),this.currentRequestId=r,this.cancellationToken.setRequest(r)}resetCurrentRequest(r){j.assert(this.currentRequestId===r),this.currentRequestId=void 0,this.cancellationToken.resetRequest(r)}executeWithRequestId(r,a,u){const h=this.performanceData;try{return this.performanceData=u,this.setCurrentRequest(r),a()}finally{this.resetCurrentRequest(r),this.performanceData=h}}executeCommand(r){const a=this.handlers.get(r.command);if(a){const u=this.executeWithRequestId(r.seq,()=>a(r),void 0);return this.projectService.enableRequestedPlugins(),u}else return this.logger.msg(`Unrecognized JSON command:${p2(r)}`,"Err"),this.doOutput(void 0,"unknown",r.seq,!1,void 0,`Unrecognized JSON command: ${r.command}`),{responseRequired:!1}}onMessage(r){var a,u,h,p,g,C,b;this.gcTimer.scheduleCollect();let T;const E=this.performanceData;this.logger.hasLevel(2)&&(T=this.hrtime(),this.logger.hasLevel(3)&&this.logger.info(`request:${n5(this.toStringMessage(r))}`));let N,R;try{N=this.parseMessage(r),R=N.arguments&&N.arguments.file?N.arguments:void 0,(a=Zn)==null||a.instant(Zn.Phase.Session,"request",{seq:N.seq,command:N.command}),(u=Zn)==null||u.push(Zn.Phase.Session,"executeCommand",{seq:N.seq,command:N.command},!0);const{response:F,responseRequired:H,performanceData:U}=this.executeCommand(N);if((h=Zn)==null||h.pop(),this.logger.hasLevel(2)){const q=tGt(this.hrtime(T)).toFixed(4);H?this.logger.perftrc(`${N.seq}::${N.command}: elapsed time (in milliseconds) ${q}`):this.logger.perftrc(`${N.seq}::${N.command}: async elapsed time (in milliseconds) ${q}`)}(p=Zn)==null||p.instant(Zn.Phase.Session,"response",{seq:N.seq,command:N.command,success:!!F}),F?this.doOutput(F,N.command,N.seq,!0,U):H&&this.doOutput(void 0,N.command,N.seq,!1,U,"No content available.")}catch(F){if((g=Zn)==null||g.popAll(),F instanceof t8){(C=Zn)==null||C.instant(Zn.Phase.Session,"commandCanceled",{seq:N==null?void 0:N.seq,command:N==null?void 0:N.command}),this.doOutput({canceled:!0},N.command,N.seq,!0,this.performanceData);return}this.logErrorWorker(F,this.toStringMessage(r),R),(b=Zn)==null||b.instant(Zn.Phase.Session,"commandError",{seq:N==null?void 0:N.seq,command:N==null?void 0:N.command,message:F.message}),this.doOutput(void 0,N?N.command:"unknown",N?N.seq:0,!1,this.performanceData,"Error processing request. "+F.message+`
+`+F.stack)}finally{this.performanceData=E}}parseMessage(r){return JSON.parse(r)}toStringMessage(r){return r}getFormatOptions(r){return this.projectService.getFormatCodeOptions(r)}getPreferences(r){return this.projectService.getPreferences(r)}getHostFormatOptions(){return this.projectService.getHostFormatCodeOptions()}getHostPreferences(){return this.projectService.getHostPreferences()}};function qht(t){const r=t.diagnosticsDuration&&as(t.diagnosticsDuration,([a,u])=>({...u,file:a}));return{...t,diagnosticsDuration:r}}function X1(t,r){return{start:r.positionToLineOffset(t.start),end:r.positionToLineOffset(au(t))}}function cRe(t,r,a){const u=X1(t,a),h=r&&X1(r,a);return h?{...u,contextStart:h.start,contextEnd:h.end}:u}function hGt(t,r){return{start:$ht(r,t.span.start),end:$ht(r,au(t.span)),newText:t.newText}}function $ht(t,r){return tRe(t)?pGt(t.getLineAndCharacterOfPosition(r)):t.positionToLineOffset(r)}function _Gt(t,r){const a=t.ranges.map(u=>({start:r.positionToLineOffset(u.start),end:r.positionToLineOffset(u.start+u.length)}));return t.wordPattern?{ranges:a,wordPattern:t.wordPattern}:{ranges:a}}function pGt(t){return{line:t.line+1,offset:t.character+1}}function mGt(t){j.assert(t.textChanges.length===1);const r=ya(t.textChanges);return j.assert(r.span.start===0&&r.span.length===0),{fileName:t.fileName,textChanges:[{start:{line:0,offset:0},end:{line:0,offset:0},newText:r.newText}]}}function lRe(t,r,a,u){const h=gGt(t,r,u),{line:p,character:g}=P6(ZL(h),a);return{line:p+1,offset:g+1}}function gGt(t,r,a){for(const{fileName:u,textChanges:h}of a)if(u===r)for(let p=h.length-1;p>=0;p--){const{newText:g,span:{start:C,length:b}}=h[p];t=t.slice(0,C)+g+t.slice(C+b)}return t}function Jht(t,{fileName:r,textSpan:a,contextSpan:u,isWriteAccess:h,isDefinition:p},{disableLineTextInReferences:g}){const C=j.checkDefined(t.getScriptInfo(r)),b=cRe(a,u,C),T=g?void 0:yGt(C,b);return{file:r,...b,lineText:T,isWriteAccess:h,isDefinition:p}}function yGt(t,r){const a=t.lineToTextSpan(r.start.line-1);return t.getSnapshot().getText(a.start,au(a)).replace(/\r|\n/g,"")}function vGt(t){return t===void 0||t&&typeof t=="object"&&typeof t.exportName=="string"&&(t.fileName===void 0||typeof t.fileName=="string")&&(t.ambientModuleName===void 0||typeof t.ambientModuleName=="string"&&(t.isPackageJsonImport===void 0||typeof t.isPackageJsonImport=="boolean"))}var gO=4,uRe=(t=>(t[t.PreStart=0]="PreStart",t[t.Start=1]="Start",t[t.Entire=2]="Entire",t[t.Mid=3]="Mid",t[t.End=4]="End",t[t.PostEnd=5]="PostEnd",t))(uRe||{}),bGt=class{constructor(){this.goSubtree=!0,this.lineIndex=new mz,this.endBranch=[],this.state=2,this.initialText="",this.trailingText="",this.lineIndex.root=new yO,this.startPath=[this.lineIndex.root],this.stack=[this.lineIndex.root]}get done(){return!1}insertLines(t,r){r&&(this.trailingText=""),t?t=this.initialText+t+this.trailingText:t=this.initialText+this.trailingText;const u=mz.linesFromText(t).lines;u.length>1&&u[u.length-1]===""&&u.pop();let h,p;for(let C=this.endBranch.length-1;C>=0;C--)this.endBranch[C].updateCounts(),this.endBranch[C].charCount()===0&&(p=this.endBranch[C],C>0?h=this.endBranch[C-1]:h=this.branchNode);p&&h.remove(p);const g=this.startPath[this.startPath.length-1];if(u.length>0)if(g.text=u[0],u.length>1){let C=new Array(u.length-1),b=g;for(let N=1;N<u.length;N++)C[N-1]=new $Y(u[N]);let T=this.startPath.length-2;for(;T>=0;){const N=this.startPath[T];C=N.insertAt(b,C),T--,b=N}let E=C.length;for(;E>0;){const N=new yO;N.add(this.lineIndex.root),C=N.insertAt(this.lineIndex.root,C),E=C.length,this.lineIndex.root=N}this.lineIndex.root.updateCounts()}else for(let C=this.startPath.length-2;C>=0;C--)this.startPath[C].updateCounts();else{this.startPath[this.startPath.length-2].remove(g);for(let b=this.startPath.length-2;b>=0;b--)this.startPath[b].updateCounts()}return this.lineIndex}post(t,r,a){a===this.lineCollectionAtBranch&&(this.state=4),this.stack.pop()}pre(t,r,a,u,h){const p=this.stack[this.stack.length-1];this.state===2&&h===1&&(this.state=1,this.branchNode=p,this.lineCollectionAtBranch=a);let g;function C(b){return b.isLeaf()?new $Y(""):new yO}switch(h){case 0:this.goSubtree=!1,this.state!==4&&p.add(a);break;case 1:this.state===4?this.goSubtree=!1:(g=C(a),p.add(g),this.startPath.push(g));break;case 2:this.state!==4?(g=C(a),p.add(g),this.startPath.push(g)):a.isLeaf()||(g=C(a),p.add(g),this.endBranch.push(g));break;case 3:this.goSubtree=!1;break;case 4:this.state!==4?this.goSubtree=!1:a.isLeaf()||(g=C(a),p.add(g),this.endBranch.push(g));break;case 5:this.goSubtree=!1,this.state!==1&&p.add(a);break}this.goSubtree&&this.stack.push(g)}leaf(t,r,a){this.state===1?this.initialText=a.text.substring(0,t):this.state===2?(this.initialText=a.text.substring(0,t),this.trailingText=a.text.substring(t+r)):this.trailingText=a.text.substring(t+r)}},CGt=class{constructor(t,r,a){this.pos=t,this.deleteLen=r,this.insertedText=a}getTextChangeRange(){return AW(Ff(this.pos,this.deleteLen),this.insertedText?this.insertedText.length:0)}},Bpe=class tL{constructor(){this.changes=[],this.versions=new Array(tL.maxVersions),this.minVersion=0,this.currentVersion=0}versionToIndex(r){if(!(r<this.minVersion||r>this.currentVersion))return r%tL.maxVersions}currentVersionToIndex(){return this.currentVersion%tL.maxVersions}edit(r,a,u){this.changes.push(new CGt(r,a,u)),(this.changes.length>tL.changeNumberThreshold||a>tL.changeLengthThreshold||u&&u.length>tL.changeLengthThreshold)&&this.getSnapshot()}getSnapshot(){return this._getSnapshot()}_getSnapshot(){let r=this.versions[this.currentVersionToIndex()];if(this.changes.length>0){let a=r.index;for(const u of this.changes)a=a.edit(u.pos,u.deleteLen,u.insertedText);r=new Ght(this.currentVersion+1,this,a,this.changes),this.currentVersion=r.version,this.versions[this.currentVersionToIndex()]=r,this.changes=[],this.currentVersion-this.minVersion>=tL.maxVersions&&(this.minVersion=this.currentVersion-tL.maxVersions+1)}return r}getSnapshotVersion(){return this._getSnapshot().version}getAbsolutePositionAndLineText(r){return this._getSnapshot().index.lineNumberToInfo(r)}lineOffsetToPosition(r,a){return this._getSnapshot().index.absolutePositionOfStartOfLine(r)+(a-1)}positionToLineOffset(r){return this._getSnapshot().index.positionToLineOffset(r)}lineToTextSpan(r){const a=this._getSnapshot().index,{lineText:u,absolutePosition:h}=a.lineNumberToInfo(r+1),p=u!==void 0?u.length:a.absolutePositionOfStartOfLine(r+2)-h;return Ff(h,p)}getTextChangesBetweenVersions(r,a){if(r<a)if(r>=this.minVersion){const u=[];for(let h=r+1;h<=a;h++){const p=this.versions[this.versionToIndex(h)];for(const g of p.changesSincePreviousVersion)u.push(g.getTextChangeRange())}return n2e(u)}else return;else return sG}getLineCount(){return this._getSnapshot().index.getLineCount()}static fromString(r){const a=new tL,u=new Ght(0,a,new mz);a.versions[a.currentVersion]=u;const h=mz.linesFromText(r);return u.index.load(h.lines),a}};Bpe.changeNumberThreshold=8,Bpe.changeLengthThreshold=256,Bpe.maxVersions=8;var Wpe=Bpe,Ght=class dAt{constructor(r,a,u,h=Vd){this.version=r,this.cache=a,this.index=u,this.changesSincePreviousVersion=h}getText(r,a){return this.index.getText(r,a-r)}getLength(){return this.index.getLength()}getChangeRange(r){if(r instanceof dAt&&this.cache===r.cache)return this.version<=r.version?sG:this.cache.getTextChangesBetweenVersions(r.version,this.version)}},mz=class Aqe{constructor(){this.checkEdits=!1}absolutePositionOfStartOfLine(r){return this.lineNumberToInfo(r).absolutePosition}positionToLineOffset(r){const{oneBasedLine:a,zeroBasedColumn:u}=this.root.charOffsetToLineInfo(1,r);return{line:a,offset:u+1}}positionToColumnAndLineText(r){return this.root.charOffsetToLineInfo(1,r)}getLineCount(){return this.root.lineCount()}lineNumberToInfo(r){const a=this.getLineCount();if(r<=a){const{position:u,leaf:h}=this.root.lineNumberToInfo(r,0);return{absolutePosition:u,lineText:h&&h.text}}else return{absolutePosition:this.root.charCount(),lineText:void 0}}load(r){if(r.length>0){const a=[];for(let u=0;u<r.length;u++)a[u]=new $Y(r[u]);this.root=Aqe.buildTreeFromBottom(a)}else this.root=new yO}walk(r,a,u){this.root.walk(r,a,u)}getText(r,a){let u="";return a>0&&r<this.root.charCount()&&this.walk(r,a,{goSubtree:!0,done:!1,leaf:(h,p,g)=>{u=u.concat(g.text.substring(h,h+p))}}),u}getLength(){return this.root.charCount()}every(r,a,u){u||(u=this.root.charCount());const h={goSubtree:!0,done:!1,leaf(p,g,C){r(C,p,g)||(this.done=!0)}};return this.walk(a,u-a,h),!h.done}edit(r,a,u){if(this.root.charCount()===0)return j.assert(a===0),u!==void 0?(this.load(Aqe.linesFromText(u).lines),this):void 0;{let h;if(this.checkEdits){const C=this.getText(0,this.root.charCount());h=C.slice(0,r)+u+C.slice(r+a)}const p=new bGt;let g=!1;if(r>=this.root.charCount()){r=this.root.charCount()-1;const C=this.getText(r,1);u?u=C+u:u=C,a=0,g=!0}else if(a>0){const C=r+a,{zeroBasedColumn:b,lineText:T}=this.positionToColumnAndLineText(C);b===0&&(a+=T.length,u=u?u+T:T)}if(this.root.walk(r,a,p),p.insertLines(u,g),this.checkEdits){const C=p.lineIndex.getText(0,p.lineIndex.getLength());j.assert(h===C,"buffer edit mismatch")}return p.lineIndex}}static buildTreeFromBottom(r){if(r.length<gO)return new yO(r);const a=new Array(Math.ceil(r.length/gO));let u=0;for(let h=0;h<a.length;h++){const p=Math.min(u+gO,r.length);a[h]=new yO(r.slice(u,p)),u=p}return this.buildTreeFromBottom(a)}static linesFromText(r){const a=ZL(r);if(a.length===0)return{lines:[],lineMap:a};const u=new Array(a.length),h=a.length-1;for(let g=0;g<h;g++)u[g]=r.substring(a[g],a[g+1]);const p=r.substring(a[h]);return p.length>0?u[h]=p:u.pop(),{lines:u,lineMap:a}}},yO=class Oqe{constructor(r=[]){this.children=r,this.totalChars=0,this.totalLines=0,r.length&&this.updateCounts()}isLeaf(){return!1}updateCounts(){this.totalChars=0,this.totalLines=0;for(const r of this.children)this.totalChars+=r.charCount(),this.totalLines+=r.lineCount()}execWalk(r,a,u,h,p){return u.pre&&u.pre(r,a,this.children[h],this,p),u.goSubtree?(this.children[h].walk(r,a,u),u.post&&u.post(r,a,this.children[h],this,p)):u.goSubtree=!0,u.done}skipChild(r,a,u,h,p){h.pre&&!h.done&&(h.pre(r,a,this.children[u],this,p),h.goSubtree=!0)}walk(r,a,u){let h=0,p=this.children[h].charCount(),g=r;for(;g>=p;)this.skipChild(g,a,h,u,0),g-=p,h++,p=this.children[h].charCount();if(g+a<=p){if(this.execWalk(g,a,u,h,2))return}else{if(this.execWalk(g,p-g,u,h,1))return;let C=a-(p-g);for(h++,p=this.children[h].charCount();C>p;){if(this.execWalk(0,p,u,h,3))return;C-=p,h++,p=this.children[h].charCount()}if(C>0&&this.execWalk(0,C,u,h,4))return}if(u.pre){const C=this.children.length;if(h<C-1)for(let b=h+1;b<C;b++)this.skipChild(0,0,b,u,5)}}charOffsetToLineInfo(r,a){if(this.children.length===0)return{oneBasedLine:r,zeroBasedColumn:a,lineText:void 0};for(const p of this.children){if(p.charCount()>a)return p.isLeaf()?{oneBasedLine:r,zeroBasedColumn:a,lineText:p.text}:p.charOffsetToLineInfo(r,a);a-=p.charCount(),r+=p.lineCount()}const u=this.lineCount();if(u===0)return{oneBasedLine:1,zeroBasedColumn:0,lineText:void 0};const h=j.checkDefined(this.lineNumberToInfo(u,0).leaf);return{oneBasedLine:u,zeroBasedColumn:h.charCount(),lineText:void 0}}lineNumberToInfo(r,a){for(const u of this.children){const h=u.lineCount();if(h>=r)return u.isLeaf()?{position:a,leaf:u}:u.lineNumberToInfo(r,a);r-=h,a+=u.charCount()}return{position:a,leaf:void 0}}splitAfter(r){let a;const u=this.children.length;r++;const h=r;if(r<u){for(a=new Oqe;r<u;)a.add(this.children[r]),r++;a.updateCounts()}return this.children.length=h,a}remove(r){const a=this.findChildIndex(r),u=this.children.length;if(a<u-1)for(let h=a;h<u-1;h++)this.children[h]=this.children[h+1];this.children.pop()}findChildIndex(r){const a=this.children.indexOf(r);return j.assert(a!==-1),a}insertAt(r,a){let u=this.findChildIndex(r);const h=this.children.length,p=a.length;if(h<gO&&u===h-1&&p===1)return this.add(a[0]),this.updateCounts(),[];{const g=this.splitAfter(u);let C=0;for(u++;u<gO&&C<p;)this.children[u]=a[C],u++,C++;let b=[],T=0;if(C<p){T=Math.ceil((p-C)/gO),b=new Array(T);let E=0;for(let R=0;R<T;R++)b[R]=new Oqe;let N=b[0];for(;C<p;)N.add(a[C]),C++,N.children.length===gO&&(E++,N=b[E]);for(let R=b.length-1;R>=0;R--)b[R].children.length===0&&b.pop()}g&&b.push(g),this.updateCounts();for(let E=0;E<T;E++)b[E].updateCounts();return b}}add(r){this.children.push(r),j.assert(this.children.length<=gO)}charCount(){return this.totalChars}lineCount(){return this.totalLines}},$Y=class{constructor(t){this.text=t}isLeaf(){return!0}walk(t,r,a){a.leaf(t,r,this)}charCount(){return this.text.length}lineCount(){return 1}},Kht=class fAt{constructor(r,a,u,h,p,g){this.telemetryEnabled=r,this.logger=a,this.host=u,this.globalTypingsCacheLocation=h,this.event=p,this.maxActiveRequestCount=g,this.activeRequestCount=0,this.requestQueue=JR(),this.requestMap=new Map,this.requestedRegistry=!1,this.packageInstallId=0}isKnownTypesPackageName(r){var a;return J1.validatePackageName(r)!==J1.NameValidationResult.Ok?!1:(this.requestedRegistry||(this.requestedRegistry=!0,this.installer.send({kind:"typesRegistry"})),!!((a=this.typesRegistryCache)!=null&&a.has(r)))}installPackage(r){this.packageInstallId++;const a={kind:"installPackage",...r,id:this.packageInstallId},u=new Promise((h,p)=>{(this.packageInstalledPromise??(this.packageInstalledPromise=new Map)).set(this.packageInstallId,{resolve:h,reject:p})});return this.installer.send(a),u}attach(r){this.projectService=r,this.installer=this.createInstallerProcess()}onProjectClosed(r){this.installer.send({projectName:r.getProjectName(),kind:"closeProject"})}enqueueInstallTypingsRequest(r,a,u){const h=CMe(r,a,u);this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Scheduling throttled operation:${p2(h)}`),this.activeRequestCount<this.maxActiveRequestCount?this.scheduleRequest(h):(this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Deferring request for: ${h.projectName}`),this.requestQueue.enqueue(h),this.requestMap.set(h.projectName,h))}handleMessage(r){var a,u;switch(this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Received response:${p2(r)}`),r.kind){case ufe:this.typesRegistryCache=new Map(Object.entries(r.typesRegistry));break;case cZ:{const h=(a=this.packageInstalledPromise)==null?void 0:a.get(r.id);j.assertIsDefined(h,"Should find the promise for package install"),(u=this.packageInstalledPromise)==null||u.delete(r.id),r.success?h.resolve({successMessage:r.message}):h.reject(r.message),this.projectService.updateTypingsForProject(r),this.event(r,"setTypings");break}case NPe:{const h={message:r.message};this.event(h,"typesInstallerInitializationFailed");break}case dfe:{const h={eventId:r.eventId,packages:r.packagesToInstall};this.event(h,"beginInstallTypes");break}case ffe:{if(this.telemetryEnabled){const g={telemetryEventName:"typingsInstalled",payload:{installedPackages:r.packagesToInstall.join(","),installSuccess:r.installSuccess,typingsInstallerVersion:r.typingsInstallerVersion}};this.event(g,"telemetry")}const h={eventId:r.eventId,packages:r.packagesToInstall,success:r.installSuccess};this.event(h,"endInstallTypes");break}case aZ:{this.projectService.updateTypingsForProject(r);break}case oZ:{for(this.activeRequestCount>0?this.activeRequestCount--:j.fail("TIAdapter:: Received too many responses");!this.requestQueue.isEmpty();){const h=this.requestQueue.dequeue();if(this.requestMap.get(h.projectName)===h){this.requestMap.delete(h.projectName),this.scheduleRequest(h);break}this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Skipping defunct request for: ${h.projectName}`)}this.projectService.updateTypingsForProject(r),this.event(r,"setTypings");break}case aj:this.projectService.watchTypingLocations(r);break}}scheduleRequest(r){this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Scheduling request for: ${r.projectName}`),this.activeRequestCount++,this.host.setTimeout(()=>{this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Sending request:${p2(r)}`),this.installer.send(r)},fAt.requestDelayMillis,`${r.projectName}::${r.kind}`)}};Kht.requestDelayMillis=100;var Xht=Kht,Qht={};c(Qht,{ActionInvalidate:()=>aZ,ActionPackageInstalled:()=>cZ,ActionSet:()=>oZ,ActionWatchTypingLocations:()=>aj,Arguments:()=>hfe,AutoImportProviderProject:()=>VMe,AuxiliaryProject:()=>BMe,CharRangeSection:()=>uRe,CloseFileWatcherEvent:()=>Epe,CommandNames:()=>Wht,ConfigFileDiagEvent:()=>wpe,ConfiguredProject:()=>HMe,ConfiguredProjectLoadKind:()=>JMe,CreateDirectoryWatcherEvent:()=>Dpe,CreateFileWatcherEvent:()=>Tpe,Errors:()=>cC,EventBeginInstallTypes:()=>dfe,EventEndInstallTypes:()=>ffe,EventInitializationFailed:()=>NPe,EventTypesRegistry:()=>ufe,ExternalProject:()=>gpe,GcTimer:()=>EMe,InferredProject:()=>FMe,LargeFileReferencedEvent:()=>Spe,LineIndex:()=>mz,LineLeaf:()=>$Y,LineNode:()=>yO,LogLevel:()=>vMe,Msg:()=>bMe,OpenFileInfoTelemetryEvent:()=>jMe,Project:()=>xA,ProjectInfoTelemetryEvent:()=>kpe,ProjectKind:()=>uz,ProjectLanguageServiceStateEvent:()=>xpe,ProjectLoadingFinishEvent:()=>Cpe,ProjectLoadingStartEvent:()=>bpe,ProjectService:()=>eRe,ProjectsUpdatedInBackgroundEvent:()=>zY,ScriptInfo:()=>PMe,ScriptVersionCache:()=>Wpe,Session:()=>Uht,TextStorage:()=>LMe,ThrottledOperations:()=>DMe,TypingsInstallerAdapter:()=>Xht,allFilesAreJsOrDts:()=>OMe,allRootFilesAreJsOrDts:()=>AMe,asNormalizedPath:()=>fht,convertCompilerOptions:()=>UY,convertFormatOptions:()=>pO,convertScriptKindName:()=>Npe,convertTypeAcquisition:()=>UMe,convertUserPreferences:()=>qMe,convertWatchOptions:()=>_z,countEachFileTypes:()=>dz,createInstallTypingsRequest:()=>CMe,createModuleSpecifierCache:()=>nRe,createNormalizedPathMap:()=>hht,createPackageJsonCache:()=>rRe,createSortedArray:()=>TMe,emptyArray:()=>Vd,findArgument:()=>dit,formatDiagnosticToProtocol:()=>pz,formatMessage:()=>sRe,getBaseConfigFileName:()=>mpe,getLocationInNewDocument:()=>lRe,hasArgument:()=>uit,hasNoTypeScriptSource:()=>MMe,indent:()=>n5,isBackgroundProject:()=>hz,isConfigFile:()=>tRe,isConfiguredProject:()=>LS,isDynamicFileName:()=>lz,isExternalProject:()=>fz,isInferredProject:()=>_O,isInferredProjectName:()=>SMe,isProjectDeferredClose:()=>jY,makeAutoImportProviderProjectName:()=>xMe,makeAuxiliaryProjectName:()=>kMe,makeInferredProjectName:()=>wMe,maxFileSize:()=>vpe,maxProgramSizeForNonTsFiles:()=>ype,normalizedPathToPath:()=>hO,nowString:()=>fit,nullCancellationToken:()=>Rht,nullTypingsInstaller:()=>qY,protocol:()=>IMe,stringifyIndented:()=>p2,toEvent:()=>oRe,toNormalizedPath:()=>Jl,tryConvertScriptKindName:()=>Ipe,typingsInstaller:()=>yMe,updateProjectIfDirty:()=>Ym}),typeof console<"u"&&(j.loggingHost={log(t,r){switch(t){case 1:return console.error(r);case 2:return console.warn(r);case 3:return console.log(r);case 4:return console.log(r)}}})})({get exports(){return i},set exports(n){i=n,l.exports&&(l.exports=n)}})})(sAt);var hAt=sAt.exports;const _At=iai(hAt),V9i=lai({__proto__:null,default:_At},[hAt]);window.MonacoEnvironment={getWorker(l,e){return e==="json"?new B8i:e==="css"||e==="scss"||e==="less"?new R8i:e==="html"||e==="handlebars"||e==="razor"?new F8i:e==="typescript"||e==="javascript"?new W8i:new M8i}};class j8i extends fDt{showContextView(...e){super.showContextView(...e);const i=this.contextView.view;i.style.left=`calc(${i.style.left} / var(--slidev-slide-scale))`,i.style.top=`calc(${i.style.top} / var(--slidev-slide-scale))`,i.style.transform="scale(calc(1 / var(--slidev-slide-scale)))",i.style.transformOrigin="0 0"}}oa.initialize({contextViewService:new wE(j8i,[],!0)});const z8i=_ai(async()=>{const l=aT.typescript.typescriptDefaults;l.setCompilerOptions({...l.getCompilerOptions(),strict:!0,moduleResolution:aT.typescript.ModuleResolutionKind.NodeJs,module:aT.typescript.ModuleKind.ESNext});const e=KB.monacoTypesSource==="cdn"?Nai({projectName:"TypeScript Playground",typescript:_At,logger:console,delegate:{receivedFile:(m,v)=>{l.addExtraLib(m,`file://${v}`);const x=Bwe.file(v);c9.getModel(x)===null&&c9.createModel(m,"javascript",x)},progress:(m,v)=>{console.debug(`[Typescript ATA] ${m} / ${v}`)}}}):()=>{};aT.register({id:"vue"}),aT.register({id:"html"}),aT.register({id:"css"}),aT.register({id:"typescript"}),aT.register({id:"javascript"});const{shiki:i,languages:n,themes:s,shikiToMonaco:c}=await _o(async()=>{const{shiki:m,languages:v,themes:x,shikiToMonaco:w}=await import("../slidev/shiki-Bsl5RiOy.js");return{shiki:m,languages:v,themes:x,shikiToMonaco:w}},__vite__mapDeps([17,18,2,19,1])),d=await i,f={};for(const m of bai){const v=await m(rBe);Object.assign(f,v==null?void 0:v.editorOptions)}c(d,rBe),typeof s=="string"?c9.setTheme(s):cai(()=>{c9.setTheme(Mqe.value?s.dark||"vitesse-dark":s.light||"vitesse-light")});for(const m of n)aT.register({id:m});return{monaco:rBe,ata:e,editorOptions:f}});async function U8i(l,e){const i=Bwe.file(e),n=(await l()).default;aT.typescript.typescriptDefaults.addExtraLib(n,`file:///${e}`),c9.createModel(n,"javascript",i)}const sBe=new Map;async function pAt(l,e){if(sBe.has(e))return sBe.get(e);const i=U8i(l,e);return sBe.set(e,i),i}const H9i=Object.freeze(Object.defineProperty({__proto__:null,addFile:pAt,default:z8i},Symbol.toStringTag,{value:"Module"}));pAt(()=>_o(()=>Promise.resolve().then(()=>$8i),void 0),"external.ts");const j9i=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),q8i=`/* eslint-disable no-console */
+
+// #region snippet
+// Inside ./snippets/external.ts
+export function emptyArray<T>(length: number) {
+ return Array.from<T>({ length })
+}
+// #endregion snippet
+
+export function sayHello() {
+ console.log('Hello from snippets/external.ts')
+}
+`,$8i=Object.freeze(Object.defineProperty({__proto__:null,default:q8i},Symbol.toStringTag,{value:"Module"}));export{_o as _,KB as a,s7i as b,Q8i as c,r7i as d,mai as e,Mqe as f,a7i as g,gai as h,Myt as i,n7i as j,uai as k,t7i as l,i7i as m,_ai as n,Fse as o,o7i as p,ENt as q,e7i as r,Z8i as s,V9i as t,Y8i as u,H9i as v,j9i as w};